@nocobase/plugin-data-visualization 1.7.0-beta.9 → 1.8.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,47 +0,0 @@
1
- /**
2
- * This file is part of the NocoBase (R) project.
3
- * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
- * Authors: NocoBase Team.
5
- *
6
- * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
- * For more information, please refer to: https://www.nocobase.com/agreement.
8
- */
9
-
10
- (self.webpackChunk_nocobase_plugin_data_visualization=self.webpackChunk_nocobase_plugin_data_visualization||[]).push([["950"],{823:function(t,e,n){"use strict";let r,i,o,a;n.r(e),n.d(e,{Scatter:function(){return V5},Box:function(){return Hf},Bar:function(){return VH},Mix:function(){return HD},Pie:function(){return V1},DualAxes:function(){return VX},Histogram:function(){return Hl},Rose:function(){return Hr},Tiny:function(){return He},Venn:function(){return HI},Area:function(){return VG},Base:function(){return VW},BidirectionalBar:function(){return HN},Line:function(){return VJ},measureTextWidth:function(){return HW},Waterfall:function(){return Ho},Gauge:function(){return Hb},Radar:function(){return V4},Stock:function(){return Hy},Treemap:function(){return HM},RadialBar:function(){return H_},WordCloud:function(){return HE},Sankey:function(){return Hh},Bullet:function(){return Hv},Column:function(){return Vq},Heatmap:function(){return Hu},CirclePacking:function(){return Hj},Funnel:function(){return VZ},G2:function(){return ew},Sunburst:function(){return Hz},Liquid:function(){return HO},Violin:function(){return HT}});var l,s,u,c,f,p,h,d,y,g,v,m,b,x,O,w,E,k,M,S,_,P,j,A,T,C,N,L,I,R,D,F,z,B,W,$,G,V,H,U,q,Y,X,K,Z,Q,J,tt,te,tn,tr,ti,to,ta,tl,ts,tu,tc,tf,tp,th,td,ty,tg,tv,tm,tb,tx,tO,tw,tE,tk,tM,tS,t_,tP,tj,tA,tT,tC,tN,tL,tI,tR,tD,tF,tz,tB,tW,t$,tG,tV,tH,tU,tq,tY,tX,tK,tZ,tQ,tJ,t0,t1,t2,t5,t3,t4,t6,t8,t9,t7,et,ee,en,er,ei,eo,ea,el,es,eu,ec,ef,ep,eh,ed,ey,eg,ev={};n.r(ev),n.d(ev,{frequency:function(){return ig},id:function(){return iv},name:function(){return im},weight:function(){return iy}});var em={};n.r(em),n.d(em,{geoAlbers:function(){return lq},geoAlbersUsa:function(){return sr},geoAzimuthalEqualArea:function(){return lU},geoAzimuthalEqualAreaRaw:function(){return lH},geoAzimuthalEquidistant:function(){return l4},geoAzimuthalEquidistantRaw:function(){return l3},geoConicConformal:function(){return l$},geoConicConformalRaw:function(){return lW},geoConicEqualArea:function(){return lR},geoConicEqualAreaRaw:function(){return lI},geoConicEquidistant:function(){return l5},geoConicEquidistantRaw:function(){return l2},geoEqualEarth:function(){return sn},geoEqualEarthRaw:function(){return se},geoEquirectangular:function(){return l1},geoEquirectangularRaw:function(){return l0},geoGnomonic:function(){return lJ},geoGnomonicRaw:function(){return lQ},geoIdentity:function(){return si},geoMercator:function(){return lF},geoMercatorRaw:function(){return lD},geoNaturalEarth1:function(){return l7},geoNaturalEarth1Raw:function(){return l9},geoOrthographic:function(){return lZ},geoOrthographicRaw:function(){return lK},geoProjection:function(){return lC},geoProjectionMutator:function(){return lN},geoStereographic:function(){return l8},geoStereographicRaw:function(){return l6},geoTransverseMercator:function(){return lX},geoTransverseMercatorRaw:function(){return lY}});var eb={};n.r(eb),n.d(eb,{add:function(){return u6},adjoint:function(){return uM},clone:function(){return um},copy:function(){return ub},create:function(){return uv},determinant:function(){return uS},equals:function(){return ce},exactEquals:function(){return ct},frob:function(){return u4},fromQuat:function(){return uq},fromQuat2:function(){return uW},fromRotation:function(){return uR},fromRotationTranslation:function(){return uB},fromRotationTranslationScale:function(){return uH},fromRotationTranslationScaleOrigin:function(){return uU},fromScaling:function(){return uI},fromTranslation:function(){return uL},fromValues:function(){return ux},fromXRotation:function(){return uD},fromYRotation:function(){return uF},fromZRotation:function(){return uz},frustum:function(){return uY},getRotation:function(){return uV},getScaling:function(){return uG},getTranslation:function(){return u$},identity:function(){return uw},invert:function(){return uk},lookAt:function(){return u2},mul:function(){return cn},multiply:function(){return u_},multiplyScalar:function(){return u9},multiplyScalarAndAdd:function(){return u7},ortho:function(){return u0},orthoNO:function(){return uJ},orthoZO:function(){return u1},perspective:function(){return uK},perspectiveFromFieldOfView:function(){return uQ},perspectiveNO:function(){return uX},perspectiveZO:function(){return uZ},rotate:function(){return uA},rotateX:function(){return uT},rotateY:function(){return uC},rotateZ:function(){return uN},scale:function(){return uj},set:function(){return uO},str:function(){return u3},sub:function(){return cr},subtract:function(){return u8},targetTo:function(){return u5},translate:function(){return uP},transpose:function(){return uE}});var ex={};n.r(ex),n.d(ex,{area:function(){return C9},bottom:function(){return Na},bottomLeft:function(){return Na},bottomRight:function(){return Na},inside:function(){return Na},left:function(){return Na},outside:function(){return Nc},right:function(){return Na},spider:function(){return Np},surround:function(){return Nd},top:function(){return Na},topLeft:function(){return Na},topRight:function(){return Na}});var eO={};n.r(eO),n.d(eO,{interpolateBlues:function(){return L4},interpolateBrBG:function(){return Lv},interpolateBuGn:function(){return LI},interpolateBuPu:function(){return LD},interpolateCividis:function(){return Ia},interpolateCool:function(){return Im},interpolateCubehelixDefault:function(){return Ig},interpolateGnBu:function(){return Lz},interpolateGreens:function(){return L8},interpolateGreys:function(){return L7},interpolateInferno:function(){return Ij},interpolateMagma:function(){return IP},interpolateOrRd:function(){return LW},interpolateOranges:function(){return Io},interpolatePRGn:function(){return Lb},interpolatePiYG:function(){return LO},interpolatePlasma:function(){return IA},interpolatePuBu:function(){return LH},interpolatePuBuGn:function(){return LG},interpolatePuOr:function(){return LE},interpolatePuRd:function(){return Lq},interpolatePurples:function(){return Ie},interpolateRainbow:function(){return Ix},interpolateRdBu:function(){return LM},interpolateRdGy:function(){return L_},interpolateRdPu:function(){return LX},interpolateRdYlBu:function(){return Lj},interpolateRdYlGn:function(){return LT},interpolateReds:function(){return Ir},interpolateSinebow:function(){return Ik},interpolateSpectral:function(){return LN},interpolateTurbo:function(){return IM},interpolateViridis:function(){return I_},interpolateWarm:function(){return Iv},interpolateYlGn:function(){return LJ},interpolateYlGnBu:function(){return LZ},interpolateYlOrBr:function(){return L1},interpolateYlOrRd:function(){return L5},schemeAccent:function(){return Nj},schemeBlues:function(){return L3},schemeBrBG:function(){return Lg},schemeBuGn:function(){return LL},schemeBuPu:function(){return LR},schemeCategory10:function(){return NP},schemeDark2:function(){return NA},schemeGnBu:function(){return LF},schemeGreens:function(){return L6},schemeGreys:function(){return L9},schemeObservable10:function(){return NT},schemeOrRd:function(){return LB},schemeOranges:function(){return Ii},schemePRGn:function(){return Lm},schemePaired:function(){return NC},schemePastel1:function(){return NN},schemePastel2:function(){return NL},schemePiYG:function(){return Lx},schemePuBu:function(){return LV},schemePuBuGn:function(){return L$},schemePuOr:function(){return Lw},schemePuRd:function(){return LU},schemePurples:function(){return It},schemeRdBu:function(){return Lk},schemeRdGy:function(){return LS},schemeRdPu:function(){return LY},schemeRdYlBu:function(){return LP},schemeRdYlGn:function(){return LA},schemeReds:function(){return In},schemeSet1:function(){return NI},schemeSet2:function(){return NR},schemeSet3:function(){return ND},schemeSpectral:function(){return LC},schemeTableau10:function(){return NF},schemeYlGn:function(){return LQ},schemeYlGnBu:function(){return LK},schemeYlOrBr:function(){return L0},schemeYlOrRd:function(){return L2}});var ew={};n.r(ew),n.d(ew,{AREA_CLASS_NAME:function(){return SV},Academy:function(){return wy},Bin:function(){return jY},BinX:function(){return jX},COMPONENT_CLASS_NAME:function(){return S$},Chart:function(){return Dr},ChartEvent:function(){return _k},Classic:function(){return wc},ClassicDark:function(){return wh},Dark:function(){return wp},DiffY:function(){return j4},DodgeX:function(){return jZ},ELEMENT_CLASS_NAME:function(){return Sz},Filter:function(){return Aw},FlexX:function(){return Am},Group:function(){return Au},GroupColor:function(){return Ap},GroupX:function(){return Ac},GroupY:function(){return Af},Jitter:function(){return j0},JitterX:function(){return j1},JitterY:function(){return j2},LABEL_CLASS_NAME:function(){return SG},LABEL_LAYER_CLASS_NAME:function(){return SF},Light:function(){return wu},LinearAxis:function(){return ku},MAIN_LAYER_CLASS_NAME:function(){return SD},MASK_CLASS_NAME:function(){return SH},MaybeDefaultX:function(){return xv},MaybeDefaultY:function(){return xx},MaybeFunctionAttribute:function(){return xT},MaybeGradient:function(){return vX},MaybeIdentityX:function(){return bL},MaybeIdentityY:function(){return bN},MaybeKey:function(){return nT},MaybeSeries:function(){return vK},MaybeSize:function(){return m$},MaybeStackY:function(){return De},MaybeTitle:function(){return nP},MaybeTooltip:function(){return nj},MaybeTuple:function(){return bh},MaybeTupleX:function(){return xn},MaybeTupleY:function(){return xo},MaybeVisualPosition:function(){return by},MaybeZeroPadding:function(){return bm},MaybeZeroX:function(){return sP},MaybeZeroY:function(){return mW},MaybeZeroY1:function(){return s_},MaybeZeroZ:function(){return Dn},NormalizeY:function(){return j9},PLOT_CLASS_NAME:function(){return SW},Pack:function(){return Ab},Runtime:function(){return R7},Sample:function(){return AO},Select:function(){return Ar},SelectX:function(){return Ao},SelectY:function(){return Al},Selection:function(){return gP},SortColor:function(){return Av},SortX:function(){return Ay},SortY:function(){return Ag},StackEnter:function(){return j6},StackY:function(){return jb},SymmetryY:function(){return j3},VIEW_CLASS_NAME:function(){return SB},corelib:function(){return A3},extend:function(){return TQ},geolib:function(){return sf},graphlib:function(){return iY},plotlib:function(){return TK},register:function(){return R6},render:function(){return RB},renderToMountedElement:function(){return RW},select:function(){return g_},stdlib:function(){return TZ}});function eE(t,e,n,r){if(isNaN(e)||isNaN(n))return t;var i,o,a,l,s,u,c,f,p,h=t._root,d={data:r},y=t._x0,g=t._y0,v=t._x1,m=t._y1;if(!h)return t._root=d,t;for(;h.length;)if((u=e>=(o=(y+v)/2))?y=o:v=o,(c=n>=(a=(g+m)/2))?g=a:m=a,i=h,!(h=h[f=c<<1|u]))return i[f]=d,t;if(l=+t._x.call(null,h.data),s=+t._y.call(null,h.data),e===l&&n===s)return d.next=h,i?i[f]=d:t._root=d,t;do i=i?i[f]=[,,,,]:t._root=[,,,,],(u=e>=(o=(y+v)/2))?y=o:v=o,(c=n>=(a=(g+m)/2))?g=a:m=a;while((f=c<<1|u)==(p=(s>=a)<<1|l>=o));return i[p]=h,i[f]=d,t}function ek(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i}function eM(t){return t[0]}function eS(t){return t[1]}function e_(t,e,n){var r=new eP(null==e?eM:e,null==n?eS:n,NaN,NaN,NaN,NaN);return null==t?r:r.addAll(t)}function eP(t,e,n,r,i,o){this._x=t,this._y=e,this._x0=n,this._y0=r,this._x1=i,this._y1=o,this._root=void 0}function ej(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}var eA=e_.prototype=eP.prototype;function eT(t){return function(){return t}}function eC(t){return(t()-.5)*1e-6}eA.copy=function(){var t,e,n=new eP(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(!r)return n;if(!r.length)return n._root=ej(r),n;for(t=[{source:r,target:n._root=[,,,,]}];r=t.pop();)for(var i=0;i<4;++i)(e=r.source[i])&&(e.length?t.push({source:e,target:r.target[i]=[,,,,]}):r.target[i]=ej(e));return n},eA.add=function(t){let e=+this._x.call(null,t),n=+this._y.call(null,t);return eE(this.cover(e,n),e,n,t)},eA.addAll=function(t){var e,n,r,i,o=t.length,a=Array(o),l=Array(o),s=1/0,u=1/0,c=-1/0,f=-1/0;for(n=0;n<o;++n)!(isNaN(r=+this._x.call(null,e=t[n]))||isNaN(i=+this._y.call(null,e)))&&(a[n]=r,l[n]=i,r<s&&(s=r),r>c&&(c=r),i<u&&(u=i),i>f&&(f=i));if(s>c||u>f)return this;for(this.cover(s,u).cover(c,f),n=0;n<o;++n)eE(this,a[n],l[n],t[n]);return this},eA.cover=function(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var n=this._x0,r=this._y0,i=this._x1,o=this._y1;if(isNaN(n))i=(n=Math.floor(t))+1,o=(r=Math.floor(e))+1;else{for(var a,l,s=i-n||1,u=this._root;n>t||t>=i||r>e||e>=o;)switch(l=(e<r)<<1|t<n,(a=[,,,,])[l]=u,u=a,s*=2,l){case 0:i=n+s,o=r+s;break;case 1:n=i-s,o=r+s;break;case 2:i=n+s,r=o-s;break;case 3:n=i-s,r=o-s}this._root&&this._root.length&&(this._root=u)}return this._x0=n,this._y0=r,this._x1=i,this._y1=o,this},eA.data=function(){var t=[];return this.visit(function(e){if(!e.length)do t.push(e.data);while(e=e.next)}),t},eA.extent=function(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]]},eA.find=function(t,e,n){var r,i,o,a,l,s,u,c=this._x0,f=this._y0,p=this._x1,h=this._y1,d=[],y=this._root;for(y&&d.push(new ek(y,c,f,p,h)),null==n?n=1/0:(c=t-n,f=e-n,p=t+n,h=e+n,n*=n);s=d.pop();){if(!!(y=s.node)&&!((i=s.x0)>p)&&!((o=s.y0)>h)&&!((a=s.x1)<c)&&!((l=s.y1)<f))if(y.length){var g=(i+a)/2,v=(o+l)/2;d.push(new ek(y[3],g,v,a,l),new ek(y[2],i,v,g,l),new ek(y[1],g,o,a,v),new ek(y[0],i,o,g,v)),(u=(e>=v)<<1|t>=g)&&(s=d[d.length-1],d[d.length-1]=d[d.length-1-u],d[d.length-1-u]=s)}else{var m=t-+this._x.call(null,y.data),b=e-+this._y.call(null,y.data),x=m*m+b*b;if(x<n){var O=Math.sqrt(n=x);c=t-O,f=e-O,p=t+O,h=e+O,r=y.data}}}return r},eA.remove=function(t){if(isNaN(o=+this._x.call(null,t))||isNaN(a=+this._y.call(null,t)))return this;var e,n,r,i,o,a,l,s,u,c,f,p,h=this._root,d=this._x0,y=this._y0,g=this._x1,v=this._y1;if(!h)return this;if(h.length)for(;;){if((u=o>=(l=(d+g)/2))?d=l:g=l,(c=a>=(s=(y+v)/2))?y=s:v=s,e=h,!(h=h[f=c<<1|u]))return this;if(!h.length)break;(e[f+1&3]||e[f+2&3]||e[f+3&3])&&(n=e,p=f)}for(;h.data!==t;)if(r=h,!(h=h.next))return this;return((i=h.next)&&delete h.next,r)?(i?r.next=i:delete r.next,this):e?(i?e[f]=i:delete e[f],(h=e[0]||e[1]||e[2]||e[3])&&h===(e[3]||e[2]||e[1]||e[0])&&!h.length&&(n?n[p]=h:this._root=h),this):(this._root=i,this)},eA.removeAll=function(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this},eA.root=function(){return this._root},eA.size=function(){var t=0;return this.visit(function(e){if(!e.length)do++t;while(e=e.next)}),t},eA.visit=function(t){var e,n,r,i,o,a,l=[],s=this._root;for(s&&l.push(new ek(s,this._x0,this._y0,this._x1,this._y1));e=l.pop();)if(!t(s=e.node,r=e.x0,i=e.y0,o=e.x1,a=e.y1)&&s.length){var u=(r+o)/2,c=(i+a)/2;(n=s[3])&&l.push(new ek(n,u,c,o,a)),(n=s[2])&&l.push(new ek(n,r,c,u,a)),(n=s[1])&&l.push(new ek(n,u,i,o,c)),(n=s[0])&&l.push(new ek(n,r,i,u,c))}return this},eA.visitAfter=function(t){var e,n=[],r=[];for(this._root&&n.push(new ek(this._root,this._x0,this._y0,this._x1,this._y1));e=n.pop();){var i=e.node;if(i.length){var o,a=e.x0,l=e.y0,s=e.x1,u=e.y1,c=(a+s)/2,f=(l+u)/2;(o=i[0])&&n.push(new ek(o,a,l,c,f)),(o=i[1])&&n.push(new ek(o,c,l,s,f)),(o=i[2])&&n.push(new ek(o,a,f,c,u)),(o=i[3])&&n.push(new ek(o,c,f,s,u))}r.push(e)}for(;e=r.pop();)t(e.node,e.x0,e.y0,e.x1,e.y1);return this},eA.x=function(t){return arguments.length?(this._x=t,this):this._x},eA.y=function(t){return arguments.length?(this._y=t,this):this._y};var eN={value:()=>{}};function eL(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r||/[\s.]/.test(t))throw Error("illegal type: "+t);r[t]=[]}return new eI(r)}function eI(t){this._=t}eI.prototype=eL.prototype={constructor:eI,on:function(t,e){var n,r,i,o=this._,a=(n=t+"",r=o,n.trim().split(/^|\s+/).map(function(t){var e="",n=t.indexOf(".");if(n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),t&&!r.hasOwnProperty(t))throw Error("unknown type: "+t);return{type:t,name:e}})),l=-1,s=a.length;if(arguments.length<2){for(;++l<s;)if((i=(t=a[l]).type)&&(i=function(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}(o[i],t.name)))return i;return}if(null!=e&&"function"!=typeof e)throw Error("invalid callback: "+e);for(;++l<s;)if(i=(t=a[l]).type)o[i]=eR(o[i],t.name,e);else if(null==e)for(i in o)o[i]=eR(o[i],t.name,null);return this},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new eI(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,i=Array(n),o=0;o<n;++o)i[o]=arguments[o+2];if(!this._.hasOwnProperty(t))throw Error("unknown type: "+t);for(r=this._[t],o=0,n=r.length;o<n;++o)r[o].value.apply(e,i)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw Error("unknown type: "+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(e,n)}};function eR(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=eN,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}var eD,eF,ez=0,eB=0,eW=0,e$=0,eG=0,eV=0,eH="object"==typeof performance&&performance.now?performance:Date,eU="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function eq(){return eG||(eU(eY),eG=eH.now()+eV)}function eY(){eG=0}function eX(){this._call=this._time=this._next=null}function eK(t,e,n){var r=new eX;return r.restart(t,e,n),r}eX.prototype=eK.prototype={constructor:eX,restart:function(t,e,n){if("function"!=typeof t)throw TypeError("callback is not a function");n=(null==n?eq():+n)+(null==e?0:+e),!this._next&&eF!==this&&(eF?eF._next=this:eD=this,eF=this),this._call=t,this._time=n,eJ()},stop:function(){this._call&&(this._call=null,this._time=1/0,eJ())}};function eZ(){eG=(e$=eH.now())+eV,ez=eB=0;try{!function(){eq(),++ez;for(var t,e=eD;e;)(t=eG-e._time)>=0&&e._call.call(void 0,t),e=e._next;--ez}()}finally{ez=0,function(){for(var t,e,n=eD,r=1/0;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:eD=e);eF=t,eJ(r)}(),eG=0}}function eQ(){var t=eH.now(),e=t-e$;e>1e3&&(eV-=e,e$=t)}function eJ(t){!ez&&(eB&&(eB=clearTimeout(eB)),t-eG>24?(t<1/0&&(eB=setTimeout(eZ,t-eH.now()-eV)),eW&&(eW=clearInterval(eW))):(!eW&&(e$=eH.now(),eW=setInterval(eQ,1e3)),ez=1,eU(eZ)))}function e0(t){return t.x}function e1(t){return t.y}var e2=Math.PI*(3-Math.sqrt(5));function e5(t){return t.index}function e3(t,e){var n=t.get(e);if(!n)throw Error("node not found: "+e);return n}var e4={}.toString,e6=function(t,e){return e4.call(t)==="[object "+e+"]"},e8=function(t){return Array.isArray?Array.isArray(t):e6(t,"Array")},e9=function(t){return"object"==typeof t&&null!==t},e7=function(t){if(!e9(t)||!e6(t,"Object"))return!1;if(null===Object.getPrototypeOf(t))return!0;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e},nt=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)!function t(e,n,r,i){for(var o in r=r||0,i=i||5,n)if(function(t,e){if(Object.hasOwn)return Object.hasOwn(t,e);if(null==t)throw TypeError("Cannot convert undefined or null to object");return Object.prototype.hasOwnProperty.call(Object(t),e)}(n,o)){var a=n[o];null!==a&&e7(a)?(!e7(e[o])&&(e[o]={}),r<i?t(e[o],a,r+1,i):e[o]=n[o]):e8(a)?(e[o]=[],e[o]=e[o].concat(a)):void 0!==a&&(e[o]=a)}}(t,e[r]);return t},ne=function(t){return null==t},nn=function(t){return ne(t)?"":t.toString()},nr=function(t){var e=nn(t);return e.charAt(0).toLowerCase()+e.substring(1)};function ni(t){return t}function no(t){return t.reduce((t,e)=>(n,...r)=>e(t(n,...r),...r),ni)}function na(t){return t.replace(/( |^)[a-z]/g,t=>t.toUpperCase())}function nl(t=""){throw Error(t)}function ns(t,e){let{attributes:n}=e,r=new Set(["id","className"]);for(let[e,i]of Object.entries(n))!r.has(e)&&("transform"===e&&t.attr(e,""),t.attr(e,i))}function nu(t){return null!=t&&!Number.isNaN(t)}function nc(t,e){return nf(t,e)||{}}function nf(t,e){let n=Object.entries(t||{}).filter(([t])=>t.startsWith(e)).map(([t,n])=>[nr(t.replace(e,"").trim()),n]).filter(([t])=>!!t);return 0===n.length?null:Object.fromEntries(n)}function np(t,...e){return Object.fromEntries(Object.entries(t).filter(([t])=>e.every(e=>!t.startsWith(e))))}function nh(t,e){if(void 0===t)return null;if("number"==typeof t)return t;let n=+t.replace("%","");return Number.isNaN(n)?null:n/100*e}function nd(t){return"object"==typeof t&&!(t instanceof Date)&&null!==t&&!Array.isArray(t)}function ny(t){return null===t||!1===t}function ng(t,e,n={},r=!1){return ny(t)||Array.isArray(t)&&r?t:nt(n,nc(t,e))}function nv(t,e={}){return ny(t)||Array.isArray(t)||!nm(t)?t:nt(e,t)}function nm(t){if(0===Object.keys(t).length)return!0;let{title:e,items:n}=t;return void 0!==e||void 0!==n}function nb(t,e){return"object"==typeof t?nc(t,e):t}function nx(t){return Math.abs(t)>10?String(t):t.toString().padStart(2,"0")}function nO(t,e){if(null!==t)return{type:"column",value:t,field:e}}function nw(t,e){return Object.assign(Object.assign({},nO(t,e)),{inferred:!0})}function nE(t,e){if(null!==t)return{type:"column",value:t,field:e,visual:!0}}function nk(t,e){let n=[];for(let r of t)n[r]=e;return n}function nM(t,e){let n=t[e];if(!n)return[null,null];let{value:r,field:i=null}=n;return[r,i]}function nS(t,...e){for(let n of e){if("string"!=typeof n)return[n,null];{let[e,r]=nM(t,n);if(null!==e)return[e,r]}}return[null,null]}function n_(t){return!(t instanceof Date)&&"object"==typeof t}let nP=(t={})=>{let{channel:e="x"}=t;return(t,n)=>{let{encode:r}=n,{tooltip:i}=n;if(ny(i))return[t,n];let{title:o}=i;if(void 0!==o)return[t,n];let a=Object.keys(r).filter(t=>t.startsWith(e)).filter(t=>!r[t].inferred).map(t=>nM(r,t)).filter(([t])=>t).map(t=>t[0]);if(0===a.length)return[t,n];let l=[];for(let e of t)l[e]={value:a.map(t=>t[e]instanceof Date?function(t){let e=t.getFullYear(),n=nx(t.getMonth()+1),r=nx(t.getDate()),i=`${e}-${n}-${r}`,o=t.getHours(),a=t.getMinutes(),l=t.getSeconds();return o||a||l?`${i} ${nx(o)}:${nx(a)}:${nx(l)}`:i}(t[e]):t[e]).join(", ")};return[t,nt({},n,{tooltip:{title:l}})]}};nP.props={};let nj=t=>{let{channel:e}=t;return(t,n)=>{let{encode:r,tooltip:i}=n;if(ny(i))return[t,n];let{items:o=[]}=i;return!o||o.length>0?[t,n]:[t,nt({},n,{tooltip:{items:(Array.isArray(e)?e:[e]).flatMap(t=>Object.keys(r).filter(e=>e.startsWith(t)).map(t=>{let{field:e,value:n,inferred:i=!1,aggregate:o}=r[t];return i?null:o&&n?{channel:t}:e?{field:e}:n?{channel:t}:null}).filter(t=>null!==t))}})]}};nj.props={};var nA=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let nT=()=>(t,e)=>{let{encode:n}=e,{key:r}=n,i=nA(n,["key"]);if(void 0!==r)return[t,e];let o=Object.values(i).map(({value:t})=>t),a=t.map(t=>o.filter(Array.isArray).map(e=>e[t]).join("-"));return[t,nt({},e,{encode:{key:nO(a)}})]};function nC(t={}){let{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 nN(t={}){return[...nC(t),{name:"title",scale:"identity"}]}function nL(){return[{type:nP,channel:"color"},{type:nj,channel:["x","y"]}]}function nI(){return[{type:nP,channel:"x"},{type:nj,channel:["y"]}]}nT.props={};function nR(t={}){return nC(t)}function nD(){return[{type:nT}]}function nF(){return[]}function nz(t,e){return t.getBandWidth(t.invert(e))}function nB(t,e,n={}){let{x:r,y:i,series:o}=e,{x:a,y:l,series:s}=t,{style:{bandOffset:u=s?0:.5,bandOffsetX:c=u,bandOffsetY:f=u}={}}=n,p=!!(null==a?void 0:a.getBandWidth),h=!!(null==l?void 0:l.getBandWidth),d=!!(null==s?void 0:s.getBandWidth);return p||h?(t,e)=>{let n=p?nz(a,r[e]):0,u=h?nz(l,i[e]):0,y=d&&o?(nz(s,o[e])/2+ +o[e])*n:0,[g,v]=t;return[g+c*n+y,v+f*u]}:t=>t}function nW(t){return parseFloat(t)/100}function n$(t,e,n,r){let{x:i,y:o}=n,{innerWidth:a,innerHeight:l}=r.getOptions(),s=Array.from(t,t=>{let e=i[t],n=o[t],r="string"==typeof e?nW(e)*a:+e;return[[r,"string"==typeof n?nW(n)*l:+n]]});return[t,s]}function nG(t){return"function"==typeof t?t:e=>e[t]}function nV(t,e){return Array.from(t,nG(e))}function nH(t,e){let{source:n=t=>t.source,target:r=t=>t.target,value:i=t=>t.value}=e,{links:o,nodes:a}=t,l=nV(o,n),s=nV(o,r),u=nV(o,i);return{links:o.map((t,e)=>({target:s[e],source:l[e],value:u[e]})),nodes:a||Array.from(new Set([...l,...s]),t=>({key:t}))}}var nU=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let nq={joint:!0},nY={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}},nX={type:"point",axis:!1,legend:!1,encode:{x:"x",y:"y",size:5,color:"group",shape:"point"},style:{stroke:"#fff"}},nK={text:""},nZ=t=>{let{data:e,encode:n={},scale:r,style:i={},layout:o={},nodeLabels:a=[],linkLabels:l=[],animate:s={},tooltip:u={}}=t,{nodeKey:c=t=>t.id,linkKey:f=t=>t.id}=n,p=Object.assign({nodeKey:c,linkKey:f},nU(n,["nodeKey","linkKey"])),h=nc(p,"node"),d=nc(p,"link"),{links:y,nodes:g}=nH(e,p),{nodesData:v,linksData:m}=function(t,e,n){let{nodes:r,links:i}=t,{joint:o,nodeStrength:a,linkStrength:l}=e,{nodeKey:s=t=>t.id,linkKey:u=t=>t.id}=n,c=function(){var t,e,n,r,i,o=eT(-30),a=1,l=1/0,s=.81;function u(n){var i,o=t.length,a=e_(t,e0,e1).visitAfter(f);for(r=n,i=0;i<o;++i)e=t[i],a.visit(p)}function c(){if(t){var e,n,r=t.length;for(e=0,i=Array(r);e<r;++e)i[(n=t[e]).index]=+o(n,e,t)}}function f(t){var e,n,r,o,a,l=0,s=0;if(t.length){for(r=o=a=0;a<4;++a)(e=t[a])&&(n=Math.abs(e.value))&&(l+=e.value,s+=n,r+=n*e.x,o+=n*e.y);t.x=r/s,t.y=o/s}else{(e=t).x=e.data.x,e.y=e.data.y;do l+=i[e.data.index];while(e=e.next)}t.value=l}function p(t,o,u,c){if(!t.value)return!0;var f=t.x-e.x,p=t.y-e.y,h=c-o,d=f*f+p*p;if(h*h/s<d)return d<l&&(0===f&&(d+=(f=eC(n))*f),0===p&&(d+=(p=eC(n))*p),d<a&&(d=Math.sqrt(a*d)),e.vx+=f*t.value*r/d,e.vy+=p*t.value*r/d),!0;if(!t.length&&!(d>=l)){(t.data!==e||t.next)&&(0===f&&(d+=(f=eC(n))*f),0===p&&(d+=(p=eC(n))*p),d<a&&(d=Math.sqrt(a*d)));do t.data!==e&&(h=i[t.data.index]*r/d,e.vx+=f*h,e.vy+=p*h);while(t=t.next)}}return u.initialize=function(e,r){t=e,n=r,c()},u.strength=function(t){return arguments.length?(o="function"==typeof t?t:eT(+t),c(),u):o},u.distanceMin=function(t){return arguments.length?(a=t*t,u):Math.sqrt(a)},u.distanceMax=function(t){return arguments.length?(l=t*t,u):Math.sqrt(l)},u.theta=function(t){return arguments.length?(s=t*t,u):Math.sqrt(s)},u}(),f=(function(t){var e,n,r,i,o,a,l=e5,s=function(t){return 1/Math.min(i[t.source.index],i[t.target.index])},u=eT(30),c=1;null==t&&(t=[]);function f(r){for(var i=0,l=t.length;i<c;++i)for(var s,u,f,p,h,d,y,g=0;g<l;++g)u=(s=t[g]).source,p=(f=s.target).x+f.vx-u.x-u.vx||eC(a),d=((d=Math.sqrt(p*p+(h=f.y+f.vy-u.y-u.vy||eC(a))*h))-n[g])/d*r*e[g],p*=d,h*=d,f.vx-=p*(y=o[g]),f.vy-=h*y,u.vx+=p*(y=1-y),u.vy+=h*y}function p(){if(r){var a,s,u=r.length,c=t.length,f=new Map(r.map((t,e)=>[l(t,e,r),t]));for(a=0,i=Array(u);a<c;++a)(s=t[a]).index=a,"object"!=typeof s.source&&(s.source=e3(f,s.source)),"object"!=typeof s.target&&(s.target=e3(f,s.target)),i[s.source.index]=(i[s.source.index]||0)+1,i[s.target.index]=(i[s.target.index]||0)+1;for(a=0,o=Array(c);a<c;++a)s=t[a],o[a]=i[s.source.index]/(i[s.source.index]+i[s.target.index]);e=Array(c),h(),n=Array(c),d()}}function h(){if(r)for(var n=0,i=t.length;n<i;++n)e[n]=+s(t[n],n,t)}function d(){if(r)for(var e=0,i=t.length;e<i;++e)n[e]=+u(t[e],e,t)}return f.initialize=function(t,e){r=t,a=e,p()},f.links=function(e){return arguments.length?(t=e,p(),f):t},f.id=function(t){return arguments.length?(l=t,f):l},f.iterations=function(t){return arguments.length?(c=+t,f):c},f.strength=function(t){return arguments.length?(s="function"==typeof t?t:eT(+t),h(),f):s},f.distance=function(t){return arguments.length?(u="function"==typeof t?t:eT(+t),d(),f):u},f})(i).id(nG(u));"function"==typeof a&&c.strength(a),"function"==typeof l&&f.strength(l);let p=(function(t){let e;var n,r=1,i=.001,o=1-Math.pow(.001,1/300),a=0,l=.6,s=new Map,u=eK(p),c=eL("tick","end"),f=(e=1,()=>(e=(1664525*e+0x3c6ef35f)%0x100000000)/0x100000000);function p(){h(),c.call("tick",n),r<i&&(u.stop(),c.call("end",n))}function h(e){var i,u,c=t.length;void 0===e&&(e=1);for(var f=0;f<e;++f)for(r+=(a-r)*o,s.forEach(function(t){t(r)}),i=0;i<c;++i)null==(u=t[i]).fx?u.x+=u.vx*=l:(u.x=u.fx,u.vx=0),null==u.fy?u.y+=u.vy*=l:(u.y=u.fy,u.vy=0);return n}function d(){for(var e,n=0,r=t.length;n<r;++n){if((e=t[n]).index=n,null!=e.fx&&(e.x=e.fx),null!=e.fy&&(e.y=e.fy),isNaN(e.x)||isNaN(e.y)){var i=10*Math.sqrt(.5+n),o=n*e2;e.x=i*Math.cos(o),e.y=i*Math.sin(o)}(isNaN(e.vx)||isNaN(e.vy))&&(e.vx=e.vy=0)}}function y(e){return e.initialize&&e.initialize(t,f),e}return null==t&&(t=[]),d(),n={tick:h,restart:function(){return u.restart(p),n},stop:function(){return u.stop(),n},nodes:function(e){return arguments.length?(t=e,d(),s.forEach(y),n):t},alpha:function(t){return arguments.length?(r=+t,n):r},alphaMin:function(t){return arguments.length?(i=+t,n):i},alphaDecay:function(t){return arguments.length?(o=+t,n):+o},alphaTarget:function(t){return arguments.length?(a=+t,n):a},velocityDecay:function(t){return arguments.length?(l=1-t,n):1-l},randomSource:function(t){return arguments.length?(f=t,s.forEach(y),n):f},force:function(t,e){return arguments.length>1?(null==e?s.delete(t):s.set(t,y(e)),n):s.get(t)},find:function(e,n,r){var i,o,a,l,s,u=0,c=t.length;for(null==r?r=1/0:r*=r,u=0;u<c;++u)i=e-(l=t[u]).x,(a=i*i+(o=n-l.y)*o)<r&&(s=l,r=a);return s},on:function(t,e){return arguments.length>1?(c.on(t,e),n):c.on(t)}}})(r).force("link",f).force("charge",c);o?p.force("center",function(t,e){var n,r=1;function i(){var i,o,a=n.length,l=0,s=0;for(i=0;i<a;++i)l+=(o=n[i]).x,s+=o.y;for(l=(l/a-t)*r,s=(s/a-e)*r,i=0;i<a;++i)o=n[i],o.x-=l,o.y-=s}return null==t&&(t=0),null==e&&(e=0),i.initialize=function(t){n=t},i.x=function(e){return arguments.length?(t=+e,i):t},i.y=function(t){return arguments.length?(e=+t,i):e},i.strength=function(t){return arguments.length?(r=+t,i):r},i}()):p.force("x",function(t){var e,n,r,i=eT(.1);function o(t){for(var i,o=0,a=e.length;o<a;++o)i=e[o],i.vx+=(r[o]-i.x)*n[o]*t}function a(){if(e){var o,a=e.length;for(o=0,n=Array(a),r=Array(a);o<a;++o)n[o]=isNaN(r[o]=+t(e[o],o,e))?0:+i(e[o],o,e)}}return"function"!=typeof t&&(t=eT(null==t?0:+t)),o.initialize=function(t){e=t,a()},o.strength=function(t){return arguments.length?(i="function"==typeof t?t:eT(+t),a(),o):i},o.x=function(e){return arguments.length?(t="function"==typeof e?e:eT(+e),a(),o):t},o}()).force("y",function(t){var e,n,r,i=eT(.1);function o(t){for(var i,o=0,a=e.length;o<a;++o)i=e[o],i.vy+=(r[o]-i.y)*n[o]*t}function a(){if(e){var o,a=e.length;for(o=0,n=Array(a),r=Array(a);o<a;++o)n[o]=isNaN(r[o]=+t(e[o],o,e))?0:+i(e[o],o,e)}}return"function"!=typeof t&&(t=eT(null==t?0:+t)),o.initialize=function(t){e=t,a()},o.strength=function(t){return arguments.length?(i="function"==typeof t?t:eT(+t),a(),o):i},o.y=function(e){return arguments.length?(t="function"==typeof e?e:eT(+e),a(),o):t},o}()),p.stop();let h=Math.ceil(Math.log(p.alphaMin())/Math.log(1-p.alphaDecay()));for(let t=0;t<h;t++)p.tick();return{nodesData:r,linksData:i}}({links:y,nodes:g},nt({},nq,o),p),b=ng(u,"link",{items:[t=>({name:"source",value:nG(f)(t.source)}),t=>({name:"target",value:nG(f)(t.target)})]}),x=ng(u,"node",{items:[t=>({name:"key",value:nG(c)(t)})]},!0);return[nt({},nY,{data:m,encode:d,labels:l,style:nc(i,"link"),tooltip:b,animate:nb(s,"link")}),nt({},nX,{data:v,encode:Object.assign({},h),scale:r,style:nc(i,"node"),tooltip:x,labels:[Object.assign(Object.assign({},nK),nc(i,"label")),...a],animate:nb(s,"link")})]};function nQ(t){var e=0,n=t.children,r=n&&n.length;if(r)for(;--r>=0;)e+=n[r].value;else e=1;t.value=e}nZ.props={};function nJ(t,e){t instanceof Map?(t=[void 0,t],void 0===e&&(e=n1)):void 0===e&&(e=n0);for(var n,r,i,o,a,l=new n3(t),s=[l];n=s.pop();)if((i=e(n.data))&&(a=(i=Array.from(i)).length))for(n.children=i,o=a-1;o>=0;--o)s.push(r=i[o]=new n3(i[o])),r.parent=n,r.depth=n.depth+1;return l.eachBefore(n5)}function n0(t){return t.children}function n1(t){return Array.isArray(t)?t[1]:null}function n2(t){void 0!==t.data.value&&(t.value=t.data.value),t.data=t.data.data}function n5(t){var e=0;do t.height=e;while((t=t.parent)&&t.height<++e)}function n3(t){this.data=t,this.depth=this.height=0,this.parent=null}function n4(t,e){return t.parent===e.parent?1:2}function n6(t){var e=t.children;return e?e[0]:t.t}function n8(t){var e=t.children;return e?e[e.length-1]:t.t}n3.prototype=nJ.prototype={constructor:n3,count:function(){return this.eachAfter(nQ)},each:function(t,e){let n=-1;for(let r of this)t.call(e,r,++n,this);return this},eachAfter:function(t,e){for(var n,r,i,o=this,a=[o],l=[],s=-1;o=a.pop();)if(l.push(o),n=o.children)for(r=0,i=n.length;r<i;++r)a.push(n[r]);for(;o=l.pop();)t.call(e,o,++s,this);return this},eachBefore:function(t,e){for(var n,r,i=this,o=[i],a=-1;i=o.pop();)if(t.call(e,i,++a,this),n=i.children)for(r=n.length-1;r>=0;--r)o.push(n[r]);return this},find:function(t,e){let n=-1;for(let r of this)if(t.call(e,r,++n,this))return r},sum:function(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})},sort:function(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})},path:function(t){for(var e=this,n=function(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}(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},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){return Array.from(this)},leaves:function(){var t=[];return this.eachBefore(function(e){!e.children&&t.push(e)}),t},links:function(){var t=this,e=[];return t.each(function(n){n!==t&&e.push({source:n.parent,target:n})}),e},copy:function(){return nJ(this).eachBefore(n2)},[Symbol.iterator]:function*(){var t,e,n,r,i=this,o=[i];do for(t=o.reverse(),o=[];i=t.pop();)if(yield i,e=i.children)for(n=0,r=e.length;n<r;++n)o.push(e[n]);while(o.length)}};function n9(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}n9.prototype=Object.create(n3.prototype);function n7(){var t=n4,e=1,n=1,r=null;function i(i){var s=function(t){for(var e,n,r,i,o,a=new n9(t,0),l=[a];e=l.pop();)if(r=e._.children)for(e.children=Array(o=r.length),i=o-1;i>=0;--i)l.push(n=e.children[i]=new n9(r[i],i)),n.parent=e;return(a.parent=new n9(null,0)).children=[a],a}(i);if(s.eachAfter(o),s.parent.m=-s.z,s.eachBefore(a),r)i.eachBefore(l);else{var u=i,c=i,f=i;i.eachBefore(function(t){t.x<u.x&&(u=t),t.x>c.x&&(c=t),t.depth>f.depth&&(f=t)});var p=u===c?1:t(u,c)/2,h=p-u.x,d=e/(c.x+p+h),y=n/(f.depth||1);i.eachBefore(function(t){t.x=(t.x+h)*d,t.y=t.depth*y})}return i}function o(e){var n=e.children,r=e.parent.children,i=e.i?r[e.i-1]:null;if(n){!function(t){for(var e,n=0,r=0,i=t.children,o=i.length;--o>=0;)e=i[o],e.z+=n,e.m+=n,n+=e.s+(r+=e.c)}(e);var o=(n[0].z+n[n.length-1].z)/2;i?(e.z=i.z+t(e._,i._),e.m=e.z-o):e.z=o}else i&&(e.z=i.z+t(e._,i._));e.parent.A=function(e,n,r){if(n){for(var i,o,a,l,s=e,u=e,c=n,f=s.parent.children[0],p=s.m,h=u.m,d=c.m,y=f.m;c=n8(c),s=n6(s),c&&s;){if(f=n6(f),(u=n8(u)).a=e,(l=c.z+d-s.z-p+t(c._,s._))>0){;!function(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}((i=c,o=e,a=r,i.a.parent===o.parent?i.a:a),e,l),p+=l,h+=l}d+=c.m,p+=s.m,y+=f.m,h+=u.m}c&&!n8(u)&&(u.t=c,u.m+=d-h),s&&!n6(f)&&(f.t=s,f.m+=p-y,r=e)}return r}(e,i,e.parent.A||r[0])}function a(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function l(t){t.x*=e,t.y=t.depth*n}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(t){return arguments.length?(r=!1,e=+t[0],n=+t[1],i):r?null:[e,n]},i.nodeSize=function(t){return arguments.length?(r=!0,e=+t[0],n=+t[1],i):r?[e,n]:null},i}function rt(t,e){return t.parent===e.parent?1:2}function re(t,e){return t+e.x}function rn(t,e){return Math.max(t,e.y)}function rr(){var t=rt,e=1,n=1,r=!1;function i(i){var o,a=0;i.eachAfter(function(e){var n,r=e.children;if(r){;e.x=(n=r).reduce(re,0)/n.length,e.y=1+r.reduce(rn,0)}else e.x=o?a+=t(e,o):0,e.y=0,o=e});var l=function(t){for(var e;e=t.children;)t=e[0];return t}(i),s=function(t){for(var e;e=t.children;)t=e[e.length-1];return t}(i),u=l.x-t(l,s)/2,c=s.x+t(s,l)/2;return i.eachAfter(r?function(t){t.x=(t.x-i.x)*e,t.y=(i.y-t.y)*n}:function(t){t.x=(t.x-u)/(c-u)*e,t.y=(1-(i.y?t.y/i.y:1))*n})}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(t){return arguments.length?(r=!1,e=+t[0],n=+t[1],i):r?null:[e,n]},i.nodeSize=function(t){return arguments.length?(r=!0,e=+t[0],n=+t[1],i):r?[e,n]:null},i}let ri=t=>e=>n=>{let{field:r="value",nodeSize:i,separation:o,sortBy:a,as:l=["x","y"]}=e,[s,u]=l,c=nJ(n,t=>t.children).sum(t=>t[r]).sort(a),f=t();f.size([1,1]),i&&f.nodeSize(i),o&&f.separation(o),f(c);let p=[];c.each(t=>{t[s]=t.x,t[u]=t.y,t.name=t.data.name,p.push(t)});let h=c.links();return h.forEach(t=>{t[s]=[t.source[s],t.target[s]],t[u]=[t.source[u],t.target[u]]}),{nodes:p,edges:h}},ro=t=>ri(rr)(t);ro.props={};let ra=t=>ri(n7)(t);ra.props={};let rl={sortBy:(t,e)=>e.value-t.value},rs={axis:!1,legend:!1,type:"point",encode:{x:"x",y:"y",size:2,shape:"point"}},ru={type:"link",encode:{x:"x",y:"y",shape:"smooth"}},rc={text:"",fontSize:10},rf=t=>{let{data:e,encode:n={},scale:r={},style:i={},layout:o={},nodeLabels:a=[],linkLabels:l=[],animate:s={},tooltip:u={}}=t,c=null==n?void 0:n.value,{nodes:f,edges:p}=ra(Object.assign(Object.assign(Object.assign({},rl),o),{field:c}))(e),h=ng(u,"node",{title:"name",items:["value"]},!0),d=ng(u,"link",{title:"",items:[t=>({name:"source",value:t.source.name}),t=>({name:"target",value:t.target.name})]});return[nt({},ru,{data:p,encode:nc(n,"link"),scale:nc(r,"link"),labels:l,style:Object.assign({stroke:"#999"},nc(i,"link")),tooltip:d,animate:nb(s,"link")}),nt({},rs,{data:f,scale:nc(r,"node"),encode:nc(n,"node"),labels:[Object.assign(Object.assign({},rc),nc(i,"label")),...a],style:Object.assign({},nc(i,"node")),tooltip:h,animate:nb(s,"node")})]};function rp(t){return null==t?null:rh(t)}function rh(t){if("function"!=typeof t)throw Error();return t}rf.props={};var rd={depth:-1},ry={},rg={};function rv(t){return t.id}function rm(t){return t.parentId}function rb(){var t,e=rv,n=rm;function r(r){var i,o,a,l,s,u,c,f,p=Array.from(r),h=e,d=n,y=new Map;if(null!=t){let e=p.map((e,n)=>(function(t){let e=(t=`${t}`).length;return rO(t,e-1)&&!rO(t,e-2)&&(t=t.slice(0,-1)),"/"===t[0]?t:`/${t}`})(t(e,n,r))),n=e.map(rx),i=new Set(e).add("");for(let t of n)!i.has(t)&&(i.add(t),e.push(t),n.push(rx(t)),p.push(rg));h=(t,n)=>e[n],d=(t,e)=>n[e]}for(a=0,i=p.length;a<i;++a)o=p[a],u=p[a]=new n3(o),null!=(c=h(o,a,r))&&(c+="")&&(f=u.id=c,y.set(f,y.has(f)?ry:u)),null!=(c=d(o,a,r))&&(c+="")&&(u.parent=c);for(a=0;a<i;++a)if(c=(u=p[a]).parent){if(!(s=y.get(c)))throw Error("missing: "+c);if(s===ry)throw Error("ambiguous: "+c);s.children?s.children.push(u):s.children=[u],u.parent=s}else{if(l)throw Error("multiple roots");l=u}if(!l)throw Error("no root");if(null!=t){for(;l.data===rg&&1===l.children.length;)l=l.children[0],--i;for(let t=p.length-1;t>=0&&(u=p[t]).data===rg;--t){;u.data=null}}if(l.parent=rd,l.eachBefore(function(t){t.depth=t.parent.depth+1,--i}).eachBefore(n5),l.parent=null,i>0)throw Error("cycle");return l}return r.id=function(t){return arguments.length?(e=rp(t),r):e},r.parentId=function(t){return arguments.length?(n=rp(t),r):n},r.path=function(e){return arguments.length?(t=rp(e),r):t},r}function rx(t){let e=t.length;if(e<2)return"";for(;--e>1&&!rO(t,e););return t.slice(0,e)}function rO(t,e){if("/"===t[e]){let n=0;for(;e>0&&"\\"===t[--e];)++n;if((1&n)==0)return!0}return!1}function rw(){return 0}function rE(t){return function(){return t}}function rk(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 rM(t,e){var n=t.r-e.r+1e-9*Math.max(t.r,e.r,1),r=e.x-t.x,i=e.y-t.y;return n>0&&n*n>r*r+i*i}function rS(t,e){for(var n=0;n<e.length;++n)if(!rM(t,e[n]))return!1;return!0}function r_(t,e){var n=t.x,r=t.y,i=t.r,o=e.x,a=e.y,l=e.r,s=o-n,u=a-r,c=l-i,f=Math.sqrt(s*s+u*u);return{x:(n+o+s/f*c)/2,y:(r+a+u/f*c)/2,r:(f+i+l)/2}}function rP(t,e,n){var r=t.x,i=t.y,o=t.r,a=e.x,l=e.y,s=e.r,u=n.x,c=n.y,f=n.r,p=r-a,h=r-u,d=i-l,y=i-c,g=s-o,v=f-o,m=r*r+i*i-o*o,b=m-a*a-l*l+s*s,x=m-u*u-c*c+f*f,O=h*d-p*y,w=(d*x-y*b)/(2*O)-r,E=(y*g-d*v)/O,k=(h*b-p*x)/(2*O)-i,M=(p*v-h*g)/O,S=E*E+M*M-1,_=2*(o+w*E+k*M),P=w*w+k*k-o*o,j=-(Math.abs(S)>1e-6?(_+Math.sqrt(_*_-4*S*P))/(2*S):P/_);return{x:r+w+E*j,y:i+k+M*j,r:j}}function rj(t,e,n){var r,i,o,a,l=t.x-e.x,s=t.y-e.y,u=l*l+s*s;u?(i=e.r+n.r,i*=i,a=t.r+n.r,i>(a*=a)?(r=(u+a-i)/(2*u),o=Math.sqrt(Math.max(0,a/u-r*r)),n.x=t.x-r*l-o*s,n.y=t.y-r*s+o*l):(r=(u+i-a)/(2*u),o=Math.sqrt(Math.max(0,i/u-r*r)),n.x=e.x+r*l-o*s,n.y=e.y+r*s+o*l)):(n.x=e.x+n.r,n.y=e.y)}function rA(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 rT(t){var e=t._,n=t.next._,r=e.r+n.r,i=(e.x*n.r+n.x*e.r)/r,o=(e.y*n.r+n.y*e.r)/r;return i*i+o*o}function rC(t){this._=t,this.next=null,this.previous=null}function rN(t){return Math.sqrt(t.value)}function rL(t){return function(e){!e.children&&(e.r=Math.max(0,+t(e)||0))}}function rI(t,e,n){return function(r){if(i=r.children){var i,o,a,l=i.length,s=t(r)*e||0;if(s)for(o=0;o<l;++o)i[o].r+=s;if(a=function(t,e){var n,r,i,o,a,l,s,u,c,f,p,h;if(!(o=(t="object"==typeof(h=t)&&"length"in h?h:Array.from(h)).length))return 0;if((n=t[0]).x=0,n.y=0,!(o>1))return n.r;if(r=t[1],n.x=-r.r,r.x=n.r,r.y=0,!(o>2))return n.r+r.r;rj(r,n,i=t[2]),n=new rC(n),r=new rC(r),i=new rC(i),n.next=i.previous=r,r.next=n.previous=i,i.next=r.previous=n;t:for(s=3;s<o;++s){rj(n._,r._,i=t[s]),i=new rC(i),u=r.next,c=n.previous,f=r._.r,p=n._.r;do if(f<=p){if(rA(u._,i._)){r=u,n.next=r,r.previous=n,--s;continue t}f+=u._.r,u=u.next}else{if(rA(c._,i._)){(n=c).next=r,r.previous=n,--s;continue t}p+=c._.r,c=c.previous}while(u!==c.next);for(i.previous=n,i.next=r,n.next=r.previous=r=i,a=rT(n);(i=i.next)!==r;)(l=rT(i))<a&&(n=i,a=l);r=n.next}for(n=[r._],i=r;(i=i.next)!==r;)n.push(i._);for(s=0,i=function(t,e){for(var n,r,i=0,o=(t=function(t,e){let n=t.length,r,i;for(;n;)i=e()*n--|0,r=t[n],t[n]=t[i],t[i]=r;return t}(Array.from(t),e)).length,a=[];i<o;)n=t[i],r&&rM(r,n)?++i:(r=function(t){switch(t.length){case 1:return function(t){return{x:t.x,y:t.y,r:t.r}}(t[0]);case 2:return r_(t[0],t[1]);case 3:return rP(t[0],t[1],t[2])}}(a=function(t,e){var n,r;if(rS(e,t))return[e];for(n=0;n<t.length;++n)if(rk(e,t[n])&&rS(r_(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(rk(r_(t[n],t[r]),e)&&rk(r_(t[n],e),t[r])&&rk(r_(t[r],e),t[n])&&rS(rP(t[n],t[r],e),t))return[t[n],t[r],e];throw Error()}(a,n)),i=0);return r}(n,e);s<o;++s)n=t[s],n.x-=i.x,n.y-=i.y;return i.r}(i,n),s)for(o=0;o<l;++o)i[o].r-=s;r.r=a+s}}}function rR(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 rD=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let rF=(t,e)=>({size:[t,e],padding:0,sort:(t,e)=>e.value-t.value}),rz=(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:t=>0===t.height?"#ddd":"#fff",stroke:n.color?void 0:t=>0===t.height?"":"#000"}}),rB={text:"",position:"inside",textOverflow:"clip",wordWrap:!0,maxLines:1,wordWrapWidth:t=>2*t.r},rW={title:t=>t.data.name,items:[{field:"value"}]},r$=(t,e,n)=>{let{value:r}=n,i=e8(t)?rb().path(e.path)(t):nJ(t);return r?i.sum(t=>nG(r)(t)).sort(e.sort):i.count(),(function(){var t=null,e=1,n=1,r=rw;function i(i){let o;let a=(o=1,()=>(o=(1664525*o+0x3c6ef35f)%0x100000000)/0x100000000);return i.x=e/2,i.y=n/2,t?i.eachBefore(rL(t)).eachAfter(rI(r,.5,a)).eachBefore(rR(1)):i.eachBefore(rL(rN)).eachAfter(rI(rw,1,a)).eachAfter(rI(r,i.r/Math.min(e,n),a)).eachBefore(rR(Math.min(e,n)/(2*i.r))),i}return i.radius=function(e){return arguments.length?(t=rp(e),i):t},i.size=function(t){return arguments.length?(e=+t[0],n=+t[1],i):[e,n]},i.padding=function(t){return arguments.length?(r="function"==typeof t?t:rE(+t),i):r},i})().size(e.size).padding(e.padding)(i),i.descendants()},rG=(t,e)=>{let{width:n,height:r}=e,{data:i,encode:o={},scale:a={},style:l={},layout:s={},labels:u=[],tooltip:c={}}=t,f=rD(t,["data","encode","scale","style","layout","labels","tooltip"]),p=rz(n,r,o),h=r$(i,nt({},rF(n,r),s),nt({},p.encode,o)),d=nc(l,"label");return nt({},p,Object.assign(Object.assign({data:h,encode:o,scale:a,style:l,labels:[Object.assign(Object.assign({},rB),d),...u]},f),{tooltip:nv(c,rW),axis:!1}))};function rV(t,e){let n;if(void 0===e)for(let e of t)null!=e&&(n>e||void 0===n&&e>=e)&&(n=e);else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(n>i||void 0===n&&i>=i)&&(n=i)}return n}function rH(t){return t.target.depth}rG.props={};function rU(t,e){return t.sourceLinks.length?t.depth:e-1}function rq(t,e){let n=0;if(void 0===e)for(let e of t)(e=+e)&&(n+=e);else{let r=-1;for(let i of t)(i=+e(i,++r,t))&&(n+=i)}return n}function rY(t,e){let n;if(void 0===e)for(let e of t)null!=e&&(n<e||void 0===n&&e>=e)&&(n=e);else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(n<i||void 0===n&&i>=i)&&(n=i)}return n}function rX(t){return function(){return t}}function rK(t,e){return rQ(t.source,e.source)||t.index-e.index}function rZ(t,e){return rQ(t.target,e.target)||t.index-e.index}function rQ(t,e){return t.y0-e.y0}function rJ(t){return t.value}function r0(t){return t.index}function r1(t){return t.nodes}function r2(t){return t.links}function r5(t,e){let n=t.get(e);if(!n)throw Error("missing: "+e);return n}function r3({nodes:t}){for(let e of t){let t=e.y0,n=t;for(let n of e.sourceLinks)n.y0=t+n.width/2,t+=n.width;for(let t of e.targetLinks)t.y1=n+t.width/2,n+=t.width}}let r4={nodeAlign:"justify",nodeWidth:.008,nodePadding:.03,nodes:t=>t.nodes,links:t=>t.links,nodeSort:void 0,linkSort:void 0,iterations:6},r6={left:function(t){return t.depth},right:function(t,e){return e-1-t.height},center:function(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?rV(t.sourceLinks,rH)-1:0},justify:rU},r8=t=>e=>{let{nodeId:n,nodeSort:r,nodeAlign:i,nodeWidth:o,nodePadding:a,nodeDepth:l,nodes:s,links:u,linkSort:c,iterations:f}=Object.assign({},r4,t),p=(function(){let t,e,n,r=0,i=0,o=1,a=1,l=24,s=8,u,c=r0,f=rU,p=r1,h=r2,d=6;function y(y){let v={nodes:p(y),links:h(y)};return function({nodes:t,links:e}){t.forEach((t,e)=>{t.index=e,t.sourceLinks=[],t.targetLinks=[]});let r=new Map(t.map(t=>[c(t),t]));if(e.forEach((t,e)=>{t.index=e;let{source:n,target:i}=t;"object"!=typeof n&&(n=t.source=r5(r,n)),"object"!=typeof i&&(i=t.target=r5(r,i)),n.sourceLinks.push(t),i.targetLinks.push(t)}),null!=n)for(let{sourceLinks:e,targetLinks:r}of t)e.sort(n),r.sort(n)}(v),function({nodes:t}){for(let e of t)e.value=void 0===e.fixedValue?Math.max(rq(e.sourceLinks,rJ),rq(e.targetLinks,rJ)):e.fixedValue}(v),function({nodes:e}){let n=e.length,r=new Set(e),i=new Set,o=0;for(;r.size;){if(r.forEach(t=>{for(let{target:e}of(t.depth=o,t.sourceLinks))i.add(e)}),++o>n)throw Error("circular link");r=i,i=new Set}if(t){let n;let r=Math.max(rY(e,t=>t.depth)+1,0);for(let i=0;i<e.length;i++)(n=e[i]).depth=t.call(null,n,r)}}(v),function({nodes:t}){let e=t.length,n=new Set(t),r=new Set,i=0;for(;n.size;){if(n.forEach(t=>{for(let{source:e}of(t.height=i,t.targetLinks))r.add(e)}),++i>e)throw Error("circular link");n=r,r=new Set}}(v),function(t){let c=function({nodes:t}){let n=Math.max(rY(t,t=>t.depth)+1,0),i=(o-r-l)/(n-1),a=Array(n).fill(0).map(()=>[]);for(let e of t){let t=Math.max(0,Math.min(n-1,Math.floor(f.call(null,e,n))));e.layer=t,e.x0=r+t*i,e.x1=e.x0+l,a[t]?a[t].push(e):a[t]=[e]}if(e)for(let t of a)t.sort(e);return a}(t);u=Math.min(s,(a-i)/(rY(c,t=>t.length)-1)),!function(t){let e=rV(t,t=>(a-i-(t.length-1)*u)/rq(t,rJ));for(let r of t){let t=i;for(let n of r)for(let r of(n.y0=t,n.y1=t+n.value*e,t=n.y1+u,n.sourceLinks))r.width=r.value*e;t=(a-t+u)/(r.length+1);for(let e=0;e<r.length;++e){let n=r[e];n.y0+=t*(e+1),n.y1+=t*(e+1)}(function(t){if(void 0===n)for(let{sourceLinks:e,targetLinks:n}of t)e.sort(rZ),n.sort(rK)})(r)}}(c);for(let t=0;t<d;++t){let n=Math.pow(.99,t),r=Math.max(1-n,(t+1)/d);(function(t,n,r){for(let i=t.length,o=i-2;o>=0;--o){let i=t[o];for(let t of i){let e=0,r=0;for(let{target:n,value:i}of t.sourceLinks){let o=i*(n.layer-t.layer);e+=function(t,e){let n=e.y0-(e.targetLinks.length-1)*u/2;for(let{source:r,width:i}of e.targetLinks){if(r===t)break;n+=i+u}for(let{target:r,width:i}of t.sourceLinks){if(r===e)break;n-=i}return n}(t,n)*o,r+=o}if(!(r>0))continue;let i=(e/r-t.y0)*n;t.y0+=i,t.y1+=i,b(t)}void 0===e&&i.sort(rQ),i.length&&g(i,r)}})(c,n,r),function(t,n,r){for(let i=1,o=t.length;i<o;++i){let o=t[i];for(let t of o){let e=0,r=0;for(let{source:n,value:i}of t.targetLinks){let o=i*(t.layer-n.layer);e+=function(t,e){let n=t.y0-(t.sourceLinks.length-1)*u/2;for(let{target:r,width:i}of t.sourceLinks){if(r===e)break;n+=i+u}for(let{source:r,width:i}of e.targetLinks){if(r===t)break;n-=i}return n}(n,t)*o,r+=o}if(!(r>0))continue;let i=(e/r-t.y0)*n;t.y0+=i,t.y1+=i,b(t)}void 0===e&&o.sort(rQ),o.length&&g(o,r)}}(c,n,r)}}(v),r3(v),v}y.update=function(t){return r3(t),t},y.nodeId=function(t){return arguments.length?(c="function"==typeof t?t:rX(t),y):c},y.nodeAlign=function(t){return arguments.length?(f="function"==typeof t?t:rX(t),y):f},y.nodeDepth=function(e){return arguments.length?(t=e,y):t},y.nodeSort=function(t){return arguments.length?(e=t,y):e},y.nodeWidth=function(t){return arguments.length?(l=+t,y):l},y.nodePadding=function(t){return arguments.length?(s=u=+t,y):s},y.nodes=function(t){return arguments.length?(p="function"==typeof t?t:rX(t),y):p},y.links=function(t){return arguments.length?(h="function"==typeof t?t:rX(t),y):h},y.linkSort=function(t){return arguments.length?(n=t,y):n},y.size=function(t){return arguments.length?(r=i=0,o=+t[0],a=+t[1],y):[o-r,a-i]},y.extent=function(t){return arguments.length?(r=+t[0][0],o=+t[1][0],i=+t[0][1],a=+t[1][1],y):[[r,i],[o,a]]},y.iterations=function(t){return arguments.length?(d=+t,y):d};function g(t,e){let n=t.length>>1,r=t[n];m(t,r.y0-u,n-1,e),v(t,r.y1+u,n+1,e),m(t,a,t.length-1,e),v(t,i,0,e)}function v(t,e,n,r){for(;n<t.length;++n){let i=t[n],o=(e-i.y0)*r;o>1e-6&&(i.y0+=o,i.y1+=o),e=i.y1+u}}function m(t,e,n,r){for(;n>=0;--n){let i=t[n],o=(i.y1-e)*r;o>1e-6&&(i.y0-=o,i.y1-=o),e=i.y0-u}}function b({sourceLinks:t,targetLinks:e}){if(void 0===n){for(let{source:{sourceLinks:t}}of e)t.sort(rZ);for(let{target:{targetLinks:e}}of t)e.sort(rK)}}return y})().nodeSort(r).linkSort(c).links(u).nodes(s).nodeWidth(o).nodePadding(a).nodeDepth(l).nodeAlign(function(t){let e=typeof t;return"string"===e?r6[t]||rU:"function"===e?t:rU}(i)).iterations(f).extent([[0,0],[1,1]]);"function"==typeof n&&p.nodeId(n);let{nodes:h,links:d}=p(e),y=h.map(t=>{let{x0:e,x1:n,y0:r,y1:i}=t;return Object.assign(Object.assign({},t),{x:[e,n,n,e],y:[r,r,i,i]})});return{nodes:y,links:d.map(t=>{let{source:e,target:n}=t,r=e.x1,i=n.x0,o=t.width/2;return Object.assign(Object.assign({},t),{x:[r,r,i,i],y:[t.y0+o,t.y0-o,t.y1+o,t.y1-o]})})}};r8.props={};var r9=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let r7={nodeId:t=>t.key,nodeWidth:.02,nodePadding:.02},it={type:"polygon",axis:!1,legend:!1,encode:{shape:"polygon",x:"x",y:"y"},scale:{x:{type:"identity"},y:{type:"identity"}},style:{stroke:"#000"}},ie={type:"polygon",axis:!1,legend:!1,encode:{shape:"ribbon",x:"x",y:"y"},style:{fillOpacity:.5,stroke:void 0}},ir={textAlign:t=>t.x[0]<.5?"start":"end",position:t=>t.x[0]<.5?"right":"left",fontSize:10},ii=t=>{let{data:e,encode:n={},scale:r,style:i={},layout:o={},nodeLabels:a=[],linkLabels:l=[],animate:s={},tooltip:u={}}=t,{links:c,nodes:f}=nH(e,n),p=nc(n,"node"),h=nc(n,"link"),{key:d=t=>t.key,color:y=d}=p,{links:g,nodes:v}=r8(Object.assign(Object.assign(Object.assign({},r7),{nodeId:nG(d)}),o))({links:c,nodes:f}),m=nc(i,"label"),{text:b=d,spacing:x=5}=m,O=r9(m,["text","spacing"]),w=nG(d),E=ng(u,"node",{title:w,items:[{field:"value"}]},!0),k=ng(u,"link",{title:"",items:[t=>({name:"source",value:w(t.source)}),t=>({name:"target",value:w(t.target)})]});return[nt({},it,{data:v,encode:Object.assign(Object.assign({},p),{color:y}),scale:r,style:nc(i,"node"),labels:[Object.assign(Object.assign(Object.assign({},ir),{text:b,dx:t=>t.x[0]<.5?x:-x}),O),...a],tooltip:E,animate:nb(s,"node"),axis:!1}),nt({},ie,{data:g,encode:h,labels:l,style:Object.assign({fill:h.color?void 0:"#aaa",strokeWidth:0},nc(i,"link")),tooltip:k,animate:nb(s,"link")})]};ii.props={};class io extends Map{constructor(t,e=il){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(let[e,n]of t)this.set(e,n)}get(t){return super.get(ia(this,t))}has(t){return super.has(ia(this,t))}set(t,e){return super.set(function({_intern:t,_key:e},n){let r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}(this,t),e)}delete(t){return super.delete(function({_intern:t,_key:e},n){let r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}(this,t))}}function ia({_intern:t,_key:e},n){let r=e(n);return t.has(r)?t.get(r):n}function il(t){return null!==t&&"object"==typeof t?t.valueOf():t}function is(t){return t}function iu(t,...e){return id(t,is,is,e)}function ic(t,...e){return id(t,Array.from,is,e)}function ip(t,e,...n){return id(t,is,e,n)}function ih(t,e,...n){return id(t,Array.from,e,n)}function id(t,e,n,r){return function t(i,o){if(o>=r.length)return n(i);let a=new io,l=r[o++],s=-1;for(let t of i){let e=l(t,++s,i),n=a.get(e);n?n.push(t):a.set(e,[t])}for(let[e,n]of a)a.set(e,t(n,o));return e(a)}(t,0)}function iy(t,e){return e.value-t.value}function ig(t,e){return e.frequency-t.frequency}function iv(t,e){return`${t.id}`.localeCompare(`${e.id}`)}function im(t,e){return`${t.name}`.localeCompare(`${e.name}`)}let ib={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},ix=t=>e=>(function(t){let{y:e,thickness:n,weight:r,marginRatio:i,id:o,source:a,target:l,sourceWeight:s,targetWeight:u,sortBy:c}=Object.assign(Object.assign({},ib),t);return function(t){let f=t.nodes.map(t=>Object.assign({},t)),p=t.edges.map(t=>Object.assign({},t));return function(t,e){e.forEach(t=>{t.source=a(t),t.target=l(t),t.sourceWeight=s(t),t.targetWeight=u(t)});let n=iu(e,t=>t.source),r=iu(e,t=>t.target);t.forEach(t=>{t.id=o(t);let e=n.has(t.id)?n.get(t.id):[],i=r.has(t.id)?r.get(t.id):[];t.frequency=e.length+i.length,t.value=rq(e,t=>t.sourceWeight)+rq(i,t=>t.targetWeight)})}(f,p),function(t,e){let n="function"==typeof c?c:ev[c];n&&t.sort(n)}(f,p),function(t,o){let a=t.length;if(!a)throw nl("Invalid nodes: it's empty!");if(!r){let n=1/a;return t.forEach((t,r)=>{t.x=(r+.5)*n,t.y=e})}let l=i/(2*a),s=t.reduce((t,e)=>t+=e.value,0);t.reduce((t,r)=>{r.weight=r.value/s,r.width=r.weight*(1-i),r.height=n;let o=l+t,a=o+r.width,u=e-n/2,c=u+n;return r.x=[o,a,a,o],r.y=[u,u,c,c],t+r.width+2*l},0)}(f,p),function(t,n){let i=new Map(t.map(t=>[t.id,t]));if(!r)return n.forEach(t=>{let e=a(t),n=l(t),r=i.get(e),o=i.get(n);r&&o&&(t.x=[r.x,o.x],t.y=[r.y,o.y])});n.forEach(t=>{t.x=[0,0,0,0],t.y=[e,e,e,e]});let o=iu(n,t=>t.source),s=iu(n,t=>t.target);t.forEach(t=>{let{edges:e,width:n,x:r,y:i,value:a,id:l}=t,u=o.get(l)||[],c=s.get(l)||[],f=0;u.map(t=>{let e=t.sourceWeight/a*n;t.x[0]=r[0]+f,t.x[1]=r[0]+f+e,f+=e}),c.forEach(t=>{let e=t.targetWeight/a*n;t.x[3]=r[0]+f,t.x[2]=r[0]+f+e,f+=e})})}(f,p),{nodes:f,edges:p}}})(t)(e);ix.props={};var iO=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let iw={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},iE={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}},ik={type:"polygon",axis:!1,legend:!1,encode:{shape:"ribbon",x:"x",y:"y"},style:{opacity:.5,lineWidth:1,strokeWidth:1}},iM={position:"outside",fontSize:10},iS=(t,e)=>{let{data:n,encode:r={},scale:i,style:o={},layout:a={},nodeLabels:l=[],linkLabels:s=[],animate:u={},tooltip:c={}}=t,{nodes:f,links:p}=nH(n,r),h=nc(r,"node"),d=nc(r,"link"),{key:y=t=>t.key,color:g=y}=h,{linkEncodeColor:v=t=>t.source}=d,{nodeWidthRatio:m=iw.thickness,nodePaddingRatio:b=iw.marginRatio}=a,x=iO(a,["nodeWidthRatio","nodePaddingRatio"]),{nodes:O,edges:w}=ix(Object.assign(Object.assign(Object.assign(Object.assign({},iw),{id:nG(y),thickness:m,marginRatio:b}),x),{weight:!0}))({nodes:f,edges:p}),E=nc(o,"label"),{text:k=y}=E,M=iO(E,["text"]),S=ng(c,"node",{title:"",items:[t=>({name:t.key,value:t.value})]},!0),_=ng(c,"link",{title:"",items:[t=>({name:`${t.source} -> ${t.target}`,value:t.value})]}),{height:P,width:j}=e,A=Math.min(P,j);return[nt({},ik,{data:w,encode:Object.assign(Object.assign({},d),{color:v}),labels:s,style:Object.assign({fill:v?void 0:"#aaa"},nc(o,"link")),tooltip:_,animate:nb(u,"link")}),nt({},iE,{data:O,encode:Object.assign(Object.assign({},h),{color:g}),scale:i,style:nc(o,"node"),coordinate:{type:"polar",outerRadius:(A-20)/A,startAngle:-(2*Math.PI),endAngle:0},labels:[Object.assign(Object.assign(Object.assign({},iM),{text:k}),M),...l],tooltip:S,animate:nb(u,"node"),axis:!1})]};iS.props={};var i_=function(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)};function iP(t){if(i_(t))return t[t.length-1]}var ij=function(t){return e6(t,"String")},iA=function(t,e,n){for(var r=0,i=ij(e)?e.split("."):e;t&&r<i.length;)t=t[i[r++]];return void 0===t||r<i.length?n:t};function iT(t,e,n,r,i){var o,a,l=t.children,s=l.length,u=Array(s+1);for(u[0]=a=o=0;o<s;++o)u[o+1]=a+=l[o].value;(function t(e,n,r,i,o,a,s){if(e>=n-1){var c=l[e];c.x0=i,c.y0=o,c.x1=a,c.y1=s;return}for(var f=u[e],p=r/2+f,h=e+1,d=n-1;h<d;){var y=h+d>>>1;u[y]<p?h=y+1:d=y}p-u[h-1]<u[h]-p&&e+1<h&&--h;var g=u[h]-f,v=r-g;if(a-i>s-o){var m=r?(i*v+a*g)/r:a;t(e,h,g,i,o,m,s),t(h,n,v,m,o,a,s)}else{var b=r?(o*v+s*g)/r:s;t(e,h,g,i,o,a,b),t(h,n,v,i,b,a,s)}})(0,s,t.value,e,n,r,i)}function iC(t,e,n,r,i){for(var o,a=t.children,l=-1,s=a.length,u=t.value&&(r-e)/t.value;++l<s;)(o=a[l]).y0=n,o.y1=i,o.x0=e,o.x1=e+=o.value*u}function iN(t,e,n,r,i){for(var o,a=t.children,l=-1,s=a.length,u=t.value&&(i-n)/t.value;++l<s;)(o=a[l]).x0=e,o.x1=r,o.y0=n,o.y1=n+=o.value*u}function iL(t,e,n,r,i){(1&t.depth?iN:iC)(t,e,n,r,i)}var iI=(1+Math.sqrt(5))/2;function iR(t,e,n,r,i,o){for(var a,l,s,u,c,f,p,h,d,y,g,v=[],m=e.children,b=0,x=0,O=m.length,w=e.value;b<O;){s=i-n,u=o-r;do c=m[x++].value;while(!c&&x<O);for(f=p=c,d=Math.max(p/(g=c*c*(y=Math.max(u/s,s/u)/(w*t))),g/f);x<O;++x){if(c+=l=m[x].value,l<f&&(f=l),l>p&&(p=l),(h=Math.max(p/(g=c*c*y),g/f))>d){c-=l;break}d=h}v.push(a={value:c,dice:s<u,children:m.slice(b,x)}),a.dice?iC(a,n,r,i,w?r+=u*c/w:o):iN(a,n,r,w?n+=s*c/w:i,o),w-=c,b=x}return v}var iD=function t(e){function n(t,n,r,i,o){iR(e,t,n,r,i,o)}return n.ratio=function(e){return t((e=+e)>1?e:1)},n}(iI),iF=function t(e){function n(t,n,r,i,o){if((a=t._squarify)&&a.ratio===e){for(var a,l,s,u,c,f=-1,p=a.length,h=t.value;++f<p;){for(s=(l=a[f]).children,u=l.value=0,c=s.length;u<c;++u)l.value+=s[u].value;l.dice?iC(l,n,r,i,h?r+=(o-r)*l.value/h:o):iN(l,n,r,h?n+=(i-n)*l.value/h:i,o),h-=l.value}}else t._squarify=a=iR(e,t,n,r,i,o),a.ratio=e}return n.ratio=function(e){return t((e=+e)>1?e:1)},n}(iI);function iz(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 iB(t,e,n){var r,i;let{value:o}=n,a=function(t,e){let n={treemapBinary:iT,treemapDice:iC,treemapSlice:iN,treemapSliceDice:iL,treemapSquarify:iD,treemapResquarify:iF},r="treemapSquarify"===t?n[t].ratio(e):n[t];if(!r)throw TypeError("Invalid tile method!");return r}(e.tile,e.ratio);let l=(r=t,i=e.path,Array.isArray(r)?"function"==typeof i?rb().path(i)(r):rb()(r):nJ(r));e8(t)?!function t(e){let n=iA(e,["data","name"]);n.replaceAll&&(e.path=n.replaceAll(".","/").split("/")),e.children&&e.children.forEach(e=>{t(e)})}(l):!function t(e,n=[e.data.name]){e.id=e.id||e.data.name,e.path=n,e.children&&e.children.forEach(r=>{r.id=`${e.id}/${r.data.name}`,r.path=[...n,r.data.name],t(r,r.path)})}(l),o?l.sum(t=>e.ignoreParentValue&&t.children?0:nG(o)(t)).sort(e.sort):l.count(),(function(){var t=iD,e=!1,n=1,r=1,i=[0],o=rw,a=rw,l=rw,s=rw,u=rw;function c(t){return t.x0=t.y0=0,t.x1=n,t.y1=r,t.eachBefore(f),i=[0],e&&t.eachBefore(iz),t}function f(e){var n=i[e.depth],r=e.x0+n,c=e.y0+n,f=e.x1-n,p=e.y1-n;f<r&&(r=f=(r+f)/2),p<c&&(c=p=(c+p)/2),e.x0=r,e.y0=c,e.x1=f,e.y1=p,e.children&&(n=i[e.depth+1]=o(e)/2,r+=u(e)-n,c+=a(e)-n,f-=l(e)-n,p-=s(e)-n,f<r&&(r=f=(r+f)/2),p<c&&(c=p=(c+p)/2),t(e,r,c,f,p))}return c.round=function(t){return arguments.length?(e=!!t,c):e},c.size=function(t){return arguments.length?(n=+t[0],r=+t[1],c):[n,r]},c.tile=function(e){return arguments.length?(t=rh(e),c):t},c.padding=function(t){return arguments.length?c.paddingInner(t).paddingOuter(t):c.paddingInner()},c.paddingInner=function(t){return arguments.length?(o="function"==typeof t?t:rE(+t),c):o},c.paddingOuter=function(t){return arguments.length?c.paddingTop(t).paddingRight(t).paddingBottom(t).paddingLeft(t):c.paddingTop()},c.paddingTop=function(t){return arguments.length?(a="function"==typeof t?t:rE(+t),c):a},c.paddingRight=function(t){return arguments.length?(l="function"==typeof t?t:rE(+t),c):l},c.paddingBottom=function(t){return arguments.length?(s="function"==typeof t?t:rE(+t),c):s},c.paddingLeft=function(t){return arguments.length?(u="function"==typeof t?t:rE(+t),c):u},c})().tile(a).size(e.size).round(e.round).paddingInner(e.paddingInner).paddingOuter(e.paddingOuter).paddingTop(e.paddingTop).paddingRight(e.paddingRight).paddingBottom(e.paddingBottom).paddingLeft(e.paddingLeft)(l);let s=l.descendants().map(t=>Object.assign(t,{id:t.id.replace(/^\//,""),x:[t.x0,t.x1],y:[t.y0,t.y1]}));return[s.filter("function"==typeof e.layer?e.layer:t=>t.height===e.layer),s]}var iW=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let i$=(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:(t,e)=>e.value-t.value,layer:0}),iG=(t,e)=>({type:"rect",axis:!1,encode:{x:"x",y:"y",key:"id",color:t=>t.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}}}),iV={fontSize:10,text:t=>iP(t.path),position:"inside",fill:"#000",textOverflow:"clip",wordWrap:!0,maxLines:1,wordWrapWidth:t=>t.x1-t.x0},iH={title:t=>{var e,n;return null===(n=null===(e=t.path)||void 0===e?void 0:e.join)||void 0===n?void 0:n.call(e,".")},items:[{field:"value"}]},iU={title:t=>iP(t.path),items:[{field:"value"}]},iq=(t,e)=>{let{width:n,height:r,options:i}=e,{data:o,encode:a={},scale:l,style:s={},layout:u={},labels:c=[],tooltip:f={}}=t,p=iW(t,["data","encode","scale","style","layout","labels","tooltip"]),h=iA(i,["interaction","treemapDrillDown"]),d=nt({},i$(n,r),u,{layer:h?t=>1===t.depth:u.layer}),[y,g]=iB(o,d,a),v=nc(s,"label");return nt({},iG(n,r),Object.assign(Object.assign({data:y,scale:l,style:s,labels:[Object.assign(Object.assign({},iV),v),...c]},p),{encode:a,tooltip:nv(f,iH),axis:!1}),h?{interaction:Object.assign(Object.assign({},p.interaction),{treemapDrillDown:h?Object.assign(Object.assign({},h),{originData:g,layout:d}):void 0}),encode:Object.assign({color:t=>iP(t.path)},a),tooltip:nv(f,iU)}:{})};function iY(){return{"data.arc":ix,"data.cluster":ro,"mark.forceGraph":nZ,"mark.tree":rf,"mark.pack":rG,"mark.sankey":ii,"mark.chord":iS,"mark.treemap":iq}}iq.props={};var iX={}.toString,iK=function(t,e){return iX.call(t)==="[object "+e+"]"},iZ=function(t){return Array.isArray?Array.isArray(t):iK(t,"Array")},iQ=function(t){var e=typeof t;return null!==t&&"object"===e||"function"===e},iJ=function(t,e){if(!!t){if(iZ(t))for(var n,r=0,i=t.length;r<i&&!1!==(n=e(t[r],r));r++);else if(iQ(t)){for(var o in t)if(t.hasOwnProperty(o)&&!1===(n=e(t[o],o)))break}}},i0=function(t){return iK(t,"Function")},i1=Array.prototype;i1.splice,i1.indexOf,Array.prototype.splice,Object.prototype.hasOwnProperty;var i2=function(t){return iK(t,"Number")},i5=Object.values?function(t){return Object.values(t)}:function(t){var e=[];return iJ(t,function(n,r){!(i0(t)&&"prototype"===r)&&e.push(n)}),e},i3=function(t){if(!("object"==typeof(e=t)&&null!==e)||!iK(t,"Object"))return!1;if(null===Object.getPrototypeOf(t))return!0;for(var e,n=t;null!==Object.getPrototypeOf(n);)n=Object.getPrototypeOf(n);return Object.getPrototypeOf(t)===n},i4=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)!function t(e,n,r,i){for(var o in r=r||0,i=i||5,n)if(n.hasOwnProperty(o)){var a=n[o];null!==a&&i3(a)?(!i3(e[o])&&(e[o]={}),r<i?t(e[o],a,r+1,i):e[o]=n[o]):iZ(a)?(e[o]=[],e[o]=e[o].concat(a)):void 0!==a&&(e[o]=a)}}(t,e[r]);return t},i6=function(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)},i8=function(t,e){if(!i6(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};Object.prototype.hasOwnProperty,Object.prototype.hasOwnProperty;var i9=function(t){return t};function i7(t){var e;return null==(e=t)?0:i6(t)?t.length:Object.keys(t).length}var ot=function(t,e){return(ot=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};function oe(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}ot(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var on=function(){return(on=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n],e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function or(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n}function oi(t,e,n,r){return new(n||(n=Promise))(function(i,o){function a(t){try{s(r.next(t))}catch(t){o(t)}}function l(t){try{s(r.throw(t))}catch(t){o(t)}}function s(t){var e;t.done?i(t.value):((e=t.value)instanceof n?e:new n(function(t){t(e)})).then(a,l)}s((r=r.apply(t,e||[])).next())})}function oo(t,e){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function l(l){return function(s){return function(l){if(n)throw TypeError("Generator is already executing.");for(;o&&(o=0,l[0]&&(a=0)),a;)try{if(n=1,r&&(i=2&l[0]?r.return:l[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,l[1])).done)return i;switch(r=0,i&&(l=[2&l[0],i.value]),l[0]){case 0:case 1:i=l;break;case 4:return a.label++,{value:l[1],done:!1};case 5:a.label++,r=l[1],l=[0];continue;case 7:l=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===l[0]||2===l[0])){a=0;continue}if(3===l[0]&&(!i||l[1]>i[0]&&l[1]<i[3])){a.label=l[1];break}if(6===l[0]&&a.label<i[1]){a.label=i[1],i=l;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(l);break}i[2]&&a.ops.pop(),a.trys.pop();continue}l=e.call(t,a)}catch(t){l=[6,t],r=0}finally{n=i=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,s])}}}function oa(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function ol(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function os(){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 o=arguments[e],a=0,l=o.length;a<l;a++,i++)r[i]=o[a];return r}function ou(t,e,n){if(n||2==arguments.length)for(var r,i=0,o=e.length;i<o;i++)(r||!(i in e))&&(!r&&(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}function oc(t,e,n,r){if("a"===n&&!r)throw TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)}!function(t,e){if(!i0(t))throw TypeError("Expected a function");var n=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var o=e?e.apply(this,r):r[0],a=n.cache;if(a.has(o))return a.get(o);var l=t.apply(this,r);return a.set(o,l),l};n.cache=new Map}(function(t,e){void 0===e&&(e={});var n=e.fontSize,r=e.fontFamily,i=e.fontWeight,o=e.fontStyle,a=e.fontVariant;return!an&&(an=document.createElement("canvas").getContext("2d")),an.font=[o,a,i,n+"px",r].join(" "),an.measureText(iK(t,"String")?t:"").width},function(t,e){return void 0===e&&(e={}),os([t],i5(e)).join("")}),!function(){function t(){this.map={}}t.prototype.has=function(t){return void 0!==this.map[t]},t.prototype.get=function(t,e){var n=this.map[t];return void 0===n?e:n},t.prototype.set=function(t,e){this.map[t]=e},t.prototype.clear=function(){this.map={}},t.prototype.delete=function(t){delete this.map[t]},t.prototype.size=function(){return Object.keys(this.map).length}}();class of{constructor(t){this.options=i4({},this.getDefaultOptions()),this.update(t)}getOptions(){return this.options}update(t={}){this.options=i4({},this.options,t),this.rescale(t)}rescale(t){}}function op(t,e){return e-t?n=>(n-t)/(e-t):t=>.5}function oh(t,...e){return e.reduce((t,e)=>n=>t(e(n)),t)}function od(t,e,n,r,i){let o=n||0,a=r||t.length,l=i||(t=>t);for(;o<a;){let n=Math.floor((o+a)/2);l(t[n])>e?a=n:o=n+1}return o}var oy=n("254"),og=n.n(oy);function ov(t,e,n){let r=n;return(r<0&&(r+=1),r>1&&(r-=1),r<1/6)?t+(e-t)*6*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function om(t){let e=og().get(t);if(!e)return null;let{model:n,value:r}=e;return"rgb"===n?r:"hsl"===n?function(t){let e=t[0]/360,n=t[1]/100,r=t[2]/100,i=t[3];if(0===n)return[255*r,255*r,255*r,i];let o=r<.5?r*(1+n):r+n-r*n,a=2*r-o,l=ov(a,o,e+1/3),s=ov(a,o,e);return[255*l,255*s,255*ov(a,o,e-1/3),i]}(r):null}let ob=(t,e)=>n=>t*(1-n)+e*n,ox=(t,e)=>{let n=om(t),r=om(e);return null===n||null===r?n?()=>t:()=>e:t=>{let e=[,,,,];for(let i=0;i<4;i+=1){let o=n[i],a=r[i];e[i]=o*(1-t)+a*t}let[i,o,a,l]=e;return`rgba(${Math.round(i)}, ${Math.round(o)}, ${Math.round(a)}, ${l})`}},oO=(t,e)=>"number"==typeof t&&"number"==typeof e?ob(t,e):"string"==typeof t&&"string"==typeof e?ox(t,e):()=>t,ow=(t,e)=>{let n=ob(t,e);return t=>Math.round(n(t))};function oE(t){return void 0!==t&&null!==t&&!Number.isNaN(t)}let ok=Math.sqrt(50),oM=Math.sqrt(10),oS=Math.sqrt(2);function o_(t,e,n){let r=(e-t)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),o=r/10**i;return i>=0?(o>=ok?10:o>=oM?5:o>=oS?2:1)*10**i:-(10**-i)/(o>=ok?10:o>=oM?5:o>=oS?2:1)}function oP(t,e,n){let r=Math.abs(e-t)/Math.max(0,n),i=10**Math.floor(Math.log(r)/Math.LN10),o=r/i;return o>=ok?i*=10:o>=oM?i*=5:o>=oS&&(i*=2),e<t?-i:i}let oj=(t,e,n=5)=>{let r;let i=[t,e],o=0,a=i.length-1,l=i[o],s=i[a];return s<l&&([l,s]=[s,l],[o,a]=[a,o]),(r=o_(l,s,n))>0?r=o_(l=Math.floor(l/r)*r,s=Math.ceil(s/r)*r,n):r<0&&(r=o_(l=Math.ceil(l*r)/r,s=Math.floor(s*r)/r,n)),r>0?(i[o]=Math.floor(l/r)*r,i[a]=Math.ceil(s/r)*r):r<0&&(i[o]=Math.ceil(l*r)/r,i[a]=Math.floor(s*r)/r),i},oA=(t,e,n)=>{let r,i;let[o,a]=t,[l,s]=e;return o<a?(r=op(o,a),i=n(l,s)):(r=op(a,o),i=n(s,l)),oh(i,r)},oT=(t,e,n)=>{let r=Math.min(t.length,e.length)-1,i=Array(r),o=Array(r),a=t[0]>t[r],l=a?[...t].reverse():t,s=a?[...e].reverse():e;for(let t=0;t<r;t+=1)i[t]=op(l[t],l[t+1]),o[t]=n(s[t],s[t+1]);return e=>{let n=od(t,e,1,r)-1,a=i[n];return oh(o[n],a)(e)}},oC=(t,e,n,r)=>{let i=Math.min(t.length,e.length);return(i>2?oT:oA)(t,e,r?ow:n)};class oN extends of{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:ob,tickCount:5}}map(t){return oE(t)?this.output(t):this.options.unknown}invert(t){return oE(t)?this.input(t):this.options.unknown}nice(){if(!this.options.nice)return;let[t,e,n,...r]=this.getTickMethodOptions();this.options.domain=this.chooseNice()(t,e,n,...r)}getTicks(){let{tickMethod:t}=this.options,[e,n,r,...i]=this.getTickMethodOptions();return t(e,n,r,...i)}getTickMethodOptions(){let{domain:t,tickCount:e}=this.options,n=t[0];return[n,t[t.length-1],e]}chooseNice(){return oj}rescale(){this.nice();let[t,e]=this.chooseTransforms();this.composeOutput(t,this.chooseClamp(t)),this.composeInput(t,e,this.chooseClamp(e))}chooseClamp(t){let{clamp:e,range:n}=this.options,r=this.options.domain.map(t),i=Math.min(r.length,n.length);return e?function(t,e){let n=e<t?e:t,r=t>e?t:e;return t=>Math.min(Math.max(n,t),r)}(r[0],r[i-1]):i9}composeOutput(t,e){let{domain:n,range:r,round:i,interpolate:o}=this.options,a=oC(n.map(t),r,o,i);this.output=oh(a,e,t)}composeInput(t,e,n){let{domain:r,range:i}=this.options,o=oC(i,r.map(t),ob);this.input=oh(e,n,o)}}let oL=(t,e,n)=>{let r,i;let o=t,a=e;if(o===a&&n>0)return[o];let l=o_(o,a,n);if(0===l||!Number.isFinite(l))return[];if(l>0){o=Math.ceil(o/l),i=Array(r=Math.ceil((a=Math.floor(a/l))-o+1));for(let t=0;t<r;t+=1)i[t]=(o+t)*l}else{o=Math.ceil(o*(l=-l)),i=Array(r=Math.ceil((a=Math.floor(a*l))-o+1));for(let t=0;t<r;t+=1)i[t]=(o+t)/l}return i};class oI extends oN{getDefaultOptions(){return{domain:[0,1],range:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolate:oO,tickMethod:oL,tickCount:5}}chooseTransforms(){return[i9,i9]}clone(){return new oI(this.options)}}var oR=function(t){var e=nn(t);return e.charAt(0).toUpperCase()+e.substring(1)},oD=t=>t;function oF(t,e){t&&oB.hasOwnProperty(t.type)&&oB[t.type](t,e)}var oz={Feature:function(t,e){oF(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)oF(n[r].geometry,e)}},oB={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){oW(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)oW(n[r],e,0)},Polygon:function(t,e){o$(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)o$(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)oF(n[r],e)}};function oW(t,e,n){var r,i=-1,o=t.length-n;for(e.lineStart();++i<o;)r=t[i],e.point(r[0],r[1],r[2]);e.lineEnd()}function o$(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)oW(t[n],e,1);e.polygonEnd()}function oG(t,e){t&&oz.hasOwnProperty(t.type)?oz[t.type](t,e):oF(t,e)}class oV{constructor(){this._partials=new Float64Array(32),this._n=0}add(t){let e=this._partials,n=0;for(let r=0;r<this._n&&r<32;r++){let i=e[r],o=t+i,a=Math.abs(t)<Math.abs(i)?t-(o-i):i-(o-t);a&&(e[n++]=a),t=o}return e[n]=t,this._n=n+1,this}valueOf(){let t=this._partials,e=this._n,n,r,i,o=0;if(e>0){for(o=t[--e];e>0&&(o=(n=o)+(r=t[--e]),!(i=r-(o-n))););e>0&&(i<0&&t[e-1]<0||i>0&&t[e-1]>0)&&(n=o+(r=2*i),r==n-o&&(o=n))}return o}}var oH=Math.PI,oU=oH/2,oq=oH/4,oY=2*oH,oX=180/oH,oK=oH/180,oZ=Math.abs,oQ=Math.atan,oJ=Math.atan2,o0=Math.cos,o1=Math.ceil,o2=Math.exp,o5=Math.log,o3=Math.pow,o4=Math.sin,o6=Math.sign||function(t){return t>0?1:t<0?-1:0},o8=Math.sqrt,o9=Math.tan;function o7(t){return t>1?0:t<-1?oH:Math.acos(t)}function at(t){return t>1?oU:t<-1?-oU:Math.asin(t)}function ae(){}var an,ar,ai,ao,aa,al=new oV,as=new oV,au={point:ae,lineStart:ae,lineEnd:ae,polygonStart:function(){au.lineStart=ac,au.lineEnd=ah},polygonEnd:function(){au.lineStart=au.lineEnd=au.point=ae,al.add(oZ(as)),as=new oV},result:function(){var t=al/2;return al=new oV,t}};function ac(){au.point=af}function af(t,e){au.point=ap,ar=ao=t,ai=aa=e}function ap(t,e){as.add(aa*t-ao*e),ao=t,aa=e}function ah(){ap(ar,ai)}var ad=1/0,ay=1/0,ag=-1/0,av=ag,am={point:function(t,e){t<ad&&(ad=t),t>ag&&(ag=t),e<ay&&(ay=e),e>av&&(av=e)},lineStart:ae,lineEnd:ae,polygonStart:ae,polygonEnd:ae,result:function(){var t=[[ad,ay],[ag,av]];return ag=av=-(ay=ad=1/0),t}},ab,ax,aO,aw,aE=0,ak=0,aM=0,aS=0,a_=0,aP=0,aj=0,aA=0,aT=0,aC={point:aN,lineStart:aL,lineEnd:aD,polygonStart:function(){aC.lineStart=aF,aC.lineEnd=az},polygonEnd:function(){aC.point=aN,aC.lineStart=aL,aC.lineEnd=aD},result:function(){var t=aT?[aj/aT,aA/aT]:aP?[aS/aP,a_/aP]:aM?[aE/aM,ak/aM]:[NaN,NaN];return aE=ak=aM=aS=a_=aP=aj=aA=aT=0,t}};function aN(t,e){aE+=t,ak+=e,++aM}function aL(){aC.point=aI}function aI(t,e){aC.point=aR,aN(aO=t,aw=e)}function aR(t,e){var n=t-aO,r=e-aw,i=o8(n*n+r*r);aS+=i*(aO+t)/2,a_+=i*(aw+e)/2,aP+=i,aN(aO=t,aw=e)}function aD(){aC.point=aN}function aF(){aC.point=aB}function az(){aW(ab,ax)}function aB(t,e){aC.point=aW,aN(ab=aO=t,ax=aw=e)}function aW(t,e){var n=t-aO,r=e-aw,i=o8(n*n+r*r);aS+=i*(aO+t)/2,a_+=i*(aw+e)/2,aP+=i,aj+=(i=aw*t-aO*e)*(aO+t),aA+=i*(aw+e),aT+=3*i,aN(aO=t,aw=e)}function a$(t){this._context=t}a$.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(){0===this._line&&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,oY)}},result:ae};var aG,aV,aH,aU,aq,aY=new oV,aX={point:ae,lineStart:function(){aX.point=aK},lineEnd:function(){aG&&aZ(aV,aH),aX.point=ae},polygonStart:function(){aG=!0},polygonEnd:function(){aG=null},result:function(){var t=+aY;return aY=new oV,t}};function aK(t,e){aX.point=aZ,aV=aU=t,aH=aq=e}function aZ(t,e){aU-=t,aq-=e,aY.add(o8(aU*aU+aq*aq)),aU=t,aq=e}class aQ{constructor(t){this._append=null==t?aJ:function(t){let e=Math.floor(t);if(!(e>=0))throw RangeError(`invalid digits: ${t}`);if(e>15)return aJ;if(e!==r){let t=10**e;r=e,i=function(e){let n=1;this._+=e[0];for(let r=e.length;n<r;++n)this._+=Math.round(arguments[n]*t)/t+e[n]}}return i}(t),this._radius=4.5,this._=""}pointRadius(t){return this._radius=+t,this}polygonStart(){this._line=0}polygonEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){0===this._line&&(this._+="Z"),this._point=NaN}point(t,e){switch(this._point){case 0:this._append`M${t},${e}`,this._point=1;break;case 1:this._append`L${t},${e}`;break;default:if(this._append`M${t},${e}`,this._radius!==o||this._append!==i){let t=this._radius,e=this._;this._="",this._append`m0,${t}a${t},${t} 0 1,1 0,${-2*t}a${t},${t} 0 1,1 0,${2*t}z`,o=t,i=this._append,a=this._,this._=e}this._+=a}}result(){let t=this._;return this._="",t.length?t:null}}function aJ(t){let e=1;this._+=t[0];for(let n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function a0(t,e){let n=3,r=4.5,i,o;function a(t){return t&&("function"==typeof r&&o.pointRadius(+r.apply(this,arguments)),oG(t,i(o))),o.result()}return a.area=function(t){return oG(t,i(au)),au.result()},a.measure=function(t){return oG(t,i(aX)),aX.result()},a.bounds=function(t){return oG(t,i(am)),am.result()},a.centroid=function(t){return oG(t,i(aC)),aC.result()},a.projection=function(e){return arguments.length?(i=null==e?(t=null,oD):(t=e).stream,a):t},a.context=function(t){return arguments.length?(o=null==t?(e=null,new aQ(n)):new a$(e=t),"function"!=typeof r&&o.pointRadius(r),a):e},a.pointRadius=function(t){return arguments.length?(r="function"==typeof t?t:(o.pointRadius(+t),+t),a):r},a.digits=function(t){if(!arguments.length)return n;if(null==t)n=null;else{let e=Math.floor(t);if(!(e>=0))throw RangeError(`invalid digits: ${t}`);n=e}return null===e&&(o=new aQ(n)),a},a.projection(t).digits(n).context(e)}function a1(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=0|Math.max(0,Math.ceil((e-t)/n)),o=Array(i);++r<i;)o[r]=t+r*n;return o}function a2(t,e,n){var r=a1(t,e-1e-6,n).concat(e);return function(t){return r.map(function(e){return[t,e]})}}function a5(t,e,n){var r=a1(t,e-1e-6,n).concat(e);return function(t){return r.map(function(e){return[e,t]})}}function a3(){var t,e=[];return{point:function(e,n,r){t.push([e,n,r])},lineStart:function(){e.push(t=[])},lineEnd:ae,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}function a4(t,e){return 1e-6>oZ(t[0]-e[0])&&1e-6>oZ(t[1]-e[1])}function a6(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 a8(t,e,n,r,i){var o,a,l=[],s=[];if(t.forEach(function(t){if(!((e=t.length-1)<=0)){var e,n,r=t[0],a=t[e];if(a4(r,a)){if(!r[2]&&!a[2]){for(i.lineStart(),o=0;o<e;++o)i.point((r=t[o])[0],r[1]);i.lineEnd();return}a[0]+=2e-6}l.push(n=new a6(r,t,null,!0)),s.push(n.o=new a6(r,null,n,!1)),l.push(n=new a6(a,t,null,!1)),s.push(n.o=new a6(a,null,n,!0))}}),l.length){for(s.sort(e),a9(l),a9(s),o=0,a=s.length;o<a;++o)s[o].e=n=!n;for(var u,c,f=l[0];;){for(var p=f,h=!0;p.v;)if((p=p.n)===f)return;u=p.z,i.lineStart();do{if(p.v=p.o.v=!0,p.e){if(h)for(o=0,a=u.length;o<a;++o)i.point((c=u[o])[0],c[1]);else r(p.x,p.n.x,1,i);p=p.n}else{if(h)for(o=(u=p.p.z).length-1;o>=0;--o)i.point((c=u[o])[0],c[1]);else r(p.x,p.p.x,-1,i);p=p.p}u=(p=p.o).z,h=!h}while(!p.v);i.lineEnd()}}}function a9(t){if(e=t.length){for(var e,n,r=0,i=t[0];++r<e;)i.n=n=t[r],n.p=i,i=n;i.n=n=t[0],n.p=i}}function a7(t){return[oJ(t[1],t[0]),at(t[2])]}function lt(t){var e=t[0],n=t[1],r=o0(n);return[r*o0(e),r*o4(e),o4(n)]}function le(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function ln(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 lr(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function li(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function lo(t){var e=o8(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}function la(t){return oZ(t[0])<=oH?t[0]:o6(t[0])*((oZ(t[0])+oH)%oY-oH)}function ll(t){return Array.from(function*(t){for(let e of t)yield*e}(t))}function ls(t,e,n,r){return function(i){var o,a,l,s=e(i),u=a3(),c=e(u),f=!1,p={point:h,lineStart:y,lineEnd:g,polygonStart:function(){p.point=v,p.lineStart=m,p.lineEnd=b,a=[],o=[]},polygonEnd:function(){p.point=h,p.lineStart=y,p.lineEnd=g,a=ll(a);var t=function(t,e){var n=la(e),r=e[1],i=o4(r),o=[o4(n),-o0(n),0],a=0,l=0,s=new oV;1===i?r=oU+1e-6:-1===i&&(r=-oU-1e-6);for(var u=0,c=t.length;u<c;++u)if(p=(f=t[u]).length){for(var f,p,h=f[p-1],d=la(h),y=h[1]/2+oq,g=o4(y),v=o0(y),m=0;m<p;++m,d=x,g=w,v=E,h=b){var b=f[m],x=la(b),O=b[1]/2+oq,w=o4(O),E=o0(O),k=x-d,M=k>=0?1:-1,S=M*k,_=S>oH,P=g*w;if(s.add(oJ(P*M*o4(S),v*E+P*o0(S))),a+=_?k+M*oY:k,_^d>=n^x>=n){var j=ln(lt(h),lt(b));lo(j);var A=ln(o,j);lo(A);var T=(_^k>=0?-1:1)*at(A[2]);(r>T||r===T&&(j[0]||j[1]))&&(l+=_^k>=0?1:-1)}}}return(a<-1e-6||a<1e-6&&s<-1e-12)^1&l}(o,r);a.length?(!f&&(i.polygonStart(),f=!0),a8(a,lc,t,n,i)):t&&(!f&&(i.polygonStart(),f=!0),i.lineStart(),n(null,null,1,i),i.lineEnd()),f&&(i.polygonEnd(),f=!1),a=o=null},sphere:function(){i.polygonStart(),i.lineStart(),n(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function h(e,n){t(e,n)&&i.point(e,n)}function d(t,e){s.point(t,e)}function y(){p.point=d,s.lineStart()}function g(){p.point=h,s.lineEnd()}function v(t,e){l.push([t,e]),c.point(t,e)}function m(){c.lineStart(),l=[]}function b(){v(l[0][0],l[0][1]),c.lineEnd();var t,e,n,r,s=c.clean(),p=u.result(),h=p.length;if(l.pop(),o.push(l),l=null,h){if(1&s){if((e=(n=p[0]).length-1)>0){for(!f&&(i.polygonStart(),f=!0),i.lineStart(),t=0;t<e;++t)i.point((r=n[t])[0],r[1]);i.lineEnd()}return}h>1&&2&s&&p.push(p.pop().concat(p.shift())),a.push(p.filter(lu))}}return p}}function lu(t){return t.length>1}function lc(t,e){return((t=t.x)[0]<0?t[1]-oU-1e-6:oU-t[1])-((e=e.x)[0]<0?e[1]-oU-1e-6:oU-e[1])}var lf=ls(function(){return!0},function(t){var e,n=NaN,r=NaN,i=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(o,a){var l=o>0?oH:-oH,s=oZ(o-n);1e-6>oZ(s-oH)?(t.point(n,r=(r+a)/2>0?oU:-oU),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(l,r),t.point(o,r),e=0):i!==l&&s>=oH&&(1e-6>oZ(n-i)&&(n-=1e-6*i),1e-6>oZ(o-l)&&(o-=1e-6*l),r=function(t,e,n,r){var i,o,a=o4(t-n);return oZ(a)>1e-6?oQ((o4(e)*(o=o0(r))*o4(n)-o4(r)*(i=o0(e))*o4(t))/(i*o*a)):(e+r)/2}(n,r,o,a),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(l,r),e=0),t.point(n=o,r=a),i=l},lineEnd:function(){t.lineEnd(),n=r=NaN},clean:function(){return 2-e}}},function(t,e,n,r){var i;if(null==t)i=n*oU,r.point(-oH,i),r.point(0,i),r.point(oH,i),r.point(oH,0),r.point(oH,-i),r.point(0,-i),r.point(-oH,-i),r.point(-oH,0),r.point(-oH,i);else if(oZ(t[0]-e[0])>1e-6){var o=t[0]<e[0]?oH:-oH;i=n*o/2,r.point(-o,i),r.point(0,i),r.point(o,i)}else r.point(e[0],e[1])},[-oH,-oU]);function lp(t,e){e=lt(e),e[0]-=t,lo(e);var n=o7(-e[1]);return((0>-e[2]?-n:n)+oY-1e-6)%oY}var lh=-1e9;function ld(t,e,n,r){function i(i,o){return t<=i&&i<=n&&e<=o&&o<=r}function o(i,o,l,u){var c=0,f=0;if(null==i||(c=a(i,l))!==(f=a(o,l))||0>s(i,o)^l>0)do u.point(0===c||3===c?t:n,c>1?r:e);while((c=(c+l+4)%4)!==f);else u.point(o[0],o[1])}function a(r,i){return 1e-6>oZ(r[0]-t)?i>0?0:3:1e-6>oZ(r[0]-n)?i>0?2:1:1e-6>oZ(r[1]-e)?i>0?1:0:i>0?3:2}function l(t,e){return s(t.x,e.x)}function s(t,e){var n=a(t,1),r=a(e,1);return n!==r?n-r:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}return function(a){var s,u,c,f,p,h,d,y,g,v,m,b=a,x=a3(),O={point:w,lineStart:function(){O.point=E,u&&u.push(c=[]),v=!0,g=!1,d=y=NaN},lineEnd:function(){s&&(E(f,p),h&&g&&x.rejoin(),s.push(x.result())),O.point=w,g&&b.lineEnd()},polygonStart:function(){b=x,s=[],u=[],m=!0},polygonEnd:function(){var e=function(){for(var e=0,n=0,i=u.length;n<i;++n)for(var o,a,l=u[n],s=1,c=l.length,f=l[0],p=f[0],h=f[1];s<c;++s)o=p,a=h,p=(f=l[s])[0],h=f[1],a<=r?h>r&&(p-o)*(r-a)>(h-a)*(t-o)&&++e:h<=r&&(p-o)*(r-a)<(h-a)*(t-o)&&--e;return e}(),n=m&&e,i=(s=ll(s)).length;(n||i)&&(a.polygonStart(),n&&(a.lineStart(),o(null,null,1,a),a.lineEnd()),i&&a8(s,l,e,o,a),a.polygonEnd()),b=a,s=u=c=null}};function w(t,e){i(t,e)&&b.point(t,e)}function E(o,a){var l=i(o,a);if(u&&c.push([o,a]),v)f=o,p=a,h=l,v=!1,l&&(b.lineStart(),b.point(o,a));else if(l&&g)b.point(o,a);else{var s=[d=Math.max(lh,Math.min(1e9,d)),y=Math.max(lh,Math.min(1e9,y))],x=[o=Math.max(lh,Math.min(1e9,o)),a=Math.max(lh,Math.min(1e9,a))];(function(t,e,n,r,i,o){var a,l=t[0],s=t[1],u=e[0],c=e[1],f=0,p=1,h=u-l,d=c-s;if(a=n-l,!h&&a>0)return;if(a/=h,h<0){if(a<f)return;a<p&&(p=a)}else if(h>0){if(a>p)return;a>f&&(f=a)}if(a=i-l,!h&&a<0)return;if(a/=h,h<0){if(a>p)return;a>f&&(f=a)}else if(h>0){if(a<f)return;a<p&&(p=a)}if(a=r-s,!!d||!(a>0)){if(a/=d,d<0){if(a<f)return;a<p&&(p=a)}else if(d>0){if(a>p)return;a>f&&(f=a)}if(a=o-s,d||!(a<0)){if(a/=d,d<0){if(a>p)return;a>f&&(f=a)}else if(d>0){if(a<f)return;a<p&&(p=a)}return f>0&&(t[0]=l+f*h,t[1]=s+f*d),p<1&&(e[0]=l+p*h,e[1]=s+p*d),!0}}})(s,x,t,e,n,r)?(!g&&(b.lineStart(),b.point(s[0],s[1])),b.point(x[0],x[1]),!l&&b.lineEnd(),m=!1):l&&(b.lineStart(),b.point(o,a),m=!1)}d=o,y=a,g=l}return O}}function ly(t,e){function n(n,r){return e((n=t(n,r))[0],n[1])}return t.invert&&e.invert&&(n.invert=function(n,r){return(n=e.invert(n,r))&&t.invert(n[0],n[1])}),n}function lg(t,e){return oZ(t)>oH&&(t-=Math.round(t/oY)*oY),[t,e]}function lv(t,e,n){return(t%=oY)?e||n?ly(lb(t),lx(e,n)):lb(t):e||n?lx(e,n):lg}function lm(t){return function(e,n){return oZ(e+=t)>oH&&(e-=Math.round(e/oY)*oY),[e,n]}}function lb(t){var e=lm(t);return e.invert=lm(-t),e}function lx(t,e){var n=o0(t),r=o4(t),i=o0(e),o=o4(e);function a(t,e){var a=o0(e),l=o0(t)*a,s=o4(t)*a,u=o4(e),c=u*n+l*r;return[oJ(s*i-c*o,l*n-u*r),at(c*i+s*o)]}return a.invert=function(t,e){var a=o0(e),l=o0(t)*a,s=o4(t)*a,u=o4(e),c=u*i-s*o;return[oJ(s*i+u*o,l*n+c*r),at(c*n-l*r)]},a}lg.invert=lg;function lO(t){return function(e){var n=new lw;for(var r in t)n[r]=t[r];return n.stream=e,n}}function lw(){}function lE(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),oG(n,t.stream(am)),e(am.result()),null!=r&&t.clipExtent(r),t}function lk(t,e,n){return lE(t,function(n){var r=e[1][0]-e[0][0],i=e[1][1]-e[0][1],o=Math.min(r/(n[1][0]-n[0][0]),i/(n[1][1]-n[0][1])),a=+e[0][0]+(r-o*(n[1][0]+n[0][0]))/2,l=+e[0][1]+(i-o*(n[1][1]+n[0][1]))/2;t.scale(150*o).translate([a,l])},n)}function lM(t,e,n){return lk(t,[[0,0],e],n)}function lS(t,e,n){return lE(t,function(n){var r=+e,i=r/(n[1][0]-n[0][0]),o=(r-i*(n[1][0]+n[0][0]))/2,a=-i*n[0][1];t.scale(150*i).translate([o,a])},n)}function l_(t,e,n){return lE(t,function(n){var r=+e,i=r/(n[1][1]-n[0][1]),o=-i*n[0][0],a=(r-i*(n[1][1]+n[0][1]))/2;t.scale(150*i).translate([o,a])},n)}lw.prototype={constructor:lw,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()}};var lP=o0(30*oK);function lj(t,e){return+e?function(t,e){function n(r,i,o,a,l,s,u,c,f,p,h,d,y,g){var v=u-r,m=c-i,b=v*v+m*m;if(b>4*e&&y--){var x=a+p,O=l+h,w=s+d,E=o8(x*x+O*O+w*w),k=at(w/=E),M=1e-6>oZ(oZ(w)-1)||1e-6>oZ(o-f)?(o+f)/2:oJ(O,x),S=t(M,k),_=S[0],P=S[1],j=_-r,A=P-i,T=m*j-v*A;(T*T/b>e||oZ((v*j+m*A)/b-.5)>.3||a*p+l*h+s*d<lP)&&(n(r,i,o,a,l,s,_,P,M,x/=E,O/=E,w,y,g),g.point(_,P),n(_,P,M,x,O,w,u,c,f,p,h,d,y,g))}}return function(e){var r,i,o,a,l,s,u,c,f,p,h,d,y={point:g,lineStart:v,lineEnd:b,polygonStart:function(){e.polygonStart(),y.lineStart=x},polygonEnd:function(){e.polygonEnd(),y.lineStart=v}};function g(n,r){n=t(n,r),e.point(n[0],n[1])}function v(){c=NaN,y.point=m,e.lineStart()}function m(r,i){var o=lt([r,i]),a=t(r,i);n(c,f,u,p,h,d,c=a[0],f=a[1],u=r,p=o[0],h=o[1],d=o[2],16,e),e.point(c,f)}function b(){y.point=g,e.lineEnd()}function x(){v(),y.point=O,y.lineEnd=w}function O(t,e){m(r=t,e),i=c,o=f,a=p,l=h,s=d,y.point=m}function w(){n(c,f,u,p,h,d,i,o,r,a,l,s,16,e),y.lineEnd=b,b()}return y}}(t,e):function(t){return lO({point:function(e,n){e=t(e,n),this.stream.point(e[0],e[1])}})}(t)}var lA=lO({point:function(t,e){this.stream.point(t*oK,e*oK)}});function lT(t,e,n,r,i,o){if(!o)return function(t,e,n,r,i){function o(o,a){return[e+t*(o*=r),n-t*(a*=i)]}return o.invert=function(o,a){return[(o-e)/t*r,(n-a)/t*i]},o}(t,e,n,r,i);var a=o0(o),l=o4(o),s=a*t,u=l*t,c=a/t,f=l/t,p=(l*n-a*e)/t,h=(l*e+a*n)/t;function d(t,o){return[s*(t*=r)-u*(o*=i)+e,n-u*t-s*o]}return d.invert=function(t,e){return[r*(c*t-f*e+p),i*(h-f*t-c*e)]},d}function lC(t){return lN(function(){return t})()}function lN(t){var e,n,r,i,o,a,l,s,u,c,f=150,p=480,h=250,d=0,y=0,g=0,v=0,m=0,b=0,x=1,O=1,w=null,E=lf,k=null,M=oD,S=.5;function _(t){return s(t[0]*oK,t[1]*oK)}function P(t){return(t=s.invert(t[0],t[1]))&&[t[0]*oX,t[1]*oX]}function j(){var t=lT(f,0,0,x,O,b).apply(null,e(d,y)),r=lT(f,p-t[0],h-t[1],x,O,b);return n=lv(g,v,m),l=ly(e,r),s=ly(n,l),a=lj(l,S),A()}function A(){return u=c=null,_}return _.stream=function(t){var e;return u&&c===t?u:u=lA((e=n,lO({point:function(t,n){var r=e(t,n);return this.stream.point(r[0],r[1])}}))(E(a(M(c=t)))))},_.preclip=function(t){return arguments.length?(E=t,w=void 0,A()):E},_.postclip=function(t){return arguments.length?(M=t,k=r=i=o=null,A()):M},_.clipAngle=function(t){return arguments.length?(E=+t?function(t){var e=o0(t),n=2*oK,r=e>0,i=oZ(e)>1e-6;function o(t,n){return o0(t)*o0(n)>e}function a(t,n,r){var i=lt(t),o=lt(n),a=[1,0,0],l=ln(i,o),s=le(l,l),u=l[0],c=s-u*u;if(!c)return!r&&t;var f=ln(a,l),p=li(a,e*s/c);lr(p,li(l,-e*u/c));var h=le(p,f),d=le(f,f),y=h*h-d*(le(p,p)-1);if(!(y<0)){var g=o8(y),v=li(f,(-h-g)/d);if(lr(v,p),v=a7(v),!r)return v;var m,b=t[0],x=n[0],O=t[1],w=n[1];x<b&&(m=b,b=x,x=m);var E=x-b,k=1e-6>oZ(E-oH);if(!k&&w<O&&(m=O,O=w,w=m),k||E<1e-6?k?O+w>0^v[1]<(1e-6>oZ(v[0]-b)?O:w):O<=v[1]&&v[1]<=w:E>oH^(b<=v[0]&&v[0]<=x)){var M=li(f,(-h+g)/d);return lr(M,p),[v,a7(M)]}}}function l(e,n){var i=r?t:oH-t,o=0;return e<-i?o|=1:e>i&&(o|=2),n<-i?o|=4:n>i&&(o|=8),o}return ls(o,function(t){var e,n,s,u,c;return{lineStart:function(){u=s=!1,c=1},point:function(f,p){var h,d,y=[f,p],g=o(f,p),v=r?g?0:l(f,p):g?l(f+(f<0?oH:-oH),p):0;!e&&(u=s=g)&&t.lineStart(),g!==s&&(!(d=a(e,y))||a4(e,d)||a4(y,d))&&(y[2]=1),g!==s?(c=0,g?(t.lineStart(),d=a(y,e),t.point(d[0],d[1])):(d=a(e,y),t.point(d[0],d[1],2),t.lineEnd()),e=d):i&&e&&r^g&&!(v&n)&&(h=a(y,e,!0))&&(c=0,r?(t.lineStart(),t.point(h[0][0],h[0][1]),t.point(h[1][0],h[1][1]),t.lineEnd()):(t.point(h[1][0],h[1][1]),t.lineEnd(),t.lineStart(),t.point(h[0][0],h[0][1],3))),g&&(!e||!a4(e,y))&&t.point(y[0],y[1]),e=y,s=g,n=v},lineEnd:function(){s&&t.lineEnd(),e=null},clean:function(){return c|(u&&s)<<1}}},function(e,r,i,o){!function(t,e,n,r,i,o){if(n){var a=o0(e),l=o4(e),s=r*n;null==i?(i=e+r*oY,o=e-s/2):(i=lp(a,i),o=lp(a,o),(r>0?i<o:i>o)&&(i+=r*oY));for(var u,c=i;r>0?c>o:c<o;c-=s)u=a7([a,-l*o0(c),-l*o4(c)]),t.point(u[0],u[1])}}(o,t,n,i,e,r)},r?[0,-t]:[-oH,t-oH])}(w=t*oK):(w=null,lf),A()):w*oX},_.clipExtent=function(t){return arguments.length?(M=null==t?(k=r=i=o=null,oD):ld(k=+t[0][0],r=+t[0][1],i=+t[1][0],o=+t[1][1]),A()):null==k?null:[[k,r],[i,o]]},_.scale=function(t){return arguments.length?(f=+t,j()):f},_.translate=function(t){return arguments.length?(p=+t[0],h=+t[1],j()):[p,h]},_.center=function(t){return arguments.length?(d=t[0]%360*oK,y=t[1]%360*oK,j()):[d*oX,y*oX]},_.rotate=function(t){return arguments.length?(g=t[0]%360*oK,v=t[1]%360*oK,m=t.length>2?t[2]%360*oK:0,j()):[g*oX,v*oX,m*oX]},_.angle=function(t){return arguments.length?(b=t%360*oK,j()):b*oX},_.reflectX=function(t){return arguments.length?(x=t?-1:1,j()):x<0},_.reflectY=function(t){return arguments.length?(O=t?-1:1,j()):O<0},_.precision=function(t){return arguments.length?(a=lj(l,S=t*t),A()):o8(S)},_.fitExtent=function(t,e){return lk(_,t,e)},_.fitSize=function(t,e){return lM(_,t,e)},_.fitWidth=function(t,e){return lS(_,t,e)},_.fitHeight=function(t,e){return l_(_,t,e)},function(){return e=t.apply(this,arguments),_.invert=e.invert&&P,j()}}function lL(t){var e=0,n=oH/3,r=lN(t),i=r(e,n);return i.parallels=function(t){return arguments.length?r(e=t[0]*oK,n=t[1]*oK):[e*oX,n*oX]},i}function lI(t,e){var n=o4(t),r=(n+o4(e))/2;if(1e-6>oZ(r))return function(t){var e=o0(t);function n(t,n){return[t*e,o4(n)/e]}return n.invert=function(t,n){return[t/e,at(n*e)]},n}(t);var i=1+n*(2*r-n),o=o8(i)/r;function a(t,e){var n=o8(i-2*r*o4(e))/r;return[n*o4(t*=r),o-n*o0(t)]}return a.invert=function(t,e){var n=o-e,a=oJ(t,oZ(n))*o6(n);return n*r<0&&(a-=oH*o6(t)*o6(n)),[a/r,at((i-(t*t+n*n)*r*r)/(2*r))]},a}function lR(){return lL(lI).scale(155.424).center([0,33.6442])}function lD(t,e){return[t,o5(o9((oU+e)/2))]}function lF(){return lz(lD).scale(961/oY)}function lz(t){var e,n,r,i=lC(t),o=i.center,a=i.scale,l=i.translate,s=i.clipExtent,u=null;function c(){var o=oH*a(),l=i((function(t){function e(e){return e=t(e[0]*oK,e[1]*oK),e[0]*=oX,e[1]*=oX,e}return t=lv(t[0]*oK,t[1]*oK,t.length>2?t[2]*oK:0),e.invert=function(e){return e=t.invert(e[0]*oK,e[1]*oK),e[0]*=oX,e[1]*=oX,e},e})(i.rotate()).invert([0,0]));return s(null==u?[[l[0]-o,l[1]-o],[l[0]+o,l[1]+o]]:t===lD?[[Math.max(l[0]-o,u),e],[Math.min(l[0]+o,n),r]]:[[u,Math.max(l[1]-o,e)],[n,Math.min(l[1]+o,r)]])}return i.scale=function(t){return arguments.length?(a(t),c()):a()},i.translate=function(t){return arguments.length?(l(t),c()):l()},i.center=function(t){return arguments.length?(o(t),c()):o()},i.clipExtent=function(t){return arguments.length?(null==t?u=e=n=r=null:(u=+t[0][0],e=+t[0][1],n=+t[1][0],r=+t[1][1]),c()):null==u?null:[[u,e],[n,r]]},c()}function lB(t){return o9((oU+t)/2)}function lW(t,e){var n=o0(t),r=t===e?o4(t):o5(n/o0(e))/o5(lB(e)/lB(t)),i=n*o3(lB(t),r)/r;if(!r)return lD;function o(t,e){i>0?e<-oU+1e-6&&(e=-oU+1e-6):e>oU-1e-6&&(e=oU-1e-6);var n=i/o3(lB(e),r);return[n*o4(r*t),i-n*o0(r*t)]}return o.invert=function(t,e){var n=i-e,o=o6(r)*o8(t*t+n*n),a=oJ(t,oZ(n))*o6(n);return n*r<0&&(a-=oH*o6(t)*o6(n)),[a/r,2*oQ(o3(i/o,1/r))-oU]},o}function l$(){return lL(lW).scale(109.5).parallels([30,30])}function lG(t){return function(e,n){var r=o0(e),i=o0(n),o=t(r*i);return o===1/0?[2,0]:[o*i*o4(e),o*o4(n)]}}function lV(t){return function(e,n){var r=o8(e*e+n*n),i=t(r),o=o4(i);return[oJ(e*o,r*o0(i)),at(r&&n*o/r)]}}lD.invert=function(t,e){return[t,2*oQ(o2(e))-oU]};var lH=lG(function(t){return o8(2/(1+t))});function lU(){return lC(lH).scale(124.75).clipAngle(179.999)}function lq(){return lR().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function lY(t,e){return[o5(o9((oU+e)/2)),-t]}function lX(){var t=lz(lY),e=t.center,n=t.rotate;return t.center=function(t){return arguments.length?e([-t[1],t[0]]):[(t=e())[1],-t[0]]},t.rotate=function(t){return arguments.length?n([t[0],t[1],t.length>2?t[2]+90:90]):[(t=n())[0],t[1],t[2]-90]},n([0,0,90]).scale(159.155)}function lK(t,e){return[o0(e)*o4(t),o4(e)]}function lZ(){return lC(lK).scale(249.5).clipAngle(90.000001)}function lQ(t,e){var n=o0(e),r=o0(t)*n;return[n*o4(t)/r,o4(e)/r]}function lJ(){return lC(lQ).scale(144.049).clipAngle(60)}function l0(t,e){return[t,e]}function l1(){return lC(l0).scale(152.63)}function l2(t,e){var n=o0(t),r=t===e?o4(t):(n-o0(e))/(e-t),i=n/r+t;if(1e-6>oZ(r))return l0;function o(t,e){var n=i-e,o=r*t;return[n*o4(o),i-n*o0(o)]}return o.invert=function(t,e){var n=i-e,o=oJ(t,oZ(n))*o6(n);return n*r<0&&(o-=oH*o6(t)*o6(n)),[o/r,i-o6(r)*o8(t*t+n*n)]},o}function l5(){return lL(l2).scale(131.154).center([0,13.9389])}lH.invert=lV(function(t){return 2*at(t/2)}),lY.invert=function(t,e){return[-e,2*oQ(o2(t))-oU]},lK.invert=lV(at),lQ.invert=lV(oQ),l0.invert=l0;var l3=lG(function(t){return(t=o7(t))&&t/o4(t)});function l4(){return lC(l3).scale(79.4188).clipAngle(179.999)}function l6(t,e){var n=o0(e),r=1+o0(t)*n;return[n*o4(t)/r,o4(e)/r]}function l8(){return lC(l6).scale(250).clipAngle(142)}function l9(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)))]}function l7(){return lC(l9).scale(175.295)}l3.invert=lV(function(t){return t}),l6.invert=lV(function(t){return 2*oQ(t)}),l9.invert=function(t,e){var n,r=e,i=25;do{var o=r*r,a=o*o;r-=n=(r*(1.007226+o*(.015085+a*(-.044475+.028874*o-.005916*a)))-e)/(1.007226+o*(.045255+a*(-.311325+.259866*o-.005916*11*a)))}while(oZ(n)>1e-6&&--i>0);return[t/(.8707+(o=r*r)*(-.131979+o*(-.013791+o*o*o*(.003971-.001529*o)))),r]};var st=o8(3)/2;function se(t,e){var n=at(st*o4(e)),r=n*n,i=r*r*r;return[t*o0(n)/(st*(1.340264+-.24331799999999998*r+i*(.0062510000000000005+.034164*r))),n*(1.340264+-.081106*r+i*(893e-6+.003796*r))]}function sn(){return lC(se).scale(177.158)}se.invert=function(t,e){for(var n=e,r=n*n,i=r*r*r,o,a,l=0;l<12&&(a=n*(1.340264+-.081106*r+i*(893e-6+.003796*r))-e,n-=o=a/(1.340264+-.24331799999999998*r+i*(.0062510000000000005+.034164*r)),i=(r=n*n)*r*r,!(1e-12>oZ(o)));++l);return[st*t*(1.340264+-.24331799999999998*r+i*(.0062510000000000005+.034164*r))/o0(n),at(o4(n)/st)]};function sr(){var t,e,n,r,i,o,a=lq(),l=lR().rotate([154,0]).center([-2,58.5]).parallels([55,65]),s=lR().rotate([157,0]).center([-3,19.9]).parallels([8,18]),u={point:function(t,e){o=[t,e]}};function c(t){var e=t[0],a=t[1];return o=null,n.point(e,a),o||(r.point(e,a),o)||(i.point(e,a),o)}function f(){return t=e=null,c}return c.invert=function(t){var e=a.scale(),n=a.translate(),r=(t[0]-n[0])/e,i=(t[1]-n[1])/e;return(i>=.12&&i<.234&&r>=-.425&&r<-.214?l:i>=.166&&i<.234&&r>=-.214&&r<-.115?s:a).invert(t)},c.stream=function(n){var r,i;return t&&e===n?t:(i=(r=[a.stream(e=n),l.stream(n),s.stream(n)]).length,t={point:function(t,e){for(var n=-1;++n<i;)r[n].point(t,e)},sphere:function(){for(var t=-1;++t<i;)r[t].sphere()},lineStart:function(){for(var t=-1;++t<i;)r[t].lineStart()},lineEnd:function(){for(var t=-1;++t<i;)r[t].lineEnd()},polygonStart:function(){for(var t=-1;++t<i;)r[t].polygonStart()},polygonEnd:function(){for(var t=-1;++t<i;)r[t].polygonEnd()}})},c.precision=function(t){return arguments.length?(a.precision(t),l.precision(t),s.precision(t),f()):a.precision()},c.scale=function(t){return arguments.length?(a.scale(t),l.scale(.35*t),s.scale(t),c.translate(a.translate())):a.scale()},c.translate=function(t){if(!arguments.length)return a.translate();var e=a.scale(),o=+t[0],c=+t[1];return n=a.translate(t).clipExtent([[o-.455*e,c-.238*e],[o+.455*e,c+.238*e]]).stream(u),r=l.translate([o-.307*e,c+.201*e]).clipExtent([[o-.425*e+1e-6,c+.12*e+1e-6],[o-.214*e-1e-6,c+.234*e-1e-6]]).stream(u),i=s.translate([o-.205*e,c+.212*e]).clipExtent([[o-.214*e+1e-6,c+.166*e+1e-6],[o-.115*e-1e-6,c+.234*e-1e-6]]).stream(u),f()},c.fitExtent=function(t,e){return lk(c,t,e)},c.fitSize=function(t,e){return lM(c,t,e)},c.fitWidth=function(t,e){return lS(c,t,e)},c.fitHeight=function(t,e){return l_(c,t,e)},c.scale(1070)}function si(){var t,e,n,r,i,o,a,l=1,s=0,u=0,c=1,f=1,p=0,h=null,d=1,y=1,g=lO({point:function(t,e){var n=b([t,e]);this.stream.point(n[0],n[1])}}),v=oD;function m(){return d=l*c,y=l*f,o=a=null,b}function b(n){var r=n[0]*d,i=n[1]*y;if(p){var o=i*t-r*e;r=r*t+i*e,i=o}return[r+s,i+u]}return b.invert=function(n){var r=n[0]-s,i=n[1]-u;if(p){var o=i*t+r*e;r=r*t-i*e,i=o}return[r/d,i/y]},b.stream=function(t){return o&&a===t?o:o=g(v(a=t))},b.postclip=function(t){return arguments.length?(v=t,h=n=r=i=null,m()):v},b.clipExtent=function(t){return arguments.length?(v=null==t?(h=n=r=i=null,oD):ld(h=+t[0][0],n=+t[0][1],r=+t[1][0],i=+t[1][1]),m()):null==h?null:[[h,n],[r,i]]},b.scale=function(t){return arguments.length?(l=+t,m()):l},b.translate=function(t){return arguments.length?(s=+t[0],u=+t[1],m()):[s,u]},b.angle=function(n){return arguments.length?(e=o4(p=n%360*oK),t=o0(p),m()):p*oX},b.reflectX=function(t){return arguments.length?(c=t?-1:1,m()):c<0},b.reflectY=function(t){return arguments.length?(f=t?-1:1,m()):f<0},b.fitExtent=function(t,e){return lk(b,t,e)},b.fitSize=function(t,e){return lM(b,t,e)},b.fitWidth=function(t,e){return lS(b,t,e)},b.fitHeight=function(t,e){return l_(b,t,e)},b}var so=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function sa(t){let{data:e}=t;if(Array.isArray(e))return Object.assign(Object.assign({},t),{data:{value:e}});let{type:n}=e;return"graticule10"===n?Object.assign(Object.assign({},t),{data:{value:[(function(){var t,e,n,r,i,o,a,l,s,u,c,f,p=10,h=10,d=90,y=360,g=2.5;function v(){return{type:"MultiLineString",coordinates:m()}}function m(){return a1(o1(r/d)*d,n,d).map(c).concat(a1(o1(l/y)*y,a,y).map(f)).concat(a1(o1(e/p)*p,t,p).filter(function(t){return oZ(t%d)>1e-6}).map(s)).concat(a1(o1(o/h)*h,i,h).filter(function(t){return oZ(t%y)>1e-6}).map(u))}return v.lines=function(){return m().map(function(t){return{type:"LineString",coordinates:t}})},v.outline=function(){return{type:"Polygon",coordinates:[c(r).concat(f(a).slice(1),c(n).reverse().slice(1),f(l).reverse().slice(1))]}},v.extent=function(t){return arguments.length?v.extentMajor(t).extentMinor(t):v.extentMinor()},v.extentMajor=function(t){return arguments.length?(r=+t[0][0],n=+t[1][0],l=+t[0][1],a=+t[1][1],r>n&&(t=r,r=n,n=t),l>a&&(t=l,l=a,a=t),v.precision(g)):[[r,l],[n,a]]},v.extentMinor=function(n){return arguments.length?(e=+n[0][0],t=+n[1][0],o=+n[0][1],i=+n[1][1],e>t&&(n=e,e=t,t=n),o>i&&(n=o,o=i,i=n),v.precision(g)):[[e,o],[t,i]]},v.step=function(t){return arguments.length?v.stepMajor(t).stepMinor(t):v.stepMinor()},v.stepMajor=function(t){return arguments.length?(d=+t[0],y=+t[1],v):[d,y]},v.stepMinor=function(t){return arguments.length?(p=+t[0],h=+t[1],v):[p,h]},v.precision=function(p){return arguments.length?(g=+p,s=a2(o,i,90),u=a5(e,t,g),c=a2(l,a,90),f=a5(r,n,g),v):g},v.extentMajor([[-180,-89.999999],[180,89.999999]]).extentMinor([[-180,-80.000001],[180,80.000001]])})()()]}}):"sphere"===n?Object.assign(Object.assign({},t),{sphere:!0,data:{value:[{type:"Sphere"}]}}):t}function sl(t){return"geoPath"===t.type}let ss=()=>t=>{let e;let{children:n,coordinate:r={}}=t;if(!Array.isArray(n))return[];let{type:i="equalEarth"}=r,o=so(r,["type"]),a=function(t){if("function"==typeof t)return t;let e=em[`geo${oR(t)}`];if(!e)throw Error(`Unknown coordinate: ${t}`);return e}(i),l=n.map(sa);return[Object.assign(Object.assign({},t),{type:"view",scale:{x:{type:"identity"},y:{type:"identity"}},axis:!1,coordinate:{type:function(){return[["custom",(t,n,r,i)=>{let s=a();!function(t,e,n,r){let{outline:i=(()=>{let t=e.filter(sl);if(t.find(t=>t.sphere))return{type:"Sphere"};return{type:"FeatureCollection",features:t.filter(t=>!t.sphere).flatMap(t=>t.data.value).flatMap(t=>(function(t){if(!t||!t.type)return null;let e={Point:"geometry",MultiPoint:"geometry",LineString:"geometry",MultiLineString:"geometry",Polygon:"geometry",MultiPolygon:"geometry",GeometryCollection:"geometry",Feature:"feature",FeatureCollection:"featureCollection"}[t.type];if(!e)return null;if("geometry"===e)return{type:"FeatureCollection",features:[{type:"Feature",properties:{},geometry:t}]};if("feature"===e)return{type:"FeatureCollection",features:[t]};if("featureCollection"===e)return t})(t).features)}})()}=r,{size:o="fitExtent"}=r;"fitExtent"===o?function(t,e,n){let{x:r,y:i,width:o,height:a}=n;t.fitExtent([[r,i],[o,a]],e)}(t,i,n):"fitWidth"===o?function(t,e,n){let{width:r,height:i}=n,[[o,a],[l,s]]=a0(t.fitWidth(r,e)).bounds(e),u=Math.ceil(s-a),c=Math.min(Math.ceil(l-o),u),f=t.scale()*(c-1)/c,[p,h]=t.translate();t.scale(f).translate([p,h+(i-u)/2]).precision(.2)}(t,i,n):void 0}(s,l,{x:t,y:n,width:r,height:i},o),!function(t,e){var n;for(let[r,i]of Object.entries(e))null===(n=t[r])||void 0===n||n.call(t,i)}(s,o),e=a0(s);let u=new oI({domain:[t,t+r]}),c=new oI({domain:[n,n+i]}),f=t=>{let e=s(t);if(!e)return[null,null];let[n,r]=e;return[u.map(n),c.map(r)]},p=t=>{if(!t)return null;let[e,n]=t,r=[u.invert(e),c.invert(n)];return s.invert(r)};return{transform:t=>f(t),untransform:t=>p(t)}}]]}},children:l.flatMap(t=>sl(t)?function(t){let{style:n,tooltip:r={}}=t;return Object.assign(Object.assign({},t),{type:"path",tooltip:nv(r,{title:"id",items:[{channel:"color"}]}),style:Object.assign(Object.assign({},n),{d:t=>e(t)||[]})})}(t):t)})]};ss.props={};var su=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let sc=()=>t=>{let{type:e,data:n,scale:r,encode:i,style:o,animate:a,key:l,state:s}=t;return[Object.assign(Object.assign({type:"geoView"},su(t,["type","data","scale","encode","style","animate","key","state"])),{children:[{type:"geoPath",key:`${l}-0`,data:{value:n},scale:r,encode:i,style:o,animate:a,state:s}]})]};function sf(){return{"composition.geoView":ss,"composition.geoPath":sc}}sc.props={};let sp=()=>[["cartesian"]];sp.props={};let sh=(t={})=>{var e,n;let r=Object.assign(Object.assign({},{startAngle:-Math.PI/2,endAngle:3*Math.PI/2,innerRadius:0,outerRadius:1}),t);return Object.assign(Object.assign({},r),(e=r.startAngle,n=r.endAngle,e%=2*Math.PI,n%=2*Math.PI,e<0&&(e=2*Math.PI+e),n<0&&(n=2*Math.PI+n),e>=n&&(n+=2*Math.PI),{startAngle:e,endAngle:n}))},sd=t=>{let{startAngle:e,endAngle:n,innerRadius:r,outerRadius:i}=sh(t);return[["translate",0,.5],["reflect.y"],["translate",0,-.5],["polar",e,n,r,i]]};sd.props={};let sy=()=>[["transpose"],["translate",.5,.5],["reflect.x"],["translate",-.5,-.5]];sy.props={transform:!0};let sg=(t={})=>Object.assign(Object.assign({},{startAngle:-Math.PI/2,endAngle:3*Math.PI/2,innerRadius:0,outerRadius:1}),t),sv=t=>{let{startAngle:e,endAngle:n,innerRadius:r,outerRadius:i}=sg(t);return[...sy(),...sd({startAngle:e,endAngle:n,innerRadius:r,outerRadius:i})]};sv.props={};let sm=()=>[["parallel",0,1,0,1]];sm.props={};let sb=({focusX:t=0,focusY:e=0,distortionX:n=2,distortionY:r=2,visual:i=!1})=>[["fisheye",t,e,n,r,i]];sb.props={transform:!0};let sx=(t={})=>Object.assign(Object.assign({},{startAngle:-Math.PI/2,endAngle:3*Math.PI/2,innerRadius:0,outerRadius:1}),t),sO=t=>{let{startAngle:e,endAngle:n,innerRadius:r,outerRadius:i}=sx(t);return[["transpose"],["translate",.5,.5],["reflect"],["translate",-.5,-.5],...sd({startAngle:e,endAngle:n,innerRadius:r,outerRadius:i})]};sO.props={};let sw=t=>{let{startAngle:e=-Math.PI/2,endAngle:n=3*Math.PI/2,innerRadius:r=0,outerRadius:i=1}=t;return[...sm(),...sd({startAngle:e,endAngle:n,innerRadius:r,outerRadius:i})]};sw.props={};let sE=({value:t})=>e=>e.map(()=>t);sE.props={};let sk=({value:t})=>e=>e.map(e=>e[t]);sk.props={};let sM=({value:t})=>e=>e.map(t);sM.props={};let sS=({value:t})=>()=>t;sS.props={};let s_=()=>(t,e)=>{let{encode:n}=e,{y1:r}=n;return void 0!==r?[t,e]:[t,nt({},e,{encode:{y1:nw(nk(t,0))}})]};s_.props={};let sP=()=>(t,e)=>{let{encode:n}=e,{x:r}=n;return void 0!==r?[t,e]:[t,nt({},e,{encode:{x:nw(nk(t,0))},scale:{x:{guide:null}}})]};function sj(t){return function(){return t}}sP.props={};let sA=Math.abs,sT=Math.atan2,sC=Math.cos,sN=Math.max,sL=Math.min,sI=Math.sin,sR=Math.sqrt,sD=Math.PI,sF=sD/2,sz=2*sD;function sB(t){return t>=1?sF:t<=-1?-sF:Math.asin(t)}let sW=Math.PI,s$=2*sW,sG=s$-1e-6;function sV(t){this._+=t[0];for(let e=1,n=t.length;e<n;++e)this._+=arguments[e]+t[e]}class sH{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==t?sV:function(t){let e=Math.floor(t);if(!(e>=0))throw Error(`invalid digits: ${t}`);if(e>15)return sV;let n=10**e;return function(t){this._+=t[0];for(let e=1,r=t.length;e<r;++e)this._+=Math.round(arguments[e]*n)/n+t[e]}}(t)}moveTo(t,e){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,e){this._append`L${this._x1=+t},${this._y1=+e}`}quadraticCurveTo(t,e,n,r){this._append`Q${+t},${+e},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(t,e,n,r,i,o){this._append`C${+t},${+e},${+n},${+r},${this._x1=+i},${this._y1=+o}`}arcTo(t,e,n,r,i){if(t=+t,e=+e,n=+n,r=+r,(i=+i)<0)throw Error(`negative radius: ${i}`);let o=this._x1,a=this._y1,l=n-t,s=r-e,u=o-t,c=a-e,f=u*u+c*c;if(null===this._x1)this._append`M${this._x1=t},${this._y1=e}`;else if(f>1e-6){if(Math.abs(c*l-s*u)>1e-6&&i){let p=n-o,h=r-a,d=l*l+s*s,y=Math.sqrt(d),g=Math.sqrt(f),v=i*Math.tan((sW-Math.acos((d+f-(p*p+h*h))/(2*y*g)))/2),m=v/g,b=v/y;Math.abs(m-1)>1e-6&&this._append`L${t+m*u},${e+m*c}`,this._append`A${i},${i},0,0,${+(c*p>u*h)},${this._x1=t+b*l},${this._y1=e+b*s}`}else this._append`L${this._x1=t},${this._y1=e}`}else;}arc(t,e,n,r,i,o){if(t=+t,e=+e,n=+n,o=!!o,n<0)throw Error(`negative radius: ${n}`);let a=n*Math.cos(r),l=n*Math.sin(r),s=t+a,u=e+l,c=1^o,f=o?r-i:i-r;null===this._x1?this._append`M${s},${u}`:(Math.abs(this._x1-s)>1e-6||Math.abs(this._y1-u)>1e-6)&&this._append`L${s},${u}`,n&&(f<0&&(f=f%s$+s$),f>sG?this._append`A${n},${n},0,1,${c},${t-a},${e-l}A${n},${n},0,1,${c},${this._x1=s},${this._y1=u}`:f>1e-6&&this._append`A${n},${n},0,${+(f>=sW)},${c},${this._x1=t+n*Math.cos(i)},${this._y1=e+n*Math.sin(i)}`)}rect(t,e,n,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}}function sU(){return new sH}function sq(t){let e=3;return t.digits=function(n){if(!arguments.length)return e;if(null==n)e=null;else{let t=Math.floor(n);if(!(t>=0))throw RangeError(`invalid digits: ${n}`);e=t}return t},()=>new sH(e)}function sY(t){return t.innerRadius}function sX(t){return t.outerRadius}function sK(t){return t.startAngle}function sZ(t){return t.endAngle}function sQ(t){return t&&t.padAngle}sU.prototype=sH.prototype;function sJ(t,e,n,r,i,o,a){var l=t-n,s=e-r,u=(a?o:-o)/sR(l*l+s*s),c=u*s,f=-u*l,p=t+c,h=e+f,d=n+c,y=r+f,g=(p+d)/2,v=(h+y)/2,m=d-p,b=y-h,x=m*m+b*b,O=i-o,w=p*y-d*h,E=(b<0?-1:1)*sR(sN(0,O*O*x-w*w)),k=(w*b-m*E)/x,M=(-w*m-b*E)/x,S=(w*b+m*E)/x,_=(-w*m+b*E)/x,P=k-g,j=M-v,A=S-g,T=_-v;return P*P+j*j>A*A+T*T&&(k=S,M=_),{cx:k,cy:M,x01:-c,y01:-f,x11:k*(i/O-1),y11:M*(i/O-1)}}function s0(){var t=sY,e=sX,n=sj(0),r=null,i=sK,o=sZ,a=sQ,l=null,s=sq(u);function u(){var u,c,f=+t.apply(this,arguments),p=+e.apply(this,arguments),h=i.apply(this,arguments)-sF,d=o.apply(this,arguments)-sF,y=sA(d-h),g=d>h;if(!l&&(l=u=s()),p<f&&(c=p,p=f,f=c),p>1e-12){if(y>sz-1e-12)l.moveTo(p*sC(h),p*sI(h)),l.arc(0,0,p,h,d,!g),f>1e-12&&(l.moveTo(f*sC(d),f*sI(d)),l.arc(0,0,f,d,h,g));else{var v,m,b=h,x=d,O=h,w=d,E=y,k=y,M=a.apply(this,arguments)/2,S=M>1e-12&&(r?+r.apply(this,arguments):sR(f*f+p*p)),_=sL(sA(p-f)/2,+n.apply(this,arguments)),P=_,j=_;if(S>1e-12){var A=sB(S/f*sI(M)),T=sB(S/p*sI(M));(E-=2*A)>1e-12?(A*=g?1:-1,O+=A,w-=A):(E=0,O=w=(h+d)/2),(k-=2*T)>1e-12?(T*=g?1:-1,b+=T,x-=T):(k=0,b=x=(h+d)/2)}var C=p*sC(b),N=p*sI(b),L=f*sC(w),I=f*sI(w);if(_>1e-12){var R,D=p*sC(x),F=p*sI(x),z=f*sC(O),B=f*sI(O);if(y<sD){if(R=function(t,e,n,r,i,o,a,l){var s=n-t,u=r-e,c=a-i,f=l-o,p=f*s-c*u;if(!(p*p<1e-12))return p=(c*(e-o)-f*(t-i))/p,[t+p*s,e+p*u]}(C,N,z,B,D,F,L,I)){var W,$=C-R[0],G=N-R[1],V=D-R[0],H=F-R[1],U=1/sI(((W=($*V+G*H)/(sR($*$+G*G)*sR(V*V+H*H)))>1?0:W<-1?sD:Math.acos(W))/2),q=sR(R[0]*R[0]+R[1]*R[1]);P=sL(_,(f-q)/(U-1)),j=sL(_,(p-q)/(U+1))}else P=j=0}}k>1e-12?j>1e-12?(v=sJ(z,B,C,N,p,j,g),m=sJ(D,F,L,I,p,j,g),l.moveTo(v.cx+v.x01,v.cy+v.y01),j<_?l.arc(v.cx,v.cy,j,sT(v.y01,v.x01),sT(m.y01,m.x01),!g):(l.arc(v.cx,v.cy,j,sT(v.y01,v.x01),sT(v.y11,v.x11),!g),l.arc(0,0,p,sT(v.cy+v.y11,v.cx+v.x11),sT(m.cy+m.y11,m.cx+m.x11),!g),l.arc(m.cx,m.cy,j,sT(m.y11,m.x11),sT(m.y01,m.x01),!g))):(l.moveTo(C,N),l.arc(0,0,p,b,x,!g)):l.moveTo(C,N),f>1e-12&&E>1e-12?P>1e-12?(v=sJ(L,I,D,F,f,-P,g),m=sJ(C,N,z,B,f,-P,g),l.lineTo(v.cx+v.x01,v.cy+v.y01),P<_?l.arc(v.cx,v.cy,P,sT(v.y01,v.x01),sT(m.y01,m.x01),!g):(l.arc(v.cx,v.cy,P,sT(v.y01,v.x01),sT(v.y11,v.x11),!g),l.arc(0,0,f,sT(v.cy+v.y11,v.cx+v.x11),sT(m.cy+m.y11,m.cx+m.x11),g),l.arc(m.cx,m.cy,P,sT(m.y11,m.x11),sT(m.y01,m.x01),!g))):l.arc(0,0,f,w,O,g):l.lineTo(L,I)}}else l.moveTo(0,0);if(l.closePath(),u)return l=null,u+""||null}return u.centroid=function(){var n=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,r=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-sD/2;return[sC(r)*n,sI(r)*n]},u.innerRadius=function(e){return arguments.length?(t="function"==typeof e?e:sj(+e),u):t},u.outerRadius=function(t){return arguments.length?(e="function"==typeof t?t:sj(+t),u):e},u.cornerRadius=function(t){return arguments.length?(n="function"==typeof t?t:sj(+t),u):n},u.padRadius=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:sj(+t),u):r},u.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:sj(+t),u):i},u.endAngle=function(t){return arguments.length?(o="function"==typeof t?t:sj(+t),u):o},u.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:sj(+t),u):a},u.context=function(t){return arguments.length?(l=null==t?null:t,u):l},u}function s1(t){let{transformations:e}=t.getOptions();return e.map(([t])=>t).filter(t=>"transpose"===t).length%2!=0}function s2(t){let{transformations:e}=t.getOptions();return e.some(([t])=>"polar"===t)}function s5(t){let{transformations:e}=t.getOptions();return e.some(([t])=>"reflect"===t)&&e.some(([t])=>t.startsWith("transpose"))}function s3(t){let{transformations:e}=t.getOptions();return e.some(([t])=>"helix"===t)}function s4(t){let{transformations:e}=t.getOptions();return e.some(([t])=>"parallel"===t)}function s6(t){let{transformations:e}=t.getOptions();return e.some(([t])=>"fisheye"===t)}function s8(t){return s3(t)||s2(t)}function s9(t){let{transformations:e}=t.getOptions(),[,,,n,r]=e.find(t=>"polar"===t[0]);return[+n,+r]}function s7(t,e=!0){let{transformations:n}=t.getOptions(),[,r,i]=n.find(t=>"polar"===t[0]);return e?[180*+r/Math.PI,180*+i/Math.PI]:[r,i]}var ut=n("420"),ue="undefined"!=typeof Float32Array?Float32Array:Array;function un(){var t=new ue(3);return ue!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function ur(t){var e=new ue(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function ui(t){return Math.hypot(t[0],t[1],t[2])}function uo(t,e,n){var r=new ue(3);return r[0]=t,r[1]=e,r[2]=n,r}function ua(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function ul(t,e,n,r){return t[0]=e,t[1]=n,t[2]=r,t}function us(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function uu(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}!Math.hypot&&(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)});function uc(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t}function uf(t,e){var n=e[0],r=e[1],i=e[2],o=n*n+r*r+i*i;return o>0&&(o=1/Math.sqrt(o)),t[0]=e[0]*o,t[1]=e[1]*o,t[2]=e[2]*o,t}function up(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function uh(t,e,n,r){var i=e[0],o=e[1],a=e[2];return t[0]=i+r*(n[0]-i),t[1]=o+r*(n[1]-o),t[2]=a+r*(n[2]-a),t}function ud(t,e,n){var r=e[0],i=e[1],o=e[2],a=n[3]*r+n[7]*i+n[11]*o+n[15];return a=a||1,t[0]=(n[0]*r+n[4]*i+n[8]*o+n[12])/a,t[1]=(n[1]*r+n[5]*i+n[9]*o+n[13])/a,t[2]=(n[2]*r+n[6]*i+n[10]*o+n[14])/a,t}function uy(t,e){var n=t[0],r=t[1],i=t[2],o=e[0],a=e[1],l=e[2];return Math.abs(n-o)<=1e-6*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(r-a)<=1e-6*Math.max(1,Math.abs(r),Math.abs(a))&&Math.abs(i-l)<=1e-6*Math.max(1,Math.abs(i),Math.abs(l))}var ug=function(t,e){return Math.hypot(e[0]-t[0],e[1]-t[1],e[2]-t[2])};function uv(){var t=new ue(16);return ue!=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 um(t){var e=new ue(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 ub(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 ux(t,e,n,r,i,o,a,l,s,u,c,f,p,h,d,y){var g=new ue(16);return g[0]=t,g[1]=e,g[2]=n,g[3]=r,g[4]=i,g[5]=o,g[6]=a,g[7]=l,g[8]=s,g[9]=u,g[10]=c,g[11]=f,g[12]=p,g[13]=h,g[14]=d,g[15]=y,g}function uO(t,e,n,r,i,o,a,l,s,u,c,f,p,h,d,y,g){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=o,t[5]=a,t[6]=l,t[7]=s,t[8]=u,t[9]=c,t[10]=f,t[11]=p,t[12]=h,t[13]=d,t[14]=y,t[15]=g,t}function uw(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 uE(t,e){if(t===e){var n=e[1],r=e[2],i=e[3],o=e[6],a=e[7],l=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]=o,t[11]=e[14],t[12]=i,t[13]=a,t[14]=l}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 uk(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],l=e[5],s=e[6],u=e[7],c=e[8],f=e[9],p=e[10],h=e[11],d=e[12],y=e[13],g=e[14],v=e[15],m=n*l-r*a,b=n*s-i*a,x=n*u-o*a,O=r*s-i*l,w=r*u-o*l,E=i*u-o*s,k=c*y-f*d,M=c*g-p*d,S=c*v-h*d,_=f*g-p*y,P=f*v-h*y,j=p*v-h*g,A=m*j-b*P+x*_+O*S-w*M+E*k;return A?(A=1/A,t[0]=(l*j-s*P+u*_)*A,t[1]=(i*P-r*j-o*_)*A,t[2]=(y*E-g*w+v*O)*A,t[3]=(p*w-f*E-h*O)*A,t[4]=(s*S-a*j-u*M)*A,t[5]=(n*j-i*S+o*M)*A,t[6]=(g*x-d*E-v*b)*A,t[7]=(c*E-p*x+h*b)*A,t[8]=(a*P-l*S+u*k)*A,t[9]=(r*S-n*P-o*k)*A,t[10]=(d*w-y*x+v*m)*A,t[11]=(f*x-c*w-h*m)*A,t[12]=(l*M-a*_-s*k)*A,t[13]=(n*_-r*M+i*k)*A,t[14]=(y*b-d*O-g*m)*A,t[15]=(c*O-f*b+p*m)*A,t):null}function uM(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],l=e[5],s=e[6],u=e[7],c=e[8],f=e[9],p=e[10],h=e[11],d=e[12],y=e[13],g=e[14],v=e[15];return t[0]=l*(p*v-h*g)-f*(s*v-u*g)+y*(s*h-u*p),t[1]=-(r*(p*v-h*g)-f*(i*v-o*g)+y*(i*h-o*p)),t[2]=r*(s*v-u*g)-l*(i*v-o*g)+y*(i*u-o*s),t[3]=-(r*(s*h-u*p)-l*(i*h-o*p)+f*(i*u-o*s)),t[4]=-(a*(p*v-h*g)-c*(s*v-u*g)+d*(s*h-u*p)),t[5]=n*(p*v-h*g)-c*(i*v-o*g)+d*(i*h-o*p),t[6]=-(n*(s*v-u*g)-a*(i*v-o*g)+d*(i*u-o*s)),t[7]=n*(s*h-u*p)-a*(i*h-o*p)+c*(i*u-o*s),t[8]=a*(f*v-h*y)-c*(l*v-u*y)+d*(l*h-u*f),t[9]=-(n*(f*v-h*y)-c*(r*v-o*y)+d*(r*h-o*f)),t[10]=n*(l*v-u*y)-a*(r*v-o*y)+d*(r*u-o*l),t[11]=-(n*(l*h-u*f)-a*(r*h-o*f)+c*(r*u-o*l)),t[12]=-(a*(f*g-p*y)-c*(l*g-s*y)+d*(l*p-s*f)),t[13]=n*(f*g-p*y)-c*(r*g-i*y)+d*(r*p-i*f),t[14]=-(n*(l*g-s*y)-a*(r*g-i*y)+d*(r*s-i*l)),t[15]=n*(l*p-s*f)-a*(r*p-i*f)+c*(r*s-i*l),t}function uS(t){var e=t[0],n=t[1],r=t[2],i=t[3],o=t[4],a=t[5],l=t[6],s=t[7],u=t[8],c=t[9],f=t[10],p=t[11],h=t[12],d=t[13],y=t[14],g=t[15];return(e*a-n*o)*(f*g-p*y)-(e*l-r*o)*(c*g-p*d)+(e*s-i*o)*(c*y-f*d)+(n*l-r*a)*(u*g-p*h)-(n*s-i*a)*(u*y-f*h)+(r*s-i*l)*(u*d-c*h)}function u_(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],l=e[4],s=e[5],u=e[6],c=e[7],f=e[8],p=e[9],h=e[10],d=e[11],y=e[12],g=e[13],v=e[14],m=e[15],b=n[0],x=n[1],O=n[2],w=n[3];return t[0]=b*r+x*l+O*f+w*y,t[1]=b*i+x*s+O*p+w*g,t[2]=b*o+x*u+O*h+w*v,t[3]=b*a+x*c+O*d+w*m,b=n[4],x=n[5],O=n[6],w=n[7],t[4]=b*r+x*l+O*f+w*y,t[5]=b*i+x*s+O*p+w*g,t[6]=b*o+x*u+O*h+w*v,t[7]=b*a+x*c+O*d+w*m,b=n[8],x=n[9],O=n[10],w=n[11],t[8]=b*r+x*l+O*f+w*y,t[9]=b*i+x*s+O*p+w*g,t[10]=b*o+x*u+O*h+w*v,t[11]=b*a+x*c+O*d+w*m,b=n[12],x=n[13],O=n[14],w=n[15],t[12]=b*r+x*l+O*f+w*y,t[13]=b*i+x*s+O*p+w*g,t[14]=b*o+x*u+O*h+w*v,t[15]=b*a+x*c+O*d+w*m,t}function uP(t,e,n){var r,i,o,a,l,s,u,c,f,p,h,d,y=n[0],g=n[1],v=n[2];return e===t?(t[12]=e[0]*y+e[4]*g+e[8]*v+e[12],t[13]=e[1]*y+e[5]*g+e[9]*v+e[13],t[14]=e[2]*y+e[6]*g+e[10]*v+e[14],t[15]=e[3]*y+e[7]*g+e[11]*v+e[15]):(r=e[0],i=e[1],o=e[2],a=e[3],l=e[4],s=e[5],u=e[6],c=e[7],f=e[8],p=e[9],h=e[10],d=e[11],t[0]=r,t[1]=i,t[2]=o,t[3]=a,t[4]=l,t[5]=s,t[6]=u,t[7]=c,t[8]=f,t[9]=p,t[10]=h,t[11]=d,t[12]=r*y+l*g+f*v+e[12],t[13]=i*y+s*g+p*v+e[13],t[14]=o*y+u*g+h*v+e[14],t[15]=a*y+c*g+d*v+e[15]),t}function uj(t,e,n){var r=n[0],i=n[1],o=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]*o,t[9]=e[9]*o,t[10]=e[10]*o,t[11]=e[11]*o,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function uA(t,e,n,r){var i,o,a,l,s,u,c,f,p,h,d,y,g,v,m,b,x,O,w,E,k,M,S,_,P=r[0],j=r[1],A=r[2],T=Math.hypot(P,j,A);return T<1e-6?null:(P*=T=1/T,j*=T,A*=T,i=Math.sin(n),a=1-(o=Math.cos(n)),l=e[0],s=e[1],u=e[2],c=e[3],f=e[4],p=e[5],h=e[6],d=e[7],y=e[8],g=e[9],v=e[10],m=e[11],b=P*P*a+o,x=j*P*a+A*i,O=A*P*a-j*i,w=P*j*a-A*i,E=j*j*a+o,k=A*j*a+P*i,M=P*A*a+j*i,S=j*A*a-P*i,_=A*A*a+o,t[0]=l*b+f*x+y*O,t[1]=s*b+p*x+g*O,t[2]=u*b+h*x+v*O,t[3]=c*b+d*x+m*O,t[4]=l*w+f*E+y*k,t[5]=s*w+p*E+g*k,t[6]=u*w+h*E+v*k,t[7]=c*w+d*E+m*k,t[8]=l*M+f*S+y*_,t[9]=s*M+p*S+g*_,t[10]=u*M+h*S+v*_,t[11]=c*M+d*S+m*_,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)}function uT(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[4],a=e[5],l=e[6],s=e[7],u=e[8],c=e[9],f=e[10],p=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]=o*i+u*r,t[5]=a*i+c*r,t[6]=l*i+f*r,t[7]=s*i+p*r,t[8]=u*i-o*r,t[9]=c*i-a*r,t[10]=f*i-l*r,t[11]=p*i-s*r,t}function uC(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[0],a=e[1],l=e[2],s=e[3],u=e[8],c=e[9],f=e[10],p=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]=o*i-u*r,t[1]=a*i-c*r,t[2]=l*i-f*r,t[3]=s*i-p*r,t[8]=o*r+u*i,t[9]=a*r+c*i,t[10]=l*r+f*i,t[11]=s*r+p*i,t}function uN(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[0],a=e[1],l=e[2],s=e[3],u=e[4],c=e[5],f=e[6],p=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]=o*i+u*r,t[1]=a*i+c*r,t[2]=l*i+f*r,t[3]=s*i+p*r,t[4]=u*i-o*r,t[5]=c*i-a*r,t[6]=f*i-l*r,t[7]=p*i-s*r,t}function uL(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 uI(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 uR(t,e,n){var r,i,o,a=n[0],l=n[1],s=n[2],u=Math.hypot(a,l,s);return u<1e-6?null:(a*=u=1/u,l*=u,s*=u,r=Math.sin(e),o=1-(i=Math.cos(e)),t[0]=a*a*o+i,t[1]=l*a*o+s*r,t[2]=s*a*o-l*r,t[3]=0,t[4]=a*l*o-s*r,t[5]=l*l*o+i,t[6]=s*l*o+a*r,t[7]=0,t[8]=a*s*o+l*r,t[9]=l*s*o-a*r,t[10]=s*s*o+i,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t)}function uD(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=r,t[6]=n,t[7]=0,t[8]=0,t[9]=-n,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function uF(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 uz(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 uB(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],l=r+r,s=i+i,u=o+o,c=r*l,f=r*s,p=r*u,h=i*s,d=i*u,y=o*u,g=a*l,v=a*s,m=a*u;return t[0]=1-(h+y),t[1]=f+m,t[2]=p-v,t[3]=0,t[4]=f-m,t[5]=1-(c+y),t[6]=d+g,t[7]=0,t[8]=p+v,t[9]=d-g,t[10]=1-(c+h),t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function uW(t,e){var n=new ue(3),r=-e[0],i=-e[1],o=-e[2],a=e[3],l=e[4],s=e[5],u=e[6],c=e[7],f=r*r+i*i+o*o+a*a;return f>0?(n[0]=(l*a+c*r+s*o-u*i)*2/f,n[1]=(s*a+c*i+u*r-l*o)*2/f,n[2]=(u*a+c*o+l*i-s*r)*2/f):(n[0]=(l*a+c*r+s*o-u*i)*2,n[1]=(s*a+c*i+u*r-l*o)*2,n[2]=(u*a+c*o+l*i-s*r)*2),uB(t,e,n),t}function u$(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t}function uG(t,e){var n=e[0],r=e[1],i=e[2],o=e[4],a=e[5],l=e[6],s=e[8],u=e[9],c=e[10];return t[0]=Math.hypot(n,r,i),t[1]=Math.hypot(o,a,l),t[2]=Math.hypot(s,u,c),t}function uV(t,e){var n=new ue(3);uG(n,e);var r=1/n[0],i=1/n[1],o=1/n[2],a=e[0]*r,l=e[1]*i,s=e[2]*o,u=e[4]*r,c=e[5]*i,f=e[6]*o,p=e[8]*r,h=e[9]*i,d=e[10]*o,y=a+c+d,g=0;return y>0?(g=2*Math.sqrt(y+1),t[3]=.25*g,t[0]=(f-h)/g,t[1]=(p-s)/g,t[2]=(l-u)/g):a>c&&a>d?(g=2*Math.sqrt(1+a-c-d),t[3]=(f-h)/g,t[0]=.25*g,t[1]=(l+u)/g,t[2]=(p+s)/g):c>d?(g=2*Math.sqrt(1+c-a-d),t[3]=(p-s)/g,t[0]=(l+u)/g,t[1]=.25*g,t[2]=(f+h)/g):(g=2*Math.sqrt(1+d-a-c),t[3]=(l-u)/g,t[0]=(p+s)/g,t[1]=(f+h)/g,t[2]=.25*g),t}function uH(t,e,n,r){var i=e[0],o=e[1],a=e[2],l=e[3],s=i+i,u=o+o,c=a+a,f=i*s,p=i*u,h=i*c,d=o*u,y=o*c,g=a*c,v=l*s,m=l*u,b=l*c,x=r[0],O=r[1],w=r[2];return t[0]=(1-(d+g))*x,t[1]=(p+b)*x,t[2]=(h-m)*x,t[3]=0,t[4]=(p-b)*O,t[5]=(1-(f+g))*O,t[6]=(y+v)*O,t[7]=0,t[8]=(h+m)*w,t[9]=(y-v)*w,t[10]=(1-(f+d))*w,t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function uU(t,e,n,r,i){var o=e[0],a=e[1],l=e[2],s=e[3],u=o+o,c=a+a,f=l+l,p=o*u,h=o*c,d=o*f,y=a*c,g=a*f,v=l*f,m=s*u,b=s*c,x=s*f,O=r[0],w=r[1],E=r[2],k=i[0],M=i[1],S=i[2],_=(1-(y+v))*O,P=(h+x)*O,j=(d-b)*O,A=(h-x)*w,T=(1-(p+v))*w,C=(g+m)*w,N=(d+b)*E,L=(g-m)*E,I=(1-(p+y))*E;return t[0]=_,t[1]=P,t[2]=j,t[3]=0,t[4]=A,t[5]=T,t[6]=C,t[7]=0,t[8]=N,t[9]=L,t[10]=I,t[11]=0,t[12]=n[0]+k-(_*k+A*M+N*S),t[13]=n[1]+M-(P*k+T*M+L*S),t[14]=n[2]+S-(j*k+C*M+I*S),t[15]=1,t}function uq(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n+n,l=r+r,s=i+i,u=n*a,c=r*a,f=r*l,p=i*a,h=i*l,d=i*s,y=o*a,g=o*l,v=o*s;return t[0]=1-f-d,t[1]=c+v,t[2]=p-g,t[3]=0,t[4]=c-v,t[5]=1-u-d,t[6]=h+y,t[7]=0,t[8]=p+g,t[9]=h-y,t[10]=1-u-f,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function uY(t,e,n,r,i,o,a){var l=1/(n-e),s=1/(i-r),u=1/(o-a);return t[0]=2*o*l,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*o*s,t[6]=0,t[7]=0,t[8]=(n+e)*l,t[9]=(i+r)*s,t[10]=(a+o)*u,t[11]=-1,t[12]=0,t[13]=0,t[14]=a*o*2*u,t[15]=0,t}function uX(t,e,n,r,i){var o,a=1/Math.tan(e/2);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,null!=i&&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}un();var uK=uX;function uZ(t,e,n,r,i){var o,a=1/Math.tan(e/2);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,null!=i&&i!==1/0?(o=1/(r-i),t[10]=i*o,t[14]=i*r*o):(t[10]=-1,t[14]=-r),t}function uQ(t,e,n,r){var i=Math.tan(e.upDegrees*Math.PI/180),o=Math.tan(e.downDegrees*Math.PI/180),a=Math.tan(e.leftDegrees*Math.PI/180),l=Math.tan(e.rightDegrees*Math.PI/180),s=2/(a+l),u=2/(i+o);return t[0]=s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=u,t[6]=0,t[7]=0,t[8]=-((a-l)*s*.5),t[9]=(i-o)*u*.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 uJ(t,e,n,r,i,o,a){var l=1/(e-n),s=1/(r-i),u=1/(o-a);return t[0]=-2*l,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*s,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*u,t[11]=0,t[12]=(e+n)*l,t[13]=(i+r)*s,t[14]=(a+o)*u,t[15]=1,t}var u0=uJ;function u1(t,e,n,r,i,o,a){var l=1/(e-n),s=1/(r-i),u=1/(o-a);return t[0]=-2*l,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*s,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=u,t[11]=0,t[12]=(e+n)*l,t[13]=(i+r)*s,t[14]=o*u,t[15]=1,t}function u2(t,e,n,r){var i,o,a,l,s,u,c,f,p,h,d=e[0],y=e[1],g=e[2],v=r[0],m=r[1],b=r[2],x=n[0],O=n[1],w=n[2];return 1e-6>Math.abs(d-x)&&1e-6>Math.abs(y-O)&&1e-6>Math.abs(g-w)?uw(t):(h=1/Math.hypot(c=d-x,f=y-O,p=g-w),c*=h,f*=h,p*=h,(h=Math.hypot(i=m*p-b*f,o=b*c-v*p,a=v*f-m*c))?(i*=h=1/h,o*=h,a*=h):(i=0,o=0,a=0),(h=Math.hypot(l=f*a-p*o,s=p*i-c*a,u=c*o-f*i))?(l*=h=1/h,s*=h,u*=h):(l=0,s=0,u=0),t[0]=i,t[1]=l,t[2]=c,t[3]=0,t[4]=o,t[5]=s,t[6]=f,t[7]=0,t[8]=a,t[9]=u,t[10]=p,t[11]=0,t[12]=-(i*d+o*y+a*g),t[13]=-(l*d+s*y+u*g),t[14]=-(c*d+f*y+p*g),t[15]=1,t)}function u5(t,e,n,r){var i=e[0],o=e[1],a=e[2],l=r[0],s=r[1],u=r[2],c=i-n[0],f=o-n[1],p=a-n[2],h=c*c+f*f+p*p;h>0&&(c*=h=1/Math.sqrt(h),f*=h,p*=h);var d=s*p-u*f,y=u*c-l*p,g=l*f-s*c;return(h=d*d+y*y+g*g)>0&&(d*=h=1/Math.sqrt(h),y*=h,g*=h),t[0]=d,t[1]=y,t[2]=g,t[3]=0,t[4]=f*g-p*y,t[5]=p*d-c*g,t[6]=c*y-f*d,t[7]=0,t[8]=c,t[9]=f,t[10]=p,t[11]=0,t[12]=i,t[13]=o,t[14]=a,t[15]=1,t}function u3(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 u4(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 u6(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 u8(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 u9(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 u7(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 ct(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 ce(t,e){var n=t[0],r=t[1],i=t[2],o=t[3],a=t[4],l=t[5],s=t[6],u=t[7],c=t[8],f=t[9],p=t[10],h=t[11],d=t[12],y=t[13],g=t[14],v=t[15],m=e[0],b=e[1],x=e[2],O=e[3],w=e[4],E=e[5],k=e[6],M=e[7],S=e[8],_=e[9],P=e[10],j=e[11],A=e[12],T=e[13],C=e[14],N=e[15];return Math.abs(n-m)<=1e-6*Math.max(1,Math.abs(n),Math.abs(m))&&Math.abs(r-b)<=1e-6*Math.max(1,Math.abs(r),Math.abs(b))&&Math.abs(i-x)<=1e-6*Math.max(1,Math.abs(i),Math.abs(x))&&Math.abs(o-O)<=1e-6*Math.max(1,Math.abs(o),Math.abs(O))&&Math.abs(a-w)<=1e-6*Math.max(1,Math.abs(a),Math.abs(w))&&Math.abs(l-E)<=1e-6*Math.max(1,Math.abs(l),Math.abs(E))&&Math.abs(s-k)<=1e-6*Math.max(1,Math.abs(s),Math.abs(k))&&Math.abs(u-M)<=1e-6*Math.max(1,Math.abs(u),Math.abs(M))&&Math.abs(c-S)<=1e-6*Math.max(1,Math.abs(c),Math.abs(S))&&Math.abs(f-_)<=1e-6*Math.max(1,Math.abs(f),Math.abs(_))&&Math.abs(p-P)<=1e-6*Math.max(1,Math.abs(p),Math.abs(P))&&Math.abs(h-j)<=1e-6*Math.max(1,Math.abs(h),Math.abs(j))&&Math.abs(d-A)<=1e-6*Math.max(1,Math.abs(d),Math.abs(A))&&Math.abs(y-T)<=1e-6*Math.max(1,Math.abs(y),Math.abs(T))&&Math.abs(g-C)<=1e-6*Math.max(1,Math.abs(g),Math.abs(C))&&Math.abs(v-N)<=1e-6*Math.max(1,Math.abs(v),Math.abs(N))}var cn=u_,cr=u8;function ci(){var t=new ue(9);return ue!=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 co(){var t=new ue(4);return ue!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0),t}function ca(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3];return t[0]=n[0]*r+n[4]*i+n[8]*o+n[12]*a,t[1]=n[1]*r+n[5]*i+n[9]*o+n[13]*a,t[2]=n[2]*r+n[6]*i+n[10]*o+n[14]*a,t[3]=n[3]*r+n[7]*i+n[11]*o+n[15]*a,t}function cl(){var t=new ue(4);return ue!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}function cs(t,e,n){var r=Math.sin(n*=.5);return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=Math.cos(n),t}function cu(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],l=n[0],s=n[1],u=n[2],c=n[3];return t[0]=r*c+a*l+i*u-o*s,t[1]=i*c+a*s+o*l-r*u,t[2]=o*c+a*u+r*s-i*l,t[3]=a*c-r*l-i*s-o*u,t}co();function cc(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n*n+r*r+i*i+o*o,l=a?1/a:0;return t[0]=-n*l,t[1]=-r*l,t[2]=-i*l,t[3]=o*l,t}function cf(t,e,n,r){var i=.5*Math.PI/180,o=Math.sin(e*=i),a=Math.cos(e),l=Math.sin(n*=i),s=Math.cos(n),u=Math.sin(r*=i),c=Math.cos(r);return t[0]=o*s*c-a*l*u,t[1]=a*l*c+o*s*u,t[2]=a*s*u-o*l*c,t[3]=a*s*c+o*l*u,t}var cp=function(t,e,n,r){var i=new ue(4);return i[0]=t,i[1]=e,i[2]=n,i[3]=r,i},ch=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t},cd=function(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n*n+r*r+i*i+o*o;return a>0&&(a=1/Math.sqrt(a)),t[0]=n*a,t[1]=r*a,t[2]=i*a,t[3]=o*a,t};un(),uo(1,0,0),uo(0,1,0),cl(),cl(),ci();l=new ue(2),ue!=Float32Array&&(l[0]=0,l[1]=0);var cy={}.toString,cg=function(t,e){return cy.call(t)==="[object "+e+"]"},cv=function(t){return cg(t,"Number")};function cm(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}var cb=function(t){return null==t},cx=function(t){return cg(t,"String")},cO=function(t,e,n){return t<e?e:t>n?n:t},cw={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0};function cE(t){return Array.isArray(t)&&t.every(function(t){var e=t[0].toLowerCase();return cw[e]===t.length-1&&"achlmqstvz".includes(e)})}function ck(t){return cE(t)&&t.every(function(t){var e=t[0];return e===e.toUpperCase()})}function cM(t){return ck(t)&&t.every(function(t){var e=t[0];return"ACLMQZ".includes(e)})}var cS={x1:0,y1:0,x2:0,y2:0,x:0,y:0,qx:null,qy:null};function c_(t){for(var e=t.pathValue[t.segmentStart],n=e.toLowerCase(),r=t.data;r.length>=cw[n]&&("m"===n&&r.length>2?(t.segments.push([e].concat(r.splice(0,2))),n="l",e="m"===e?"l":"L"):t.segments.push([e].concat(r.splice(0,cw[n]))),cw[n]););}function cP(t){return t>=48&&t<=57}function cj(t){var e,n=t.pathValue,r=t.max;for(;t.index<r&&(10===(e=n.charCodeAt(t.index))||13===e||8232===e||8233===e||32===e||9===e||11===e||12===e||160===e||e>=5760&&[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].includes(e));)t.index+=1}var cA=function(t){this.pathValue=t,this.segments=[],this.max=t.length,this.index=0,this.param=0,this.segmentStart=0,this.data=[],this.err=""};function cT(t){if(cM(t))return[].concat(t);for(var e=function(t){if(ck(t))return[].concat(t);var e=function(t){if(cE(t))return[].concat(t);var e=new cA(t);for(cj(e);e.index<e.max&&!e.err.length;)!function(t){var e=t.max,n=t.pathValue,r=t.index,i=n.charCodeAt(r),o=cw[n[r].toLowerCase()];if(t.segmentStart=r,!function(t){switch(32|t){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}}(i)){t.err='[path-util]: Invalid path value "'+n[r]+'" is not a path command';return}if(t.index+=1,cj(t),t.data=[],!o){c_(t);return}for(;;){for(var a,l=o;l>0;l-=1){if((32|i)==97&&(3===l||4===l))!function(t){var e=t.index,n=t.pathValue,r=n.charCodeAt(e);if(48===r){t.param=0,t.index+=1;return}if(49===r){t.param=1,t.index+=1;return}t.err='[path-util]: invalid Arc flag "'+n[e]+'", expecting 0 or 1 at index '+e}(t);else!function(t){var e,n=t.max,r=t.pathValue,i=t.index,o=i,a=!1,l=!1,s=!1,u=!1;if(o>=n){t.err="[path-util]: Invalid path value at index "+o+', "pathValue" is missing param';return}if((43===(e=r.charCodeAt(o))||45===e)&&(o+=1,e=r.charCodeAt(o)),!cP(e)&&46!==e){t.err="[path-util]: Invalid path value at index "+o+', "'+r[o]+'" is not a number';return}if(46!==e){if(a=48===e,o+=1,e=r.charCodeAt(o),a&&o<n&&e&&cP(e)){t.err="[path-util]: Invalid path value at index "+i+', "'+r[i]+'" illegal number';return}for(;o<n&&cP(r.charCodeAt(o));)o+=1,l=!0;e=r.charCodeAt(o)}if(46===e){for(u=!0,o+=1;cP(r.charCodeAt(o));)o+=1,s=!0;e=r.charCodeAt(o)}if(101===e||69===e){if(u&&!l&&!s){t.err="[path-util]: Invalid path value at index "+o+', "'+r[o]+'" invalid float exponent';return}if(o+=1,(43===(e=r.charCodeAt(o))||45===e)&&(o+=1),o<n&&cP(r.charCodeAt(o)))for(;o<n&&cP(r.charCodeAt(o));)o+=1;else{t.err="[path-util]: Invalid path value at index "+o+', "'+r[o]+'" invalid integer exponent';return}}t.index=o,t.param=+t.pathValue.slice(i,o)}(t);if(t.err.length)return;t.data.push(t.param),cj(t),t.index<e&&44===n.charCodeAt(t.index)&&(t.index+=1,cj(t))}if(t.index>=t.max)break;if(!((a=n.charCodeAt(t.index))>=48&&a<=57||43===a||45===a||46===a))break}c_(t)}(e);return e.err?e.err:e.segments}(t),n=0,r=0,i=0,o=0;return e.map(function(t){var e,a=t.slice(1).map(Number),l=t[0],s=l.toUpperCase();if("M"===l)return n=a[0],r=a[1],i=n,o=r,["M",n,r];if(l!==s)switch(s){case"A":e=[s,a[0],a[1],a[2],a[3],a[4],a[5]+n,a[6]+r];break;case"V":e=[s,a[0]+r];break;case"H":e=[s,a[0]+n];break;default:e=[s].concat(a.map(function(t,e){return t+(e%2?r:n)}))}else e=[s].concat(a);var u=e.length;switch(s){case"Z":n=i,r=o;break;case"H":n=e[1];break;case"V":r=e[1];break;default:n=e[u-2],r=e[u-1],"M"===s&&(i=n,o=r)}return e})}(t),n=on({},cS),r=0;r<e.length;r+=1){e[r]=function(t,e){var n=t[0],r=e.x1,i=e.y1,o=e.x2,a=e.y2,l=t.slice(1).map(Number),s=t;if(!"TQ".includes(n)&&(e.qx=null,e.qy=null),"H"===n)s=["L",t[1],i];else if("V"===n)s=["L",r,t[1]];else if("S"===n){var u=2*r-o,c=2*i-a;e.x1=u,e.y1=c,s=["C",u,c].concat(l)}else if("T"===n){var f=2*r-e.qx,p=2*i-e.qy;e.qx=f,e.qy=p,s=["Q",f,p].concat(l)}else if("Q"===n){var h=l[0],d=l[1];e.qx=h,e.qy=d}return s}(e[r],n);var i=e[r],o=i.length;n.x1=+i[o-2],n.y1=+i[o-1],n.x2=+i[o-4]||n.x1,n.y2=+i[o-3]||n.y1}return e}function cC(t,e,n){var r=t[0],i=t[1];return[r+(e[0]-r)*n,i+(e[1]-i)*n]}function cN(t,e,n,r,i){var o=cm([t,e],[n,r]),a={x:0,y:0};if("number"==typeof i){if(i<=0)a={x:t,y:e};else if(i>=o)a={x:n,y:r};else{var l=cC([t,e],[n,r],i/o);a={x:l[0],y:l[1]}}}return{length:o,point:a,min:{x:Math.min(t,n),y:Math.min(e,r)},max:{x:Math.max(t,n),y:Math.max(e,r)}}}function cL(t,e){var n=t.x,r=t.y,i=e.x,o=e.y,a=Math.sqrt((Math.pow(n,2)+Math.pow(r,2))*(Math.pow(i,2)+Math.pow(o,2)));return(n*o-r*i<0?-1:1)*Math.acos((n*i+r*o)/a)}function cI(t,e,n,r,i,o,a,l,s,u){var c,f=u.bbox,p=void 0===f||f,h=u.length,d=void 0===h||h,y=u.sampleSize,g=void 0===y?10:y,v="number"==typeof s,m=t,b=e,x=0,O=[m,b,0],w=[m,b],E=0,k={x:0,y:0},M=[{x:m,y:b}];v&&s<=0&&(k={x:m,y:b});for(var S=0;S<=g;S+=1){if(m=(c=function(t,e,n,r,i,o,a,l,s){var u=1-s;return{x:Math.pow(u,3)*t+3*Math.pow(u,2)*s*n+3*u*Math.pow(s,2)*i+Math.pow(s,3)*a,y:Math.pow(u,3)*e+3*Math.pow(u,2)*s*r+3*u*Math.pow(s,2)*o+Math.pow(s,3)*l}}(t,e,n,r,i,o,a,l,E=S/g)).x,b=c.y,p&&M.push({x:m,y:b}),d&&(x+=cm(w,[m,b])),w=[m,b],v&&x>=s&&s>O[2]){var _=(x-s)/(x-O[2]);k={x:w[0]*(1-_)+O[0]*_,y:w[1]*(1-_)+O[1]*_}}O=[m,b,x]}return v&&s>=x&&(k={x:a,y:l}),{length:x,point:k,min:{x:Math.min.apply(null,M.map(function(t){return t.x})),y:Math.min.apply(null,M.map(function(t){return t.y}))},max:{x:Math.max.apply(null,M.map(function(t){return t.x})),y:Math.max.apply(null,M.map(function(t){return t.y}))}}}function cR(t,e,n){for(var r,i,o,a,l,s,u,c,f,p=cT(t),h="number"==typeof e,d=[],y=0,g=0,v=0,m=0,b=[],x=[],O=0,w={x:0,y:0},E=w,k=w,M=w,S=0,_=0,P=p.length;_<P;_+=1)d=(u="M"===(c=(f=p[_])[0]))?d:[y,g].concat(f.slice(1)),u?(v=f[1],E=w={x:v,y:m=f[2]},O=0,h&&e<.001&&(M=w)):"L"===c?(O=(r=cN(d[0],d[1],d[2],d[3],(e||0)-S)).length,w=r.min,E=r.max,k=r.point):"A"===c?(O=(i=function(t,e,n,r,i,o,a,l,s,u,c){var f,p=c.bbox,h=void 0===p||p,d=c.length,y=void 0===d||d,g=c.sampleSize,v=void 0===g?30:g,m="number"==typeof u,b=t,x=e,O=0,w=[b,x,0],E=[b,x],k=0,M={x:0,y:0},S=[{x:b,y:x}];m&&u<=0&&(M={x:b,y:x});for(var _=0;_<=v;_+=1){if(b=(f=function(t,e,n,r,i,o,a,l,s,u){var c,f=Math.abs,p=Math.sin,h=Math.cos,d=Math.sqrt,y=Math.PI,g=f(n),v=f(r),m=y/180*((i%360+360)%360);if(t===l&&e===s)return{x:t,y:e};if(0===g||0===v)return cN(t,e,l,s,u).point;var b=(t-l)/2,x=(e-s)/2,O={x:h(m)*b+p(m)*x,y:-p(m)*b+h(m)*x},w=Math.pow(O.x,2)/Math.pow(g,2)+Math.pow(O.y,2)/Math.pow(v,2);w>1&&(g*=d(w),v*=d(w));var E=(Math.pow(g,2)*Math.pow(v,2)-Math.pow(g,2)*Math.pow(O.y,2)-Math.pow(v,2)*Math.pow(O.x,2))/(Math.pow(g,2)*Math.pow(O.y,2)+Math.pow(v,2)*Math.pow(O.x,2)),k=(o!==a?1:-1)*d(E=E<0?0:E),M={x:k*(g*O.y/v),y:k*(-(v*O.x)/g)},S={x:h(m)*M.x-p(m)*M.y+(t+l)/2,y:p(m)*M.x+h(m)*M.y+(e+s)/2},_={x:(O.x-M.x)/g,y:(O.y-M.y)/v},P=cL({x:1,y:0},_);var j=cL(_,{x:(-O.x-M.x)/g,y:(-O.y-M.y)/v});!a&&j>0?j-=2*y:a&&j<0&&(j+=2*y);var A=P+(j%=2*y)*u,T=g*h(A),C=v*p(A);return{x:h(m)*T-p(m)*C+S.x,y:p(m)*T+h(m)*C+S.y}}(t,e,n,r,i,o,a,l,s,k=_/v)).x,x=f.y,h&&S.push({x:b,y:x}),y&&(O+=cm(E,[b,x])),E=[b,x],m&&O>=u&&u>w[2]){var P=(O-u)/(O-w[2]);M={x:E[0]*(1-P)+w[0]*P,y:E[1]*(1-P)+w[1]*P}}w=[b,x,O]}return m&&u>=O&&(M={x:l,y:s}),{length:O,point:M,min:{x:Math.min.apply(null,S.map(function(t){return t.x})),y:Math.min.apply(null,S.map(function(t){return t.y}))},max:{x:Math.max.apply(null,S.map(function(t){return t.x})),y:Math.max.apply(null,S.map(function(t){return t.y}))}}}(d[0],d[1],d[2],d[3],d[4],d[5],d[6],d[7],d[8],(e||0)-S,n||{})).length,w=i.min,E=i.max,k=i.point):"C"===c?(O=(o=cI(d[0],d[1],d[2],d[3],d[4],d[5],d[6],d[7],(e||0)-S,n||{})).length,w=o.min,E=o.max,k=o.point):"Q"===c?(O=(a=function(t,e,n,r,i,o,a,l){var s,u=l.bbox,c=void 0===u||u,f=l.length,p=void 0===f||f,h=l.sampleSize,d=void 0===h?10:h,y="number"==typeof a,g=t,v=e,m=0,b=[g,v,0],x=[g,v],O=0,w={x:0,y:0},E=[{x:g,y:v}];y&&a<=0&&(w={x:g,y:v});for(var k=0;k<=d;k+=1){if(g=(s=function(t,e,n,r,i,o,a){var l=1-a;return{x:Math.pow(l,2)*t+2*l*a*n+Math.pow(a,2)*i,y:Math.pow(l,2)*e+2*l*a*r+Math.pow(a,2)*o}}(t,e,n,r,i,o,O=k/d)).x,v=s.y,c&&E.push({x:g,y:v}),p&&(m+=cm(x,[g,v])),x=[g,v],y&&m>=a&&a>b[2]){var M=(m-a)/(m-b[2]);w={x:x[0]*(1-M)+b[0]*M,y:x[1]*(1-M)+b[1]*M}}b=[g,v,m]}return y&&a>=m&&(w={x:i,y:o}),{length:m,point:w,min:{x:Math.min.apply(null,E.map(function(t){return t.x})),y:Math.min.apply(null,E.map(function(t){return t.y}))},max:{x:Math.max.apply(null,E.map(function(t){return t.x})),y:Math.max.apply(null,E.map(function(t){return t.y}))}}}(d[0],d[1],d[2],d[3],d[4],d[5],(e||0)-S,n||{})).length,w=a.min,E=a.max,k=a.point):"Z"===c&&(O=(l=cN((d=[y,g,v,m])[0],d[1],d[2],d[3],(e||0)-S)).length,w=l.min,E=l.max,k=l.point),h&&S<e&&S+O>=e&&(M=k),x.push(E),b.push(w),S+=O,y=(s="Z"!==c?f.slice(-2):[v,m])[0],g=s[1];return h&&e>=S&&(M={x:y,y:g}),{length:S,point:M,min:{x:Math.min.apply(null,b.map(function(t){return t.x})),y:Math.min.apply(null,b.map(function(t){return t.y}))},max:{x:Math.max.apply(null,x.map(function(t){return t.x})),y:Math.max.apply(null,x.map(function(t){return t.y}))}}}var cD=function(t){return Array.isArray?Array.isArray(t):cg(t,"Array")},cF=function(t){if(!!cD(t))return t.reduce(function(t,e){return Math.min(t,e)},t[0])},cz=function(t){if(!!cD(t))return t.reduce(function(t,e){return Math.max(t,e)},t[0])},cB=function(t,e){return(t%e+e)%e};function cW(t,e,n){return{x:t*Math.cos(n)-e*Math.sin(n),y:t*Math.sin(n)+e*Math.cos(n)}}var c$=function(t,e,n,r){return ou(ou([],cC([t,e],[n,r],.5),!0),[n,r,n,r],!1)};function cG(t,e){if(void 0===e&&(e=!1),cM(n=t)&&n.every(function(t){var e=t[0];return"MC".includes(e)})){var n,r,i,o=[].concat(t);return e?[o,[]]:o}for(var a=cT(t),l=on({},cS),s=[],u="",c=a.length,f=[],p=0;p<c;p+=1){a[p]&&(u=a[p][0]),s[p]=u;var h=function(t,e){var n,r,i,o,a,l,s,u,c,f=t[0],p=t.slice(1).map(Number),h=p[0],d=p[1],y=e.x1,g=e.y1,v=e.x,m=e.y;switch(!"TQ".includes(f)&&(e.qx=null,e.qy=null),f){case"M":e.x=h,e.y=d;break;case"A":return["C"].concat(function t(e,n,r,i,o,a,l,s,u,c){var f,p,h,d,y,g=e,v=n,m=r,b=i,x=s,O=u,w=120*Math.PI/180,E=Math.PI/180*(+o||0),k=[];if(c)p=c[0],h=c[1],d=c[2],y=c[3];else{g=(f=cW(g,v,-E)).x,v=f.y,x=(f=cW(x,O,-E)).x,O=f.y;var M=(g-x)/2,S=(v-O)/2,_=M*M/(m*m)+S*S/(b*b);_>1&&(m*=_=Math.sqrt(_),b*=_);var P=m*m,j=b*b,A=(a===l?-1:1)*Math.sqrt(Math.abs((P*j-P*S*S-j*M*M)/(P*S*S+j*M*M)));d=A*m*S/b+(g+x)/2,y=-(A*b)*M/m+(v+O)/2,p=Math.asin(((v-y)/b*1e9>>0)/1e9),h=Math.asin(((O-y)/b*1e9>>0)/1e9),p=g<d?Math.PI-p:p,h=x<d?Math.PI-h:h,p<0&&(p=2*Math.PI+p),h<0&&(h=2*Math.PI+h),l&&p>h&&(p-=2*Math.PI),!l&&h>p&&(h-=2*Math.PI)}var T=h-p;if(Math.abs(T)>w){var C=h,N=x,L=O;x=d+m*Math.cos(h=p+w*(l&&h>p?1:-1)),k=t(x,O=y+b*Math.sin(h),m,b,o,0,l,N,L,[h,C,d,y])}T=h-p;var I=Math.cos(p),R=Math.cos(h),D=Math.tan(T/4),F=4/3*m*D,z=4/3*b*D,B=[g,v],W=[g+F*Math.sin(p),v-z*I],$=[x+F*Math.sin(h),O-z*R],G=[x,O];if(W[0]=2*B[0]-W[0],W[1]=2*B[1]-W[1],c)return W.concat($,G,k);k=W.concat($,G,k);for(var V=[],H=0,U=k.length;H<U;H+=1)V[H]=H%2?cW(k[H-1],k[H],E).y:cW(k[H],k[H+1],E).x;return V}((c=[y,g].concat(p))[0],c[1],c[2],c[3],c[4],c[5],c[6],c[7],c[8],c[9]));case"Q":;return e.qx=h,e.qy=d,["C"].concat((n=(c=[y,g].concat(p))[0],r=c[1],i=c[2],o=c[3],a=c[4],l=c[5],s=1/3,u=2/3,[1/3*n+2/3*i,1/3*r+2/3*o,1/3*a+2/3*i,1/3*l+2/3*o,a,l]));case"L":return["C"].concat(c$(y,g,h,d));case"Z":if(y===v&&g===m)return["C",y,g,v,m,v,m];return["C"].concat(c$(y,g,v,m))}return t}(a[p],l);a[p]=h,!function(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)}}(a,s,p),c=a.length,"Z"===u&&f.push(p),i=(r=a[p]).length,l.x1=+r[i-2],l.y1=+r[i-1],l.x2=+r[i-4]||l.x1,l.y2=+r[i-3]||l.y1}return e?[a,f]:a}function cV(t){return t.map(function(t,e,n){var r,i,o,a,l,s,u,c,f,p,h,d,y,g=e&&n[e-1].slice(-2).concat(t.slice(1)),v=e?cI(g[0],g[1],g[2],g[3],g[4],g[5],g[6],g[7],g[8],{bbox:!1}).length:0;if(e){;y=v?(void 0===i&&(i=.5),o=(r=g).slice(0,2),a=r.slice(2,4),l=r.slice(4,6),s=r.slice(6,8),u=cC(o,a,i),c=cC(a,l,i),f=cC(l,s,i),p=cC(u,c,i),h=cC(c,f,i),d=cC(p,h,i),[["C"].concat(u,p,d),["C"].concat(h,f,s)]):[t,t]}else y=[t];return{s:t,ss:y,l:v}})}function cH(t){var e,n,r;return e=0,n=0,r=0,cG(t).map(function(t){if("M"===t[0])return e=t[1],n=t[2],0;var i,o,a,l,s,u,c,f,p,h=t.slice(1),d=h[0],y=h[1],g=h[2],v=h[3],m=h[4],b=h[5];return o=e,a=n,l=d,s=y,u=g,c=v,f=m,r=3*(((p=b)-a)*(l+u)-(f-o)*(s+c)+s*(o-u)-l*(a-c)+p*(u+o/3)-f*(c+a/3))/20,e=(i=t.slice(-2))[0],n=i[1],r}).reduce(function(t,e){return t+e},0)>=0}var cU=function(t){return cg(t,"Boolean")},cq=function(t){var e=typeof t;return null!==t&&"object"===e||"function"===e},cY=function(t){return void 0===t};function cX(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function cK(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function cZ(){}var cQ=1.4285714285714286,cJ="\\s*([+-]?\\d+)\\s*",c0="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",c1="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",c2=/^#([0-9a-f]{3,8})$/,c5=RegExp("^rgb\\("+[cJ,cJ,cJ]+"\\)$"),c3=RegExp("^rgb\\("+[c1,c1,c1]+"\\)$"),c4=RegExp("^rgba\\("+[cJ,cJ,cJ,c0]+"\\)$"),c6=RegExp("^rgba\\("+[c1,c1,c1,c0]+"\\)$"),c8=RegExp("^hsl\\("+[c0,c1,c1]+"\\)$"),c9=RegExp("^hsla\\("+[c0,c1,c1,c0]+"\\)$"),c7={aliceblue:0xf0f8ff,antiquewhite:0xfaebd7,aqua:65535,aquamarine:8388564,azure:0xf0ffff,beige:0xf5f5dc,bisque:0xffe4c4,black:0,blanchedalmond:0xffebcd,blue:255,blueviolet:9055202,brown:0xa52a2a,burlywood:0xdeb887,cadetblue:6266528,chartreuse:8388352,chocolate:0xd2691e,coral:0xff7f50,cornflowerblue:6591981,cornsilk:0xfff8dc,crimson:0xdc143c,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:0xb8860b,darkgray:0xa9a9a9,darkgreen:25600,darkgrey:0xa9a9a9,darkkhaki:0xbdb76b,darkmagenta:9109643,darkolivegreen:5597999,darkorange:0xff8c00,darkorchid:0x9932cc,darkred:9109504,darksalmon:0xe9967a,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:0xff1493,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:0xb22222,floralwhite:0xfffaf0,forestgreen:2263842,fuchsia:0xff00ff,gainsboro:0xdcdcdc,ghostwhite:0xf8f8ff,gold:0xffd700,goldenrod:0xdaa520,gray:8421504,green:32768,greenyellow:0xadff2f,grey:8421504,honeydew:0xf0fff0,hotpink:0xff69b4,indianred:0xcd5c5c,indigo:4915330,ivory:0xfffff0,khaki:0xf0e68c,lavender:0xe6e6fa,lavenderblush:0xfff0f5,lawngreen:8190976,lemonchiffon:0xfffacd,lightblue:0xadd8e6,lightcoral:0xf08080,lightcyan:0xe0ffff,lightgoldenrodyellow:0xfafad2,lightgray:0xd3d3d3,lightgreen:9498256,lightgrey:0xd3d3d3,lightpink:0xffb6c1,lightsalmon:0xffa07a,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:0xb0c4de,lightyellow:0xffffe0,lime:65280,limegreen:3329330,linen:0xfaf0e6,magenta:0xff00ff,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:0xba55d3,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:0xc71585,midnightblue:1644912,mintcream:0xf5fffa,mistyrose:0xffe4e1,moccasin:0xffe4b5,navajowhite:0xffdead,navy:128,oldlace:0xfdf5e6,olive:8421376,olivedrab:7048739,orange:0xffa500,orangered:0xff4500,orchid:0xda70d6,palegoldenrod:0xeee8aa,palegreen:0x98fb98,paleturquoise:0xafeeee,palevioletred:0xdb7093,papayawhip:0xffefd5,peachpuff:0xffdab9,peru:0xcd853f,pink:0xffc0cb,plum:0xdda0dd,powderblue:0xb0e0e6,purple:8388736,rebeccapurple:6697881,red:0xff0000,rosybrown:0xbc8f8f,royalblue:4286945,saddlebrown:9127187,salmon:0xfa8072,sandybrown:0xf4a460,seagreen:3050327,seashell:0xfff5ee,sienna:0xa0522d,silver:0xc0c0c0,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:0xfffafa,springgreen:65407,steelblue:4620980,tan:0xd2b48c,teal:32896,thistle:0xd8bfd8,tomato:0xff6347,turquoise:4251856,violet:0xee82ee,wheat:0xf5deb3,white:0xffffff,whitesmoke:0xf5f5f5,yellow:0xffff00,yellowgreen:0x9acd32};function ft(){return this.rgb().formatHex()}cX(cZ,fn,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:ft,formatHex:ft,formatHsl:function(){return fc(this).formatHsl()},formatRgb:fe,toString:fe});function fe(){return this.rgb().formatRgb()}function fn(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=c2.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?fr(e):3===n?new fo(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?fi(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?fi(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=c5.exec(t))?new fo(e[1],e[2],e[3],1):(e=c3.exec(t))?new fo(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=c4.exec(t))?fi(e[1],e[2],e[3],e[4]):(e=c6.exec(t))?fi(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=c8.exec(t))?fu(e[1],e[2]/100,e[3]/100,1):(e=c9.exec(t))?fu(e[1],e[2]/100,e[3]/100,e[4]):c7.hasOwnProperty(t)?fr(c7[t]):"transparent"===t?new fo(NaN,NaN,NaN,0):null}function fr(t){return new fo(t>>16&255,t>>8&255,255&t,1)}function fi(t,e,n,r){return r<=0&&(t=e=n=NaN),new fo(t,e,n,r)}function fo(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function fa(){return"#"+fs(this.r)+fs(this.g)+fs(this.b)}function fl(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function fs(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function fu(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new ff(t,e,n,r)}function fc(t){if(t instanceof ff)return new ff(t.h,t.s,t.l,t.opacity);if(!(t instanceof cZ)&&(t=fn(t)),!t)return new ff;if(t instanceof ff)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,l=o-i,s=(o+i)/2;return l?(a=e===o?(n-r)/l+(n<r)*6:n===o?(r-e)/l+2:(e-n)/l+4,l/=s<.5?o+i:2-o-i,a*=60):l=s>0&&s<1?0:a,new ff(a,l,s,t.opacity)}cX(fo,function(t,e,n,r){var i;return 1==arguments.length?(!((i=t)instanceof cZ)&&(i=fn(i)),i)?new fo((i=i.rgb()).r,i.g,i.b,i.opacity):new fo:new fo(t,e,n,null==r?1:r)},cK(cZ,{brighter:function(t){return t=null==t?cQ:Math.pow(cQ,t),new fo(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new fo(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return -.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:fa,formatHex:fa,formatRgb:fl,toString:fl}));function ff(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function fp(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}cX(ff,function(t,e,n,r){return 1==arguments.length?fc(t):new ff(t,e,n,null==r?1:r)},cK(cZ,{brighter:function(t){return t=null==t?cQ:Math.pow(cQ,t),new ff(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new ff(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new fo(fp(t>=240?t-240:t+120,i,r),fp(t,i,r),fp(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));function fh(t,e,n){return void 0===n&&(n=1e-5),Math.abs(t-e)<n}function fd(t,e,n,r){var i=t-n,o=e-r;return Math.sqrt(i*i+o*o)}function fy(t,e){var n=Math.min.apply(Math,ou([],ol(t),!1)),r=Math.min.apply(Math,ou([],ol(e),!1));return{x:n,y:r,width:Math.max.apply(Math,ou([],ol(t),!1))-n,height:Math.max.apply(Math,ou([],ol(e),!1))-r}}function fg(t,e,n,r,i,o){var a=-1,l=1/0,s=[n,r],u=20;o&&o>200&&(u=o/10);for(var c=1/u,f=c/10,p=0;p<=u;p++){var h=p*c,d=[i.apply(void 0,ou([],ol(t.concat([h])),!1)),i.apply(void 0,ou([],ol(e.concat([h])),!1))],y=fd(s[0],s[1],d[0],d[1]);y<l&&(a=h,l=y)}if(0===a)return{x:t[0],y:e[0]};if(1===a){var g=t.length;return{x:t[g-1],y:e[g-1]}}l=1/0;for(var p=0;p<32&&!(f<1e-4);p++){;var v=a-f,m=a+f,d=[i.apply(void 0,ou([],ol(t.concat([v])),!1)),i.apply(void 0,ou([],ol(e.concat([v])),!1))],y=fd(s[0],s[1],d[0],d[1]);if(v>=0&&y<l)a=v,l=y;else{var b=[i.apply(void 0,ou([],ol(t.concat([m])),!1)),i.apply(void 0,ou([],ol(e.concat([m])),!1))],x=fd(s[0],s[1],b[0],b[1]);m<=1&&x<l?(a=m,l=x):f*=.5}}return{x:i.apply(void 0,ou([],ol(t.concat([a])),!1)),y:i.apply(void 0,ou([],ol(e.concat([a])),!1))}}function fv(t,e,n,r){return fd(t,e,n,r)}function fm(t,e,n,r,i){return{x:(1-i)*t+i*n,y:(1-i)*e+i*r}}function fb(t,e,n,r,i){var o=1-i;return o*o*o*t+3*e*i*o*o+3*n*i*i*o+r*i*i*i}function fx(t,e,n,r){var i,o,a,l=-3*t+9*e-9*n+3*r,s=6*t-12*e+6*n,u=3*e-3*t,c=[];if(fh(l,0))!fh(s,0)&&(i=-u/s)>=0&&i<=1&&c.push(i);else{var f=s*s-4*l*u;fh(f,0)?c.push(-s/(2*l)):f>0&&(i=(-s+(a=Math.sqrt(f)))/(2*l),o=(-s-a)/(2*l),i>=0&&i<=1&&c.push(i),o>=0&&o<=1&&c.push(o))}return c}function fO(t,e,n,r,i,o,a,l,s,u,c){var f=fg([t,n,i,a],[e,r,o,l],s,u,fb,c);return fd(f.x,f.y,s,u)}function fw(t,e,n,r){var i=1-r;return i*i*t+2*r*i*e+r*r*n}function fE(t,e,n){var r=t+n-2*e;if(fh(r,0))return[.5];var i=(t-e)/r;return i<=1&&i>=0?[i]:[]}var fk="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:{},fM={exports:{}};s=fM,c=0,f=function(){function t(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function e(t,e){return t<e?-1:t>e?1:0}var n=function(t){void 0===t&&(t=9),this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};n.prototype.all=function(){return this._all(this.data,[])},n.prototype.search=function(t){var e=this.data,n=[];if(!f(t,e))return n;for(var r=this.toBBox,i=[];e;){for(var o=0;o<e.children.length;o++){var a=e.children[o],l=e.leaf?r(a):a;f(t,l)&&(e.leaf?n.push(a):c(t,l)?this._all(a,n):i.push(a))}e=i.pop()}return n},n.prototype.collides=function(t){var e=this.data;if(!f(t,e))return!1;for(var n=[];e;){for(var r=0;r<e.children.length;r++){var i=e.children[r],o=e.leaf?this.toBBox(i):i;if(f(t,o)){if(e.leaf||c(t,o))return!0;n.push(i)}}e=n.pop()}return!1},n.prototype.load=function(t){if(!(t&&t.length))return this;if(t.length<this._minEntries){for(var e=0;e<t.length;e++)this.insert(t[e]);return this}var n=this._build(t.slice(),0,t.length-1,0);if(this.data.children.length){if(this.data.height===n.height)this._splitRoot(this.data,n);else{if(this.data.height<n.height){var r=this.data;this.data=n,n=r}this._insert(n,this.data.height-n.height-1,!0)}}else this.data=n;return this},n.prototype.insert=function(t){return t&&this._insert(t,this.data.height-1),this},n.prototype.clear=function(){return this.data=p([]),this},n.prototype.remove=function(t,e){if(!t)return this;for(var n,r,i,o=this.data,a=this.toBBox(t),l=[],s=[];o||l.length;){if(!o&&(o=l.pop(),r=l[l.length-1],n=s.pop(),i=!0),o.leaf){var u=function(t,e,n){if(!n)return e.indexOf(t);for(var r=0;r<e.length;r++)if(n(t,e[r]))return r;return -1}(t,o.children,e);if(-1!==u){o.children.splice(u,1),l.push(o),this._condense(l);break}}!i&&!o.leaf&&c(o,a)?(l.push(o),s.push(n),n=0,r=o,o=o.children[0]):r?(n++,o=r.children[n],i=!1):o=null}return this},n.prototype.toBBox=function(t){return t},n.prototype.compareMinX=function(t,e){return t.minX-e.minX},n.prototype.compareMinY=function(t,e){return t.minY-e.minY},n.prototype.toJSON=function(){return this.data},n.prototype.fromJSON=function(t){return this.data=t,this},n.prototype._all=function(t,e){for(var n=[];t;)t.leaf?e.push.apply(e,t.children):n.push.apply(n,t.children),t=n.pop();return e},n.prototype._build=function(t,e,n,i){var o,a=n-e+1,l=this._maxEntries;if(a<=l)return r(o=p(t.slice(e,n+1)),this.toBBox),o;!i&&(i=Math.ceil(Math.log(a)/Math.log(l)),l=Math.ceil(a/Math.pow(l,i-1))),(o=p([])).leaf=!1,o.height=i;var s=Math.ceil(a/l),u=s*Math.ceil(Math.sqrt(l));h(t,e,n,u,this.compareMinX);for(var c=e;c<=n;c+=u){var f=Math.min(c+u-1,n);h(t,c,f,s,this.compareMinY);for(var d=c;d<=f;d+=s){var y=Math.min(d+s-1,f);o.children.push(this._build(t,d,y,i-1))}}return r(o,this.toBBox),o},n.prototype._chooseSubtree=function(t,e,n,r){for(;r.push(e),!e.leaf&&r.length-1!==n;){;for(var i=1/0,o=1/0,a=void 0,l=0;l<e.children.length;l++){var u=e.children[l],c=s(u),f=function(t,e){return(Math.max(e.maxX,t.maxX)-Math.min(e.minX,t.minX))*(Math.max(e.maxY,t.maxY)-Math.min(e.minY,t.minY))}(t,u)-c;f<o?(o=f,i=c<i?c:i,a=u):f===o&&c<i&&(i=c,a=u)}e=a||e.children[0]}return e},n.prototype._insert=function(t,e,n){var r=n?t:this.toBBox(t),i=[],a=this._chooseSubtree(r,this.data,e,i);for(a.children.push(t),o(a,r);e>=0;)if(i[e].children.length>this._maxEntries)this._split(i,e),e--;else break;this._adjustParentBBoxes(r,i,e)},n.prototype._split=function(t,e){var n=t[e],i=n.children.length,o=this._minEntries;this._chooseSplitAxis(n,o,i);var a=this._chooseSplitIndex(n,o,i),l=p(n.children.splice(a,n.children.length-a));l.height=n.height,l.leaf=n.leaf,r(n,this.toBBox),r(l,this.toBBox),e?t[e-1].children.push(l):this._splitRoot(n,l)},n.prototype._splitRoot=function(t,e){this.data=p([t,e]),this.data.height=t.height+1,this.data.leaf=!1,r(this.data,this.toBBox)},n.prototype._chooseSplitIndex=function(t,e,n){for(var r,o=1/0,a=1/0,l=e;l<=n-e;l++){var u=i(t,0,l,this.toBBox),c=i(t,l,n,this.toBBox),f=function(t,e){var n=Math.max(t.minX,e.minX),r=Math.max(t.minY,e.minY);return Math.max(0,Math.min(t.maxX,e.maxX)-n)*Math.max(0,Math.min(t.maxY,e.maxY)-r)}(u,c),p=s(u)+s(c);f<o?(o=f,r=l,a=p<a?p:a):f===o&&p<a&&(a=p,r=l)}return r||n-e},n.prototype._chooseSplitAxis=function(t,e,n){var r=t.leaf?this.compareMinX:a,i=t.leaf?this.compareMinY:l;this._allDistMargin(t,e,n,r)<this._allDistMargin(t,e,n,i)&&t.children.sort(r)},n.prototype._allDistMargin=function(t,e,n,r){t.children.sort(r);for(var a=this.toBBox,l=i(t,0,e,a),s=i(t,n-e,n,a),c=u(l)+u(s),f=e;f<n-e;f++){var p=t.children[f];o(l,t.leaf?a(p):p),c+=u(l)}for(var h=n-e-1;h>=e;h--){var d=t.children[h];o(s,t.leaf?a(d):d),c+=u(s)}return c},n.prototype._adjustParentBBoxes=function(t,e,n){for(var r=n;r>=0;r--)o(e[r],t)},n.prototype._condense=function(t){for(var e=t.length-1,n=void 0;e>=0;e--)0===t[e].children.length?e>0?(n=t[e-1].children).splice(n.indexOf(t[e]),1):this.clear():r(t[e],this.toBBox)};function r(t,e){i(t,0,t.children.length,e,t)}function i(t,e,n,r,i){!i&&(i=p(null)),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(var a=e;a<n;a++){var l=t.children[a];o(i,t.leaf?r(l):l)}return i}function o(t,e){return t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY),t}function a(t,e){return t.minX-e.minX}function l(t,e){return t.minY-e.minY}function s(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function u(t){return t.maxX-t.minX+(t.maxY-t.minY)}function c(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function f(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function p(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function h(n,r,i,o,a){for(var l=[r,i];l.length;){if(i=l.pop(),!(i-(r=l.pop())<=o)){var s,u,c,f,p,h=r+Math.ceil((i-r)/o/2)*o;s=n,u=h,c=r,f=i,p=a,function e(n,r,i,o,a){for(;o>i;){if(o-i>600){var l=o-i+1,s=r-i+1,u=Math.log(l),c=.5*Math.exp(2*u/3),f=.5*Math.sqrt(u*c*(l-c)/l)*(s-l/2<0?-1:1),p=Math.max(i,Math.floor(r-s*c/l+f)),h=Math.min(o,Math.floor(r+(l-s)*c/l+f));e(n,r,p,h,a)}var d=n[r],y=i,g=o;for(t(n,i,r),a(n[o],d)>0&&t(n,i,o);y<g;){for(t(n,y,g),y++,g--;0>a(n[y],d);)y++;for(;a(n[g],d)>0;)g--}0===a(n[i],d)?t(n,i,g):t(n,++g,o),g<=r&&(i=g+1),r<=g&&(o=g-1)}}(s,u,c||0,f||s.length-1,p||e),l.push(r,h,h,i)}}}return n},s.exports=f();var fS=fM.exports;(p=tX||(tX={})).GROUP="g",p.CIRCLE="circle",p.ELLIPSE="ellipse",p.IMAGE="image",p.RECT="rect",p.LINE="line",p.POLYLINE="polyline",p.POLYGON="polygon",p.TEXT="text",p.PATH="path",p.HTML="html",p.MESH="mesh",(h=tK||(tK={}))[h.ZERO=0]="ZERO",h[h.NEGATIVE_ONE=1]="NEGATIVE_ONE";var f_=function(){function t(){this.plugins=[]}return t.prototype.addRenderingPlugin=function(t){this.plugins.push(t),this.context.renderingPlugins.push(t)},t.prototype.removeAllRenderingPlugins=function(){var t=this;this.plugins.forEach(function(e){var n=t.context.renderingPlugins.indexOf(e);n>=0&&t.context.renderingPlugins.splice(n,1)})},t}(),fP=function(){function t(t){this.clipSpaceNearZ=tK.NEGATIVE_ONE,this.plugins=[],this.config=on({enableDirtyCheck:!0,enableCulling:!1,enableAutoRendering:!0,enableDirtyRectangleRendering:!0,enableDirtyRectangleRenderingDebug:!1,enableSizeAttenuation:!0},t)}return t.prototype.registerPlugin=function(t){-1===this.plugins.findIndex(function(e){return e===t})&&this.plugins.push(t)},t.prototype.unregisterPlugin=function(t){var e=this.plugins.findIndex(function(e){return e===t});e>-1&&this.plugins.splice(e,1)},t.prototype.getPlugins=function(){return this.plugins},t.prototype.getPlugin=function(t){return this.plugins.find(function(e){return e.name===t})},t.prototype.getConfig=function(){return this.config},t.prototype.setConfig=function(t){Object.assign(this.config,t)},t}();function fj(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function fA(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function fT(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function fC(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t}function fN(t){return void 0===t?0:t>360||t<-360?t%360:t}function fL(t,e,n){return(void 0===e&&(e=0),void 0===n&&(n=0),Array.isArray(t)&&3===t.length)?ur(t):cv(t)?uo(t,e,n):uo(t[0],t[1]||e,t[2]||n)}function fI(t){return Math.PI/180*t}function fR(t){return 180/Math.PI*t}function fD(t,e){var n,r,i,o,a,l,s,u,c,f,p,h,d,y,g,v,m,b,x,O,w;if(16===e.length){;return n=t,r=e,a=.5*Math.PI,s=(l=ol(uG(un(),r),3))[0],u=l[1],c=l[2],(f=Math.asin(-r[2]/s))<a?f>-a?(i=Math.atan2(r[6]/u,r[10]/c),o=Math.atan2(r[1]/s,r[0]/s)):(o=0,i=-Math.atan2(r[4]/u,r[5]/u)):(o=0,i=Math.atan2(r[4]/u,r[5]/u)),n[0]=i,n[1]=f,n[2]=o,n}return p=t,d=(h=e)[0],y=h[1],g=h[2],v=h[3],O=d*d+(m=y*y)+(b=g*g)+(x=v*v),(w=d*v-y*g)>.499995*O?(p[0]=Math.PI/2,p[1]=2*Math.atan2(y,d),p[2]=0):w<-.499995*O?(p[0]=-Math.PI/2,p[1]=2*Math.atan2(y,d),p[2]=0):(p[0]=Math.asin(2*(d*g-v*y)),p[1]=Math.atan2(2*(d*v+y*g),1-2*(b+x)),p[2]=Math.atan2(2*(d*y+g*v),1-2*(m+b))),p}function fF(t){var e=t[0],n=t[1],r=t[3],i=t[4],o=Math.sqrt(e*e+n*n),a=Math.sqrt(r*r+i*i);e*i-n*r<0&&(e<i?o=-o:a=-a),o&&(e*=1/o,n*=1/o),a&&(r*=1/a,i*=1/a);var l=fR(Math.atan2(n,e));return[t[6],t[7],o,a,l]}var fz=uv(),fB=uv(),fW=co(),f$=[un(),un(),un()],fG=un();function fV(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 fH=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(t){return!t||0===t.halfExtents[0]&&0===t.halfExtents[1]&&0===t.halfExtents[2]},t.prototype.update=function(t,e){fj(this.center,t),fj(this.halfExtents,e),fA(this.min,this.center,this.halfExtents),fT(this.max,this.center,this.halfExtents)},t.prototype.setMinMax=function(t,e){fT(this.center,e,t),fC(this.center,this.center,.5),fA(this.halfExtents,e,t),fC(this.halfExtents,this.halfExtents,.5),fj(this.min,t),fj(this.max,e)},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],o=n[2],a=this.halfExtents,l=a[0],s=a[1],u=a[2],c=r-l,f=r+l,p=i-s,h=i+s,d=o-u,y=o+u,g=e.center,v=g[0],m=g[1],b=g[2],x=e.halfExtents,O=x[0],w=x[1],E=x[2],k=v-O,M=v+O,S=m-w,_=m+w,P=b-E,j=b+E;k<c&&(c=k),M>f&&(f=M),S<p&&(p=S),_>h&&(h=_),P<d&&(d=P),j>y&&(y=j),n[0]=(c+f)*.5,n[1]=(p+h)*.5,n[2]=(d+y)*.5,a[0]=(f-c)*.5,a[1]=(h-p)*.5,a[2]=(y-d)*.5,this.min[0]=c,this.min[1]=p,this.min[2]=d,this.max[0]=f,this.max[1]=h,this.max[2]=y}},t.prototype.setFromTransformedAABB=function(t,e){var n=this.center,r=this.halfExtents,i=t.center,o=t.halfExtents,a=e[0],l=e[4],s=e[8],u=e[1],c=e[5],f=e[9],p=e[2],h=e[6],d=e[10],y=Math.abs(a),g=Math.abs(l),v=Math.abs(s),m=Math.abs(u),b=Math.abs(c),x=Math.abs(f),O=Math.abs(p),w=Math.abs(h),E=Math.abs(d);n[0]=e[12]+a*i[0]+l*i[1]+s*i[2],n[1]=e[13]+u*i[0]+c*i[1]+f*i[2],n[2]=e[14]+p*i[0]+h*i[1]+d*i[2],r[0]=y*o[0]+g*o[1]+v*o[2],r[1]=m*o[0]+b*o[1]+x*o[2],r[2]=O*o[0]+w*o[1]+E*o[2],fA(this.min,n,r),fT(this.max,n,r)},t.prototype.intersects=function(t){var e=this.getMax(),n=this.getMin(),r=t.getMax(),i=t.getMin();return n[0]<=r[0]&&e[0]>=i[0]&&n[1]<=r[1]&&e[1]>=i[1]&&n[2]<=r[2]&&e[2]>=i[2]},t.prototype.intersection=function(e){if(!this.intersects(e))return null;var n,r,i,o,a,l,s=new t;var u=(n=[0,0,0],r=this.getMin(),i=e.getMin(),n[0]=Math.max(r[0],i[0]),n[1]=Math.max(r[1],i[1]),n[2]=Math.max(r[2],i[2]),n);var c=(o=[0,0,0],a=this.getMax(),l=e.getMax(),o[0]=Math.min(a[0],l[0]),o[1]=Math.min(a[1],l[1]),o[2]=Math.min(a[2],l[2]),o);return s.setMinMax(u,c),s},t.prototype.getNegativeFarPoint=function(t){if(273===t.pnVertexFlag)return fj([0,0,0],this.min);if(272===t.pnVertexFlag)return[this.min[0],this.min[1],this.max[2]];if(257===t.pnVertexFlag)return[this.min[0],this.max[1],this.min[2]];else if(256===t.pnVertexFlag)return[this.min[0],this.max[1],this.max[2]];else if(17===t.pnVertexFlag)return[this.max[0],this.min[1],this.min[2]];else if(16===t.pnVertexFlag)return[this.max[0],this.min[1],this.max[2]];else if(1===t.pnVertexFlag)return[this.max[0],this.max[1],this.min[2]];else return[this.max[0],this.max[1],this.max[2]]},t.prototype.getPositiveFarPoint=function(t){if(273===t.pnVertexFlag)return fj([0,0,0],this.max);if(272===t.pnVertexFlag)return[this.max[0],this.max[1],this.min[2]];if(257===t.pnVertexFlag)return[this.max[0],this.min[1],this.max[2]];else if(256===t.pnVertexFlag)return[this.max[0],this.min[1],this.min[2]];else if(17===t.pnVertexFlag)return[this.min[0],this.max[1],this.max[2]];else if(16===t.pnVertexFlag)return[this.min[0],this.max[1],this.min[2]];else if(1===t.pnVertexFlag)return[this.min[0],this.min[1],this.max[2]];else return[this.min[0],this.min[1],this.min[2]]},t}(),fU=function(){function t(t,e){this.distance=t||0,this.normal=e||uo(0,1,0),this.updatePNVertexFlag()}return t.prototype.updatePNVertexFlag=function(){this.pnVertexFlag=(Number(this.normal[0]>=0)<<8)+(Number(this.normal[1]>=0)<<4)+Number(this.normal[2]>=0)},t.prototype.distanceToPoint=function(t){return up(t,this.normal)-this.distance},t.prototype.normalize=function(){var t=1/ui(this.normal);uc(this.normal,this.normal,t),this.distance*=t},t.prototype.intersectsLine=function(t,e,n){var r=this.distanceToPoint(t),i=r/(r-this.distanceToPoint(e)),o=i>=0&&i<=1;return o&&n&&uh(n,t,e,i),o},t}();(d=tZ||(tZ={}))[d.OUTSIDE=0xffffffff]="OUTSIDE",d[d.INSIDE=0]="INSIDE",d[d.INDETERMINATE=0x7fffffff]="INDETERMINATE";var fq=function(){function t(t){if(this.planes=[],t)this.planes=t;else for(var e=0;e<6;e++)this.planes.push(new fU)}return t.prototype.extractFromVPMatrix=function(t){var e=ol(t,16),n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],l=e[5],s=e[6],u=e[7],c=e[8],f=e[9],p=e[10],h=e[11],d=e[12],y=e[13],g=e[14],v=e[15];ul(this.planes[0].normal,o-n,u-a,h-c),this.planes[0].distance=v-d,ul(this.planes[1].normal,o+n,u+a,h+c),this.planes[1].distance=v+d,ul(this.planes[2].normal,o+r,u+l,h+f),this.planes[2].distance=v+y,ul(this.planes[3].normal,o-r,u-l,h-f),this.planes[3].distance=v-y,ul(this.planes[4].normal,o-i,u-s,h-p),this.planes[4].distance=v-g,ul(this.planes[5].normal,o+i,u+s,h+p),this.planes[5].distance=v+g,this.planes.forEach(function(t){t.normalize(),t.updatePNVertexFlag()})},t}(),fY=function(){function t(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.x=0,this.y=0,this.x=t,this.y=e}return t.prototype.clone=function(){return new t(this.x,this.y)},t.prototype.copyFrom=function(t){this.x=t.x,this.y=t.y},t}(),fX=function(){function t(t,e,n,r){this.x=t,this.y=e,this.width=n,this.height=r,this.left=t,this.right=t+n,this.top=e,this.bottom=e+r}return t.prototype.toJSON=function(){},t}(),fK="Method not implemented.",fZ="Use document.documentElement instead.";(y=tQ||(tQ={}))[y.ORBITING=0]="ORBITING",y[y.EXPLORING=1]="EXPLORING",y[y.TRACKING=2]="TRACKING",(g=tJ||(tJ={}))[g.DEFAULT=0]="DEFAULT",g[g.ROTATIONAL=1]="ROTATIONAL",g[g.TRANSLATIONAL=2]="TRANSLATIONAL",g[g.CINEMATIC=3]="CINEMATIC",(v=t0||(t0={}))[v.ORTHOGRAPHIC=0]="ORTHOGRAPHIC",v[v.PERSPECTIVE=1]="PERSPECTIVE";var fQ={UPDATED:"updated"},fJ=function(){function t(){this.clipSpaceNearZ=tK.NEGATIVE_ONE,this.eventEmitter=new ut,this.matrix=uv(),this.right=uo(1,0,0),this.up=uo(0,1,0),this.forward=uo(0,0,1),this.position=uo(0,0,1),this.focalPoint=uo(0,0,0),this.distanceVector=uo(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=uv(),this.projectionMatrixInverse=uv(),this.jitteredProjectionMatrix=void 0,this.enableUpdate=!0,this.type=tQ.EXPLORING,this.trackingMode=tJ.DEFAULT,this.projectionMode=t0.PERSPECTIVE,this.frustum=new fq,this.orthoMatrix=uv()}return t.prototype.isOrtho=function(){return this.projectionMode===t0.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(t){this.enableUpdate=t},t.prototype.setType=function(t,e){return this.type=t,this.type===tQ.EXPLORING?this.setWorldRotation(!0):this.setWorldRotation(!1),this._getAngles(),this.type===tQ.TRACKING&&void 0!==e&&this.setTrackingMode(e),this},t.prototype.setProjectionMode=function(t){return this.projectionMode=t,this},t.prototype.setTrackingMode=function(t){if(this.type!==tQ.TRACKING)throw Error("Impossible to set a tracking mode if the camera is not of tracking type");return this.trackingMode=t,this},t.prototype.setWorldRotation=function(t){return this.rotateWorld=t,this._getAngles(),this},t.prototype.getViewTransform=function(){return uk(uv(),this.matrix)},t.prototype.getWorldTransform=function(){return this.matrix},t.prototype.jitterProjectionMatrix=function(t,e){var n=uL(uv(),[t,e,0]);this.jitteredProjectionMatrix=u_(uv(),n,this.projectionMatrix)},t.prototype.clearJitterProjectionMatrix=function(){this.jitteredProjectionMatrix=void 0},t.prototype.setMatrix=function(t){return this.matrix=t,this._update(),this},t.prototype.setFov=function(t){return this.setPerspective(this.near,this.far,t,this.aspect),this},t.prototype.setAspect=function(t){return this.setPerspective(this.near,this.far,this.fov,t),this},t.prototype.setNear=function(t){return this.projectionMode===t0.PERSPECTIVE?this.setPerspective(t,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,t,this.far),this},t.prototype.setFar=function(t){return this.projectionMode===t0.PERSPECTIVE?this.setPerspective(this.near,t,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,t),this},t.prototype.setViewOffset=function(t,e,n,r,i,o){return this.aspect=t/e,void 0===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=e,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=o,this.projectionMode===t0.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 void 0!==this.view&&(this.view.enabled=!1),this.projectionMode===t0.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(t){return this.zoom=t,this.projectionMode===t0.ORTHOGRAPHIC?this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far):this.projectionMode===t0.PERSPECTIVE&&this.setPerspective(this.near,this.far,this.fov,this.aspect),this},t.prototype.setZoomByViewportPoint=function(t,e){var n=this.canvas.viewport2Canvas({x:e[0],y:e[1]}),r=n.x,i=n.y,o=this.roll;this.rotate(0,0,-o),this.setPosition(r,i),this.setFocalPoint(r,i),this.setZoom(t),this.rotate(0,0,o);var a=this.canvas.viewport2Canvas({x:e[0],y:e[1]}),l=uo(a.x-r,a.y-i,0),s=up(l,this.right)/ui(this.right),u=up(l,this.up)/ui(this.up);return this.pan(-s,-u),this},t.prototype.setPerspective=function(t,e,n,r){this.projectionMode=t0.PERSPECTIVE,this.fov=n,this.near=t,this.far=e,this.aspect=r;var i,o,a,l,s,u,c,f,p,h,d,y=this.near*Math.tan(fI(.5*this.fov))/this.zoom,g=2*y,v=this.aspect*g,m=-.5*v;if(null===(d=this.view)||void 0===d?void 0:d.enabled){var b=this.view.fullWidth,x=this.view.fullHeight;m+=this.view.offsetX*v/b,y-=this.view.offsetY*g/x,v*=this.view.width/b,g*=this.view.height/x}return i=this.projectionMatrix,o=m,a=m+v,l=y,s=y-g,u=t,c=this.far,f=this.clipSpaceNearZ===tK.ZERO,f?(p=-c/(c-u),h=-c*u/(c-u)):(p=-(c+u)/(c-u),h=-2*c*u/(c-u)),i[0]=2*u/(a-o),i[1]=0,i[2]=0,i[3]=0,i[4]=0,i[5]=2*u/(l-s),i[6]=0,i[7]=0,i[8]=(a+o)/(a-o),i[9]=(l+s)/(l-s),i[10]=p,i[11]=-1,i[12]=0,i[13]=0,i[14]=h,i[15]=0,uj(this.projectionMatrix,this.projectionMatrix,uo(1,-1,1)),uk(this.projectionMatrixInverse,this.projectionMatrix),this.triggerUpdate(),this},t.prototype.setOrthographic=function(t,e,n,r,i,o){this.projectionMode=t0.ORTHOGRAPHIC,this.rright=e,this.left=t,this.top=n,this.bottom=r,this.near=i,this.far=o;var a,l=(this.rright-this.left)/(2*this.zoom),s=(this.top-this.bottom)/(2*this.zoom),u=(this.rright+this.left)/2,c=(this.top+this.bottom)/2,f=u-l,p=u+l,h=c+s,d=c-s;if(null===(a=this.view)||void 0===a?void 0:a.enabled){var y=(this.rright-this.left)/this.view.fullWidth/this.zoom,g=(this.top-this.bottom)/this.view.fullHeight/this.zoom;f+=y*this.view.offsetX,p=f+y*this.view.width,h-=g*this.view.offsetY,d=h-g*this.view.height}return this.clipSpaceNearZ===tK.NEGATIVE_ONE?u0(this.projectionMatrix,f,p,d,h,i,o):u1(this.projectionMatrix,f,p,d,h,i,o),uj(this.projectionMatrix,this.projectionMatrix,uo(1,-1,1)),uk(this.projectionMatrixInverse,this.projectionMatrix),this._getOrthoMatrix(),this.triggerUpdate(),this},t.prototype.setPosition=function(t,e,n){void 0===e&&(e=this.position[1]),void 0===n&&(n=this.position[2]);var r=fL(t,e,n);return this._setPosition(r),this.setFocalPoint(this.focalPoint),this.triggerUpdate(),this},t.prototype.setFocalPoint=function(t,e,n){void 0===e&&(e=this.focalPoint[1]),void 0===n&&(n=this.focalPoint[2]);var r=uo(0,1,0);if(this.focalPoint=fL(t,e,n),this.trackingMode===tJ.CINEMATIC){var i=uu(un(),this.focalPoint,this.position);t=i[0],e=i[1],n=i[2];var o=fR(Math.asin(e/ui(i))),a=90+fR(Math.atan2(n,t)),l=uv();uC(l,l,fI(a)),uT(l,l,fI(o)),r=ud(un(),[0,1,0],l)}return uk(this.matrix,u2(uv(),this.position,this.focalPoint,r)),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(t){if(this.distance===t||t<0)return this;this.distance=t,this.distance<2e-4&&(this.distance=2e-4),this.dollyingStep=this.distance/100;var e=un();t=this.distance;var n=this.forward,r=this.focalPoint;return e[0]=t*n[0]+r[0],e[1]=t*n[1]+r[1],e[2]=t*n[2]+r[2],this._setPosition(e),this.triggerUpdate(),this},t.prototype.setMaxDistance=function(t){return this.maxDistance=t,this},t.prototype.setMinDistance=function(t){return this.minDistance=t,this},t.prototype.setAzimuth=function(t){return this.azimuth=fN(t),this.computeMatrix(),this._getAxes(),this.type===tQ.ORBITING||this.type===tQ.EXPLORING?this._getPosition():this.type===tQ.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},t.prototype.getAzimuth=function(){return this.azimuth},t.prototype.setElevation=function(t){return this.elevation=fN(t),this.computeMatrix(),this._getAxes(),this.type===tQ.ORBITING||this.type===tQ.EXPLORING?this._getPosition():this.type===tQ.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},t.prototype.getElevation=function(){return this.elevation},t.prototype.setRoll=function(t){return this.roll=fN(t),this.computeMatrix(),this._getAxes(),this.type===tQ.ORBITING||this.type===tQ.EXPLORING?this._getPosition():this.type===tQ.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 t=cs(cl(),[0,0,1],fI(this.roll));uw(this.matrix);var e=cs(cl(),[1,0,0],fI((this.rotateWorld&&this.type!==tQ.TRACKING||this.type===tQ.TRACKING?1:-1)*this.elevation)),n=cs(cl(),[0,1,0],fI((this.rotateWorld&&this.type!==tQ.TRACKING||this.type===tQ.TRACKING?1:-1)*this.azimuth)),r=cu(cl(),n,e);r=cu(cl(),r,t);var i=uq(uv(),r);this.type===tQ.ORBITING||this.type===tQ.EXPLORING?(uP(this.matrix,this.matrix,this.focalPoint),u_(this.matrix,this.matrix,i),uP(this.matrix,this.matrix,[0,0,this.distance])):this.type===tQ.TRACKING&&(uP(this.matrix,this.matrix,this.position),u_(this.matrix,this.matrix,i))},t.prototype._setPosition=function(t,e,n){this.position=fL(t,e,n);var r=this.matrix;r[12]=this.position[0],r[13]=this.position[1],r[14]=this.position[2],r[15]=1,this._getOrthoMatrix()},t.prototype._getAxes=function(){ua(this.right,fL(ca(co(),[1,0,0,0],this.matrix))),ua(this.up,fL(ca(co(),[0,1,0,0],this.matrix))),ua(this.forward,fL(ca(co(),[0,0,1,0],this.matrix))),uf(this.right,this.right),uf(this.up,this.up),uf(this.forward,this.forward)},t.prototype._getAngles=function(){var t=this.distanceVector[0],e=this.distanceVector[1],n=this.distanceVector[2],r=ui(this.distanceVector);if(0===r){this.elevation=0,this.azimuth=0;return}this.type===tQ.TRACKING?(this.elevation=fR(Math.asin(e/r)),this.azimuth=fR(Math.atan2(-t,-n))):this.rotateWorld?(this.elevation=fR(Math.asin(e/r)),this.azimuth=fR(Math.atan2(-t,-n))):(this.elevation=-fR(Math.asin(e/r)),this.azimuth=-fR(Math.atan2(-t,-n)))},t.prototype._getPosition=function(){ua(this.position,fL(ca(co(),[0,0,0,1],this.matrix))),this._getDistance()},t.prototype._getFocalPoint=function(){var t,e,n,r,i,o,a,l;n=this.distanceVector,r=[0,0,-this.distance],i=(t=ci(),e=this.matrix,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),o=r[0],a=r[1],l=r[2],n[0]=o*i[0]+a*i[3]+l*i[6],n[1]=o*i[1]+a*i[4]+l*i[7],n[2]=o*i[2]+a*i[5]+l*i[8],us(this.focalPoint,this.position,this.distanceVector),this._getDistance()},t.prototype._getDistance=function(){this.distanceVector=uu(un(),this.focalPoint,this.position),this.distance=ui(this.distanceVector),this.dollyingStep=this.distance/100},t.prototype._getOrthoMatrix=function(){if(this.projectionMode===t0.ORTHOGRAPHIC){var t=this.position,e=cs(cl(),[0,0,1],-this.roll*Math.PI/180);uU(this.orthoMatrix,e,uo((this.rright-this.left)/2-t[0],(this.top-this.bottom)/2-t[1],0),uo(this.zoom,this.zoom,1),t)}},t.prototype.triggerUpdate=function(){if(this.enableUpdate){var t=this.getViewTransform(),e=u_(uv(),this.getPerspective(),t);this.getFrustum().extractFromVPMatrix(e),this.eventEmitter.emit(fQ.UPDATED)}},t.prototype.rotate=function(t,e,n){throw Error(fK)},t.prototype.pan=function(t,e){throw Error(fK)},t.prototype.dolly=function(t){throw Error(fK)},t.prototype.createLandmark=function(t,e){throw Error(fK)},t.prototype.gotoLandmark=function(t,e){throw Error(fK)},t.prototype.cancelLandmarkAnimation=function(){throw Error(fK)},t}();function f0(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw TypeError("Expected a function");var n=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var o=e?e.apply(this,r):r[0],a=n.cache;if(a.has(o))return a.get(o);var l=t.apply(this,r);return n.cache=a.set(o,l)||a,l};return n.cache=new(f0.Cache||Map),n}f0.Cache=Map,(m=t1||(t1={}))[m.kUnknown=0]="kUnknown",m[m.kNumber=1]="kNumber",m[m.kPercentage=2]="kPercentage",m[m.kEms=3]="kEms",m[m.kPixels=4]="kPixels",m[m.kRems=5]="kRems",m[m.kDegrees=6]="kDegrees",m[m.kRadians=7]="kRadians",m[m.kGradians=8]="kGradians",m[m.kTurns=9]="kTurns",m[m.kMilliseconds=10]="kMilliseconds",m[m.kSeconds=11]="kSeconds",m[m.kInteger=12]="kInteger",(b=t2||(t2={}))[b.kUNumber=0]="kUNumber",b[b.kUPercent=1]="kUPercent",b[b.kULength=2]="kULength",b[b.kUAngle=3]="kUAngle",b[b.kUTime=4]="kUTime",b[b.kUOther=5]="kUOther",(x=t5||(t5={}))[x.kAll=0]="kAll",x[x.kNonNegative=1]="kNonNegative",x[x.kInteger=2]="kInteger",x[x.kNonNegativeInteger=3]="kNonNegativeInteger",x[x.kPositiveInteger=4]="kPositiveInteger",(O=t3||(t3={}))[O.kYes=0]="kYes",O[O.kNo=1]="kNo",(w=t4||(t4={}))[w.kYes=0]="kYes",w[w.kNo=1]="kNo";var f1=[{name:"em",unit_type:t1.kEms},{name:"px",unit_type:t1.kPixels},{name:"deg",unit_type:t1.kDegrees},{name:"rad",unit_type:t1.kRadians},{name:"grad",unit_type:t1.kGradians},{name:"ms",unit_type:t1.kMilliseconds},{name:"s",unit_type:t1.kSeconds},{name:"rem",unit_type:t1.kRems},{name:"turn",unit_type:t1.kTurns}];(E=t6||(t6={}))[E.kUnknownType=0]="kUnknownType",E[E.kUnparsedType=1]="kUnparsedType",E[E.kKeywordType=2]="kKeywordType",E[E.kUnitType=3]="kUnitType",E[E.kSumType=4]="kSumType",E[E.kProductType=5]="kProductType",E[E.kNegateType=6]="kNegateType",E[E.kInvertType=7]="kInvertType",E[E.kMinType=8]="kMinType",E[E.kMaxType=9]="kMaxType",E[E.kClampType=10]="kClampType",E[E.kTransformType=11]="kTransformType",E[E.kPositionType=12]="kPositionType",E[E.kURLImageType=13]="kURLImageType",E[E.kColorType=14]="kColorType",E[E.kUnsupportedColorType=15]="kUnsupportedColorType";var f2=function(t){var e;if(!t)return t1.kUnknown;if("number"===t)return t1.kNumber;if("percent"===t||"%"===t)return t1.kPercentage;return e=t,f1.find(function(t){return t.name===e}).unit_type},f5=function(t){switch(t){case t1.kNumber:case t1.kInteger:return t2.kUNumber;case t1.kPercentage:return t2.kUPercent;case t1.kPixels:return t2.kULength;case t1.kMilliseconds:case t1.kSeconds:return t2.kUTime;case t1.kDegrees:case t1.kRadians:case t1.kGradians:case t1.kTurns:return t2.kUAngle;default:return t2.kUOther}},f3=function(t){switch(t){case t2.kUNumber:return t1.kNumber;case t2.kULength:return t1.kPixels;case t2.kUPercent:return t1.kPercentage;case t2.kUTime:return t1.kSeconds;case t2.kUAngle:return t1.kDegrees;default:return t1.kUnknown}},f4=function(t){var e=1;switch(t){case t1.kPixels:case t1.kDegrees:case t1.kSeconds:break;case t1.kMilliseconds:e=.001;break;case t1.kRadians:e=180/Math.PI;break;case t1.kGradians:e=.9;break;case t1.kTurns:e=360}return e},f6=function(t){switch(t){case t1.kNumber:case t1.kInteger:break;case t1.kPercentage:return"%";case t1.kEms:return"em";case t1.kRems:return"rem";case t1.kPixels:return"px";case t1.kDegrees:return"deg";case t1.kRadians:return"rad";case t1.kGradians:return"grad";case t1.kMilliseconds:return"ms";case t1.kSeconds:return"s";case t1.kTurns:return"turn"}return""},f8=function(){function t(){}return t.isAngle=function(t){return t===t1.kDegrees||t===t1.kRadians||t===t1.kGradians||t===t1.kTurns},t.isLength=function(t){return t>=t1.kEms&&t<t1.kDegrees},t.isRelativeUnit=function(t){return t===t1.kPercentage||t===t1.kEms||t===t1.kRems},t.isTime=function(t){return t===t1.kSeconds||t===t1.kMilliseconds},t.prototype.toString=function(){return this.buildCSSText(t3.kNo,t4.kNo,"")},t.prototype.isNumericValue=function(){return this.getType()>=t6.kUnitType&&this.getType()<=t6.kClampType},t}(),f9=function(t){function e(e){var n=t.call(this)||this;return n.colorSpace=e,n}return oe(e,t),e.prototype.getType=function(){return t6.kColorType},e.prototype.to=function(t){return this},e}(f8);(k=t8||(t8={}))[k.Constant=0]="Constant",k[k.LinearGradient=1]="LinearGradient",k[k.RadialGradient=2]="RadialGradient";var f7=function(t){function e(e,n){var r=t.call(this)||this;return r.type=e,r.value=n,r}return oe(e,t),e.prototype.clone=function(){return new e(this.type,this.value)},e.prototype.buildCSSText=function(t,e,n){return n},e.prototype.getType=function(){return t6.kColorType},e}(f8),pt=function(t){function e(e){var n=t.call(this)||this;return n.value=e,n}return oe(e,t),e.prototype.clone=function(){return new e(this.value)},e.prototype.getType=function(){return t6.kKeywordType},e.prototype.buildCSSText=function(t,e,n){return n+this.value},e}(f8),pe=f0(function(t){return void 0===t&&(t=""),t.replace(/-([a-z])/g,function(t){return t[1].toUpperCase()})}),pn=function(t){return t.split("").map(function(t,e){return t.toUpperCase()===t?"".concat(0!==e?"-":"").concat(t.toLowerCase()):t}).join("")};function pr(t){return"function"==typeof t}var pi={d:{alias:"path"},strokeDasharray:{alias:"lineDash"},strokeWidth:{alias:"lineWidth"},textAnchor:{alias:"textAlign"},src:{alias:"img"}},po=f0(function(t){var e=pe(t),n=pi[e];return e=(null==n?void 0:n.alias)||e}),pa=function(t,e){void 0===e&&(e="");var n="";return Number.isFinite(t)?(!function(t){if(!t)throw Error()}(Number.isNaN(t)),n="NaN"):n=t>0?"infinity":"-infinity",n+e},pl=function(t){return f3(f5(t))},ps=function(t){function e(e,n){void 0===n&&(n=t1.kNumber);var r,i=t.call(this)||this;return r="string"==typeof n?f2(n):n,i.unit=r,i.value=e,i}return oe(e,t),e.prototype.clone=function(){return new e(this.value,this.unit)},e.prototype.equals=function(t){return this.value===t.value&&this.unit===t.unit},e.prototype.getType=function(){return t6.kUnitType},e.prototype.convertTo=function(t){if(this.unit===t)return new e(this.value,this.unit);var n=pl(this.unit);if(n!==pl(t)||n===t1.kUnknown)return null;var r=f4(this.unit)/f4(t);return new e(this.value*r,t)},e.prototype.buildCSSText=function(t,e,n){var r;switch(this.unit){case t1.kUnknown:break;case t1.kInteger:r=Number(this.value).toFixed(0);break;case t1.kNumber:case t1.kPercentage:case t1.kEms:case t1.kRems:case t1.kPixels:case t1.kDegrees:case t1.kRadians:case t1.kGradians:case t1.kMilliseconds:case t1.kSeconds:case t1.kTurns:var i=this.value,o=f6(this.unit);if(i<-999999||i>999999){var a=f6(this.unit);r=!Number.isFinite(i)||Number.isNaN(i)?pa(i,a):i+(a||"")}else r="".concat(i).concat(o)}return n+=r},e}(f8),pu=new ps(0,"px");new ps(1,"px");var pc=new ps(0,"deg"),pf=function(t){function e(e,n,r,i,o){void 0===i&&(i=1),void 0===o&&(o=!1);var a=t.call(this,"rgb")||this;return a.r=e,a.g=n,a.b=r,a.alpha=i,a.isNone=o,a}return oe(e,t),e.prototype.clone=function(){return new e(this.r,this.g,this.b,this.alpha)},e.prototype.buildCSSText=function(t,e,n){return n+"rgba(".concat(this.r,",").concat(this.g,",").concat(this.b,",").concat(this.alpha,")")},e}(f9),pp=new pt("unset"),ph={"":pp,unset:pp,initial:new pt("initial"),inherit:new pt("inherit")},pd=function(t){return!ph[t]&&(ph[t]=new pt(t)),ph[t]},py=new pf(0,0,0,0,!0),pg=new pf(0,0,0,0),pv=f0(function(t,e,n,r){return new pf(t,e,n,r)},function(t,e,n,r){return"rgba(".concat(t,",").concat(e,",").concat(n,",").concat(r,")")}),pm=function(t,e){return void 0===e&&(e=t1.kNumber),new ps(t,e)},pb=new ps(50,"%");(M=t9||(t9={}))[M.Standard=0]="Standard",(S=t7||(t7={}))[S.ADDED=0]="ADDED",S[S.REMOVED=1]="REMOVED",S[S.Z_INDEX_CHANGED=2]="Z_INDEX_CHANGED";var px={absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new fX(0,0,0,0)};(_=et||(et={})).COORDINATE="<coordinate>",_.COLOR="<color>",_.PAINT="<paint>",_.NUMBER="<number>",_.ANGLE="<angle>",_.OPACITY_VALUE="<opacity-value>",_.SHADOW_BLUR="<shadow-blur>",_.LENGTH="<length>",_.PERCENTAGE="<percentage>",_.LENGTH_PERCENTAGE="<length> | <percentage>",_.LENGTH_PERCENTAGE_12="[<length> | <percentage>]{1,2}",_.LENGTH_PERCENTAGE_14="[<length> | <percentage>]{1,4}",_.LIST_OF_POINTS="<list-of-points>",_.PATH="<path>",_.FILTER="<filter>",_.Z_INDEX="<z-index>",_.OFFSET_DISTANCE="<offset-distance>",_.DEFINED_PATH="<defined-path>",_.MARKER="<marker>",_.TRANSFORM="<transform>",_.TRANSFORM_ORIGIN="<transform-origin>",_.TEXT="<text>",_.TEXT_TRANSFORM="<text-transform>";var pO=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(t){throw Error(e+": "+t)}function r(){return i("linear-gradient",t.linearGradient,a)||i("repeating-linear-gradient",t.repeatingLinearGradient,a)||i("radial-gradient",t.radialGradient,l)||i("repeating-radial-gradient",t.repeatingRadialGradient,l)||i("conic-gradient",t.conicGradient,l)}function i(e,r,i){return o(r,function(r){var o=i();return o&&!m(t.comma)&&n("Missing comma before color stops"),{type:e,orientation:o,colorStops:p(h)}})}function o(e,r){var i=m(e);if(i){!m(t.startCall)&&n("Missing (");var o=r(i);return!m(t.endCall)&&n("Missing )"),o}}function a(){return function(){return v("directional",t.sideOrCorner,1)}()||function(){return v("angular",t.angleValue,1)}()}function l(){var n,r,i=s();return i&&((n=[]).push(i),r=e,m(t.comma)&&((i=s())?n.push(i):e=r)),n}function s(){var t=function(){var t=v("shape",/^(circle)/i,0);return t&&(t.style=g()||u()),t}()||function(){var t=v("shape",/^(ellipse)/i,0);return t&&(t.style=y()||u()),t}();if(t)t.at=c();else{var e=u();if(e){t=e;var n=c();n&&(t.at=n)}else{var r=f();r&&(t={type:"default-radial",at:r})}}return t}function u(){return v("extent-keyword",t.extentKeywords,1)}function c(){if(v("position",/^at/,0)){var t=f();return!t&&n("Missing positioning value"),t}}function f(){var t=function(){return{x:y(),y:y()}}();if(t.x||t.y)return{type:"position",value:t}}function p(e){var r=e(),i=[];if(r)for(i.push(r);m(t.comma);)(r=e())?i.push(r):n("One extra comma");return i}function h(){var e=function(){return function(){return v("hex",t.hexColor,1)}()||function(){return o(t.rgbaColor,function(){return{type:"rgba",value:p(d)}})}()||function(){return o(t.rgbColor,function(){return{type:"rgb",value:p(d)}})}()||function(){return v("literal",t.literalColor,0)}()}();return!e&&n("Expected color definition"),e.length=y(),e}function d(){return m(t.number)[1]}function y(){return v("%",t.percentageValue,1)||function(){return v("position-keyword",t.positionKeywords,1)}()||g()}function g(){return v("px",t.pixelValue,1)||v("em",t.emValue,1)}function v(t,e,n){var r=m(e);if(r)return{type:t,value:r[n]}}function m(t){var n=/^[\n\r\t\s]+/.exec(e);n&&b(n[0].length);var r=t.exec(e);return r&&b(r[0].length),r}function b(t){e=e.substring(t)}return function(t){var i;return e=t,i=function(){return p(r)}(),e.length>0&&n("Invalid input not EOF"),i}}(),pw=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,pE=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,pk=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,pM=/[\d.]+:(#[^\s]+|[^\)]+\))/gi,pS={left:180,top:-90,bottom:90,right:0,"left top":225,"top left":225,"left bottom":135,"bottom left":135,"right top":-45,"top right":-45,"right bottom":45,"bottom right":45},p_=f0(function(t){var e;return pm(e="angular"===t.type?Number(t.value):pS[t.value]||0,"deg")}),pP=f0(function(t){var e=50,n=50,r="%",i="%";if((null==t?void 0:t.type)==="position"){var o=t.value,a=o.x,l=o.y;(null==a?void 0:a.type)==="position-keyword"&&("left"===a.value?e=0:"center"===a.value?e=50:"right"===a.value?e=100:"top"===a.value?n=0:"bottom"===a.value&&(n=100)),(null==l?void 0:l.type)==="position-keyword"&&("left"===l.value?e=0:"center"===l.value?n=50:"right"===l.value?e=100:"top"===l.value?n=0:"bottom"===l.value&&(n=100)),((null==a?void 0:a.type)==="px"||(null==a?void 0:a.type)==="%"||(null==a?void 0:a.type)==="em")&&(r=null==a?void 0:a.type,e=Number(a.value)),((null==l?void 0:l.type)==="px"||(null==l?void 0:l.type)==="%"||(null==l?void 0:l.type)==="em")&&(i=null==l?void 0:l.type,n=Number(l.value))}return{cx:pm(e,r),cy:pm(n,i)}}),pj=f0(function(t){if(t.indexOf("linear")>-1||t.indexOf("radial")>-1){var e;return pO(t).map(function(t){var e=t.type,n=t.orientation,r=t.colorStops;!function(t){var e,n,r,i=t.length;t[i-1].length=null!==(e=t[i-1].length)&&void 0!==e?e:{type:"%",value:"100"},i>1&&(t[0].length=null!==(n=t[0].length)&&void 0!==n?n:{type:"%",value:"0"});for(var o=0,a=Number(t[0].length.value),l=1;l<i;l++){var s=null===(r=t[l].length)||void 0===r?void 0:r.value;if(!cb(s)&&!cb(a)){for(var u=1;u<l-o;u++)t[o+u].length={type:"%",value:"".concat(a+(Number(s)-a)*u/(l-o))};o=l,a=Number(s)}}}(r);var i=r.map(function(t){return{offset:pm(Number(t.length.value),"%"),color:function(t){var e=t.type,n=t.value;if("hex"===e)return"#".concat(n);if("literal"===e)return n;if("rgb"===e)return"rgb(".concat(n.join(","),")");else return"rgba(".concat(n.join(","),")")}(t)}});if("linear-gradient"===e)return new f7(t8.LinearGradient,{angle:n?p_(n):pc,steps:i});if("radial-gradient"===e&&(!n&&(n=[{type:"shape",value:"circle"}]),"shape"===n[0].type&&"circle"===n[0].value)){var o=pP(n[0].at),a=o.cx,l=o.cy,s=void 0;if(n[0].style){var u=n[0].style,c=u.type,f=u.value;s="extent-keyword"===c?pd(f):pm(f,c)}return new f7(t8.RadialGradient,{cx:a,cy:l,size:s,steps:i})}})}var n=t[0];if("("===t[1]||"("===t[2]){if("l"===n){var r=pw.exec(t);if(r){var i=(null===(e=r[2].match(pM))||void 0===e?void 0:e.map(function(t){return t.split(":")}))||[];return[new f7(t8.LinearGradient,{angle:pm(parseFloat(r[1]),"deg"),steps:i.map(function(t){var e=ol(t,2),n=e[0],r=e[1];return{offset:pm(100*Number(n),"%"),color:r}})})]}}else if("r"===n){var o=function(t){var e,n=pE.exec(t);if(n){var r=(null===(e=n[4].match(pM))||void 0===e?void 0:e.map(function(t){return t.split(":")}))||[];return{cx:pm(50,"%"),cy:pm(50,"%"),steps:r.map(function(t){var e=ol(t,2),n=e[0],r=e[1];return{offset:pm(100*Number(n),"%"),color:r}})}}return null}(t);if(o){if(!cx(o))return[new f7(t8.RadialGradient,o)];t=o}}else if("p"===n)return function(t){var e=pk.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;default:n="no-repeat"}return{image:r,repetition:n}}return null}(t)}});function pA(t){return t&&!!t.image}function pT(t){return t&&!cb(t.r)&&!cb(t.g)&&!cb(t.b)}var pC=f0(function(t){if(pA(t))return on({repetition:"repeat"},t);if(cb(t)&&(t=""),"transparent"===t)return pg;"currentColor"===t&&(t="black");var e=pj(t);if(e)return e;var n=fn(t),r=[0,0,0,0];return null!==n&&(r[0]=n.r||0,r[1]=n.g||0,r[2]=n.b||0,r[3]=n.opacity),pv.apply(void 0,ou([],ol(r),!1))});function pN(t,e){if(!!pT(t)&&!!pT(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(t){var e=t.slice();if(e[3])for(var n=0;n<3;n++)e[n]=Math.round(cO(e[n],0,255));return e[3]=cO(e[3],0,1),"rgba(".concat(e.join(","),")")}]}function pL(t,e){if(cb(e))return pm(0,"px");if(isFinite(Number(e="".concat(e).trim().toLowerCase()))){if("px".search(t)>=0)return pm(Number(e),"px");if("deg".search(t)>=0)return pm(Number(e),"deg")}var n=[];e=e.replace(t,function(t){return n.push(t),"U"+t});var r="U("+t.source+")";return n.map(function(t){return pm(Number(e.replace(RegExp("U"+t,"g"),"").replace(RegExp(r,"g"),"*0")),t)})[0]}var pI=function(t){return pL(/px/g,t)},pR=f0(pI);f0(function(t){return pL(RegExp("%","g"),t)});var pD=function(t){return cv(t)||isFinite(Number(t))?pm(Number(t)||0,"px"):pL(RegExp("px|%|em|rem","g"),t)},pF=f0(pD),pz=function(t){return pL(RegExp("deg|rad|grad|turn","g"),t)},pB=f0(pz);function pW(t){var e=0;if(t.unit===t1.kDegrees)e=t.value;else if(t.unit===t1.kRadians)e=fR(Number(t.value));else if(t.unit===t1.kTurns)e=360*Number(t.value);return e}function p$(t,e){var n;if(Array.isArray(t)?n=t.map(function(t){return Number(t)}):cx(t)?n=t.split(" ").map(function(t){return Number(t)}):cv(t)&&(n=[t]),2===e)return 1===n.length?[n[0],n[0]]:[n[0],n[1]];if(1===n.length)return[n[0],n[0],n[0],n[0]];if(2===n.length)return[n[0],n[1],n[0],n[1]];else if(3===n.length)return[n[0],n[1],n[2],n[1]];else return[n[0],n[1],n[2],n[3]]}function pG(t){return cx(t)?t.split(" ").map(function(t){return pF(t)}):t.map(function(t){return pF(t.toString())})}function pV(t,e,n){if(0===t.value)return 0;if(t.unit===t1.kPixels)return Number(t.value);if(t.unit===t1.kPercentage&&n){var r=n.nodeName===tX.GROUP?n.getLocalBounds():n.geometry.contentBounds;return t.value/100*r.halfExtents[e]*2}return 0}var pH=["blur","brightness","drop-shadow","contrast","grayscale","sepia","saturate","hue-rotate","invert"];function pU(t){if(void 0===t&&(t=""),"none"===(t=t.toLowerCase().trim()))return[];for(var e,n=/\s*([\w-]+)\(([^)]*)\)/g,r=[],i=0;(e=n.exec(t))&&e.index===i;){;if(i=e.index+e[0].length,pH.indexOf(e[1])>-1&&r.push({name:e[1],params:e[2].split(" ").map(function(t){return pL(/deg|rad|grad|turn|px|%/g,t)||pC(t)})}),n.lastIndex===t.length)return r}return[]}function pq(t){return t.toString()}var pY=function(t){return"number"==typeof t?pm(t):/^\s*[-+]?(\d*\.)?\d+\s*$/.test(t)?pm(Number(t)):pm(0)},pX=f0(pY);function pK(t,e){return[t,e,pq]}function pZ(t,e){return function(n,r){return[n,r,function(n){return pq(cO(n,t,e))}]}}function pQ(t,e){if(t.length===e.length)return[t,e,function(t){return t}]}function pJ(t){if(0===t.parsedStyle.path.totalLength){var e;t.parsedStyle.path.totalLength=cR(t.parsedStyle.path.absolutePath,void 0,on(on({},void 0),{bbox:!1,length:!0})).length}return t.parsedStyle.path.totalLength}f0(function(t){return cx(t)?t.split(" ").map(pX):t.map(pX)});function p0(t,e){return t[0]===e[0]&&t[1]===e[1]}function p1(t,e){var n,r=t.prePoint,i=t.currentPoint,o=t.nextPoint,a=Math.pow(i[0]-r[0],2)+Math.pow(i[1]-r[1],2),l=Math.pow(i[0]-o[0],2)+Math.pow(i[1]-o[1],2),s=Math.acos((a+l-(Math.pow(r[0]-o[0],2)+Math.pow(r[1]-o[1],2)))/(2*Math.sqrt(a)*Math.sqrt(l)));if(!s||0===Math.sin(s)||(void 0===n&&(n=1e-5),Math.abs(s-0)<n))return{xExtra:0,yExtra:0};var u=Math.abs(Math.atan2(o[1]-i[1],o[0]-i[0])),c=Math.abs(Math.atan2(o[0]-i[0],o[1]-i[1]));return{xExtra:e/2*(1/Math.sin(s/2))*Math.cos(s/2-(u=u>Math.PI/2?Math.PI-u:u))-e/2||0,yExtra:e/2*(1/Math.sin(s/2))*Math.cos((c=c>Math.PI/2?Math.PI-c:c)-s/2)-e/2||0}}function p2(t,e){return[e[0]+(e[0]-t[0]),e[1]+(e[1]-t[1])]}var p5=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)));return(t.x*e.y-t.y*e.x<0?-1:1)*Math.acos(n/r)},p3=function(t,e,n,r,i,o,a,l){e=Math.abs(e),n=Math.abs(n);var s,u=fI(r=cB(r,360));if(t.x===a.x&&t.y===a.y)return{x:t.x,y:t.y,ellipticalArcAngle:0};if(0===e||0===n)return{x:0,y:0,ellipticalArcAngle:0};var c=(t.x-a.x)/2,f=(t.y-a.y)/2,p={x:Math.cos(u)*c+Math.sin(u)*f,y:-Math.sin(u)*c+Math.cos(u)*f},h=Math.pow(p.x,2)/Math.pow(e,2)+Math.pow(p.y,2)/Math.pow(n,2);h>1&&(e=Math.sqrt(h)*e,n=Math.sqrt(h)*n);var d=(Math.pow(e,2)*Math.pow(n,2)-Math.pow(e,2)*Math.pow(p.y,2)-Math.pow(n,2)*Math.pow(p.x,2))/(Math.pow(e,2)*Math.pow(p.y,2)+Math.pow(n,2)*Math.pow(p.x,2)),y=(i!==o?1:-1)*Math.sqrt(d=d<0?0:d),g={x:y*(e*p.y/n),y:y*(-(n*p.x)/e)},v={x:Math.cos(u)*g.x-Math.sin(u)*g.y+(t.x+a.x)/2,y:Math.sin(u)*g.x+Math.cos(u)*g.y+(t.y+a.y)/2},m={x:(p.x-g.x)/e,y:(p.y-g.y)/n},b=p5({x:1,y:0},m);var x=p5(m,{x:(-p.x-g.x)/e,y:(-p.y-g.y)/n});!o&&x>0?x-=2*Math.PI:o&&x<0&&(x+=2*Math.PI);var O=b+(x%=2*Math.PI)*l,w=e*Math.cos(O),E=n*Math.sin(O);return{x:Math.cos(u)*w-Math.sin(u)*E+v.x,y:Math.sin(u)*w+Math.cos(u)*E+v.y,ellipticalArcStartAngle:b,ellipticalArcEndAngle:b+x,ellipticalArcAngle:O,ellipticalArcCenter:v,resultantRx:e,resultantRy:n}};function p4(t,e,n){void 0===n&&(n=!0);var r=t.arcParams,i=r.rx,o=void 0===i?0:i,a=r.ry,l=void 0===a?0:a,s=r.xRotation,u=r.arcFlag,c=r.sweepFlag,f=p3({x:t.prePoint[0],y:t.prePoint[1]},o,l,s,!!u,!!c,{x:t.currentPoint[0],y:t.currentPoint[1]},e),p=p3({x:t.prePoint[0],y:t.prePoint[1]},o,l,s,!!u,!!c,{x:t.currentPoint[0],y:t.currentPoint[1]},n?e+.005:e-.005),h=p.x-f.x,d=p.y-f.y,y=Math.sqrt(h*h+d*d);return{x:-h/y,y:-d/y}}function p6(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function p8(t,e){return p6(t)*p6(e)?(t[0]*e[0]+t[1]*e[1])/(p6(t)*p6(e)):1}function p9(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(p8(t,e))}function p7(t,e,n,r){var i=(-1+Math.sqrt(2))/3*4,o=t*i,a=e*i,l=n-t,s=n+t,u=r-e,c=r+e;return[["M",l,r],["C",l,r-a,n-o,u,n,u],["C",n+o,u,s,r-a,s,r],["C",s,r+a,n+o,c,n,c],["C",n-o,c,l,r+a,l,r],["Z"]]}function ht(t,e){void 0===e&&(e=t.getLocalTransform());var n,r,i,o,a,l,s,u,c,f,p,h=[];switch(t.nodeName){case tX.LINE:var d=t.parsedStyle,y=d.x1,g=d.y1,v=d.x2,m=d.y2;h=[["M",void 0===y?0:y,void 0===g?0:g],["L",void 0===v?0:v,void 0===m?0:m]];break;case tX.CIRCLE:var b=t.parsedStyle,x=b.r,O=void 0===x?0:x,w=b.cx,E=void 0===w?0:w,k=b.cy,M=void 0===k?0:k;h=p7(O,O,E,M);break;case tX.ELLIPSE:var S=t.parsedStyle,_=S.rx,P=S.ry,j=S.cx,E=void 0===j?0:j,A=S.cy,M=void 0===A?0:A;h=p7(void 0===_?0:_,void 0===P?0:P,E,M);break;case tX.POLYLINE:case tX.POLYGON:;n=t.parsedStyle.points.points,r=t.nodeName===tX.POLYGON,i=n.map(function(t,e){return[0===e?"M":"L",t[0],t[1]]}),r&&i.push(["Z"]),h=i;break;case tX.RECT:var T=t.parsedStyle,C=T.width,N=void 0===C?0:C,L=T.height,I=void 0===L?0:L,R=T.x,D=T.y,F=T.radius;h=function(t,e,n,r,i){if(i){var o=ol(i,4),a=o[0],l=o[1],s=o[2],u=o[3],c=t>0?1:-1,f=e>0?1:-1,p=c+f!==0?1:0;return[["M",c*a+n,r],["L",t-c*l+n,r],l?["A",l,l,0,0,p,t+n,f*l+r]:null,["L",t+n,e-f*s+r],s?["A",s,s,0,0,p,t+n-c*s,e+r]:null,["L",n+c*u,e+r],u?["A",u,u,0,0,p,n,e+r-f*u]:null,["L",n,f*a+r],a?["A",a,a,0,0,p,c*a+n,r]:null,["Z"]].filter(function(t){return t})}return[["M",n,r],["L",n+t,r],["L",n+t,r+e],["L",n,r+e],["Z"]]}(N,I,void 0===R?0:R,void 0===D?0:D,F&&F.some(function(t){return 0!==t})&&F.map(function(t){return cO(t,0,Math.min(Math.abs(N)/2,Math.abs(I)/2))}));break;case tX.PATH:h=ou([],ol(t.parsedStyle.path.absolutePath),!1)}if(h.length){;return o=h,a=t,l=e,c=void 0===(u=(s=a.parsedStyle).defX)?0:u,p=void 0===(f=s.defY)?0:f,o.reduce(function(t,e){var n="";if("M"===e[0]||"L"===e[0]){var r=uo(e[1]-c,e[2]-p,0);l&&ud(r,r,l),n="".concat(e[0]).concat(r[0],",").concat(r[1])}else if("Z"===e[0])n=e[0];else if("C"===e[0]){var i=uo(e[1]-c,e[2]-p,0),o=uo(e[3]-c,e[4]-p,0),a=uo(e[5]-c,e[6]-p,0);l&&(ud(i,i,l),ud(o,o,l),ud(a,a,l)),n="".concat(e[0]).concat(i[0],",").concat(i[1],",").concat(o[0],",").concat(o[1],",").concat(a[0],",").concat(a[1])}else if("A"===e[0]){var s=uo(e[6]-c,e[7]-p,0);l&&ud(s,s,l),n="".concat(e[0]).concat(e[1],",").concat(e[2],",").concat(e[3],",").concat(e[4],",").concat(e[5],",").concat(s[0],",").concat(s[1])}else if("Q"===e[0]){var i=uo(e[1]-c,e[2]-p,0),o=uo(e[3]-c,e[4]-p,0);l&&(ud(i,i,l),ud(o,o,l)),n="".concat(e[0]).concat(e[1],",").concat(e[2],",").concat(e[3],",").concat(e[4],"}")}return t+n},"")}}var he=function(t){if(""===t||Array.isArray(t)&&0===t.length)return{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:{x:0,y:0,width:0,height:0}};try{e=cT(t)}catch(n){e=cT(""),console.error("[g]: Invalid SVG Path definition: ".concat(t))}!function(t){for(var e=0;e<t.length;e++){var n=t[e-1],r=t[e];if("M"===r[0]&&n){var i=n[0],o=[r[1],r[2]],a=void 0;"L"===i||"M"===i?a=[n[1],n[2]]:("C"===i||"A"===i||"Q"===i)&&(a=[n[n.length-2],n[n.length-1]]),a&&p0(o,a)&&(t.splice(e,1),e--)}}}(e);var e,n=function(t){for(var e=!1,n=t.length,r=0;r<n;r++){var i=t[r][0];if("C"===i||"A"===i||"Q"===i){e=!0;break}}return e}(e),r=function(t){for(var e=[],n=[],r=[],i=0;i<t.length;i++){var o=t[i],a=o[0];"M"===a?(r.length&&(n.push(r),r=[]),r.push([o[1],o[2]])):"Z"===a?r.length&&(e.push(r),r=[]):r.push([o[1],o[2]])}return r.length>0&&n.push(r),{polygons:e,polylines:n}}(e),i=r.polygons,o=r.polylines,a=function(t){for(var e=[],n=null,r=null,i=null,o=0,a=t.length,l=0;l<a;l++){var s=t[l];r=t[l+1];var u=s[0],c={command:u,prePoint:n,params:s,startTangent:null,endTangent:null,currentPoint:null,nextPoint:null,arcParams:null,box:null,cubicParams:null};switch(u){case"M":i=[s[1],s[2]],o=l;break;case"A":var f=function(t,e){var n=e[1],r=e[2],i=cB(fI(e[3]),2*Math.PI),o=e[4],a=e[5],l=t[0],s=t[1],u=e[6],c=e[7],f=Math.cos(i)*(l-u)/2+Math.sin(i)*(s-c)/2,p=-1*Math.sin(i)*(l-u)/2+Math.cos(i)*(s-c)/2,h=f*f/(n*n)+p*p/(r*r);h>1&&(n*=Math.sqrt(h),r*=Math.sqrt(h));var d=n*n*(p*p)+r*r*(f*f),y=d?Math.sqrt((n*n*(r*r)-d)/d):1;o===a&&(y*=-1),isNaN(y)&&(y=0);var g=r?y*n*p/r:0,v=n?-(y*r)*f/n:0,m=(l+u)/2+Math.cos(i)*g-Math.sin(i)*v,b=(s+c)/2+Math.sin(i)*g+Math.cos(i)*v,x=[(f-g)/n,(p-v)/r],O=[(-1*f-g)/n,(-1*p-v)/r],w=p9([1,0],x),E=p9(x,O);return -1>=p8(x,O)&&(E=Math.PI),p8(x,O)>=1&&(E=0),0===a&&E>0&&(E-=2*Math.PI),1===a&&E<0&&(E+=2*Math.PI),{cx:m,cy:b,rx:p0(t,[u,c])?0:n,ry:p0(t,[u,c])?0:r,startAngle:w,endAngle:w+E,xRotation:i,arcFlag:o,sweepFlag:a}}(n,s);c.arcParams=f}if("Z"===u)n=i,r=t[o+1];else{var p=s.length;n=[s[p-2],s[p-1]]}r&&"Z"===r[0]&&(r=t[o],e[o]&&(e[o].prePoint=n)),c.currentPoint=n,e[o]&&p0(n,e[o].currentPoint)&&(e[o].prePoint=c.prePoint);var h=r?[r[r.length-2],r[r.length-1]]:null;c.nextPoint=h;var d=c.prePoint;if(["L","H","V"].includes(u))c.startTangent=[d[0]-n[0],d[1]-n[1]],c.endTangent=[n[0]-d[0],n[1]-d[1]];else if("Q"===u){var y=[s[1],s[2]];c.startTangent=[d[0]-y[0],d[1]-y[1]],c.endTangent=[n[0]-y[0],n[1]-y[1]]}else if("T"===u){var g=e[l-1],y=p2(g.currentPoint,d);"Q"===g.command?(c.command="Q",c.startTangent=[d[0]-y[0],d[1]-y[1]],c.endTangent=[n[0]-y[0],n[1]-y[1]]):(c.command="TL",c.startTangent=[d[0]-n[0],d[1]-n[1]],c.endTangent=[n[0]-d[0],n[1]-d[1]])}else if("C"===u){var v=[s[1],s[2]],m=[s[3],s[4]];c.startTangent=[d[0]-v[0],d[1]-v[1]],c.endTangent=[n[0]-m[0],n[1]-m[1]],0===c.startTangent[0]&&0===c.startTangent[1]&&(c.startTangent=[v[0]-m[0],v[1]-m[1]]),0===c.endTangent[0]&&0===c.endTangent[1]&&(c.endTangent=[m[0]-v[0],m[1]-v[1]])}else if("S"===u){var g=e[l-1],v=p2(g.currentPoint,d),m=[s[1],s[2]];"C"===g.command?(c.command="C",c.startTangent=[d[0]-v[0],d[1]-v[1]]):(c.command="SQ",c.startTangent=[d[0]-m[0],d[1]-m[1]]),c.endTangent=[n[0]-m[0],n[1]-m[1]]}else if("A"===u){var b=p4(c,0),x=b.x,O=b.y,w=p4(c,1,!1),E=w.x,k=w.y;c.startTangent=[x,O],c.endTangent=[E,k]}e.push(c)}return e}(e),l=function(t,e){for(var n=[],r=[],i=[],o=0;o<t.length;o++){var a=t[o],l=a.currentPoint,s=a.params,u=a.prePoint,c=void 0;switch(a.command){case"Q":c=function(t,e,n,r,i,o){var a=fE(t,n,i)[0],l=fE(e,r,o)[0],s=[t,i],u=[e,o];return void 0!==a&&s.push(fw(t,n,i,a)),void 0!==l&&u.push(fw(e,r,o,l)),fy(s,u)}(u[0],u[1],s[1],s[2],s[3],s[4]);break;case"C":c=function(t,e,n,r,i,o,a,l){for(var s=[t,a],u=[e,l],c=fx(t,n,i,a),f=fx(e,r,o,l),p=0;p<c.length;p++)s.push(fb(t,n,i,a,c[p]));for(var p=0;p<f.length;p++)u.push(fb(e,r,o,l,f[p]));return fy(s,u)}(u[0],u[1],s[1],s[2],s[3],s[4],s[5],s[6]);break;case"A":var f=a.arcParams;c=function(t,e,n,r,i,o,a){for(var l=Math.atan(-r/n*Math.tan(i)),s=1/0,u=-1/0,c=[o,a],f=-(2*Math.PI);f<=2*Math.PI;f+=Math.PI){var p=l+f;o<a?o<p&&p<a&&c.push(p):a<p&&p<o&&c.push(p)}for(var f=0;f<c.length;f++){var h,d,y,g,v,m,b=(h=t,d=0,y=n,g=r,y*Math.cos(v=i)*Math.cos(m=c[f])-g*Math.sin(v)*Math.sin(m)+h);b<s&&(s=b),b>u&&(u=b)}for(var x=Math.atan(r/(n*Math.tan(i))),O=1/0,w=-1/0,E=[o,a],f=-(2*Math.PI);f<=2*Math.PI;f+=Math.PI){var k=x+f;o<a?o<k&&k<a&&E.push(k):a<k&&k<o&&E.push(k)}for(var f=0;f<E.length;f++){var M,S,_,P,j,A,T=(M=0,S=e,_=n,P=r,_*Math.sin(j=i)*Math.cos(A=E[f])+P*Math.cos(j)*Math.sin(A)+S);T<O&&(O=T),T>w&&(w=T)}return{x:s,y:O,width:u-s,height:w-O}}(f.cx,f.cy,f.rx,f.ry,f.xRotation,f.startAngle,f.endAngle);break;default:n.push(l[0]),r.push(l[1])}c&&(a.box=c,n.push(c.x,c.x+c.width),r.push(c.y,c.y+c.height))}n=n.filter(function(t){return!Number.isNaN(t)&&t!==1/0&&t!==-1/0}),r=r.filter(function(t){return!Number.isNaN(t)&&t!==1/0&&t!==-1/0});var p=cF(n),h=cF(r),d=cz(n),y=cz(r);if(0===i.length)return{x:p,y:h,width:d-p,height:y-h};for(var o=0;o<i.length;o++){var a=i[o],l=a.currentPoint,g=void 0;l[0]===p?p-=(g=p1(a,e)).xExtra:l[0]===d&&(d+=(g=p1(a,e)).xExtra),l[1]===h?h-=(g=p1(a,e)).yExtra:l[1]===y&&(y+=(g=p1(a,e)).yExtra)}return{x:p,y:h,width:d-p,height:y-h}}(a,0),s=l.x,u=l.y,c=l.width,f=l.height;return{absolutePath:e,hasArc:n,segments:a,polygons:i,polylines:o,totalLength:0,rect:{x:Number.isFinite(s)?s:0,y:Number.isFinite(u)?u:0,width:Number.isFinite(c)?c:0,height:Number.isFinite(f)?f:0}}},hn=f0(he);function hr(t){return cx(t)?hn(t):he(t)}function hi(t,e,n){var r,i,o,a,l,s,u,c,f,p,h,d,y=t.curve,g=e.curve;(!y||0===y.length)&&(y=cG(t.absolutePath,!1),t.curve=y),(!g||0===g.length)&&(g=cG(e.absolutePath,!1),e.curve=g);var v=[y,g];y.length!==g.length&&(v=function t(e,n,r){var i=cV(e),o=cV(n),a=i.length,l=o.length,s=i.filter(function(t){return t.l}).length,u=o.filter(function(t){return t.l}).length,c=i.filter(function(t){return t.l}).reduce(function(t,e){return t+e.l},0)/s||0,f=o.filter(function(t){return t.l}).reduce(function(t,e){return t+e.l},0)/u||0,p=r||Math.max(a,l),h=[c,f],d=[p-a,p-l],y=0,g=[i,o].map(function(t,e){return t.l===p?t.map(function(t){return t.s}):t.map(function(t,n){return y=n&&d[e]&&t.l>=h[e],d[e]-=y?1:0,y?t.ss:[t.s]}).flat()});return g[0].length===g[1].length?g:t(g[0],g[1],p)}(y,g));var m=cH(v[0])!==cH(v[1])?[["M"].concat((i=(r=v[0]).slice(1).map(function(t,e,n){return e?n[e-1].slice(-2).concat(t.slice(1)):r[0].slice(1).concat(t.slice(1))}).map(function(t){return t.map(function(e,n){return t[t.length-n-2*(1-n%2)]})}).reverse())[0].slice(0,2))].concat(i.map(function(t){return["C"].concat(t.slice(2))})):v[0].map(function(t){return Array.isArray(t)?[].concat(t):t});return[m,(o=v[1],a=m,l=o.length-1,s=[],u=0,c=0,(d=(h=(p=(f=o).length)-1,f.map(function(t,e){return f.map(function(t,n){var r=e+n;return 0===n||f[r]&&"M"===f[r][0]?["M"].concat(f[r].slice(-2)):(r>=p&&(r-=h),f[r])})}))).forEach(function(t,e){o.slice(1).forEach(function(t,n){c+=cm(o[(e+n)%l].slice(-2),a[n%l].slice(-2))}),s[e]=c,c=0}),d[u=s.indexOf(Math.min.apply(null,s))]),function(t){return t}]}function ho(t,e){n=cx(t)?t.split(" ").map(function(t){var e=ol(t.split(","),2),n=e[0],r=e[1];return[Number(n),Number(r)]}):t;var n,r,i,o=[],a=0,l=function(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+=fd(r[0],r[1],i[0],i[1])}return e}(n);n.forEach(function(t,e){if(n[e+1]){var s,u,c;(r=[0,0])[0]=a/l,s=t[0],u=t[1],c=n[e+1][0],i=fd(s,u,c,n[e+1][1]),a+=i,r[1]=a/l,o.push(r)}});var s=Math.min.apply(Math,ou([],ol(n.map(function(t){return t[0]})),!1)),u=Math.min.apply(Math,ou([],ol(n.map(function(t){return t[1]})),!1));return e&&(e.parsedStyle.defX=s,e.parsedStyle.defY=u),{points:n,totalLength:l,segments:o}}function ha(t,e){return[t.points,e.points,function(t){return t}]}function hl(t){return function(e){var n=0;return t.map(function(t){return null===t?e[n++]:t})}}function hs(t){return t}var hu={matrix:["NNNNNN",[null,null,0,0,null,null,0,0,0,0,1,0,null,null,0,1],hs],matrix3d:["NNNNNNNNNNNNNNNN",hs],rotate:["A"],rotatex:["A"],rotatey:["A"],rotatez:["A"],rotate3d:["NNNA"],perspective:["L"],scale:["Nn",hl([null,null,new ps(1)]),hs],scalex:["N",hl([null,new ps(1),new ps(1)]),hl([null,new ps(1)])],scaley:["N",hl([new ps(1),null,new ps(1)]),hl([new ps(1),null])],scalez:["N",hl([new ps(1),new ps(1),null])],scale3d:["NNN",hs],skew:["Aa",null,hs],skewx:["A",null,hl([null,pc])],skewy:["A",null,hl([pc,null])],translate:["Tt",hl([null,null,pu]),hs],translatex:["T",hl([null,pu,pu]),hl([null,pu])],translatey:["T",hl([pu,null,pu]),hl([pu,null])],translatez:["L",hl([pu,pu,null])],translate3d:["TTL",hs]};function hc(t){if("none"===(t=(t||"none").toLowerCase().trim()))return[];for(var e,n=/\s*(\w+)\(([^)]*)\)/g,r=[],i=0;(e=n.exec(t))&&e.index===i;){;i=e.index+e[0].length;var o=e[1],a=hu[o];if(!a)break;var l=e[2].split(","),s=a[0];if(s.length<l.length)break;for(var u=[],c=0;c<s.length;c++){var f=l[c],p=s[c],h=void 0;if(void 0===(h=f?({A:function(t){return"0"===t.trim()?pc:pB(t)},N:pX,T:pF,L:pR})[p.toUpperCase()](f):({a:pc,n:u[0],t:pu})[p]))return[];u.push(h)}if(r.push({t:o,d:u}),n.lastIndex===t.length)return r}return[]}function hf(t){if("none"===(t=(t||"none").toLowerCase().trim()))return[];for(var e,n=/\s*(\w+)\(([^)]*)\)/g,r=[],i=0;(e=n.exec(t))&&e.index===i;){;i=e.index+e[0].length;var o=e[1],a=hu[o];if(!a)break;var l=e[2].split(","),s=a[0];if(s.length<l.length)break;for(var u=[],c=0;c<s.length;c++){var f=l[c],p=s[c],h=void 0;if(void 0===(h=f?({A:function(t){return"0"===t.trim()?pc:pz(t)},N:pY,T:pD,L:pI})[p.toUpperCase()](f):({a:pc,n:u[0],t:pu})[p]))return[];u.push(h)}if(r.push({t:o,d:u}),n.lastIndex===t.length)return r}return[]}function hp(t){switch(t.t){case"rotatex":return[1,0,0,0,0,Math.cos(i=fI(pW(t.d[0]))),Math.sin(i),0,0,-Math.sin(i),Math.cos(i),0,0,0,0,1];case"rotatey":return[Math.cos(i=fI(pW(t.d[0]))),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[Math.cos(i=fI(pW(t.d[0]))),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=fI(pW(t.d[3]));var e,n,r,i,o=e*e+n*n+r*r;if(0===o)e=1,n=0,r=0;else if(1!==o){var a=Math.sqrt(o);e/=a,n/=a,r/=a}var l=Math.sin(i/2),s=l*Math.cos(i/2),u=l*l;return[1-2*(n*n+r*r)*u,2*(e*n*u+r*s),2*(e*r*u-n*s),0,2*(e*n*u-r*s),1-2*(e*e+r*r)*u,2*(n*r*u+e*s),0,2*(e*r*u+n*s),2*(n*r*u-e*s),1-2*(e*e+n*n)*u,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 c=fI(pW(t.d[0]));return[1,Math.tan(fI(pW(t.d[1]))),0,0,Math.tan(c),1,0,0,0,0,1,0,0,0,0,1];case"skewx":return[1,0,0,0,Math.tan(i=fI(pW(t.d[0]))),1,0,0,0,0,1,0,0,0,0,1];case"skewy":return[1,Math.tan(i=fI(pW(t.d[0]))),0,0,0,1,0,0,0,0,1,0,0,0,0,1];case"translate":return e=pV(t.d[0],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,e,n=pV(t.d[1],0,null)||0,0,1];case"translatex":return[1,0,0,0,0,1,0,0,0,0,1,0,e=pV(t.d[0],0,null)||0,0,0,1];case"translatey":return[1,0,0,0,0,1,0,0,0,0,1,0,0,n=pV(t.d[0],0,null)||0,0,1];case"translatez":return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,r=pV(t.d[0],0,null)||0,1];case"translate3d":return e=pV(t.d[0],0,null)||0,n=pV(t.d[1],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,e,n,r=pV(t.d[2],0,null)||0,1];case"perspective":var f=pV(t.d[0],0,null)||0;return[1,0,0,0,0,1,0,0,0,0,1,f?-1/f:0,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(t){return t.value})}}function hh(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 hd(t){var e,n=[0,0,0],r=[1,1,1],i=[0,0,0],o=[0,0,0,1],a=[0,0,0,1];return!function(t,e,n,r,i,o){if(!function(t,e){var n=e[15];if(0===n)return!1;for(var r=1/n,i=0;i<16;i++)t[i]=e[i]*r;return!0}(fz,t))return;if(ub(fB,fz),fB[3]=0,fB[7]=0,fB[11]=0,fB[15]=1,1e-8>Math.abs(uS(fB)))return;var a,l,s,u,c,f,p,h,d,y=fz[3],g=fz[7],v=fz[11],m=fz[12],b=fz[13],x=fz[14],O=fz[15];if(0!==y||0!==g||0!==v){if(fW[0]=y,fW[1]=g,fW[2]=v,fW[3]=O,!uk(fB,fB))return;uE(fB,fB),ca(i,fW,fB)}else i[0]=i[1]=i[2]=0,i[3]=1;if(e[0]=m,e[1]=b,e[2]=x,function(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]}(f$,fz),n[0]=ui(f$[0]),uf(f$[0],f$[0]),r[0]=up(f$[0],f$[1]),fV(f$[1],f$[1],f$[0],1,-r[0]),n[1]=ui(f$[1]),uf(f$[1],f$[1]),r[0]/=n[1],r[1]=up(f$[0],f$[2]),fV(f$[2],f$[2],f$[0],1,-r[1]),r[2]=up(f$[1],f$[2]),fV(f$[2],f$[2],f$[1],1,-r[2]),n[2]=ui(f$[2]),uf(f$[2],f$[2]),r[1]/=n[2],r[2]/=n[2],a=fG,l=f$[1],s=f$[2],u=l[0],c=l[1],f=l[2],p=s[0],h=s[1],d=s[2],a[0]=c*d-f*h,a[1]=f*p-u*d,a[2]=u*h-c*p,0>up(f$[0],fG))for(var w=0;w<3;w++)n[w]*=-1,f$[w][0]*=-1,f$[w][1]*=-1,f$[w][2]*=-1;o[0]=.5*Math.sqrt(Math.max(1+f$[0][0]-f$[1][1]-f$[2][2],0)),o[1]=.5*Math.sqrt(Math.max(1-f$[0][0]+f$[1][1]-f$[2][2],0)),o[2]=.5*Math.sqrt(Math.max(1-f$[0][0]-f$[1][1]+f$[2][2],0)),o[3]=.5*Math.sqrt(Math.max(1+f$[0][0]+f$[1][1]+f$[2][2],0)),f$[2][1]>f$[1][2]&&(o[0]=-o[0]),f$[0][2]>f$[2][0]&&(o[1]=-o[1]),f$[1][0]>f$[0][1]&&(o[2]=-o[2])}(0===(e=t).length?[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]:e.map(hp).reduce(hh),n,r,i,o,a),[[n,r,i,a,o]]}var hy=function(){function t(t,e){for(var n=[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],r=0;r<4;r++)for(var i=0;i<4;i++)for(var o=0;o<4;o++)n[r][i]+=e[r][o]*t[o][i];return n}return function(e,n,r,i,o){for(var a,l=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]],s=0;s<4;s++)l[s][3]=o[s];for(var s=0;s<3;s++)for(var u=0;u<3;u++)l[3][s]+=e[u]*l[u][s];var c=i[0],f=i[1],p=i[2],h=i[3],d=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];d[0][0]=1-2*(f*f+p*p),d[0][1]=2*(c*f-p*h),d[0][2]=2*(c*p+f*h),d[1][0]=2*(c*f+p*h),d[1][1]=1-2*(c*c+p*p),d[1][2]=2*(f*p-c*h),d[2][0]=2*(c*p-f*h),d[2][1]=2*(f*p+c*h),d[2][2]=1-2*(c*c+f*f),l=t(l,d);var y=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];r[2]&&(y[2][1]=r[2],l=t(l,y)),r[1]&&(y[2][1]=0,y[2][0]=r[0],l=t(l,y)),r[0]&&(y[2][0]=0,y[1][0]=r[0],l=t(l,y));for(var s=0;s<3;s++)for(var u=0;u<3;u++)l[s][u]*=n[s];return 0==(a=l)[0][2]&&0==a[0][3]&&0==a[1][2]&&0==a[1][3]&&0==a[2][0]&&0==a[2][1]&&1==a[2][2]&&0==a[2][3]&&0==a[3][2]&&1==a[3][3]?[l[0][0],l[0][1],l[1][0],l[1][1],l[3][0],l[3][1]]:l[0].concat(l[1],l[2],l[3])}}();function hg(t){return t.toFixed(6).replace(".000000","")}function hv(t,e){var n,r;return(t.decompositionPair!==e&&(t.decompositionPair=e,n=hd(t)),e.decompositionPair!==t&&(e.decompositionPair=t,r=hd(e)),null===n[0]||null===r[0])?[[!1],[!0],function(n){return n?e[0].d:t[0].d}]:(n[0].push(0),r[0].push(1),[n,r,function(t){var e=function(t,e,n){var r=function(t,e){for(var n=0,r=0;r<t.length;r++)n+=t[r]*e[r];return n}(t,e);r=cO(r,-1,1);var i=[];if(1===r)i=t;else{for(var o=Math.acos(r),a=1*Math.sin(n*o)/Math.sqrt(1-r*r),l=0;l<4;l++)i.push(t[l]*(Math.cos(n*o)-r*a)+e[l]*a)}return i}(n[0][3],r[0][3],t[5]);return hy(t[0],t[1],t[2],e,t[4]).map(hg).join(",")}])}function hm(t){return t.replace(/[xy]/,"")}function hb(t){return t.replace(/(x|y|z|3d)?$/,"3d")}function hx(t,e,n){var r=!1;if(!t.length||!e.length){!t.length&&(r=!0,t=e,e=[]);for(var i=0;i<t.length;i++)!function(n){var r=t[n],i=r.t,o=r.d,a="scale"===i.substring(0,5)?1:0;e.push({t:i,d:o.map(function(t){return"number"==typeof t?pm(a):pm(a,t.unit)})})}(i)}var o=[],a=[],l=[];if(t.length!==e.length){var s=hv(t,e);o=[s[0]],a=[s[1]],l=[["matrix",[s[2]]]]}else for(var i=0;i<t.length;i++){var u,c,f=t[i].t,p=e[i].t,h=t[i].d,d=e[i].d,y=hu[f],g=hu[p],v=void 0;if(u=f,c=p,"perspective"===u&&"perspective"===c||("matrix"===u||"matrix3d"===u)&&("matrix"===c||"matrix3d"===c)){var s=hv([t[i]],[e[i]]);o.push(s[0]),a.push(s[1]),l.push(["matrix",[s[2]]]);continue}if(f===p)v=f;else if(y[2]&&g[2]&&hm(f)===hm(p))v=hm(f),h=y[2](h),d=g[2](d);else if(y[1]&&g[1]&&hb(f)===hb(p))v=hb(f),h=y[1](h),d=g[1](d);else{var s=hv(t,e);o=[s[0]],a=[s[1]],l=[["matrix",[s[2]]]];break}for(var m=[],b=[],x=[],O=0;O<h.length;O++){var s=function(t,e,n,r,i){void 0===i&&(i=0);var o="",a=t.value||0,l=e.value||0,s=pl(t.unit),u=t.convertTo(s),c=e.convertTo(s);return u&&c?(a=u.value,l=c.value,o=f6(t.unit)):(ps.isLength(t.unit)||ps.isLength(e.unit))&&(a=pV(t,i,n),l=pV(e,i,n),o="px"),[a,l,function(t){return r&&(t=Math.max(t,0)),t+o}]}(h[O],d[O],n,!1,O);m[O]=s[0],b[O]=s[1],x.push(s[2])}o.push(m),a.push(b),l.push([v,x])}if(r){var w=o;o=a,a=w}return[o,a,function(t){return t.map(function(t,e){var n=t.map(function(t,n){return l[e][1][n](t)}).join(",");return"matrix"===l[e][0]&&16===n.split(",").length&&(l[e][0]="matrix3d"),"matrix3d"===l[e][0]&&6===n.split(",").length&&(l[e][0]="matrix"),l[e][0]+"("+n+")"}).join(" ")}]}var hO=f0(function(t){if(!cx(t))return[pm(t[0]||0,"px"),pm(t[1]||0,"px")];if("text-anchor"===t)return[pm(0,"px"),pm(0,"px")];var e=t.split(" ");return(1===e.length&&("top"===e[0]||"bottom"===e[0]?(e[1]=e[0],e[0]="center"):e[1]="center"),2!==e.length)?null:[pF(hE(e[0])),pF(hE(e[1]))]}),hw=function(t){if(!cx(t))return[pm(t[0]||0,"px"),pm(t[1]||0,"px")];if("text-anchor"===t)return[pm(0,"px"),pm(0,"px")];var e=t.split(" ");return(1===e.length&&("top"===e[0]||"bottom"===e[0]?(e[1]=e[0],e[0]="center"):e[1]="center"),2!==e.length)?null:[pD(hE(e[0])),pD(hE(e[1]))]};function hE(t){if("center"===t)return"50%";if("left"===t||"top"===t)return"0";if("right"===t||"bottom"===t)return"100%";return t}var hk=[{n:"display",k:["none"]},{n:"opacity",int:!0,inh:!0,d:"1",syntax:et.OPACITY_VALUE},{n:"fillOpacity",int:!0,inh:!0,d:"1",syntax:et.OPACITY_VALUE},{n:"strokeOpacity",int:!0,inh:!0,d:"1",syntax:et.OPACITY_VALUE},{n:"fill",int:!0,k:["none"],d:"none",syntax:et.PAINT},{n:"fillRule",k:["nonzero","evenodd"],d:"nonzero"},{n:"stroke",int:!0,k:["none"],d:"none",syntax:et.PAINT,l:!0},{n:"shadowType",k:["inner","outer","both"],d:"outer",l:!0},{n:"shadowColor",int:!0,syntax:et.COLOR},{n:"shadowOffsetX",int:!0,l:!0,d:"0",syntax:et.LENGTH_PERCENTAGE},{n:"shadowOffsetY",int:!0,l:!0,d:"0",syntax:et.LENGTH_PERCENTAGE},{n:"shadowBlur",int:!0,l:!0,d:"0",syntax:et.SHADOW_BLUR},{n:"lineWidth",int:!0,inh:!0,d:"1",l:!0,a:["strokeWidth"],syntax:et.LENGTH_PERCENTAGE},{n:"increasedLineWidthForHitTesting",inh:!0,d:"0",l:!0,syntax:et.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:et.LENGTH_PERCENTAGE_12},{n:"lineDashOffset",int:!0,inh:!0,d:"0",a:["strokeDashoffset"],syntax:et.LENGTH_PERCENTAGE},{n:"offsetPath",syntax:et.DEFINED_PATH},{n:"offsetDistance",int:!0,syntax:et.OFFSET_DISTANCE},{n:"dx",int:!0,l:!0,d:"0",syntax:et.LENGTH_PERCENTAGE},{n:"dy",int:!0,l:!0,d:"0",syntax:et.LENGTH_PERCENTAGE},{n:"zIndex",ind:!0,int:!0,d:"0",k:["auto"],syntax:et.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:et.FILTER},{n:"clipPath",syntax:et.DEFINED_PATH},{n:"textPath",syntax:et.DEFINED_PATH},{n:"textPathSide",k:["left","right"],d:"left"},{n:"textPathStartOffset",l:!0,d:"0",syntax:et.LENGTH_PERCENTAGE},{n:"transform",p:100,int:!0,k:["none"],d:"none",syntax:et.TRANSFORM},{n:"transformOrigin",p:100,d:function(t){return t===tX.CIRCLE||t===tX.ELLIPSE?"center":t===tX.TEXT?"text-anchor":"left top"},l:!0,syntax:et.TRANSFORM_ORIGIN},{n:"anchor",p:99,d:function(t){return t===tX.CIRCLE||t===tX.ELLIPSE?"0.5 0.5":"0 0"},l:!0,syntax:et.LENGTH_PERCENTAGE_12},{n:"cx",int:!0,d:"0",syntax:et.COORDINATE},{n:"cy",int:!0,d:"0",syntax:et.COORDINATE},{n:"cz",int:!0,d:"0",syntax:et.COORDINATE},{n:"r",int:!0,l:!0,d:"0",syntax:et.LENGTH_PERCENTAGE},{n:"rx",int:!0,l:!0,d:"0",syntax:et.LENGTH_PERCENTAGE},{n:"ry",int:!0,l:!0,d:"0",syntax:et.LENGTH_PERCENTAGE},{n:"x",int:!0,d:"0",syntax:et.COORDINATE},{n:"y",int:!0,d:"0",syntax:et.COORDINATE},{n:"z",int:!0,d:"0",syntax:et.COORDINATE},{n:"width",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:et.LENGTH_PERCENTAGE},{n:"height",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:et.LENGTH_PERCENTAGE},{n:"radius",int:!0,l:!0,d:"0",syntax:et.LENGTH_PERCENTAGE_14},{n:"x1",int:!0,l:!0,syntax:et.COORDINATE},{n:"y1",int:!0,l:!0,syntax:et.COORDINATE},{n:"z1",int:!0,l:!0,syntax:et.COORDINATE},{n:"x2",int:!0,l:!0,syntax:et.COORDINATE},{n:"y2",int:!0,l:!0,syntax:et.COORDINATE},{n:"z2",int:!0,l:!0,syntax:et.COORDINATE},{n:"path",int:!0,l:!0,d:"",a:["d"],syntax:et.PATH,p:50},{n:"points",int:!0,l:!0,syntax:et.LIST_OF_POINTS,p:50},{n:"text",l:!0,d:"",syntax:et.TEXT,p:50},{n:"textTransform",l:!0,inh:!0,k:["capitalize","uppercase","lowercase","none"],d:"none",syntax:et.TEXT_TRANSFORM,p:51},{n:"font",l:!0},{n:"fontSize",int:!0,inh:!0,d:"16px",l:!0,syntax:et.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:et.LENGTH,int:!0,d:"0"},{n:"letterSpacing",l:!0,syntax:et.LENGTH,int:!0,d:"0"},{n:"miterLimit",l:!0,syntax:et.NUMBER,d:function(t){return t===tX.PATH||t===tX.POLYGON||t===tX.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:et.MARKER},{n:"markerEnd",syntax:et.MARKER},{n:"markerMid",syntax:et.MARKER},{n:"markerStartOffset",syntax:et.LENGTH,l:!0,int:!0,d:"0"},{n:"markerEndOffset",syntax:et.LENGTH,l:!0,int:!0,d:"0"}],hM=hk.filter(function(t){return!!t.l}).map(function(t){return t.n}),hS={},h_=new WeakMap,hP=function(t,e){var n=h_.get(t);return!n||0===n.length||n.includes(e)},hj=function(){function t(t){var e=this;this.runtime=t,hk.forEach(function(t){e.registerMetadata(t)})}return t.prototype.registerMetadata=function(t){ou([t.n],ol(t.a||[]),!1).forEach(function(e){hS[e]=t})},t.prototype.unregisterMetadata=function(t){delete hS[t]},t.prototype.getPropertySyntax=function(t){return this.runtime.CSSPropertySyntaxFactory[t]},t.prototype.processProperties=function(t,e,n){var r=this;if(void 0===n&&(n={skipUpdateAttribute:!1,skipParse:!1,forceUpdateGeometry:!1,usedAttributes:[],memoize:!0}),!this.runtime.enableCSSParsing){Object.assign(t.attributes,e);var i=Object.keys(e),o=t.parsedStyle.clipPath,a=t.parsedStyle.offsetPath;t.parsedStyle=Object.assign(t.parsedStyle,e);var l=!!n.forceUpdateGeometry;if(!l){for(var s=0;s<hM.length;s++)if(hM[s]in e){l=!0;break}}e.fill&&(t.parsedStyle.fill=pC(e.fill)),e.stroke&&(t.parsedStyle.stroke=pC(e.stroke)),e.shadowColor&&(t.parsedStyle.shadowColor=pC(e.shadowColor)),e.filter&&(t.parsedStyle.filter=pU(e.filter)),!cb(e.radius)&&(t.parsedStyle.radius=p$(e.radius,4)),!cb(e.lineDash)&&(t.parsedStyle.lineDash=p$(e.lineDash,2)),e.points&&(t.parsedStyle.points=ho(e.points,t)),""===e.path&&(t.parsedStyle.path=on({},px)),e.path&&(t.parsedStyle.path=hr(e.path),t.parsedStyle.defX=t.parsedStyle.path.rect.x,t.parsedStyle.defY=t.parsedStyle.path.rect.y),e.textTransform&&this.runtime.CSSPropertySyntaxFactory["<text-transform>"].calculator(null,null,{value:e.textTransform},t,null),e.clipPath&&this.runtime.CSSPropertySyntaxFactory["<defined-path>"].calculator("clipPath",o,e.clipPath,t,this.runtime),e.offsetPath&&this.runtime.CSSPropertySyntaxFactory["<defined-path>"].calculator("offsetPath",a,e.offsetPath,t,this.runtime),e.anchor&&(t.parsedStyle.anchor=p$(e.anchor,2)),e.transform&&(t.parsedStyle.transform=hc(e.transform)),e.transformOrigin&&(t.parsedStyle.transformOrigin=hO(e.transformOrigin)),e.markerStart&&(t.parsedStyle.markerStart=this.runtime.CSSPropertySyntaxFactory["<marker>"].calculator(null,e.markerStart,e.markerStart,null,null)),e.markerEnd&&(t.parsedStyle.markerEnd=this.runtime.CSSPropertySyntaxFactory["<marker>"].calculator(null,e.markerEnd,e.markerEnd,null,null)),e.markerMid&&(t.parsedStyle.markerMid=this.runtime.CSSPropertySyntaxFactory["<marker>"].calculator("",e.markerMid,e.markerMid,null,null)),((t.nodeName===tX.CIRCLE||t.nodeName===tX.ELLIPSE)&&(!cb(e.cx)||!cb(e.cy))||(t.nodeName===tX.RECT||t.nodeName===tX.IMAGE||t.nodeName===tX.GROUP||t.nodeName===tX.HTML||t.nodeName===tX.TEXT||t.nodeName===tX.MESH)&&(!cb(e.x)||!cb(e.y)||!cb(e.z))||t.nodeName===tX.LINE&&(!cb(e.x1)||!cb(e.y1)||!cb(e.z1)||!cb(e.x2)||!cb(e.y2)||!cb(e.z2)))&&this.runtime.CSSPropertySyntaxFactory["<coordinate>"].postProcessor(t,i),!cb(e.zIndex)&&this.runtime.CSSPropertySyntaxFactory["<z-index>"].postProcessor(t,i),e.path&&this.runtime.CSSPropertySyntaxFactory["<path>"].postProcessor(t,i),e.points&&this.runtime.CSSPropertySyntaxFactory["<list-of-points>"].postProcessor(t,i),!cb(e.offsetDistance)&&this.runtime.CSSPropertySyntaxFactory["<offset-distance>"].postProcessor(t,i),e.transform&&this.runtime.CSSPropertySyntaxFactory["<transform>"].postProcessor(t,i),l&&this.updateGeometry(t);return}var u=n.skipUpdateAttribute,c=n.skipParse,f=n.forceUpdateGeometry,p=n.usedAttributes,h=n.memoize,d=f,y=Object.keys(e);y.forEach(function(n){var r;!u&&(t.attributes[n]=e[n]),!d&&(null===(r=hS[n])||void 0===r?void 0:r.l)&&(d=!0)}),!c&&y.forEach(function(e){t.computedStyle[e]=r.parseProperty(e,t.attributes[e],t,h)}),(null==p?void 0:p.length)&&(y=Array.from(new Set(y.concat(p)))),y.forEach(function(e){e in t.computedStyle&&(t.parsedStyle[e]=r.computeProperty(e,t.computedStyle[e],t,h))}),d&&this.updateGeometry(t),y.forEach(function(e){e in t.parsedStyle&&r.postProcessProperty(e,t,y)}),this.runtime.enableCSSParsing&&t.children.length&&y.forEach(function(e){e in t.parsedStyle&&r.isPropertyInheritable(e)&&t.children.forEach(function(t){t.internalSetAttribute(e,null,{skipUpdateAttribute:!0,skipParse:!0})})})},t.prototype.parseProperty=function(t,e,n,r){var i=hS[t],o=e;if((""===e||cb(e))&&(e="unset"),"unset"===e||"initial"===e||"inherit"===e)o=pd(e);else if(i){var a=i.k,l=i.syntax,s=l&&this.getPropertySyntax(l);a&&a.indexOf(e)>-1?o=pd(e):s&&(!r&&s.parserUnmemoize?o=s.parserUnmemoize(e,n):s.parser&&(o=s.parser(e,n)))}return o},t.prototype.computeProperty=function(t,e,n,r){var i=hS[t],o="g-root"===n.id,a=e;if(i){var l=i.syntax,s=i.inh,u=i.d;if(e instanceof pt){var c=e.value;if("unset"===c&&(c=s&&!o?"inherit":"initial"),"initial"===c)!cb(u)&&(e=this.parseProperty(t,pr(u)?u(n.nodeName):u,n,r));else if("inherit"===c){var f=this.tryToResolveProperty(n,t,{inherited:!0});if(!cb(f))return f;this.addUnresolveProperty(n,t);return}}var p=l&&this.getPropertySyntax(l);if(p&&p.calculator){var h=n.parsedStyle[t];a=p.calculator(t,h,e,n,this.runtime)}else a=e instanceof pt?e.value:e}return a},t.prototype.postProcessProperty=function(t,e,n){var r=hS[t];if(r&&r.syntax){var i=r.syntax&&this.getPropertySyntax(r.syntax);i&&i.postProcessor&&i.postProcessor(e,n)}},t.prototype.addUnresolveProperty=function(t,e){var n=h_.get(t);!n&&(h_.set(t,[]),n=h_.get(t)),-1===n.indexOf(e)&&n.push(e)},t.prototype.tryToResolveProperty=function(t,e,n){if(void 0===n&&(n={}),n.inherited&&t.parentElement&&hP(t.parentElement,e)){var r=t.parentElement.parsedStyle[e];if("unset"!==r&&"initial"!==r&&"inherit"!==r)return r}},t.prototype.recalc=function(t){var e=h_.get(t);if(e&&e.length){var n={};e.forEach(function(e){n[e]=t.attributes[e]}),this.processProperties(t,n),h_.delete(t)}},t.prototype.updateGeometry=function(t){var e=t.nodeName,n=this.runtime.geometryUpdaterFactory[e];if(n){var r=t.geometry;!r.contentBounds&&(r.contentBounds=new fH),!r.renderBounds&&(r.renderBounds=new fH);var i=t.parsedStyle,o=n.update(i,t),a=o.width,l=o.height,s=o.depth,u=o.offsetX,c=o.offsetY,f=o.offsetZ,p=[Math.abs(a)/2,Math.abs(l)/2,(void 0===s?0:s)/2],h=i.stroke,d=i.lineWidth,y=i.increasedLineWidthForHitTesting,g=i.shadowType,v=i.shadowColor,m=i.filter,b=i.transformOrigin,x=i.anchor;e===tX.TEXT?delete i.anchor:e===tX.MESH&&(i.anchor[2]=.5);var O=[(1-2*(x&&x[0]||0))*a/2+(void 0===u?0:u),(1-2*(x&&x[1]||0))*l/2+(void 0===c?0:c),(1-2*(x&&x[2]||0))*p[2]+(void 0===f?0:f)];r.contentBounds.update(O,p);var w=e===tX.POLYLINE||e===tX.POLYGON||e===tX.PATH?Math.SQRT2:.5;if(h&&!h.isNone){var E=((d||0)+(y||0))*w;p[0]+=E,p[1]+=E}if(r.renderBounds.update(O,p),v&&g&&"inner"!==g){var k=r.renderBounds,M=k.min,S=k.max,_=i.shadowBlur,P=i.shadowOffsetX,j=i.shadowOffsetY,A=_||0,T=P||0,C=j||0,N=M[0]-A+T,L=S[0]+A+T,I=M[1]-A+C,R=S[1]+A+C;M[0]=Math.min(M[0],N),S[0]=Math.max(S[0],L),M[1]=Math.min(M[1],I),S[1]=Math.max(S[1],R),r.renderBounds.setMinMax(M,S)}(void 0===m?[]:m).forEach(function(t){var e=t.name,n=t.params;if("blur"===e){var i=n[0].value;r.renderBounds.update(r.renderBounds.center,fT(r.renderBounds.halfExtents,r.renderBounds.halfExtents,[i,i,0]))}else if("drop-shadow"===e){var o=n[0].value,a=n[1].value,l=n[2].value,s=r.renderBounds,u=s.min,c=s.max,f=u[0]-l+o,p=c[0]+l+o,h=u[1]-l+a,d=c[1]+l+a;u[0]=Math.min(u[0],f),c[0]=Math.max(c[0],p),u[1]=Math.min(u[1],h),c[1]=Math.max(c[1],d),r.renderBounds.setMinMax(u,c)}}),x=i.anchor;var D=a<0,F=l<0,z=(D?-1:1)*(b?pV(b[0],0,t):0),B=(F?-1:1)*(b?pV(b[1],1,t):0);z-=(D?-1:1)*(x&&x[0]||0)*r.contentBounds.halfExtents[0]*2,B-=(F?-1:1)*(x&&x[1]||0)*r.contentBounds.halfExtents[1]*2,t.setOrigin(z,B),this.runtime.sceneGraphService.dirtifyToRoot(t)}},t.prototype.updateSizeAttenuation=function(t,e){t.style.isSizeAttenuation?(!t.style.rawLineWidth&&(t.style.rawLineWidth=t.style.lineWidth),t.style.lineWidth=t.style.rawLineWidth/e,t.nodeName===tX.CIRCLE&&(!t.style.rawR&&(t.style.rawR=t.style.r),t.style.r=t.style.rawR/e)):(t.style.rawLineWidth&&(t.style.lineWidth=t.style.rawLineWidth,delete t.style.rawLineWidth),t.nodeName===tX.CIRCLE&&t.style.rawR&&(t.style.r=t.style.rawR,delete t.style.rawR))},t.prototype.isPropertyInheritable=function(t){var e=hS[t];return!!e&&e.inh},t}(),hA=function(){function t(){this.parser=pB,this.parserUnmemoize=pz,this.parserWithCSSDisabled=null,this.mixer=pK}return t.prototype.calculator=function(t,e,n,r){return pW(n)},t}(),hT=function(){function t(){}return t.prototype.calculator=function(t,e,n,r,i){return n instanceof pt&&(n=null),i.sceneGraphService.updateDisplayObjectDependency(t,e,n,r),"clipPath"===t&&r.forEach(function(t){0===t.childNodes.length&&i.sceneGraphService.dirtifyToRoot(t)}),n},t}(),hC=function(){function t(){this.parser=pC,this.parserWithCSSDisabled=pC,this.mixer=pN}return t.prototype.calculator=function(t,e,n,r){return n instanceof pt?"none"===n.value?py:pg:n},t}(),hN=function(){function t(){this.parser=pU}return t.prototype.calculator=function(t,e,n){return n instanceof pt?[]:n},t}();function hL(t){var e=t.parsedStyle.fontSize;return cb(e)?null:e}var hI=function(){function t(){this.parser=pF,this.parserUnmemoize=pD,this.parserWithCSSDisabled=null,this.mixer=pK}return t.prototype.calculator=function(t,e,n,r,i){if(cv(n))return n;if(!ps.isRelativeUnit(n.unit))return n.value;var o,a=i.styleValueRegistry;if(n.unit===t1.kPercentage)return 0;if(n.unit===t1.kEms){if(r.parentNode){var l=hL(r.parentNode);if(l)return l*=n.value;a.addUnresolveProperty(r,t)}else a.addUnresolveProperty(r,t);return 0}else if(n.unit===t1.kRems){if(null===(o=null==r?void 0:r.ownerDocument)||void 0===o?void 0:o.documentElement){var l=hL(r.ownerDocument.documentElement);if(l)return l*=n.value;a.addUnresolveProperty(r,t)}else a.addUnresolveProperty(r,t);return 0}},t}(),hR=function(){function t(){this.mixer=pQ}return t.prototype.parser=function(t){var e,n=pG(cv(t)?[t]:t);return e=1===n.length?[n[0],n[0]]:[n[0],n[1]]},t.prototype.calculator=function(t,e,n){return n.map(function(t){return t.value})},t}(),hD=function(){function t(){this.mixer=pQ}return t.prototype.parser=function(t){var e,n=pG(cv(t)?[t]:t);return e=1===n.length?[n[0],n[0],n[0],n[0]]:2===n.length?[n[0],n[1],n[0],n[1]]:3===n.length?[n[0],n[1],n[2],n[1]]:[n[0],n[1],n[2],n[3]]},t.prototype.calculator=function(t,e,n){return n.map(function(t){return t.value})},t}(),hF=uv();function hz(t,e){var n=e.parsedStyle.defX||0,r=e.parsedStyle.defY||0;return e.resetLocalTransform(),e.setLocalPosition(n,r),t.forEach(function(t){var i=t.t,o=t.d;if("scale"===i){var a=(null==o?void 0:o.map(function(t){return t.value}))||[1,1];e.scaleLocal(a[0],a[1],1)}else if("scalex"===i){var a=(null==o?void 0:o.map(function(t){return t.value}))||[1];e.scaleLocal(a[0],1,1)}else if("scaley"===i){var a=(null==o?void 0:o.map(function(t){return t.value}))||[1];e.scaleLocal(1,a[0],1)}else if("scalez"===i){var a=(null==o?void 0:o.map(function(t){return t.value}))||[1];e.scaleLocal(1,1,a[0])}else if("scale3d"===i){var a=(null==o?void 0:o.map(function(t){return t.value}))||[1,1,1];e.scaleLocal(a[0],a[1],a[2])}else if("translate"===i){var l=o||[pu,pu];e.translateLocal(l[0].value,l[1].value,0)}else if("translatex"===i){var l=o||[pu];e.translateLocal(l[0].value,0,0)}else if("translatey"===i){var l=o||[pu];e.translateLocal(0,l[0].value,0)}else if("translatez"===i){var l=o||[pu];e.translateLocal(0,0,l[0].value)}else if("translate3d"===i){var l=o||[pu,pu,pu];e.translateLocal(l[0].value,l[1].value,l[2].value)}else if("rotate"===i){var s=o||[pc];e.rotateLocal(0,0,pW(s[0]))}else if("rotatex"===i){var s=o||[pc];e.rotateLocal(pW(s[0]),0,0)}else if("rotatey"===i){var s=o||[pc];e.rotateLocal(0,pW(s[0]),0)}else if("rotatez"===i){var s=o||[pc];e.rotateLocal(0,0,pW(s[0]))}else if("rotate3d"===i);else if("skew"===i){var u=(null==o?void 0:o.map(function(t){return t.value}))||[0,0];e.setLocalSkew(fI(u[0]),fI(u[1]))}else if("skewx"===i){var u=(null==o?void 0:o.map(function(t){return t.value}))||[0];e.setLocalSkew(fI(u[0]),e.getLocalSkew()[1])}else if("skewy"===i){var u=(null==o?void 0:o.map(function(t){return t.value}))||[0];e.setLocalSkew(e.getLocalSkew()[0],fI(u[0]))}else if("matrix"===i){var c=ol(o.map(function(t){return t.value}),6),f=c[0],p=c[1],h=c[2],d=c[3],y=c[4],g=c[5];e.setLocalTransform(uO(hF,f,p,0,0,h,d,0,0,0,0,1,0,y+n,g+r,0,1))}else"matrix3d"===i&&(uO.apply(eb,ou([hF],ol(o.map(function(t){return t.value})),!1)),hF[12]+=n,hF[13]+=r,e.setLocalTransform(hF))}),e.getLocalTransform()}var hB=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return oe(e,t),e.prototype.postProcessor=function(t,e){switch(t.nodeName){case tX.CIRCLE:case tX.ELLIPSE:var n,r,i,o=t.parsedStyle,a=o.cx,l=o.cy,s=o.cz;!cb(a)&&(n=a),!cb(l)&&(r=l),!cb(s)&&(i=s);break;case tX.LINE:var u=t.parsedStyle,c=u.x1,f=u.x2,p=Math.min(u.y1,u.y2);n=Math.min(c,f),r=p,i=0;break;case tX.RECT:case tX.IMAGE:case tX.GROUP:case tX.HTML:case tX.TEXT:case tX.MESH:!cb(t.parsedStyle.x)&&(n=t.parsedStyle.x),!cb(t.parsedStyle.y)&&(r=t.parsedStyle.y),!cb(t.parsedStyle.z)&&(i=t.parsedStyle.z)}if(t.nodeName!==tX.PATH&&t.nodeName!==tX.POLYLINE&&t.nodeName!==tX.POLYGON&&(t.parsedStyle.defX=n||0,t.parsedStyle.defY=r||0),(!cb(n)||!cb(r)||!cb(i))&&-1===e.indexOf("transform")){var h=t.parsedStyle.transform;if(h&&h.length)hz(h,t);else{var d=ol(t.getLocalPosition(),3),y=d[0],g=d[1],v=d[2];t.setLocalPosition(cb(n)?y:n,cb(r)?g:r,cb(i)?v:i)}}},e}(hI),hW=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){n instanceof pt&&(n=null);var i=null==n?void 0:n.cloneNode(!0);return i&&(i.style.isMarker=!0),i},t}(),h$=function(){function t(){this.mixer=pK,this.parser=pX,this.parserUnmemoize=pY,this.parserWithCSSDisabled=null}return t.prototype.calculator=function(t,e,n){return n.value},t}(),hG=function(){function t(){this.parser=pX,this.parserUnmemoize=pY,this.parserWithCSSDisabled=null,this.mixer=pZ(0,1)}return t.prototype.calculator=function(t,e,n){return n.value},t.prototype.postProcessor=function(t){var e=t.parsedStyle,n=e.offsetPath,r=e.offsetDistance;if(!!n){var i=n.nodeName;if(i===tX.LINE||i===tX.PATH||i===tX.POLYLINE){var o=n.getPoint(r);o&&(t.parsedStyle.defX=o.x,t.parsedStyle.defY=o.y,t.setLocalPosition(o.x,o.y))}}},t}(),hV=function(){function t(){this.parser=pX,this.parserUnmemoize=pY,this.parserWithCSSDisabled=null,this.mixer=pZ(0,1)}return t.prototype.calculator=function(t,e,n){return n.value},t}(),hH=function(){function t(){this.parser=hr,this.parserWithCSSDisabled=hr,this.mixer=hi}return t.prototype.calculator=function(t,e,n){return n instanceof pt&&"unset"===n.value?{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new fX(0,0,0,0)}:n},t.prototype.postProcessor=function(t,e){if(t.parsedStyle.defX=t.parsedStyle.path.rect.x,t.parsedStyle.defY=t.parsedStyle.path.rect.y,t.nodeName===tX.PATH&&-1===e.indexOf("transform")){var n=t.parsedStyle,r=n.defX,i=n.defY;t.setLocalPosition(void 0===r?0:r,void 0===i?0:i)}},t}(),hU=function(){function t(){this.parser=ho,this.mixer=ha}return t.prototype.postProcessor=function(t,e){if((t.nodeName===tX.POLYGON||t.nodeName===tX.POLYLINE)&&-1===e.indexOf("transform")){var n=t.parsedStyle,r=n.defX,i=n.defY;t.setLocalPosition(r,i)}},t}(),hq=function(t){function e(){var e=t.apply(this,ou([],ol(arguments),!1))||this;return e.mixer=pZ(0,1/0),e}return oe(e,t),e}(hI),hY=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){if(n instanceof pt)return"unset"===n.value?"":n.value;return"".concat(n)},t.prototype.postProcessor=function(t){t.nodeValue="".concat(t.parsedStyle.text)||""},t}(),hX=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){var i=r.getAttribute("text");if(i){var o=i;"capitalize"===n.value?o=i.charAt(0).toUpperCase()+i.slice(1):"lowercase"===n.value?o=i.toLowerCase():"uppercase"===n.value&&(o=i.toUpperCase()),r.parsedStyle.text=o}return n.value},t}(),hK={},hZ=0,hQ="undefined"!=typeof window&&void 0!==window.document;function hJ(t,e){var n=Number(t.parsedStyle.zIndex),r=Number(e.parsedStyle.zIndex);if(n===r){var i=t.parentNode;if(i){var o=i.childNodes||[];return o.indexOf(t)-o.indexOf(e)}}return n-r}function h0(t){var e,n=t;do{if(null===(e=n.parsedStyle)||void 0===e?void 0:e.clipPath)return n;n=n.parentElement}while(null!==n);return null}function h1(t,e){if(hQ)return document.defaultView.getComputedStyle(t,null).getPropertyValue(e)}var h2={touchstart:"pointerdown",touchend:"pointerup",touchendoutside:"pointerupoutside",touchmove:"pointermove",touchcancel:"pointercancel"},h5="object"==typeof performance&&performance.now?performance:Date;function h3(t,e,n){var r=!1,i=!1,o=!!e&&!e.isNone,a=!!n&&!n.isNone;return"visiblepainted"===t||"painted"===t||"auto"===t?(r=o,i=a):"visiblefill"===t||"fill"===t?r=!0:"visiblestroke"===t||"stroke"===t?i=!0:("visible"===t||"all"===t)&&(r=!0,i=!0),[r,i]}var h4=1,h6="object"==typeof self&&self.self==self?self:"object"==typeof n.g&&n.g.global==n.g?n.g:{},h8=Date.now(),h9={},h7=Date.now(),dt=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function");var e=Date.now(),n=e-h7,r=h4++;return(h9[r]=t,Object.keys(h9).length>1)?r:(setTimeout(function(){h7=e;var t=h9;h9={},Object.keys(t).forEach(function(e){return t[e](h6.performance&&"function"==typeof h6.performance.now?h6.performance.now():Date.now()-h8)})},n>16?0:16-n),r)},de=function(t){delete h9[t]},dn=function(t){return"string"!=typeof t?dt:""===t?h6.requestAnimationFrame:h6[t+"RequestAnimationFrame"]},dr=function(t,e){for(var n=0;void 0!==t[n];){if(e(t[n]))return t[n];n+=1}}(["","webkit","moz","ms","o"],function(t){return!!dn(t)}),di=dn(dr);var da="string"!=typeof(P=dr)?de:""===P?h6.cancelAnimationFrame:h6[P+"CancelAnimationFrame"]||h6[P+"CancelRequestAnimationFrame"];h6.requestAnimationFrame=di,h6.cancelAnimationFrame=da;var dl=function(){function t(){this.callbacks=[]}return t.prototype.getCallbacksNum=function(){return this.callbacks.length},t.prototype.tapPromise=function(t,e){this.callbacks.push(e)},t.prototype.promise=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Promise.all(this.callbacks.map(function(e){return e.apply(void 0,ou([],ol(t),!1))}))},t}(),ds=function(){function t(){this.callbacks=[]}return t.prototype.tapPromise=function(t,e){this.callbacks.push(e)},t.prototype.promise=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return oi(this,void 0,void 0,function(){var e,n,r;return oo(this,function(i){switch(i.label){case 0:if(!this.callbacks.length)return[3,6];return[4,(r=this.callbacks)[0].apply(r,ou([],ol(t),!1))];case 1:e=i.sent(),n=0,i.label=2;case 2:if(!(n<this.callbacks.length-1))return[3,5];return[4,(0,this.callbacks[n])(e)];case 3:e=i.sent(),i.label=4;case 4:return n++,[3,2];case 5:return[2,e];case 6:return[2,null]}})})},t}(),du=function(){function t(){this.callbacks=[]}return t.prototype.tap=function(t,e){this.callbacks.push(e)},t.prototype.call=function(){var t=arguments;this.callbacks.forEach(function(e){e.apply(void 0,t)})},t}(),dc=function(){function t(){this.callbacks=[]}return t.prototype.tap=function(t,e){this.callbacks.push(e)},t.prototype.call=function(){if(this.callbacks.length){for(var t=arguments,e=this.callbacks[0].apply(void 0,t),n=0;n<this.callbacks.length-1;n++)e=(0,this.callbacks[n])(e);return e}return null},t}(),df=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],dp=/([\"\'])[^\'\"]+\1/,dh=function(){function t(){this.parser=hc,this.parserUnmemoize=hf,this.parserWithCSSDisabled=hf,this.mixer=hx}return t.prototype.calculator=function(t,e,n,r){return n instanceof pt?[]:n},t.prototype.postProcessor=function(t){hz(t.parsedStyle.transform,t)},t}(),dd=function(){this.parser=hO,this.parserUnmemoize=hw},dy=function(){function t(){this.parser=pX,this.parserUnmemoize=pY}return t.prototype.calculator=function(t,e,n,r){return n.value},t.prototype.postProcessor=function(t){if(t.parentNode){var e=t.parentNode,n=e.renderable,r=e.sortable;n&&(n.dirty=!0),r&&(r.dirty=!0,r.dirtyReason=t7.Z_INDEX_CHANGED)}},t}(),dg=function(){function t(){}return t.prototype.update=function(t,e){var n=t.r;return{width:2*n,height:2*n}},t}(),dv=function(){function t(){}return t.prototype.update=function(t,e){var n=t.rx,r=t.ry;return{width:2*n,height:2*r}},t}(),dm=function(){function t(){}return t.prototype.update=function(t){var e=t.x1,n=t.y1,r=t.x2,i=t.y2,o=Math.min(e,r),a=Math.max(e,r),l=Math.min(n,i),s=Math.max(n,i);return{width:a-o,height:s-l}},t}(),db=function(){function t(){}return t.prototype.update=function(t){var e=t.path.rect;return{width:e.width,height:e.height}},t}(),dx=function(){function t(){}return t.prototype.update=function(t){if(t.points&&cD(t.points.points)){var e=t.points.points,n=Math.min.apply(Math,ou([],ol(e.map(function(t){return t[0]})),!1)),r=Math.max.apply(Math,ou([],ol(e.map(function(t){return t[0]})),!1)),i=Math.min.apply(Math,ou([],ol(e.map(function(t){return t[1]})),!1)),o=Math.max.apply(Math,ou([],ol(e.map(function(t){return t[1]})),!1));return{width:r-n,height:o-i}}return{width:0,height:0}},t}(),dO=function(){function t(){}return t.prototype.update=function(t,e){var n=t.img,r=t.width,i=t.height,o=void 0===r?0:r,a=void 0===i?0:i;return n&&!cx(n)&&(!o&&(o=n.width,t.width=o),!a&&(a=n.height,t.height=a)),{width:o,height:a}},t}(),dw=function(){function t(t){this.globalRuntime=t}return t.prototype.isReadyToMeasure=function(t,e){var n=t.text,r=t.textAlign,i=t.textBaseline,o=t.fontSize,a=t.fontStyle,l=t.fontWeight,s=t.fontVariant,u=t.lineWidth;return n&&o&&a&&l&&s&&r&&i&&!cb(u)},t.prototype.update=function(t,e){var n,r,i=t.text,o=t.textAlign,a=t.lineWidth,l=t.textBaseline,s=t.dx,u=t.dy;if(!this.isReadyToMeasure(t,e))return t.metrics={font:"",width:0,height:0,lines:[],lineWidths:[],lineHeight:0,maxLineWidth:0,fontProperties:{ascent:0,descent:0,fontSize:0},lineMetrics:[]},{width:0,height:0,x:0,y:0,offsetX:0,offsetY:0};var c=((null===(r=null===(n=null==e?void 0:e.ownerDocument)||void 0===n?void 0:n.defaultView)||void 0===r?void 0:r.getConfig())||{}).offscreenCanvas,f=this.globalRuntime.textService.measureText(i,t,c);t.metrics=f;var p=f.width,h=f.height,d=f.lineHeight,y=f.fontProperties,g=[p/2,h/2,0],v=[0,1],m=0;"center"===o||"middle"===o?(m=a/2,v=[.5,1]):("right"===o||"end"===o)&&(m=a,v=[1,1]);var b=0;return"middle"===l?b=g[1]:"top"===l||"hanging"===l?b=2*g[1]:"alphabetic"===l?b=this.globalRuntime.enableCSSParsing?d-y.ascent:0:("bottom"===l||"ideographic"===l)&&(b=0),s&&(m+=s),u&&(b+=u),t.anchor=[v[0],v[1],0],{width:2*g[0],height:2*g[1],offsetX:m,offsetY:b}},t}(),dE=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 fY,this.page=new fY,this.canvas=new fY,this.viewport=new fY,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 Error(fK)},t}(),dk=function(t){function e(){var e=t.apply(this,ou([],ol(arguments),!1))||this;return e.client=new fY,e.movement=new fY,e.offset=new fY,e.global=new fY,e.screen=new fY,e}return oe(e,t),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(t){return"getModifierState"in this.nativeEvent&&this.nativeEvent.getModifierState(t)},e.prototype.initMouseEvent=function(){throw Error(fK)},e}(dE),dM=function(t){function e(){var e=t.apply(this,ou([],ol(arguments),!1))||this;return e.width=0,e.height=0,e.isPrimary=!1,e}return oe(e,t),e.prototype.getCoalescedEvents=function(){return"pointermove"===this.type||"mousemove"===this.type||"touchmove"===this.type?[this]:[]},e.prototype.getPredictedEvents=function(){throw Error("getPredictedEvents is not supported!")},e.prototype.clone=function(){return this.manager.clonePointerEvent(this)},e}(dk),dS=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return oe(e,t),e.prototype.clone=function(){return this.manager.cloneWheelEvent(this)},e}(dk),d_=function(t){function e(e,n){var r=t.call(this,null)||this;return r.type=e,r.detail=n,Object.assign(r,n),r}return oe(e,t),e}(dE),dP=function(){function t(){this.emitter=new ut}return t.prototype.on=function(t,e,n){return this.addEventListener(t,e,n),this},t.prototype.addEventListener=function(t,e,n){var r=cU(n)&&n||cq(n)&&n.capture,i=cq(n)&&n.once,o=pr(e)?void 0:e,a=!1,l="";if(t.indexOf(":")>-1){var s=ol(t.split(":"),2),u=s[0];t=s[1],l=u,a=!0}if(t=r?"".concat(t,"capture"):t,e=pr(e)?e:e.handleEvent,a){var c=e;e=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];if((null===(t=e[0].target)||void 0===t?void 0:t.name)===l)c.apply(void 0,ou([],ol(e),!1))}}return i?this.emitter.once(t,e,o):this.emitter.on(t,e,o),this},t.prototype.off=function(t,e,n){return t?this.removeEventListener(t,e,n):this.removeAllEventListeners(),this},t.prototype.removeAllEventListeners=function(){this.emitter.removeAllListeners()},t.prototype.removeEventListener=function(t,e,n){var r=cU(n)&&n||cq(n)&&n.capture,i=pr(e)?void 0:e;return t=r?"".concat(t,"capture"):t,e=pr(e)?e:null==e?void 0:e.handleEvent,this.emitter.off(t,e,i),this},t.prototype.emit=function(t,e){this.dispatchEvent(new d_(t,e))},t.prototype.dispatchEvent=function(t,e){var n,r,i;if(void 0===e&&(e=!1),!t.type)throw Error("DisplayObject cannot propagate events outside of the Federated Events API");if(i=this.document?this:this.defaultView?this.defaultView:null===(n=this.ownerDocument)||void 0===n?void 0:n.defaultView){if(t.manager=i.getEventService()||null,!t.manager)return!1;t.defaultPrevented=!1,t.path=[],!e&&(t.target=this),null===(r=t.manager)||void 0===r||r.dispatchEvent(t,t.type,e)}return!t.defaultPrevented},t}(),dj=function(t){function e(){var e=t.apply(this,ou([],ol(arguments),!1))||this;return e.shadow=!1,e.ownerDocument=null,e.isConnected=!1,e.baseURI="",e.childNodes=[],e.nodeType=0,e.nodeName="",e.nodeValue=null,e.parentNode=null,e}return oe(e,t),e.isNode=function(t){return!!t.childNodes},Object.defineProperty(e.prototype,"textContent",{get:function(){var t,e,n="";this.nodeName===tX.TEXT&&(n+=this.style.text);try{for(var r=oa(this.childNodes),i=r.next();!i.done;i=r.next()){var o=i.value;o.nodeName===tX.TEXT?n+=o.nodeValue:n+=o.textContent}}catch(e){t={error:e}}finally{try{i&&!i.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}return n},set:function(t){var e=this;this.childNodes.slice().forEach(function(t){e.removeChild(t)}),this.nodeName===tX.TEXT&&(this.style.text="".concat(t))},enumerable:!1,configurable:!0}),e.prototype.getRootNode=function(t){return(void 0===t&&(t={}),this.parentNode)?this.parentNode.getRootNode(t):t.composed&&this.host?this.host.getRootNode(t):this},e.prototype.hasChildNodes=function(){return this.childNodes.length>0},e.prototype.isDefaultNamespace=function(t){throw Error(fK)},e.prototype.lookupNamespaceURI=function(t){throw Error(fK)},e.prototype.lookupPrefix=function(t){throw Error(fK)},e.prototype.normalize=function(){throw Error(fK)},e.prototype.isEqualNode=function(t){return this===t},e.prototype.isSameNode=function(t){return this.isEqualNode(t)},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(t){if(t===this)return 0;for(var n,r=t,i=this,o=[r],a=[i];null!==(n=r.parentNode)&&void 0!==n?n:i.parentNode;)r=r.parentNode?(o.push(r.parentNode),r.parentNode):r,i=i.parentNode?(a.push(i.parentNode),i.parentNode):i;if(r!==i)return e.DOCUMENT_POSITION_DISCONNECTED|e.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC|e.DOCUMENT_POSITION_PRECEDING;var l=o.length>a.length?o:a,s=l===o?a:o;if(l[l.length-s.length]===s[0])return l===o?e.DOCUMENT_POSITION_CONTAINED_BY|e.DOCUMENT_POSITION_FOLLOWING:e.DOCUMENT_POSITION_CONTAINS|e.DOCUMENT_POSITION_PRECEDING;for(var u=l.length-s.length,c=s.length-1;c>=0;c--){var f=s[c],p=l[u+c];if(p!==f){var h=f.parentNode.childNodes;if(h.indexOf(f)<h.indexOf(p)){if(s===o)return e.DOCUMENT_POSITION_PRECEDING;break}if(l===o)return e.DOCUMENT_POSITION_PRECEDING;break}}return e.DOCUMENT_POSITION_FOLLOWING},e.prototype.contain=function(t){return this.contains(t)},e.prototype.contains=function(t){for(var e=t;e&&this!==e;)e=e.parentNode;return!!e},e.prototype.getAncestor=function(t){for(var e=this;t>0&&e;)e=e.parentNode,t--;return e},e.prototype.forEach=function(t,e){void 0===e&&(e=!1),!t(this)&&(e?this.childNodes.slice():this.childNodes).forEach(function(e){e.forEach(t)})},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}(dP),dA=function(){function t(t,e){var n=this;this.globalRuntime=t,this.context=e,this.emitter=new ut,this.nativeHTMLMap=new WeakMap,this.cursor="default",this.mappingTable={},this.mappingState={trackingData:{}},this.eventPool=new Map,this.tmpMatrix=uv(),this.tmpVec3=un(),this.onPointerDown=function(t){var e=n.createPointerEvent(t);if(n.dispatchEvent(e,"pointerdown"),"touch"===e.pointerType)n.dispatchEvent(e,"touchstart");else if("mouse"===e.pointerType||"pen"===e.pointerType){var r=2===e.button;n.dispatchEvent(e,r?"rightdown":"mousedown")}n.trackingData(t.pointerId).pressTargetsByButton[t.button]=e.composedPath(),n.freeEvent(e)},this.onPointerUp=function(t){var e,r=h5.now(),i=n.createPointerEvent(t,void 0,void 0,n.context.config.alwaysTriggerPointerEventOnCanvas?n.rootTarget:void 0);if(n.dispatchEvent(i,"pointerup"),"touch"===i.pointerType)n.dispatchEvent(i,"touchend");else if("mouse"===i.pointerType||"pen"===i.pointerType){var o=2===i.button;n.dispatchEvent(i,o?"rightup":"mouseup")}var a=n.trackingData(t.pointerId),l=n.findMountedTarget(a.pressTargetsByButton[t.button]),s=l;if(l&&!i.composedPath().includes(l)){for(var u=l;u&&!i.composedPath().includes(u);){if(i.currentTarget=u,n.notifyTarget(i,"pointerupoutside"),"touch"===i.pointerType)n.notifyTarget(i,"touchendoutside");else if("mouse"===i.pointerType||"pen"===i.pointerType){var o=2===i.button;n.notifyTarget(i,o?"rightupoutside":"mouseupoutside")}dj.isNode(u)&&(u=u.parentNode)}delete a.pressTargetsByButton[t.button],s=u}if(s){var c=n.clonePointerEvent(i,"click");c.target=s,c.path=[],!a.clicksByButton[t.button]&&(a.clicksByButton[t.button]={clickCount:0,target:c.target,timeStamp:r});var f=a.clicksByButton[t.button];f.target===c.target&&r-f.timeStamp<200?++f.clickCount:f.clickCount=1,f.target=c.target,f.timeStamp=r,c.detail=f.clickCount,!(null===(e=i.detail)||void 0===e?void 0:e.preventClick)&&(!n.context.config.useNativeClickEvent&&("mouse"===c.pointerType||"touch"===c.pointerType)&&n.dispatchEvent(c,"click"),n.dispatchEvent(c,"pointertap")),n.freeEvent(c)}n.freeEvent(i)},this.onPointerMove=function(t){var e=n.createPointerEvent(t,void 0,void 0,n.context.config.alwaysTriggerPointerEventOnCanvas?n.rootTarget:void 0),r="mouse"===e.pointerType||"pen"===e.pointerType,i=n.trackingData(t.pointerId),o=n.findMountedTarget(i.overTargets);if(i.overTargets&&o!==e.target){var a="mousemove"===t.type?"mouseout":"pointerout",l=n.createPointerEvent(t,a,o||void 0);if(n.dispatchEvent(l,"pointerout"),r&&n.dispatchEvent(l,"mouseout"),!e.composedPath().includes(o)){var s=n.createPointerEvent(t,"pointerleave",o||void 0);for(s.eventPhase=s.AT_TARGET;s.target&&!e.composedPath().includes(s.target);)s.currentTarget=s.target,n.notifyTarget(s),r&&n.notifyTarget(s,"mouseleave"),dj.isNode(s.target)&&(s.target=s.target.parentNode);n.freeEvent(s)}n.freeEvent(l)}if(o!==e.target){var u="mousemove"===t.type?"mouseover":"pointerover",c=n.clonePointerEvent(e,u);n.dispatchEvent(c,"pointerover"),r&&n.dispatchEvent(c,"mouseover");for(var f=o&&dj.isNode(o)&&o.parentNode;f&&f!==(dj.isNode(n.rootTarget)&&n.rootTarget.parentNode)&&f!==e.target;){;f=f.parentNode}if(!f||f===(dj.isNode(n.rootTarget)&&n.rootTarget.parentNode)){var p=n.clonePointerEvent(e,"pointerenter");for(p.eventPhase=p.AT_TARGET;p.target&&p.target!==o&&p.target!==(dj.isNode(n.rootTarget)&&n.rootTarget.parentNode);)p.currentTarget=p.target,n.notifyTarget(p),r&&n.notifyTarget(p,"mouseenter"),dj.isNode(p.target)&&(p.target=p.target.parentNode);n.freeEvent(p)}n.freeEvent(c)}n.dispatchEvent(e,"pointermove"),"touch"===e.pointerType&&n.dispatchEvent(e,"touchmove"),r&&(n.dispatchEvent(e,"mousemove"),n.cursor=n.getCursor(e.target)),i.overTargets=e.composedPath(),n.freeEvent(e)},this.onPointerOut=function(t){var e=n.trackingData(t.pointerId);if(e.overTargets){var r="mouse"===t.pointerType||"pen"===t.pointerType,i=n.findMountedTarget(e.overTargets),o=n.createPointerEvent(t,"pointerout",i||void 0);n.dispatchEvent(o),r&&n.dispatchEvent(o,"mouseout");var a=n.createPointerEvent(t,"pointerleave",i||void 0);for(a.eventPhase=a.AT_TARGET;a.target&&a.target!==(dj.isNode(n.rootTarget)&&n.rootTarget.parentNode);)a.currentTarget=a.target,n.notifyTarget(a),r&&n.notifyTarget(a,"mouseleave"),dj.isNode(a.target)&&(a.target=a.target.parentNode);e.overTargets=null,n.freeEvent(o),n.freeEvent(a)}n.cursor=null},this.onPointerOver=function(t){var e=n.trackingData(t.pointerId),r=n.createPointerEvent(t),i="mouse"===r.pointerType||"pen"===r.pointerType;n.dispatchEvent(r,"pointerover"),i&&n.dispatchEvent(r,"mouseover"),"mouse"===r.pointerType&&(n.cursor=n.getCursor(r.target));var o=n.clonePointerEvent(r,"pointerenter");for(o.eventPhase=o.AT_TARGET;o.target&&o.target!==(dj.isNode(n.rootTarget)&&n.rootTarget.parentNode);)o.currentTarget=o.target,n.notifyTarget(o),i&&n.notifyTarget(o,"mouseenter"),dj.isNode(o.target)&&(o.target=o.target.parentNode);e.overTargets=r.composedPath(),n.freeEvent(r),n.freeEvent(o)},this.onPointerUpOutside=function(t){var e=n.trackingData(t.pointerId),r=n.findMountedTarget(e.pressTargetsByButton[t.button]),i=n.createPointerEvent(t);if(r){for(var o=r;o;)i.currentTarget=o,n.notifyTarget(i,"pointerupoutside"),"touch"===i.pointerType||("mouse"===i.pointerType||"pen"===i.pointerType)&&n.notifyTarget(i,2===i.button?"rightupoutside":"mouseupoutside"),dj.isNode(o)&&(o=o.parentNode);delete e.pressTargetsByButton[t.button]}n.freeEvent(i)},this.onWheel=function(t){var e=n.createWheelEvent(t);n.dispatchEvent(e),n.freeEvent(e)},this.onClick=function(t){if(n.context.config.useNativeClickEvent){var e=n.createPointerEvent(t);n.dispatchEvent(e),n.freeEvent(e)}},this.onPointerCancel=function(t){var e=n.createPointerEvent(t,void 0,void 0,n.context.config.alwaysTriggerPointerEventOnCanvas?n.rootTarget:void 0);n.dispatchEvent(e),n.freeEvent(e)}}return t.prototype.init=function(){this.rootTarget=this.context.renderingContext.root.parentNode,this.addEventMapping("pointerdown",this.onPointerDown),this.addEventMapping("pointerup",this.onPointerUp),this.addEventMapping("pointermove",this.onPointerMove),this.addEventMapping("pointerout",this.onPointerOut),this.addEventMapping("pointerleave",this.onPointerOut),this.addEventMapping("pointercancel",this.onPointerCancel),this.addEventMapping("pointerover",this.onPointerOver),this.addEventMapping("pointerupoutside",this.onPointerUpOutside),this.addEventMapping("wheel",this.onWheel),this.addEventMapping("click",this.onClick)},t.prototype.destroy=function(){this.emitter.removeAllListeners(),this.mappingTable={},this.mappingState={},this.eventPool.clear()},t.prototype.client2Viewport=function(t){var e=this.context.contextService.getBoundingClientRect();return new fY(t.x-((null==e?void 0:e.left)||0),t.y-((null==e?void 0:e.top)||0))},t.prototype.viewport2Client=function(t){var e=this.context.contextService.getBoundingClientRect();return new fY(t.x+((null==e?void 0:e.left)||0),t.y+((null==e?void 0:e.top)||0))},t.prototype.viewport2Canvas=function(t){var e=t.x,n=t.y,r=this.rootTarget.defaultView.getCamera(),i=this.context.config,o=i.width,a=i.height,l=r.getPerspectiveInverse(),s=r.getWorldTransform(),u=u_(this.tmpMatrix,s,l),c=ul(this.tmpVec3,e/o*2-1,(1-n/a)*2-1,0);return ud(c,c,u),new fY(c[0],c[1])},t.prototype.canvas2Viewport=function(t){var e=this.rootTarget.defaultView.getCamera(),n=e.getPerspective(),r=e.getViewTransform(),i=u_(this.tmpMatrix,n,r),o=ul(this.tmpVec3,t.x,t.y,0);ud(this.tmpVec3,this.tmpVec3,i);var a=this.context.config,l=a.width,s=a.height;return new fY((o[0]+1)/2*l,(1-(o[1]+1)/2)*s)},t.prototype.setPickHandler=function(t){this.pickHandler=t},t.prototype.addEventMapping=function(t,e){!this.mappingTable[t]&&(this.mappingTable[t]=[]),this.mappingTable[t].push({fn:e,priority:0}),this.mappingTable[t].sort(function(t,e){return t.priority-e.priority})},t.prototype.mapEvent=function(t){if(!!this.rootTarget){var e=this.mappingTable[t.type];if(e)for(var n=0,r=e.length;n<r;n++)e[n].fn(t);else console.warn("[EventService]: Event mapping not defined for ".concat(t.type))}},t.prototype.dispatchEvent=function(t,e,n){if(n){t.eventPhase=t.AT_TARGET;var r=this.rootTarget.defaultView||null;t.currentTarget=r,this.notifyListeners(t,e)}else t.propagationStopped=!1,t.propagationImmediatelyStopped=!1,this.propagate(t,e);this.emitter.emit(e||t.type,t)},t.prototype.propagate=function(t,e){if(!!t.target){var n=t.composedPath();t.eventPhase=t.CAPTURING_PHASE;for(var r=n.length-1;r>=1;r--)if(t.currentTarget=n[r],this.notifyTarget(t,e),t.propagationStopped||t.propagationImmediatelyStopped)return;if(t.eventPhase=t.AT_TARGET,t.currentTarget=t.target,this.notifyTarget(t,e),!t.propagationStopped&&!t.propagationImmediatelyStopped){var i=n.indexOf(t.currentTarget);t.eventPhase=t.BUBBLING_PHASE;for(var r=i+1;r<n.length;r++)if(t.currentTarget=n[r],this.notifyTarget(t,e),t.propagationStopped||t.propagationImmediatelyStopped)return}}},t.prototype.propagationPath=function(t){var e=[t],n=this.rootTarget.defaultView||null;if(n&&n===t)return e.unshift(n.document),e;for(var r=0;r<2048&&t!==this.rootTarget;r++)dj.isNode(t)&&t.parentNode&&(e.push(t.parentNode),t=t.parentNode);return n&&e.push(n),e},t.prototype.hitTest=function(t){var e=t.viewportX,n=t.viewportY,r=this.context.config,i=r.width,o=r.height,a=r.disableHitTesting;return e<0||n<0||e>i||n>o?null:!a&&this.pickHandler(t)||this.rootTarget||null},t.prototype.isNativeEventFromCanvas=function(t){var e,n=this.context.contextService.getDomElement(),r=null===(e=t.nativeEvent)||void 0===e?void 0:e.target;if(r){if(r===n)return!0;if(n&&n.contains)return n.contains(r)}return!!t.nativeEvent.composedPath&&t.nativeEvent.composedPath().indexOf(n)>-1},t.prototype.getExistedHTML=function(t){var e,n;if(t.nativeEvent.composedPath)try{for(var r=oa(t.nativeEvent.composedPath()),i=r.next();!i.done;i=r.next()){var o=i.value,a=this.nativeHTMLMap.get(o);if(a)return a}}catch(t){e={error:t}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}return null},t.prototype.pickTarget=function(t){return this.hitTest({clientX:t.clientX,clientY:t.clientY,viewportX:t.viewportX,viewportY:t.viewportY,x:t.canvasX,y:t.canvasY})},t.prototype.createPointerEvent=function(t,e,n,r){var i=this.allocateEvent(dM);this.copyPointerData(t,i),this.copyMouseData(t,i),this.copyData(t,i),i.nativeEvent=t.nativeEvent,i.originalEvent=t;var o=this.getExistedHTML(i);return i.target=null!=n?n:o||this.isNativeEventFromCanvas(i)&&this.pickTarget(i)||r,"string"==typeof e&&(i.type=e),i},t.prototype.createWheelEvent=function(t){var e=this.allocateEvent(dS);this.copyWheelData(t,e),this.copyMouseData(t,e),this.copyData(t,e),e.nativeEvent=t.nativeEvent,e.originalEvent=t;var n=this.getExistedHTML(e);return e.target=n||this.isNativeEventFromCanvas(e)&&this.pickTarget(e),e},t.prototype.trackingData=function(t){return!this.mappingState.trackingData[t]&&(this.mappingState.trackingData[t]={pressTargetsByButton:{},clicksByButton:{},overTarget:null}),this.mappingState.trackingData[t]},t.prototype.cloneWheelEvent=function(t){var e=this.allocateEvent(dS);return e.nativeEvent=t.nativeEvent,e.originalEvent=t.originalEvent,this.copyWheelData(t,e),this.copyMouseData(t,e),this.copyData(t,e),e.target=t.target,e.path=t.composedPath().slice(),e.type=t.type,e},t.prototype.clonePointerEvent=function(t,e){var n=this.allocateEvent(dM);return n.nativeEvent=t.nativeEvent,n.originalEvent=t.originalEvent,this.copyPointerData(t,n),this.copyMouseData(t,n),this.copyData(t,n),n.target=t.target,n.path=t.composedPath().slice(),n.type=null!=e?e:n.type,n},t.prototype.copyPointerData=function(t,e){e.pointerId=t.pointerId,e.width=t.width,e.height=t.height,e.isPrimary=t.isPrimary,e.pointerType=t.pointerType,e.pressure=t.pressure,e.tangentialPressure=t.tangentialPressure,e.tiltX=t.tiltX,e.tiltY=t.tiltY,e.twist=t.twist},t.prototype.copyMouseData=function(t,e){e.altKey=t.altKey,e.button=t.button,e.buttons=t.buttons,e.ctrlKey=t.ctrlKey,e.metaKey=t.metaKey,e.shiftKey=t.shiftKey,e.client.copyFrom(t.client),e.movement.copyFrom(t.movement),e.canvas.copyFrom(t.canvas),e.screen.copyFrom(t.screen),e.global.copyFrom(t.global),e.offset.copyFrom(t.offset)},t.prototype.copyWheelData=function(t,e){e.deltaMode=t.deltaMode,e.deltaX=t.deltaX,e.deltaY=t.deltaY,e.deltaZ=t.deltaZ},t.prototype.copyData=function(t,e){e.isTrusted=t.isTrusted,e.timeStamp=h5.now(),e.type=t.type,e.detail=t.detail,e.view=t.view,e.page.copyFrom(t.page),e.viewport.copyFrom(t.viewport)},t.prototype.allocateEvent=function(t){!this.eventPool.has(t)&&this.eventPool.set(t,[]);var e=this.eventPool.get(t).pop()||new t(this);return e.eventPhase=e.NONE,e.currentTarget=null,e.path=[],e.target=null,e},t.prototype.freeEvent=function(t){if(t.manager!==this)throw Error("It is illegal to free an event not managed by this EventBoundary!");var e=t.constructor;!this.eventPool.has(e)&&this.eventPool.set(e,[]),this.eventPool.get(e).push(t)},t.prototype.notifyTarget=function(t,e){e=null!=e?e:t.type;var n=t.eventPhase===t.CAPTURING_PHASE||t.eventPhase===t.AT_TARGET?"".concat(e,"capture"):e;this.notifyListeners(t,n),t.eventPhase===t.AT_TARGET&&this.notifyListeners(t,e)},t.prototype.notifyListeners=function(t,e){var n=t.currentTarget.emitter,r=n._events[e];if(r){if("fn"in r)r.once&&n.removeListener(e,r.fn,void 0,!0),r.fn.call(t.currentTarget||r.context,t);else for(var i=0;i<r.length&&!t.propagationImmediatelyStopped;i++)r[i].once&&n.removeListener(e,r[i].fn,void 0,!0),r[i].fn.call(t.currentTarget||r[i].context,t)}},t.prototype.findMountedTarget=function(t){if(!t)return null;for(var e=t[t.length-1],n=t.length-2;n>=0;n--){var r=t[n];if(r===this.rootTarget||dj.isNode(r)&&r.parentNode===e)e=t[n];else break}return e},t.prototype.getCursor=function(t){for(var e=t;e;){var n=!!e.getAttribute&&e.getAttribute("cursor");if(n)return n;e=dj.isNode(e)&&e.parentNode}},t}(),dT=function(){function t(){}return t.prototype.getOrCreateCanvas=function(t,e){if(this.canvas)return this.canvas;if(t||dX.offscreenCanvas)this.canvas=t||dX.offscreenCanvas,this.context=this.canvas.getContext("2d",on({willReadFrequently:!0},e));else try{this.canvas=new window.OffscreenCanvas(0,0),this.context=this.canvas.getContext("2d",on({willReadFrequently:!0},e)),(!this.context||!this.context.measureText)&&(this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"))}catch(t){this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d",on({willReadFrequently:!0},e))}return this.canvas.width=10,this.canvas.height=10,this.canvas},t.prototype.getOrCreateContext=function(t,e){return this.context?this.context:(this.getOrCreateCanvas(t,e),this.context)},t}();(j=ee||(ee={}))[j.CAMERA_CHANGED=0]="CAMERA_CHANGED",j[j.DISPLAY_OBJECT_CHANGED=1]="DISPLAY_OBJECT_CHANGED",j[j.NONE=2]="NONE";var dC=function(){function t(t,e){this.globalRuntime=t,this.context=e,this.inited=!1,this.stats={total:0,rendered:0},this.zIndexCounter=0,this.hooks={init:new du,initAsync:new dl,dirtycheck:new dc,cull:new dc,beginFrame:new du,beforeRender:new du,render:new du,afterRender:new du,endFrame:new du,destroy:new du,pick:new ds,pickSync:new dc,pointerDown:new du,pointerUp:new du,pointerMove:new du,pointerOut:new du,pointerOver:new du,pointerWheel:new du,pointerCancel:new du,click:new du}}return t.prototype.init=function(t){var e=this,n=on(on({},this.globalRuntime),this.context);this.context.renderingPlugins.forEach(function(t){t.apply(n,e.globalRuntime)}),this.hooks.init.call(),0===this.hooks.initAsync.getCallbacksNum()?(this.inited=!0,t()):this.hooks.initAsync.promise().then(function(){e.inited=!0,t()})},t.prototype.getStats=function(){return this.stats},t.prototype.disableDirtyRectangleRendering=function(){return!this.context.config.renderer.getConfig().enableDirtyRectangleRendering||this.context.renderingContext.renderReasons.has(ee.CAMERA_CHANGED)},t.prototype.render=function(t,e){var n=this;this.stats.total=0,this.stats.rendered=0,this.zIndexCounter=0;var r=this.context.renderingContext;if(this.globalRuntime.sceneGraphService.syncHierarchy(r.root),this.globalRuntime.sceneGraphService.triggerPendingEvents(),r.renderReasons.size&&this.inited){r.dirtyRectangleRenderingDisabled=this.disableDirtyRectangleRendering();var i=1===r.renderReasons.size&&r.renderReasons.has(ee.CAMERA_CHANGED),o=!t.disableRenderHooks||!(t.disableRenderHooks&&i);o&&this.renderDisplayObject(r.root,t,r),this.hooks.beginFrame.call(),o&&r.renderListCurrentFrame.forEach(function(t){n.hooks.beforeRender.call(t),n.hooks.render.call(t),n.hooks.afterRender.call(t)}),this.hooks.endFrame.call(),r.renderListCurrentFrame=[],r.renderReasons.clear(),e()}},t.prototype.renderDisplayObject=function(t,e,n){var r=this,i=e.renderer.getConfig(),o=i.enableDirtyCheck,a=i.enableCulling;this.globalRuntime.enableCSSParsing&&this.globalRuntime.styleValueRegistry.recalc(t);var l=t.renderable,s=o?l.dirty||n.dirtyRectangleRenderingDisabled?t:null:t;if(s){var u=a?this.hooks.cull.call(s,this.context.camera):s;u&&(this.stats.rendered++,n.renderListCurrentFrame.push(u))}t.renderable.dirty=!1,t.sortable.renderOrder=this.zIndexCounter++,this.stats.total++;var c=t.sortable;c.dirty&&(this.sort(t,c),c.dirty=!1,c.dirtyChildren=[],c.dirtyReason=void 0),(c.sorted||t.childNodes).forEach(function(t){r.renderDisplayObject(t,e,n)})},t.prototype.sort=function(t,e){e.sorted&&e.dirtyReason!==t7.Z_INDEX_CHANGED?e.dirtyChildren.forEach(function(n){if(-1===t.childNodes.indexOf(n)){var r=e.sorted.indexOf(n);r>=0&&e.sorted.splice(r,1)}else if(0===e.sorted.length)e.sorted.push(n);else{var i=function(t,e){for(var n=0,r=t.length;n<r;){var i=n+r>>>1;0>hJ(t[i],e)?n=i+1:r=i}return n}(e.sorted,n);e.sorted.splice(i,0,n)}}):e.sorted=t.childNodes.slice().sort(hJ)},t.prototype.destroy=function(){this.inited=!1,this.hooks.destroy.call(),this.globalRuntime.sceneGraphService.clearPendingEvents()},t.prototype.dirtify=function(){this.context.renderingContext.renderReasons.add(ee.DISPLAY_OBJECT_CHANGED)},t}(),dN=/\[\s*(.*)=(.*)\s*\]/,dL=function(){function t(){}return t.prototype.selectOne=function(t,e){var n=this;if(t.startsWith("."))return e.find(function(e){return((null==e?void 0:e.classList)||[]).indexOf(n.getIdOrClassname(t))>-1});if(t.startsWith("#"))return e.find(function(e){return e.id===n.getIdOrClassname(t)});if(!t.startsWith("["))return e.find(function(n){return e!==n&&n.nodeName===t});else{var r=this.getAttribute(t),i=r.name,o=r.value;return i?e.find(function(t){return e!==t&&("name"===i?t.name===o:n.attributeToString(t,i)===o)}):null}},t.prototype.selectAll=function(t,e){var n=this;if(t.startsWith("."))return e.findAll(function(r){return e!==r&&((null==r?void 0:r.classList)||[]).indexOf(n.getIdOrClassname(t))>-1});if(t.startsWith("#"))return e.findAll(function(r){return e!==r&&r.id===n.getIdOrClassname(t)});if(!t.startsWith("["))return e.findAll(function(n){return e!==n&&n.nodeName===t});else{var r=this.getAttribute(t),i=r.name,o=r.value;return i?e.findAll(function(t){return e!==t&&("name"===i?t.name===o:n.attributeToString(t,i)===o)}):[]}},t.prototype.is=function(t,e){if(t.startsWith("."))return e.className===this.getIdOrClassname(t);if(t.startsWith("#"))return e.id===this.getIdOrClassname(t);if(!t.startsWith("["))return e.nodeName===t;else{var n=this.getAttribute(t),r=n.name,i=n.value;return"name"===r?e.name===i:this.attributeToString(e,r)===i}},t.prototype.getIdOrClassname=function(t){return t.substring(1)},t.prototype.getAttribute=function(t){var e=t.match(dN),n="",r="";return e&&e.length>2&&(n=e[1].replace(/"/g,""),r=e[2].replace(/"/g,"")),{name:n,value:r}},t.prototype.attributeToString=function(t,e){if(!t.getAttribute)return"";var n=t.getAttribute(e);return cb(n)?"":n.toString?n.toString():""},t}(),dI=function(t){function e(e,n,r,i,o,a,l,s){var u=t.call(this,null)||this;return u.relatedNode=n,u.prevValue=r,u.newValue=i,u.attrName=o,u.attrChange=a,u.prevParsedValue=l,u.newParsedValue=s,u.type=e,u}return oe(e,t),e.ADDITION=2,e.MODIFICATION=1,e.REMOVAL=3,e}(dE);function dR(t){var e=t.renderable;e&&(e.renderBoundsDirty=!0,e.boundsDirty=!0)}(A=en||(en={})).REPARENT="reparent",A.DESTROY="destroy",A.ATTR_MODIFIED="DOMAttrModified",A.INSERTED="DOMNodeInserted",A.REMOVED="removed",A.MOUNTED="DOMNodeInsertedIntoDocument",A.UNMOUNTED="DOMNodeRemovedFromDocument",A.BOUNDS_CHANGED="bounds-changed",A.CULLED="culled";var dD=new dI(en.REPARENT,null,"","","",0,"",""),dF=function(){function t(t){var e,n,r,i,o,a,l,s,u,c,f,p,h=this;this.runtime=t,this.pendingEvents=[],this.boundsChangedEvent=new d_(en.BOUNDS_CHANGED),this.rotate=(e=cl(),function(t,n,r,i){void 0===r&&(r=0),void 0===i&&(i=0),"number"==typeof n&&(n=uo(n,r,i));var o=t.transformable;if(null!==t.parentNode&&t.parentNode.transformable){var a=cl();cf(a,n[0],n[1],n[2]);var l=h.getRotation(t);ch(e,h.getRotation(t.parentNode)),cc(e,e),cu(a,e,a),cu(o.localRotation,a,l),cd(o.localRotation,o.localRotation),h.dirtifyLocal(t,o)}else h.rotateLocal(t,n)}),this.rotateLocal=(n=cl(),function(t,e,r,i){void 0===r&&(r=0),void 0===i&&(i=0),"number"==typeof e&&(e=uo(e,r,i));var o=t.transformable;cf(n,e[0],e[1],e[2]),cu(o.localRotation,o.localRotation,n),h.dirtifyLocal(t,o)}),this.setEulerAngles=(r=cl(),function(t,e,n,i){void 0===n&&(n=0),void 0===i&&(i=0),"number"==typeof e&&(e=uo(e,n,i));var o=t.transformable;if(null!==t.parentNode&&t.parentNode.transformable){cf(o.localRotation,e[0],e[1],e[2]);var a=h.getRotation(t.parentNode);ch(r,cc(cl(),a)),cu(o.localRotation,o.localRotation,r),h.dirtifyLocal(t,o)}else h.setLocalEulerAngles(t,e)}),this.translateLocal=function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=uo(e,n,r));var i,o,a,l,s,u,c,f,p,d,y,g,v,m,b,x,O,w=t.transformable;if(!uy(e,un()))i=e,o=e,l=(a=w.localRotation)[0],s=a[1],u=a[2],c=a[3],f=o[0],p=o[1],y=s*(d=o[2])-u*p,g=u*f-l*d,v=l*p-s*f,m=s*v-u*g,b=u*y-l*v,x=l*g-s*y,y*=O=2*c,g*=O,v*=O,m*=2,b*=2,x*=2,i[0]=f+y+m,i[1]=p+g+b,i[2]=d+v+x,us(w.localPosition,w.localPosition,e),h.dirtifyLocal(t,w)},this.setPosition=(i=uv(),o=un(),function(t,e){var n=t.transformable;if(o[0]=e[0],o[1]=e[1],o[2]=e[2]||0,!uy(h.getPosition(t),o))ua(n.position,o),null!==t.parentNode&&t.parentNode.transformable?(ub(i,t.parentNode.transformable.worldTransform),uk(i,i),ud(n.localPosition,o,i)):ua(n.localPosition,o),h.dirtifyLocal(t,n)}),this.setLocalPosition=(a=un(),function(t,e){var n=t.transformable;if(a[0]=e[0],a[1]=e[1],a[2]=e[2]||0,!uy(n.localPosition,a))ua(n.localPosition,a),h.dirtifyLocal(t,n)}),this.translate=(l=un(),s=un(),u=un(),function(t,e,n,r){if(void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=ul(s,e,n,r)),!uy(e,l))us(u,h.getPosition(t),e),h.setPosition(t,u)}),this.setRotation=function(){var t=cl();return function(e,n,r,i,o){var a=e.transformable;"number"==typeof n&&(n=cp(n,r,i,o)),null!==e.parentNode&&e.parentNode.transformable?(ch(t,h.getRotation(e.parentNode)),cc(t,t),cu(a.localRotation,t,n),cd(a.localRotation,a.localRotation),h.dirtifyLocal(e,a)):h.setLocalRotation(e,n)}},this.displayObjectDependencyMap=new WeakMap,this.calcLocalTransform=(c=uv(),f=un(),p=cp(0,0,0,1),function(t){if(0!==t.localSkew[0]||0!==t.localSkew[1]){if(uU(t.localTransform,t.localRotation,t.localPosition,uo(1,1,1),t.origin),0!==t.localSkew[0]||0!==t.localSkew[1]){var e=uw(c);e[4]=Math.tan(t.localSkew[0]),e[1]=Math.tan(t.localSkew[1]),u_(t.localTransform,t.localTransform,e)}var n=uU(c,p,f,t.localScale,t.origin);u_(t.localTransform,t.localTransform,n)}else uU(t.localTransform,t.localRotation,t.localPosition,t.localScale,t.origin)})}return t.prototype.matches=function(t,e){return this.runtime.sceneGraphSelector.is(t,e)},t.prototype.querySelector=function(t,e){return this.runtime.sceneGraphSelector.selectOne(t,e)},t.prototype.querySelectorAll=function(t,e){return this.runtime.sceneGraphSelector.selectAll(t,e)},t.prototype.attach=function(t,e,n){var r,i,o=!1;t.parentNode&&(o=t.parentNode!==e,this.detach(t)),t.parentNode=e,cb(n)?t.parentNode.childNodes.push(t):t.parentNode.childNodes.splice(n,0,t);var a=e.sortable;((null===(r=null==a?void 0:a.sorted)||void 0===r?void 0:r.length)||(null===(i=t.style)||void 0===i?void 0:i.zIndex))&&(-1===a.dirtyChildren.indexOf(t)&&a.dirtyChildren.push(t),a.dirty=!0,a.dirtyReason=t7.ADDED);var l=t.transformable;l&&this.dirtifyWorld(t,l),l.frozen&&this.unfreezeParentToRoot(t),o&&t.dispatchEvent(dD)},t.prototype.detach=function(t){var e,n;if(t.parentNode){var r=t.transformable,i=t.parentNode.sortable;((null===(e=null==i?void 0:i.sorted)||void 0===e?void 0:e.length)||(null===(n=t.style)||void 0===n?void 0:n.zIndex))&&(-1===i.dirtyChildren.indexOf(t)&&i.dirtyChildren.push(t),i.dirty=!0,i.dirtyReason=t7.REMOVED);var o=t.parentNode.childNodes.indexOf(t);o>-1&&t.parentNode.childNodes.splice(o,1),r&&this.dirtifyWorld(t,r),t.parentNode=null}},t.prototype.getOrigin=function(t){return t.transformable.origin},t.prototype.setOrigin=function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=[e,n,r]);var i=t.transformable;if(e[0]!==i.origin[0]||e[1]!==i.origin[1]||e[2]!==i.origin[2]){var o=i.origin;o[0]=e[0],o[1]=e[1],o[2]=e[2]||0,this.dirtifyLocal(t,i)}},t.prototype.setLocalEulerAngles=function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=uo(e,n,r));var i=t.transformable;cf(i.localRotation,e[0],e[1],e[2]),this.dirtifyLocal(t,i)},t.prototype.scaleLocal=function(t,e){var n,r,i,o=t.transformable;n=o.localScale,r=o.localScale,i=uo(e[0],e[1],e[2]||1),n[0]=r[0]*i[0],n[1]=r[1]*i[1],n[2]=r[2]*i[2],this.dirtifyLocal(t,o)},t.prototype.setLocalScale=function(t,e){var n=t.transformable,r=uo(e[0],e[1],e[2]||n.localScale[2]);if(!uy(r,n.localScale))ua(n.localScale,r),this.dirtifyLocal(t,n)},t.prototype.setLocalRotation=function(t,e,n,r,i){"number"==typeof e&&(e=cp(e,n,r,i));var o=t.transformable;ch(o.localRotation,e),this.dirtifyLocal(t,o)},t.prototype.setLocalSkew=function(t,e,n){if("number"==typeof e){;r=e,i=n,(o=new ue(2))[0]=r,o[1]=i,e=o}var r,i,o,a,l,s=t.transformable;a=s.localSkew,l=e,a[0]=l[0],a[1]=l[1],this.dirtifyLocal(t,s)},t.prototype.dirtifyLocal=function(t,e){!e.localDirtyFlag&&(e.localDirtyFlag=!0,!e.dirtyFlag&&this.dirtifyWorld(t,e))},t.prototype.dirtifyWorld=function(t,e){!e.dirtyFlag&&this.unfreezeParentToRoot(t),this.dirtifyWorldInternal(t,e),this.dirtifyToRoot(t,!0)},t.prototype.triggerPendingEvents=function(){var t=this,e=new Set,n=function(n,r){n.isConnected&&!e.has(n.entity)&&(t.boundsChangedEvent.detail=r,t.boundsChangedEvent.target=n,n.isMutationObserved?n.dispatchEvent(t.boundsChangedEvent):n.ownerDocument.defaultView.dispatchEvent(t.boundsChangedEvent,!0),e.add(n.entity))};this.pendingEvents.forEach(function(t){var e=ol(t,2),r=e[0],i=e[1];i.affectChildren?r.forEach(function(t){n(t,i)}):n(r,i)}),this.clearPendingEvents(),e.clear()},t.prototype.clearPendingEvents=function(){this.pendingEvents=[]},t.prototype.dirtifyToRoot=function(t,e){void 0===e&&(e=!1);var n=t;for(n.renderable&&(n.renderable.dirty=!0);n;)dR(n),n=n.parentNode;e&&t.forEach(function(t){dR(t)}),this.informDependentDisplayObjects(t),this.pendingEvents.push([t,{affectChildren:e}])},t.prototype.updateDisplayObjectDependency=function(t,e,n,r){if(e&&e!==n){var i=this.displayObjectDependencyMap.get(e);if(i&&i[t]){var o=i[t].indexOf(r);i[t].splice(o,1)}}if(n){var a=this.displayObjectDependencyMap.get(n);!a&&(this.displayObjectDependencyMap.set(n,{}),a=this.displayObjectDependencyMap.get(n)),!a[t]&&(a[t]=[]),a[t].push(r)}},t.prototype.informDependentDisplayObjects=function(t){var e=this,n=this.displayObjectDependencyMap.get(t);n&&Object.keys(n).forEach(function(t){n[t].forEach(function(n){e.dirtifyToRoot(n,!0),n.dispatchEvent(new dI(en.ATTR_MODIFIED,n,e,e,t,dI.MODIFICATION,e,e)),n.isCustomElement&&n.isConnected&&n.attributeChangedCallback&&n.attributeChangedCallback(t,e,e)})})},t.prototype.getPosition=function(t){var e=t.transformable;return u$(e.position,this.getWorldTransform(t,e))},t.prototype.getRotation=function(t){var e=t.transformable;return uV(e.rotation,this.getWorldTransform(t,e))},t.prototype.getScale=function(t){var e=t.transformable;return uG(e.scaling,this.getWorldTransform(t,e))},t.prototype.getWorldTransform=function(t,e){return(void 0===e&&(e=t.transformable),e.localDirtyFlag||e.dirtyFlag)?(t.parentNode&&t.parentNode.transformable&&this.getWorldTransform(t.parentNode),this.sync(t,e),e.worldTransform):e.worldTransform},t.prototype.getLocalPosition=function(t){return t.transformable.localPosition},t.prototype.getLocalRotation=function(t){return t.transformable.localRotation},t.prototype.getLocalScale=function(t){return t.transformable.localScale},t.prototype.getLocalSkew=function(t){return t.transformable.localSkew},t.prototype.getLocalTransform=function(t){var e=t.transformable;return e.localDirtyFlag&&(this.calcLocalTransform(e),e.localDirtyFlag=!1),e.localTransform},t.prototype.setLocalTransform=function(t,e){var n=u$(un(),e),r=uV(cl(),e),i=uG(un(),e);this.setLocalScale(t,i),this.setLocalPosition(t,n),this.setLocalRotation(t,r)},t.prototype.resetLocalTransform=function(t){this.setLocalScale(t,[1,1,1]),this.setLocalPosition(t,[0,0,0]),this.setLocalEulerAngles(t,[0,0,0]),this.setLocalSkew(t,[0,0])},t.prototype.getTransformedGeometryBounds=function(t,e,n){void 0===e&&(e=!1);var r=this.getGeometryBounds(t,e);if(fH.isEmpty(r))return null;var i=n||new fH;return i.setFromTransformedAABB(r,this.getWorldTransform(t)),i},t.prototype.getGeometryBounds=function(t,e){void 0===e&&(e=!1);var n=t.geometry;return(e?n.renderBounds:n.contentBounds||null)||new fH},t.prototype.getBounds=function(t,e){var n=this;void 0===e&&(e=!1);var r=t.renderable;if(!r.boundsDirty&&!e&&r.bounds)return r.bounds;if(!r.renderBoundsDirty&&e&&r.renderBounds)return r.renderBounds;var i=e?r.renderBounds:r.bounds,o=this.getTransformedGeometryBounds(t,e,i);if(t.childNodes.forEach(function(t){var r=n.getBounds(t,e);r&&(o?o.add(r):(o=i||new fH).update(r.center,r.halfExtents))}),e){var a=h0(t);if(a){var l=a.parsedStyle.clipPath.getBounds(e);o?l&&(o=l.intersection(o)):o=l}}return!o&&(o=new fH),o&&(e?r.renderBounds=o:r.bounds=o),e?r.renderBoundsDirty=!1:r.boundsDirty=!1,o},t.prototype.getLocalBounds=function(t){if(t.parentNode){var e=uv();t.parentNode.transformable&&(e=uk(uv(),this.getWorldTransform(t.parentNode)));var n=this.getBounds(t);if(!fH.isEmpty(n)){var r=new fH;return r.setFromTransformedAABB(n,e),r}}return this.getBounds(t)},t.prototype.getBoundingClientRect=function(t){var e,n,r,i=this.getGeometryBounds(t);!fH.isEmpty(i)&&(r=new fH).setFromTransformedAABB(i,this.getWorldTransform(t));var o=null===(n=null===(e=t.ownerDocument)||void 0===e?void 0:e.defaultView)||void 0===n?void 0:n.getContextService().getBoundingClientRect();if(r){var a=ol(r.getMin(),2),l=a[0],s=a[1],u=ol(r.getMax(),2),c=u[0],f=u[1];return new fX(l+((null==o?void 0:o.left)||0),s+((null==o?void 0:o.top)||0),c-l,f-s)}return new fX((null==o?void 0:o.left)||0,(null==o?void 0:o.top)||0,0,0)},t.prototype.dirtifyWorldInternal=function(t,e){var n=this;if(!e.dirtyFlag){e.dirtyFlag=!0,e.frozen=!1,t.childNodes.forEach(function(t){var e=t.transformable;!e.dirtyFlag&&n.dirtifyWorldInternal(t,e)});var r=t.renderable;r&&(r.renderBoundsDirty=!0,r.boundsDirty=!0,r.dirty=!0)}},t.prototype.syncHierarchy=function(t){var e=t.transformable;if(!e.frozen){e.frozen=!0,(e.localDirtyFlag||e.dirtyFlag)&&this.sync(t,e);for(var n=t.childNodes,r=0;r<n.length;r++)this.syncHierarchy(n[r])}},t.prototype.sync=function(t,e){if(e.localDirtyFlag&&(this.calcLocalTransform(e),e.localDirtyFlag=!1),e.dirtyFlag){var n=t.parentNode,r=n&&n.transformable;null!==n&&r?u_(e.worldTransform,r.worldTransform,e.localTransform):ub(e.worldTransform,e.localTransform),e.dirtyFlag=!1}},t.prototype.unfreezeParentToRoot=function(t){for(var e=t.parentNode;e;){var n=e.transformable;n&&(n.frozen=!1),e=e.parentNode}},t}(),dz="|\xc9q\xc5",dB="M",dW=1.4,d$=2,dG=[10,13],dV=[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288],dH=/[a-zA-Z0-9\u00C0-\u00D6\u00D8-\u00f6\u00f8-\u00ff!"#$%&'()*+,-./:;]/,dU=new RegExp("".concat(/[!%),.:;?\]}¢°·'""†‡›℃∶、。〃〆〕〗〞﹚﹜!"%'),.:;?!]}~]/.source,"|").concat(/[!),.:;?\]}¢·–—'"•"、。〆〞〕〉》」︰︱︲︳﹐﹑﹒﹓﹔﹕﹖﹘﹚﹜!),.:;?︶︸︺︼︾﹀﹂﹗]|}、]/.source,"|").concat(/[)\]}〕〉》」』】〙〗〟'"⦆»ヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻‐゠–〜?!‼⁇⁈⁉・、:;,。.]/.source,"|").concat(/[!%),.:;?\]}¢°'"†‡℃〆〈《「『〕!%),.:;?]}]/.source)),dq=new RegExp("".concat(/[$(£¥·'"〈《「『【〔〖〝﹙﹛$(.[{£¥]/.source,"|").concat(/[([{£¥'"‵〈《「『〔〝︴﹙﹛({︵︷︹︻︽︿﹁﹃﹏]/.source,"|").concat(/[([{〔〈《「『【〘〖〝'"⦅«—...‥〳〴〵]/.source,"|").concat(/[$([{£¥'"々〇〉》」〔$([{⦆¥₩#]/.source)),dY=function(){function t(t){var e=this;this.runtime=t,this.fontMetricsCache={},this.shouldBreakByKinsokuShorui=function(t,n){return!e.isBreakingSpace(n)&&(!!(t&&(dq.exec(n)||dU.exec(t)))||!1)},this.trimByKinsokuShorui=function(t){var e=ou([],ol(t),!1),n=e[e.length-2];if(!n)return t;var r=n[n.length-1];return e[e.length-2]=n.slice(0,-1),e[e.length-1]=r+e[e.length-1],e}}return t.prototype.measureFont=function(t,e){if(this.fontMetricsCache[t])return this.fontMetricsCache[t];var n={ascent:0,descent:0,fontSize:0},r=this.runtime.offscreenCanvasCreator.getOrCreateCanvas(e),i=this.runtime.offscreenCanvasCreator.getOrCreateContext(e,{willReadFrequently:!0});i.font=t;var o=dz+dB,a=Math.ceil(i.measureText(o).width),l=Math.ceil(i.measureText(dB).width),s=d$*l;l=l*dW|0,r.width=a,r.height=s,i.fillStyle="#f00",i.fillRect(0,0,a,s),i.font=t,i.textBaseline="alphabetic",i.fillStyle="#000",i.fillText(o,0,l);var u=i.getImageData(0,0,a||1,s||1).data,c=u.length,f=4*a,p=0,h=0,d=!1;for(p=0;p<l;++p){for(var y=0;y<f;y+=4)if(255!==u[h+y]){d=!0;break}if(d)break;h+=f}for(n.ascent=l-p,h=c-f,d=!1,p=s;p>l;--p){for(var y=0;y<f;y+=4)if(255!==u[h+y]){d=!0;break}if(d)break;h-=f}return n.descent=p-l,n.fontSize=n.ascent+n.descent,this.fontMetricsCache[t]=n,n},t.prototype.measureText=function(t,e,n){var r=e.fontSize,i=e.wordWrap,o=e.lineHeight,a=e.lineWidth,l=e.textBaseline,s=e.textAlign,u=e.letterSpacing,c=e.textPath;e.textPathSide,e.textPathStartOffset;var f=e.leading,p=void 0===f?0:f,h=function(t){for(var e=t.fontSize,n=t.fontFamily,r=t.fontStyle,i=t.fontVariant,o=t.fontWeight,a=cv(e)&&"".concat(e,"px")||"16px",l=n.split(","),s=l.length-1;s>=0;s--){var u=l[s].trim();!dp.test(u)&&0>df.indexOf(u)&&(u='"'.concat(u,'"')),l[s]=u}return"".concat(r," ").concat(i," ").concat(o," ").concat(a," ").concat(l.join(","))}(e),d=this.measureFont(h,n);0===d.fontSize&&(d.fontSize=r,d.ascent=r);var y=this.runtime.offscreenCanvasCreator.getOrCreateContext(n);y.font=h,e.isOverflowing=!1;var g=(i?this.wordWrap(t,e,n):t).split(/(?:\r\n|\r|\n)/),v=Array(g.length),m=0;if(c){c.getTotalLength();for(var b=0;b<g.length;b++)var x=y.measureText(g[b]).width+(g[b].length-1)*u}else{for(var b=0;b<g.length;b++){var O=y.measureText(g[b]).width+(g[b].length-1)*u;v[b]=O,m=Math.max(m,O)}var x=m+a,w=o||d.fontSize+a,E=Math.max(w,d.fontSize+a)+(g.length-1)*(w+p);w+=p;var k=0;return"middle"===l?k=-E/2:"bottom"===l||"alphabetic"===l||"ideographic"===l?k=-E:("top"===l||"hanging"===l)&&(k=0),{font:h,width:x,height:E,lines:g,lineWidths:v,lineHeight:w,maxLineWidth:m,fontProperties:d,lineMetrics:v.map(function(t,e){var n=0;return"center"===s||"middle"===s?n-=t/2:("right"===s||"end"===s)&&(n-=t),new fX(n-a/2,k+e*w,t+a,w)})}}},t.prototype.setGraphemeOnPath=function(){},t.prototype.wordWrap=function(t,e,n){var r=this,i=e.wordWrapWidth,o=e.letterSpacing,a=e.maxLines,l=void 0===a?1/0:a,s=e.textOverflow,u=this.runtime.offscreenCanvasCreator.getOrCreateContext(n),c=(void 0===i?0:i)+o,f="";"ellipsis"===s?f="...":s&&"clip"!==s&&(f=s);for(var p=[],h=0,d=0,y={},g=function(t){return r.getFromCache(t,o,y,u)},v=Array.from(f).reduce(function(t,e){return t+g(e)},0),m=Array.from(t),b=0;b<m.length;b++){var x=m[b],O=t[b-1],w=t[b+1],E=g(x);if(this.isNewline(x)){if(++h>=l){e.isOverflowing=!0;break}d=0,p[h]="";continue}if(d>0&&d+E>c){if(h+1>=l){if(e.isOverflowing=!0,v>0&&v<=c){for(var k=p[h].length,M=0,S=k,_=0;_<k;_++){var P=g(p[h][_]);if(M+P+v>c){S=_;break}M+=P}p[h]=(p[h]||"").slice(0,S)+f}break}if(d=0,p[++h]="",this.isBreakingSpace(x))continue;!this.canBreakInLastChar(x)&&(p=this.trimToBreakable(p),d=this.sumTextWidthByCache(p[h]||"",y)),this.shouldBreakByKinsokuShorui(x,w)&&(p=this.trimByKinsokuShorui(p),d+=g(O||""))}d+=E,p[h]=(p[h]||"")+x}return p.join("\n")},t.prototype.isBreakingSpace=function(t){return"string"==typeof t&&dV.indexOf(t.charCodeAt(0))>=0},t.prototype.isNewline=function(t){return"string"==typeof t&&dG.indexOf(t.charCodeAt(0))>=0},t.prototype.trimToBreakable=function(t){var e=ou([],ol(t),!1),n=e[e.length-2],r=this.findBreakableIndex(n);if(-1===r||!n)return e;var i=n.slice(r,r+1),o=this.isBreakingSpace(i),a=r+1,l=r+(o?0:1);return e[e.length-1]+=n.slice(a,n.length),e[e.length-2]=n.slice(0,l),e},t.prototype.canBreakInLastChar=function(t){return!(t&&dH.test(t))&&!0},t.prototype.sumTextWidthByCache=function(t,e){return t.split("").reduce(function(t,n){if(!e[n])throw Error("cannot count the word without cache");return t+e[n]},0)},t.prototype.findBreakableIndex=function(t){for(var e=t.length-1;e>=0;e--)if(!dH.test(t[e]))return e;return -1},t.prototype.getFromCache=function(t,e,n,r){var i=n[t];if("number"!=typeof i){var o=t.length*e;i=r.measureText(t).width+o,n[t]=i}return i},t}(),dX={};var dK=(C=new dO,N=new dx,(T={})[tX.CIRCLE]=new dg,T[tX.ELLIPSE]=new dv,T[tX.RECT]=C,T[tX.IMAGE]=C,T[tX.GROUP]=C,T[tX.LINE]=new dm,T[tX.TEXT]=new dw(dX),T[tX.POLYLINE]=N,T[tX.POLYGON]=N,T[tX.PATH]=new db,T[tX.HTML]=null,T[tX.MESH]=null,T);var dZ=(I=new hC,R=new hI,(L={})[et.PERCENTAGE]=null,L[et.NUMBER]=new h$,L[et.ANGLE]=new hA,L[et.DEFINED_PATH]=new hT,L[et.PAINT]=I,L[et.COLOR]=I,L[et.FILTER]=new hN,L[et.LENGTH]=R,L[et.LENGTH_PERCENTAGE]=R,L[et.LENGTH_PERCENTAGE_12]=new hR,L[et.LENGTH_PERCENTAGE_14]=new hD,L[et.COORDINATE]=new hB,L[et.OFFSET_DISTANCE]=new hG,L[et.OPACITY_VALUE]=new hV,L[et.PATH]=new hH,L[et.LIST_OF_POINTS]=new hU,L[et.SHADOW_BLUR]=new hq,L[et.TEXT]=new hY,L[et.TEXT_TRANSFORM]=new hX,L[et.TRANSFORM]=new dh,L[et.TRANSFORM_ORIGIN]=new dd,L[et.Z_INDEX]=new dy,L[et.MARKER]=new hW,L);dX.CameraContribution=fJ,dX.AnimationTimeline=null,dX.EasingFunction=null,dX.offscreenCanvasCreator=new dT,dX.sceneGraphSelector=new dL,dX.sceneGraphService=new dF(dX),dX.textService=new dY(dX),dX.geometryUpdaterFactory=dK,dX.CSSPropertySyntaxFactory=dZ,dX.styleValueRegistry=new hj(dX),dX.layoutRegistry=null,dX.globalThis="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==n.g?n.g:{},dX.enableCSSParsing=!0,dX.enableDataset=!1,dX.enableStyleSyntax=!0,dX.enableSizeAttenuation=!1;var dQ=0,dJ=new dI(en.INSERTED,null,"","","",0,"",""),d0=new dI(en.REMOVED,null,"","","",0,"",""),d1=new d_(en.DESTROY),d2=function(t){function e(){var e=t.apply(this,ou([],ol(arguments),!1))||this;return e.entity=dQ++,e.renderable={bounds:void 0,boundsDirty:!0,renderBounds:void 0,renderBoundsDirty:!0,dirtyRenderBounds:void 0,dirty:!1},e.cullable={strategy:t9.Standard,visibilityPlaneMask:-1,visible:!0,enable:!0},e.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]},e.sortable={dirty:!1,sorted:void 0,renderOrder:0,dirtyChildren:[],dirtyReason:void 0},e.geometry={contentBounds:void 0,renderBounds:void 0},e.rBushNode={aabb:void 0},e.namespaceURI="g",e.scrollLeft=0,e.scrollTop=0,e.clientTop=0,e.clientLeft=0,e.destroyed=!1,e.style={},e.computedStyle=dX.enableCSSParsing?{anchor:pp,opacity:pp,fillOpacity:pp,strokeOpacity:pp,fill:pp,stroke:pp,transform:pp,transformOrigin:pp,visibility:pp,pointerEvents:pp,lineWidth:pp,lineCap:pp,lineJoin:pp,increasedLineWidthForHitTesting:pp,fontSize:pp,fontFamily:pp,fontStyle:pp,fontWeight:pp,fontVariant:pp,textAlign:pp,textBaseline:pp,textTransform:pp,zIndex:pp,filter:pp,shadowType:pp}:null,e.parsedStyle={},e.attributes={},e}return oe(e,t),Object.defineProperty(e.prototype,"className",{get:function(){return this.getAttribute("class")||""},set:function(t){this.setAttribute("class",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"classList",{get:function(){return this.className.split(" ").filter(function(t){return""!==t})},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 t=this.parentNode.childNodes.indexOf(this);return this.parentNode.childNodes[t+1]||null}return null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"previousSibling",{get:function(){if(this.parentNode){var t=this.parentNode.childNodes.indexOf(this);return this.parentNode.childNodes[t-1]||null}return null},enumerable:!1,configurable:!0}),e.prototype.cloneNode=function(t){throw Error(fK)},e.prototype.appendChild=function(t,e){var n;if(t.destroyed)throw Error("Cannot append a destroyed element.");return dX.sceneGraphService.attach(t,this,e),(null===(n=this.ownerDocument)||void 0===n?void 0:n.defaultView)&&this.ownerDocument.defaultView.mountChildren(t),dJ.relatedNode=this,t.dispatchEvent(dJ),t},e.prototype.insertBefore=function(t,e){if(e){t.parentElement&&t.parentElement.removeChild(t);var n=this.childNodes.indexOf(e);-1===n?this.appendChild(t):this.appendChild(t,n)}else this.appendChild(t);return t},e.prototype.replaceChild=function(t,e){var n=this.childNodes.indexOf(e);return this.removeChild(e),this.appendChild(t,n),e},e.prototype.removeChild=function(t){var e;return d0.relatedNode=this,t.dispatchEvent(d0),(null===(e=t.ownerDocument)||void 0===e?void 0:e.defaultView)&&t.ownerDocument.defaultView.unmountChildren(t),dX.sceneGraphService.detach(t),t},e.prototype.removeChildren=function(){for(var t=this.childNodes.length-1;t>=0;t--){var e=this.childNodes[t];this.removeChild(e)}},e.prototype.destroyChildren=function(){for(var t=this.childNodes.length-1;t>=0;t--){var e=this.childNodes[t];e.childNodes.length&&e.destroyChildren(),e.destroy()}},e.prototype.matches=function(t){return dX.sceneGraphService.matches(t,this)},e.prototype.getElementById=function(t){return dX.sceneGraphService.querySelector("#".concat(t),this)},e.prototype.getElementsByName=function(t){return dX.sceneGraphService.querySelectorAll('[name="'.concat(t,'"]'),this)},e.prototype.getElementsByClassName=function(t){return dX.sceneGraphService.querySelectorAll(".".concat(t),this)},e.prototype.getElementsByTagName=function(t){return dX.sceneGraphService.querySelectorAll(t,this)},e.prototype.querySelector=function(t){return dX.sceneGraphService.querySelector(t,this)},e.prototype.querySelectorAll=function(t){return dX.sceneGraphService.querySelectorAll(t,this)},e.prototype.closest=function(t){var e=this;do{if(dX.sceneGraphService.matches(t,e))return e;e=e.parentElement}while(null!==e);return null},e.prototype.find=function(t){var e=this,n=null;return this.forEach(function(r){return!!(r!==e&&t(r))&&(n=r,!0)}),n},e.prototype.findAll=function(t){var e=this,n=[];return this.forEach(function(r){r!==e&&t(r)&&n.push(r)}),n},e.prototype.after=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];if(this.parentNode){var r=this.parentNode.childNodes.indexOf(this);e.forEach(function(e,n){var i;return null===(i=t.parentNode)||void 0===i?void 0:i.appendChild(e,r+n+1)})}},e.prototype.before=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(this.parentNode){var n=this.parentNode.childNodes.indexOf(this),r=ol(t),i=r[0],o=r.slice(1);this.parentNode.appendChild(i,n),i.after.apply(i,ou([],ol(o),!1))}},e.prototype.replaceWith=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.after.apply(this,ou([],ol(t),!1)),this.remove()},e.prototype.append=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];e.forEach(function(e){return t.appendChild(e)})},e.prototype.prepend=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];e.forEach(function(e,n){return t.appendChild(e,n)})},e.prototype.replaceChildren=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(;this.childNodes.length&&this.firstChild;)this.removeChild(this.firstChild);this.append.apply(this,ou([],ol(t),!1))},e.prototype.remove=function(){return this.parentNode?this.parentNode.removeChild(this):this},e.prototype.destroy=function(){this.dispatchEvent(d1),this.remove(),this.emitter.removeAllListeners(),this.destroyed=!0},e.prototype.getGeometryBounds=function(){return dX.sceneGraphService.getGeometryBounds(this)},e.prototype.getRenderBounds=function(){return dX.sceneGraphService.getBounds(this,!0)},e.prototype.getBounds=function(){return dX.sceneGraphService.getBounds(this)},e.prototype.getLocalBounds=function(){return dX.sceneGraphService.getLocalBounds(this)},e.prototype.getBoundingClientRect=function(){return dX.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(t){if("symbol"==typeof t)return dX.enableCSSParsing?null:void 0;var e=this.attributes[t];if(void 0!==e)return e;var n=po(t);return e=this.attributes[n],dX.enableCSSParsing&&cb(e)?null:e},e.prototype.hasAttribute=function(t){return this.getAttributeNames().includes(t)},e.prototype.hasAttributes=function(){return!!this.getAttributeNames().length},e.prototype.removeAttribute=function(t){this.setAttribute(t,null),delete this.attributes[t]},e.prototype.setAttribute=function(t,e,n){this.attributes[t]=e},e.prototype.getAttributeNS=function(t,e){throw Error(fK)},e.prototype.getAttributeNode=function(t){throw Error(fK)},e.prototype.getAttributeNodeNS=function(t,e){throw Error(fK)},e.prototype.hasAttributeNS=function(t,e){throw Error(fK)},e.prototype.removeAttributeNS=function(t,e){throw Error(fK)},e.prototype.removeAttributeNode=function(t){throw Error(fK)},e.prototype.setAttributeNS=function(t,e,n){throw Error(fK)},e.prototype.setAttributeNode=function(t){throw Error(fK)},e.prototype.setAttributeNodeNS=function(t){throw Error(fK)},e.prototype.toggleAttribute=function(t,e){throw Error(fK)},e}(dj);function d5(t){return!!(null==t?void 0:t.nodeName)}var d3=new dI(en.ATTR_MODIFIED,null,null,null,null,dI.MODIFICATION,null,null),d4={anchor:"",opacity:"",fillOpacity:"",strokeOpacity:"",fill:"",stroke:"",transform:"",transformOrigin:"",visibility:"",pointerEvents:"",lineWidth:"",lineCap:"",lineJoin:"",increasedLineWidthForHitTesting:"",fontSize:"",fontFamily:"",fontStyle:"",fontWeight:"",fontVariant:"",textAlign:"",textBaseline:"",textTransform:"",zIndex:"",filter:"",shadowType:""},d6={anchor:[0,0],fill:py,stroke:py,transform:[],zIndex:0,filter:[],shadowType:"outer",miterLimit:10},d8=on(on({},d6),{opacity:1,fillOpacity:1,strokeOpacity:1,visibility:"visible",pointerEvents:"auto",lineWidth:1,lineCap:"butt",lineJoin:"miter",increasedLineWidthForHitTesting:0,fillRule:"nonzero"}),d9=ou(ou([],ol(["opacity","fillOpacity","strokeOpacity","transformOrigin","visibility","pointerEvents","lineWidth","lineCap","lineJoin","increasedLineWidthForHitTesting"]),!1),["fontSize","fontFamily","fontStyle","fontWeight","fontVariant","textAlign","textBaseline","textTransform"],!1),d7="data-",yt=function(t){function e(e){var n,r=t.call(this)||this;r.isCustomElement=!1,r.isMutationObserved=!1,r.activeAnimations=[],r.getClip=function(){return this.style.clipPath||null},r.config=e,r.config.interactive=null!==(n=r.config.capture)&&void 0!==n?n:r.config.interactive,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||tX.GROUP,r.config.style=r.config.style||r.config.attrs||{},Object.assign(r.config.style,r.config.attrs),null!=r.config.visible&&(r.config.style.visibility=!1===r.config.visible?"hidden":"visible"),null!=r.config.interactive&&(r.config.style.pointerEvents=!1===r.config.interactive?"none":"auto"),Object.assign(r.parsedStyle,dX.enableCSSParsing?d6:d8,r.config.initialParsedStyle),dX.enableCSSParsing&&Object.assign(r.attributes,d4),r.initAttributes(r.config.style);var i=dX.globalThis.Proxy?dX.globalThis.Proxy:function(){};return dX.enableDataset&&(r.dataset=new i({},{get:function(t,e){var n="".concat(d7).concat(pn(e));return void 0!==t[n]?t[n]:r.getAttribute(n)},set:function(t,e,n){return r.setAttribute("".concat(d7).concat(pn(e)),n),!0}})),dX.enableStyleSyntax&&(r.style=new i({setProperty:function(t,e){r.setAttribute(t,e)},getPropertyValue:function(t){return r.getAttribute(t)},removeProperty:function(t){r.removeAttribute(t)},item:function(){return""}},{get:function(t,e){return void 0!==t[e]?t[e]:r.getAttribute(e)},set:function(t,e,n){return r.setAttribute(e,n),!0}})),r}return oe(e,t),e.prototype.destroy=function(){t.prototype.destroy.call(this),this.getAnimations().forEach(function(t){t.cancel()})},e.prototype.cloneNode=function(t,e){var n=on({},this.attributes);for(var r in n){var i=n[r];d5(i)&&"clipPath"!==r&&"offsetPath"!==r&&"textPath"!==r&&(n[r]=i.cloneNode(t)),e&&(n[r]=e(r,i))}var o=new this.constructor({id:this.id,name:this.name,className:this.name,interactive:this.interactive,style:n});return o.setLocalTransform(this.getLocalTransform()),t&&this.children.forEach(function(e){if(!e.style.isMarker){var n=e.cloneNode(t);o.appendChild(n)}}),o},e.prototype.initAttributes=function(t){void 0===t&&(t={});var e=this.renderable,n={forceUpdateGeometry:!0};dX.enableCSSParsing&&(n.usedAttributes=d9);var r={};for(var i in t)r[po(i)]=t[i];dX.styleValueRegistry.processProperties(this,r,n),e.dirty=!0},e.prototype.setAttribute=function(e,n,r,i){void 0===r&&(r=!1),void 0===i&&(i=!0);var o=po(e);if(!cY(n))(r||n!==this.attributes[o])&&(this.internalSetAttribute(o,n,{memoize:i}),t.prototype.setAttribute.call(this,o,n))},e.prototype.internalSetAttribute=function(t,e,n){void 0===n&&(n={});var r,i=this.renderable,o=this.attributes[t],a=this.parsedStyle[t];dX.styleValueRegistry.processProperties(this,((r={})[t]=e,r),n),i.dirty=!0;var l=this.parsedStyle[t];this.isConnected&&(d3.relatedNode=this,d3.prevValue=o,d3.newValue=e,d3.attrName=t,d3.prevParsedValue=a,d3.newParsedValue=l,this.isMutationObserved?this.dispatchEvent(d3):(d3.target=this,this.ownerDocument.defaultView.dispatchEvent(d3,!0))),(this.isCustomElement&&this.isConnected||!this.isCustomElement)&&this.attributeChangedCallback&&this.attributeChangedCallback(t,o,e,a,l)},e.prototype.getBBox=function(){var t=this.getBounds(),e=ol(t.getMin(),2),n=e[0],r=e[1],i=ol(t.getMax(),2);return new fX(n,r,i[0]-n,i[1]-r)},e.prototype.setOrigin=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),dX.sceneGraphService.setOrigin(this,fL(t,e,n)),this},e.prototype.getOrigin=function(){return dX.sceneGraphService.getOrigin(this)},e.prototype.setPosition=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),dX.sceneGraphService.setPosition(this,fL(t,e,n)),this},e.prototype.setLocalPosition=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),dX.sceneGraphService.setLocalPosition(this,fL(t,e,n)),this},e.prototype.translate=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),dX.sceneGraphService.translate(this,fL(t,e,n)),this},e.prototype.translateLocal=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),dX.sceneGraphService.translateLocal(this,fL(t,e,n)),this},e.prototype.getPosition=function(){return dX.sceneGraphService.getPosition(this)},e.prototype.getLocalPosition=function(){return dX.sceneGraphService.getLocalPosition(this)},e.prototype.scale=function(t,e,n){return this.scaleLocal(t,e,n)},e.prototype.scaleLocal=function(t,e,n){return"number"==typeof t&&(e=e||t,n=n||t,t=fL(t,e,n)),dX.sceneGraphService.scaleLocal(this,t),this},e.prototype.setLocalScale=function(t,e,n){return"number"==typeof t&&(e=e||t,n=n||t,t=fL(t,e,n)),dX.sceneGraphService.setLocalScale(this,t),this},e.prototype.getLocalScale=function(){return dX.sceneGraphService.getLocalScale(this)},e.prototype.getScale=function(){return dX.sceneGraphService.getScale(this)},e.prototype.getEulerAngles=function(){return fR(ol(fD(un(),dX.sceneGraphService.getWorldTransform(this)),3)[2])},e.prototype.getLocalEulerAngles=function(){return fR(ol(fD(un(),dX.sceneGraphService.getLocalRotation(this)),3)[2])},e.prototype.setEulerAngles=function(t){return dX.sceneGraphService.setEulerAngles(this,0,0,t),this},e.prototype.setLocalEulerAngles=function(t){return dX.sceneGraphService.setLocalEulerAngles(this,0,0,t),this},e.prototype.rotateLocal=function(t,e,n){return cb(e)&&cb(n)?dX.sceneGraphService.rotateLocal(this,0,0,t):dX.sceneGraphService.rotateLocal(this,t,e,n),this},e.prototype.rotate=function(t,e,n){return cb(e)&&cb(n)?dX.sceneGraphService.rotate(this,0,0,t):dX.sceneGraphService.rotate(this,t,e,n),this},e.prototype.setRotation=function(t,e,n,r){return dX.sceneGraphService.setRotation(this,t,e,n,r),this},e.prototype.setLocalRotation=function(t,e,n,r){return dX.sceneGraphService.setLocalRotation(this,t,e,n,r),this},e.prototype.setLocalSkew=function(t,e){return dX.sceneGraphService.setLocalSkew(this,t,e),this},e.prototype.getRotation=function(){return dX.sceneGraphService.getRotation(this)},e.prototype.getLocalRotation=function(){return dX.sceneGraphService.getLocalRotation(this)},e.prototype.getLocalSkew=function(){return dX.sceneGraphService.getLocalSkew(this)},e.prototype.getLocalTransform=function(){return dX.sceneGraphService.getLocalTransform(this)},e.prototype.getWorldTransform=function(){return dX.sceneGraphService.getWorldTransform(this)},e.prototype.setLocalTransform=function(t){return dX.sceneGraphService.setLocalTransform(this,t),this},e.prototype.resetLocalTransform=function(){dX.sceneGraphService.resetLocalTransform(this)},e.prototype.getAnimations=function(){return this.activeAnimations},e.prototype.animate=function(t,e){var n,r=null===(n=this.ownerDocument)||void 0===n?void 0:n.timeline;return r?r.play(this,t,e):null},e.prototype.isVisible=function(){var t;return(null===(t=this.parsedStyle)||void 0===t?void 0:t.visibility)==="visible"},Object.defineProperty(e.prototype,"interactive",{get:function(){return this.isInteractive()},set:function(t){this.style.pointerEvents=t?"auto":"none"},enumerable:!1,configurable:!0}),e.prototype.isInteractive=function(){var t;return(null===(t=this.parsedStyle)||void 0===t?void 0:t.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,ou([],ol(this.parentNode.children.map(function(t){return Number(t.style.zIndex)})),!1))+1),this},e.prototype.toBack=function(){return this.parentNode&&(this.style.zIndex=Math.min.apply(Math,ou([],ol(this.parentNode.children.map(function(t){return Number(t.style.zIndex)})),!1))-1),this},e.prototype.getConfig=function(){return this.config},e.prototype.attr=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=ol(e,2),i=r[0],o=r[1];return i?cq(i)?(Object.keys(i).forEach(function(e){t.setAttribute(e,i[e])}),this):2===e.length?(this.setAttribute(i,o),this):this.attributes[i]:this.attributes},e.prototype.getMatrix=function(t){var e,n,r,i,o,a,l,s,u,c,f,p,h,d,y,g,v=t||this.getWorldTransform(),m=ol(u$(un(),v),2),b=m[0],x=m[1],O=ol(uG(un(),v),2),w=O[0],E=O[1],k=uV(cl(),v),M=ol(fD(un(),k),3),S=M[0],_=M[2];return e=S||_,n=b,r=x,i=w,o=E,a=Math.cos(e),l=Math.sin(e),s=i*a,u=o*l,c=0,f=-i*l,p=o*a,h=0,d=n,y=r,(g=new ue(9))[0]=s,g[1]=u,g[2]=0,g[3]=f,g[4]=p,g[5]=0,g[6]=d,g[7]=y,g[8]=1,g},e.prototype.getLocalMatrix=function(){return this.getMatrix(this.getLocalTransform())},e.prototype.setMatrix=function(t){var e=ol(fF(t),5),n=e[0],r=e[1],i=e[2],o=e[3],a=e[4];this.setEulerAngles(a).setPosition(n,r).setLocalScale(i,o)},e.prototype.setLocalMatrix=function(t){var e=ol(fF(t),5),n=e[0],r=e[1],i=e[2],o=e[3],a=e[4];this.setLocalEulerAngles(a).setLocalPosition(n,r).setLocalScale(i,o)},e.prototype.show=function(){dX.enableCSSParsing?this.style.visibility="visible":this.forEach(function(t){t.style.visibility="visible"})},e.prototype.hide=function(){dX.enableCSSParsing?this.style.visibility="hidden":this.forEach(function(t){t.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(t){return this.children[t]||null},e.prototype.add=function(t,e){return this.appendChild(t,e)},e.prototype.setClip=function(t){this.style.clipPath=t},e.prototype.set=function(t,e){this.config[t]=e},e.prototype.get=function(t){return this.config[t]},e.prototype.moveTo=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),this.setPosition(t,e,n),this},e.prototype.move=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),this.setPosition(t,e,n),this},e.prototype.setZIndex=function(t){return this.style.zIndex=t,this},e}(d2),ye=function(t){var e=t.name,n=t.inherits,r=t.interpolable,i=t.initialValue,o=t.syntax;dX.styleValueRegistry.registerMetadata({n:e,inh:n,int:r,d:i,syntax:o})},yn=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=or(e,["style"]);return t.call(this,on({type:tX.CIRCLE,style:dX.enableCSSParsing?on({cx:"",cy:"",r:""},n):on({},n),initialParsedStyle:{anchor:[.5,.5],transformOrigin:dX.enableCSSParsing?null:[pb,pb]}},r))||this}return oe(e,t),e}(yt),yr=function(t){function e(e){void 0===e&&(e={});var n=this,r=e.style,i=or(e,["style"]);return(n=t.call(this,on({style:dX.enableCSSParsing?on({x:"",y:""},r):on({},r)},i))||this).isCustomElement=!0,n}return oe(e,t),e}(yt),yi=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=or(e,["style"]);return t.call(this,on({type:tX.ELLIPSE,style:dX.enableCSSParsing?on({cx:"",cy:"",rx:"",ry:""},n):on({},n),initialParsedStyle:{anchor:[.5,.5],transformOrigin:dX.enableCSSParsing?null:[pb,pb]}},r))||this}return oe(e,t),e}(yt),yo=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=or(e,["style"]);return t.call(this,on({type:tX.GROUP,style:dX.enableCSSParsing?on({x:"",y:"",width:"",height:""},n):on({},n)},r))||this}return oe(e,t),e}(yt),ya=function(t){function e(e){void 0===e&&(e={});var n=this,r=e.style,i=or(e,["style"]);return(n=t.call(this,on({type:tX.HTML,style:dX.enableCSSParsing?on({x:"",y:"",width:"auto",height:"auto",innerHTML:""},r):on({},r)},i))||this).cullable.enable=!1,n}return oe(e,t),e.prototype.getDomElement=function(){return this.parsedStyle.$el},e.prototype.getBoundingClientRect=function(){if(this.parsedStyle.$el)return this.parsedStyle.$el.getBoundingClientRect();var t=this.parsedStyle;return new fX(t.x,t.y,t.width,t.height)},e.prototype.getClientRects=function(){return[this.getBoundingClientRect()]},e.prototype.getBounds=function(){var t,e,n=this.getBoundingClientRect(),r=null===(e=null===(t=this.ownerDocument)||void 0===t?void 0:t.defaultView)||void 0===e?void 0:e.getContextService().getBoundingClientRect(),i=new fH,o=n.left-((null==r?void 0:r.left)||0),a=n.top-((null==r?void 0:r.top)||0);return i.setMinMax([o,a,0],[o+n.width,a+n.height,0]),i},e.prototype.getLocalBounds=function(){if(this.parentNode){var t=uk(uv(),this.parentNode.getWorldTransform()),e=this.getBounds();if(!fH.isEmpty(e)){var n=new fH;return n.setFromTransformedAABB(e,t),n}}return this.getBounds()},e}(yt),yl=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=or(e,["style"]);return t.call(this,on({type:tX.IMAGE,style:dX.enableCSSParsing?on({x:"",y:"",img:"",width:"",height:""},n):on({},n)},r))||this}return oe(e,t),e}(yt),ys=function(t){function e(e){void 0===e&&(e={});var n=this,r=e.style,i=or(e,["style"]);(n=t.call(this,on({type:tX.LINE,style:on({x1:0,y1:0,x2:0,y2:0,z1:0,z2:0},r)},i))||this).markerStartAngle=0,n.markerEndAngle=0;var o=n.parsedStyle,a=o.markerStart,l=o.markerEnd;return a&&d5(a)&&(n.markerStartAngle=a.getLocalEulerAngles(),n.appendChild(a)),l&&d5(l)&&(n.markerEndAngle=l.getLocalEulerAngles(),n.appendChild(l)),n.transformMarker(!0),n.transformMarker(!1),n}return oe(e,t),e.prototype.attributeChangedCallback=function(t,e,n,r,i){"x1"===t||"y1"===t||"x2"===t||"y2"===t||"markerStartOffset"===t||"markerEndOffset"===t?(this.transformMarker(!0),this.transformMarker(!1)):"markerStart"===t?(r&&d5(r)&&(this.markerStartAngle=0,r.remove()),i&&d5(i)&&(this.markerStartAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!0))):"markerEnd"===t&&(r&&d5(r)&&(this.markerEndAngle=0,r.remove()),i&&d5(i)&&(this.markerEndAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!1)))},e.prototype.transformMarker=function(t){var e,n,r,i,o,a,l=this.parsedStyle,s=l.markerStart,u=l.markerEnd,c=l.markerStartOffset,f=l.markerEndOffset,p=l.x1,h=l.x2,d=l.y1,y=l.y2,g=l.defX,v=l.defY,m=t?s:u;if(!!m&&!!d5(m)){var b=0;t?(r=p-g,i=d-v,e=h-p,n=y-d,o=c||0,a=this.markerStartAngle):(r=h-g,i=y-v,e=p-h,n=d-y,o=f||0,a=this.markerEndAngle),b=Math.atan2(n,e),m.setLocalEulerAngles(180*b/Math.PI+a),m.setLocalPosition(r+Math.cos(b)*o,i+Math.sin(b)*o)}},e.prototype.getPoint=function(t,e){void 0===e&&(e=!1);var n=this.parsedStyle,r=n.x1,i=n.y1,o=n.x2,a=n.y2,l=n.defX,s=n.defY,u=fm(r,i,o,a,t),c=u.x,f=u.y,p=ud(un(),uo(c-l,f-s,0),e?this.getWorldTransform():this.getLocalTransform());return new fY(p[0],p[1])},e.prototype.getPointAtLength=function(t,e){return void 0===e&&(e=!1),this.getPoint(t/this.getTotalLength(),e)},e.prototype.getTotalLength=function(){var t=this.parsedStyle;return fd(t.x1,t.y1,t.x2,t.y2)},e}(yt),yu=function(t){function e(e){void 0===e&&(e={});var n=this,r=e.style,i=or(e,["style"]);(n=t.call(this,on({type:tX.PATH,style:dX.enableCSSParsing?on({path:"",miterLimit:""},r):on({},r),initialParsedStyle:dX.enableCSSParsing?null:{miterLimit:4,path:on({},px)}},i))||this).markerStartAngle=0,n.markerEndAngle=0,n.markerMidList=[];var o=n.parsedStyle,a=o.markerStart,l=o.markerEnd,s=o.markerMid;return a&&d5(a)&&(n.markerStartAngle=a.getLocalEulerAngles(),n.appendChild(a)),s&&d5(s)&&n.placeMarkerMid(s),l&&d5(l)&&(n.markerEndAngle=l.getLocalEulerAngles(),n.appendChild(l)),n.transformMarker(!0),n.transformMarker(!1),n}return oe(e,t),e.prototype.attributeChangedCallback=function(t,e,n,r,i){"path"===t?(this.transformMarker(!0),this.transformMarker(!1),this.placeMarkerMid(this.parsedStyle.markerMid)):"markerStartOffset"===t||"markerEndOffset"===t?(this.transformMarker(!0),this.transformMarker(!1)):"markerStart"===t?(r&&d5(r)&&(this.markerStartAngle=0,r.remove()),i&&d5(i)&&(this.markerStartAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!0))):"markerEnd"===t?(r&&d5(r)&&(this.markerEndAngle=0,r.remove()),i&&d5(i)&&(this.markerEndAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!1))):"markerMid"===t&&this.placeMarkerMid(i)},e.prototype.transformMarker=function(t){var e,n,r,i,o,a,l=this.parsedStyle,s=l.markerStart,u=l.markerEnd,c=l.markerStartOffset,f=l.markerEndOffset,p=l.defX,h=l.defY,d=t?s:u;if(!!d&&!!d5(d)){var y=0;if(t){var g=ol(this.getStartTangent(),2),v=g[0],m=g[1];r=m[0]-p,i=m[1]-h,e=v[0]-m[0],n=v[1]-m[1],o=c||0,a=this.markerStartAngle}else{var b=ol(this.getEndTangent(),2),v=b[0],m=b[1];r=m[0]-p,i=m[1]-h,e=v[0]-m[0],n=v[1]-m[1],o=f||0,a=this.markerEndAngle}y=Math.atan2(n,e),d.setLocalEulerAngles(180*y/Math.PI+a),d.setLocalPosition(r+Math.cos(y)*o,i+Math.sin(y)*o)}},e.prototype.placeMarkerMid=function(t){var e=this.parsedStyle,n=e.path.segments,r=e.defX,i=e.defY;if(this.markerMidList.forEach(function(t){t.remove()}),t&&d5(t))for(var o=1;o<n.length-1;o++){var a=ol(n[o].currentPoint,2),l=a[0],s=a[1],u=1===o?t:t.cloneNode(!0);this.markerMidList.push(u),this.appendChild(u),u.setLocalPosition(l-r,s-i)}},e.prototype.getTotalLength=function(){return pJ(this)},e.prototype.getPointAtLength=function(t,e){void 0===e&&(e=!1);var n,r=this.parsedStyle,i=r.defX,o=r.defY;var a=cR(r.path.absolutePath,t,on(on({},void 0),{bbox:!1,length:!0})).point,l=a.x,s=a.y,u=ud(un(),uo(l-i,s-o,0),e?this.getWorldTransform():this.getLocalTransform());return new fY(u[0],u[1])},e.prototype.getPoint=function(t,e){return void 0===e&&(e=!1),this.getPointAtLength(t*pJ(this),e)},e.prototype.getStartTangent=function(){var t=this.parsedStyle.path.segments,e=[];if(t.length>1){var n=t[0].currentPoint,r=t[1].currentPoint,i=t[1].startTangent;e=[],i?e.push([n[0]-i[0],n[1]-i[1]]):e.push([r[0],r[1]]),e.push([n[0],n[1]])}return e},e.prototype.getEndTangent=function(){var t=this.parsedStyle.path.segments,e=t.length,n=[];if(e>1){var r=t[e-2].currentPoint,i=t[e-1].currentPoint,o=t[e-1].endTangent;n=[],o?n.push([i[0]-o[0],i[1]-o[1]]):n.push([r[0],r[1]]),n.push([i[0],i[1]])}return n},e}(yt),yc=function(t){function e(e){void 0===e&&(e={});var n=this,r=e.style,i=or(e,["style"]);(n=t.call(this,on({type:tX.POLYGON,style:dX.enableCSSParsing?on({points:"",miterLimit:"",isClosed:!0},r):on({},r),initialParsedStyle:dX.enableCSSParsing?null:{points:{points:[],totalLength:0,segments:[]},miterLimit:4,isClosed:!0}},i))||this).markerStartAngle=0,n.markerEndAngle=0,n.markerMidList=[];var o=n.parsedStyle,a=o.markerStart,l=o.markerEnd,s=o.markerMid;return a&&d5(a)&&(n.markerStartAngle=a.getLocalEulerAngles(),n.appendChild(a)),s&&d5(s)&&n.placeMarkerMid(s),l&&d5(l)&&(n.markerEndAngle=l.getLocalEulerAngles(),n.appendChild(l)),n.transformMarker(!0),n.transformMarker(!1),n}return oe(e,t),e.prototype.attributeChangedCallback=function(t,e,n,r,i){"points"===t?(this.transformMarker(!0),this.transformMarker(!1),this.placeMarkerMid(this.parsedStyle.markerMid)):"markerStartOffset"===t||"markerEndOffset"===t?(this.transformMarker(!0),this.transformMarker(!1)):"markerStart"===t?(r&&d5(r)&&(this.markerStartAngle=0,r.remove()),i&&d5(i)&&(this.markerStartAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!0))):"markerEnd"===t?(r&&d5(r)&&(this.markerEndAngle=0,r.remove()),i&&d5(i)&&(this.markerEndAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!1))):"markerMid"===t&&this.placeMarkerMid(i)},e.prototype.transformMarker=function(t){var e,n,r,i,o,a,l=this.parsedStyle,s=l.markerStart,u=l.markerEnd,c=l.markerStartOffset,f=l.markerEndOffset,p=l.points,h=l.defX,d=l.defY,y=(p||{}).points,g=t?s:u;if(!!g&&!!d5(g)&&!!y){var v=0;if(r=y[0][0]-h,i=y[0][1]-d,t)e=y[1][0]-y[0][0],n=y[1][1]-y[0][1],o=c||0,a=this.markerStartAngle;else{var m=y.length;this.parsedStyle.isClosed?(e=y[m-1][0]-y[0][0],n=y[m-1][1]-y[0][1]):(r=y[m-1][0]-h,i=y[m-1][1]-d,e=y[m-2][0]-y[m-1][0],n=y[m-2][1]-y[m-1][1]),o=f||0,a=this.markerEndAngle}v=Math.atan2(n,e),g.setLocalEulerAngles(180*v/Math.PI+a),g.setLocalPosition(r+Math.cos(v)*o,i+Math.sin(v)*o)}},e.prototype.placeMarkerMid=function(t){var e=this.parsedStyle,n=e.points,r=e.defX,i=e.defY,o=(n||{}).points;if(this.markerMidList.forEach(function(t){t.remove()}),this.markerMidList=[],t&&d5(t)&&o)for(var a=1;a<(this.parsedStyle.isClosed?o.length:o.length-1);a++){var l=o[a][0]-r,s=o[a][1]-i,u=1===a?t:t.cloneNode(!0);this.markerMidList.push(u),this.appendChild(u),u.setLocalPosition(l,s)}},e}(yt),yf=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=or(e,["style"]);return t.call(this,on({type:tX.POLYLINE,style:dX.enableCSSParsing?on({points:"",miterLimit:"",isClosed:!1},n):on({},n),initialParsedStyle:dX.enableCSSParsing?null:{points:{points:[],totalLength:0,segments:[]},miterLimit:4,isClosed:!1}},r))||this}return oe(e,t),e.prototype.getTotalLength=function(){return this.parsedStyle.points.totalLength},e.prototype.getPointAtLength=function(t,e){return void 0===e&&(e=!1),this.getPoint(t/this.getTotalLength(),e)},e.prototype.getPoint=function(t,e){void 0===e&&(e=!1);var n=this.parsedStyle,r=n.defX,i=n.defY,o=n.points,a=o.points,l=o.segments,s=0,u=0;l.forEach(function(e,n){t>=e[0]&&t<=e[1]&&(s=(t-e[0])/(e[1]-e[0]),u=n)});var c=fm(a[u][0],a[u][1],a[u+1][0],a[u+1][1],s),f=c.x,p=c.y,h=ud(un(),uo(f-r,p-i,0),e?this.getWorldTransform():this.getLocalTransform());return new fY(h[0],h[1])},e.prototype.getStartTangent=function(){var t=this.parsedStyle.points.points,e=[];return e.push([t[1][0],t[1][1]]),e.push([t[0][0],t[0][1]]),e},e.prototype.getEndTangent=function(){var t=this.parsedStyle.points.points,e=t.length-1,n=[];return n.push([t[e-1][0],t[e-1][1]]),n.push([t[e][0],t[e][1]]),n},e}(yc),yp=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=or(e,["style"]);return t.call(this,on({type:tX.RECT,style:dX.enableCSSParsing?on({x:"",y:"",width:"",height:"",radius:""},n):on({},n)},r))||this}return oe(e,t),e}(yt),yh=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=or(e,["style"]);return t.call(this,on({type:tX.TEXT,style:dX.enableCSSParsing?on({x:"",y:"",text:"",fontSize:"",fontFamily:"",fontStyle:"",fontWeight:"",fontVariant:"",textAlign:"",textBaseline:"",textTransform:"",fill:"black",letterSpacing:"",lineHeight:"",miterLimit:"",wordWrap:!1,wordWrapWidth:0,leading:0,dx:"",dy:""},n):on({fill:"black"},n),initialParsedStyle:dX.enableCSSParsing?{}:{x:0,y:0,fontSize:16,fontFamily:"sans-serif",fontStyle:"normal",fontWeight:"normal",fontVariant:"normal",lineHeight:0,letterSpacing:0,textBaseline:"alphabetic",textAlign:"start",wordWrap:!1,wordWrapWidth:0,leading:0,dx:0,dy:0}},r))||this}return oe(e,t),e.prototype.getComputedTextLength=function(){var t;return(null===(t=this.parsedStyle.metrics)||void 0===t?void 0:t.maxLineWidth)||0},e.prototype.getLineBoundingRects=function(){var t;return(null===(t=this.parsedStyle.metrics)||void 0===t?void 0:t.lineMetrics)||[]},e.prototype.isOverflowing=function(){return!!this.parsedStyle.isOverflowing},e}(yt),yd=function(){function t(){this.registry={},this.define(tX.CIRCLE,yn),this.define(tX.ELLIPSE,yi),this.define(tX.RECT,yp),this.define(tX.IMAGE,yl),this.define(tX.LINE,ys),this.define(tX.GROUP,yo),this.define(tX.PATH,yu),this.define(tX.POLYGON,yc),this.define(tX.POLYLINE,yf),this.define(tX.TEXT,yh),this.define(tX.HTML,ya)}return t.prototype.define=function(t,e){this.registry[t]=e},t.prototype.get=function(t){return this.registry[t]},t}(),yy=function(t){function e(){var e=t.call(this)||this;e.defaultView=null,e.ownerDocument=null,e.nodeName="document";try{e.timeline=new dX.AnimationTimeline(e)}catch(t){}var n={};return hk.forEach(function(t){var e=t.n,r=t.inh,i=t.d;r&&i&&(n[e]=pr(i)?i(tX.GROUP):i)}),e.documentElement=new yo({id:"g-root",style:n}),e.documentElement.ownerDocument=e,e.documentElement.parentNode=e,e.childNodes=[e.documentElement],e}return oe(e,t),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(t,e){if("svg"===t)return this.documentElement;var n=this.defaultView.customElements.get(t);!n&&(console.warn("Unsupported tagName: ",t),n="tspan"===t?yh:yo);var r=new n(e);return r.ownerDocument=this,r},e.prototype.createElementNS=function(t,e,n){return this.createElement(e,n)},e.prototype.cloneNode=function(t){throw Error(fK)},e.prototype.destroy=function(){try{this.documentElement.destroyChildren(),this.timeline.destroy()}catch(t){}},e.prototype.elementsFromBBox=function(t,e,n,r){var i=this.defaultView.context.rBushRoot.search({minX:t,minY:e,maxX:n,maxY:r}),o=[];return i.forEach(function(t){var e=t.displayObject,n=["auto","visiblepainted","visiblefill","visiblestroke","visible"].includes(e.parsedStyle.pointerEvents);(!n||n&&e.isVisible())&&!e.isCulled()&&e.isInteractive()&&o.push(e)}),o.sort(function(t,e){return e.sortable.renderOrder-t.sortable.renderOrder}),o},e.prototype.elementFromPointSync=function(t,e){var n=this.defaultView.canvas2Viewport({x:t,y:e}),r=n.x,i=n.y,o=this.defaultView.getConfig(),a=o.width,l=o.height;if(r<0||i<0||r>a||i>l)return null;var s=this.defaultView.viewport2Client({x:r,y:i}),u=s.x,c=s.y,f=this.defaultView.getRenderingService().hooks.pickSync.call({topmost:!0,position:{x:t,y:e,viewportX:r,viewportY:i,clientX:u,clientY:c},picked:[]}).picked;return f&&f[0]||this.documentElement},e.prototype.elementFromPoint=function(t,e){return oi(this,void 0,void 0,function(){var n,r,i,o,a,l,s,u,c,f;return oo(this,function(p){switch(p.label){case 0:if(r=(n=this.defaultView.canvas2Viewport({x:t,y:e})).x,i=n.y,a=(o=this.defaultView.getConfig()).width,l=o.height,r<0||i<0||r>a||i>l)return[2,null];return u=(s=this.defaultView.viewport2Client({x:r,y:i})).x,c=s.y,[4,this.defaultView.getRenderingService().hooks.pick.promise({topmost:!0,position:{x:t,y:e,viewportX:r,viewportY:i,clientX:u,clientY:c},picked:[]})];case 1:return[2,(f=p.sent().picked)&&f[0]||this.documentElement]}})})},e.prototype.elementsFromPointSync=function(t,e){var n=this.defaultView.canvas2Viewport({x:t,y:e}),r=n.x,i=n.y,o=this.defaultView.getConfig(),a=o.width,l=o.height;if(r<0||i<0||r>a||i>l)return[];var s=this.defaultView.viewport2Client({x:r,y:i}),u=s.x,c=s.y,f=this.defaultView.getRenderingService().hooks.pickSync.call({topmost:!1,position:{x:t,y:e,viewportX:r,viewportY:i,clientX:u,clientY:c},picked:[]}).picked;return f[f.length-1]!==this.documentElement&&f.push(this.documentElement),f},e.prototype.elementsFromPoint=function(t,e){return oi(this,void 0,void 0,function(){var n,r,i,o,a,l,s,u,c,f;return oo(this,function(p){switch(p.label){case 0:if(r=(n=this.defaultView.canvas2Viewport({x:t,y:e})).x,i=n.y,a=(o=this.defaultView.getConfig()).width,l=o.height,r<0||i<0||r>a||i>l)return[2,[]];return u=(s=this.defaultView.viewport2Client({x:r,y:i})).x,c=s.y,[4,this.defaultView.getRenderingService().hooks.pick.promise({topmost:!1,position:{x:t,y:e,viewportX:r,viewportY:i,clientX:u,clientY:c},picked:[]})];case 1:return(f=p.sent().picked)[f.length-1]!==this.documentElement&&f.push(this.documentElement),[2,f]}})})},e.prototype.appendChild=function(t,e){throw Error(fZ)},e.prototype.insertBefore=function(t,e){throw Error(fZ)},e.prototype.removeChild=function(t,e){throw Error(fZ)},e.prototype.replaceChild=function(t,e,n){throw Error(fZ)},e.prototype.append=function(){throw Error(fZ)},e.prototype.prepend=function(){throw Error(fZ)},e.prototype.getElementById=function(t){return this.documentElement.getElementById(t)},e.prototype.getElementsByName=function(t){return this.documentElement.getElementsByName(t)},e.prototype.getElementsByTagName=function(t){return this.documentElement.getElementsByTagName(t)},e.prototype.getElementsByClassName=function(t){return this.documentElement.getElementsByClassName(t)},e.prototype.querySelector=function(t){return this.documentElement.querySelector(t)},e.prototype.querySelectorAll=function(t){return this.documentElement.querySelectorAll(t)},e.prototype.find=function(t){return this.documentElement.find(t)},e.prototype.findAll=function(t){return this.documentElement.findAll(t)},e}(dj),yg=function(){function t(t){this.strategies=t}return t.prototype.apply=function(e){var n=e.camera,r=e.renderingService,i=e.renderingContext,o=this.strategies;r.hooks.cull.tap(t.tag,function(t){if(t){var e=t.cullable;return(0===o.length?e.visible=i.unculledEntities.indexOf(t.entity)>-1:e.visible=o.every(function(e){return e.isVisible(n,t)}),!t.isCulled()&&t.isVisible())?t:(t.dispatchEvent(new d_(en.CULLED)),null)}return t}),r.hooks.afterRender.tap(t.tag,function(t){t.cullable.visibilityPlaneMask=-1})},t.tag="Culling",t}(),yv=function(){function t(){var t=this;this.autoPreventDefault=!1,this.rootPointerEvent=new dM(null),this.rootWheelEvent=new dS(null),this.onPointerMove=function(e){var n,r,i,o,a=null===(o=null===(i=t.context.renderingContext.root)||void 0===i?void 0:i.ownerDocument)||void 0===o?void 0:o.defaultView;if(!a.supportsTouchEvents||"touch"!==e.pointerType){var l=t.normalizeToPointerEvent(e,a);try{for(var s=oa(l),u=s.next();!u.done;u=s.next()){var c=u.value,f=t.bootstrapEvent(t.rootPointerEvent,c,a,e);t.context.eventService.mapEvent(f)}}catch(t){n={error:t}}finally{try{u&&!u.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}t.setCursor(t.context.eventService.cursor)}},this.onClick=function(e){var n,r,i,o,a=null===(o=null===(i=t.context.renderingContext.root)||void 0===i?void 0:i.ownerDocument)||void 0===o?void 0:o.defaultView,l=t.normalizeToPointerEvent(e,a);try{for(var s=oa(l),u=s.next();!u.done;u=s.next()){var c=u.value,f=t.bootstrapEvent(t.rootPointerEvent,c,a,e);t.context.eventService.mapEvent(f)}}catch(t){n={error:t}}finally{try{u&&!u.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}t.setCursor(t.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(t){return n.context.renderingService.hooks.pickSync.call({position:t,picked:[],topmost:!0}).picked[0]||null}),r.hooks.pointerWheel.tap(t.tag,function(t){var e=n.normalizeWheelEvent(t);n.context.eventService.mapEvent(e)}),r.hooks.pointerDown.tap(t.tag,function(t){if(!i.supportsTouchEvents||"touch"!==t.pointerType){var e,r,o=n.normalizeToPointerEvent(t,i);n.autoPreventDefault&&o[0].isNormalized&&(t.cancelable||!("cancelable"in t))&&t.preventDefault();try{for(var a=oa(o),l=a.next();!l.done;l=a.next()){var s=l.value,u=n.bootstrapEvent(n.rootPointerEvent,s,i,t);n.context.eventService.mapEvent(u)}}catch(t){e={error:t}}finally{try{l&&!l.done&&(r=a.return)&&r.call(a)}finally{if(e)throw e.error}}n.setCursor(n.context.eventService.cursor)}}),r.hooks.pointerUp.tap(t.tag,function(t){if(!i.supportsTouchEvents||"touch"!==t.pointerType){var e,r,o=n.context.contextService.getDomElement(),a="outside";try{a=o&&t.target&&t.target!==o&&o.contains&&!o.contains(t.target)?"outside":""}catch(t){}var l=n.normalizeToPointerEvent(t,i);try{for(var s=oa(l),u=s.next();!u.done;u=s.next()){var c=u.value,f=n.bootstrapEvent(n.rootPointerEvent,c,i,t);f.type+=a,n.context.eventService.mapEvent(f)}}catch(t){e={error:t}}finally{try{u&&!u.done&&(r=s.return)&&r.call(s)}finally{if(e)throw e.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(t){var e,r,o=n.normalizeToPointerEvent(t,i);try{for(var a=oa(o),l=a.next();!l.done;l=a.next()){var s=l.value,u=n.bootstrapEvent(n.rootPointerEvent,s,i,t);n.context.eventService.mapEvent(u)}}catch(t){e={error:t}}finally{try{l&&!l.done&&(r=a.return)&&r.call(a)}finally{if(e)throw e.error}}n.setCursor(n.context.eventService.cursor)})},t.prototype.getViewportXY=function(t){var e,n,r=t.offsetX,i=t.offsetY,o=t.clientX,a=t.clientY;if(!this.context.config.supportsCSSTransform||cb(r)||cb(i)){var l=this.context.eventService.client2Viewport(new fY(o,a));e=l.x,n=l.y}else e=r,n=i;return{x:e,y:n}},t.prototype.bootstrapEvent=function(t,e,n,r){t.view=n,t.originalEvent=null,t.nativeEvent=r,t.pointerId=e.pointerId,t.width=e.width,t.height=e.height,t.isPrimary=e.isPrimary,t.pointerType=e.pointerType,t.pressure=e.pressure,t.tangentialPressure=e.tangentialPressure,t.tiltX=e.tiltX,t.tiltY=e.tiltY,t.twist=e.twist,this.transferMouseData(t,e);var i=this.getViewportXY(e),o=i.x,a=i.y;t.viewport.x=o,t.viewport.y=a;var l=this.context.eventService.viewport2Canvas(t.viewport),s=l.x,u=l.y;return t.canvas.x=s,t.canvas.y=u,t.global.copyFrom(t.canvas),t.offset.copyFrom(t.canvas),t.isTrusted=r.isTrusted,"pointerleave"===t.type&&(t.type="pointerout"),t.type.startsWith("mouse")&&(t.type=t.type.replace("mouse","pointer")),t.type.startsWith("touch")&&(t.type=h2[t.type]||t.type),t},t.prototype.normalizeWheelEvent=function(t){var e=this.rootWheelEvent;this.transferMouseData(e,t),e.deltaMode=t.deltaMode,e.deltaX=t.deltaX,e.deltaY=t.deltaY,e.deltaZ=t.deltaZ;var n=this.getViewportXY(t),r=n.x,i=n.y;e.viewport.x=r,e.viewport.y=i;var o=this.context.eventService.viewport2Canvas(e.viewport),a=o.x,l=o.y;return e.canvas.x=a,e.canvas.y=l,e.global.copyFrom(e.canvas),e.offset.copyFrom(e.canvas),e.nativeEvent=t,e.type=t.type,e},t.prototype.transferMouseData=function(t,e){t.isTrusted=e.isTrusted,t.srcElement=e.srcElement,t.timeStamp=h5.now(),t.type=e.type,t.altKey=e.altKey,t.metaKey=e.metaKey,t.shiftKey=e.shiftKey,t.ctrlKey=e.ctrlKey,t.button=e.button,t.buttons=e.buttons,t.client.x=e.clientX,t.client.y=e.clientY,t.movement.x=e.movementX,t.movement.y=e.movementY,t.page.x=e.pageX,t.page.y=e.pageY,t.screen.x=e.screenX,t.screen.y=e.screenY,t.relatedTarget=null},t.prototype.setCursor=function(t){this.context.contextService.applyCursorStyle(t||this.context.config.cursor||"default")},t.prototype.normalizeToPointerEvent=function(t,e){var n=[];if(e.isTouchEvent(t))for(var r=0;r<t.changedTouches.length;r++){var i=t.changedTouches[r];cY(i.button)&&(i.button=0),cY(i.buttons)&&(i.buttons=1),cY(i.isPrimary)&&(i.isPrimary=1===t.touches.length&&"touchstart"===t.type),cY(i.width)&&(i.width=i.radiusX||1),cY(i.height)&&(i.height=i.radiusY||1),cY(i.tiltX)&&(i.tiltX=0),cY(i.tiltY)&&(i.tiltY=0),cY(i.pointerType)&&(i.pointerType="touch"),cY(i.pointerId)&&(i.pointerId=i.identifier||0),cY(i.pressure)&&(i.pressure=i.force||.5),cY(i.twist)&&(i.twist=0),cY(i.tangentialPressure)&&(i.tangentialPressure=0),i.isNormalized=!0,i.type=t.type,n.push(i)}else e.isMouseEvent(t)&&(cY(t.isPrimary)&&(t.isPrimary=!0),cY(t.width)&&(t.width=1),cY(t.height)&&(t.height=1),cY(t.tiltX)&&(t.tiltX=0),cY(t.tiltY)&&(t.tiltY=0),cY(t.pointerType)&&(t.pointerType="mouse"),cY(t.pointerId)&&(t.pointerId=1),cY(t.pressure)&&(t.pressure=.5),cY(t.twist)&&(t.twist=0),cY(t.tangentialPressure)&&(t.tangentialPressure=0),t.isNormalized=!0),n.push(t);return n},t.tag="Event",t}(),ym=[tX.CIRCLE,tX.ELLIPSE,tX.IMAGE,tX.RECT,tX.LINE,tX.POLYLINE,tX.POLYGON,tX.TEXT,tX.PATH,tX.HTML],yb=function(){function t(){}return t.prototype.isVisible=function(t,e){var n,r,i=e.cullable;if(!i.enable)return!0;var o=e.getRenderBounds();if(fH.isEmpty(o))return!1;var a=t.getFrustum(),l=null===(r=null===(n=e.parentNode)||void 0===n?void 0:n.cullable)||void 0===r?void 0:r.visibilityPlaneMask;return i.visibilityPlaneMask=this.computeVisibilityWithPlaneMask(e,o,l||tZ.INDETERMINATE,a.planes),i.visible=i.visibilityPlaneMask!==tZ.OUTSIDE,i.visible},t.prototype.computeVisibilityWithPlaneMask=function(t,e,n,r){if(n===tZ.OUTSIDE||n===tZ.INSIDE)return n;for(var i=tZ.INSIDE,o=ym.indexOf(t.nodeName)>-1,a=0,l=r.length;a<l;++a){var s=1<<a;if((n&s)!=0&&(!o||4!==a&&5!==a)){var u=r[a],c=u.normal,f=u.distance;if(up(c,e.getPositiveFarPoint(r[a]))+f<0)return tZ.OUTSIDE;up(c,e.getNegativeFarPoint(r[a]))+f<0&&(i|=s)}}return i},t}(),yx=function(){function t(){this.toSync=new Set}return t.prototype.apply=function(e){var n=this,r=e.renderingService,i=e.renderingContext,o=e.rBushRoot,a=i.root.ownerDocument.defaultView;this.rBush=o;var l=function(t){t.target.renderable.dirty=!0,r.dirtify()},s=function(t){var e=t.detail.affectChildren,i=t.target;e&&i.forEach(function(t){n.toSync.add(t)});for(var o=i;o;)o.renderable&&n.toSync.add(o),o=o.parentElement;r.dirtify()},u=function(t){var e=t.target;dX.enableSizeAttenuation&&dX.styleValueRegistry.updateSizeAttenuation(e,a.getCamera().getZoom()),dX.enableCSSParsing&&dX.styleValueRegistry.recalc(e),dX.sceneGraphService.dirtifyToRoot(e),r.dirtify()},c=function(t){var e=t.target,i=e.rBushNode;i.aabb&&n.rBush.remove(i.aabb),n.toSync.delete(e),dX.sceneGraphService.dirtifyToRoot(e),r.dirtify()};r.hooks.init.tap(t.tag,function(){a.addEventListener(en.MOUNTED,u),a.addEventListener(en.UNMOUNTED,c),a.addEventListener(en.ATTR_MODIFIED,l),a.addEventListener(en.BOUNDS_CHANGED,s)}),r.hooks.destroy.tap(t.tag,function(){a.removeEventListener(en.MOUNTED,u),a.removeEventListener(en.UNMOUNTED,c),a.removeEventListener(en.ATTR_MODIFIED,l),a.removeEventListener(en.BOUNDS_CHANGED,s),n.toSync.clear()}),r.hooks.endFrame.tap(t.tag,function(){n.syncRTree()})},t.prototype.syncRTree=function(){var t=this,e=[];Array.from(this.toSync).filter(function(t){return t.isConnected}).forEach(function(n){var r=n.rBushNode;r&&r.aabb&&t.rBush.remove(r.aabb);var i=n.getRenderBounds();if(i){var o=ol(i.getMin(),2),a=o[0],l=o[1],s=ol(i.getMax(),2),u=s[0],c=s[1];!r.aabb&&(r.aabb={}),r.aabb.displayObject=n,r.aabb.minX=a,r.aabb.minY=l,r.aabb.maxX=u,r.aabb.maxY=c}r.aabb&&!isNaN(r.aabb.maxX)&&!isNaN(r.aabb.maxX)&&!isNaN(r.aabb.minX)&&!isNaN(r.aabb.minY)&&e.push(r.aabb)}),this.rBush.load(e),e.length=0,this.toSync.clear()},t.tag="Prepare",t}();(D=er||(er={})).READY="ready",D.BEFORE_RENDER="beforerender",D.RERENDER="rerender",D.AFTER_RENDER="afterrender",D.BEFORE_DESTROY="beforedestroy",D.AFTER_DESTROY="afterdestroy",D.RESIZE="resize",D.DIRTY_RECTANGLE="dirtyrectangle",D.RENDERER_CHANGED="rendererchanged";var yO=new d_(en.MOUNTED),yw=new d_(en.UNMOUNTED),yE=new d_(er.BEFORE_RENDER),yk=new d_(er.RERENDER),yM=new d_(er.AFTER_RENDER),yS=function(t){function e(e){var n,r,i,o,a=t.call(this)||this;a.Element=yt,a.inited=!1,a.context={},a.document=new yy,a.document.defaultView=a,a.customElements=new yd;var l=e.container,s=e.canvas,u=e.offscreenCanvas,c=e.width,f=e.height,p=e.devicePixelRatio,h=e.renderer,d=e.background,y=e.cursor,g=e.document,v=e.requestAnimationFrame,m=e.cancelAnimationFrame,b=e.createImage,x=e.supportsPointerEvents,O=e.supportsTouchEvents,w=e.supportsCSSTransform,E=e.supportsMutipleCanvasesInOneContainer,k=e.useNativeClickEvent,M=e.alwaysTriggerPointerEventOnCanvas,S=e.isTouchEvent,_=e.isMouseEvent;!E&&!function(t,e){if(t){var n="string"==typeof t?t:t.id||hZ++;hK[n]&&hK[n].destroy(),hK[n]=e}}(l,a);var P=c,j=f,A=p;if(s){;A=(A=p||hQ&&window.devicePixelRatio||1)>=1?Math.ceil(A):1,P=c||("auto"===(r=h1(n=s,"width"))?n.offsetWidth:parseFloat(r))||s.width/A,j=f||("auto"===(o=h1(i=s,"height"))?i.offsetHeight:parseFloat(o))||s.height/A}return u&&(dX.offscreenCanvas=u),a.devicePixelRatio=A,a.requestAnimationFrame=null!=v?v:di.bind(dX.globalThis),a.cancelAnimationFrame=null!=m?m:da.bind(dX.globalThis),a.supportsTouchEvents=null!=O?O:"ontouchstart"in dX.globalThis,a.supportsPointerEvents=null!=x?x:!!dX.globalThis.PointerEvent,a.isTouchEvent=null!=S?S:function(t){return a.supportsTouchEvents&&t instanceof dX.globalThis.TouchEvent},a.isMouseEvent=null!=_?_:function(t){return!dX.globalThis.MouseEvent||t instanceof dX.globalThis.MouseEvent&&(!a.supportsPointerEvents||!(t instanceof dX.globalThis.PointerEvent))},a.initRenderingContext({container:l,canvas:s,width:P,height:j,renderer:h,offscreenCanvas:u,devicePixelRatio:A,cursor:y||"default",background:d||"transparent",createImage:b,document:g,supportsCSSTransform:w,useNativeClickEvent:k,alwaysTriggerPointerEventOnCanvas:M}),a.initDefaultCamera(P,j,h.clipSpaceNearZ),a.initRenderer(h,!0),a}return oe(e,t),e.prototype.initRenderingContext=function(t){this.context.config=t,this.context.renderingContext={root:this.document.documentElement,renderListCurrentFrame:[],unculledEntities:[],renderReasons:new Set,force:!1,dirty:!1}},e.prototype.initDefaultCamera=function(t,e,n){var r=this,i=new dX.CameraContribution;i.clipSpaceNearZ=n,i.setType(tQ.EXPLORING,tJ.DEFAULT).setPosition(t/2,e/2,500).setFocalPoint(t/2,e/2,0).setOrthographic(-(t/2),t/2,e/2,-(e/2),.1,1e3),i.canvas=this,i.eventEmitter.on(fQ.UPDATED,function(){r.context.renderingContext.renderReasons.add(ee.CAMERA_CHANGED),dX.enableSizeAttenuation&&r.getConfig().renderer.getConfig().enableSizeAttenuation&&r.updateSizeAttenuation()}),this.context.camera=i},e.prototype.updateSizeAttenuation=function(){var t=this.getCamera().getZoom();this.document.documentElement.forEach(function(e){dX.styleValueRegistry.updateSizeAttenuation(e,t)})},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 t=this;return!this.readyPromise&&(this.readyPromise=new Promise(function(e){t.resolveReadyPromise=function(){e(t)}}),this.inited&&this.resolveReadyPromise()),this.readyPromise},enumerable:!1,configurable:!0}),e.prototype.destroy=function(t,e){void 0===t&&(t=!0),void 0===e&&(e=!1),!e&&this.dispatchEvent(new d_(er.BEFORE_DESTROY)),this.frameId&&(this.getConfig().cancelAnimationFrame||cancelAnimationFrame)(this.frameId);var n=this.getRoot();this.unmountChildren(n),t&&(this.document.destroy(),this.getEventService().destroy()),this.getRenderingService().destroy(),this.getContextService().destroy(),t&&this.context.rBushRoot&&(this.context.rBushRoot.clear(),this.context.rBushRoot=null,this.context.renderingContext.root=null),!e&&this.dispatchEvent(new d_(er.AFTER_DESTROY))},e.prototype.changeSize=function(t,e){this.resize(t,e)},e.prototype.resize=function(t,e){var n=this.context.config;n.width=t,n.height=e,this.getContextService().resize(t,e);var r=this.context.camera,i=r.getProjectionMode();r.setPosition(t/2,e/2,500).setFocalPoint(t/2,e/2,0),i===t0.ORTHOGRAPHIC?r.setOrthographic(-(t/2),t/2,e/2,-(e/2),r.getNear(),r.getFar()):r.setAspect(t/e),this.dispatchEvent(new d_(er.RESIZE,{width:t,height:e}))},e.prototype.appendChild=function(t,e){return this.document.documentElement.appendChild(t,e)},e.prototype.insertBefore=function(t,e){return this.document.documentElement.insertBefore(t,e)},e.prototype.removeChild=function(t){return this.document.documentElement.removeChild(t)},e.prototype.removeChildren=function(){this.document.documentElement.removeChildren()},e.prototype.destroyChildren=function(){this.document.documentElement.destroyChildren()},e.prototype.render=function(){var t=this;this.dispatchEvent(yE),this.getRenderingService().render(this.getConfig(),function(){t.dispatchEvent(yk)}),this.dispatchEvent(yM)},e.prototype.run=function(){var t=this,e=function(){t.render(),t.frameId=t.requestAnimationFrame(e)};e()},e.prototype.initRenderer=function(t,e){var n=this;if(void 0===e&&(e=!1),!t)throw Error("Renderer is required.");this.inited=!1,this.readyPromise=void 0,this.context.rBushRoot=new fS,this.context.renderingPlugins=[],this.context.renderingPlugins.push(new yv,new yx,new yg([new yb])),this.loadRendererContainerModule(t),this.context.contextService=new this.context.ContextService(on(on({},dX),this.context)),this.context.renderingService=new dC(dX,this.context),this.context.eventService=new dA(dX,this.context),this.context.eventService.init(),this.context.contextService.init?(this.context.contextService.init(),this.initRenderingService(t,e,!0)):this.context.contextService.initAsync().then(function(){n.initRenderingService(t,e)})},e.prototype.initRenderingService=function(t,e,n){var r=this;void 0===e&&(e=!1),void 0===n&&(n=!1),this.context.renderingService.init(function(){r.inited=!0,e?(n?r.requestAnimationFrame(function(){r.dispatchEvent(new d_(er.READY))}):r.dispatchEvent(new d_(er.READY)),r.readyPromise&&r.resolveReadyPromise()):r.dispatchEvent(new d_(er.RENDERER_CHANGED)),!e&&r.getRoot().forEach(function(t){var e=t.renderable;e&&(e.renderBoundsDirty=!0,e.boundsDirty=!0,e.dirty=!0)}),r.mountChildren(r.getRoot()),t.getConfig().enableAutoRendering&&r.run()})},e.prototype.loadRendererContainerModule=function(t){var e=this;t.getPlugins().forEach(function(t){t.context=e.context,t.init(dX)})},e.prototype.setRenderer=function(t){var e=this.getConfig();if(e.renderer!==t){var n=e.renderer;e.renderer=t,this.destroy(!1,!0),ou([],ol(null==n?void 0:n.getPlugins()),!1).reverse().forEach(function(t){t.destroy(dX)}),this.initRenderer(t)}},e.prototype.setCursor=function(t){this.getConfig().cursor=t,this.getContextService().applyCursorStyle(t)},e.prototype.unmountChildren=function(t){var e=this;t.childNodes.forEach(function(t){e.unmountChildren(t)}),this.inited&&(t.isMutationObserved?t.dispatchEvent(yw):(yw.target=t,this.dispatchEvent(yw,!0)),t!==this.document.documentElement&&(t.ownerDocument=null),t.isConnected=!1),t.isCustomElement&&t.disconnectedCallback&&t.disconnectedCallback()},e.prototype.mountChildren=function(t){var e=this;this.inited?!t.isConnected&&(t.ownerDocument=this.document,t.isConnected=!0,t.isMutationObserved?t.dispatchEvent(yO):(yO.target=t,this.dispatchEvent(yO,!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: ",t.nodeName),t.childNodes.forEach(function(t){e.mountChildren(t)}),t.isCustomElement&&t.connectedCallback&&t.connectedCallback()},e.prototype.client2Viewport=function(t){return this.getEventService().client2Viewport(t)},e.prototype.viewport2Client=function(t){return this.getEventService().viewport2Client(t)},e.prototype.viewport2Canvas=function(t){return this.getEventService().viewport2Canvas(t)},e.prototype.canvas2Viewport=function(t){return this.getEventService().canvas2Viewport(t)},e.prototype.getPointByClient=function(t,e){return this.client2Viewport({x:t,y:e})},e.prototype.getClientByPoint=function(t,e){return this.viewport2Client({x:t,y:e})},e}(dP),y_={}.toString,yP=function(t,e){return y_.call(t)==="[object "+e+"]"},yj=function(t){function e(){var e=t.apply(this,ou([],ol(arguments),!1))||this;return e.landmarks=[],e}return oe(e,t),e.prototype.rotate=function(t,e,n){if(this.relElevation=fN(e),this.relAzimuth=fN(t),this.relRoll=fN(n),this.elevation+=this.relElevation,this.azimuth+=this.relAzimuth,this.roll+=this.relRoll,this.type===tQ.EXPLORING){var r=cs(cl(),[1,0,0],fI((this.rotateWorld?1:-1)*this.relElevation)),i=cs(cl(),[0,1,0],fI((this.rotateWorld?1:-1)*this.relAzimuth)),o=cs(cl(),[0,0,1],fI(this.relRoll)),a=cu(cl(),i,r);a=cu(cl(),a,o);var l=uq(uv(),a);uP(this.matrix,this.matrix,[0,0,-this.distance]),u_(this.matrix,this.matrix,l),uP(this.matrix,this.matrix,[0,0,this.distance])}else{if(Math.abs(this.elevation)>90)return this;this.computeMatrix()}return this._getAxes(),this.type===tQ.ORBITING||this.type===tQ.EXPLORING?this._getPosition():this.type===tQ.TRACKING&&this._getFocalPoint(),this._update(),this},e.prototype.pan=function(t,e){var n=fL(t,e,0),r=ur(this.position);return us(r,r,uc(un(),this.right,n[0])),us(r,r,uc(un(),this.up,n[1])),this._setPosition(r),this.triggerUpdate(),this},e.prototype.dolly=function(t){var e=this.forward,n=ur(this.position),r=t*this.dollyingStep;return r=Math.max(Math.min(this.distance+t*this.dollyingStep,this.maxDistance),this.minDistance)-this.distance,n[0]+=r*e[0],n[1]+=r*e[1],n[2]+=r*e[2],this._setPosition(n),this.type===tQ.ORBITING||this.type===tQ.EXPLORING?this._getDistance():this.type===tQ.TRACKING&&us(this.focalPoint,n,this.distanceVector),this.triggerUpdate(),this},e.prototype.cancelLandmarkAnimation=function(){void 0!==this.landmarkAnimationID&&this.canvas.cancelAnimationFrame(this.landmarkAnimationID)},e.prototype.createLandmark=function(t,e){void 0===e&&(e={});var n,r,i,o,a=e.position,l=void 0===a?this.position:a,s=e.focalPoint,u=void 0===s?this.focalPoint:s,c=e.roll,f=e.zoom,p=new dX.CameraContribution;p.setType(this.type,void 0),p.setPosition(l[0],null!==(n=l[1])&&void 0!==n?n:this.position[1],null!==(r=l[2])&&void 0!==r?r:this.position[2]),p.setFocalPoint(u[0],null!==(i=u[1])&&void 0!==i?i:this.focalPoint[1],null!==(o=u[2])&&void 0!==o?o:this.focalPoint[2]),p.setRoll(null!=c?c:this.roll),p.setZoom(null!=f?f:this.zoom);var h={name:t,matrix:um(p.getWorldTransform()),right:ur(p.right),up:ur(p.up),forward:ur(p.forward),position:ur(p.getPosition()),focalPoint:ur(p.getFocalPoint()),distanceVector:ur(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(h),h},e.prototype.gotoLandmark=function(t,e){var n=this;void 0===e&&(e={});var r=yP(t,"String")?this.landmarks.find(function(e){return e.name===t}):t;if(r){var i,o=yP(e,"Number")?{duration:e}:e,a=o.easing,l=o.duration,s=void 0===l?100:l,u=o.easingFunction,c=o.onfinish,f=void 0===c?void 0:c,p=o.onframe,h=void 0===p?void 0:p;if(0===s){this.syncFromLandmark(r),f&&f();return}this.cancelLandmarkAnimation();var d=r.position,y=r.focalPoint,g=r.zoom,v=r.roll,m=(void 0===u?void 0:u)||dX.EasingFunction(void 0===a?"linear":a),b=function(){n.setFocalPoint(y),n.setPosition(d),n.setRoll(v),n.setZoom(g),n.computeMatrix(),n.triggerUpdate(),f&&f()},x=function(t){void 0===i&&(i=t);var e=t-i;if(e>s){b();return}var r=m(e/s),o=un(),a=un(),l=1,u=0;if(uh(o,n.focalPoint,y,r),uh(a,n.position,d,r),u=n.roll*(1-r)+v*r,l=n.zoom*(1-r)+g*r,n.setFocalPoint(o),n.setPosition(a),n.setRoll(u),n.setZoom(l),ug(o,y)+ug(a,d)<=.01&&void 0==g&&void 0==v){b();return}n.computeMatrix(),n.triggerUpdate(),e<s&&(h&&h(r),n.landmarkAnimationID=n.canvas.requestAnimationFrame(x))};this.canvas.requestAnimationFrame(x)}},e.prototype.syncFromLandmark=function(t){this.matrix=ub(this.matrix,t.matrix),this.right=ua(this.right,t.right),this.up=ua(this.up,t.up),this.forward=ua(this.forward,t.forward),this.position=ua(this.position,t.position),this.focalPoint=ua(this.focalPoint,t.focalPoint),this.distanceVector=ua(this.distanceVector,t.distanceVector),this.azimuth=t.azimuth,this.elevation=t.elevation,this.roll=t.roll,this.relAzimuth=t.relAzimuth,this.relElevation=t.relElevation,this.relRoll=t.relRoll,this.dollyingStep=t.dollyingStep,this.distance=t.distance,this.zoom=t.zoom},e}(fJ);dX.CameraContribution=yj;var yA=function(){function t(t,e){this.type=t,this.target=e,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}(),yT=0,yC=new WeakMap,yN=function(){function t(t,e,n){this.observer=t,this.target=e,this.options=n,this.transientObservedNodes=[]}return t.prototype.enqueue=function(t){var e=this.observer.records,n=e.length;if(e.length>0){var r=function(t,e){var n;if(t===e)return t;return eo&&((n=t)===eo||n===ei)?eo:null}(e[n-1],t);if(r){e[n-1]=r;return}}else(function(t){yD.push(t),!yR&&(yR=!0,void 0!==dX.globalThis?dX.globalThis.setTimeout(yF):yF())})(this.observer);e[n]=t},t.prototype.addListeners=function(){this.addListeners_(this.target)},t.prototype.addListeners_=function(t){var e=this.options;e.attributes&&t.addEventListener(en.ATTR_MODIFIED,this,!0),e.childList&&t.addEventListener(en.INSERTED,this,!0),(e.childList||e.subtree)&&t.addEventListener(en.REMOVED,this,!0)},t.prototype.removeListeners=function(){this.removeListeners_(this.target)},t.prototype.removeListeners_=function(t){var e=this.options;e.attributes&&t.removeEventListener(en.ATTR_MODIFIED,this,!0),e.childList&&t.removeEventListener(en.INSERTED,this,!0),(e.childList||e.subtree)&&t.removeEventListener(en.REMOVED,this,!0)},t.prototype.removeTransientObservers=function(){var t=this.transientObservedNodes;this.transientObservedNodes=[],t.forEach(function(t){this.removeListeners_(t);for(var e=yC.get(t),n=0;n<e.length;n++)if(e[n]===this){e.splice(n,1);break}},this)},t.prototype.handleEvent=function(t){switch(t.stopImmediatePropagation(),t.type){case en.ATTR_MODIFIED:var e,n,r=t.attrName,i=t.relatedNode.namespaceURI;(e=function(t,e){return ei=new yA(t,e)}("attributes",n=t.target)).attributeName=r,e.attributeNamespace=i;var o=t.attrChange===dI.ADDITION?null:t.prevValue;yI(n,function(t){if(t.attributes)return t.attributeFilter&&t.attributeFilter.length&&-1===t.attributeFilter.indexOf(r)&&-1===t.attributeFilter.indexOf(i)?void 0:t.attributeOldValue?function(t){return eo?eo:((eo=yA.copy(ei)).oldValue=t,eo)}(o):e});break;case en.REMOVED:case en.INSERTED:n=t.relatedNode;var a=t.target,l=void 0,s=void 0;t.type===en.INSERTED?(l=[a],s=[]):(l=[],s=[a]);var u=a.previousSibling,c=a.nextSibling;(e=function(t,e){return ei=new yA(t,e)}("childList",n)).addedNodes=l,e.removedNodes=s,e.previousSibling=u,e.nextSibling=c,yI(n,function(t){if(t.childList)return e})}(function(){ei=eo=void 0})()},t}();function yL(t,e){return ei=new yA(t,e)}!function(){function t(t){this.callback=t,this.nodes=[],this.records=[],this.uid=yT++}t.prototype.observe=function(t,e){if(!e.childList&&!e.attributes&&!e.characterData||e.attributeOldValue&&!e.attributes||e.attributeFilter&&e.attributeFilter.length&&!e.attributes||e.characterDataOldValue&&!e.characterData)throw SyntaxError();var n,r=yC.get(t);!r&&yC.set(t,r=[]);for(var i=0;i<r.length;i++)if(r[i].observer===this){(n=r[i]).removeListeners(),n.options=e;break}!n&&(n=new yN(this,t,e),r.push(n),this.nodes.push(t)),n.addListeners()},t.prototype.disconnect=function(){var t=this;this.nodes.forEach(function(e){for(var n=yC.get(e),r=0;r<n.length;r++){var i=n[r];if(i.observer===t){i.removeListeners(),n.splice(r,1);break}}},this),this.records=[]},t.prototype.takeRecords=function(){var t=this.records;return this.records=[],t}}();function yI(t,e){for(var n=t;n;n=n.parentNode){var r=yC.get(n);if(r)for(var i=0;i<r.length;i++){var o=r[i],a=o.options;if(n===t||a.subtree){var l=e(a);l&&o.enqueue(l)}}}}var yR=!1,yD=[];function yF(){yR=!1;var t=yD;yD=[],t.sort(function(t,e){return t.uid-e.uid});var e=!1;t.forEach(function(t){var n=t.takeRecords();!function(t){t.nodes.forEach(function(e){var n=yC.get(e);n&&n.forEach(function(e){e.observer===t&&e.removeTransientObservers()})})}(t),n.length&&(t.callback(n,t),e=!0)}),e&&yF()}var yz=function(t,e,n){return t<e?e:t>n?n:t},yB={}.toString,yW=function(t){var e;return e=t,"[object Number]"===yB.call(e)},y$=function(t){return null==t},yG=function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o.currentTime=r,o.timelineTime=i,o.target=n,o.type="finish",o.bubbles=!1,o.currentTarget=n,o.defaultPrevented=!1,o.eventPhase=o.AT_TARGET,o.timeStamp=Date.now(),o.currentTime=r,o.timelineTime=i,o}return oe(e,t),e}(dE),yV=0,yH=function(){function t(t,e){var n;this.currentTimePending=!1,this._idle=!0,this._paused=!1,this._finishedFlag=!0,this._currentTime=0,this._playbackRate=1,this._inTimeline=!0,this.effect=t,t.animation=this,this.timeline=e,this.id="".concat(yV++),this._inEffect=!!this.effect.update(0),this._totalDuration=Number(null===(n=this.effect)||void 0===n?void 0:n.getComputedTiming().endTime),this._holdTime=0,this._paused=!1,this.oldPlayState="idle",this.updatePromises()}return Object.defineProperty(t.prototype,"pending",{get:function(){return null===this._startTime&&!this._paused&&0!==this.playbackRate||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 t=this;return!this.readyPromise&&(-1===this.timeline.animationsWithPromises.indexOf(this)&&this.timeline.animationsWithPromises.push(this),this.readyPromise=new Promise(function(e,n){t.resolveReadyPromise=function(){e(t)},t.rejectReadyPromise=function(){n(Error())}}),!this.pending&&this.resolveReadyPromise()),this.readyPromise},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"finished",{get:function(){var t=this;return!this.finishedPromise&&(-1===this.timeline.animationsWithPromises.indexOf(this)&&this.timeline.animationsWithPromises.push(this),this.finishedPromise=new Promise(function(e,n){t.resolveFinishedPromise=function(){e(t)},t.rejectFinishedPromise=function(){n(Error())}}),"finished"===this.playState&&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(t){var e;if(!isNaN(t=Number(t))){if(this.timeline.restart(),!this._paused&&null!==this._startTime&&(this._startTime=Number(null===(e=this.timeline)||void 0===e?void 0:e.currentTime)-t/this.playbackRate),this.currentTimePending=!1,this._currentTime===t)return;this._idle&&(this._idle=!1,this._paused=!0),this.tickCurrentTime(t,!0),this.timeline.applyDirtiedAnimation(this)}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"startTime",{get:function(){return this._startTime},set:function(t){if(null!==t){if(this.updatePromises(),!isNaN(t=Number(t)))!this._paused&&!this._idle&&(this._startTime=t,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(t){if(t!==this._playbackRate){this.updatePromises();var e=this.currentTime;this._playbackRate=t,this.startTime=null,"paused"!==this.playState&&"idle"!==this.playState&&(this._finishedFlag=!1,this._idle=!1,this.ensureAlive(),this.timeline.applyDirtiedAnimation(this)),null!==e&&(this.currentTime=e),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&&0>=Number(this._currentTime))},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||"running"===this.playState||!this._finishedFlag},enumerable:!1,configurable:!0}),t.prototype.updatePromises=function(){var t=this.oldPlayState,e=this.pending?"pending":this.playState;return this.readyPromise&&e!==t&&("idle"===e?(this.rejectReadyPromise(),this.readyPromise=void 0):"pending"===t?this.resolveReadyPromise():"pending"===e&&(this.readyPromise=void 0)),this.finishedPromise&&e!==t&&("idle"===e?(this.rejectFinishedPromise(),this.finishedPromise=void 0):"finished"===e?this.resolveFinishedPromise():"finished"===t&&(this.finishedPromise=void 0)),this.oldPlayState=e,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),-1===this.timeline.animations.indexOf(this)&&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._idle&&(this.rewind(),this._idle=!1):this.currentTimePending=!0,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 t=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 e=new yG(null,this,this.currentTime,null);setTimeout(function(){t.oncancel(e)})}},t.prototype.reverse=function(){this.updatePromises();var t=this.currentTime;this.playbackRate*=-1,this.play(),null!==t&&(this.currentTime=t),this.updatePromises()},t.prototype.updatePlaybackRate=function(t){this.playbackRate=t},t.prototype.targetAnimations=function(){var t;return(null===(t=this.effect)||void 0===t?void 0:t.target).getAnimations()},t.prototype.markTarget=function(){var t=this.targetAnimations();-1===t.indexOf(this)&&t.push(this)},t.prototype.unmarkTarget=function(){var t=this.targetAnimations(),e=t.indexOf(this);-1!==e&&t.splice(e,1)},t.prototype.tick=function(t,e){!this._idle&&!this._paused&&(null===this._startTime?e&&(this.startTime=t-this._currentTime/this.playbackRate):!this._isFinished&&this.tickCurrentTime((t-this._startTime)*this.playbackRate)),e&&(this.currentTimePending=!1,this.fireEvents(t))},t.prototype.rewind=function(){if(this.playbackRate>=0)this.currentTime=0;else if(this._totalDuration<1/0)this.currentTime=this._totalDuration;else throw Error("Unable to rewind negative playback rate animation with infinite duration")},t.prototype.persist=function(){throw Error(fK)},t.prototype.addEventListener=function(t,e,n){throw Error(fK)},t.prototype.removeEventListener=function(t,e,n){throw Error(fK)},t.prototype.dispatchEvent=function(t){throw Error(fK)},t.prototype.commitStyles=function(){throw Error(fK)},t.prototype.ensureAlive=function(){var t,e;this.playbackRate<0&&0===this.currentTime?this._inEffect=!!(null===(t=this.effect)||void 0===t?void 0:t.update(-1)):this._inEffect=!!(null===(e=this.effect)||void 0===e?void 0:e.update(this.currentTime)),!this._inTimeline&&(this._inEffect||!this._finishedFlag)&&(this._inTimeline=!0,this.timeline.animations.push(this))},t.prototype.tickCurrentTime=function(t,e){t!==this._currentTime&&(this._currentTime=t,this._isFinished&&!e&&(this._currentTime=this._playbackRate>0?this._totalDuration:0),this.ensureAlive())},t.prototype.fireEvents=function(t){var e=this;if(this._isFinished){if(!this._finishedFlag){if(this.onfinish){var n=new yG(null,this,this.currentTime,t);setTimeout(function(){e.onfinish&&e.onfinish(n)})}this._finishedFlag=!0}}else{if(this.onframe&&"running"===this.playState){var r=new yG(null,this,this.currentTime,t);this.onframe(r)}this._finishedFlag=!1}},t}(),yU=.1,yq="function"==typeof Float32Array,yY=function(t,e){return 1-3*e+3*t},yX=function(t,e){return 3*e-6*t},yK=function(t){return 3*t},yZ=function(t,e,n){return((yY(e,n)*t+yX(e,n))*t+yK(e))*t},yQ=function(t,e,n){return 3*yY(e,n)*t*t+2*yX(e,n)*t+yK(e)},yJ=function(t,e,n,r,i){var o,a,l=0;do(o=yZ(a=e+(n-e)/2,r,i)-t)>0?n=a:e=a;while(Math.abs(o)>1e-7&&++l<10);return a},y0=function(t,e,n,r){for(var i=0;i<4;++i){var o=yQ(e,n,r);if(0===o)break;var a=yZ(e,n,r)-t;e-=a/o}return e},y1=function(t,e,n,r){if(!(0<=t&&t<=1&&0<=n&&n<=1))throw Error("bezier x values must be in [0, 1] range");if(t===e&&n===r)return function(t){return t};for(var i=yq?new Float32Array(11):Array(11),o=0;o<11;++o)i[o]=yZ(o*yU,t,n);var a=function(e){for(var r=0,o=1,a=10;o!==a&&i[o]<=e;++o)r+=yU;var l=r+(e-i[--o])/(i[o+1]-i[o])*yU,s=yQ(l,t,n);return s>=.001?y0(e,l,t,n):0===s?l:yJ(e,r,r+yU,t,n)};return function(t){return 0===t||1===t?t:yZ(a(t),e,r)}},y2=function(t){return Math.pow(t,2)},y5=function(t){return Math.pow(t,3)},y3=function(t){return Math.pow(t,4)},y4=function(t){return Math.pow(t,5)},y6=function(t){return Math.pow(t,6)},y8=function(t){return 1-Math.cos(t*Math.PI/2)},y9=function(t){return 1-Math.sqrt(1-t*t)},y7=function(t){return t*t*(3*t-2)},gt=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((3*e-2)/22-t,2)},ge=function(t,e){void 0===e&&(e=[]);var n=ol(e,2),r=n[0],i=n[1],o=yz(Number(void 0===r?1:r),1,10),a=yz(Number(void 0===i?.5:i),.1,2);return 0===t||1===t?t:-o*Math.pow(2,10*(t-1))*Math.sin(2*Math.PI*(t-1-a/(2*Math.PI)*Math.asin(1/o))/a)},gn=function(t,e,n){void 0===e&&(e=[]);var r=ol(e,4),i=r[0],o=void 0===i?1:i,a=r[1],l=void 0===a?100:a,s=r[2],u=void 0===s?10:s,c=r[3],f=void 0===c?0:c;o=yz(o,.1,1e3),l=yz(l,.1,1e3),u=yz(u,.1,1e3),f=yz(f,.1,1e3);var p=Math.sqrt(l/o),h=u/(2*Math.sqrt(l*o)),d=h<1?p*Math.sqrt(1-h*h):0,y=h<1?(h*p+-f)/d:-f+p,g=n?n*t/1e3:t;return(g=h<1?Math.exp(-g*h*p)*(1*Math.cos(d*g)+y*Math.sin(d*g)):(1+y*g)*Math.exp(-g*p),0===t||1===t)?t:1-g},gr=function(t,e){void 0===e&&(e=[]);var n=ol(e,2),r=n[0],i=void 0===r?10:r;return("start"==n[1]?Math.ceil:Math.floor)(yz(t,0,1)*i)/i},gi=function(t,e){void 0===e&&(e=[]);var n=ol(e,4);return y1(n[0],n[1],n[2],n[3])(t)},go=y1(.42,0,1,1),ga=function(t){return function(e,n,r){return void 0===n&&(n=[]),1-t(1-e,n,r)}},gl=function(t){return function(e,n,r){return void 0===n&&(n=[]),e<.5?t(2*e,n,r)/2:1-t(-2*e+2,n,r)/2}},gs=function(t){return function(e,n,r){return void 0===n&&(n=[]),e<.5?(1-t(1-2*e,n,r))/2:(t(2*e-1,n,r)+1)/2}},gu={steps:gr,"step-start":function(t){return gr(t,[1,"start"])},"step-end":function(t){return gr(t,[1,"end"])},linear:function(t){return t},"cubic-bezier":gi,ease:function(t){return gi(t,[.25,.1,.25,1])},in:go,out:ga(go),"in-out":gl(go),"out-in":gs(go),"in-quad":y2,"out-quad":ga(y2),"in-out-quad":gl(y2),"out-in-quad":gs(y2),"in-cubic":y5,"out-cubic":ga(y5),"in-out-cubic":gl(y5),"out-in-cubic":gs(y5),"in-quart":y3,"out-quart":ga(y3),"in-out-quart":gl(y3),"out-in-quart":gs(y3),"in-quint":y4,"out-quint":ga(y4),"in-out-quint":gl(y4),"out-in-quint":gs(y4),"in-expo":y6,"out-expo":ga(y6),"in-out-expo":gl(y6),"out-in-expo":gs(y6),"in-sine":y8,"out-sine":ga(y8),"in-out-sine":gl(y8),"out-in-sine":gs(y8),"in-circ":y9,"out-circ":ga(y9),"in-out-circ":gl(y9),"out-in-circ":gs(y9),"in-back":y7,"out-back":ga(y7),"in-out-back":gl(y7),"out-in-back":gs(y7),"in-bounce":gt,"out-bounce":ga(gt),"in-out-bounce":gl(gt),"out-in-bounce":gs(gt),"in-elastic":ge,"out-elastic":ga(ge),"in-out-elastic":gl(ge),"out-in-elastic":gs(ge),spring:gn,"spring-in":gn,"spring-out":ga(gn),"spring-in-out":gl(gn),"spring-out-in":gs(gn)},gc=function(t){var e;return("-"===(e=(e=t).replace(/([A-Z])/g,function(t){return"-".concat(t.toLowerCase())})).charAt(0)?e.substring(1):e).replace(/^ease-/,"").replace(/(\(|\s).+/,"").toLowerCase().trim()},gf=function(t){return t};function gp(t,e){return function(n){if(n>=1)return 1;var r=1/t;return(n+=e*r)-n%r}}var gh="\\s*(-?\\d+\\.?\\d*|-?\\.\\d+)\\s*",gd=RegExp("cubic-bezier\\("+gh+","+gh+","+gh+","+gh+"\\)"),gy=/steps\(\s*(\d+)\s*\)/,gg=/steps\(\s*(\d+)\s*,\s*(start|middle|end)\s*\)/;function gv(t){var e=gd.exec(t);if(e)return y1.apply(void 0,ou([],ol(e.slice(1).map(Number)),!1));var n=gy.exec(t);if(n)return gp(Number(n[1]),0);var r=gg.exec(t);if(r)return gp(Number(r[1]),{start:1,middle:.5,end:0}[r[2]]);return gu[gc(t)]||gu.linear}function gm(t){return"offset"!==t&&"easing"!==t&&"composite"!==t&&"computedOffset"!==t}var gb=function(t,e,n){return function(r){var i=function t(e,n,r){if("number"==typeof e&&"number"==typeof n)return e*(1-r)+n*r;if("boolean"==typeof e&&"boolean"==typeof n||"string"==typeof e&&"string"==typeof n)return r<.5?e:n;if(Array.isArray(e)&&Array.isArray(n)){for(var i=e.length,o=n.length,a=Math.max(i,o),l=[],s=0;s<a;s++)l.push(t(e[s<i?s:i-1],n[s<o?s:o-1],r));return l}throw Error("Mismatched interpolation arguments "+e+":"+n)}(t,e,r);return!dX.enableCSSParsing&&yW(i)?i:n(i)}},gx=function(){function t(){this.delay=0,this.direction="normal",this.duration="auto",this._easing="linear",this.easingFunction=gf,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(t){this.easingFunction=gv(t),this._easing=t},enumerable:!1,configurable:!0}),t}();function gO(t,e){if(null===t)return[];!Array.isArray(t)&&(t=function(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,o=0;o<i;o++){if(!e[o]){var a={};"offset"in t&&(a.offset=Number(t.offset)),"easing"in t&&(a.easing=t.easing),"composite"in t&&(a.composite=t.composite),e[o]=a}void 0!==r[o]&&null!==r[o]&&(e[o][n]=r[o])}}}return e.sort(function(t,e){return(t.computedOffset||0)-(e.computedOffset||0)}),e}(t));for(var n=t.map(function(t){var n={};for(var r in(null==e?void 0:e.composite)&&(n.composite="auto"),t){var i=t[r];if("offset"===r){if(null!==i){if(!isFinite(i=Number(i)))throw Error("Keyframe offsets must be numbers.");if(i<0||i>1)throw Error("Keyframe offsets must be between 0 and 1.");n.computedOffset=i}}else if("composite"===r&&-1===["replace","add","accumulate","auto"].indexOf(i))throw Error("".concat(i," compositing is not supported"));n[r]=i}return void 0===n.offset&&(n.offset=null),void 0===n.easing&&(n.easing=(null==e?void 0:e.easing)||"linear"),void 0===n.composite&&(n.composite="auto"),n}),r=!0,i=-1/0,o=0;o<n.length;o++){var a=n[o].offset;if(y$(a))r=!1;else{if(a<i)throw TypeError("Keyframes are not loosely sorted by offset. Sort or specify offsets.");i=a}}return n=n.filter(function(t){return Number(t.offset)>=0&&1>=Number(t.offset)}),!r&&!function(){var t,e,r=n.length;n[r-1].computedOffset=Number(null!==(t=n[r-1].offset)&&void 0!==t?t:1),r>1&&(n[0].computedOffset=Number(null!==(e=n[0].offset)&&void 0!==e?e:0));for(var i=0,o=Number(n[0].computedOffset),a=1;a<r;a++){var l=n[a].computedOffset;if(!y$(l)&&!y$(o)){for(var s=1;s<a-i;s++)n[i+s].computedOffset=o+(Number(l)-o)*s/(a-i);i=a,o=Number(l)}}}(),n}var gw="backwards|forwards|both|none".split("|"),gE="reverse|alternate|alternate-reverse".split("|"),gk=function(){function t(t,e,n){var r,i,o,a,l,s,u,c,f,p,h,d=this;this.composite="replace",this.iterationComposite="replace",this.target=t,this.timing=(i=!1,o=r=function(t){return"number"==typeof t&&(t=isNaN(t)?{duration:"auto"}:{duration:t}),t}(null!=(r=n)?r:{duration:"auto"}),a=i,l=new gx,a&&(l.fill="both",l.duration="auto"),"number"!=typeof o||isNaN(o)?void 0!==o&&Object.keys(o).forEach(function(t){if(void 0!==o[t]&&null!==o[t]&&"auto"!==o[t]){if(!(("number"==typeof l[t]||"duration"===t)&&("number"!=typeof o[t]||isNaN(o[t])))&&("fill"!==t||-1!==gw.indexOf(o[t]))&&("direction"!==t||-1!==gE.indexOf(o[t])))l[t]=o[t]}}):l.duration=o,l),this.timing.effect=this,this.timing.activeDuration=Math.abs(function(t){var e;return 0===t.duration||0===t.iterations?0:("auto"===t.duration?0:Number(t.duration))*(null!==(e=t.iterations)&&void 0!==e?e:1)}(s=this.timing)/(s.playbackRate||1)),this.timing.endTime=Math.max(0,this.timing.delay+this.timing.activeDuration+this.timing.endDelay),this.normalizedKeyframes=gO(e,this.timing),this.interpolations=(u=this.normalizedKeyframes,c=this.timing,f=this.target,h=function(t,e){var n=[];for(var r in t){for(var i=t[r],o=0;o<i.length-1;o++){var a=o,l=o+1,s=i[a].computedOffset,u=i[l].computedOffset,c=s,f=u;0===o&&(c=-1/0,0===u&&(l=a)),o===i.length-2&&(f=1/0,1===s&&(a=l)),n.push({applyFrom:c,applyTo:f,startOffset:i[a].computedOffset,endOffset:i[l].computedOffset,easingFunction:i[a].easingFunction,property:r,interpolation:function(t,e,n,r){var i=hS[t];if(i&&i.syntax&&i.int){var o=dX.styleValueRegistry.getPropertySyntax(i.syntax);if(o){var a=void 0,l=void 0;if(dX.enableCSSParsing){var s=dX.styleValueRegistry.parseProperty(t,e,r,!1),u=dX.styleValueRegistry.parseProperty(t,n,r,!1);a=dX.styleValueRegistry.computeProperty(t,s,r,!1),l=dX.styleValueRegistry.computeProperty(t,u,r,!1)}else{var c=o.parserWithCSSDisabled;a=c?c(e,r):e,l=c?c(n,r):n}var f=o.mixer(a,l,r);if(f){var p=gb.apply(void 0,ou([],ol(f),!1));return function(t){return 0===t?e:1===t?n:p(t)}}}}return gb(!1,!0,function(t){return t?n:e})}(r,i[a].value,i[l].value,e)})}}return n.sort(function(t,e){return t.startOffset-e.startOffset}),n}(p=function(t,e){for(var n={},r=0;r<t.length;r++)for(var i in t[r])if(gm(i)){var o={offset:t[r].offset,computedOffset:t[r].computedOffset,easing:t[r].easing,easingFunction:gv(t[r].easing)||e.easingFunction,value:t[r][i]};n[i]=n[i]||[],n[i].push(o)}return n}(u,c),f),function(t,e){if(null!==e)h.filter(function(t){return e>=t.applyFrom&&e<t.applyTo}).forEach(function(n){var r=e-n.startOffset,i=n.endOffset-n.startOffset,o=0===i?0:n.easingFunction(r/i);t.setAttribute(n.property,n.interpolation(o),!1,!1)});else for(var n in p)gm(n)&&t.setAttribute(n,null)});var y=dX.globalThis.Proxy;this.computedTiming=y?new y(this.timing,{get:function(t,e){if("duration"===e)return"auto"===t.duration?0:t.duration;if("fill"===e)return"auto"===t.fill?"none":t.fill;if("localTime"===e)return d.animation&&d.animation.currentTime||null;else if("currentIteration"===e)return d.animation&&"running"===d.animation.playState?t.currentIteration||0:null;else if("progress"===e)return d.animation&&"running"===d.animation.playState?t.progress||0:null;return t[e]},set:function(){return!0}}):this.timing}return t.prototype.applyInterpolations=function(){this.interpolations(this.target,Number(this.timeFraction))},t.prototype.update=function(t){return null!==t&&(this.timeFraction=function(t,e,n){var r,i,o,a,l,s,u,c,f,p,h,d,y,g,v,m,b=function(t,e,n){if(null===e)return 0;var r=n.endTime;return e<Math.min(n.delay,r)?1:e>=Math.min(n.delay+t+n.endDelay,r)?2:3}(t,e,n),x=function(t,e,n,r,i){switch(r){case 1:if("backwards"===e||"both"===e)return 0;return null;case 3:return n-i;case 2:if("forwards"===e||"both"===e)return t;return null;case 0:return null}}(t,n.fill,e,b,n.delay);if(null===x)return null;var O="auto"===n.duration?0:n.duration;var w=(r=O,i=b,o=n.iterations,a=x,l=n.iterationStart,0===r?1!==i&&(l+=o):l+=a/r,l);var E=(s=w,u=n.iterationStart,c=b,f=n.iterations,p=x,h=O,0==(d=s===1/0?u%1:s%1)&&2===c&&0!==f&&(0!==p||0===h)&&(d=1),d);var k=(y=b,g=n.iterations,v=E,m=w,2===y&&g===1/0?1/0:1===v?Math.floor(m)-1:Math.floor(m)),M=function(t,e,n){var r=t;if("normal"!==t&&"reverse"!==t){var i=e;"alternate-reverse"===t&&(i+=1),r="normal",i!==1/0&&i%2!=0&&(r="reverse")}return"normal"===r?n:1-n}(n.direction,k,E);return n.currentIteration=k,n.progress=M,n.easingFunction(M)}(this.timing.activeDuration,t,this.timing),null!==this.timeFraction)},t.prototype.getKeyframes=function(){return this.normalizedKeyframes},t.prototype.setKeyframes=function(t){this.normalizedKeyframes=gO(t)},t.prototype.getComputedTiming=function(){return this.computedTiming},t.prototype.getTiming=function(){return this.timing},t.prototype.updateTiming=function(t){var e=this;Object.keys(t||{}).forEach(function(n){e.timing[n]=t[n]})},t}();function gM(t,e){return Number(t.id)-Number(e.id)}var gS=function(){function t(t){var e=this;this.document=t,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(t){e.currentTime=t,e.discardAnimations(),0===e.animations.length?e.timelineTicking=!1:e.requestAnimationFrame(e.webAnimationsNextTick)},this.processRafCallbacks=function(t){var n=e.rafCallbacks;e.rafCallbacks=[],t<Number(e.currentTime)&&(t=Number(e.currentTime)),e.animations.sort(gM),e.animations=e.tick(t,!0,e.animations)[0],n.forEach(function(e){e[1](t)}),e.applyPendingEffects()}}return t.prototype.getAnimations=function(){return this.discardAnimations(),this.animations.slice()},t.prototype.isTicking=function(){return this.inTick},t.prototype.play=function(t,e,n){var r=new yH(new gk(t,e,n),this);return this.animations.push(r),this.restartWebAnimationsNextTick(),r.updatePromises(),r.play(),r.updatePromises(),r},t.prototype.applyDirtiedAnimation=function(t){var e=this;if(!this.inTick){t.markTarget();var n=t.targetAnimations();n.sort(gM),this.tick(Number(this.currentTime),!1,n.slice())[1].forEach(function(t){var n=e.animations.indexOf(t);-1!==n&&e.animations.splice(n,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(t){null==t||t.applyInterpolations()}),this.pendingEffects=[]},t.prototype.updateAnimationsPromises=function(){this.animationsWithPromises=this.animationsWithPromises.filter(function(t){return t.updatePromises()})},t.prototype.discardAnimations=function(){this.updateAnimationsPromises(),this.animations=this.animations.filter(function(t){return"finished"!==t.playState&&"idle"!==t.playState})},t.prototype.restartWebAnimationsNextTick=function(){!this.timelineTicking&&(this.timelineTicking=!0,this.requestAnimationFrame(this.webAnimationsNextTick))},t.prototype.rAF=function(t){var e=this.rafId++;return 0===this.rafCallbacks.length&&(this.frameId=this.document.defaultView.requestAnimationFrame(this.processRafCallbacks)),this.rafCallbacks.push([e,t]),e},t.prototype.requestAnimationFrame=function(t){var e=this;return this.rAF(function(n){e.updateAnimationsPromises(),t(n),e.updateAnimationsPromises()})},t.prototype.tick=function(t,e,n){var r,i,o=this;this.inTick=!0,this.hasRestartedThisFrame=!1,this.currentTime=t,this.ticking=!1;var a=[],l=[],s=[],u=[];return n.forEach(function(n){n.tick(t,e),n._inEffect?(l.push(n.effect),n.markTarget()):(a.push(n.effect),n.unmarkTarget()),n._needsTick&&(o.ticking=!0);var r=n._inEffect||n._needsTick;n._inTimeline=r,r?s.push(n):u.push(n)}),(r=this.pendingEffects).push.apply(r,ou([],ol(a),!1)),(i=this.pendingEffects).push.apply(i,ou([],ol(l),!1)),this.ticking&&this.requestAnimationFrame(function(){}),this.inTick=!1,[s,u]},t}();function g_(t){return new gP([t],null,t,t.ownerDocument)}dX.EasingFunction=gv,dX.AnimationTimeline=gS;class gP{constructor(t=null,e=null,n=null,r=null,i=[null,null,null,null,null],o=[],a=[]){this._elements=Array.from(t),this._data=e,this._parent=n,this._document=r,this._enter=i[0],this._update=i[1],this._exit=i[2],this._merge=i[3],this._split=i[4],this._transitions=o,this._facetElements=a}selectAll(t){return new gP("string"==typeof t?this._parent.querySelectorAll(t):t,null,this._elements[0],this._document)}selectFacetAll(t){let e="string"==typeof t?this._parent.querySelectorAll(t):t;return new gP(this._elements,null,this._parent,this._document,void 0,void 0,e)}select(t){let e="string"==typeof t?this._parent.querySelectorAll(t)[0]||null:t;return new gP([e],null,e,this._document)}append(t){let e="function"==typeof t?t:()=>this.createElement(t),n=[];if(null!==this._data){for(let t=0;t<this._data.length;t++){let r=this._data[t],[i,o]=Array.isArray(r)?r:[r,null],a=e(i,t);a.__data__=i,null!==o&&(a.__fromElements__=o),this._parent.appendChild(a),n.push(a)}return new gP(n,null,this._parent,this._document)}for(let t=0;t<this._elements.length;t++){let r=this._elements[t],i=e(r.__data__,t);r.appendChild(i),n.push(i)}return new gP(n,null,n[0],this._document)}maybeAppend(t,e,n){let r=this._elements[0],i=r.getElementById(t);if(i)return new gP([i],null,this._parent,this._document);let o="string"==typeof e?this.createElement(e):e();return o.id=t,n&&(o.className=n),r.appendChild(o),new gP([o],null,this._parent,this._document)}data(t,e=t=>t,n=()=>null){let r=[],i=[],o=new Set(this._elements),a=[],l=new Set,s=new Map(this._elements.map((t,n)=>[e(t.__data__,n),t])),u=new Map(this._facetElements.map((t,n)=>[e(t.__data__,n),t])),c=iu(this._elements,t=>n(t.__data__));for(let f=0;f<t.length;f++){let p=t[f],h=e(p,f),d=n(p,f);if(s.has(h)){let t=s.get(h);t.__data__=p,t.__facet__=!1,i.push(t),o.delete(t),s.delete(h)}else if(u.has(h)){let t=u.get(h);t.__data__=p,t.__facet__=!0,i.push(t),u.delete(h)}else if(c.has(h)){let t=c.get(h);for(let e of(a.push([p,t]),t))o.delete(e);c.delete(h)}else if(s.has(d)){let t=s.get(d);t.__toData__?t.__toData__.push(p):t.__toData__=[p],l.add(t),o.delete(t)}else r.push(p)}let f=[new gP([],r,this._parent,this._document),new gP(i,null,this._parent,this._document),new gP(o,null,this._parent,this._document),new gP([],a,this._parent,this._document),new gP(l,null,this._parent,this._document)];return new gP(this._elements,null,this._parent,this._document,f)}merge(t){let e=[...this._elements,...t._elements],n=[...this._transitions,...t._transitions];return new gP(e,null,this._parent,this._document,void 0,n)}createElement(t){if(this._document)return this._document.createElement(t,{});let e=gP.registry[t];return e?new e:nl(`Unknown node type: ${t}`)}join(t=t=>t,e=t=>t,n=t=>t.remove(),r=t=>t,i=t=>t.remove()){let o=t(this._enter),a=e(this._update),l=n(this._exit),s=r(this._merge),u=i(this._split);return a.merge(o).merge(l).merge(s).merge(u)}remove(){for(let t=0;t<this._elements.length;t++){let e=this._transitions[t];e?Promise.all((Array.isArray(e)?e:[e]).map(t=>t.finished)).then(()=>{this._elements[t].remove()}):this._elements[t].remove()}return new gP([],null,this._parent,this._document,void 0,this._transitions)}each(t){for(let e=0;e<this._elements.length;e++){let n=this._elements[e];t(n.__data__,e,n)}return this}attr(t,e){let n="function"!=typeof e?()=>e:e;return this.each(function(r,i,o){void 0!==e&&(o[t]=n(r,i,o))})}style(t,e){let n="function"!=typeof e?()=>e:e;return this.each(function(r,i,o){void 0!==e&&(o.style[t]=n(r,i,o))})}transition(t){let e="function"!=typeof t?()=>t:t,{_transitions:n}=this;return this.each(function(t,r,i){n[r]=e(t,r,i)})}on(t,e){return this.each(function(n,r,i){i.addEventListener(t,e)}),this}call(t,...e){return t(this,...e),this}node(){return this._elements[0]}nodes(){return this._elements}transitions(){return this._transitions}parent(){return this._parent}}function gj([t,e],[n,r]){return[t-n,e-r]}function gA([t,e],[n,r]){return[t+n,e+r]}function gT([t,e],[n,r]){return Math.sqrt(Math.pow(t-n,2)+Math.pow(e-r,2))}function gC([t,e]){return Math.atan2(e,t)}function gN([t,e]){return gC([t,e])+Math.PI/2}function gL(t,e){let n=gC(t),r=gC(e);return n<r?r-n:2*Math.PI-(n-r)}function gI(t){let e=1/0,n=-1/0,r=1/0,i=-1/0;for(let[o,a]of t)e=Math.min(o,e),n=Math.max(o,n),r=Math.min(a,r),i=Math.max(a,i);let o=n-e,a=i-r;return[e,r,o,a]}function gR([t,e],[n,r]){return[(t+n)/2,(e+r)/2]}function gD(t,e,n){return Math.max(e,Math.min(t,n))}function gF(t,e=10){return"number"!=typeof t?t:1e-15>Math.abs(t)?t:parseFloat(t.toFixed(e))}gP.registry={g:yo,rect:yp,circle:yn,path:yu,text:yh,ellipse:yi,image:yl,line:ys,polygon:yc,polyline:yf,html:ya};var gz=function(t){return e6(t,"Number")};function gB(t,e){let n,r;if(void 0===e)for(let e of t)null!=e&&(void 0===n?e>=e&&(n=r=e):(n>e&&(n=e),r<e&&(r=e)));else{let i=-1;for(let o of t)null!=(o=e(o,++i,t))&&(void 0===n?o>=o&&(n=r=o):(n>o&&(n=o),r<o&&(r=o)))}return[n,r]}function gW(t,e){return Object.entries(t).reduce((n,[r,i])=>(n[r]=e(i,r,t),n),{})}function g$(t){return t.map((t,e)=>e)}function gG(t){return t[t.length-1]}function gV(t,e){let n=[[],[]];return t.forEach(t=>{n[e(t)?0:1].push(t)}),n}function gH(t,e){for(let[n,r]of Object.entries(e))t.style(n,r)}function gU(t,e,n,r,i){let o=gC(gj(r,e))+Math.PI,a=gC(gj(r,n))+Math.PI;return t.arc(r[0],r[1],i,o,a,a-o<0),t}function gq(t,e,n,r="y",i="between",o=!1){let a="y"===r||!0===r?n:e,l=((t,e)=>{if("y"===t||!0===t)return e?180:90;return e?90:0})(r,o),s=g$(a),[u,c]=gB(s,t=>a[t]),f=new oI({domain:[u,c],range:[0,100]}),p=t=>gz(a[t])&&!Number.isNaN(a[t])?f.map(a[t]):0,h={between:e=>`${t[e]} ${p(e)}%`,start:e=>0===e?`${t[e]} ${p(e)}%`:`${t[e-1]} ${p(e)}%, ${t[e]} ${p(e)}%`,end:e=>e===t.length-1?`${t[e]} ${p(e)}%`:`${t[e]} ${p(e)}%, ${t[e+1]} ${p(e)}%`},d=s.sort((t,e)=>p(t)-p(e)).map(h[i]||h.between).join(",");return`linear-gradient(${l}deg, ${d})`}function gY(t){let[e,n,r,i]=t;return[i,e,n,r]}function gX(t,e,n){let[r,i,,o]=s1(t)?gY(e):e,[a,l]=n,s=t.getCenter(),u=gN(gj(r,s)),c=gN(gj(i,s)),f=c===u&&a!==l?c+2*Math.PI:c;return{startAngle:u,endAngle:f-u>=0?f:2*Math.PI+f,innerRadius:gT(o,s),outerRadius:gT(r,s)}}function gK(t){let{colorAttribute:e,opacityAttribute:n=e}=t;return`${n}Opacity`}function gZ(t,e){if(!s2(t))return"";let n=t.getCenter(),{transform:r}=e;return`translate(${n[0]}, ${n[1]}) ${r||""}`}function gQ(t){if(1===t.length)return t[0];let[[e,n,r=0],[i,o,a=0]]=t;return[(e+i)/2,(n+o)/2,(r+a)/2]}var gJ=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function g0(t,e,n,r,i={}){let{inset:o=0,radius:a=0,insetLeft:l=o,insetTop:s=o,insetRight:u=o,insetBottom:c=o,radiusBottomLeft:f=a,radiusBottomRight:p=a,radiusTopLeft:h=a,radiusTopRight:d=a,minWidth:y=-1/0,maxWidth:g=1/0,minHeight:v=-1/0}=i,m=gJ(i,["inset","radius","insetLeft","insetTop","insetRight","insetBottom","radiusBottomLeft","radiusBottomRight","radiusTopLeft","radiusTopRight","minWidth","maxWidth","minHeight"]);if(!s2(r)&&!s3(r)){let n=!!s1(r),[i,,o]=n?gY(e):e,[a,b]=i,[x,O]=gj(o,i),w=Math.abs(x),E=Math.abs(O),k=(x>0?a:a+x)+l,M=(O>0?b:b+O)+s,S=w-(l+u),_=E-(s+c),P=n?gD(S,v,1/0):gD(S,y,g),j=n?gD(_,y,g):gD(_,v,1/0),A=n?k:k-(P-S)/2,T=n?M-(j-_)/2:M-(j-_);return g_(t.createElement("rect",{})).style("x",A).style("y",T).style("width",P).style("height",j).style("radius",[h,d,p,f]).call(gH,m).node()}let{y:b,y1:x}=n,O=r.getCenter(),w=gX(r,e,[b,x]),E=s0().cornerRadius(a).padAngle(o*Math.PI/180);return g_(t.createElement("path",{})).style("path",E(w)).style("transform",`translate(${O[0]}, ${O[1]})`).style("radius",a).style("inset",o).call(gH,m).node()}let g1=(t,e)=>{let{colorAttribute:n,opacityAttribute:r="fill",first:i=!0,last:o=!0}=t,a=gJ(t,["colorAttribute","opacityAttribute","first","last"]),{coordinate:l,document:s}=e;return(e,r,u)=>{let{color:c,radius:f=0}=u,p=gJ(u,["color","radius"]),h=p.lineWidth||1,{stroke:d,radius:y=f,radiusTopLeft:g=y,radiusTopRight:v=y,radiusBottomRight:m=y,radiusBottomLeft:b=y,innerRadius:x=0,innerRadiusTopLeft:O=x,innerRadiusTopRight:w=x,innerRadiusBottomRight:E=x,innerRadiusBottomLeft:k=x,lineWidth:M="stroke"===n||d?h:0,inset:S=0,insetLeft:_=S,insetRight:P=S,insetBottom:j=S,insetTop:A=S,minWidth:T,maxWidth:C,minHeight:N}=a,L=gJ(a,["stroke","radius","radiusTopLeft","radiusTopRight","radiusBottomRight","radiusBottomLeft","innerRadius","innerRadiusTopLeft","innerRadiusTopRight","innerRadiusBottomRight","innerRadiusBottomLeft","lineWidth","inset","insetLeft","insetRight","insetBottom","insetTop","minWidth","maxWidth","minHeight"]),{color:I=c,opacity:R}=r,D=[i?g:O,i?v:w,o?m:E,o?b:k],F=["radiusTopLeft","radiusTopRight","radiusBottomRight","radiusBottomLeft"];return s1(l)&&F.push(F.shift()),g_(g0(s,e,r,l,Object.assign(Object.assign({radius:y},Object.fromEntries(F.map((t,e)=>[t,D[e]]))),{inset:S,insetLeft:_,insetRight:P,insetBottom:j,insetTop:A,minWidth:T,maxWidth:C,minHeight:N}))).call(gH,p).style("fill","transparent").style(n,I).style(gK(t),R).style("lineWidth",M).style("stroke",void 0===d?I:d).call(gH,L).node()}};g1.props={defaultEnterAnimation:"scaleInY",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let g2=(t,e)=>g1(Object.assign({colorAttribute:"fill"},t),e);g2.props=Object.assign(Object.assign({},g1.props),{defaultMarker:"square"});let g5=(t,e)=>g1(Object.assign({colorAttribute:"stroke"},t),e);function g3(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function g4(t){this._context=t}function g6(t){return new g4(t)}function g8(t){return t[0]}function g9(t){return t[1]}function g7(t,e){var n=sj(!0),r=null,i=g6,o=null,a=sq(l);function l(l){var s,u,c,f=(l=g3(l)).length,p=!1;for(null==r&&(o=i(c=a())),s=0;s<=f;++s)!(s<f&&n(u=l[s],s,l))===p&&((p=!p)?o.lineStart():o.lineEnd()),p&&o.point(+t(u,s,l),+e(u,s,l));if(c)return o=null,c+""||null}return t="function"==typeof t?t:void 0===t?g8:sj(t),e="function"==typeof e?e:void 0===e?g9:sj(e),l.x=function(e){return arguments.length?(t="function"==typeof e?e:sj(+e),l):t},l.y=function(t){return arguments.length?(e="function"==typeof t?t:sj(+t),l):e},l.defined=function(t){return arguments.length?(n="function"==typeof t?t:sj(!!t),l):n},l.curve=function(t){return arguments.length?(i=t,null!=r&&(o=i(r)),l):i},l.context=function(t){return arguments.length?(null==t?r=o=null:o=i(r=t),l):r},l}function vt(){}function ve(t){this._context=t}function vn(t){return new ve(t)}g5.props=Object.assign(Object.assign({},g1.props),{defaultMarker:"hollowSquare"}),Array.prototype.slice,g4.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&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)}}},ve.prototype={areaStart:vt,areaEnd:vt,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))}};var vr=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function vi(t,e,n){let[r,i,o,a]=t;if(s1(n)){let t=[e?e[0][0]:i[0],i[1]];return[r,t,[e?e[3][0]:o[0],o[1]],a]}let l=[i[0],e?e[0][1]:i[1]];return[r,l,[o[0],e?e[3][1]:o[1]],a]}let vo=(t,e)=>{let{adjustPoints:n=vi}=t,r=vr(t,["adjustPoints"]),{coordinate:i,document:o}=e;return(t,e,a,l)=>{let{index:s}=e,{color:u}=a,c=vr(a,["color"]),f=n(t,l[s+1],i),[p,h,d,y]=s1(i)?gY(f):f,{color:g=u,opacity:v}=e,m=g7().curve(vn)([p,h,d,y]);return g_(o.createElement("path",{})).call(gH,c).style("path",m).style("fill",g).style("fillOpacity",v).call(gH,r).node()}};function va(t,e,n){let[r,i,o,a]=t;if(s1(n)){let t=[e?e[0][0]:(i[0]+o[0])/2,i[1]];return[r,t,[e?e[3][0]:(i[0]+o[0])/2,o[1]],a]}let l=[i[0],e?e[0][1]:(i[1]+o[1])/2];return[r,l,[o[0],e?e[3][1]:(i[1]+o[1])/2],a]}vo.props={defaultMarker:"square"};let vl=(t,e)=>vo(Object.assign({adjustPoints:va},t),e);function vs(t,e){return t.getBandWidth(t.invert(e))}vl.props={defaultMarker:"square"};let vu={rect:g2,hollow:g5,funnel:vo,pyramid:vl},vc=()=>(t,e,n,r)=>{let{x:i,y:o,y1:a,series:l,size:s}=n,u=e.x,c=e.series,[f]=r.getSize(),p=s?s.map(t=>+t/f):null,h=s?(t,e,n)=>{let r=t+e/2,i=p[n];return[r-i/2,r+i/2]}:(t,e,n)=>[t,t+e],d=Array.from(t,t=>{let e=vs(u,i[t]),n=c?vs(c,null==l?void 0:l[t]):1,s=(+(null==l?void 0:l[t])||0)*e,[f,p]=h(+i[t]+s,e*n,t),d=+o[t],y=+a[t];return[[f,d],[p,d],[p,y],[f,y]].map(t=>r.map(t))});return[t,d]};vc.props={defaultShape:"rect",defaultLabelShape:"label",composite:!1,shape:vu,channels:[...nN({shapes:Object.keys(vu)}),{name:"x",scale:"band",required:!0},{name:"y",required:!0},{name:"series",scale:"band"},{name:"size"}],preInference:[...nD(),{type:s_},{type:sP}],postInference:[...nI()],interaction:{shareTooltip:!0}};let vf={rect:g2,hollow:g5},vp=()=>(t,e,n,r)=>{let{x:i,x1:o,y:a,y1:l}=n,s=Array.from(t,t=>{let e=[+i[t],+a[t]],n=[+o[t],+a[t]],s=[+o[t],+l[t]];return[e,n,s,[+i[t],+l[t]]].map(t=>r.map(t))});return[t,s]};vp.props={defaultShape:"rect",defaultLabelShape:"label",composite:!1,shape:vf,channels:[...nN({shapes:Object.keys(vf)}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...nD(),{type:s_}],postInference:[...nI()],interaction:{shareTooltip:!0}};var vh=vy(g6);function vd(t){this._curve=t}function vy(t){function e(e){return new vd(t(e))}return e._curve=t,e}function vg(t){var e=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?e(vy(t)):e()._curve},t}vd.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 vv(t){let e="function"==typeof t?t:t.render;return class extends yr{connectedCallback(){this.draw()}attributeChangedCallback(){this.draw()}draw(){e(this)}}}var vm=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let vb=vv(t=>{let{d1:e,d2:n,style1:r,style2:i}=t.attributes,o=t.ownerDocument;g_(t).maybeAppend("line",()=>o.createElement("path",{})).style("d",e).call(gH,r),g_(t).maybeAppend("line1",()=>o.createElement("path",{})).style("d",n).call(gH,i)}),vx=(t,e)=>{let{curve:n,gradient:r=!1,gradientColor:i="between",defined:o=t=>!Number.isNaN(t)&&null!=t,connect:a=!1}=t,l=vm(t,["curve","gradient","gradientColor","defined","connect"]),{coordinate:s,document:u}=e;return(t,e,c)=>{let f;let{color:p,lineWidth:h}=c,d=vm(c,["color","lineWidth"]),{color:y=p,size:g=h,seriesColor:v,seriesX:m,seriesY:b}=e,x=gZ(s,e),O=s1(s),w=r&&v?gq(v,m,b,r,i,O):y,E=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},d),w&&{stroke:w}),g&&{lineWidth:g}),x&&{transform:x}),l);if(s2(s)){let t=s.getCenter();f=e=>vg(g7().curve(vh)).angle((n,r)=>gN(gj(e[r],t))).radius((n,r)=>gT(e[r],t)).defined(([t,e])=>o(t)&&o(e)).curve(n)(e)}else f=g7().x(t=>t[0]).y(t=>t[1]).defined(([t,e])=>o(t)&&o(e)).curve(n);let[k,M]=function(t,e){let n=[],r=[],i=!1,o=null;for(let a of t)e(a[0])&&e(a[1])?(n.push(a),i&&(i=!1,r.push([o,a])),o=a):i=!0;return[n,r]}(t,o),S=nc(E,"connect"),_=!!M.length;if(!_||a&&!Object.keys(S).length)return g_(u.createElement("path",{})).style("d",f(k)||[]).call(gH,E).node();if(_&&!a)return g_(u.createElement("path",{})).style("d",f(t)).call(gH,E).node();return g_(new vb).style("style1",Object.assign(Object.assign({},E),S)).style("style2",E).style("d1",M.map(f).join(",")).style("d2",f(t)).node()}};vx.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let vO=(t,e)=>{let{coordinate:n}=e;return(...r)=>vx(Object.assign({curve:s2(n)?vn:g6},t),e)(...r)};function vw(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 vE(t,e){this._context=t,this._k=(1-e)/6}function vk(t,e){this._context=t,this._k=(1-e)/6}function vM(t,e,n){var r=t._x1,i=t._y1,o=t._x2,a=t._y2;if(t._l01_a>1e-12){var l=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,s=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*l-t._x0*t._l12_2a+t._x2*t._l01_2a)/s,i=(i*l-t._y0*t._l12_2a+t._y2*t._l01_2a)/s}if(t._l23_a>1e-12){var u=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,c=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*u+t._x1*t._l23_2a-e*t._l12_2a)/c,a=(a*u+t._y1*t._l23_2a-n*t._l12_2a)/c}t._context.bezierCurveTo(r,i,o,a,t._x2,t._y2)}function vS(t,e){this._context=t,this._alpha=e}function v_(t,e){this._context=t,this._alpha=e}vO.props=Object.assign(Object.assign({},vx.props),{defaultMarker:"line"}),vE.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:vw(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&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:vw(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}},!function t(e){function n(t){return new vE(t,e)}return n.tension=function(e){return t(+e)},n}(0),vk.prototype={areaStart:vt,areaEnd:vt,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)}},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:vw(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}},!function t(e){function n(t){return new vk(t,e)}return n.tension=function(e){return t(+e)},n}(0),vS.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)}(this._line||0!==this._line&&1===this._point)&&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:vM(this,t,e)}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}},!function t(e){function n(t){return e?new vS(t,e):new vE(t,0)}return n.alpha=function(e){return t(+e)},n}(.5),v_.prototype={areaStart:vt,areaEnd:vt,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)}},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:vM(this,t,e)}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 vP=function t(e){function n(t){return e?new v_(t,e):new vk(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function vj(t){return t<0?-1:1}function vA(t,e,n){var r=t._x1-t._x0,i=e-t._x1,o=(t._y1-t._y0)/(r||i<0&&-0),a=(n-t._y1)/(i||r<0&&-0),l=(o*i+a*r)/(r+i);return((o<0?-1:1)+(a<0?-1:1))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(l))||0}function vT(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function vC(t,e,n){var r=t._x0,i=t._y0,o=t._x1,a=t._y1,l=(o-r)/3;t._context.bezierCurveTo(r+l,i+l*e,o-l,a-l*n,o,a)}function vN(t){this._context=t}function vL(t){this._context=new vI(t)}function vI(t){this._context=t}function vR(t){return new vN(t)}function vD(t){return new vL(t)}vN.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:vC(this,this._t0,vT(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&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,vC(this,vT(this,n=vA(this,t,e)),n);break;default:vC(this,this._t0,n=vA(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}},(vL.prototype=Object.create(vN.prototype)).point=function(t,e){vN.prototype.point.call(this,e,t)},vI.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,o){this._context.bezierCurveTo(e,t,r,n,o,i)}};var vF=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let vz=(t,e)=>{let n=vF(t,[]),{coordinate:r}=e;return(...t)=>vx(Object.assign({curve:s2(r)?vP:s1(r)?vD:vR},n),e)(...t)};function vB(t,e){this._context=t,this._t=e}function vW(t){return new vB(t,.5)}function v$(t){return new vB(t,0)}function vG(t){return new vB(t,1)}vz.props=Object.assign(Object.assign({},vx.props),{defaultMarker:"smooth"}),vB.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&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&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)}}this._x=t,this._y=e}};let vV=(t,e)=>vx(Object.assign({curve:vG},t),e);vV.props=Object.assign(Object.assign({},vx.props),{defaultMarker:"hv"});let vH=(t,e)=>vx(Object.assign({curve:v$},t),e);vH.props=Object.assign(Object.assign({},vx.props),{defaultMarker:"vh"});let vU=(t,e)=>vx(Object.assign({curve:vW},t),e);vU.props=Object.assign(Object.assign({},vx.props),{defaultMarker:"hvh"});var vq=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let vY=(t,e)=>{let{document:n}=e;return(e,r,i)=>{let{seriesSize:o,color:a}=r,{color:l}=i,s=vq(i,["color"]),u=sU();for(let t=0;t<e.length-1;t++){let n=e[t],r=e[t+1],i=o[t],a=o[t+1];[...n,...r].every(nu)&&!function(t,e,n,r,i){let o=gC(gj(n,e)),a=o+Math.PI/2,l=[r/2*Math.cos(a),r/2*Math.sin(a)],s=[i/2*Math.cos(a),i/2*Math.sin(a)],u=[i/2*Math.cos(o),i/2*Math.sin(o)],c=[r/2*Math.cos(o),r/2*Math.sin(o)],f=function([t,e],[n,r]){return[t+n,e+r]}(e,l),p=function([t,e],[n,r]){return[t+n,e+r]}(n,s),h=function([t,e],[n,r]){return[t+n,e+r]}(p,u),d=function([t,e],[n,r]){return[t+n,e+r]}(n,u),y=gj(d,s),g=gj(n,s),v=gj(e,l),m=gj(v,c),b=gj(e,c),x=gj(f,c);t.moveTo(...f),t.lineTo(...p),t.arcTo(...h,...d,i/2),t.arcTo(...y,...g,i/2),t.lineTo(...v),t.arcTo(...m,...b,r/2),t.arcTo(...x,...f,r/2),t.closePath()}(u,n,r,i,a)}return g_(n.createElement("path",{})).call(gH,s).style("fill",a||l).style("d",u.toString()).call(gH,t).node()}};vY.props=Object.assign(Object.assign({},vx.props),{defaultMarker:"line"});let vX=()=>(t,e)=>{let{style:n={},encode:r}=e,{series:i}=r,{gradient:o}=n;return!o||i?[t,e]:[t,nt({},e,{encode:{series:nE(nk(t,void 0))}})]};vX.props={};let vK=()=>(t,e)=>{let{encode:n}=e,{series:r,color:i}=n;if(void 0!==r||void 0===i)return[t,e];let[o,a]=nM(n,"color");return[t,nt({},e,{encode:{series:nO(o,a)}})]};vK.props={};let vZ={line:vO,smooth:vz,hv:vV,vh:vH,hvh:vU,trail:vY},vQ=(t,e,n,r)=>{var i,o;let{series:a,x:l,y:s}=n,{x:u,y:c}=e;if(void 0===l||void 0===s)throw Error("Missing encode for x or y channel.");let f=a?Array.from(iu(t,t=>a[t]).values()):[t],p=f.map(t=>t[0]).filter(t=>void 0!==t),h=((null===(i=null==u?void 0:u.getBandWidth)||void 0===i?void 0:i.call(u))||0)/2,d=((null===(o=null==c?void 0:c.getBandWidth)||void 0===o?void 0:o.call(c))||0)/2;return[p,Array.from(f,t=>t.map(t=>r.map([+l[t]+h,+s[t]+d]))),f]},vJ=(t,e,n,r)=>{let i=Object.entries(n).filter(([t])=>t.startsWith("position")).map(([,t])=>t);if(0===i.length)throw Error("Missing encode for position channel.");let o=Array.from(t,t=>{let e=i.map(e=>+e[t]),n=r.map(e),o=[];for(let t=0;t<n.length;t+=2)o.push([n[t],n[t+1]]);return o});return[t,o]},v0=()=>(t,e,n,r)=>(s4(r)?vJ:vQ)(t,e,n,r);v0.props={defaultShape:"line",defaultLabelShape:"label",composite:!1,shape:vZ,channels:[...nN({shapes:Object.keys(vZ)}),{name:"x"},{name:"y"},{name:"position",independent:!0},{name:"size"},{name:"series",scale:"band"}],preInference:[...nD(),{type:vX},{type:vK}],postInference:[...nI(),{type:nP,channel:"color"},{type:nj,channel:["position"]}],interaction:{shareTooltip:!0,seriesTooltip:!0,crosshairs:!0}};var v1=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let v2=(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"]];v2.style=["fill"];let v5=v2.bind(void 0);v5.style=["stroke","lineWidth"];let v3=(t,e,n)=>[["M",t-n,e-n],["L",t+n,e-n],["L",t+n,e+n],["L",t-n,e+n],["Z"]];v3.style=["fill"];let v4=v3.bind(void 0);v4.style=["fill"];let v6=v3.bind(void 0);v6.style=["stroke","lineWidth"];let v8=(t,e,n)=>{let r=.618*n;return[["M",t-r,e],["L",t,e-n],["L",t+r,e],["L",t,e+n],["Z"]]};v8.style=["fill"];let v9=v8.bind(void 0);v9.style=["stroke","lineWidth"];let v7=(t,e,n)=>{let r=n*Math.sin(1/3*Math.PI);return[["M",t-n,e+r],["L",t,e-r],["L",t+n,e+r],["Z"]]};v7.style=["fill"];let mt=v7.bind(void 0);mt.style=["stroke","lineWidth"];let me=(t,e,n)=>{let r=n*Math.sin(1/3*Math.PI);return[["M",t-n,e-r],["L",t+n,e-r],["L",t,e+r],["Z"]]};me.style=["fill"];let mn=me.bind(void 0);mn.style=["stroke","lineWidth"];let mr=(t,e,n)=>{let 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"]]};mr.style=["fill"];let mi=mr.bind(void 0);mi.style=["stroke","lineWidth"];let mo=(t,e,n)=>{let 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"]]};mo.style=["fill"];let ma=mo.bind(void 0);ma.style=["stroke","lineWidth"];let ml=(t,e,n)=>[["M",t,e+n],["L",t,e-n]];ml.style=["stroke","lineWidth"];let ms=(t,e,n)=>[["M",t-n,e-n],["L",t+n,e+n],["M",t+n,e-n],["L",t-n,e+n]];ms.style=["stroke","lineWidth"];let mu=(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]];mu.style=["stroke","lineWidth"];let mc=(t,e,n)=>[["M",t-n,e],["L",t+n,e],["M",t,e-n],["L",t,e+n]];mc.style=["stroke","lineWidth"];let mf=(t,e,n)=>[["M",t-n,e],["L",t+n,e]];mf.style=["stroke","lineWidth"];let mp=(t,e,n)=>[["M",t-n,e],["L",t+n,e]];mp.style=["stroke","lineWidth"];let mh=mp.bind(void 0);mh.style=["stroke","lineWidth"];let md=(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]];md.style=["stroke","lineWidth"];let my=(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]];my.style=["stroke","lineWidth"];let mg=(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]];mg.style=["stroke","lineWidth"];let mv=(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]];mv.style=["stroke","lineWidth"];let mm=(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]];mm.style=["stroke","lineWidth"];let mb=new Map([["bowtie",mo],["cross",ms],["dash",mh],["diamond",v8],["dot",mp],["hexagon",mr],["hollowBowtie",ma],["hollowDiamond",v9],["hollowHexagon",mi],["hollowPoint",v5],["hollowSquare",v6],["hollowTriangle",mt],["hollowTriangleDown",mn],["hv",my],["hvh",mv],["hyphen",mf],["line",ml],["plus",mc],["point",v2],["rect",v4],["smooth",md],["square",v3],["tick",mu],["triangleDown",me],["triangle",v7],["vh",mg],["vhv",mm]]);var mx=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let mO=(t,e)=>{let{colorAttribute:n,symbol:r,mode:i="auto"}=t,o=mx(t,["colorAttribute","symbol","mode"]),a=mb.get(r)||mb.get("point"),{coordinate:l,document:s}=e;return(e,r,u)=>{let{lineWidth:c,color:f}=u,p=o.stroke?c||1:c,{color:h=f,transform:d,opacity:y}=r,[g,v]=gQ(e),m=function(t,e,n,r){if(1===e.length)return;let{size:i}=n;if("fixed"===t)return i;if("normal"===t||s6(r)){let[[t,n],[r,i]]=e;return Math.max(0,(Math.abs((r-t)/2)+Math.abs((i-n)/2))/2)}return i}(i,e,r,l)||o.r||u.r;return g_(s.createElement("path",{})).call(gH,u).style("fill","transparent").style("d",a(g,v,m)).style("lineWidth",p).style("transform",d).style("stroke",h).style(gK(t),y).style(n,h).call(gH,o).node()}};mO.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let mw=(t,e)=>mO(Object.assign({colorAttribute:"stroke",symbol:"point"},t),e);mw.props=Object.assign({defaultMarker:"hollowPoint"},mO.props);let mE=(t,e)=>mO(Object.assign({colorAttribute:"stroke",symbol:"diamond"},t),e);mE.props=Object.assign({defaultMarker:"hollowDiamond"},mO.props);let mk=(t,e)=>mO(Object.assign({colorAttribute:"stroke",symbol:"hexagon"},t),e);mk.props=Object.assign({defaultMarker:"hollowHexagon"},mO.props);let mM=(t,e)=>mO(Object.assign({colorAttribute:"stroke",symbol:"square"},t),e);mM.props=Object.assign({defaultMarker:"hollowSquare"},mO.props);let mS=(t,e)=>mO(Object.assign({colorAttribute:"stroke",symbol:"triangle-down"},t),e);mS.props=Object.assign({defaultMarker:"hollowTriangleDown"},mO.props);let m_=(t,e)=>mO(Object.assign({colorAttribute:"stroke",symbol:"triangle"},t),e);m_.props=Object.assign({defaultMarker:"hollowTriangle"},mO.props);let mP=(t,e)=>mO(Object.assign({colorAttribute:"stroke",symbol:"bowtie"},t),e);mP.props=Object.assign({defaultMarker:"hollowBowtie"},mO.props);let mj=(t,e)=>mO(Object.assign({colorAttribute:"fill",symbol:"point"},t),e);mj.props=Object.assign({defaultMarker:"point"},mO.props);let mA=(t,e)=>mO(Object.assign({colorAttribute:"stroke",symbol:"plus"},t),e);mA.props=Object.assign({defaultMarker:"plus"},mO.props);let mT=(t,e)=>mO(Object.assign({colorAttribute:"fill",symbol:"diamond"},t),e);mT.props=Object.assign({defaultMarker:"diamond"},mO.props);let mC=(t,e)=>mO(Object.assign({colorAttribute:"fill",symbol:"square"},t),e);mC.props=Object.assign({defaultMarker:"square"},mO.props);let mN=(t,e)=>mO(Object.assign({colorAttribute:"fill",symbol:"triangle"},t),e);mN.props=Object.assign({defaultMarker:"triangle"},mO.props);let mL=(t,e)=>mO(Object.assign({colorAttribute:"fill",symbol:"hexagon"},t),e);mL.props=Object.assign({defaultMarker:"hexagon"},mO.props);let mI=(t,e)=>mO(Object.assign({colorAttribute:"stroke",symbol:"cross"},t),e);mI.props=Object.assign({defaultMarker:"cross"},mO.props);let mR=(t,e)=>mO(Object.assign({colorAttribute:"fill",symbol:"bowtie"},t),e);mR.props=Object.assign({defaultMarker:"bowtie"},mO.props);let mD=(t,e)=>mO(Object.assign({colorAttribute:"stroke",symbol:"hyphen"},t),e);mD.props=Object.assign({defaultMarker:"hyphen"},mO.props);let mF=(t,e)=>mO(Object.assign({colorAttribute:"stroke",symbol:"line"},t),e);mF.props=Object.assign({defaultMarker:"line"},mO.props);let mz=(t,e)=>mO(Object.assign({colorAttribute:"stroke",symbol:"tick"},t),e);mz.props=Object.assign({defaultMarker:"tick"},mO.props);let mB=(t,e)=>mO(Object.assign({colorAttribute:"fill",symbol:"triangle-down"},t),e);mB.props=Object.assign({defaultMarker:"triangleDown"},mO.props);let mW=()=>(t,e)=>{let{encode:n}=e,{y:r}=n;return void 0!==r?[t,e]:[t,nt({},e,{encode:{y:nw(nk(t,0))},scale:{y:{guide:null}}})]};mW.props={};let m$=()=>(t,e)=>{let{encode:n}=e,{size:r}=n;return void 0!==r?[t,e]:[t,nt({},e,{encode:{size:nE(nk(t,3))}})]};m$.props={};let mG={hollow:mw,hollowDiamond:mE,hollowHexagon:mk,hollowSquare:mM,hollowTriangleDown:mS,hollowTriangle:m_,hollowBowtie:mP,point:mj,plus:mA,diamond:mT,square:mC,triangle:mN,hexagon:mL,cross:mI,bowtie:mR,hyphen:mD,line:mF,tick:mz,triangleDown:mB},mV=t=>(e,n,r,i)=>{let{x:o,y:a,x1:l,y1:s,size:u,dx:c,dy:f}=r,[p,h]=i.getSize(),d=nB(n,r,t),y=t=>{let e=+((null==c?void 0:c[t])||0),n=+((null==f?void 0:f[t])||0),r=l?(+o[t]+ +l[t])/2:+o[t],i=s?(+a[t]+ +s[t])/2:+a[t];return[r+e,i+n]},g=u?Array.from(e,t=>{let[e,n]=y(t),r=+u[t],o=r/p,a=r/h;return[i.map(d([e-o,n-a],t)),i.map(d([e+o,n+a],t))]}):Array.from(e,t=>[i.map(d(y(t),t))]);return[e,g]};mV.props={defaultShape:"hollow",defaultLabelShape:"label",composite:!1,shape:mG,channels:[...nN({shapes:Object.keys(mG)}),{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:[...nD(),{type:sP},{type:mW}],postInference:[{type:m$},...nL()]};var mH=function(t){return"function"==typeof t};function mU(t){mY(t,!0)}function mq(t){mY(t,!1)}function mY(t,e){var n=e?"visible":"hidden";!function t(e,n){n(e),e.children&&e.children.forEach(function(e){e&&t(e,n)})}(t,function(t){t.attr("visibility",n)})}var mX=function(t){return"object"==typeof t&&null!==t},mK={}.toString,mZ=function(t,e){return mK.call(t)==="[object "+e+"]"},mQ=function(t){if(!mX(t)||!mZ(t,"Object"))return!1;if(null===Object.getPrototypeOf(t))return!0;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e},mJ=function(t){return Array.isArray?Array.isArray(t):mZ(t,"Array")},m0=function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=5),Object.entries(e).forEach(function(i){var o=ol(i,2),a=o[0],l=o[1];Object.prototype.hasOwnProperty.call(e,a)&&(l?mQ(l)?(!mQ(t[a])&&(t[a]={}),n<r?m0(t[a],l,n+1,r):t[a]=e[a]):mJ(l)?(t[a]=[],t[a]=t[a].concat(l)):t[a]=l:t[a]=l)})},m1=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)m0(t,e[r]);return t},m2=function(t){function e(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=t.apply(this,ou([],ol(e),!1))||this;return r.addEventListener(en.INSERTED,function(){mq(r)}),r}return oe(e,t),e}(yo);function m5(t){var e=t.appendChild(new m2({class:"offscreen"}));return mq(e),e}function m3(){mY(this,"hidden"!==this.attributes.visibility)}var m4=function(t){function e(e,n){void 0===n&&(n={});var r=t.call(this,m1({},{style:n},e))||this;return r.initialized=!1,r._defaultOptions=n,r}return oe(e,t),Object.defineProperty(e.prototype,"offscreenGroup",{get:function(){return!this._offscreen&&(this._offscreen=m5(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 t;null===(t=this._offscreen)||void 0===t||t.destroy()},e.prototype.attributeChangedCallback=function(t){"visibility"===t&&m3.call(this)},e.prototype.update=function(t,e){var n;return this.attr(m1({},this.attributes,t||{})),null===(n=this.render)||void 0===n?void 0:n.call(this,this.attributes,this,e)},e.prototype.clear=function(){this.removeChildren()},e.prototype.bindEvents=function(t,e){},e}(yr);function m6(t,e,n,r,i){return(void 0===r&&(r=!0),void 0===i&&(i=function(t){t.node().removeChildren()}),t)?n(e):(r&&i(e),null)}var m8=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=or(e,["style"]);return t.call(this,on({style:on({text:"",fill:"black",fontFamily:"sans-serif",fontSize:16,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",lineWidth:1,textAlign:"start",textBaseline:"middle"},n)},r))||this}return oe(e,t),Object.defineProperty(e.prototype,"offscreenGroup",{get:function(){return!this._offscreen&&(this._offscreen=m5(this)),this._offscreen},enumerable:!1,configurable:!0}),e.prototype.disconnectedCallback=function(){var t;null===(t=this._offscreen)||void 0===t||t.destroy()},e}(yh),m9=function(){var t,e,n;function r(e,n,r,i,o,a,l){void 0===e&&(e=null),void 0===n&&(n=null),void 0===r&&(r=null),void 0===i&&(i=null),void 0===o&&(o=[null,null,null,null,null]),void 0===a&&(a=[]),void 0===l&&(l=[]),t.add(this),this._elements=Array.from(e),this._data=n,this._parent=r,this._document=i,this._enter=o[0],this._update=o[1],this._exit=o[2],this._merge=o[3],this._split=o[4],this._transitions=a,this._facetElements=l}return r.prototype.selectAll=function(t){var n="string"==typeof t?this._parent.querySelectorAll(t):t;return new e(n,null,this._elements[0],this._document)},r.prototype.selectFacetAll=function(t){var n="string"==typeof t?this._parent.querySelectorAll(t):t;return new e(this._elements,null,this._parent,this._document,void 0,void 0,n)},r.prototype.select=function(t){var n="string"==typeof t?this._parent.querySelectorAll(t)[0]||null:t;return new e([n],null,n,this._document)},r.prototype.append=function(t){var n=this,r="function"==typeof t?t:function(){return n.createElement(t)},i=[];if(null!==this._data){for(var o=0;o<this._data.length;o++){var a=this._data[o],l=ol(Array.isArray(a)?a:[a,null],2),s=l[0],u=l[1],c=r(s,o);c.__data__=s,null!==u&&(c.__fromElements__=u),this._parent.appendChild(c),i.push(c)}return new e(i,null,this._parent,this._document)}for(var o=0;o<this._elements.length;o++){var f=this._elements[o],s=f.__data__,c=r(s,o);f.appendChild(c),i.push(c)}return new e(i,null,i[0],this._document)},r.prototype.maybeAppend=function(e,r){var i=oc(this,t,"m",n).call(this,"#"===e[0]?e:"#".concat(e),r);return i.attr("id",e),i},r.prototype.maybeAppendByClassName=function(e,r){var i=e.toString(),o=oc(this,t,"m",n).call(this,"."===i[0]?i:".".concat(i),r);return o.attr("className",i),o},r.prototype.maybeAppendByName=function(e,r){var i=oc(this,t,"m",n).call(this,'[name="'.concat(e,'"]'),r);return i.attr("name",e),i},r.prototype.data=function(t,n,r){void 0===n&&(n=function(t){return t}),void 0===r&&(r=function(){return null});var i,o,a,l,s,u=[],c=[],f=new Set(this._elements),p=[],h=new Set,d=new Map(this._elements.map(function(t,e){return[n(t.__data__,e),t]})),y=new Map(this._facetElements.map(function(t,e){return[n(t.__data__,e),t]}));for(var g=(i=this._elements,o=function(t){return r(t.__data__)},a=new Map,i.forEach(function(t){var e=o(t);!a.has(e)&&a.set(e,[]),a.get(e).push(t)}),a),v=0;v<t.length;v++){var m=t[v],b=n(m,v),x=r(m,v);if(d.has(b)){var O=d.get(b);O.__data__=m,O.__facet__=!1,c.push(O),f.delete(O),d.delete(b)}else if(y.has(b)){var O=y.get(b);O.__data__=m,O.__facet__=!0,c.push(O),y.delete(b)}else if(g.has(b)){var w=g.get(b);p.push([m,w]);try{for(var E=(l=void 0,oa(w)),k=E.next();!k.done;k=E.next()){var O=k.value;f.delete(O)}}catch(t){l={error:t}}finally{try{k&&!k.done&&(s=E.return)&&s.call(E)}finally{if(l)throw l.error}}g.delete(b)}else if(d.has(x)){var O=d.get(x);O.__toData__?O.__toData__.push(m):O.__toData__=[m],h.add(O),f.delete(O)}else u.push(m)}var M=[new e([],u,this._parent,this._document),new e(c,null,this._parent,this._document),new e(f,null,this._parent,this._document),new e([],p,this._parent,this._document),new e(h,null,this._parent,this._document)];return new e(this._elements,null,this._parent,this._document,M)},r.prototype.merge=function(t){var n=ou(ou([],ol(this._elements),!1),ol(t._elements),!1),r=ou(ou([],ol(this._transitions),!1),ol(t._transitions),!1);return new e(n,null,this._parent,this._document,void 0,r)},r.prototype.createElement=function(t){if(this._document)return this._document.createElement(t,{});var n=e.registry[t];return n?new n:function(t){throw Error(t)}("Unknown node type: ".concat(t))},r.prototype.join=function(t,e,n,r,i){void 0===t&&(t=function(t){return t}),void 0===e&&(e=function(t){return t}),void 0===n&&(n=function(t){return t.remove()}),void 0===r&&(r=function(t){return t}),void 0===i&&(i=function(t){return t.remove()});var o=t(this._enter),a=e(this._update),l=n(this._exit),s=r(this._merge),u=i(this._split);return a.merge(o).merge(l).merge(s).merge(u)},r.prototype.remove=function(){for(var t=this,n=0;n<this._elements.length;n++)!function(e){var n=t._elements[e],r=t._transitions[e];r?r.then(function(){return n.remove()}):n.remove()}(n);return new e([],null,this._parent,this._document,void 0,this._transitions)},r.prototype.each=function(t){for(var e=0;e<this._elements.length;e++){var n=this._elements[e],r=n.__data__;t.call(n,r,e)}return this},r.prototype.attr=function(t,e){var n="function"!=typeof e?function(){return e}:e;return this.each(function(r,i){void 0!==e&&(this[t]=n.call(this,r,i))})},r.prototype.style=function(t,e,n){void 0===n&&(n=!0);var r="function"==typeof e&&n?e:function(){return e};return this.each(function(n,i){void 0!==e&&(this.style[t]=r.call(this,n,i))})},r.prototype.styles=function(t,e){return void 0===t&&(t={}),void 0===e&&(e=!0),this.each(function(n,r){var i=this;Object.entries(t).forEach(function(t){var o=ol(t,2),a=o[0],l=o[1],s="function"==typeof l&&e?l:function(){return l};void 0!==l&&i.attr(a,s.call(i,n,r))})})},r.prototype.update=function(t,e){void 0===e&&(e=!0);var n="function"==typeof t&&e?t:function(){return t};return this.each(function(e,r){t&&this.update&&this.update(n.call(this,e,r))})},r.prototype.maybeUpdate=function(t,e){void 0===e&&(e=!0);var n="function"==typeof t&&e?t:function(){return t};return this.each(function(e,r){t&&this.update&&this.update(n.call(this,e,r))})},r.prototype.transition=function(t){var e=this._transitions;return this.each(function(n,r){e[r]=t.call(this,n,r)})},r.prototype.on=function(t,e){return this.each(function(){this.addEventListener(t,e)}),this},r.prototype.call=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return t.call.apply(t,ou([this._parent,this],ol(e),!1)),this},r.prototype.node=function(){return this._elements[0]},r.prototype.nodes=function(){return this._elements},r.prototype.transitions=function(){return this._transitions.filter(function(t){return!!t})},r.prototype.parent=function(){return this._parent},e=r,t=new WeakSet,n=function(t,n){var r=this._elements[0],i=r.querySelector(t);if(i)return new e([i],null,this._parent,this._document);var o="string"==typeof n?this.createElement(n):n();return r.appendChild(o),new e([o],null,this._parent,this._document)},r.registry={g:yo,rect:yp,circle:yn,path:yu,text:m8,ellipse:yi,image:yl,line:ys,polygon:yc,polyline:yf,html:ya},r}();function m7(t){return new m9([t],null,t,t.ownerDocument)}var bt=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"]]},be=function(t,e,n){return[["M",t,e+n],["L",t,e-n]]},bn=function(t,e,n){return[["M",t-n,e],["L",t+n,e]]},br=function(t){var e=typeof t;return null!==t&&"object"===e||"function"===e},bi=function(t){return mZ(t,"String")},bo=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return oe(e,t),e.prototype.render=function(t,n){var r,i,o=t.symbol,a=t.size,l=void 0===a?16:a,s=or(t,["symbol","size"]);var u=["base64","url","image"].includes(i=function(t){var e="default";if(br(t)&&t instanceof Image)e="image";else if(mH(t))e="symbol";else if(bi(t)){var n=RegExp("data:(image|text)");e=t.match(n)?"base64":/^(https?:\/\/(([a-zA-Z0-9]+-?)+[a-zA-Z0-9]+\.)+[a-zA-Z]+)(:\d+)?(\/.*)?(\?.*)?(#.*)?$/.test(t)?"url":"symbol"}return e}(r=o))?"image":r&&"symbol"===i?"path":null;m6(!!u,m7(n),function(t){t.maybeAppendByClassName("marker",u).attr("className","marker ".concat(u,"-marker")).call(function(t){if("image"===u){var n=2*l;t.styles({img:o,width:n,height:n,x:-l,y:-l})}else{var n=l/2,r=mH(o)?o:e.getSymbol(o);t.styles(on({path:null==r?void 0:r(0,0,n)},s))}})})},e.MARKER_SYMBOL_MAP=new Map,e.registerSymbol=function(t,n){e.MARKER_SYMBOL_MAP.set(t,n)},e.getSymbol=function(t){return e.MARKER_SYMBOL_MAP.get(t)},e.getSymbols=function(){return Array.from(e.MARKER_SYMBOL_MAP.keys())},e}(m4);bo.registerSymbol("cross",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]]}),bo.registerSymbol("hyphen",function(t,e,n){return[["M",t-n,e],["L",t+n,e]]}),bo.registerSymbol("line",be),bo.registerSymbol("plus",function(t,e,n){return[["M",t-n,e],["L",t+n,e],["M",t,e-n],["L",t,e+n]]}),bo.registerSymbol("tick",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]]}),bo.registerSymbol("circle",bt),bo.registerSymbol("point",bt),bo.registerSymbol("bowtie",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"]]}),bo.registerSymbol("hexagon",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"]]}),bo.registerSymbol("square",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"]]}),bo.registerSymbol("diamond",function(t,e,n){return[["M",t-n,e],["L",t,e-n],["L",t+n,e],["L",t,e+n],["Z"]]}),bo.registerSymbol("triangle",function(t,e,n){var r=n*Math.sin(1/3*Math.PI);return[["M",t-n,e+r],["L",t,e-r],["L",t+n,e+r],["Z"]]}),bo.registerSymbol("triangle-down",function(t,e,n){var r=n*Math.sin(1/3*Math.PI);return[["M",t-n,e-r],["L",t+n,e-r],["L",t,e+r],["Z"]]}),bo.registerSymbol("line",be),bo.registerSymbol("dot",bn),bo.registerSymbol("dash",bn),bo.registerSymbol("smooth",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]]}),bo.registerSymbol("hv",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]]}),bo.registerSymbol("vh",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]]}),bo.registerSymbol("hvh",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]]}),bo.registerSymbol("vhv",function(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 ba=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let bl=(t,e,n)=>{let r=gT(t,e),i=gT(e,n);return(Math.pow(r,2)+Math.pow(i,2)-Math.pow(gT(n,t),2))/(2*r*i)},bs=vv(t=>{let e;let n=t.attributes,{className:r,class:i,transform:o,rotate:a,labelTransform:l,labelTransformOrigin:s,x:u,y:c,x0:f=u,y0:p=c,text:h,background:d,connector:y,startMarker:g,endMarker:v,coordCenter:m,innerHTML:b}=n,x=ba(n,["className","class","transform","rotate","labelTransform","labelTransformOrigin","x","y","x0","y0","text","background","connector","startMarker","endMarker","coordCenter","innerHTML"]);if([u,c,f,p].some(t=>!gz(t))){t.children.forEach(t=>t.remove());return}let O=nc(x,"background"),{padding:w}=O,E=ba(O,["padding"]),k=nc(x,"connector"),{points:M=[]}=k,S=ba(k,["points"]),_=[[+f,+p],[+u,+c]];e=b?g_(t).maybeAppend("html","html",r).style("zIndex",0).style("innerHTML",b).call(gH,Object.assign({transform:l,transformOrigin:s},x)).node():g_(t).maybeAppend("text","text").style("zIndex",0).style("text",h).call(gH,Object.assign({textBaseline:"middle",transform:l,transformOrigin:s},x)).node();let P=function(t,e,n,r){let[[i,o],[a,l]]=e,[s,u]=function(t){let{min:[e,n],max:[r,i]}=t.getLocalBounds(),o=0,a=0;return e>0&&(o=e),r<0&&(o=r),n>0&&(a=n),i<0&&(a=i),[o,a]}(t);if(i===a&&o===l)return g7()([[0,0],[s,u]]);let c=[[i-a,o-l]].concat(n.length?n:[[0,0]]),f=[r[0]-a,r[1]-l],[p,h]=c;if(bl(f,p,h)>0){let e=(()=>{let{min:e,max:n}=t.getLocalBounds(),r=p[0]+(p[1]-f[1])*(p[1]-0)/(p[0]-f[0]);return n[0]<f[0]?Math.min(n[0],r):Math.max(e[0],r)})();c.splice(1,1,[e,0])}return g7()(c)}(g_(t).maybeAppend("background","rect").style("zIndex",-1).call(gH,function(t,e=[]){let[n=0,r=0,i=n,o=r]=e,a=t.parentNode,l=a.getEulerAngles();a.setEulerAngles(0);let{min:s,halfExtents:u}=t.getLocalBounds(),[c,f]=s,[p,h]=u;return a.setEulerAngles(l),{x:c-o,y:f-n,width:2*p+o+r,height:2*h+n+i}}(e,w)).call(gH,d?E:{}).node(),_,M,m),j=g&&new bo({id:"startMarker",style:Object.assign({x:0,y:0},nc(x,"startMarker"))}),A=v&&new bo({id:"endMarker",style:Object.assign({x:0,y:0},nc(x,"endMarker"))});g_(t).maybeAppend("connector","path").style("zIndex",0).style("path",P).style("markerStart",j).style("markerEnd",A).call(gH,y?S:{})}),bu=(t,e)=>{let{coordinate:n}=e;return(e,r,i)=>{let{color:o,text:a="",fontSize:l,rotate:s=0,transform:u=""}=r,c={text:String(a),stroke:o,fill:o,fontSize:l},[[f,p]]=e;return g_(new bs).style("x",f).style("y",p).call(gH,i).style("transform",`${u}rotate(${+s})`).style("coordCenter",n.getCenter()).call(gH,c).call(gH,t).node()}};bu.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var bc=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let bf=vv(t=>{let e=t.attributes,{class:n,x:r,y:i}=e,o=bc(e,["class","x","y"]),a=nc(o,"marker"),{size:l=24}=a,s=()=>(function(t){let e=t/Math.sqrt(2),n=t*Math.sqrt(2),[r,i]=[-e,e-n],[o,a]=[0,0],[l,s]=[e,e-n];return[["M",r,i],["A",t,t,0,1,1,l,s],["L",o,a],["Z"]]})(l/2),[u,c]=function(t){let{min:e,max:n}=t.getLocalBounds();return[(e[0]+n[0])*.5,(e[1]+n[1])*.5]}(g_(t).maybeAppend("marker",()=>new bo({})).call(t=>t.node().update(Object.assign({symbol:s},a))).node());g_(t).maybeAppend("text","text").style("x",u).style("y",c).call(gH,o)}),bp=(t,e)=>{let n=bc(t,[]);return(t,e,r)=>{let{color:i}=r,o=bc(r,["color"]),{color:a=i,text:l=""}=e,s={text:String(l),stroke:a,fill:a},[[u,c]]=t;return g_(new bf).call(gH,o).style("x",u).style("y",c).call(gH,s).call(gH,n).node()}};bp.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let bh=()=>(t,e)=>{let{data:n}=e;if(!Array.isArray(n)||n.some(n_))return[t,e];let r=Array.isArray(n[0])?n:[n],i=r.map(t=>t[0]),o=r.map(t=>t[1]);return[t,nt({},e,{encode:{x:nO(i),y:nO(o)}})]};bh.props={};var bd=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let by=()=>(t,e)=>{let{data:n,style:r={}}=e,i=bd(e,["data","style"]),{x:o,y:a}=r,l=bd(r,["x","y"]);return void 0==o||void 0==a?[t,e]:[[0],nt({},i,{data:[0],cartesian:!0,encode:{x:nO([o||0]),y:nO([a||0])},scale:{x:{type:"identity",independent:!0,guide:null},y:{type:"identity",independent:!0,guide:null}},style:l})]};by.props={};let bg={text:bu,badge:bp},bv=t=>{let{cartesian:e=!1}=t;return e?n$:(e,n,r,i)=>{let{x:o,y:a}=r,l=nB(n,r,t),s=Array.from(e,t=>{let e=[+o[t],+a[t]];return[i.map(l(e,t))]});return[e,s]}};bv.props={defaultShape:"text",defaultLabelShape:"label",composite:!1,shape:bg,channels:[...nN({shapes:Object.keys(bg)}),{name:"x",required:!0},{name:"y",required:!0},{name:"text",scale:"identity"},{name:"fontSize"},{name:"rotate"}],preInference:[...nD(),{type:bh},{type:by}],postInference:[...nL()]};let bm=()=>(t,e)=>[t,nt({scale:{x:{padding:0},y:{padding:0}}},e)];bm.props={};let bb={cell:g2,hollow:g5},bx=()=>(t,e,n,r)=>{let{x:i,y:o}=n,a=e.x,l=e.y,s=Array.from(t,t=>{let e=a.getBandWidth(a.invert(+i[t])),n=l.getBandWidth(l.invert(+o[t])),s=+i[t],u=+o[t];return[[s,u],[s+e,u],[s+e,u+n],[s,u+n]].map(t=>r.map(t))});return[t,s]};function bO(t,e,n){var r=null,i=sj(!0),o=null,a=g6,l=null,s=sq(u);function u(u){var c,f,p,h,d,y=(u=g3(u)).length,g=!1,v=Array(y),m=Array(y);for(null==o&&(l=a(d=s())),c=0;c<=y;++c){if(!(c<y&&i(h=u[c],c,u))===g){if(g=!g)f=c,l.areaStart(),l.lineStart();else{for(l.lineEnd(),l.lineStart(),p=c-1;p>=f;--p)l.point(v[p],m[p]);l.lineEnd(),l.areaEnd()}}g&&(v[c]=+t(h,c,u),m[c]=+e(h,c,u),l.point(r?+r(h,c,u):v[c],n?+n(h,c,u):m[c]))}if(d)return l=null,d+""||null}function c(){return g7().defined(i).curve(a).context(o)}return t="function"==typeof t?t:void 0===t?g8:sj(+t),e="function"==typeof e?e:void 0===e?sj(0):sj(+e),n="function"==typeof n?n:void 0===n?g9:sj(+n),u.x=function(e){return arguments.length?(t="function"==typeof e?e:sj(+e),r=null,u):t},u.x0=function(e){return arguments.length?(t="function"==typeof e?e:sj(+e),u):t},u.x1=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:sj(+t),u):r},u.y=function(t){return arguments.length?(e="function"==typeof t?t:sj(+t),n=null,u):e},u.y0=function(t){return arguments.length?(e="function"==typeof t?t:sj(+t),u):e},u.y1=function(t){return arguments.length?(n=null==t?null:"function"==typeof t?t:sj(+t),u):n},u.lineX0=u.lineY0=function(){return c().x(t).y(e)},u.lineY1=function(){return c().x(t).y(n)},u.lineX1=function(){return c().x(r).y(e)},u.defined=function(t){return arguments.length?(i="function"==typeof t?t:sj(!!t),u):i},u.curve=function(t){return arguments.length?(a=t,null!=o&&(l=a(o)),u):a},u.context=function(t){return arguments.length?(null==t?o=l=null:l=a(o=t),u):o},u}bx.props={defaultShape:"cell",defaultLabelShape:"label",shape:bb,composite:!1,channels:[...nN({shapes:Object.keys(bb)}),{name:"x",required:!0,scale:"band"},{name:"y",required:!0,scale:"band"}],preInference:[...nD(),{type:sP},{type:mW},{type:bm}],postInference:[...nL()]};var bw=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let bE=vv(t=>{let{areaPath:e,connectPath:n,areaStyle:r,connectStyle:i}=t.attributes,o=t.ownerDocument;g_(t).maybeAppend("connect-path",()=>o.createElement("path",{})).style("d",n).call(gH,i),g_(t).maybeAppend("area-path",()=>o.createElement("path",{})).style("d",e).call(gH,r)}),bk=(t,e)=>{let{curve:n,gradient:r=!1,defined:i=t=>!Number.isNaN(t)&&null!=t,connect:o=!1}=t,a=bw(t,["curve","gradient","defined","connect"]),{coordinate:l,document:s}=e;return(t,e,u)=>{let{color:c}=u,{color:f=c,seriesColor:p,seriesX:h,seriesY:d}=e,y=s1(l),g=gZ(l,e),v=r&&p?gq(p,h,d,r,void 0,y):f,m=Object.assign(Object.assign(Object.assign(Object.assign({},u),{stroke:v,fill:v}),g&&{transform:g}),a),[b,x]=function(t,e){let n=[],r=[],i=[],o=!1,a=null,l=t.length/2;for(let s=0;s<l;s++){let u=t[s],c=t[s+l];if([...u,...c].some(t=>!e(t)))o=!0;else{if(n.push(u),r.push(c),o&&a){o=!1;let[t,e]=a;i.push([t,u,e,c])}a=[u,c]}}return[n.concat(r),i]}(t,i),O=nc(m,"connect"),w=!!x.length,E=t=>g_(s.createElement("path",{})).style("d",t||"").call(gH,m).node();if(s2(l)){let e=t=>{var e,r,o,a,s,u;let c=l.getCenter(),f=t.slice(0,t.length/2),p=t.slice(t.length/2);return(r=(e=bO().curve(vh)).curve,o=e.lineX0,a=e.lineX1,s=e.lineY0,u=e.lineY1,e.angle=e.x,delete e.x,e.startAngle=e.x0,delete e.x0,e.endAngle=e.x1,delete e.x1,e.radius=e.y,delete e.y,e.innerRadius=e.y0,delete e.y0,e.outerRadius=e.y1,delete e.y1,e.lineStartAngle=function(){return vg(o())},delete e.lineX0,e.lineEndAngle=function(){return vg(a())},delete e.lineX1,e.lineInnerRadius=function(){return vg(s())},delete e.lineY0,e.lineOuterRadius=function(){return vg(u())},delete e.lineY1,e.curve=function(t){return arguments.length?r(vy(t)):r()._curve},e).angle((t,e)=>gN(gj(f[e],c))).outerRadius((t,e)=>gT(f[e],c)).innerRadius((t,e)=>gT(p[e],c)).defined((t,e)=>[...f[e],...p[e]].every(i)).curve(n)(p)};return w&&(!o||Object.keys(O).length)?w&&!o?E(e(t)):g_(new bE).style("areaStyle",m).style("connectStyle",Object.assign(Object.assign({},O),a)).style("areaPath",e(t)).style("connectPath",x.map(e).join("")).node():E(e(b))}{let e=t=>{let e=t.slice(0,t.length/2),r=t.slice(t.length/2);return y?bO().y((t,n)=>e[n][1]).x1((t,n)=>e[n][0]).x0((t,e)=>r[e][0]).defined((t,n)=>[...e[n],...r[n]].every(i)).curve(n)(e):bO().x((t,n)=>e[n][0]).y1((t,n)=>e[n][1]).y0((t,e)=>r[e][1]).defined((t,n)=>[...e[n],...r[n]].every(i)).curve(n)(e)};return w&&(!o||Object.keys(O).length)?w&&!o?E(e(t)):g_(new bE).style("areaStyle",m).style("connectStyle",Object.assign(Object.assign({},O),a)).style("areaPath",e(t)).style("connectPath",x.map(e).join("")).node():E(e(b))}}};bk.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let bM=(t,e)=>{let{coordinate:n}=e;return(...r)=>bk(Object.assign({curve:s2(n)?vn:g6},t),e)(...r)};bM.props=Object.assign(Object.assign({},bk.props),{defaultMarker:"square"});var bS=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let b_=(t,e)=>{let n=bS(t,[]),{coordinate:r}=e;return(...t)=>bk(Object.assign({curve:s2(r)?vP:s1(r)?vD:vR},n),e)(...t)};b_.props=Object.assign(Object.assign({},bk.props),{defaultMarker:"smooth"});let bP=(t,e)=>(...n)=>bk(Object.assign({curve:vW},t),e)(...n);bP.props=Object.assign(Object.assign({},bk.props),{defaultMarker:"hvh"});let bj=(t,e)=>(...n)=>bk(Object.assign({curve:v$},t),e)(...n);bj.props=Object.assign(Object.assign({},bk.props),{defaultMarker:"vh"});let bA=(t,e)=>(...n)=>bk(Object.assign({curve:vG},t),e)(...n);bA.props=Object.assign(Object.assign({},bk.props),{defaultMarker:"hv"});let bT={area:bM,smooth:b_,hvh:bP,vh:bj,hv:bA},bC=()=>(t,e,n,r)=>{var i,o;let{x:a,y:l,y1:s,series:u}=n,{x:c,y:f}=e,p=u?Array.from(iu(t,t=>u[t]).values()):[t],h=p.map(t=>t[0]).filter(t=>void 0!==t),d=((null===(i=null==c?void 0:c.getBandWidth)||void 0===i?void 0:i.call(c))||0)/2,y=((null===(o=null==f?void 0:f.getBandWidth)||void 0===o?void 0:o.call(f))||0)/2;return[h,Array.from(p,t=>{let e=t.length,n=Array(2*e);for(let i=0;i<t.length;i++){let o=t[i];n[i]=r.map([+a[o]+d,+l[o]+y]),n[e+i]=r.map([+a[o]+d,+s[o]+y])}return n}),p]};bC.props={defaultShape:"area",defaultLabelShape:"label",composite:!1,shape:bT,channels:[...nN({shapes:Object.keys(bT)}),{name:"x",required:!0},{name:"y",required:!0},{name:"size"},{name:"series",scale:"band"}],preInference:[...nD(),{type:vK},{type:s_},{type:bm}],postInference:[...nI()],interaction:{shareTooltip:!0,seriesTooltip:!0,crosshairs:!0}};let bN=()=>(t,e)=>{let{encode:n}=e,{y1:r}=n;if(r)return[t,e];let[i]=nM(n,"y");return[t,nt({},e,{encode:{y1:nO([...i])}})]};bN.props={};let bL=()=>(t,e)=>{let{encode:n}=e,{x1:r}=n;if(r)return[t,e];let[i]=nM(n,"x");return[t,nt({},e,{encode:{x1:nO([...i])}})]};bL.props={};var bI=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let bR=(t,e)=>{let{arrow:n=!0,arrowSize:r="40%"}=t,i=bI(t,["arrow","arrowSize"]),{document:o}=e;return(t,e,a)=>{let{defaultColor:l}=a,s=bI(a,["defaultColor"]),{color:u=l,transform:c}=e,[f,p]=t,h=sU();if(h.moveTo(...f),h.lineTo(...p),n){let[t,e]=function(t,e,n){let{arrowSize:r}=n,i="string"==typeof r?+parseFloat(r)/100*gT(t,e):r,o=Math.PI/6,a=Math.atan2(e[1]-t[1],e[0]-t[0]),l=Math.PI/2-a-o,s=[e[0]-i*Math.sin(l),e[1]-i*Math.cos(l)],u=a-o;return[s,[e[0]-i*Math.cos(u),e[1]-i*Math.sin(u)]]}(f,p,{arrowSize:r});h.moveTo(...p),h.lineTo(...t),h.moveTo(...p),h.lineTo(...e)}return g_(o.createElement("path",{})).call(gH,s).style("d",h.toString()).style("stroke",u).style("transform",c).call(gH,i).node()}};bR.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let bD=(t,e)=>{let{arrow:n=!1}=t;return(...r)=>bR(Object.assign(Object.assign({},t),{arrow:n}),e)(...r)};bD.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var bF=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let bz=(t,e)=>{let n=bF(t,[]),{coordinate:r,document:i}=e;return(t,e,o)=>{let{color:a}=o,l=bF(o,["color"]),{color:s=a,transform:u}=e,[c,f]=t,p=sU();if(p.moveTo(c[0],c[1]),s2(r)){let t=r.getCenter();p.quadraticCurveTo(t[0],t[1],f[0],f[1])}else{let t=gR(c,f),e=gT(c,f)/2;gU(p,c,f,t,e)}return g_(i.createElement("path",{})).call(gH,l).style("d",p.toString()).style("stroke",s).style("transform",u).call(gH,n).node()}};bz.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var bB=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let bW=(t,e)=>{let n=bB(t,[]),{document:r}=e;return(t,e,i)=>{let{color:o}=i,a=bB(i,["color"]),{color:l=o,transform:s}=e,[u,c]=t,f=sU();return f.moveTo(u[0],u[1]),f.bezierCurveTo(u[0]/2+c[0]/2,u[1],u[0]/2+c[0]/2,c[1],c[0],c[1]),g_(r.createElement("path",{})).call(gH,a).style("d",f.toString()).style("stroke",l).style("transform",s).call(gH,n).node()}};bW.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var b$=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let bG=(t,e)=>{let{cornerRatio:n=1/3}=t,r=b$(t,["cornerRatio"]),{coordinate:i,document:o}=e;return(t,e,a)=>{let{defaultColor:l}=a,s=b$(a,["defaultColor"]),{color:u=l,transform:c}=e,[f,p]=t,h=function(t,e,n,r){let i=sU();if(s2(n)){let o=n.getCenter(),a=gT(t,o),l=gT(e,o);return i.moveTo(t[0],t[1]),gU(i,t,e,o,(l-a)*r+a),i.lineTo(e[0],e[1]),i}return s1(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)}(f,p,i,n);return g_(o.createElement("path",{})).call(gH,s).style("d",h.toString()).style("stroke",u).style("transform",c).call(gH,r).node()}};bG.props={defaultMarker:"vhv",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let bV={link:bD,arc:bz,smooth:bW,vhv:bG},bH=t=>(e,n,r,i)=>{let{x:o,y:a,x1:l=o,y1:s=a}=r,u=nB(n,r,t),c=e.map(t=>[i.map(u([+o[t],+a[t]],t)),i.map(u([+l[t],+s[t]],t))]);return[e,c]};bH.props={defaultShape:"link",defaultLabelShape:"label",composite:!1,shape:bV,channels:[...nN({shapes:Object.keys(bV)}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...nD(),{type:bN},{type:bL}],postInference:[...nL()]};var bU=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let bq=(t,e)=>{let{coordinate:n,document:r}=e;return(e,i,o)=>{let{color:a}=o,l=bU(o,["color"]),{color:s=a,src:u="",size:c=32,transform:f=""}=i,{width:p=c,height:h=c}=t,[[d,y]]=e,[g,v]=n.getSize();p="string"==typeof p?nW(p)*g:p,h="string"==typeof h?nW(h)*v:h;let m=d-Number(p)/2,b=y-Number(h)/2;return g_(r.createElement("image",{})).call(gH,l).style("x",m).style("y",b).style("img",u).style("stroke",s).style("transform",f).call(gH,t).style("width",p).style("height",h).node()}};bq.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let bY={image:bq},bX=t=>{let{cartesian:e}=t;return e?n$:(e,n,r,i)=>{let{x:o,y:a}=r,l=nB(n,r,t),s=Array.from(e,t=>{let e=[+o[t],+a[t]];return[i.map(l(e,t))]});return[e,s]}};bX.props={defaultShape:"image",defaultLabelShape:"label",composite:!1,shape:bY,channels:[...nN({shapes:Object.keys(bY)}),{name:"x",required:!0},{name:"y",required:!0},{name:"src",scale:"identity"},{name:"size"}],preInference:[...nD(),{type:bh},{type:by}],postInference:[...nL()]};var bK=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let bZ=(t,e)=>{let{coordinate:n,document:r}=e;return(e,i,o)=>{let{color:a}=o,l=bK(o,["color"]),{color:s=a,transform:u}=i,c=function(t,e){var n;let r=sU();if(s2(e)){let n=e.getCenter(),i=[...t,t[0]],o=i.map(t=>gT(t,n));return i.forEach((e,i)=>{if(0===i){r.moveTo(e[0],e[1]);return}let a=o[i],l=t[i-1],s=o[i-1];void 0!==s&&1e-10>Math.abs(a-s)?gU(r,l,e,n,a):r.lineTo(e[0],e[1])}),r.closePath(),r}return n=r,t.forEach((t,e)=>0===e?n.moveTo(t[0],t[1]):n.lineTo(t[0],t[1])),n.closePath(),n}(e,n);return g_(r.createElement("path",{})).call(gH,l).style("d",c.toString()).style("stroke",s).style("fill",s).style("transform",u).call(gH,t).node()}};bZ.props={defaultMarker:"square",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var bQ=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let bJ=(t,e)=>{let n=bQ(t,[]),{coordinate:r,document:i}=e;return(t,e,o)=>{let{color:a}=o,l=bQ(o,["color"]),{color:s=a,transform:u}=e,c=function(t,e){let[n,r,i,o]=t,a=sU();if(s2(e)){let t=e.getCenter(),l=gT(t,n);return a.moveTo(n[0],n[1]),a.quadraticCurveTo(t[0],t[1],i[0],i[1]),gU(a,i,o,t,l),a.quadraticCurveTo(t[0],t[1],r[0],r[1]),gU(a,r,n,t,l),a.closePath(),a}return a.moveTo(n[0],n[1]),a.bezierCurveTo(n[0]/2+i[0]/2,n[1],n[0]/2+i[0]/2,i[1],i[0],i[1]),a.lineTo(o[0],o[1]),a.bezierCurveTo(o[0]/2+r[0]/2,o[1],o[0]/2+r[0]/2,r[1],r[0],r[1]),a.lineTo(n[0],n[1]),a.closePath(),a}(t,r);return g_(i.createElement("path",{})).call(gH,l).style("d",c.toString()).style("fill",s||a).style("stroke",s||a).style("transform",u).call(gH,n).node()}};bJ.props={defaultMarker:"square",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let b0={polygon:bZ,ribbon:bJ},b1=()=>(t,e,n,r)=>{let i=Object.entries(n).filter(([t])=>t.startsWith("x")).map(([,t])=>t),o=Object.entries(n).filter(([t])=>t.startsWith("y")).map(([,t])=>t),a=t.map(t=>{let e=[];for(let n=0;n<i.length;n++){let a=i[n][t];if(void 0===a)break;let l=o[n][t];e.push(r.map([+a,+l]))}return e});return[t,a]};b1.props={defaultShape:"polygon",defaultLabelShape:"label",composite:!1,shape:b0,channels:[...nN({shapes:Object.keys(b0)}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...nD()],postInference:[...nL()]};var b2=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let b5=(t,e)=>{let{coordinate:n,document:r}=e;return(e,i,o)=>{let{color:a,transform:l}=i,{color:s,fill:u=s,stroke:c=s}=o,f=b2(o,["color","fill","stroke"]),p=function(t,e){let n=sU();if(s2(e)){let r=e.getCenter(),[i,o]=r,a=gC(gj(t[0],r)),l=gC(gj(t[1],r)),s=gT(r,t[2]),u=gT(r,t[3]),c=gT(r,t[8]),f=gT(r,t[10]),p=gT(r,t[11]);n.moveTo(...t[0]),n.arc(i,o,s,a,l),n.arc(i,o,s,l,a,!0),n.moveTo(...t[2]),n.lineTo(...t[3]),n.moveTo(...t[4]),n.arc(i,o,u,a,l),n.lineTo(...t[6]),n.arc(i,o,f,l,a,!0),n.closePath(),n.moveTo(...t[8]),n.arc(i,o,c,a,l),n.arc(i,o,c,l,a,!0),n.moveTo(...t[10]),n.lineTo(...t[11]),n.moveTo(...t[12]),n.arc(i,o,p,a,l),n.arc(i,o,p,l,a,!0)}else 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]);return n}(e,n);return g_(r.createElement("path",{})).call(gH,f).style("d",p.toString()).style("stroke",c).style("fill",a||u).style("transform",l).call(gH,t).node()}};b5.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var b3=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let b4=(t,e)=>{let{coordinate:n,document:r}=e;return(e,i,o)=>{let{color:a,transform:l}=i,{color:s,fill:u=s,stroke:c=s}=o,f=b3(o,["color","fill","stroke"]),p=function(t,e,n=4){let r=sU();if(!s2(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,2*Math.PI),r.closePath(),r;let i=e.getCenter(),[o,a]=i,l=gT(i,t[3]),s=gT(i,t[8]),u=gT(i,t[10]),c=gC(gj(t[2],i)),f=Math.asin(n/s),p=c-f,h=c+f;r.moveTo(...t[2]),r.lineTo(...t[3]),r.moveTo(Math.cos(p)*l+o,Math.sin(p)*l+a),r.arc(o,a,l,p,h),r.lineTo(Math.cos(h)*u+o,Math.sin(h)*u+a),r.arc(o,a,u,h,p,!0),r.lineTo(Math.cos(p)*l+o,Math.sin(p)*l+a),r.closePath(),r.moveTo(...t[10]),r.lineTo(...t[11]);let d=(p+h)/2;return r.moveTo(Math.cos(d)*(s+n/2)+o,Math.sin(d)*(s+n/2)+a),r.arc(Math.cos(d)*s+o,Math.sin(d)*s+a,n/2,d,2*Math.PI+d),r.closePath(),r}(e,n,4);return g_(r.createElement("path",{})).call(gH,f).style("d",p.toString()).style("stroke",c).style("fill",a||u).style("transform",l).call(gH,t).node()}};b4.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let b6={box:b5,violin:b4},b8=()=>(t,e,n,r)=>{let{x:i,y:o,y1:a,y2:l,y3:s,y4:u,series:c}=n,f=e.x,p=e.series,h=Array.from(t,t=>{let e=f.getBandWidth(f.invert(+i[t])),n=e*(p?p.getBandWidth(p.invert(+(null==c?void 0:c[t]))):1),h=(+(null==c?void 0:c[t])||0)*e,d=+i[t]+h+n/2,[y,g,v,m,b]=[+o[t],+a[t],+l[t],+s[t],+u[t]];return[[d-n/2,b],[d+n/2,b],[d,b],[d,m],[d-n/2,m],[d+n/2,m],[d+n/2,g],[d-n/2,g],[d-n/2,v],[d+n/2,v],[d,g],[d,y],[d-n/2,y],[d+n/2,y]].map(t=>r.map(t))});return[t,h]};b8.props={defaultShape:"box",defaultLabelShape:"label",composite:!1,shape:b6,channels:[...nN({shapes:Object.keys(b6)}),{name:"x",scale:"band",required:!0},{name:"y",required:!0},{name:"series",scale:"band"}],preInference:[...nD(),{type:sP}],postInference:[...nI()],interaction:{shareTooltip:!0}};let b9={vector:bR},b7=()=>(t,e,n,r)=>{let{x:i,y:o,size:a,rotate:l}=n,[s,u]=r.getSize(),c=t.map(t=>{let e=+l[t]/180*Math.PI,n=+a[t],c=n/s*Math.cos(e),f=-(n/u)*Math.sin(e);return[r.map([+i[t]-c/2,+o[t]-f/2]),r.map([+i[t]+c/2,+o[t]+f/2])]});return[t,c]};b7.props={defaultShape:"vector",defaultLabelShape:"label",composite:!1,shape:b9,channels:[...nN({shapes:Object.keys(b9)}),{name:"x",required:!0},{name:"y",required:!0},{name:"rotate",required:!0,scale:"identity"},{name:"size",required:!0}],preInference:[...nD()],postInference:[...nL()]};var xt=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let xe=(t,e)=>{let{arrow:n,arrowSize:r=4}=t,i=xt(t,["arrow","arrowSize"]),{coordinate:o,document:a}=e;return(t,e,l)=>{var s,u,c;let{color:f,lineWidth:p}=l,h=xt(l,["color","lineWidth"]),{color:d=f,size:y=p}=e;let g=n?(s=a,u=r,c=Object.assign({fill:i.stroke||d,stroke:i.stroke||d},nc(i,"arrow")),s.createElement("path",{style:Object.assign({path:`M ${u},${u} L -${u},0 L ${u},-${u} L 0,0 Z`,anchor:"0.5 0.5",transformOrigin:"center"},c)})):null,v=function(t,e){if(!s2(e))return g7().x(t=>t[0]).y(t=>t[1])(t);let n=e.getCenter();return s0()({startAngle:0,endAngle:2*Math.PI,outerRadius:gT(t[0],n),innerRadius:gT(t[1],n)})}(t,o),m=function(t,e){if(!s2(t))return e;let[n,r]=t.getCenter();return`translate(${n}, ${r}) ${e||""}`}(o,e.transform);return g_(a.createElement("path",{})).call(gH,h).style("d",v).style("stroke",d).style("lineWidth",y).style("transform",m).style("markerEnd",g).call(gH,i).node()}};xe.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let xn=()=>(t,e)=>{let{data:n}=e;return!Array.isArray(n)||n.some(n_)?[t,e]:[t,nt({},e,{encode:{x:nO(n)}})]};xn.props={};let xr={line:xe},xi=t=>(e,n,r,i)=>{let{x:o}=r,a=nB(n,r,nt({style:{bandOffset:0}},t)),l=Array.from(e,t=>{let e=[o[t],1];return[e,[o[t],0]].map(e=>i.map(a(e,t)))});return[e,l]};xi.props={defaultShape:"line",defaultLabelShape:"label",composite:!1,shape:xr,channels:[...nR({shapes:Object.keys(xr)}),{name:"x",required:!0}],preInference:[...nD(),{type:xn}],postInference:[]};let xo=()=>(t,e)=>{let{data:n}=e;return!Array.isArray(n)||n.some(n_)?[t,e]:[t,nt({},e,{encode:{y:nO(n)}})]};xo.props={};let xa={line:xe},xl=t=>(e,n,r,i)=>{let{y:o}=r,a=nB(n,r,nt({style:{bandOffset:0}},t)),l=Array.from(e,t=>{let e=[0,o[t]];return[e,[1,o[t]]].map(e=>i.map(a(e,t)))});return[e,l]};xl.props={defaultShape:"line",defaultLabelShape:"label",composite:!1,shape:xa,channels:[...nR({shapes:Object.keys(xa)}),{name:"y",required:!0}],preInference:[...nD(),{type:xo}],postInference:[]};var xs=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function xu(t,e,n){return[["M",t,e],["L",t+2*n,e-n],["L",t+2*n,e+n],["Z"]]}let xc=(t,e)=>{let{offset:n=0,offset1:r=n,offset2:i=n,connectLength1:o,endMarker:a=!0}=t,l=xs(t,["offset","offset1","offset2","connectLength1","endMarker"]),{coordinate:s}=e;return(t,e,n)=>{var u;let{color:c,connectLength1:f}=n,p=xs(n,["color","connectLength1"]),{color:h,transform:d}=e,y=function(t,e,n,r,i=0){let[[o,a],[l,s]]=e;if(s1(t)){let t=o+n,e=t+i;return[[t,a],[e,a],[e,s],[l+r,s]]}let u=a-n,c=u-i;return[[o,u],[o,c],[l,c],[l,s-r]]}(s,t,r,i,null!=o?o:f),g=nc(Object.assign(Object.assign({},l),n),"endMarker");return g_(new yu).call(gH,p).style("path",(u=y,g7().x(t=>t[0]).y(t=>t[1])(u))).style("stroke",h||c).style("transform",d).style("markerEnd",a?new bo({className:"marker",style:Object.assign(Object.assign({},g),{symbol:xu})}):null).call(gH,l).node()}};xc.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let xf={connector:xc},xp=(...t)=>bH(...t);function xh(t,e,n,r){if(e)return()=>[0,1];let{[t]:i,[`${t}1`]:o}=n;return t=>{var e;let n=(null===(e=r.getBandWidth)||void 0===e?void 0:e.call(r,r.invert(+o[t])))||0;return[i[t],o[t]+n]}}function xd(t={}){let{extendX:e=!1,extendY:n=!1}=t;return(t,r,i,o)=>{let a=xh("x",e,i,r.x),l=xh("y",n,i,r.y),s=Array.from(t,t=>{let[e,n]=a(t),[r,i]=l(t);return[[e,r],[n,r],[n,i],[e,i]].map(t=>o.map(t))});return[t,s]}}xp.props={defaultShape:"connector",defaultLabelShape:"label",composite:!1,shape:xf,channels:[...nR({shapes:Object.keys(xf)}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...nD()],postInference:[]};let xy={range:g2},xg=()=>xd();xg.props={defaultShape:"range",defaultLabelShape:"label",composite:!1,shape:xy,channels:[...nR({shapes:Object.keys(xy)}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...nD()],postInference:[]};let xv=()=>(t,e)=>{let{data:n}=e;if(Array.isArray(n)&&(n.every(Array.isArray)||!n.some(n_))){let r=(t,e)=>Array.isArray(t[0])?t.map(t=>t[e]):[t[e]];return[t,nt({},e,{encode:{x:nO(r(n,0)),x1:nO(r(n,1))}})]}return[t,e]};xv.props={};let xm={range:g2},xb=()=>xd({extendY:!0});xb.props={defaultShape:"range",defaultLabelShape:"label",composite:!1,shape:xm,channels:[...nR({shapes:Object.keys(xm)}),{name:"x",required:!0}],preInference:[...nD(),{type:xv}],postInference:[]};let xx=()=>(t,e)=>{let{data:n}=e;if(Array.isArray(n)&&(n.every(Array.isArray)||!n.some(n_))){let r=(t,e)=>Array.isArray(t[0])?t.map(t=>t[e]):[t[e]];return[t,nt({},e,{encode:{y:nO(r(n,0)),y1:nO(r(n,1))}})]}return[t,e]};xx.props={};let xO={range:g2},xw=()=>xd({extendX:!0});xw.props={defaultShape:"range",defaultLabelShape:"label",composite:!1,shape:xO,channels:[...nR({shapes:Object.keys(xO)}),{name:"y",required:!0}],preInference:[...nD(),{type:xx}],postInference:[]};var xE=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let xk=(t,e)=>{let{arrow:n,colorAttribute:r}=t,i=xE(t,["arrow","colorAttribute"]),{coordinate:o,document:a}=e;return(t,e,n)=>{let{color:l,stroke:s}=n,u=xE(n,["color","stroke"]),{d:c,color:f=l}=e,[p,h]=o.getSize();return g_(a.createElement("path",{})).call(gH,u).style("d","function"==typeof c?c({width:p,height:h}):c).style(r,f).call(gH,i).node()}};xk.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let xM=(t,e)=>xk(Object.assign({colorAttribute:"fill"},t),e);xM.props={defaultMarker:"hvh",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let xS=(t,e)=>xk(Object.assign({fill:"none",colorAttribute:"stroke"},t),e);xS.props={defaultMarker:"hvh",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let x_={path:xM,hollow:xS},xP=t=>(t,e,n,r)=>[t,t.map(()=>[[0,0]])];xP.props={defaultShape:"path",defaultLabelShape:"label",shape:x_,composite:!1,channels:[...nN({shapes:Object.keys(x_)}),{name:"d",scale:"identity"}],preInference:[...nD()],postInference:[]};var xj=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let xA=(t,e)=>{let{render:n}=t,r=xj(t,["render"]);return t=>{let[[i,o]]=t;return n(Object.assign(Object.assign({},r),{x:i,y:o}),e)}};xA.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let xT=()=>(t,e)=>{let{style:n={}}=e;return[t,nt({},e,{style:Object.assign(Object.assign({},n),Object.fromEntries(Object.entries(n).filter(([,t])=>"function"==typeof t).map(([t,e])=>[t,()=>e])))})]};xT.props={};let xC=t=>{let{cartesian:e}=t;return e?n$:(e,n,r,i)=>{let{x:o,y:a}=r,l=nB(n,r,t),s=Array.from(e,t=>{let e=[+o[t],+a[t]];return[i.map(l(e,t))]});return[e,s]}};xC.props={defaultShape:"shape",defaultLabelShape:"label",composite:!1,shape:{shape:xA},channels:[{name:"x",required:!0},{name:"y",required:!0}],preInference:[...nD(),{type:bh},{type:by},{type:xT}]};var xN=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let xL=(t,e)=>{let{document:n}=e;return(e,r,i)=>{let{transform:o}=r,{color:a}=i,l=xN(i,["color"]),{color:s=a}=r,[u,...c]=e,f=sU();return f.moveTo(...u),c.forEach(([t,e])=>{f.lineTo(t,e)}),f.closePath(),g_(n.createElement("path",{})).call(gH,l).style("d",f.toString()).style("stroke",s||a).style("fill",s||a).style("fillOpacity",.4).style("transform",o).call(gH,t).node()}};xL.props={defaultMarker:"square",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let xI={density:xL},xR=()=>(t,e,n,r)=>{let{x:i,series:o}=n,a=Object.entries(n).filter(([t])=>t.startsWith("y")).map(([,t])=>t),l=Object.entries(n).filter(([t])=>t.startsWith("size")).map(([,t])=>t);if(void 0===i||void 0===a||void 0===l)throw Error("Missing encode for x or y or size channel.");let s=e.x,u=e.series,c=Array.from(t,e=>{let n=s.getBandWidth(s.invert(+i[e])),c=u?u.getBandWidth(u.invert(+(null==o?void 0:o[e]))):1,f=(+(null==o?void 0:o[e])||0)*n,p=+i[e]+f+n*c/2;return[...a.map((n,r)=>[p+ +l[r][e]/t.length,+a[r][e]]),...a.map((n,r)=>[p-+l[r][e]/t.length,+a[r][e]]).reverse()].map(t=>r.map(t))});return[t,c]};function xD(t){var e,n,r,i=t||1;function o(t,o){++e>i&&(r=n,a(1),++e),n[t]=o}function a(t){e=0,n=Object.create(null),t||(r=Object.create(null))}return a(),{clear:a,has:function(t){return void 0!==n[t]||void 0!==r[t]},get:function(t){var e=n[t];return void 0!==e?e:void 0!==(e=r[t])?(o(t,e),e):void 0},set:function(t,e){void 0!==n[t]?n[t]=e:o(t,e)}}}xR.props={defaultShape:"density",defaultLabelShape:"label",composite:!1,shape:xI,channels:[...nN({shapes:Object.keys(xI)}),{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:[...nD(),{type:s_},{type:sP}],postInference:[...nI()],interaction:{shareTooltip:!0}},xD(3);function xF(t,e,n){let r=t?t():document.createElement("canvas");return r.width=e,r.height=n,r}let xz=function(t,e=(...t)=>`${t[0]}`,n=16){let r=xD(n);return(...n)=>{let i=e(...n),o=r.get(i);return r.has(i)?r.get(i):(o=t(...n),r.set(i,o),o)}}((t,e,n)=>{let r=xF(n,2*t,2*t),i=r.getContext("2d");if(1===e)i.beginPath(),i.arc(t,t,t,0,2*Math.PI,!1),i.fillStyle="rgba(0,0,0,1)",i.fill();else{let n=i.createRadialGradient(t,t,t*e,t,t,t);n.addColorStop(0,"rgba(0,0,0,1)"),n.addColorStop(1,"rgba(0,0,0,0)"),i.fillStyle=n,i.fillRect(0,0,2*t,2*t)}return r},t=>`${t}`);var xB=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let xW=(t,e)=>{let{gradient:n,opacity:r,maxOpacity:i,minOpacity:o,blur:a,useGradientOpacity:l}=t,s=xB(t,["gradient","opacity","maxOpacity","minOpacity","blur","useGradientOpacity"]),{coordinate:u,createCanvas:c,document:f}=e;return(t,e,p)=>{var h,d;let{transform:y}=e,[g,v]=u.getSize(),m=t.map(t=>({x:t[0],y:t[1],value:t[2],radius:t[3]})),b=rV(t,t=>t[2]),x=rY(t,t=>t[2]);let O=g&&v?function(t,e,n,r,i,o,a){let l=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)"]]},o);l.minOpacity*=255,l.opacity*=255,l.maxOpacity*=255;let s=xF(a,t,e).getContext("2d"),u=function(t,e){var n;let r=xF(e,256,1).getContext("2d"),i=r.createLinearGradient(0,0,256,1);return("string"==typeof(n=t)?n.split(" ").map(t=>{let[e,n]=t.split(":");return[+e,n]}):n).forEach(([t,e])=>{i.addColorStop(t,e)}),r.fillStyle=i,r.fillRect(0,0,256,1),r.getImageData(0,0,256,1).data}(l.gradient,a);s.clearRect(0,0,t,e),!function(t,e,n,r,i,o){let{blur:a}=i,l=r.length;for(;l--;){let{x:i,y:s,value:u,radius:c}=r[l],f=Math.min(u,n),p=i-c,h=s-c,d=xz(c,1-a,o),y=(f-e)/(n-e);t.globalAlpha=Math.max(y,.001),t.drawImage(d,p,h)};}(s,n,r,i,l,a);let c=function(t,e,n,r,i){let{minOpacity:o,opacity:a,maxOpacity:l,useGradientOpacity:s}=i,u=t.getImageData(0,0,e,n),c=u.data,f=c.length;for(let t=3;t<f;t+=4){let e=c[t],n=4*e;if(!n)continue;let i=a||Math.max(0,Math.min(l,Math.max(o,e)));c[t-3]=r[n],c[t-2]=r[n+1],c[t-1]=r[n+2],c[t]=s?r[n+3]:i}return u}(s,t,e,u,l),f=xF(a,t,e).getContext("2d");return f.putImageData(c,0,0),f}(g,v,b,x,m,(h={gradient:n,opacity:r,minOpacity:o,maxOpacity:i,blur:a,useGradientOpacity:l},d=t=>void 0===t,Object.keys(h).reduce((t,e)=>{let n=h[e];return!d(n,e)&&(t[e]=n),t},{})),c):{canvas:null};return g_(f.createElement("image",{})).call(gH,p).style("x",0).style("y",0).style("width",g).style("height",v).style("src",O.canvas).style("transform",y).call(gH,s).node()}};xW.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let x$={heatmap:xW},xG=t=>(t,e,n,r)=>{let{x:i,y:o,size:a,color:l}=n;return[[0],[Array.from(t,t=>{let e=a?+a[t]:40;return[...r.map([+i[t],+o[t]]),l[t],e]})]]};xG.props={defaultShape:"heatmap",defaultLabelShape:"label",composite:!1,shape:x$,channels:[...nN({shapes:Object.keys(x$)}),{name:"x",required:!0},{name:"y",required:!0},{name:"color",scale:"identity",required:!0},{name:"size"}],preInference:[...nD(),{type:sP},{type:mW}],postInference:[...nL()]};let xV=()=>["#5B8FF9","#5AD8A6","#5D7092","#F6BD16","#6F5EF9","#6DC8EC","#945FB9","#FF9845","#1E9493","#FF99C3"];xV.props={};let xH=()=>["#5B8FF9","#CDDDFD","#5AD8A6","#CDF3E4","#5D7092","#CED4DE","#F6BD16","#FCEBB9","#6F5EF9","#D3CEFD","#6DC8EC","#D3EEF9","#945FB9","#DECFEA","#FF9845","#FFE0C7","#1E9493","#BBDEDE","#FF99C3","#FFE0ED"];xH.props={};let xU=t=>new oI(t);xU.props={};let xq=Symbol("defaultUnknown");function xY(t,e,n){for(let r=0;r<e.length;r+=1)!t.has(e[r])&&t.set(n(e[r]),r)}function xX(t){let{value:e,from:n,to:r,mapper:i,notFoundReturn:o}=t,a=i.get(e);if(void 0===a){if(o!==xq)return o;a=n.push(e)-1,i.set(e,a)}return r[a%r.length]}function xK(t){return t instanceof Date?t=>`${t}`:"object"==typeof t?t=>JSON.stringify(t):t=>t}class xZ extends of{getDefaultOptions(){return{domain:[],range:[],unknown:xq}}constructor(t){super(t)}map(t){return 0===this.domainIndexMap.size&&xY(this.domainIndexMap,this.getDomain(),this.domainKey),xX({value:this.domainKey(t),mapper:this.domainIndexMap,from:this.getDomain(),to:this.getRange(),notFoundReturn:this.options.unknown})}invert(t){return 0===this.rangeIndexMap.size&&xY(this.rangeIndexMap,this.getRange(),this.rangeKey),xX({value:this.rangeKey(t),mapper:this.rangeIndexMap,from:this.getRange(),to:this.getDomain(),notFoundReturn:this.options.unknown})}rescale(t){let[e]=this.options.domain,[n]=this.options.range;if(this.domainKey=xK(e),this.rangeKey=xK(n),!this.rangeIndexMap){this.rangeIndexMap=new Map,this.domainIndexMap=new Map;return}(!t||t.range)&&this.rangeIndexMap.clear(),(!t||t.domain||t.compare)&&(this.domainIndexMap.clear(),this.sortedDomain=void 0)}clone(){return new xZ(this.options)}getRange(){return this.options.range}getDomain(){if(this.sortedDomain)return this.sortedDomain;let{domain:t,compare:e}=this.options;return this.sortedDomain=e?[...t].sort(e):t,this.sortedDomain}}let xQ=t=>new xZ(t);function xJ({map:t,initKey:e},n){let r=e(n);return t.has(r)?t.get(r):n}xQ.props={};function x0(t){return"object"==typeof t?t.valueOf():t}class x1 extends Map{constructor(t){if(super(),this.map=new Map,this.initKey=x0,null!==t)for(let[e,n]of t)this.set(e,n)}get(t){return super.get(xJ({map:this.map,initKey:this.initKey},t))}has(t){return super.has(xJ({map:this.map,initKey:this.initKey},t))}set(t,e){return super.set(function({map:t,initKey:e},n){let r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}({map:this.map,initKey:this.initKey},t),e)}delete(t){return super.delete(function({map:t,initKey:e},n){let r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}({map:this.map,initKey:this.initKey},t))}}class x2 extends xZ{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,paddingInner:0,paddingOuter:0,padding:0,unknown:xq,flex:[]}}constructor(t){super(t)}clone(){return new x2(this.options)}getStep(t){return void 0===this.valueStep?1:"number"==typeof this.valueStep?this.valueStep:void 0===t?Array.from(this.valueStep.values())[0]:this.valueStep.get(t)}getBandWidth(t){return void 0===this.valueBandWidth?1:"number"==typeof this.valueBandWidth?this.valueBandWidth:void 0===t?Array.from(this.valueBandWidth.values())[0]:this.valueBandWidth.get(t)}getRange(){return this.adjustedRange}getPaddingInner(){let{padding:t,paddingInner:e}=this.options;return t>0?t:e}getPaddingOuter(){let{padding:t,paddingOuter:e}=this.options;return t>0?t:e}rescale(){super.rescale();let{align:t,domain:e,range:n,round:r,flex:i}=this.options,{adjustedRange:o,valueBandWidth:a,valueStep:l}=function(t){var e;let n,r;let{domain:i}=t,o=i.length;if(0===o)return{valueBandWidth:void 0,valueStep:void 0,adjustedRange:[]};if(null===(e=t.flex)||void 0===e?void 0:e.length)return function(t){let{domain:e,range:n,paddingOuter:r,paddingInner:i,flex:o,round:a,align:l}=t,s=e.length,u=function(t,e){let n=e-t.length;return n>0?[...t,...Array(n).fill(1)]:n<0?t.slice(0,e):t}(o,s),[c,f]=n,p=f-c,h=p/(2/s*r+1-1/s*i),d=h*i/s,y=h-s*d,g=function(t){let e=Math.min(...t);return t.map(t=>t/e)}(u),v=y/g.reduce((t,e)=>t+e),m=new x1(e.map((t,e)=>{let n=g[e]*v;return[t,a?Math.floor(n):n]})),b=new x1(e.map((t,e)=>{let n=g[e]*v+d;return[t,a?Math.floor(n):n]})),x=Array.from(b.values()).reduce((t,e)=>t+e),O=p-(x-x/s*i),w=c+O*l,E=a?Math.round(w):w,k=Array(s);for(let t=0;t<s;t+=1){k[t]=Math.round(1e12*E)/1e12;let n=e[t];E+=b.get(n)}return{valueBandWidth:m,valueStep:b,adjustedRange:k}}(t);let{range:a,paddingOuter:l,paddingInner:s,round:u,align:c}=t,f=a[0],p=a[1]-f;n=p/Math.max(1,2*l+(o-s)),u&&(n=Math.floor(n)),f+=(p-n*(o-s))*c,r=n*(1-s),u&&(f=Math.round(f),r=Math.round(r));let h=Array(o).fill(0).map((t,e)=>f+e*n);return{valueStep:n,valueBandWidth:r,adjustedRange:h}}({align:t,range:n,round:r,flex:i,paddingInner:this.getPaddingInner(),paddingOuter:this.getPaddingOuter(),domain:e});this.valueStep=l,this.valueBandWidth=a,this.adjustedRange=o}}let x5=t=>new x2(t);function x3(t){return 1e-14>Math.abs(t)?t:parseFloat(t.toFixed(14))}x5.props={};let x4=[1,5,2,2.5,4,3],x6=100*Number.EPSILON,x8=(t,e,n=5,r=!0,i=x4,o=[.25,.2,.5,.05])=>{let a=n<0?0:Math.round(n);if(Number.isNaN(t)||Number.isNaN(e)||"number"!=typeof t||"number"!=typeof e||!a)return[];if(e-t<1e-15||1===a)return[t];let l={score:-2,lmin:0,lmax:0,lstep:0},s=1;for(;s<1/0;){for(let n=0;n<i.length;n+=1){let h=i[n],d=function(t,e,n){let r=i7(e),i=i8(e,t);return 1-i/(r-1)-n+1}(h,i,s);if(o[0]*d+o[1]+o[2]+o[3]<l.score){s=1/0;break}let y=2;for(;y<1/0;){var u,c,f,p;let n=(u=y)>=(c=a)?2-(u-1)/(c-1):1;if(o[0]*d+o[1]+o[2]*n+o[3]<l.score)break;let g=Math.ceil(Math.log10((e-t)/(y+1)/s/h));for(;g<1/0;){let u=s*h*10**g,c=function(t,e,n){let r=e-t;return n>r?1-((n-r)/2)**2/(.1*r)**2:1}(t,e,u*(y-1));if(o[0]*d+o[1]*c+o[2]*n+o[3]<l.score)break;let v=Math.floor(e/u)*s-(y-1)*s,m=Math.ceil(t/u)*s;if(v<=m){let n=m-v;for(let c=0;c<=n;c+=1){;let n=u/s*(v+c),d=n+u*(y-1),g=function(t,e,n,r,i,o){var a;let l=i7(e),s=i8(e,t),u=0;let c=(r%(a=o)+a)%a;return(c<x6||o-c<x6)&&r<=0&&i>=0&&(u=1),1-s/(l-1)-n+u}(h,i,s,n,d,u);let m=(f=t,1-.5*(((p=e)-d)**2+(f-n)**2)/(.1*(p-f))**2),b=function(t,e,n,r,i,o){let a=(t-1)/(o-i),l=(e-1)/(Math.max(o,r)-Math.min(n,i));return 2-Math.max(a/l,l/a)}(y,a,t,e,n,d),x=o[0]*g+o[1]*m+o[2]*b+1*o[3];x>l.score&&(!r||n<=t&&d>=e)&&(l.lmin=n,l.lmax=d,l.lstep=u,l.score=x)}}g+=1}y+=1}}s+=1}let h=x3(l.lmax),d=x3(l.lmin),y=x3(l.lstep),g=Math.floor(Math.round((h-d)/y*1e12)/1e12)+1,v=Array(g);v[0]=x3(d);for(let t=1;t<g;t+=1)v[t]=x3(v[t-1]+y);return v};class x9 extends of{getDefaultOptions(){return{domain:[0,1],range:[0,1],tickCount:5,unknown:void 0,tickMethod:x8}}map(t){return oE(t)?t:this.options.unknown}invert(t){return this.map(t)}clone(){return new x9(this.options)}getTicks(){let{domain:t,tickCount:e,tickMethod:n}=this.options,[r,i]=t;return i2(r)&&i2(i)?n(r,i,e):[]}}let x7=t=>new x9(t);x7.props={};class Ot extends x2{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,padding:0,unknown:xq,paddingInner:1,paddingOuter:0}}constructor(t){super(t)}getPaddingInner(){return 1}clone(){return new Ot(this.options)}update(t){super.update(t)}getPaddingOuter(){return this.options.padding}}let Oe=t=>new Ot(t);Oe.props={};var On=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,Or="[^\\s]+",Oi=/\[([^]*?)\]/gm;function Oo(t,e){for(var n=[],r=0,i=t.length;r<i;r++)n.push(t[r].substr(0,e));return n}var Oa=function(t){return function(e,n){var r=n[t].map(function(t){return t.toLowerCase()}).indexOf(e.toLowerCase());return r>-1?r:null}};function Ol(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0;r<e.length;r++){var i=e[r];for(var o in i)t[o]=i[o]}return t}var Os=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],Ou=["January","February","March","April","May","June","July","August","September","October","November","December"],Oc=Oo(Ou,3),Of=Oo(Os,3),Op=Ol({},{dayNamesShort:Of,dayNames:Os,monthNamesShort:Oc,monthNames:Ou,amPm:["am","pm"],DoFn:function(t){return t+["th","st","nd","rd"][t%10>3?0:(t-t%10!=10?1:0)*t%10]}}),Oh=function(t,e){for(void 0===e&&(e=2),t=String(t);t.length<e;)t="0"+t;return t},Od={D:function(t){return String(t.getDate())},DD:function(t){return Oh(t.getDate())},Do:function(t,e){return e.DoFn(t.getDate())},d:function(t){return String(t.getDay())},dd:function(t){return Oh(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 Oh(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 Oh(String(t.getFullYear()),4).substr(2)},YYYY:function(t){return Oh(t.getFullYear(),4)},h:function(t){return String(t.getHours()%12||12)},hh:function(t){return Oh(t.getHours()%12||12)},H:function(t){return String(t.getHours())},HH:function(t){return Oh(t.getHours())},m:function(t){return String(t.getMinutes())},mm:function(t){return Oh(t.getMinutes())},s:function(t){return String(t.getSeconds())},ss:function(t){return Oh(t.getSeconds())},S:function(t){return String(Math.round(t.getMilliseconds()/100))},SS:function(t){return Oh(Math.round(t.getMilliseconds()/10),2)},SSS:function(t){return Oh(t.getMilliseconds(),3)},a:function(t,e){return 12>t.getHours()?e.amPm[0]:e.amPm[1]},A:function(t,e){return 12>t.getHours()?e.amPm[0].toUpperCase():e.amPm[1].toUpperCase()},ZZ:function(t){var e=t.getTimezoneOffset();return(e>0?"-":"+")+Oh(100*Math.floor(Math.abs(e)/60)+Math.abs(e)%60,4)},Z:function(t){var e=t.getTimezoneOffset();return(e>0?"-":"+")+Oh(Math.floor(Math.abs(e)/60),2)+":"+Oh(Math.abs(e)%60,2)}};Oa("monthNamesShort"),Oa("monthNames");var Oy={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"},Og=function(t,e,n){if(void 0===e&&(e=Oy.default),void 0===n&&(n={}),"number"==typeof t&&(t=new Date(t)),"[object Date]"!==Object.prototype.toString.call(t)||isNaN(t.getTime()))throw Error("Invalid Date pass to format");e=Oy[e]||e;var r=[];e=e.replace(Oi,function(t,e){return r.push(e),"@@@"});var i=Ol(Ol({},Op),n);return(e=e.replace(On,function(e){return Od[e](t,i)})).replace(/@@@/g,function(){return r.shift()})};let Ov=6e4,Om=36e5,Ob=864e5,Ox=6048e5,OO=2592e6,Ow=31536e6;function OE(t,e,n,r){let i=(t,e)=>{let i=t=>r(t)%e==0,o=e;for(;o&&!i(t);)n(t,-1),o-=1;return t},o=(t,n)=>{n&&i(t,n),e(t)},a=(t,e)=>{let r=new Date(+t-1);return o(r,e),n(r,e),o(r),r};return{ceil:a,floor:(t,e)=>{let n=new Date(+t);return o(n,e),n},range:(t,e,r,i)=>{let l=[],s=Math.floor(r),u=i?a(t,r):a(t);for(;u<e;n(u,s),o(u))l.push(new Date(+u));return l},duration:t}}let Ok=OE(1,t=>t,(t,e=1)=>{t.setTime(+t+e)},t=>t.getTime()),OM=OE(1e3,t=>{t.setMilliseconds(0)},(t,e=1)=>{t.setTime(+t+1e3*e)},t=>t.getSeconds()),OS=OE(Ov,t=>{t.setSeconds(0,0)},(t,e=1)=>{t.setTime(+t+Ov*e)},t=>t.getMinutes()),O_=OE(Om,t=>{t.setMinutes(0,0,0)},(t,e=1)=>{t.setTime(+t+Om*e)},t=>t.getHours()),OP=OE(Ob,t=>{t.setHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+Ob*e)},t=>t.getDate()-1),Oj=OE(OO,t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e=1)=>{let n=t.getMonth();t.setMonth(n+e)},t=>t.getMonth()),OA=OE(Ox,t=>{t.setDate(t.getDate()-t.getDay()%7),t.setHours(0,0,0,0)},(t,e=1)=>{t.setDate(t.getDate()+7*e)},t=>{let e=Oj.floor(t);return Math.floor((+new Date(+t)-+e)/Ox)}),OT={millisecond:Ok,second:OM,minute:OS,hour:O_,day:OP,week:OA,month:Oj,year:OE(Ow,t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e=1)=>{let n=t.getFullYear();t.setFullYear(n+e)},t=>t.getFullYear())},OC=OE(1,t=>t,(t,e=1)=>{t.setTime(+t+e)},t=>t.getTime()),ON=OE(1e3,t=>{t.setUTCMilliseconds(0)},(t,e=1)=>{t.setTime(+t+1e3*e)},t=>t.getUTCSeconds()),OL=OE(Ov,t=>{t.setUTCSeconds(0,0)},(t,e=1)=>{t.setTime(+t+Ov*e)},t=>t.getUTCMinutes()),OI=OE(Om,t=>{t.setUTCMinutes(0,0,0)},(t,e=1)=>{t.setTime(+t+Om*e)},t=>t.getUTCHours()),OR=OE(Ob,t=>{t.setUTCHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+Ob*e)},t=>t.getUTCDate()-1),OD=OE(OO,t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e=1)=>{let n=t.getUTCMonth();t.setUTCMonth(n+e)},t=>t.getUTCMonth()),OF=OE(Ox,t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7)%7),t.setUTCHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+Ox*e)},t=>{let e=OD.floor(t);return Math.floor((+new Date(+t)-+e)/Ox)}),Oz={millisecond:OC,second:ON,minute:OL,hour:OI,day:OR,week:OF,month:OD,year:OE(Ow,t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e=1)=>{let n=t.getUTCFullYear();t.setUTCFullYear(n+e)},t=>t.getUTCFullYear())};function OB(t,e,n,r,i){let o;let a=+t,l=+e,{tickIntervals:s,year:u,millisecond:c}=function(t){let{year:e,month:n,week:r,day:i,hour:o,minute:a,second:l,millisecond:s}=t?Oz:OT;return{tickIntervals:[[l,1],[l,5],[l,15],[l,30],[a,1],[a,5],[a,15],[a,30],[o,1],[o,3],[o,6],[o,12],[i,1],[i,2],[r,1],[n,1],[n,3],[e,1]],year:e,millisecond:s}}(i),f=([t,e])=>t.duration*e,p=r?(l-a)/r:n||5,h=r||(l-a)/p,d=s.length,y=od(s,h,0,d,f);if(y===d){let t=oP(a/u.duration,l/u.duration,p);o=[u,t]}else if(y){let[t,e]=h/f(s[y-1])<f(s[y])/h?s[y-1]:s[y],n=r?Math.ceil(r/t.duration):e;o=[t,n]}else o=[c,Math.max(oP(a,l,p),1)];return o}let OW=(t,e,n,r,i)=>{let o=t>e,a=o?e:t,l=o?t:e,[s,u]=OB(a,l,n,r,i),c=s.range(a,new Date(+l+1),u,!0);return o?c.reverse():c},O$=(t,e,n,r,i)=>{let o=t>e,a=o?e:t,l=o?t:e,[s,u]=OB(a,l,n,r,i),c=[s.floor(a,u),s.ceil(l,u)];return o?c.reverse():c};function OG(t){let e=t.getTimezoneOffset(),n=new Date(t);return n.setMinutes(n.getMinutes()+e,n.getSeconds(),n.getMilliseconds()),n}class OV extends oN{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:OW,interpolate:ob,mask:void 0,utc:!1}}chooseTransforms(){return[t=>+t,t=>new Date(t)]}chooseNice(){return O$}getTickMethodOptions(){let{domain:t,tickCount:e,tickInterval:n,utc:r}=this.options,i=t[0];return[i,t[t.length-1],e,n,r]}getFormatter(){let{mask:t,utc:e}=this.options,n=e?Oz:OT,r=e?OG:i9;return e=>Og(r(e),t||function(t,e){let{second:n,minute:r,hour:i,day:o,week:a,month:l,year:s}=e;if(n.floor(t)<t)return".SSS";if(r.floor(t)<t)return":ss";if(i.floor(t)<t)return"hh:mm";if(o.floor(t)<t)return"hh A";if(l.floor(t)<t)return a.floor(t)<t?"MMM DD":"ddd DD";return s.floor(t)<t?"MMMM":"YYYY"}(e,n))}clone(){return new OV(this.options)}}let OH=t=>new OV(t);OH.props={};let OU=t=>e=>-t(-e),Oq=(t,e)=>{let n=Math.log(t),r=t===Math.E?Math.log:10===t?Math.log10:2===t?Math.log2:t=>Math.log(t)/n;return e?OU(r):r},OY=(t,e)=>{let n=t===Math.E?Math.exp:e=>t**e;return e?OU(n):n},OX=(t,e,n,r=10)=>{let i=t<0,o=OY(r,i),a=Oq(r,i),l=e<t,s=l?e:t,u=l?t:e,c=a(s),f=a(u),p=[];if(!(r%1)&&f-c<n){if(c=Math.floor(c),f=Math.ceil(f),i)for(;c<=f;c+=1){let t=o(c);for(let e=r-1;e>=1;e-=1){let n=t*e;if(n>u)break;n>=s&&p.push(n)}}else for(;c<=f;c+=1){let t=o(c);for(let e=1;e<r;e+=1){let n=t*e;if(n>u)break;n>=s&&p.push(n)}}2*p.length<n&&(p=oL(s,u,n))}else{let t=-1===n?f-c:Math.min(f-c,n);p=oL(c,f,t).map(o)}return l?p.reverse():p},OK=(t,e,n,r)=>{let i=t<0,o=Oq(r,i),a=OY(r,i),l=t>e,s=l?e:t,u=l?t:e,c=[a(Math.floor(o(s))),a(Math.ceil(o(u)))];return l?c.reverse():c};class OZ extends oN{getDefaultOptions(){return{domain:[1,10],range:[0,1],base:10,interpolate:oO,tickMethod:OX,tickCount:5}}chooseNice(){return OK}getTickMethodOptions(){let{domain:t,tickCount:e,base:n}=this.options,r=t[0];return[r,t[t.length-1],e,n]}chooseTransforms(){let{base:t,domain:e}=this.options,n=e[0]<0;return[Oq(t,n),OY(t,n)]}clone(){return new OZ(this.options)}}let OQ=t=>new OZ(t);OQ.props={};let OJ=t=>e=>e<0?-((-e)**t):e**t,O0=t=>e=>e<0?-((-e)**(1/t)):e**(1/t),O1=t=>t<0?-Math.sqrt(-t):Math.sqrt(t);class O2 extends oN{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,exponent:2,interpolate:oO,tickMethod:oL,tickCount:5}}constructor(t){super(t)}chooseTransforms(){let{exponent:t}=this.options;if(1===t)return[i9,i9];let e=.5===t?O1:OJ(t);return[e,O0(t)]}clone(){return new O2(this.options)}}let O5=t=>new O2(t);O5.props={};class O3 extends O2{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:oO,tickMethod:oL,tickCount:5,exponent:.5}}constructor(t){super(t)}update(t){super.update(t)}clone(){return new O3(this.options)}}let O4=t=>new O3(t);O4.props={};class O6 extends of{getDefaultOptions(){return{domain:[.5],range:[0,1]}}constructor(t){super(t)}map(t){if(!oE(t))return this.options.unknown;let e=od(this.thresholds,t,0,this.n);return this.options.range[e]}invert(t){let{range:e}=this.options,n=e.indexOf(t),r=this.thresholds;return[r[n-1],r[n]]}clone(){return new O6(this.options)}rescale(){let{domain:t,range:e}=this.options;this.n=Math.min(t.length,e.length-1),this.thresholds=t}}let O8=t=>new O6(t);O8.props={};class O9 extends O6{getDefaultOptions(){return{domain:[],range:[],tickCount:5,unknown:void 0,tickMethod:x8}}constructor(t){super(t)}rescale(){let{domain:t,range:e}=this.options;this.n=e.length-1,this.thresholds=function(t,e,n=!1){!n&&t.sort((t,e)=>t-e);let r=[];for(let n=1;n<e;n+=1)r.push(function(t,e){let n=t.length;if(!n)return;if(n<2)return t[n-1];let r=(n-1)*e,i=Math.floor(r),o=t[i];return o+(t[i+1]-o)*(r-i)}(t,n/e));return r}(t,this.n+1,!1)}invert(t){let[e,n]=super.invert(t),{domain:r}=this.options,i=r[0],o=r[r.length-1];return void 0===e&&void 0===n?[e,n]:[e||i,n||o]}getThresholds(){return this.thresholds}clone(){return new O9(this.options)}getTicks(){let{tickCount:t,domain:e,tickMethod:n}=this.options,r=e.length-1,i=e[0];return n(i,e[r],t)}}let O7=t=>new O9(t);O7.props={};class wt extends O6{getDefaultOptions(){return{domain:[0,1],range:[.5],nice:!1,tickCount:5,tickMethod:x8}}constructor(t){super(t)}nice(){let{nice:t}=this.options;if(t){let[t,e,n]=this.getTickMethodOptions();this.options.domain=oj(t,e,n)}}getTicks(){let{tickMethod:t}=this.options,[e,n,r]=this.getTickMethodOptions();return t(e,n,r)}getTickMethodOptions(){let{domain:t,tickCount:e}=this.options,n=t[0];return[n,t[t.length-1],e]}rescale(){this.nice();let{range:t,domain:e}=this.options,[n,r]=e;this.n=t.length-1,this.thresholds=Array(this.n);for(let t=0;t<this.n;t+=1)this.thresholds[t]=((t+1)*r-(t-this.n)*n)/(this.n+1)}invert(t){let[e,n]=super.invert(t),[r,i]=this.options.domain;return void 0===e&&void 0===n?[e,n]:[e||r,n||i]}getThresholds(){return this.thresholds}clone(){return new wt(this.options)}}let we=t=>new wt(t);we.props={};let wn=t=>e=>{let n=t(e);return i2(n)?Math.round(n):n},wr=ea=class extends oI{getDefaultOptions(){return{domain:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolator:i9,tickMethod:oL,tickCount:5}}constructor(t){super(t)}clone(){return new ea(this.options)}};wr=ea=function(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var l=t.length-1;l>=0;l--)(i=t[l])&&(a=(o<3?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a}([(F=function(t){return[t(0),t(1)]},z=t=>{let[e,n]=t;return oh(ob(0,1),op(e,n))},t=>{t.prototype.rescale=function(){this.initRange(),this.nice();let[t]=this.chooseTransforms();this.composeOutput(t,this.chooseClamp(t))},t.prototype.initRange=function(){let{interpolator:t}=this.options;this.options.range=F(t)},t.prototype.composeOutput=function(t,e){let{domain:n,interpolator:r,round:i}=this.getOptions(),o=z(n.map(t)),a=i?wn(r):r;this.output=oh(a,o,e,t)},t.prototype.invert=void 0})],wr);let wi=t=>new wr(t);wi.props={};class wo extends of{getDefaultOptions(){return{range:[0],domain:[0,1],unknown:void 0,tickCount:5,tickMethod:oL}}map(t){let[e]=this.options.range;return void 0!==e?e:this.options.unknown}invert(t){let[e]=this.options.range;return t===e&&void 0!==e?this.options.domain:[]}getTicks(){let{tickMethod:t,domain:e,tickCount:n}=this.options,[r,i]=e;return i2(r)&&i2(i)?t(r,i,n):[]}clone(){return new wo(this.options)}}let wa=t=>new wo(t);function wl({colorDefault:t,colorBlack:e,colorWhite:n,colorStroke:r,colorBackground:i,padding1:o,padding2:a,padding3:l,alpha90:s,alpha65:u,alpha45:c,alpha25:f,alpha10:p,category10:h,category20:d,sizeDefault:y=1,padding:g="auto",margin:v=16}){return{padding:g,margin:v,size:y,color:t,category10:h,category20:d,enter:{duration:300,fill:"both",delay:0},update:{duration:300,fill:"both",delay:0},exit:{duration:300,fill:"both",delay:0},view:{viewFill:i,plotFill:"transparent",mainFill:"transparent",contentFill:"transparent"},line:{line:{fill:"",strokeOpacity:1,lineWidth:1,lineCap:"round"}},point:{point:{r:3,fillOpacity:.95,lineWidth:0},hollow:{r:3,strokeOpacity:.95,lineWidth:1},plus:{r:3,strokeOpacity:.95,lineWidth:3},diamond:{r:3,strokeOpacity:.95,lineWidth:1}},interval:{rect:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},area:{area:{fillOpacity:.85,lineWidth:0}},polygon:{polygon:{fillOpacity:.95}},cell:{cell:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},rect:{rect:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},link:{link:{fill:"",strokeOpacity:1}},vector:{vector:{fillOpacity:1}},box:{box:{fillOpacity:.95,stroke:e,lineWidth:1}},text:{text:{fill:"#1D2129",fontSize:12,strokeWidth:0,connectorStroke:r,connectorStrokeOpacity:.45,connectorLineWidth:1,backgroundFill:r,backgroundFillOpacity:.15,backgroundPadding:[2,4],startMarkerSymbol:"circle",startMarkerSize:4,endMarkerSymbol:"circle",endMarkerSize:4},badge:{fill:"#1D2129",fillOpacity:.65,strokeWidth:0,fontSize:10,textAlign:"center",textBaseline:"middle",markerFill:r,markerFillOpacity:.25,markerStrokeOpacity:0}},lineX:{line:{stroke:r,strokeOpacity:.45,lineWidth:1}},lineY:{line:{stroke:r,strokeOpacity:.45,lineWidth:1}},rangeX:{range:{fill:r,fillOpacity:.15,lineWidth:0}},rangeY:{range:{fill:r,fillOpacity:.15,lineWidth:0}},connector:{connector:{stroke:r,strokeOpacity:.45,lineWidth:1,connectLength1:12,endMarker:!0,endMarkerSize:6,endMarkerFill:r,endMarkerFillOpacity:.95}},axis:{arrow:!1,gridLineDash:[3,4],gridLineWidth:.5,gridStroke:e,gridStrokeOpacity:p,labelAlign:"horizontal",labelFill:e,labelOpacity:c,labelFontSize:12,labelFontWeight:"normal",labelSpacing:o,line:!1,lineLineWidth:.5,lineStroke:e,lineStrokeOpacity:c,tickLength:4,tickLineWidth:1,tickStroke:e,tickOpacity:c,titleFill:e,titleOpacity:s,titleFontSize:12,titleFontWeight:"normal",titleSpacing:12,titleTransformOrigin:"center",lineArrowOffset:6,lineArrowSize:6},axisTop:{gridDirection:"positive",labelDirection:"negative",tickDirection:"negative",titlePosition:"top",titleSpacing:12,labelSpacing:4,titleTextBaseline:"middle"},axisBottom:{gridDirection:"negative",labelDirection:"positive",tickDirection:"positive",titlePosition:"bottom",titleSpacing:12,labelSpacing:4,titleTextBaseline:"bottom"},axisLeft:{gridDirection:"positive",labelDirection:"negative",labelSpacing:4,tickDirection:"negative",titlePosition:"left",titleSpacing:12,titleTextBaseline:"middle",titleDirection:"vertical",titleTransformOrigin:"center"},axisRight:{gridDirection:"negative",labelDirection:"positive",labelSpacing:4,tickDirection:"positive",titlePosition:"right",titleSpacing:12,titleTextBaseline:"top",titleDirection:"vertical",titleTransformOrigin:"center"},axisLinear:{girdClosed:!0,gridConnect:"arc",gridDirection:"negative",gridType:"surround",titlePosition:"top",titleSpacing:0},axisArc:{title:!1,titlePosition:"inner",line:!1,tick:!0,labelSpacing:4},axisRadar:{girdClosed:!0,gridStrokeOpacity:.3,gridType:"surround",label:!1,tick:!1,titlePosition:"start"},legendCategory:{backgroundFill:"transparent",itemBackgroundFill:"transparent",itemLabelFill:e,itemLabelFillOpacity:s,itemLabelFontSize:12,itemLabelFontWeight:"normal",itemMarkerFillOpacity:1,itemMarkerSize:8,itemSpacing:[o,o],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:o,colPadding:a,maxRows:3,maxCols:3},legendContinuous:{handleHeight:12,handleLabelFill:e,handleLabelFillOpacity:c,handleLabelFontSize:12,handleLabelFontWeight:"normal",handleMarkerFill:e,handleMarkerFillOpacity:.6,handleMarkerLineWidth:1,handleMarkerStroke:e,handleMarkerStrokeOpacity:.25,handleWidth:10,labelFill:e,labelFillOpacity:c,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:s,tickStroke:e,tickStrokeOpacity:c},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:s,titleFontSize:16,titleFontWeight:"bold",titleTextBaseline:"top",subtitleFill:e,subtitleFillOpacity:u,subtitleFontSize:12,subtitleFontWeight:"normal",subtitleTextBaseline:"top"}}}wa.props={};let ws=wl({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}),wu=t=>nt({},ws,t);wu.props={};let wc=t=>nt({},wu(),{category10:"category10",category20:"category20"},t);wc.props={};let wf=wl({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}),wp=t=>nt({},wf,{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),wh=t=>Object.assign({},wp(),{category10:"category10",category20:"category20"},t);wh.props={};let wd=wl({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}),wy=t=>nt({},wd,{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:(t,e)=>0!==e},axisRight:{gridFilter:(t,e)=>0!==e},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);wy.props={};var wg=function(t){return null==t};function wv(t){if(!t)return{enter:!1,update:!1,exit:!1};var e=["enter","update","exit"],n=Object.fromEntries(Object.entries(t).filter(function(t){var n=ol(t,1)[0];return!e.includes(n)}));return Object.fromEntries(e.map(function(e){var r;if("boolean"!=typeof(r=t)&&"enter"in r&&"update"in r&&"exit"in r)return!1===t[e]?[e,!1]:[e,on(on({},t[e]),n)];return[e,n]}))}function wm(t,e){t?t.finished.then(e):e()}function wb(t,e){"update"in t?t.update(e):t.attr(e)}function wx(t,e,n){return 0===e.length?null:n?t.animate(e,n):(wb(t,{style:e.slice(-1)[0]}),null)}function wO(t,e,n){var r={},i={};return(Object.entries(e).forEach(function(e){var n=ol(e,2),o=n[0],a=n[1];if(!wg(a)){var l=t.style[o]||t.parsedStyle[o]||0;l!==a&&(r[o]=l,i[o]=a)}}),n)?wx(t,[r,i],on({fill:"both"},n)):(wb(t,i),null)}var ww=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)!function t(e,n,r,i){for(var o in r=r||0,i=i||5,n)if(function(t,e){if(Object.hasOwn)return Object.hasOwn(t,e);if(null==t)throw TypeError("Cannot convert undefined or null to object");return Object.prototype.hasOwnProperty.call(Object(t),e)}(n,o)){var a=n[o];null!==a&&mQ(a)?(!mQ(e[o])&&(e[o]={}),r<i?t(e[o],a,r+1,i):e[o]=n[o]):mJ(a)?(e[o]=[],e[o]=e[o].concat(a)):void 0!==a&&(e[o]=a)}}(t,e[r]);return t},wE=function(t,e){var n=function(t){return"".concat(e,"-").concat(t)},r=Object.fromEntries(Object.entries(t).map(function(t){var e=ol(t,2),r=e[0],i=n(e[1]);return[r,{name:i,class:".".concat(i),id:"#".concat(i),toString:function(){return i}}]}));return Object.assign(r,{prefix:n}),r},wk={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 yu({style:{path:[["M",10,10],["L",-10,0],["L",10,-10],["L",0,0],["L",10,10],["Z"]],anchor:"0.5 0.5",fill:"black",transformOrigin:"center"}})},labelAlign:"parallel",labelDirection:"positive",labelFontSize:12,labelSpacing:0,gridConnect:"line",gridControlAngles:[],gridDirection:"positive",gridLength:0,gridType:"segment",lineArrowOffset:15,lineArrowSize:10,tickDirection:"positive",tickLength:5,tickLineWidth:1,tickStroke:"black",labelOverlap:[]};ww({},wk,{style:{type:"arc"}}),ww({},wk,{style:{}});var wM=wE({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");function wS(t,e){return[t[0]*e,t[1]*e]}function w_(t,e){return[t[0]+e[0],t[1]+e[1]]}function wP(t,e){return[t[0]-e[0],t[1]-e[1]]}function wj(t,e){return[Math.min(t[0],e[0]),Math.min(t[1],e[1])]}function wA(t,e){return[Math.max(t[0],e[0]),Math.max(t[1],e[1])]}function wT(t,e){return Math.sqrt(Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2))}function wC(t){if(0===t[0]&&0===t[1])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 wN(t){return t*Math.PI/180}function wL(t){return Number((180*t/Math.PI).toPrecision(5))}function wI(t){return t.toString().charAt(0).toUpperCase()+t.toString().slice(1)}function wR(t,e,n){void 0===n&&(n=!0);var r,i,o=e||(null===(i=t.match(/^([a-z][a-z0-9]+)/))||void 0===i?void 0:i[0])||"",a=t.replace(new RegExp("^(".concat(o,")")),"");return n?(r=a).toString().charAt(0).toLowerCase()+r.toString().slice(1):a}var wD=function(t,e){if(!(null==t?void 0:t.startsWith(e)))return!1;var n=t[e.length];return n>="A"&&n<="Z"};function wF(t,e,n){void 0===n&&(n=!1);var r={};return Object.entries(t).forEach(function(t){var i,o=ol(t,2),a=o[0],l=o[1];if("className"===a||"class"===a);else if(wD(a,"show")&&wD(wR(a,"show"),e)!==n){;if(a===(i=e,"".concat("show").concat(wI(i))))r[a]=l;else r[a.replace(new RegExp(wI(e)),"")]=l}else if(!wD(a,"show")&&wD(a,e)!==n){var s=wR(a,e);"filter"===s&&"function"==typeof l||(r[s]=l)}}),r}function wz(t,e){return Object.entries(t).reduce(function(t,n){var r=ol(n,2),i=r[0],o=r[1];return i.startsWith("show")?t["show".concat(e).concat(i.slice(4))]=o:t["".concat(e).concat(wI(i))]=o,t},{})}function wB(t,e){void 0===e&&(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(t){var o=ol(t,2),a=o[0],l=o[1];e.includes(a)||(-1!==n.indexOf(a)?i[a]=l:r[a]=l)}),[r,i]}function wW(t,e){return mH(t)?t.apply(void 0,ou([],ol(e),!1)):t}function w$(t,e){return!t.style.opacity&&(t.style.opacity=1),wO(t,{opacity:0},e)}var wG=["$el","anchor","cx","cy","d","defX","defY","dx","dy","fill","fillOpacity","filter","fontFamily","fontSize","fontStyle","fontVariant","fontWeight","height","img","increasedLineWidthForHitTesting","innerHTML","isBillboard","billboardRotation","isSizeAttenuation","isClosed","isOverflowing","leading","letterSpacing","lineDash","lineHeight","lineWidth","markerEnd","markerEndOffset","markerMid","markerStart","markerStartOffset","maxLines","metrics","miterLimit","offsetX","offsetY","opacity","path","points","r","radius","rx","ry","shadowColor","src","stroke","strokeOpacity","text","textAlign","textBaseline","textDecorationColor","textDecorationLine","textDecorationStyle","textOverflow","textPath","textPathSide","textPathStartOffset","transform","transformOrigin","visibility","width","wordWrap","wordWrapWidth","x","x1","x2","y","y1","y2","z1","z2","zIndex"];function wV(t){var e,n={};for(var r in t){;if(e=r,wG.includes(e))n[r]=t[r]}return n}var wH=wE({lineGroup:"line-group",line:"line",regionGroup:"region-group",region:"region"},"grid");function wU(t){return t.reduce(function(t,e,n){return t.push(ou([0===n?"M":"L"],ol(e),!1)),t},[])}function wq(t,e,n){return"surround"===e.type?function(t,e,n){var r=e.connect,i=e.center;if("line"===(void 0===r?"line":r))return wU(t);if(!i)return[];var o=wT(t[0],i),a=n?0:1;return t.reduce(function(t,e,n){return 0===n?t.push(ou(["M"],ol(e),!1)):t.push(ou(["A",o,o,0,0,a],ol(e),!1)),t},[])}(t,e,n):wU(t)}var wY=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return oe(e,t),e.prototype.render=function(t,e){t.type,t.center,t.areaFill,t.closed;var n,r,i,o,a,l,s,u,c,f,p=or(t,["type","center","areaFill","closed"]);var h=(i=void 0===(r=(n=t).data)?[]:r,n.closed?i.map(function(t){var e=t.points,n=ol(e,1)[0];return on(on({},t),{points:ou(ou([],ol(e),!1),[n],!1)})}):i),d=m7(e).maybeAppendByClassName(wH.lineGroup,"g"),y=m7(e).maybeAppendByClassName(wH.regionGroup,"g");var g=(o=d,a=h,l=t,s=p,u=l.animate,c=l.isBillboard,f=a.map(function(t,e){return{id:t.id||"grid-line-".concat(e),path:wq(t.points,l)}}),o.selectAll(wH.line.class).data(f,function(t){return t.id}).join(function(t){return t.append("path").each(function(t,e){var n=wW(wV(on({path:t.path},s)),[t,e,f]);this.attr(on({class:wH.line.name,stroke:"#D9D9D9",lineWidth:1,lineDash:[4,4],isBillboard:c},n))})},function(t){return t.transition(function(t,e){return wO(this,wW(wV(on({path:t.path},s)),[t,e,f]),u.update)})},function(t){return t.transition(function(){var t=this,e=w$(this,u.exit);return wm(e,function(){return t.remove()}),e})}).transitions()),v=function(t,e,n){var r=n.animate,i=n.connect,o=n.areaFill;if(e.length<2||!o||!i)return[];for(var a=Array.isArray(o)?o:[o,"transparent"],l=[],s=0;s<e.length-1;s++){var u=ol([e[s].points,e[s+1].points],2),c=function(t,e,n){var r=n.type,i=n.connect,o=n.center,a=n.closed?[["Z"]]:[],l=ol([wq(t,n),wq(e.slice().reverse(),n,!0)],2),s=l[0],u=l[1],c=ol([t[0],e.slice(-1)[0]],2),f=c[0],p=c[1],h=function(t,e){return[s,t,u,e,a].flat()};if("line"===i||"surround"===r)return h([ou(["L"],ol(p),!1)],[ou(["L"],ol(f),!1)]);if(!o)throw Error("Arc grid need to specified center");var d=ol([wT(p,o),wT(f,o)],2),y=d[0],g=d[1];return h([ou(["A",y,y,0,0,1],ol(p),!1),ou(["L"],ol(p),!1)],[ou(["A",g,g,0,0,0],ol(f),!1),ou(["L"],ol(f),!1)])}(u[0],u[1],n);l.push({path:c,fill:a[s%a.length]})}return t.selectAll(wH.region.class).data(l,function(t,e){return e}).join(function(t){return t.append("path").each(function(t,e){var n=wW(t,[t,e,l]);this.attr(n)}).attr("className",wH.region.name)},function(t){return t.transition(function(t,e){return wO(this,wW(t,[t,e,l]),r.update)})},function(t){return t.transition(function(){var t=this,e=w$(this,r.exit);return wm(e,function(){return t.remove()}),e})}).transitions()}(y,h,t);return ou(ou([],ol(g),!1),ol(v),!1)},e}(m4),wX=function(t,e,n){for(var r=0,i=bi(e)?e.split("."):e;t&&r<i.length;)t=t[i[r++]];return void 0===t||r<i.length?n:t};function wK(t,e){var n,r,i,o,a,l,s,u,c,f;if("number"==typeof t&&"number"==typeof e){;return n=t,r=e,function(t){return n*(1-t)+r*t}}if(Array.isArray(t)&&Array.isArray(e)){;return i=t,a=(o=e)?o.length:0,l=i?Math.min(a,i.length):0,function(t){var e=Array(l),n=Array(a),r=0;for(r=0;r<l;++r)e[r]=wK(i[r],o[r]);for(;r<a;++r)n[r]=o[r];for(r=0;r<l;++r)n[r]=e[r](t);return n}}if("object"==typeof t&&"object"==typeof e){;return void 0===(s=t)&&(s={}),void 0===(u=e)&&(u={}),c={},f={},Object.entries(u).forEach(function(t){var e=ol(t,2),n=e[0],r=e[1];n in s?c[n]=wK(s[n],r):f[n]=r}),function(t){return Object.entries(c).forEach(function(e){var n=ol(e,2),r=n[0],i=n[1];return f[r]=i(t)}),f}}return function(e){return t}}var wZ=function(t){return mZ(t,"Number")};function wQ(t){return"function"==typeof t?t():bi(t)||wZ(t)?new m8({style:{text:String(t)}}):t}function wJ(t,e,n){void 0===n&&(n=!1);var r=t.getBBox(),i=e/Math.max(r.width,r.height);return n&&t.scale(i),i}function w0(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 w1(t,e){return Object.fromEntries(Object.entries(t).map(function(t){var n=ol(t,2);return[n[0],wW(n[1],e)]}))}function w2(t,e){return e&&mH(e)?t.filter(e):t}function w5(t,e){var n=e.startAngle;return(e.endAngle-n)*t+n}function w3(t,e){if("linear"===e.type){var n=ol(e.startPos,2),r=n[0],i=n[1],o=ol(e.endPos,2),a=ol([o[0]-r,o[1]-i],2);return wC([a[0],a[1]])}var l=wN(w5(t,e));return[-Math.sin(l),Math.cos(l)]}function w4(t,e,n){var r;return r=w3(t,n),"positive"!==e?[r[1],-r[0]]:[-r[1],r[0]]}function w6(t,e){return w4(t,e.labelDirection,e)}function w8(t,e){var n,r,i,o,a,l,s,u,c,f,p,h,d,y;if("linear"===e.type){;return n=t,o=(i=ol((r=e).startPos,2))[0],a=i[1],l=ol(r.endPos,2),s=ol([l[0]-o,l[1]-a],2),[o+s[0]*n,a+s[1]*n]}return u=t,f=(c=e).radius,h=(p=ol(c.center,2))[0],d=p[1],[h+f*Math.cos(y=wN(w5(u,c))),d+f*Math.sin(y)]}function w9(t){return 0===w3(0,t)[1]}function w7(t){return 0===w3(0,t)[0]}function Et(t,e){return e-t==360}function Ee(t,e,n,r,i){var o=e-t,a=ol([i,i],2),l=a[0],s=a[1],u=ol([wN(t),wN(e)],2),c=u[0],f=u[1],p=function(t){return[n+i*Math.cos(t),r+i*Math.sin(t)]},h=ol(p(c),2),d=h[0],y=h[1],g=ol(p(f),2),v=g[0],m=g[1];if(e-t==360){var b=ol(p((f+c)/2),2);return[["M",d,y],["A",l,s,0,1,0,b[0],b[1]],["A",l,s,0,1,0,v,m]]}var x=o>180?1:0,O=t>e?0:1;return"M".concat(d,",").concat(y,",A").concat(l,",").concat(s,",0,").concat(x,",").concat(O,",").concat(v,",").concat(m)}function En(t){var e=ol(t,2),n=ol(e[0],2),r=n[0],i=n[1],o=ol(e[1],2);return{x1:r,y1:i,x2:o[0],y2:o[1]}}function Er(t){var e=t.type,n=t.gridCenter;return"linear"===e?n:n||t.center}function Ei(t,e,n,r,i){return void 0===r&&(r=!0),void 0===i&&(i=!1),!!r&&t===e||!!i&&t===n||t>e&&t<n}var Eo=function(t,e,n){if(void 0===n&&(n=128),!mH(t))throw TypeError("Expected a function");var r=function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];var o=e?e.apply(this,n):n[0],a=r.cache;if(a.has(o))return a.get(o);var l=t.apply(this,n);return a.set(o,l),l};return r.cache=function(t){var e,n,r,i=t||1;function o(t,o){++e>i&&(r=n,a(1),++e),n[t]=o}function a(t){e=0,n=Object.create(null),t||(r=Object.create(null))}return a(),{clear:a,has:function(t){return void 0!==n[t]||void 0!==r[t]},get:function(t){var e=n[t];return void 0!==e?e:void 0!==(e=r[t])?(o(t,e),e):void 0},set:function(t,e){void 0!==n[t]?n[t]=e:o(t,e)}}}(n),r}(function(t,e){var n=e.fontSize,r=e.fontFamily,i=e.fontWeight,o=e.fontStyle,a=e.fontVariant;return es?es(t,n):(!el&&(el=dX.offscreenCanvasCreator.getOrCreateContext(void 0)),el.font=[o,a,i,"".concat(n,"px"),r].join(" "),el.measureText(t).width)},function(t,e){return[t,Object.values(e||Ea(t)).join()].join("")},4096),Ea=function(t){var e=t.style.fontFamily||"sans-serif",n=t.style.fontWeight||"normal",r=t.style.fontStyle||"normal",i=t.style.fontVariant,o=t.style.fontSize;return{fontSize:o="object"==typeof o?o.value:o,fontFamily:e,fontWeight:n,fontStyle:r,fontVariant:i}};function El(t){return"text"===t.nodeName?t:"g"===t.nodeName&&1===t.children.length&&"text"===t.children[0].nodeName?t.children[0]:null}function Es(t,e){var n=El(t);n&&n.attr(e)}function Eu(t,e,n){void 0===n&&(n="..."),Es(t,{wordWrap:!0,wordWrapWidth:e,maxLines:1,textOverflow:n})}function Ec(t,e){if(e)try{var n=e.replace(/translate\(([+-]*[\d]+[%]*),[ ]*([+-]*[\d]+[%]*)\)/g,function(e,n,r){var i,o,a,l,s,u,c;return"translate(".concat((i=t,o=n,a=r,s=(l=i.getBBox()).width,u=l.height,[(c=ol([o,a].map(function(t,e){var n;return t.includes("%")?parseFloat((null===(n=t.match(/[+-]?([0-9]*[.])?[0-9]+/))||void 0===n?void 0:n[0])||"0")/100*(0===e?s:u):t}),2))[0],c[1]]),")")});t.attr("transform",n)}catch(t){}}var Ef=function(t){return void 0!==t&&null!=t&&!Number.isNaN(t)};function Ep(t){if(wZ(t))return[t,t,t,t];if(mJ(t)){var e=t.length;if(1===e)return[t[0],t[0],t[0],t[0]];if(2===e)return[t[0],t[1],t[0],t[1]];if(3===e)return[t[0],t[1],t[2],t[1]];if(4===e)return t}return[0,0,0,0]}var Eh=function(){function t(t,e,n,r){this.set(t,e,n,r)}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(t,e,n){var r=this.x1,i=this.y1,o=this.x2,a=this.y2,l=Math.cos(t),s=Math.sin(t),u=e-e*l+n*s,c=n-e*s-n*l;return[[l*r-s*a+u,s*r+l*a+c],[l*o-s*a+u,s*o+l*a+c],[l*r-s*i+u,s*r+l*i+c],[l*o-s*i+u,s*o+l*i+c]]},t.prototype.set=function(t,e,n,r){return n<t?(this.x2=t,this.x1=n):(this.x1=t,this.x2=n),r<e?(this.y2=e,this.y1=r):(this.y1=e,this.y2=r),this},t.prototype.defined=function(t){return this[t]!==Number.MAX_VALUE&&this[t]!==-Number.MAX_VALUE},t}();function Ed(t,e){var n=t.getEulerAngles()||0;t.setEulerAngles(0);var r=t.getLocalBounds(),i=ol(r.min,2),o=i[0],a=i[1],l=ol(r.max,2),s=l[0],u=l[1],c=Ey(t),f=c.width,p=c.height,h=0,d=0,y=o,g=a,v=El(t);if(v){p-=1.5;var m=v.style.textAlign,b=v.style.textBaseline;"center"===m?y=(o+s)/2:("right"===m||"end"===m)&&(y=s),"middle"===b?g=(a+u)/2:"bottom"===b&&(g=u)}var x=ol(Ep(e),4),O=x[0],w=void 0===O?0:O,E=x[1],k=void 0===E?0:E,M=x[2],S=x[3],_=new Eh((h+=o)-(void 0===S?k:S),(d+=a)-w,h+f+k,d+p+(void 0===M?w:M));return t.setEulerAngles(n),_.rotatedPoints(wN(n),y,g)}function Ey(t){return t.__bbox__?t.__bbox__:t.getBBox()}function Eg(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 Ev(t,e,n){var r=(e[1]-t[1])*(n[0]-e[0])-(e[0]-t[0])*(n[1]-e[1]);return 0===r?0:r<0?2:1}function Em(t,e,n){var r,i,o=e.crossPadding,a=new Set,l=null,s=function(t,e){var n=t.type,r=t.labelDirection,i=t.crossSize;if(!i)return!1;if("arc"===n){var o=t.center,a=t.radius,l=ol(o,2),s=l[0],u=l[1],c="negative"===r?0:i,f=-a-c,p=a+c,h=ol(Ep(e),4),d=h[0],y=h[1],g=h[2];return new Eh(s+f-h[3],u+f-d,s+p+y,u+p+g)}var v=ol(t.startPos,2),m=v[0],b=v[1],x=ol(t.endPos,2),O=x[0],w=x[1],E=ol(w7(t)?[-e,0,e,0]:[0,e,0,-e],4),k=E[0],M=E[1],S=E[2],_=E[3],P=wS(w6(0,t),i),j=new Eh(m,b,O,w);return j.x1+=_,j.y1+=k,j.x2+=M+P[0],j.y2+=S+P[1],j}(e,o);try{for(var u=oa(t),c=u.next();!c.done;c=u.next()){var f,p,h=c.value;if(!function(t){if(s){var e,n,r,i,o,a,l,u,c;return e=s,n=t,i=e.x1,o=e.x2,a=e.y1,l=e.y2,u=Ed(n,void 0),c=[[i,a],[o,a],[o,l],[i,l]],u.every(function(t){return function(t,e){var n=t.length;if(n<3)return!1;var r=[e,[9999,e[1]]],i=0,o=0;do{var a=[t[o],t[(o+1)%n]];if(function(t,e){var n=Ev(t[0],t[1],e[0]),r=Ev(t[0],t[1],e[1]),i=Ev(e[0],e[1],t[0]),o=Ev(e[0],e[1],t[1]);return!!(n!==r&&i!==o||0===n&&Eg(t,e[0])||0===r&&Eg(t,e[1])||0===i&&Eg(e,t[0])||0===o&&Eg(e,t[1]))||!1}(a,r)){if(0===Ev(a[0],e,a[1]))return Eg(a,e);i++}o=(o+1)%n}while(0!==o);return!!(1&i)}(c,t)})}return!0}(h))a.add(h);else{;if(l&&(f=l,p=h,f?function(t,e,n){var r,i,o=Ed(t,n).flat(1),a=Ed(e,n).flat(1),l=[[o[0],o[1],o[2],o[3]],[o[0],o[1],o[4],o[5]],[o[4],o[5],o[6],o[7]],[o[2],o[3],o[6],o[7]]];try{for(var s=oa(l),u=s.next();!u.done;u=s.next()){var c=u.value;if(function(t,e){return[[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]]].some(function(t){return function(t,e){var n=ol(t,4),r=n[0],i=n[1],o=n[2],a=n[3],l=ol(e,4),s=l[0],u=l[1],c=l[2],f=l[3],p=o-r,h=a-i,d=c-s,y=f-u,g=p*y-d*h;if(0===g)return!1;var v=g>0,m=r-s,b=i-u,x=p*b-h*m;if(x<0===v)return!1;var O=d*b-y*m;return O<0!==v&&x>g!==v&&O>g!==v&&!0}(e,t)})}(a,c))return!0}}catch(t){r={error:t}}finally{try{u&&!u.done&&(i=s.return)&&i.call(s)}finally{if(r)throw r.error}}return!1}(f,p,Ep(n)):0))a.add(l),a.add(h);else l=h}}}catch(t){r={error:t}}finally{try{c&&!c.done&&(i=u.return)&&i.call(u)}finally{if(r)throw r.error}}return Array.from(a)}function Eb(t,e){return(void 0===e&&(e={}),wg(t))?0:"number"==typeof t?t:Math.floor(Eo(t,e))}function Ex(t){var e=t.getLocalBounds(),n=ol([e.min,e.max],2),r=ol(n[0],2),i=r[0],o=r[1],a=ol(n[1],2),l=a[0],s=a[1];return{x:i,y:o,width:l-i,height:s-o,left:i,bottom:s,top:o,right:l}}function EO(t,e){var n=ol(t,2),r=n[0],i=n[1],o=ol(e,2),a=o[0],l=o[1];return r!==a&&i===l}var Ew={parity:function(t,e){var n=e.seq,r=void 0===n?2:n;return t.filter(function(t,e){return!(e%r)||(mq(t),!1)})}},EE=new Map([["hide",function(t,e,n,r){var i,o,a=t.length,l=e.keepHeader,s=e.keepTail;if(!(a<=1)&&(2!==a||!l||!s)){var u=Ew.parity,c=function(t){return t.forEach(r.show),t},f=2,p=t.slice(),h=t.slice(),d=Math.min.apply(Math,ou([1],ol(t.map(function(t){return Ey(t).width})),!1));if("linear"===n.type&&(w9(n)||w7(n))){var y=Ex(t[0]).left,g=Math.abs(Ex(t[a-1]).right-y)||1;f=Math.max(Math.floor(a*d/g),f)}for(l&&(i=p.splice(0,1)[0]),s&&(o=p.splice(-1,1)[0],p.reverse()),c(p);f<t.length&&Em((o?ou(ou([o],ol(h),!1),[i],!1):ou([i],ol(h),!1)).filter(Ef),n,null==e?void 0:e.margin).length;){if(o&&!i&&f%2==0){var v=p.splice(0,1);v.forEach(r.hide)}else if(o&&i){var v=p.splice(0,1);v.forEach(r.hide)}h=u(c(p),{seq:f}),f++}}}],["rotate",function(t,e,n,r){var i,o,a=e.optionalAngles,l=e.margin,s=e.recoverWhenFailed,u=t.map(function(t){return t.getLocalEulerAngles()}),c=function(e){return t.forEach(function(t,n){var i=Array.isArray(e)?e[n]:e;r.rotate(t,+i)})};try{for(var f=oa(void 0===a?[0,45,90]:a),p=f.next();!p.done;p=f.next()){var h=p.value;if(c(h),Em(t,n,l).length<1)return}}catch(t){i={error:t}}finally{try{p&&!p.done&&(o=f.return)&&o.call(f)}finally{if(i)throw i.error}}(void 0===s||s)&&c(u)}],["ellipsis",function(t,e,n,r){if(!(t.length<=1)){var i=e.suffix,o=void 0===i?"...":i,a=e.minLength,l=e.maxLength,s=void 0===l?1/0:l,u=e.step,c=e.margin,f=void 0===c?[0,0,0,0]:c,p=Ea(r.getTextShape(t[0])),h=Eb(void 0===u?" ":u,p),d=a?Eb(a,p):h,y=Eb(s,p);(wg(y)||y===1/0)&&(y=Math.max.apply(null,t.map(function(t){return Ey(t).width})));var g=t.slice(),v=ol(f,4);v[0],v[1],v[2],v[3];for(var m=function(e){if(g.forEach(function(t){r.ellipsis(r.getTextShape(t),e,o)}),(g=Em(t,n,f)).length<1)return{value:void 0}},b=y;b>d+h;b-=h){var x=m(b);if("object"==typeof x)return x.value}}}],["wrap",function(t,e,n,r){var i,o,a,l=e.wordWrapWidth,s=void 0===l?50:l,u=e.maxLines,c=void 0===u?3:u,f=e.recoverWhenFailed,p=e.margin,h=void 0===p?[0,0,0,0]:p,d=t.map(function(t){return t.attr("maxLines")||1}),y=Math.min.apply(Math,ou([],ol(d),!1));var g=(o=(i=n).type,a=i.labelDirection,"linear"===o&&w9(i)?"negative"===a?"bottom":"top":"middle"),v=function(e){return t.forEach(function(t,n){var i=Array.isArray(e)?e[n]:e;r.wrap(t,s,i,g)})};if(!(y>c)){for(var m=y;m<=c;m++)if(v(m),Em(t,n,h).length<1)return;(void 0===f||f)&&v(d)}}]]);function Ek(t){for(var e=t;e<0;)e+=360;return Math.round(e%360)}function EM(t,e){var n=ol(t,2),r=n[0],i=n[1],o=ol(e,2),a=o[0],l=o[1],s=ol([r*a+i*l,r*l-i*a],2),u=s[0];return Math.atan2(s[1],u)}function ES(t,e,n){var r=n.type,i=n.labelAlign,o=w6(t,n),a=Ek(e),l=Ek(wL(EM([1,0],o))),s="center",u="middle";return"linear"===r?[90,270].includes(l)&&0===a?(s="center",u=1===o[1]?"top":"bottom"):!(l%180)&&[90,270].includes(a)?s="center":0===l?Ei(a,0,90,!1,!0)?s="start":(Ei(a,0,90)||Ei(a,270,360))&&(s="start"):90===l?Ei(a,0,90,!1,!0)?s="start":(Ei(a,90,180)||Ei(a,270,360))&&(s="end"):270===l?Ei(a,0,90,!1,!0)?s="end":(Ei(a,90,180)||Ei(a,270,360))&&(s="start"):180===l&&(90===a?s="start":(Ei(a,0,90)||Ei(a,270,360))&&(s="end")):"parallel"===i?u=Ei(l,0,180,!0)?"top":"bottom":"horizontal"===i?Ei(l,90,270,!1)?s="end":(Ei(l,270,360,!1)||Ei(l,0,90))&&(s="start"):"perpendicular"===i&&(s=Ei(l,90,270)?"end":"start"),{textAlign:s,textBaseline:u}}function E_(t,e,n){var r=n.showTick,i=n.tickLength,o=n.tickDirection,a=n.labelDirection,l=n.labelSpacing,s=e.indexOf(t),u=wW(l,[t,s,e]),c=ol([w6(t.value,n),function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t.reduce(function(t,e){return t*("positive"===e?-1:1)},1)}(a,o)],2),f=ol(w_(wS(c[0],u+(1===c[1]?wW(r?i:0,[t,s,e]):0)),w8(t.value,n)),2);return{x:f[0],y:f[1]}}function EP(t,e){"text"===t.nodeName&&t.attr(e)}function Ej(t){var e,n,r,i,o;e=this.node().childNodes,n=t,r={hide:mq,show:mU,rotate:function(e,n){!function(t,e,n){e.setLocalEulerAngles(t);var r=ES(e.__data__.value,t,n),i=e.querySelector(wM.labelItem.class);i&&EP(i,r)}(+n,e,t)},ellipsis:function(t,e,n){t&&Eu(t,e||1/0,n)},wrap:function(t,e,n){var r,i,o,a;t&&(r=t,i=e,void 0===(o=n)&&(o=2),void 0===a&&(a="top"),Es(r,{wordWrap:!0,wordWrapWidth:i,maxLines:o,textBaseline:a}))},getTextShape:function(t){return t.querySelector("text")}},!(o=void 0===(i=n.labelOverlap)?[]:i).length||o.forEach(function(t){var i,o,a,l=t.type,s=EE.get(l);if(i=e,o=n,a=l,!(o.labelOverlap.length<1)&&("hide"===a?!function(t){for(var e=t;e;){if("offscreen"===e.className)return!0;e=e.parent}return!1}(i[0]):"rotate"===a?!i.some(function(t){var e;return!!(null===(e=t.attr("transform"))||void 0===e?void 0:e.includes("rotate"))}):"ellipsis"!==a&&"wrap"!==a||i.filter(function(t){return t.querySelector("text")}).length>1))null==s||s(e,t,n,r)})}function EA(t,e,n,r,i){var o,a,l,s,u,c=n.indexOf(e);var f=m7(t).append((o=e,a=c,l=n,mH(u=(s=i).labelFormatter)?function(){return wQ(wW(u,[o,a,l,w6(o.value,s)]))}:function(){return wQ(o.label||"")})).attr("className",wM.labelItem.name).node(),p=ol(wB(w1(r,[e,c,n])),2),h=p[0],d=p[1],y=d.transform,g=or(d,["transform"]);Ec(t,y);var v=function(t,e,n){var r,i,o=n.labelAlign;if(null===(i=e.style.transform)||void 0===i?void 0:i.includes("rotate"))return e.getLocalEulerAngles();var a=0,l=w6(t.value,n),s=w3(t.value,n);if("horizontal"===o)return 0;return!Ei(r=(wL(a="perpendicular"===o?EM([1,0],l):EM([s[0]<0?-1:1,0],s))+360)%180,-90,90)&&(r+=180),r}(e,t,i);return t.setLocalEulerAngles(+v),EP(f,on(on({},ES(e.value,v,i)),h)),Ec(t,y),t.attr(g),f}function ET(t,e){return w4(t,e.tickDirection,e)}function EC(t,e,n,r,i,o){var a,l,s,u,c,f,p,h,d,y,g,v,m,b,x,O,w,E,k,M,S,_,P,j,A,T,C,N,L,I,R,D,F,z,B,W,$,G=(a=m7(this),l=t,s=e,u=n,f=(c=r).tickFormatter,p=ET(l.value,c),h="line",mH(f)&&(h=function(){return wW(f,[l,s,u,p])}),a.append(h).attr("className",wM.tickItem.name));d=t,y=e,g=n,v=G,m=this,b=r,x=i,O=ET(d.value,b),R=(I=(w=d,E=y,k=g,M=O,S=b.tickLength,A=ol((_=M,P=wW(S,[w,E,k]),[[0,0],[(j=ol(_,2))[0]*P,j[1]*P]]),2),C=(T=ol(A[0],2))[0],N=T[1],{x1:C,x2:(L=ol(A[1],2))[0],y1:N,y2:L[1]})).x1,D=I.x2,F=I.y1,z=I.y2,W=(B=ol(wB(w1(x,[d,y,g,O])),2))[0],$=B[1],"line"===v.node().nodeName&&v.styles(on({x1:R,x2:D,y1:F,y2:z},W)),m.attr($),v.styles(W);var V=ol(w8(t.value,r),2);return wO(this,{x:V[0],y:V[1]},o)}var EN=function(){function t(t,e,n,r){void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=0),void 0===r&&(r=0),this.x=0,this.y=0,this.width=0,this.height=0,this.x=t,this.y=e,this.width=n,this.height=r}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(t,e){return t>=this.left&&t<=this.right&&e>=this.top&&e<=this.bottom},t}(),EL=wE({text:"text"},"title");function EI(t){return/\S+-\S+/g.test(t)?t.split("-").map(function(t){return t[0]}):t.length>2?[t[0]]:t.split("")}function ER(t,e){var n=Object.entries(e).reduce(function(e,n){var r=ol(n,2),i=r[0],o=r[1];return!t.node().attr(i)&&(e[i]=o),e},{});t.styles(n)}var ED=function(t){function e(e){return t.call(this,e,{text:"",width:0,height:0,fill:"#4a505a",fontWeight:"bold",fontSize:12,fontFamily:"sans-serif",inset:0,spacing:0,position:"top-left"})||this}return oe(e,t),e.prototype.getAvailableSpace=function(){var t=this.attributes,e=t.width,n=t.height,r=t.position,i=t.spacing,o=t.inset,a=this.querySelector(EL.text.class);if(!a)return new EN(0,0,+e,+n);var l=a.getBBox(),s=l.width,u=l.height,c=ol(Ep(i),4),f=c[0],p=c[1],h=c[2],d=c[3],y=ol([0,0,+e,+n],4),g=y[0],v=y[1],m=y[2],b=y[3],x=EI(r);if(x.includes("i"))return new EN(g,v,m,b);x.forEach(function(t,r){var i,o;"t"===t&&(v=(i=ol(0===r?[u+h,+n-u-h]:[0,+n],2))[0],b=i[1]),"r"===t&&(m=ol([+e-s-d],1)[0]),"b"===t&&(b=ol([+n-u-f],1)[0]),"l"===t&&(g=(o=ol(0===r?[s+p,+e-s-p]:[0,+e],2))[0],m=o[1])});var O=ol(Ep(o),4),w=O[0],E=O[1],k=O[2],M=O[3],S=ol([M+E,w+k],2),_=S[0],P=S[1];return new EN(g+M,v+w,m-_,b-P)},e.prototype.getBBox=function(){return this.title?this.title.getBBox():new EN(0,0,0,0)},e.prototype.render=function(t,e){var n,r,i,o,a,l,s,u,c,f,p,h,d,y,g,v=this;t.width,t.height,t.position,t.spacing;var m=or(t,["width","height","position","spacing"]),b=ol(wB(m),1)[0];var x=(l=(n=t).width,s=n.height,u=n.position,c=ol([+l/2,+s/2],2),p=(f=ol([+c[0],+c[1],"center","middle"],4))[0],h=f[1],d=f[2],y=f[3],(g=EI(u)).includes("l")&&(p=(r=ol([0,"start"],2))[0],d=r[1]),g.includes("r")&&(p=(i=ol([+l,"end"],2))[0],d=i[1]),g.includes("t")&&(h=(o=ol([0,"top"],2))[0],y=o[1]),g.includes("b")&&(h=(a=ol([+s,"bottom"],2))[0],y=a[1]),{x:p,y:h,textAlign:d,textBaseline:y}),O=x.x,w=x.y,E=x.textAlign,k=x.textBaseline;m6(!!m.text,m7(e),function(t){v.title=t.maybeAppendByClassName(EL.text,"text").styles(b).call(ER,{x:O,y:w,textAlign:E,textBaseline:k}).node()})},e}(m4);function EF(t,e,n,r,i){var o=ol(wB(wF(r,"title")),2),a=o[0],l=o[1],s=l.transform,u=or(l,["transform"]);t.styles(a),e.styles(u);var c=s||function(t,e,n){var r=t.cloneNode(!0);r.style.transform="scale(1, 1)",r.style.transform="none";var i=r.getBBox().height;if("vertical"===e){if("left"===n)return"rotate(-90) translate(0, ".concat(i/2,")");if("right"===n)return"rotate(-90) translate(0, -".concat(i/2,")")}return""}(t.node(),a.direction,a.position);Ec(t.node(),c);var f=function(t,e,n){var r=n.titlePosition,i=void 0===r?"lb":r,o=n.titleSpacing,a=EI(i),l=t.node().getLocalBounds(),s=ol(l.min,2),u=s[0],c=s[1],f=ol(l.halfExtents,2),p=f[0],h=f[1],d=ol(e.node().getLocalBounds().halfExtents,2),y=d[0],g=d[1],v=ol([u+p,c+h],2),m=v[0],b=v[1],x=ol(Ep(o),4),O=x[0],w=x[1],E=x[2],k=x[3];if(["start","end"].includes(i)&&"linear"===n.type){var M=n.startPos,S=n.endPos,_=ol("start"===i?[M,S]:[S,M],2),P=_[0],j=_[1],A=ol(wS(wC([-j[0]+P[0],-j[1]+P[1]]),O),2),T=A[0],C=A[1];return{x:P[0]+T,y:P[1]+C}}return a.includes("t")&&(b-=h+g+O),a.includes("r")&&(m+=p+y+w),a.includes("l")&&(m-=p+2*y+k),a.includes("b")&&(b+=h+2*g+E),{x:m,y:b}}(m7(n._offscreen||n.querySelector(wM.mainGroup.class)),e,r),p=f.x,h=f.y,d=wO(e.node(),{x:p,y:h},i);return Ec(t.node(),c),d}function Ez(t,e,n,r){var i=t.showLine,o=t.showTick,a=t.showLabel,l=m6(i,e.maybeAppendByClassName(wM.lineGroup,"g"),function(e){return function(t,e,n){var r,i,o,a,l,s,u,c,f,p=e.type,h=wF(e,"line");if("linear"===p)f=function(t,e,n,r){var i,o,a,l,s,u,c,f,p,h,d,y,g,v,m,b,x,O,w,E,k,M,S=e.showTrunc,_=e.startPos,P=e.endPos,j=e.truncRange,A=e.lineExtension,T=ol([_,P],2),C=ol(T[0],2),N=C[0],L=C[1],I=ol(T[1],2),R=I[0],D=I[1];var F=ol(A?(i=_,o=P,void 0===(a=A)&&(a=[0,0]),l=ol([i,o,a],3),u=(s=ol(l[0],2))[0],c=s[1],p=(f=ol(l[1],2))[0],h=f[1],y=(d=ol(l[2],2))[0],g=d[1],m=(v=ol([p-u,h-c],2))[0],w=(O=ol([-y/(x=Math.sqrt(Math.pow(m,2)+Math.pow(b=v[1],2))),g/x],2))[0],[w*m,w*b,(E=O[1])*m,E*b]):[,,,,].fill(0),4),z=F[0],B=F[1],W=F[2],$=F[3],G=function(e){return t.selectAll(wM.line.class).data(e,function(t,e){return e}).join(function(t){return t.append("line").attr("className",function(t){return"".concat(wM.line.name," ").concat(t.className)}).styles(n).transition(function(t){return wO(this,En(t.line),!1)})},function(t){return t.styles(n).transition(function(t){return wO(this,En(t.line),r.update)})},function(t){return t.remove()}).transitions()};if(!S||!j)return G([{line:[[N+z,L+B],[R+W,D+$]],className:wM.line.name}]);var V=ol(j,2),H=V[0],U=V[1],q=R-N,Y=D-L,X=ol([N+q*H,L+Y*H],2),K=X[0],Z=X[1],Q=ol([N+q*U,L+Y*U],2),J=Q[0],tt=Q[1],te=G([{line:[[N+z,L+B],[K,Z]],className:wM.lineFirst.name},{line:[[J,tt],[R+W,D+$]],className:wM.lineSecond.name}]);return k=0,(M=e).truncRange,M.truncShape,M.lineExtension,te}(t,e,w0(h,"arrow"),n);else{;r=t,i=e,o=w0(h,"arrow"),a=n,l=i.startAngle,s=i.endAngle,u=i.center,c=i.radius,f=r.selectAll(wM.line.class).data([{path:Ee.apply(void 0,ou(ou([l,s],ol(u),!1),[c],!1))}],function(t,e){return e}).join(function(t){return t.append("path").attr("className",wM.line.name).styles(i).styles({path:function(t){return t.path}})},function(t){return t.transition(function(){var t,e,n,r,i,o,f=this;var p=function(t,e,n,r){if(!r)return t.attr("__keyframe_data__",n),null;var i=r.duration,o=wK(e,n),a=Array(Math.ceil(+(void 0===i?0:i)/16)).fill(0).map(function(t,e,n){return{__keyframe_data__:o(e/(n.length-1))}});return t.animate(a,on({fill:"both"},r))}(this,(t=this,n=(e=t.attributes).startAngle,r=e.endAngle,i=e.center,o=e.radius,ou(ou([n,r],ol(i),!1),[o],!1)),ou(ou([l,s],ol(u),!1),[c],!1),a.update);if(p){var h=function(){var t=wX(f.attributes,"__keyframe_data__");f.style.path=Ee.apply(void 0,ou([],ol(t),!1))};p.onframe=h,p.onfinish=h}return p}).styles(i)},function(t){return t.remove()}).styles(o).transitions()}return!function(t,e,n,r){var i,o,a=n.showArrow,l=n.showTrunc,s=n.lineArrow,u=n.lineArrowOffset,c=n.lineArrowSize;if(o="arc"===e?t.select(wM.line.class):l?t.select(wM.lineSecond.class):t.select(wM.line.class),!a||!s||"arc"===n.type&&(i=n.startAngle,n.endAngle-i==360)){var f=o.node();f&&(f.style.markerEnd=void 0);return}var p=wQ(s);p.attr(r),wJ(p,c,!0),o.style("markerEnd",p).style("markerEndOffset",-u)}(t,p,e,h),f}(e,t,r)})||[],s=m6(o,e.maybeAppendByClassName(wM.tickGroup,"g"),function(e){var i,o,a,l,s,u;return i=e,o=n,a=t,l=r,s=w2(o,a.tickFilter),u=wF(a,"tick"),i.selectAll(wM.tick.class).data(s,function(t){return t.id||t.label}).join(function(t){return t.append("g").attr("className",wM.tick.name).transition(function(t,e){return EC.call(this,t,e,s,a,u,!1)})},function(t){return t.transition(function(t,e){return this.removeChildren(),EC.call(this,t,e,s,a,u,l.update)})},function(t){return t.transition(function(){var t=this,e=w$(this.childNodes[0],l.exit);return wm(e,function(){return t.remove()}),e})}).transitions()})||[],u=m6(a,e.maybeAppendByClassName(wM.labelGroup,"g"),function(e){var i,o,a,l,s,u;return i=e,o=n,a=t,l=r,s=w2(o,a.labelFilter),u=wF(a,"label"),i.selectAll(wM.label.class).data(s,function(t,e){return e}).join(function(t){return t.append("g").attr("className",wM.label.name).transition(function(t){return EA(this,t,o,u,a),this.attr(E_(t,o,a)),this.__bbox__=t.bbox,null}).call(function(){return Ej.call(i,a)})},function(t){return t.transition(function(t){var e=function(t,e,n,r){if(void 0===r&&(r="destroy"),i=t,o=e,"text"===i.nodeName&&"text"===o.nodeName&&i.attributes.text===o.attributes.text)return t.remove(),[null];var i,o,a=function(){"destroy"===r?t.destroy():"hide"===r&&mq(t),e.isVisible()&&mU(e)};if(!n)return a(),[null];var l=n.duration,s=void 0===l?0:l,u=n.delay,c=void 0===u?0:u,f=Math.ceil(+s/2),p=+s/4,h=function(t){if("circle"===t.nodeName){var e=ol(t.getLocalPosition(),2),n=e[0],r=e[1],i=t.attr("r");return[n-i,r-i]}return t.getLocalPosition()},d=ol(h(t),2),y=d[0],g=d[1],v=ol(h(e),2),m=ol([(y+v[0])/2-y,(g+v[1])/2-g],2),b=m[0],x=m[1],O=t.style.opacity,w=e.style.opacity,E=t.animate([{opacity:void 0===O?1:O,transform:"translate(0, 0)"},{opacity:0,transform:"translate(".concat(b,", ").concat(x,")")}],on(on({fill:"both"},n),{duration:c+f+p})),k=e.animate([{opacity:0,transform:"translate(".concat(-b,", ").concat(-x,")"),offset:.01},{opacity:void 0===w?1:w,transform:"translate(0, 0)"}],on(on({fill:"both"},n),{duration:f+p,delay:c+f-p}));return wm(k,a),[E,k]}(this.querySelector(wM.labelItem.class),EA(this,t,o,u,a),l.update),n=wO(this,E_(t,o,a),l.update);return this.__bbox__=t.bbox,ou(ou([],ol(e),!1),[n],!1)}).call(function(t){var e,n;e=wX(t,"_transitions").flat().filter(Ef),n=function(){return Ej.call(i,a)},0===e.length?n():Promise.all(e.map(function(t){return null==t?void 0:t.finished})).then(n)})},function(t){return t.transition(function(){var t=this,e=w$(this.childNodes[0],l.exit);return wm(e,function(){return m7(t).remove()}),e})}).transitions()})||[];return ou(ou(ou([],ol(l),!1),ol(s),!1),ol(u),!1).filter(function(t){return!!t})}var EB=function(t){function e(e){return t.call(this,e,wk)||this}return oe(e,t),e.prototype.render=function(t,e,n){var r=this,i=t.titleText,o=t.data,a=t.animate,l=t.showTitle,s=t.showGrid,u=t.dataThreshold,c=t.truncRange,f=(function(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})(o,u).filter(function(t){var e=t.value;return(!c||!(e>c[0])||!(e<c[1]))&&!0}),p=wv(void 0===n?a:n),h=m6(s,m7(e).maybeAppendByClassName(wM.gridGroup,"g"),function(e){var n,r,i,o,a,l,s,u,c,h,d,y,g,v;return n=e,r=f,i=t,o=p,l=(a=wF(i,"grid")).type,s=a.areaFill,u=Er(i),c=w2(r,i.gridFilter),g="segment"===l?(h=c,y=(d=i).gridLength,h.map(function(t,e){var n,r=t.value,i=ol(w8(r,d),2),o=i[0],a=i[1];var l=ol(wS(w4(r,(n=d).gridDirection,n),y),2);return{id:e,points:[[o,a],[o+l[0],a+l[1]]]}})):function(t,e){var n=e.gridControlAngles,r=Er(e);if(!r)throw Error("grid center is not provide");if(t.length<2)throw Error("Invalid grid data");if(!n||0===n.length)throw Error("Invalid gridControlAngles");var i=ol(r,2),o=i[0],a=i[1];return t.map(function(t,r){var i=ol(w8(t.value,e),2),l=ol([i[0]-o,i[1]-a],2),s=l[0],u=l[1],c=[];return n.forEach(function(t){var e=wN(t),n=ol([Math.cos(e),Math.sin(e)],2),r=n[0],i=n[1];c.push([s*r-u*i+o,s*i+u*r+a])}),{points:c,id:r}})}(c,i),v=on(on({},a),{center:u,areaFill:mH(s)?c.map(function(t,e){return wW(s,[t,e,c])}):s,animate:o,data:g}),n.selectAll(wM.grid.class).data([1]).join(function(t){return t.append(function(){return new wY({style:v})}).attr("className",wM.grid.name)},function(t){return t.transition(function(){return this.update(v)})},function(t){return t.remove()}).transitions()})||[],d=m7(e).maybeAppendByClassName(wM.mainGroup,"g");i&&(!this.initialized&&p.enter||this.initialized&&p.update)&&Ez(t,m7(this.offscreenGroup),f,wv(!1));var y=Ez(t,m7(d.node()),f,p),g=m6(l,m7(e).maybeAppendByClassName(wM.titleGroup,"g"),function(e){var n,i,o,a,l;return n=e,i=r,o=t,a=p,l=o.titleText,n.selectAll(wM.title.class).data([{title:l}].filter(function(t){return!!t.title}),function(t,e){return t.title}).join(function(t){return t.append(function(){return wQ(l)}).attr("className",wM.title.name).transition(function(){return EF(m7(this),n,i,o,a.enter)})},function(t){return t.transition(function(){return EF(m7(this),n,i,o,a.update)})},function(t){return t.remove()}).transitions()})||[];return ou(ou(ou([],ol(h),!1),ol(y),!1),ol(g),!1).flat().filter(function(t){return!!t})},e}(m4),EW=function(t){var e=typeof t;return null!==t&&"object"===e||"function"===e},E$=function(t,e){if(!!t){if(e8(t))for(var n,r=0,i=t.length;r<i&&!1!==(n=e(t[r],r));r++);else if(EW(t)){for(var o in t)if(t.hasOwnProperty(o)&&!1===(n=e(t[o],o)))break}}},EG=function(t,e,n){if(!e8(t)&&!e7(t))return t;var r=n;return E$(t,function(t,n){r=e(r,t,n)}),r},EV=function(t,e){return EG(t,function(t,n,r){return!e.includes(r)&&(t[r]=n),t},{})};function EH(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)]}var EU=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Eq(t){var e;if(!(e=EU.exec(t)))throw Error("invalid format: "+t);return new EY({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]})}function EY(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}Eq.prototype=EY.prototype,EY.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};function EX(t,e){var n=EH(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+Array(i-r.length+2).join("0")}var EK={"%":(t,e)=>(100*t).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},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)=>EX(100*t,e),r:EX,s:function(t,e){var n=EH(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(eu=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,a=r.length;return o===a?r:o>a?r+Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+Array(1-o).join("0")+EH(t,Math.max(0,e+o-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function EZ(t){return t}var EQ=Array.prototype.map,EJ=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"];(function(t){ef=(ec=function(t){var e,n,r,i=void 0===t.grouping||void 0===t.thousands?EZ:(e=EQ.call(t.grouping,Number),n=t.thousands+"",function(t,r){for(var i=t.length,o=[],a=0,l=e[0],s=0;i>0&&l>0&&(s+l+1>r&&(l=Math.max(1,r-s)),o.push(t.substring(i-=l,i+l)),!((s+=l+1)>r));){;l=e[a=(a+1)%e.length]}return o.reverse().join(n)}),o=void 0===t.currency?"":t.currency[0]+"",a=void 0===t.currency?"":t.currency[1]+"",l=void 0===t.decimal?".":t.decimal+"",s=void 0===t.numerals?EZ:(r=EQ.call(t.numerals,String),function(t){return t.replace(/[0-9]/g,function(t){return r[+t]})}),u=void 0===t.percent?"%":t.percent+"",c=void 0===t.minus?"−":t.minus+"",f=void 0===t.nan?"NaN":t.nan+"";function p(t){var e=(t=Eq(t)).fill,n=t.align,r=t.sign,p=t.symbol,h=t.zero,d=t.width,y=t.comma,g=t.precision,v=t.trim,m=t.type;"n"===m?(y=!0,m="g"):!EK[m]&&(void 0===g&&(g=12),v=!0,m="g"),(h||"0"===e&&"="===n)&&(h=!0,e="0",n="=");var b="$"===p?o:"#"===p&&/[boxX]/.test(m)?"0"+m.toLowerCase():"",x="$"===p?a:/[%p]/.test(m)?u:"",O=EK[m],w=/[defgprs%]/.test(m);function E(t){var o,a,u,p=b,E=x;if("c"===m)E=O(t)+E,t="";else{var k=(t=+t)<0||1/t<0;if(t=isNaN(t)?f:O(Math.abs(t),g),v&&(t=function(t){e:for(var e,n=t.length,r=1,i=-1;r<n;++r)switch(t[r]){case".":i=e=r;break;case"0":0===i&&(i=r),e=r;break;default:if(!+t[r])break e;i>0&&(i=0)}return i>0?t.slice(0,i)+t.slice(e+1):t}(t)),k&&0==+t&&"+"!==r&&(k=!1),p=(k?"("===r?r:c:"-"===r||"("===r?"":r)+p,E=("s"===m?EJ[8+eu/3]:"")+E+(k&&"("===r?")":""),w){for(o=-1,a=t.length;++o<a;)if(48>(u=t.charCodeAt(o))||u>57){E=(46===u?l+t.slice(o+1):t.slice(o))+E,t=t.slice(0,o);break}}}y&&!h&&(t=i(t,1/0));var M=p.length+t.length+E.length,S=M<d?Array(d-M+1).join(e):"";switch(y&&h&&(t=i(S+t,S.length?d-E.length:1/0),S=""),n){case"<":t=p+t+E+S;break;case"=":t=p+S+t+E;break;case"^":t=S.slice(0,M=S.length>>1)+p+t+E+S.slice(M);break;default:t=S+p+t+E}return s(t)}return g=void 0===g?6:/[gprs]/.test(m)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),E.toString=function(){return t+""},E}return{format:p,formatPrefix:function(t,e){var n,r=p(((t=Eq(t)).type="f",t)),i=3*Math.max(-8,Math.min(8,Math.floor(((n=EH(Math.abs(n=e)))?n[1]:NaN)/3))),o=Math.pow(10,-i),a=EJ[8+i/3];return function(t){return r(o*t)+a}}}}(t)).format,ec.formatPrefix})({thousands:",",grouping:[3],currency:["$",""]});function E0(t){for(var e=1/0,n=1/0,r=-1/0,i=-1/0,o=0;o<t.length;o++){var a=t[o],l=a.x,s=a.y,u=ol([l+a.width,s+a.height],2),c=u[0],f=u[1];l<e&&(e=l),s<n&&(n=s),c>r&&(r=c),f>i&&(i=f)}return new EN(e,n,r-e,i-n)}var E1=function(t,e,n){var r=t.width,i=t.height,o=n.flexDirection,a=void 0===o?"row":o,l=(n.flexWrap,n.justifyContent),s=void 0===l?"flex-start":l,u=(n.alignContent,n.alignItems),c=void 0===u?"flex-start":u,f="row"===a,p="row"===a||"column"===a,h=f?p?[1,0]:[-1,0]:p?[0,1]:[0,-1],d=ol([0,0],2),y=d[0],g=d[1],v=e.map(function(t){var e,n=t.width,r=t.height,i=ol([y,g],2),o=i[0],a=i[1];return y=(e=ol([y+n*h[0],g+r*h[1]],2))[0],g=e[1],new EN(o,a,n,r)}),m=E0(v),b={"flex-start":0,"flex-end":f?r-m.width:i-m.height,center:f?(r-m.width)/2:(i-m.height)/2},x=v.map(function(t){var e=t.x,n=t.y,r=EN.fromRect(t);return r.x=f?e+b[s]:e,r.y=f?n:n+b[s],r});E0(x);var O=function(t){var e=ol(f?["height",i]:["width",r],2),n=e[0],o=e[1];switch(c){case"flex-start":default:return 0;case"flex-end":return o-t[n];case"center":return o/2-t[n]/2}};return x.map(function(t){var e=t.x,n=t.y,r=EN.fromRect(t);return r.x=f?e:e+O(r),r.y=f?n+O(r):n,r}).map(function(e){var n,r,i=EN.fromRect(e);return i.x+=null!==(n=t.x)&&void 0!==n?n:0,i.y+=null!==(r=t.y)&&void 0!==r?r:0,i})},E2=function(t,e,n){return[]},E5=function(t,e,n){if(0===e.length)return[];var r={flex:E1,grid:E2},i=n.display in r?r[n.display]:null;return(null==i?void 0:i.call(null,t,e,n))||[]},E3=function(t){function e(e){var n=t.call(this,e)||this;n.layoutEvents=[en.BOUNDS_CHANGED,en.INSERTED,en.REMOVED],n.$margin=Ep(0),n.$padding=Ep(0);var r=e.style||{},i=r.margin,o=r.padding;return n.margin=void 0===i?0:i,n.padding=void 0===o?0:o,n.isMutationObserved=!0,n.bindEvents(),n}return oe(e,t),Object.defineProperty(e.prototype,"margin",{get:function(){return this.$margin},set:function(t){this.$margin=Ep(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"padding",{get:function(){return this.$padding},set:function(t){this.$padding=Ep(t)},enumerable:!1,configurable:!0}),e.prototype.getBBox=function(){var t=this.attributes,e=t.x,n=t.y,r=t.width,i=t.height,o=ol(this.$margin,4),a=o[0],l=o[1],s=o[2],u=o[3];return new EN((void 0===e?0:e)-u,(void 0===n?0:n)-a,r+u+l,i+a+s)},e.prototype.appendChild=function(e,n){return e.isMutationObserved=!0,t.prototype.appendChild.call(this,e,n),e},e.prototype.getAvailableSpace=function(){var t=this.attributes,e=t.width,n=t.height,r=ol(this.$padding,4),i=r[0],o=r[1],a=r[2],l=r[3],s=ol(this.$margin,4),u=s[0];return new EN(l+s[3],i+u,e-l-o,n-i-a)},e.prototype.layout=function(){if(!!this.attributes.display&&!!this.isConnected){if(!this.children.some(function(t){return!t.isConnected}))try{var t=E5(this.getAvailableSpace(),this.children.map(function(t){return t.getBBox()}),this.attributes);this.children.forEach(function(e,n){var r=t[n],i=r.x,o=r.y;e.attr({x:i,y:o})})}catch(t){}}},e.prototype.bindEvents=function(){var t=this;this.layoutEvents.forEach(function(e){t.addEventListener(e,function(e){e.target.isMutationObserved=!0,t.layout()})})},e.prototype.attributeChangedCallback=function(t,e,n){"margin"===t?this.margin=n:"padding"===t&&(this.padding=n),this.layout()},e}(yo),E4=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function E6(t,e,n){return t.querySelector(e)?g_(t).select(e):g_(t).append(n)}function E8(t){return Array.isArray(t)?t.join(", "):`${t||""}`}function E9(t,e){let{flexDirection:n,justifyContent:r,alignItems:i}={display:"flex",flexDirection:"row",justifyContent:"flex-start",alignItems:"center"},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&&([n,r,i]=o[t]),Object.assign({display:"flex",flexDirection:n,justifyContent:r,alignItems:i},e)}class E7 extends E3{get child(){var t;return null===(t=this.children)||void 0===t?void 0:t[0]}update(t){var e;this.attr(t);let{subOptions:n}=t;null===(e=this.child)||void 0===e||e.update(n)}}class kt extends E7{update(t){var e;let{subOptions:n}=t;this.attr(t),null===(e=this.child)||void 0===e||e.update(n)}}function ke(t,e){var n;return null===(n=t.filter(t=>t.getOptions().name===e))||void 0===n?void 0:n[0]}function kn(t,e,n){let{bbox:r}=t,{position:i="top",size:o,length:a}=e,l=["top","bottom","center"].includes(i),[s,u]=l?[r.height,r.width]:[r.width,r.height],{defaultSize:c,defaultLength:f}=n.props,p=o||c||s,h=a||f||u,[d,y]=l?[h,p]:[p,h];return{orientation:l?"horizontal":"vertical",width:d,height:y,size:p,length:h}}function kr(t){let e=["arrow","crosshairs","grid","handle","handleLabel","indicator","label","line","tick","tip","title","trunc"],{style:n}=t,r=E4(t,["style"]),i={};return Object.entries(r).forEach(([t,n])=>{e.includes(t)?i[`show${oR(t)}`]=n:i[t]=n}),Object.assign(Object.assign({},i),n)}var ki=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function ko(t,e){let{eulerAngles:n,origin:r}=e;r&&t.setOrigin(r),n&&t.rotate(n[0],n[1],n[2])}function ka(t){let{innerWidth:e,innerHeight:n,depth:r}=t.getOptions();return[e,n,r]}function kl(t,e,n,r,i,o,a,l){var s;(void 0!==n||void 0!==o)&&t.update(Object.assign(Object.assign({},n&&{tickCount:n}),o&&{tickMethod:o}));let u=function(t,e,n){if(t.getTicks)return t.getTicks();if(!n)return e;let[r,i]=gB(e,t=>+t),{tickCount:o}=t.getOptions();return n(r,i,o)}(t,e,o),c=i?u.filter(i):u,f=t=>t instanceof Date?String(t):"object"==typeof t&&t?t:String(t),p=r||(null===(s=t.getFormatter)||void 0===s?void 0:s.call(t))||f,h=function(t,e){if(s2(e))return t=>t;let{innerWidth:n,innerHeight:r,insetTop:i,insetBottom:o,insetLeft:a,insetRight:l}=e.getOptions(),[s,u,c]="left"===t||"right"===t?[i,o,r]:[a,l,n],f=new oI({domain:[0,1],range:[s/c,1-u/c]});return t=>f.map(t)}(a,l),d=function(t,e){let{width:n,height:r}=e.getOptions();return i=>{if(!s6(e))return i;let o=e.map("bottom"===t?[i,1]:[0,i]);if("bottom"===t){let t=o[0];return new oI({domain:[0,n],range:[0,1]}).map(t)}if("left"===t){let t=o[1];return new oI({domain:[0,r],range:[0,1]}).map(t)}return i}}(a,l),y=t=>["top","bottom","center","outer"].includes(t),g=t=>["left","right"].includes(t);return s2(l)||s1(l)?c.map((e,n,r)=>{var i,o;let s=(null===(i=t.getBandWidth)||void 0===i?void 0:i.call(t,e))/2||0,u=h(t.map(e)+s);return{value:s5(l)&&"center"===a||s1(l)&&(null===(o=t.getTicks)||void 0===o?void 0:o.call(t))&&y(a)||s1(l)&&g(a)?1-u:u,label:f(p(gF(e),n,r)),id:String(n)}}):c.map((e,n,r)=>{var i;let o=(null===(i=t.getBandWidth)||void 0===i?void 0:i.call(t,e))/2||0,l=d(h(t.map(e)+o));return{value:g(a)?1-l:l,label:f(p(gF(e),n,r)),id:String(n)}})}let ks=t=>e=>{let{labelFormatter:n,labelFilter:r=()=>!0}=e;return i=>{var o;let{scales:[a]}=i,l=(null===(o=a.getTicks)||void 0===o?void 0:o.call(a))||a.getOptions().domain,s="string"==typeof n?ef(n):n;return t(Object.assign(Object.assign({},e),{labelFormatter:s,labelFilter:(t,e,n)=>r(l[e],e,l),scale:a}))(i)}},ku=ks(t=>{let{direction:e="left",important:n={},labelFormatter:r,order:i,orientation:o,actualPosition:a,position:l,size:s,style:u={},title:c,tickCount:f,tickFilter:p,tickMethod:h,transform:d,indexBBox:y}=t,g=ki(t,["direction","important","labelFormatter","order","orientation","actualPosition","position","size","style","title","tickCount","tickFilter","tickMethod","transform","indexBBox"]);return({scales:i,value:v,coordinate:m,theme:b})=>{var x,O,w,E;let{bbox:k}=v,[M]=i,{domain:S,xScale:_}=M.getOptions(),P=Object.assign(Object.assign(Object.assign({},function(t,e,n,r,i,o){let a=function(t,e,n,r,i,o){let a=n.axis,l=["top","right","bottom","left"].includes(i)?n[`axis${na(i)}`]:n.axisLinear,s=t.getOptions().name;return Object.assign({},a,l,n[`axis${oR(s)}`]||{})}(t,0,n,0,i,0);if("center"===i){var l;return Object.assign(Object.assign(Object.assign(Object.assign({},a),{labelDirection:"right"===r?"negative":"positive"}),"center"===r?{labelTransform:"translate(50%,0)"}:null),{tickDirection:"right"===r?"negative":"positive",labelSpacing:"center"===r?0:4,titleSpacing:"vertical"===(l=o)||l===-Math.PI/2?10:0,tick:"center"!==r&&void 0})}return a}(M,m,b,e,l,o)),u),g),j=function(t,e,n="xy"){let[r,i,o]=ka(e);if("xy"===n)return t.includes("bottom")||t.includes("top")?i:r;if("xz"===n)return t.includes("bottom")||t.includes("top")?o:r;return t.includes("bottom")||t.includes("top")?i:o}(a||l,m,t.plane),A=function(t,e,n,r,i){let{x:o,y:a,width:l,height:s}=n;if("bottom"===t)return{startPos:[o,a],endPos:[o+l,a]};if("left"===t)return{startPos:[o+l,a+s],endPos:[o+l,a]};if("right"===t)return{startPos:[o,a+s],endPos:[o,a]};if("top"===t)return{startPos:[o,a+s],endPos:[o+l,a+s]};if("center"===t){if("vertical"===e)return{startPos:[o,a],endPos:[o,a+s]};if("horizontal"===e)return{startPos:[o,a],endPos:[o+l,a]};else if("number"==typeof e){let[t,n]=r.getCenter(),[u,c]=s9(r),[f,p]=s7(r),h=Math.min(l,s)/2,{insetLeft:d,insetTop:y}=r.getOptions(),g=u*h,v=c*h,[m,b]=[t+o-d,n+a-y],[x,O]=[Math.cos(e),Math.sin(e)],w=s2(r)&&i?(()=>{let{domain:t}=i.getOptions();return t.length})():3;return{startPos:[m+v*x,b+v*O],endPos:[m+g*x,b+g*O],gridClosed:1e-6>Math.abs(p-f-360),gridCenter:[m,b],gridControlAngles:Array(w).fill(0).map((t,e,n)=>(p-f)/w*e)}}}return{}}(l,o,k,m,_),T=function(t){let{depth:e}=t.getOptions();return e?{tickIsBillboard:!0,lineIsBillboard:!0,labelIsBillboard:!0,titleIsBillboard:!0,gridIsBillboard:!0}:{}}(m),C=kl(M,S,f,r,p,h,l,m),N=y?C.map((t,e)=>{let n=y.get(e);return n&&n[0]===t.label?Object.assign(Object.assign({},t),{bbox:n[1]}):t}):C;let L=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},P),{type:"linear",data:N,crossSize:s,titleText:E8(c),labelOverlap:function(t=[],e){if(t.length>0)return t;let{labelAutoRotate:n,labelAutoHide:r,labelAutoEllipsis:i,labelAutoWrap:o}=e,a=[],l=(t,e)=>{e&&a.push(Object.assign(Object.assign({},t),e))};return l({type:"rotate",optionalAngles:[0,15,30,45,60,90]},n),l({type:"ellipsis",minLength:20},i),l({type:"hide"},r),l({type:"wrap",wordWrapWidth:100,maxLines:3,recoveryWhenFail:!0},o),a}(d,P),grid:(x=P.grid,O=m,w=M,!(s2(E=O)&&s1(E)||s4(O))&&(void 0===x?!!w.getTicks:x)),gridLength:j,line:!0,indexBBox:y}),P.line?null:{lineOpacity:0}),A),T),n);return L.labelOverlap.find(t=>"hide"===t.type)&&(L.crossSize=!1),new EB({className:"axis",style:kr(L)})}}),kc=ks(t=>{let{order:e,size:n,position:r,orientation:i,labelFormatter:o,tickFilter:a,tickCount:l,tickMethod:s,important:u={},style:c={},indexBBox:f,title:p,grid:h=!1}=t,d=ki(t,["order","size","position","orientation","labelFormatter","tickFilter","tickCount","tickMethod","important","style","indexBBox","title","grid"]);return({scales:[t],value:e,coordinate:n,theme:i})=>{let{bbox:c}=e,{domain:y}=t.getOptions(),g=kl(t,y,l,o,a,s,r,n),v=f?g.map((t,e)=>{let n=f.get(e);return n&&n[0]===t.label?Object.assign(Object.assign({},t),{bbox:n[1]}):t}):g,[m,b]=s9(n),x=function(t,e,n,r,i){let{x:o,y:a,width:l,height:s}=e,u=[o+l/2,a+s/2],c=Math.min(l,s)/2,[f,p]=s7(i),[h,d]=ka(i),y={center:u,radius:c,startAngle:f,endAngle:p,gridLength:Math.min(h,d)/2*(r-n)};if("inner"===t){let{insetLeft:t,insetTop:e}=i.getOptions();return Object.assign(Object.assign({},y),{center:[u[0]-t,u[1]-e],labelAlign:"perpendicular",labelDirection:"positive",tickDirection:"positive",gridDirection:"negative"})}return Object.assign(Object.assign({},y),{labelAlign:"parallel",labelDirection:"negative",tickDirection:"negative",gridDirection:"positive"})}(r,c,m,b,n),{axis:O,axisArc:w={}}=i;return new EB({style:EV(kr(nt({},O,w,x,Object.assign(Object.assign({type:"arc",data:v,titleText:E8(p),grid:h},d),u))),["transform"])})}});ku.props={defaultPosition:"center",defaultSize:45,defaultOrder:0,defaultCrossPadding:[12,12],defaultPadding:[12,12]},kc.props={defaultPosition:"outer",defaultOrientation:"vertical",defaultSize:45,defaultOrder:0,defaultCrossPadding:[12,12],defaultPadding:[12,12]};let kf=t=>(...e)=>{let n=ku(Object.assign({},{crossPadding:50},t))(...e);return ko(n,t),n};kf.props=Object.assign(Object.assign({},ku.props),{defaultPosition:"bottom"});let kp=t=>(...e)=>{let n=ku(Object.assign({},{crossPadding:10},t))(...e);return ko(n,t),n};kp.props=Object.assign(Object.assign({},ku.props),{defaultPosition:"left"});var kh=function(){},kd=function(t,e,n){var r=t,i=bi(e)?e.split("."):e;return i.forEach(function(t,e){e<i.length-1?(!br(r[t])&&(r[t]=wZ(i[e+1])?[]:{}),r=r[t]):r[t]=n}),t},ky=function(t,e,n){return t<e?e:t>n?n:t},kg=function(t,e,n){var r;return function(){var i=this,o=arguments,a=n&&!r;clearTimeout(r),r=setTimeout(function(){r=null,!n&&t.apply(i,o)},e),a&&t.apply(i,o)}},kv=wE({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"),km=function(t){function e(e){var n,r,i,o=t.call(this,e,{animate:{easing:"linear",duration:200,fill:"both"},buttonCursor:"pointer",buttonFill:"black",buttonPath:[["M",-6,0-(i=6)],["L",(n=0)+i,r=0],["L",n-i,r+i],["Z"]],buttonSize:12,controllerPadding:5,controllerSpacing:5,formatter:function(t,e){return"".concat(t,"/").concat(e)},defaultPage:0,loop:!1,orientation:"horizontal",pageNumFill:"black",pageNumFontSize:12,pageNumTextAlign:"start",pageNumTextBaseline:"middle"})||this;return o.playState="idle",o.contentGroup=o.appendChild(new yo({class:kv.contentGroup.name})),o.playWindow=o.contentGroup.appendChild(new yo({class:kv.playWindow.name})),o.innerCurrPage=o.defaultPage,o}return oe(e,t),Object.defineProperty(e.prototype,"defaultPage",{get:function(){return ky(this.attributes.defaultPage,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 t,e,n=ol(((null===(e=(t=this.pageViews.map(function(t){var e=t.getBBox();return[e.width,e.height]}))[0])||void 0===e?void 0:e.map(function(e,n){return t.map(function(t){return t[n]})}))||[]).map(function(t){return Math.max.apply(Math,ou([],ol(t),!1))}),2),r=n[0],i=n[1],o=this.attributes,a=o.pageWidth,l=o.pageHeight;return{pageWidth:void 0===a?r:a,pageHeight:void 0===l?i:l}},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 e=t.prototype.getBBox.call(this),n=e.x,r=e.y,i=this.controllerShape,o=this.pageShape,a=o.pageWidth,l=o.pageHeight;return new EN(n,r,a+i.width,l)},e.prototype.goTo=function(t){var e=this,n=this.attributes.animate,r=this.currPage,i=this.playState,o=this.playWindow,a=this.pageViews;if("idle"!==i||t<0||a.length<=0||t>=a.length)return null;a[r].setLocalPosition(0,0),this.prepareFollowingPage(t);var l=ol(this.getFollowingPageDiff(t),2),s=l[0],u=l[1];this.playState="running";var c=wx(o,[{transform:"translate(0, 0)"},{transform:"translate(".concat(-s,", ").concat(-u,")")}],n);return wm(c,function(){e.innerCurrPage=t,e.playState="idle",e.setVisiblePages([t]),e.updatePageInfo()}),c},e.prototype.prev=function(){var t=this.attributes.loop,e=this.pageViews.length,n=this.currPage;if(!t&&n<=0)return null;var r=t?(n-1+e)%e:ky(n-1,0,e);return this.goTo(r)},e.prototype.next=function(){var t=this.attributes.loop,e=this.pageViews.length,n=this.currPage;if(!t&&n>=e-1)return null;var r=t?(n+1)%e:ky(n+1,0,e);return this.goTo(r)},e.prototype.renderClipPath=function(t){var e=this.pageShape,n=e.pageWidth,r=e.pageHeight;if(!n||!r){this.contentGroup.style.clipPath=void 0;return}this.clipPath=t.maybeAppendByClassName(kv.clipPath,"rect").styles({width:n,height:r}),this.contentGroup.attr("clipPath",this.clipPath.node())},e.prototype.setVisiblePages=function(t){this.playWindow.children.forEach(function(e,n){t.includes(n)?mU(e):mq(e)})},e.prototype.adjustControllerLayout=function(){var t=this.prevBtnGroup,e=this.nextBtnGroup,n=this.pageInfoGroup,r=this.attributes,i=r.orientation,o=r.controllerPadding,a=n.getBBox(),l=a.width;a.height;var s=ol("horizontal"===i?[-180,0]:[-90,90],2),u=s[0],c=s[1];t.setLocalEulerAngles(u),e.setLocalEulerAngles(c);var f=t.getBBox(),p=f.width,h=f.height,d=e.getBBox(),y=d.width,g=d.height,v=Math.max(p,l,y),m="horizontal"===i?{offset:[[0,0],[p/2+o,0],[p+l+2*o,0]],textAlign:"start"}:{offset:[[v/2,-h-o],[v/2,0],[v/2,g+o]],textAlign:"center"},b=ol(m.offset,3),x=ol(b[0],2),O=x[0],w=x[1],E=ol(b[1],2),k=E[0],M=E[1],S=ol(b[2],2),_=S[0],P=S[1],j=m.textAlign,A=n.querySelector("text");A&&(A.style.textAlign=j),t.setLocalPosition(O,w),n.setLocalPosition(k,M),e.setLocalPosition(_,P)},e.prototype.updatePageInfo=function(){var t,e=this.currPage,n=this.pageViews,r=this.attributes.formatter;!(n.length<2)&&(null===(t=this.pageInfoGroup.querySelector(kv.pageInfo.class))||void 0===t||t.attr("text",r(e+1,n.length)),this.adjustControllerLayout())},e.prototype.getFollowingPageDiff=function(t){var e=this.currPage;if(e===t)return[0,0];var n=this.attributes.orientation,r=this.pageShape,i=r.pageWidth,o=r.pageHeight,a=t<e?-1:1;return"horizontal"===n?[a*i,0]:[0,a*o]},e.prototype.prepareFollowingPage=function(t){var e=this.currPage,n=this.pageViews;if(this.setVisiblePages([t,e]),t!==e){var r=ol(this.getFollowingPageDiff(t),2),i=r[0],o=r[1];n[t].setLocalPosition(i,o)}},e.prototype.renderController=function(t){var e=this,n=this.attributes.controllerSpacing,r=this.pageShape,i=r.pageWidth,o=r.pageHeight,a=this.pageViews.length>=2,l=t.maybeAppendByClassName(kv.controller,"g");if(mY(l.node(),a),a){var s=wF(this.attributes,"button"),u=wF(this.attributes,"pageNum"),c=ol(wB(s),2),f=c[0],p=c[1],h=f.size,d=or(f,["size"]),y=!l.select(kv.prevBtnGroup.class).node(),g=l.maybeAppendByClassName(kv.prevBtnGroup,"g").styles(p);this.prevBtnGroup=g.node();var v=g.maybeAppendByClassName(kv.prevBtn,"path"),m=l.maybeAppendByClassName(kv.nextBtnGroup,"g").styles(p);this.nextBtnGroup=m.node(),[v,m.maybeAppendByClassName(kv.nextBtn,"path")].forEach(function(t){t.styles(on(on({},d),{transformOrigin:"center"})),wJ(t.node(),h,!0)});var b=l.maybeAppendByClassName(kv.pageInfoGroup,"g");this.pageInfoGroup=b.node(),b.maybeAppendByClassName(kv.pageInfo,"text").styles(u),this.updatePageInfo(),l.node().setLocalPosition(i+n,o/2),y&&(this.prevBtnGroup.addEventListener("click",function(){e.prev()}),this.nextBtnGroup.addEventListener("click",function(){e.next()}))}},e.prototype.render=function(t,e){var n=m7(e);this.renderClipPath(n),this.renderController(n),this.setVisiblePages([this.defaultPage]),this.goTo(this.defaultPage)},e.prototype.bindEvents=function(){var t=this,e=kg(function(){return t.render(t.attributes,t)},50);this.playWindow.addEventListener(en.INSERTED,e),this.playWindow.addEventListener(en.REMOVED,e)},e}(m4);bo.registerSymbol("hiddenHandle",function(t,e,n){var r=1.4*n;return[["M",t-n,e-r],["L",t+n,e-r],["L",t+n,e+r],["L",t-n,e+r],["Z"]]}),bo.registerSymbol("verticalHandle",function(t,e,n){var r=1.4*n,i=n/2,o=n/6,a=t+.4*r;return[["M",t,e],["L",a,e+i],["L",t+r,e+i],["L",t+r,e-i],["L",a,e-i],["Z"],["M",a,e+o],["L",t+r-2,e+o],["M",a,e-o],["L",t+r-2,e-o]]}),bo.registerSymbol("horizontalHandle",function(t,e,n){var r=1.4*n,i=n/2,o=n/6,a=e+.4*r;return[["M",t,e],["L",t-i,a],["L",t-i,e+r],["L",t+i,e+r],["L",t+i,a],["Z"],["M",t-o,a],["L",t-o,e+r-2],["M",t+o,a],["L",t+o,e+r-2]]});function kb(t,e,n){return void 0===t&&(t="horizontal"),"horizontal"===t?e:n}var kx=wE({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"),kO=function(t){function e(e){return t.call(this,e,{span:[1,1],marker:function(){return new yn({style:{r:6}})},markerSize:10,labelFill:"#646464",valueFill:"#646464",labelFontSize:12,valueFontSize:12,labelTextBaseline:"middle",valueTextBaseline:"middle"})||this}return oe(e,t),Object.defineProperty(e.prototype,"showValue",{get:function(){var t=this.attributes.valueText;return!!t&&("string"==typeof t||"number"==typeof t?""!==t:"function"==typeof t||""!==t.attr("text"))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"actualSpace",{get:function(){var t=this.labelGroup,e=this.valueGroup,n=this.attributes.markerSize,r=t.node().getBBox(),i=r.width,o=r.height,a=e.node().getBBox();return{markerWidth:n,labelWidth:i,valueWidth:a.width,height:Math.max(n,o,a.height)}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"span",{get:function(){var t=this.attributes.span;if(!t)return[1,1];var e=ol(Ep(t),2),n=e[0],r=e[1],i=this.showValue?r:0,o=n+i;return[n/o,i/o]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"shape",{get:function(){var t,e=this.attributes,n=e.markerSize,r=e.width,i=this.actualSpace,o=i.markerWidth,a=i.height,l=this.actualSpace,s=l.labelWidth,u=l.valueWidth,c=ol(this.spacing,2),f=c[0],p=c[1];if(r){var h=r-n-f-p,d=ol(this.span,2);s=(t=ol([d[0]*h,d[1]*h],2))[0],u=t[1]}return{width:o+s+u+f+p,height:a,markerWidth:o,labelWidth:s,valueWidth:u}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"spacing",{get:function(){var t=this.attributes.spacing;if(!t)return[0,0];var e=ol(Ep(t),2),n=e[0],r=e[1];return this.showValue?[n,r]:[n,0]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"layout",{get:function(){var t=this.shape,e=t.markerWidth,n=t.labelWidth,r=t.valueWidth,i=t.width,o=t.height,a=ol(this.spacing,2),l=a[0];return{height:o,width:i,markerWidth:e,labelWidth:n,valueWidth:r,position:[e/2,e+l,e+n+l+a[1]]}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scaleSize",{get:function(){var t,e=(t=this.markerGroup.node().querySelector(kx.marker.class))?t.style:{},n=this.attributes,r=n.markerSize,i=n.markerStrokeWidth,o=void 0===i?e.strokeWidth:i,a=n.markerLineWidth,l=void 0===a?e.lineWidth:a,s=n.markerStroke,u=void 0===s?e.stroke:s,c=+(o||l||(u?1:0))*Math.sqrt(2),f=this.markerGroup.node().getBBox();return(1-c/Math.max(f.width,f.height))*r},enumerable:!1,configurable:!0}),e.prototype.renderMarker=function(t){var e=this,n=this.attributes.marker,r=wF(this.attributes,"marker");this.markerGroup=t.maybeAppendByClassName(kx.markerGroup,"g").style("zIndex",0),m6(!!n,this.markerGroup,function(){var t=e.markerGroup.node(),i=t.getElementsByClassName(kx.marker.name)[0],o=n();i?o.nodeName===i.nodeName?(!function(t,e){var n,r,i=e.attributes;try{for(var o=oa(Object.entries(i)),a=o.next();!a.done;a=o.next()){var l=ol(a.value,2),s=l[0],u=l[1];"id"!==s&&"className"!==s&&t.attr(s,u)}}catch(t){n={error:t}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}}(i,o),m7(i).styles(r)):(i.remove(),m7(o).attr("className",kx.marker.name).styles(r),t.appendChild(o)):(m7(o).attr("className",kx.marker.name).styles(r),t.appendChild(o)),e.markerGroup.node().scale(1/e.markerGroup.node().getScale()[0]),wJ(e.markerGroup.node(),e.scaleSize,!0)})},e.prototype.renderLabel=function(t){var e=wF(this.attributes,"label"),n=e.text,r=or(e,["text"]);this.labelGroup=t.maybeAppendByClassName(kx.labelGroup,"g").style("zIndex",0),this.labelGroup.maybeAppendByClassName(kx.label,function(){return wQ(n)}).styles(r)},e.prototype.renderValue=function(t){var e=this,n=wF(this.attributes,"value"),r=n.text,i=or(n,["text"]);this.valueGroup=t.maybeAppendByClassName(kx.valueGroup,"g").style("zIndex",0),m6(this.showValue,this.valueGroup,function(){e.valueGroup.maybeAppendByClassName(kx.value,function(){return wQ(r)}).styles(i)})},e.prototype.renderBackground=function(t){var e=this.shape,n=e.width,r=e.height,i=wF(this.attributes,"background");this.background=t.maybeAppendByClassName(kx.backgroundGroup,"g").style("zIndex",-1),this.background.maybeAppendByClassName(kx.background,"rect").styles(on({width:n,height:r},i))},e.prototype.adjustLayout=function(){var t=this.layout,e=t.labelWidth,n=t.valueWidth,r=t.height,i=ol(t.position,3),o=i[0],a=i[1],l=i[2],s=r/2;this.markerGroup.styles({x:o,y:s}),this.labelGroup.styles({x:a,y:s}),Eu(this.labelGroup.select(kx.label.class).node(),Math.ceil(e)),this.showValue&&(this.valueGroup.styles({x:l,y:s}),Eu(this.valueGroup.select(kx.value.class).node(),Math.ceil(n)))},e.prototype.render=function(t,e){var n=m7(e);this.renderMarker(n),this.renderLabel(n),this.renderValue(n),this.renderBackground(n),this.adjustLayout()},e}(m4),kw=wE({page:"item-page",navigator:"navigator",item:"item"},"items"),kE=function(t,e,n){return(void 0===n&&(n=!0),t)?e(t):n},kk=function(t){function e(e){var n=t.call(this,e,{data:[],gridRow:1/0,gridCol:void 0,padding:0,width:1e3,height:100,rowPadding:0,colPadding:0,layout:"flex",orientation:"horizontal",click:kh,mouseenter:kh,mouseleave:kh})||this;return n.navigatorShape=[0,0],n}return oe(e,t),Object.defineProperty(e.prototype,"pageViews",{get:function(){return this.navigator.getContainer()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"grid",{get:function(){var t=this.attributes,e=t.gridRow,n=t.gridCol,r=t.data;if(!e&&!n)throw Error("gridRow and gridCol can not be set null at the same time");return e&&n?[e,n]:e?[e,r.length]:[r.length,n]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"renderData",{get:function(){var t=this.attributes,e=t.data,n=t.layout,r=wF(this.attributes,"item");return e.map(function(t,i){var o=t.id,a=void 0===o?i:o,l=t.label,s=t.value;return{id:"".concat(a),index:i,style:on({layout:n,labelText:l,valueText:s},Object.fromEntries(Object.entries(r).map(function(n){var r=ol(n,2);return[r[0],wW(r[1],[t,i,e])]})))}})},enumerable:!1,configurable:!0}),e.prototype.getGridLayout=function(){var t=this,e=this.attributes,n=e.orientation,r=e.width,i=e.rowPadding,o=e.colPadding,a=ol(this.navigatorShape,1)[0],l=ol(this.grid,2),s=l[0],u=l[1],c=u*s,f=0;return this.pageViews.children.map(function(e,l){var p,h,d=Math.floor(l/c),y=l%c,g=t.ifHorizontal(u,s),v=[Math.floor(y/g),y%g];"vertical"===n&&v.reverse();var m=ol(v,2),b=m[0],x=m[1],O=(r-a-(u-1)*o)/u,w=e.getBBox().height,E=ol([0,0],2),k=E[0],M=E[1];return"horizontal"===n?(k=(p=ol([f,b*(w+i)],2))[0],M=p[1],f=x===u-1?0:f+O+o):(k=(h=ol([x*(O+o),f],2))[0],M=h[1],f=b===s-1?0:f+w+i),{page:d,index:l,row:b,col:x,pageIndex:y,width:O,height:w,x:k,y:M}})},e.prototype.getFlexLayout=function(){var t=this.attributes,e=t.width,n=t.height,r=t.rowPadding,i=t.colPadding,o=ol(this.navigatorShape,1)[0],a=ol(this.grid,2),l=a[0],s=a[1],u=ol([e-o,n],2),c=u[0],f=u[1],p=ol([0,0,0,0,0,0,0,0],8),h=p[0],d=p[1],y=p[2],g=p[3],v=p[4],m=p[5],b=p[6],x=p[7];return this.pageViews.children.map(function(t,e){var n,o,a,u,p=t.getBBox(),O=p.width,w=p.height,E=0===b?0:i,k=b+E+O;return k<=c&&kE(v,function(t){return t<s})?(h=(n=ol([b+E,x,k],3))[0],d=n[1],b=n[2],{width:O,height:w,x:h,y:d,page:y,index:e,pageIndex:g++,row:m,col:v++}):(m=(o=ol([m+1,0,0,x+w+r],4))[0],v=o[1],b=o[2],(x=o[3])+w<=f&&kE(m,function(t){return t<l}))?(h=(a=ol([b,x,O],3))[0],d=a[1],b=a[2],{width:O,height:w,x:h,y:d,page:y,index:e,pageIndex:g++,row:m,col:v++}):(h=(u=ol([0,0,O,0,y+1,0,0,0],8))[0],d=u[1],b=u[2],x=u[3],y=u[4],g=u[5],m=u[6],v=u[7],{width:O,height:w,x:h,y:d,page:y,index:e,pageIndex:g++,row:m,col:v++})})},Object.defineProperty(e.prototype,"itemsLayout",{get:function(){this.navigatorShape=[0,0];var t="grid"===this.attributes.layout?this.getGridLayout:this.getFlexLayout,e=t.call(this);return e.slice(-1)[0].page>0?(this.navigatorShape=[55,0],t.call(this)):e},enumerable:!1,configurable:!0}),e.prototype.ifHorizontal=function(t,e){return kb(this.attributes.orientation,t,e)},e.prototype.flattenPage=function(t){t.querySelectorAll(kw.item.class).forEach(function(e){t.appendChild(e)}),t.querySelectorAll(kw.page.class).forEach(function(e){t.removeChild(e).destroy()})},e.prototype.renderItems=function(t){var e=this.attributes,n=e.click,r=e.mouseenter,i=e.mouseleave;this.flattenPage(t);var o=this.dispatchCustomEvent.bind(this);m7(t).selectAll(kw.item.class).data(this.renderData,function(t){return t.id}).join(function(t){return t.append(function(t){return new kO({style:t.style})}).attr("className",kw.item.name).on("click",function(){null==n||n(this),o("itemClick",{item:this})}).on("pointerenter",function(){null==r||r(this),o("itemMouseenter",{item:this})}).on("pointerleave",function(){null==i||i(this),o("itemMouseleave",{item:this})})},function(t){return t.each(function(t){var e=t.style;this.update(e)})},function(t){return t.remove()})},e.prototype.relayoutNavigator=function(){var t,e=this.attributes,n=e.layout,r=e.width,i=(null===(t=this.pageViews.children[0])||void 0===t?void 0:t.getBBox().height)||0,o=ol(this.navigatorShape,2),a=o[0],l=o[1];this.navigator.update("grid"===n?{pageWidth:r-a,pageHeight:i-l}:{})},e.prototype.adjustLayout=function(){var t,e,n=this;var r=Object.entries((t=this.itemsLayout,e="page",t.reduce(function(t,n){return(t[n[e]]=t[n[e]]||[]).push(n),t},{}))).map(function(t){var e=ol(t,2);return{page:e[0],layouts:e[1]}}),i=ou([],ol(this.navigator.getContainer().children),!1);r.forEach(function(t){var e=t.layouts,r=n.pageViews.appendChild(new yo({className:kw.page.name}));e.forEach(function(t){var e=t.x,n=t.y,o=t.index,a=t.width,l=t.height,s=i[o];r.appendChild(s),kd(s,"__layout__",t),s.update({x:e,y:n,width:a,height:l})})}),this.relayoutNavigator()},e.prototype.renderNavigator=function(t){var e=m1({orientation:this.attributes.orientation},wF(this.attributes,"nav")),n=this;return t.selectAll(kw.navigator.class).data(["nav"]).join(function(t){return t.append(function(){return new km({style:e})}).attr("className",kw.navigator.name).each(function(){n.navigator=this})},function(t){return t.each(function(){this.update(e)})},function(t){return t.remove()}),this.navigator},e.prototype.getBBox=function(){return this.navigator.getBBox()},e.prototype.render=function(t,e){var n=this.attributes.data;if(n&&0!==n.length){var r=this.renderNavigator(m7(e));this.renderItems(r.getContainer()),this.adjustLayout()}},e.prototype.dispatchCustomEvent=function(t,e){var n=new d_(t,{detail:e});this.dispatchEvent(n)},e}(m4),kM=wE({markerGroup:"marker-group",marker:"marker",labelGroup:"label-group",label:"label"},"handle"),kS={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},k_=function(t){function e(e){return t.call(this,e,kS)||this}return oe(e,t),e.prototype.render=function(t,e){var n=m7(e).maybeAppendByClassName(kM.markerGroup,"g");this.renderMarker(n);var r=m7(e).maybeAppendByClassName(kM.labelGroup,"g");this.renderLabel(r)},e.prototype.renderMarker=function(t){var e=this,n=this.attributes,r=n.orientation,i=n.markerSymbol,o=void 0===i?kb(r,"horizontalHandle","verticalHandle"):i;m6(!!o,t,function(t){var n=wF(e.attributes,"marker"),r=on({symbol:o},n);e.marker=t.maybeAppendByClassName(kM.marker,function(){return new bo({style:r})}).update(r)})},e.prototype.renderLabel=function(t){var e=this,n=this.attributes,r=n.showLabel,i=n.orientation,o=n.spacing,a=void 0===o?0:o,l=n.formatter;m6(r,t,function(t){var n,r=wF(e.attributes,"label"),o=r.text,s=or(r,["text"]),u=(null===(n=t.select(kM.marker.class))||void 0===n?void 0:n.node().getBBox())||{},c=u.width,f=u.height,p=ol(kb(i,[0,(void 0===f?0:f)+a,"center","top"],[(void 0===c?0:c)+a,0,"start","middle"]),4),h=p[0],d=p[1],y=p[2],g=p[3];t.maybeAppendByClassName(kM.label,"text").styles(on(on({},s),{x:h,y:d,text:l(o).toString(),textAlign:y,textBaseline:g}))})},e}(m4),kP={showTitle:!0,padding:0,orientation:"horizontal",backgroundFill:"transparent",titleText:"",titleSpacing:4,titlePosition:"top-left",titleFill:"#2C3542",titleFontWeight:"bold",titleFontFamily:"sans-serif",titleFontSize:12},kj=m1({},kP,{}),kA=m1({},kP,wz(kS,"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"}),kT=wE({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"),kC=function(t){function e(e){return t.call(this,e,kj)||this}return oe(e,t),e.prototype.renderTitle=function(t,e,n){var r=this.attributes,i=r.showTitle,o=r.titleText,a=ol(wB(wF(this.attributes,"title")),2),l=a[0],s=a[1];this.titleGroup=t.maybeAppendByClassName(kT.titleGroup,"g").styles(s);var u=on(on({width:e,height:n},l),{text:i?o:""});this.title=this.titleGroup.maybeAppendByClassName(kT.title,function(){return new ED({style:u})}).update(u)},e.prototype.renderItems=function(t,e){var n=e.x,r=e.y,i=e.width,o=e.height,a=ol(wB(wF(this.attributes,"title",!0)),2),l=a[0],s=a[1],u=on(on({},l),{width:i,height:o,x:0,y:0});this.itemsGroup=t.maybeAppendByClassName(kT.itemsGroup,"g").styles(on({x:n,y:r},s));var c=this;this.itemsGroup.selectAll(kT.items.class).data(["items"]).join(function(t){return t.append(function(){return new kk({style:u})}).attr("className",kT.items.name).each(function(){c.items=m7(this)})},function(t){return t.update(u)},function(t){return t.remove()})},e.prototype.adjustLayout=function(){if(this.attributes.showTitle){var t=this.title.node().getAvailableSpace(),e=t.x,n=t.y;this.itemsGroup.node().setLocalPosition(e,n)}},Object.defineProperty(e.prototype,"availableSpace",{get:function(){var t=this.attributes,e=t.showTitle,n=t.width,r=t.height;return e?this.title.node().getAvailableSpace():new EN(0,0,n,r)},enumerable:!1,configurable:!0}),e.prototype.getBBox=function(){var e,n,r=null===(e=this.title)||void 0===e?void 0:e.node(),i=null===(n=this.items)||void 0===n?void 0:n.node();return r&&i?function(t,e){var n=t.attributes,r=n.position,i=n.spacing,o=n.inset,a=n.text,l=t.getBBox(),s=e.getBBox(),u=EI(r),c=ol(Ep(a?i:0),4),f=c[0],p=c[1],h=c[2],d=c[3],y=ol(Ep(o),4),g=y[0],v=y[1],m=y[2],b=y[3],x=ol([d+p,f+h],2),O=x[0],w=x[1],E=ol([b+v,g+m],2),k=E[0],M=E[1];if("l"===u[0])return new EN(l.x,l.y,s.width+l.width+O+k,Math.max(s.height+M,l.height));if("t"===u[0])return new EN(l.x,l.y,Math.max(s.width+k,l.width),s.height+l.height+w+M);var S=ol([e.attributes.width||s.width,e.attributes.height||s.height],2),_=S[0],P=S[1];return new EN(s.x,s.y,_+l.width+O+k,P+l.height+w+M)}(r,i):t.prototype.getBBox.call(this)},e.prototype.render=function(t,e){var n=t.width,r=t.height,i=m7(e);this.renderTitle(i,n,r),this.renderItems(i,this.availableSpace),this.adjustLayout()},e}(m4),kN=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let kL=t=>{let{labelFormatter:e,layout:n,order:r,orientation:i,position:o,size:a,title:l,cols:s,itemMarker:u}=t,c=kN(t,["labelFormatter","layout","order","orientation","position","size","title","cols","itemMarker"]),{gridRow:f}=c;return e=>{let{value:r,theme:i}=e,{bbox:a}=r,{width:u,height:p}=function(t,e,n){let{position:r}=e;if("center"===r){let{bbox:e}=t,{width:n,height:r}=e;return{width:n,height:r}}let{width:i,height:o}=kn(t,e,n);return{width:i,height:o}}(r,t,kL),h=E9(o,n),d=Object.assign(Object.assign(Object.assign(Object.assign({orientation:["right","left","center"].includes(o)?"vertical":"horizontal",width:u,height:p,layout:void 0!==s?"grid":"flex"},void 0!==s&&{gridCol:s}),void 0!==f&&{gridRow:f}),{titleText:E8(l)}),function(t,e){let{labelFormatter:n=t=>`${t}`}=t,{scales:r,theme:i}=e,o=function(t,e){let n=ke(t,"size");return n instanceof x9?2*n.map(NaN):e}(r,i.legendCategory.itemMarkerSize),a={itemMarker:function(t,e){let{scales:n,library:r,markState:i}=e,[o,a]=function(t,e){let n=ke(t,"shape"),r=ke(t,"color"),i=n?n.clone():null,o=[];for(let[t,n]of e){let e=t.type,a=((null==r?void 0:r.getOptions().domain.length)>0?null==r?void 0:r.getOptions().domain:n.data).map((e,r)=>{var o;return i?i.map(e||"point"):(null===(o=null==t?void 0:t.style)||void 0===o?void 0:o.shape)||n.defaultShape||"point"});"string"==typeof e&&o.push([e,a])}if(0===o.length)return["point",["point"]];if(1===o.length||!n)return o[0];let{range:a}=n.getOptions();return o.map(([t,e])=>{let n=0;for(let t=0;t<o.length;t++){let r=a[t%a.length];e[t]===r&&n++}return[n/e.length,[t,e]]}).sort((t,e)=>e[0]-t[0])[0][1]}(n,i),{itemMarker:l,itemMarkerSize:s}=t,u=(t,e)=>{var n,i,a;let l=(null===(a=null===(i=null===(n=r[`mark.${o}`])||void 0===n?void 0:n.props)||void 0===i?void 0:i.shape[t])||void 0===a?void 0:a.props.defaultMarker)||iP(t.split(".")),u="function"==typeof s?s(e):s;return()=>(function(t,e){var{d:n,fill:r,strokeWidth:i,path:o,stroke:a,lineWidth:l,color:s}=e,u=v1(e,["d","fill","strokeWidth","path","stroke","lineWidth","color"]);let c=mb.get(t)||mb.get("point");return(...t)=>new yu({style:Object.assign(Object.assign({},u),{path:c(...t),stroke:c.style.includes("stroke")?s||a:"",fill:c.style.includes("fill")?s||r:"",lineWidth:c.style.includes("lineWidth")?l||l||2:0})})})(l,{color:e.color})(0,0,u)},c=t=>`${a[t]}`;return ke(n,"shape")&&!l?(t,e)=>u(c(e),t):"function"==typeof l?(t,e)=>{let n=l(t.id,e);return"string"==typeof n?u(n,t):n}:(t,e)=>u(l||c(e),t)}(Object.assign(Object.assign({},t),{itemMarkerSize:o}),e),itemMarkerSize:o,itemMarkerOpacity:function(t){let e=ke(t,"opacity");if(e){let{range:t}=e.getOptions();return(e,n)=>t[n]}}(r)},l="string"==typeof n?ef(n):n,s=ke(r,"color"),u=r.find(t=>t.getOptions().domain.length>0).getOptions().domain,c=s?t=>s.map(t):()=>e.theme.color;return Object.assign(Object.assign({},a),{data:u.map(t=>({id:t,label:l(t),color:c(t)}))})}(t,e)),{legendCategory:y={}}=i,g=kr(Object.assign({},y,d,c)),v=new kt({style:Object.assign(Object.assign({x:a.x,y:a.y,width:a.width,height:a.height},h),{subOptions:g})});return v.appendChild(new kC({className:"legend-category",style:g})),v}};kL.props={defaultPosition:"top",defaultOrder:1,defaultSize:40,defaultCrossPadding:[12,12],defaultPadding:[12,12]};var kI={}.toString,kR=function(t,e){return kI.call(t)==="[object "+e+"]"},kD=function(t){return Array.isArray?Array.isArray(t):kR(t,"Array")},kF=function(t){var e=typeof t;return null!==t&&"object"===e||"function"===e},kz=function(t,e){if(!!t){if(kD(t))for(var n,r=0,i=t.length;r<i&&!1!==(n=e(t[r],r));r++);else if(kF(t)){for(var o in t)if(t.hasOwnProperty(o)&&!1===(n=e(t[o],o)))break}}},kB=function(t){return kR(t,"Function")},kW=Array.prototype;kW.splice,kW.indexOf,Array.prototype.splice,Object.prototype.hasOwnProperty;var k$=Object.values?function(t){return Object.values(t)}:function(t){var e=[];return kz(t,function(n,r){!(kB(t)&&"prototype"===r)&&e.push(n)}),e},kG=function(t){if(!("object"==typeof(e=t)&&null!==e)||!kR(t,"Object"))return!1;if(null===Object.getPrototypeOf(t))return!0;for(var e,n=t;null!==Object.getPrototypeOf(n);)n=Object.getPrototypeOf(n);return Object.getPrototypeOf(t)===n},kV=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)!function t(e,n,r,i){for(var o in r=r||0,i=i||5,n)if(n.hasOwnProperty(o)){var a=n[o];null!==a&&kG(a)?(!kG(e[o])&&(e[o]={}),r<i?t(e[o],a,r+1,i):e[o]=n[o]):kD(a)?(e[o]=[],e[o]=e[o].concat(a)):void 0!==a&&(e[o]=a)}}(t,e[r]);return t};Object.prototype.hasOwnProperty,Object.prototype.hasOwnProperty;var kH=function(t){return t};!function(t,e){if(!kB(t))throw TypeError("Expected a function");var n=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var o=e?e.apply(this,r):r[0],a=n.cache;if(a.has(o))return a.get(o);var l=t.apply(this,r);return a.set(o,l),l};n.cache=new Map}(function(t,e){void 0===e&&(e={});var n=e.fontSize,r=e.fontFamily,i=e.fontWeight,o=e.fontStyle,a=e.fontVariant;return!eh&&(eh=document.createElement("canvas").getContext("2d")),eh.font=[o,a,i,n+"px",r].join(" "),eh.measureText(kR(t,"String")?t:"").width},function(t,e){return void 0===e&&(e={}),os([t],k$(e)).join("")}),!function(){function t(){this.map={}}t.prototype.has=function(t){return void 0!==this.map[t]},t.prototype.get=function(t,e){var n=this.map[t];return void 0===n?e:n},t.prototype.set=function(t,e){this.map[t]=e},t.prototype.clear=function(){this.map={}},t.prototype.delete=function(t){delete this.map[t]},t.prototype.size=function(){return Object.keys(this.map).length}}();class kU{constructor(t){this.options=kV({},this.getDefaultOptions()),this.update(t)}getOptions(){return this.options}update(t={}){this.options=kV({},this.options,t),this.rescale(t)}rescale(t){}}function kq(t,e){return e-t?n=>(n-t)/(e-t):t=>.5}function kY(t,...e){return e.reduce((t,e)=>n=>t(e(n)),t)}function kX(t,e,n){let r=n;return(r<0&&(r+=1),r>1&&(r-=1),r<1/6)?t+(e-t)*6*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function kK(t){let e=og().get(t);if(!e)return null;let{model:n,value:r}=e;return"rgb"===n?r:"hsl"===n?function(t){let e=t[0]/360,n=t[1]/100,r=t[2]/100,i=t[3];if(0===n)return[255*r,255*r,255*r,i];let o=r<.5?r*(1+n):r+n-r*n,a=2*r-o,l=kX(a,o,e+1/3),s=kX(a,o,e);return[255*l,255*s,255*kX(a,o,e-1/3),i]}(r):null}let kZ=(t,e)=>n=>t*(1-n)+e*n,kQ=(t,e)=>{let n=kK(t),r=kK(e);return null===n||null===r?n?()=>t:()=>e:t=>{let e=[,,,,];for(let i=0;i<4;i+=1){let o=n[i],a=r[i];e[i]=o*(1-t)+a*t}let[i,o,a,l]=e;return`rgba(${Math.round(i)}, ${Math.round(o)}, ${Math.round(a)}, ${l})`}},kJ=(t,e)=>"number"==typeof t&&"number"==typeof e?kZ(t,e):"string"==typeof t&&"string"==typeof e?kQ(t,e):()=>t,k0=(t,e)=>{let n=kZ(t,e);return t=>Math.round(n(t))};function k1(t){return void 0!==t&&null!==t&&!Number.isNaN(t)}let k2=Math.sqrt(50),k5=Math.sqrt(10),k3=Math.sqrt(2);function k4(t,e,n){let r=(e-t)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),o=r/10**i;return i>=0?(o>=k2?10:o>=k5?5:o>=k3?2:1)*10**i:-(10**-i)/(o>=k2?10:o>=k5?5:o>=k3?2:1)}let k6=(t,e,n=5)=>{let r;let i=[t,e],o=0,a=i.length-1,l=i[o],s=i[a];return s<l&&([l,s]=[s,l],[o,a]=[a,o]),(r=k4(l,s,n))>0?r=k4(l=Math.floor(l/r)*r,s=Math.ceil(s/r)*r,n):r<0&&(r=k4(l=Math.ceil(l*r)/r,s=Math.floor(s*r)/r,n)),r>0?(i[o]=Math.floor(l/r)*r,i[a]=Math.ceil(s/r)*r):r<0&&(i[o]=Math.ceil(l*r)/r,i[a]=Math.floor(s*r)/r),i},k8=(t,e,n)=>{let r,i;let[o,a]=t,[l,s]=e;return o<a?(r=kq(o,a),i=n(l,s)):(r=kq(a,o),i=n(s,l)),kY(i,r)},k9=(t,e,n)=>{let r=Math.min(t.length,e.length)-1,i=Array(r),o=Array(r),a=t[0]>t[r],l=a?[...t].reverse():t,s=a?[...e].reverse():e;for(let t=0;t<r;t+=1)i[t]=kq(l[t],l[t+1]),o[t]=n(s[t],s[t+1]);return e=>{let n=function(t,e,n,r,i){let o=1,a=r||t.length,l=t=>t;for(;o<a;){let n=Math.floor((o+a)/2);l(t[n])>e?a=n:o=n+1}return o}(t,e,1,r)-1,a=i[n];return kY(o[n],a)(e)}},k7=(t,e,n,r)=>{let i=Math.min(t.length,e.length);return(i>2?k9:k8)(t,e,r?k0:n)};class Mt extends kU{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:kZ,tickCount:5}}map(t){return k1(t)?this.output(t):this.options.unknown}invert(t){return k1(t)?this.input(t):this.options.unknown}nice(){if(!this.options.nice)return;let[t,e,n,...r]=this.getTickMethodOptions();this.options.domain=this.chooseNice()(t,e,n,...r)}getTicks(){let{tickMethod:t}=this.options,[e,n,r,...i]=this.getTickMethodOptions();return t(e,n,r,...i)}getTickMethodOptions(){let{domain:t,tickCount:e}=this.options,n=t[0];return[n,t[t.length-1],e]}chooseNice(){return k6}rescale(){this.nice();let[t,e]=this.chooseTransforms();this.composeOutput(t,this.chooseClamp(t)),this.composeInput(t,e,this.chooseClamp(e))}chooseClamp(t){let{clamp:e,range:n}=this.options,r=this.options.domain.map(t),i=Math.min(r.length,n.length);return e?function(t,e){let n=e<t?e:t,r=t>e?t:e;return t=>Math.min(Math.max(n,t),r)}(r[0],r[i-1]):kH}composeOutput(t,e){let{domain:n,range:r,round:i,interpolate:o}=this.options,a=k7(n.map(t),r,o,i);this.output=kY(a,e,t)}composeInput(t,e,n){let{domain:r,range:i}=this.options,o=k7(i,r.map(t),kZ);this.input=kY(e,n,o)}}let Me=(t,e,n)=>{let r,i;let o=t,a=e;if(o===a&&n>0)return[o];let l=k4(o,a,n);if(0===l||!Number.isFinite(l))return[];if(l>0){o=Math.ceil(o/l),i=Array(r=Math.ceil((a=Math.floor(a/l))-o+1));for(let t=0;t<r;t+=1)i[t]=(o+t)*l}else{o=Math.ceil(o*(l=-l)),i=Array(r=Math.ceil((a=Math.floor(a*l))-o+1));for(let t=0;t<r;t+=1)i[t]=(o+t)/l}return i};class Mn extends Mt{getDefaultOptions(){return{domain:[0,1],range:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolate:kJ,tickMethod:Me,tickCount:5}}chooseTransforms(){return[kH,kH]}clone(){return new Mn(this.options)}}function Mr(t,e){return+t.toPrecision(e)}function Mi(t){var e=t.canvas,n=t.touches,r=t.offsetX,i=t.offsetY;if(e)return[e.x,e.y];if(n){var o=n[0];return[o.clientX,o.clientY]}return r&&i?[r,i]:[0,0]}var Mo={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},Ma=wE({background:"background",labelGroup:"label-group",label:"label"},"indicator"),Ml=function(t){function e(e){var n=t.call(this,e,Mo)||this;return n.point=[0,0],n.group=n.appendChild(new yo({})),n.isMutationObserved=!0,n}return oe(e,t),e.prototype.renderBackground=function(){if(this.label){var t=this.attributes,e=t.position,n=ol(Ep(t.padding),4),r=n[0],i=n[1],o=n[2],a=n[3],l=this.label.node().getLocalBounds(),s=l.min,u=l.max,c=new EN(s[0]-a,s[1]-r,u[0]+i-s[0]+a,u[1]+o-s[1]+r),f=this.getPath(e,c),p=wF(this.attributes,"background");this.background=m7(this.group).maybeAppendByClassName(Ma.background,"path").styles(on(on({},p),{path:f})),this.group.appendChild(this.label.node())}},e.prototype.renderLabel=function(){var t=this.attributes,e=t.formatter,n=t.labelText,r=ol(wB(wF(this.attributes,"label")),2),i=r[0],o=r[1],a=(i.text,or(i,["text"]));this.label=m7(this.group).maybeAppendByClassName(Ma.labelGroup,"g").styles(o),n&&this.label.maybeAppendByClassName(Ma.label,function(){return wQ(e(n))}).style("text",e(n).toString()).selectAll("text").styles(a)},e.prototype.adjustLayout=function(){var t=ol(this.point,2),e=t[0],n=t[1];this.group.attr("x",-e).attr("y",-n)},e.prototype.getPath=function(t,e){var n=this.attributes.radius,r=e.x,i=e.y,o=e.width,a=e.height,l=[["M",r+n,i],["L",r+o-n,i],["A",n,n,0,0,1,r+o,i+n],["L",r+o,i+a-n],["A",n,n,0,0,1,r+o-n,i+a],["L",r+n,i+a],["A",n,n,0,0,1,r,i+a-n],["L",r,i+n],["A",n,n,0,0,1,r+n,i],["Z"]],s={top:4,right:6,bottom:0,left:2}[t],u=this.createCorner([l[s].slice(-2),l[s+1].slice(-2)]);return l.splice.apply(l,ou([s+1,1],ol(u),!1)),l[0][0]="M",l},e.prototype.createCorner=function(t,e){void 0===e&&(e=10);var n=EO.apply(void 0,ou([],ol(t),!1)),r=ol(t,2),i=ol(r[0],2),o=i[0],a=i[1],l=ol(r[1],2),s=l[0],u=l[1],c=ol(n?[s-o,[o,s]]:[u-a,[a,u]],2),f=c[0],p=ol(c[1],2),h=p[0],d=p[1],y=f/2,g=f/Math.abs(f)*e,v=g/2,m=g*Math.sqrt(3)/2*.8,b=ol([h,h+y-v,h+y,h+y+v,d],5),x=b[0],O=b[1],w=b[2],E=b[3],k=b[4];return n?(this.point=[w,a-m],[["L",x,a],["L",O,a],["L",w,a-m],["L",E,a],["L",k,a]]):(this.point=[o+m,w],[["L",o,x],["L",o,O],["L",o+m,w],["L",o,E],["L",o,k]])},e.prototype.applyVisibility=function(){"hidden"===this.attributes.visibility?mq(this):mU(this)},e.prototype.bindEvents=function(){this.label.on(en.BOUNDS_CHANGED,this.renderBackground)},e.prototype.render=function(){this.renderLabel(),this.renderBackground(),this.adjustLayout(),this.applyVisibility()},e}(m4),Ms={fill:"#fff",lineWidth:1,radius:2,size:10,stroke:"#bfbfbf",strokeOpacity:1,zIndex:0},Mu={fill:"#000",fillOpacity:.45,fontSize:12,textAlign:"center",textBaseline:"middle",zIndex:1},Mc={orientation:"horizontal",showLabel:!0,type:"start"},Mf=wE({foreground:"foreground",handle:"handle",selection:"selection",sparkline:"sparkline",sparklineGroup:"sparkline-group",track:"track",brushArea:"brush-area"},"slider"),Mp=wE({labelGroup:"label-group",label:"label",iconGroup:"icon-group",icon:"icon",iconRect:"icon-rect",iconLine:"icon-line"},"handle"),Mh=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return oe(e,t),e.prototype.render=function(t,e){var n=t.size,r=void 0===n?10:n,i=t.radius,o=t.orientation,a=or(t,["size","radius","orientation"]),l=2.4*r,s=m7(e).maybeAppendByClassName(Mp.iconRect,"rect").styles(on(on({},a),{width:r,height:l,radius:void 0===i?r/4:i,x:-r/2,y:-l/2})),u=1/3*r,c=2/3*r,f=1/4*l,p=3/4*l;s.maybeAppendByClassName("".concat(Mp.iconLine,"-1"),"line").styles(on({x1:u,x2:u,y1:f,y2:p},a)),s.maybeAppendByClassName("".concat(Mp.iconLine,"-2"),"line").styles(on({x1:c,x2:c,y1:f,y2:p},a)),s.node().setOrigin(r/2,l/2),"vertical"===o?e.setLocalEulerAngles(90):e.setLocalEulerAngles(0)},e}(m4),Md=function(t){function e(e){return t.call(this,e,Mc)||this}return oe(e,t),e.prototype.renderLabel=function(t){var e=this,n=this.attributes.showLabel,r=wF(this.attributes,"label"),i=r.transform,o=ol(wB(or(r,["transform"]),[]),2),a=o[0],l=o[1],s=m7(t).maybeAppendByClassName(Mp.labelGroup,"g").styles(l),u=on(on({},Mu),a),c=u.text,f=or(u,["text"]);m6(!!n,s,function(t){e.label=t.maybeAppendByClassName(Mp.label,"text").styles(on(on({},f),{transform:i,text:"".concat(c)})),e.label.on("mousedown",function(t){t.stopPropagation()}),e.label.on("touchstart",function(t){t.stopPropagation()})})},e.prototype.renderIcon=function(t){var e=this.attributes,n=e.orientation,r=e.type,i=on(on({orientation:n},Ms),wF(this.attributes,"icon")),o=this.attributes.iconShape,a=void 0===o?function(){return new Mh({style:i})}:o;m7(t).maybeAppendByClassName(Mp.iconGroup,"g").selectAll(Mp.icon.class).data([a]).join(function(t){return t.append("string"==typeof a?a:function(){return a(r)}).attr("className",Mp.icon.name)},function(t){return t.update(i)},function(t){return t.remove()})},e.prototype.render=function(t,e){this.renderIcon(e),this.renderLabel(e)},e}(m4);function My(t,e){var n=ol(function(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]}(t,e),2),r=n[0],i=n[1];return{tick:e>(r+i)/2?i:r,range:[r,i]}}var Mg=wE({trackGroup:"background-group",track:"background",selectionGroup:"ribbon-group",selection:"ribbon",clipPath:"clip-path"},"ribbon");function Mv(t){var e=t.orientation,n=t.size,r=t.length;return kb(e,[r,n],[n,r])}function Mm(t){var e=t.type,n=ol(Mv(t),2),r=n[0],i=n[1];return"size"===e?[["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"]]}var Mb=function(t){function e(e){return t.call(this,e,{type:"color",orientation:"horizontal",size:30,range:[0,1],length:200,block:!1,partition:[],color:["#fff","#000"],trackFill:"#e5e5e5"})||this}return oe(e,t),e.prototype.render=function(t,e){!function(t,e){var n=wF(e,"track");t.maybeAppendByClassName(Mg.track,"path").styles(on({path:Mm(e)},n))}(m7(e).maybeAppendByClassName(Mg.trackGroup,"g"),t),!function(t,e){var n=wF(e,"selection"),r=function(t){var e,n,r,i,o,a,l=t.orientation,s=t.color,u=t.block,c=t.partition,f=(a=mH(s)?Array(20).fill(0).map(function(t,e,n){return s(e/(n.length-1))}):s).length,p=a.map(function(t){return pC(t).toString()});if(!f)return"";if(1===f)return p[0];if(u){;return e=c,n=p,r=l,i=Array.from(n),Array(o=e.length).fill(0).reduce(function(t,n,r){var a=i[r%i.length];return t+" ".concat(e[r],":").concat(a).concat(r<o-1?" ".concat(e[r+1],":").concat(a):"")},"l(".concat("horizontal"===r?"0":"270",")"))}return p.reduce(function(t,e,n){return t+" ".concat(n/(f-1),":").concat(e)},"l(".concat(kb(l,"0","270"),")"))}(e),i=t.maybeAppendByClassName(Mg.selection,"path").styles(on({path:Mm(e),fill:r},n)),o=i.maybeAppendByClassName(Mg.clipPath,"path").styles({path:function(t){var e=t.orientation,n=t.range;if(!n)return[];var r=ol(Mv(t),2),i=r[0],o=r[1],a=ol(n,2),l=a[0],s=a[1],u=kb(e,l*i,0),c=kb(e,0,l*o),f=kb(e,s*i,i),p=kb(e,o,s*o);return[["M",u,c],["L",u,p],["L",f,p],["L",f,c],["Z"]]}(e)}).node();i.style("clip-path",o)}(m7(e).maybeAppendByClassName(Mg.selectionGroup,"g"),t)},e}(m4),Mx=function(t){function e(e){var n=t.call(this,e,kA)||this;return n.eventToOffsetScale=new Mn({}),n.innerRibbonScale=new Mn({}),n.cacheLabelBBox=null,n.cacheHandleBBox=null,n.onHovering=function(t){var e=n.attributes,r=e.data,i=e.block;t.stopPropagation();var o=n.getValueByCanvasPoint(t);if(i){var a=My(r.map(function(t){return t.value}),o).range;n.showIndicator((a[0]+a[1])/2,"".concat(a[0],"-").concat(a[1])),n.dispatchIndicated(o,a)}else{var l=n.getTickValue(o);n.showIndicator(l),n.dispatchIndicated(l)}},n.onDragStart=function(t){return function(e){e.stopPropagation(),n.attributes.slidable&&(n.target=t,n.prevValue=n.getTickValue(n.getValueByCanvasPoint(e)),document.addEventListener("mousemove",n.onDragging),document.addEventListener("touchmove",n.onDragging),document.addEventListener("mouseleave",n.onDragEnd),document.addEventListener("mouseup",n.onDragEnd),document.addEventListener("mouseup",n.onDragEnd),document.addEventListener("touchend",n.onDragEnd))}},n.onDragging=function(t){var e=n.target;n.updateMouse();var r=ol(n.selection,2),i=r[0],o=r[1],a=n.getTickValue(n.getValueByCanvasPoint(t)),l=a-n.prevValue;"start"===e?i!==a&&n.updateSelection(a,o):"end"===e?o!==a&&n.updateSelection(i,a):"ribbon"===e&&0!==l&&(n.prevValue=a,n.updateSelection(l,l,!0))},n.onDragEnd=function(){n.style.cursor="pointer",document.removeEventListener("mousemove",n.onDragging),document.removeEventListener("touchmove",n.onDragging),document.removeEventListener("mouseup",n.onDragEnd),document.removeEventListener("touchend",n.onDragEnd)},n}return oe(e,t),Object.defineProperty(e.prototype,"handleOffsetRatio",{get:function(){return this.ifHorizontal(.5,.5)},enumerable:!1,configurable:!0}),e.prototype.getBBox=function(){var t=this.attributes;return new EN(0,0,t.width,t.height)},e.prototype.render=function(t,e){var n=this,r=t.showLabel;this.renderTitle(m7(e));var i=this.availableSpace,o=i.x,a=i.y,l=m7(e).maybeAppendByClassName(kT.contentGroup,"g").styles({x:o,y:a});m6(!!r,l.maybeAppendByClassName(kT.labelGroup,"g").styles({zIndex:1}),function(t){n.renderLabel(t)});var s=l.maybeAppendByClassName(kT.ribbonGroup,"g").styles({zIndex:0});this.handlesGroup=l.maybeAppendByClassName(kT.handlesGroup,"g").styles({zIndex:2}),this.renderHandles(),this.renderRibbon(s),this.renderIndicator(l),this.adjustLabel(),this.adjustHandles()},Object.defineProperty(e.prototype,"range",{get:function(){var t,e=this.attributes,n=e.data,r=e.domain;return r?{min:r[0],max:r[1]}:(t=n,{min:Math.min.apply(Math,ou([],ol(t.map(function(t){return t.value})),!1)),max:Math.max.apply(Math,ou([],ol(t.map(function(t){return t.value})),!1))})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ribbonScale",{get:function(){var t=this.range,e=t.min,n=t.max;return this.innerRibbonScale.update({domain:[e,n],range:[0,1]}),this.innerRibbonScale},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ribbonRange",{get:function(){var t=ol(this.selection,2),e=t[0],n=t[1],r=this.ribbonScale;return[r.map(e),r.map(n)]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"selection",{get:function(){var t=this.range,e=t.min,n=t.max,r=this.attributes.defaultValue,i=ol(void 0===r?[e,n]:r,2);return[i[0],i[1]]},enumerable:!1,configurable:!0}),e.prototype.ifHorizontal=function(t,e){return kb(this.attributes.orientation,"function"==typeof t?t():t,"function"==typeof e?e():e)},e.prototype.renderTitle=function(t){var e=this.attributes,n=e.showTitle,r=e.titleText,i=e.width,o=e.height,a=wF(this.attributes,"title"),l=on(on({},a),{width:i,height:o,text:r}),s=this;t.selectAll(kT.title.class).data(n?[r]:[]).join(function(t){return t.append(function(){return new ED({style:l})}).attr("className",kT.title.name).each(function(){s.title=this})},function(t){return t.update(l)},function(t){return t.each(function(){s.title=void 0}).remove()})},Object.defineProperty(e.prototype,"availableSpace",{get:function(){if(this.title)return this.title.getAvailableSpace();var t=this.attributes;return new EN(0,0,t.width,t.height)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"labelFixedSpacing",{get:function(){return this.attributes.showTick?5:0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"labelPosition",{get:function(){var t=this.attributes,e=t.orientation,n=t.labelDirection;return({vertical:{positive:"right",negative:"left"},horizontal:{positive:"bottom",negative:"top"}})[e][n]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"labelBBox",{get:function(){if(!this.attributes.showLabel)return new EN(0,0,0,0);if(this.cacheLabelBBox)return this.cacheLabelBBox;var t,e=(null===(t=this.label.querySelector(wM.labelGroup.class))||void 0===t?void 0:t.children.slice(-1)[0]).getBBox(),n=e.width,r=e.height;return this.cacheLabelBBox=new EN(0,0,n,r),this.cacheLabelBBox},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"labelShape",{get:function(){var t=this.attributes,e=t.showLabel,n=t.labelSpacing;if(!e)return{width:0,height:0,size:0,length:0};var r=this.labelBBox,i=r.width,o=r.height,a=this.ifHorizontal(o,i)+(void 0===n?0:n)+this.labelFixedSpacing,l=this.ifHorizontal(i,o);return{width:i,height:o,size:a,length:l}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ribbonBBox",{get:function(){var t=this.attributes,e=t.showHandle,n=t.ribbonSize,r=this.availableSpace,i=r.width,o=r.height,a=this.labelShape,l=a.size,s=a.length,u=ol(this.ifHorizontal([o,i],[i,o]),2),c=u[0],f=u[1],p=e?this.handleShape:{size:0,length:0},h=p.size,d=p.length,y=this.handleOffsetRatio,g=0,v=this.labelPosition;g=n?n:["bottom","right"].includes(v)?Math.min(c-l,(c-h)/y):c*(1-y)>h?Math.max(c-l,0):Math.max((c-l-h)/y,0);var m=Math.max(d,s),b=f-m,x=ol(this.ifHorizontal([b,g],[g,b]),2),O=x[0],w=x[1],E=["top","left"].includes(v)?l:0,k=ol(this.ifHorizontal([m/2,E],[E,m/2]),2);return new EN(k[0],k[1],O,w)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ribbonShape",{get:function(){var t=this.ribbonBBox,e=t.width,n=t.height;return this.ifHorizontal({size:n,length:e},{size:e,length:n})},enumerable:!1,configurable:!0}),e.prototype.renderRibbon=function(t){var e=this.attributes,n=e.data,r=e.type,i=e.orientation,o=e.color,a=e.block,l=wF(this.attributes,"ribbon"),s=this.range,u=s.min,c=s.max,f=this.ribbonBBox,p=f.x,h=f.y,d=this.ribbonShape,y=m1({x:p,y:h,length:d.length,size:d.size,type:r,orientation:i,color:o,block:a,partition:n.map(function(t){return(t.value-u)/(c-u)}),range:this.ribbonRange},l);this.ribbon=t.maybeAppendByClassName(kT.ribbon,function(){return new Mb({style:y})}).update(y)},e.prototype.getHandleClassName=function(t){return"".concat(kT.prefix("".concat(t,"-handle")))},e.prototype.renderHandles=function(){var t=this.attributes,e=t.showHandle,n=t.orientation,r=wF(this.attributes,"handle"),i=ol(this.selection,2),o=i[0],a=i[1],l=on(on({},r),{orientation:n}),s=r.shape,u="basic"===(void 0===s?"slider":s)?k_:Md,c=this;this.handlesGroup.selectAll(kT.handle.class).data(e?[{value:o,type:"start"},{value:a,type:"end"}]:[],function(t){return t.type}).join(function(t){return t.append(function(){return new u({style:l})}).attr("className",function(t){var e=t.type;return"".concat(kT.handle," ").concat(c.getHandleClassName(e))}).each(function(t){var e=t.type,n=t.value;this.update({labelText:n}),c["".concat(e,"Handle")]=this,this.addEventListener("pointerdown",c.onDragStart(e))})},function(t){return t.update(l).each(function(t){var e=t.value;this.update({labelText:e})})},function(t){return t.each(function(t){var e=t.type;c["".concat(e,"Handle")]=void 0}).remove()})},e.prototype.adjustHandles=function(){var t=ol(this.selection,2),e=t[0],n=t[1];this.setHandlePosition("start",e),this.setHandlePosition("end",n)},e.prototype.adjustTitle=function(){var t=this.attributes,e=t.titlePosition,n=t.orientation,r=ol(this.getElementsByClassName(kT.title.name),1)[0],i=this.handlesGroup.select(".".concat(this.getHandleClassName("start"))).node();if(!!r&&!!i){if("top-left"===e&&"horizontal"===n){var o=ol(i.getLocalBounds().min,1)[0],a=ol(r.getLocalBounds().min,1)[0];r.style.x=+(this.style.x||0)+(o-a)}}},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 t=this.startHandle.getBBox(),e=t.width,n=t.height,r=this.endHandle.getBBox(),i=ol([Math.max(e,r.width),Math.max(n,r.height)],2),o=i[0],a=i[1];return this.cacheHandleBBox=new EN(0,0,o,a),this.cacheHandleBBox},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"handleShape",{get:function(){var t=this.handleBBox,e=t.width,n=t.height,r=ol(this.ifHorizontal([n,e],[e,n]),2);return{width:e,height:n,size:r[0],length:r[1]}},enumerable:!1,configurable:!0}),e.prototype.setHandlePosition=function(t,e){var n=this.attributes.handleFormatter,r=this.ribbonBBox,i=r.x,o=r.y,a=this.ribbonShape.size,l=this.getOffset(e),s=ol(this.ifHorizontal([i+l,o+a*this.handleOffsetRatio],[i+a*this.handleOffsetRatio,o+l]),2),u=s[0],c=s[1],f=this.handlesGroup.select(".".concat(this.getHandleClassName(t))).node();null==f||f.update({x:u,y:c,formatter:n})},e.prototype.renderIndicator=function(t){var e=wF(this.attributes,"indicator");this.indicator=t.maybeAppendByClassName(kT.indicator,function(){return new Ml({})}).update(e)},Object.defineProperty(e.prototype,"labelData",{get:function(){var t=this;return this.attributes.data.reduce(function(e,n,r,i){var o,a,l=null!==(o=null==n?void 0:n.id)&&void 0!==o?o:r.toString();if(e.push(on(on({},n),{id:l,index:r,type:"value",label:null!==(a=null==n?void 0:n.label)&&void 0!==a?a:n.value.toString(),value:t.ribbonScale.map(n.value)})),r<i.length-1){var s=i[r+1],u=ol([n.value,s.value],2),c=u[0],f=u[1],p=(c+f)/2;e.push(on(on({},n),{id:l,index:r,type:"range",range:[c,f],label:[c,f].join("~"),value:t.ribbonScale.map(p)}))}return e},[])},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"labelStyle",{get:function(){var t=ol(["center","middle"],2),e=t[0],n=t[1],r=this.labelPosition;return"top"===r?n="bottom":"bottom"===r?n="top":"left"===r?e="end":"right"===r&&(e="start"),{labelTextAlign:e,labelTextBaseline:n}},enumerable:!1,configurable:!0}),e.prototype.renderLabel=function(t){var e=this.attributes,n=e.showTick,r=e.labelFilter,i=e.labelFormatter,o=wF(this.attributes,"tick"),a=wF(this.attributes,"label"),l=a.align,s=m1(on({showLine:!1,showGrid:!1,showTick:void 0!==n&&n,type:"linear",startPos:[0,0],endPos:[0,0],tickDirection:"negative",labelTransform:"rotate(0)"},this.labelStyle),wz(o,"tick"),wz(a,"label"),{data:this.labelData}),u=on(on(on({},s),{tickFilter:function(t,e,n){return(null==t?void 0:t.type)==="value"&&(!r||r(t,t.index,n.filter(function(t){return"value"!==t.type})))},labelFilter:function(t,e,n){return(null==t?void 0:t.type)===l&&(!r||r(t,t.index,n.filter(function(t){return t.type===l})))},labelFormatter:i}),{labelOverlap:[{type:"hide"}]});this.label=t.maybeAppendByClassName(kT.label,function(){return new EB({style:u})}).node(),this.label.update(u,!1)},Object.defineProperty(e.prototype,"labelAxisStyle",{get:function(){var t=this.attributes,e=t.showTick,n=t.labelDirection,r=t.labelSpacing,i=t.tickLength,o=this.ribbonShape.size,a=this.labelPosition,l=this.labelFixedSpacing,s=ol([0,0,0],3),u=s[0],c=s[1],f=s[2],p=null!=i?i:o;if(e){f=p;"positive"===n?"right"===a?(u=p,f=p):"bottom"===a&&(u=f):"negative"===n&&("top"===a?u=o:"left"===a&&(u=o))}else"positive"===n?"right"===a||"bottom"===a&&(u=o+l):n;return{offset:u,spacing:r,tickLength:f}},enumerable:!1,configurable:!0}),e.prototype.adjustLabel=function(){if(this.attributes.showLabel){var t=this.ribbonBBox,e=t.x,n=t.y,r=t.width,i=t.height,o=this.labelAxisStyle,a=o.offset,l=o.spacing,s=o.tickLength,u=ol(this.ifHorizontal([[e,n+a],[e+r,n+a]],[[e+a,n+i],[e+a,n]]),2),c=u[0],f=u[1];this.label.update({startPos:c,endPos:f,tickLength:s,labelSpacing:l},!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(t,e){if(void 0===e&&(e="".concat(t)),!this.attributes.showIndicator||"number"!=typeof t){this.hideIndicator();return}var n=this.range,r=n.min,i=n.max,o=this.ribbonBBox,a=o.x,l=o.y,s=ky(t,r,i),u=this.getOffset(s),c=this.ifHorizontal([u+a,l],[a,u+l]);this.indicator.update({x:c[0],y:c[1],position:this.ifHorizontal("top","left"),labelText:e}),mU(this.indicator.node())},e.prototype.hideIndicator=function(){mq(this.indicator.node())},e.prototype.updateMouse=function(){this.attributes.slidable&&(this.style.cursor="grabbing")},e.prototype.setSelection=function(t,e){this.updateSelection(t,e)},e.prototype.updateSelection=function(t,e,n){void 0===n&&(n=!1);var r,i=ol(this.selection,2),o=i[0],a=i[1],l=ol([t,e],2),s=l[0],u=l[1];n&&(s+=o,u+=a);var c=this.range;s=(r=ol(function(t,e,n,r){void 0===r&&(r=4);var i,o=ol(t,2),a=o[0],l=o[1],s=ol(e,2),u=s[0],c=s[1],f=ol(n,2),p=f[0],h=f[1],d=ol([u,c],2),y=d[0],g=d[1],v=g-y;if(y>g&&(y=(i=ol([g,y],2))[0],g=i[1]),v>l-a)return[a,l];if(y<a)return p===a&&h===g?[a,g]:[a,v+a];if(g>l)return h===l&&p===y?[y,l]:[l-v,l];return[y,g]}([c.min,c.max],[s,u],this.selection),2))[0],u=r[1],this.update({defaultValue:[s,u]}),this.dispatchSelection()},Object.defineProperty(e.prototype,"step",{get:function(){var t=this.attributes.step,e=void 0===t?1:t,n=this.range,r=n.min,i=n.max;return void 0===e?Mr((i-r)*.01,0):e},enumerable:!1,configurable:!0}),e.prototype.getTickValue=function(t){var e,n,r,i,o=this.attributes,a=o.data,l=o.block,s=this.range.min;if(l)return My(a.map(function(t){return t.value}),t).tick;return e=t,n=this.step,i=Math.round((e-(r=s))/n),r+i*n},e.prototype.getValueByCanvasPoint=function(t,e){void 0===e&&(e=!1);var n=this.range,r=n.min,i=n.max,o=ol(this.ribbon.node().getPosition(),2),a=o[0],l=o[1],s=this.ifHorizontal(a,l),u=this.ifHorizontal.apply(this,ou([],ol(Mi(t)),!1));return ky(this.getOffset(u-s,!0),r,i)},e.prototype.getOffset=function(t,e){void 0===e&&(e=!1);var n=this.range,r=n.min,i=n.max,o=this.ribbonShape.length,a=this.eventToOffsetScale;return(a.update({domain:[r,i],range:[0,o]}),e)?a.invert(t):a.map(t)},e.prototype.dispatchSelection=function(){var t=new d_("valuechange",{detail:{value:this.selection}});this.dispatchEvent(t)},e.prototype.dispatchIndicated=function(t,e){var n=new d_("indicate",{detail:{value:t,range:e}});this.dispatchEvent(n)},e}(m4),MO=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function Mw(t){let{domain:e}=t.getOptions(),[n,r]=[e[0],gG(e)];return[n,r]}let ME=t=>{let{labelFormatter:e,layout:n,order:r,orientation:i,position:o,size:a,title:l,style:s,crossPadding:u,padding:c}=t,f=MO(t,["labelFormatter","layout","order","orientation","position","size","title","style","crossPadding","padding"]);return({scales:r,value:i,theme:a,scale:u})=>{let{bbox:c}=i,{x:p,y:h,width:d,height:y}=c,g=E9(o,n),{legendContinuous:v={}}=a,m=kr(Object.assign({},v,Object.assign(Object.assign({titleText:E8(l),labelAlign:"value",labelFormatter:"string"==typeof e?t=>ef(e)(t.label):e},function(t,e,n,r,i,o){let a=ke(t,"color"),l=function(t,e,n){let{size:r}=e,i=kn(t,e,n);return function(t,e,n){var r;if(t.size=e,"horizontal"===(r=n)||0===r)t.height=e;else t.width=e;return t}(i,r,i.orientation)}(n,r,i);if(a instanceof O6){let{range:t}=a.getOptions(),[e,n]=Mw(a);return a instanceof wt||a instanceof O9?function(t,e,n,r,i){var o;let a=e.thresholds;let l=(o=r,t=>({value:t/o,label:String(t)}));return Object.assign(Object.assign({},t),{color:i,data:[n,...a,r].map(l)})}(l,a,e,n,t):function(t,e,n){let r=[-1/0,...e.thresholds,1/0].map((t,e)=>({value:e,label:t}));return Object.assign(Object.assign({},t),{data:r,color:n,labelFilter:(t,e)=>e>0&&e<r.length-1})}(l,a,t)}let s=ke(t,"size");return function(t,e,n,r,i,o){let{length:a}=t,l=n||r,s=i.color?o.legendContinuous.ribbonFill||"black":o.color,u=e||function(t,e){let n=t.getOptions(),r=t.clone();return r.update(Object.assign(Object.assign({},n),{range:[pC(e).toString()]})),r}(l,s),[c,f]=Mw(u),[p,h]=Mw([e,n,r].filter(t=>void 0!==t).find(t=>!(t instanceof wo)));return Object.assign(Object.assign({},t),{domain:[p,h],data:u.getTicks().map(t=>({value:t})),color:Array(Math.floor(a)).fill(0).map((t,e)=>{let n=(f-c)/(a-1)*e+c,i=u.map(n)||s,o=r?r.map(n):1;return i.replace(/rgb[a]*\(([\d]{1,3}) *, *([\d]{1,3}) *, *([\d]{1,3})[\S\s]*\)/,(t,e,n,r)=>`rgba(${e}, ${n}, ${r}, ${o})`)})})}(l,a,s,ke(t,"opacity"),e,o)}(r,u,i,t,ME,a)),s),f)),b=new E7({style:Object.assign(Object.assign({x:p,y:h,width:d,height:y},g),{subOptions:m})});return b.appendChild(new Mx({className:"legend-continuous",style:m})),b}};ME.props={defaultPosition:"top",defaultOrientation:"vertical",defaultOrder:1,defaultSize:60,defaultLength:200,defaultLegendSize:60,defaultPadding:[20,10],defaultCrossPadding:[12,12]};let Mk=t=>()=>new yo;Mk.props={};var MM=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function MS(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"}}}let M_=(B={render(t,e){let{width:n,title:r,subtitle:i,spacing:o=2,align:a="left"}=t,l=MM(t,["width","title","subtitle","spacing","align"]),s=nc(l,"title"),u=nc(l,"subtitle"),c=E6(e,".title","text").attr("className","title").call(gH,Object.assign(Object.assign(Object.assign({},MS(0,0,n,a)),{fontSize:14,textBaseline:"top",text:r}),s)).node().getLocalBounds();E6(e,".sub-title","text").attr("className","sub-title").call(t=>{if(!i)return t.node().remove();t.node().attr(Object.assign(Object.assign(Object.assign({},MS(0,c.max[1]+o,n,a)),{fontSize:12,textBaseline:"top",text:i}),u))})}},class extends yr{constructor(t){super(t),this.descriptor=B}connectedCallback(){var t,e;null===(e=(t=this.descriptor).render)||void 0===e||e.call(t,this.attributes,this)}update(t={}){var e,n;this.attr(nt({},this.attributes,t)),null===(n=(e=this.descriptor).render)||void 0===n||n.call(e,this.attributes,this)}}),MP=t=>({value:e,theme:n})=>{let{x:r,y:i,width:o,height:a}=e.bbox;return new M_({style:nt({},n.title,Object.assign({x:r,y:i,width:o,height:a},t))})};function Mj({map:t,initKey:e},n){let r=e(n);return t.has(r)?t.get(r):n}MP.props={defaultPosition:"top",defaultOrder:2,defaultSize:36,defaultCrossPadding:[20,20],defaultPadding:[12,12]};function MA(t){return"object"==typeof t?t.valueOf():t}class MT extends Map{constructor(t){if(super(),this.map=new Map,this.initKey=MA,null!==t)for(let[e,n]of t)this.set(e,n)}get(t){return super.get(Mj({map:this.map,initKey:this.initKey},t))}has(t){return super.has(Mj({map:this.map,initKey:this.initKey},t))}set(t,e){return super.set(function({map:t,initKey:e},n){let r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}({map:this.map,initKey:this.initKey},t),e)}delete(t){return super.delete(function({map:t,initKey:e},n){let r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}({map:this.map,initKey:this.initKey},t))}}let MC=Symbol("defaultUnknown");function MN(t,e,n){for(let r=0;r<e.length;r+=1)!t.has(e[r])&&t.set(n(e[r]),r)}function ML(t){let{value:e,from:n,to:r,mapper:i,notFoundReturn:o}=t,a=i.get(e);if(void 0===a){if(o!==MC)return o;a=n.push(e)-1,i.set(e,a)}return r[a%r.length]}function MI(t){return t instanceof Date?t=>`${t}`:"object"==typeof t?t=>JSON.stringify(t):t=>t}class MR extends kU{getDefaultOptions(){return{domain:[],range:[],unknown:MC}}constructor(t){super(t)}map(t){return 0===this.domainIndexMap.size&&MN(this.domainIndexMap,this.getDomain(),this.domainKey),ML({value:this.domainKey(t),mapper:this.domainIndexMap,from:this.getDomain(),to:this.getRange(),notFoundReturn:this.options.unknown})}invert(t){return 0===this.rangeIndexMap.size&&MN(this.rangeIndexMap,this.getRange(),this.rangeKey),ML({value:this.rangeKey(t),mapper:this.rangeIndexMap,from:this.getRange(),to:this.getDomain(),notFoundReturn:this.options.unknown})}rescale(t){let[e]=this.options.domain,[n]=this.options.range;if(this.domainKey=MI(e),this.rangeKey=MI(n),!this.rangeIndexMap){this.rangeIndexMap=new Map,this.domainIndexMap=new Map;return}(!t||t.range)&&this.rangeIndexMap.clear(),(!t||t.domain||t.compare)&&(this.domainIndexMap.clear(),this.sortedDomain=void 0)}clone(){return new MR(this.options)}getRange(){return this.options.range}getDomain(){if(this.sortedDomain)return this.sortedDomain;let{domain:t,compare:e}=this.options;return this.sortedDomain=e?[...t].sort(e):t,this.sortedDomain}}class MD extends MR{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,paddingInner:0,paddingOuter:0,padding:0,unknown:MC,flex:[]}}constructor(t){super(t)}clone(){return new MD(this.options)}getStep(t){return void 0===this.valueStep?1:"number"==typeof this.valueStep?this.valueStep:void 0===t?Array.from(this.valueStep.values())[0]:this.valueStep.get(t)}getBandWidth(t){return void 0===this.valueBandWidth?1:"number"==typeof this.valueBandWidth?this.valueBandWidth:void 0===t?Array.from(this.valueBandWidth.values())[0]:this.valueBandWidth.get(t)}getRange(){return this.adjustedRange}getPaddingInner(){let{padding:t,paddingInner:e}=this.options;return t>0?t:e}getPaddingOuter(){let{padding:t,paddingOuter:e}=this.options;return t>0?t:e}rescale(){super.rescale();let{align:t,domain:e,range:n,round:r,flex:i}=this.options,{adjustedRange:o,valueBandWidth:a,valueStep:l}=function(t){var e;let n,r;let{domain:i}=t,o=i.length;if(0===o)return{valueBandWidth:void 0,valueStep:void 0,adjustedRange:[]};if(null===(e=t.flex)||void 0===e?void 0:e.length)return function(t){let{domain:e,range:n,paddingOuter:r,paddingInner:i,flex:o,round:a,align:l}=t,s=e.length,u=function(t,e){let n=e-t.length;return n>0?[...t,...Array(n).fill(1)]:n<0?t.slice(0,e):t}(o,s),[c,f]=n,p=f-c,h=p/(2/s*r+1-1/s*i),d=h*i/s,y=h-s*d,g=function(t){let e=Math.min(...t);return t.map(t=>t/e)}(u),v=y/g.reduce((t,e)=>t+e),m=new MT(e.map((t,e)=>{let n=g[e]*v;return[t,a?Math.floor(n):n]})),b=new MT(e.map((t,e)=>{let n=g[e]*v+d;return[t,a?Math.floor(n):n]})),x=Array.from(b.values()).reduce((t,e)=>t+e),O=p-(x-x/s*i),w=c+O*l,E=a?Math.round(w):w,k=Array(s);for(let t=0;t<s;t+=1){k[t]=Math.round(1e12*E)/1e12;let n=e[t];E+=b.get(n)}return{valueBandWidth:m,valueStep:b,adjustedRange:k}}(t);let{range:a,paddingOuter:l,paddingInner:s,round:u,align:c}=t,f=a[0],p=a[1]-f;n=p/Math.max(1,2*l+(o-s)),u&&(n=Math.floor(n)),f+=(p-n*(o-s))*c,r=n*(1-s),u&&(f=Math.round(f),r=Math.round(r));let h=Array(o).fill(0).map((t,e)=>f+e*n);return{valueStep:n,valueBandWidth:r,adjustedRange:h}}({align:t,range:n,round:r,flex:i,paddingInner:this.getPaddingInner(),paddingOuter:this.getPaddingOuter(),domain:e});this.valueStep=l,this.valueBandWidth=a,this.adjustedRange=o}}var MF=function(t){if("object"!=typeof t||null===t)return t;if(mJ(t)){e=[];for(var e,n=0,r=t.length;n<r;n++)"object"==typeof t[n]&&null!=t[n]?e[n]=MF(t[n]):e[n]=t[n]}else for(var i in e={},t)"object"==typeof t[i]&&null!=t[i]?e[i]=MF(t[i]):e[i]=t[i];return e},Mz=function(t){function e(e){var n=this,r=e.style,i=or(e,["style"]);return(n=t.call(this,ww({},{type:"column"},on({style:r},i)))||this).columnsGroup=new yo({name:"columns"}),n.appendChild(n.columnsGroup),n.render(),n}return oe(e,t),e.prototype.render=function(){var t=this.attributes.columns;m7(this.columnsGroup).selectAll(".column").data(t.flat()).join(function(t){return t.append("rect").attr("className","column").each(function(t){this.attr(t)})},function(t){return t.each(function(t){this.attr(t)})},function(t){return t.remove()})},e.prototype.update=function(t){this.attr(m1({},this.attributes,t)),this.render()},e.prototype.clear=function(){this.removeChildren()},e}(yt),MB=function(t){function e(e){var n=this,r=e.style,i=or(e,["style"]);return(n=t.call(this,ww({},{type:"lines"},on({style:r},i)))||this).linesGroup=n.appendChild(new yo),n.areasGroup=n.appendChild(new yo),n.render(),n}return oe(e,t),e.prototype.render=function(){var t=this.attributes,e=t.lines,n=t.areas;e&&this.renderLines(e),n&&this.renderAreas(n)},e.prototype.clear=function(){this.linesGroup.removeChildren(),this.areasGroup.removeChildren()},e.prototype.update=function(t){this.attr(m1({},this.attributes,t)),this.render()},e.prototype.renderLines=function(t){m7(this.linesGroup).selectAll(".line").data(t).join(function(t){return t.append("path").attr("className","line").each(function(t){this.attr(t)})},function(t){return t.each(function(t){this.attr(t)})},function(t){return t.remove()})},e.prototype.renderAreas=function(t){m7(this.linesGroup).selectAll(".area").data(t).join(function(t){return t.append("path").attr("className","area").each(function(t){this.attr(t)})},function(t){return t.each(function(t){this.style(t)})},function(t){return t.remove()})},e}(yt),MW=function(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)},M$=function(t,e){if(t===e)return!0;if(!t||!e||bi(t)||bi(e))return!1;if(MW(t)||MW(e)){if(t.length!==e.length)return!1;for(var n=!0,r=0;r<t.length&&(n=M$(t[r],e[r]));r++);return n}if(mX(t)||mX(e)){var i=Object.keys(t),o=Object.keys(e);if(i.length!==o.length)return!1;for(var n=!0,r=0;r<i.length&&(n=M$(t[i[r]],e[i[r]]));r++);return n}return!1};function MG(t,e){void 0===e&&(e=!1);var n=e?t.length-1:0,r=t.map(function(t,e){return ou([e===n?"M":"L"],ol(t),!1)});return e?r.reverse():r}function MV(t,e){if(void 0===e&&(e=!1),t.length<=2)return MG(t);for(var n=[],r=t.length,i=0;i<r;i+=1){var o=e?t[r-i-1]:t[i];!M$(o,n.slice(-2))&&n.push.apply(n,ou([],ol(o),!1))}var a=function(t,e,n){void 0===e&&(e=!1),void 0===n&&(n=[[0,0],[1,1]]);for(var r,i,o,a=!!e,l=[],s=0,u=t.length;s<u;s+=2)l.push([t[s],t[s+1]]);for(var c=function(t,e,n,r){var i,o,a,l,s,u,c=[],f=!!r,p=[1/0,1/0],h=[-1/0,-1/0];if(f){p=(i=ol(r,2))[0],h=i[1];for(var d=0,y=t.length;d<y;d+=1){var g=t[d];p=wj(p,g),h=wA(h,g)}}for(var d=0,v=t.length;d<v;d+=1){var g=t[d];if(0!==d||n){if(d!==v-1||n){o=t[[d?d-1:v-1,d-1][n?0:1]],a=t[n?(d+1)%v:d+1];var m=[0,0];m=wS(m=wP(a,o),.4);var b=wT(g,o),x=wT(g,a),O=b+x;0!==O&&(b/=O,x/=O);var w=wS(m,-b),E=wS(m,x);s=w_(g,w),l=wj(l=w_(g,E),wA(a,g)),w=wS(w=wP(l=wA(l,wj(a,g)),g),-b/x),s=wj(s=w_(g,w),wA(o,g)),s=wA(s,wj(o,g)),E=wS(E=wP(g,s),x/b),l=w_(g,E),f&&(s=wj(s=wA(s,p),h),l=wj(l=wA(l,p),h)),c.push(u),c.push(s),u=l}else s=g,c.push(u),c.push(s)}else u=g}return n&&c.push(c.shift()),c}(l,.4,a,n),f=l.length,p=[],s=0;s<f-1;s+=1)r=c[2*s],i=c[2*s+1],o=l[s+1],p.push(["C",r[0],r[1],i[0],i[1],o[0],o[1]]);return a&&(r=c[f],i=c[f+1],o=ol(l,1)[0],p.push(["C",r[0],r[1],i[0],i[1],o[0],o[1]])),p}(n,!1);return e?a.unshift(ou(["M"],ol(t[r-1]),!1)):a.unshift(ou(["M"],ol(t[0]),!1)),a}function MH(t,e,n){var r=MF(t);return r.push(["L",e,n],["L",0,n],["Z"]),r}var MU=function(t){if(!!mJ(t))return t.reduce(function(t,e){return Math.min(t,e)},t[0])},Mq=function(t,e){if(!!mJ(t)){for(var n,r=1/0,i=0;i<t.length;i++){var o=t[i],a=mH(e)?e(o):o[e];a<r&&(n=o,r=a)}return n}},MY=function(t){if(!!mJ(t))return t.reduce(function(t,e){return Math.max(t,e)},t[0])},MX=function(t,e){if(!!mJ(t)){for(var n,r=-1/0,i=0;i<t.length;i++){var o=t[i],a=mH(e)?e(o):o[e];a>r&&(n=o,r=a)}return n}};function MK(t){return 0===t.length?[0,0]:[MU(Mq(t,function(t){return MU(t)||0})),MY(MX(t,function(t){return MY(t)||0}))]}function MZ(t){for(var e=MF(t),n=e[0].length,r=ol([Array(n).fill(0),Array(n).fill(0)],2),i=r[0],o=r[1],a=0;a<e.length;a+=1){for(var l=e[a],s=0;s<n;s+=1)l[s]>=0?(l[s]+=i[s],i[s]=l[s]):(l[s]+=o[s],o[s]=l[s])}return e}var MQ=function(t){function e(e){return t.call(this,e,{type:"line",width:200,height:20,isStack:!1,color:["#83daad","#edbf45","#d2cef9","#e290b3","#6f63f4"],smooth:!0,lineLineWidth:1,areaOpacity:0,isGroup:!1,columnLineWidth:1,columnStroke:"#fff",scale:1,spacing:0})||this}return oe(e,t),Object.defineProperty(e.prototype,"rawData",{get:function(){var t=this.attributes.data;if(!t||(null==t?void 0:t.length)===0)return[[]];var e=MF(t);return wZ(e[0])?[e]:e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"data",{get:function(){return this.attributes.isStack?MZ(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 t=this.scales.y,e=ol(t.getOptions().domain||[0,0],2),n=e[0],r=e[1];return r<0?t.map(r):t.map(n<0?0:n)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"containerShape",{get:function(){var t=this.attributes;return{width:t.width,height:t.height}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"linesStyle",{get:function(){var t=this,e=this.attributes,n=e.type,r=e.isStack,i=e.smooth;if("line"!==n)throw Error("linesStyle can only be used in line type");var o=wF(this.attributes,"area"),a=wF(this.attributes,"line"),l=this.containerShape.width,s=this.data;if(0===s[0].length)return{lines:[],areas:[]};var u=this.scales,c=u.x,f=u.y;var p=(d=s,v=(y={type:"line",x:c,y:f}).x,x=(b=ol((m=y.y).getOptions().range||[0,0],2))[0],(O=b[1])>x&&(O=(g=ol([x,O],2))[0],x=g[1]),d.map(function(t){return t.map(function(t,e){return[v.map(e),ky(m.map(t),O,x)]})})),h=[];if(o){var d,y,g,v,m,b,x,O,w,E,k,M,S=this.baseline;if(r)h=i?function(t,e,n){for(var r=[],i=t.length-1;i>=0;i-=1){var o=t[i],a=MV(o),l=void 0;if(0===i)l=MH(a,e,n);else{var s=MV(t[i-1],!0),u=o[0];s[0][0]="L",l=ou(ou(ou([],ol(a),!1),ol(s),!1),[ou(["M"],ol(u),!1),["Z"]],!1)}r.push(l)}return r}(p,l,S):function(t,e,n){for(var r=[],i=t.length-1;i>=0;i-=1){var o=MG(t[i]),a=void 0;if(0===i)a=MH(o,e,n);else{var l=MG(t[i-1],!0);l[0][0]="L",a=ou(ou(ou([],ol(o),!1),ol(l),!1),[["Z"]],!1)}r.push(a)}return r}(p,l,S);else{;w=p,E=i,k=l,M=S,h=w.map(function(t){return MH(E?MV(t):MG(t),k,M)})}}return{lines:p.map(function(e,n){return on({stroke:t.getColor(n),path:i?MV(e):MG(e)},a)}),areas:h.map(function(e,n){return on({path:e,fill:t.getColor(n)},o)})}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"columnsStyle",{get:function(){var t=this,e=wF(this.attributes,"column"),n=this.attributes,r=n.isStack,i=n.type,o=n.scale;if("column"!==i)throw Error("columnsStyle can only be used in column type");var a=this.containerShape.height,l=this.rawData;if(!l)return{columns:[]};r&&(l=MZ(l));var s=this.createScales(l),u=s.x,c=s.y,f=ol(MK(l),2),p=f[0],h=new Mn({domain:[0,f[1]-(p>0?0:p)],range:[0,a*o]}),d=u.getBandWidth(),y=this.rawData;return{columns:l.map(function(n,i){return n.map(function(n,o){var a=d/l.length;return on(on({fill:t.getColor(i)},e),r?{x:u.map(o),y:c.map(n),width:d,height:h.map(y[i][o])}:{x:u.map(o)+a*i,y:n>=0?c.map(n):c.map(0),width:a,height:h.map(Math.abs(n))})})})}},enumerable:!1,configurable:!0}),e.prototype.render=function(t,e){(r=".container",i="rect",(n=e).querySelector(r)?m7(n).select(r):m7(n).append(i)).attr("className","container").node();var n,r,i,o=t.type,a="spark".concat(o),l="line"===o?this.linesStyle:this.columnsStyle;m7(e).selectAll(".spark").data([o]).join(function(t){return t.append(function(t){return"line"===t?new MB({className:a,style:l}):new Mz({className:a,style:l})}).attr("className","spark ".concat(a))},function(t){return t.update(l)},function(t){return t.remove()})},e.prototype.getColor=function(t){var e=this.attributes.color;return mJ(e)?e[t%e.length]:mH(e)?e.call(null,t):e},e.prototype.createScales=function(t){var e,n,r=this.attributes,i=r.type,o=r.scale,a=r.range,l=void 0===a?[]:a,s=r.spacing,u=this.containerShape,c=u.width,f=u.height,p=ol(MK(t),2),h=p[0],d=p[1],y=new Mn({domain:[null!==(e=l[0])&&void 0!==e?e:h,null!==(n=l[1])&&void 0!==n?n:d],range:[f,f*(1-o)]});return"line"===i?{type:i,x:new Mn({domain:[0,t[0].length-1],range:[0,c]}),y:y}:{type:i,x:new MD({domain:t[0].map(function(t,e){return e}),range:[0,c],paddingInner:s,paddingOuter:s/2,align:.5}),y:y}},e.tag="sparkline",e}(m4),MJ=function(t){function e(e){var n=t.call(this,e,on(on(on({animate:{duration:100,fill:"both"},brushable:!0,formatter:function(t){return t.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},wz(Mc,"handle")),wz(Ms,"handleIcon")),wz(Mu,"handleLabel")))||this;return n.range=[0,1],n.onDragStart=function(t){return function(e){e.stopPropagation(),n.target=t,n.prevPos=n.getOrientVal(Mi(e));var r=n.availableSpace,i=r.x,o=r.y,a=n.getBBox(),l=a.x,s=a.y;n.selectionStartPos=n.getRatio(n.prevPos-n.getOrientVal([i,o])-n.getOrientVal([+l,+s])),n.selectionWidth=0,document.addEventListener("pointermove",n.onDragging),document.addEventListener("pointerup",n.onDragEnd)}},n.onDragging=function(t){var e=n.attributes,r=e.slidable,i=e.brushable,o=e.type;t.stopPropagation();var a=n.getOrientVal(Mi(t)),l=a-n.prevPos;if(l){var s=n.getRatio(l);switch(n.target){case"start":r&&n.setValuesOffset(s);break;case"end":r&&n.setValuesOffset(0,s);break;case"selection":r&&n.setValuesOffset(s,s);break;case"track":if(!i)return;n.selectionWidth+=s,"range"===o?n.innerSetValues([n.selectionStartPos,n.selectionStartPos+n.selectionWidth].sort(),!0):n.innerSetValues([0,n.selectionStartPos+n.selectionWidth],!0)}n.prevPos=a}},n.onDragEnd=function(){document.removeEventListener("pointermove",n.onDragging),document.removeEventListener("pointermove",n.onDragging),document.removeEventListener("pointerup",n.onDragEnd),n.target="",n.updateHandlesPosition(!1)},n.onValueChange=function(t){var e=n.attributes,r=e.onChange,i=e.type,o="range"===i?t:t[1],a="range"===i?n.getValues():n.getValues()[1],l=new d_("valuechange",{detail:{oldValue:o,value:a}});n.dispatchEvent(l),null==r||r(a)},n.selectionStartPos=0,n.selectionWidth=0,n.prevPos=0,n.target="",n}return oe(e,t),Object.defineProperty(e.prototype,"values",{get:function(){return this.attributes.values},set:function(t){this.attributes.values=this.clampValues(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sparklineStyle",{get:function(){if("horizontal"!==this.attributes.orientation)return null;var t=wF(this.attributes,"sparkline");return on(on({zIndex:0},this.availableSpace),t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"shape",{get:function(){var t=this.attributes,e=t.trackLength,n=t.trackSize,r=ol(this.getOrientVal([[e,n],[n,e]]),2);return{width:r[0],height:r[1]}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"availableSpace",{get:function(){var t=ol(Ep(this.attributes.padding),4),e=t[0],n=t[1],r=t[2],i=t[3],o=this.shape;return{x:i,y:e,width:o.width-(i+n),height:o.height-(e+r)}},enumerable:!1,configurable:!0}),e.prototype.getValues=function(){return this.values},e.prototype.setValues=function(t,e){void 0===t&&(t=[0,0]),void 0===e&&(e=!1),this.attributes.values=t;var n=!1!==e&&this.attributes.animate;this.updateSelectionArea(n),this.updateHandlesPosition(n)},e.prototype.updateSelectionArea=function(t){var e=this.calcSelectionArea();this.foregroundGroup.selectAll(Mf.selection.class).each(function(n,r){wO(this,e[r],t)})},e.prototype.updateHandlesPosition=function(t){this.attributes.showHandle&&(this.startHandle&&wO(this.startHandle,this.getHandleStyle("start"),t),this.endHandle&&wO(this.endHandle,this.getHandleStyle("end"),t))},e.prototype.innerSetValues=function(t,e){void 0===t&&(t=[0,0]),void 0===e&&(e=!1);var n=this.values,r=this.clampValues(t);this.attributes.values=r,this.setValues(r),e&&this.onValueChange(n)},e.prototype.renderTrack=function(t){var e=wF(this.attributes,"track");this.trackShape=m7(t).maybeAppendByClassName(Mf.track,"rect").styles(on(on({},this.shape),e))},e.prototype.renderBrushArea=function(t){var e=this.attributes.brushable;this.brushArea=m7(t).maybeAppendByClassName(Mf.brushArea,"rect").styles(on({fill:"transparent",cursor:e?"crosshair":"default"},this.shape))},e.prototype.renderSparkline=function(t){var e=this;m6("horizontal"===this.attributes.orientation,m7(t).maybeAppendByClassName(Mf.sparklineGroup,"g"),function(t){var n=e.sparklineStyle;t.maybeAppendByClassName(Mf.sparkline,function(){return new MQ({style:n})}).update(n)})},e.prototype.renderHandles=function(){var t,e=this,n=this.attributes,r=n.showHandle,i=n.type,o=this;null===(t=this.foregroundGroup)||void 0===t||t.selectAll(Mf.handle.class).data((r?"range"===i?["start","end"]:["end"]:[]).map(function(t){return{type:t}}),function(t){return t.type}).join(function(t){return t.append(function(t){var n=t.type;return new Md({style:e.getHandleStyle(n)})}).each(function(t){var e=t.type;this.attr("class","".concat(Mf.handle.name," ").concat(e,"-handle")),o["".concat(e,"Handle")]=this,this.addEventListener("pointerdown",o.onDragStart(e))})},function(t){return t.each(function(t){var e=t.type;this.update(o.getHandleStyle(e))})},function(t){return t.each(function(t){var e=t.type;o["".concat(e,"Handle")]=void 0}).remove()})},e.prototype.renderSelection=function(t){var e=this.attributes,n=e.type,r=e.selectionType;this.foregroundGroup=m7(t).maybeAppendByClassName(Mf.foreground,"g");var i=wF(this.attributes,"selection"),o=function(t){return t.style("visibility",function(t){return t.show?"visible":"hidden"}).style("cursor",function(t){return"select"===r?"grab":"invert"===r?"crosshair":"default"}).styles(i)},a=this;this.foregroundGroup.selectAll(Mf.selection.class).data("value"===n?[]:this.calcSelectionArea().map(function(t,e){return{style:on({},t),index:e,show:"select"===r?1===e:1!==e}}),function(t){return t.index}).join(function(t){return t.append("rect").attr("className",Mf.selection.name).call(o).each(function(t,e){var n=this;1===e?(a.selectionShape=m7(this),this.on("pointerdown",function(t){n.attr("cursor","grabbing"),a.onDragStart("selection")(t)}),a.dispatchCustomEvent(this,"pointerenter","selectionMouseenter"),a.dispatchCustomEvent(this,"pointerleave","selectionMouseleave"),a.dispatchCustomEvent(this,"click","selectionClick"),this.addEventListener("pointerdown",function(){n.attr("cursor","grabbing")}),this.addEventListener("pointerup",function(){n.attr("cursor","pointer")}),this.addEventListener("pointerover",function(){n.attr("cursor","pointer")})):this.on("pointerdown",a.onDragStart("track"))})},function(t){return t.call(o)},function(t){return t.remove()}),this.updateSelectionArea(!1),this.renderHandles()},e.prototype.render=function(t,e){this.renderTrack(e),this.renderSparkline(e),this.renderBrushArea(e),this.renderSelection(e)},e.prototype.clampValues=function(t,e){void 0===e&&(e=4);var n,r=ol(this.range,2),i=r[0],o=r[1],a=ol(this.getValues().map(function(t){return Mr(t,e)}),2),l=a[0],s=a[1],u=ol(((Array.isArray(t)?t:[l,null!=t?t:s])||[l,s]).map(function(t){return Mr(t,e)}),2),c=u[0],f=u[1];if("value"===this.attributes.type)return[0,ky(f,i,o)];c>f&&(c=(n=ol([f,c],2))[0],f=n[1]);var p=f-c;if(p>o-i)return[i,o];if(c<i)return l===i&&s===f?[i,f]:[i,p+i];if(f>o)return s===o&&l===c?[c,o]:[o-p,o];return[c,f]},e.prototype.calcSelectionArea=function(t){var e=ol(this.clampValues(t),2),n=e[0],r=e[1],i=this.availableSpace,o=i.x,a=i.y,l=i.width,s=i.height;return this.getOrientVal([[{y:a,height:s,x:o,width:n*l},{y:a,height:s,x:n*l+o,width:(r-n)*l},{y:a,height:s,x:r*l,width:(1-r)*l}],[{x:o,width:l,y:a,height:n*s},{x:o,width:l,y:n*s+a,height:(r-n)*s},{x:o,width:l,y:r*s,height:(1-r)*s}]])},e.prototype.calcHandlePosition=function(t){var e=this.attributes.handleIconOffset,n=this.availableSpace,r=n.x,i=n.y,o=n.width,a=n.height,l=ol(this.clampValues(),2),s=l[0],u=l[1],c=("start"===t?s:u)*this.getOrientVal([o,a])+("start"===t?-e:e);return{x:r+this.getOrientVal([c,o/2]),y:i+this.getOrientVal([a/2,c])}},e.prototype.inferTextStyle=function(t){return"horizontal"===this.attributes.orientation?{}:"start"===t?{transform:"rotate(90)",textAlign:"start"}:"end"===t?{transform:"rotate(90)",textAlign:"end"}:{}},e.prototype.calcHandleText=function(t){var e,n=this.attributes,r=n.type,i=n.orientation,o=n.formatter,a=n.autoFitLabel,l=wF(this.attributes,"handle"),s=wF(l,"label"),u=l.spacing,c=this.getHandleSize(),f=this.clampValues(),p=o("start"===t?f[0]:f[1]),h=new m8({style:on(on(on({},s),this.inferTextStyle(t)),{text:p})}),d=h.getBBox(),y=d.width,g=d.height;if(h.destroy(),!a){if("value"===r)return{text:p,x:0,y:-g-u};var v=u+c+("horizontal"===i?y/2:0);return(e={text:p})["horizontal"===i?"x":"y"]="start"===t?-v:v,e}var m=0,b=0,x=this.availableSpace,O=x.width,w=x.height,E=this.calcSelectionArea()[1],k=E.x,M=E.y,S=E.width,_=E.height,P=u+c;if("horizontal"===i){var j=P+y/2;m="start"===t?k-P-y>0?-j:j:O-k-S-P>y?j:-j}else{var A=g+P;b="start"===t?M-c>g?-A:P:w-(M+_)-c>g?A:-P}return{x:m,y:b,text:p}},e.prototype.getHandleLabelStyle=function(t){var e=wF(this.attributes,"handleLabel");return on(on(on({},e),this.calcHandleText(t)),this.inferTextStyle(t))},e.prototype.getHandleIconStyle=function(){var t=this.attributes.handleIconShape,e=wF(this.attributes,"handleIcon"),n=this.getOrientVal(["ew-resize","ns-resize"]),r=this.getHandleSize();return on({cursor:n,shape:t,size:r},e)},e.prototype.getHandleStyle=function(t){var e=this.attributes,n=e.showLabel,r=e.showLabelOnInteraction,i=e.orientation,o=this.calcHandlePosition(t),a=this.calcHandleText(t),l=n;return!n&&r&&(l=!!this.target||!1),on(on(on(on({},wz(this.getHandleIconStyle(),"icon")),wz(on(on({},this.getHandleLabelStyle(t)),a),"label")),o),{orientation:i,showLabel:l,type:t,zIndex:3})},e.prototype.getHandleSize=function(){var t=this.attributes,e=t.handleIconSize,n=t.width,r=t.height;return e?e:Math.floor((this.getOrientVal([+r,+n])+4)/2.4)},e.prototype.getOrientVal=function(t){var e=ol(t,2),n=e[0],r=e[1];return"horizontal"===this.attributes.orientation?n:r},e.prototype.setValuesOffset=function(t,e,n){void 0===e&&(e=0),void 0===n&&(n=!1);var r=this.attributes.type,i=ol(this.getValues(),2),o=i[0],a=i[1],l=[o+("range"===r?t:0),a+e].sort();n?this.setValues(l):this.innerSetValues(l,!0)},e.prototype.getRatio=function(t){var e=this.availableSpace,n=e.width,r=e.height;return t/this.getOrientVal([n,r])},e.prototype.dispatchCustomEvent=function(t,e,n){var r=this;t.on(e,function(t){t.stopPropagation(),r.dispatchEvent(new d_(n,{detail:t}))})},e.prototype.bindEvents=function(){this.addEventListener("wheel",this.onScroll);var t=this.brushArea;this.dispatchCustomEvent(t,"click","trackClick"),this.dispatchCustomEvent(t,"pointerenter","trackMouseenter"),this.dispatchCustomEvent(t,"pointerleave","trackMouseleave"),t.on("pointerdown",this.onDragStart("track"))},e.prototype.onScroll=function(t){if(this.attributes.scrollable){var e=t.deltaX,n=t.deltaY,r=this.getRatio(n||e);this.setValuesOffset(r,r,!0)}},e.tag="slider",e}(m4);function M0(t,e){return null==t||null==e?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function M1(t,e){return null==t||null==e?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function M2(t){let e,n,r;function i(t,r,o=0,a=t.length){if(o<a){if(0!==e(r,r))return a;do{let e=o+a>>>1;0>n(t[e],r)?o=e+1:a=e}while(o<a)}return o}return 2!==t.length?(e=M0,n=(e,n)=>M0(t(e),n),r=(e,n)=>t(e)-n):(e=t===M0||t===M1?t:M5,n=t,r=t),{left:i,center:function(t,e,n=0,o=t.length){let a=i(t,e,n,o-1);return a>n&&r(t[a-1],e)>-r(t[a],e)?a-1:a},right:function(t,r,i=0,o=t.length){if(i<o){if(0!==e(r,r))return o;do{let e=i+o>>>1;0>=n(t[e],r)?i=e+1:o=e}while(i<o)}return i}}}function M5(){return 0}function M3(t){return null===t?NaN:+t}let M4=M2(M0),M6=M4.right,M8=M4.left,M9=M2(M3).center;function M7(t,...e){if("function"!=typeof t[Symbol.iterator])throw TypeError("values is not iterable");t=Array.from(t);let[n]=e;if(n&&2!==n.length||e.length>1){var r;let i=Uint32Array.from(t,(t,e)=>e);return e.length>1?(e=e.map(e=>t.map(e)),i.sort((t,n)=>{for(let r of e){let e=Se(r[t],r[n]);if(e)return e}})):(n=t.map(n),i.sort((t,e)=>Se(n[t],n[e]))),r=t,Array.from(i,t=>r[t])}return t.sort(St(n))}function St(t=M0){if(t===M0)return Se;if("function"!=typeof t)throw TypeError("compare is not a function");return(e,n)=>{let r=t(e,n);return r||0===r?r:(0===t(n,n))-(0===t(e,e))}}function Se(t,e){return(null==t||!(t>=t))-(null==e||!(e>=e))||(t<e?-1:t>e?1:0)}function Sn(t){return!!t.getBandWidth}function Sr(t,e,n){var r;if(!Sn(t))return t.invert(e);let{adjustedRange:i}=t,{domain:o}=t.getOptions(),a=t.getStep();let l=(r=M8(n?i:i.map(t=>t+a),e)+(n?-1:0),Math.min(o.length-1,Math.max(0,r)));return o[l]}function Si(t,e,n){if(!e)return t.getOptions().domain;if(!Sn(t)){let r=M7(e);if(!n)return r;let[i]=r,{range:o}=t.getOptions(),[a,l]=o,s=t.invert(t.map(i)+(a>l?-1:1)*n);return[i,s]}let{domain:r}=t.getOptions(),i=e[0],o=r.indexOf(i);if(n){let t=o+Math.round(r.length*n);return r.slice(o,t)}let a=e[e.length-1],l=r.indexOf(a);return r.slice(o,l+1)}function So(t,e,n,r,i,o){let{x:a,y:l}=i,s=(t,e)=>{let[n,r]=o.invert(t);return[Sr(a,n,e),Sr(l,r,e)]},u=s([t,e],!0),c=s([n,r],!1),f=Si(a,[u[0],c[0]]);return[f,Si(l,[u[1],c[1]])]}function Sa(t,e){let n,[r,i]=t;return[e.map(r),e.map(i)+((n=e).getStep?n.getStep():0)]}var Sl=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let Ss=t=>{let{orientation:e,labelFormatter:n,size:r,style:i={},position:o}=t,a=Sl(t,["orientation","labelFormatter","size","style","position"]);return r=>{var l;let{scales:[s],value:u,theme:c,coordinate:f}=r,{bbox:p}=u,{width:h,height:d}=p,{slider:y={}}=c,g=(null===(l=s.getFormatter)||void 0===l?void 0:l.call(s))||(t=>t+""),v="string"==typeof n?ef(n):n,m="horizontal"===e,b=s1(f)&&m,{trackSize:x=y.trackSize}=i,[O,w]=function(t,e,n){let{x:r,y:i,width:o,height:a}=t;return"left"===e?[r+o-n,i]:"right"===e||"bottom"===e?[r,i]:"top"===e?[r,i+a-n]:void 0}(p,o,x);return new MJ({className:"slider",style:Object.assign({},y,Object.assign(Object.assign({x:O,y:w,trackLength:m?h:d,orientation:e,formatter:t=>(v||g)(Sr(s,b?1-t:t,!0)),sparklineData:function(t,e){let{markState:n}=e;return e8(t.sparklineData)?t.sparklineData:function(t,e){let[n]=Array.from(t.entries()).filter(([t])=>"line"===t.type||"area"===t.type).map(([t])=>{let{encode:n,slider:r}=t;if((null==r?void 0:r.x)&&0===Object.keys(r.x).length)return Object.fromEntries(e.map(t=>{let e=n[t];return[t,e?e.value:void 0]}))});return(null==n?void 0:n.series)?Object.values(n.series.reduce((t,e,r)=>(t[e]=t[e]||[],t[e].push(n.y[r]),t),{})):null==n?void 0:n.y}(n,["y","series"])}(t,r)},i),a))})}};Ss.props={defaultPosition:"bottom",defaultSize:24,defaultOrder:1,defaultCrossPadding:[12,12],defaultPadding:[12,12]};let Su=t=>Ss(Object.assign(Object.assign({},t),{orientation:"horizontal"}));Su.props=Object.assign(Object.assign({},Ss.props),{defaultPosition:"bottom"});let Sc=t=>Ss(Object.assign(Object.assign({},t),{orientation:"vertical"}));Sc.props=Object.assign(Object.assign({},Ss.props),{defaultPosition:"left"});var Sf=function(t){function e(e){var n=t.call(this,e,{isRound:!0,orientation:"vertical",padding:[2,2,2,2],scrollable:!0,slidable:!0,thumbCursor:"default",trackSize:10,value:0})||this;return n.range=[0,1],n.onValueChange=function(t){var e=n.attributes.value;if(t!==e){var r={detail:{oldValue:t,value:e}};n.dispatchEvent(new d_("scroll",r)),n.dispatchEvent(new d_("valuechange",r))}},n.onTrackClick=function(t){if(n.attributes.slidable){var e=ol(n.getLocalPosition(),2),r=e[0],i=e[1],o=ol(n.padding,4),a=o[0],l=o[3],s=n.getOrientVal([r+l,i+a]),u=(n.getOrientVal(Mi(t))-s)/n.trackLength;n.setValue(u,!0)}},n.onThumbMouseenter=function(t){n.dispatchEvent(new d_("thumbMouseenter",{detail:t.detail}))},n.onTrackMouseenter=function(t){n.dispatchEvent(new d_("trackMouseenter",{detail:t.detail}))},n.onThumbMouseleave=function(t){n.dispatchEvent(new d_("thumbMouseleave",{detail:t.detail}))},n.onTrackMouseleave=function(t){n.dispatchEvent(new d_("trackMouseleave",{detail:t.detail}))},n}return oe(e,t),Object.defineProperty(e.prototype,"padding",{get:function(){return Ep(this.attributes.padding)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){var t=this.attributes.value,e=ol(this.range,2);return ky(t,e[0],e[1])},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"trackLength",{get:function(){var t=this.attributes,e=t.viewportLength,n=t.trackLength;return void 0===n?e:n},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"availableSpace",{get:function(){var t=this.attributes.trackSize,e=this.trackLength,n=ol(this.padding,4),r=n[0],i=n[1],o=n[2],a=n[3],l=ol(this.getOrientVal([[e,t],[t,e]]),2);return{x:a,y:r,width:+l[0]-(a+i),height:+l[1]-(r+o)}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"trackRadius",{get:function(){var t=this.attributes,e=t.isRound,n=t.trackSize;return e?n/2:0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"thumbRadius",{get:function(){var t=this.attributes,e=t.isRound,n=t.thumbRadius;if(!e)return 0;var r=this.availableSpace,i=r.width,o=r.height;return n||this.getOrientVal([o,i])/2},enumerable:!1,configurable:!0}),e.prototype.getValues=function(t){void 0===t&&(t=this.value);var e=this.attributes,n=e.viewportLength/e.contentLength,r=ol(this.range,2),i=r[0],o=t*(r[1]-i-n);return[o,o+n]},e.prototype.getValue=function(){return this.value},e.prototype.renderSlider=function(t){var e=this.attributes,n=e.orientation,r=e.trackSize,i=e.padding,o=e.slidable,a=wF(this.attributes,"track"),l=wF(this.attributes,"thumb"),s=on(on({brushable:!1,orientation:n,padding:i,selectionRadius:this.thumbRadius,showHandle:!1,slidable:o,trackLength:this.trackLength,trackRadius:this.trackRadius,trackSize:r,values:this.getValues()},wz(a,"track")),wz(l,"selection"));this.slider=m7(t).maybeAppendByClassName("scrollbar",function(){return new MJ({style:s})}).update(s).node()},e.prototype.render=function(t,e){this.renderSlider(e)},e.prototype.setValue=function(t,e){void 0===e&&(e=!1);var n=this.attributes.value,r=ol(this.range,2),i=r[0],o=r[1];this.slider.setValues(this.getValues(ky(t,i,o)),e),this.onValueChange(n)},e.prototype.bindEvents=function(){var t=this;this.slider.addEventListener("trackClick",function(e){e.stopPropagation(),t.onTrackClick(e.detail)}),this.onHover()},e.prototype.getOrientVal=function(t){return"horizontal"===this.attributes.orientation?t[0]:t[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}(m4),Sp=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let Sh=t=>{let{orientation:e,labelFormatter:n,style:r}=t,i=Sp(t,["orientation","labelFormatter","style"]);return({scales:[t],value:n,theme:o})=>{let{bbox:a}=n,{x:l,y:s,width:u,height:c}=a,{scrollbar:f={}}=o,{ratio:p,range:h}=t.getOptions(),d="horizontal"===e?u:c,y=d/p,[g,v]=h;return new Sf({className:"g2-scrollbar",style:Object.assign({},f,Object.assign(Object.assign(Object.assign(Object.assign({},r),{x:l,y:s,trackLength:d,value:v>g?0:1}),i),{orientation:e,contentLength:y,viewportLength:d}))})}};Sh.props={defaultPosition:"bottom",defaultSize:24,defaultOrder:1,defaultCrossPadding:[12,12],defaultPadding:[12,12]};let Sd=t=>Sh(Object.assign(Object.assign({},t),{orientation:"horizontal"}));Sd.props=Object.assign(Object.assign({},Sh.props),{defaultPosition:"bottom"});let Sy=t=>Sh(Object.assign(Object.assign({},t),{orientation:"vertical"}));Sy.props=Object.assign(Object.assign({},Sh.props),{defaultPosition:"left"});let Sg=(t,e)=>{let{coordinate:n}=e;return(e,r,i)=>{let[o]=e,{transform:a="",fillOpacity:l=1,strokeOpacity:s=1,opacity:u=1}=o.style,[c,f]=s1(n)?["left bottom","scale(1, 0.0001)"]:["left top","scale(0.0001, 1)"],p=[{transform:`${a} ${f}`.trimStart(),transformOrigin:c,fillOpacity:0,strokeOpacity:0,opacity:0},{transform:`${a} ${f}`.trimStart(),transformOrigin:c,fillOpacity:l,strokeOpacity:s,opacity:u,offset:.01},{transform:`${a} scale(1, 1)`.trimStart(),transformOrigin:c,fillOpacity:l,strokeOpacity:s,opacity:u}];return o.animate(p,Object.assign(Object.assign({},i),t))}},Sv=(t,e)=>{let{coordinate:n}=e;return(e,r,i)=>{let[o]=e,{transform:a="",fillOpacity:l=1,strokeOpacity:s=1,opacity:u=1}=o.style,[c,f]=s1(n)?["left bottom","scale(1, 0.0001)"]:["left top","scale(0.0001, 1)"],p=[{transform:`${a} scale(1, 1)`.trimStart(),transformOrigin:c},{transform:`${a} ${f}`.trimStart(),transformOrigin:c,fillOpacity:l,strokeOpacity:s,opacity:u,offset:.99},{transform:`${a} ${f}`.trimStart(),transformOrigin:c,fillOpacity:0,strokeOpacity:0,opacity:0}];return o.animate(p,Object.assign(Object.assign({},i),t))}},Sm=(t,e)=>{let{coordinate:n}=e;return ye({name:"scaleInYRadius",inherits:!1,initialValue:"",interpolable:!0,syntax:et.NUMBER}),(e,r,i)=>{let[o]=e;return s2(n)?(e=>{let{__data__:r,style:o}=e,{radius:a=0,inset:l=0,fillOpacity:s=1,strokeOpacity:u=1,opacity:c=1}=o,{points:f,y:p,y1:h}=r,d=gX(n,f,[p,h]),{innerRadius:y,outerRadius:g}=d,v=s0().cornerRadius(a).padAngle(l*Math.PI/180),m=new yu({}),b=n.getCenter(),x=t=>{m.attr({d:v(t),transform:`translate(${b[0]}, ${b[1]})`});let e=ht(m);return m.style.transform="",e},O=e.animate([{scaleInYRadius:y+1e-4,fillOpacity:0,strokeOpacity:0,opacity:0},{scaleInYRadius:y+1e-4,fillOpacity:s,strokeOpacity:u,opacity:c,offset:.01},{scaleInYRadius:g,fillOpacity:s,strokeOpacity:u,opacity:c}],Object.assign(Object.assign({},i),t));return O.onframe=function(){e.style.path=x(Object.assign(Object.assign({},d),{outerRadius:Number(e.style.scaleInYRadius)}))},O.onfinish=function(){e.style.path=x(Object.assign(Object.assign({},d),{outerRadius:g}))},O})(o):(e=>{let{style:r}=e,{transform:o="",fillOpacity:a=1,strokeOpacity:l=1,opacity:s=1}=r,[u,c]=s1(n)?["left top","scale(0.0001, 1)"]:["left bottom","scale(1, 0.0001)"],f=[{transform:`${o} ${c}`.trimStart(),transformOrigin:u,fillOpacity:0,strokeOpacity:0,opacity:0},{transform:`${o} ${c}`.trimStart(),transformOrigin:u,fillOpacity:a,strokeOpacity:l,opacity:s,offset:.01},{transform:`${o} scale(1, 1)`.trimStart(),transformOrigin:u,fillOpacity:a,strokeOpacity:l,opacity:s}];return e.animate(f,Object.assign(Object.assign({},i),t))})(o)}},Sb=(t,e)=>{let{coordinate:n}=e;return(e,r,i)=>{let[o]=e,{transform:a="",fillOpacity:l=1,strokeOpacity:s=1,opacity:u=1}=o.style,[c,f]=s1(n)?["left top","scale(0.0001, 1)"]:["left bottom","scale(1, 0.0001)"],p=[{transform:`${a} scale(1, 1)`.trimStart(),transformOrigin:c},{transform:`${a} ${f}`.trimStart(),transformOrigin:c,fillOpacity:l,strokeOpacity:s,opacity:u,offset:.99},{transform:`${a} ${f}`.trimStart(),transformOrigin:c,fillOpacity:0,strokeOpacity:0,opacity:0}];return o.animate(p,Object.assign(Object.assign({},i),t))}},Sx=(t,e)=>{ye({name:"waveInArcAngle",inherits:!1,initialValue:"",interpolable:!0,syntax:et.NUMBER});let{coordinate:n}=e;return(r,i,o)=>{let[a]=r;if(!s2(n))return Sg(t,e)(r,i,o);let l=n.getCenter(),{__data__:s,style:u}=a,{radius:c=0,inset:f=0,fillOpacity:p=1,strokeOpacity:h=1,opacity:d=1}=u,{points:y,y:g,y1:v}=s,m=s0().cornerRadius(c).padAngle(f*Math.PI/180),b=gX(n,y,[g,v]),{startAngle:x,endAngle:O}=b,w=new yu({}),E=t=>{w.attr({d:m(t),transform:`translate(${l[0]}, ${l[1]})`});let e=ht(w);return w.style.transform="",e},k=a.animate([{waveInArcAngle:x+1e-4,fillOpacity:0,strokeOpacity:0,opacity:0},{waveInArcAngle:x+1e-4,fillOpacity:p,strokeOpacity:h,opacity:d,offset:.01},{waveInArcAngle:O,fillOpacity:p,strokeOpacity:h,opacity:d}],Object.assign(Object.assign({},o),t));return k.onframe=function(){a.style.path=E(Object.assign(Object.assign({},b),{endAngle:Number(a.style.waveInArcAngle)}))},k.onfinish=function(){a.style.path=E(Object.assign(Object.assign({},b),{endAngle:O}))},k}};Sx.props={};let SO=t=>(e,n,r)=>{let[i]=e,{fillOpacity:o=1,strokeOpacity:a=1,opacity:l=1}=i.style;return i.animate([{fillOpacity:0,strokeOpacity:0,opacity:0},{fillOpacity:o,strokeOpacity:a,opacity:l}],Object.assign(Object.assign({},r),t))};SO.props={};let Sw=t=>(e,n,r)=>{let[i]=e,{fillOpacity:o=1,strokeOpacity:a=1,opacity:l=1}=i.style;return i.animate([{fillOpacity:o,strokeOpacity:a,opacity:l},{fillOpacity:0,strokeOpacity:0,opacity:0}],Object.assign(Object.assign({},r),t))};Sw.props={};let SE=t=>(e,n,r)=>{let[i]=e,{transform:o="",fillOpacity:a=1,strokeOpacity:l=1,opacity:s=1}=i.style,u="center center",c=[{transform:`${o} scale(0.0001)`.trimStart(),transformOrigin:u,fillOpacity:0,strokeOpacity:0,opacity:0},{transform:`${o} scale(0.0001)`.trimStart(),transformOrigin:u,fillOpacity:a,strokeOpacity:l,opacity:s,offset:.01},{transform:`${o} scale(1)`.trimStart(),transformOrigin:u,fillOpacity:a,strokeOpacity:l,opacity:s}];return i.animate(c,Object.assign(Object.assign({},r),t))},Sk=t=>(e,n,r)=>{let[i]=e,{transform:o="",fillOpacity:a=1,strokeOpacity:l=1,opacity:s=1}=i.style,u="center center",c=[{transform:`${o} scale(1)`.trimStart(),transformOrigin:u},{transform:`${o} scale(0.0001)`.trimStart(),transformOrigin:u,fillOpacity:a,strokeOpacity:l,opacity:s,offset:.99},{transform:`${o} scale(0.0001)`.trimStart(),transformOrigin:u,fillOpacity:0,strokeOpacity:0,opacity:0}];return i.animate(c,Object.assign(Object.assign({},r),t))},SM=t=>(e,n,r)=>{var i;let[o]=e,a=(null===(i=o.getTotalLength)||void 0===i?void 0:i.call(o))||0;return o.animate([{lineDash:[0,a]},{lineDash:[a,0]}],Object.assign(Object.assign({},r),t))};function SS(t,e){let n={};for(let r of e){let e=t.style[r];e&&(n[r]=e)}return n}SM.props={};let S_=["fill","stroke","fillOpacity","strokeOpacity","opacity","lineWidth"];function SP(t){let{min:e,max:n}=t.getLocalBounds(),[r,i]=e,[o,a]=n;return[r,i,o-r,a-i]}function Sj(t,e){let[n,r,i,o]=SP(t),a=Math.ceil(Math.sqrt(e/(o/i))),l=[],s=o/Math.ceil(e/a),u=0,c=e;for(;c>0;){let t=Math.min(c,a),e=i/t;for(let i=0;i<t;i++){let t=n+i*e,o=r+u*s;l.push(function(t){let[e,n,r,i]=t;return`
11
- M ${e} ${n}
12
- L ${e+r} ${n}
13
- L ${e+r} ${n+i}
14
- L ${e} ${n+i}
15
- Z
16
- `}([t,o,e,s]))}c-=t,u+=1}return l}function SA(t,e){t.__data__=e.__data__,t.className=e.className,t.markType=e.markType,e.parentNode.replaceChild(t,e)}function ST(t,e){let n=t.indexOf(e);return n===t.lastIndexOf(e)}function SC(t){var e;let n=ht(t);if(!!n){if(!(!ST(e=n,"m")||!ST(e,"M")))return n}}function SN(t,e,n,r){let{nodeName:i}=e,{nodeName:o}=n,a=SC(e),l=SC(n),s=void 0===a||void 0===l;if(i===o&&"path"!==i||s)return function(t,e,n){let[r,i,o,a]=SP(t),{transform:l}=t.style,{transform:s}=e.style;SA(e,t);let[u,c,f,p]=SP(e),h=[Object.assign({transform:`${l?l+" ":""}translate(${r-u}, ${i-c}) scale(${o/f}, ${a/p})`},SS(t,S_)),Object.assign({transform:`${s?s+" ":""}translate(0, 0) scale(1, 1)`},SS(e,S_))];return e.animate(h,n)}(e,n,r);let u=function(t,e){let{nodeName:n}=t;if("path"===n)return t;let r=new yu({style:Object.assign(Object.assign({},SS(t,S_)),{d:e})});return SA(r,t),r}(t,a),c=[Object.assign({path:a},SS(e,S_)),Object.assign({path:l},SS(n,S_))],f=u.animate(c,r);return f.onfinish=()=>{u.style.transform="none",ns(u,n)},u.style.transform="none",f}let SL=t=>(e,n,r)=>{let i=function(t="pack"){return"function"==typeof t?t:Sj}(t.split),o=Object.assign(Object.assign({},r),t),{length:a}=e,{length:l}=n;if(1===a&&1===l||a>1&&l>1){let[t]=e,[r]=n;return SN(t,t,r,o)}if(1===a&&l>1){let[t]=e;return function(t,e,n,r){t.style.visibility="hidden";let i=r(t,e.length);return e.map((e,r)=>SN(e,new yu({style:Object.assign({path:i[r]},SS(t,S_))}),e,n))}(t,n,o,i)}if(a>1&&1===l){let[t]=n;return function(t,e,n,r){let i=r(e,t.length),{fillOpacity:o=1,strokeOpacity:a=1,opacity:l=1}=e.style,s=e.animate([{fillOpacity:0,strokeOpacity:0,opacity:0},{fillOpacity:0,strokeOpacity:0,opacity:0,offset:.99},{fillOpacity:o,strokeOpacity:a,opacity:l}],n);return[...t.map((t,r)=>SN(t,t,new yu({style:{path:i[r],fill:e.style.fill}}),n)),s]}(e,t,o,i)}return null};SL.props={};let SI=(t,e)=>(n,r,i)=>{let[o]=n,{height:a,width:l}=o.getBoundingClientRect(),s=new yu({style:{path:`M0,0L${l},0L${l},${a}L0,${a}Z`}});return o.appendChild(s),o.style.clipPath=s,Sg(t,e)([s],r,i)};SI.props={};let SR=(t,e)=>(n,r,i)=>{let[o]=n,{height:a,width:l}=o.getBoundingClientRect(),s=new yu({style:{path:`M0,0L${l},0L${l},${a}L0,${a}Z`}});return o.appendChild(s),o.style.clipPath=s,Sm(t,e)([s],r,i)};SR.props={};let SD="main-layer",SF="label-layer",Sz="element",SB="view",SW="plot",S$="component",SG="label",SV="area",SH="mask",SU={visibility:"visible",opacity:1,fillOpacity:1,strokeOpacity:1};function Sq(t,e,n,r){t.style[e]=n,r&&t.children.forEach(t=>Sq(t,e,n,r))}function SY(t){Sq(t,"visibility","hidden",!0)}function SX(t){Sq(t,"visibility","visible",!0)}var SK=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function SZ(t){return g_(t).selectAll(`.${Sz}`).nodes().filter(t=>!t.__removed__)}function SQ(t,e){return SJ(t,e).flatMap(({container:t})=>SZ(t))}function SJ(t,e){return e.filter(e=>e!==t&&e.options.parentKey===t.options.key)}function S0(t){return g_(t).select(`.${SW}`).node()}function S1(t){if("rect"!==t.nodeName)return t.getRenderBounds();let{x:e,y:n,width:r,height:i}=t.style;return{min:[e,n],max:[e+r,n+i]}}function S2(t,e){let{offsetX:n,offsetY:r}=e,{min:[i,o],max:[a,l]}=S1(t);return n<i||n>a||r<o||r>l?null:[n-i,r-o]}function S5(t,e){let{offsetX:n,offsetY:r}=e,[i,o,a,l]=function(t){let{min:[e,n],max:[r,i]}=t.getRenderBounds();return[e,n,r,i]}(t);return[Math.min(a,Math.max(i,n))-i,Math.min(l,Math.max(o,r))-o]}function S3(t){return t=>t.__data__.color}function S4(t){return t=>t.__data__.x}function S6(t){let e=new Map((Array.isArray(t)?t:[t]).flatMap(t=>Array.from(t.markState.keys()).map(e=>[S9(t.key,e.key),e.data])));return t=>{let{index:n,markKey:r,viewKey:i}=t.__data__;return e.get(S9(i,r))[n]}}function S8(t,e=(t,e)=>t,n=(t,e,n)=>t.setAttribute(e,n)){let r="__states__",i="__ordinal__",o=o=>{let{[r]:a=[],[i]:l={}}=o,s=a.reduce((e,n)=>Object.assign(Object.assign({},e),t[n]),l);if(0!==Object.keys(s).length){for(let[t,r]of Object.entries(s)){let i=function(t,e){var n;return null!==(n=t.style[e])&&void 0!==n?n:SU[e]}(o,t),a=e(r,o);n(o,t,a),!(t in l)&&(l[t]=i)}o[i]=l}},a=t=>{!t[r]&&(t[r]=[])};return{setState:(t,...e)=>{a(t),t[r]=[...e],o(t)},removeState:(t,...e)=>{for(let n of(a(t),e)){let e=t[r].indexOf(n);-1!==e&&t[r].splice(e,1)}o(t)},hasState:(t,e)=>(a(t),-1!==t[r].indexOf(e))}}function S9(t,e){return`${t},${e}`}function S7(t,e){let n=(Array.isArray(t)?t:[t]).flatMap(t=>t.marks.map(e=>[S9(t.key,e.key),e.state])),r={};for(let t of e){let[e,i]=Array.isArray(t)?t:[t,{}];r[e]=n.reduce((t,n)=>{var r;let[o,a={}]=n;for(let[n,l]of Object.entries(void 0===(r=a[e])||"object"==typeof r&&0===Object.keys(r).length?i:a[e])){let e=t[n],r=(t,n,r,i)=>o!==S9(i.__data__.viewKey,i.__data__.markKey)?null==e?void 0:e(t,n,r,i):"function"!=typeof l?l:l(t,n,r,i);t[n]=r}return t},{})}return r}function _t(t,e){let n=new Map(t.map((t,e)=>[t,e])),r=e?t.map(e):t;return(t,i)=>{if("function"!=typeof t)return t;let o=n.get(i);return t(e?e(i):i,o,r,i)}}function _e(t){var{link:e=!1,valueof:n=(t,e)=>t,coordinate:r}=t,i=SK(t,["link","valueof","coordinate"]);if(!e)return[()=>{},()=>{}];let o=t=>t.__data__.points,a=(t,e)=>{let[,n,r]=t,[i,,,o]=e;return[n,i,o,r]};return[t=>{var e;if(t.length<=1)return;let r=M7(t,(t,e)=>{let{x:n}=t.__data__,{x:r}=e.__data__;return n-r});for(let t=1;t<r.length;t++){let l=sU(),s=r[t-1],u=r[t],[c,f,p,h]=a(o(s),o(u));l.moveTo(...c),l.lineTo(...f),l.lineTo(...p),l.lineTo(...h),l.closePath();let d=gW(i,t=>n(t,s)),{fill:y=s.getAttribute("fill")}=d,g=SK(d,["fill"]),v=new yu({className:"element-link",style:Object.assign({d:l.toString(),fill:y,zIndex:-2},g)});null===(e=s.link)||void 0===e||e.remove(),s.parentNode.appendChild(v),s.link=v}},t=>{var e;null===(e=t.link)||void 0===e||e.remove(),t.link=null}]}function _n(t,e,n){let r=e=>{let{transform:n}=t.style;return n?`${n} ${e}`:e};if(s2(n)){let{points:i}=t.__data__,[o,a]=s1(n)?gY(i):i,l=n.getCenter(),s=gj(o,l),u=gj(a,l),c=gC(s),f=c+gL(s,u)/2,p=e*Math.cos(f),h=e*Math.sin(f);return r(`translate(${p}, ${h})`)}return s1(n)?r(`translate(${e}, 0)`):r(`translate(0, ${-e})`)}function _r(t){var{document:e,background:n,scale:r,coordinate:i,valueof:o}=t,a=SK(t,["document","background","scale","coordinate","valueof"]);let l="element-background";if(!n)return[()=>{},()=>{}];let s=(t,e,n)=>{let r=t.invert(e),i=e+t.getBandWidth(r)/2,o=t.getStep(r)/2,a=o*n;return[i-o+a,i+o-a]},u=(t,e)=>{let{x:n}=r;if(!Sn(n))return[0,1];let{__data__:i}=t,{x:o}=i,[a,l]=s(n,o,e);return[a,l]},c=(t,e)=>{let{y:n}=r;if(!Sn(n))return[0,1];let{__data__:i}=t,{y:o}=i,[a,l]=s(n,o,e);return[a,l]},f=(t,n)=>{let{padding:r}=n,[o,a]=u(t,r),[l,s]=c(t,r),f=[[o,l],[a,l],[a,s],[o,s]].map(t=>i.map(t)),{__data__:p}=t,{y:h,y1:d}=p;return g0(e,f,{y:h,y1:d},i,n)},p=(t,e)=>{let{transform:n="scale(1.2, 1.2)",transformOrigin:r="center center",stroke:i=""}=e,o=Object.assign({transform:n,transformOrigin:r,stroke:i},SK(e,["transform","transformOrigin","stroke"])),a=t.cloneNode(!0);for(let[t,e]of Object.entries(o))a.style[t]=e;return a},h=()=>{let{x:t,y:e}=r;return[t,e].some(Sn)};return[t=>{t.background&&t.background.remove();let e=gW(a,e=>o(e,t)),{fill:n="#CCD6EC",fillOpacity:r=.3,zIndex:i=-2,padding:s=.001,strokeWidth:u=0}=e,c=Object.assign(Object.assign({},SK(e,["fill","fillOpacity","zIndex","padding","strokeWidth"])),{fill:n,fillOpacity:r,zIndex:i,padding:s,strokeWidth:u}),d=(h()?f:p)(t,c);d.className=l,t.parentNode.parentNode.appendChild(d),t.background=d},t=>{var e;null===(e=t.background)||void 0===e||e.remove(),t.background=null},t=>t.className===l]}function _i(t,e){let n=t.getRootNode().defaultView.getContextService().getDomElement();(null==n?void 0:n.style)&&(t.cursor=n.style.cursor,n.style.cursor=e)}function _o(t,e,n){return t.find(t=>Object.entries(e).every(([e,r])=>n(t)[e]===r))}var _a=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function _l(t){var{delay:e,createGroup:n,background:r=!1,link:i=!1}=t,o=_a(t,["delay","createGroup","background","link"]);return(t,a,l)=>{let{container:s,view:u,options:c}=t,{scale:f,coordinate:p}=u;return function(t,{elements:e,datum:n,groupKey:r=t=>t,link:i=!1,background:o=!1,delay:a=60,scale:l,coordinate:s,emitter:u,state:c={}}){var f;let p;let h=e(t),d=new Set(h),y=iu(h,r),g=_t(h,n),[v,m]=_e(Object.assign({elements:h,valueof:g,link:i,coordinate:s},nc(c.active,"link"))),[b,x,O]=_r(Object.assign({document:t.ownerDocument,scale:l,coordinate:s,background:o,valueof:g},nc(c.active,"background"))),{setState:w,removeState:E,hasState:k}=S8(nt(c,{active:Object.assign({},(null===(f=c.active)||void 0===f?void 0:f.offset)&&{transform:(...t)=>{let e=c.active.offset(...t),[,n]=t;return _n(h[n],e,s)}})}),g),M=t=>{let{target:e,nativeEvent:i=!0}=t;if(!d.has(e))return;p&&clearTimeout(p);let o=r(e),a=y.get(o),l=new Set(a);for(let t of h)l.has(t)?!k(t,"active")&&w(t,"active"):(w(t,"inactive"),m(t)),t!==e&&x(t);b(e),v(a),i&&u.emit("element:highlight",{nativeEvent:i,data:{data:n(e),group:a.map(n)}})},S=()=>{p&&clearTimeout(p),p=setTimeout(()=>{_(),p=null},a)},_=(t=!0)=>{for(let t of h)E(t,"active","inactive"),x(t),m(t);t&&u.emit("element:unhighlight",{nativeEvent:t})},P=t=>{let{target:e}=t;if(!o||!!O(e))(o||d.has(e))&&(a>0?S():_())},j=()=>{_()};t.addEventListener("pointerover",M),t.addEventListener("pointerout",P),t.addEventListener("pointerleave",j);let A=t=>{let{nativeEvent:e}=t;!e&&_(!1)},T=t=>{let{nativeEvent:e}=t;if(e)return;let{data:r}=t.data,i=_o(h,r,n);i&&M({target:i,nativeEvent:!1})};return u.on("element:highlight",T),u.on("element:unhighlight",A),()=>{for(let e of(t.removeEventListener("pointerover",M),t.removeEventListener("pointerout",P),t.removeEventListener("pointerleave",j),u.off("element:highlight",T),u.off("element:unhighlight",A),h))x(e),m(e)}}(S0(s),Object.assign({elements:SZ,datum:S6(u),groupKey:n?n(u):void 0,coordinate:p,scale:f,state:S7(c,[["active",r?{}:{lineWidth:"1",stroke:"#000"}],"inactive"]),background:r,link:i,delay:e,emitter:l},o))}}function _s(t){return _l(Object.assign(Object.assign({},t),{createGroup:S4}))}function _u(t){return _l(Object.assign(Object.assign({},t),{createGroup:S3}))}_l.props={reapplyWhenUpdate:!0},_s.props={reapplyWhenUpdate:!0},_u.props={reapplyWhenUpdate:!0};var _c=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function _f(t){var{createGroup:e,background:n=!1,link:r=!1}=t,i=_c(t,["createGroup","background","link"]);return(t,o,a)=>{let{container:l,view:s,options:u}=t,{coordinate:c,scale:f}=s;return function(t,{elements:e,datum:n,groupKey:r=t=>t,link:i=!1,single:o=!1,coordinate:a,background:l=!1,scale:s,emitter:u,state:c={}}){var f;let p=e(t),h=new Set(p),d=iu(p,r),y=_t(p,n),[g,v]=_e(Object.assign({link:i,elements:p,valueof:y,coordinate:a},nc(c.selected,"link"))),[m,b]=_r(Object.assign({document:t.ownerDocument,background:l,coordinate:a,scale:s,valueof:y},nc(c.selected,"background"))),{setState:x,removeState:O,hasState:w}=S8(nt(c,{selected:Object.assign({},(null===(f=c.selected)||void 0===f?void 0:f.offset)&&{transform:(...t)=>{let e=c.selected.offset(...t),[,n]=t;return _n(p[n],e,a)}})}),y),E=(t=!0)=>{for(let t of p)O(t,"selected","unselected"),v(t),b(t);t&&u.emit("element:unselect",{nativeEvent:!0})},k=(t,e,i=!0)=>{if(w(e,"selected"))E();else{let o=r(e),a=d.get(o),l=new Set(a);for(let t of p)l.has(t)?x(t,"selected"):(x(t,"unselected"),v(t)),t!==e&&b(t);if(g(a),m(e),!i)return;u.emit("element:select",Object.assign(Object.assign({},t),{nativeEvent:i,data:{data:[n(e),...a.map(n)]}}))}},M=(t,e,o=!0)=>{let a=r(e),l=d.get(a),s=new Set(l);if(w(e,"selected")){if(!p.some(t=>!s.has(t)&&w(t,"selected")))return E();for(let t of l)x(t,"unselected"),v(t),b(t)}else{let t=l.some(t=>w(t,"selected"));for(let t of p)s.has(t)?x(t,"selected"):!w(t,"selected")&&x(t,"unselected");!t&&i&&g(l),m(e)}o&&u.emit("element:select",Object.assign(Object.assign({},t),{nativeEvent:o,data:{data:p.filter(t=>w(t,"selected")).map(n)}}))},S=t=>{let{target:e,nativeEvent:n=!0}=t;return h.has(e)?o?k(t,e,n):M(t,e,n):E()};t.addEventListener("click",S);let _=t=>{let{nativeEvent:e,data:r}=t;if(!e)for(let t of o?r.data.slice(0,1):r.data)S({target:_o(p,t,n),nativeEvent:!1})},P=()=>{E(!1)};return u.on("element:select",_),u.on("element:unselect",P),()=>{for(let t of p)v(t);t.removeEventListener("click",S),u.off("element:select",_),u.off("element:unselect",P)}}(S0(l),Object.assign({elements:SZ,datum:S6(s),groupKey:e?e(s):void 0,coordinate:c,scale:f,state:S7(u,[["selected",n?{}:{lineWidth:"1",stroke:"#000"}],"unselected"]),background:n,link:r,emitter:a},i))}}function _p(t){return _f(Object.assign(Object.assign({},t),{createGroup:S4}))}function _h(t){return _f(Object.assign(Object.assign({},t),{createGroup:S3}))}_f.props={reapplyWhenUpdate:!0},_p.props={reapplyWhenUpdate:!0},_h.props={reapplyWhenUpdate:!0};var _d=function(t,e,n){var r,i,o,a,l=0;!n&&(n={});var s=function(){l=!1===n.leading?0:Date.now(),r=null,a=t.apply(i,o),!r&&(i=o=null)},u=function(){var u=Date.now();!l&&!1===n.leading&&(l=u);var c=e-(u-l);return i=this,o=arguments,c<=0||c>e?(r&&(clearTimeout(r),r=null),l=u,a=t.apply(i,o),!r&&(i=o=null)):!r&&!1!==n.trailing&&(r=setTimeout(s,c)),a};return u.cancel=function(){clearTimeout(r),l=0,r=i=o=null},u};function _y({wait:t=30,leading:e,trailing:n=!1}){return r=>{let{options:i,update:o,setState:a,container:l}=r,s=S0(l),u=_d(t=>{let e=S2(s,t);if(!e){a("fisheye"),o();return}a("fisheye",t=>{let n=nt({},t,{interaction:{tooltip:{preserve:!0}}});for(let t of n.marks)t.animate=!1;let[r,i]=e,o=function(t){let{coordinate:e={}}=t,{transform:n=[]}=e,r=n.find(t=>"fisheye"===t.type);if(r)return r;let i={type:"fisheye"};return n.push(i),e.transform=n,t.coordinate=e,i}(n);return o.focusX=r,o.focusY=i,o.visual=!0,n}),o()},t,{leading:e,trailing:n});return s.addEventListener("pointerenter",u),s.addEventListener("pointermove",u),s.addEventListener("pointerleave",u),()=>{s.removeEventListener("pointerenter",u),s.removeEventListener("pointermove",u),s.removeEventListener("pointerleave",u)}}}var _g=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function _v(t){var{wait:e=20,leading:n,trailing:r=!1,labelFormatter:i=t=>`${t}`}=t,o=_g(t,["wait","leading","trailing","labelFormatter"]);return t=>{let a;let{view:l,container:s,update:u,setState:c}=t,{markState:f,scale:p,coordinate:h}=l,d=function(t,e,n){let[r]=Array.from(t.entries()).filter(([t])=>t.type===e).map(([t])=>{let{encode:e}=t;return Object.fromEntries(n.map(t=>{let n=e[t];return[t,n?n.value:void 0]}))});return r}(f,"line",["x","y","series"]);if(!d)return;let{y:y,x:g,series:v=[]}=d,m=y.map((t,e)=>e),b=M7(m.map(t=>g[t])),x=S0(s),O=s.getElementsByClassName(Sz),w=s.getElementsByClassName(SG),E=iu(w,t=>t.__data__.key.split("-")[0]),k=new ys({style:Object.assign({x1:0,y1:0,x2:0,y2:x.getAttribute("height"),stroke:"black",lineWidth:1},nc(o,"rule"))}),M=new yh({style:Object.assign({x:0,y:x.getAttribute("height"),text:"",fontSize:10},nc(o,"label"))});k.append(M),x.appendChild(k);let S=(t,e,n)=>{let[r]=t.invert(n);return b[M9(b,e.invert(r))]},_=(t,e)=>{k.setAttribute("x1",t[0]),k.setAttribute("x2",t[0]),M.setAttribute("text",i(e))},P=t=>{let{scale:e,coordinate:n}=a,{x:r,y:i}=e,o=S(n,r,t);for(let e of(_(t,o),O)){let{seriesIndex:t,key:r}=e.__data__,a=t[M2(t=>g[+t]).center(t,o)],l=[0,i.map(1)],s=[0,i.map(y[a]/y[t[0]])],[,u]=n.map(l),[,c]=n.map(s),f=u-c;for(let t of(e.setAttribute("transform",`translate(0, ${f})`),E.get(r)||[]))t.setAttribute("dy",f)}},j=_d(t=>{let e=S2(x,t);e&&P(e)},e,{leading:n,trailing:r});return(t=>{var e,n,r,i;return e=this,n=void 0,r=void 0,i=function*(){let{x:e}=p,n=S(h,e,t);_(t,n),c("chartIndex",t=>{let e=nt({},t),r=e.marks.find(t=>"line"===t.type),i=rY(ip(m,t=>rY(t,t=>+y[t])/rV(t,t=>+y[t]),t=>v[t]).values());nt(r,{scale:{y:{domain:[1/i,i]}}});let o=function(t){let{transform:e=[]}=t,n=e.find(t=>"normalizeY"===t.type);if(n)return n;let r={type:"normalizeY"};return e.push(r),t.transform=e,r}(r);for(let t of(o.groupBy="color",o.basis=(t,e)=>e[t[M2(t=>g[+t]).center(t,n)]],e.marks))t.animate=!1;return e}),a=(yield u("chartIndex")).view},new(r||(r=Promise))(function(t,o){function a(t){try{s(i.next(t))}catch(t){o(t)}}function l(t){try{s(i.throw(t))}catch(t){o(t)}}function s(e){var n;e.done?t(e.value):((n=e.value)instanceof r?n:new r(function(t){t(n)})).then(a,l)}s((i=i.apply(e,n||[])).next())})})([0,0]),x.addEventListener("pointerenter",j),x.addEventListener("pointermove",j),x.addEventListener("pointerleave",j),()=>{k.remove(),x.removeEventListener("pointerenter",j),x.removeEventListener("pointermove",j),x.removeEventListener("pointerleave",j)}}}function _m(t,e){let n=0,r=0;if(void 0===e)for(let e of t)null!=e&&(e=+e)>=e&&(++n,r+=e);else{let i=-1;for(let o of t)null!=(o=e(o,++i,t))&&(o=+o)>=o&&(++n,r+=o)}if(n)return r/n}function _b(t,e){let n;let r=-1,i=-1;if(void 0===e)for(let e of t)++i,null!=e&&(n>e||void 0===n&&e>=e)&&(n=e,r=i);else for(let o of t)null!=(o=e(o,++i,t))&&(n>o||void 0===n&&o>=o)&&(n=o,r=i);return r}function _x(t){var e=document.createElement("div");e.innerHTML=t;var n=e.childNodes[0];return n&&e.contains(n)&&e.removeChild(n),n}_v.props={reapplyWhenUpdate:!0};function _O(t){return void 0===t&&(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 _w={overflow:"hidden","white-space":"nowrap","text-overflow":"ellipsis"},_E=function(t){function e(e){var n,r,i,o,a,l=this,s=null===(a=null===(o=e.style)||void 0===o?void 0:o.template)||void 0===a?void 0:a.prefixCls,u=_O(s);return(l=t.call(this,e,{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(u.CONTAINER,'"></div>'),title:'<div class="'.concat(u.TITLE,'"></div>'),item:'<li class="'.concat(u.LIST_ITEM,'" data-index={index}>\n <span class="').concat(u.NAME,'">\n <span class="').concat(u.MARKER,'" style="background:{color}"></span>\n <span class="').concat(u.NAME_LABEL,'" title="{name}">{name}</span>\n </span>\n <span class="').concat(u.VALUE,'" title="{value}">{value}</span>\n </li>')},style:(void 0===(n=s)&&(n=""),i=_O(n),(r={})[".".concat(i.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"},r[".".concat(i.TITLE)]={color:"rgba(0, 0, 0, 0.45)"},r[".".concat(i.LIST)]={margin:"0px","list-style-type":"none",padding:"0px"},r[".".concat(i.LIST_ITEM)]={"list-style-type":"none",display:"flex","line-height":"2em","align-items":"center","justify-content":"space-between","white-space":"nowrap"},r[".".concat(i.MARKER)]={width:"8px",height:"8px","border-radius":"50%",display:"inline-block","margin-right":"4px"},r[".".concat(i.NAME)]={display:"flex","align-items":"center","max-width":"216px"},r[".".concat(i.NAME_LABEL)]=on({flex:1},_w),r[".".concat(i.VALUE)]=on({display:"inline-block",float:"right",flex:1,"text-align":"right","min-width":"28px","margin-left":"30px",color:"rgba(0, 0, 0, 0.85)"},_w),r[".".concat(i.CROSSHAIR_X)]={position:"absolute",width:"1px","background-color":"rgba(0, 0, 0, 0.25)"},r[".".concat(i.CROSSHAIR_Y)]={position:"absolute",height:"1px","background-color":"rgba(0, 0, 0, 0.25)"},r)})||this).timestamp=-1,l.prevCustomContentKey=l.attributes.contentKey,l.initShape(),l.render(l.attributes,l),l}return oe(e,t),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(){return{width:this.element.offsetWidth,height:this.element.offsetHeight}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"HTMLTooltipItemsElements",{get:function(){var t=this.attributes,e=t.data,n=t.template;return e.map(function(t,e){var r,i,o=t.name,a=t.color,l=t.index,s=or(t,["name","color","index"]),u=on({name:void 0===o?"":o,color:void 0===a?"black":a,index:null!=l?l:e},s);return _x((r=n.item,i=u,r&&i?r.replace(/\\?\{([^{}]+)\}/g,function(t,e){return"\\"===t.charAt(0)?t.slice(1):void 0===i[e]?"":i[e]}):r))})},enumerable:!1,configurable:!0}),e.prototype.render=function(t,e){this.renderHTMLTooltipElement(),this.updatePosition()},e.prototype.destroy=function(){var e;null===(e=this.element)||void 0===e||e.remove(),t.prototype.destroy.call(this)},e.prototype.show=function(t,e){var n=this;if(void 0!==t&&void 0!==e){var r="hidden"===this.element.style.visibility,i=function(){n.attributes.x=null!=t?t:n.attributes.x,n.attributes.y=null!=e?e:n.attributes.y,n.updatePosition()};r?this.closeTransition(i):i()}this.element.style.visibility="visible"},e.prototype.hide=function(t,e){void 0===t&&(t=0),void 0===e&&(e=0),!(this.attributes.enterable&&this.isCursorEntered(t,e))&&(this.element.style.visibility="hidden")},e.prototype.initShape=function(){var t=this.attributes.template;this.element=_x(t.container),this.id&&this.element.setAttribute("id",this.id)},e.prototype.renderCustomContent=function(){if(void 0===this.prevCustomContentKey||this.prevCustomContentKey!==this.attributes.contentKey){this.prevCustomContentKey=this.attributes.contentKey;var t=this.attributes.content;t&&("string"==typeof t?this.element.innerHTML=t:this.element.replaceChildren(t))}},e.prototype.renderHTMLTooltipElement=function(){var t,e,n=this.attributes,r=n.template,i=n.title,o=n.enterable,a=n.style,l=n.content,s=_O(r.prefixCls),u=this.element;if(this.element.style.pointerEvents=o?"auto":"none",l)this.renderCustomContent();else{i?(u.innerHTML=r.title,u.getElementsByClassName(s.TITLE)[0].innerHTML=i):null===(e=null===(t=u.getElementsByClassName(s.TITLE))||void 0===t?void 0:t[0])||void 0===e||e.remove();var c=this.HTMLTooltipItemsElements,f=document.createElement("ul");f.className=s.LIST,f.replaceChildren.apply(f,ou([],ol(c),!1));var p=this.element.querySelector(".".concat(s.LIST));p?p.replaceWith(f):u.appendChild(f)}!function(t,e){Object.entries(e).forEach(function(e){var n=ol(e,2),r=n[0],i=n[1];ou([t],ol(t.querySelectorAll(r)),!1).filter(function(t){return t.matches(r)}).forEach(function(t){t&&(t.style.cssText+=Object.entries(i).reduce(function(t,e){return"".concat(t).concat(e.join(":"),";")},""))})})}(u,a)},e.prototype.getRelativeOffsetFromCursor=function(t){var e=this.attributes,n=e.position,r=e.offset,i=(t||n).split("-"),o={left:[-1,0],right:[1,0],top:[0,-1],bottom:[0,1]},a=this.elementSize,l=a.width,s=a.height,u=[-l/2,-s/2];return i.forEach(function(t){var e=ol(u,2),n=e[0],i=e[1],a=ol(o[t],2),c=a[0],f=a[1];u=[n+(l/2+r[0])*c,i+(s/2+r[1])*f]}),u},e.prototype.setOffsetPosition=function(t){var e=ol(t,2),n=e[0],r=e[1],i=this.attributes,o=i.x,a=i.y,l=i.container,s=l.x,u=l.y;this.element.style.left="".concat(+(void 0===o?0:o)+s+n,"px"),this.element.style.top="".concat(+(void 0===a?0:a)+u+r,"px")},e.prototype.updatePosition=function(){var t=this.attributes.showDelay,e=Date.now();(!(this.timestamp>0)||!(e-this.timestamp<(void 0===t?60:t)))&&(this.timestamp=e,this.setOffsetPosition(this.autoPosition(this.getRelativeOffsetFromCursor())))},e.prototype.autoPosition=function(t){var e=ol(t,2),n=e[0],r=e[1],i=this.attributes,o=i.x,a=i.y,l=i.bounding,s=i.position;if(!l)return[n,r];var u=this.element,c=u.offsetWidth,f=u.offsetHeight,p=ol([+o+n,+a+r],2),h=p[0],d=p[1],y={left:"right",right:"left",top:"bottom",bottom:"top"},g=l.x,v=l.y,m={left:h<g,right:h+c>g+l.width,top:d<v,bottom:d+f>v+l.height},b=[];s.split("-").forEach(function(t){m[t]?b.push(y[t]):b.push(t)});var x=b.join("-");return this.getRelativeOffsetFromCursor(x)},e.prototype.isCursorEntered=function(t,e){if(this.element){var n=this.element.getBoundingClientRect();return new EN(n.x,n.y,n.width,n.height).isPointIn(t,e)}return!1},e.prototype.closeTransition=function(t){var e=this,n=this.element.style.transition;this.element.style.transition="none",t(),setTimeout(function(){e.element.style.transition=n},10)},e.tag="tooltip",e}(m4);let _k={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"};function _M(t,e){let{__data__:n}=t,{markKey:r,index:i,seriesIndex:o}=n,{markState:a}=e,l=Array.from(a.keys()).find(t=>t.key===r);if(l)return o?o.map(t=>l.data[t]):l.data[i]}function _S(t,e){if(e(t))return t;let n=t.parent;for(;n&&!e(n);)n=n.parent;return n}function __(t,e,n,r=t=>!0){return i=>{if(!r(i))return;n.emit(`plot:${t}`,i);let{target:o}=i;if(!o)return;let{className:a}=o;if("plot"===a)return;let l=_S(o,t=>"element"===t.className),s=_S(o,t=>"component"===t.className),u=_S(o,t=>"label"===t.className),c=l||s||u;if(!c)return;let{className:f,markType:p}=c,h=Object.assign(Object.assign({},i),{nativeEvent:!0});"element"===f?(h.data={data:_M(c,e)},n.emit(`element:${t}`,h),n.emit(`${p}:${t}`,h)):("label"===f?(h.data={data:c.attributes.datum},n.emit(`label:${t}`,h)):n.emit(`component:${t}`,h),n.emit(`${a}:${t}`,h))}}function _P(){return(t,e,n)=>{let{container:r,view:i}=t,o=__(_k.CLICK,i,n,t=>1===t.detail),a=__(_k.DBLCLICK,i,n,t=>2===t.detail),l=__(_k.POINTER_TAP,i,n),s=__(_k.POINTER_DOWN,i,n),u=__(_k.POINTER_UP,i,n),c=__(_k.POINTER_OVER,i,n),f=__(_k.POINTER_OUT,i,n),p=__(_k.POINTER_MOVE,i,n),h=__(_k.POINTER_ENTER,i,n),d=__(_k.POINTER_LEAVE,i,n),y=__(_k.POINTER_UPOUTSIDE,i,n),g=__(_k.DRAG_START,i,n),v=__(_k.DRAG,i,n),m=__(_k.DRAG_END,i,n),b=__(_k.DRAG_ENTER,i,n),x=__(_k.DRAG_LEAVE,i,n),O=__(_k.DRAG_OVER,i,n),w=__(_k.DROP,i,n);return r.addEventListener("click",o),r.addEventListener("click",a),r.addEventListener("pointertap",l),r.addEventListener("pointerdown",s),r.addEventListener("pointerup",u),r.addEventListener("pointerover",c),r.addEventListener("pointerout",f),r.addEventListener("pointermove",p),r.addEventListener("pointerenter",h),r.addEventListener("pointerleave",d),r.addEventListener("pointerupoutside",y),r.addEventListener("dragstart",g),r.addEventListener("drag",v),r.addEventListener("dragend",m),r.addEventListener("dragenter",b),r.addEventListener("dragleave",x),r.addEventListener("dragover",O),r.addEventListener("drop",w),()=>{r.removeEventListener("click",o),r.removeEventListener("click",a),r.removeEventListener("pointertap",l),r.removeEventListener("pointerdown",s),r.removeEventListener("pointerup",u),r.removeEventListener("pointerover",c),r.removeEventListener("pointerout",f),r.removeEventListener("pointermove",p),r.removeEventListener("pointerenter",h),r.removeEventListener("pointerleave",d),r.removeEventListener("pointerupoutside",y),r.removeEventListener("dragstart",g),r.removeEventListener("drag",v),r.removeEventListener("dragend",m),r.removeEventListener("dragenter",b),r.removeEventListener("dragleave",x),r.removeEventListener("dragover",O),r.removeEventListener("drop",w)}}}_P.props={reapplyWhenUpdate:!0};var _j=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function _A(t,e){return e?"string"==typeof e?document.querySelector(e):e:t.ownerDocument.defaultView.getContextService().getDomElement().parentElement}function _T({root:t,data:e,x:n,y:r,render:i,event:o,single:a,position:l="right-bottom",enterable:s=!1,css:u,mount:c,bounding:f}){let p=_A(t,c),h=_A(t),d=a?h:t,y=f||function(t){let{min:[e,n],max:[r,i]}=t.getRenderBounds();return{x:e,y:n,width:r-e,height:i-n}}(t),g=function(t,e){let n=t.getBoundingClientRect(),r=e.getBoundingClientRect();return{x:n.x-r.x,y:n.y-r.y}}(h,p),{tooltipElement:v=function(t,e,n,r,i,o,a,l={}){let s=new _E({className:"tooltip",style:{x:e,y:n,container:a,data:[],bounding:o,position:r,enterable:i,title:"",offset:[10,10],template:{prefixCls:"g2-"},style:nt({".g2-tooltip":{},".g2-tooltip-title":{overflow:"hidden","white-space":"nowrap","text-overflow":"ellipsis"}},l)}});return t.appendChild(s.HTMLTooltipElement),s}(p,n,r,l,s,y,g,u)}=d,{items:m,title:b=""}=e;v.update(Object.assign({x:n,y:r,data:m,title:b,position:l,enterable:s},void 0!==i&&{content:i(o,{items:m,title:b})})),d.tooltipElement=v}function _C({root:t,single:e,emitter:n,nativeEvent:r=!0,event:i=null}){r&&n.emit("tooltip:hide",{nativeEvent:r});let o=_A(t),{tooltipElement:a}=e?o:t;a&&a.hide(null==i?void 0:i.clientX,null==i?void 0:i.clientY)}function _N({root:t,single:e}){let n=_A(t),r=e?n:t;if(!r)return;let{tooltipElement:i}=r;i&&(i.destroy(),r.tooltipElement=void 0)}function _L(t){let{value:e}=t;return Object.assign(Object.assign({},t),{value:void 0===e?"undefined":e})}function _I(t){let e=t.getAttribute("fill"),n=t.getAttribute("stroke"),{__data__:r}=t,{color:i=e&&"transparent"!==e?e:n}=r;return i}function _R(t,e=t=>t){return Array.from(new Map(t.map(t=>[e(t),t])).values())}function _D(t,e,n,r=t.map(t=>t.__data__),i={}){let o=t=>t instanceof Date?+t:t,a=_R(r.map(t=>t.title),o).filter(nu),l=r.flatMap((r,o)=>{let a=t[o],{items:l=[],title:s}=r,u=l.filter(nu),c=void 0!==n?n:l.length<=1;return u.map(t=>{var{color:n=_I(a)||i.color,name:o}=t,l=_j(t,["color","name"]);let u=function(t,e){let n,r,{color:i,series:o,facet:a=!1}=t,{color:l,series:s}=e;if((n=o)&&n.invert&&!(n instanceof x2)&&!(n instanceof wo))return o.clone().invert(s);if(s&&o instanceof x2&&o.invert(s)!==l&&!a)return o.invert(s);if((r=i)&&r.invert&&!(r instanceof x2)&&!(r instanceof wo)){let t=i.invert(l);return Array.isArray(t)?null:t}return null}(e,r);return Object.assign(Object.assign({},l),{color:n,name:(c?u||o:o||u)||s})})}).map(_L);return Object.assign(Object.assign({},a.length>0&&{title:a.join(",")}),{items:_R(l,t=>`(${o(t.name)}, ${o(t.value)}, ${o(t.color)})`)})}function _F(t){t.ruleY&&(t.ruleY.remove(),t.ruleY=void 0)}function _z(t){t.markers&&(t.markers.forEach(t=>t.remove()),t.markers=[])}function _B(t,e){return Array.from(t.values()).some(t=>{var n;return null===(n=t.interaction)||void 0===n?void 0:n[e]})}function _W(t,e){return void 0===t?e:t}function _$(t){let{title:e,items:n}=t;return 0===n.length&&void 0===e||!1}function _G(t,e){var{elements:n,sort:r,filter:i,scale:o,coordinate:a,crosshairs:l,render:s,groupName:u,emitter:c,wait:f=50,leading:p=!0,trailing:h=!1,startX:d=0,startY:y=0,body:g=!0,single:v=!0,position:m,enterable:b,mount:x,bounding:O,theme:w,disableNative:E=!1,marker:k=!0,preserve:M=!1,style:S={},css:_={}}=e,P=_j(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"]);let j=n(t),A=s1(a),T=s2(a),C=nt(S,P),{innerWidth:N,innerHeight:L,width:I,height:R,insetLeft:D,insetTop:F}=a.getOptions(),z=[],B=[];for(let t of j){let{__data__:e}=t,{seriesX:n,title:r,items:i}=e;n?z.push(t):(r||i)&&B.push(t)}let W=!!(A?o.y:o.x).getBandWidth&&B.length>0;z.sort((t,e)=>{let n=A?0:1,r=t=>t.getBounds().min[n];return A?r(e)-r(t):r(t)-r(e)});let $=t=>{let e=A?1:0,{min:n,max:r}=t.getLocalBounds();return M7([n[e],r[e]])};B.sort((t,e)=>{let[n,r]=$(t),[i,o]=$(e),a=(n+r)/2,l=(i+o)/2;return A?l-a:a-l});let G=new Map(z.map(t=>{let{__data__:e}=t,{seriesX:n}=e;return[t,[M7(n.map((t,e)=>e),t=>n[+t]),n]]})),{x:V}=o,H=(null==V?void 0:V.getBandWidth)?V.getBandWidth()/2:0,U=t=>{let[e]=a.invert(t);return e-H},q=(t,e,n)=>{let r=U(t),i=n.filter(nu),[o,a]=M7([i[0],i[i.length-1]]);if(!W&&(r<o||r>a)&&o!==a)return null;let l=(0,M2(t=>n[+t]).center)(e,r);return e[l]},Y=(t,e)=>{let n=t[A?1:0],r=e.filter(t=>{let[e,r]=$(t);return n>=e&&n<=r});if(!W||r.length>0)return r;let i=(0,M2(t=>{let[e,n]=$(t);return(e+n)/2}).center)(e,n);return[e[i]].filter(nu)},X=(t,e)=>{let{__data__:n}=t;return Object.fromEntries(Object.entries(n).filter(([t])=>t.startsWith("series")&&"series"!==t).map(([t,n])=>{let r=n[e];return[nr(t.replace("series","")),r]}))},K=_d(e=>{let n=S2(t,e);if(!n)return;let f=S1(t),p=f.min[0],h=f.min[1],E=[n[0]-d,n[1]-y];if(!E)return;let M=Y(E,B),S=[],P=[];for(let t of z){let[e,n]=G.get(t),r=q(E,e,n);if(null!==r){S.push(t);let e=X(t,r),{x:n,y:i}=e,o=a.map([(n||0)+H,i||0]);P.push([Object.assign(Object.assign({},e),{element:t}),o])}}let j=Array.from(new Set(P.map(t=>t[0].x))),W=j[_b(j,t=>Math.abs(t-U(E)))],$=P.filter(t=>t[0].x===W),V=[...$.map(t=>t[0]),...M.map(t=>t.__data__)],K=[...S,...M],Q=_D(K,o,u,V,w);if(r&&Q.items.sort((t,e)=>r(t)-r(e)),i&&(Q.items=Q.items.filter(i)),0===K.length||_$(Q)){Z(e);return}if(g&&_T({root:t,data:Q,x:n[0]+p,y:n[1]+h,render:s,event:e,single:v,position:m,enterable:b,mount:x,bounding:O,css:_}),l){let e=$.map(t=>t[1]);!function(t,e,n){var{plotWidth:r,plotHeight:i,mainWidth:o,mainHeight:a,startX:l,startY:s,transposed:u,polar:c,insetLeft:f,insetTop:p}=n;let h=Object.assign({lineWidth:1,stroke:"#1b1e23",strokeOpacity:.5},_j(n,["plotWidth","plotHeight","mainWidth","mainHeight","startX","startY","transposed","polar","insetLeft","insetTop"])),d=e.map(t=>t[1]),y=e.map(t=>t[0]),g=_m(d),v=_m(y),[m,b,x,O]=(()=>{if(c){let t=Math.min(o,a)/2,e=l+f+o/2,n=s+p+a/2,r=gC(gj([v,g],[e,n])),i=e+t*Math.cos(r),u=n+t*Math.sin(r);return[e,i,n,u]}return u?[l,l+r,g+s,g+s]:[v+l,v+l,s,s+i]})();if(y.length>0){let e=t.ruleY||(()=>{let e=new ys({style:Object.assign({x1:m,x2:b,y1:x,y2:O},h)});return t.appendChild(e),e})();e.style.x1=m,e.style.x2=b,e.style.y1=x,e.style.y2=O,t.ruleY=e}}(t,e,Object.assign(Object.assign({},nc(C,"crosshairs")),{plotWidth:N,plotHeight:L,mainWidth:I,mainHeight:R,insetLeft:D,insetTop:F,startX:d,startY:y,transposed:A,polar:T}))}k&&!function(t,{data:e,style:n,theme:r}){t.markers&&t.markers.forEach(t=>t.remove());let i=e.filter(t=>{let[{x:e,y:n}]=t;return nu(e)&&nu(n)}).map(t=>{let[{color:e,element:i},o]=t,a=e||i.style.fill||i.style.stroke||r.color;return new yn({style:Object.assign({cx:o[0],cy:o[1],fill:a,r:4,stroke:"#fff",strokeWidth:2},n)})});for(let e of i)t.appendChild(e);t.markers=i}(t,{data:$,style:nc(C,"marker"),theme:w}),c.emit("tooltip:show",Object.assign(Object.assign({},e),{nativeEvent:!0,data:{data:{x:Sr(o.x,U(E),!0)}}}))},f,{leading:p,trailing:h}),Z=e=>{_C({root:t,single:v,emitter:c,event:e}),l&&_F(t),k&&_z(t)},Q=()=>{_N({root:t,single:v}),l&&_F(t),k&&_z(t)},J=({nativeEvent:e,data:n})=>{if(e)return;let{x:r}=n.data,{x:i}=o,l=i.map(r),[s,u]=a.map([l,.5]),{min:[c,f]}=t.getRenderBounds();K({offsetX:s+c,offsetY:u+f})},tt=()=>{_C({root:t,single:v,emitter:c,nativeEvent:!1})},te=()=>{ti(),Q()},tn=()=>{tr()},tr=()=>{!E&&(t.addEventListener("pointerenter",K),t.addEventListener("pointermove",K),t.addEventListener("pointerleave",Z))},ti=()=>{!E&&(t.removeEventListener("pointerenter",K),t.removeEventListener("pointermove",K),t.removeEventListener("pointerleave",Z))};return tr(),c.on("tooltip:show",J),c.on("tooltip:hide",tt),c.on("tooltip:disable",te),c.on("tooltip:enable",tn),()=>{ti(),c.off("tooltip:show",J),c.off("tooltip:hide",tt),c.off("tooltip:disable",te),c.off("tooltip:enable",tn),M?_C({root:t,single:v,emitter:c,nativeEvent:!1}):Q()}}function _V(t){let{shared:e,crosshairs:n,series:r,name:i,item:o=()=>({}),facet:a=!1}=t,l=_j(t,["shared","crosshairs","series","name","item","facet"]);return(t,i,s)=>{let{container:u,view:c}=t,{scale:f,markState:p,coordinate:h,theme:d}=c,y=_B(p,"seriesTooltip"),g=_B(p,"crosshairs"),v=S0(u),m=_W(r,y);if(m&&Array.from(p.values()).some(t=>{var e;return(null===(e=t.interaction)||void 0===e?void 0:e.seriesTooltip)&&t.tooltip})&&!a)return _G(v,Object.assign(Object.assign({},l),{theme:d,elements:SZ,scale:f,coordinate:h,crosshairs:_W(n,g),item:o,emitter:s}));if(m&&a){let e=i.filter(e=>e!==t&&e.options.parentKey===t.options.key),r=SQ(t,i),a=e[0].view.scale,u=v.getBounds(),c=u.min[0],f=u.min[1];return Object.assign(a,{facet:!0}),_G(v.parentNode.parentNode,Object.assign(Object.assign({},l),{theme:d,elements:()=>r,scale:a,coordinate:h,crosshairs:_W(n,g),item:o,startX:c,startY:f,emitter:s}))}return function(t,{elements:e,scale:n,render:r,groupName:i,sort:o,filter:a,emitter:l,wait:s=50,leading:u=!0,trailing:c=!1,groupKey:f=t=>t,single:p=!0,position:h,enterable:d,datum:y,view:g,mount:v,bounding:m,theme:b,shared:x=!1,body:O=!0,disableNative:w=!1,preserve:E=!1,css:k={}}){let M=e(t),S=new Set(M),_=iu(M,f),P=_d(e=>{let{target:s}=e;if(!S.has(s)){_C({root:t,single:p,emitter:l,event:e});return}let u=f(s),c=_.get(u),y=1!==c.length||x?_D(c,n,i,void 0,b):function(t){let{__data__:e}=t,{title:n,items:r=[]}=e,i=r.filter(nu).map(e=>{var{color:n=_I(t)}=e;return Object.assign(Object.assign({},_j(e,["color"])),{color:n})}).map(_L);return Object.assign(Object.assign({},n&&{title:n}),{items:i})}(c[0]);if(o&&y.items.sort((t,e)=>o(t)-o(e)),a&&(y.items=y.items.filter(a)),_$(y)){_C({root:t,single:p,emitter:l,event:e});return}let{offsetX:w,offsetY:E}=e;O&&_T({root:t,data:y,x:w,y:E,render:r,event:e,single:p,position:h,enterable:d,mount:v,bounding:m,css:k}),l.emit("tooltip:show",Object.assign(Object.assign({},e),{nativeEvent:!0,data:{data:_M(s,g)}}))},s,{leading:u,trailing:c}),j=e=>{_C({root:t,single:p,emitter:l,event:e})},A=()=>{!w&&(t.addEventListener("pointermove",P),t.addEventListener("pointerleave",j))},T=()=>{!w&&(t.removeEventListener("pointermove",P),t.removeEventListener("pointerleave",j))},C=({nativeEvent:t,data:e})=>{if(t)return;let n=_o(M,e.data,y);if(!n)return;let{x:r,y:i,width:o,height:a}=n.getBBox();P({target:n,offsetX:r+o/2,offsetY:i+a/2})},N=({nativeEvent:e}={})=>{!e&&_C({root:t,single:p,emitter:l,nativeEvent:!1})};return l.on("tooltip:show",C),l.on("tooltip:hide",N),l.on("tooltip:enable",()=>{A()}),l.on("tooltip:disable",()=>{T(),_N({root:t,single:p})}),A(),()=>{T(),l.off("tooltip:show",C),l.off("tooltip:hide",N),E?_C({root:t,single:p,emitter:l,nativeEvent:!1}):_N({root:t,single:p})}}(v,Object.assign(Object.assign({},l),{datum:S6(c),elements:SZ,scale:f,coordinate:h,groupKey:e?S4(c):void 0,item:o,emitter:s,view:c,theme:d,shared:e}))}}_V.props={reapplyWhenUpdate:!0};var _H=function(t,e,n,r){return new(n||(n=Promise))(function(i,o){function a(t){try{s(r.next(t))}catch(t){o(t)}}function l(t){try{s(r.throw(t))}catch(t){o(t)}}function s(t){var e;t.done?i(t.value):((e=t.value)instanceof n?e:new n(function(t){t(e)})).then(a,l)}s((r=r.apply(t,e||[])).next())})};let _U="legend-category";function _q(t){return t.getElementsByClassName("legend-category-item-marker")[0]}function _Y(t){return t.getElementsByClassName("legend-category-item-label")[0]}function _X(t){return t.getElementsByClassName("items-item")}function _K(t){return t.getElementsByClassName(_U)}function _Z(t){return t.getElementsByClassName("legend-continuous")}function _Q(t){let e=t.parentNode;for(;e&&!e.__data__;)e=e.parentNode;return e.__data__}function _J(t,{legend:e,channel:n,value:r,ordinal:i,channels:o,allChannels:a,facet:l=!1}){return _H(this,void 0,void 0,function*(){let{view:s,update:u,setState:c}=t;c(e,t=>{let{marks:e}=t,u=e.map(t=>{if("legends"===t.type)return t;let{transform:e=[]}=t,u=e.findIndex(({type:t})=>t.startsWith("group")||t.startsWith("bin")),c=[...e];return c.splice(u+1,0,{type:"filter",[n]:{value:r,ordinal:i}}),nt({},t,Object.assign(Object.assign({transform:c,scale:Object.fromEntries(o.map(t=>[t,{domain:s.scale[t].getOptions().domain}]))},!i&&{animate:!1}),{legend:!l&&Object.fromEntries(a.map(t=>[t,{preserve:!0}]))}))});return Object.assign(Object.assign({},t),{marks:u})}),yield u()})}function _0(t,e){for(let n of t)_J(n,Object.assign(Object.assign({},e),{facet:!0}))}function _1(){return(t,e,n)=>{let{container:r}=t,i=e.filter(e=>e!==t),o=i.length>0,a=t=>_Q(t).scales.map(t=>t.name),l=[..._K(r),..._Z(r)],s=l.flatMap(a),u=o?_d(_0,50,{trailing:!0}):_d(_J,50,{trailing:!0}),c=l.map(e=>{let{name:l,domain:c}=_Q(e).scales[0],f=a(e),p={legend:e,channel:l,channels:f,allChannels:s};return e.className===_U?function(t,{legends:e,marker:n,label:r,datum:i,filter:o,emitter:a,channel:l,state:s={}}){let u=new Map,c=new Map,f=new Map,{unselected:p={markerStroke:"#aaa",markerFill:"#aaa",labelFill:"#aaa"}}=s,h={unselected:nc(p,"marker")},d={unselected:nc(p,"label")},{setState:y,removeState:g}=S8(h,void 0),{setState:v,removeState:m}=S8(d,void 0),b=Array.from(e(t)),x=b.map(i),O=()=>{for(let t of b){let e=i(t),o=n(t),a=r(t);x.includes(e)?(g(o,"unselected"),m(a,"unselected")):(y(o,"unselected"),v(a,"unselected"))}};for(let e of b){let n=()=>{_i(t,"pointer")},r=()=>{var e;_i(e=t,e.cursor)},s=t=>_H(this,void 0,void 0,function*(){let n=i(e),r=x.indexOf(n);-1===r?x.push(n):x.splice(r,1),0===x.length&&x.push(...b.map(i)),yield o(x),O();let{nativeEvent:s=!0}=t;s&&(x.length===b.length?a.emit("legend:reset",{nativeEvent:s}):a.emit("legend:filter",Object.assign(Object.assign({},t),{nativeEvent:s,data:{channel:l,values:x}})))});e.addEventListener("click",s),e.addEventListener("pointerenter",n),e.addEventListener("pointerout",r),u.set(e,s),c.set(e,n),f.set(e,r)}let w=t=>_H(this,void 0,void 0,function*(){let{nativeEvent:e}=t;if(e)return;let{data:n}=t,{channel:r,values:i}=n;r===l&&(x=i,yield o(x),O())}),E=t=>_H(this,void 0,void 0,function*(){let{nativeEvent:e}=t;!e&&(x=b.map(i),yield o(x),O())});return a.on("legend:filter",w),a.on("legend:reset",E),()=>{for(let t of b)t.removeEventListener("click",u.get(t)),t.removeEventListener("pointerenter",c.get(t)),t.removeEventListener("pointerout",f.get(t)),a.off("legend:filter",w),a.off("legend:reset",E)}}(r,{legends:_X,marker:_q,label:_Y,datum:t=>{let{__data__:e}=t,{index:n}=e;return c[n]},filter:e=>{let n=Object.assign(Object.assign({},p),{value:e,ordinal:!0});o?u(i,n):u(t,n)},state:e.attributes.state,channel:l,emitter:n}):function(t,{legend:e,filter:n,emitter:r,channel:i}){let o=({detail:{value:t}})=>{n(t),r.emit({nativeEvent:!0,data:{channel:i,values:t}})};return e.addEventListener("valuechange",o),()=>{e.removeEventListener("valuechange",o)}}(0,{legend:e,filter:e=>{let n=Object.assign(Object.assign({},p),{value:e,ordinal:!1});o?u(i,n):u(t,n)},emitter:n,channel:l})});return()=>{c.forEach(t=>t())}}}function _2(){return(t,e,n)=>{let{container:r,view:i,options:o}=t,a=_K(r),l=SZ(r),s=t=>_Q(t).scales[0].name,u=t=>{let{scale:{[t]:e}}=i;return e},c=S7(o,["active","inactive"]),f=_t(l,S6(i)),p=[];for(let t of a){let e=e=>{let{data:n}=t.attributes,{__data__:r}=e,{index:i}=r;return n[i].label},r=s(t),i=_X(t),o=u(r),a=iu(l,t=>o.invert(t.__data__[r])),{state:h={}}=t.attributes,{inactive:d={}}=h,{setState:y,removeState:g}=S8(c,f),v={inactive:nc(d,"marker")},m={inactive:nc(d,"label")},{setState:b,removeState:x}=S8(v),{setState:O,removeState:w}=S8(m),E=t=>{for(let e of i){let n=_q(e),r=_Y(e);e===t||null===t?(x(n,"inactive"),w(r,"inactive")):(b(n,"inactive"),O(r,"inactive"))}},k=(t,i)=>{let o=e(i),s=new Set(a.get(o));for(let t of l)s.has(t)?y(t,"active"):y(t,"inactive");E(i);let{nativeEvent:u=!0}=t;u&&n.emit("legend:highlight",Object.assign(Object.assign({},t),{nativeEvent:u,data:{channel:r,value:o}}))},M=new Map;for(let t of i){let e=e=>{k(e,t)};t.addEventListener("pointerover",e),M.set(t,e)}let S=t=>{for(let t of l)g(t,"inactive","active");E(null);let{nativeEvent:e=!0}=t;e&&n.emit("legend:unhighlight",{nativeEvent:e})},_=t=>{let{nativeEvent:n,data:o}=t;if(n)return;let{channel:a,value:l}=o;if(a!==r)return;let s=i.find(t=>e(t)===l);s&&k({nativeEvent:!1},s)},P=t=>{let{nativeEvent:e}=t;!e&&S({nativeEvent:!1})};t.addEventListener("pointerleave",S),n.on("legend:highlight",_),n.on("legend:unhighlight",P);let j=()=>{for(let[e,r]of(t.removeEventListener(S),n.off("legend:highlight",_),n.off("legend:unhighlight",P),M))e.removeEventListener(r)};p.push(j)}return()=>p.forEach(t=>t())}}var _5=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function _3(t,e){for(let[n,r]of Object.entries(e))t.style(n,r)}let _4=vv(t=>{let e=t.attributes,{x:n,y:r,width:i,height:o,class:a,renders:l={},handleSize:s=10,document:u}=e,c=_5(e,["x","y","width","height","class","renders","handleSize","document"]);if(!u||void 0===i||void 0===o||void 0===n||void 0===r)return;let f=s/2,p=(t,e,n)=>{!t.handle&&(t.handle=n.createElement("rect"),t.append(t.handle));let{handle:r}=t;return r.attr(e),r},h=nc(np(c,"handleNW","handleNE"),"handleN"),{render:d=p}=h,y=_5(h,["render"]),g=nc(c,"handleE"),{render:v=p}=g,m=_5(g,["render"]),b=nc(np(c,"handleSE","handleSW"),"handleS"),{render:x=p}=b,O=_5(b,["render"]),w=nc(c,"handleW"),{render:E=p}=w,k=_5(w,["render"]),M=nc(c,"handleNW"),{render:S=p}=M,_=_5(M,["render"]),P=nc(c,"handleNE"),{render:j=p}=P,A=_5(P,["render"]),T=nc(c,"handleSE"),{render:C=p}=T,N=_5(T,["render"]),L=nc(c,"handleSW"),{render:I=p}=L,R=_5(L,["render"]),D=(t,e)=>{let{id:n}=t,r=t.attributes,{x:i,y:o}=r,a=e(t,Object.assign({x:0,y:0},_5(r,["x","y"])),u);a.id=n,a.style.draggable=!0},F=t=>()=>new(vv(e=>D(e,t)))({}),z=g_(t).attr("className",a).style("x",n).style("y",r).style("draggable",!0);z.maybeAppend("selection","rect").style("draggable",!0).style("fill","transparent").call(_3,Object.assign({width:i,height:o},np(c,"handle"))),z.maybeAppend("handle-n",F(d)).style("x",f).style("y",-f).style("width",i-s).style("height",s).style("fill","transparent").call(_3,y),z.maybeAppend("handle-e",F(v)).style("x",i-f).style("y",f).style("width",s).style("height",o-s).style("fill","transparent").call(_3,m),z.maybeAppend("handle-s",F(x)).style("x",f).style("y",o-f).style("width",i-s).style("height",s).style("fill","transparent").call(_3,O),z.maybeAppend("handle-w",F(E)).style("x",-f).style("y",f).style("width",s).style("height",o-s).style("fill","transparent").call(_3,k),z.maybeAppend("handle-nw",F(S)).style("x",-f).style("y",-f).style("width",s).style("height",s).style("fill","transparent").call(_3,_),z.maybeAppend("handle-ne",F(j)).style("x",i-f).style("y",-f).style("width",s).style("height",s).style("fill","transparent").call(_3,A),z.maybeAppend("handle-se",F(C)).style("x",i-f).style("y",o-f).style("width",s).style("height",s).style("fill","transparent").call(_3,N),z.maybeAppend("handle-sw",F(I)).style("x",-f).style("y",o-f).style("width",s).style("height",s).style("fill","transparent").call(_3,R)});function _6(t,e){var{brushed:n=()=>{},brushended:r=()=>{},brushcreated:i=()=>{},brushstarted:o=()=>{},brushupdated:a=()=>{},extent:l=function(t){let{width:e,height:n}=t.getBBox();return[0,0,e,n]}(t),brushRegion:s=(t,e,n,r,i)=>[t,e,n,r],reverse:u=!1,fill:c="#777",fillOpacity:f="0.3",stroke:p="#fff",selectedHandles:h=["handle-n","handle-e","handle-s","handle-w","handle-nw","handle-ne","handle-se","handle-sw"]}=e,d=_5(e,["brushed","brushended","brushcreated","brushstarted","brushupdated","extent","brushRegion","reverse","fill","fillOpacity","stroke","selectedHandles"]);let y=null,g=null,v=null,m=null,b=null,x=!1,[O,w,E,k]=l;_i(t,"crosshair"),t.style.draggable=!0;let M=(t,e,n)=>{if(o(n),m&&m.remove(),b&&b.remove(),y=[t,e],u)return S();_()},S=()=>{b=new yu({style:Object.assign(Object.assign({},d),{fill:c,fillOpacity:f,stroke:p,pointerEvents:"none"})}),m=new _4({style:{x:0,y:0,width:0,height:0,draggable:!0,document:t.ownerDocument},className:"mask"}),t.appendChild(b),t.appendChild(m)},_=()=>{m=new _4({style:Object.assign(Object.assign({document:t.ownerDocument,x:0,y:0},d),{fill:c,fillOpacity:f,stroke:p,draggable:!0}),className:"mask"}),t.appendChild(m)},P=(t=!0)=>{m&&m.remove(),b&&b.remove(),y=null,g=null,v=null,x=!1,m=null,b=null,r(t)},j=(t,e,r=!0)=>{let[i,o,a,c]=function(t,e,n,r,i){let[o,a,l,s]=i;return[Math.max(o,Math.min(t,n)),Math.max(a,Math.min(e,r)),Math.min(l,Math.max(t,n)),Math.min(s,Math.max(e,r))]}(t[0],t[1],e[0],e[1],l),[f,p,h,d]=s(i,o,a,c,l);return u?T(f,p,h,d):A(f,p,h,d),n(f,p,h,d,r),[f,p,h,d]},A=(t,e,n,r)=>{m.style.x=t,m.style.y=e,m.style.width=n-t,m.style.height=r-e},T=(t,e,n,r)=>{b.style.d=`
17
- M${O},${w}L${E},${w}L${E},${k}L${O},${k}Z
18
- M${t},${e}L${t},${r}L${n},${r}L${n},${e}Z
19
- `,m.style.x=t,m.style.y=e,m.style.width=n-t,m.style.height=r-e},C=t=>{let e=(t,e,n,r,i)=>t+e<r?r-e:t+n>i?i-n:t,n=t[0]-v[0],r=t[1]-v[1],i=e(n,y[0],g[0],O,E),o=e(r,y[1],g[1],w,k),a=[y[0]+i,y[1]+o];j(a,[g[0]+i,g[1]+o])},N={"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"}},L=t=>R(t)||I(t),I=t=>{let{id:e}=t;return -1!==h.indexOf(e)&&new Set(Object.keys(N)).has(e)},R=t=>t===m.getElementById("selection"),D=e=>{let{target:n}=e,[r,i]=S5(t,e);if(!m||!L(n)){M(r,i,e),x=!0;return}L(n)&&(v=[r,i])},F=e=>{let{target:n}=e,r=S5(t,e);if(!y)return;if(!v)return j(y,r);if(R(n))return C(r);let[i,o]=[r[0]-v[0],r[1]-v[1]],{id:a}=n;if(N[a]){let[t,e,n,r]=N[a].vector;return j([y[0]+i*t,y[1]+o*e],[g[0]+i*n,g[1]+o*r])}},z=e=>{if(v){v=null;let{x:t,y:n,width:r,height:i}=m.style;y=[t,n],g=[t+r,n+i],a(t,n,t+r,n+i,e);return}g=S5(t,e);let[n,r,o,l]=j(y,g);x=!1,i(n,r,o,l,e)},B=t=>{let{target:e}=t;m&&!L(e)&&P()},W=e=>{let{target:n}=e;m&&L(n)&&!x?R(n)?_i(t,"move"):I(n)&&_i(t,N[n.id].cursor):_i(t,"crosshair")},$=()=>{_i(t,"default")};return t.addEventListener("dragstart",D),t.addEventListener("drag",F),t.addEventListener("dragend",z),t.addEventListener("click",B),t.addEventListener("pointermove",W),t.addEventListener("pointerleave",$),{mask:m,move(t,e,n,r,i=!0){!m&&M(t,e,{}),y=[t,e],g=[n,r],j([t,e],[n,r],i)},remove(t=!0){m&&P(t)},destroy(){m&&P(!1),_i(t,"default"),t.removeEventListener("dragstart",D),t.removeEventListener("drag",F),t.removeEventListener("dragend",z),t.removeEventListener("click",B),t.removeEventListener("pointermove",W),t.removeEventListener("pointerleave",$)}}}function _8(t,e,n){return e.filter(e=>{if(e===t)return!1;let{interaction:r={}}=e.options;return Object.values(r).find(t=>t.brushKey===n)})}function _9(t,e){var{elements:n,selectedHandles:r,siblings:i=t=>[],datum:o,brushRegion:a,extent:l,reverse:s,scale:u,coordinate:c,series:f=!1,key:p=t=>t,bboxOf:h=t=>{let{x:e,y:n,width:r,height:i}=t.style;return{x:e,y:n,width:r,height:i}},state:d={},emitter:y}=e,g=_5(e,["elements","selectedHandles","siblings","datum","brushRegion","extent","reverse","scale","coordinate","series","key","bboxOf","state","emitter"]);let v=n(t),m=i(t),b=m.flatMap(n),x=_t(v,o),O=nc(g,"mask"),{setState:w,removeState:E}=S8(d,x),k=new Map,{width:M,height:S,x:_=0,y:P=0}=h(t),j=()=>{for(let t of[...v,...b])E(t,"active","inactive")},A=(t,e,n,r)=>{var i;for(let t of m)null===(i=t.brush)||void 0===i||i.remove();let o=new Set;for(let i of v){let{min:a,max:l}=i.getLocalBounds(),[s,u]=a,[c,f]=l;!function(t,e){let[n,r,i,o]=t,[a,l,s,u]=e;return!(a>i||s<n||l>o||u<r)}([s,u,c,f],[t,e,n,r])?w(i,"inactive"):(w(i,"active"),o.add(p(i)))}for(let t of b)o.has(p(t))?w(t,"active"):w(t,"inactive")},T=()=>{for(let t of v)E(t,"inactive");for(let t of k.values())t.remove();k.clear()},C=(t,e,n,r)=>{let i=t=>{let e=t.cloneNode();return e.__data__=t.__data__,t.parentNode.appendChild(e),k.set(t,e),e};for(let o of v){let a=k.get(o)||i(o);a.style.clipPath=new yp({style:{x:t+_,y:e+P,width:n-t,height:r-e}}),w(o,"inactive"),w(a,"active")}},N=_6(t,Object.assign(Object.assign({},O),{extent:l||[0,0,M,S],brushRegion:a,reverse:s,selectedHandles:r,brushended:t=>{let e=f?T:j;t&&y.emit("brush:remove",{nativeEvent:!0}),e()},brushed:(t,e,n,r,i)=>{let o=So(t,e,n,r,u,c);i&&y.emit("brush:highlight",{nativeEvent:!0,data:{selection:o}}),(f?C:A)(t,e,n,r)},brushcreated:(t,e,n,r,i)=>{let o=So(t,e,n,r,u,c);y.emit("brush:end",Object.assign(Object.assign({},i),{nativeEvent:!0,data:{selection:o}}))},brushupdated:(t,e,n,r,i)=>{let o=So(t,e,n,r,u,c);y.emit("brush:end",Object.assign(Object.assign({},i),{nativeEvent:!0,data:{selection:o}}))},brushstarted:t=>{y.emit("brush:start",t)}})),L=({nativeEvent:t,data:e})=>{if(t)return;let{selection:n}=e,[r,i,o,a]=function(t,e,n){let{x:r,y:i}=e,[o,a]=t,l=Sa(o,r),s=Sa(a,i),u=[l[0],s[0]],c=[l[1],s[1]],[f,p]=n.map(u),[h,d]=n.map(c);return[f,p,h,d]}(n,u,c);N.move(r,i,o,a,!1)};y.on("brush:highlight",L);let I=({nativeEvent:t}={})=>{!t&&N.remove(!1)};y.on("brush:remove",I);let R=N.destroy.bind(N);return N.destroy=()=>{y.off("brush:highlight",L),y.off("brush:remove",I),R()},N}function _7(t){var{facet:e,brushKey:n}=t,r=_5(t,["facet","brushKey"]);return(t,i,o)=>{let{container:a,view:l,options:s}=t,u=S0(a),c={maskFill:"#777",maskFillOpacity:"0.3",maskStroke:"#fff",reverse:!1},f=["active",["inactive",{opacity:.5}]],{scale:p,coordinate:h}=l;if(e){let e=u.getBounds(),n=e.min[0],a=e.min[1],l=e.max[0],s=e.max[1];return _9(u.parentNode.parentNode,Object.assign(Object.assign({elements:()=>SQ(t,i),datum:S6(SJ(t,i).map(t=>t.view)),brushRegion:(t,e,n,r)=>[t,e,n,r],extent:[n,a,l,s],state:S7(SJ(t,i).map(t=>t.options),f),emitter:o,scale:p,coordinate:h,selectedHandles:void 0},c),r))}let d=_9(u,Object.assign(Object.assign({elements:SZ,key:t=>t.__data__.key,siblings:()=>_8(t,i,n).map(t=>S0(t.container)),datum:S6([l,..._8(t,i,n).map(t=>t.view)]),brushRegion:(t,e,n,r)=>[t,e,n,r],extent:void 0,state:S7([s,..._8(t,i,n).map(t=>t.options)],f),emitter:o,scale:p,coordinate:h,selectedHandles:void 0},c),r));return u.brush=d,()=>d.destroy()}}function Pt(t,e,n,r,i){let[,o,,a]=i;return[t,o,n,a]}function Pe(t){return _7(Object.assign(Object.assign({},t),{brushRegion:Pt,selectedHandles:["handle-e","handle-w"]}))}function Pn(t,e,n,r,i){let[o,,a]=i;return[o,e,a,r]}function Pr(t){return _7(Object.assign(Object.assign({},t),{brushRegion:Pn,selectedHandles:["handle-n","handle-s"]}))}var Pi=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let Po="axis-hot-area";function Pa(t){return t.getElementsByClassName("axis")}function Pl(t){return t.getElementsByClassName("axis-line")[0]}function Ps(t){return t.getElementsByClassName("axis-main-group")[0].getLocalBounds()}function Pu(t,e){var{cross:n,offsetX:r,offsetY:i}=e,o=Pi(e,["cross","offsetX","offsetY"]);let a=Ps(t),[l]=Pl(t).getLocalBounds().min,[s,u]=a.min,[c,f]=a.max,p=(c-s)*2;return{brushRegion:Pn,hotZone:new yp({className:Po,style:Object.assign({x:n?s:l-p/2,width:n?p/2:p,y:u,height:f-u},o)}),extent:n?(t,e,n,r)=>[-1/0,e,1/0,r]:(t,e,n,i)=>[Math.floor(s-r),e,Math.ceil(c-r),i]}}function Pc(t,e){var{offsetY:n,offsetX:r,cross:i=!1}=e,o=Pi(e,["offsetY","offsetX","cross"]);let a=Ps(t),[,l]=Pl(t).getLocalBounds().min,[s,u]=a.min,[c,f]=a.max,p=f-u;return{brushRegion:Pt,hotZone:new yp({className:Po,style:Object.assign({x:s,width:c-s,y:i?u:l-p,height:i?p:2*p},o)}),extent:i?(t,e,n,r)=>[t,-1/0,n,1/0]:(t,e,r,i)=>[t,Math.floor(u-n),r,Math.ceil(f-n)]}}function Pf(t){return(e,n,r)=>{let{container:i,view:o,options:a}=e,{x:l,y:s}=S0(i).getBBox(),{coordinate:u}=o;return function(t,e){var{axes:n,elements:r,points:i,horizontal:o,datum:a,offsetY:l,offsetX:s,reverse:u=!1,state:c={},emitter:f,coordinate:p}=e,h=Pi(e,["axes","elements","points","horizontal","datum","offsetY","offsetX","reverse","state","emitter","coordinate"]);let d=r(t),y=n(t),{setState:g,removeState:v}=S8(c,_t(d,a)),m=new Map,b=nc(h,"mask"),x=t=>Array.from(m.values()).every(([e,n,r,i])=>t.some(([t,o])=>t>=e&&t<=r&&o>=n&&o<=i)),O=y.map(t=>t.attributes.scale),w=t=>t.length>2?[t[0],t[t.length-1]]:t,E=new Map,k=()=>{E.clear();for(let t=0;t<y.length;t++){let{domain:e}=O[t].getOptions();E.set(t,w(e))}};k();let M=(t,e)=>{let n=[];for(let t of d)x(i(t))?(g(t,"active"),n.push(t)):g(t,"inactive");if(E.set(t,_(n,t)),!!e)f.emit("brushAxis:highlight",{nativeEvent:!0,data:{selection:(()=>{if(!P)return Array.from(E.values());let t=[];for(let[e,n]of E){let{name:r}=O[e].getOptions();"x"===r?t[0]=n:t[1]=n}return t})()}})},S=t=>{for(let t of d)v(t,"active","inactive");k(),t&&f.emit("brushAxis:remove",{nativeEvent:!0})},_=(t,e)=>{let n=O[e],{name:r}=n.getOptions(),i=t.map(t=>{let e=t.__data__;return n.invert(e[r])});return w(Si(n,i))},P=y.some(o)&&y.some(t=>!o(t)),j=[];for(let t=0;t<y.length;t++){let e=y[t],{hotZone:n,brushRegion:r,extent:i}=(o(e)?Pc:Pu)(e,{offsetY:l,offsetX:s,cross:P,zIndex:999,fill:"transparent"});e.parentNode.appendChild(n);let a=_6(n,Object.assign(Object.assign({},b),{reverse:u,brushRegion:r,brushended(n){m.delete(e),0===Array.from(m.entries()).length?S(n):M(t,n)},brushed(n,r,o,a,l){m.set(e,i(n,r,o,a)),M(t,l)}}));j.push(a)}let A=(t={})=>{let{nativeEvent:e}=t;!e&&j.forEach(t=>t.remove(!1))},T=(t,e,n)=>{let r,[i,a]=t,l=C(i,e,n);let s=C(a,e,n)+((r=e).getStep?r.getStep():0);return o(n)?[l,-1/0,s,1/0]:[-1/0,l,1/0,s]},C=(t,e,n)=>{let{height:r,width:i}=p.getOptions(),a=e.clone();return o(n)?a.update({range:[0,i]}):a.update({range:[r,0]}),a.map(t)},N=t=>{let{nativeEvent:e}=t;if(e)return;let{selection:n}=t.data;for(let t=0;t<j.length;t++){let e=n[t],r=j[t],i=y[t];if(e){let n=O[t];r.move(...T(e,n,i),!1)}else r.remove(!1)}};return f.on("brushAxis:remove",A),f.on("brushAxis:highlight",N),()=>{j.forEach(t=>t.destroy()),f.off("brushAxis:remove",A),f.off("brushAxis:highlight",N)}}(i,Object.assign({elements:SZ,axes:Pa,offsetY:s,offsetX:l,points:t=>t.__data__.points,horizontal:t=>{let{startPos:[e,n],endPos:[r,i]}=t.attributes;return e!==r&&n===i},datum:S6(o),state:S7(a,["active",["inactive",{opacity:.5}]]),coordinate:u,emitter:r},t))}}var Pp=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function Ph(t){var{hideX:e=!0,hideY:n=!0}=t,r=Pp(t,["hideX","hideY"]);return(t,i,o)=>{let{container:a,view:l,options:s,update:u,setState:c}=t,f=S0(a),p=!1,h=!1,d=l,{scale:y,coordinate:g}=l;return function(t,e){var{filter:n,reset:r,brushRegion:i,extent:o,reverse:a,emitter:l,scale:s,coordinate:u,selection:c,series:f=!1}=e;let p=nc(Pp(e,["filter","reset","brushRegion","extent","reverse","emitter","scale","coordinate","selection","series"]),"mask"),{width:h,height:d}=t.getBBox(),y=function(t=300){let e=null;return n=>{let{timeStamp:r}=n;return null!==e&&r-e<t?(e=r,!0):(e=r,!1)}}(),g=_6(t,Object.assign(Object.assign({},p),{extent:o||[0,0,h,d],brushRegion:i,reverse:a,brushcreated:function(t,e,r,i,o){o.nativeEvent=!0,n(c(t,e,r,i),o),g.remove()}}));t.addEventListener("click",v);function v(t){y(t)&&(t.nativeEvent=!0,r(t))}let m=({nativeEvent:t,data:e})=>{if(t)return;let{selection:r}=e;n(r,{nativeEvent:!1})};return l.on("brush:filter",m),()=>{g.destroy(),l.off("brush:filter",m),t.removeEventListener("click",v)}}(f,Object.assign(Object.assign({brushRegion:(t,e,n,r)=>[t,e,n,r],selection:(t,e,n,r)=>{let{scale:i,coordinate:o}=d;return So(t,e,n,r,i,o)},filter:(t,r)=>{var i,a,l,f;return i=this,a=void 0,l=void 0,f=function*(){if(h)return;h=!0;let[i,a]=t;c("brushFilter",t=>{let{marks:r}=t,o=r.map(t=>nt({axis:Object.assign(Object.assign({},e&&{x:{transform:[{type:"hide"}]}}),n&&{y:{transform:[{type:"hide"}]}})},t,{scale:{x:{domain:i,nice:!1},y:{domain:a,nice:!1}}}));return Object.assign(Object.assign({},s),{marks:o,clip:!0})}),o.emit("brush:filter",Object.assign(Object.assign({},r),{data:{selection:[i,a]}})),d=(yield u()).view,h=!1,p=!0},new(l||(l=Promise))(function(t,e){function n(t){try{o(f.next(t))}catch(t){e(t)}}function r(t){try{o(f.throw(t))}catch(t){e(t)}}function o(e){var i;e.done?t(e.value):((i=e.value)instanceof l?i:new l(function(t){t(i)})).then(n,r)}o((f=f.apply(i,a||[])).next())})},reset:t=>{if(h||!p)return;let{scale:e}=l,{x:n,y:r}=e,i=n.getOptions().domain,a=r.getOptions().domain;o.emit("brush:filter",Object.assign(Object.assign({},t),{data:{selection:[i,a]}})),p=!1,d=l,c("brushFilter"),u()},extent:void 0,emitter:o,scale:y,coordinate:g},{maskFill:"#777",maskFillOpacity:"0.3",maskStroke:"#fff",unhighlightedOpacity:.5,reverse:!1}),r))}}function Pd(t){return Ph(Object.assign(Object.assign({hideX:!0},t),{brushRegion:Pt}))}function Py(t){return Ph(Object.assign(Object.assign({hideY:!0},t),{brushRegion:Pn}))}var Pg=function(t,e,n,r){return new(n||(n=Promise))(function(i,o){function a(t){try{s(r.next(t))}catch(t){o(t)}}function l(t){try{s(r.throw(t))}catch(t){o(t)}}function s(t){var e;t.done?i(t.value):((e=t.value)instanceof n?e:new n(function(t){t(e)})).then(a,l)}s((r=r.apply(t,e||[])).next())})};function Pv(t){return[t[0],t[t.length-1]]}function Pm({initDomain:t={},className:e="slider",prefix:n="slider",setValue:r=(t,e)=>t.setValues(e),hasState:i=!1,wait:o=50,leading:a=!0,trailing:l=!1,getInitValues:s=t=>{var e;let n=null===(e=null==t?void 0:t.attributes)||void 0===e?void 0:e.values;if(0!==n[0]||1!==n[1])return n}}){return(u,c,f)=>{let{container:p,view:h,update:d,setState:y}=u,g=p.getElementsByClassName(e);if(!g.length)return()=>{};let v=!1,{scale:m,coordinate:b,layout:x}=h,{paddingLeft:O,paddingTop:w,paddingBottom:E,paddingRight:k}=x,{x:M,y:S}=m,_=s1(b),P=t=>{let e="vertical"===t?"y":"x",n="vertical"===t?"x":"y";return _?[n,e]:[e,n]},j=new Map,A=new Set,T={x:t.x||M.getOptions().domain,y:t.y||S.getOptions().domain};for(let t of g){let{orientation:e}=t.attributes,[u,c]=P(e),p=`${n}${oR(u)}:filter`,h="x"===u,{ratio:g}=M.getOptions(),{ratio:b}=S.getOptions(),x=t=>{if(t.data){let{selection:e}=t.data,[n=Pv(T.x),r=Pv(T.y)]=e;return h?[Si(M,n,g),Si(S,r,b)]:[Si(S,r,b),Si(M,n,g)]}let{value:n}=t.detail,r=function(t,e,n){let[r,i]=t,o=n?t=>1-t:t=>t,a=Sr(e,o(r),!0),l=Sr(e,o(i),!1);return Si(e,[a,l])}(n,m[u],_&&"horizontal"===e);return[r,T[c]]},C=_d(e=>Pg(this,void 0,void 0,function*(){let{initValue:r=!1}=e;if(v&&!r)return;v=!0;let{nativeEvent:o=!0}=e,[a,l]=x(e);if(T[u]=a,T[c]=l,o){let t=h?a:l,n=h?l:a;f.emit(p,Object.assign(Object.assign({},e),{nativeEvent:o,data:{selection:[Pv(t),Pv(n)]}}))}y(t,t=>Object.assign(Object.assign({},function(t,e,n,r=!1,i="x",o="y"){let{marks:a}=t,l=a.map(t=>{var a,l;return nt({axis:{x:{transform:[{type:"hide"}]},y:{transform:[{type:"hide"}]}}},t,{scale:e,[n]:Object.assign(Object.assign({},(null===(a=t[n])||void 0===a?void 0:a[i])&&{[i]:Object.assign({preserve:!0},r&&{ratio:null})}),(null===(l=t[n])||void 0===l?void 0:l[o])&&{[o]:{preserve:!0}}),animate:!1})});return Object.assign(Object.assign({},t),{marks:l,clip:!0,animate:!1})}(t,{[u]:{domain:a,nice:!1}},n,i,u,c)),{paddingLeft:O,paddingTop:w,paddingBottom:E,paddingRight:k})),yield d(),v=!1}),o,{leading:a,trailing:l}),N=e=>{let{nativeEvent:n}=e;if(n)return;let{data:i}=e,{selection:o}=i,[a,l]=o;t.dispatchEvent(new d_("valuechange",{data:i,nativeEvent:!1})),r(t,h?Sa(a,M):Sa(l,S))};f.on(p,N),t.addEventListener("valuechange",C),j.set(t,C),A.add([p,N]);let L=s(t);L&&t.dispatchEvent(new d_("valuechange",{detail:{value:L},nativeEvent:!1,initValue:!0}))}return d(),()=>{for(let[t,e]of j)t.removeEventListener("valuechange",e);for(let[t,e]of A)f.off(t,e)}}}let Pb="g2-scrollbar";function Px(t={}){return(e,n,r)=>{let{view:i,container:o}=e;if(!o.getElementsByClassName(Pb).length)return()=>{};let{scale:a}=i,{x:l,y:s}=a,u={x:[...l.getOptions().domain],y:[...s.getOptions().domain]};return l.update({domain:l.getOptions().expectedDomain}),s.update({domain:s.getOptions().expectedDomain}),Pm(Object.assign(Object.assign({},t),{initDomain:u,className:Pb,prefix:"scrollbar",hasState:!0,setValue:(t,e)=>t.setValue(e[0]),getInitValues:t=>{let e=t.slider.attributes.values;if(0!==e[0])return e}}))(e,n,r)}}function PO(t){return t.replace(/-(\w)/g,function(t,e){return e.toUpperCase()})}var Pw=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let PE={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 Pk(t){return"text"===t.nodeName&&(!!t.isOverflowing()||!1)}function PM(t){var{offsetX:e=8,offsetY:n=8}=t,r=Pw(t,["offsetX","offsetY"]);return t=>{let{container:i}=t,[o,a]=i.getBounds().min,l=nc(r,"tip"),s=new Set,u=t=>{var r,u,c;let{target:f}=t;if(!Pk(f)){t.stopPropagation();return}let{offsetX:p,offsetY:h}=t,d=p+e-o,y=h+n-a;if(f.tip){f.tip.style.x=d,f.tip.style.y=y;return}let{text:g}=f.style;let v=new ya({className:"poptip",style:{innerHTML:(r="div",u=g,c=Object.assign(Object.assign({},PE),l),`<div style="${Object.entries(c).map(([t,e])=>`${t.replace(/([A-Z])/g,"-$1").toLowerCase()}:${e}`).join(";")}">${u}</${r}>`),x:d,y}});i.appendChild(v),f.tip=v,s.add(v)},c=t=>{let{target:e}=t;if(!Pk(e)){t.stopPropagation();return}e.tip&&(e.tip.remove(),e.tip=null,s.delete(e.tip))};return i.addEventListener("pointerover",u),i.addEventListener("pointerout",c),()=>{i.removeEventListener("pointerover",u),i.removeEventListener("pointerout",c),s.forEach(t=>t.remove())}}}function PS(t){return ne(t)?0:i_(t)?t.length:Object.keys(t).length}PM.props={reapplyWhenUpdate:!0};var P_=function(t){return"function"==typeof t},PP=Object.keys?function(t){return Object.keys(t)}:function(t){var e=[];return E$(t,function(n,r){!(P_(t)&&"prototype"===r)&&e.push(r)}),e},Pj=function(t,e){var n=PP(e),r=n.length;if(ne(t))return!r;for(var i=0;i<r;i+=1){var o=n[i];if(e[o]!==t[o]||!(o in t))return!1}return!0},PA=function(t,e){if(!e8(t))return null;if(P_(e)&&(n=e),e7(e)&&(n=function(t){return Pj(t,e)}),n){for(var n,r=0;r<t.length;r+=1)if(n(t[r]))return t[r]}return null},PT=Object.prototype.hasOwnProperty,PC=function(t,e){if(null===t||!e7(t))return{};var n={};return E$(e,function(e){PT.call(t,e)&&(n[e]=t[e])}),n},PN=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let PL=t=>t.querySelectorAll(".element"),PI={breadCrumbFill:"rgba(0, 0, 0, 0.85)",breadCrumbFontSize:12,breadCrumbY:12,activeFill:"rgba(0, 0, 0, 0.5)"};function PR(t={}){let{originData:e=[],layout:n}=t,r=nt({},PI,PN(t,["originData","layout"])),i=nc(r,"breadCrumb"),o=nc(r,"active");return t=>{let{update:r,setState:a,container:l,options:s}=t,u=g_(l).select(`.${SW}`).node(),{state:c}=s.marks[0],f=new yo;u.appendChild(f);let p=(t,s)=>{var c,h,d,y;return c=this,h=void 0,d=void 0,y=function*(){if(f.removeChildren(),s){let e="",n=i.y,r=0,a=[],l=u.getBBox().width,s=t.map((o,s)=>{e=`${e}${o}/`,a.push(o);let u=new yh({name:e.replace(/\/$/,""),style:Object.assign(Object.assign({text:o,x:r,path:[...a],depth:s},i),{y:n})});f.appendChild(u);let c=new yh({style:Object.assign(Object.assign({x:r+=u.getBBox().width,text:" / "},i),{y:n})});return f.appendChild(c),(r+=c.getBBox().width)>l&&(n=f.getBBox().height+i.y,r=0,u.attr({x:r,y:n}),r+=u.getBBox().width,c.attr({x:r,y:n}),r+=c.getBBox().width),s===PS(t)-1&&c.remove(),u});s.forEach((t,e)=>{if(e===PS(s)-1)return;let n=Object.assign({},t.attributes);t.attr("cursor","pointer"),t.addEventListener("mouseenter",()=>{t.attr(o)}),t.addEventListener("mouseleave",()=>{t.attr(n)}),t.addEventListener("click",()=>{p(iA(t,["style","path"]),iA(t,["style","depth"]))})})}!function(t,e){[..._K(t),..._Z(t)].forEach(t=>{e(t,t=>t)})}(l,a),a("treemapDrillDown",r=>{let{marks:i}=r,o=t.join("/"),a=i.map(t=>{if("rect"!==t.type)return t;let r=e;if(s){let t=e.filter(t=>{let e=iA(t,["id"]);return e&&(e.match(`${o}/`)||o.match(e))}).map(t=>({value:0===t.height?iA(t,["value"]):void 0,name:iA(t,["id"])})),{paddingLeft:i,paddingBottom:a,paddingRight:l}=n;r=iB(t,Object.assign(Object.assign({},n),{paddingTop:(n.paddingTop||f.getBBox().height+10)/(s+1),paddingLeft:i/(s+1),paddingBottom:a/(s+1),paddingRight:l/(s+1),path:t=>t.name,layer:t=>t.depth===s+1}),{value:"value"})[0]}else r=e.filter(t=>1===t.depth);let i=[];return r.forEach(({path:t})=>{i.push(iP(t))}),nt({},t,{data:r,scale:{color:{domain:i}}})});return Object.assign(Object.assign({},r),{marks:a})}),yield r(void 0,["legendFilter"])},new(d||(d=Promise))(function(t,e){function n(t){try{i(y.next(t))}catch(t){e(t)}}function r(t){try{i(y.throw(t))}catch(t){e(t)}}function i(e){var i;e.done?t(e.value):((i=e.value)instanceof d?i:new d(function(t){t(i)})).then(n,r)}i((y=y.apply(c,h||[])).next())})},h=t=>{let n=t.target;if("rect"!==iA(n,["markType"]))return;let r=iA(n,["__data__","key"]),i=PA(e,t=>t.id===r);iA(i,"height")&&p(iA(i,"path"),iA(i,"depth"))};u.addEventListener("click",h);let d=PP(Object.assign(Object.assign({},c.active),c.inactive)),y=()=>{PL(u).forEach(t=>{let n=iA(t,["style","cursor"]),r=PA(e,e=>e.id===iA(t,["__data__","key"]));if("pointer"!==n&&(null==r?void 0:r.height)){t.style.cursor="pointer";let e=PC(t.attributes,d);t.addEventListener("mouseenter",()=>{t.attr(c.active)}),t.addEventListener("mouseleave",()=>{t.attr(nt(e,c.inactive))})}})};return y(),u.addEventListener("mousemove",y),()=>{f.remove(),u.removeEventListener("click",h),u.removeEventListener("mousemove",y)}}}var PD=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function PF(t){return(e,...n)=>nt({},t(e,...n),e)}function Pz(t){return(e,...n)=>nt({},e,t(e,...n))}function PB(t,e){if(!t)return e;if(Array.isArray(t))return t;let{value:n=e}=t;return Object.assign(Object.assign({},PD(t,["value"])),{value:n})}var PW=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let P$=()=>t=>{let{children:e}=t;if(!Array.isArray(e))return[];let{x:n=0,y:r=0,width:i,height:o,data:a}=t;return e.map(t=>{var{data:e,x:l,y:s,width:u,height:c}=t;return Object.assign(Object.assign({},PW(t,["data","x","y","width","height"])),{data:PB(e,a),x:null!=l?l:n,y:null!=s?s:r,width:null!=u?u:i,height:null!=c?c:o})})};P$.props={};var PG=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let PV=()=>t=>{let{children:e}=t;if(!Array.isArray(e))return[];let{direction:n="row",ratio:r=e.map(()=>1),padding:i=0,data:o}=t,[a,l,s,u]="col"===n?["y","height","width","x"]:["x","width","height","y"],c=r.reduce((t,e)=>t+e),f=t[l]-i*(e.length-1),p=r.map(t=>t/c*f),h=[],d=t[a]||0;for(let n=0;n<p.length;n+=1){let r=e[n],{data:c}=r,f=PG(r,["data"]),y=PB(c,o);h.push(Object.assign({[a]:d,[l]:p[n],[u]:t[u]||0,[s]:t[s],data:y},f)),d+=p[n]+i}return h};PV.props={};class PH{constructor(t){this.$value=t}static of(t){return new PH(t)}call(t,...e){return this.$value=t(this.$value,...e),this}value(){return this.$value}}var PU=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let Pq=PF(t=>{let{encode:e,data:n,scale:r,shareSize:i=!1}=t,{x:o,y:a}=e,l=(t,e)=>{var o;if(void 0===t||!i)return{};let a=iu(n,e=>e[t]),l=(null===(o=null==r?void 0:r[e])||void 0===o?void 0:o.domain)||Array.from(a.keys()),s=l.map(t=>a.has(t)?a.get(t).length:1);return{domain:l,flex:s}};return{scale:{x:Object.assign(Object.assign({paddingOuter:0,paddingInner:.1,guide:void 0===o?null:{position:"top"}},void 0===o&&{paddingInner:0}),l(o,"x")),y:Object.assign(Object.assign({range:[0,1],paddingOuter:0,paddingInner:.1,guide:void 0===a?null:{position:"right"}},void 0===a&&{paddingInner:0}),l(a,"y"))}}}),PY=PF(t=>{let e,n,r;let{data:i,scale:o}=t,a=[t];for(;a.length;){let{children:t,encode:i={},scale:o={},legend:l={}}=a.shift(),{color:s}=i,{color:u}=o,{color:c}=l;void 0!==s&&(e=s),void 0!==u&&(n=u),void 0!==c&&(r=c),Array.isArray(t)&&a.push(...t)}let l="string"==typeof e?e:"",[s,u]=(()=>{var t;let n=null===(t=null==o?void 0:o.color)||void 0===t?void 0:t.domain;if(void 0!==n)return[n];if(void 0===e)return[void 0];let r="function"==typeof e?e:t=>t[e],a=i.map(r);return a.some(t=>"number"==typeof t)?[gB(a)]:[Array.from(new Set(a)),"ordinal"]})();return{encode:{color:e},scale:{color:nt({},n,{domain:s,type:u})},legend:{color:nt({title:l},r)}}}),PX=PF(()=>({animate:{enterType:"fadeIn"}})),PK=Pz(()=>({frame:!1,encode:{shape:"hollow"},style:{lineWidth:0}})),PZ=Pz(()=>({type:"cell"})),PQ=Pz(t=>{let{data:e}=t;return{data:{type:"inline",value:e,transform:[{type:"custom",callback:()=>{let{data:e,encode:n}=t,{x:r,y:i}=n,o=r?Array.from(new Set(e.map(t=>t[r]))):[],a=i?Array.from(new Set(e.map(t=>t[i]))):[];return(()=>{if(o.length&&a.length){let t=[];for(let e of o)for(let n of a)t.push({[r]:e,[i]:n});return t}return o.length?o.map(t=>({[r]:t})):a.length?a.map(t=>({[i]:t})):void 0})()}}]}}}),PJ=Pz((t,e=P0,n=P2,r=P5,i={})=>{let{data:o,encode:a,children:l,scale:s,x:u=0,y:c=0,shareData:f=!1,key:p}=t,{value:h}=o,{x:d,y:y}=a,{color:g}=s,{domain:v}=g;return{children:(t,o,a)=>{let{x:s,y:g}=o,{paddingLeft:m,paddingTop:b,marginLeft:x,marginTop:O}=a,{domain:w}=s.getOptions(),{domain:E}=g.getOptions(),k=g$(t),M=t.map(e),S=t.map(({x:t,y:e})=>[s.invert(t),g.invert(e)]),_=S.map(([t,e])=>n=>{let{[d]:r,[y]:i}=n;return(void 0===d||r===t)&&(void 0===y||i===e)}).map(t=>h.filter(t)),P=f?rY(_,t=>t.length):void 0,j=S.map(([t,e])=>({columnField:d,columnIndex:w.indexOf(t),columnValue:t,columnValuesLength:w.length,rowField:y,rowIndex:E.indexOf(e),rowValue:e,rowValuesLength:E.length})),A=j.map(t=>Array.isArray(l)?l:[l(t)].flat(1));return k.flatMap(t=>{let[e,o,a,l]=M[t],s=j[t],f=_[t];return A[t].map(g=>{var w,E,{scale:k,key:M,facet:S=!0,axis:_={},legend:j={}}=g,A=PU(g,["scale","key","facet","axis","legend"]);let T=(null===(w=null==k?void 0:k.y)||void 0===w?void 0:w.guide)||_.y,C=(null===(E=null==k?void 0:k.x)||void 0===E?void 0:E.guide)||_.x,N=S?f:0===f.length?[]:h,L={x:P3(C,n)(s,N),y:P3(T,r)(s,N)};return Object.assign(Object.assign({key:`${M}-${t}`,data:N,margin:0,x:e+m+u+x,y:o+b+c+O,parentKey:p,width:a,height:l,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,frame:!!N.length,dataDomain:P,scale:nt({x:{tickCount:d?5:void 0},y:{tickCount:y?5:void 0}},k,{color:{domain:v}}),axis:nt({},_,L),legend:!1},A),i)})})}}});function P0(t){let{points:e}=t;return gI(e)}function P1(t,e){return e.length?nt({title:!1,tick:null,label:null},t):nt({title:!1,tick:null,label:null,grid:null},t)}function P2(t){return(e,n)=>{let{rowIndex:r,rowValuesLength:i,columnIndex:o,columnValuesLength:a}=e;return r!==i-1?P1(t,n):nt({title:o===a-1&&void 0,grid:n.length?void 0:null},t)}}function P5(t){return(e,n)=>{let{rowIndex:r,columnIndex:i}=e;return 0!==i?P1(t,n):nt({title:0===r&&void 0,grid:n.length?void 0:null},t)}}function P3(t,e){return"function"==typeof t?t:null===t||!1===t?()=>null:e(t)}let P4=()=>t=>[PH.of(t).call(PZ).call(PY).call(PX).call(Pq).call(PK).call(PQ).call(PJ).value()];P4.props={};var P6=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let P8=PF(t=>({scale:{x:{guide:null,paddingOuter:0,paddingInner:.1},y:{guide:null,range:[0,1],paddingOuter:0,paddingInner:.1}}})),P9=Pz(t=>{let{data:e,children:n,x:r=0,y:i=0,key:o}=t;return{children:(t,a,l)=>{let{x:s,y:u}=a,{paddingLeft:c,paddingTop:f,marginLeft:p,marginTop:h}=l,{domain:d}=s.getOptions(),{domain:y}=u.getOptions(),g=g$(t),v=t.map(({points:t})=>gI(t)),m=t.map(({x:t,y:e})=>[s.invert(t),u.invert(e)]),b=m.map(([t,e])=>({columnField:t,columnIndex:d.indexOf(t),columnValue:t,columnValuesLength:d.length,rowField:e,rowIndex:y.indexOf(e),rowValue:e,rowValuesLength:y.length})),x=b.map(t=>Array.isArray(n)?n:[n(t)].flat(1));return g.flatMap(t=>{let[n,a,l,s]=v[t],[u,d]=m[t],y=b[t];return x[t].map(g=>{var v,m;let{scale:b,key:x,encode:O,axis:w,interaction:E}=g,k=P6(g,["scale","key","encode","axis","interaction"]),M=null===(v=null==b?void 0:b.y)||void 0===v?void 0:v.guide,S=null===(m=null==b?void 0:b.x)||void 0===m?void 0:m.guide,_={x:(function(t){return"function"==typeof t?t:null===t?()=>null:(e,n)=>{let{rowIndex:r,rowValuesLength:i}=e;if(r!==i-1)return P1(t,n)}})(S)(y,e),y:(function(t){return"function"==typeof t?t:null===t?()=>null:(e,n)=>{let{columnIndex:r}=e;if(0!==r)return P1(t,n)}})(M)(y,e)};return Object.assign({data:e,parentKey:o,key:`${x}-${t}`,x:n+c+r+p,y:a+f+i+h,width:l,height:s,margin:0,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,frame:!0,scale:nt({x:{facet:!1},y:{facet:!1}},b),axis:nt({x:{tickCount:5},y:{tickCount:5}},w,_),legend:!1,encode:nt({},O,{x:u,y:d}),interaction:nt({},E,{legendFilter:!1})},k)})})}}}),P7=Pz(t=>{let{encode:e}=t,n=P6(t,["encode"]),{position:r=[],x:i=r,y:o=[...r].reverse()}=e,a=P6(e,["position","x","y"]),l=[];for(let t of[i].flat(1))for(let e of[o].flat(1))l.push({$x:t,$y:e});return Object.assign(Object.assign({},n),{data:l,encode:Object.assign(Object.assign({},a),{x:"$x",y:"$y"}),scale:Object.assign(Object.assign({},1===[i].flat(1).length&&{x:{paddingInner:0}}),1===[o].flat(1).length&&{y:{paddingInner:0}})})}),jt=()=>t=>[PH.of(t).call(PZ).call(PY).call(P9).call(P7).call(PX).call(PK).call(P8).value()];var je=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let jn=PF(t=>({scale:{x:{guide:{type:"axisArc"},paddingOuter:0,paddingInner:.1},y:{guide:null,range:[0,1],paddingOuter:0,paddingInner:.1}}})),jr=PF(t=>({coordinate:{type:"polar"}})),ji=t=>{let{encode:e}=t,n=je(t,["encode"]),{position:r}=e;return Object.assign(Object.assign({},n),{encode:{x:r}})};function jo(t){return t=>null}function ja(t){let{points:e}=t,[n,r,i,o]=e,a=gT(n,o),l=gj(n,o),s=gL(l,gj(r,i)),u=1/Math.sin(s/2),c=a/(1+u),f=c*Math.sqrt(2),[p,h]=i,d=gN(l)+s/2,y=c*u;return[p+y*Math.sin(d)-f/2,h-y*Math.cos(d)-f/2,f,f]}let jl=()=>t=>[PH.of(t).call(PZ).call(ji).call(PY).call(jr).call(PQ).call(PJ,ja,jo,jo,{frame:!1}).call(PX).call(PK).call(jn).value()],js=()=>t=>{let{children:e=[],duration:n=1e3,iterationCount:r=1,direction:i="normal",easing:o="ease-in-out-sine"}=t,a=e.length;if(!Array.isArray(e)||0===a)return[];let{key:l}=e[0],s=e.map(t=>Object.assign(Object.assign({},t),{key:l})).map(t=>(function(t,e,n){let r=[t];for(;r.length;){let t=r.pop();t.animate=nt({enter:{duration:e},update:{duration:e,easing:n,type:"morphing",fill:"both"},exit:{type:"fadeOut",duration:e}},t.animate||{});let{children:i}=t;Array.isArray(i)&&r.push(...i)}return t})(t,n,o));return function*(){let t,e=0;for(;"infinite"===r||e<r;){let[n,r]=function(t,e,n){let r=[0,n],i=[-n+1,1];return"normal"===t?r:"reverse"===t?i:"alternate"===t?e%2==0?r:i:"reverse-alternate"===t?e%2==0?i:r:void 0}(i,e,a);for(let e=n;e<r;e+=1){let n=Math.abs(e);t!==n&&(yield s[n]),t=n}e++}}};function ju(t,e){let n;let r=-1,i=-1;if(void 0===e)for(let e of t)++i,null!=e&&(n<e||void 0===n&&e>=e)&&(n=e,r=i);else for(let o of t)null!=(o=e(o,++i,t))&&(n<o||void 0===n&&o>=o)&&(n=o,r=i);return r}function jc(t,e,n){let{encode:r}=n;if(null===t)return[e];let i=(function(t){return Array.isArray(t)?t:[t]})(t).map(t=>{var e;return[t,null===(e=nM(r,t))||void 0===e?void 0:e[0]]}).filter(([,t])=>nu(t));return Array.from(iu(e,t=>i.map(([,e])=>e[t]).join("-")).values())}function jf(t){return Array.isArray(t)?function(t){return(e,n,r)=>(n,r)=>t.reduce((t,i)=>0!==t?t:M0(e[n][i],e[r][i]),0)}(t):"function"==typeof t?function(t){return(e,n,r)=>jm(n=>t(e[n]))}(t):"series"===t?jd:"value"===t?jy:"sum"===t?jg:"maxIndex"===t?jv:()=>null}function jp(t,e){for(let n of t)n.sort(e)}function jh(t,e){return(null==e?void 0:e.domain)||Array.from(new Set(t))}js.props={};function jd(t,e,n){return jm(t=>n[t])}function jy(t,e,n){return jm(t=>e[t])}function jg(t,e,n){let r=new Map(Array.from(iu(g$(t),t=>n[+t]).entries()).map(([t,n])=>[t,n.reduce((t,n)=>t+ +e[n])]));return jm(t=>r.get(n[t]))}function jv(t,e,n){let r=new Map(Array.from(iu(g$(t),t=>n[+t]).entries()).map(([t,n])=>[t,ju(n,t=>e[t])]));return jm(t=>r.get(n[t]))}function jm(t){return(e,n)=>M0(t(e),t(n))}let jb=(t={})=>{let{groupBy:e="x",orderBy:n=null,reverse:r=!1,y:i="y",y1:o="y1",series:a=!0}=t;return(t,l)=>{let{data:s,encode:u,style:c={}}=l,[f,p]=nM(u,"y"),[h,d]=nM(u,"y1"),[y]=a?nS(u,"series","color"):nM(u,"color"),g=jc(e,t,l),v=jf(n)(s,f,y);v&&jp(g,v);let m=Array(t.length),b=Array(t.length),x=Array(t.length),O=[],w=[];for(let t of g){r&&t.reverse();let e=h?+h[t[0]]:0,n=[],i=[];for(let r of t){let t=x[r]=+f[r]-e;t<0?i.push(r):t>=0&&n.push(r)}let o=n.length>0?n:i,a=i.length>0?i:n,l=n.length-1,s=0;for(;l>0&&0===f[o[l]];)l--;for(;s<a.length-1&&0===f[a[s]];)s++;O.push(o[l]),w.push(a[s]);let u=e;for(let t of i.reverse()){let e=x[t];u=m[t]=(b[t]=u)+e}let c=e;for(let t of n){let e=x[t];e>0?c=m[t]=(b[t]=c)+e:m[t]=b[t]=c}}let E=new Set(O),k=new Set(w),M="y"===i?m:b,S="y"===o?m:b;return[t,nt({},l,{encode:{y0:nw(f,p),y:nO(M,p),y1:nO(S,d)},style:Object.assign({first:(t,e)=>E.has(e),last:(t,e)=>k.has(e)},c)})]}};function jx(t,e){let n=0;if(void 0===e)for(let e of t)null!=e&&(e=+e)>=e&&++n;else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(i=+i)>=i&&++n}return n}jb.props={};function jO(t,e){let n=function(t,e){let n,r=0,i=0,o=0;if(void 0===e)for(let e of t)null!=e&&(e=+e)>=e&&(n=e-i,i+=n/++r,o+=n*(e-i));else{let a=-1;for(let l of t)null!=(l=e(l,++a,t))&&(l=+l)>=l&&(n=l-i,i+=n/++r,o+=n*(l-i))}if(r>1)return o/(r-1)}(t,e);return n?Math.sqrt(n):n}var jw=Array.prototype,jE=jw.slice;function jk(t){return()=>t}jw.map;let jM=Math.sqrt(50),jS=Math.sqrt(10),j_=Math.sqrt(2);function jP(t,e,n){let r,i,o;let a=(e-t)/Math.max(0,n),l=Math.floor(Math.log10(a)),s=a/Math.pow(10,l),u=s>=jM?10:s>=jS?5:s>=j_?2:1;return(l<0?(r=Math.round(t*(o=Math.pow(10,-l)/u)),i=Math.round(e*o),r/o<t&&++r,i/o>e&&--i,o=-o):(r=Math.round(t/(o=Math.pow(10,l)*u)),i=Math.round(e/o),r*o<t&&++r,i*o>e&&--i),i<r&&.5<=n&&n<2)?jP(t,e,2*n):[r,i,o]}function jj(t,e,n){return e=+e,t=+t,jP(t,e,n=+n)[2]}function jA(t){return Math.max(1,Math.ceil(Math.log(jx(t))/Math.LN2)+1)}function jT(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=void 0===i?Se:St(i);r>n;){if(r-n>600){let o=r-n+1,a=e-n+1,l=Math.log(o),s=.5*Math.exp(2*l/3),u=.5*Math.sqrt(l*s*(o-s)/o)*(a-o/2<0?-1:1),c=Math.max(n,Math.floor(e-a*s/o+u)),f=Math.min(r,Math.floor(e+(o-a)*s/o+u));jT(t,e,c,f,i)}let o=t[e],a=n,l=r;for(jC(t,n,e),i(t[r],o)>0&&jC(t,n,r);a<l;){for(jC(t,a,l),++a,--l;0>i(t[a],o);)++a;for(;i(t[l],o)>0;)--l}0===i(t[n],o)?jC(t,n,l):jC(t,++l,r),l<=e&&(n=l+1),e<=l&&(r=l-1)}return t}function jC(t,e,n){let r=t[e];t[e]=t[n],t[n]=r}function jN(t,e,n){if(!(!(r=(t=Float64Array.from(function*(t,e){if(void 0===e)for(let e of t)null!=e&&(e=+e)>=e&&(yield e);else{let n=-1;for(let r of t)null!=(r=e(r,++n,t))&&(r=+r)>=r&&(yield r)}}(t,n))).length)||isNaN(e=+e))){if(e<=0||r<2)return rV(t);if(e>=1)return rY(t);var r,i=(r-1)*e,o=Math.floor(i),a=rY(jT(t,o).subarray(0,o+1));return a+(rV(t.subarray(o+1))-a)*(i-o)}}function jL(t,e){return jN(t,.5,e)}var jI=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function jR(t){return e=>null===e?t:`${t} of ${e}`}function jD(){return[(t,e)=>_m(t,t=>+e[t]),jR("mean")]}function jF(){return[(t,e)=>jN(t,.5,t=>+e[t]),jR("median")]}function jz(){return[(t,e)=>rY(t,t=>+e[t]),jR("max")]}function jB(){return[(t,e)=>rV(t,t=>+e[t]),jR("min")]}function jW(){return[(t,e)=>t.length,jR("count")]}function j$(){return[(t,e)=>rq(t,t=>+e[t]),jR("sum")]}function jG(){return[(t,e)=>e[t[0]],jR("first")]}function jV(){return[(t,e)=>e[t[t.length-1]],jR("last")]}let jH=(t={})=>{let{groupBy:e}=t,n=jI(t,["groupBy"]);return(t,r)=>{let{data:i,encode:o}=r,a=e(t,r);if(!a)return[t,r];let l=(t,e)=>{if(t)return t;let{from:n}=e;if(!n)return t;let[,r]=nM(o,n);return r},s=Object.entries(n).map(([t,e])=>{let[n,r]=function(t){if("function"==typeof t)return[t,null];let e={mean:jD,max:jz,count:jW,first:jG,last:jV,sum:j$,min:jB,median:jF}[t];if(!e)throw Error(`Unknown reducer: ${t}.`);return e()}(e),[s,u]=nM(o,t),c=l(u,e);return[t,Object.assign(Object.assign({},Object.assign(Object.assign({},nO(a.map(t=>n(t,null!=s?s:i)),(null==r?void 0:r(c))||c)),{constant:!1})),{aggregate:!0})]}),u=Object.keys(o).map(t=>{let[e,n]=nM(o,t);return[t,nO(a.map(t=>e[t[0]]),n)]}),c=a.map(t=>i[t[0]]);return[g$(a),nt({},r,{data:c,encode:Object.fromEntries([...u,...s])})]}};jH.props={};var jU=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let jq="thresholds",jY=(t={})=>{let{groupChannels:e=["color"],binChannels:n=["x","y"]}=t,r=jU(t,["groupChannels","binChannels"]),i={};return jH(Object.assign(Object.assign(Object.assign({},Object.fromEntries(Object.entries(r).filter(([t])=>!t.startsWith(jq)))),Object.fromEntries(n.flatMap(t=>{let e=([e])=>+i[t].get(e).split(",")[1];return e.from=t,[[t,([e])=>+i[t].get(e).split(",")[0]],[`${t}1`,e]]}))),{groupBy:(t,o)=>{let{encode:a}=o,l=n.map(t=>{let[e]=nM(a,t);return e}),s=nc(r,jq),u=t.filter(t=>l.every(e=>nu(e[t]))),c=[...e.map(t=>{let[e]=nM(a,t);return e}).filter(nu).map(t=>e=>t[e]),...n.map((t,e)=>{let n=l[e],r=s[t]||function(t){let[e,n]=gB(t);return Math.min(200,function(t,e,n){let r=jx(t),i=jO(t);return r&&i?Math.ceil((n-e)*Math.cbrt(r)/(3.49*i)):1}(t,e,n))}(n),o=new Map((function(){var t=is,e=gB,n=jA;function r(r){!Array.isArray(r)&&(r=Array.from(r));var i,o,a,l=r.length,s=Array(l);for(i=0;i<l;++i)s[i]=t(r[i],i,r);var u=e(s),c=u[0],f=u[1],p=n(s,c,f);if(!Array.isArray(p)){let t=f,n=+p;if(e===gB&&([c,f]=function(t,e,n){let r;for(;;){let i=jj(t,e,n);if(i===r||0===i||!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}}(c,f,n)),(p=function(t,e,n){if(e=+e,t=+t,!((n=+n)>0))return[];if(t===e)return[t];let r=e<t,[i,o,a]=r?jP(e,t,n):jP(t,e,n);if(!(o>=i))return[];let l=o-i+1,s=Array(l);if(r){if(a<0)for(let t=0;t<l;++t)s[t]=-((o-t)/a);else for(let t=0;t<l;++t)s[t]=(o-t)*a}else if(a<0)for(let t=0;t<l;++t)s[t]=-((i+t)/a);else for(let t=0;t<l;++t)s[t]=(i+t)*a;return s}(c,f,n))[0]<=c&&(a=jj(c,f,n)),p[p.length-1]>=f){if(t>=f&&e===gB){let t=jj(c,f,n);isFinite(t)&&(t>0?f=(Math.floor(f/t)+1)*t:t<0&&(f=-((Math.ceil(-(f*t))+1)/t)))}else p.pop()}}for(var h=p.length,d=0,y=h;p[d]<=c;)++d;for(;p[y-1]>f;)--y;(d||y<h)&&(p=p.slice(d,y),h=y-d);var g,v=Array(h+1);for(i=0;i<=h;++i)(g=v[i]=[]).x0=i>0?p[i-1]:c,g.x1=i<h?p[i]:f;if(isFinite(a)){if(a>0)for(i=0;i<l;++i)null!=(o=s[i])&&c<=o&&o<=f&&v[Math.min(h,Math.floor((o-c)/a))].push(r[i]);else if(a<0){for(i=0;i<l;++i)if(null!=(o=s[i])&&c<=o&&o<=f){let t=Math.floor((c-o)*a);v[Math.min(h,t+(p[t]<=o))].push(r[i])}}}else for(i=0;i<l;++i)null!=(o=s[i])&&c<=o&&o<=f&&v[M6(p,o,0,h)].push(r[i]);return v}return r.value=function(e){var n;return arguments.length?(t="function"==typeof e?e:(n=e,()=>n),r):t},r.domain=function(t){var n;return arguments.length?(e="function"==typeof t?t:(n=[t[0],t[1]],()=>n),r):e},r.thresholds=function(t){var e;return arguments.length?(n="function"==typeof t?t:(e=Array.isArray(t)?jE.call(t):t,()=>e),r):n},r})().thresholds(r).value(t=>+n[t])(u).flatMap(t=>{let{x0:e,x1:n}=t,r=`${e},${n}`;return t.map(t=>[t,r])}));return i[t]=o,t=>o.get(t)})];return Array.from(iu(u,t=>c.map(e=>e(t)).join("-")).values())}}))};jY.props={};let jX=(t={})=>{let{thresholds:e}=t;return jY(Object.assign(Object.assign({},t),{thresholdsX:e,groupChannels:["color"],binChannels:["x"]}))};jX.props={};var jK=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let jZ=(t={})=>{let{groupBy:e="x",reverse:n=!1,orderBy:r,padding:i}=t;return jK(t,["groupBy","reverse","orderBy","padding"]),(t,o)=>{let{data:a,encode:l,scale:s}=o,{series:u}=s,[c]=nM(l,"y"),[f]=nS(l,"series","color"),p=jh(f,u),h=jc(e,t,o),d=jf(r)(a,c,f);d&&jp(h,d);let y=Array(t.length);for(let t of h){n&&t.reverse();for(let e=0;e<t.length;e++)y[t[e]]=p[e]}return[t,nt({},o,{scale:{series:{domain:p,paddingInner:i}},encode:{series:nO(y)}})]}};function jQ(t,e,n){if(null===t)return[-.5,.5];let r=new x2({domain:jh(t,e),range:[0,1],padding:n}).getBandWidth();return[-r/2,r/2]}function jJ(t,e,n){return e*(1-t)+n*t}jZ.props={};let j0=(t={})=>{let{padding:e=0,paddingX:n=e,paddingY:r=e,random:i=Math.random}=t;return(t,e)=>{let{encode:o,scale:a}=e,{x:l,y:s}=a,[u]=nM(o,"x"),[c]=nM(o,"y"),f=jQ(u,l,n),p=jQ(c,s,r),h=t.map(()=>(function(t,e,n){return e*(1-t)+n*t})(i(),...p)),d=t.map(()=>(function(t,e,n){return e*(1-t)+n*t})(i(),...f));return[t,nt({scale:{x:{padding:.5},y:{padding:.5}}},e,{encode:{dy:nO(h),dx:nO(d)}})]}};j0.props={};let j1=(t={})=>{let{padding:e=0,random:n=Math.random}=t;return(t,r)=>{let{encode:i,scale:o}=r,{x:a}=o,[l]=nM(i,"x"),s=jQ(l,a,e),u=t.map(()=>(function(t,e,n){return e*(1-t)+n*t})(n(),...s));return[t,nt({scale:{x:{padding:.5}}},r,{encode:{dx:nO(u)}})]}};j1.props={};let j2=(t={})=>{let{padding:e=0,random:n=Math.random}=t;return(t,r)=>{let{encode:i,scale:o}=r,{y:a}=o,[l]=nM(i,"y"),s=jQ(l,a,e),u=t.map(()=>(function(t,e,n){return e*(1-t)+n*t})(n(),...s));return[t,nt({scale:{y:{padding:.5}}},r,{encode:{dy:nO(u)}})]}};j2.props={};var j5=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let j3=(t={})=>{let{groupBy:e="x"}=t;return(t,n)=>{let{encode:r}=n,{x:i}=r,o=Object.entries(j5(r,["x"])).filter(([t])=>t.startsWith("y")).map(([t])=>[t,nM(r,t)[0]]),a=o.map(([e])=>[e,Array(t.length)]),l=jc(e,t,n),s=Array(l.length);for(let t=0;t<l.length;t++){let[e,n]=gB(l[t].flatMap(t=>o.map(([,e])=>+e[t])));s[t]=(e+n)/2}let u=Math.max(...s);for(let t=0;t<l.length;t++){let e=u-s[t];for(let n of l[t])for(let t=0;t<o.length;t++){let[,r]=o[t],[,i]=a[t];i[n]=+r[n]+e}}return[t,nt({},n,{encode:Object.fromEntries(a.map(([t,e])=>[t,nO(e,nM(r,t)[1])]))})]}};j3.props={};let j4=(t={})=>{let{groupBy:e="x",series:n=!0}=t;return(t,r)=>{let{encode:i}=r,[o]=nM(i,"y"),[a,l]=nM(i,"y1"),[s]=n?nS(i,"series","color"):nM(i,"color"),u=jc(e,t,r),c=Array(t.length);for(let t of u){let e=t.map(t=>+o[t]);for(let n=0;n<t.length;n++){let r=t[n],i=Math.max(...e.filter((t,e)=>e!==n));c[r]=o[r]>i?i:o[r]}}return[t,nt({},r,{encode:{y1:nO(c,l)}})]}};j4.props={};let j6=t=>{let{groupBy:e=["x"],reducer:n=(t,e)=>e[t[0]],orderBy:r=null,reverse:i=!1,duration:o}=t;return(t,a)=>{let{encode:l}=a,s=(Array.isArray(e)?e:[e]).map(t=>[t,nM(l,t)[0]]);if(0===s.length)return[t,a];let u=[t];for(let[,t]of s){let e=[];for(let n of u){let r=Array.from(iu(n,e=>t[e]).values());e.push(...r)}u=e}if(r){let[t]=nM(l,r);t&&u.sort((e,r)=>n(e,t)-n(r,t)),i&&u.reverse()}let c=(o||3e3)/u.length,[f]=o?[nk(t,c)]:nS(l,"enterDuration",nk(t,c)),[p]=nS(l,"enterDelay",nk(t,0)),h=Array(t.length);for(let t=0,e=0;t<u.length;t++){let n=u[t],r=rY(n,t=>+f[t]);for(let t of n)h[t]=+p[t]+e;e+=r}return[t,nt({},a,{encode:{enterDuration:nE(f),enterDelay:nE(h)}})]}};j6.props={};var j8=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let j9=(t={})=>{let{groupBy:e="x",basis:n="max"}=t;return(t,r)=>{var i;let{encode:o,tooltip:a}=r,{x:l}=o,s=Object.entries(j8(o,["x"])).filter(([t])=>t.startsWith("y")).map(([t])=>[t,nM(o,t)[0]]),[,u]=s.find(([t])=>"y"===t),c=s.map(([e])=>[e,Array(t.length)]),f=jc(e,t,r);let p="function"==typeof(i=n)?i:({min:(t,e)=>rV(t,t=>e[+t]),max:(t,e)=>rY(t,t=>e[+t]),first:(t,e)=>e[t[0]],last:(t,e)=>e[t[t.length-1]],mean:(t,e)=>_m(t,t=>e[+t]),median:(t,e)=>jN(t,.5,t=>e[+t]),sum:(t,e)=>rq(t,t=>e[+t]),deviation:(t,e)=>jO(t,t=>e[+t])})[i]||rY;for(let t of f){let e=p(t,u);for(let n of t)for(let t=0;t<s.length;t++){let[,r]=s[t],[,i]=c[t];i[n]=+r[n]/e}}let h=ny(a)||(null==a?void 0:a.items)&&(null==a?void 0:a.items.length)!==0;return[t,nt({},r,Object.assign({encode:Object.fromEntries(c.map(([t,e])=>[t,nO(e,nM(o,t)[1])]))},!h&&o.y0&&{tooltip:{items:[{channel:"y0"}]}}))]}};function j7(t,e){return[t[0]]}function At(t,e){let n=t.length-1;return[t[n]]}function Ae(t,e){let n=ju(t,t=>e[t]);return[t[n]]}function An(t,e){let n=_b(t,t=>e[t]);return[t[n]]}j9.props={};let Ar=(t={})=>{let{groupBy:e="series",channel:n,selector:r}=t;return(t,i)=>{var o;let{encode:a}=i,l=jc(e,t,i),[s]=nM(a,n);let u="function"==typeof(o=r)?o:({first:j7,last:At,max:Ae,min:An})[o]||j7;return[l.flatMap(t=>u(t,s)),i]}};Ar.props={};var Ai=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let Ao=(t={})=>{let{selector:e}=t;return Ar(Object.assign({channel:"x",selector:e},Ai(t,["selector"])))};Ao.props={};var Aa=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let Al=(t={})=>{let{selector:e}=t;return Ar(Object.assign({channel:"y",selector:e},Aa(t,["selector"])))};Al.props={};var As=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let Au=(t={})=>{let{channels:e=["x","y"]}=t,n=As(t,["channels"]);return jH(Object.assign(Object.assign({},n),{groupBy:(t,n)=>jc(e,t,n)}))};Au.props={};let Ac=(t={})=>Au(Object.assign(Object.assign({},t),{channels:["x","color","series"]}));Ac.props={};let Af=(t={})=>Au(Object.assign(Object.assign({},t),{channels:["y","color","series"]}));Af.props={};let Ap=(t={})=>Au(Object.assign(Object.assign({},t),{channels:["color"]}));Ap.props={};var Ah=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let Ad=(t={})=>{let{reverse:e=!1,slice:n,channel:r,ordinal:i=!0}=t,o=Ah(t,["reverse","slice","channel","ordinal"]);return(t,a)=>i?function(t,e,n){var r,i,o,a;let{reverse:l,slice:s,channel:u}=n,c=Ah(n,["reverse","slice","channel"]),{encode:f,scale:p={}}=e,h=null===(r=p[u])||void 0===r?void 0:r.domain,[d]=nM(f,u),y=function(t,e,n){let{by:r=t,reducer:i="max"}=e,[o]=nM(n,r);if("function"==typeof i)return t=>i(t,o);if("max"===i)return t=>rY(t,t=>+o[t]);if("min"===i)return t=>rV(t,t=>+o[t]);if("sum"===i)return t=>rq(t,t=>+o[t]);if("median"===i)return t=>jN(t,.5,t=>+o[t]);if("mean"===i)return t=>_m(t,t=>+o[t]);if("first"===i)return t=>o[t[0]];if("last"===i)return t=>o[t[t.length-1]];throw Error(`Unknown reducer: ${i}`)}(u,c,f);let g=(i=function(t,e,n){if(!Array.isArray(n))return t;let r=new Set(n);return t.filter(t=>r.has(e[t]))}(t,d,h),o=y,a=t=>d[t],(2!==o.length?M7(ip(i,o,a),([t,e],[n,r])=>M0(e,r)||M0(t,n)):M7(iu(i,a),([t,e],[n,r])=>o(e,r)||M0(t,n))).map(([t])=>t));return l&&g.reverse(),[t,nt(e,{scale:{[u]:{domain:s?g.slice(..."number"==typeof s?[0,s]:s):g}}})]}(t,a,Object.assign({reverse:e,slice:n,channel:r},o)):function(t,e,n){let{reverse:r,channel:i}=n,{encode:o}=e,[a]=nM(o,i),l=M7(t,t=>a[t]);return r&&l.reverse(),[l,e]}(t,a,Object.assign({reverse:e,slice:n,channel:r},o))};Ad.props={};let Ay=(t={})=>Ad(Object.assign(Object.assign({},t),{channel:"x"}));Ay.props={};let Ag=(t={})=>Ad(Object.assign(Object.assign({},t),{channel:"y"}));Ag.props={};let Av=(t={})=>Ad(Object.assign(Object.assign({},t),{channel:"color"}));Av.props={};let Am=(t={})=>{let{field:e,channel:n="y",reducer:r="sum"}=t;return(t,i)=>{var o,a;let{data:l,encode:s}=i,[u]=nM(s,"x");let c=ih(t,function(t,e){if("function"==typeof t)return n=>t(n,e);if("sum"===t)return t=>rq(t,t=>+e[t]);throw Error(`Unknown reducer: ${t}`)}(r,e?(o=l,"string"==typeof(a=e)?o.map(t=>t[a]):o.map(a)):nM(s,n)[0]),t=>u[t]).map(t=>t[1]);return[t,nt({},i,{scale:{x:{flex:c}}})]}};Am.props={};let Ab=t=>(e,n)=>[e,nt({},n,{modifier:function(t){let{padding:e=0,direction:n="col"}=t;return(t,r,i)=>{let o=t.length;if(0===o)return[];let{innerWidth:a,innerHeight:l}=i,s=Math.ceil(Math.sqrt(r/(l/a))),u=a/s,c=Math.ceil(r/s),f=c*u;for(;f>l;)s+=1,u=a/s,f=(c=Math.ceil(r/s))*u;let p=l-c*u,h=c<=1?0:p/(c-1),[d,y]=c<=1?[(a-o*u)/(o-1),(l-u)/2]:[0,0];return t.map((t,r)=>{let[i,o,a,l]=gI(t),f="col"===n?r%s:Math.floor(r/c),g="col"===n?Math.floor(r/s):r%c,v=f*u,m=(c-g-1)*u+p,b=(u-e)/a,x=(u-e)/l;return`translate(${v-i+d*f+.5*e}, ${m-o-h*g-y+.5*e}) scale(${b}, ${x})`})}}(t),axis:!1})];function Ax(t,e,n,r){let i,o,a;let l=t.length;if(r>=l||0===r)return t;let s=n=>1*e[t[n]],u=e=>1*n[t[e]],c=[],f=(l-2)/(r-2),p=0;c.push(p);for(let t=0;t<r-2;t++){let e=0,n=0,r=Math.floor((t+1)*f)+1,h=Math.floor((t+2)*f)+1,d=(h=Math.min(h,l))-r;for(;r<h;r++)e+=s(r),n+=u(r);e/=d,n/=d;let y=Math.floor((t+0)*f)+1,g=Math.floor((t+1)*f)+1,v=[s(p),u(p)];for(i=o=-1;y<g;y++)(o=.5*Math.abs((v[0]-e)*(s(y)-v[1])-(v[0]-u(y))*(n-v[0])))>i&&(i=o,a=y);c.push(a),p=a}return c.push(l-1),c.map(e=>t[e])}Ab.props={};let AO=(t={})=>{let{strategy:e="median",thresholds:n=2e3,groupBy:r=["series","color"]}=t,i=function(t){if("function"==typeof t)return t;if("lttb"===t)return Ax;let e={first:t=>[t[0]],last:t=>[t[t.length-1]],min:(t,e,n)=>[t[_b(t,t=>n[t])]],max:(t,e,n)=>[t[ju(t,t=>n[t])]],median:(t,e,n)=>[t[function(t,e,n=M3){if(!isNaN(e=+e)){if(r=Float64Array.from(t,(e,r)=>M3(n(t[r],r,t))),e<=0)return _b(r);if(e>=1)return ju(r);var r,i=Uint32Array.from(t,(t,e)=>e),o=r.length-1,a=Math.floor(o*e);return jT(i,a,0,o,(t,e)=>Se(r[t],r[e])),(a=function(t,e=M0){let n;let r=!1;if(1===e.length){let i;for(let o of t){let t=e(o);(r?M0(t,i)>0:0===M0(t,t))&&(n=o,i=t,r=!0)}}else for(let i of t)(r?e(i,n)>0:0===e(i,i))&&(n=i,r=!0);return n}(i.subarray(0,a+1),t=>r[t]))>=0?a:-1}}(t,.5,t=>n[t])]]},n=e[t]||e.median;return(t,e,r,i)=>{let o=Math.max(1,Math.floor(t.length/i));return(function(t,e){let n=t.length,r=[],i=0;for(;i<n;)r.push(t.slice(i,i+=e));return r})(t,o).flatMap(t=>n(t,e,r))}}(e);return(t,e)=>{let{encode:o}=e,a=jc(r,t,e),[l]=nM(o,"x"),[s]=nM(o,"y");return[a.flatMap(t=>i(t,l,s,n)),e]}};AO.props={};let Aw=(t={})=>(e,n)=>{let{encode:r,data:i}=n,o=Object.entries(t).map(([t,e])=>{var n;let[i]=nM(r,t);if(!i)return null;let[o,a=!0]="object"==typeof(n=e)?[n.value,n.ordinal]:[n,!0];if("function"==typeof o)return t=>o(i[t]);if(a){let t=Array.isArray(o)?o:[o];return 0===t.length?null:e=>t.includes(i[e])}{let[t,e]=o;return n=>i[n]>=t&&i[n]<=e}}).filter(nu);if(0===o.length)return[e,n];let a=e.filter(t=>o.every(e=>e(t))),l=a.map((t,e)=>e),s=Object.entries(r).map(([t,e])=>[t,Object.assign(Object.assign({},e),{value:l.map(t=>e.value[a[t]]).filter(t=>void 0!==t)})]);return[l,nt({},n,{encode:Object.fromEntries(s),data:a.map(t=>i[t])})]};Aw.props={};var AE={},Ak={};function AM(t){return Function("d","return {"+t.map(function(t,e){return JSON.stringify(t)+": d["+e+'] || ""'}).join(",")+"}")}function AS(t){var e=Object.create(null),n=[];return t.forEach(function(t){for(var r in t)!(r in e)&&n.push(e[r]=r)}),n}function A_(t,e){var n=t+"",r=n.length;return r<e?Array(e-r+1).join(0)+n:n}function AP(t){for(var e in t){var n,r,i=t[e].trim();if(i){if("true"===i)i=!0;else if("false"===i)i=!1;else if("NaN"===i)i=NaN;else if(isNaN(n=+i)){if(!(r=i.match(/^([-+]\d{2})?\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|[-+]\d{2}:\d{2})?)?$/)))continue;else Aj&&r[4]&&!r[7]&&(i=i.replace(/-/g,"/").replace(/T/," ")),i=new Date(i)}else i=n}else i=null;t[e]=i}return t}let Aj=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours(),AA=t=>{let{value:e,format:n=e.split(".").pop(),delimiter:r=",",autoType:i=!0}=t;return()=>{var t,o,a,l;return t=void 0,o=void 0,a=void 0,l=function*(){let t=yield fetch(e);if("csv"===n){let e=yield t.text();return(function(t){var e=RegExp('["'+t+"\n\r]"),n=t.charCodeAt(0);function r(t,e){var r,i=[],o=t.length,a=0,l=0,s=o<=0,u=!1;function c(){if(s)return Ak;if(u)return u=!1,AE;var e,r,i=a;if(34===t.charCodeAt(i)){for(;a++<o&&34!==t.charCodeAt(a)||34===t.charCodeAt(++a););return(e=a)>=o?s=!0:10===(r=t.charCodeAt(a++))?u=!0:13===r&&(u=!0,10===t.charCodeAt(a)&&++a),t.slice(i+1,e-1).replace(/""/g,'"')}for(;a<o;){if(10===(r=t.charCodeAt(e=a++)))u=!0;else if(13===r)u=!0,10===t.charCodeAt(a)&&++a;else if(r!==n)continue;return t.slice(i,e)}return s=!0,t.slice(i,o)}for(10===t.charCodeAt(o-1)&&--o,13===t.charCodeAt(o-1)&&--o;(r=c())!==Ak;){for(var f=[];r!==AE&&r!==Ak;)f.push(r),r=c();if(!e||null!=(f=e(f,l++)))i.push(f)}return i}function i(e,n){return e.map(function(e){return n.map(function(t){return a(e[t])}).join(t)})}function o(e){return e.map(a).join(t)}function a(t){var n,r,i,o,a,l;return null==t?"":t instanceof Date?(r=(n=t).getUTCHours(),i=n.getUTCMinutes(),o=n.getUTCSeconds(),a=n.getUTCMilliseconds(),isNaN(n)?"Invalid Date":(l=n.getUTCFullYear(),(l<0?"-"+A_(-l,6):l>9999?"+"+A_(l,6):A_(l,4))+"-"+A_(n.getUTCMonth()+1,2)+"-"+A_(n.getUTCDate(),2)+(a?"T"+A_(r,2)+":"+A_(i,2)+":"+A_(o,2)+"."+A_(a,3)+"Z":o?"T"+A_(r,2)+":"+A_(i,2)+":"+A_(o,2)+"Z":i||r?"T"+A_(r,2)+":"+A_(i,2)+"Z":""))):e.test(t+="")?'"'+t.replace(/"/g,'""')+'"':t}return{parse:function(t,e){var n,i,o=r(t,function(t,r){var o,a,l;if(n)return n(t,r-1);i=t,n=e?(o=t,a=e,l=AM(o),function(t,e){return a(l(t),e,o)}):AM(t)});return o.columns=i||[],o},parseRows:r,format:function(e,n){return null==n&&(n=AS(e)),[n.map(a).join(t)].concat(i(e,n)).join("\n")},formatBody:function(t,e){return null==e&&(e=AS(t)),i(t,e).join("\n")},formatRows:function(t){return t.map(o).join("\n")},formatRow:o,formatValue:a}})(r).parse(e,i?AP:ni)}if("json"===n)return yield t.json();throw Error(`Unknown format: ${n}.`)},new(a||(a=Promise))(function(e,n){function r(t){try{s(l.next(t))}catch(t){n(t)}}function i(t){try{s(l.throw(t))}catch(t){n(t)}}function s(t){var n;t.done?e(t.value):((n=t.value)instanceof a?n:new a(function(t){t(n)})).then(r,i)}s((l=l.apply(t,o||[])).next())})}};AA.props={};let AT=t=>{let{value:e}=t;return()=>e};AT.props={};let AC=t=>{var e;let{fields:n=[]}=t;let r=(e=!0,n.map(t=>{if(Array.isArray(t)){let[n,r=e]=t;return[n,r]}return[t,e]}));return t=>[...t].sort((t,e)=>r.reduce((n,[r,i=!0])=>0!==n?n:i?t[r]<e[r]?-1:+(t[r]!==e[r]):t[r]>e[r]?-1:+(t[r]!==e[r]),0))};AC.props={};let AN=t=>{let{callback:e}=t;return t=>Array.isArray(t)?[...t].sort(e):t};function AL(t){return null!=t&&!Number.isNaN(t)}AN.props={};let AI=t=>{let{callback:e=AL}=t;return t=>t.filter(e)};AI.props={};let AR=t=>{let{fields:e}=t;return t=>t.map(t=>(function(t,e=[]){return e.reduce((e,n)=>(n in t&&(e[n]=t[n]),e),{})})(t,e))};AR.props={};let AD=t=>e=>t&&0!==Object.keys(t).length?e.map(e=>Object.entries(e).reduce((e,[n,r])=>(e[t[n]||n]=r,e),{})):e;AD.props={};let AF=t=>{let{fields:e,key:n="key",value:r="value"}=t;return t=>{var i;return(i=e)&&0!==Object.keys(i).length?t.flatMap(t=>e.map(e=>Object.assign(Object.assign({},t),{[n]:e,[r]:t[e]}))):t}};AF.props={};let Az=t=>{let{start:e,end:n}=t;return t=>t.slice(e,n)};Az.props={};let AB=t=>{let{callback:e=ni}=t;return t=>e(t)};AB.props={};let AW=t=>{let{callback:e=ni}=t;return t=>Array.isArray(t)?t.map(e):t};function A$(t){return"string"==typeof t?e=>e[t]:t}AW.props={};let AG=t=>{let{join:e,on:n,select:r=[],as:i=r,unknown:o=NaN}=t,[a,l]=n,s=A$(l),u=A$(a),c=ip(e,([t])=>t,t=>s(t));return t=>t.map(t=>{let e=c.get(u(t));return Object.assign(Object.assign({},t),r.reduce((t,n,r)=>(t[i[r]]=e?e[n]:o,t),{}))})};AG.props={};var AV=n("740"),AH=n.n(AV);let AU=t=>{let{field:e,groupBy:n,as:r=["y","size"],min:i,max:o,size:a=10,width:l}=t,[s,u]=r;return t=>Array.from(iu(t,t=>n.map(e=>t[e]).join("-")).values()).map(t=>{let n=AH().create(t.map(t=>t[e]),{min:i,max:o,size:a,width:l}),r=n.map(t=>t.x),c=n.map(t=>t.y);return Object.assign(Object.assign({},t[0]),{[s]:r,[u]:c})})};AU.props={};let Aq=()=>t=>(console.log("G2 data section:",t),t);function AY(t){let{min:e,max:n}=t;return[[e[0],e[1]],[n[0],n[1]]]}function AX(t,e){let[n,r]=t,[i,o]=e;return n>=i[0]&&n<=o[0]&&r>=i[1]&&r<=o[1]}Aq.props={};let AK=t=>{let{priority:e}=t;return t=>{let n=[];return e&&t.sort(e),t.forEach(t=>{SX(t);let e=t.getLocalBounds();n.some(t=>(function(t,e){let[n,r]=t,[i,o]=e;return n[0]<o[0]&&r[0]>i[0]&&n[1]<o[1]&&r[1]>i[1]})(AY(e),AY(t.getLocalBounds())))?SY(t):n.push(t)}),t}};function AZ(){let t=new Map;return[e=>t.get(e),(e,n)=>t.set(e,n)]}let AQ=t=>{let{maxIterations:e=10,maxError:n=.1,padding:r=1}=t;return t=>{let i=t.length;if(i<=1)return t;let[o,a]=AZ(),[l,s]=AZ(),[u,c]=AZ(),[f,p]=AZ();for(let e of t){let{min:t,max:n}=function(t){let e=t.cloneNode(!0),n=e.getElementById("connector");n&&e.removeChild(n);let{min:r,max:i}=e.getRenderBounds();return e.destroy(),{min:r,max:i}}(e),[r,i]=t,[o,l]=n;a(e,i),s(e,i),c(e,l-i),p(e,[r,o])}for(let o=0;o<e;o++){t.sort((t,e)=>M0(l(t),l(e)));let e=0;for(let n=0;n<i-1;n++){let i;let o=t[n],a=n+1;for(;(i=t[a])&&!function([t,e],[n,r]){return r>t&&e>n}(f(o),f(i));)a+=1;if(i){let t=l(o),n=u(o),a=l(i),c=a-(t+n);if(c<r){let n=(r-c)/2;e=Math.max(e,n),s(o,t-n),s(i,a+n)}}}if(e<n)break}for(let e of t)e.style.y+=l(e)-o(e);return t}},AJ=()=>t=>(t.forEach(t=>{SX(t);let e=t.attr("bounds");(function(t,e){let[n,r]=t;return!(AX(n,e)&&AX(r,e))})(AY(t.getLocalBounds()),e)&&SY(t)}),t);function A0(t){let e=t/255;return e=e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)}function A1(t,e,n){return .2126*A0(t)+.7152*A0(e)+.0722*A0(n)}function A2(t,e){let{r:n,g:r,b:i}=t,{r:o,g:a,b:l}=e,s=A1(n,r,i),u=A1(o,a,l);return(Math.max(s,u)+.05)/(Math.min(s,u)+.05)}let A5=t=>{let{threshold:e=4.5,palette:n=["#000","#fff"]}=t;return t=>(t.forEach(t=>{let r=t.attr("dependentElement").parsedStyle.fill;A2(t.parsedStyle.fill,r)<e&&t.attr("fill",function(t,e){let n=ju(e,e=>{var n;return A2(t,"object"==typeof(n=e)?n:pC(n))});return e[n]}(r,n))}),t)};function A3(){return{"data.fetch":AA,"data.inline":AT,"data.sortBy":AC,"data.sort":AN,"data.filter":AI,"data.pick":AR,"data.rename":AD,"data.fold":AF,"data.slice":Az,"data.custom":AB,"data.map":AW,"data.join":AG,"data.kde":AU,"data.log":Aq,"transform.stackY":jb,"transform.binX":jX,"transform.bin":jY,"transform.dodgeX":jZ,"transform.jitter":j0,"transform.jitterX":j1,"transform.jitterY":j2,"transform.symmetryY":j3,"transform.diffY":j4,"transform.stackEnter":j6,"transform.normalizeY":j9,"transform.select":Ar,"transform.selectX":Ao,"transform.selectY":Al,"transform.groupX":Ac,"transform.groupY":Af,"transform.groupColor":Ap,"transform.group":Au,"transform.sortX":Ay,"transform.sortY":Ag,"transform.sortColor":Av,"transform.flexX":Am,"transform.pack":Ab,"transform.sample":AO,"transform.filter":Aw,"coordinate.cartesian":sp,"coordinate.polar":sd,"coordinate.transpose":sy,"coordinate.theta":sv,"coordinate.parallel":sm,"coordinate.fisheye":sb,"coordinate.radial":sO,"coordinate.radar":sw,"encode.constant":sE,"encode.field":sk,"encode.transform":sM,"encode.column":sS,"mark.interval":vc,"mark.rect":vp,"mark.line":v0,"mark.point":mV,"mark.text":bv,"mark.cell":bx,"mark.area":bC,"mark.link":bH,"mark.image":bX,"mark.polygon":b1,"mark.box":b8,"mark.vector":b7,"mark.lineX":xi,"mark.lineY":xl,"mark.connector":xp,"mark.range":xg,"mark.rangeX":xb,"mark.rangeY":xw,"mark.path":xP,"mark.shape":xC,"mark.density":xR,"mark.heatmap":xG,"palette.category10":xV,"palette.category20":xH,"scale.linear":xU,"scale.ordinal":xQ,"scale.band":x5,"scale.identity":x7,"scale.point":Oe,"scale.time":OH,"scale.log":OQ,"scale.pow":O5,"scale.sqrt":O4,"scale.threshold":O8,"scale.quantile":O7,"scale.quantize":we,"scale.sequential":wi,"scale.constant":wa,"theme.classic":wc,"theme.classicDark":wh,"theme.academy":wy,"theme.light":wu,"theme.dark":wp,"component.axisX":kf,"component.axisY":kp,"component.legendCategory":kL,"component.legendContinuous":ME,"component.legends":Mk,"component.title":MP,"component.sliderX":Su,"component.sliderY":Sc,"component.scrollbarX":Sd,"component.scrollbarY":Sy,"animation.scaleInX":Sg,"animation.scaleOutX":Sv,"animation.scaleInY":Sm,"animation.scaleOutY":Sb,"animation.waveIn":Sx,"animation.fadeIn":SO,"animation.fadeOut":Sw,"animation.zoomIn":SE,"animation.zoomOut":Sk,"animation.pathIn":SM,"animation.morphing":SL,"animation.growInX":SI,"animation.growInY":SR,"interaction.elementHighlight":_l,"interaction.elementHighlightByX":_s,"interaction.elementHighlightByColor":_u,"interaction.elementSelect":_f,"interaction.elementSelectByX":_p,"interaction.elementSelectByColor":_h,"interaction.fisheye":_y,"interaction.chartIndex":_v,"interaction.tooltip":_V,"interaction.legendFilter":_1,"interaction.legendHighlight":_2,"interaction.brushHighlight":_7,"interaction.brushXHighlight":Pe,"interaction.brushYHighlight":Pr,"interaction.brushAxisHighlight":Pf,"interaction.brushFilter":Ph,"interaction.brushXFilter":Pd,"interaction.brushYFilter":Py,"interaction.sliderFilter":Pm,"interaction.scrollbarFilter":Px,"interaction.poptip":PM,"interaction.treemapDrillDown":PR,"composition.spaceLayer":P$,"composition.spaceFlex":PV,"composition.facetRect":P4,"composition.repeatMatrix":jt,"composition.facetCircle":jl,"composition.timingKeyframe":js,"labelTransform.overlapHide":AK,"labelTransform.overlapDodgeY":AQ,"labelTransform.overflowHide":AJ,"labelTransform.contrastReverse":A5}}var A4=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function A6(t,e){return rV(t,t=>e[t])}function A8(t,e){return rY(t,t=>e[t])}function A9(t,e){let n=2.5*A7(t,e)-1.5*Te(t,e);return rV(t,t=>e[t]>=n?e[t]:NaN)}function A7(t,e){return jN(t,.25,t=>e[t])}function Tt(t,e){return jN(t,.5,t=>e[t])}function Te(t,e){return jN(t,.75,t=>e[t])}function Tn(t,e){let n=2.5*Te(t,e)-1.5*A7(t,e);return rY(t,t=>e[t]<=n?e[t]:NaN)}function Tr(){return(t,e)=>{let{encode:n}=e,{y:r,x:i}=n,{value:o}=r,{value:a}=i;return[Array.from(iu(t,t=>a[+t]).values()).flatMap(t=>{let e=A9(t,o),n=Tn(t,o);return t.filter(t=>o[t]<e||o[t]>n)}),e]}}let Ti=t=>{let{data:e,encode:n,style:r={},tooltip:i={},transform:o,animate:a}=t,l=A4(t,["data","encode","style","tooltip","transform","animate"]),{point:s=!0}=r,u=A4(r,["point"]),{y:c}=n,f={y:c,y1:c,y2:c,y3:c,y4:c},p={y1:A7,y2:Tt,y3:Te},h=ng(i,"box",{items:[{channel:"y",name:"min"},{channel:"y1",name:"q1"},{channel:"y2",name:"q2"},{channel:"y3",name:"q3"},{channel:"y4",name:"max"}]},!0),d=ng(i,"point",{title:{channel:"x"},items:[{name:"outlier",channel:"y"}]});if(!s)return Object.assign({type:"box",data:e,transform:[Object.assign(Object.assign({type:"groupX",y:A6},p),{y4:A8})],encode:Object.assign(Object.assign({},n),f),style:u,tooltip:h},l);let y=nc(u,"box"),g=nc(u,"point");return[Object.assign({type:"box",data:e,transform:[Object.assign(Object.assign({type:"groupX",y:A9},p),{y4:Tn})],encode:Object.assign(Object.assign({},n),f),style:y,tooltip:h,animate:nb(a,"box")},l),{type:"point",data:e,transform:[{type:Tr}],encode:n,style:Object.assign({},g),tooltip:d,animate:nb(a,"point")}]};Ti.props={};var To=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let Ta={coordinate:{type:"radial",innerRadius:.9,outerRadius:1,startAngle:-1.1*Math.PI,endAngle:.1*Math.PI},axis:{x:!1},legend:!1,tooltip:!1,encode:{x:"x",y:"y",color:"color"},scale:{color:{range:["#30BF78","#D0D0D0"]}}},Tl={style:{shape:(t,e)=>{let{shape:n,radius:r}=t,i=To(t,["shape","radius"]),o=nc(i,"pointer"),a=nc(i,"pin"),{shape:l}=o,s=To(o,["shape"]),{shape:u}=a,c=To(a,["shape"]),{coordinate:f,theme:p}=e;return(t,e)=>{let n=t.map(t=>f.invert(t)),[o,a,h]=function(t,e){let{transformations:n}=t.getOptions(),[,...r]=n.find(t=>t[0]===e);return r}(f,"polar"),d=f.clone(),{color:y}=e,g=sO({startAngle:o,endAngle:a,innerRadius:h,outerRadius:r});g.push(["cartesian"]),d.update({transformations:g});let v=n.map(t=>d.map(t)),[m,b]=gQ(v),[x,O]=f.getCenter(),w=Object.assign(Object.assign({x1:m,y1:b,x2:x,y2:O,stroke:y},s),i),E=Object.assign(Object.assign({cx:x,cy:O,stroke:y},c),i),k=g_(new yo);return!ny(l)&&("function"==typeof l?k.append(()=>l(v,e,d,p)):k.append("line").call(gH,w).node()),!ny(u)&&("function"==typeof u?k.append(()=>u(v,e,d,p)):k.append("circle").call(gH,E).node()),k.node()}},lineWidth:4,pointerLineCap:"round",pinR:10,pinFill:"#fff",radius:.6}},Ts={type:"text",style:{x:"50%",y:"60%",textAlign:"center",textBaseline:"middle",fontSize:20,fontWeight:800,fill:"#888"}},Tu=t=>{var e;let{data:n={},scale:r={},style:i={},animate:o={},transform:a=[]}=t,l=To(t,["data","scale","style","animate","transform"]),{targetData:s,totalData:u,target:c,total:f,scale:p}=function(t,e){let{name:n="score",target:r,total:i,percent:o,thresholds:a=[]}=function(t){if(gz(t)){let e=Math.max(0,Math.min(t,1));return{percent:e,target:e,total:1}}return t}(t),l=o||r,s=o?1:i,u=Object.assign({y:{domain:[0,s]}},e);return a.length?{targetData:[{x:n,y:l,color:"target"}],totalData:a.map((t,e)=>({x:n,y:e>=1?t-a[e-1]:t,color:e})),target:l,total:s,scale:u}:{targetData:[{x:n,y:l,color:"target"}],totalData:[{x:n,y:l,color:"target"},{x:n,y:s-l,color:"total"}],target:l,total:s,scale:u}}(n,r),h=nc(i,"text");let d=(e=["pointer","pin"],Object.fromEntries(Object.entries(i).filter(([t])=>e.find(e=>t.startsWith(e)))));return[nt({},Ta,Object.assign({type:"interval",transform:[{type:"stackY"}],data:u,scale:p,style:nc(i,"arc"),animate:"object"==typeof o?nc(o,"arc"):o},l)),nt({},Ta,Tl,Object.assign({type:"point",data:s,scale:p,style:d,animate:"object"==typeof o?nc(o,"indicator"):o},l)),nt({},Ts,{style:Object.assign({text:function(t,{target:e,total:n}){let{content:r}=t;return r?r(e,n):e.toString()}(h,{target:c,total:f})},h),animate:"object"==typeof o?nc(o,"text"):o})]};Tu.props={};let Tc=Math.PI/180;function Tf(t){return t.text}function Tp(){return"serif"}function Th(){return"normal"}function Td(t){return t.value}function Ty(){return 90*~~(2*Math.random())}function Tg(){return 1}function Tv(){}function Tm(t){let e=t[0]/t[1];return function(t){return[e*(t*=.1)*Math.cos(t),t*Math.sin(t)]}}function Tb(t){let e=[],n=-1;for(;++n<t;)e[n]=0;return e}function Tx(){return document.createElement("canvas")}function TO(t){return"function"==typeof t?t:function(){return t}}let Tw={archimedean:Tm,rectangular:function(t){let e=4*t[0]/t[1],n=0,r=0;return function(t){let i=t<0?-1:1;switch(Math.sqrt(1+4*i*t)-i&3){case 0:n+=e;break;case 1:r+=4;break;case 2:n-=e;break;default:r-=4}return[n,r]}}};var TE=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let Tk={size:[500,500],fontSize:[14,28]};function TM(t){return new Promise((e,n)=>{if(t instanceof HTMLImageElement){e(t);return}if("string"==typeof t){let r=new Image;r.crossOrigin="anonymous",r.src=t,r.onload=()=>e(r),r.onerror=()=>{console.error(`'image ${t} load failed !!!'`),n()};return}n()})}let TS=t=>e=>{var n,r,i,o;return n=void 0,r=void 0,i=void 0,o=function*(){var n,r;let i=Object.assign({},Tk,t),o=function(){let t=[256,256],e=Tf,n=Tp,r=Td,i=Th,o=Ty,a=Tg,l=Tm,s=Math.random,u=Tv,c=[],f=null,p=1/0,h={};return h.start=function(){let[d,y]=t,g=function(t){t.width=t.height=1;let e=Math.sqrt(t.getContext("2d").getImageData(0,0,1,1).data.length>>2);t.width=2048/e,t.height=2048/e;let n=t.getContext("2d");return n.fillStyle=n.strokeStyle="red",n.textAlign="center",{context:n,ratio:e}}(Tx()),v=h.board?h.board:Tb((t[0]>>5)*t[1]),m=c.length,b=[],x=c.map(function(t,l,s){return t.text=e.call(this,t,l,s),t.font=n.call(this,t,l,s),t.style=Th.call(this,t,l,s),t.weight=i.call(this,t,l,s),t.rotate=o.call(this,t,l,s),t.size=~~r.call(this,t,l,s),t.padding=a.call(this,t,l,s),t}).sort(function(t,e){return e.size-t.size}),O=-1,w=h.board?[{x:0,y:0},{x:d,y:y}]:void 0;function E(){let e=Date.now();for(;Date.now()-e<p&&++O<m;){let e=x[O];e.x=d*(s()+.5)>>1,e.y=y*(s()+.5)>>1,!function(t,e,n,r){if(e.sprite)return;let i=t.context,o=t.ratio;i.clearRect(0,0,2048/o,2048/o);let a=0,l=0,s=0,u=n.length;for(--r;++r<u;){e=n[r],i.save(),i.font=e.style+" "+e.weight+" "+~~((e.size+1)/o)+"px "+e.font;let t=i.measureText(e.text+"m").width*o,u=e.size<<1;if(e.rotate){let n=Math.sin(e.rotate*Tc),r=Math.cos(e.rotate*Tc),i=t*r,o=t*n,a=u*r,l=u*n;t=Math.max(Math.abs(i+l),Math.abs(i-l))+31>>5<<5,u=~~Math.max(Math.abs(o+a),Math.abs(o-a))}else t=t+31>>5<<5;if(u>s&&(s=u),a+t>=2048&&(a=0,l+=s,s=0),l+u>=2048)break;i.translate((a+(t>>1))/o,(l+(u>>1))/o),e.rotate&&i.rotate(e.rotate*Tc),i.fillText(e.text,0,0),e.padding&&(i.lineWidth=2*e.padding,i.strokeText(e.text,0,0)),i.restore(),e.width=t,e.height=u,e.xoff=a,e.yoff=l,e.x1=t>>1,e.y1=u>>1,e.x0=-e.x1,e.y0=-e.y1,e.hasText=!0,a+=t}let c=i.getImageData(0,0,2048/o,2048/o).data,f=[];for(;--r>=0;){if(!(e=n[r]).hasText)continue;let t=e.width,i=t>>5,o=e.y1-e.y0;for(let t=0;t<o*i;t++)f[t]=0;if(null==(a=e.xoff))return;l=e.yoff;let s=0,u=-1;for(let n=0;n<o;n++){for(let e=0;e<t;e++){let t=i*n+(e>>5),r=c[(l+n)*2048+(a+e)<<2]?1<<31-e%32:0;f[t]|=r,s|=r}s?u=n:(e.y0++,o--,n--,l++)}e.y1=e.y0+u,e.sprite=f.slice(0,(e.y1-e.y0)*i)}}(g,e,x,O),e.hasText&&function(e,n,r){let i=n.x,o=n.y,a=Math.sqrt(t[0]*t[0]+t[1]*t[1]),u=l(t),c=.5>s()?1:-1,f,p=-c,h,d;for(;(f=u(p+=c))&&(h=~~f[0],!(Math.min(Math.abs(h),Math.abs(d=~~f[1]))>=a));){;if(n.x=i+h,n.y=o+d,!(n.x+n.x0<0)&&!(n.y+n.y0<0)&&!(n.x+n.x1>t[0])&&!(n.y+n.y1>t[1])){if(!r||!function(t,e,n){n>>=5;let r=t.sprite,i=t.width>>5,o=t.x-(i<<4),a=127&o,l=32-a,s=t.y1-t.y0,u=(t.y+t.y0)*n+(o>>5),c;for(let t=0;t<s;t++){c=0;for(let n=0;n<=i;n++)if((c<<l|(n<i?(c=r[t*i+n])>>>a:0))&e[u+n])return!0;u+=n}return!1}(n,e,t[0])){var y,g;if(!r||(y=n,g=r,y.x+y.x1>g[0].x&&y.x+y.x0<g[1].x&&y.y+y.y1>g[0].y&&y.y+y.y0<g[1].y)){let r=n.sprite,i=n.width>>5,o=t[0]>>5,a=n.x-(i<<4),l=127&a,s=32-l,u=n.y1-n.y0,c,f=(n.y+n.y0)*o+(a>>5);for(let t=0;t<u;t++){c=0;for(let n=0;n<=i;n++)e[f+n]|=c<<s|(n<i?(c=r[t*i+n])>>>l:0);f+=o}return delete n.sprite,!0}}}}return!1}(v,e,w)&&(u.call(null,"word",{cloud:h,word:e}),b.push(e),w?!h.hasImage&&!function(t,e){let 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)}(w,e):w=[{x:e.x+e.x0,y:e.y+e.y0},{x:e.x+e.x1,y:e.y+e.y1}],e.x-=t[0]>>1,e.y-=t[1]>>1)}h._tags=b,h._bounds=w,O>=m&&(h.stop(),u.call(null,"end",{cloud:h,words:b,bounds:w}))}return f&&clearInterval(f),f=setInterval(E,0),E(),h},h.stop=function(){return f&&(clearInterval(f),f=null),h},h.createMask=e=>{let n=document.createElement("canvas"),[r,i]=t;if(!r||!i)return;let o=r>>5,a=Tb((r>>5)*i);n.width=r,n.height=i;let l=n.getContext("2d");l.drawImage(e,0,0,e.width,e.height,0,0,r,i);let s=l.getImageData(0,0,r,i).data;for(let t=0;t<i;t++)for(let e=0;e<r;e++){let n=o*t+(e>>5),i=t*r+e<<2,l=s[i]>=250&&s[i+1]>=250&&s[i+2]>=250?1<<31-e%32:0;a[n]|=l}h.board=a,h.hasImage=!0},h.timeInterval=function(t){p=null==t?1/0:t},h.words=function(t){c=t},h.size=function(e=[]){t=[+e[0],+e[1]]},h.text=function(t){e=TO(t)},h.font=function(t){n=TO(t)},h.fontWeight=function(t){i=TO(t)},h.rotate=function(t){o=TO(t)},h.spiral=function(t){l=Tw[t]||t},h.fontSize=function(t){r=TO(t)},h.padding=function(t){a=TO(t)},h.random=function(t){s=TO(t)},h.on=function(t){u=TO(t)},h}();yield(n=o,r=i,{set(t,e,i){if(void 0===r[t])return this;let o=e?e.call(null,r[t]):r[t];return i?i.call(null,o):"function"==typeof n[t]?n[t](o):n[t]=o,this},setAsync(t,e,i){var o,a,l,s;return o=this,a=void 0,l=void 0,s=function*(){if(void 0===r[t])return this;let o=e?yield e.call(null,r[t]):r[t];return i?i.call(null,o):"function"==typeof n[t]?n[t](o):n[t]=o,this},new(l||(l=Promise))(function(t,e){function n(t){try{i(s.next(t))}catch(t){e(t)}}function r(t){try{i(s.throw(t))}catch(t){e(t)}}function i(e){var i;e.done?t(e.value):((i=e.value)instanceof l?i:new l(function(t){t(i)})).then(n,r)}i((s=s.apply(o,a||[])).next())})}}).set("fontSize",t=>{let n=e.map(t=>t.value);return function(t,e){if("function"==typeof t)return t;if(Array.isArray(t)){let[n,r]=t;if(!e)return()=>(r+n)/2;let[i,o]=e;return o===i?()=>(r+n)/2:({value:t})=>(r-n)/(o-i)*(t-i)+n}return()=>t}(t,[rV(n),rY(n)])}).set("font").set("fontStyle").set("fontWeight").set("padding").set("rotate").set("size").set("spiral").set("timeInterval").set("random").set("text").set("on").setAsync("imageMask",TM,o.createMask),o.words([...e]);let a=o.start(),[l,s]=i.size,u=[{x:0,y:0},{x:l,y:s}],{_bounds:c=u,_tags:f,hasImage:p}=a,h=f.map(t=>{var{x:e,y:n}=t;return Object.assign(Object.assign({},TE(t,["x","y"])),{x:e+l/2,y:n+s/2})}),[{x:d,y:y},{x:g,y:v}]=c,m={text:"",value:0,opacity:0,fontSize:0};return h.push(Object.assign(Object.assign({},m),{x:p?0:d,y:p?0:y}),Object.assign(Object.assign({},m),{x:p?l:g,y:p?s:v})),h},new(i||(i=Promise))(function(t,e){function a(t){try{s(o.next(t))}catch(t){e(t)}}function l(t){try{s(o.throw(t))}catch(t){e(t)}}function s(e){var n;e.done?t(e.value):((n=e.value)instanceof i?n:new i(function(t){t(n)})).then(a,l)}s((o=o.apply(n,r||[])).next())})};TS.props={};var T_=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let TP=(t,e)=>({size:[t,e]}),Tj=(t,e)=>({axis:!1,type:"text",encode:{x:"x",y:"y",text:"text",rotate:"rotate",fontSize:"size"},scale:{x:{domain:[0,t],range:[0,1]},y:{domain:[0,e],range:[0,1]},fontSize:{type:"identity"},rotate:{type:"identity"}},style:{textAlign:"center"}}),TA=(t,e)=>{var n,r,i,o;return n=void 0,r=void 0,i=void 0,o=function*(){let{width:n,height:r}=e,{data:i,encode:o={},scale:a,style:l={},layout:s={}}=t,u=T_(t,["data","encode","scale","style","layout"]),c=function(t,e){let{text:n="text",value:r="value"}=e;return t.map(t=>Object.assign(Object.assign({},t),{text:t[n],value:t[r]}))}(i,o),f=yield TS(Object.assign(Object.assign({},TP(n,r)),s))(c);return nt({},Tj(n,r),Object.assign(Object.assign({data:f,encode:o,scale:a,style:l},u),{axis:!1}))},new(i||(i=Promise))(function(t,e){function a(t){try{s(o.next(t))}catch(t){e(t)}}function l(t){try{s(o.throw(t))}catch(t){e(t)}}function s(e){var n;e.done?t(e.value):((n=e.value)instanceof i?n:new i(function(t){t(n)})).then(a,l)}s((o=o.apply(n,r||[])).next())})};TA.props={};function TT(t,e,n){return t+(e-t)*n}let TC={pin:function(t,e,n){let r=4*n/3,i=Math.max(r,2*n),o=r/2,a=o+e-i/2,l=Math.asin(o/((i-o)*.85)),s=Math.sin(l)*o,u=Math.cos(l)*o,c=t-u,f=a+s,p=a+o/Math.sin(l);return`
20
- M ${c} ${f}
21
- A ${o} ${o} 0 1 1 ${c+2*u} ${f}
22
- Q ${t} ${p} ${t} ${e+i/2}
23
- Q ${t} ${p} ${c} ${f}
24
- Z
25
- `},rect:function(t,e,n){let r=.618*n;return`
26
- M ${t-r} ${e-n}
27
- L ${t+r} ${e-n}
28
- L ${t+r} ${e+n}
29
- L ${t-r} ${e+n}
30
- Z
31
- `},circle:function(t,e,n){return`
32
- M ${t} ${e-n}
33
- a ${n} ${n} 0 1 0 0 ${2*n}
34
- a ${n} ${n} 0 1 0 0 ${-(2*n)}
35
- Z
36
- `},diamond:function(t,e,n){return`
37
- M ${t} ${e-n}
38
- L ${t+n} ${e}
39
- L ${t} ${e+n}
40
- L ${t-n} ${e}
41
- Z
42
- `},triangle:function(t,e,n){return`
43
- M ${t} ${e-n}
44
- L ${t+n} ${e+n}
45
- L ${t-n} ${e+n}
46
- Z
47
- `}};var TN=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let TL=(t="circle")=>TC[t]||TC.circle,TI=(t,e)=>{if(!e)return;let{coordinate:n}=e,{liquidOptions:r,styleOptions:i}=t,{liquidShape:o,percent:a}=r,{background:l,outline:s={},wave:u={}}=i,c=TN(i,["background","outline","wave"]),{border:f=2,distance:p=0}=s,h=TN(s,["border","distance"]),{length:d=192,count:y=3}=u;return(t,r,i)=>{let{document:s}=e.canvas,{color:u,fillOpacity:g}=i,v=Object.assign(Object.assign({fill:u},i),c),m=s.createElement("g",{}),[b,x]=n.getCenter(),O=n.getSize(),w=Math.min(...O)/2,E=(P_(o)?o:TL(o))(b,x,w,...O);if(Object.keys(l).length){let t=s.createElement("path",{style:Object.assign({path:E,fill:"#fff"},l)});m.appendChild(t)}if(a>0){let t=s.createElement("path",{style:{path:E}});m.appendChild(t),m.style.clipPath=t,!function(t,e,n,r,i,o,a,l,s,u,c){let{fill:f,fillOpacity:p,opacity:h}=i;for(let i=0;i<r;i++){var d,y,g;let v=r<=1?1:i/(r-1),m=function(t,e,n,r,i,o,a){let l=4*Math.ceil(2*t/n*4),s=[],u=0;for(;u<-(2*Math.PI);)u+=2*Math.PI;for(;u>0;)u-=2*Math.PI;let c=o-t+(u=u/Math.PI/2*n)-2*t;s.push(["M",c,e]);let f=0;for(let t=0;t<l;++t){var p,h,d,y;let r=t%4;let o=(p=t*n/4,h=r,d=n,y=i,0===h?[[p+.5*d/Math.PI/2,y/2],[p+.5*d/Math.PI,y],[p+d/4,y]]:1===h?[[p+.5*d/Math.PI/2*(Math.PI-2),y],[p+.5*d/Math.PI/2*(Math.PI-1),y/2],[p+d/4,0]]:2===h?[[p+.5*d/Math.PI/2,-y/2],[p+.5*d/Math.PI,-y],[p+d/4,-y]]:[[p+.5*d/Math.PI/2*(Math.PI-2),-y],[p+.5*d/Math.PI/2*(Math.PI-1),-y/2],[p+d/4,0]]);s.push(["C",o[0][0]+c,-o[0][1]+e,o[1][0]+c,-o[1][1]+e,o[2][0]+c,-o[2][1]+e]),t===l-1&&(f=o[2][0])}return s.push(["L",f+c,a+t]),s.push(["L",c,a+t]),s.push(["Z"]),s}(l,a+l*n,s,0,l/40,t,e);let b=c.createElement("path",{style:{path:m,fill:f,opacity:(.2+(.9-(d=.2))*v)*Number(h||p)}});o.appendChild(b);try{;if(!1===u)return;let t=[{transform:"translate(0, 0)"},{transform:`translate(${2*s}px, 0)`}];b.animate(t,{duration:2*(y=2500,g=v,y+(5e3-y)*g),iterations:1/0})}catch(t){console.warn("off-screen group animate error!")}}}(b,x,1-a,y,v,m,t.getBBox().y,2*w,d,!0,s)}let k=s.createElement("path",{style:{path:E,fill:"transparent",lineWidth:f+2*p,stroke:"#fff"}}),M=s.createElement("path",{style:Object.assign(Object.assign(Object.assign({path:E,stroke:u,strokeOpacity:g,lineWidth:f},v),h),{fill:"transparent"})});return m.appendChild(k),m.appendChild(M),m}};TI.props={};var TR=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let TD={axis:{x:!1,y:!1},legend:!1,tooltip:!1,encode:{x:"type",y:"percent"},scale:{y:{domain:[0,1]}},style:{shape:TI},animate:{enter:{type:"fadeIn"}}},TF={type:"text",style:{x:"50%",y:"50%",textAlign:"center",textBaseline:"middle",fontSize:20,fontWeight:800,fill:"#888"},animate:{enter:{type:"fadeIn"}}},Tz=t=>{let{data:e={},style:n={},animate:r}=t,i=TR(t,["data","style","animate"]),o=Math.max(0,gz(e)?e:null==e?void 0:e.percent),a=[{percent:o,type:"liquid"}],l=Object.assign(Object.assign({},nc(n,"text")),nc(n,"content")),s=nc(n,"outline"),u=nc(n,"wave"),c=nc(n,"background");return[nt({},TD,Object.assign({type:"interval",data:a,style:{liquidOptions:{percent:o,liquidShape:null==n?void 0:n.shape},styleOptions:Object.assign(Object.assign({},n),{outline:s,wave:u,background:c})},animate:r},i)),nt({},TF,{style:Object.assign({text:`${gF(100*o)} %`},l),animate:r})]};Tz.props={};var TB=n("56");function TW(t,e){let n=function(t){let e=[];for(let n=0;n<t.length;++n)for(let r=n+1;r<t.length;++r){let i=TH(t[n],t[r]);for(let t=0;t<i.length;++t){let o=i[t];o.parentIndex=[n,r],e.push(o)}}return e}(t),r=n.filter(function(e){return function(t,e){for(let n=0;n<e.length;++n)if(TG(t,e[n])>e[n].radius+1e-10)return!1;return!0}(e,t)}),i=0,o=0,a,l=[];if(r.length>1){let e=function(t){let 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}(r);for(a=0;a<r.length;++a){let t=r[a];t.angle=Math.atan2(t.x-e.x,t.y-e.y)}r.sort(function(t,e){return e.angle-t.angle});let n=r[r.length-1];for(a=0;a<r.length;++a){let e=r[a];o+=(n.x+e.x)*(e.y-n.y);let s={x:(e.x+n.x)/2,y:(e.y+n.y)/2},u=null;for(let r=0;r<e.parentIndex.length;++r)if(n.parentIndex.indexOf(e.parentIndex[r])>-1){let i=t[e.parentIndex[r]],o=Math.atan2(e.x-i.x,e.y-i.y),a=Math.atan2(n.x-i.x,n.y-i.y),l=a-o;l<0&&(l+=2*Math.PI);let c=a-l/2,f=TG(s,{x:i.x+i.radius*Math.sin(c),y:i.y+i.radius*Math.cos(c)});f>2*i.radius&&(f=2*i.radius),(null===u||u.width>f)&&(u={circle:i,width:f,p1:e,p2:n})}null!==u&&(l.push(u),i+=T$(u.circle.radius,u.width),n=e)}}else{let e=t[0];for(a=1;a<t.length;++a)t[a].radius<e.radius&&(e=t[a]);let n=!1;for(a=0;a<t.length;++a)if(TG(t[a],e)>Math.abs(e.radius-t[a].radius)){n=!0;break}n?i=o=0:(i=e.radius*e.radius*Math.PI,l.push({circle:e,p1:{x:e.x,y:e.y+e.radius},p2:{x:e.x-1e-10,y:e.y+e.radius},width:2*e.radius}))}return o/=2,e&&(e.area=i+o,e.arcArea=i,e.polygonArea=o,e.arcs=l,e.innerPoints=r,e.intersectionPoints=n),i+o}function T$(t,e){return t*t*Math.acos(1-e/t)-(t-e)*Math.sqrt(e*(2*t-e))}function TG(t,e){return Math.sqrt((t.x-e.x)*(t.x-e.x)+(t.y-e.y)*(t.y-e.y))}function TV(t,e,n){return n>=t+e?0:n<=Math.abs(t-e)?Math.PI*Math.min(t,e)*Math.min(t,e):T$(t,t-(n*n-e*e+t*t)/(2*n))+T$(e,e-(n*n-t*t+e*e)/(2*n))}function TH(t,e){let n=TG(t,e),r=t.radius,i=e.radius;if(n>=r+i||n<=Math.abs(r-i))return[];let o=(r*r-i*i+n*n)/(2*n),a=Math.sqrt(r*r-o*o),l=t.x+o*(e.x-t.x)/n,s=t.y+o*(e.y-t.y)/n,u=-(e.y-t.y)*(a/n),c=-(e.x-t.x)*(a/n);return[{x:l+u,y:s-c},{x:l-u,y:s+c}]}function TU(t,e,n){return Math.min(t,e)*Math.min(t,e)*Math.PI<=n+1e-10?Math.abs(t-e):(0,TB.bisect)(function(r){return TV(t,e,r)-n},0,t+e)}function Tq(t,e){let n=function(t,e){let n;let r=e&&e.lossFunction?e.lossFunction:TY,i={},o={};for(let e=0;e<t.length;++e){let r=t[e];1==r.sets.length&&(i[n=r.sets[0]]={x:1e10,y:1e10,rowid:Object.keys(i).length,size:r.size,radius:Math.sqrt(r.size/Math.PI)},o[n]=[])}t=t.filter(function(t){return 2==t.sets.length});for(let e=0;e<t.length;++e){let n=t[e],r=n.hasOwnProperty("weight")?n.weight:1,a=n.sets[0],l=n.sets[1];n.size+1e-10>=Math.min(i[a].size,i[l].size)&&(r=0),o[a].push({set:l,size:n.size,weight:r}),o[l].push({set:a,size:n.size,weight:r})}let a=[];for(n in o)if(o.hasOwnProperty(n)){let t=0;for(let e=0;e<o[n].length;++e)t+=o[n][e].size*o[n][e].weight;a.push({set:n,size:t})}function l(t,e){return e.size-t.size}a.sort(l);let s={};function u(t){return t.set in s}function c(t,e){i[e].x=t.x,i[e].y=t.y,s[e]=!0}c({x:0,y:0},a[0].set);for(let e=1;e<a.length;++e){let s=a[e].set,f=o[s].filter(u);if(n=i[s],f.sort(l),0===f.length)throw"ERROR: missing pairwise overlap information";let p=[];for(let t=0;t<f.length;++t){let e=i[f[t].set],r=TU(n.radius,e.radius,f[t].size);p.push({x:e.x+r,y:e.y}),p.push({x:e.x-r,y:e.y}),p.push({y:e.y+r,x:e.x}),p.push({y:e.y-r,x:e.x});for(let o=t+1;o<f.length;++o){let t=i[f[o].set],a=TU(n.radius,t.radius,f[o].size),l=TH({x:e.x,y:e.y,radius:r},{x:t.x,y:t.y,radius:a});for(let t=0;t<l.length;++t)p.push(l[t])}}let h=1e50,d=p[0];for(let e=0;e<p.length;++e){i[s].x=p[e].x,i[s].y=p[e].y;let n=r(i,t);n<h&&(h=n,d=p[e])}c(d,s)}return i}(t,e),r=e.lossFunction||TY;if(t.length>=8){let i=function(t,e){let n,r,i;let o=(e=e||{}).restarts||10,a=[],l={};for(n=0;n<t.length;++n){let e=t[n];1==e.sets.length&&(l[e.sets[0]]=a.length,a.push(e))}let s=function(t,e,n){let r=(0,TB.zerosM)(e.length,e.length),i=(0,TB.zerosM)(e.length,e.length);return t.filter(function(t){return 2==t.sets.length}).map(function(t){let o=n[t.sets[0]],a=n[t.sets[1]],l=Math.sqrt(e[o].size/Math.PI),s=TU(l,Math.sqrt(e[a].size/Math.PI),t.size);r[o][a]=r[a][o]=s;let u=0;t.size+1e-10>=Math.min(e[o].size,e[a].size)?u=1:t.size<=1e-10&&(u=-1),i[o][a]=i[a][o]=u}),{distances:r,constraints:i}}(t,a,l),u=s.distances,c=s.constraints,f=(0,TB.norm2)(u.map(TB.norm2))/u.length;u=u.map(function(t){return t.map(function(t){return t/f})});let p=function(t,e){return function(t,e,n,r){let i=0,o;for(o=0;o<e.length;++o)e[o]=0;for(o=0;o<n.length;++o){let a=t[2*o],l=t[2*o+1];for(let s=o+1;s<n.length;++s){let u=t[2*s],c=t[2*s+1],f=n[o][s],p=r[o][s],h=(u-a)*(u-a)+(c-l)*(c-l),d=Math.sqrt(h),y=h-f*f;if((!(p>0)||!(d<=f))&&(!(p<0)||!(d>=f)))i+=2*y*y,e[2*o]+=4*y*(a-u),e[2*o+1]+=4*y*(l-c),e[2*s]+=4*y*(u-a),e[2*s+1]+=4*y*(c-l)}}return i}(t,e,u,c)};for(n=0;n<o;++n){let t=(0,TB.zeros)(2*u.length).map(Math.random);i=(0,TB.conjugateGradient)(p,t,e),(!r||i.fx<r.fx)&&(r=i)}let h=r.x,d={};for(n=0;n<a.length;++n){let t=a[n];d[t.sets[0]]={x:h[2*n]*f,y:h[2*n+1]*f,radius:Math.sqrt(t.size/Math.PI)}}if(e.history)for(n=0;n<e.history.length;++n)(0,TB.scale)(e.history[n].x,f);return d}(t,e),o=r(i,t);o+1e-8<r(n,t)&&(n=i)}return n}function TY(t,e){let n=0;for(let r=0;r<e.length;++r){let i;let o=e[r];if(1!=o.sets.length){if(2==o.sets.length){let e=t[o.sets[0]],n=t[o.sets[1]];i=TV(e.radius,n.radius,TG(e,n))}else i=TW(o.sets.map(function(e){return t[e]}));n+=(o.hasOwnProperty("weight")?o.weight:1)*(i-o.size)*(i-o.size)}}return n}let TX=t=>{let{sets:e="sets",size:n="size",as:r=["key","path"],padding:i=0}=t,[o,a]=r;return t=>{let r;let l=t.map(t=>Object.assign(Object.assign({},t),{sets:t[e],size:t[n],[o]:t.sets.join("&")}));l.sort((t,e)=>t.sets.length-e.sets.length);let s=function(t,e){let n;(e=e||{}).maxIterations=e.maxIterations||500;let r=e.initialLayout||Tq,i=e.lossFunction||TY,o=r(t=function(t){let e,n,r,i;t=t.slice();let o=[],a={};for(e=0;e<t.length;++e){let n=t[e];1==n.sets.length?o.push(n.sets[0]):2==n.sets.length&&(r=n.sets[0],a[[r,i=n.sets[1]]]=!0,a[[i,r]]=!0)}for(o.sort((t,e)=>t>e?1:-1),e=0;e<o.length;++e)for(r=o[e],n=e+1;n<o.length;++n)!([r,i=o[n]]in a)&&t.push({sets:[r,i],size:0});return t}(t),e),a=[],l=[];for(n in o)o.hasOwnProperty(n)&&(a.push(o[n].x),a.push(o[n].y),l.push(n));let s=(0,TB.nelderMead)(function(e){let n={};for(let t=0;t<l.length;++t){let r=l[t];n[r]={x:e[2*t],y:e[2*t+1],radius:o[r].radius}}return i(n,t)},a,e).x;for(let t=0;t<l.length;++t)o[n=l[t]].x=s[2*t],o[n].y=s[2*t+1];return o}(l);return l.map(t=>{let n=t[e];return Object.assign(Object.assign({},t),{[a]:({width:t,height:e})=>{r=r||function(t,e,n,r){let i=[],o=[];for(let e in t)t.hasOwnProperty(e)&&(o.push(e),i.push(t[e]));e-=2*r,n-=2*r;let a=function(t){let e=function(e){let n=Math.max.apply(null,t.map(function(t){return t[e]+t.radius}));return{max:n,min:Math.min.apply(null,t.map(function(t){return t[e]-t.radius}))}};return{xRange:e("x"),yRange:e("y")}}(i),l=a.xRange,s=a.yRange;if(l.max==l.min||s.max==s.min)return console.log("not scaling solution: zero size detected"),t;let u=e/(l.max-l.min),c=Math.min(n/(s.max-s.min),u),f=(e-(l.max-l.min)*c)/2,p=(n-(s.max-s.min)*c)/2,h={};for(let t=0;t<i.length;++t){let e=i[t];h[o[t]]={radius:c*e.radius,x:r+f+(e.x-l.min)*c,y:r+p+(e.y-s.min)*c}}return h}(s,t,e,i);let o=void 0,a=function(t){let e={};TW(t,e);let n=e.arcs;if(0===n.length)return"M 0 0";if(1==n.length){let t=n[0].circle;return function(t,e,n){let r=[],i=t-n;return r.push("M",i,e),r.push("A",n,n,0,1,0,i+2*n,e),r.push("A",n,n,0,1,0,i,e),r.join(" ")}(t.x,t.y,t.radius)}{let t=["\nM",n[0].p2.x,n[0].p2.y];for(let e=0;e<n.length;++e){let r=n[e],i=r.circle.radius,o=r.width>i;t.push("\nA",i,i,0,o?1:0,1,r.p1.x,r.p1.y)}return t.join(" ")}}(n.map(t=>r[t]));return!/[zZ]$/.test(a)&&(a+=" Z"),a}})})}};function TK(){return{"data.venn":TX,"mark.boxplot":Ti,"mark.gauge":Tu,"mark.wordCloud":TA,"mark.liquid":Tz}}function TZ(){return Object.assign(Object.assign(Object.assign(Object.assign({},sf()),iY()),TK()),A3())}function TQ(t,e){return class n extends t{constructor(t){super(Object.assign(Object.assign({},t),{lib:e}))}}}TX.props={};function TJ(t,e){var n=e.r;t.arc(n,n,n,0,2*Math.PI,!1)}function T0(t,e){var n=e.rx,r=e.ry;if(t.ellipse)t.ellipse(n,r,n,r,0,0,2*Math.PI,!1);else{var i=n>r?n:r,o=n>r?1:n/r,a=n>r?r/n:1;t.save(),t.scale(o,a),t.arc(i,i,i,0,2*Math.PI)}}function T1(t,e){var n,r,i=e.x1,o=e.y1,a=e.x2,l=e.y2,s=e.defX,u=void 0===s?0:s,c=e.defY,f=void 0===c?0:c,p=e.markerStart,h=e.markerEnd,d=e.markerStartOffset,y=e.markerEndOffset,g=0,v=0,m=0,b=0,x=0;p&&d5(p)&&d&&(n=a-i,g=Math.cos(x=Math.atan2(r=l-o,n))*(d||0),v=Math.sin(x)*(d||0)),h&&d5(h)&&y&&(n=i-a,m=Math.cos(x=Math.atan2(r=o-l,n))*(y||0),b=Math.sin(x)*(y||0)),t.moveTo(i-u+g,o-f+v),t.lineTo(a-u+m,l-f+b)}function T2(t,e){var n,r,i=e.defX,o=void 0===i?0:i,a=e.defY,l=void 0===a?0:a,s=e.markerStart,u=e.markerEnd,c=e.markerStartOffset,f=e.markerEndOffset,p=e.path,h=p.absolutePath,d=p.segments,y=0,g=0,v=0,m=0,b=0;if(s&&d5(s)&&c){var x=ol(s.parentNode.getStartTangent(),2),O=x[0],w=x[1];n=O[0]-w[0],y=Math.cos(b=Math.atan2(r=O[1]-w[1],n))*(c||0),g=Math.sin(b)*(c||0)}if(u&&d5(u)&&f){var E=ol(u.parentNode.getEndTangent(),2),O=E[0],w=E[1];n=O[0]-w[0],v=Math.cos(b=Math.atan2(r=O[1]-w[1],n))*(f||0),m=Math.sin(b)*(f||0)}for(var k=0;k<h.length;k++){var M=h[k],S=M[0],_=h[k+1],P=0===k&&(0!==y||0!==g),j=(k===h.length-1||_&&("M"===_[0]||"Z"===_[0]))&&0!==v&&0!==m;switch(S){case"M":P?(t.moveTo(M[1]-o+y,M[2]-l+g),t.lineTo(M[1]-o,M[2]-l)):t.moveTo(M[1]-o,M[2]-l);break;case"L":j?t.lineTo(M[1]-o+v,M[2]-l+m):t.lineTo(M[1]-o,M[2]-l);break;case"Q":t.quadraticCurveTo(M[1]-o,M[2]-l,M[3]-o,M[4]-l),j&&t.lineTo(M[3]-o+v,M[4]-l+m);break;case"C":t.bezierCurveTo(M[1]-o,M[2]-l,M[3]-o,M[4]-l,M[5]-o,M[6]-l),j&&t.lineTo(M[5]-o+v,M[6]-l+m);break;case"A":var A=d[k].arcParams,T=A.cx,C=A.cy,N=A.rx,L=A.ry,I=A.startAngle,R=A.endAngle,D=A.xRotation,F=A.sweepFlag;if(t.ellipse)t.ellipse(T-o,C-l,N,L,D,I,R,!!(1-F));else{var z=N>L?N:L,B=N>L?1:N/L,W=N>L?L/N:1;t.translate(T-o,C-l),t.rotate(D),t.scale(B,W),t.arc(0,0,z,I,R,!!(1-F)),t.scale(1/B,1/W),t.rotate(-D),t.translate(-(T-o),-(C-l))}j&&t.lineTo(M[6]-o+v,M[7]-l+m);break;case"Z":t.closePath()}}}function T5(t,e){var n,r,i=e.defX,o=void 0===i?0:i,a=e.defY,l=void 0===a?0:a,s=e.markerStart,u=e.markerEnd,c=e.markerStartOffset,f=e.markerEndOffset,p=e.points.points,h=p.length,d=p[0][0]-o,y=p[0][1]-l,g=p[h-1][0]-o,v=p[h-1][1]-l,m=0,b=0,x=0,O=0,w=0;s&&d5(s)&&c&&(n=p[1][0]-p[0][0],m=Math.cos(w=Math.atan2(r=p[1][1]-p[0][1],n))*(c||0),b=Math.sin(w)*(c||0)),u&&d5(u)&&f&&(n=p[h-1][0]-p[0][0],x=Math.cos(w=Math.atan2(r=p[h-1][1]-p[0][1],n))*(f||0),O=Math.sin(w)*(f||0)),t.moveTo(d+(m||x),y+(b||O));for(var E=1;E<h-1;E++){var k=p[E];t.lineTo(k[0]-o,k[1]-l)}t.lineTo(g,v)}function T3(t,e){var n,r,i=e.defX,o=void 0===i?0:i,a=e.defY,l=void 0===a?0:a,s=e.markerStart,u=e.markerEnd,c=e.markerStartOffset,f=e.markerEndOffset,p=e.points.points,h=p.length,d=p[0][0]-o,y=p[0][1]-l,g=p[h-1][0]-o,v=p[h-1][1]-l,m=0,b=0,x=0,O=0,w=0;s&&d5(s)&&c&&(n=p[1][0]-p[0][0],m=Math.cos(w=Math.atan2(r=p[1][1]-p[0][1],n))*(c||0),b=Math.sin(w)*(c||0)),u&&d5(u)&&f&&(n=p[h-2][0]-p[h-1][0],x=Math.cos(w=Math.atan2(r=p[h-2][1]-p[h-1][1],n))*(f||0),O=Math.sin(w)*(f||0)),t.moveTo(d+m,y+b);for(var E=1;E<h-1;E++){var k=p[E];t.lineTo(k[0]-o,k[1]-l)}t.lineTo(g+x,v+O)}function T4(t,e){var n=e.radius,r=e.width,i=e.height;if(n&&n.some(function(t){return 0!==t})){var o=r>0?1:-1,a=i>0?1:-1,l=o+a===0,s=ol(n.map(function(t){var e,n,o;return e=t,n=0,o=Math.min(Math.abs(r)/2,Math.abs(i)/2),e<0?n:e>o?o:e}),4),u=s[0],c=s[1],f=s[2],p=s[3];t.moveTo(o*u,0),t.lineTo(r-o*c,0),0!==c&&t.arc(r-o*c,a*c,c,-a*Math.PI/2,o>0?0:Math.PI,l),t.lineTo(r,i-a*f),0!==f&&t.arc(r-o*f,i-a*f,f,o>0?0:Math.PI,a>0?Math.PI/2:1.5*Math.PI,l),t.lineTo(o*p,i),0!==p&&t.arc(o*p,i-a*p,p,a>0?Math.PI/2:-Math.PI/2,o>0?Math.PI:0,l),t.lineTo(0,a*u),0!==u&&t.arc(o*u,a*u,u,o>0?Math.PI:0,a>0?1.5*Math.PI:Math.PI/2,l)}else t.rect(0,0,r,i)}var T6=function(t){function e(){var e=t.apply(this,ou([],ol(arguments),!1))||this;return e.name="canvas-path-generator",e}return oe(e,t),e.prototype.init=function(){var t,e=((t={})[tX.CIRCLE]=TJ,t[tX.ELLIPSE]=T0,t[tX.RECT]=T4,t[tX.LINE]=T1,t[tX.POLYLINE]=T3,t[tX.POLYGON]=T5,t[tX.PATH]=T2,t[tX.TEXT]=void 0,t[tX.GROUP]=void 0,t[tX.IMAGE]=void 0,t[tX.HTML]=void 0,t[tX.MESH]=void 0,t);this.context.pathGeneratorFactory=e},e.prototype.destroy=function(){delete this.context.pathGeneratorFactory},e}(f_);function T8(t,e,n){return{x:t*Math.cos(n)-e*Math.sin(n),y:t*Math.sin(n)+e*Math.cos(n)}}var T9=un(),T7=un(),Ct=un(),Ce=uv(),Cn=function(){function t(){var t=this;this.isHit=function(e,n,r,i){var o=t.context.pointInPathPickerFactory[e.nodeName];if(o){var a=uk(Ce,r),l=ud(T7,ul(Ct,n[0],n[1],0),a),s=e.getGeometryBounds().halfExtents,u=e.parsedStyle.anchor;if(l[0]+=(u&&u[0]||0)*s[0]*2,l[1]+=(u&&u[1]||0)*s[1]*2,o(e,new fY(l[0],l[1]),i,t.isPointInPath,t.context,t.runtime))return!0}return!1},this.isPointInPath=function(e,n){var r=t.runtime.offscreenCanvasCreator.getOrCreateContext(t.context.config.offscreenCanvas),i=t.context.pathGeneratorFactory[e.nodeName];return i&&(r.beginPath(),i(r,e.parsedStyle),r.closePath()),r.isPointInPath(n.x,n.y)}}return t.prototype.apply=function(e,n){var r,i=this,o=e.renderingService,a=e.renderingContext;this.context=e,this.runtime=n;var l=null===(r=a.root)||void 0===r?void 0:r.ownerDocument;o.hooks.pick.tapPromise(t.tag,function(t){return oi(i,void 0,void 0,function(){return oo(this,function(e){return[2,this.pick(l,t)]})})}),o.hooks.pickSync.tap(t.tag,function(t){return i.pick(l,t)})},t.prototype.pick=function(t,e){var n,r,i=e.topmost,o=e.position,a=ul(T9,o.x,o.y,0),l=t.elementsFromBBox(a[0],a[1],a[0],a[1]),s=[];try{for(var u=oa(l),c=u.next();!c.done;c=u.next()){var f=c.value,p=f.getWorldTransform();if(this.isHit(f,a,p,!1)){var h=h0(f);if(h){var d=h.parsedStyle.clipPath;if(this.isHit(d,a,d.getWorldTransform(),!0)){if(i)return e.picked=[f],e;s.push(f)}}else{if(i)return e.picked=[f],e;s.push(f)}}}}catch(t){n={error:t}}finally{try{c&&!c.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}return e.picked=s,e},t.tag="CanvasPicker",t}();function Cr(t,e,n){var r=t.parsedStyle,i=r.r,o=r.fill,a=r.stroke,l=r.lineWidth,s=r.increasedLineWidthForHitTesting,u=r.pointerEvents,c=((l||0)+(s||0))/2,f=fd(i,i,e.x,e.y),p=ol(h3(u,o,a),2),h=p[0],d=p[1];return h&&d||n?f<=i+c:h?f<=i:!!d&&f>=i-c&&f<=i+c}function Ci(t,e,n,r){return t/(n*n)+e/(r*r)}function Co(t,e,n){var r,i,o,a,l,s,u,c,f,p,h,d,y,g,v,m,b=t.parsedStyle,x=b.rx,O=b.ry,w=b.fill,E=b.stroke,k=b.lineWidth,M=b.increasedLineWidthForHitTesting,S=b.pointerEvents,_=e.x,P=e.y,j=ol(h3(S,w,E),2),A=j[0],T=j[1],C=((k||0)+(M||0))/2,N=(_-x)*(_-x),L=(P-O)*(P-O);if(A&&T||n){;return 1>=(r=N,i=L,r/((o=x+C)*o)+i/((a=O+C)*a))}if(A){;return 1>=(l=N,s=L,l/((u=x)*u)+s/((c=O)*c))}if(T){;return f=N,p=L,f/((h=x-C)*h)+p/((d=O-C)*d)>=1&&1>=(y=N,g=L,y/((v=x+C)*v)+g/((m=O+C)*m))}return!1}function Ca(t,e,n,r,i,o){return i>=t&&i<=t+n&&o>=e&&o<=e+r}function Cl(t,e,n,r,i,o,a,l){var s=(Math.atan2(l-e,a-t)+2*Math.PI)%(2*Math.PI),u={x:t+n*Math.cos(s),y:e+n*Math.sin(s)};return fd(u.x,u.y,a,l)<=o/2}function Cs(t,e,n,r,i,o,a){var l=Math.min(t,n),s=Math.max(t,n),u=Math.min(e,r),c=Math.max(e,r),f=i/2;return!!(o>=l-f)&&!!(o<=s+f)&&!!(a>=u-f)&&!!(a<=c+f)&&function(t,e,n,r,i,o){var a,l,s,u,c,f,p,h,d,y=[n-t,r-e];if(l=[0,0],(a=y)[0]===l[0]&&a[1]===l[1])return Math.sqrt((i-t)*(i-t)+(o-e)*(o-e));var g=[-y[1],y[0]];s=g,c=(u=g)[0],(p=c*c+(f=u[1])*f)>0&&(p=1/Math.sqrt(p)),s[0]=u[0]*p,s[1]=u[1]*p;return Math.abs((h=[i-t,o-e],d=g,h[0]*d[0]+h[1]*d[1]))}(t,e,n,r,o,a)<=i/2}function Cu(t,e,n,r,i){var o=t.length;if(o<2)return!1;for(var a=0;a<o-1;a++)if(Cs(t[a][0],t[a][1],t[a+1][0],t[a+1][1],e,n,r))return!0;if(i){var l=t[0],s=t[o-1];if(Cs(l[0],l[1],s[0],s[1],e,n,r))return!0}return!1}function Cc(t){return 1e-6>Math.abs(t)?0:t<0?-1:1}function Cf(t,e,n){var r=!1,i=t.length;if(i<=2)return!1;for(var o=0;o<i;o++){var a,l,s,u=t[o],c=t[(o+1)%i];if(a=u,l=c,((s=[e,n])[0]-a[0])*(l[1]-a[1])==(l[0]-a[0])*(s[1]-a[1])&&Math.min(a[0],l[0])<=s[0]&&s[0]<=Math.max(a[0],l[0])&&Math.min(a[1],l[1])<=s[1]&&s[1]<=Math.max(a[1],l[1]))return!0;Cc(u[1]-n)>0!=Cc(c[1]-n)>0&&0>Cc(e-(n-u[1])*(u[0]-c[0])/(u[1]-c[1])-u[0])&&(r=!r)}return r}function Cp(t,e,n){for(var r=!1,i=0;i<t.length&&!(r=Cf(t[i],e,n));i++);return r}function Ch(t,e,n){var r=t.parsedStyle,i=r.x1,o=r.y1,a=r.x2,l=r.y2,s=r.lineWidth,u=r.increasedLineWidthForHitTesting,c=r.defX,f=r.defY;return(!!ol(h3(r.pointerEvents,r.fill,r.stroke),2)[1]||!!n)&&!!s&&Cs(i,o,a,l,(s||0)+(u||0),e.x+(void 0===c?0:c),e.y+(void 0===f?0:f))}function Cd(t,e,n,r,i,o){var a=t.parsedStyle,l=a.lineWidth,s=a.increasedLineWidthForHitTesting,u=a.stroke,c=a.fill,f=a.defX,p=void 0===f?0:f,h=a.defY,d=void 0===h?0:h,y=a.path,g=a.pointerEvents,v=y.segments,m=y.hasArc,b=y.polylines,x=y.polygons,O=ol(h3(g,(null==x?void 0:x.length)&&c,u),2),w=O[0],E=O[1],k=pJ(t),M=!1;return w||n?M=m?r(t,e):Cp(x,e.x+p,e.y+d)||Cp(b,e.x+p,e.y+d):(E||n)&&(M=function(t,e,n,r,i){for(var o=!1,a=e/2,l=0;l<t.length;l++){var s=t[l],u=s.currentPoint,c=s.params,f=s.prePoint,p=s.box;if(!p||!!Ca(p.x-a,p.y-a,p.width+e,p.height+e,n,r))switch(s.command){case"L":case"Z":if(o=Cs(f[0],f[1],u[0],u[1],e,n,r))return!0;break;case"Q":if(o=function(t,e,n,r,i,o,a,l){var s=fg([t,n,i],[e,r,o],a,l,fw);return fd(s.x,s.y,a,l)}(f[0],f[1],c[1],c[2],c[3],c[4],n,r)<=e/2)return!0;break;case"C":if(o=fO(f[0],f[1],c[1],c[2],c[3],c[4],c[5],c[6],n,r,i)<=e/2)return!0;break;case"A":!s.cubicParams&&(s.cubicParams=function t(e,n,r,i,o,a,l,s,u,c){var f,p,h,d,y,g=e,v=n,m=r,b=i,x=s,O=u,w=120*Math.PI/180,E=Math.PI/180*(+o||0),k=[];if(c)p=c[0],h=c[1],d=c[2],y=c[3];else{g=(f=T8(g,v,-E)).x,v=f.y,x=(f=T8(x,O,-E)).x,O=f.y;var M=(g-x)/2,S=(v-O)/2,_=M*M/(m*m)+S*S/(b*b);_>1&&(m*=_=Math.sqrt(_),b*=_);var P=m*m,j=b*b,A=(a===l?-1:1)*Math.sqrt(Math.abs((P*j-P*S*S-j*M*M)/(P*S*S+j*M*M)));d=A*m*S/b+(g+x)/2,y=-(A*b)*M/m+(v+O)/2,p=Math.asin(((v-y)/b*1e9>>0)/1e9),h=Math.asin(((O-y)/b*1e9>>0)/1e9),p=g<d?Math.PI-p:p,h=x<d?Math.PI-h:h,p<0&&(p=2*Math.PI+p),h<0&&(h=2*Math.PI+h),l&&p>h&&(p-=2*Math.PI),!l&&h>p&&(h-=2*Math.PI)}var T=h-p;if(Math.abs(T)>w){var C=h,N=x,L=O;x=d+m*Math.cos(h=p+w*(l&&h>p?1:-1)),k=t(x,O=y+b*Math.sin(h),m,b,o,0,l,N,L,[h,C,d,y])}T=h-p;var I=Math.cos(p),R=Math.cos(h),D=Math.tan(T/4),F=4/3*m*D,z=4/3*b*D,B=[g,v],W=[g+F*Math.sin(p),v-z*I],$=[x+F*Math.sin(h),O-z*R],G=[x,O];if(W[0]=2*B[0]-W[0],W[1]=2*B[1]-W[1],c)return W.concat($,G,k);k=W.concat($,G,k);for(var V=[],H=0,U=k.length;H<U;H+=1)V[H]=H%2?T8(k[H-1],k[H],E).y:T8(k[H],k[H+1],E).x;return V}(f[0],f[1],c[1],c[2],c[3],c[4],c[5],c[6],c[7],void 0));for(var h=s.cubicParams,d=f,y=0;y<h.length;y+=6){var g=fO(d[0],d[1],h[y],h[y+1],h[y+2],h[y+3],h[y+4],h[y+5],n,r,i);if(d=[h[y+4],h[y+5]],o=g<=e/2)return!0}}}return o}(v,(l||0)+(s||0),e.x+p,e.y+d,k)),M}function Cy(t,e,n){var r=t.parsedStyle,i=r.stroke,o=r.fill,a=r.lineWidth,l=r.increasedLineWidthForHitTesting,s=r.points,u=r.defX,c=void 0===u?0:u,f=r.defY,p=void 0===f?0:f,h=ol(h3(r.pointerEvents,o,i),2),d=h[0],y=h[1],g=!1;return(y||n)&&(g=Cu(s.points,(a||0)+(l||0),e.x+c,e.y+p,!0)),!g&&(d||n)&&(g=Cf(s.points,e.x+c,e.y+p)),g}function Cg(t,e,n){var r=t.parsedStyle,i=r.lineWidth,o=r.increasedLineWidthForHitTesting,a=r.points,l=r.defX,s=r.defY;return(!!ol(h3(r.pointerEvents,r.fill,r.stroke),2)[1]||!!n)&&!!i&&Cu(a.points,(i||0)+(o||0),e.x+(void 0===l?0:l),e.y+(void 0===s?0:s),!1)}function Cv(t,e,n,r,i){var o,a,l,s,u,c,f,p,h=t.parsedStyle,d=h.radius,y=h.fill,g=h.stroke,v=h.lineWidth,m=h.increasedLineWidthForHitTesting,b=h.width,x=h.height,O=ol(h3(h.pointerEvents,y,g),2),w=O[0],E=O[1],k=d&&d.some(function(t){return 0!==t}),M=(v||0)+(m||0);if(k){var S=!1;return(E||n)&&(S=function(t,e,n,r,i,o,a,l){var s=ol(i,4),u=s[0],c=s[1],f=s[2],p=s[3];return Cs(t+u,e,t+n-c,e,o,a,l)||Cs(t+n,e+c,t+n,e+r-f,o,a,l)||Cs(t+n-f,e+r,t+p,e+r,o,a,l)||Cs(t,e+r-p,t,e+u,o,a,l)||Cl(t+n-c,e+c,c,1.5*Math.PI,2*Math.PI,o,a,l)||Cl(t+n-f,e+r-f,f,0,.5*Math.PI,o,a,l)||Cl(t+p,e+r-p,p,.5*Math.PI,Math.PI,o,a,l)||Cl(t+u,e+u,u,Math.PI,1.5*Math.PI,o,a,l)}(0,0,b,x,d.map(function(t){var e,n,r;return e=t,n=0,r=Math.min(Math.abs(b)/2,Math.abs(x)/2),e<0?n:e>r?r:e}),M,e.x,e.y)),!S&&(w||n)&&(S=r(t,e)),S}var _=M/2;if(w&&E||n)return Ca(0-_,0-_,b+_,x+_,e.x,e.y);if(w)return Ca(0,0,b,x,e.x,e.y);if(E){;return o=0,a=0,l=b,s=x,u=M,c=e.x,f=e.y,Ca(0-(p=u/2),0-p,l,u,c,f)||Ca(o+l-p,a-p,u,s,c,f)||Ca(o+p,a+s-p,l,u,c,f)||Ca(o-p,a+p,u,s,c,f)}return!1}function Cm(t,e,n,r,i,o){var a=t.parsedStyle,l=a.pointerEvents,s=a.width,u=a.height;if("non-transparent-pixel"===l){var c=i.config.offscreenCanvas,f=o.offscreenCanvasCreator.getOrCreateCanvas(c),p=o.offscreenCanvasCreator.getOrCreateContext(c,{willReadFrequently:!0});return f.width=s,f.height=u,i.defaultStyleRendererFactory[tX.IMAGE].render(p,t.parsedStyle,t,void 0,void 0,void 0),p.getImageData(e.x,e.y,1,1).data.every(function(t){return 0!==t})}return!0}var Cb=function(t){function e(){var e=t.apply(this,ou([],ol(arguments),!1))||this;return e.name="canvas-picker",e}return oe(e,t),e.prototype.init=function(){var t,e=((t={})[tX.CIRCLE]=Cr,t[tX.ELLIPSE]=Co,t[tX.RECT]=Cv,t[tX.LINE]=Ch,t[tX.POLYLINE]=Cg,t[tX.POLYGON]=Cy,t[tX.PATH]=Cd,t[tX.TEXT]=function(){return!0},t[tX.GROUP]=null,t[tX.IMAGE]=Cm,t[tX.HTML]=null,t[tX.MESH]=null,t);this.context.pointInPathPickerFactory=e,this.addRenderingPlugin(new Cn)},e.prototype.destroy=function(){delete this.context.pointInPathPickerFactory,this.removeAllRenderingPlugins()},e}(f_),Cx=function(t){return null==t},CO={}.toString,Cw=function(t){var e;return e=t,"[object String]"===CO.call(e)},CE=function(){function t(t){this.canvasRendererPluginOptions=t,this.removedRBushNodeAABBs=[],this.renderQueue=[],this.restoreStack=[],this.clearFullScreen=!1,this.vpMatrix=uv(),this.dprMatrix=uv(),this.tmpMat4=uv(),this.vec3a=un(),this.vec3b=un(),this.vec3c=un(),this.vec3d=un()}return t.prototype.apply=function(e,n){var r=this;this.context=e;var i=e.config,o=e.camera,a=e.renderingService,l=e.renderingContext,s=e.rBushRoot,u=e.pathGeneratorFactory;this.rBush=s,this.pathGeneratorFactory=u;var c=e.contextService,f=l.root.ownerDocument.defaultView,p=function(t){var e=t.target.rBushNode;e.aabb&&r.removedRBushNodeAABBs.push(e.aabb)},h=function(t){var e=t.target.rBushNode;e.aabb&&r.removedRBushNodeAABBs.push(e.aabb)};a.hooks.init.tap(t.tag,function(){f.addEventListener(en.UNMOUNTED,p),f.addEventListener(en.CULLED,h);var t=c.getDPR(),e=i.width,n=i.height,o=c.getContext();r.clearRect(o,0,0,e*t,n*t,i.background)}),a.hooks.destroy.tap(t.tag,function(){f.removeEventListener(en.UNMOUNTED,p),f.removeEventListener(en.CULLED,h),r.renderQueue=[],r.removedRBushNodeAABBs=[],r.restoreStack=[]}),a.hooks.beginFrame.tap(t.tag,function(){var t=c.getContext(),e=c.getDPR(),n=i.width,o=i.height,l=r.canvasRendererPluginOptions,s=l.dirtyObjectNumThreshold,u=l.dirtyObjectRatioThreshold,f=a.getStats(),p=f.total,h=f.rendered;r.clearFullScreen=a.disableDirtyRectangleRendering()||h>s&&h/p>u,t&&(t.resetTransform?t.resetTransform():t.setTransform(1,0,0,1,0,0),r.clearFullScreen&&r.clearRect(t,0,0,n*e,o*e,i.background))});var d=function(t,e){t.isVisible()&&!t.isCulled()&&(r.renderDisplayObject(t,e,r.context,r.restoreStack,n),r.saveDirtyAABB(t)),(t.sortable.sorted||t.childNodes).forEach(function(t){d(t,e)})};a.hooks.endFrame.tap(t.tag,function(){var t=c.getContext(),e=c.getDPR();if(uI(r.dprMatrix,[e,e,1]),u_(r.vpMatrix,r.dprMatrix,o.getOrthoMatrix()),r.clearFullScreen)d(l.root,t);else{var a=r.safeMergeAABB.apply(r,ou([r.mergeDirtyAABBs(r.renderQueue)],ol(r.removedRBushNodeAABBs.map(function(t){var e=t.minX,n=t.minY,r=t.maxX,i=t.maxY,o=new fH;return o.setMinMax([e,n,0],[r,i,0]),o})),!1));if(r.removedRBushNodeAABBs=[],fH.isEmpty(a)){r.renderQueue=[];return}var s=r.convertAABB2Rect(a),u=s.x,p=s.y,h=s.width,y=s.height,g=ud(r.vec3a,[u,p,0],r.vpMatrix),v=ud(r.vec3b,[u+h,p,0],r.vpMatrix),m=ud(r.vec3c,[u,p+y,0],r.vpMatrix),b=ud(r.vec3d,[u+h,p+y,0],r.vpMatrix),x=Math.min(g[0],v[0],b[0],m[0]),O=Math.min(g[1],v[1],b[1],m[1]),w=Math.max(g[0],v[0],b[0],m[0]),E=Math.max(g[1],v[1],b[1],m[1]),k=Math.floor(x),M=Math.floor(O),S=Math.ceil(w-x),_=Math.ceil(E-O);t.save(),r.clearRect(t,k,M,S,_,i.background),t.beginPath(),t.rect(k,M,S,_),t.clip(),t.setTransform(r.vpMatrix[0],r.vpMatrix[1],r.vpMatrix[4],r.vpMatrix[5],r.vpMatrix[12],r.vpMatrix[13]),i.renderer.getConfig().enableDirtyRectangleRenderingDebug&&f.dispatchEvent(new d_(er.DIRTY_RECTANGLE,{dirtyRect:{x:k,y:M,width:S,height:_}})),r.searchDirtyObjects(a).sort(function(t,e){return t.sortable.renderOrder-e.sortable.renderOrder}).forEach(function(e){e&&e.isVisible()&&!e.isCulled()&&r.renderDisplayObject(e,t,r.context,r.restoreStack,n)}),t.restore(),r.renderQueue.forEach(function(t){r.saveDirtyAABB(t)}),r.renderQueue=[]}r.restoreStack.forEach(function(){t.restore()}),r.restoreStack=[]}),a.hooks.render.tap(t.tag,function(t){!r.clearFullScreen&&r.renderQueue.push(t)})},t.prototype.clearRect=function(t,e,n,r,i,o){t.clearRect(e,n,r,i),o&&(t.fillStyle=o,t.fillRect(e,n,r,i))},t.prototype.renderDisplayObject=function(t,e,n,r,i){var o=t.nodeName,a=r[r.length-1];a&&!(t.compareDocumentPosition(a)&dj.DOCUMENT_POSITION_CONTAINS)&&(e.restore(),r.pop());var l=this.context.styleRendererFactory[o],s=this.pathGeneratorFactory[o],u=t.parsedStyle.clipPath;if(u){this.applyWorldTransform(e,u);var c=this.pathGeneratorFactory[u.nodeName];c&&(e.save(),r.push(t),e.beginPath(),c(e,u.parsedStyle),e.closePath(),e.clip())}l&&(this.applyWorldTransform(e,t),e.save(),this.applyAttributesToContext(e,t)),s&&(e.beginPath(),s(e,t.parsedStyle),t.nodeName!==tX.LINE&&t.nodeName!==tX.PATH&&t.nodeName!==tX.POLYLINE&&e.closePath()),l&&(l.render(e,t.parsedStyle,t,n,this,i),e.restore()),t.renderable.dirty=!1},t.prototype.convertAABB2Rect=function(t){var e=t.getMin(),n=t.getMax(),r=Math.floor(e[0]),i=Math.floor(e[1]),o=Math.ceil(n[0]),a=Math.ceil(n[1]);return{x:r,y:i,width:o-r,height:a-i}},t.prototype.mergeDirtyAABBs=function(t){var e=new fH;return t.forEach(function(t){var n=t.getRenderBounds();e.add(n);var r=t.renderable.dirtyRenderBounds;r&&e.add(r)}),e},t.prototype.searchDirtyObjects=function(t){var e=ol(t.getMin(),2),n=e[0],r=e[1],i=ol(t.getMax(),2),o=i[0],a=i[1];return this.rBush.search({minX:n,minY:r,maxX:o,maxY:a}).map(function(t){return t.displayObject})},t.prototype.saveDirtyAABB=function(t){var e=t.renderable;!e.dirtyRenderBounds&&(e.dirtyRenderBounds=new fH);var n=t.getRenderBounds();n&&e.dirtyRenderBounds.update(n.center,n.halfExtents)},t.prototype.applyAttributesToContext=function(t,e){var n=e.parsedStyle,r=n.stroke,i=n.fill,o=n.opacity,a=n.lineDash,l=n.lineDashOffset;a&&t.setLineDash(a),!Cx(l)&&(t.lineDashOffset=l),!Cx(o)&&(t.globalAlpha*=o),!Cx(r)&&!Array.isArray(r)&&!r.isNone&&(t.strokeStyle=e.attributes.stroke),!Cx(i)&&!Array.isArray(i)&&!i.isNone&&(t.fillStyle=e.attributes.fill)},t.prototype.applyWorldTransform=function(t,e,n){var r=0,i=0,o=(e.parsedStyle||{}).anchor,a=o&&o[0]||0,l=o&&o[1]||0;if(0!==a||0!==l){var s=e.geometry.contentBounds,u=s&&2*s.halfExtents[0]||0,c=s&&2*s.halfExtents[1]||0;r=-(a*u),i=-(l*c)}n?(ub(this.tmpMat4,e.getLocalTransform()),this.vec3a[0]=r,this.vec3a[1]=i,this.vec3a[2]=0,uP(this.tmpMat4,this.tmpMat4,this.vec3a),u_(this.tmpMat4,n,this.tmpMat4)):(ub(this.tmpMat4,e.getWorldTransform()),this.vec3a[0]=r,this.vec3a[1]=i,this.vec3a[2]=0,uP(this.tmpMat4,this.tmpMat4,this.vec3a)),u_(this.tmpMat4,this.vpMatrix,this.tmpMat4),t.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 t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=new fH;return t.forEach(function(t){n.add(t)}),n},t.tag="CanvasRenderer",t}(),Ck=function(){function t(t){this.imagePool=t}return t.prototype.render=function(t,e,n,r,i,o){var a=e.fill,l=e.fillRule,s=e.opacity,u=e.fillOpacity,c=e.stroke,f=e.strokeOpacity,p=e.lineWidth,h=e.lineCap,d=e.lineJoin,y=e.shadowType,g=e.shadowColor,v=e.shadowBlur,m=e.filter,b=e.miterLimit,x=!Cx(a)&&!a.isNone,O=!Cx(c)&&!c.isNone&&p>0,w=0===a.alpha,E=!!(m&&m.length),k=!Cx(g)&&v>0,M=n.nodeName,S="inner"===y,_=O&&k&&(M===tX.PATH||M===tX.LINE||M===tX.POLYLINE||w||S);x&&(t.globalAlpha=s*u,!_&&CM(n,t,k),this.fill(t,n,a,l,r,i,o),!_&&this.clearShadowAndFilter(t,E,k)),O&&(t.globalAlpha=s*f,t.lineWidth=p,!Cx(b)&&(t.miterLimit=b),!Cx(h)&&(t.lineCap=h),!Cx(d)&&(t.lineJoin=d),_&&(S&&(t.globalCompositeOperation="source-atop"),CM(n,t,!0),S&&(this.stroke(t,n,c,r,i,o),t.globalCompositeOperation="source-over",this.clearShadowAndFilter(t,E,!0))),this.stroke(t,n,c,r,i,o))},t.prototype.clearShadowAndFilter=function(t,e,n){if(n&&(t.shadowColor="transparent",t.shadowBlur=0),e){var r=t.filter;!Cx(r)&&r.indexOf("drop-shadow")>-1&&(t.filter=r.replace(/drop-shadow\([^)]*\)/,"").trim()||"none")}},t.prototype.fill=function(t,e,n,r,i,o,a){var l=this;Array.isArray(n)?n.forEach(function(n){t.fillStyle=l.getColor(n,e,t),r?t.fill(r):t.fill()}):(pA(n)&&(t.fillStyle=this.getPattern(n,e,t,i,o,a)),r?t.fill(r):t.fill())},t.prototype.stroke=function(t,e,n,r,i,o){var a=this;Array.isArray(n)?n.forEach(function(n){t.strokeStyle=a.getColor(n,e,t),t.stroke()}):(pA(n)&&(t.strokeStyle=this.getPattern(n,e,t,r,i,o)),t.stroke())},t.prototype.getPattern=function(t,e,n,r,i,o){if("rect"===t.image.nodeName){var a,l,s=t.image.parsedStyle,u=s.width,c=s.height;l=r.contextService.getDPR();var f=r.config.offscreenCanvas;(a=o.offscreenCanvasCreator.getOrCreateCanvas(f)).width=u*l,a.height=c*l;var p=o.offscreenCanvasCreator.getOrCreateContext(f),h=[];t.image.forEach(function(t){i.renderDisplayObject(t,p,r,h,o)}),h.forEach(function(){p.restore()})}return this.imagePool.getOrCreatePatternSync(t,n,a,l,function(){e.renderable.dirty=!0,r.renderingService.dirtify()})},t.prototype.getColor=function(t,e,n){var r;if(t.type===t8.LinearGradient||t.type===t8.RadialGradient){var i=e.getGeometryBounds(),o=i&&2*i.halfExtents[0]||1,a=i&&2*i.halfExtents[1]||1;r=this.imagePool.getOrCreateGradient(on(on({type:t.type},t.value),{width:o,height:a}),n)}return r},t}();function CM(t,e,n){var r=t.parsedStyle,i=r.filter,o=r.shadowColor,a=r.shadowBlur,l=r.shadowOffsetX,s=r.shadowOffsetY;i&&i.length&&(e.filter=t.style.filter),n&&(e.shadowColor=o.toString(),e.shadowBlur=a||0,e.shadowOffsetX=l||0,e.shadowOffsetY=s||0)}var CS=function(){function t(t){this.imagePool=t}return t.prototype.render=function(t,e,n){var r,i=e.width,o=e.height,a=e.img,l=e.shadowColor,s=e.shadowBlur,u=i,c=o;if(Cw(a)?r=this.imagePool.getImageSync(a):(u||(u=a.width),c||(c=a.height),r=a),r){CM(n,t,!Cx(l)&&s>0);try{t.drawImage(r,0,0,u,c)}catch(t){}}},t}(),C_=function(){function t(){}return t.prototype.render=function(t,e,n,r,i,o){var a=e.lineWidth,l=e.textAlign,s=e.textBaseline,u=e.lineJoin,c=e.miterLimit,f=e.letterSpacing,p=e.stroke,h=e.fill,d=e.fillOpacity,y=e.strokeOpacity,g=e.opacity,v=e.metrics,m=e.dx,b=e.dy,x=e.shadowColor,O=e.shadowBlur,w=v.font,E=v.lines,k=v.height,M=v.lineHeight,S=v.lineMetrics;t.font=w,t.lineWidth=a,t.textAlign="middle"===l?"center":l;var _=s;!o.enableCSSParsing&&"alphabetic"===_&&(_="bottom"),t.lineJoin=u,!Cx(c)&&(t.miterLimit=c);var P=0;"middle"===s?P=-k/2-M/2:"bottom"===s||"alphabetic"===s||"ideographic"===s?P=-k:("top"===s||"hanging"===s)&&(P=-M);var j=m||0;P+=b||0,1===E.length&&("bottom"===_?(_="middle",P-=.5*k):"top"===_&&(_="middle",P+=.5*k)),t.textBaseline=_,CM(n,t,!Cx(x)&&O>0);for(var A=0;A<E.length;A++){var T=a/2+j;P+=M,!Cx(p)&&!p.isNone&&a&&this.drawLetterSpacing(t,E[A],S[A],l,T,P,f,d,y,g,!0),!Cx(h)&&this.drawLetterSpacing(t,E[A],S[A],l,T,P,f,d,y,g)}},t.prototype.drawLetterSpacing=function(t,e,n,r,i,o,a,l,s,u,c){if(void 0===c&&(c=!1),0===a){c?this.strokeText(t,e,i,o,s):this.fillText(t,e,i,o,l,u);return}var f=t.textAlign;t.textAlign="left";var p=i;"center"===r||"middle"===r?p=i-n.width/2:("right"===r||"end"===r)&&(p=i-n.width);for(var h=Array.from(e),d=t.measureText(e).width,y=0,g=0;g<h.length;++g){var v=h[g];c?this.strokeText(t,v,p,o,s):this.fillText(t,v,p,o,l,u),p+=d-(y=t.measureText(e.substring(g+1)).width)+a,d=y}t.textAlign=f},t.prototype.fillText=function(t,e,n,r,i,o){var a,l=!Cx(i)&&1!==i;l&&(a=t.globalAlpha,t.globalAlpha=i*o),t.fillText(e,n,r),l&&(t.globalAlpha=a)},t.prototype.strokeText=function(t,e,n,r,i){var o,a=!Cx(i)&&1!==i;a&&(o=t.globalAlpha,t.globalAlpha=i),t.strokeText(e,n,r),a&&(t.globalAlpha=o)},t}();oe(function(){return null!==W&&W.apply(this,arguments)||this},W=Ck),oe(function(){return null!==$&&$.apply(this,arguments)||this},$=Ck),oe(function(){return null!==G&&G.apply(this,arguments)||this},G=Ck),oe(function(){return null!==V&&V.apply(this,arguments)||this},V=Ck),oe(function(){return null!==H&&H.apply(this,arguments)||this},H=Ck),oe(function(){return null!==U&&U.apply(this,arguments)||this},U=Ck),oe(function(){return null!==q&&q.apply(this,arguments)||this},q=Ck);var CP=function(t){function e(e){void 0===e&&(e={});var n=t.call(this)||this;return n.options=e,n.name="canvas-renderer",n}return oe(e,t),e.prototype.init=function(){var t,e=on({dirtyObjectNumThreshold:500,dirtyObjectRatioThreshold:.8},this.options),n=this.context.imagePool,r=new Ck(n),i=((t={})[tX.CIRCLE]=r,t[tX.ELLIPSE]=r,t[tX.RECT]=r,t[tX.IMAGE]=new CS(n),t[tX.TEXT]=new C_,t[tX.LINE]=r,t[tX.POLYLINE]=r,t[tX.POLYGON]=r,t[tX.PATH]=r,t[tX.GROUP]=void 0,t[tX.HTML]=void 0,t[tX.MESH]=void 0,t);this.context.defaultStyleRendererFactory=i,this.context.styleRendererFactory=i,this.addRenderingPlugin(new CE(e))},e.prototype.destroy=function(){this.removeAllRenderingPlugins(),delete this.context.defaultStyleRendererFactory,delete this.context.styleRendererFactory},e}(f_),Cj=function(){function t(){}return t.prototype.apply=function(e,n){var r=this,i=e.renderingService,o=e.renderingContext,a=e.config;this.context=e;var l=o.root.ownerDocument.defaultView,s=function(t){i.hooks.pointerMove.call(t)},u=function(t){i.hooks.pointerUp.call(t)},c=function(t){i.hooks.pointerDown.call(t)},f=function(t){i.hooks.pointerOver.call(t)},p=function(t){i.hooks.pointerOut.call(t)},h=function(t){i.hooks.pointerCancel.call(t)},d=function(t){i.hooks.pointerWheel.call(t)},y=function(t){i.hooks.click.call(t)},g=function(t){n.globalThis.document.addEventListener("pointermove",s,!0),t.addEventListener("pointerdown",c,!0),t.addEventListener("pointerleave",p,!0),t.addEventListener("pointerover",f,!0),n.globalThis.addEventListener("pointerup",u,!0),n.globalThis.addEventListener("pointercancel",h,!0)},v=function(t){t.addEventListener("touchstart",c,!0),t.addEventListener("touchend",u,!0),t.addEventListener("touchmove",s,!0),t.addEventListener("touchcancel",h,!0)},m=function(t){n.globalThis.document.addEventListener("mousemove",s,!0),t.addEventListener("mousedown",c,!0),t.addEventListener("mouseout",p,!0),t.addEventListener("mouseover",f,!0),n.globalThis.addEventListener("mouseup",u,!0)},b=function(t){n.globalThis.document.removeEventListener("pointermove",s,!0),t.removeEventListener("pointerdown",c,!0),t.removeEventListener("pointerleave",p,!0),t.removeEventListener("pointerover",f,!0),n.globalThis.removeEventListener("pointerup",u,!0)},x=function(t){t.removeEventListener("touchstart",c,!0),t.removeEventListener("touchend",u,!0),t.removeEventListener("touchmove",s,!0),t.removeEventListener("touchcancel",h,!0)},O=function(t){n.globalThis.document.removeEventListener("mousemove",s,!0),t.removeEventListener("mousedown",c,!0),t.removeEventListener("mouseout",p,!0),t.removeEventListener("mouseover",f,!0),n.globalThis.removeEventListener("mouseup",u,!0)};i.hooks.init.tap(t.tag,function(){var t=r.context.contextService.getDomElement();n.globalThis.navigator.msPointerEnabled?(t.style.msContentZooming="none",t.style.msTouchAction="none"):l.supportsPointerEvents&&(t.style.touchAction="none"),l.supportsPointerEvents?g(t):m(t),l.supportsTouchEvents&&v(t),a.useNativeClickEvent&&t.addEventListener("click",y,!0),t.addEventListener("wheel",d,{passive:!0,capture:!0})}),i.hooks.destroy.tap(t.tag,function(){var t=r.context.contextService.getDomElement();n.globalThis.navigator.msPointerEnabled?(t.style.msContentZooming="",t.style.msTouchAction=""):l.supportsPointerEvents&&(t.style.touchAction=""),l.supportsPointerEvents?b(t):O(t),l.supportsTouchEvents&&x(t),a.useNativeClickEvent&&t.removeEventListener("click",y,!0),t.removeEventListener("wheel",d,!0)})},t.tag="DOMInteraction",t}(),CA=function(t){function e(){var e=t.apply(this,ou([],ol(arguments),!1))||this;return e.name="dom-interaction",e}return oe(e,t),e.prototype.init=function(){this.addRenderingPlugin(new Cj)},e.prototype.destroy=function(){this.removeAllRenderingPlugins()},e}(f_),CT={}.toString,CC=function(t,e){return CT.call(t)==="[object "+e+"]"},CN=function(t){return CC(t,"Number")},CL=function(){function t(){this.displayObjectHTMLElementMap=new WeakMap}return t.prototype.joinTransformMatrix=function(t){return"matrix(".concat([t[0],t[1],t[4],t[5],t[12],t[13]].join(","),")")},t.prototype.apply=function(e,n){var r=this,i=e.camera,o=e.renderingContext,a=e.renderingService;this.context=e;var l=o.root.ownerDocument.defaultView,s=l.context.eventService.nativeHTMLMap,u=function(t,e){e.style.transform=r.joinTransformMatrix(t.getWorldTransform())},c=function(t){var e=t.target;if(e.nodeName===tX.HTML){!r.$camera&&(r.$camera=r.createCamera(i));var o=r.getOrCreateEl(e);if(r.$camera.appendChild(o),n.enableCSSParsing){var a=e.ownerDocument.documentElement.attributes;Object.keys(a).forEach(function(t){o.style[t]=a[t]})}Object.keys(e.attributes).forEach(function(t){r.updateAttribute(t,e)}),u(e,o),s.set(o,e)}},f=function(t){var e=t.target;if(e.nodeName===tX.HTML&&r.$camera){var n=r.getOrCreateEl(e);n&&(n.remove(),s.delete(n))}},p=function(t){var e=t.target;if(e.nodeName===tX.HTML){var n=t.attrName;r.updateAttribute(n,e)}},h=function(t){var e=t.target;if(e.nodeName===tX.HTML){var n=r.getOrCreateEl(e);u(e,n)}},d=function(){if(r.$camera){var t=r.context.config,e=t.width,n=t.height;r.$camera.style.width="".concat(e||0,"px"),r.$camera.style.height="".concat(n||0,"px")}};a.hooks.init.tap(t.tag,function(){l.addEventListener(er.RESIZE,d),l.addEventListener(en.MOUNTED,c),l.addEventListener(en.UNMOUNTED,f),l.addEventListener(en.ATTR_MODIFIED,p),l.addEventListener(en.BOUNDS_CHANGED,h)}),a.hooks.endFrame.tap(t.tag,function(){r.$camera&&o.renderReasons.has(ee.CAMERA_CHANGED)&&(r.$camera.style.transform=r.joinTransformMatrix(i.getOrthoMatrix()))}),a.hooks.destroy.tap(t.tag,function(){r.$camera&&r.$camera.remove(),l.removeEventListener(er.RESIZE,d),l.removeEventListener(en.MOUNTED,c),l.removeEventListener(en.UNMOUNTED,f),l.removeEventListener(en.ATTR_MODIFIED,p),l.removeEventListener(en.BOUNDS_CHANGED,h)})},t.prototype.createCamera=function(t){var e=this.context.config,n=e.document,r=e.width,i=e.height,o=this.context.contextService.getDomElement(),a=o.parentNode;if(a){var l="g-canvas-camera",s=a.querySelector("#"+l);if(!s){var u=(n||document).createElement("div");s=u,u.id=l,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(t.getOrthoMatrix()),u.style.overflow="hidden",u.style.pointerEvents="none",u.style.width="".concat(r||0,"px"),u.style.height="".concat(i||0,"px"),a.appendChild(u)}return s}return null},t.prototype.getOrCreateEl=function(t){var e=this.context.config.document,n=this.displayObjectHTMLElementMap.get(t);return!n&&(n=(e||document).createElement("div"),t.parsedStyle.$el=n,this.displayObjectHTMLElementMap.set(t,n),t.id&&(n.id=t.id),t.name&&n.setAttribute("name",t.name),t.className&&(n.className=t.className),n.style.position="absolute",n.style.left="0px",n.style.top="0px",n.style["will-change"]="transform",n.style.transform=this.joinTransformMatrix(t.getWorldTransform())),n},t.prototype.updateAttribute=function(t,e){var n,r=this.getOrCreateEl(e);switch(t){case"innerHTML":var i=e.parsedStyle.innerHTML;if(CC(i,"String"))r.innerHTML=i;else r.innerHTML="",r.appendChild(i);break;case"transformOrigin":var o=e.parsedStyle.transformOrigin;r.style["transform-origin"]="".concat(o[0].value," ").concat(o[1].value);break;case"width":if(this.context.enableCSSParsing){var a=e.computedStyleMap().get("width");r.style.width=a.toString()}else{var a=e.parsedStyle.width;r.style.width=CN(a)?"".concat(a,"px"):a.toString()}break;case"height":if(this.context.enableCSSParsing){var l=e.computedStyleMap().get("height");r.style.height=l.toString()}else{var l=e.parsedStyle.height;r.style.height=CN(l)?"".concat(l,"px"):l.toString()}break;case"zIndex":var s=e.parsedStyle.zIndex;r.style["z-index"]="".concat(s);break;case"visibility":var u=e.parsedStyle.visibility;r.style.visibility=u;break;case"pointerEvents":var c=e.parsedStyle.pointerEvents;r.style.pointerEvents=c;break;case"opacity":var f=e.parsedStyle.opacity;r.style.opacity="".concat(f);break;case"fill":var p=e.parsedStyle.fill,h="";pT(p)?h=p.isNone?"transparent":e.getAttribute("fill"):Array.isArray(p)?h=e.getAttribute("fill"):pA(p),r.style.background=h;break;case"stroke":var d=e.parsedStyle.stroke,y="";pT(d)?y=d.isNone?"transparent":e.getAttribute("stroke"):Array.isArray(d)?y=e.getAttribute("stroke"):pA(d),r.style["border-color"]=y,r.style["border-style"]="solid";break;case"lineWidth":var g=e.parsedStyle.lineWidth;r.style["border-width"]="".concat(g||0,"px");break;case"lineDash":r.style["border-style"]="dashed";break;case"filter":var v=e.style.filter;r.style.filter=v;break;default:if("x"!==t&&"y"!==t){;if(null!=(n=e.style[t])&&""!==e.style[t])r.style[t]=e.style[t]}}},t.tag="HTMLRendering",t}(),CI=function(t){function e(){var e=t.apply(this,ou([],ol(arguments),!1))||this;return e.name="html-renderer",e}return oe(e,t),e.prototype.init=function(){this.addRenderingPlugin(new CL)},e.prototype.destroy=function(){this.removeAllRenderingPlugins()},e}(f_),CR={}.toString,CD=function(t){var e;return e=t,"[object String]"===CR.call(e)},CF=function(){function t(t){this.canvasConfig=t,this.imageCache={},this.gradientCache={},this.patternCache={}}return t.prototype.getImageSync=function(t,e){return this.imageCache[t]?e&&e(this.imageCache[t]):this.getOrCreateImage(t).then(function(t){e&&e(t)}),this.imageCache[t]},t.prototype.getOrCreateImage=function(t){var e=this;if(this.imageCache[t])return Promise.resolve(this.imageCache[t]);var n=this.canvasConfig.createImage;return new Promise(function(r,i){var o;n?o=n(t):hQ&&(o=new window.Image),o&&(o.onload=function(){e.imageCache[t]=o,r(o)},o.onerror=function(t){i(t)},o.crossOrigin="Anonymous",o.src=t)})},t.prototype.getOrCreatePatternSync=function(t,e,n,r,i){var o,a=this.generatePatternKey(t);if(a&&this.patternCache[a])return this.patternCache[a];var l=t.image,s=t.repetition,u=t.transform,c=!1;CD(l)?o=this.getImageSync(l,i):n?(o=n,c=!0):o=l;var f=o&&e.createPattern(o,s);if(f){var p=void 0;p=u?hz(hc(u),new yt({})):uw(uv()),c&&uj(p,p,[1/r,1/r,1]),f.setTransform({a:p[0],b:p[1],c:p[4],d:p[5],e:p[12],f:p[13]})}return a&&f&&(this.patternCache[a]=f),f},t.prototype.getOrCreateGradient=function(t,e){var n=this.generateGradientKey(t),r=t.type,i=t.steps,o=t.width,a=t.height,l=t.angle,s=t.cx,u=t.cy,c=t.size;if(this.gradientCache[n])return this.gradientCache[n];var f=null;if(r===t8.LinearGradient){var p,h,d,y,g,v,m=(p=o,h=a,d=fI(l.value),y=0+p/2,g=0+h/2,v=Math.abs(p*Math.cos(d))+Math.abs(h*Math.sin(d)),{x1:y-Math.cos(d)*v/2,y1:g-Math.sin(d)*v/2,x2:y+Math.cos(d)*v/2,y2:g+Math.sin(d)*v/2}),b=m.x1,x=m.y1,O=m.x2,w=m.y2;f=e.createLinearGradient(b,x,O,w)}else if(r===t8.RadialGradient){var E,k,M,S,_,P,j,A,T=(E=o,k=a,M=s,S=u,_=c,P=M.value,j=S.value,M.unit===t1.kPercentage&&(P=M.value/100*E),S.unit===t1.kPercentage&&(j=S.value/100*k),A=Math.max(cm([0,0],[P,j]),cm([0,k],[P,j]),cm([E,k],[P,j]),cm([E,0],[P,j])),_&&(_ instanceof ps?A=_.value:_ instanceof pt&&("closest-side"===_.value?A=Math.min(P,E-P,j,k-j):"farthest-side"===_.value?A=Math.max(P,E-P,j,k-j):"closest-corner"===_.value&&(A=Math.min(cm([0,0],[P,j]),cm([0,k],[P,j]),cm([E,k],[P,j]),cm([E,0],[P,j]))))),{x:P,y:j,r:A}),C=T.x,N=T.y,L=T.r;f=e.createRadialGradient(C,N,0,C,N,L)}return f&&(i.forEach(function(t){var e=t.offset,n=t.color;e.unit===t1.kPercentage&&(null==f||f.addColorStop(e.value/100,n.toString()))}),this.gradientCache[n]=f),this.gradientCache[n]},t.prototype.generateGradientKey=function(t){var e=t.type,n=t.width,r=t.height,i=t.steps,o=t.angle,a=t.cx,l=t.cy,s=t.size;return"gradient-".concat(e,"-").concat((null==o?void 0:o.toString())||0,"-").concat((null==a?void 0:a.toString())||0,"-").concat((null==l?void 0:l.toString())||0,"-").concat((null==s?void 0:s.toString())||0,"-").concat(n,"-").concat(r,"-").concat(i.map(function(t){var e=t.offset,n=t.color;return"".concat(e).concat(n)}).join("-"))},t.prototype.generatePatternKey=function(t){var e=t.image,n=t.repetition;return CD(e)?"pattern-".concat(e,"-").concat(n):"rect"===e.nodeName?"pattern-".concat(e.entity,"-").concat(n):void 0},t}(),Cz=function(){function t(){}return t.prototype.apply=function(e){var n=e.renderingService,r=e.renderingContext,i=e.imagePool,o=r.root.ownerDocument.defaultView,a=function(t,e,n){var r=t.parsedStyle,i=r.width,o=r.height;i&&!o?t.setAttribute("height",n/e*i):!i&&o&&t.setAttribute("width",e/n*o)},l=function(t){var e=t.target,r=e.nodeName,o=e.attributes;if(r===tX.IMAGE){var l=o.img,s=o.keepAspectRatio;CD(l)&&i.getImageSync(l,function(t){var r=t.width,i=t.height;s&&a(e,r,i),e.renderable.dirty=!0,n.dirtify()})}},s=function(t){var e=t.target,r=t.attrName,o=t.newValue;e.nodeName===tX.IMAGE&&"img"===r&&CD(o)&&i.getOrCreateImage(o).then(function(t){var r=t.width,i=t.height;e.attributes.keepAspectRatio&&a(e,r,i),e.renderable.dirty=!0,n.dirtify()})};n.hooks.init.tap(t.tag,function(){o.addEventListener(en.MOUNTED,l),o.addEventListener(en.ATTR_MODIFIED,s)}),n.hooks.destroy.tap(t.tag,function(){o.removeEventListener(en.MOUNTED,l),o.removeEventListener(en.ATTR_MODIFIED,s)})},t.tag="LoadImage",t}(),CB=function(t){function e(){var e=t.apply(this,ou([],ol(arguments),!1))||this;return e.name="image-loader",e}return oe(e,t),e.prototype.init=function(){this.context.imagePool=new CF(this.context.config),this.addRenderingPlugin(new Cz)},e.prototype.destroy=function(){this.removeAllRenderingPlugins()},e}(f_),CW={}.toString,C$=function(t){var e;return e=t,"[object String]"===CW.call(e)},CG=function(){function t(t){this.renderingContext=t.renderingContext,this.canvasConfig=t.config}return t.prototype.init=function(){var t=this.canvasConfig,e=t.container,n=t.canvas;if(n)this.$canvas=n,e&&n.parentElement!==e&&e.appendChild(n),this.$container=n.parentElement,this.canvasConfig.container=this.$container;else if(e&&(this.$container=C$(e)?document.getElementById(e):e,this.$container)){var r=document.createElement("canvas");this.$container.appendChild(r),!this.$container.style.position&&(this.$container.style.position="relative"),this.$canvas=r}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(t,e){var n,r,i,o=this.canvasConfig.devicePixelRatio||hQ&&window.devicePixelRatio||1;if(o=o>=1?Math.ceil(o):1,this.dpr=o,this.$canvas){;this.$canvas.width=this.dpr*t,this.$canvas.height=this.dpr*e,n=this.$canvas,r=t,i=e,hQ&&n.style&&(n.style.width=r+"px",n.style.height=i+"px")}this.renderingContext.renderReasons.add(ee.CAMERA_CHANGED)},t.prototype.applyCursorStyle=function(t){this.$container&&this.$container.style&&(this.$container.style.cursor=t)},t.prototype.toDataURL=function(t){return void 0===t&&(t={}),oi(this,void 0,void 0,function(){var e,n;return oo(this,function(r){return e=t.type,n=t.encoderOptions,[2,this.context.canvas.toDataURL(e,n)]})})},t}(),CV=function(t){function e(){var e=t.apply(this,ou([],ol(arguments),!1))||this;return e.name="canvas-context-register",e}return oe(e,t),e.prototype.init=function(){this.context.ContextService=CG},e.prototype.destroy=function(){delete this.context.ContextService},e}(f_),CH=function(t){function e(e){var n=t.call(this,e)||this;return n.registerPlugin(new CV),n.registerPlugin(new CB),n.registerPlugin(new T6),n.registerPlugin(new CP),n.registerPlugin(new CA),n.registerPlugin(new Cb),n.registerPlugin(new CI),n}return oe(e,t),e}(fP),CU=function(){function t(t){this.dragndropPluginOptions=t}return t.prototype.apply=function(e){var n=this,r=e.renderingService,i=e.renderingContext.root.ownerDocument,o=i.defaultView,a=function(t){var e=t.target,r=e===i,a=r&&n.dragndropPluginOptions.isDocumentDraggable?i:e.closest&&e.closest("[draggable=true]");if(a){var l=!1,s=t.timeStamp,u=[t.clientX,t.clientY],c=null,f=[t.clientX,t.clientY],p=function(t){return oi(n,void 0,void 0,function(){var n,o,p,h,d,y;return oo(this,function(g){switch(g.label){case 0:if(!l){var v,m;if(n=t.timeStamp-s,v=[t.clientX,t.clientY],m=u,o=Math.sqrt((v[0]-m[0])*(v[0]-m[0])+(v[1]-m[1])*(v[1]-m[1])),n<=this.dragndropPluginOptions.dragstartTimeThreshold||o<=this.dragndropPluginOptions.dragstartDistanceThreshold)return[2];t.type="dragstart",a.dispatchEvent(t),l=!0}if(t.type="drag",t.dx=t.clientX-f[0],t.dy=t.clientY-f[1],a.dispatchEvent(t),f=[t.clientX,t.clientY],r)return[3,2];return p="pointer"===this.dragndropPluginOptions.overlap?[t.canvasX,t.canvasY]:e.getBounds().center,[4,i.elementsFromPoint(p[0],p[1])];case 1:y=(null==(d=(h=g.sent())[h.indexOf(e)+1])?void 0:d.closest("[droppable=true]"))||(this.dragndropPluginOptions.isDocumentDroppable?i:null),c!==y&&(c&&(t.type="dragleave",t.target=c,c.dispatchEvent(t)),y&&(t.type="dragenter",t.target=y,y.dispatchEvent(t)),(c=y)&&(t.type="dragover",t.target=c,c.dispatchEvent(t))),g.label=2;case 2:return[2]}})})};o.addEventListener("pointermove",p);var h=function(t){if(l){t.detail={preventClick:!0};var e=t.clone();c&&(e.type="drop",e.target=c,c.dispatchEvent(e)),e.type="dragend",a.dispatchEvent(e),l=!1}o.removeEventListener("pointermove",p)};e.addEventListener("pointerup",h,{once:!0}),e.addEventListener("pointerupoutside",h,{once:!0})}};r.hooks.init.tap(t.tag,function(){o.addEventListener("pointerdown",a)}),r.hooks.destroy.tap(t.tag,function(){o.removeEventListener("pointerdown",a)})},t.tag="Dragndrop",t}(),Cq=function(t){function e(e){void 0===e&&(e={});var n=t.call(this)||this;return n.options=e,n.name="dragndrop",n}return oe(e,t),e.prototype.init=function(){this.addRenderingPlugin(new CU(on({overlap:"pointer",isDocumentDraggable:!1,isDocumentDroppable:!1,dragstartDistanceThreshold:0,dragstartTimeThreshold:0},this.options)))},e.prototype.destroy=function(){this.removeAllRenderingPlugins()},e.prototype.setOptions=function(t){Object.assign(this.plugins[0].dragndropPluginOptions,t)},e}(f_),CY=function(t,e,n){var r;return function(){var i=this,o=arguments,a=n&&!r;clearTimeout(r),r=setTimeout(function(){r=null,!n&&t.apply(i,o)},e),a&&t.apply(i,o)}},CX=function(){function t(){this._events={}}return t.prototype.on=function(t,e,n){return!this._events[t]&&(this._events[t]=[]),this._events[t].push({callback:e,once:!!n}),this},t.prototype.once=function(t,e){return this.on(t,e,!0)},t.prototype.emit=function(t){for(var e=this,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var i=this._events[t]||[],o=this._events["*"]||[],a=function(r){for(var i=r.length,o=0;o<i;o++){if(!!r[o]){var a=r[o],l=a.callback;a.once&&(r.splice(o,1),0===r.length&&delete e._events[t],i--,o--),l.apply(e,n)}}};a(i),a(o)},t.prototype.off=function(t,e){if(t){if(e){for(var n=this._events[t]||[],r=n.length,i=0;i<r;i++)n[i].callback===e&&(n.splice(i,1),r--,i--);0===n.length&&delete this._events[t]}else delete this._events[t]}else this._events={};return this},t.prototype.getEvents=function(){return this._events},t}(),CK=function(t,e){if(t===e)return!0;if(!t||!e||ij(t)||ij(e))return!1;if(i_(t)||i_(e)){if(t.length!==e.length)return!1;for(var n=!0,r=0;r<t.length&&(n=CK(t[r],e[r]));r++);return n}if(e9(t)||e9(e)){var i=Object.keys(t),o=Object.keys(e);if(i.length!==o.length)return!1;for(var n=!0,r=0;r<i.length&&(n=CK(t[i[r]],e[i[r]]));r++);return n}return!1};let CZ=[["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 CQ=n("806"),CJ=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let C0=t=>{let{important:e={}}=t,n=CJ(t,["important"]);return r=>{let{theme:i,coordinate:o,scales:a}=r;return ku(Object.assign(Object.assign(Object.assign({},n),function(t){let e=t%(2*Math.PI);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<3*Math.PI/2?{titleTransform:"translate(-50%, 0)"}:{}}(t.orientation)),{important:Object.assign(Object.assign({},function(t,e,n,r){let{radar:i}=t,[o]=r,a=o.getOptions().name,[l,s]=s7(n),{axisRadar:u={}}=e;return Object.assign(Object.assign({},u),{grid:"position"===a,gridConnect:"line",gridControlAngles:Array(i.count).fill(0).map((t,e)=>(s-l)/i.count*e)})}(t,i,o,a)),e)}))(r)}};C0.props=Object.assign(Object.assign({},ku.props),{defaultPosition:"center"});let C1=t=>(...e)=>ME(Object.assign({},{block:!0},t))(...e);C1.props=Object.assign(Object.assign({},ME.props),{defaultPosition:"top",defaultOrientation:"horizontal"});let C2=t=>e=>{let{scales:n}=e;return ME(Object.assign({},{type:"size",data:ke(n,"size").getTicks().map((t,e)=>({value:t,label:String(t)}))},t))(e)};C2.props=Object.assign(Object.assign({},ME.props),{defaultPosition:"top",defaultOrientation:"horizontal"});let C5=t=>C2(Object.assign({},{block:!0},t));C5.props=Object.assign(Object.assign({},ME.props),{defaultPosition:"top",defaultOrientation:"horizontal"});var C3=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let C4=({static:t=!1}={})=>e=>{let{width:n,height:r,depth:i,paddingLeft:o,paddingRight:a,paddingTop:l,paddingBottom:s,padding:u,inset:c,insetLeft:f,insetTop:p,insetRight:h,insetBottom:d,margin:y,marginLeft:g,marginBottom:v,marginTop:m,marginRight:b,data:x,coordinate:O,theme:w,component:E,interaction:k,x:M,y:S,z:_,key:P,frame:j,labelTransform:A,parentKey:T,clip:C,viewStyle:N,title:L}=e,I=C3(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:S,z:_,key:P,width:n,height:r,depth:i,padding:u,paddingLeft:o,paddingRight:a,paddingTop:l,inset:c,insetLeft:f,insetTop:p,insetRight:h,insetBottom:d,paddingBottom:s,theme:w,coordinate:O,component:E,interaction:k,frame:j,labelTransform:A,margin:y,marginLeft:g,marginBottom:v,marginTop:m,marginRight:b,parentKey:T,clip:C,style:N},!t&&{title:L}),{marks:[Object.assign(Object.assign(Object.assign({},I),{key:`${P}-0`,data:x}),t&&{title:L})]})]};C4.props={};var C6=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let C8=()=>t=>{let{children:e}=t,n=C6(t,["children"]);if(!Array.isArray(e))return[];let{data:r,scale:i={},axis:o={},legend:a={},encode:l={},transform:s=[]}=n,u=C6(n,["data","scale","axis","legend","encode","transform"]),c=e.map(t=>{var{data:e,scale:n={},axis:u={},legend:c={},encode:f={},transform:p=[]}=t,h=C6(t,["data","scale","axis","legend","encode","transform"]);return Object.assign({data:PB(e,r),scale:nt({},i,n),encode:nt({},l,f),transform:[...s,...p],axis:!!u&&!!o&&nt({},o,u),legend:!!c&&!!a&&nt({},a,c)},h)});return[Object.assign(Object.assign({},u),{marks:c,type:"standardView"})]};function C9(t,e,n,r){let i=e.length/2,o=e.slice(0,i),a=e.slice(i),l=ju(o,(t,e)=>Math.abs(t[1]-a[e][1])),s=t=>[o[t][0],(o[t][1]+a[t][1])/2],u=s(l=Math.max(Math.min(l,i-2),1)),c=s(l-1),f=gC(gj(s(l+1),c))/Math.PI*180;return{x:u[0],y:u[1],transform:`rotate(${f})`,textAlign:"center",textBaseline:"middle"}}function C7(t,e,n,r){let{bounds:i}=n,[[o,a],[l,s]]=i,u=l-o,c=s-a,f=t=>{let{x:e,y:r}=t,i=nh(n.x,u),l=nh(n.y,c);return Object.assign(Object.assign({},t),{x:(i||e)+o,y:(l||r)+a})};return"left"===t?f({x:0,y:c/2,textAnchor:"start",textBaseline:"middle"}):"right"===t?f({x:u,y:c/2,textAnchor:"end",textBaseline:"middle"}):"top"===t?f({x:u/2,y:0,textAnchor:"center",textBaseline:"top"}):"bottom"===t?f({x:u/2,y:c,textAnchor:"center",textBaseline:"bottom"}):"top-left"===t?f({x:0,y:0,textAnchor:"start",textBaseline:"top"}):"top-right"===t?f({x:u,y:0,textAnchor:"end",textBaseline:"top"}):"bottom-left"===t?f({x:0,y:c,textAnchor:"start",textBaseline:"bottom"}):"bottom-right"===t?f({x:u,y:c,textAnchor:"end",textBaseline:"bottom"}):f({x:u/2,y:c/2,textAnchor:"center",textBaseline:"middle"})}function Nt(t,e,n,r){let{y:i,y1:o,autoRotate:a,rotateToAlignArc:l}=n,s=r.getCenter(),{innerRadius:u,outerRadius:c,startAngle:f,endAngle:p}=gX(r,e,[i,o]),h="inside"===t?(f+p)/2:p,d=Nn(h,a,l);return Object.assign(Object.assign({},(()=>{let[n,r]=e,[i,o]="inside"===t?Ne(s,h,u+(c-u)*.5):gR(n,r);return{x:i,y:o}})()),{textAlign:"inside"===t?"center":"start",textBaseline:"middle",rotate:d})}function Ne(t,e,n){return[t[0]+Math.sin(e)*n,t[1]-Math.cos(e)*n]}function Nn(t,e,n){if(!e)return 0;let r=n?0:0>Math.sin(t)?90:-90;return t/Math.PI*180+r}function Nr(t,e,n,r){let{y:i,y1:o,autoRotate:a,rotateToAlignArc:l,radius:s=.5,offset:u=0}=n,c=gX(r,e,[i,o]),{startAngle:f,endAngle:p}=c,h=r.getCenter(),d=(f+p)/2,y=Nn(d,a,l),{innerRadius:g,outerRadius:v}=c,[m,b]=Ne(h,d,g+(v-g)*s+u);return Object.assign({x:m,y:b},{textAlign:"center",textBaseline:"middle",rotate:y})}function Ni(t){return void 0===t?null:t}function No(t,e,n,r){let{bounds:i}=n,[o]=i;return{x:Ni(o[0]),y:Ni(o[1])}}function Na(t,e,n,r){let{bounds:i}=n;return 1===i.length?No(t,e,n,r):(s5(r)?Nt:s8(r)?Nr:C7)(t,e,n,r)}C8.props={};function Nl(t,e,n){let{innerRadius:r,outerRadius:i}=gX(n,t,[e.y,e.y1]);return r+(i-r)}function Ns(t,e,n){let{startAngle:r,endAngle:i}=gX(n,t,[e.y,e.y1]);return(r+i)/2}function Nu(t,e,n,r){let{autoRotate:i,rotateToAlignArc:o,offset:a=0,connector:l=!0,connectorLength:s=a,connectorLength2:u=0,connectorDistance:c=0}=n,f=r.getCenter(),p=Ns(e,n,r),h=Math.sin(p)>0?1:-1,d=Nn(p,i,o),y={textAlign:h>0||s5(r)?"start":"end",textBaseline:"middle",rotate:d},g=Nl(e,n,r),[[v,m],[b,x],[O,w]]=function(t,e,n,r,i){let[o,a]=Ne(t,e,n),[l,s]=Ne(t,e,r);return[[o,a],[l,s],[l+(Math.sin(e)>0?1:-1)*i,s]]}(f,p,g,g+(l?s:a),l?u:0),E=l?+c*h:0,k=O+E;return Object.assign(Object.assign({x0:v,y0:m,x:O+E,y:w},y),{connector:l,connectorPoints:[[b-k,x-w],[O-k,w-w]]})}function Nc(t,e,n,r){let{bounds:i}=n;return 1===i.length?No(t,e,n,r):(s5(r)?Nt:s8(r)?Nu:C7)(t,e,n,r)}var Nf=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function Np(t,e,n,r){if(!s8(r))return{};let{connectorLength:i,connectorLength2:o,connectorDistance:a}=n,l=Nf(Nu("outside",e,n,r),[]),s=r.getCenter(),u=Nl(e,n,r),c=Ns(e,n,r),f=Math.sin(c)>0?1:-1,p=s[0]+(u+i+o+ +a)*f,{x:h}=l,d=p-h;return l.x+=d,l.connectorPoints[0][0]-=d,l}var Nh=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function Nd(t,e,n,r){if(!s8(r))return{};let{connectorLength:i,connectorLength2:o,connectorDistance:a}=n,l=Nh(Nu("outside",e,n,r),[]),{x0:s,y0:u}=l,c=r.getCenter(),f=function(t){if(s8(t)){let[e,n]=t.getSize(),r=t.getOptions().transformations.find(t=>"polar"===t[0]);if(r)return Math.max(e,n)/2*r[4]}return 0}(r),p=gN([s-c[0],u-c[1]]),h=Math.sin(p)>0?1:-1,[d,y]=Ne(c,p,f+i);return l.x=d+(o+a)*h,l.y=y,l}var Ny=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let Ng=(t,e)=>{let{coordinate:n,theme:r}=e,{render:i}=t;return(e,o)=>{let{text:a,x:l,y:s,transform:u="",transformOrigin:c,className:f=""}=o,p=Ny(o,["text","x","y","transform","transformOrigin","className"]),h=function(t,e,n,r,i){var o,a;let{position:l}=e,{render:s}=i;let u=(o=l,a=n,void 0!==o?o:s8(a)?"inside":s1(a)?"right":"top"),c=r[s?"htmlLabel":"inside"===u?"innerLabel":"label"],f=Object.assign({},c,e),p=ex[PO(u)];if(!p)throw Error(`Unknown position: ${u}`);return Object.assign(Object.assign({},c),p(u,t,f,n,i))}(e,o,n,r,t),{rotate:d=0,transform:y=""}=h,g=Ny(h,["rotate","transform"]);return g_(new bs).call(gH,g).style("text",`${a}`).style("className",`${f} g2-label`).style("innerHTML",i?i(a,o.datum,o.index):void 0).style("labelTransform",`${y} rotate(${+d}) ${u}`.trim()).style("labelTransformOrigin",c).style("coordCenter",n.getCenter()).call(gH,p).node()}};Ng.props={defaultMarker:"point"};var Nv=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function Nm(t,e){let n=Object.assign(Object.assign({},{"component.axisRadar":C0,"component.axisLinear":ku,"component.axisArc":kc,"component.legendContinuousBlock":C1,"component.legendContinuousBlockSize":C5,"component.legendContinuousSize":C2,"interaction.event":_P,"composition.mark":C4,"composition.view":C8,"shape.label.label":Ng}),e),r=e=>{if("string"!=typeof e)return e;let r=`${t}.${e}`;return n[r]||nl(`Unknown Component: ${r}`)};return[(t,e)=>{let{type:n}=t,i=Nv(t,["type"]);!n&&nl("Plot type is required!");let o=r(n);return null==o?void 0:o(i,e)},r]}function Nb(t){let{canvas:e,group:n}=t;return(null==e?void 0:e.document)||(null==n?void 0:n.ownerDocument)||nl("Cannot find library document")}var Nx=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function NO(t,e){let{coordinate:n={}}=t,r=Nx(t,["coordinate"]),{type:i,transform:o=[]}=n,a=Nx(n,["type","transform"]);if(!i)return Object.assign(Object.assign({},r),{coordinates:o});let[,l]=Nm("coordinate",e),{transform:s=!1}=l(i).props||{};if(s)throw Error(`Unknown coordinate: ${i}.`);return Object.assign(Object.assign({},r),{coordinates:[Object.assign({type:i},a),...o]})}function Nw(t,e){return t.filter(t=>t.type===e)}function NE(t){return Nw(t,"polar").length>0}function Nk(t){return Nw(t,"transpose").length%2==1}function NM(t){return Nw(t,"theta").length>0}function NS(t){return Nw(t,"radial").length>0}function N_(t){for(var e=t.length/6|0,n=Array(e),r=0;r<e;)n[r]="#"+t.slice(6*r,6*++r);return n}var NP=N_("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),Nj=N_("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),NA=N_("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),NT=N_("4269d0efb118ff725c6cc5b03ca951ff8ab7a463f297bbf59c6b4e9498a0"),NC=N_("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),NN=N_("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),NL=N_("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),NI=N_("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),NR=N_("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),ND=N_("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),NF=N_("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function Nz(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function NB(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function NW(){}var N$=1.4285714285714286,NG="\\s*([+-]?\\d+)\\s*",NV="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",NH="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",NU=/^#([0-9a-f]{3,8})$/,Nq=RegExp(`^rgb\\(${NG},${NG},${NG}\\)$`),NY=RegExp(`^rgb\\(${NH},${NH},${NH}\\)$`),NX=RegExp(`^rgba\\(${NG},${NG},${NG},${NV}\\)$`),NK=RegExp(`^rgba\\(${NH},${NH},${NH},${NV}\\)$`),NZ=RegExp(`^hsl\\(${NV},${NH},${NH}\\)$`),NQ=RegExp(`^hsla\\(${NV},${NH},${NH},${NV}\\)$`),NJ={aliceblue:0xf0f8ff,antiquewhite:0xfaebd7,aqua:65535,aquamarine:8388564,azure:0xf0ffff,beige:0xf5f5dc,bisque:0xffe4c4,black:0,blanchedalmond:0xffebcd,blue:255,blueviolet:9055202,brown:0xa52a2a,burlywood:0xdeb887,cadetblue:6266528,chartreuse:8388352,chocolate:0xd2691e,coral:0xff7f50,cornflowerblue:6591981,cornsilk:0xfff8dc,crimson:0xdc143c,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:0xb8860b,darkgray:0xa9a9a9,darkgreen:25600,darkgrey:0xa9a9a9,darkkhaki:0xbdb76b,darkmagenta:9109643,darkolivegreen:5597999,darkorange:0xff8c00,darkorchid:0x9932cc,darkred:9109504,darksalmon:0xe9967a,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:0xff1493,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:0xb22222,floralwhite:0xfffaf0,forestgreen:2263842,fuchsia:0xff00ff,gainsboro:0xdcdcdc,ghostwhite:0xf8f8ff,gold:0xffd700,goldenrod:0xdaa520,gray:8421504,green:32768,greenyellow:0xadff2f,grey:8421504,honeydew:0xf0fff0,hotpink:0xff69b4,indianred:0xcd5c5c,indigo:4915330,ivory:0xfffff0,khaki:0xf0e68c,lavender:0xe6e6fa,lavenderblush:0xfff0f5,lawngreen:8190976,lemonchiffon:0xfffacd,lightblue:0xadd8e6,lightcoral:0xf08080,lightcyan:0xe0ffff,lightgoldenrodyellow:0xfafad2,lightgray:0xd3d3d3,lightgreen:9498256,lightgrey:0xd3d3d3,lightpink:0xffb6c1,lightsalmon:0xffa07a,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:0xb0c4de,lightyellow:0xffffe0,lime:65280,limegreen:3329330,linen:0xfaf0e6,magenta:0xff00ff,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:0xba55d3,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:0xc71585,midnightblue:1644912,mintcream:0xf5fffa,mistyrose:0xffe4e1,moccasin:0xffe4b5,navajowhite:0xffdead,navy:128,oldlace:0xfdf5e6,olive:8421376,olivedrab:7048739,orange:0xffa500,orangered:0xff4500,orchid:0xda70d6,palegoldenrod:0xeee8aa,palegreen:0x98fb98,paleturquoise:0xafeeee,palevioletred:0xdb7093,papayawhip:0xffefd5,peachpuff:0xffdab9,peru:0xcd853f,pink:0xffc0cb,plum:0xdda0dd,powderblue:0xb0e0e6,purple:8388736,rebeccapurple:6697881,red:0xff0000,rosybrown:0xbc8f8f,royalblue:4286945,saddlebrown:9127187,salmon:0xfa8072,sandybrown:0xf4a460,seagreen:3050327,seashell:0xfff5ee,sienna:0xa0522d,silver:0xc0c0c0,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:0xfffafa,springgreen:65407,steelblue:4620980,tan:0xd2b48c,teal:32896,thistle:0xd8bfd8,tomato:0xff6347,turquoise:4251856,violet:0xee82ee,wheat:0xf5deb3,white:0xffffff,whitesmoke:0xf5f5f5,yellow:0xffff00,yellowgreen:0x9acd32};function N0(){return this.rgb().formatHex()}Nz(NW,N2,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:N0,formatHex:N0,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return Li(this).formatHsl()},formatRgb:N1,toString:N1});function N1(){return this.rgb().formatRgb()}function N2(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=NU.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?N5(e):3===n?new N8(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?N3(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?N3(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=Nq.exec(t))?new N8(e[1],e[2],e[3],1):(e=NY.exec(t))?new N8(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=NX.exec(t))?N3(e[1],e[2],e[3],e[4]):(e=NK.exec(t))?N3(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=NZ.exec(t))?Lr(e[1],e[2]/100,e[3]/100,1):(e=NQ.exec(t))?Lr(e[1],e[2]/100,e[3]/100,e[4]):NJ.hasOwnProperty(t)?N5(NJ[t]):"transparent"===t?new N8(NaN,NaN,NaN,0):null}function N5(t){return new N8(t>>16&255,t>>8&255,255&t,1)}function N3(t,e,n,r){return r<=0&&(t=e=n=NaN),new N8(t,e,n,r)}function N4(t){return(!(t instanceof NW)&&(t=N2(t)),t)?new N8((t=t.rgb()).r,t.g,t.b,t.opacity):new N8}function N6(t,e,n,r){return 1==arguments.length?N4(t):new N8(t,e,n,null==r?1:r)}function N8(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function N9(){return`#${Ln(this.r)}${Ln(this.g)}${Ln(this.b)}`}Nz(N8,N6,NB(NW,{brighter(t){return t=null==t?N$:Math.pow(N$,t),new N8(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new N8(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new N8(Le(this.r),Le(this.g),Le(this.b),Lt(this.opacity))},displayable(){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:N9,formatHex:N9,formatHex8:function(){return`#${Ln(this.r)}${Ln(this.g)}${Ln(this.b)}${Ln((isNaN(this.opacity)?1:this.opacity)*255)}`},formatRgb:N7,toString:N7}));function N7(){let t=Lt(this.opacity);return`${1===t?"rgb(":"rgba("}${Le(this.r)}, ${Le(this.g)}, ${Le(this.b)}${1===t?")":`, ${t})`}`}function Lt(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Le(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Ln(t){return((t=Le(t))<16?"0":"")+t.toString(16)}function Lr(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Lo(t,e,n,r)}function Li(t){if(t instanceof Lo)return new Lo(t.h,t.s,t.l,t.opacity);if(!(t instanceof NW)&&(t=N2(t)),!t)return new Lo;if(t instanceof Lo)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,l=o-i,s=(o+i)/2;return l?(a=e===o?(n-r)/l+(n<r)*6:n===o?(r-e)/l+2:(e-n)/l+4,l/=s<.5?o+i:2-o-i,a*=60):l=s>0&&s<1?0:a,new Lo(a,l,s,t.opacity)}function Lo(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function La(t){return(t=(t||0)%360)<0?t+360:t}function Ll(t){return Math.max(0,Math.min(1,t||0))}function Ls(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 Lu(t,e,n,r,i){var o=t*t,a=o*t;return((1-3*t+3*o-a)*e+(4-6*o+3*a)*n+(1+3*t+3*o-3*a)*r+a*i)/6}Nz(Lo,function(t,e,n,r){return 1==arguments.length?Li(t):new Lo(t,e,n,null==r?1:r)},NB(NW,{brighter(t){return t=null==t?N$:Math.pow(N$,t),new Lo(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new Lo(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new N8(Ls(t>=240?t-240:t+120,i,r),Ls(t,i,r),Ls(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new Lo(La(this.h),Ll(this.s),Ll(this.l),Lt(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let t=Lt(this.opacity);return`${1===t?"hsl(":"hsla("}${La(this.h)}, ${100*Ll(this.s)}%, ${100*Ll(this.l)}%${1===t?")":`, ${t})`}`}}));var Lc=t=>()=>t;function Lf(t,e){return function(n){return t+n*e}}function Lp(t,e){var n=e-t;return n?Lf(t,n):Lc(isNaN(t)?e:t)}function Lh(t){return function(e){var n,r,i=e.length,o=Array(i),a=Array(i),l=Array(i);for(n=0;n<i;++n)r=N6(e[n]),o[n]=r.r||0,a[n]=r.g||0,l[n]=r.b||0;return o=t(o),a=t(a),l=t(l),r.opacity=1,function(t){return r.r=o(t),r.g=a(t),r.b=l(t),r+""}}}!function t(e){var n,r=1==(n=+(n=e))?Lp:function(t,e){var r,i,o;return e-t?(r=t,i=e,r=Math.pow(r,o=n),i=Math.pow(i,o)-r,o=1/o,function(t){return Math.pow(r+t*i,o)}):Lc(isNaN(t)?e:t)};function i(t,e){var n=r((t=N6(t)).r,(e=N6(e)).r),i=r(t.g,e.g),o=r(t.b,e.b),a=Lp(t.opacity,e.opacity);return function(e){return t.r=n(e),t.g=i(e),t.b=o(e),t.opacity=a(e),t+""}}return i.gamma=t,i}(1);var Ld=Lh(function(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],o=t[r+1],a=r>0?t[r-1]:2*i-o,l=r<e-1?t[r+2]:2*o-i;return Lu((n-r/e)*e,a,i,o,l)}});Lh(function(t){var e=t.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*e),i=t[(r+e-1)%e],o=t[r%e],a=t[(r+1)%e],l=t[(r+2)%e];return Lu((n-r/e)*e,i,o,a,l)}});var Ly=t=>Ld(t[t.length-1]),Lg=[,,,].concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(N_),Lv=Ly(Lg),Lm=[,,,].concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(N_),Lb=Ly(Lm),Lx=[,,,].concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(N_),LO=Ly(Lx),Lw=[,,,].concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(N_),LE=Ly(Lw),Lk=[,,,].concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(N_),LM=Ly(Lk),LS=[,,,].concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(N_),L_=Ly(LS),LP=[,,,].concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(N_),Lj=Ly(LP),LA=[,,,].concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(N_),LT=Ly(LA),LC=[,,,].concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(N_),LN=Ly(LC),LL=[,,,].concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(N_),LI=Ly(LL),LR=[,,,].concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(N_),LD=Ly(LR),LF=[,,,].concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(N_),Lz=Ly(LF),LB=[,,,].concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(N_),LW=Ly(LB),L$=[,,,].concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(N_),LG=Ly(L$),LV=[,,,].concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(N_),LH=Ly(LV),LU=[,,,].concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(N_),Lq=Ly(LU),LY=[,,,].concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(N_),LX=Ly(LY),LK=[,,,].concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(N_),LZ=Ly(LK),LQ=[,,,].concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(N_),LJ=Ly(LQ),L0=[,,,].concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(N_),L1=Ly(L0),L2=[,,,].concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(N_),L5=Ly(L2),L3=[,,,].concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(N_),L4=Ly(L3),L6=[,,,].concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(N_),L8=Ly(L6),L9=[,,,].concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(N_),L7=Ly(L9),It=[,,,].concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(N_),Ie=Ly(It),In=[,,,].concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(N_),Ir=Ly(In),Ii=[,,,].concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(N_),Io=Ly(Ii);function Ia(t){return"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-(t=Math.max(0,Math.min(1,t)))*(35.34-t*(2381.73-t*(6402.7-t*(7024.72-2710.57*t)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+t*(170.73+t*(52.82-t*(131.46-t*(176.58-67.37*t)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+t*(442.36-t*(2482.43-t*(6167.24-t*(6614.94-2475.67*t)))))))+")"}let Il=Math.PI/180,Is=180/Math.PI;var Iu=-1.7884503806,Ic=3.5172982438,If=-1.78277*.29227-.1347134789;function Ip(t,e,n,r){return 1==arguments.length?function(t){if(t instanceof Ih)return new Ih(t.h,t.s,t.l,t.opacity);!(t instanceof N8)&&(t=N4(t));var e=t.r/255,n=t.g/255,r=t.b/255,i=(If*r+Iu*e-Ic*n)/(If+Iu-Ic),o=r-i,a=-((1.97294*(n-i)- -.29227*o)/.90649),l=Math.sqrt(a*a+o*o)/(1.97294*i*(1-i)),s=l?Math.atan2(a,o)*Is-120:NaN;return new Ih(s<0?s+360:s,l,i,t.opacity)}(t):new Ih(t,e,n,null==r?1:r)}function Ih(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Id(t){return function e(n){function r(e,r){var i=t((e=Ip(e)).h,(r=Ip(r)).h),o=Lp(e.s,r.s),a=Lp(e.l,r.l),l=Lp(e.opacity,r.opacity);return function(t){return e.h=i(t),e.s=o(t),e.l=a(Math.pow(t,n)),e.opacity=l(t),e+""}}return n=+n,r.gamma=e,r}(1)}Nz(Ih,Ip,NB(NW,{brighter(t){return t=null==t?N$:Math.pow(N$,t),new Ih(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new Ih(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=isNaN(this.h)?0:(this.h+120)*Il,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),i=Math.sin(t);return new N8(255*(e+n*(-.14861*r+1.78277*i)),255*(e+n*(-.29227*r+-.90649*i)),255*(e+1.97294*r*n),this.opacity)}})),Id(function(t,e){var n=e-t;return n?Lf(t,n>180||n<-180?n-360*Math.round(n/360):n):Lc(isNaN(t)?e:t)});var Iy=Id(Lp),Ig=Iy(Ip(300,.5,0),Ip(-240,.5,1)),Iv=Iy(Ip(-100,.75,.35),Ip(80,1.5,.8)),Im=Iy(Ip(260,.75,.35),Ip(80,1.5,.8)),Ib=Ip();function Ix(t){(t<0||t>1)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return Ib.h=360*t-100,Ib.s=1.5-1.5*e,Ib.l=.8-.9*e,Ib+""}var IO=N6(),Iw=Math.PI/3,IE=2*Math.PI/3;function Ik(t){var e;return t=(.5-t)*Math.PI,IO.r=255*(e=Math.sin(t))*e,IO.g=255*(e=Math.sin(t+Iw))*e,IO.b=255*(e=Math.sin(t+IE))*e,IO+""}function IM(t){return"rgb("+Math.max(0,Math.min(255,Math.round(34.61+(t=Math.max(0,Math.min(1,t)))*(1172.33-t*(10793.56-t*(33300.12-t*(38394.49-14825.05*t)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+t*(557.33+t*(1225.33-t*(3574.96-t*(1073.77+707.56*t)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+t*(3211.1-t*(15327.97-t*(27814-t*(22569.18-6838.66*t)))))))+")"}function IS(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}var I_=IS(N_("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),IP=IS(N_("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),Ij=IS(N_("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),IA=IS(N_("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));function IT(t,e){let n=Object.keys(t);for(let r of Object.values(e)){let{name:e}=r.getOptions();if(e in t){let i=rY(n.filter(t=>t.startsWith(e)).map(t=>+(t.replace(e,"")||0)))+1,o=`${e}${i}`;t[o]=r,r.getOptions().key=o}else t[e]=r}return t}function IC(t,e){var n;let r,i,[o]=Nm("scale",e),{relations:a}=t;let[l]=(n=a)&&Array.isArray(n)?[t=>{var e;r=t.map.bind(t),i=null===(e=t.invert)||void 0===e?void 0:e.bind(t);let o=n.filter(([t])=>"function"==typeof t),a=n.filter(([t])=>"function"!=typeof t),l=new Map(a);if(t.map=t=>{for(let[e,n]of o)if(e(t))return n;return l.has(t)?l.get(t):r(t)},!i)return t;let s=new Map(a.map(([t,e])=>[e,t])),u=new Map(o.map(([t,e])=>[e,t]));return t.invert=t=>u.has(t)?t:s.has(t)?s.get(t):i(t),t},t=>(null!==r&&(t.map=r),null!==i&&(t.invert=i),t)]:[ni,ni];return l(o(t))}function IN(t,e){let n=t.filter(({name:t,facet:n=!0})=>n&&t===e),r=n.flatMap(t=>t.domain),i=n.every(IL)?gB(r):n.every(II)?Array.from(new Set(r)):null;if(null!==i)for(let t of n)t.domain=i}function IL(t){let{type:e}=t;return"string"==typeof e&&["linear","log","pow","time"].includes(e)}function II(t){let{type:e}=t;return"string"==typeof e&&["band","point","ordinal"].includes(e)}function IR(t,e,n,r,i){let[o]=Nm("palette",i),{category10:a,category20:l}=r,s=Array.from(new Set(t.flat())).length<=a.length?a:l,{palette:u=s,offset:c}=e;if(Array.isArray(u))return u;try{return o({type:u})}catch(e){let t=function(t,e,n=t=>t){if(!t)return null;let r=oR(t),i=eO[`scheme${r}`],o=eO[`interpolate${r}`];if(!i&&!o)return null;if(i){if(!i.some(Array.isArray))return i;let t=i[e.length];if(t)return t}return e.map((t,r)=>o(n(r/e.length)))}(u,n,c);if(t)return t;throw Error(`Unknown Component: ${u} `)}}function ID(t,e){return e?e:function(t){return t.startsWith("x")||t.startsWith("y")||t.startsWith("position")||t.startsWith("size")}(t)?"point":"ordinal"}function IF(t,e,n){return n?n:"color"!==t?"linear":e?"linear":"sequential"}function Iz(t,e){if(0===t.length)return t;let{domainMin:n,domainMax:r}=e,[i,o]=t;return[null!=n?n:i,null!=r?r:o]}function IB(t){return Array.from(new Set(t.flat()))}function IW(t){return IG(t,t=>{let e=typeof t;return"string"===e||"boolean"===e})}function I$(t){return IG(t,t=>t instanceof Date)}function IG(t,e){for(let n of t)if(n.some(e))return!0;return!1}let IV={linear:"linear",identity:"identity",log:"log",pow:"pow",sqrt:"sqrt",sequential:"sequential"},IH={threshold:"threshold",quantize:"quantize",quantile:"quantile"},IU={ordinal:"ordinal",band:"band",point:"point"},Iq={constant:"constant"};var IY=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function IX(t,e,n,r,i){let[o]=Nm("component",r),{scaleInstances:a,scale:l,bbox:s}=t,u=IY(t,["scaleInstances","scale","bbox"]);return o(u)({coordinate:e,library:r,markState:i,scales:a,theme:n,value:{bbox:s,library:r},scale:l})}function IK(t,e){let n=["left","right","bottom","top"];return ic(t,({type:t,position:e,group:r})=>{if(!n.includes(e))return Symbol("independent");if(void 0===r)return t.startsWith("legend")?`legend-${e}`:Symbol("independent");return"independent"===r?Symbol("independent"):r}).flatMap(([,t])=>{if(1===t.length)return t[0];if(void 0!==e){let n=t.filter(t=>void 0!==t.length).map(t=>t.length),r=rq(n);if(r>e)return t.forEach(t=>t.group=Symbol("independent")),t;let i=(e-r)/(t.length-n.length);t.forEach(t=>{void 0===t.length&&(t.length=i)})}let n=rY(t,t=>t.size),r=rY(t,t=>t.order),i=rY(t,t=>t.crossPadding);return{type:"group",size:n,order:r,position:t[0].position,children:t,crossPadding:i}})}function IZ(t){let e=Nw(t,"polar");if(e.length){let{startAngle:t,endAngle:n}=sh(e[e.length-1]);return[t,n]}let n=Nw(t,"radial");if(n.length){let{startAngle:t,endAngle:e}=sx(n[n.length-1]);return[t,e]}return[-Math.PI/2,Math.PI/2*3]}function IQ(t,e,n,r,i,o){let{type:a}=t;if(!!["left","right","bottom","top"].includes(r)&&"string"==typeof a)return(a.startsWith("axis")?I5:a.startsWith("group")?IJ:a.startsWith("legendContinuous")?I3:"legendCategory"===a?I4:a.startsWith("slider")?I2:"title"===a?I1:a.startsWith("scrollbar")?I0:()=>{})(t,e,n,r,i,o)}function IJ(t,e,n,r,i,o){let{children:a}=t,l=rY(a,t=>t.crossPadding);a.forEach(t=>t.crossPadding=l),a.forEach(t=>IQ(t,e,n,r,i,o));let s=rY(a,t=>t.size);t.size=s,a.forEach(t=>t.size=s)}function I0(t,e,n,r,i,o){let{trackSize:a=6}=nt({},i.scrollbar,t);t.size=a}function I1(t,e,n,r,i,o){let a=nt({},i.title,t),{title:l,subtitle:s,spacing:u=0}=a,c=IY(a,["title","subtitle","spacing"]);if(l){let e=Re(l,nc(c,"title"));t.size=e.height}if(s){let e=Re(s,nc(c,"subtitle"));t.size+=u+e.height}}function I2(t,e,n,r,i,o){let{trackSize:a,handleIconSize:l}=(()=>{let{slider:e}=i;return nt({},e,t)})(),s=Math.max(a,2.4*l);t.size=s}function I5(t,e,n,r,i,o){t.transform=t.transform||[{type:"hide"}];let a="left"===r||"right"===r,l=I7(t,r,i),{tickLength:s=0,labelSpacing:u=0,titleSpacing:c=0,labelAutoRotate:f}=l,p=IY(l,["tickLength","labelSpacing","titleSpacing","labelAutoRotate"]),h=I6(t,o),d=I8(p,h),y=s+u;if(d&&d.length){let r=rY(d,t=>t.width),i=rY(d,t=>t.height);if(a)t.size=r+y;else{let{tickFilter:o,labelTransform:a}=t;(function(t,e,n,r,i){if(rq(e,t=>t.width)>n)return!0;let o=t.clone();o.update({range:[0,n]});let a=Rt(t,i),l=a.map(t=>{var e,n;return o.map(t)+(e=o,n=t,e.getBandWidth?e.getBandWidth(n)/2:0)}),s=a.map((t,e)=>e),u=-r[0],c=n+r[1],f=(t,e)=>{let{width:n}=e;return[t-n/2,t+n/2]};for(let t=0;t<s.length;t++){let[n,r]=f(l[t],e[t]);if(n<u||r>c)return!0;let i=l[t+1];if(i){let[n]=f(i,e[t+1]);if(r>n)return!0}}return!1})(h,d,e,n,o)&&!a&&!1!==f&&null!==f?(t.labelTransform="rotate(90)",t.size=r+y):t.size=i+y}}else t.size=s;let g=I9(p);g&&(a?t.size+=c+g.width:t.size+=c+g.height)}function I3(t,e,n,r,i,o){let a=(()=>{let{legendContinuous:e}=i;return nt({},e,t)})(),{labelSpacing:l=0,titleSpacing:s=0}=a,u=IY(a,["labelSpacing","titleSpacing"]),c="left"===r||"right"===r,{size:f}=nc(u,"ribbon"),{size:p}=nc(u,"handleIcon"),h=Math.max(f,2.4*p);t.size=h;let d=I8(u,I6(t,o));if(d){let e=c?"width":"height",n=rY(d,t=>t[e]);t.size+=n+l}let y=I9(u);y&&(c?t.size=Math.max(t.size,y.width):t.size+=s+y.height)}function I4(t,e,n,r,i,o){let a=(()=>{let{legendCategory:e}=i,{title:n}=t,[r,o]=Array.isArray(n)?[n,void 0]:[void 0,n];return nt({title:r},e,Object.assign(Object.assign({},t),{title:o}))})(),{itemSpacing:l,itemMarkerSize:s,titleSpacing:u,rowPadding:c,colPadding:f,maxCols:p=1/0,maxRows:h=1/0}=a,d=IY(a,["itemSpacing","itemMarkerSize","titleSpacing","rowPadding","colPadding","maxCols","maxRows"]),{cols:y,length:g}=t,v=t=>Math.min(t,h),m=t=>Math.min(t,p),b="left"===r||"right"===r,x=void 0===g?e+(b?0:n[0]+n[1]):g,O=I9(d),w=I8(d,I6(t,o),"itemLabel"),E=Math.max(w[0].height,s)+c,k=(t,e=0)=>s+t+l[0]+e;b?(()=>{let e=-1/0,n=0,r=1,i=0,o=-1/0,a=-1/0,l=O?O.height:0,s=x-l;for(let{width:t}of w)e=Math.max(e,k(t,f)),n+E>s?(r++,o=Math.max(o,i),a=Math.max(a,n),i=1,n=E):(n+=E,i++);r<=1&&(o=i,a=n),t.size=e*m(r),t.length=a+l,nt(t,{cols:m(r),gridRow:o})})():"number"==typeof y?(()=>{let e=Math.ceil(w.length/y),n=rY(w,t=>k(t.width))*y;t.size=E*v(e)-c,t.length=Math.min(n,x)})():(()=>{let e=1,n=0,r=-1/0;for(let{width:t}of w){let i=k(t,f);n+i>x?(r=Math.max(r,n),n=i,e++):n+=i}1===e&&(r=n),t.size=E*v(e)-c,t.length=r})(),O&&(b?t.size=Math.max(t.size,O.width):t.size+=u+O.height)}function I6(t,e){let[n]=Nm("scale",e),{scales:r,tickCount:i,tickMethod:o}=t,a=r.find(t=>"constant"!==t.type&&"identity"!==t.type);return void 0!==i&&(a.tickCount=i),void 0!==o&&(a.tickMethod=o),n(a)}function I8(t,e,n="label"){let{labelFormatter:r,tickFilter:i,label:o=!0}=t,a=IY(t,["labelFormatter","tickFilter","label"]);if(!o)return null;let l=function(t,e,n){let r=Rt(t,n).map(t=>"number"==typeof t?gF(t):t),i=e?"string"==typeof e?ef(e):e:t.getFormatter?t.getFormatter():t=>`${t}`;return r.map(i)}(e,r,i),s=nc(a,n),u=l.map((t,e)=>Object.fromEntries(Object.entries(s).map(([n,r])=>[n,"function"==typeof r?r(t,e):r]))),c=l.map((t,e)=>Re(t,u[e]));if(!u.some(t=>t.transform)){let e=l.map((t,e)=>e);t.indexBBox=new Map(e.map(t=>[t,[l[t],c[t]]]))}return c}function I9(t){let e,{title:n}=t,r=IY(t,["title"]);if(!1===(e=n)||null===e||void 0===n)return null;let i=nc(r,"title"),{direction:o,transform:a}=i,l=Array.isArray(n)?n.join(","):n;return"string"!=typeof l?null:Re(l,Object.assign(Object.assign({},i),{transform:a||("vertical"===o?"rotate(-90)":"")}))}function I7(t,e,n){let{title:r}=t,[i,o]=Array.isArray(r)?[r,void 0]:[void 0,r],{axis:a,[`axis${na(e)}`]:l}=n;return nt({title:i},a,l,Object.assign(Object.assign({},t),{title:o}))}function Rt(t,e){let n=t.getTicks?t.getTicks():t.getOptions().domain;return e?n.filter(e):n}function Re(t,e){let n=function(t){return t instanceof yt?t:new yh({style:{text:`${t}`}})}(t),{filter:r}=e,i=IY(e,["filter"]);return n.attr(Object.assign(Object.assign({},i),{visibility:"none"})),n.getBBox()}function Rn(t,e,n,r,i,o,a){let l=iu(t,t=>t.position),{padding:s=o.padding,paddingLeft:u=s,paddingRight:c=s,paddingBottom:f=s,paddingTop:p=s}=i,h={paddingBottom:f,paddingLeft:u,paddingTop:p,paddingRight:c};for(let t of r){let r=`padding${na(PO(t))}`,i=l.get(t)||[],s=h[r],u=t=>{void 0===t.size&&(t.size=t.defaultSize)},c=t=>{"group"===t.type?(t.children.forEach(u),t.size=rY(t.children,t=>t.size)):t.size=t.defaultSize},f=r=>{!r.size&&("auto"!==s?c(r):(IQ(r,e,n,t,o,a),u(r)))},p=t=>{t.type.startsWith("axis")&&void 0===t.labelAutoHide&&(t.labelAutoHide=!0)},d="bottom"===t||"top"===t,y=rV(i,t=>t.order),g=i.filter(t=>t.type.startsWith("axis")&&t.order==y);if(g.length&&(g[0].crossPadding=0),"number"==typeof s)i.forEach(u),i.forEach(p);else if(0===i.length)h[r]=0;else{let t=IK(i,d?e+n[0]+n[1]:e);t.forEach(f);let o=t.reduce((t,{size:e,crossPadding:n=12})=>t+e+n,0);h[r]=o}}return h}function Rr({width:t,height:e,paddingLeft:n,paddingRight:r,paddingTop:i,paddingBottom:o,marginLeft:a,marginTop:l,marginBottom:s,marginRight:u,innerHeight:c,innerWidth:f,insetBottom:p,insetLeft:h,insetRight:d,insetTop:y}){let g=n+a,v=i+l,m=r+u,b=o+s,x=t-a-u,O=[g+h,v+y,f-h-d,c-y-p,"center",null,null];return{top:[g,0,f,v,"vertical",!0,M0,a,x],right:[t-m,v,m,c,"horizontal",!1,M0],bottom:[g,e-b,f,b,"vertical",!1,M0,a,x],left:[0,v,g,c,"horizontal",!0,M0],"top-left":[g,0,f,v,"vertical",!0,M0],"top-right":[g,0,f,v,"vertical",!0,M0],"bottom-left":[g,e-b,f,b,"vertical",!1,M0],"bottom-right":[g,e-b,f,b,"vertical",!1,M0],center:O,inner:O,outer:O}}var Ri=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function Ro(t,e,n){let{encode:r={},scale:i={},transform:o=[]}=e;return[t,Object.assign(Object.assign({},Ri(e,["encode","scale","transform"])),{encode:r,scale:i,transform:o})]}function Ra(t,e,n){var r,i,o,a;return r=this,i=void 0,o=void 0,a=function*(){let{library:t}=n,{data:r}=e,[i]=Nm("data",t),o=function(t){if(gz(t))return{type:"inline",value:t};if(!t)return{type:"inline",value:null};if(Array.isArray(t))return{type:"inline",value:t};let{type:e="inline"}=t;return Object.assign(Object.assign({},Ri(t,["type"])),{type:e})}(r),{transform:a=[]}=o,l=[Ri(o,["transform"]),...a].map(i),s=yield(function(t){return t.reduce((t,e)=>n=>{var r,i,o,a;return r=this,i=void 0,o=void 0,a=function*(){return e((yield t(n)))},new(o||(o=Promise))(function(t,e){function n(t){try{s(a.next(t))}catch(t){e(t)}}function l(t){try{s(a.throw(t))}catch(t){e(t)}}function s(e){var r;e.done?t(e.value):((r=e.value)instanceof o?r:new o(function(t){t(r)})).then(n,l)}s((a=a.apply(r,i||[])).next())})},ni)})(l)(r),u=!r||Array.isArray(r)||Array.isArray(s)?s:{value:s};return[Array.isArray(s)?g$(s):[],Object.assign(Object.assign({},e),{data:u})]},new(o||(o=Promise))(function(t,e){function n(t){try{s(a.next(t))}catch(t){e(t)}}function l(t){try{s(a.throw(t))}catch(t){e(t)}}function s(e){var r;e.done?t(e.value):((r=e.value)instanceof o?r:new o(function(t){t(r)})).then(n,l)}s((a=a.apply(r,i||[])).next())})}function Rl(t,e,n){let{encode:r}=e;if(!r)return[t,e];let i={};for(let[t,e]of Object.entries(r))if(Array.isArray(e))for(let n=0;n<e.length;n++)i[`${t}${0===n?"":n}`]=e[n];else i[t]=e;return[t,Object.assign(Object.assign({},e),{encode:i})]}function Rs(t,e,n){let{encode:r,data:i}=e;if(!r)return[t,e];let o=gW(r,t=>(function(t){if("object"!=typeof t||t instanceof Date||null===t)return!1;let{type:e}=t;return nu(e)})(t)?t:{type:function(t,e){return"function"==typeof e?"transform":"string"==typeof e&&function(t,e){return!!Array.isArray(t)&&t.some(t=>void 0!==t[e])}(t,e)?"field":"constant"}(i,t),value:t});return[t,Object.assign(Object.assign({},e),{encode:o})]}function Ru(t,e,n){let{encode:r}=e;if(!r)return[t,e];let i=gW(r,(t,e)=>{var n;let{type:r}=t;return"constant"!==r||(n=e).startsWith("x")||n.startsWith("y")||n.startsWith("position")||"enterDelay"===n||"enterDuration"===n||"updateDelay"===n||"updateDuration"===n||"exitDelay"===n||"exitDuration"===n?t:Object.assign(Object.assign({},t),{constant:!0})});return[t,Object.assign(Object.assign({},e),{encode:i})]}function Rc(t,e,n){let{encode:r,data:i}=e;if(!r)return[t,e];let{library:o}=n,a=function(t){let[e]=Nm("encode",t);return(t,n)=>void 0===n||void 0===t?null:Object.assign(Object.assign({},n),{type:"column",value:e(n)(t),field:function(t){let{type:e,value:n}=t;return"field"===e&&"string"==typeof n?n:null}(n)})}(o),l=gW(r,t=>a(i,t));return[t,Object.assign(Object.assign({},e),{encode:l})]}function Rf(t,e,n){let{tooltip:r={}}=e;return ny(r)?[t,e]:Array.isArray(r)?[t,Object.assign(Object.assign({},e),{tooltip:{items:r}})]:nd(r)&&nm(r)?[t,Object.assign(Object.assign({},e),{tooltip:r})]:[t,Object.assign(Object.assign({},e),{tooltip:{items:[r]}})]}function Rp(t,e,n){let{data:r,encode:i,tooltip:o={}}=e;if(ny(o))return[t,e];let a=e=>{if(!e)return e;if("string"==typeof e)return t.map(t=>({name:e,value:r[t][e]}));if(nd(e)){let{field:n,channel:o,color:a,name:l=n,valueFormatter:s=t=>t}=e,u="string"==typeof s?ef(s):s,c=o&&i[o],f=c&&i[o].field,p=l||f||o,h=[];for(let e of t){let t=n?r[e][n]:c?i[o].value[e]:null;h[e]={name:p,color:a,value:u(t)}}return h}if("function"==typeof e){let n=[];for(let o of t){let t=e(r[o],o,r,i);nd(t)?n[o]=t:n[o]={value:t}}return n}return e},{title:l,items:s=[]}=o,u=Ri(o,["title","items"]),c=Object.assign({title:a(l),items:Array.isArray(s)?s.map(a):[]},u);return[t,Object.assign(Object.assign({},e),{tooltip:c})]}function Rh(t,e,n){let{encode:r}=e,i=Ri(e,["encode"]);if(!r)return[t,e];let o=Object.entries(r),a=o.filter(([,t])=>{let{value:e}=t;return Array.isArray(e[0])}).flatMap(([e,n])=>{let r=[[e,Array(t.length).fill(void 0)]],{value:i}=n,o=Ri(n,["value"]);for(let n=0;n<i.length;n++){let o=i[n];if(Array.isArray(o))for(let i=0;i<o.length;i++){let a=r[i]||[`${e}${i}`,Array(t).fill(void 0)];a[1][n]=o[i],r[i]=a}}return r.map(([t,e])=>[t,Object.assign({type:"column",value:e},o)])}),l=Object.fromEntries([...o,...a]);return[t,Object.assign(Object.assign({},i),{encode:l})]}function Rd(t,e,n){let{axis:r={},legend:i={},slider:o={},scrollbar:a={}}=e,l=(t,e)=>{if("boolean"==typeof t)return t?{}:null;let n=t[e];return void 0===n||n?n:null};return nt(e,{scale:Object.assign(Object.assign({},Object.fromEntries(("object"==typeof r?Array.from(new Set(["x","y",...Object.keys(r)])):["x","y"]).map(t=>{let e=l(a,t);return[t,Object.assign({guide:l(r,t),slider:l(o,t),scrollbar:e},e&&{ratio:void 0===e.ratio?.5:e.ratio})]}))),{color:{guide:l(i,"color")},size:{guide:l(i,"size")},shape:{guide:l(i,"shape")},opacity:{guide:l(i,"opacity")}})}),[t,e]}function Ry(t,e,n){let{animate:r}=e;return r||void 0===r?[t,e]:(nt(e,{animate:{enter:{type:null},exit:{type:null},update:{type:null}}}),[t,e])}var Rg=function(t,e,n,r){return new(n||(n=Promise))(function(i,o){function a(t){try{s(r.next(t))}catch(t){o(t)}}function l(t){try{s(r.throw(t))}catch(t){o(t)}}function s(t){var e;t.done?i(t.value):((e=t.value)instanceof n?e:new n(function(t){t(e)})).then(a,l)}s((r=r.apply(t,e||[])).next())})},Rv=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n},Rm=function(t,e,n,r){return new(n||(n=Promise))(function(i,o){function a(t){try{s(r.next(t))}catch(t){o(t)}}function l(t){try{s(r.throw(t))}catch(t){o(t)}}function s(t){var e;t.done?i(t.value):((e=t.value)instanceof n?e:new n(function(t){t(e)})).then(a,l)}s((r=r.apply(t,e||[])).next())})},Rb=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function Rx(t,e,n,r){var i;return Rm(this,void 0,void 0,function*(){let[o]=Nm("composition",n),[a]=Nm("interaction",n),l=new Set(Object.keys(n).map(t=>{var e;return null===(e=/mark\.(.*)/.exec(t))||void 0===e?void 0:e[1]}).filter(nu)),s=new Set(Object.keys(n).map(t=>{var e;return null===(e=/component\.(.*)/.exec(t))||void 0===e?void 0:e[1]}).filter(nu)),u=t=>{let{type:e}=t;if("function"==typeof e){let{props:t={}}=e,{composite:n=!0}=t;if(n)return"mark"}return"string"!=typeof e?e:l.has(e)||s.has(e)?"mark":e},c=t=>"mark"===u(t),f=t=>"standardView"===u(t),p=t=>{let{type:e}=t;return"string"==typeof e&&(!!s.has(e)||!1)},h=t=>f(t)?[t]:o({type:u(t),static:p(t)})(t),d=[],y=new Map,g=new Map,v=[t],m=[];for(;v.length;){let t=v.shift();if(f(t)){let e=g.get(t),[r,i]=e?RM(e,t,n):yield Rw(t,n);y.set(r,t),d.push(r);let o=i.flatMap(h).map(t=>NO(t,n));if(v.push(...o),o.every(f)){let t=yield Promise.all(o.map(t=>RE(t,n)));!function(t){let e=t.flatMap(t=>Array.from(t.values())).flatMap(t=>t.channels.map(t=>t.scale));IN(e,"x"),IN(e,"y")}(t);for(let e=0;e<o.length;e++){let n=o[e],r=t[e];g.set(n,r)}}}else{let e=h(c(t)?t:yield RN(t,n));Array.isArray(e)?v.push(...e):"function"==typeof e&&m.push(e())}}r.emitter.emit(_k.BEFORE_PAINT);let b=new Map,x=new Map,O=[];e.selectAll(RD(SB)).data(d,t=>t.key).join(t=>t.append("g").attr("className",SB).attr("id",t=>t.key).call(RO).each(function(t,e,i){RS(t,g_(i),O,n,r),b.set(t,i)}),t=>t.call(RO).each(function(t,e,i){RS(t,g_(i),O,n,r),x.set(t,i)}),t=>t.each(function(t,e,n){for(let t of n.nameInteraction.values())t.destroy()}).remove());let w=(t,e,i)=>Array.from(t.entries()).map(([o,a])=>{let l=i||new Map,s=y.get(o),u=function(t,e,n,r){let i=function(t){let[,e]=Nm("interaction",t);return t=>{let[n,r]=t;try{return[n,e(n)]}catch(t){return[n,r.type]}}}(n),o=RC(e).map(i).filter(t=>t[1]&&t[1].props&&t[1].props.reapplyWhenUpdate).map(t=>t[0]);return(e,i,a)=>Rm(this,void 0,void 0,function*(){let[l,s]=yield Rw(e,n);for(let a of(RS(l,t,[],n,r),o.filter(t=>t!==i)))(function(t,e,n,r,i,o){var a;let[l]=Nm("interaction",i),s=e.node().nameInteraction,u=RC(n).find(([e])=>e===t),c=s.get(t);if(!c)return;if(null===(a=c.destroy)||void 0===a||a.call(c),!u[1])return;let f=Rk(r,t,u[1],l),p=f({options:n,view:r,container:e.node(),update:t=>Promise.resolve(t)},[],o.emitter);s.set(t,{destroy:p})})(a,t,e,l,n,r);for(let e of s)Rx(e,t,n,r);return a(),{options:e,view:l}})}(g_(a),s,n,r);return{view:o,container:a,options:s,setState:(t,e=t=>t)=>l.set(t,e),update:(n,r)=>Rm(this,void 0,void 0,function*(){let i=no(Array.from(l.values()))(s);return yield u(i,n,()=>{e8(r)&&e(t,r,l)})})}}),E=(t=x,e,n)=>{var i;let o=w(t,E,n);for(let t of o){let{options:n,container:l}=t,s=l.nameInteraction,u=RC(n);for(let n of(e&&(u=u.filter(t=>e.includes(t[0]))),u)){let[e,l]=n,u=s.get(e);if(u&&(null===(i=u.destroy)||void 0===i||i.call(u)),l){let n=Rk(t.view,e,l,a)(t,o,r.emitter);s.set(e,{destroy:n})}}}},k=w(b,E);for(let t of k){let{options:e}=t,n=new Map;for(let i of(t.container.nameInteraction=n,RC(e))){let[e,o]=i;if(o){let i=Rk(t.view,e,o,a)(t,k,r.emitter);n.set(e,{destroy:i})}}}E();let{width:M,height:S}=t,_=[];for(let t of m){let i=new Promise(i=>Rm(this,void 0,void 0,function*(){for(let i of t){let t=Object.assign({width:M,height:S},i);yield Rx(t,e,n,r)}i()}));_.push(i)}return r.views=d,null===(i=r.animations)||void 0===i||i.forEach(t=>null==t?void 0:t.cancel()),r.animations=O,r.emitter.emit(_k.AFTER_PAINT),Promise.all([...O.filter(nu).map(RA).map(t=>t.finished),..._])})}function RO(t){t.style("transform",t=>`translate(${t.layout.x}, ${t.layout.y})`)}function Rw(t,e){return Rm(this,void 0,void 0,function*(){let n=function(t){let{coordinate:e={},interaction:n={},style:r={},marks:i}=t,o=Rb(t,["coordinate","interaction","style","marks"]),a=i.map(t=>t.coordinate||{}),l=i.map(t=>t.interaction||{}),s=i.map(t=>t.viewStyle||{}),u=[...a,e].reduceRight((t,e)=>nt(t,e),{}),c=[n,...l].reduce((t,e)=>nt(t,e),{}),f=[...s,r].reduce((t,e)=>nt(t,e),{});return Object.assign(Object.assign({},o),{marks:i,coordinate:u,interaction:c,style:f})}((yield function(t,e){return Rm(this,void 0,void 0,function*(){let[n,r]=Nm("mark",e),i=new Set(Object.keys(e).map(t=>{var e;return null===(e=/component\.(.*)/.exec(t))||void 0===e?void 0:e[1]}).filter(nu)),{marks:o}=t,a=[],l=[],s=[...o],{width:u,height:c}=function(t){let{height:e,width:n,padding:r=0,paddingLeft:i=r,paddingRight:o=r,paddingTop:a=r,paddingBottom:l=r,margin:s=16,marginLeft:u=s,marginRight:c=s,marginTop:f=s,marginBottom:p=s,inset:h=0,insetLeft:d=h,insetRight:y=h,insetTop:g=h,insetBottom:v=h}=t,m=t=>"auto"===t?20:t,b=n-m(i)-m(o)-u-c-d-y;return{width:b,height:e-m(a)-m(l)-f-p-g-v}}(t),f={options:t,width:u,height:c};for(;s.length;){let[t]=s.splice(0,1),o=yield RN(t,e),{type:u=nl("G2Mark type is required."),key:c}=o;if(i.has(u))l.push(o);else{let{props:t={}}=r(u),{composite:e=!0}=t;if(e){let{data:t}=o,e=Object.assign(Object.assign({},o),{data:t?Array.isArray(t)?t:t.value:t}),r=yield n(e,f),i=Array.isArray(r)?r:[r];s.unshift(...i.map((t,e)=>Object.assign(Object.assign({},t),{key:`${c}-${e}`})))}else a.push(o)}}return Object.assign(Object.assign({},t),{marks:a,components:l})})}(t,e)));t.interaction=n.interaction,t.coordinate=n.coordinate,t.marks=[...n.marks,...n.components];let r=NO(n,e);return RM((yield RE(r,e)),r,e)})}function RE(t,e){return Rm(this,void 0,void 0,function*(){let[n]=Nm("theme",e),[,r]=Nm("mark",e),{theme:i,marks:o,coordinates:a=[]}=t,l=n(RT(i)),s=new Map;for(let t of o){let{type:n}=t,{props:i={}}=r(n),o=yield function(t,e,n){return Rg(this,void 0,void 0,function*(){let[r,i]=yield function(t,e,n){return Rg(this,void 0,void 0,function*(){let{library:r}=n,[i]=Nm("transform",r),{preInference:o=[],postInference:a=[]}=e,{transform:l=[]}=t,s=[Ro,Ra,Rl,Rs,Ru,Rc,Rh,Ry,Rd,Rf,...o.map(i),...l.map(i),...a.map(i),Rp],u=[],c=t;for(let t of s)[u,c]=yield t(u,c,n);return[u,c]})}(t,e,{library:n}),{encode:o,scale:a,data:l,tooltip:s}=i;if(!1===Array.isArray(l))return null;let{channels:u}=e,c=ih(Object.entries(o).filter(([,t])=>nu(t)),t=>t.map(([t,e])=>Object.assign({name:t},e)),([t])=>{var e;let n=null===(e=/([^\d]+)\d*$/.exec(t))||void 0===e?void 0:e[1],r=u.find(t=>t.name===n);return(null==r?void 0:r.independent)?t:n}),f=u.filter(t=>{let{name:e,required:n}=t;if(c.find(([t])=>t===e))return!0;if(n)throw Error(`Missing encoding for channel: ${e}.`);return!1}).flatMap(t=>{let{name:e,scale:n,scaleKey:r,range:i,quantitative:o,ordinal:l}=t;return c.filter(([t])=>t.startsWith(e)).map(([t,e],s)=>{let u=e.some(t=>t.visual),c=e.some(t=>t.constant),f=a[t]||{},{independent:p=!1,key:h=r||t,type:d=c?"constant":u?"identity":n}=f,y=Rv(f,["independent","key","type"]),g="constant"===d;return{name:t,values:e,scaleKey:p||g?Symbol("independent"):h,scale:Object.assign(Object.assign({type:d,range:g?void 0:i},y),{quantitative:o,ordinal:l})}})});return[i,Object.assign(Object.assign({},e),{index:r,channels:f,tooltip:s})]})}(t,i,e);if(o){let[t,e]=o;s.set(t,e)}}for(let t of iu(Array.from(s.values()).flatMap(t=>t.channels),({scaleKey:t})=>t).values()){let n=t.reduce((t,{scale:e})=>nt(t,e),{}),{scaleKey:r}=t[0],{values:i}=t[0],o=Array.from(new Set(i.map(t=>t.field).filter(nu))),s=nt({guide:{title:0===o.length?void 0:o},field:o[0]},n),{name:u}=t[0],c=Object.assign(Object.assign({},function(t,e,n,r,i,o){let{guide:a={}}=n,l=function(t,e,n){let{type:r,domain:i,range:o,quantitative:a,ordinal:l}=n;if(void 0!==r)return r;if(function(t){return IG(t,nd)}(e))return"identity";if("string"==typeof o)return"linear";if((i||o||[]).length>2)return ID(t,l);if(void 0!==i)return IW([i])?ID(t,l):I$(e)?"time":IF(t,o,a);return IW(e)?ID(t,l):I$(e)?"time":IF(t,o,a)}(t,e,n);if("string"!=typeof l)return n;let s=function(t,e,n,r){let{domain:i}=r;if(void 0!==i)return i;switch(t){case"linear":case"time":case"log":case"pow":case"sqrt":case"quantize":case"threshold":return Iz(function(t,e){let{zero:n=!1}=e,r=1/0,i=-1/0;for(let e of t)for(let t of e)nu(t)&&(r=Math.min(r,+t),i=Math.max(i,+t));return r===1/0?[]:n?[Math.min(0,r),i]:[r,i]}(n,r),r);case"band":case"ordinal":case"point":return IB(n);case"quantile":return function(t){return IB(t).sort()}(n);case"sequential":return Iz(function(t){let e=1/0,n=-1/0;for(let r of t)for(let t of r)nu(t)&&(e=Math.min(e,+t),n=Math.max(n,+t));return e===1/0?[]:[e<0?-n:e,n]}(n),r);default:return[]}}(l,t,e,n),u=function(t,e,n){let{ratio:r}=n;return null==r?e:IL({type:t})?function(t,e,n){let r=t.map(Number),i=new oI({domain:r,range:[r[0],r[0]+(r[r.length-1]-r[0])*e]});return"time"===n?t.map(t=>new Date(i.map(t))):t.map(t=>i.map(t))}(e,r,t):II({type:t})?function(t,e){let n=Math.round(t.length*e);return t.slice(0,n)}(e,r):e}(l,s,n);return Object.assign(Object.assign(Object.assign({},n),function(t,e,n,r,i){switch(t){case"linear":case"time":case"log":case"pow":case"sqrt":return function(t,e){let{interpolate:n=oO,nice:r=!1,tickCount:i=5}=e;return Object.assign(Object.assign({},e),{interpolate:n,nice:r,tickCount:i})}(i,r);case"band":case"point":return function(t,e,n,r){if(void 0!==r.padding||void 0!==r.paddingInner||void 0!==r.paddingOuter)return Object.assign(Object.assign({},r),{unknown:NaN});let i=function(t,e,n){return"enterDelay"===e||"enterDuration"===e||"size"===e?0:"band"===t?NM(n)?0:.1:"point"===t?.5:0}(t,e,n),{paddingInner:o=i,paddingOuter:a=i}=r;return Object.assign(Object.assign({},r),{paddingInner:o,paddingOuter:a,padding:i,unknown:NaN})}(t,e,i,r);case"sequential":return function(t){let{palette:e="ylGnBu",offset:n}=t,r=oR(e),i=eO[`interpolate${r}`];if(!i)throw Error(`Unknown palette: ${r}`);return{interpolator:n?t=>i(n(t)):i}}(r);default:return r}}(l,t,e,n,r)),{domain:u,range:function(t,e,n,r,i,o,a){let{range:l}=r;if("string"==typeof l)return function(t){return t.split("-")}(l);if(void 0!==l)return l;let{rangeMin:s,rangeMax:u}=r;switch(t){case"linear":case"time":case"log":case"pow":case"sqrt":{let[t,l]=function(t,e){if("enterDelay"===t)return[0,1e3];if("enterDuration"==t)return[300,1e3];if(t.startsWith("y")||t.startsWith("position"))return[1,0];if("color"===t)return[e[0],gG(e)];return"opacity"===t?[0,1]:"size"===t?[1,10]:[0,1]}(e,IR(n,r,i,o,a));return[s||t,u||l]}case"band":case"point":{let t="size"===e?5:0,n="size"===e?10:1;return[s||t,u||n]}case"ordinal":return IR(n,r,i,o,a);case"sequential":return;case"constant":return[n[0][0]];default:return[]}}(l,t,e,n,u,i,o),expectedDomain:s,guide:a,name:t,type:l})}(u,t.flatMap(({values:t})=>t.map(t=>t.value)),s,a,l,e)),{key:r});t.forEach(t=>t.scale=c)}return s})}function Rk(t,e,n,r){let i=t.theme;return r(nt("string"==typeof e&&i[e]||{},Object.assign({type:e},n)))}function RM(t,e,n){let[r]=Nm("mark",n),[i]=Nm("theme",n),[o]=Nm("labelTransform",n),{key:a,frame:l=!1,theme:s,clip:u,style:c={},labelTransform:f=[]}=e,p=i(RT(s)),h=Array.from(t.values()),d=(function(t,e,n){let{coordinates:r=[],title:i}=e,[,o]=Nm("component",n),a=t.filter(({guide:t})=>null!==t&&!0),l=[],s=function(t,e,n){let[,r]=Nm("component",n),{coordinates:i}=t;function o(t,e,n,o){let a=function(t,e,n=[]){return"x"===t?Nk(n)?`${e}Y`:`${e}X`:"y"===t?Nk(n)?`${e}X`:`${e}Y`:null}(e,t,i);if(!o||!a)return;let{props:l}=r(a),{defaultPosition:s,defaultSize:u,defaultOrder:c,defaultCrossPadding:[f]}=l;return Object.assign(Object.assign({position:s,defaultSize:u,order:c,type:a,crossPadding:f},o),{scales:[n]})}return e.filter(t=>t.slider||t.scrollbar).flatMap(t=>{let{slider:e,scrollbar:n,name:r}=t;return[o("slider",r,t,e),o("scrollbar",r,t,n)]}).filter(t=>!!t)}(e,t,n);if(l.push(...s),i){let{props:t}=o("title"),{defaultPosition:e,defaultOrientation:n,defaultOrder:r,defaultSize:a,defaultCrossPadding:s}=t;l.push(Object.assign({type:"title",position:e,orientation:n,order:r,crossPadding:s[0],defaultSize:a},"string"==typeof i?{title:i}:i))}return(function(t,e){var n,r;let i=t.filter(t=>(function(t){if(!t||!t.type)return!1;if("function"==typeof t.type)return!0;let{type:e,domain:n,range:r,interpolator:i}=t,o=n&&n.length>0,a=r&&r.length>0;return!!(["linear","sqrt","log","time","pow","threshold","quantize","quantile","ordinal","band","point"].includes(e)&&o&&a||["sequential"].includes(e)&&o&&(a||i)||["constant","identity"].includes(e)&&a)||!1})(t));return[...function(t,e){let n=["shape","size","color","opacity"],r=(t,e)=>"constant"===t&&"size"===e,i=t.filter(({type:t,name:e})=>"string"==typeof t&&n.includes(e)&&!r(t,e)),o=i.filter(({type:t})=>"constant"===t),a=i.filter(({type:t})=>"constant"!==t),l=new Map(ic(a,t=>t.field?t.field:Symbol("independent")).map(([t,e])=>[t,[...e,...o]]).filter(([,t])=>t.some(t=>"constant"!==t.type)));if(0===l.size)return[];let s=t=>t.sort(([t],[e])=>t.localeCompare(e));return Array.from(l).map(([,t])=>{let e=(function(t){if(1===t.length)return[t];let e=[];for(let n=1;n<=t.length;n++)e.push(...function t(e,n=e.length){if(1===n)return e.map(t=>[t]);let r=[];for(let i=0;i<e.length;i++)t(e.slice(i+1),n-1).forEach(t=>{r.push([e[i],...t])});return r}(t,n));return e})(t).sort((t,e)=>e.length-t.length).map(t=>({combination:t,option:t.map(t=>[t.name,function(t){let{type:e}=t;return"string"!=typeof e?null:e in IV?"continuous":e in IU?"discrete":e in IH?"distribution":e in Iq?"constant":null}(t)])}));for(let{option:t,combination:n}of e)if(!t.every(t=>"constant"===t[1])&&t.every(t=>"discrete"===t[1]||"constant"===t[1]))return["legendCategory",n];for(let[t,n]of CZ)for(let{option:r,combination:i}of e)if(n.some(t=>CK(s(t),s(r))))return[t,i];return null}).filter(nu)}(i,0),...(n=i,r=e,n.map(t=>{let{name:e}=t;if(Nw(r,"helix").length>0||NM(r)||Nk(r)&&(NE(r)||NS(r)))return null;if(e.startsWith("x"))return NE(r)?["axisArc",[t]]:NS(r)?["axisLinear",[t]]:[Nk(r)?"axisY":"axisX",[t]];if(e.startsWith("y"))return NE(r)?["axisLinear",[t]]:NS(r)?["axisArc",[t]]:[Nk(r)?"axisX":"axisY",[t]];if(e.startsWith("z"))return["axisZ",[t]];if(e.startsWith("position")){if(Nw(r,"radar").length>0)return["axisRadar",[t]];if(!NE(r))return["axisY",[t]]}return null}).filter(nu))]})(a,r).forEach(([t,e])=>{let{props:n}=o(t),{defaultPosition:i,defaultPlane:s="xy",defaultOrientation:u,defaultSize:c,defaultOrder:f,defaultLength:p,defaultPadding:h=[0,0],defaultCrossPadding:d=[0,0]}=n,{guide:y,field:g}=nt({},...e);for(let n of Array.isArray(y)?y:[y]){let[o,y]=function(t,e,n,r,i,o,a){let[l]=IZ(a),s=[r.position||e,null!=l?l:n];return"string"==typeof t&&t.startsWith("axis")?function(t,e,n,r,i){let{name:o}=n[0];if("axisRadar"===t){let t=r.filter(t=>t.name.startsWith("position")),e=function(t){let e=/position(\d*)/g.exec(t);return e?+e[1]:null}(o);if(o===t.slice(-1)[0].name||null===e)return[null,null];let[n,a]=IZ(i);return["center",(a-n)/(t.length-1)*e+n]}if("axisY"===t&&Nw(i,"parallel").length>0)return Nk(i)?["center","horizontal"]:["center","vertical"];if("axisLinear"===t){let[t]=IZ(i);return["center",t]}if("axisArc"===t)return"inner"===e[0]?["inner",null]:["outer",null];if(NE(i)||NS(i))return["center",null];return"axisX"===t&&Nw(i,"reflect").length>0||"axisX"===t&&Nw(i,"reflectY").length>0?["top",null]:e}(t,s,i,o,a):"string"==typeof t&&t.startsWith("legend")&&NE(a)&&"center"===r.position?["center","vertical"]:s}(t,i,u,n,e,a,r);if(!o&&!y)continue;let v="left"===o||"right"===o,m=v?h[1]:h[0],b=v?d[1]:d[0],{size:x,order:O=f,length:w=p,padding:E=m,crossPadding:k=b}=n;l.push(Object.assign(Object.assign({title:g},n),{defaultSize:c,length:w,position:o,plane:s,orientation:y,padding:E,order:O,crossPadding:k,size:x,type:t,scales:e}))}}),l})(function(t,e,n){var r;for(let[e]of n.entries())if("cell"===e.type)return t.filter(t=>"shape"!==t.name);if(1!==e.length||t.some(t=>"shape"===t.name))return t;let{defaultShape:i}=e[0];if(!["point","line","rect","hollow"].includes(i))return t;let o=(null===(r=t.find(t=>"color"===t.name))||void 0===r?void 0:r.field)||null;return[...t,{field:o,name:"shape",type:"constant",domain:[],range:[{point:"point",line:"hyphen",rect:"square",hollow:"hollow"}[i]]}]}(Array.from(function(t,e){var n;let{components:r=[]}=e,i=["scale","encode","axis","legend","data","transform"],o=Array.from(new Set(t.flatMap(t=>t.channels.map(t=>t.scale)))),a=new Map(o.map(t=>[t.name,t]));for(let t of r)for(let e of function(t){let{channels:e=[],type:n,scale:r={}}=t,i=["shape","color","opacity","size"];return 0!==e.length?e:"axisX"===n?["x"]:"axisY"===n?["y"]:"legends"===n?Object.keys(r).filter(t=>i.includes(t)):[]}(t)){let r=a.get(e),l=(null===(n=t.scale)||void 0===n?void 0:n[e])||{},{independent:s=!1}=l;if(r&&!s){let{guide:e}=r,n="boolean"==typeof e?{}:e;r.guide=nt({},n,t),Object.assign(r,l)}else{let n=Object.assign(Object.assign({},l),{expectedDomain:l.domain,name:e,guide:EV(t,i)});o.push(n)}}return o}(h,e)),h,t),e,n).map(t=>{let e=nt(t,t.style);return delete e.style,e}),y=function(t,e,n,r){var i,o;let{width:a,height:l,depth:s,x:u=0,y:c=0,z:f=0,inset:p=null!==(i=n.inset)&&void 0!==i?i:0,insetLeft:h=p,insetTop:d=p,insetBottom:y=p,insetRight:g=p,margin:v=null!==(o=n.margin)&&void 0!==o?o:0,marginLeft:m=v,marginBottom:b=v,marginTop:x=v,marginRight:O=v,padding:w=n.padding,paddingBottom:E=w,paddingLeft:k=w,paddingRight:M=w,paddingTop:S=w}=function(t,e,n,r){let{coordinates:i}=e;if(!NE(i)&&!NS(i))return e;let o=t.filter(t=>"string"==typeof t.type&&t.type.startsWith("axis"));if(0===o.length)return e;let a=o.map(t=>{let e="axisArc"===t.type?"arc":"linear";return I7(t,e,n)}),l=rY(a,t=>{var e;return null!==(e=t.labelSpacing)&&void 0!==e?e:0}),s=rY(o.flatMap((t,e)=>{let n=a[e];return I8(n,I6(t,r))}).filter(nu),t=>t.height)+l,u=o.flatMap((t,e)=>I9(a[e])).filter(t=>null!==t),c=0===u.length?0:rY(u,t=>t.height),{inset:f=s,insetLeft:p=f,insetBottom:h=f,insetTop:d=f+c,insetRight:y=f}=e;return Object.assign(Object.assign({},e),{insetLeft:p,insetBottom:h,insetTop:d,insetRight:y})}(t,e,n,r),_=1/4,P=(t,n,r,i,o)=>{let{marks:a}=e;if(0===a.length)return[i,o];if(t-i-o-t*_>0)return[i,o];let l=t*(1-_);return["auto"===n?l*i/(i+o):i,"auto"===r?l*o/(i+o):o]},j=t=>"auto"===t?20:null!=t?t:20,A=j(S),T=j(E),{paddingLeft:C,paddingRight:N}=Rn(t,l-A-T,[A+x,T+b],["left","right"],e,n,r),L=a-m-O,[I,R]=P(L,k,M,C,N),D=L-I-R,{paddingTop:F,paddingBottom:z}=Rn(t,D,[I+m,R+O],["bottom","top"],e,n,r),B=l-b-x,[W,$]=P(B,E,S,z,F);return{width:a,height:l,depth:s,insetLeft:h,insetTop:d,insetBottom:y,insetRight:g,innerWidth:D,innerHeight:B-W-$,paddingLeft:I,paddingRight:R,paddingTop:$,paddingBottom:W,marginLeft:m,marginBottom:b,marginTop:x,marginRight:O,x:u,y:c,z:f}}(d,e,p,n),g=function(t,e,n){let[r]=Nm("coordinate",n),{innerHeight:i,innerWidth:o,insetLeft:a,insetTop:l,insetRight:s,insetBottom:u}=t,{coordinates:c=[]}=e,f=function(t){return t.find(t=>"cartesian"===t.type||"cartesian3D"===t.type)?t:[...t,{type:"cartesian"}]}(c),p="cartesian3D"===f[0].type,h=Object.assign(Object.assign({},t),{x:a,y:l,width:o-a-s,height:i-u-l,transformations:f.flatMap(r)});return p?new CQ.Coordinate3D(h):new CQ.Coordinate(h)}(y,e,n),v=l?nt({mainLineWidth:1,mainStroke:"#000"},c):c;!function(t,e,n){let r=iu(t,t=>`${t.plane||"xy"}-${t.position}`),{paddingLeft:i,paddingRight:o,paddingTop:a,paddingBottom:l,marginLeft:s,marginTop:u,marginBottom:c,marginRight:f,innerHeight:p,innerWidth:h,insetBottom:d,insetLeft:y,insetRight:g,insetTop:v,height:m,width:b,depth:x}=n,O={xy:Rr({width:b,height:m,paddingLeft:i,paddingRight:o,paddingTop:a,paddingBottom:l,marginLeft:s,marginTop:u,marginBottom:c,marginRight:f,innerHeight:p,innerWidth:h,insetBottom:d,insetLeft:y,insetRight:g,insetTop:v}),yz:Rr({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:Rr({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(let[t,n]of r.entries()){let[r,i]=t.split("-"),o=O[r][i],[a,l]=gV(n,t=>"string"==typeof t.type&&(!!("center"===i||t.type.startsWith("axis")&&["inner","outer"].includes(i))||!1));a.length&&function(t,e,n,r){let[i,o]=gV(t,t=>!!("string"==typeof t.type&&t.type.startsWith("axis"))||!1);(function(t,e,n,r){if("center"===r){var i;if(s4(i=e)&&s2(i))(function(t,e,n,r){let[i,o,a,l]=n;for(let e of t)e.bbox={x:i,y:o,width:a,height:l},e.radar={index:t.indexOf(e),count:t.length}})(t,e,n,r);else s2(e)?function(t,e,n){let[r,i,o,a]=n;for(let e of t)e.bbox={x:r,y:i,width:o,height:a}}(t,e,n):s4(e)&&function(t,e,n,r){"horizontal"===r?function(t,e,n){let[r,i,o]=n,a=Array(t.length).fill(0),l=e.map(a).filter((t,e)=>e%2==1).map(t=>t+i);for(let e=0;e<t.length;e++){let n=t[e],i=l[e],a=l[e+1]-i;n.bbox={x:r,y:i,width:o,height:a}}}(t,e,n):"vertical"===r&&function(t,e,n){let[r,i,,o]=n,a=Array(t.length).fill(0),l=e.map(a).filter((t,e)=>e%2==0).map(t=>t+r);for(let e=0;e<t.length;e++){let n=t[e],r=l[e],a=l[e+1]-r;n.bbox={x:r,y:i,width:a,height:o}}}(t,e,n)}(t,e,n,t[0].orientation)}else"inner"===r?function(t,e,n){let[r,i,,o]=n,[a,l]=e.getCenter(),[s]=s9(e),u=o/2*s,c=a-u,f=l-u;for(let e=0;e<t.length;e++)t[e].bbox={x:r+c,y:i+f,width:2*u,height:2*u}}(t,e,n):"outer"===r&&function(t,e,n){let[r,i,o,a]=n;for(let e of t)e.bbox={x:r,y:i,width:o,height:a}}(t,e,n)})(i,e,n,r),function(t,e,n){if(0===t.length)return;let[r,i,o,a]=n,[l]=s9(e),s=a/2*l/Math.sqrt(2),u=r+o/2,c=i+a/2;for(let e=0;e<t.length;e++)t[e].bbox={x:u-s,y:c-s,width:2*s,height:2*s}}(o,e,n)}(a,e,o,i),l.length&&function(t,e,n){let[r,i,o,a,l,s,u,c,f]=n,[p,h,d,y,g,v,m,b]="vertical"===l?["y",i,"x",r,"height",a,"width",o]:["x",r,"y",i,"width",o,"height",a];t.sort((t,e)=>null==u?void 0:u(t.order,e.order));let x=t=>"title"===t||"group"===t||t.startsWith("legend"),O=(t,e,n)=>void 0===n?e:x(t)?n:e,w=(t,e,n)=>void 0===n?e:x(t)?n:e;for(let e=0,n=s?h+v:h;e<t.length;e++){let r=t[e],{crossPadding:i=0,type:o}=r,{size:a}=r;r.bbox={[p]:s?n-a-i:n+i,[d]:w(o,y,c),[g]:a,[m]:O(o,b,f)},n+=(a+i)*(s?-1:1)}for(let e of t.filter(t=>"group"===t.type)){let{bbox:t,children:n}=e,r=t[m],i=r/n.length,o=n.reduce((t,e)=>{var n;let r=null===(n=e.layout)||void 0===n?void 0:n.justifyContent;return r||t},"flex-start"),a=n.map((t,e)=>{let{length:r=i,padding:o=0}=t;return r+(e===n.length-1?0:o)}),l=r-rq(a),s="flex-start"===o?0:"center"===o?l/2:l;for(let e=0,r=t[d]+s;e<n.length;e++){let i=n[e],{padding:l=0}=i,s=e===n.length-1?0:l;i.bbox={[g]:t[g],[p]:t[p],[d]:r,[m]:a[e]-s},nt(i,{layout:{justifyContent:o}}),r+=a[e]}}}(n,e,o)}}(IK(d),g,y),!function(t){let e=t.find(({type:t})=>"axisZ"===t);if(e){let n=t.find(({type:t})=>"axisX"===t);n.plane="xy";let r=t.find(({type:t})=>"axisY"===t);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]}))}}(d);let m={};for(let t of d){let{scales:e=[]}=t,r=[];for(let t of e){let{name:e}=t,i=IC(t,n);r.push(i),"y"===e&&i.update(Object.assign(Object.assign({},i.getOptions()),{xScale:m.x})),IT(m,{[e]:i})}t.scaleInstances=r}let b=[];for(let[e,i]of t.entries()){let{children:t,dataDomain:o,modifier:l,key:s}=e,{index:u,channels:c,tooltip:f}=i,p=gW(Object.fromEntries(c.map(({name:t,scale:e})=>[t,e])),t=>IC(t,n));IT(m,p);let h=function(t,e){let n={};for(let r of t){let{values:t,name:i}=r,o=e[i];for(let e of t){let{name:t,value:r}=e;n[t]=r.map(t=>o.map(t))}}return n}(c,p),[d,v,x]=function([t,e,n]){if(n)return[t,e,n];let r=[],i=[];for(let n=0;n<t.length;n++){let o=t[n],a=e[n];a.every(([t,e])=>nu(t)&&nu(e))&&(r.push(o),i.push(a))}return[r,i]}(r(e)(u,p,h,g)),O=o||d.length,w=l?l(v,O,y):[],E=t=>{var e,n;return null===(n=null===(e=f.title)||void 0===e?void 0:e[t])||void 0===n?void 0:n.value},k=t=>f.items.map(e=>e[t]),M=d.map((t,e)=>{let n=Object.assign({points:v[e],transform:w[e],index:t,markKey:s,viewKey:a},f&&{title:E(t),items:k(t)});for(let[r,i]of Object.entries(h))n[r]=i[t],x&&(n[`series${oR(r)}`]=x[e].map(t=>i[t]));return x&&(n.seriesIndex=x[e]),x&&f&&(n.seriesItems=x[e].map(t=>k(t)),n.seriesTitle=x[e].map(t=>E(t))),n});i.data=M,i.index=d;let S=null==t?void 0:t(M,p,y);b.push(...S||[])}return[{layout:y,theme:p,coordinate:g,markState:t,key:a,clip:u,scale:m,style:v,components:d,labelTransform:no(f.map(o))},b]}function RS(t,e,n,r,i){return Rm(this,void 0,void 0,function*(){let{components:o,theme:a,layout:l,markState:s,coordinate:u,key:c,style:f,clip:p,scale:h}=t,{x:d,y,width:g,height:v}=l,m=Rb(l,["x","y","width","height"]),b=["view","plot","main","content"],x=b.map((t,e)=>e),O=b.map(t=>nf(Object.assign({},a.view,f),t)),w=["a","margin","padding","inset"].map(t=>nc(m,t)),E=t=>t.style("x",t=>P[t].x).style("y",t=>P[t].y).style("width",t=>P[t].width).style("height",t=>P[t].height).each(function(t,e,n){(function(t,e){for(let[n,r]of Object.entries(e))t.style(n,r)})(g_(n),O[t])}),k=0,M=0,S=g,_=v,P=x.map(t=>{let{left:e=0,top:n=0,bottom:r=0,right:i=0}=w[t];return k+=e,M+=n,S-=e+i,_-=n+r,{x:k,y:M,width:S,height:_}});e.selectAll(RD(SV)).data(x.filter(t=>nu(O[t])),t=>b[t]).join(t=>t.append("rect").attr("className",SV).style("zIndex",-2).call(E),t=>t.call(E),t=>t.remove());let j=function(t){let e=-1/0,n=1/0;for(let[r,i]of t){let{animate:t={}}=r,{data:o}=i,{enter:a={},update:l={},exit:s={}}=t,{type:u,duration:c=300,delay:f=0}=l,{type:p,duration:h=300,delay:d=0}=a,{type:y,duration:g=300,delay:v=0}=s;for(let t of o){let{updateType:r=u,updateDuration:i=c,updateDelay:o=f,enterType:a=p,enterDuration:l=h,enterDelay:s=d,exitDuration:m=g,exitDelay:b=v,exitType:x=y}=t;(void 0===r||r)&&(e=Math.max(e,i+o),n=Math.min(n,o)),(void 0===x||x)&&(e=Math.max(e,m+b),n=Math.min(n,b)),(void 0===a||a)&&(e=Math.max(e,l+s),n=Math.min(n,s))}}return e===-1/0?null:[n,e-n]}(s),A=!!j&&{duration:j[1]};for(let[,t]of ic(o,t=>`${t.type}-${t.position}`))t.forEach((t,e)=>t.index=e);let T=e.selectAll(RD(S$)).data(o,t=>`${t.type}-${t.position}-${t.index}`).join(t=>t.append("g").style("zIndex",({zIndex:t})=>t||-1).attr("className",S$).append(t=>IX(nt({animate:A,scale:h},t),u,a,r,s)),t=>t.transition(function(t,e,n){let{preserve:i=!1}=t;if(i)return;let{attributes:o}=IX(nt({animate:A,scale:h},t),u,a,r,s),[l]=n.childNodes;return l.update(o,!1)})).transitions();n.push(...T.flat().filter(nu));let C=e.selectAll(RD(SW)).data([l],()=>c).join(t=>t.append("rect").style("zIndex",0).style("fill","transparent").attr("className",SW).call(RL).call(RR,Array.from(s.keys())).call(RF,p),t=>t.call(RR,Array.from(s.keys())).call(t=>j?function(t,e){let[n,r]=e;t.transition(function(t,e,i){let{x:o,y:a,width:l,height:s}=i.style,{paddingLeft:u,paddingTop:c,innerWidth:f,innerHeight:p,marginLeft:h,marginTop:d}=t;return i.animate([{x:o,y:a,width:l,height:s},{x:u+h,y:c+d,width:f,height:p}],{delay:n,duration:r,fill:"both"})})}(t,j):RL(t)).call(RF,p)).transitions();for(let[o,a]of(n.push(...C.flat()),s.entries())){let{data:l}=a,{key:s,class:u,type:c}=o,f=e.select(`#${s}`),p=function(t,e,n,r,i){let[o]=Nm("shape",r),{data:a}=t,{defaultShape:l,data:s,shape:u}=e,c=s.map(t=>t.points),{theme:f,coordinate:p}=n,{type:h,style:d={}}=t,y=Object.assign(Object.assign({},i),{document:Nb(i),coordinate:p,theme:f});return e=>{let{shape:n=l}=d,{shape:r=n,points:i,seriesIndex:s,index:p}=e,g=Object.assign(Object.assign({},Rb(e,["shape","points","seriesIndex","index"])),{index:p}),v=s?s.map(t=>a[t]):a[p],m=s||p,b=gW(d,t=>R_(t,v,m,a)),x=u[r]?u[r](b,y):o(Object.assign(Object.assign({},b),{type:RI(t,r)}),y);return x(i,g,RP(f,h,r,l),c)}}(o,a,t,r,i),h=function(t,e,n,r){return Rj("enter",t,e,n,r)}(o,a,t,r),d=function(t,e,n,r){return Rj("update",t,e,n,r)}(o,a,t,r),y=function(t,e,n,r){return Rj("exit",t,e,n,r)}(o,a,t,r),g=function(t,e,n,r){return t.node().parentElement.findAll(t=>void 0!==t.style.facet&&t.style.facet===n&&t!==e.node()).flatMap(t=>t.getElementsByClassName(r))}(e,f,u,"element"),v=f.selectAll(RD(Sz)).selectFacetAll(g).data(l,t=>t.key,t=>t.groupKey).join(t=>t.append(p).attr("className",Sz).attr("markType",c).transition(function(t,e,n){return h(t,[n])}),t=>t.call(t=>{let e=t.parent(),n=function(t){let e=new Map;return n=>{if(e.has(n))return e.get(n);let r=t(n);return e.set(n,r),r}}(t=>{let[e,n]=t.getBounds().min;return[e,n]});t.transition(function(t,r,i){(function(t,e,n){if(!t.__facet__)return;let r=t.parentNode.parentNode,i=e.parentNode,[o,a]=n(r),[l,s]=n(i);!function(t,e){let n,{transform:r}=t.style;let i="none"===(n=r)||void 0===n?"":r;t.style.transform=`${i} ${e}`.trimStart()}(t,`translate(${o-l}, ${a-s})`),e.append(t)})(i,e,n);let o=p(t,r),a=d(t,[i],[o]);return null!==a?a:(i.nodeName===o.nodeName&&"g"!==o.nodeName?ns(i,o):(i.parentNode.replaceChild(o,i),o.className=Sz,o.markType=c,o.__data__=i.__data__),a)}).attr("markType",c).attr("className",Sz)}),t=>t.each(function(t,e,n){n.__removed__=!0}).transition(function(t,e,n){return y(t,[n])}).remove(),t=>t.append(p).attr("className",Sz).attr("markType",c).transition(function(t,e,n){let{__fromElements__:r}=n,i=d(t,r,[n]);return new gP(r,null,n.parentNode).transition(i).remove(),i}),t=>t.transition(function(t,e,n){let r=new gP([],n.__toData__,n.parentNode).append(p).attr("className",Sz).attr("markType",c).nodes();return d(t,[n],r)}).remove()).transitions();n.push(...v.flat())}(function(t,e,n,r,i){let[o]=Nm("labelTransform",r),{markState:a,labelTransform:l}=t,s=e.select(RD(SF)).node(),u=new Map,c=new Map,f=Array.from(a.entries()).flatMap(([n,o])=>{let{labels:a=[],key:l}=n,s=function(t,e,n,r,i){let[o]=Nm("shape",r),{data:a}=t,{data:l,defaultLabelShape:s}=e,u=l.map(t=>t.points),{theme:c,coordinate:f}=n,p=Object.assign(Object.assign({},i),{document:Nb(i),theme:c,coordinate:f});return t=>{let{index:e,points:n}=t,r=a[e],{formatter:i=t=>`${t}`,transform:l,style:f,render:h}=t,d=gW(Object.assign(Object.assign({},Rb(t,["formatter","transform","style","render"])),f),t=>R_(t,r,e,a)),{shape:y=s,text:g}=d,v=Rb(d,["shape","text"]),m="string"==typeof i?ef(i):i,b=Object.assign(Object.assign({},v),{text:m(g,r,e,a),datum:r}),x=o(Object.assign({type:`label.${y}`,render:h},v),p);return x(n,b,RP(c,"label",y,"label"),u)}}(n,o,t,r,i),f=e.select(`#${l}`).selectAll(RD(Sz)).nodes().filter(t=>!t.__removed__);return a.flatMap((t,e)=>{let{transform:n=[]}=t,r=Rb(t,["transform"]);return f.flatMap(n=>{let i=function(t,e,n){let{seriesIndex:r,seriesKey:i,points:o,key:a,index:l}=n.__data__,s=function(t){let e=t.cloneNode(),n=t.getAnimations();e.style.visibility="hidden",n.forEach(t=>{let n=t.effect.getKeyframes();e.attr(n[n.length-1])}),t.parentNode.appendChild(e);let r=e.getLocalBounds();e.destroy();let{min:i,max:o}=r;return[i,o]}(n);if(!r)return[Object.assign(Object.assign({},t),{key:`${a}-${e}`,bounds:s,index:l,points:o,dependentElement:n})];let u=function(t){let{selector:e}=t;if(!e)return null;if("function"==typeof e)return e;if("first"===e)return t=>[t[0]];if("last"===e)return t=>[t[t.length-1]];throw Error(`Unknown selector: ${e}`)}(t),c=r.map((r,a)=>Object.assign(Object.assign({},t),{key:`${i[a]}-${e}`,bounds:[o[a]],index:r,points:o,dependentElement:n}));return u?u(c):c}(r,e,n);return i.forEach(e=>{u.set(e,s),c.set(e,t)}),i})})}),p=g_(s).selectAll(RD(SG)).data(f,t=>t.key).join(t=>t.append(t=>u.get(t)(t)).attr("className",SG),t=>t.each(function(t,e,n){ns(n,u.get(t)(t))}),t=>t.remove()).nodes(),h=iu(p,t=>c.get(t.__data__)),{coordinate:d}=t;for(let[t,e]of h){let{transform:n=[]}=t;no(n.map(o))(e,d)}l&&l(p,d)})(t,e,n,r,i)})}function R_(t,e,n,r){return"function"==typeof t?t(e,n,r):"string"!=typeof t?t:void 0!==e[t]?e[t]:t}function RP(t,e,n,r){if("string"!=typeof e)return;let{color:i}=t,o=t[e]||{};return Object.assign({color:i},o[n]||o[r])}function Rj(t,e,n,r,i){var o,a;let[,l]=Nm("shape",i),[s]=Nm("animation",i),{defaultShape:u,shape:c}=n,{theme:f,coordinate:p}=r,h=oR(t),d=`default${h}Animation`,{[d]:y}=(null===(o=c[u])||void 0===o?void 0:o.props)||l(RI(e,u)).props,{[t]:g={}}=f,v=(null===(a=e.animate)||void 0===a?void 0:a[t])||{},m={coordinate:p};return(e,n,r)=>{let{[`${t}Type`]:i,[`${t}Delay`]:o,[`${t}Duration`]:a,[`${t}Easing`]:l}=e,u=Object.assign({type:i||y},v);if(!u.type)return null;let c=s(u,m),f=c(n,r,nt(g,{delay:o,duration:a,easing:l}));return Array.isArray(f)?f:[f]}}function RA(t){return t.finished.then(()=>{t.cancel()}),t}function RT(t={}){if("string"==typeof t)return{type:t};let{type:e="light"}=t;return Object.assign(Object.assign({},Rb(t,["type"])),{type:e})}function RC(t){let{interaction:e={}}=t;return Object.entries(nt({event:!0,tooltip:!0,sliderFilter:!0,legendFilter:!0,scrollbarFilter:!0},e)).reverse()}function RN(t,e){return Rm(this,void 0,void 0,function*(){let{data:n}=t,r=Rb(t,["data"]);if(void 0==n)return t;let[,{data:i}]=yield Ra([],{data:n},{library:e});return Object.assign({data:i},r)})}function RL(t){t.style("x",t=>t.paddingLeft+t.marginLeft).style("y",t=>t.paddingTop+t.marginTop).style("width",t=>t.innerWidth).style("height",t=>t.innerHeight)}function RI(t,e){let{type:n}=t;return"string"==typeof e?`${n}.${e}`:e}function RR(t,e){let n=t=>void 0!==t.class?`${t.class}`:"";if(0!==t.nodes().length)t.selectAll(RD(SD)).data(e,t=>t.key).join(t=>t.append("g").attr("className",SD).attr("id",t=>t.key).style("facet",n).style("fill","transparent").style("zIndex",t=>{var e;return null!==(e=t.zIndex)&&void 0!==e?e:0}),t=>t.style("facet",n).style("fill","transparent").style("zIndex",t=>{var e;return null!==(e=t.zIndex)&&void 0!==e?e:0}),t=>t.remove()),!t.select(RD(SF)).node()&&t.append("g").attr("className",SF).style("zIndex",0)}function RD(...t){return t.map(t=>`.${t}`).join("")}function RF(t,e){t.node()&&t.style("clipPath",t=>{if(!e)return null;let{paddingTop:n,paddingLeft:r,marginLeft:i,marginTop:o,innerWidth:a,innerHeight:l}=t;return new yp({style:{x:r+i,y:n+o,width:a,height:l}})})}function Rz(t){let e=nt({},t),n=new Map([[e,null]]),r=new Map([[null,-1]]),i=[e];for(;i.length;){let t=i.shift();if(void 0===t.key){let e=n.get(t),i=r.get(t),o=null===e?"0":`${e.key}-${i}`;t.key=o}let{children:e=[]}=t;if(Array.isArray(e))for(let o=0;o<e.length;o++){let a=nt({},e[o]);e[o]=a,n.set(a,t),r.set(a,o),i.push(a)}}return e}function RB(t,e={},n=()=>{},r=t=>{throw t}){let{width:i=640,height:o=480,depth:a=0}=t,l=Rz(t),{canvas:s=function(t,e){let n=new CH;return n.registerPlugin(new Cq),new yS({width:t,height:e,container:document.createElement("div"),renderer:n})}(i,o),emitter:u=new CX,library:c}=e;e.canvas=s,e.emitter=u;let{width:f,height:p}=s.getConfig();(f!==i||p!==o)&&s.resize(i,o),u.emit(_k.BEFORE_RENDER);let h=g_(s.document.documentElement);return s.ready.then(()=>Rx(Object.assign(Object.assign({},l),{width:i,height:o,depth:a}),h,c,e)).then(()=>{if(a){let[t,e]=s.document.documentElement.getPosition();s.document.documentElement.setPosition(t,e,-a/2)}s.requestAnimationFrame(()=>{u.emit(_k.AFTER_RENDER),null==n||n()})}).catch(t=>{null==r||r(t)}),function(t){return"string"==typeof t?document.getElementById(t):t}(s.getConfig().container)}function RW(t,e={},n=()=>{},r=t=>{throw t}){var i;let{width:o=640,height:a=480}=t,l=Rz(t),{group:s=new yo,emitter:u=new CX,library:c}=e;!(null==s?void 0:s.parentElement)&&nl("renderToMountedElement can't render chart to unmounted group.");let f=g_(s);return e.group=s,e.emitter=u,e.canvas=e.canvas||(null===(i=null==s?void 0:s.ownerDocument)||void 0===i?void 0:i.defaultView),u.emit(_k.BEFORE_RENDER),Rx(Object.assign(Object.assign({},l),{width:o,height:a}),f,c,e).then(()=>{var t;null===(t=e.canvas)||void 0===t||t.requestAnimationFrame(()=>{u.emit(_k.AFTER_RENDER),null==n||n()})}).catch(t=>{null==r||r(t)}),s}function R$(t,e={},n=!1){let{canvas:r,emitter:i}=e;r&&(function(t){let e=t.getRoot().querySelectorAll(`.${SB}`);null==e||e.forEach(t=>{let{nameInteraction:e=new Map}=t;(null==e?void 0:e.size)>0&&Array.from(null==e?void 0:e.values()).forEach(t=>{null==t||t.destroy()})})}(r),n?r.destroy():r.destroyChildren()),i.off()}let RG=t=>t?parseInt(t):0;function RV(t,e){let n=[t];for(;n.length;){let t=n.shift();for(let r of(e&&e(t),t.children||[]))n.push(r)}}class RH{constructor(t={},e){this.parentNode=null,this.children=[],this.index=0,this.type=e,this.value=t}map(t=t=>t){let e=t(this.value);return this.value=e,this}attr(t,e){return 1==arguments.length?this.value[t]:this.map(n=>(n[t]=e,n))}append(t){let e=new t({});return e.children=[],this.push(e),e}push(t){return t.parentNode=this,t.index=this.children.length,this.children.push(t),this}remove(){let t=this.parentNode;if(t){let{children:e}=t,n=e.findIndex(t=>t===this);e.splice(n,1)}return this}getNodeByKey(t){let e=null;return RV(this,n=>{t===n.attr("key")&&(e=n)}),e}getNodesByType(t){let e=[];return RV(this,n=>{t===n.type&&e.push(n)}),e}getNodeByType(t){let e=null;return RV(this,n=>{!e&&t===n.type&&(e=n)}),e}call(t,...e){return t(this.map(),...e),this}getRoot(){let t=this;for(;t&&t.parentNode;)t=t.parentNode;return t}}var RU=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let Rq=["width","height","depth","padding","paddingLeft","paddingRight","paddingBottom","paddingTop","inset","insetLeft","insetRight","insetTop","insetBottom","margin","marginLeft","marginRight","marginTop","marginBottom","autoFit","theme","title"],RY="__remove__",RX="__callback__";function RK(t){return Object.assign(Object.assign({},t.value),{type:t.type})}function RZ(t,e){let{width:n,height:r,autoFit:i,depth:o=0}=t,a=640,l=480;if(i){let{width:t,height:n}=function(t){let e=getComputedStyle(t),n=t.clientWidth||RG(e.width),r=t.clientHeight||RG(e.height),i=RG(e.paddingLeft)+RG(e.paddingRight);return{width:n-i,height:r-(RG(e.paddingTop)+RG(e.paddingBottom))}}(e);a=t||a,l=n||l}return a=n||a,l=r||l,{width:Math.max(gz(a)?a:1,1),height:Math.max(gz(l)?l:1,1),depth:o}}function RQ(t){return e=>{for(let[n,r]of Object.entries(t)){let{type:t}=r;"value"===t?!function(t,e,{key:n=e}){t.prototype[e]=function(t){return 0==arguments.length?this.attr(n):this.attr(n,t)}}(e,n,r):"array"===t?!function(t,e,{key:n=e}){t.prototype[e]=function(t){if(0==arguments.length)return this.attr(n);if(Array.isArray(t))return this.attr(n,t);let e=[...this.attr(n)||[],t];return this.attr(n,e)}}(e,n,r):"object"===t?!function(t,e,{key:n=e}){t.prototype[e]=function(t,e){if(0==arguments.length)return this.attr(n);if(1==arguments.length&&"string"!=typeof t)return this.attr(n,t);let r=this.attr(n)||{};return r[t]=1==arguments.length||e,this.attr(n,r)}}(e,n,r):"node"===t?!function(t,e,{ctor:n}){t.prototype[e]=function(t){let r=this.append(n);return"mark"===e&&(r.type=t),r}}(e,n,r):"container"===t?!function(t,e,{ctor:n}){t.prototype[e]=function(){return this.type=null,this.append(n)}}(e,n,r):"mix"===t&&!function(t,e,n){t.prototype[e]=function(t){if(0==arguments.length)return this.attr(e);if(Array.isArray(t))return this.attr(e,{items:t});if(nd(t)&&(void 0!==t.title||void 0!==t.items)||null===t||!1===t)return this.attr(e,t);let n=this.attr(e)||{},{items:r=[]}=n;return r.push(t),n.items=r,this.attr(e,n)}}(e,n,0)}return e}}function RJ(t){return Object.fromEntries(Object.entries(t).map(([t,e])=>[t,{type:"node",ctor:e}]))}let R0={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"}},R1=Object.assign(Object.assign({},R0),{tooltip:{type:"mix"},viewStyle:{type:"object"}}),R2=Object.assign(Object.assign({},R0),{labelTransform:{type:"array"}}),R5=class extends RH{changeData(t){var e;let n=this.getRoot();if(n)return this.attr("data",t),(null===(e=this.children)||void 0===e?void 0:e.length)&&this.children.forEach(e=>{e.attr("data",t)}),null==n?void 0:n.render()}getView(){let{views:t}=this.getRoot().getContext();if(null==t?void 0:t.length)return t.find(t=>t.key===this._key)}getScale(){var t;return null===(t=this.getView())||void 0===t?void 0:t.scale}getScaleByChannel(t){let e=this.getScale();if(e)return e[t]}getCoordinate(){var t;return null===(t=this.getView())||void 0===t?void 0:t.coordinate}getTheme(){var t;return null===(t=this.getView())||void 0===t?void 0:t.theme}getGroup(){let t=this._key;if(!!t)return this.getRoot().getContext().canvas.getRoot().getElementById(t)}show(){let t=this.getGroup();t&&(t.isVisible()||SX(t))}hide(){let t=this.getGroup();t&&t.isVisible()&&SY(t)}};R5=function(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var l=t.length-1;l>=0;l--)(i=t[l])&&(a=(o<3?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a}([RQ(R2)],R5);let R3=class extends RH{changeData(t){let e=this.getRoot();if(e)return this.attr("data",t),null==e?void 0:e.render()}getMark(){var t;let e=null===(t=this.getRoot())||void 0===t?void 0:t.getView();if(!e)return;let{markState:n}=e,r=Array.from(n.keys()).find(t=>t.key===this.attr("key"));return n.get(r)}getScale(){var t;let e=null===(t=this.getRoot())||void 0===t?void 0:t.getView();if(e)return null==e?void 0:e.scale}getScaleByChannel(t){var e,n;let r=null===(e=this.getRoot())||void 0===e?void 0:e.getView();if(r)return null===(n=null==r?void 0:r.scale)||void 0===n?void 0:n[t]}getGroup(){let t=this.attr("key");if(!!t)return this.getRoot().getContext().canvas.getRoot().getElementById(t)}};R3=function(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var l=t.length-1;l>=0;l--)(i=t[l])&&(a=(o<3?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a}([RQ(R1)],R3);let R4={};function R6(t,e){Object.assign(R4,{[t]:e})}var R8=function(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var l=t.length-1;l>=0;l--)(i=t[l])&&(a=(o<3?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a},R9=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};class R7 extends R5{constructor(t){let{container:e,canvas:n,renderer:r,plugins:i,lib:o}=t;super(R9(t,["container","canvas","renderer","plugins","lib"]),"view"),this._hasBindAutoFit=!1,this._rendering=!1,this._trailing=!1,this._trailingResolve=null,this._trailingReject=null,this._previousDefinedType=null,this._onResize=CY(()=>{this.forceFit()},300),this._renderer=r||new CH,this._plugins=i||[],this._container=function(t){if(void 0===t){let t=document.createElement("div");return t[RY]=!0,t}return"string"==typeof t?document.getElementById(t):t}(e),this._emitter=new CX,this._context={library:Object.assign(Object.assign({},o),R4),emitter:this._emitter,canvas:n},this._create()}render(){let t,e;if(this._rendering)return this._addToTrailing();!this._context.canvas&&this._createCanvas(),this._context.canvas.getConfig().supportsCSSTransform=!0,this._bindAutoFit(),this._rendering=!0;let n=new Promise((t,e)=>RB(this._computedOptions(),this._context,this._createResolve(t),this._createReject(e)));let[r,i,o]=[new Promise((n,r)=>{e=n,t=r}),e,t];return n.then(i).catch(o).then(()=>this._renderTrailing()),r}options(t){if(0==arguments.length)return function(t){let e=function(t){if(null!==t.type)return t;let e=t.children[t.children.length-1];for(let n of Rq)e.attr(n,t.attr(n));return e}(t),n=[e],r=new Map;for(r.set(e,RK(e));n.length;){let t=n.pop(),e=r.get(t),{children:i=[]}=t;for(let t of i)if(t.type===RX)e.children=t.value;else{let i=RK(t),{children:o=[]}=e;o.push(i),n.push(t),r.set(t,i),e.children=o}}return r.get(e)}(this);let{type:e}=t;return e&&(this._previousDefinedType=e),!function(t,e,n,r,i){let o=function(t,e,n,r,i){var o,a,l,s;let{type:u}=t,{type:c=n||u}=e;if(o=c,a=i,"function"!=typeof o&&new Set(Object.keys(a)).has(o)){for(let n of Rq)void 0!==t.attr(n)&&void 0===e[n]&&(e[n]=t.attr(n));return e}if(l=c,s=r,"function"==typeof l||new Set(Object.keys(s)).has(l)){let t={type:"view"},n=Object.assign({},e);for(let e of Rq)void 0!==n[e]&&(t[e]=n[e],delete n[e]);return Object.assign(Object.assign({},t),{children:[n]})}return e}(t,e,n,r,i),a=[[null,t,o]];for(;a.length;){let[t,e,n]=a.shift();if(e){if(n){!function(t,e){let{type:n,children:r}=e,i=RU(e,["type","children"]);t.type===n||void 0===n?!function t(e,n,r=5,i=0){if(!(i>=r)){for(let o of Object.keys(n)){let a=n[o];e7(a)&&e7(e[o])?t(e[o],a,r,i+1):e[o]=a}return e}}(t.value,i):"string"==typeof n&&(t.type=n,t.value=i)}(e,n);let{children:t}=n,{children:r}=e;if(Array.isArray(t)&&Array.isArray(r)){let n=Math.max(t.length,r.length);for(let i=0;i<n;i++){let n=t[i],o=r[i];a.push([e,o,n])}}else"function"==typeof t&&a.push([e,null,t])}else e.remove()}else!function(t,e,n,r){if(!t)return;let i=[[t,e]];for(;i.length;){let[t,e]=i.shift(),o=function(t,e,n){if("function"==typeof t){let e=new RH;return e.value=t,e.type=RX,e}let{type:r,children:i}=t,o=RU(t,["type","children"]),a=new(function(t,e,n){if("function"==typeof t)return e.mark;let r=Object.assign(Object.assign({},e),n)[t];if(!r)throw Error(`Unknown mark: ${t}.`);return r}(r,e,n));return a.value=o,a.type=r,a}(e,n,r);Array.isArray(t.children)&&t.push(o);let{children:a}=e;if(Array.isArray(a))for(let t of a)i.push([o,t]);else"function"==typeof a&&i.push([o,a])}}(t,n,r,i)}}(this,t,this._previousDefinedType,this._marks,this._compositions),this}getContainer(){return this._container}getContext(){return this._context}on(t,e,n){return this._emitter.on(t,e,n),this}once(t,e){return this._emitter.once(t,e),this}emit(t,...e){return this._emitter.emit(t,...e),this}off(t,e){return this._emitter.off(t,e),this}clear(){let t=this.options();this.emit(_k.BEFORE_CLEAR),this._reset(),R$(t,this._context,!1),this.emit(_k.AFTER_CLEAR)}destroy(){let t=this.options();this.emit(_k.BEFORE_DESTROY),this._unbindAutoFit(),this._reset(),R$(t,this._context,!0),this._container[RY]&&!function(t){let e=t.parentNode;e&&e.removeChild(t)}(this._container),this.emit(_k.AFTER_DESTROY)}forceFit(){this.options.autoFit=!0;let{width:t,height:e}=RZ(this.options(),this._container);if(t===this._width&&e===this._height)return Promise.resolve(this);this.emit(_k.BEFORE_CHANGE_SIZE);let n=this.render();return n.then(()=>{this.emit(_k.AFTER_CHANGE_SIZE)}),n}changeSize(t,e){if(t===this._width&&e===this._height)return Promise.resolve(this);this.emit(_k.BEFORE_CHANGE_SIZE),this.attr("width",t),this.attr("height",e);let n=this.render();return n.then(()=>{this.emit(_k.AFTER_CHANGE_SIZE)}),n}_create(){let{library:t}=this._context,e=["mark.mark",...Object.keys(t).filter(t=>t.startsWith("mark.")||"component.axisX"===t||"component.axisY"===t||"component.legends"===t)];for(let t of(this._marks={},e)){let e=t.split(".").pop();class n extends R3{constructor(){super({},e)}}this._marks[e]=n,this[e]=function(t){let r=this.append(n);return"mark"===e&&(r.type=t),r}}let n=["composition.view",...Object.keys(t).filter(t=>t.startsWith("composition.")&&"composition.mark"!==t)];for(let t of(this._compositions=Object.fromEntries(n.map(t=>{let e=t.split(".").pop(),n=class extends R5{constructor(){super({},e)}};return[e,n=R8([RQ(RJ(this._marks))],n)]})),Object.values(this._compositions)))RQ(RJ(this._compositions))(t);for(let t of n){let e=t.split(".").pop();this[e]=function(){let t=this._compositions[e];return this.type=null,this.append(t)}}}_reset(){let t=["theme","type","width","height","autoFit"];this.type="view",this.value=Object.fromEntries(Object.entries(this.value).filter(([e])=>e.startsWith("margin")||e.startsWith("padding")||e.startsWith("inset")||t.includes(e))),this.children=[]}_renderTrailing(){this._trailing&&(this._trailing=!1,this.render().then(()=>{let t=this._trailingResolve.bind(this);this._trailingResolve=null,t(this)}).catch(t=>{let e=this._trailingReject.bind(this);this._trailingReject=null,e(t)}))}_createResolve(t){return()=>{this._rendering=!1,t(this)}}_createReject(t){return e=>{this._rendering=!1,t(e)}}_computedOptions(){let t=this.options(),{key:e="G2_CHART_KEY"}=t,{width:n,height:r,depth:i}=RZ(t,this._container);return this._width=n,this._height=r,this._key=e,Object.assign(Object.assign({key:this._key},t),{width:n,height:r,depth:i})}_createCanvas(){let{width:t,height:e}=RZ(this.options(),this._container);this._plugins.push(new Cq),this._plugins.forEach(t=>this._renderer.registerPlugin(t)),this._context.canvas=new yS({container:this._container,width:t,height:e,renderer:this._renderer})}_addToTrailing(){var t;return null===(t=this._trailingResolve)||void 0===t||t.call(this,this),this._trailing=!0,new Promise((t,e)=>{this._trailingResolve=t,this._trailingReject=e})}_bindAutoFit(){let{autoFit:t}=this.options();if(this._hasBindAutoFit){!t&&this._unbindAutoFit();return}t&&(this._hasBindAutoFit=!0,window.addEventListener("resize",this._onResize))}_unbindAutoFit(){this._hasBindAutoFit&&(this._hasBindAutoFit=!1,window.removeEventListener("resize",this._onResize))}}function Dt(t){let{type:e}=t;return"string"==typeof e&&["stackY","dodgeX","groupX"].includes(e)}let De=t=>(e,n,r)=>{let{encode:i,transform:o=[]}=n;if(o.some(Dt))return[e,n];let{x:a,y:l}=i;if(void 0===a||void 0===l)return[e,n];let{series:s}=t;return jb({groupBy:s?["x","series"]:"x"})(e,n,r)};De.props={};let Dn=()=>(t,e)=>{let{encode:n}=e,{z:r}=n;return void 0!==r?[t,e]:[t,nt({},e,{encode:{z:nw(nk(t,0))},scale:{z:{guide:null}}})]};Dn.props={},dX.enableCSSParsing=!1;let Dr=TQ(R7,Object.assign({},TZ()));var Di=n("156"),Do=n.n(Di),Da=n("350"),Dl=n.t(Da,2),Ds=function(){return(Ds=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n],e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},Du=Ds({},Dl),Dc=Du.version,Df=Du.render;Du.unmountComponentAtNode;try{Number((Dc||"").split(".")[0])>=18&&(ed=Du.createRoot)}catch(t){}function Dp(t){var e=Du.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;e&&"object"==typeof e&&(e.usingClientEntryPoint=t)}var Dh="__rc_react_root__",Dd=new Map;Dd.set("tooltip",document.createElement("div"));var Dy=function(t,e){void 0===e&&(e=!1);var n=null;if(e)n=Dd.get("tooltip");else if(n=document.createElement("div"),null==t?void 0:t.key){var r=Dd.get(t.key);r?n=r:Dd.set(t.key,n)}return!function(t,e){if(ed){var n,r,i;n=t,r=e,Dp(!0),i=r[Dh]||ed(r),Dp(!1),i.render(n),r[Dh]=i;return}Df(t,e)}(t,n),n},Dg=function(t){var e=t.attachShadow({mode:"open"}),n=document.createElement("div"),r=document.createElement("style");r.innerHTML=".loading {\n display: inline-block;\n position: relative;\n width: 80px;\n height: 80px;\n }\n .loading div {\n position: absolute;\n top: 33px;\n width: 13px;\n height: 13px;\n border-radius: 50%;\n background: #ccc;\n animation-timing-function: cubic-bezier(0, 1, 1, 0);\n }\n .loading div:nth-child(1) {\n left: 8px;\n animation: loading1 0.6s infinite;\n }\n .loading div:nth-child(2) {\n left: 8px;\n animation: loading2 0.6s infinite;\n }\n .loading div:nth-child(3) {\n left: 32px;\n animation: loading2 0.6s infinite;\n }\n .loading div:nth-child(4) {\n left: 56px;\n animation: loading3 0.6s infinite;\n }\n @keyframes loading1 {\n 0% {\n transform: scale(0);\n }\n 100% {\n transform: scale(1);\n }\n }\n @keyframes loading3 {\n 0% {\n transform: scale(1);\n }\n 100% {\n transform: scale(0);\n }\n }\n @keyframes loading2 {\n 0% {\n transform: translate(0, 0);\n }\n 100% {\n transform: translate(24px, 0);\n }\n }\n ",n.classList.add("loading"),n.innerHTML="<div></div><div></div><div></div><div></div>",e.appendChild(r),e.appendChild(n)},Dv=function(t){var e=t.loadingTemplate,n=t.theme,r=Do().useRef(null);return Do().useEffect(function(){!e&&r.current&&Dg(r.current)},[]),Do().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:"dark"===(void 0===n?"light":n)?"rgb(20, 20, 20)":"rgb(255, 255, 255)"}},e?e:Do().createElement("div",{ref:r}))};var Dm=(Y=function(t,e){return(Y=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}Y(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),Db=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.state={hasError:!1},e.renderError=function(t){var n=e.props.errorTemplate;return"function"==typeof n?n(t):n||Do().createElement("h5",null,"组件出错了,请核查后重试: ",t.message)},e}return Dm(e,t),e.getDerivedStateFromError=function(t){return{hasError:!0,error:t}},e.getDerivedStateFromProps=function(t,e){return e.children!==t.children?{children:t.children,hasError:!1,error:void 0}:null},e.prototype.render=function(){return this.state.hasError?this.renderError(this.state.error):Do().createElement(Di.Fragment,null,this.props.children)},e}(Do().Component),Dx="object"==typeof global&&global&&global.Object===Object&&global,DO="object"==typeof self&&self&&self.Object===Object&&self,Dw=Dx||DO||Function("return this")(),DE=Dw.Symbol,Dk=Object.prototype,DM=Dk.hasOwnProperty,DS=Dk.toString,D_=DE?DE.toStringTag:void 0,DP=function(t){var e=DM.call(t,D_),n=t[D_];try{t[D_]=void 0;var r=!0}catch(t){}var i=DS.call(t);return r&&(e?t[D_]=n:delete t[D_]),i},Dj=Object.prototype.toString,DA=DE?DE.toStringTag:void 0,DT=function(t){var e;if(null==t)return void 0===t?"[object Undefined]":"[object Null]";return DA&&DA in Object(t)?DP(t):(e=t,Dj.call(e))},DC=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)},DN=function(t){if(!DC(t))return!1;var e=DT(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e},DL=Array.isArray,DI=function(t,e){return t===e||t!=t&&e!=e},DR=function(t,e){for(var n=t.length;n--;)if(DI(t[n][0],e))return n;return -1},DD=Array.prototype.splice;function DF(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}DF.prototype.clear=function(){this.__data__=[],this.size=0},DF.prototype.delete=function(t){var e=this.__data__,n=DR(e,t);return!(n<0)&&(n==e.length-1?e.pop():DD.call(e,n,1),--this.size,!0)},DF.prototype.get=function(t){var e=this.__data__,n=DR(e,t);return n<0?void 0:e[n][1]},DF.prototype.has=function(t){return DR(this.__data__,t)>-1},DF.prototype.set=function(t,e){var n=this.__data__,r=DR(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};var Dz=Dw["__core-js_shared__"];var DB=(X=/[^.]+$/.exec(Dz&&Dz.keys&&Dz.keys.IE_PROTO||""))?"Symbol(src)_1."+X:"",DW=Function.prototype.toString,D$=function(t){if(null!=t){try{return DW.call(t)}catch(t){}try{return t+""}catch(t){}}return""},DG=/^\[object .+?Constructor\]$/,DV=Object.prototype,DH=Function.prototype.toString,DU=DV.hasOwnProperty,Dq=RegExp("^"+DH.call(DU).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),DY=function(t){var e;return!!DC(t)&&(e=t,!DB||!(DB in e))&&(DN(t)?Dq:DG).test(D$(t))},DX=function(t,e){var n,r,i=(n=t,r=e,null==n?void 0:n[r]);return DY(i)?i:void 0},DK=DX(Dw,"Map"),DZ=DX(Object,"create"),DQ=Object.prototype.hasOwnProperty,DJ=Object.prototype.hasOwnProperty;function D0(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}D0.prototype.clear=function(){this.__data__=DZ?DZ(null):{},this.size=0},D0.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},D0.prototype.get=function(t){var e=this.__data__;if(DZ){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return DQ.call(e,t)?e[t]:void 0},D0.prototype.has=function(t){var e=this.__data__;return DZ?void 0!==e[t]:DJ.call(e,t)},D0.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=DZ&&void 0===e?"__lodash_hash_undefined__":e,this};var D1=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t},D2=function(t,e){var n=t.__data__;return D1(e)?n["string"==typeof e?"string":"hash"]:n.map};function D5(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}D5.prototype.clear=function(){this.size=0,this.__data__={hash:new D0,map:new(DK||DF),string:new D0}},D5.prototype.delete=function(t){var e=D2(this,t).delete(t);return this.size-=e?1:0,e},D5.prototype.get=function(t){return D2(this,t).get(t)},D5.prototype.has=function(t){return D2(this,t).has(t)},D5.prototype.set=function(t,e){var n=D2(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this};function D3(t){var e=this.__data__=new DF(t);this.size=e.size}D3.prototype.clear=function(){this.__data__=new DF,this.size=0},D3.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},D3.prototype.get=function(t){return this.__data__.get(t)},D3.prototype.has=function(t){return this.__data__.has(t)},D3.prototype.set=function(t,e){var n=this.__data__;if(n instanceof DF){var r=n.__data__;if(!DK||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new D5(r)}return n.set(t,e),this.size=n.size,this};function D4(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new D5;++e<n;)this.add(t[e])}D4.prototype.add=D4.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},D4.prototype.has=function(t){return this.__data__.has(t)};var D6=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1},D8=function(t,e){return t.has(e)},D9=function(t,e,n,r,i,o){var a=1&n,l=t.length,s=e.length;if(l!=s&&!(a&&s>l))return!1;var u=o.get(t),c=o.get(e);if(u&&c)return u==e&&c==t;var f=-1,p=!0,h=2&n?new D4:void 0;for(o.set(t,e),o.set(e,t);++f<l;){var d=t[f],y=e[f];if(r)var g=a?r(y,d,f,e,t,o):r(d,y,f,t,e,o);if(void 0!==g){if(g)continue;p=!1;break}if(h){if(!D6(e,function(t,e){if(!D8(h,e)&&(d===t||i(d,t,n,r,o)))return h.push(e)})){p=!1;break}}else if(!(d===y||i(d,y,n,r,o))){p=!1;break}}return o.delete(t),o.delete(e),p},D7=Dw.Uint8Array,Ft=function(t){var e=-1,n=Array(t.size);return t.forEach(function(t,r){n[++e]=[r,t]}),n},Fe=function(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=t}),n},Fn=DE?DE.prototype:void 0,Fr=Fn?Fn.valueOf:void 0,Fi=function(t,e,n,r,i,o,a){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)break;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":if(t.byteLength!=e.byteLength||!o(new D7(t),new D7(e)))break;return!0;case"[object Boolean]":case"[object Date]":case"[object Number]":return DI(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var l=Ft;case"[object Set]":var s=1&r;if(l||(l=Fe),t.size!=e.size&&!s)break;var u=a.get(t);if(u)return u==e;r|=2,a.set(t,e);var c=D9(l(t),l(e),r,i,o,a);return a.delete(t),c;case"[object Symbol]":if(Fr)return Fr.call(t)==Fr.call(e)}return!1},Fo=function(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t},Fa=function(t,e,n){var r=e(t);return DL(t)?r:Fo(r,n(t))},Fl=function(t,e){for(var n=-1,r=null==t?0:t.length,i=0,o=[];++n<r;){var a=t[n];e(a,n,t)&&(o[i++]=a)}return o},Fs=function(){return[]},Fu=Object.prototype.propertyIsEnumerable,Fc=Object.getOwnPropertySymbols,Ff=Fc?function(t){return null==t?[]:Fl(Fc(t=Object(t)),function(e){return Fu.call(t,e)})}:Fs,Fp=function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r},Fh=function(t){return null!=t&&"object"==typeof t},Fd=function(t){return Fh(t)&&"[object Arguments]"==DT(t)},Fy=Object.prototype,Fg=Fy.hasOwnProperty,Fv=Fy.propertyIsEnumerable,Fm=Fd(function(){return arguments}())?Fd:function(t){return Fh(t)&&Fg.call(t,"callee")&&!Fv.call(t,"callee")},Fb="object"==typeof exports&&exports&&!exports.nodeType&&exports,Fx=Fb&&"object"==typeof module&&module&&!module.nodeType&&module,FO=Fx&&Fx.exports===Fb?Dw.Buffer:void 0,Fw=FO?FO.isBuffer:void 0,FE=Fw||function(){return!1},Fk=/^(?:0|[1-9]\d*)$/,FM=function(t,e){var n=typeof t;return!!(e=null==e?0x1fffffffffffff:e)&&("number"==n||"symbol"!=n&&Fk.test(t))&&t>-1&&t%1==0&&t<e},FS=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=0x1fffffffffffff},F_={};F_["[object Float32Array]"]=F_["[object Float64Array]"]=F_["[object Int8Array]"]=F_["[object Int16Array]"]=F_["[object Int32Array]"]=F_["[object Uint8Array]"]=F_["[object Uint8ClampedArray]"]=F_["[object Uint16Array]"]=F_["[object Uint32Array]"]=!0,F_["[object Arguments]"]=F_["[object Array]"]=F_["[object ArrayBuffer]"]=F_["[object Boolean]"]=F_["[object DataView]"]=F_["[object Date]"]=F_["[object Error]"]=F_["[object Function]"]=F_["[object Map]"]=F_["[object Number]"]=F_["[object Object]"]=F_["[object RegExp]"]=F_["[object Set]"]=F_["[object String]"]=F_["[object WeakMap]"]=!1;var FP=function(t){return function(e){return t(e)}},Fj="object"==typeof exports&&exports&&!exports.nodeType&&exports,FA=Fj&&"object"==typeof module&&module&&!module.nodeType&&module,FT=FA&&FA.exports===Fj&&Dx.process,FC=function(){try{var t=FA&&FA.require&&FA.require("util").types;if(t)return t;return FT&&FT.binding&&FT.binding("util")}catch(t){}}(),FN=FC&&FC.isTypedArray,FL=FN?FP(FN):function(t){return Fh(t)&&FS(t.length)&&!!F_[DT(t)]},FI=Object.prototype.hasOwnProperty,FR=function(t,e){var n=DL(t),r=!n&&Fm(t),i=!n&&!r&&FE(t),o=!n&&!r&&!i&&FL(t),a=n||r||i||o,l=a?Fp(t.length,String):[],s=l.length;for(var u in t)(e||FI.call(t,u))&&!(a&&("length"==u||i&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||FM(u,s)))&&l.push(u);return l},FD=Object.prototype,FF=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||FD)},Fz=function(t,e){return function(n){return t(e(n))}},FB=Fz(Object.keys,Object),FW=Object.prototype.hasOwnProperty,F$=function(t){if(!FF(t))return FB(t);var e=[];for(var n in Object(t))FW.call(t,n)&&"constructor"!=n&&e.push(n);return e},FG=function(t){return null!=t&&FS(t.length)&&!DN(t)},FV=function(t){return FG(t)?FR(t):F$(t)},FH=function(t){return Fa(t,FV,Ff)},FU=Object.prototype.hasOwnProperty,Fq=function(t,e,n,r,i,o){var a=1&n,l=FH(t),s=l.length;if(s!=FH(e).length&&!a)return!1;for(var u=s;u--;){var c=l[u];if(!(a?c in e:FU.call(e,c)))return!1}var f=o.get(t),p=o.get(e);if(f&&p)return f==e&&p==t;var h=!0;o.set(t,e),o.set(e,t);for(var d=a;++u<s;){var y=t[c=l[u]],g=e[c];if(r)var v=a?r(g,y,c,e,t,o):r(y,g,c,t,e,o);if(!(void 0===v?y===g||i(y,g,n,r,o):v)){h=!1;break}d||(d="constructor"==c)}if(h&&!d){var m=t.constructor,b=e.constructor;m!=b&&"constructor"in t&&"constructor"in e&&!("function"==typeof m&&m instanceof m&&"function"==typeof b&&b instanceof b)&&(h=!1)}return o.delete(t),o.delete(e),h},FY=DX(Dw,"DataView"),FX=DX(Dw,"Promise"),FK=DX(Dw,"Set"),FZ=DX(Dw,"WeakMap"),FQ="[object Map]",FJ="[object Promise]",F0="[object Set]",F1="[object WeakMap]",F2="[object DataView]",F5=D$(FY),F3=D$(DK),F4=D$(FX),F6=D$(FK),F8=D$(FZ),F9=DT;(FY&&F9(new FY(new ArrayBuffer(1)))!=F2||DK&&F9(new DK)!=FQ||FX&&F9(FX.resolve())!=FJ||FK&&F9(new FK)!=F0||FZ&&F9(new FZ)!=F1)&&(F9=function(t){var e=DT(t),n="[object Object]"==e?t.constructor:void 0,r=n?D$(n):"";if(r)switch(r){case F5:return F2;case F3:return FQ;case F4:return FJ;case F6:return F0;case F8:return F1}return e});var F7=F9,zt="[object Arguments]",ze="[object Array]",zn="[object Object]",zr=Object.prototype.hasOwnProperty,zi=function(t,e,n,r,i,o){var a=DL(t),l=DL(e),s=a?ze:F7(t),u=l?ze:F7(e);s=s==zt?zn:s,u=u==zt?zn:u;var c=s==zn,f=u==zn,p=s==u;if(p&&FE(t)){if(!FE(e))return!1;a=!0,c=!1}if(p&&!c)return o||(o=new D3),a||FL(t)?D9(t,e,n,r,i,o):Fi(t,e,s,n,r,i,o);if(!(1&n)){var h=c&&zr.call(t,"__wrapped__"),d=f&&zr.call(e,"__wrapped__");if(h||d){var y=h?t.value():t,g=d?e.value():e;return o||(o=new D3),i(y,g,n,r,o)}}return!!p&&(o||(o=new D3),Fq(t,e,n,r,i,o))},zo=function t(e,n,r,i,o){return e===n||(null!=e&&null!=n&&(Fh(e)||Fh(n))?zi(e,n,r,i,t,o):e!=e&&n!=n)},za=function(t,e){return zo(t,e)},zl=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t},zs=function(){try{var t=DX(Object,"defineProperty");return t({},"",{}),t}catch(t){}}(),zu=function(t,e,n){"__proto__"==e&&zs?zs(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n},zc=Object.prototype.hasOwnProperty,zf=function(t,e,n){var r=t[e];(!(zc.call(t,e)&&DI(r,n))||void 0===n&&!(e in t))&&zu(t,e,n)},zp=function(t,e,n,r){var i=!n;n||(n={});for(var o=-1,a=e.length;++o<a;){var l=e[o],s=r?r(n[l],t[l],l,n,t):void 0;void 0===s&&(s=t[l]),i?zu(n,l,s):zf(n,l,s)}return n},zh=function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e},zd=Object.prototype.hasOwnProperty,zy=function(t){if(!DC(t))return zh(t);var e=FF(t),n=[];for(var r in t)!("constructor"==r&&(e||!zd.call(t,r)))&&n.push(r);return n},zg=function(t){return FG(t)?FR(t,!0):zy(t)},zv="object"==typeof exports&&exports&&!exports.nodeType&&exports,zm=zv&&"object"==typeof module&&module&&!module.nodeType&&module,zb=zm&&zm.exports===zv?Dw.Buffer:void 0,zx=zb?zb.allocUnsafe:void 0,zO=function(t,e){if(e)return t.slice();var n=t.length,r=zx?zx(n):new t.constructor(n);return t.copy(r),r},zw=function(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e},zE=Fz(Object.getPrototypeOf,Object),zk=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)Fo(e,Ff(t)),t=zE(t);return e}:Fs,zM=function(t){return Fa(t,zg,zk)},zS=Object.prototype.hasOwnProperty,z_=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&zS.call(t,"index")&&(n.index=t.index,n.input=t.input),n},zP=function(t){var e=new t.constructor(t.byteLength);return new D7(e).set(new D7(t)),e},zj=function(t,e){var n=e?zP(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)},zA=/\w*$/,zT=function(t){var e=new t.constructor(t.source,zA.exec(t));return e.lastIndex=t.lastIndex,e},zC=DE?DE.prototype:void 0,zN=zC?zC.valueOf:void 0,zL=function(t,e){var n=e?zP(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)},zI=function(t,e,n){var r,i=t.constructor;switch(e){case"[object ArrayBuffer]":return zP(t);case"[object Boolean]":case"[object Date]":return new i(+t);case"[object DataView]":return zj(t,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return zL(t,n);case"[object Map]":case"[object Set]":return new i;case"[object Number]":case"[object String]":return new i(t);case"[object RegExp]":return zT(t);case"[object Symbol]":;return r=t,zN?Object(zN.call(r)):{}}},zR=Object.create,zD=function(){function t(){}return function(e){if(!DC(e))return{};if(zR)return zR(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}(),zF=function(t){return"function"!=typeof t.constructor||FF(t)?{}:zD(zE(t))},zz=FC&&FC.isMap,zB=zz?FP(zz):function(t){return Fh(t)&&"[object Map]"==F7(t)},zW=FC&&FC.isSet,z$=zW?FP(zW):function(t){return Fh(t)&&"[object Set]"==F7(t)},zG="[object Arguments]",zV="[object Function]",zH="[object Object]",zU={};zU[zG]=zU["[object Array]"]=zU["[object ArrayBuffer]"]=zU["[object DataView]"]=zU["[object Boolean]"]=zU["[object Date]"]=zU["[object Float32Array]"]=zU["[object Float64Array]"]=zU["[object Int8Array]"]=zU["[object Int16Array]"]=zU["[object Int32Array]"]=zU["[object Map]"]=zU["[object Number]"]=zU[zH]=zU["[object RegExp]"]=zU["[object Set]"]=zU["[object String]"]=zU["[object Symbol]"]=zU["[object Uint8Array]"]=zU["[object Uint8ClampedArray]"]=zU["[object Uint16Array]"]=zU["[object Uint32Array]"]=!0,zU["[object Error]"]=zU[zV]=zU["[object WeakMap]"]=!1;var zq=function t(e,n,r,i,o,a){var l,s=1&n,u=2&n,c=4&n;if(r&&(l=o?r(e,i,o,a):r(e)),void 0!==l)return l;if(!DC(e))return e;var f=DL(e);if(f){if(l=z_(e),!s)return zw(e,l)}else{var p,h,d,y,g,v,m,b,x=F7(e),O=x==zV||"[object GeneratorFunction]"==x;if(FE(e))return zO(e,s);if(x==zH||x==zG||O&&!o){if(l=u||O?{}:zF(e),!s){;return u?(d=e,y=(p=l,h=e,p&&zp(h,zg(h),p)),zp(d,zk(d),y)):(m=e,b=(g=l,v=e,g&&zp(v,FV(v),g)),zp(m,Ff(m),b))}}else{if(!zU[x])return o?e:{};l=zI(e,x,s)}}a||(a=new D3);var w=a.get(e);if(w)return w;a.set(e,l),z$(e)?e.forEach(function(i){l.add(t(i,n,r,i,e,a))}):zB(e)&&e.forEach(function(i,o){l.set(o,t(i,n,r,o,e,a))});var E=c?u?zM:FH:u?zg:FV,k=f?void 0:E(e);return zl(k||e,function(i,o){k&&(i=e[o=i]),zf(l,o,t(i,n,r,o,e,a))}),l},zY=function(t){return zq(t,5)},zX=function(t){return"symbol"==typeof t||Fh(t)&&"[object Symbol]"==DT(t)},zK=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,zZ=/^\w*$/,zQ=function(t,e){if(DL(t))return!1;var n=typeof t;return!!("number"==n||"symbol"==n||"boolean"==n||null==t||zX(t))||zZ.test(t)||!zK.test(t)||null!=e&&t in Object(e)};function zJ(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw TypeError("Expected a function");var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=t.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(zJ.Cache||D5),n}zJ.Cache=D5;var z0=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,z1=/\\(\\)?/g;var z2=(Z=(K=zJ(function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(z0,function(t,n,r,i){e.push(r?i.replace(z1,"$1"):n||t)}),e},function(t){return 500===Z.size&&Z.clear(),t})).cache,K),z5=function(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i},z3=1/0,z4=DE?DE.prototype:void 0,z6=z4?z4.toString:void 0,z8=function t(e){if("string"==typeof e)return e;if(DL(e))return z5(e,t)+"";if(zX(e))return z6?z6.call(e):"";var n=e+"";return"0"==n&&1/e==-z3?"-0":n},z9=function(t){return null==t?"":z8(t)},z7=function(t,e){return DL(t)?t:zQ(t,e)?[t]:z2(z9(t))},Bt=1/0,Be=function(t){if("string"==typeof t||zX(t))return t;var e=t+"";return"0"==e&&1/t==-Bt?"-0":e},Bn=function(t,e){e=z7(e,t);for(var n=0,r=e.length;null!=t&&n<r;)t=t[Be(e[n++])];return n&&n==r?t:void 0},Br=function(t,e,n){var r=null==t?void 0:Bn(t,e);return void 0===r?n:r},Bi=function(){return(Bi=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n],e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},Bo=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n},Ba={}.toString,Bl=function(t,e){return Ba.call(t)==="[object "+e+"]"},Bs=function(t){return Array.isArray?Array.isArray(t):Bl(t,"Array")},Bu=function(t){var e=typeof t;return null!==t&&"object"===e||"function"===e},Bc=function(t,e){if(!!t){if(Bs(t))for(var n,r=0,i=t.length;r<i&&!1!==(n=e(t[r],r));r++);else if(Bu(t)){for(var o in t)if(t.hasOwnProperty(o)&&!1===(n=e(t[o],o)))break}}},Bf=function(t){if(!("object"==typeof(e=t)&&null!==e)||!Bl(t,"Object"))return!1;if(null===Object.getPrototypeOf(t))return!0;for(var e,n=t;null!==Object.getPrototypeOf(n);)n=Object.getPrototypeOf(n);return Object.getPrototypeOf(t)===n},Bp=Object.prototype.hasOwnProperty,Bh=function(t,e){if(null===t||!Bf(t))return{};var n={};return Bc(e,function(e){Bp.call(t,e)&&(n[e]=t[e])}),n},Bd=function(t){return Bl(t,"String")},By=function(t,e,n){for(var r=0,i=Bd(e)?e.split("."):e;t&&r<i.length;)t=t[i[r++]];return void 0===t||r<i.length?n:t},Bg=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)!function t(e,n,r,i){for(var o in r=r||0,i=i||5,n)if(function(t,e){if(Object.hasOwn)return Object.hasOwn(t,e);if(null==t)throw TypeError("Cannot convert undefined or null to object");return Object.prototype.hasOwnProperty.call(Object(t),e)}(n,o)){var a=n[o];null!==a&&Bf(a)?(!Bf(e[o])&&(e[o]={}),r<i?t(e[o],a,r+1,i):e[o]=n[o]):Bs(a)?(e[o]=[],e[o]=e[o].concat(a)):void 0!==a&&(e[o]=a)}}(t,e[r]);return t},Bv=function(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)},Bm=function(t,e){if(!Bv(t))return t;for(var n=[],r=0;r<t.length;r++){var i=t[r];e(i,r)&&n.push(i)}return n};function Bb(t,e){for(var n in e)e.hasOwnProperty(n)&&"constructor"!==n&&void 0!==e[n]&&(t[n]=e[n])}var Bx=function(t,e,n){if(!Bs(t)&&!Bf(t))return t;var r=n;return Bc(t,function(t,n){r=e(r,t,n)}),r};let BO={field:"value",size:[1,1],round:!1,padding:0,sort:(t,e)=>e.value-t.value,as:["x","y"],ignoreParentValue:!0},Bw="childNodeCount",BE="Invalid field: it must be a string!";var Bk=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let BM="sunburst",BS="markType",B_="path",BP="ancestor-node",Bj={id:BM,encode:{x:"x",y:"y",key:B_,color:BP,value:"value"},axis:{x:!1,y:!1},style:{[BS]:BM,stroke:"#fff",lineWidth:.5,fillOpacity:"fillOpacity",[Bw]:Bw,depth:"depth"},state:{active:{zIndex:2,stroke:"#000"},inactive:{zIndex:1,stroke:"#fff"}},legend:!1,interaction:{drillDown:!0},coordinate:{type:"polar",innerRadius:.2}},BA=t=>{let{encode:e,data:n=[],legend:r}=t,i=Bk(t,["encode","data","legend"]),o=Object.assign(Object.assign({},i.coordinate),{innerRadius:Math.max(By(i,["coordinate","innerRadius"],.2),1e-5)}),a=Object.assign(Object.assign({},Bj.encode),e),{value:l}=a;return[Bg({},Bj,Object.assign(Object.assign({type:"rect",data:function(t){let{data:e,encode:n}=t,{color:r,value:i}=n,o=function(t,e){var n,r,i,o;let a,l;n={},r=BO,i=e,r&&Bb(n,r),i&&Bb(n,i);let s=(e=n).as;if(!Bs(s)||2!==s.length)throw TypeError('Invalid as: it must be an array with 2 strings (e.g. [ "x", "y" ])!');try{a=function(t,e){let{field:n,fields:r}=t;if(Bd(n))return n;if(Bs(n))return console.warn(BE),n[0];if(console.warn(`${BE} will try to get fields instead.`),Bd(r))return r;if(Bs(r)&&r.length)return r[0];throw TypeError(BE)}(e)}catch(t){console.warn(t)}let u=(l=t,(function(){var t=1,e=1,n=0,r=!1;function i(i){var o,a,l=i.height+1;return i.x0=i.y0=n,i.x1=t,i.y1=e/l,i.eachBefore((o=e,a=l,function(t){t.children&&iC(t,t.x0,o*(t.depth+1)/a,t.x1,o*(t.depth+2)/a);var e=t.x0,r=t.y0,i=t.x1-n,l=t.y1-n;i<e&&(e=i=(e+i)/2),l<r&&(r=l=(r+l)/2),t.x0=e,t.y0=r,t.x1=i,t.y1=l})),r&&i.eachBefore(iz),i}return i.round=function(t){return arguments.length?(r=!!t,i):r},i.size=function(n){return arguments.length?(t=+n[0],e=+n[1],i):[t,e]},i.padding=function(t){return arguments.length?(n=+t,i):n},i})().size(e.size).round(e.round).padding(e.padding)(nJ(l).sum(t=>{var n,r;return(null==(r=n=t.children)?0:Bv(n)?n.length:Object.keys(n).length)?e.ignoreParentValue?0:t[a]-Bx(t.children,(t,e)=>t+e[a],0):t[a]}).sort(e.sort))),c=s[0],f=s[1];return u.each(t=>{var e,n;t[c]=[t.x0,t.x1,t.x1,t.x0],t[f]=[t.y1,t.y1,t.y0,t.y0],t.name=t.name||(null===(e=t.data)||void 0===e?void 0:e.name)||(null===(n=t.data)||void 0===n?void 0:n.label),t.data.name=t.name,["x0","x1","y0","y1"].forEach(e=>{-1===s.indexOf(e)&&delete t[e]})}),function(t){let e=[];if(t&&t.each){let n,r;t.each(t=>{var i,o;t.parent!==n?(n=t.parent,r=0):r+=1;let a=Bm(((null===(i=t.ancestors)||void 0===i?void 0:i.call(t))||[]).map(t=>e.find(e=>e.name===t.name)||t),({depth:e})=>e>0&&e<t.depth);t.nodeAncestor=a,t[Bw]=(null===(o=t.children)||void 0===o?void 0:o.length)||0,t.nodeIndex=r,e.push(t)})}else t&&t.eachNode&&t.eachNode(t=>{e.push(t)});return e}(u)}(e,{field:i,type:"hierarchy.partition",as:["x","y"]}),a=[];return o.forEach(t=>{var e,n,o,l;if(0===t.depth)return null;let s=t.data.name,u=[s],c=Object.assign({},t);for(;c.depth>1;)s=`${null===(e=c.parent.data)||void 0===e?void 0:e.name} / ${s}`,u.unshift(null===(n=c.parent.data)||void 0===n?void 0:n.name),c=c.parent;let f=Object.assign(Object.assign(Object.assign({},Bh(t.data,[i])),{[B_]:s,[BP]:c.data.name}),t);r&&r!==BP&&(f[r]=t.data[r]||(null===(l=null===(o=t.parent)||void 0===o?void 0:o.data)||void 0===l?void 0:l[r])),a.push(f)}),a.map(t=>Object.assign(Object.assign({},t),{x:t.x.slice(0,2),y:[t.y[2],t.y[0]],fillOpacity:Math.pow(.85,t.depth)}))}({encode:a,data:n}),encode:a,tooltip:{title:"path",items:[t=>({name:l,value:t[l]})]}},i),{coordinate:o}))]};BA.props={};var BT=Object.keys?function(t){return Object.keys(t)}:function(t){var e=[];return Bc(t,function(n,r){if(!("function"==typeof t&&"prototype"===r))e.push(r)}),e};let BC=t=>t.querySelectorAll(".element").filter(t=>By(t,["style",BS])===BM),BN={rootText:"root",style:{fill:"rgba(0, 0, 0, 0.85)",fontSize:12,y:1},active:{fill:"rgba(0, 0, 0, 0.5)"}};function BL(t={}){let{breadCrumb:e={},fixedColor:n=!0}=t,r=Bg({},BN,e);return t=>{let{update:e,setState:i,container:o,view:a,options:l}=t,s=g_(o).select(`.${SW}`).node(),{state:u}=l.marks.find(({id:t})=>t===BM),c=new yo;s.appendChild(c);let f=(t,o)=>{var l,u,p,h;return l=this,u=void 0,p=void 0,h=function*(){if(c.removeChildren(),t){let e=new yh({style:Object.assign({x:0,text:r.rootText,depth:0},r.style)});c.appendChild(e);let n="",i=null==t?void 0:t.split(" / "),o=r.style.y,a=c.getBBox().width,l=s.getBBox().width,u=i.map((t,e)=>{let i=new yh({style:Object.assign(Object.assign({x:a,text:" / "},r.style),{y:o})});c.appendChild(i),a+=i.getBBox().width;let s=new yh({name:(n=`${n}${t} / `).replace(/\s\/\s$/,""),style:Object.assign(Object.assign({text:t,x:a,depth:e+1},r.style),{y:o})});return c.appendChild(s),(a+=s.getBBox().width)>l&&(o=c.getBBox().height,a=0,i.attr({x:a,y:o}),a+=i.getBBox().width,s.attr({x:a,y:o}),a+=s.getBBox().width),s});[e,...u].forEach((t,e)=>{if(e===u.length)return;let n=Object.assign({},t.attributes);t.attr("cursor","pointer"),t.addEventListener("mouseenter",()=>{t.attr(r.active)}),t.addEventListener("mouseleave",()=>{t.attr(n)}),t.addEventListener("click",()=>{f(t.name,By(t,["style","depth"]))})})}i("drillDown",e=>{let{marks:r}=e,i=r.map(e=>{if(e.id!==BM&&"rect"!==e.type)return e;let{data:r}=e,i=Object.fromEntries(["color"].map(t=>[t,{domain:a.scale[t].getOptions().domain}])),l=r.filter(e=>{let r=e.path;return n&&(e[BP]=r.split(" / ")[o]),!t||RegExp(`^${t}.+`).test(r)});return Bg({},e,n?{data:l}:{data:l,scale:i})});return Object.assign(Object.assign({},e),{marks:i})}),yield e()},new(p||(p=Promise))(function(t,e){function n(t){try{i(h.next(t))}catch(t){e(t)}}function r(t){try{i(h.throw(t))}catch(t){e(t)}}function i(e){var i;e.done?t(e.value):((i=e.value)instanceof p?i:new p(function(t){t(i)})).then(n,r)}i((h=h.apply(l,u||[])).next())})},p=t=>{let e=t.target;if(By(e,["style",BS])!==BM||"rect"!==By(e,["markType"])||!By(e,["style",Bw]))return;let n=By(e,["__data__","key"]),r=By(e,["style","depth"]);e.style.cursor="pointer",f(n,r)};s.addEventListener("click",p);let h=BT(Object.assign(Object.assign({},u.active),u.inactive)),d=()=>{BC(s).forEach(t=>{let e=By(t,["style",Bw]);if("pointer"!==By(t,["style","cursor"])&&e){t.style.cursor="pointer";let e=Bh(t.attributes,h);t.addEventListener("mouseenter",()=>{t.attr(u.active)}),t.addEventListener("mouseleave",()=>{t.attr(Bg(e,u.inactive))})}})};return s.addEventListener("mousemove",d),()=>{c.remove(),s.removeEventListener("click",p),s.removeEventListener("mousemove",d)}}}dX.enableCSSParsing=!1;var BI=function(){return(BI=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n],e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},BR=TQ(R7,BI(BI({},TZ()),{"interaction.drillDown":BL,"mark.sunburst":BA})),BD=function(t){return!0===t||!1===t||Fh(t)&&"[object Boolean]"==DT(t)},BF=function(){return(BF=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n],e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},Bz=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n},BB=["renderer"],BW=["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"],B$="__transform__",BG=function(t,e){return BD(e)?{type:t,available:e}:BF({type:t},e)},BV={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",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 BG("stackY",t)}},normalize:{target:"transform",value:function(t){return BG("normalizeY",t)}},percent:{target:"transform",value:function(t){return BG("normalizeY",t)}},group:{target:"transform",value:function(t){return BG("dodgeX",t)}},sort:{target:"transform",value:function(t){return BG("sortX",t)}},symmetry:{target:"transform",value:function(t){return BG("symmetryY",t)}},diff:{target:"transform",value:function(t){return BG("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 BD(t)?{connect:t}:t}}},BH=["xField","yField","seriesField","colorField","keyField","positionField","meta","tooltip","animate","stack","normalize","percent","group","sort","symmetry","diff"],BU=[{key:"annotations",extend_keys:[]},{key:"line",type:"line",extend_keys:BH},{key:"point",type:"point",extend_keys:BH},{key:"area",type:"area",extend_keys:BH}],Bq=[{key:"transform",callback:function(t,e,n){t[e]=t[e]||[];var r,i=n.available,o=Bz(n,["available"]);void 0===i||i?t[e].push(BF(((r={})[B$]=!0,r),o)):t[e].splice(t[e].indexOf(function(t){return t.type===n.type}),1)}},{key:"labels",callback:function(t,e,n){var r;if(!n||DL(n)){t[e]=n||[];return}!n.text&&(n.text=t.yField),t[e]=t[e]||[],t[e].push(BF(((r={})[B$]=!0,r),n))}}],BY=[{key:"conversionTag",shape:"ConversionTag"},{key:"axisText",shape:"BidirectionalBarAxisText"}];var BX=(Q=function(t,e){return(Q=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}Q(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),BK=function(){return(BK=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n],e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},BZ=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n},BQ=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=BZ(e,["style"]);return t.call(this,BK({style:BK({fill:"#eee"},n)},r))||this}return BX(e,t),e}(yc);var BJ=(J=function(t,e){return(J=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}J(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),B0=function(){return(B0=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n],e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},B1=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n},B2=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=B1(e,["style"]);return t.call(this,B0({style:B0({text:"",fontSize:12,textBaseline:"middle",textAlign:"center",fill:"#000",fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",lineWidth:1},n)},r))||this}return BJ(e,t),e}(yh),B5=function(t,e,n){(void 0!==n&&!DI(t[e],n)||void 0===n&&!(e in t))&&zu(t,e,n)};var B3=function(t,e,n){for(var r=-1,i=Object(t),o=n(t),a=o.length;a--;){var l=o[++r];if(!1===e(i[l],l,i))break}return t},B4=Object.prototype,B6=Function.prototype.toString,B8=B4.hasOwnProperty,B9=B6.call(Object),B7=function(t){if(!Fh(t)||"[object Object]"!=DT(t))return!1;var e=zE(t);if(null===e)return!0;var n=B8.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&B6.call(n)==B9},Wt=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]},We=function(t,e,n,r,i,o,a){var l=Wt(t,n),s=Wt(e,n),u=a.get(s);if(u){B5(t,n,u);return}var c=o?o(l,s,n+"",t,e,a):void 0,f=void 0===c;if(f){var p,h,d=DL(s),y=!d&&FE(s),g=!d&&!y&&FL(s);if(c=s,d||y||g){if(DL(l))c=l;else{;if(Fh(p=l)&&FG(p))c=zw(l);else y?(f=!1,c=zO(s,!0)):g?(f=!1,c=zL(s,!0)):c=[]}}else if(B7(s)||Fm(s)){if(c=l,Fm(l)){;c=zp(h=l,zg(h))}else(!DC(l)||DN(l))&&(c=zF(s))}else f=!1}f&&(a.set(s,c),i(c,s,r,o,a),a.delete(s)),B5(t,n,c)},Wn=function t(e,n,r,i,o){if(e!==n)B3(n,function(a,l){if(o||(o=new D3),DC(a))We(e,n,l,r,t,i,o);else{var s=i?i(Wt(e,l),a,l+"",e,n,o):void 0;void 0===s&&(s=a),B5(e,l,s)}},zg)},Wr=function(t){return t},Wi=function(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)},Wo=Math.max,Wa=function(t,e,n){return e=Wo(void 0===e?t.length-1:e,0),function(){for(var r=arguments,i=-1,o=Wo(r.length-e,0),a=Array(o);++i<o;)a[i]=r[e+i];i=-1;for(var l=Array(e+1);++i<e;)l[i]=r[i];return l[e]=n(a),Wi(t,this,l)}},Wl=Date.now;var Ws=(te=zs?function(t,e){var n;return zs(t,"toString",{configurable:!0,enumerable:!1,value:(n=e,function(){return n}),writable:!0})}:Wr,tn=0,tr=0,function(){var t=Wl(),e=16-(t-tr);if(tr=t,e>0){if(++tn>=800)return arguments[0]}else tn=0;return te.apply(void 0,arguments)}),Wu=function(t,e,n){if(!DC(n))return!1;var r=typeof e;return("number"==r?!!(FG(n)&&FM(e,n.length)):"string"==r&&e in n)&&DI(n[e],t)},Wc=function(t){var e,n;return Ws(Wa(e=function(e,n){var r=-1,i=n.length,o=i>1?n[i-1]:void 0,a=i>2?n[2]:void 0;for(o=t.length>3&&"function"==typeof o?(i--,o):void 0,a&&Wu(n[0],n[1],a)&&(o=i<3?void 0:o,i=1),e=Object(e);++r<i;){var l=n[r];l&&t(e,l,r,o)}return e},void 0,Wr),e+"")},Wf=Wc(function(t,e,n,r){Wn(t,e,n,r)}),Wp=function(t,e,n){if(n||2==arguments.length)for(var r,i=0,o=e.length;i<o;i++)(r||!(i in e))&&(!r&&(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))},Wh=function(t,e){if(DL(e))return e},Wd=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Wf.apply(void 0,Wp(Wp([],t,!1),[Wh],!1))};var Wy=(ti=function(t,e){return(ti=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}ti(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),Wg=function(t){function e(e,n,r){var i=t.call(this,{style:Wd(r,n)})||this;return i.chart=e,i}return Wy(e,t),e.prototype.connectedCallback=function(){this.render(this.attributes,this),this.bindEvents(this.attributes,this)},e.prototype.disconnectedCallback=function(){},e.prototype.attributeChangedCallback=function(t){},e.prototype.update=function(t,e){var n;return this.attr(Wd({},this.attributes,t||{})),null===(n=this.render)||void 0===n?void 0:n.call(this,this.attributes,this,e)},e.prototype.clear=function(){this.removeChildren()},e.prototype.getElementsLayout=function(){var t=this.chart.getContext().canvas.document.getElementsByClassName("element"),e=[];return t.forEach(function(t){var n=t.getBBox(),r=n.x,i=n.y,o=n.width,a=n.height,l=t.__data__;e.push({bbox:n,x:r,y:i,width:o,height:a,key:l.key,data:l})}),e},e.prototype.bindEvents=function(t,e){},e}(yr);var Wv=(to=function(t,e){return(to=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}to(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),Wm=function(){return(Wm=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n],e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},Wb=function(t){function e(n,r){return t.call(this,n,r,{type:e.tag})||this}return Wv(e,t),e.prototype.getConversionTagLayout=function(){var t="vertical"===this.direction,e=this.getElementsLayout(),n=e[0],r=n.x,i=n.y,o=n.height,a=n.width,l=n.data,s=["items",0,"value"],u=Br(l,s),c=t?e[1].y-i-o:e[1].x-r-a,f=[],p=this.attributes,h=p.size,d=void 0===h?40:h,y=p.arrowSize,g=void 0===y?20:y,v=p.spacing,m=void 0===v?4:v;return e.forEach(function(e,n){if(n>0){var r=e.x,i=e.y,o=e.height,a=e.width,l=e.data,p=e.key,h=Br(l,s),y=d/2;if(t){var v=r+a/2,b=i;f.push({points:[[v+y,b-c+m],[v+y,b-g-m],[v,b-m],[v-y,b-g-m],[v-y,b-c+m]],center:[v,b-c/2-m],width:c,value:[u,h],key:p})}else{var v=r,b=i+o/2;f.push({points:[[r-c+m,b-y],[r-g-m,b-y],[v-m,b],[r-g-m,b+y],[r-c+m,b+y]],center:[v-c/2-m,b],width:c,value:[u,h],key:p})}u=h}}),f},e.prototype.render=function(){this.setDirection(),this.drawConversionTag()},e.prototype.setDirection=function(){var t=Br(this.chart.getCoordinate(),"options.transformations"),e="horizontal";t.forEach(function(t){t.includes("transpose")&&(e="vertical")}),this.direction=e},e.prototype.drawConversionTag=function(){var t=this,e=this.getConversionTagLayout(),n=this.attributes,r=n.style,i=n.text,o=i.style,a=i.formatter;e.forEach(function(e){var n=e.points,i=e.center,l=e.value,s=e.key,u=l[0],c=l[1],f=i[0],p=i[1],h=new BQ({style:Wm({points:n,fill:"#eee"},r),id:"polygon-".concat(s)}),d=new B2({style:Wm({x:f,y:p,text:DN(a)?a(u,c):(c/u*100).toFixed(2)+"%"},o),id:"text-".concat(s)});t.appendChild(h),t.appendChild(d)})},e.prototype.update=function(){var t=this;this.getConversionTagLayout().forEach(function(e){var n=e.points,r=e.center,i=e.key,o=r[0],a=r[1],l=t.getElementById("polygon-".concat(i)),s=t.getElementById("text-".concat(i));l.setAttribute("points",n),s.setAttribute("x",o),s.setAttribute("y",a)})},e.tag="ConversionTag",e}(Wg),Wx=function(t,e,n,r){var i=n.length,o=i,a=!r;if(null==t)return!o;for(t=Object(t);i--;){var l=n[i];if(a&&l[2]?l[1]!==t[l[0]]:!(l[0]in t))return!1}for(;++i<o;){var s=(l=n[i])[0],u=t[s],c=l[1];if(a&&l[2]){if(void 0===u&&!(s in t))return!1}else{var f=new D3;if(r)var p=r(u,c,s,t,e,f);if(!(void 0===p?zo(c,u,3,r,f):p))return!1}}return!0},WO=function(t){return t==t&&!DC(t)},Ww=function(t){for(var e=FV(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,WO(i)]}return e},WE=function(t,e){return function(n){return null!=n&&n[t]===e&&(void 0!==e||t in Object(n))}},Wk=function(t){var e=Ww(t);return 1==e.length&&e[0][2]?WE(e[0][0],e[0][1]):function(n){return n===t||Wx(n,t,e)}},WM=function(t,e){return null!=t&&e in Object(t)},WS=function(t,e,n){e=z7(e,t);for(var r=-1,i=e.length,o=!1;++r<i;){var a=Be(e[r]);if(!(o=null!=t&&n(t,a)))break;t=t[a]}return o||++r!=i?o:!!(i=null==t?0:t.length)&&FS(i)&&FM(a,i)&&(DL(t)||Fm(t))},W_=function(t,e){return null!=t&&WS(t,e,WM)},WP=function(t){var e,n;return zQ(t)?(e=Be(t),function(t){return null==t?void 0:t[e]}):(n=t,function(t){return Bn(t,n)})},Wj=function(t){if("function"==typeof t)return t;if(null==t)return Wr;if("object"==typeof t){var e,n;return DL(t)?(e=t[0],n=t[1],zQ(e)&&WO(n)?WE(Be(e),n):function(t){var r=Br(t,e);return void 0===r&&r===n?W_(t,e):zo(n,r,3)}):Wk(t)}return WP(t)},WA=function(t,e,n,r){for(var i=t.length,o=n+(r?1:-1);r?o--:++o<i;)if(e(t[o],o,t))return o;return -1},WT=function(t){return t!=t},WC=function(t,e,n){for(var r=n-1,i=t.length;++r<i;)if(t[r]===e)return r;return -1},WN=function(t,e,n){return e==e?WC(t,e,n):WA(t,WT,n)},WL=function(t,e){return!!(null==t?0:t.length)&&WN(t,e,0)>-1},WI=function(t,e,n){for(var r=-1,i=null==t?0:t.length;++r<i;)if(n(e,t[r]))return!0;return!1},WR=function(){},WD=FK&&1/Fe(new FK([,-0]))[1]==1/0?function(t){return new FK(t)}:WR,WF=function(t,e,n){var r=-1,i=WL,o=t.length,a=!0,l=[],s=l;if(n)a=!1,i=WI;else if(o>=200){var u=e?null:WD(t);if(u)return Fe(u);a=!1,i=D8,s=new D4}else s=e?[]:l;n:for(;++r<o;){var c=t[r],f=e?e(c):c;if(c=n||0!==c?c:0,a&&f==f){for(var p=s.length;p--;)if(s[p]===f)continue n;e&&s.push(f),l.push(c)}else!i(s,f,n)&&(s!==l&&s.push(f),l.push(c))}return l},Wz=function(t,e){return t&&t.length?WF(t,Wj(e,2)):[]},WB=function(t,e,n,r){for(var i=-1,o=null==t?0:t.length;++i<o;){var a=t[i];e(r,a,n(a),t)}return r};var WW=(ta=function(t,e){return t&&B3(t,e,FV)},function(t,e){if(null==t)return t;if(!FG(t))return ta(t,e);for(var n=t.length,r=-1,i=Object(t);(tl?r--:++r<n)&&!1!==e(i[r],r,i););return t}),W$=function(t,e,n,r){return WW(t,function(t,i,o){e(r,t,n(t),o)}),r},WG=Object.prototype.hasOwnProperty;var WV=(ts=function(t,e,n){WG.call(t,n)?t[n].push(e):zu(t,n,[e])},function(t,e){var n=DL(t)?WB:W$,r={};return n(t,ts,Wj(e,2),r)});var WH=(tc=function(t,e){return(tc=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}tc(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),WU=function(){return(WU=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n],e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},Wq=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n},WY={ConversionTag:Wb,BidirectionalBarAxisText:function(t){function e(n,r){return t.call(this,n,r,{type:e.tag})||this}return WH(e,t),e.prototype.render=function(){this.drawText()},e.prototype.getBidirectionalBarAxisTextLayout=function(){var t="vertical"===this.attributes.layout,e=this.getElementsLayout(),n=t?Wz(e,"x"):Wz(e,"y"),r=["title"],i=[],o=Br(this.chart.getContext().views,[0,"layout"]),a=o.width,l=o.height;return n.forEach(function(e){var n=e.x,o=e.y,s=e.height,u=e.width,c=e.data,f=e.key,p=Br(c,r);t?i.push({x:n+u/2,y:l,text:p,key:f}):i.push({x:a,y:o+s/2,text:p,key:f})}),Wz(i,"text").length!==i.length&&(i=Object.values(WV(i,"text")).map(function(e){var n,r=e.reduce(function(e,n){return e+(t?n.x:n.y)},0);return WU(WU({},e[0]),((n={})[t?"x":"y"]=r/e.length,n))})),i},e.prototype.transformLabelStyle=function(t){var e={},n=/^label[A-Z]/;return Object.keys(t).forEach(function(r){n.test(r)&&(e[r.replace("label","").replace(/^[A-Z]/,function(t){return t.toLowerCase()})]=t[r])}),e},e.prototype.drawText=function(){var t=this,e=this.getBidirectionalBarAxisTextLayout(),n=this.attributes,r=n.layout,i=n.labelFormatter,o=Wq(n,["layout","labelFormatter"]);e.forEach(function(e){var n=e.x,a=e.y,l=e.text,s=e.key,u=new B2({style:WU({x:n,y:a,text:DN(i)?i(l):l,wordWrap:!0,wordWrapWidth:"horizontal"===r?64:120,maxLines:2,textOverflow:"ellipsis"},t.transformLabelStyle(o)),id:"text-".concat(s)});t.appendChild(u)})},e.prototype.update=function(){var t=this;this.getBidirectionalBarAxisTextLayout().forEach(function(e){var n=e.x,r=e.y,i=e.key,o=t.getElementById("text-".concat(i));o.setAttribute("x",n),o.setAttribute("y",r)})},e.tag="BidirectionalBarAxisText",e}(Wg)},WX=function(){function t(t,e){this.container=new Map,this.chart=t,this.config=e,this.init()}return t.prototype.init=function(){var t=this;BY.forEach(function(e){var n,r=e.key,i=e.shape,o=t.config[r];if(o){var a=new WY[i](t.chart,o);t.chart.getContext().canvas.appendChild(a),t.container.set(r,a)}else null===(n=t.container.get(r))||void 0===n||n.clear()})},t.prototype.update=function(){var t=this;this.container.size&&BY.forEach(function(e){var n=e.key,r=t.container.get(n);null==r||r.update()})},t}(),WK=function(t,e,n,r){if(!DC(t))return t;e=z7(e,t);for(var i=-1,o=e.length,a=o-1,l=t;null!=l&&++i<o;){var s=Be(e[i]),u=n;if("__proto__"===s||"constructor"===s||"prototype"===s)break;if(i!=a){var c=l[s];void 0===(u=r?r(c,s,l):void 0)&&(u=DC(c)?c:FM(e[i+1])?[]:{})}zf(l,s,u),l=l[s]}return t},WZ=function(t,e,n){for(var r=-1,i=e.length,o={};++r<i;){var a=e[r],l=Bn(t,a);n(l,a)&&WK(o,z7(a,t),l)}return o},WQ=DE?DE.isConcatSpreadable:void 0,WJ=function(t){return DL(t)||Fm(t)||!!(WQ&&t&&t[WQ])},W0=function t(e,n,r,i,o){var a=-1,l=e.length;for(r||(r=WJ),o||(o=[]);++a<l;){var s=e[a];n>0&&r(s)?n>1?t(s,n-1,r,i,o):Fo(o,s):!i&&(o[o.length]=s)}return o},W1=function(t){return(null==t?0:t.length)?W0(t,1):[]},W2=function(t){return Ws(Wa(t,void 0,W1),t+"")},W5=W2(function(t,e){var n;return null==t?{}:WZ(n=t,e,function(t,e){return W_(n,e)})});var W3=(tf=function(t,e){return(tf=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}tf(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),W4=function(){return(W4=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n],e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},W6="data-chart-source-type",W8=function(t){function e(e,n){var r=t.call(this)||this;return r.container="string"==typeof e?document.getElementById(e):e,r.options=r.mergeOption(n),r.createG2(),r.bindEvents(),r}return W3(e,t),e.prototype.getChartOptions=function(){return W4(W4({},W5(this.options,BB)),{container:this.container})},e.prototype.getSpecOptions=function(){return"base"===this.type||this.__skipDelCustomKeys__?W4(W4({},this.options),this.getChartOptions()):this.options},e.prototype.createG2=function(){if(!this.container)throw Error("The container is not initialized!");this.chart=new BR(this.getChartOptions()),this.container.setAttribute(W6,"Ant Design Charts")},e.prototype.bindEvents=function(){var t=this;this.chart&&this.chart.on("*",function(e){(null==e?void 0:e.type)&&t.emit(e.type,e)})},e.prototype.getBaseOptions=function(){return{type:"view",autoFit:!0}},e.prototype.getDefaultOptions=function(){},e.prototype.render=function(){var t=this;"base"!==this.type&&this.execAdaptor(),this.chart.options(this.getSpecOptions()),this.chart.render().then(function(){t.annotation=new WX(t.chart,t.options)}),this.bindSizeSensor()},e.prototype.update=function(t){this.options=this.mergeOption(t)},e.prototype.mergeOption=function(t){return Wd({},this.getBaseOptions(),this.getDefaultOptions(),t)},e.prototype.changeData=function(t){this.chart.changeData(t)},e.prototype.changeSize=function(t,e){this.chart.changeSize(t,e)},e.prototype.destroy=function(){this.chart.destroy(),this.off(),this.container.removeAttribute(W6)},e.prototype.execAdaptor=function(){this.getSchemaAdaptor()({chart:this.chart,options:this.options})},e.prototype.triggerResize=function(){this.chart.forceFit()},e.prototype.bindSizeSensor=function(){var t=this,e=this.options.autoFit;(void 0===e||e)&&this.chart.on(_k.AFTER_CHANGE_SIZE,function(){t.annotation.update()})},e}(CX);var W9=(tp=function(t,e){return(tp=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}tp(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),W7=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="base",e}return W9(e,t),e.getDefaultOptions=function(){return{type:"view",children:[{type:"line"}]}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return function(t){return t}},e}(W8),$t=function(){};function $e(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=void 0}$e.prototype=zD($t.prototype),$e.prototype.constructor=$e;var $n=FZ&&new FZ,$r=$n?function(t){return $n.get(t)}:WR,$i={},$o=Object.prototype.hasOwnProperty,$a=function(t){for(var e=t.name+"",n=$i[e],r=$o.call($i,e)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==t)return i.name}return e};function $l(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=0xffffffff,this.__views__=[]}$l.prototype=zD($t.prototype),$l.prototype.constructor=$l;var $s=function(t){if(t instanceof $l)return t.clone();var e=new $e(t.__wrapped__,t.__chain__);return e.__actions__=zw(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e},$u=Object.prototype.hasOwnProperty;function $c(t){if(Fh(t)&&!DL(t)&&!(t instanceof $l)){if(t instanceof $e)return t;if($u.call(t,"__wrapped__"))return $s(t)}return new $e(t)}$c.prototype=$t.prototype,$c.prototype.constructor=$c;var $f=function(t){var e=$a(t),n=$c[e];if("function"!=typeof n||!(e in $l.prototype))return!1;if(t===n)return!0;var r=$r(n);return!!r&&t===r[0]};var $p=W2(function(t){var e=t.length,n=e,r=$e.prototype.thru;for(th&&t.reverse();n--;){var i=t[n];if("function"!=typeof i)throw TypeError("Expected a function");if(r&&!o&&"wrapper"==$a(i))var o=new $e([],!0)}for(n=o?n:e;++n<e;){var a=$a(i=t[n]),l="wrapper"==a?$r(i):void 0;o=l&&$f(l[0])&&424==l[1]&&!l[4].length&&1==l[9]?o[$a(l[0])].apply(o,l[3]):1==i.length&&$f(i)?o[a]():o.thru(i)}return function(){var n=arguments,r=n[0];if(o&&1==n.length&&DL(r))return o.plant(r).value();for(var i=0,a=e?t[i].apply(this,n):r;++i<e;)a=t[i].call(this,a);return a}}),$h=function(t){var e=t.options,n=e.children;return(void 0===n?[]:n).forEach(function(t){Object.keys(t).forEach(function(e){DL(t[e])&&"data"!==e&&(t[e]=t[e].filter(function(t){return!t[B$]}))})}),e},$d=function(t){var e=null==t?0:t.length;return e?t[e-1]:void 0},$y=function(t,e,n){var r=-1,i=t.length;e<0&&(e=-e>i?0:i+e),(n=n>i?i:n)<0&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var o=Array(i);++r<i;)o[r]=t[r+e];return o},$g=function(t,e){var n,r;return e=z7(e,t),n=t,null==(t=(r=e).length<2?n:Bn(n,$y(r,0,-1)))||delete t[Be($d(e))]},$v=function(t){return B7(t)?void 0:t},$m=W2(function(t,e){var n={};if(null==t)return n;var r=!1;e=z5(e,function(e){return e=z7(e,t),r||(r=e.length>1),e}),zp(t,zM(t),n),r&&(n=zq(n,7,$v));for(var i=e.length;i--;)$g(n,e[i]);return n}),$b=function(t,e,n){return null==t?t:WK(t,e,n)},$x=function(t,e,n){if(n||2==arguments.length)for(var r,i=0,o=e.length;i<o;i++)(r||!(i in e))&&(!r&&(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))},$O=function(t){var e=t.children,n=Object.keys(BV).concat(BU.map(function(t){return t.key}));return n.forEach(function(e){delete t[e]}),(void 0===e?[]:e).forEach(function(t){Object.keys(t).forEach(function(e){n.includes(e)&&delete t[e]})}),Object.keys(t).forEach(function(e){!$x($x([],BW,!0),BY.map(function(t){return t.key}),!0).includes(e)&&delete t[e]}),t},$w=function(t){var e=$h(t),n=e.children,r=void 0===n?[]:n,i=$m(e,[].concat(BW,BU.map(function(t){return t.key}))),o=function(t){var e;return null===(e=Bq.find(function(e){return e.key===t}))||void 0===e?void 0:e.callback},a=function(t,e,n){var r=o(e);r?r(t,e,n):t[e]=Wd({},t[e],n)},l=function(t){Object.keys(t).forEach(function(e){var n=BU.find(function(t){return t.key===e});if(n){var i=n.type,o=n.extend_keys;i?r.push(s(Wd({},W5(t,o),{type:i},t[e]))):DL(t[e])&&t[e].forEach(function(t){r.push(s(t))})}})},s=function(t){return l(t),Object.keys(BV).forEach(function(e){var n=BV[e];if(void 0!==t[e]){if(DC(n)){var r=n.value,i=n.target,o=r(t[e]);a(t,i,o)}else $b(t,n,t[e])}}),t};return r.forEach(function(t){var e=Wd({},i,t);s(Wd(t,e))}),l(e),$O(e),t},$E=function(){return($E=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n],e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function $k(t){var e=t.options,n=e.stack,r=e.tooltip,i=e.xField;if(!n)return t;var o=BU.map(function(t){return t.type}).filter(function(t){return!!t}),a=!1;return o.forEach(function(t){e[t]&&(a=!0,$b(e,[t,"stack"],$E({y1:"y"},"object"==typeof n?n:{})))}),a&&!BD(r)&&!r&&$b(e,"tooltip",{title:i,items:[{channel:"y"}]}),t}function $M(t){return $p($k)(t)}function $S(t){return $p($M,$w)(t)}var $_=(td=function(t,e){return(td=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}td(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),$P=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="area",e}return $_(e,t),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 $S},e}(W8),$j=function(){return($j=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n],e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function $A(t){return $p(function(t){var e=t.options;Br(e,"children.length")>1&&$b(e,"children",[{type:"interval"}]);var n=e.scale,r=e.markBackground,i=e.data,o=e.children,a=e.yField,l=Br(n,"y.domain",[]);if(r&&l.length&&DL(i)){var s="domainMax",u=i.map(function(t){var e;return $j($j({originData:$j({},t)},$m(t,a)),((e={})[s]=l[l.length-1],e))});o.unshift($j({type:"interval",data:u,yField:s,tooltip:!1,style:{fill:"#eee"},label:!1},r))}return t},$M,$w)(t)}var $T=(ty=function(t,e){return(ty=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}ty(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});R6("shape.interval.bar25D",function(t,e){return function(n){var r=t.fill,i=void 0===r?"#2888FF":r,o=t.stroke,a=t.fillOpacity,l=void 0===a?1:a,s=t.strokeOpacity,u=void 0===s?.2:s,c=t.pitch,f=void 0===c?8:c,p=n[0],h=n[1],d=n[2],y=n[3],g=(h[1]-p[1])/2,v=e.document,m=v.createElement("g",{}),b=v.createElement("polygon",{style:{points:[p,[p[0]-f,p[1]+g],[d[0]-f,p[1]+g],y],fill:i,fillOpacity:l,stroke:o,strokeOpacity:u,inset:30}}),x=v.createElement("polygon",{style:{points:[[p[0]-f,p[1]+g],h,d,[d[0]-f,p[1]+g]],fill:i,fillOpacity:l,stroke:o,strokeOpacity:u}}),O=v.createElement("polygon",{style:{points:[p,[p[0]-f,p[1]+g],h,[p[0]+f,p[1]+g]],fill:i,fillOpacity:l-.2}});return m.appendChild(b),m.appendChild(x),m.appendChild(O),m}});var $C=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="Bar",e}return $T(e,t),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 $A},e}(W8);var $N=(tg=function(t,e){return(tg=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}tg(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});R6("shape.interval.column25D",function(t,e){return function(n){var r=t.fill,i=void 0===r?"#2888FF":r,o=t.stroke,a=t.fillOpacity,l=void 0===a?1:a,s=t.strokeOpacity,u=void 0===s?.2:s,c=t.pitch,f=void 0===c?8:c,p=(n[1][0]-n[0][0])/2+n[0][0],h=e.document,d=h.createElement("g",{}),y=h.createElement("polygon",{style:{points:[[n[0][0],n[0][1]],[p,n[1][1]+f],[p,n[3][1]+f],[n[3][0],n[3][1]]],fill:i,fillOpacity:l,stroke:o,strokeOpacity:u,inset:30}}),g=h.createElement("polygon",{style:{points:[[p,n[1][1]+f],[n[1][0],n[1][1]],[n[2][0],n[2][1]],[p,n[2][1]+f]],fill:i,fillOpacity:l,stroke:o,strokeOpacity:u}}),v=h.createElement("polygon",{style:{points:[[n[0][0],n[0][1]],[p,n[1][1]-f],[n[1][0],n[1][1]],[p,n[1][1]+f]],fill:i,fillOpacity:l-.2}});return d.appendChild(g),d.appendChild(y),d.appendChild(v),d}});var $L=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="column",e}return $N(e,t),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 $A},e}(W8);function $I(t){return $p(function(t){var e=t.options,n=e.children;return e.legend?((void 0===n?[]:n).forEach(function(t){if(!Br(t,"colorField")){var e=Br(t,"yField");$b(t,"colorField",function(){return e})}}),t):t},function(t){var e=t.options,n=e.annotations,r=void 0===n?[]:n,i=e.children,o=e.scale,a=!1;return Br(o,"y.key")?t:((void 0===i?[]:i).forEach(function(t,e){if(!Br(t,"scale.y.key")){var n="child".concat(e,"Scale");$b(t,"scale.y.key",n);var i=t.annotations,o=void 0===i?[]:i;o.length>0&&($b(t,"scale.y.independent",!1),o.forEach(function(t){$b(t,"scale.y.key",n)})),!a&&r.length>0&&void 0===Br(t,"scale.y.independent")&&(a=!0,$b(t,"scale.y.independent",!1),r.forEach(function(t){$b(t,"scale.y.key",n)}))}}),t)},$M,$w)(t)}var $R=(tv=function(t,e){return(tv=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}tv(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),$D=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="DualAxes",e}return $R(e,t),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 $I},e}(W8);function $F(t){return $p(function(t){var e=t.options,n=e.xField;return!e.colorField&&$b(e,"colorField",n),t},function(t){var e=t.options,n=e.compareField,r=e.transform,i=e.isTransposed,o=e.coordinate;return!r&&(n?$b(e,"transform",[]):$b(e,"transform",[{type:"symmetryY"}])),!o&&(void 0===i||i)&&$b(e,"coordinate",{transform:[{type:"transpose"}]}),t},function(t){var e=t.options,n=e.compareField,r=e.seriesField,i=e.data,o=e.children,a=e.yField,l=e.isTransposed;if(n||r){var s=Object.values(WV(i,function(t){return t[n||r]}));o[0].data=s[0],o.push({type:"interval",data:s[1],yField:function(t){return-t[a]}}),delete e.compareField,delete e.data}return r&&($b(e,"type","spaceFlex"),$b(e,"ratio",[1,1]),$b(e,"direction",void 0===l||l?"row":"col"),delete e.seriesField),t},function(t){var e=t.options,n=e.tooltip,r=e.xField,i=e.yField;return!n&&$b(e,"tooltip",{title:!1,items:[function(t){return{name:t[r],value:t[i]}}]}),t},$M,$w)(t)}var $z=(tm=function(t,e){return(tm=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}tm(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),$B=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="column",e}return $z(e,t),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 $F},e}(W8);function $W(t){return $p($M,$w)(t)}var $$=(tb=function(t,e){return(tb=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}tb(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),$G=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="line",e}return $$(e,t),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 $W},e}(W8),$V=function(){return($V=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n],e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function $H(t){return $p(function(t){var e=t.options,n=e.angleField,r=e.data,i=e.label,o=e.tooltip,a=e.colorField;return DL(r)&&0===r.reduce(function(t,e){return t+e[n]},0)&&($b(e,"data",r.map(function(t){var e;return $V($V({},t),((e={})[n]=1,e))})),i&&$b(e,"label",$V($V({},i),{formatter:function(){return 0}})),!1!==o&&$b(e,"tooltip",$V($V({},o),{items:[function(t){return{name:t[a],value:0}}]}))),t},$w)(t)}var $U=(tx=function(t,e){return(tx=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}tx(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),$q=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="pie",e}return $U(e,t),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 $H},e}(W8);function $Y(t){return $p($M,$w)(t)}var $X=(tO=function(t,e){return(tO=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}tO(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),$K=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="scatter",e}return $X(e,t),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 $Y},e}(W8);function $Z(t){return $p(function(t){return $b(t,"options.coordinate",{type:Br(t,"options.coordinateType","polar")}),t},$w)(t)}var $Q=(tw=function(t,e){return(tw=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}tw(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),$J=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="radar",e}return $Q(e,t),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 $Z},e}(W8),$0=function(t,e){var n=-1,r=FG(t)?Array(t.length):[];return WW(t,function(t,i,o){r[++n]=e(t,i,o)}),r},$1=function(t,e){return(DL(t)?z5:$0)(t,Wj(e,3))},$2=function(){return($2=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n],e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function $5(t){return $p(function(t){var e=t.options,n=e.data,r=e.yField;return t.options.data=$1(n,function(t){var e=t&&$2({},t);if(Array.isArray(r)&&e){var n=r[0],i=r[1],o=r[2],a=r[3];e.trend=e[n]<=e[i]?"up":"down",e["__stock-range__"]=[e[n],e[i],e[o],e[a]]}return e}),t},function(t){var e=t.options,n=e.xField,r=e.yField,i=e.fallingFill,o=e.risingFill,a=r[0],l=r[1],s=r[2],u=r[3];return t.options.children=$1(t.options.children,function(t,e){var r=0===e;return $2($2({},t),{tooltip:{title:function(t){return t[n]instanceof Date?t[n].toLocaleString():t[n]},items:[{field:s},{field:u},{field:a},{field:l}]},encode:$2($2({},t.encode||{}),{y:r?[s,u]:[a,l],color:function(t){return Math.sign(t[l]-t[a])}}),style:$2($2({},t.style||{}),{lineWidth:r?1:10})})}),delete e.yField,t.options.legend={color:!1},i&&$b(t,"options.scale.color.range[0]",i),o&&$b(t,"options.scale.color.range[2]",o),t},$w)(t)}var $3=(tE=function(t,e){return(tE=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}tE(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),$4=["#26a69a","#999999","#ef5350"],$6=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="stock",e}return $3(e,t),e.getDefaultOptions=function(){return{type:"view",scale:{color:{domain:[-1,0,1],range:$4},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 $5},e}(W8);function $8(t){return $p($M,$w)(t)}var $9=(tk=function(t,e){return(tk=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}tk(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),$7=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="TinyLine",e}return $9(e,t),e.getDefaultOptions=function(){return{type:"view",children:[{type:"line",axis:!1}],autoFit:!1,animate:{enter:{type:"growInX",duration:500}},padding:0,margin:0,tooltip:!1}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return $8},e}(W8);function Gt(t){return $p($M,$w)(t)}var Ge=(tM=function(t,e){return(tM=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}tM(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),Gn=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="TinyArea",e}return Ge(e,t),e.getDefaultOptions=function(){return{type:"view",animate:{enter:{type:"growInX",duration:500}},children:[{type:"area",axis:!1}],autoFit:!1,padding:0,margin:0,tooltip:!1}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return Gt},e}(W8);function Gr(t){return $p($M,$w)(t)}var Gi=(tS=function(t,e){return(tS=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}tS(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),Go=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="TinyColumn",e}return Gi(e,t),e.getDefaultOptions=function(){return{type:"view",children:[{type:"interval",axis:!1}],autoFit:!1,padding:0,margin:0,tooltip:!1}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return Gr},e}(W8),Ga=function(){return(Ga=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n],e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function Gl(t){return $p(function(t){var e=t.options,n=e.percent,r=e.color,i=void 0===r?[]:r;if(!n)return t;var o={scale:{color:{range:i.length?i:[]}},data:[1,n]};return Object.assign(e,Ga({},o)),t},$M,$w)(t)}var Gs=(t_=function(t,e){return(t_=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}t_(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),Gu=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="TinyProgress",e}return Gs(e,t),e.getDefaultOptions=function(){return{type:"view",data:[],autoFit:!1,margin:0,padding:0,tooltip:!1,children:[{interaction:{tooltip:!1},coordinate:{transform:[{type:"transpose"}]},type:"interval",axis:!1,legend:!1,encode:{y:function(t){return t},color:function(t,e){return e}}}]}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return Gl},e}(W8),Gc=function(){return(Gc=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n],e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function Gf(t){return $p(function(t){var e=t.options.radius;return $b(t,"options.coordinate.innerRadius",void 0===e?.8:e),t},function(t){var e=t.options,n=e.percent,r=e.color,i=void 0===r?[]:r;if(!n)return t;var o={scale:{color:{range:i.length?i:[]}},data:[1,n]};return Object.assign(e,Gc({},o)),t},$M,$w)(t)}var Gp=(tP=function(t,e){return(tP=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}tP(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),Gh=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="TinyRing",e}return Gp(e,t),e.getDefaultOptions=function(){return{type:"view",data:[],autoFit:!1,margin:0,padding:0,coordinate:{type:"theta"},animate:{enter:{type:"waveIn"}},interaction:{tooltip:!1},tooltip:!1,children:[{type:"interval",axis:!1,legend:!1,encode:{y:function(t){return t},color:function(t,e){return e}}}]}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return Gf},e}(W8);function Gd(t){return $p($w)(t)}var Gy=(tj=function(t,e){return(tj=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}tj(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),Gg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="rose",e}return Gy(e,t),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 Gd},e}(W8),Gv="__start__",Gm="__end__",Gb="__waterfall_value__",Gx=function(){return(Gx=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n],e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},GO=function(t,e,n){if(n||2==arguments.length)for(var r,i=0,o=e.length;i<o;i++)(r||!(i in e))&&(!r&&(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function Gw(t){return $p(function(t){var e=t.options,n=e.data,r=void 0===n?[]:n,i=e.yField;return r.length?(r.reduce(function(t,e,n){var r;if(0===n||e.isTotal)e[Gv]=0,e[Gm]=e[i],e[Gb]=e[i];else{var o=null!==(r=t[Gm])&&void 0!==r?r:t[i];e[Gv]=o,e[Gm]=o+e[i],e[Gb]=t[Gm]}return e},[]),Object.assign(e,{yField:[Gv,Gm]}),t):t},function(t){var e=t.options,n=e.data,r=e.xField,i=e.children,o=e.linkStyle,a=GO([],void 0===n?[]:n,!0);return a.reduce(function(t,e,n){return n>0&&(e.x1=t[r],e.x2=e[r],e.y1=t[Gm]),e},[]),a.shift(),i.push({type:"link",xField:["x1","x2"],yField:"y1",zIndex:-1,data:a,style:Gx({stroke:"#697474"},o),label:!1,tooltip:!1}),t},$M,$w)(t)}var GE=(tA=function(t,e){return(tA=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}tA(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),Gk=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="waterfall",e}return GE(e,t),e.getDefaultOptions=function(){return{type:"view",legend:null,tooltip:{field:Gb,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 Gw},e}(W8),GM=function(t){return"number"==typeof t||Fh(t)&&"[object Number]"==DT(t)},GS=Object.prototype.hasOwnProperty,G_=Wc(function(t,e){if(FF(e)||FG(e)){zp(e,FV(e),t);return}for(var n in e)GS.call(e,n)&&zf(t,n,e[n])}),GP=/\s/,Gj=function(t){for(var e=t.length;e--&&GP.test(t.charAt(e)););return e},GA=/^\s+/,GT=0/0,GC=/^[-+]0x[0-9a-f]+$/i,GN=/^0b[01]+$/i,GL=/^0o[0-7]+$/i,GI=parseInt,GR=function(t){if("number"==typeof t)return t;if(zX(t))return GT;if(DC(t)){var e,n="function"==typeof t.valueOf?t.valueOf():t;t=DC(n)?n+"":n}if("string"!=typeof t)return 0===t?t:+t;t=(e=t)?e.slice(0,Gj(e)+1).replace(GA,""):e;var r=GN.test(t);return r||GL.test(t)?GI(t.slice(2),r?2:8):GC.test(t)?GT:+t},GD=1/0,GF=function(t){var e,n=(e=t)?(e=GR(e))===GD||e===-GD?(e<0?-1:1)*17976931348623157e292:e==e?e:0:0===e?e:0,r=n%1;return n==n?r?n-r:n:0},Gz=Dw.isFinite,GB=Math.min;var GW=(tT=Math.ceil,function(t,e){if(t=GR(t),(e=null==e?0:GB(GF(e),292))&&Gz(t)){var n=(z9(t)+"e").split("e");return+((n=(z9(tT(n[0]+"e"+(+n[1]+e)))+"e").split("e"))[0]+"e"+(+n[1]-e))}return tT(t)}),G$=0/0,GG=function(t){return"number"==typeof t?t:zX(t)?G$:+t};var GV=(tC=function(t,e){return t/e},function(t,e){var n;if(void 0===t&&void 0===e)return 1;if(void 0!==t&&(n=t),void 0!==e){if(void 0===n)return e;"string"==typeof t||"string"==typeof e?(t=z8(t),e=z8(e)):(t=GG(t),e=GG(e)),n=tC(t,e)}return n});function GH(t){return $p(function(t){var e=t.options,n=e.data,r=e.binNumber,i=e.binWidth,o=e.children,a=e.channel,l=void 0===a?"count":a,s=Br(o,"[0].transform[0]",{});return GM(i)?(G_(s,{thresholds:GW(GV(n.length,i)),y:l}),t):(GM(r)&&G_(s,{thresholds:r,y:l}),t)},$M,$w)(t)}var GU=(tN=function(t,e){return(tN=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}tN(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),Gq=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="Histogram",e}return GU(e,t),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 GH},e}(W8);function GY(t){return $p(function(t){var e=t.options,n=e.tooltip,r=e.colorField,i=e.sizeField;return n&&!n.field&&(n.field=r||i),t},function(t){var e=t.options,n=e.mark,r=e.children;return n&&(r[0].type=n),t},$M,$w)(t)}var GX=(tL=function(t,e){return(tL=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}tL(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),GK=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="heatmap",e}return GX(e,t),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 GY},e}(W8);function GZ(t){return $p(function(t){var e=t.options.boxType;return t.options.children[0].type=void 0===e?"box":e,t},$M,$w)(t)}var GQ=(tI=function(t,e){return(tI=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}tI(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),GJ=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="box",e}return GQ(e,t),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 GZ},e}(W8);function G0(t){return $p(function(t){var e=t.options,n=e.data,r=[{type:"custom",callback:function(t){return{links:t}}}];if(DL(n))n.length>0?$b(e,"data",{value:n,transform:r}):delete e.children;else if("fetch"===Br(n,"type")&&Br(n,"value")){var i=Br(n,"transform");DL(i)?$b(n,"transform",i.concat(r)):$b(n,"transform",r)}return t},$M,$w)(t)}var G1=(tR=function(t,e){return(tR=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}tR(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),G2=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="sankey",e}return G1(e,t),e.getDefaultOptions=function(){return{type:"view",children:[{type:"sankey"}]}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return G0},e}(W8);function G5(t){n=(e=t).options.layout,e.options.coordinate.transform="horizontal"!==(void 0===n?"horizontal":n)?void 0:[{type:"transpose"}];var e,n,r=t.options.layout,i=void 0===r?"horizontal":r;return t.options.children.forEach(function(t){var e;(null===(e=null==t?void 0:t.coordinate)||void 0===e?void 0:e.transform)&&(t.coordinate.transform="horizontal"!==i?void 0:[{type:"transpose"}])}),t}var G3=function(t){return"string"==typeof t||!DL(t)&&Fh(t)&&"[object String]"==DT(t)},G4=function(t){var e;return null==t?[]:(e=t,z5(FV(t),function(t){return e[t]}))},G6=Math.max,G8=function(t,e,n,r){t=FG(t)?t:G4(t),n=n&&!r?GF(n):0;var i=t.length;return n<0&&(n=G6(i+n,0)),G3(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&WN(t,e,n)>-1},G9=function(){return(G9=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n],e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},G7=["#f0efff","#5B8FF9","#3D76DD"];function Vt(t,e,n,r){void 0===r&&(r=!0);var i=0,o=!1,a=$1(t,function(t){var a,l,s=Br(t,[e]);if(null==s)return[];if(G3(s)){var u=Number(s);return isNaN(u)?[]:((a={})[n]=t[n],a[e]=u,a)}return DL(s)?(o=!0,i=Math.max(i,s.length),$1(r?s.sort(function(t,e){return e-t}):s,function(r,i){var o;return(o={})[n]=t[n],o[e]=r,o.index=i,o})):(i=Math.max(1,i),(l={})[n]=t[n],l[e]=s,l)}).flat();return o?[a.map(function(t){return G9({index:0},t)}),i]:[a,i]}function Ve(t,e){return Array(t).fill("").map(function(t,n){return DL(e)?e[n%e.length]:e})}function Vn(t){return $p(function(t){var e=t.options,n=e.color,r=e.rangeField,i=void 0===r?"ranges":r,o=e.measureField,a=void 0===o?"measures":o,l=e.targetField,s=void 0===l?"targets":l,u=e.xField,c=void 0===u?"title":u,f=e.mapField,p=e.data,h=Vt(p,i,c),d=h[0],y=h[1],g=Vt(p,a,c,!1),v=g[0],m=g[1],b=Vt(p,s,c,!1),x=b[0],O=b[1],w=Br(n,[i],G7[0]),E=Br(n,[a],G7[1]),k=Br(n,[s],G7[2]),M=[Ve(y,w),Ve(m,E),Ve(O,k)].flat();return t.options.children=$1(t.options.children,function(t,e){var n=[d,v,x][e],r=[i,a,s][e];return G9(G9({},t),{data:n,encode:G9(G9({},t.encode||{}),{x:c,y:r,color:function(t){var e=t.index,n=GM(e)?"".concat(r,"_").concat(e):r;return f?Br(f,[r,e],n):n}}),style:G9(G9({},t.style||{}),{zIndex:function(t){return-t[r]}}),labels:0!==e?$1(t.labels,function(t){return G9(G9({},t),{text:r})}):void 0})}),t.options.scale.color.range=M,t.options.legend.color.itemMarker=function(t){return f&&G8(null==f?void 0:f[s],t)?"line":(null==t?void 0:t.replace(/\_\d$/,""))===s?"line":"square"},t},function(t){var e=t.options.layout;return"horizontal"!==(void 0===e?"horizontal":e)&&$b(t,"options.children[2].shapeField","hyphen"),t},function(t){var e=t.options,n=e.range,r=e.measure,i=e.target,o=e.children;return t.options.children=[void 0===n?{}:n,void 0===r?{}:r,void 0===i?{}:i].map(function(t,e){return Wd(o[e],t)}),t},G5,$w)(t)}var Vr=(tD=function(t,e){return(tD=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}tD(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),Vi=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="bullet",e}return Vr(e,t),e.getDefaultOptions=function(){return{type:"view",scale:{color:{range:G7}},legend:{color:{itemMarker:function(t){return"target"===t?"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 Vn},e}(W8);function Vo(t){return $p(function(t){var e=t.options.data;return t.options.data={value:e},t},$M,$w)(t)}var Va=(tF=function(t,e){return(tF=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}tF(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),Vl=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="Gauge",e}return Va(e,t),e.getDefaultOptions=function(){return{type:"view",legend:!1,children:[{type:"gauge"}]}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return Vo},e}(W8);function Vs(t){return $p(function(t){var e=t.options.percent;return GM(e)&&$b(t,"options.data",e),t},$M,$w)(t)}var Vu=(tz=function(t,e){return(tz=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}tz(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),Vc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="Liquid",e}return Vu(e,t),e.getDefaultOptions=function(){return{type:"view",children:[{type:"liquid"}]}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return Vs},e}(W8);function Vf(t){return $p($M,$w)(t)}var Vp=(tB=function(t,e){return(tB=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}tB(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),Vh=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="WordCloud",e}return Vp(e,t),e.getDefaultOptions=function(){return{type:"view",legend:!1,children:[{type:"wordCloud"}]}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return Vf},e}(W8);function Vd(t){return $p(function(t){var e=t.options,n=e.data;return n&&$b(e,"data",{value:n}),t},$M,$w)(t)}var Vy=(tW=function(t,e){return(tW=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}tW(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),Vg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="treemap",e}return Vy(e,t),e.getDefaultOptions=function(){return{type:"view",children:[{type:"treemap"}]}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return Vd},e}(W8),Vv=function(){return(Vv=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n],e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function Vm(t){return $p(function(t){var e=t.options,n=e.startAngle,r=e.maxAngle,i=e.coordinate,o=GM(n)?n/(2*Math.PI)*360:-90,a=GM(r)?(Number(r)+o)/180*Math.PI:Math.PI;return $b(t,["options","coordinate"],Vv(Vv({},i),{endAngle:a,startAngle:null!=n?n:-Math.PI/2})),t},function(t){var e=t.options,n=e.tooltip,r=e.xField,i=e.yField;return!n&&$b(e,"tooltip",{title:!1,items:[function(t){return{name:t[r],value:t[i]}}]}),t},function(t){var e=t.options,n=e.markBackground,r=e.children,i=e.scale,o=e.coordinate,a=e.xField,l=Br(i,"y.domain",[]);return n&&r.unshift(Vv({type:"interval",xField:a,yField:l[l.length-1],colorField:n.color,scale:{color:{type:"identity"}},style:{fillOpacity:n.opacity,fill:n.color?void 0:"#e0e4ee"},coordinate:Vv(Vv({},o),{startAngle:-Math.PI/2,endAngle:1.5*Math.PI}),animate:!1},n)),t},$M,$w)(t)}var Vb=(t$=function(t,e){return(t$=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}t$(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),Vx=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="radial",e}return Vb(e,t),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 Vm},e}(W8);function VO(t){return $p($w)(t)}var Vw=(tG=function(t,e){return(tG=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}tG(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),VE=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="CirclePacking",e}return Vw(e,t),e.getDefaultOptions=function(){return{legend:!1,type:"view",children:[{type:"pack"}]}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return VO},e}(W8),Vk=function(){return(Vk=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n],e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function VM(t){return $p(function(t){var e=t.options,n=e.xField,r=e.yField,i=e.seriesField,o=e.children,a=null==o?void 0:o.map(function(t){return Vk(Vk({},t),{xField:n,yField:r,seriesField:i,colorField:i,data:"density"===t.type?{transform:[{type:"kde",field:r,groupBy:[n,i]}]}:t.data})}).filter(function(t){return"density"!==e.violinType||"density"===t.type});return $b(e,"children",a),"polar"===e.violinType&&$b(e,"coordinate",{type:"polar"}),$b(e,"violinType",void 0),t},$M,$w)(t)}var VS=(tV=function(t,e){return(tV=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}tV(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),V_=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="violin",e}return VS(e,t),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 VM},e}(W8),VP=function(){return(VP=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n],e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},Vj=function(t,e,n){if(n||2==arguments.length)for(var r,i=0,o=e.length;i<o;i++)(r||!(i in e))&&(!r&&(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function VA(t){return $p(function(t){var e=t.options,n=e.yField;return e.children.forEach(function(t,e){$b(t,"yField",n[e])}),t},function(t){var e=t.options,n=e.yField,r=e.children,i=e.data;if(B7(i))return t;var o=DL(Br(i,[0]))?i:[i,i];return r.forEach(function(t,e){$b(t,"data",Vj([],o[e].map(function(t){return VP({groupKey:n[e]},t)}),!0))}),t},function(t){var e=t.options,n=e.yField,r=n[0],i=n[1];return!e.tooltip&&$b(e,"tooltip",{items:[{field:r,value:r},{field:i,value:i}]}),t},function(t){var e=t.options,n=e.children,r=e.layout,i=e.coordinate.transform,o=e.paddingBottom,a=e.paddingLeft,l=e.axis;$b(e,"axisText",VP(VP({},(null==l?void 0:l.x)||{}),{layout:r}));var s=n[0],u=n[1];if("vertical"===r)$b(e,"direction","col"),$b(e,"paddingLeft",void 0===a?48:a),$b(e,"coordinate.transform",i.filter(function(t){return"transpose"!==t.type})),$b(s,"paddingBottom",16),$b(u,"paddingTop",16),$b(u,"axis",{x:{position:"top"}}),$b(u,"scale",{y:{range:[0,1]}});else{$b(e,"paddingBottom",void 0===o?48:o),$b(s,"scale",{y:{range:[0,1]}});var c=s.paddingRight,f=u.paddingLeft;$b(s,"paddingRight",void 0===c?32:c),$b(s,"axis",{x:{position:"right"}}),$b(u,"paddingLeft",void 0===f?32:f)}return t},$M,$w)(t)}var VT=(tH=function(t,e){return(tH=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}tH(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),VC=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="BidirectionalBar",e}return VT(e,t),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 VA},e}(W8);function VN(t){return $p(function(t){var e=t.options,n=e.data,r=e.setsField,i=e.sizeField;return DL(n)&&($b(e,"data",{type:"inline",value:n,transform:[{type:"venn",sets:r,size:i,as:[ey.color,ey.d]}]}),$b(e,"colorField",r),$b(e,["children","0","encode","d"],ey.d)),$b(t,"options",$m(e,["sizeField","setsField"])),t},$w)(t)}(tU=ey||(ey={})).color="key",tU.d="path";var VL=(tq=function(t,e){return(tq=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}tq(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),VI=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="venn",e}return VL(e,t),e.getDefaultOptions=function(){return{type:"view",children:[{type:"path"}],legend:{color:{itemMarker:"circle"}},encode:{color:ey.color,d:ey.d}}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return VN},e}(W8);function VR(t){return $p(function(t){return t},$w)(t)}var VD=(tY=function(t,e){return(tY=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}tY(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),VF={Base:W7,Line:$G,Column:$L,Pie:$q,Area:$P,Bar:$C,DualAxes:$D,Funnel:$B,Scatter:$K,Radar:$J,Rose:Gg,Stock:$6,TinyLine:$7,TinyArea:Gn,TinyColumn:Go,TinyProgress:Gu,TinyRing:Gh,Waterfall:Gk,Histogram:Gq,Heatmap:GK,Box:GJ,Sankey:G2,Bullet:Vi,Gauge:Vl,Liquid:Vc,WordCloud:Vh,Treemap:Vg,RadialBar:Vx,CirclePacking:VE,Violin:V_,BidirectionalBar:VC,Venn:VI,Mix:$D,Sunburst:function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="Sunburst",e}return VD(e,t),e.getDefaultOptions=function(){return{type:"view",children:[{type:"sunburst"}]}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return VR},e}(W8)},Vz=function(){return(Vz=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n],e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},VB=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n},VW=(0,Di.forwardRef)(function(t,e){var n,r,i,o,a,l,s,u,c,f,p=t.chartType,h=VB(t,["chartType"]),d=h.containerStyle,y=h.containerAttributes,g=h.className,v=h.loading,m=h.loadingTemplate,b=h.errorTemplate,x=VB(h,["containerStyle","containerAttributes","className","loading","loadingTemplate","errorTemplate"]);var O=(n=VF[void 0===p?"Base":p],r=x,i=(0,Di.useRef)(),o=(0,Di.useRef)(),a=(0,Di.useRef)(null),l=r.onReady,s=r.onEvent,u=function(t,e){void 0===t&&(t="image/png");var n,r=null===(n=a.current)||void 0===n?void 0:n.getElementsByTagName("canvas")[0];return null==r?void 0:r.toDataURL(t,e)},c=function(t,e,n){void 0===t&&(t="download"),void 0===e&&(e="image/png");var r=t;-1===t.indexOf(".")&&(r="".concat(t,".").concat(e.split("/")[1]));var i=u(e,n),o=document.createElement("a");return o.href=i,o.download=r,document.body.appendChild(o),o.click(),document.body.removeChild(o),o=null,r},f=function(t,e){void 0===e&&(e=!1);var n=Object.keys(t),r=e;n.forEach(function(n){var i,o=t[n];if("tooltip"===n&&(r=!0),DN(o)&&(i="".concat(o),/react|\.jsx|children:\[\(|return\s+[A-Za-z0-9].createElement\((?!['"][g|circle|ellipse|image|rect|line|polyline|polygon|text|path|html|mesh]['"])([^\)])*,/i.test(i)))t[n]=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Dy(o.apply(void 0,t),r)};else DL(o)?o.forEach(function(t){f(t,r)}):DC(o)?f(o,r):r=e})},(0,Di.useEffect)(function(){if(i.current&&!za(o.current,r)){var t=!1;if(o.current){var e=o.current,n=(e.data,Bo(e,["data"]));r.data,t=za(n,Bo(r,["data"]))}o.current=zY(r),t?i.current.changeData(Br(r,"data")):(f(r),i.current.update(r),i.current.render())}},[r]),(0,Di.useEffect)(function(){if(!a.current)return function(){return null};!o.current&&(o.current=zY(r)),f(r);var t=new n(a.current,Bi({},r));t.toDataURL=u,t.downloadImage=c,t.render(),i.current=t,l&&l(t);var e=function(e){s&&s(t,e)};return t.on("*",e),function(){i.current&&(i.current.destroy(),i.current.off("*",e),i.current=void 0)}},[]),{chart:i,container:a}),w=O.chart,E=O.container;return(0,Di.useImperativeHandle)(e,function(){return w.current}),Do().createElement(Db,{errorTemplate:b},v&&Do().createElement(Dv,{loadingTemplate:m}),Do().createElement("div",Vz({className:g,style:void 0===d?{height:"inherit"}:d,ref:E},void 0===y?{}:y)))}),V$=function(){return(V$=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n],e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},VG=function(t){return Do().createElement(VW,V$({},t,{chartType:"Area"}))},VV=function(){return(VV=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n],e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},VH=function(t){return Do().createElement(VW,VV({},t,{chartType:"Bar"}))},VU=function(){return(VU=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n],e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},Vq=function(t){return Do().createElement(VW,VU({},t,{chartType:"Column"}))},VY=function(){return(VY=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n],e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},VX=function(t){return Do().createElement(VW,VY({},t,{chartType:"DualAxes"}))},VK=function(){return(VK=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n],e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},VZ=function(t){return Do().createElement(VW,VK({},t,{chartType:"Funnel"}))},VQ=function(){return(VQ=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n],e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},VJ=function(t){return Do().createElement(VW,VQ({},t,{chartType:"Line"}))},V0=function(){return(V0=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n],e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},V1=function(t){return Do().createElement(VW,V0({},t,{chartType:"Pie"}))},V2=function(){return(V2=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n],e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},V5=function(t){return Do().createElement(VW,V2({},t,{chartType:"Scatter"}))},V3=function(){return(V3=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n],e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},V4=function(t){return Do().createElement(VW,V3({},t,{chartType:"Radar"}))},V6=function(){return(V6=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n],e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},V8=function(){return(V8=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n],e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},V9=function(){return(V9=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n],e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},V7=function(){return(V7=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n],e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},Ht=function(){return(Ht=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n],e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},He={Line:function(t){return Do().createElement(VW,V6({},t,{chartType:"TinyLine"}))},Area:function(t){return Do().createElement(VW,V8({},t,{chartType:"TinyArea"}))},Column:function(t){return Do().createElement(VW,V9({},t,{chartType:"TinyColumn"}))},Progress:function(t){return Do().createElement(VW,V7({},t,{chartType:"TinyProgress"}))},Ring:function(t){return Do().createElement(VW,Ht({},t,{chartType:"TinyRing"}))}},Hn=function(){return(Hn=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n],e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},Hr=function(t){return Do().createElement(VW,Hn({},t,{chartType:"Rose"}))},Hi=function(){return(Hi=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n],e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},Ho=function(t){return Do().createElement(VW,Hi({},t,{chartType:"Waterfall"}))},Ha=function(){return(Ha=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n],e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},Hl=function(t){return Do().createElement(VW,Ha({},t,{chartType:"Histogram"}))},Hs=function(){return(Hs=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n],e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},Hu=function(t){return Do().createElement(VW,Hs({},t,{chartType:"Heatmap"}))},Hc=function(){return(Hc=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n],e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},Hf=function(t){return Do().createElement(VW,Hc({},t,{chartType:"Box"}))},Hp=function(){return(Hp=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n],e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},Hh=function(t){return Do().createElement(VW,Hp({},t,{chartType:"Sankey"}))},Hd=function(){return(Hd=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n],e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},Hy=function(t){return Do().createElement(VW,Hd({},t,{chartType:"Stock"}))},Hg=function(){return(Hg=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n],e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},Hv=function(t){return Do().createElement(VW,Hg({},t,{chartType:"Bullet"}))},Hm=function(){return(Hm=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n],e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},Hb=function(t){return Do().createElement(VW,Hm({},t,{chartType:"Gauge"}))},Hx=function(){return(Hx=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n],e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},HO=function(t){return Do().createElement(VW,Hx({},t,{chartType:"Liquid"}))},Hw=function(){return(Hw=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n],e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},HE=function(t){return Do().createElement(VW,Hw({},t,{chartType:"WordCloud"}))},Hk=function(){return(Hk=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n],e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},HM=function(t){return Do().createElement(VW,Hk({},t,{chartType:"Treemap"}))},HS=function(){return(HS=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n],e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},H_=function(t){return Do().createElement(VW,HS({},t,{chartType:"RadialBar"}))},HP=function(){return(HP=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n],e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},Hj=function(t){return Do().createElement(VW,HP({},t,{chartType:"CirclePacking"}))},HA=function(){return(HA=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n],e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},HT=function(t){return Do().createElement(VW,HA({},t,{chartType:"Violin"}))},HC=function(){return(HC=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n],e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},HN=function(t){return Do().createElement(VW,HC({},t,{chartType:"BidirectionalBar"}))},HL=function(){return(HL=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n],e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},HI=function(t){return Do().createElement(VW,HL({},t,{chartType:"Venn"}))},HR=function(){return(HR=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n],e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},HD=function(t){return Do().createElement(VW,HR({},t,{chartType:"Mix"}))},HF=function(){return(HF=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n],e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},Hz=function(t){return Do().createElement(VW,HF({},t,{chartType:"Sunburst"}))},HB=function(t,e,n){if(n||2==arguments.length)for(var r,i=0,o=e.length;i<o;i++)(r||!(i in e))&&(!r&&(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))},HW=zJ(function(t,e){void 0===e&&(e={});var n=e.fontSize,r=e.fontFamily,i=e.fontWeight,o=e.fontStyle,a=e.fontVariant,l=(!eg&&(eg=document.createElement("canvas").getContext("2d")),eg);return l.font=[o,i,a,"".concat(n,"px"),void 0===r?"sans-serif":r].join(" "),l.measureText(G3(t)?t:"").width},function(t,e){return void 0===e&&(e={}),HB([t],G4(e),!0).join("")})},806:function(t,e){var n;n=0,function(t){"use strict";function e(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&r>=t.length?void 0:t)&&t[r++],done:!t}}};throw TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function n(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||0<e--)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function r(t,e,n){if(n||2==arguments.length)for(var r,i=0,o=e.length;i<o;i++)!r&&i in e||((r=r||Array.prototype.slice.call(e,0,i))[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}function i(t){return l(t,"Function")}var o,a={}.toString,l=function(t,e){return a.call(t)==="[object "+e+"]"},s=function(t){return Array.isArray?Array.isArray(t):l(t,"Array")},u=function(t){if("object"!=typeof t||null===t||!l(t,"Object"))return!1;if(null===Object.getPrototypeOf(t))return!0;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e},c=Object.values?function(t){return Object.values(t)}:function(t){var e,n=[],r=function(e,r){i(t)&&"prototype"===r||n.push(e)};if(t){if(s(t))for(var o=0,a=t.length;o<a&&!1!==r(t[o],o);o++);else if(e=typeof t,null!==t&&"object"==e||"function"==e){for(var l in t)if(t.hasOwnProperty(l)&&!1===r(t[l],l))break}}return n};function f(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0;r<e.length;r+=1)!function t(e,n,r,i){for(var o in r=r||0,i=i||5,n){var a;n.hasOwnProperty(o)&&(null!==(a=n[o])&&u(a)?(u(e[o])||(e[o]={}),r<i?t(e[o],a,r+1,i):e[o]=n[o]):s(a)?(e[o]=[],e[o]=e[o].concat(a)):void 0!==a&&(e[o]=a))}}(t,e[r]);return t}function p(t){return t}!function(t,e){var n;if(i(t))return(n=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var o,a=e?e.apply(this,r):r[0],l=n.cache;return l.has(a)?l.get(a):(o=t.apply(this,r),l.set(a,o),o)}).cache=new Map;throw TypeError("Expected a function")}(function(t,e){var n=(e=void 0===e?{}:e).fontSize,r=e.fontFamily,i=e.fontWeight,o=e.fontStyle,e=e.fontVariant;return(h=h||document.createElement("canvas").getContext("2d")).font=[o,e,i,n+"px",r].join(" "),h.measureText(l(t,"String")?t:"").width},function(t,e){return(function(){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 o=arguments[e],a=0,l=o.length;a<l;a++,i++)r[i]=o[a];return r})([t],c(e=void 0===e?{}:e)).join("")});var h,d="undefined"!=typeof Float32Array?Float32Array:Array;function y(){var t=new d(9);return d!=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}Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)});var g=function(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],l=e[4],s=e[5],u=e[6],c=e[7],e=e[8],f=n[0],p=n[1],h=n[2],d=n[3],y=n[4],g=n[5],v=n[6],m=n[7],n=n[8];return t[0]=f*r+p*a+h*u,t[1]=f*i+p*l+h*c,t[2]=f*o+p*s+h*e,t[3]=d*r+y*a+g*u,t[4]=d*i+y*l+g*c,t[5]=d*o+y*s+g*e,t[6]=v*r+m*a+n*u,t[7]=v*i+m*l+n*c,t[8]=v*o+m*s+n*e,t};function v(){var t=new d(16);return d!=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}var m=function(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],l=e[4],s=e[5],u=e[6],c=e[7],f=e[8],p=e[9],h=e[10],d=e[11],y=e[12],g=e[13],v=e[14],e=e[15],m=n[0],b=n[1],x=n[2],O=n[3];return t[0]=m*r+b*l+x*f+O*y,t[1]=m*i+b*s+x*p+O*g,t[2]=m*o+b*u+x*h+O*v,t[3]=m*a+b*c+x*d+O*e,m=n[4],b=n[5],x=n[6],O=n[7],t[4]=m*r+b*l+x*f+O*y,t[5]=m*i+b*s+x*p+O*g,t[6]=m*o+b*u+x*h+O*v,t[7]=m*a+b*c+x*d+O*e,m=n[8],b=n[9],x=n[10],O=n[11],t[8]=m*r+b*l+x*f+O*y,t[9]=m*i+b*s+x*p+O*g,t[10]=m*o+b*u+x*h+O*v,t[11]=m*a+b*c+x*d+O*e,m=n[12],b=n[13],x=n[14],O=n[15],t[12]=m*r+b*l+x*f+O*y,t[13]=m*i+b*s+x*p+O*g,t[14]=m*o+b*u+x*h+O*v,t[15]=m*a+b*c+x*d+O*e,t};function b(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return t?e.reduce(function(t,e){return function(n){return e(t(n))}},t):p}function x(t){return t instanceof Float32Array||t instanceof Array}function O(t,e,n){for(;t<e;)t+=2*Math.PI;for(;n<t;)t-=2*Math.PI;return t}function w(t,e,r,i,o){var a=(t=n(t,2))[0],t=t[1],l=y();return a=[a,t],(t=l)[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=a[0],t[7]=a[1],t[8]=1,t}function E(t,...e){return e.reduce((t,e)=>n=>t(e(n)),t)}function k(t,e){return e-t?n=>(n-t)/(e-t):t=>.5}N=new d(3),d!=Float32Array&&(N[0]=0,N[1]=0,N[2]=0),N=new d(4),d!=Float32Array&&(N[0]=0,N[1]=0,N[2]=0,N[3]=0);let M=Math.sqrt(50),S=Math.sqrt(10),_=Math.sqrt(2);function P(t,e,n){return t=Math.floor(Math.log(e=(e-t)/Math.max(0,n))/Math.LN10),n=e/10**t,0<=t?(n>=M?10:n>=S?5:n>=_?2:1)*10**t:-(10**-t)/(n>=M?10:n>=S?5:n>=_?2:1)}let j=(t,e,n=5)=>{let r=0,i=(t=[t,e]).length-1,o=t[r],a=t[i],l;return a<o&&([o,a]=[a,o],[r,i]=[i,r]),0<(l=P(o,a,n))?l=P(o=Math.floor(o/l)*l,a=Math.ceil(a/l)*l,n):l<0&&(l=P(o=Math.ceil(o*l)/l,a=Math.floor(a*l)/l,n)),0<l?(t[r]=Math.floor(o/l)*l,t[i]=Math.ceil(a/l)*l):l<0&&(t[r]=Math.ceil(o*l)/l,t[i]=Math.floor(a*l)/l),t};function A(t){return null!=t&&!Number.isNaN(t)}function T(t,e){return n=>{n.prototype.rescale=function(){this.initRange(),this.nice();var[t]=this.chooseTransforms();this.composeOutput(t,this.chooseClamp(t))},n.prototype.initRange=function(){var e=this.options.interpolator;this.options.range=t(e)},n.prototype.composeOutput=function(t,n){var{domain:r,interpolator:i,round:o}=this.getOptions(),r=e(r.map(t)),o=o?t=>l(t=i(t),"Number")?Math.round(t):t:i;this.output=E(o,r,n,t)},n.prototype.invert=void 0}}var C,N={exports:{}},L={exports:{}},I=Array.prototype.concat,R=Array.prototype.slice,D=L.exports=function(t){for(var e=[],n=0,r=t.length;n<r;n++){var i,o=t[n];!(!(i=o)||"string"==typeof i)&&(i instanceof Array||Array.isArray(i)||0<=i.length&&(i.splice instanceof Function||Object.getOwnPropertyDescriptor(i,i.length-1)&&"String"!==i.constructor.name))?e=I.call(e,R.call(o)):e.push(o)}return e},F=(D.wrap=function(t){return function(){return t(D(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]}),z=L.exports,B=Object.hasOwnProperty,W=Object.create(null);for(C in F)B.call(F,C)&&(W[F[C]]=C);var $=N.exports={to:{},get:{}};function G(t,e,n){return Math.min(Math.max(e,t),n)}function V(t){return(t=Math.round(t).toString(16).toUpperCase()).length<2?"0"+t:t}$.get=function(t){var e,n;switch(t.substring(0,3).toLowerCase()){case"hsl":e=$.get.hsl(t),n="hsl";break;case"hwb":e=$.get.hwb(t),n="hwb";break;default:e=$.get.rgb(t),n="rgb"}return e?{model:n,value:e}:null},$.get.rgb=function(t){if(!t)return null;var e,n,r,i=[0,0,0,1];if(e=t.match(/^#([a-f0-9]{6})([a-f0-9]{2})?$/i)){for(r=e[2],e=e[1],n=0;n<3;n++){var o=2*n;i[n]=parseInt(e.slice(o,2+o),16)}r&&(i[3]=parseInt(r,16)/255)}else if(e=t.match(/^#([a-f0-9]{3,4})$/i)){for(r=(e=e[1])[3],n=0;n<3;n++)i[n]=parseInt(e[n]+e[n],16);r&&(i[3]=parseInt(r+r,16)/255)}else{if(e=t.match(/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/))for(n=0;n<3;n++)i[n]=parseInt(e[n+1],0);else{if(!(e=t.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)))return(e=t.match(/^(\w+)$/))?"transparent"===e[1]?[0,0,0,0]:B.call(F,e[1])?((i=F[e[1]])[3]=1,i):null:null;for(n=0;n<3;n++)i[n]=Math.round(2.55*parseFloat(e[n+1]))}e[4]&&(e[5]?i[3]=.01*parseFloat(e[4]):i[3]=parseFloat(e[4]))}for(n=0;n<3;n++)i[n]=G(i[n],0,255);return i[3]=G(i[3],0,1),i},$.get.hsl=function(t){var e;return(t=t&&t.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*)?\)$/))?(e=parseFloat(t[4]),[(parseFloat(t[1])%360+360)%360,G(parseFloat(t[2]),0,100),G(parseFloat(t[3]),0,100),G(isNaN(e)?1:e,0,1)]):null},$.get.hwb=function(t){var e;return(t=t&&t.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*)?\)$/))?(e=parseFloat(t[4]),[(parseFloat(t[1])%360+360)%360,G(parseFloat(t[2]),0,100),G(parseFloat(t[3]),0,100),G(isNaN(e)?1:e,0,1)]):null},$.to.hex=function(){var t=z(arguments);return"#"+V(t[0])+V(t[1])+V(t[2])+(t[3]<1?V(Math.round(255*t[3])):"")},$.to.rgb=function(){var t=z(arguments);return t.length<4||1===t[3]?"rgb("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+")":"rgba("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+", "+t[3]+")"},$.to.rgb.percent=function(){var t=z(arguments),e=Math.round(t[0]/255*100),n=Math.round(t[1]/255*100),r=Math.round(t[2]/255*100);return t.length<4||1===t[3]?"rgb("+e+"%, "+n+"%, "+r+"%)":"rgba("+e+"%, "+n+"%, "+r+"%, "+t[3]+")"},$.to.hsl=function(){var t=z(arguments);return t.length<4||1===t[3]?"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)":"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+t[3]+")"},$.to.hwb=function(){var t=z(arguments),e="";return 4<=t.length&&1!==t[3]&&(e=", "+t[3]),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+e+")"},$.to.keyword=function(t){return W[t.slice(0,3)]};var H=N.exports;function U(t,e,n){let r=n;return r<0&&(r+=1),1<r&&--r,r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function q(t){var e,n,r,t=H.get(t);return t?({model:t,value:e}=t,"rgb"===t?e:"hsl"===t?(e=(t=e)[0]/360,n=t[1]/100,r=t[2]/100,t=t[3],0==n?[255*r,255*r,255*r,t]:[255*U(n=2*r-(r=r<.5?r*(1+n):r+n-r*n),r,e+1/3),255*U(n,r,e),255*U(n,r,e-1/3),t]):null):null}let Y=(t,e)=>n=>t*(1-n)+e*n,X=(t,e)=>{if("number"==typeof t&&"number"==typeof e)return Y(t,e);if("string"!=typeof t||"string"!=typeof e)return()=>t;{let n=q(t),r=q(e);return null===n||null===r?n?()=>t:()=>e:t=>{var e=[,,,,];for(let a=0;a<4;a+=1){var i=n[a],o=r[a];e[a]=i*(1-t)+o*t}var[a,l,s,u]=e;return`rgba(${Math.round(a)}, ${Math.round(l)}, ${Math.round(s)}, ${u})`}}},K=(t,e)=>{let n=Y(t,e);return t=>Math.round(n(t))};function Z({map:t,initKey:e},n){return e=e(n),t.has(e)?t.get(e):n}function Q(t){return"object"==typeof t?t.valueOf():t}class J extends Map{constructor(t){if(super(),this.map=new Map,this.initKey=Q,null!==t)for(var[e,n]of t)this.set(e,n)}get(t){return super.get(Z({map:this.map,initKey:this.initKey},t))}has(t){return super.has(Z({map:this.map,initKey:this.initKey},t))}set(t,e){var n,r;return super.set(([{map:t,initKey:n},r]=[{map:this.map,initKey:this.initKey},t],n=n(r),t.has(n)?t.get(n):(t.set(n,r),r)),e)}delete(t){var e,n;return super.delete(([{map:t,initKey:e},n]=[{map:this.map,initKey:this.initKey},t],e=e(n),t.has(e)&&(n=t.get(e),t.delete(e)),n))}}class tt{constructor(t){this.options=f({},this.getDefaultOptions()),this.update(t)}getOptions(){return this.options}update(t={}){this.options=f({},this.options,t),this.rescale(t)}rescale(t){}}let te=Symbol("defaultUnknown");function tn(t,e,n){for(let r=0;r<e.length;r+=1)t.has(e[r])||t.set(n(e[r]),r)}function tr(t){var{value:t,from:e,to:n,mapper:r,notFoundReturn:i}=t;let o=r.get(t);if(void 0===o){if(i!==te)return i;o=e.push(t)-1,r.set(t,o)}return n[o%n.length]}function ti(t){return t instanceof Date?t=>""+t:"object"==typeof t?t=>JSON.stringify(t):t=>t}class to extends tt{getDefaultOptions(){return{domain:[],range:[],unknown:te}}constructor(t){super(t)}map(t){return 0===this.domainIndexMap.size&&tn(this.domainIndexMap,this.getDomain(),this.domainKey),tr({value:this.domainKey(t),mapper:this.domainIndexMap,from:this.getDomain(),to:this.getRange(),notFoundReturn:this.options.unknown})}invert(t){return 0===this.rangeIndexMap.size&&tn(this.rangeIndexMap,this.getRange(),this.rangeKey),tr({value:this.rangeKey(t),mapper:this.rangeIndexMap,from:this.getRange(),to:this.getDomain(),notFoundReturn:this.options.unknown})}rescale(t){var[e]=this.options.domain,[n]=this.options.range;this.domainKey=ti(e),this.rangeKey=ti(n),this.rangeIndexMap?(t&&!t.range||this.rangeIndexMap.clear(),(!t||t.domain||t.compare)&&(this.domainIndexMap.clear(),this.sortedDomain=void 0)):(this.rangeIndexMap=new Map,this.domainIndexMap=new Map)}clone(){return new to(this.options)}getRange(){return this.options.range}getDomain(){var t,e;return this.sortedDomain||({domain:t,compare:e}=this.options,this.sortedDomain=e?[...t].sort(e):t),this.sortedDomain}}class ta extends to{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,paddingInner:0,paddingOuter:0,padding:0,unknown:te,flex:[]}}constructor(t){super(t)}clone(){return new ta(this.options)}getStep(t){return void 0===this.valueStep?1:"number"==typeof this.valueStep?this.valueStep:void 0===t?Array.from(this.valueStep.values())[0]:this.valueStep.get(t)}getBandWidth(t){return void 0===this.valueBandWidth?1:"number"==typeof this.valueBandWidth?this.valueBandWidth:void 0===t?Array.from(this.valueBandWidth.values())[0]:this.valueBandWidth.get(t)}getRange(){return this.adjustedRange}getPaddingInner(){var{padding:t,paddingInner:e}=this.options;return 0<t?t:e}getPaddingOuter(){var{padding:t,paddingOuter:e}=this.options;return 0<t?t:e}rescale(){super.rescale();var{align:t,domain:e,range:n,round:r,flex:i}=this.options,{adjustedRange:t,valueBandWidth:n,valueStep:r}=function(t){var e=t.domain;if(0===(e=e.length))return{valueBandWidth:void 0,valueStep:void 0,adjustedRange:[]};if(!(null==(n=t.flex)||!n.length))return function(t){let{domain:e,range:n,paddingOuter:r,paddingInner:i,flex:o,round:a,align:l}=t;var s=e.length,u=0<(u=(t=s)-(c=o).length)?[...c,...Array(u).fill(1)]:u<0?c.slice(0,t):c,[t,c]=n,c=c-t,f=c/(2/s*r+1-1/s*i);let p=f*i/s;f-=s*p;let h=function(t){let e=Math.min(...t);return t.map(t=>t/e)}(u),d=f/h.reduce((t,e)=>t+e);var u=new J(e.map((t,e)=>(e=h[e]*d,[t,a?Math.floor(e):e]))),y=new J(e.map((t,e)=>(e=h[e]*d+p,[t,a?Math.floor(e):e]))),f=Array.from(y.values()).reduce((t,e)=>t+e),t=t+(c-(f-f/s*i))*l;let g=a?Math.round(t):t;var v=Array(s);for(let t=0;t<s;t+=1){v[t]=Math.round(1e12*(m=g))/1e12;var m=e[t];g+=y.get(m)}return{valueBandWidth:u,valueStep:y,adjustedRange:v}}(t);var{range:n,paddingOuter:t,paddingInner:r,round:i,align:o}=t;let a,l,s=n[0];return a=(n=n[1]-s)/Math.max(1,2*t+(e-r)),i&&(a=Math.floor(a)),s+=(n-a*(e-r))*o,l=a*(1-r),i&&(s=Math.round(s),l=Math.round(l)),t=Array(e).fill(0).map((t,e)=>s+e*a),{valueStep:a,valueBandWidth:l,adjustedRange:t}}({align:t,range:n,round:r,flex:i,paddingInner:this.getPaddingInner(),paddingOuter:this.getPaddingOuter(),domain:e});this.valueStep=r,this.valueBandWidth=n,this.adjustedRange=t}}let tl=(t,e,n)=>{let r,i,o=t,a=e;if(o===a&&0<n)return[o];let l=P(o,a,n);if(0===l||!Number.isFinite(l))return[];if(0<l){o=Math.ceil(o/l),i=Array(r=Math.ceil((a=Math.floor(a/l))-o+1));for(let t=0;t<r;t+=1)i[t]=(o+t)*l}else{o=Math.ceil(o*(l=-l)),i=Array(r=Math.ceil((a=Math.floor(a*l))-o+1));for(let t=0;t<r;t+=1)i[t]=(o+t)/l}return i},ts=(t,e,n)=>{let r,i;var[t,o]=t,[e,a]=e;return E(t<o?(r=k(t,o),n(e,a)):(r=k(o,t),n(a,e)),r)},tu=(t,e,n)=>{let r=Math.min(t.length,e.length)-1,i=Array(r),o=Array(r);var a=t[0]>t[r],l=a?[...t].reverse():t,s=a?[...e].reverse():e;for(let t=0;t<r;t+=1)i[t]=k(l[t],l[t+1]),o[t]=n(s[t],s[t+1]);return e=>{var n=function(t,e,n,r,i){let o=1,a=r||t.length;for(var l=t=>t;o<a;){var s=Math.floor((o+a)/2);l(t[s])>e?a=s:o=s+1}return o}(t,e,1,r)-1,a=i[n];return E(o[n],a)(e)}},tc=(t,e,n,r)=>(2<Math.min(t.length,e.length)?tu:ts)(t,e,r?K:n);class tf extends tt{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:Y,tickCount:5}}map(t){return A(t)?this.output(t):this.options.unknown}invert(t){return A(t)?this.input(t):this.options.unknown}nice(){var t,e,n,r;this.options.nice&&([t,e,n,...r]=this.getTickMethodOptions(),this.options.domain=this.chooseNice()(t,e,n,...r))}getTicks(){var t=this.options.tickMethod,[e,n,r,...i]=this.getTickMethodOptions();return t(e,n,r,...i)}getTickMethodOptions(){var{domain:t,tickCount:e}=this.options;return[t[0],t[t.length-1],e]}chooseNice(){return j}rescale(){this.nice();var[t,e]=this.chooseTransforms();this.composeOutput(t,this.chooseClamp(t)),this.composeInput(t,e,this.chooseClamp(e))}chooseClamp(t){var{clamp:e,range:n}=this.options,t=this.options.domain.map(t),n=Math.min(t.length,n.length);if(e){e=t[0];let r=(t=t[n-1])<e?t:e,i=t<e?e:t;return t=>Math.min(Math.max(r,t),i)}return p}composeOutput(t,e){var{domain:n,range:r,round:i,interpolate:o}=this.options,n=tc(n.map(t),r,o,i);this.output=E(n,e,t)}composeInput(t,e,n){var{domain:r,range:i}=this.options,i=tc(i,r.map(t),Y);this.input=E(e,n,i)}}class tp extends tf{getDefaultOptions(){return{domain:[0,1],range:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolate:X,tickMethod:tl,tickCount:5}}chooseTransforms(){return[p,p]}clone(){return new tp(this.options)}}class th extends ta{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,padding:0,unknown:te,paddingInner:1,paddingOuter:0}}constructor(t){super(t)}getPaddingInner(){return 1}clone(){return new th(this.options)}update(t){super.update(t)}getPaddingOuter(){return this.options.padding}}function td(t,e){for(var n=[],r=0,i=t.length;r<i;r++)n.push(t[r].substr(0,e));return n}var ty,L=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],N=["January","February","March","April","May","June","July","August","September","October","November","December"],tg=td(N,3);!function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0;r<e.length;r++){var i,o=e[r];for(i in o)t[i]=o[i]}}({},{dayNamesShort:td(L,3),dayNames:L,monthNamesShort:tg,monthNames:N,amPm:["am","pm"],DoFn:function(t){return t+["th","st","nd","rd"][3<t%10?0:(t-t%10!=10?1:0)*t%10]}});let tv=ty=class extends tp{getDefaultOptions(){return{domain:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolator:p,tickMethod:tl,tickCount:5}}constructor(t){super(t)}clone(){return new ty(this.options)}};tv=ty=function(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var l=t.length-1;0<=l;l--)(i=t[l])&&(a=(o<3?i(a):3<o?i(e,n,a):i(e,n))||a);return 3<o&&a&&Object.defineProperty(e,n,a),a}([T(function(t){return[t(0),t(1)]},t=>{var[t,e]=t;return E(Y(0,1),k(t,e))})],tv);let tm=o=class extends tp{getDefaultOptions(){return{domain:[0,.5,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolator:p,tickMethod:tl,tickCount:5}}constructor(t){super(t)}clone(){return new o(this.options)}};function tb(t,e,r,i,o){var a=new tp({range:[e,e+i]}),l=new tp({range:[r,r+o]});return{transform:function(t){var t=n(t,2),e=t[0],t=t[1];return[a.map(e),l.map(t)]},untransform:function(t){var t=n(t,2),e=t[0],t=t[1];return[a.invert(e),l.invert(t)]}}}function tx(t,e,r,i,o){return(0,n(t,1)[0])(e,r,i,o)}function tO(t,e,r,i,o){return n(t,1)[0]}function tw(t,e,r,i,o){var a=(t=n(t,4))[0],l=t[1],s=t[2],t=t[3],u=new tp({range:[s,t]}),c=new tp({range:[a,l]}),f=1<(s=o/i)?1:s,p=1<s?1/s:1;return{transform:function(t){var t=n(t,2),e=t[0],t=t[1],e=c.map(e),t=u.map(t);return[t*Math.cos(e)*f*.5+.5,t*Math.sin(e)*p*.5+.5]},untransform:function(t){var t=n(t,2),e=t[0],t=t[1],e=2*(e-.5)/f,t=2*(t-.5)/p,r=Math.sqrt(Math.pow(e,2)+Math.pow(t,2)),t=O(Math.atan2(t,e),a,l);return[c.invert(t),u.invert(r)]}}}function tE(t,e,r,i,o){return{transform:function(t){var t=n(t,2),e=t[0];return[t[1],e]},untransform:function(t){var t=n(t,2),e=t[0];return[t[1],e]}}}function tk(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];return tA.apply(void 0,r([[-1,-1]],n(e),!1))}function tM(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];return tA.apply(void 0,r([[-1,1]],n(e),!1))}function tS(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];return tA.apply(void 0,r([[1,-1]],n(e),!1))}function t_(t,e,r,i,o){var a,t=n(t,1)[0],l=y();return a=Math.sin(t),t=Math.cos(t),l[0]=t,l[1]=a,l[2]=0,l[3]=-a,l[4]=t,l[5]=0,l[6]=0,l[7]=0,l[8]=1,l}function tP(t,e,r,i,o){var a=(t=n(t,4))[0],l=t[1],s=t[2],u=(t[3]-s)/(+l/(2*Math.PI)+1),c=u/(2*Math.PI),f=new tp({range:[s,s+.99*u]}),p=new tp({range:[a,l]}),h=1<(t=o/i)?1:t,d=1<t?1/t:1;return{transform:function(t){var t=n(t,2),e=t[0],t=t[1],e=p.map(e),t=f.map(t);return[Math.cos(e)*(c*e+t)*h*.5+.5,Math.sin(e)*(c*e+t)*d*.5+.5]},untransform:function(t){var t=n(t,2),e=t[0],t=t[1],e=2*(e-.5)/h,t=2*(t-.5)/d,r=Math.sqrt(Math.pow(e,2)+Math.pow(t,2)),t=O(Math.atan2(t,e)+Math.floor(r/u)*Math.PI*2,a,l),e=r-c*t;return[p.invert(t),f.invert(e)]}}}function tj(t,e,r,i,o){var a=(t=n(t,4))[0],l=t[1],s=t[2],t=t[3],u=new tp({range:[s,t]});return{transform:function(t){for(var e=[],n=t.length,r=new th({domain:Array(n).fill(0).map(function(t,e){return e}),range:[a,l]}),i=0;i<n;i++){var o=t[i],s=r.map(i),o=u.map(o);e.push(s,o)}return e},untransform:function(t){for(var e=[],n=0;n<t.length;n+=2){var r=t[n+1];e.push(u.invert(r))}return e}}}tm=o=function(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var l=t.length-1;0<=l;l--)(i=t[l])&&(a=(o<3?i(a):3<o?i(e,n,a):i(e,n))||a);return 3<o&&a&&Object.defineProperty(e,n,a),a}([T(function(t){return[t(0),t(.5),t(1)]},t=>{let[e,n,r]=t,i=E(Y(0,.5),k(e,n)),o=E(Y(.5,1),k(n,r));return t=>(e>r?t<n?o:i:t<n?i:o)(t)})],tm);var tA=function(t,e,r,i,o){var t=n(t,2),a=t[0],t=t[1],l=y();return a=[a,t],(t=l)[0]=a[0],t[1]=0,t[2]=0,t[3]=0,t[4]=a[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t};function tT(t){return 1/Math.tan(t)}function tC(t,e,r,i,o){var a=tT(n(t,1)[0]);return{transform:function(t){var t=n(t,2),e=t[0],t=t[1];return[e+t*a,t]},untransform:function(t){var t=n(t,2),e=t[0],t=t[1];return[e-t*a,t]}}}function tN(t,e,r,i,o){var a=tT(n(t,1)[0]);return{transform:function(t){var t=n(t,2),e=t[0];return[e,t[1]+e*a]},untransform:function(t){var t=n(t,2),e=t[0];return[e,t[1]-e*a]}}}function tL(t,e,n,r,i){var o=t<e,i=(o?e-r:i-e)||i-r,r=o?-1:1;return r*i*(n+1)/(n+i/((t-e)*r))+e}function tI(t,e,n,r,i){var o=t<e,i=(o?e-r:i-e)||i-r;return i/(i*(n+1)/(t-e)-n*(o?-1:1))+e}function tR(t,e,n){return n?new tp({range:[0,1],domain:[0,e]}).map(t):t}function tD(t,e,r,i,o){var a=(t=n(t,3))[0],l=t[1],t=t[2],s=tR(a,i,void 0!==t&&t);return{transform:function(t){var t=n(t,2),e=t[0],t=t[1];return[tL(e,s,l,0,1),t]},untransform:function(t){var t=n(t,2),e=t[0],t=t[1];return[tI(e,s,l,0,1),t]}}}function tF(t,e,r,i,o){var a=(t=n(t,3))[0],l=t[1],t=t[2],s=tR(a,o,void 0!==t&&t);return{transform:function(t){return[(t=n(t,2))[0],tL(t[1],s,l,0,1)]},untransform:function(t){return[(t=n(t,2))[0],tI(t[1],s,l,0,1)]}}}function tz(t,e,r,i,o){var a=(t=n(t,5))[0],l=t[1],s=t[2],u=t[3],t=t[4],c=tR(a,i,t=void 0!==t&&t),f=tR(l,o,t);return{transform:function(t){var t=n(t,2),e=t[0],t=t[1];return[tL(e,c,s,0,1),tL(t,f,u,0,1)]},untransform:function(t){var t=n(t,2),e=t[0],t=t[1];return[tI(e,c,s,0,1),tI(t,f,u,0,1)]}}}function tB(t,e,r,i,o){var a=(t=n(t,5))[0],l=t[1],s=t[2],u=t[3],t=void 0!==(t=t[4])&&t,c=new tp({range:[0,i]}),f=new tp({range:[0,o]}),p=t?a:c.map(a),h=t?l:f.map(l);return{transform:function(t){var t=n(t,2),e=t[0],t=t[1],r=c.map(e)-p,i=f.map(t)-h,o=Math.sqrt(r*r+i*i);return s<o?[e,t]:(e=tL(o,0,u,0,s),o=p+e*Math.cos(t=Math.atan2(i,r)),i=h+e*Math.sin(t),[c.invert(o),f.invert(i)])},untransform:function(t){var t=n(t,2),e=t[0],t=t[1],r=c.map(e)-p,i=f.map(t)-h,o=Math.sqrt(r*r+i*i);return s<o?[e,t]:(e=tI(o,0,u,0,s),o=p+e*Math.cos(t=Math.atan2(i,r)),i=h+e*Math.sin(t),[c.invert(o),f.invert(i)])}}}function tW(t,e,r,i,o,a,l){var s=new tp({range:[e,e+o]}),u=new tp({range:[r,r+a]}),c=new tp({range:[i,i+l]});return{transform:function(t){var t=n(t,3),e=t[0],r=t[1],t=t[2];return[s.map(e),u.map(r),c.map(t)]},untransform:function(t){var t=n(t,3),e=t[0],r=t[1],t=t[2];return[s.invert(e),u.invert(r),c.invert(t)]}}}function t$(t,e,r,i,o,a,l){var s,u=(t=n(t,3))[0],c=t[1],t=t[2];return s=v(),u=[u,c,t],s[0]=1,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=1,s[6]=0,s[7]=0,s[8]=0,s[9]=0,s[10]=1,s[11]=0,s[12]=u[0],s[13]=u[1],s[14]=u[2],s[15]=1,s}function tG(t,e,r,i,o,a,l){return{transform:function(t){var t=n(t,3),e=t[0];return[t[1],e,t[2]]},untransform:function(t){var t=n(t,3),e=t[0];return[t[1],e,t[2]]}}}function tV(t,e,r,i,o,a,l){var s,u=(t=n(t,3))[0],c=t[1],t=t[2];return s=v(),u=[u,c,t],s[0]=u[0],s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=u[1],s[6]=0,s[7]=0,s[8]=0,s[9]=0,s[10]=u[2],s[11]=0,s[12]=0,s[13]=0,s[14]=0,s[15]=1,s}function tH(t){this.options={x:0,y:0,width:300,height:150,transformations:[]},this.transformers={cartesian:tb,translate:w,custom:tx,matrix:tO,polar:tw,transpose:tE,scale:tA,"shear.x":tC,"shear.y":tN,reflect:tk,"reflect.x":tM,"reflect.y":tS,rotate:t_,helix:tP,parallel:tj,fisheye:tz,"fisheye.x":tD,"fisheye.y":tF,"fisheye.circular":tB},this.update(t)}function tU(t){this.options={x:0,y:0,z:0,width:300,height:150,depth:150,transformations:[]},this.transformers={cartesian3D:tW,translate3D:t$,scale3D:tV,transpose3D:tG},this.update(t)}tH.prototype.update=function(t){this.options=f({},this.options,t),this.recoordinate()},tH.prototype.clone=function(){return new tH(this.options)},tH.prototype.getOptions=function(){return this.options},tH.prototype.clear=function(){this.update({transformations:[]})},tH.prototype.getSize=function(){var t=this.options;return[t.width,t.height]},tH.prototype.getCenter=function(){var t=this.options,e=t.x,n=t.y;return[(2*e+t.width)/2,(2*n+t.height)/2]},tH.prototype.transform=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var i=this.options.transformations;return this.update({transformations:r(r([],n(i),!1),[r([],n(t),!1)],!1)}),this},tH.prototype.map=function(t){return this.output(t)},tH.prototype.invert=function(t){return this.input(t)},tH.prototype.recoordinate=function(){this.output=this.compose(),this.input=this.compose(!0)},tH.prototype.compose=function(t){function i(t,e){c.push((e=void 0===e||e)?function(e){for(var i=[],o=0;o<e.length-1;o+=2){var a=[e[o],e[o+1]],a=t(a);i.push.apply(i,r([],n(a),!1))}return i}:t)}var o,a,l=(t=void 0!==t&&t)?r([],n(this.options.transformations),!1).reverse():this.options.transformations,s=t?function(t){return t.untransform}:function(t){return t.transform},u=[],c=[];try{for(var f=e(l),h=f.next();!h.done;h=f.next()){var d,y,g,v,m,O,w=n(h.value),E=w[0],k=w.slice(1),M=this.transformers[E];M&&(y=(d=this.options).x,g=d.y,v=d.width,m=d.height,x(O=M(r([],n(k),!1),y,g,v,m))?u.push(O):(u.length&&(i(this.createMatrixTransform(u,t)),u.splice(0,u.length)),i(s(O)||p,"parallel"!==E)))}}catch(t){o={error:t}}finally{try{h&&!h.done&&(a=f.return)&&a.call(f)}finally{if(o)throw o.error}}return u.length&&i(this.createMatrixTransform(u,t)),b.apply(void 0,r([],n(c),!1))},tH.prototype.createMatrixTransform=function(t,e){var n,r,i,o,a,l,s,u,c,f,p,h,v=y();return e&&t.reverse(),t.forEach(function(t){return g(v,v,t)}),e&&(e=t=v,(h=new d(9))[0]=e[0],h[1]=e[1],h[2]=e[2],h[3]=e[3],h[4]=e[4],h[5]=e[5],h[6]=e[6],h[7]=e[7],h[8]=e[8],h=(e=h)[0],n=e[1],r=e[2],i=e[3],o=e[4],a=e[5],l=e[6],s=e[7],p=h*(u=(e=e[8])*o-a*s)+n*(c=-e*i+a*l)+r*(f=s*i-o*l))&&(t[0]=u*(p=1/p),t[1]=(-e*n+r*s)*p,t[2]=(a*n-r*o)*p,t[3]=c*p,t[4]=(e*h-r*l)*p,t[5]=(-a*h+r*i)*p,t[6]=f*p,t[7]=(-s*h+n*l)*p,t[8]=(o*h-n*i)*p),function(t){var e,n,r,i,t=[t[0],t[1],1];return r=(n=e=t)[0],i=n[1],n=n[2],e[0]=r*v[0]+i*v[3]+n*v[6],e[1]=r*v[1]+i*v[4]+n*v[7],e[2]=r*v[2]+i*v[5]+n*v[8],[t[0],t[1]]}},L=tH,tU.prototype.update=function(t){this.options=f({},this.options,t),this.recoordinate()},tU.prototype.clone=function(){return new tU(this.options)},tU.prototype.getOptions=function(){return this.options},tU.prototype.clear=function(){this.update({transformations:[]})},tU.prototype.getSize=function(){var t=this.options;return[t.width,t.height,t.depth]},tU.prototype.getCenter=function(){var t=this.options,e=t.x,n=t.y,r=t.z;return[(2*e+t.width)/2,(2*n+t.height)/2,(2*r+t.depth)/2]},tU.prototype.transform=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var i=this.options.transformations;return this.update({transformations:r(r([],n(i),!1),[r([],n(t),!1)],!1)}),this},tU.prototype.map=function(t){return this.output(t)},tU.prototype.invert=function(t){return this.input(t)},tU.prototype.recoordinate=function(){this.output=this.compose(),this.input=this.compose(!0)},tU.prototype.compose=function(t){function i(t,e){c.push((e=void 0===e||e)?function(e){for(var i=[],o=0;o<e.length-1;o+=3){var a=[e[o],e[o+1],e[o+2]],a=t(a);i.push.apply(i,r([],n(a),!1))}return i}:t)}var o,a,l=(t=void 0!==t&&t)?r([],n(this.options.transformations),!1).reverse():this.options.transformations,s=t?function(t){return t.untransform}:function(t){return t.transform},u=[],c=[];try{for(var f=e(l),h=f.next();!h.done;h=f.next()){var d,y,g,v,m,O,w,E,k=n(h.value),M=k[0],S=k.slice(1),_=this.transformers[M];_&&(y=(d=this.options).x,g=d.y,v=d.z,m=d.width,O=d.height,w=d.depth,x(E=_(r([],n(S),!1),y,g,v,m,O,w))?u.push(E):(u.length&&(i(this.createMatrixTransform(u,t)),u.splice(0,u.length)),i(s(E)||p,!0)))}}catch(t){o={error:t}}finally{try{h&&!h.done&&(a=f.return)&&a.call(f)}finally{if(o)throw o.error}}return u.length&&i(this.createMatrixTransform(u,t)),b.apply(void 0,r([],n(c),!1))},tU.prototype.createMatrixTransform=function(t,e){var n,r,i,o,a,l,s,u,c,f,p,h,y,g,b,x,O,w,E,k,M,S,_,P,j,A,T,C,N=v();return e&&t.reverse(),t.forEach(function(t){return m(N,N,t)}),e&&(e=t=N,(C=new d(16))[0]=e[0],C[1]=e[1],C[2]=e[2],C[3]=e[3],C[4]=e[4],C[5]=e[5],C[6]=e[6],C[7]=e[7],C[8]=e[8],C[9]=e[9],C[10]=e[10],C[11]=e[11],C[12]=e[12],C[13]=e[13],C[14]=e[14],C[15]=e[15],C=(e=C)[0],n=e[1],r=e[2],i=e[3],o=e[4],a=e[5],l=e[6],s=e[7],u=e[8],c=e[9],f=e[10],p=e[11],h=e[12],y=e[13],g=e[14],e=e[15],T=(b=C*a-n*o)*(A=f*e-p*g)-(x=C*l-r*o)*(j=c*e-p*y)+(O=C*s-i*o)*(P=c*g-f*y)+(w=n*l-r*a)*(_=u*e-p*h)-(E=n*s-i*a)*(S=u*g-f*h)+(k=r*s-i*l)*(M=u*y-c*h))&&(t[0]=(a*A-l*j+s*P)*(T=1/T),t[1]=(r*j-n*A-i*P)*T,t[2]=(y*k-g*E+e*w)*T,t[3]=(f*E-c*k-p*w)*T,t[4]=(l*_-o*A-s*S)*T,t[5]=(C*A-r*_+i*S)*T,t[6]=(g*O-h*k-e*x)*T,t[7]=(u*k-f*O+p*x)*T,t[8]=(o*j-a*_+s*M)*T,t[9]=(n*_-C*j-i*M)*T,t[10]=(h*E-y*O+e*b)*T,t[11]=(c*O-u*E-p*b)*T,t[12]=(a*S-o*P-l*M)*T,t[13]=(C*P-n*S+r*M)*T,t[14]=(y*x-h*w-g*b)*T,t[15]=(u*w-c*x+f*b)*T),function(t){var e,n,r,i,o,t=[t[0],t[1],t[2],1];return r=(n=e=t)[0],i=n[1],o=n[2],n=n[3],e[0]=N[0]*r+N[4]*i+N[8]*o+N[12]*n,e[1]=N[1]*r+N[5]*i+N[9]*o+N[13]*n,e[2]=N[2]*r+N[6]*i+N[10]*o+N[14]*n,e[3]=N[3]*r+N[7]*i+N[11]*o+N[15]*n,[t[0],t[1],t[2]]}},tg=tU,t.Coordinate=L,t.Coordinate3D=tg,Object.defineProperty(t,"__esModule",{value:!0})}(e)},420:function(t){"use strict";var e=Object.prototype.hasOwnProperty,n="~";function r(){}function i(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function o(t,e,r,o,a){if("function"!=typeof r)throw TypeError("The listener must be a function");var l=new i(r,o||t,a),s=n?n+e:e;return t._events[s]?t._events[s].fn?t._events[s]=[t._events[s],l]:t._events[s].push(l):(t._events[s]=l,t._eventsCount++),t}function a(t,e){0==--t._eventsCount?t._events=new r:delete t._events[e]}function l(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),!new r().__proto__&&(n=!1)),l.prototype.eventNames=function(){var t,r,i=[];if(0===this._eventsCount)return i;for(r in t=this._events)e.call(t,r)&&i.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(t)):i},l.prototype.listeners=function(t){var e=n?n+t:t,r=this._events[e];if(!r)return[];if(r.fn)return[r.fn];for(var i=0,o=r.length,a=Array(o);i<o;i++)a[i]=r[i].fn;return a},l.prototype.listenerCount=function(t){var e=n?n+t:t,r=this._events[e];return r?r.fn?1:r.length:0},l.prototype.emit=function(t,e,r,i,o,a){var l=n?n+t:t;if(!this._events[l])return!1;var s,u,c=this._events[l],f=arguments.length;if(c.fn){switch(c.once&&this.removeListener(t,c.fn,void 0,!0),f){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,e),!0;case 3:return c.fn.call(c.context,e,r),!0;case 4:return c.fn.call(c.context,e,r,i),!0;case 5:return c.fn.call(c.context,e,r,i,o),!0;case 6:return c.fn.call(c.context,e,r,i,o,a),!0}for(u=1,s=Array(f-1);u<f;u++)s[u-1]=arguments[u];c.fn.apply(c.context,s)}else{var p,h=c.length;for(u=0;u<h;u++)switch(c[u].once&&this.removeListener(t,c[u].fn,void 0,!0),f){case 1:c[u].fn.call(c[u].context);break;case 2:c[u].fn.call(c[u].context,e);break;case 3:c[u].fn.call(c[u].context,e,r);break;case 4:c[u].fn.call(c[u].context,e,r,i);break;default:if(!s)for(p=1,s=Array(f-1);p<f;p++)s[p-1]=arguments[p];c[u].fn.apply(c[u].context,s)}}return!0},l.prototype.on=function(t,e,n){return o(this,t,e,n,!1)},l.prototype.once=function(t,e,n){return o(this,t,e,n,!0)},l.prototype.removeListener=function(t,e,r,i){var o=n?n+t:t;if(!this._events[o])return this;if(!e)return a(this,o),this;var l=this._events[o];if(l.fn)l.fn===e&&(!i||l.once)&&(!r||l.context===r)&&a(this,o);else{for(var s=0,u=[],c=l.length;s<c;s++)(l[s].fn!==e||i&&!l[s].once||r&&l[s].context!==r)&&u.push(l[s]);u.length?this._events[o]=1===u.length?u[0]:u:a(this,o)}return this},l.prototype.removeAllListeners=function(t){var e;return t?(e=n?n+t:t,this._events[e]&&a(this,e)):(this._events=new r,this._eventsCount=0),this},l.prototype.off=l.prototype.removeListener,l.prototype.addListener=l.prototype.on,l.prefixed=n,l.EventEmitter=l;t.exports=l},38:function(t){"use strict";t.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]}},254:function(t,e,n){var r=n(38),i=n(544),o=Object.hasOwnProperty,a=Object.create(null);for(var l in r)o.call(r,l)&&(a[r[l]]=l);var s=t.exports={to:{},get:{}};function u(t,e,n){return Math.min(Math.max(e,t),n)}function c(t){var e=Math.round(t).toString(16).toUpperCase();return e.length<2?"0"+e:e}s.get=function(t){var e,n;switch(t.substring(0,3).toLowerCase()){case"hsl":e=s.get.hsl(t),n="hsl";break;case"hwb":e=s.get.hwb(t),n="hwb";break;default:e=s.get.rgb(t),n="rgb"}return e?{model:n,value:e}:null},s.get.rgb=function(t){if(!t)return null;var e,n,i,a=[0,0,0,1];if(e=t.match(/^#([a-f0-9]{6})([a-f0-9]{2})?$/i)){for(n=0,i=e[2],e=e[1];n<3;n++){var l=2*n;a[n]=parseInt(e.slice(l,l+2),16)}i&&(a[3]=parseInt(i,16)/255)}else if(e=t.match(/^#([a-f0-9]{3,4})$/i)){for(n=0,i=(e=e[1])[3];n<3;n++)a[n]=parseInt(e[n]+e[n],16);i&&(a[3]=parseInt(i+i,16)/255)}else if(e=t.match(/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)){for(n=0;n<3;n++)a[n]=parseInt(e[n+1],0);e[4]&&(e[5]?a[3]=.01*parseFloat(e[4]):a[3]=parseFloat(e[4]))}else if(e=t.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)){for(n=0;n<3;n++)a[n]=Math.round(2.55*parseFloat(e[n+1]));e[4]&&(e[5]?a[3]=.01*parseFloat(e[4]):a[3]=parseFloat(e[4]))}else if(!(e=t.match(/^(\w+)$/)))return null;else return"transparent"===e[1]?[0,0,0,0]:o.call(r,e[1])?((a=r[e[1]])[3]=1,a):null;for(n=0;n<3;n++)a[n]=u(a[n],0,255);return a[3]=u(a[3],0,1),a},s.get.hsl=function(t){if(!t)return null;var e=t.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*)?\)$/);if(e){var n=parseFloat(e[4]);return[(parseFloat(e[1])%360+360)%360,u(parseFloat(e[2]),0,100),u(parseFloat(e[3]),0,100),u(isNaN(n)?1:n,0,1)]}return null},s.get.hwb=function(t){if(!t)return null;var e=t.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*)?\)$/);if(e){var n=parseFloat(e[4]);return[(parseFloat(e[1])%360+360)%360,u(parseFloat(e[2]),0,100),u(parseFloat(e[3]),0,100),u(isNaN(n)?1:n,0,1)]}return null},s.to.hex=function(){var t=i(arguments);return"#"+c(t[0])+c(t[1])+c(t[2])+(t[3]<1?c(Math.round(255*t[3])):"")},s.to.rgb=function(){var t=i(arguments);return t.length<4||1===t[3]?"rgb("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+")":"rgba("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+", "+t[3]+")"},s.to.rgb.percent=function(){var t=i(arguments),e=Math.round(t[0]/255*100),n=Math.round(t[1]/255*100),r=Math.round(t[2]/255*100);return t.length<4||1===t[3]?"rgb("+e+"%, "+n+"%, "+r+"%)":"rgba("+e+"%, "+n+"%, "+r+"%, "+t[3]+")"},s.to.hsl=function(){var t=i(arguments);return t.length<4||1===t[3]?"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)":"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+t[3]+")"},s.to.hwb=function(){var t=i(arguments),e="";return t.length>=4&&1!==t[3]&&(e=", "+t[3]),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+e+")"},s.to.keyword=function(t){return a[t.slice(0,3)]}},56:function(t,e){var n;n=0,function(t){"use strict";function e(t){for(var e=Array(t),n=0;n<t;++n)e[n]=0;return e}function n(t,e){for(var n=0,r=0;r<t.length;++r)n+=t[r]*e[r];return n}function r(t){return Math.sqrt(n(t,t))}function i(t,e,n){for(var r=0;r<e.length;++r)t[r]=e[r]*n}function o(t,e,n,r,i){for(var o=0;o<t.length;++o)t[o]=e*n[o]+r*i[o]}function a(t,e,r,i,a,l,s){var u=r.fx,c=n(r.fxprime,e),f=u,p=u,h=c,d=0;function y(p,d,y){for(var g=0;g<16;++g)if(a=(p+d)/2,o(i.x,1,r.x,a,e),f=i.fx=t(i.x,i.fxprime),h=n(i.fxprime,e),f>u+l*a*c||f>=y)d=a;else{if(Math.abs(h)<=-s*c)return a;h*(d-p)>=0&&(d=p),p=a,y=f}return 0}a=a||1,l=l||1e-6,s=s||.1;for(var g=0;g<10;++g){if(o(i.x,1,r.x,a,e),f=i.fx=t(i.x,i.fxprime),h=n(i.fxprime,e),f>u+l*a*c||g&&f>=p)return y(d,a,p);if(Math.abs(h)<=-s*c)break;if(h>=0)return y(a,d,f);p=f,d=a,a*=2}return a}t.bisect=function(t,e,n,r){var i=(r=r||{}).maxIterations||100,o=r.tolerance||1e-10,a=t(e),l=t(n),s=n-e;if(a*l>0)throw"Initial bisect points must have opposite signs";if(0===a)return e;if(0===l)return n;for(var u=0;u<i;++u){var c=e+(s/=2),f=t(c);if(f*a>=0&&(e=c),Math.abs(s)<o||0===f)return c}return e+s},t.nelderMead=function(t,e,n){var r,i=(n=n||{}).maxIterations||200*e.length,a=n.nonZeroDelta||1.05,l=n.zeroDelta||.001,s=n.minErrorDelta||1e-6,u=n.minErrorDelta||1e-5,c=void 0!==n.rho?n.rho:1,f=void 0!==n.chi?n.chi:2,p=void 0!==n.psi?n.psi:-.5,h=void 0!==n.sigma?n.sigma:.5,d=e.length,y=Array(d+1);y[0]=e,y[0].fx=t(e),y[0].id=0;for(var g=0;g<d;++g){var v=e.slice();v[g]=v[g]?v[g]*a:l,y[g+1]=v,y[g+1].fx=t(v),y[g+1].id=g+1}function m(t){for(var e=0;e<t.length;e++)y[d][e]=t[e];y[d].fx=t.fx}for(var b=function(t,e){return t.fx-e.fx},x=e.slice(),O=e.slice(),w=e.slice(),E=e.slice(),k=0;k<i;++k){if(y.sort(b),n.history){var M=y.map(function(t){var e=t.slice();return e.fx=t.fx,e.id=t.id,e});M.sort(function(t,e){return t.id-e.id}),n.history.push({x:y[0].slice(),fx:y[0].fx,simplex:M})}for(g=0,r=0;g<d;++g)r=Math.max(r,Math.abs(y[0][g]-y[1][g]));if(Math.abs(y[0].fx-y[d].fx)<s&&r<u)break;for(g=0;g<d;++g){x[g]=0;for(var S=0;S<d;++S)x[g]+=y[S][g];x[g]/=d}var _=y[d];if(o(O,1+c,x,-c,_),O.fx=t(O),O.fx<y[0].fx)o(E,1+f,x,-f,_),E.fx=t(E),m(E.fx<O.fx?E:O);else if(O.fx>=y[d-1].fx){var P=!1;if(O.fx>_.fx?(o(w,1+p,x,-p,_),w.fx=t(w),w.fx<_.fx?m(w):P=!0):(o(w,1-p*c,x,p*c,_),w.fx=t(w),w.fx<O.fx?m(w):P=!0),P){if(h>=1)break;for(g=1;g<y.length;++g)o(y[g],1-h,y[0],h,y[g]),y[g].fx=t(y[g])}}else m(O)}return y.sort(b),{fx:y[0].fx,x:y[0]}},t.conjugateGradient=function(t,e,l){var s,u,c,f={x:e.slice(),fx:0,fxprime:e.slice()},p={x:e.slice(),fx:0,fxprime:e.slice()},h=e.slice(),d=1;c=(l=l||{}).maxIterations||20*e.length,f.fx=t(f.x,f.fxprime),i(s=f.fxprime.slice(),f.fxprime,-1);for(var y=0;y<c;++y){if(d=a(t,s,f,p,d),l.history&&l.history.push({x:f.x.slice(),fx:f.fx,fxprime:f.fxprime.slice(),alpha:d}),d){o(h,1,p.fxprime,-1,f.fxprime);var g=n(f.fxprime,f.fxprime);o(s,Math.max(0,n(h,p.fxprime)/g),s,-1,p.fxprime),u=f,f=p,p=u}else i(s,f.fxprime,-1);if(1e-5>=r(f.fxprime))break}return l.history&&l.history.push({x:f.x.slice(),fx:f.fx,fxprime:f.fxprime.slice(),alpha:d}),f},t.gradientDescent=function(t,e,n){for(var i=(n=n||{}).maxIterations||100*e.length,a=n.learnRate||.001,l={x:e.slice(),fx:0,fxprime:e.slice()},s=0;s<i&&(l.fx=t(l.x,l.fxprime),n.history&&n.history.push({x:l.x.slice(),fx:l.fx,fxprime:l.fxprime.slice()}),o(l.x,1,l.x,-a,l.fxprime),!(1e-5>=r(l.fxprime)));++s);return l},t.gradientDescentLineSearch=function(t,e,n){n=n||{};var o,l={x:e.slice(),fx:0,fxprime:e.slice()},s={x:e.slice(),fx:0,fxprime:e.slice()},u=n.maxIterations||100*e.length,c=n.learnRate||1,f=e.slice(),p=n.c1||.001,h=n.c2||.1,d=[];if(n.history){var y=t;t=function(t,e){return d.push(t.slice()),y(t,e)}}l.fx=t(l.x,l.fxprime);for(var g=0;g<u&&(i(f,l.fxprime,-1),c=a(t,f,l,s,c,p,h),n.history&&(n.history.push({x:l.x.slice(),fx:l.fx,fxprime:l.fxprime.slice(),functionCalls:d,learnRate:c,alpha:c}),d=[]),o=l,l=s,s=o,!(0===c||1e-5>r(l.fxprime)));++g);return l},t.zeros=e,t.zerosM=function(t,n){return e(t).map(function(){return e(n)})},t.norm2=r,t.weightedSum=o,t.scale=i}(e)},363:function(t){"use strict";var e=t.exports;t.exports.isNumber=function(t){return"number"==typeof t},t.exports.findMin=function(t){if(0===t.length)return 1/0;for(var e=t[0],n=1;n<t.length;n++)e=Math.min(e,t[n]);return e},t.exports.findMax=function(t){if(0===t.length)return-1/0;for(var e=t[0],n=1;n<t.length;n++)e=Math.max(e,t[n]);return e},t.exports.findMinMulti=function(t){for(var n=e.findMin(t[0]),r=1;r<t.length;r++)n=Math.min(n,e.findMin(t[r]));return n},t.exports.findMaxMulti=function(t){for(var n=e.findMax(t[0]),r=1;r<t.length;r++)n=Math.max(n,e.findMax(t[r]));return n},t.exports.inside=function(t,e,n){return t<=n&&n<=e}},740:function(t,e,n){"use strict";var r=Math.log(2),i=t.exports,o=n(363);function a(t){return 1-Math.abs(t)}t.exports.getUnifiedMinMax=function(t,e){return i.getUnifiedMinMaxMulti([t],e)},t.exports.getUnifiedMinMaxMulti=function(t,e){e=e||{};var n=!1,r=!1,i=o.isNumber(e.width)?e.width:2,a=o.isNumber(e.size)?e.size:50,l=o.isNumber(e.min)?e.min:(n=!0,o.findMinMulti(t)),s=o.isNumber(e.max)?e.max:(r=!0,o.findMaxMulti(t)),u=(s-l)/(a-1);return n&&(l-=2*i*u),r&&(s+=2*i*u),{min:l,max:s}},t.exports.create=function(t,e){if(e=e||{},!t||0===t.length)return[];var n=o.isNumber(e.size)?e.size:50,r=o.isNumber(e.width)?e.width:2,l=i.getUnifiedMinMax(t,{size:n,width:r,min:e.min,max:e.max}),s=l.min,u=l.max-s,c=u/(n-1);if(0===u)return[{x:s,y:1}];for(var f=[],p=0;p<n;p++)f.push({x:s+p*c,y:0});var h=function(t,e){for(var n={},r=0,i=-e;i<=e;i++)r+=t(i/e),n[i]=r;return n}(a,r),d=h[r],y=h[r-1]-h[r-2],g=0;t.forEach(function(t){var e=Math.floor((t-s)/c);if(!(e+r<0)&&!(e-r>=f.length)){var n=Math.max(e-r,0),i=Math.min(e+r,f.length-1),a=n-(e-r),l=e+r-i,u=d/(d-(h[-r-1+a]||0)-(h[-r-1+l]||0));a>0&&(g+=u*(a-1)*y);var p=Math.max(0,e-r+1);o.inside(0,f.length-1,p)&&(f[p].y+=1*u*y),o.inside(0,f.length-1,e+1)&&(f[e+1].y-=2*u*y),o.inside(0,f.length-1,i+1)&&(f[i+1].y+=1*u*y)}});var v=g,m=0,b=0;return f.forEach(function(t){m+=t.y,v+=m,t.y=v,b+=v}),b>0&&f.forEach(function(t){t.y/=b}),f};t.exports.getExpectedValueFromPdf=function(t){if(!!t&&0!==t.length){var e=0;return t.forEach(function(t){e+=t.x*t.y}),e}},t.exports.getXWithLeftTailArea=function(t,e){if(!!t&&0!==t.length){for(var n=0,r=0,i=0;i<t.length&&(r=i,!((n+=t[i].y)>=e));i++);return t[r].x}},t.exports.getPerplexity=function(t){if(!!t&&0!==t.length){var e=0;return t.forEach(function(t){var n=Math.log(t.y);isFinite(n)&&(e+=t.y*n)}),Math.pow(2,e=-e/r)}}},590:function(t,e,n){"use strict";var r,i,o,a,l,s,u=n(156),c=n(881);function f(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=1;n<arguments.length;n++)e+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var p=new Set,h={};function d(t,e){y(t,e),y(t+"Capture",e)}function y(t,e){for(h[t]=e,t=0;t<e.length;t++)p.add(e[t])}var g=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),v=Object.prototype.hasOwnProperty,m=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,b={},x={};function O(t,e,n,r,i,o,a){this.acceptsBooleans=2===e||3===e||4===e,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=t,this.type=e,this.sanitizeURL=o,this.removeEmptyString=a}var w={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){w[t]=new O(t,0,!1,t,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];w[e]=new O(e,1,!1,t[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(t){w[t]=new O(t,2,!1,t.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){w[t]=new O(t,2,!1,t,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(t){w[t]=new O(t,3,!1,t.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(t){w[t]=new O(t,3,!0,t,null,!1,!1)}),["capture","download"].forEach(function(t){w[t]=new O(t,4,!1,t,null,!1,!1)}),["cols","rows","size","span"].forEach(function(t){w[t]=new O(t,6,!1,t,null,!1,!1)}),["rowSpan","start"].forEach(function(t){w[t]=new O(t,5,!1,t.toLowerCase(),null,!1,!1)});var E=/[\-:]([a-z])/g;function k(t){return t[1].toUpperCase()}function M(t,e,n,r){var i,o=w.hasOwnProperty(e)?w[e]:null;if(null!==o?0!==o.type:r||!(2<e.length)||"o"!==e[0]&&"O"!==e[0]||"n"!==e[1]&&"N"!==e[1]){;(function(t,e,n,r){if(null==e||function(t,e,n,r){if(null!==n&&0===n.type)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":if(r)return!1;if(null!==n)return!n.acceptsBooleans;return"data-"!==(t=t.toLowerCase().slice(0,5))&&"aria-"!==t;default:return!1}}(t,e,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!e;case 4:return!1===e;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1})(e,n,o,r)&&(n=null),r||null===o?(i=e,(!!v.call(x,i)||!v.call(b,i)&&(m.test(i)?x[i]=!0:(b[i]=!0,!1)))&&(null===n?t.removeAttribute(e):t.setAttribute(e,""+n))):o.mustUseProperty?t[o.propertyName]=null===n?3!==o.type&&"":n:(e=o.attributeName,r=o.attributeNamespace,null===n?t.removeAttribute(e):(n=3===(o=o.type)||4===o&&!0===n?"":""+n,r?t.setAttributeNS(r,e,n):t.setAttribute(e,n)))}}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(t){var e=t.replace(E,k);w[e]=new O(e,1,!1,t,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(E,k);w[e]=new O(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(E,k);w[e]=new O(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(t){w[t]=new O(t,1,!1,t.toLowerCase(),null,!1,!1)}),w.xlinkHref=new O("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(t){w[t]=new O(t,1,!1,t.toLowerCase(),null,!0,!0)});var S=u.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,_=Symbol.for("react.element"),P=Symbol.for("react.portal"),j=Symbol.for("react.fragment"),A=Symbol.for("react.strict_mode"),T=Symbol.for("react.profiler"),C=Symbol.for("react.provider"),N=Symbol.for("react.context"),L=Symbol.for("react.forward_ref"),I=Symbol.for("react.suspense"),R=Symbol.for("react.suspense_list"),D=Symbol.for("react.memo"),F=Symbol.for("react.lazy");Symbol.for("react.scope"),Symbol.for("react.debug_trace_mode");var z=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden"),Symbol.for("react.cache"),Symbol.for("react.tracing_marker");var B=Symbol.iterator;function W(t){return null===t||"object"!=typeof t?null:"function"==typeof(t=B&&t[B]||t["@@iterator"])?t:null}var $,G=Object.assign;function V(t){if(void 0===$)try{throw Error()}catch(t){var e=t.stack.trim().match(/\n( *(at )?)/);$=e&&e[1]||""}return"\n"+$+t}var H=!1;function U(t,e){if(!t||H)return"";H=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(e){if(e=function(){throw Error()},Object.defineProperty(e.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(e,[])}catch(t){var r=t}Reflect.construct(t,[],e)}else{try{e.call()}catch(t){r=t}t.call(e.prototype)}}else{try{throw Error()}catch(t){r=t}t()}}catch(e){if(e&&r&&"string"==typeof e.stack){for(var i=e.stack.split("\n"),o=r.stack.split("\n"),a=i.length-1,l=o.length-1;1<=a&&0<=l&&i[a]!==o[l];)l--;for(;1<=a&&0<=l;a--,l--)if(i[a]!==o[l]){if(1!==a||1!==l)do if(a--,0>--l||i[a]!==o[l]){var s="\n"+i[a].replace(" at new "," at ");return t.displayName&&s.includes("<anonymous>")&&(s=s.replace("<anonymous>",t.displayName)),s}while(1<=a&&0<=l);break}}}finally{H=!1,Error.prepareStackTrace=n}return(t=t?t.displayName||t.name:"")?V(t):""}function q(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":case"object":return t;default:return""}}function Y(t){var e=t.type;return(t=t.nodeName)&&"input"===t.toLowerCase()&&("checkbox"===e||"radio"===e)}function X(t){t._valueTracker||(t._valueTracker=function(t){var e=Y(t)?"checked":"value",n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),r=""+t[e];if(!t.hasOwnProperty(e)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var i=n.get,o=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(t){r=""+t,o.call(this,t)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(t){r=""+t},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}(t))}function K(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),r="";return t&&(r=Y(t)?t.checked?"true":"false":t.value),(t=r)!==n&&(e.setValue(t),!0)}function Z(t){if(void 0===(t=t||("undefined"!=typeof document?document:void 0)))return null;try{return t.activeElement||t.body}catch(e){return t.body}}function Q(t,e){var n=e.checked;return G({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:t._wrapperState.initialChecked})}function J(t,e){var n=null==e.defaultValue?"":e.defaultValue,r=null!=e.checked?e.checked:e.defaultChecked;n=q(null!=e.value?e.value:n),t._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===e.type||"radio"===e.type?null!=e.checked:null!=e.value}}function tt(t,e){null!=(e=e.checked)&&M(t,"checked",e,!1)}function te(t,e){tt(t,e);var n=q(e.value),r=e.type;if(null!=n)"number"===r?(0===n&&""===t.value||t.value!=n)&&(t.value=""+n):t.value!==""+n&&(t.value=""+n);else if("submit"===r||"reset"===r){t.removeAttribute("value");return}e.hasOwnProperty("value")?tr(t,e.type,n):e.hasOwnProperty("defaultValue")&&tr(t,e.type,q(e.defaultValue)),null==e.checked&&null!=e.defaultChecked&&(t.defaultChecked=!!e.defaultChecked)}function tn(t,e,n){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var r=e.type;if(!("submit"!==r&&"reset"!==r||void 0!==e.value&&null!==e.value))return;e=""+t._wrapperState.initialValue,n||e===t.value||(t.value=e),t.defaultValue=e}""!==(n=t.name)&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,""!==n&&(t.name=n)}function tr(t,e,n){("number"!==e||Z(t.ownerDocument)!==t)&&(null==n?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}var ti=Array.isArray;function to(t,e,n,r){if(t=t.options,e){e={};for(var i=0;i<n.length;i++)e["$"+n[i]]=!0;for(n=0;n<t.length;n++)i=e.hasOwnProperty("$"+t[n].value),t[n].selected!==i&&(t[n].selected=i),i&&r&&(t[n].defaultSelected=!0)}else{for(i=0,n=""+q(n),e=null;i<t.length;i++){if(t[i].value===n){t[i].selected=!0,r&&(t[i].defaultSelected=!0);return}null!==e||t[i].disabled||(e=t[i])}null!==e&&(e.selected=!0)}}function ta(t,e){if(null!=e.dangerouslySetInnerHTML)throw Error(f(91));return G({},e,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})}function tl(t,e){var n=e.value;if(null==n){if(n=e.children,e=e.defaultValue,null!=n){if(null!=e)throw Error(f(92));if(ti(n)){if(1<n.length)throw Error(f(93));n=n[0]}e=n}null==e&&(e=""),n=e}t._wrapperState={initialValue:q(n)}}function ts(t,e){var n=q(e.value),r=q(e.defaultValue);null!=n&&((n=""+n)!==t.value&&(t.value=n),null==e.defaultValue&&t.defaultValue!==n&&(t.defaultValue=n)),null!=r&&(t.defaultValue=""+r)}function tu(t){var e=t.textContent;e===t._wrapperState.initialValue&&""!==e&&null!==e&&(t.value=e)}function tc(t){switch(t){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function tf(t,e){return null==t||"http://www.w3.org/1999/xhtml"===t?tc(e):"http://www.w3.org/2000/svg"===t&&"foreignObject"===e?"http://www.w3.org/1999/xhtml":t}var tp,th,td=(tp=function(t,e){if("http://www.w3.org/2000/svg"!==t.namespaceURI||"innerHTML"in t)t.innerHTML=e;else{for((th=th||document.createElement("div")).innerHTML="<svg>"+e.valueOf().toString()+"</svg>",e=th.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,e,n,r){MSApp.execUnsafeLocalFunction(function(){return tp(t,e,n,r)})}:tp);function ty(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&3===n.nodeType){n.nodeValue=e;return}}t.textContent=e}var tg={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},tv=["Webkit","ms","Moz","O"];function tm(t,e,n){return null==e||"boolean"==typeof e||""===e?"":n||"number"!=typeof e||0===e||tg.hasOwnProperty(t)&&tg[t]?(""+e).trim():e+"px"}function tb(t,e){for(var n in t=t.style,e)if(e.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=tm(n,e[n],r);"float"===n&&(n="cssFloat"),r?t.setProperty(n,i):t[n]=i}}Object.keys(tg).forEach(function(t){tv.forEach(function(e){tg[e=e+t.charAt(0).toUpperCase()+t.substring(1)]=tg[t]})});var tx=G({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function tO(t,e){if(e){if(tx[t]&&(null!=e.children||null!=e.dangerouslySetInnerHTML))throw Error(f(137,t));if(null!=e.dangerouslySetInnerHTML){if(null!=e.children)throw Error(f(60));if("object"!=typeof e.dangerouslySetInnerHTML||!("__html"in e.dangerouslySetInnerHTML))throw Error(f(61))}if(null!=e.style&&"object"!=typeof e.style)throw Error(f(62))}}function tw(t,e){if(-1===t.indexOf("-"))return"string"==typeof e.is;switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var tE=null;function tk(t){return(t=t.target||t.srcElement||window).correspondingUseElement&&(t=t.correspondingUseElement),3===t.nodeType?t.parentNode:t}var tM=null,tS=null,t_=null;function tP(t){if(t=rR(t)){if("function"!=typeof tM)throw Error(f(280));var e=t.stateNode;e&&(e=rF(e),tM(t.stateNode,t.type,e))}}function tj(t){tS?t_?t_.push(t):t_=[t]:tS=t}function tA(){if(tS){var t=tS,e=t_;if(t_=tS=null,tP(t),e)for(t=0;t<e.length;t++)tP(e[t])}}function tT(t,e){return t(e)}function tC(){}var tN=!1;function tL(t,e,n){if(tN)return t(e,n);tN=!0;try{return tT(t,e,n)}finally{tN=!1,(null!==tS||null!==t_)&&(tC(),tA())}}function tI(t,e){var n=t.stateNode;if(null===n)return null;var r=rF(n);if(null===r)return null;switch(n=r[e],e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(t=t.type)||"input"===t||"select"===t||"textarea"===t)),t=!r;break;default:t=!1}if(t)return null;if(n&&"function"!=typeof n)throw Error(f(231,e,typeof n));return n}var tR=!1;if(g)try{var tD={};Object.defineProperty(tD,"passive",{get:function(){tR=!0}}),window.addEventListener("test",tD,tD),window.removeEventListener("test",tD,tD)}catch(t){tR=!1}function tF(t,e,n,r,i,o,a,l,s){var u=Array.prototype.slice.call(arguments,3);try{e.apply(n,u)}catch(t){this.onError(t)}}var tz=!1,tB=null,tW=!1,t$=null,tG={onError:function(t){tz=!0,tB=t}};function tV(t,e,n,r,i,o,a,l,s){tz=!1,tB=null,tF.apply(tG,arguments)}function tH(t){var e=t,n=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do 0!=(4098&(e=t).flags)&&(n=e.return),t=e.return;while(t)}return 3===e.tag?n:null}function tU(t){if(13===t.tag){var e=t.memoizedState;if(null===e&&null!==(t=t.alternate)&&(e=t.memoizedState),null!==e)return e.dehydrated}return null}function tq(t){if(tH(t)!==t)throw Error(f(188))}function tY(t){return null!==(t=function(t){var e=t.alternate;if(!e){if(null===(e=tH(t)))throw Error(f(188));return e!==t?null:t}for(var n=t,r=e;;){var i=n.return;if(null===i)break;var o=i.alternate;if(null===o){if(null!==(r=i.return)){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return tq(i),t;if(o===r)return tq(i),e;o=o.sibling}throw Error(f(188))}if(n.return!==r.return)n=i,r=o;else{for(var a=!1,l=i.child;l;){if(l===n){a=!0,n=i,r=o;break}if(l===r){a=!0,r=i,n=o;break}l=l.sibling}if(!a){for(l=o.child;l;){if(l===n){a=!0,n=o,r=i;break}if(l===r){a=!0,r=o,n=i;break}l=l.sibling}if(!a)throw Error(f(189))}}if(n.alternate!==r)throw Error(f(190))}if(3!==n.tag)throw Error(f(188));return n.stateNode.current===n?t:e}(t))?function t(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var n=t(e);if(null!==n)return n;e=e.sibling}return null}(t):null}var tX=c.unstable_scheduleCallback,tK=c.unstable_cancelCallback,tZ=c.unstable_shouldYield,tQ=c.unstable_requestPaint,tJ=c.unstable_now,t0=c.unstable_getCurrentPriorityLevel,t1=c.unstable_ImmediatePriority,t2=c.unstable_UserBlockingPriority,t5=c.unstable_NormalPriority,t3=c.unstable_LowPriority,t4=c.unstable_IdlePriority,t6=null,t8=null,t9=Math.clz32?Math.clz32:function(t){return 0==(t>>>=0)?32:31-(t7(t)/et|0)|0},t7=Math.log,et=Math.LN2,ee=64,en=4194304;function er(t){switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&t;case 4194304:case 8388608:case 0x1000000:case 0x2000000:case 0x4000000:return 0x7c00000&t;case 0x8000000:return 0x8000000;case 0x10000000:return 0x10000000;case 0x20000000:return 0x20000000;case 0x40000000:return 0x40000000;default:return t}}function ei(t,e){var n=t.pendingLanes;if(0===n)return 0;var r=0,i=t.suspendedLanes,o=t.pingedLanes,a=0xfffffff&n;if(0!==a){var l=a&~i;0!==l?r=er(l):0!=(o&=a)&&(r=er(o))}else 0!=(a=n&~i)?r=er(a):0!==o&&(r=er(o));if(0===r)return 0;if(0!==e&&e!==r&&0==(e&i)&&((i=r&-r)>=(o=e&-e)||16===i&&0!=(4194240&o)))return e;if(0!=(4&r)&&(r|=16&n),0!==(e=t.entangledLanes))for(t=t.entanglements,e&=r;0<e;)i=1<<(n=31-t9(e)),r|=t[n],e&=~i;return r}function eo(t){return 0!=(t=-0x40000001&t.pendingLanes)?t:0x40000000&t?0x40000000:0}function ea(){var t=ee;return 0==(4194240&(ee<<=1))&&(ee=64),t}function el(t){for(var e=[],n=0;31>n;n++)e.push(t);return e}function es(t,e,n){t.pendingLanes|=e,0x20000000!==e&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,t[e=31-t9(e)]=n}function eu(t,e){var n=t.entangledLanes|=e;for(t=t.entanglements;n;){var r=31-t9(n),i=1<<r;i&e|t[r]&e&&(t[r]|=e),n&=~i}}var ec=0;function ef(t){return 1<(t&=-t)?4<t?0!=(0xfffffff&t)?16:0x20000000:4:1}var ep,eh,ed,ey,eg,ev=!1,em=[],eb=null,ex=null,eO=null,ew=new Map,eE=new Map,ek=[],eM="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function eS(t,e){switch(t){case"focusin":case"focusout":eb=null;break;case"dragenter":case"dragleave":ex=null;break;case"mouseover":case"mouseout":eO=null;break;case"pointerover":case"pointerout":ew.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":eE.delete(e.pointerId)}}function e_(t,e,n,r,i,o){return null===t||t.nativeEvent!==o?(t={blockedOn:e,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[i]},null!==e&&null!==(e=rR(e))&&eh(e),t):(t.eventSystemFlags|=r,e=t.targetContainers,null!==i&&-1===e.indexOf(i)&&e.push(i),t)}function eP(t){var e=rI(t.target);if(null!==e){var n=tH(e);if(null!==n){if(13===(e=n.tag)){if(null!==(e=tU(n))){t.blockedOn=e,eg(t.priority,function(){ed(n)});return}}else if(3===e&&n.stateNode.current.memoizedState.isDehydrated){t.blockedOn=3===n.tag?n.stateNode.containerInfo:null;return}}}t.blockedOn=null}function ej(t){if(null!==t.blockedOn)return!1;for(var e=t.targetContainers;0<e.length;){var n=eB(t.domEventName,t.eventSystemFlags,e[0],t.nativeEvent);if(null!==n)return null!==(e=rR(n))&&eh(e),t.blockedOn=n,!1;var r=new(n=t.nativeEvent).constructor(n.type,n);tE=r,n.target.dispatchEvent(r),tE=null;e.shift()}return!0}function eA(t,e,n){ej(t)&&n.delete(e)}function eT(){ev=!1,null!==eb&&ej(eb)&&(eb=null),null!==ex&&ej(ex)&&(ex=null),null!==eO&&ej(eO)&&(eO=null),ew.forEach(eA),eE.forEach(eA)}function eC(t,e){t.blockedOn===e&&(t.blockedOn=null,ev||(ev=!0,c.unstable_scheduleCallback(c.unstable_NormalPriority,eT)))}function eN(t){function e(e){return eC(e,t)}if(0<em.length){eC(em[0],t);for(var n=1;n<em.length;n++){var r=em[n];r.blockedOn===t&&(r.blockedOn=null)}}for(null!==eb&&eC(eb,t),null!==ex&&eC(ex,t),null!==eO&&eC(eO,t),ew.forEach(e),eE.forEach(e),n=0;n<ek.length;n++)(r=ek[n]).blockedOn===t&&(r.blockedOn=null);for(;0<ek.length&&null===(n=ek[0]).blockedOn;)eP(n),null===n.blockedOn&&ek.shift()}var eL=S.ReactCurrentBatchConfig,eI=!0;function eR(t,e,n,r){var i=ec,o=eL.transition;eL.transition=null;try{ec=1,eF(t,e,n,r)}finally{ec=i,eL.transition=o}}function eD(t,e,n,r){var i=ec,o=eL.transition;eL.transition=null;try{ec=4,eF(t,e,n,r)}finally{ec=i,eL.transition=o}}function eF(t,e,n,r){if(eI){var i=eB(t,e,n,r);if(null===i)rl(t,e,r,ez,n),eS(t,r);else if(function(t,e,n,r,i){switch(e){case"focusin":return eb=e_(eb,t,e,n,r,i),!0;case"dragenter":return ex=e_(ex,t,e,n,r,i),!0;case"mouseover":return eO=e_(eO,t,e,n,r,i),!0;case"pointerover":var o=i.pointerId;return ew.set(o,e_(ew.get(o)||null,t,e,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,eE.set(o,e_(eE.get(o)||null,t,e,n,r,i)),!0}return!1}(i,t,e,n,r))r.stopPropagation();else if(eS(t,r),4&e&&-1<eM.indexOf(t)){for(;null!==i;){var o=rR(i);if(null!==o&&ep(o),null===(o=eB(t,e,n,r))&&rl(t,e,r,ez,n),o===i)break;i=o}null!==i&&r.stopPropagation()}else rl(t,e,r,null,n)}}var ez=null;function eB(t,e,n,r){if(ez=null,null!==(t=rI(t=tk(r)))){if(null===(e=tH(t)))t=null;else if(13===(n=e.tag)){if(null!==(t=tU(e)))return t;t=null}else if(3===n){if(e.stateNode.current.memoizedState.isDehydrated)return 3===e.tag?e.stateNode.containerInfo:null;t=null}else e!==t&&(t=null)}return ez=t,null}function eW(t){switch(t){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(t0()){case t1:return 1;case t2:return 4;case t5:case t3:return 16;case t4:return 0x20000000;default:return 16}default:return 16}}var e$=null,eG=null,eV=null;function eH(){if(eV)return eV;var t,e,n=eG,r=n.length,i="value"in e$?e$.value:e$.textContent,o=i.length;for(t=0;t<r&&n[t]===i[t];t++);var a=r-t;for(e=1;e<=a&&n[r-e]===i[o-e];e++);return eV=i.slice(t,1<e?1-e:void 0)}function eU(t){var e=t.keyCode;return"charCode"in t?0===(t=t.charCode)&&13===e&&(t=13):t=e,10===t&&(t=13),32<=t||13===t?t:0}function eq(){return!0}function eY(){return!1}function eX(t){function e(e,n,r,i,o){for(var a in this._reactName=e,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=o,this.currentTarget=null,t)t.hasOwnProperty(a)&&(e=t[a],this[a]=e?e(i):i[a]);return this.isDefaultPrevented=(null!=i.defaultPrevented?i.defaultPrevented:!1===i.returnValue)?eq:eY,this.isPropagationStopped=eY,this}return G(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var t=this.nativeEvent;t&&(t.preventDefault?t.preventDefault():"unknown"!=typeof t.returnValue&&(t.returnValue=!1),this.isDefaultPrevented=eq)},stopPropagation:function(){var t=this.nativeEvent;t&&(t.stopPropagation?t.stopPropagation():"unknown"!=typeof t.cancelBubble&&(t.cancelBubble=!0),this.isPropagationStopped=eq)},persist:function(){},isPersistent:eq}),e}var eK,eZ,eQ,eJ={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},e0=eX(eJ),e1=G({},eJ,{view:0,detail:0}),e2=eX(e1),e5=G({},e1,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ni,button:0,buttons:0,relatedTarget:function(t){return void 0===t.relatedTarget?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==eQ&&(eQ&&"mousemove"===t.type?(eK=t.screenX-eQ.screenX,eZ=t.screenY-eQ.screenY):eZ=eK=0,eQ=t),eK)},movementY:function(t){return"movementY"in t?t.movementY:eZ}}),e3=eX(e5),e4=eX(G({},e5,{dataTransfer:0})),e6=eX(G({},e1,{relatedTarget:0})),e8=eX(G({},eJ,{animationName:0,elapsedTime:0,pseudoElement:0})),e9=eX(G({},eJ,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}})),e7=eX(G({},eJ,{data:0})),nt={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},ne={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},nn={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function nr(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):!!(t=nn[t])&&!!e[t]}function ni(){return nr}var no=eX(G({},e1,{key:function(t){if(t.key){var e=nt[t.key]||t.key;if("Unidentified"!==e)return e}return"keypress"===t.type?13===(t=eU(t))?"Enter":String.fromCharCode(t):"keydown"===t.type||"keyup"===t.type?ne[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ni,charCode:function(t){return"keypress"===t.type?eU(t):0},keyCode:function(t){return"keydown"===t.type||"keyup"===t.type?t.keyCode:0},which:function(t){return"keypress"===t.type?eU(t):"keydown"===t.type||"keyup"===t.type?t.keyCode:0}})),na=eX(G({},e5,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),nl=eX(G({},e1,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ni})),ns=eX(G({},eJ,{propertyName:0,elapsedTime:0,pseudoElement:0})),nu=eX(G({},e5,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0})),nc=[9,13,27,32],nf=g&&"CompositionEvent"in window,np=null;g&&"documentMode"in document&&(np=document.documentMode);var nh=g&&"TextEvent"in window&&!np,nd=g&&(!nf||np&&8<np&&11>=np),ny=!1;function ng(t,e){switch(t){case"keyup":return -1!==nc.indexOf(e.keyCode);case"keydown":return 229!==e.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function nv(t){return"object"==typeof(t=t.detail)&&"data"in t?t.data:null}var nm=!1,nb={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function nx(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return"input"===e?!!nb[t.type]:"textarea"===e}function nO(t,e,n,r){tj(r),0<(e=ru(e,"onChange")).length&&(n=new e0("onChange","change",null,n,r),t.push({event:n,listeners:e}))}var nw=null,nE=null;function nk(t){re(t,0)}function nM(t){if(K(rD(t)))return t}function nS(t,e){if("change"===t)return e}var n_=!1;if(g){if(g){var nP="oninput"in document;if(!nP){var nj=document.createElement("div");nj.setAttribute("oninput","return;"),nP="function"==typeof nj.oninput}r=nP}else r=!1;n_=r&&(!document.documentMode||9<document.documentMode)}function nA(){nw&&(nw.detachEvent("onpropertychange",nT),nE=nw=null)}function nT(t){if("value"===t.propertyName&&nM(nE)){var e=[];nO(e,nE,t,tk(t)),tL(nk,e)}}function nC(t,e,n){"focusin"===t?(nA(),nw=e,nE=n,nw.attachEvent("onpropertychange",nT)):"focusout"===t&&nA()}function nN(t){if("selectionchange"===t||"keyup"===t||"keydown"===t)return nM(nE)}function nL(t,e){if("click"===t)return nM(e)}function nI(t,e){if("input"===t||"change"===t)return nM(e)}var nR="function"==typeof Object.is?Object.is:function(t,e){return t===e&&(0!==t||1/t==1/e)||t!=t&&e!=e};function nD(t,e){if(nR(t,e))return!0;if("object"!=typeof t||null===t||"object"!=typeof e||null===e)return!1;var n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!v.call(e,i)||!nR(t[i],e[i]))return!1}return!0}function nF(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function nz(t,e){var n,r=nF(t);for(t=0;r;){if(3===r.nodeType){if(n=t+r.textContent.length,t<=e&&n>=e)return{node:r,offset:e-t};t=n}r:{for(;r;){if(r.nextSibling){r=r.nextSibling;break r}r=r.parentNode}r=void 0}r=nF(r)}}function nB(){for(var t=window,e=Z();e instanceof t.HTMLIFrameElement;){try{var n="string"==typeof e.contentWindow.location.href}catch(t){n=!1}if(n)t=e.contentWindow;else break;e=Z(t.document)}return e}function nW(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&("input"===e&&("text"===t.type||"search"===t.type||"tel"===t.type||"url"===t.type||"password"===t.type)||"textarea"===e||"true"===t.contentEditable)}var n$=g&&"documentMode"in document&&11>=document.documentMode,nG=null,nV=null,nH=null,nU=!1;function nq(t,e,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;nU||null==nG||nG!==Z(r)||(r="selectionStart"in(r=nG)&&nW(r)?{start:r.selectionStart,end:r.selectionEnd}:{anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},nH&&nD(nH,r)||(nH=r,0<(r=ru(nV,"onSelect")).length&&(e=new e0("onSelect","select",null,e,n),t.push({event:e,listeners:r}),e.target=nG)))}function nY(t,e){var n={};return n[t.toLowerCase()]=e.toLowerCase(),n["Webkit"+t]="webkit"+e,n["Moz"+t]="moz"+e,n}var nX={animationend:nY("Animation","AnimationEnd"),animationiteration:nY("Animation","AnimationIteration"),animationstart:nY("Animation","AnimationStart"),transitionend:nY("Transition","TransitionEnd")},nK={},nZ={};function nQ(t){if(nK[t])return nK[t];if(!nX[t])return t;var e,n=nX[t];for(e in n)if(n.hasOwnProperty(e)&&e in nZ)return nK[t]=n[e];return t}g&&(nZ=document.createElement("div").style,"AnimationEvent"in window||(delete nX.animationend.animation,delete nX.animationiteration.animation,delete nX.animationstart.animation),"TransitionEvent"in window||delete nX.transitionend.transition);var nJ=nQ("animationend"),n0=nQ("animationiteration"),n1=nQ("animationstart"),n2=nQ("transitionend"),n5=new Map,n3="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function n4(t,e){n5.set(t,e),d(e,[t])}for(var n6=0;n6<n3.length;n6++){var n8=n3[n6];n4(n8.toLowerCase(),"on"+(n8[0].toUpperCase()+n8.slice(1)))}n4(nJ,"onAnimationEnd"),n4(n0,"onAnimationIteration"),n4(n1,"onAnimationStart"),n4("dblclick","onDoubleClick"),n4("focusin","onFocus"),n4("focusout","onBlur"),n4(n2,"onTransitionEnd"),y("onMouseEnter",["mouseout","mouseover"]),y("onMouseLeave",["mouseout","mouseover"]),y("onPointerEnter",["pointerout","pointerover"]),y("onPointerLeave",["pointerout","pointerover"]),d("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),d("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),d("onBeforeInput",["compositionend","keypress","textInput","paste"]),d("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),d("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),d("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var n9="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),n7=new Set("cancel close invalid load scroll toggle".split(" ").concat(n9));function rt(t,e,n){var r=t.type||"unknown-event";t.currentTarget=n,!function(t,e,n,r,i,o,a,l,s){if(tV.apply(this,arguments),tz){if(tz){var u=tB;tz=!1,tB=null}else throw Error(f(198));tW||(tW=!0,t$=u)}}(r,e,void 0,t),t.currentTarget=null}function re(t,e){e=0!=(4&e);for(var n=0;n<t.length;n++){var r=t[n],i=r.event;r=r.listeners;r:{var o=void 0;if(e)for(var a=r.length-1;0<=a;a--){var l=r[a],s=l.instance,u=l.currentTarget;if(l=l.listener,s!==o&&i.isPropagationStopped())break r;rt(i,l,u),o=s}else for(a=0;a<r.length;a++){if(s=(l=r[a]).instance,u=l.currentTarget,l=l.listener,s!==o&&i.isPropagationStopped())break r;rt(i,l,u),o=s}}}if(tW)throw t=t$,tW=!1,t$=null,t}function rn(t,e){var n=e[rC];void 0===n&&(n=e[rC]=new Set);var r=t+"__bubble";n.has(r)||(ra(e,t,2,!1),n.add(r))}function rr(t,e,n){var r=0;e&&(r|=4),ra(n,t,r,e)}var ri="_reactListening"+Math.random().toString(36).slice(2);function ro(t){if(!t[ri]){t[ri]=!0,p.forEach(function(e){"selectionchange"!==e&&(n7.has(e)||rr(e,!1,t),rr(e,!0,t))});var e=9===t.nodeType?t:t.ownerDocument;null===e||e[ri]||(e[ri]=!0,rr("selectionchange",!1,e))}}function ra(t,e,n,r){switch(eW(e)){case 1:var i=eR;break;case 4:i=eD;break;default:i=eF}n=i.bind(null,e,n,t),i=void 0,tR&&("touchstart"===e||"touchmove"===e||"wheel"===e)&&(i=!0),r?void 0!==i?t.addEventListener(e,n,{capture:!0,passive:i}):t.addEventListener(e,n,!0):void 0!==i?t.addEventListener(e,n,{passive:i}):t.addEventListener(e,n,!1)}function rl(t,e,n,r,i){var o=r;if(0==(1&e)&&0==(2&e)&&null!==r)r:for(;;){if(null===r)return;var a=r.tag;if(3===a||4===a){var l=r.stateNode.containerInfo;if(l===i||8===l.nodeType&&l.parentNode===i)break;if(4===a)for(a=r.return;null!==a;){var s=a.tag;if((3===s||4===s)&&((s=a.stateNode.containerInfo)===i||8===s.nodeType&&s.parentNode===i))return;a=a.return}for(;null!==l;){if(null===(a=rI(l)))return;if(5===(s=a.tag)||6===s){r=o=a;continue r}l=l.parentNode}}r=r.return}tL(function(){var r=o,i=tk(n),a=[];r:{var l=n5.get(t);if(void 0!==l){var s=e0,u=t;switch(t){case"keypress":if(0===eU(n))break r;case"keydown":case"keyup":s=no;break;case"focusin":u="focus",s=e6;break;case"focusout":u="blur",s=e6;break;case"beforeblur":case"afterblur":s=e6;break;case"click":if(2===n.button)break r;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":s=e3;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":s=e4;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":s=nl;break;case nJ:case n0:case n1:s=e8;break;case n2:s=ns;break;case"scroll":s=e2;break;case"wheel":s=nu;break;case"copy":case"cut":case"paste":s=e9;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":s=na}var c=0!=(4&e),f=!c&&"scroll"===t,p=c?null!==l?l+"Capture":null:l;c=[];for(var h,d=r;null!==d;){var y=(h=d).stateNode;if(5===h.tag&&null!==y&&(h=y,null!==p&&null!=(y=tI(d,p))&&c.push(rs(d,y,h))),f)break;d=d.return}0<c.length&&(l=new s(l,u,null,n,i),a.push({event:l,listeners:c}))}}if(0==(7&e)){r:if(l="mouseover"===t||"pointerover"===t,s="mouseout"===t||"pointerout"===t,!(l&&n!==tE&&(u=n.relatedTarget||n.fromElement)&&(rI(u)||u[rT]))){if((s||l)&&(l=i.window===i?i:(l=i.ownerDocument)?l.defaultView||l.parentWindow:window,s?(u=n.relatedTarget||n.toElement,s=r,null!==(u=u?rI(u):null)&&(f=tH(u),u!==f||5!==u.tag&&6!==u.tag)&&(u=null)):(s=null,u=r),s!==u)){if(c=e3,y="onMouseLeave",p="onMouseEnter",d="mouse",("pointerout"===t||"pointerover"===t)&&(c=na,y="onPointerLeave",p="onPointerEnter",d="pointer"),f=null==s?l:rD(s),h=null==u?l:rD(u),(l=new c(y,d+"leave",s,n,i)).target=f,l.relatedTarget=h,y=null,rI(i)===r&&((c=new c(p,d+"enter",u,n,i)).target=h,c.relatedTarget=f,y=c),f=y,s&&u)i:{for(c=s,p=u,d=0,h=c;h;h=rc(h))d++;for(h=0,y=p;y;y=rc(y))h++;for(;0<d-h;)c=rc(c),d--;for(;0<h-d;)p=rc(p),h--;for(;d--;){if(c===p||null!==p&&c===p.alternate)break i;c=rc(c),p=rc(p)}c=null}else c=null;null!==s&&rf(a,l,s,c,!1),null!==u&&null!==f&&rf(a,f,u,c,!0)}}r:{if("select"===(s=(l=r?rD(r):window).nodeName&&l.nodeName.toLowerCase())||"input"===s&&"file"===l.type)var g,v=nS;else if(nx(l)){if(n_)v=nI;else{v=nN;var m=nC}}else(s=l.nodeName)&&"input"===s.toLowerCase()&&("checkbox"===l.type||"radio"===l.type)&&(v=nL);if(v&&(v=v(t,r))){nO(a,v,n,i);break r}m&&m(t,l,r),"focusout"===t&&(m=l._wrapperState)&&m.controlled&&"number"===l.type&&tr(l,"number",l.value)}switch(m=r?rD(r):window,t){case"focusin":(nx(m)||"true"===m.contentEditable)&&(nG=m,nV=r,nH=null);break;case"focusout":nH=nV=nG=null;break;case"mousedown":nU=!0;break;case"contextmenu":case"mouseup":case"dragend":nU=!1,nq(a,n,i);break;case"selectionchange":if(n$)break;case"keydown":case"keyup":nq(a,n,i)}if(nf)i:{switch(t){case"compositionstart":var b="onCompositionStart";break i;case"compositionend":b="onCompositionEnd";break i;case"compositionupdate":b="onCompositionUpdate";break i}b=void 0}else nm?ng(t,n)&&(b="onCompositionEnd"):"keydown"===t&&229===n.keyCode&&(b="onCompositionStart");b&&(nd&&"ko"!==n.locale&&(nm||"onCompositionStart"!==b?"onCompositionEnd"===b&&nm&&(g=eH()):(eG="value"in(e$=i)?e$.value:e$.textContent,nm=!0)),0<(m=ru(r,b)).length&&(b=new e7(b,t,null,n,i),a.push({event:b,listeners:m}),g?b.data=g:null!==(g=nv(n))&&(b.data=g))),(g=nh?function(t,e){switch(t){case"compositionend":return nv(e);case"keypress":if(32!==e.which)return null;return ny=!0," ";case"textInput":return" "===(t=e.data)&&ny?null:t;default:return null}}(t,n):function(t,e){if(nm)return"compositionend"===t||!nf&&ng(t,e)?(t=eH(),eV=eG=e$=null,nm=!1,t):null;switch(t){case"paste":default:return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return nd&&"ko"!==e.locale?null:e.data}}(t,n))&&0<(r=ru(r,"onBeforeInput")).length&&(i=new e7("onBeforeInput","beforeinput",null,n,i),a.push({event:i,listeners:r}),i.data=g)}re(a,e)})}function rs(t,e,n){return{instance:t,listener:e,currentTarget:n}}function ru(t,e){for(var n=e+"Capture",r=[];null!==t;){var i=t,o=i.stateNode;5===i.tag&&null!==o&&(i=o,null!=(o=tI(t,n))&&r.unshift(rs(t,o,i)),null!=(o=tI(t,e))&&r.push(rs(t,o,i))),t=t.return}return r}function rc(t){if(null===t)return null;do t=t.return;while(t&&5!==t.tag);return t||null}function rf(t,e,n,r,i){for(var o=e._reactName,a=[];null!==n&&n!==r;){var l=n,s=l.alternate,u=l.stateNode;if(null!==s&&s===r)break;5===l.tag&&null!==u&&(l=u,i?null!=(s=tI(n,o))&&a.unshift(rs(n,s,l)):i||null!=(s=tI(n,o))&&a.push(rs(n,s,l))),n=n.return}0!==a.length&&t.push({event:e,listeners:a})}var rp=/\r\n?/g,rh=/\u0000|\uFFFD/g;function rd(t){return("string"==typeof t?t:""+t).replace(rp,"\n").replace(rh,"")}function ry(t,e,n){if(e=rd(e),rd(t)!==e&&n)throw Error(f(425))}function rg(){}var rv=null,rm=null;function rb(t,e){return"textarea"===t||"noscript"===t||"string"==typeof e.children||"number"==typeof e.children||"object"==typeof e.dangerouslySetInnerHTML&&null!==e.dangerouslySetInnerHTML&&null!=e.dangerouslySetInnerHTML.__html}var rx="function"==typeof setTimeout?setTimeout:void 0,rO="function"==typeof clearTimeout?clearTimeout:void 0,rw="function"==typeof Promise?Promise:void 0,rE="function"==typeof queueMicrotask?queueMicrotask:void 0!==rw?function(t){return rw.resolve(null).then(t).catch(rk)}:rx;function rk(t){setTimeout(function(){throw t})}function rM(t,e){var n=e,r=0;do{var i=n.nextSibling;if(t.removeChild(n),i&&8===i.nodeType){if("/$"===(n=i.data)){if(0===r){t.removeChild(i),eN(e);return}r--}else"$"!==n&&"$?"!==n&&"$!"!==n||r++}n=i}while(n);eN(e)}function rS(t){for(;null!=t;t=t.nextSibling){var e=t.nodeType;if(1===e||3===e)break;if(8===e){if("$"===(e=t.data)||"$!"===e||"$?"===e)break;if("/$"===e)return null}}return t}function r_(t){t=t.previousSibling;for(var e=0;t;){if(8===t.nodeType){var n=t.data;if("$"===n||"$!"===n||"$?"===n){if(0===e)return t;e--}else"/$"===n&&e++}t=t.previousSibling}return null}var rP=Math.random().toString(36).slice(2),rj="__reactFiber$"+rP,rA="__reactProps$"+rP,rT="__reactContainer$"+rP,rC="__reactEvents$"+rP,rN="__reactListeners$"+rP,rL="__reactHandles$"+rP;function rI(t){var e=t[rj];if(e)return e;for(var n=t.parentNode;n;){if(e=n[rT]||n[rj]){if(n=e.alternate,null!==e.child||null!==n&&null!==n.child)for(t=r_(t);null!==t;){if(n=t[rj])return n;t=r_(t)}return e}n=(t=n).parentNode}return null}function rR(t){return(t=t[rj]||t[rT])&&(5===t.tag||6===t.tag||13===t.tag||3===t.tag)?t:null}function rD(t){if(5===t.tag||6===t.tag)return t.stateNode;throw Error(f(33))}function rF(t){return t[rA]||null}var rz=[],rB=-1;function rW(t){return{current:t}}function r$(t){0>rB||(t.current=rz[rB],rz[rB]=null,rB--)}function rG(t,e){rz[++rB]=t.current,t.current=e}var rV={},rH=rW(rV),rU=rW(!1),rq=rV;function rY(t,e){var n=t.type.contextTypes;if(!n)return rV;var r=t.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===e)return r.__reactInternalMemoizedMaskedChildContext;var i,o={};for(i in n)o[i]=e[i];return r&&((t=t.stateNode).__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=o),o}function rX(t){return null!=(t=t.childContextTypes)}function rK(){r$(rU),r$(rH)}function rZ(t,e,n){if(rH.current!==rV)throw Error(f(168));rG(rH,e),rG(rU,n)}function rQ(t,e,n){var r=t.stateNode;if(e=e.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var i in r=r.getChildContext())if(!(i in e))throw Error(f(108,function(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=(t=e.render).displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return function t(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case j:return"Fragment";case P:return"Portal";case T:return"Profiler";case A:return"StrictMode";case I:return"Suspense";case R:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case N:return(e.displayName||"Context")+".Consumer";case C:return(e._context.displayName||"Context")+".Provider";case L:var n=e.render;return(e=e.displayName)||(e=""!==(e=n.displayName||n.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case D:return null!==(n=e.displayName||null)?n:t(e.type)||"Memo";case F:n=e._payload,e=e._init;try{return t(e(n))}catch(t){}}return null}(e);case 8:return e===A?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e}return null}(t)||"Unknown",i));return G({},n,r)}function rJ(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||rV,rq=rH.current,rG(rH,t),rG(rU,rU.current),!0}function r0(t,e,n){var r=t.stateNode;if(!r)throw Error(f(169));n?(t=rQ(t,e,rq),r.__reactInternalMemoizedMergedChildContext=t,r$(rU),r$(rH),rG(rH,t)):r$(rU),rG(rU,n)}var r1=null,r2=!1,r5=!1;function r3(t){null===r1?r1=[t]:r1.push(t)}function r4(){if(!r5&&null!==r1){r5=!0;var t=0,e=ec;try{var n=r1;for(ec=1;t<n.length;t++){var r=n[t];do r=r(!0);while(null!==r)}r1=null,r2=!1}catch(e){throw null!==r1&&(r1=r1.slice(t+1)),tX(t1,r4),e}finally{ec=e,r5=!1}}return null}var r6=[],r8=0,r9=null,r7=0,it=[],ie=0,ir=null,ii=1,io="";function ia(t,e){r6[r8++]=r7,r6[r8++]=r9,r9=t,r7=e}function il(t,e,n){it[ie++]=ii,it[ie++]=io,it[ie++]=ir,ir=t;var r=ii;t=io;var i=32-t9(r)-1;r&=~(1<<i),n+=1;var o=32-t9(e)+i;if(30<o){var a=i-i%5;o=(r&(1<<a)-1).toString(32),r>>=a,i-=a,ii=1<<32-t9(e)+i|n<<i|r,io=o+t}else ii=1<<o|n<<i|r,io=t}function is(t){null!==t.return&&(ia(t,1),il(t,1,0))}function iu(t){for(;t===r9;)r9=r6[--r8],r6[r8]=null,r7=r6[--r8],r6[r8]=null;for(;t===ir;)ir=it[--ie],it[ie]=null,io=it[--ie],it[ie]=null,ii=it[--ie],it[ie]=null}var ic=null,ip=null,ih=!1,id=null;function iy(t,e){var n=lK(5,null,null,0);n.elementType="DELETED",n.stateNode=e,n.return=t,null===(e=t.deletions)?(t.deletions=[n],t.flags|=16):e.push(n)}function ig(t,e){switch(t.tag){case 5:var n=t.type;return null!==(e=1!==e.nodeType||n.toLowerCase()!==e.nodeName.toLowerCase()?null:e)&&(t.stateNode=e,ic=t,ip=rS(e.firstChild),!0);case 6:return null!==(e=""===t.pendingProps||3!==e.nodeType?null:e)&&(t.stateNode=e,ic=t,ip=null,!0);case 13:return null!==(e=8!==e.nodeType?null:e)&&(n=null!==ir?{id:ii,overflow:io}:null,t.memoizedState={dehydrated:e,treeContext:n,retryLane:0x40000000},(n=lK(18,null,null,0)).stateNode=e,n.return=t,t.child=n,ic=t,ip=null,!0);default:return!1}}function iv(t){return 0!=(1&t.mode)&&0==(128&t.flags)}function im(t){if(ih){var e=ip;if(e){var n=e;if(!ig(t,e)){if(iv(t))throw Error(f(418));e=rS(n.nextSibling);var r=ic;e&&ig(t,e)?iy(r,n):(t.flags=-4097&t.flags|2,ih=!1,ic=t)}}else{if(iv(t))throw Error(f(418));t.flags=-4097&t.flags|2,ih=!1,ic=t}}}function ib(t){for(t=t.return;null!==t&&5!==t.tag&&3!==t.tag&&13!==t.tag;)t=t.return;ic=t}function ix(t){if(t!==ic)return!1;if(!ih)return ib(t),ih=!0,!1;if((e=3!==t.tag)&&!(e=5!==t.tag)&&(e="head"!==(e=t.type)&&"body"!==e&&!rb(t.type,t.memoizedProps)),e&&(e=ip)){if(iv(t))throw iO(),Error(f(418));for(;e;)iy(t,e),e=rS(e.nextSibling)}if(ib(t),13===t.tag){if(!(t=null!==(t=t.memoizedState)?t.dehydrated:null))throw Error(f(317));r:{for(e=0,t=t.nextSibling;t;){if(8===t.nodeType){var e,n=t.data;if("/$"===n){if(0===e){ip=rS(t.nextSibling);break r}e--}else"$"!==n&&"$!"!==n&&"$?"!==n||e++}t=t.nextSibling}ip=null}}else ip=ic?rS(t.stateNode.nextSibling):null;return!0}function iO(){for(var t=ip;t;)t=rS(t.nextSibling)}function iw(){ip=ic=null,ih=!1}function iE(t){null===id?id=[t]:id.push(t)}var ik=S.ReactCurrentBatchConfig;function iM(t,e){if(t&&t.defaultProps)for(var n in e=G({},e),t=t.defaultProps)void 0===e[n]&&(e[n]=t[n]);return e}var iS=rW(null),i_=null,iP=null,ij=null;function iA(){ij=iP=i_=null}function iT(t){var e=iS.current;r$(iS),t._currentValue=e}function iC(t,e,n){for(;null!==t;){var r=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,null!==r&&(r.childLanes|=e)):null!==r&&(r.childLanes&e)!==e&&(r.childLanes|=e),t===n)break;t=t.return}}function iN(t,e){i_=t,ij=iP=null,null!==(t=t.dependencies)&&null!==t.firstContext&&(0!=(t.lanes&e)&&(as=!0),t.firstContext=null)}function iL(t){var e=t._currentValue;if(ij!==t){if(t={context:t,memoizedValue:e,next:null},null===iP){if(null===i_)throw Error(f(308));iP=t,i_.dependencies={lanes:0,firstContext:t}}else iP=iP.next=t}return e}var iI=null;function iR(t){null===iI?iI=[t]:iI.push(t)}function iD(t,e,n,r){var i=e.interleaved;return null===i?(n.next=n,iR(e)):(n.next=i.next,i.next=n),e.interleaved=n,iF(t,r)}function iF(t,e){t.lanes|=e;var n=t.alternate;for(null!==n&&(n.lanes|=e),n=t,t=t.return;null!==t;)t.childLanes|=e,null!==(n=t.alternate)&&(n.childLanes|=e),n=t,t=t.return;return 3===n.tag?n.stateNode:null}var iz=!1;function iB(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function iW(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function i$(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function iG(t,e,n){var r=t.updateQueue;if(null===r)return null;if(r=r.shared,0!=(2&a4)){var i=r.pending;return null===i?e.next=e:(e.next=i.next,i.next=e),r.pending=e,iF(t,n)}return null===(i=r.interleaved)?(e.next=e,iR(r)):(e.next=i.next,i.next=e),r.interleaved=e,iF(t,n)}function iV(t,e,n){if(null!==(e=e.updateQueue)&&(e=e.shared,0!=(4194240&n))){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,eu(t,n)}}function iH(t,e){var n=t.updateQueue,r=t.alternate;if(null!==r&&n===(r=r.updateQueue)){var i=null,o=null;if(null!==(n=n.firstBaseUpdate)){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===o?i=o=a:o=o.next=a,n=n.next}while(null!==n);null===o?i=o=e:o=o.next=e}else i=o=e;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},t.updateQueue=n;return}null===(t=n.lastBaseUpdate)?n.firstBaseUpdate=e:t.next=e,n.lastBaseUpdate=e}function iU(t,e,n,r){var i=t.updateQueue;iz=!1;var o=i.firstBaseUpdate,a=i.lastBaseUpdate,l=i.shared.pending;if(null!==l){i.shared.pending=null;var s=l,u=s.next;s.next=null,null===a?o=u:a.next=u,a=s;var c=t.alternate;null!==c&&(l=(c=c.updateQueue).lastBaseUpdate)!==a&&(null===l?c.firstBaseUpdate=u:l.next=u,c.lastBaseUpdate=s)}if(null!==o){var f=i.baseState;for(a=0,c=u=s=null,l=o;;){var p=l.lane,h=l.eventTime;if((r&p)===p){null!==c&&(c=c.next={eventTime:h,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});r:{var d=t,y=l;switch(p=e,h=n,y.tag){case 1:if("function"==typeof(d=y.payload)){f=d.call(h,f,p);break r}f=d;break r;case 3:d.flags=-65537&d.flags|128;case 0:if(null==(p="function"==typeof(d=y.payload)?d.call(h,f,p):d))break r;f=G({},f,p);break r;case 2:iz=!0}}null!==l.callback&&0!==l.lane&&(t.flags|=64,null===(p=i.effects)?i.effects=[l]:p.push(l))}else h={eventTime:h,lane:p,tag:l.tag,payload:l.payload,callback:l.callback,next:null},null===c?(u=c=h,s=f):c=c.next=h,a|=p;if(null===(l=l.next)){if(null===(l=i.shared.pending))break;else l=(p=l).next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}if(null===c&&(s=f),i.baseState=s,i.firstBaseUpdate=u,i.lastBaseUpdate=c,null!==(e=i.shared.interleaved)){i=e;do a|=i.lane,i=i.next;while(i!==e)}else null===o&&(i.shared.lanes=0);lr|=a,t.lanes=a,t.memoizedState=f}}function iq(t,e,n){if(t=e.effects,e.effects=null,null!==t)for(e=0;e<t.length;e++){var r=t[e],i=r.callback;if(null!==i){if(r.callback=null,r=n,"function"!=typeof i)throw Error(f(191,i));i.call(r)}}}var iY=(new u.Component).refs;function iX(t,e,n,r){n=null==(n=n(r,e=t.memoizedState))?e:G({},e,n),t.memoizedState=n,0===t.lanes&&(t.updateQueue.baseState=n)}var iK={isMounted:function(t){return!!(t=t._reactInternals)&&tH(t)===t},enqueueSetState:function(t,e,n){t=t._reactInternals;var r=lO(),i=lw(t),o=i$(r,i);o.payload=e,null!=n&&(o.callback=n),null!==(e=iG(t,o,i))&&(lE(e,t,i,r),iV(e,t,i))},enqueueReplaceState:function(t,e,n){t=t._reactInternals;var r=lO(),i=lw(t),o=i$(r,i);o.tag=1,o.payload=e,null!=n&&(o.callback=n),null!==(e=iG(t,o,i))&&(lE(e,t,i,r),iV(e,t,i))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var n=lO(),r=lw(t),i=i$(n,r);i.tag=2,null!=e&&(i.callback=e),null!==(e=iG(t,i,r))&&(lE(e,t,r,n),iV(e,t,r))}};function iZ(t,e,n,r,i,o,a){return"function"==typeof(t=t.stateNode).shouldComponentUpdate?t.shouldComponentUpdate(r,o,a):!e.prototype||!e.prototype.isPureReactComponent||!nD(n,r)||!nD(i,o)}function iQ(t,e,n){var r=!1,i=rV,o=e.contextType;return"object"==typeof o&&null!==o?o=iL(o):(i=rX(e)?rq:rH.current,o=(r=null!=(r=e.contextTypes))?rY(t,i):rV),e=new e(n,o),t.memoizedState=null!==e.state&&void 0!==e.state?e.state:null,e.updater=iK,t.stateNode=e,e._reactInternals=t,r&&((t=t.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,t.__reactInternalMemoizedMaskedChildContext=o),e}function iJ(t,e,n,r){t=e.state,"function"==typeof e.componentWillReceiveProps&&e.componentWillReceiveProps(n,r),"function"==typeof e.UNSAFE_componentWillReceiveProps&&e.UNSAFE_componentWillReceiveProps(n,r),e.state!==t&&iK.enqueueReplaceState(e,e.state,null)}function i0(t,e,n,r){var i=t.stateNode;i.props=n,i.state=t.memoizedState,i.refs=iY,iB(t);var o=e.contextType;"object"==typeof o&&null!==o?i.context=iL(o):(o=rX(e)?rq:rH.current,i.context=rY(t,o)),i.state=t.memoizedState,"function"==typeof(o=e.getDerivedStateFromProps)&&(iX(t,e,o,n),i.state=t.memoizedState),"function"==typeof e.getDerivedStateFromProps||"function"==typeof i.getSnapshotBeforeUpdate||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||(e=i.state,"function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),e!==i.state&&iK.enqueueReplaceState(i,i.state,null),iU(t,n,i,r),i.state=t.memoizedState),"function"==typeof i.componentDidMount&&(t.flags|=4194308)}function i1(t,e,n){if(null!==(t=n.ref)&&"function"!=typeof t&&"object"!=typeof t){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(f(309));var r=n.stateNode}if(!r)throw Error(f(147,t));var i=r,o=""+t;return null!==e&&null!==e.ref&&"function"==typeof e.ref&&e.ref._stringRef===o?e.ref:((e=function(t){var e=i.refs;e===iY&&(e=i.refs={}),null===t?delete e[o]:e[o]=t})._stringRef=o,e)}if("string"!=typeof t)throw Error(f(284));if(!n._owner)throw Error(f(290,t))}return t}function i2(t,e){throw Error(f(31,"[object Object]"===(t=Object.prototype.toString.call(e))?"object with keys {"+Object.keys(e).join(", ")+"}":t))}function i5(t){return(0,t._init)(t._payload)}function i3(t){function e(e,n){if(t){var r=e.deletions;null===r?(e.deletions=[n],e.flags|=16):r.push(n)}}function n(n,r){if(!t)return null;for(;null!==r;)e(n,r),r=r.sibling;return null}function r(t,e){for(t=new Map;null!==e;)null!==e.key?t.set(e.key,e):t.set(e.index,e),e=e.sibling;return t}function i(t,e){return(t=lQ(t,e)).index=0,t.sibling=null,t}function o(e,n,r){return(e.index=r,t)?null!==(r=e.alternate)?(r=r.index)<n?(e.flags|=2,n):r:(e.flags|=2,n):(e.flags|=1048576,n)}function a(e){return t&&null===e.alternate&&(e.flags|=2),e}function l(t,e,n,r){return null===e||6!==e.tag?((e=l2(n,t.mode,r)).return=t,e):((e=i(e,n)).return=t,e)}function s(t,e,n,r){var o=n.type;return o===j?c(t,e,n.props.children,r,n.key):null!==e&&(e.elementType===o||"object"==typeof o&&null!==o&&o.$$typeof===F&&i5(o)===e.type)?((r=i(e,n.props)).ref=i1(t,e,n),r.return=t,r):((r=lJ(n.type,n.key,n.props,null,t.mode,r)).ref=i1(t,e,n),r.return=t,r)}function u(t,e,n,r){return null===e||4!==e.tag||e.stateNode.containerInfo!==n.containerInfo||e.stateNode.implementation!==n.implementation?((e=l5(n,t.mode,r)).return=t,e):((e=i(e,n.children||[])).return=t,e)}function c(t,e,n,r,o){return null===e||7!==e.tag?((e=l0(n,t.mode,r,o)).return=t,e):((e=i(e,n)).return=t,e)}function p(t,e,n){if("string"==typeof e&&""!==e||"number"==typeof e)return(e=l2(""+e,t.mode,n)).return=t,e;if("object"==typeof e&&null!==e){switch(e.$$typeof){case _:return(n=lJ(e.type,e.key,e.props,null,t.mode,n)).ref=i1(t,null,e),n.return=t,n;case P:return(e=l5(e,t.mode,n)).return=t,e;case F:return p(t,(0,e._init)(e._payload),n)}if(ti(e)||W(e))return(e=l0(e,t.mode,n,null)).return=t,e;i2(t,e)}return null}function h(t,e,n,r){var i=null!==e?e.key:null;if("string"==typeof n&&""!==n||"number"==typeof n)return null!==i?null:l(t,e,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case _:return n.key===i?s(t,e,n,r):null;case P:return n.key===i?u(t,e,n,r):null;case F:return h(t,e,(i=n._init)(n._payload),r)}if(ti(n)||W(n))return null!==i?null:c(t,e,n,r,null);i2(t,n)}return null}function d(t,e,n,r,i){if("string"==typeof r&&""!==r||"number"==typeof r)return l(e,t=t.get(n)||null,""+r,i);if("object"==typeof r&&null!==r){switch(r.$$typeof){case _:return s(e,t=t.get(null===r.key?n:r.key)||null,r,i);case P:return u(e,t=t.get(null===r.key?n:r.key)||null,r,i);case F:return d(t,e,n,(0,r._init)(r._payload),i)}if(ti(r)||W(r))return c(e,t=t.get(n)||null,r,i,null);i2(e,r)}return null}return function l(s,u,c,y){if("object"==typeof c&&null!==c&&c.type===j&&null===c.key&&(c=c.props.children),"object"==typeof c&&null!==c){switch(c.$$typeof){case _:r:{for(var g=c.key,v=u;null!==v;){if(v.key===g){if((g=c.type)===j){if(7===v.tag){n(s,v.sibling),(u=i(v,c.props.children)).return=s,s=u;break r}}else if(v.elementType===g||"object"==typeof g&&null!==g&&g.$$typeof===F&&i5(g)===v.type){n(s,v.sibling),(u=i(v,c.props)).ref=i1(s,v,c),u.return=s,s=u;break r}n(s,v);break}e(s,v);v=v.sibling}c.type===j?((u=l0(c.props.children,s.mode,y,c.key)).return=s,s=u):((y=lJ(c.type,c.key,c.props,null,s.mode,y)).ref=i1(s,u,c),y.return=s,s=y)}return a(s);case P:r:{for(v=c.key;null!==u;){if(u.key===v){if(4===u.tag&&u.stateNode.containerInfo===c.containerInfo&&u.stateNode.implementation===c.implementation){n(s,u.sibling),(u=i(u,c.children||[])).return=s,s=u;break r}else{n(s,u);break}}e(s,u);u=u.sibling}(u=l5(c,s.mode,y)).return=s,s=u}return a(s);case F:return l(s,u,(v=c._init)(c._payload),y)}if(ti(c))return function(i,a,l,s){for(var u=null,c=null,f=a,y=a=0,g=null;null!==f&&y<l.length;y++){f.index>y?(g=f,f=null):g=f.sibling;var v=h(i,f,l[y],s);if(null===v){null===f&&(f=g);break}t&&f&&null===v.alternate&&e(i,f),a=o(v,a,y),null===c?u=v:c.sibling=v,c=v,f=g}if(y===l.length)return n(i,f),ih&&ia(i,y),u;if(null===f){for(;y<l.length;y++)null!==(f=p(i,l[y],s))&&(a=o(f,a,y),null===c?u=f:c.sibling=f,c=f);return ih&&ia(i,y),u}for(f=r(i,f);y<l.length;y++)null!==(g=d(f,i,y,l[y],s))&&(t&&null!==g.alternate&&f.delete(null===g.key?y:g.key),a=o(g,a,y),null===c?u=g:c.sibling=g,c=g);return t&&f.forEach(function(t){return e(i,t)}),ih&&ia(i,y),u}(s,u,c,y);if(W(c))return function(i,a,l,s){var u=W(l);if("function"!=typeof u)throw Error(f(150));if(null==(l=u.call(l)))throw Error(f(151));for(var c=u=null,y=a,g=a=0,v=null,m=l.next();null!==y&&!m.done;g++,m=l.next()){y.index>g?(v=y,y=null):v=y.sibling;var b=h(i,y,m.value,s);if(null===b){null===y&&(y=v);break}t&&y&&null===b.alternate&&e(i,y),a=o(b,a,g),null===c?u=b:c.sibling=b,c=b,y=v}if(m.done)return n(i,y),ih&&ia(i,g),u;if(null===y){for(;!m.done;g++,m=l.next())null!==(m=p(i,m.value,s))&&(a=o(m,a,g),null===c?u=m:c.sibling=m,c=m);return ih&&ia(i,g),u}for(y=r(i,y);!m.done;g++,m=l.next())null!==(m=d(y,i,g,m.value,s))&&(t&&null!==m.alternate&&y.delete(null===m.key?g:m.key),a=o(m,a,g),null===c?u=m:c.sibling=m,c=m);return t&&y.forEach(function(t){return e(i,t)}),ih&&ia(i,g),u}(s,u,c,y);i2(s,c)}return"string"==typeof c&&""!==c||"number"==typeof c?(c=""+c,null!==u&&6===u.tag?(n(s,u.sibling),(u=i(u,c)).return=s):(n(s,u),(u=l2(c,s.mode,y)).return=s),a(s=u)):n(s,u)}}var i4=i3(!0),i6=i3(!1),i8={},i9=rW(i8),i7=rW(i8),ot=rW(i8);function oe(t){if(t===i8)throw Error(f(174));return t}function on(t,e){switch(rG(ot,e),rG(i7,t),rG(i9,i8),t=e.nodeType){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:tf(null,"");break;default:e=(t=8===t?e.parentNode:e).namespaceURI||null,e=tf(e,t=t.tagName)}r$(i9),rG(i9,e)}function or(){r$(i9),r$(i7),r$(ot)}function oi(t){oe(ot.current);var e=oe(i9.current),n=tf(e,t.type);e!==n&&(rG(i7,t),rG(i9,n))}function oo(t){i7.current===t&&(r$(i9),r$(i7))}var oa=rW(0);function ol(t){for(var e=t;null!==e;){if(13===e.tag){var n=e.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return e}else if(19===e.tag&&void 0!==e.memoizedProps.revealOrder){if(0!=(128&e.flags))return e}else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break;for(;null===e.sibling;){if(null===e.return||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var os=[];function ou(){for(var t=0;t<os.length;t++)os[t]._workInProgressVersionPrimary=null;os.length=0}var oc=S.ReactCurrentDispatcher,of=S.ReactCurrentBatchConfig,op=0,oh=null,od=null,oy=null,og=!1,ov=!1,om=0,ob=0;function ox(){throw Error(f(321))}function oO(t,e){if(null===e)return!1;for(var n=0;n<e.length&&n<t.length;n++)if(!nR(t[n],e[n]))return!1;return!0}function ow(t,e,n,r,i,o){if(op=o,oh=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,oc.current=null===t||null===t.memoizedState?o4:o6,t=n(r,i),ov){o=0;do{if(ov=!1,om=0,25<=o)throw Error(f(301));o+=1,oy=od=null,e.updateQueue=null,oc.current=o8,t=n(r,i)}while(ov)}if(oc.current=o3,e=null!==od&&null!==od.next,op=0,oy=od=oh=null,og=!1,e)throw Error(f(300));return t}function oE(){var t=0!==om;return om=0,t}function ok(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===oy?oh.memoizedState=oy=t:oy=oy.next=t,oy}function oM(){if(null===od){var t=oh.alternate;t=null!==t?t.memoizedState:null}else t=od.next;var e=null===oy?oh.memoizedState:oy.next;if(null!==e)oy=e,od=t;else{if(null===t)throw Error(f(310));t={memoizedState:(od=t).memoizedState,baseState:od.baseState,baseQueue:od.baseQueue,queue:od.queue,next:null},null===oy?oh.memoizedState=oy=t:oy=oy.next=t}return oy}function oS(t,e){return"function"==typeof e?e(t):e}function o_(t){var e=oM(),n=e.queue;if(null===n)throw Error(f(311));n.lastRenderedReducer=t;var r=od,i=r.baseQueue,o=n.pending;if(null!==o){if(null!==i){var a=i.next;i.next=o.next,o.next=a}r.baseQueue=i=o,n.pending=null}if(null!==i){o=i.next,r=r.baseState;var l=a=null,s=null,u=o;do{var c=u.lane;if((op&c)===c)null!==s&&(s=s.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:t(r,u.action);else{var p={lane:c,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};null===s?(l=s=p,a=r):s=s.next=p,oh.lanes|=c,lr|=c}u=u.next}while(null!==u&&u!==o);null===s?a=r:s.next=l,nR(r,e.memoizedState)||(as=!0),e.memoizedState=r,e.baseState=a,e.baseQueue=s,n.lastRenderedState=r}if(null!==(t=n.interleaved)){i=t;do o=i.lane,oh.lanes|=o,lr|=o,i=i.next;while(i!==t)}else null===i&&(n.lanes=0);return[e.memoizedState,n.dispatch]}function oP(t){var e=oM(),n=e.queue;if(null===n)throw Error(f(311));n.lastRenderedReducer=t;var r=n.dispatch,i=n.pending,o=e.memoizedState;if(null!==i){n.pending=null;var a=i=i.next;do o=t(o,a.action),a=a.next;while(a!==i);nR(o,e.memoizedState)||(as=!0),e.memoizedState=o,null===e.baseQueue&&(e.baseState=o),n.lastRenderedState=o}return[o,r]}function oj(){}function oA(t,e){var n=oh,r=oM(),i=e(),o=!nR(r.memoizedState,i);if(o&&(r.memoizedState=i,as=!0),r=r.queue,o$(oN.bind(null,n,r,t),[t]),r.getSnapshot!==e||o||null!==oy&&1&oy.memoizedState.tag){if(n.flags|=2048,oD(9,oC.bind(null,n,r,i,e),void 0,null),null===a6)throw Error(f(349));0!=(30&op)||oT(n,e,i)}return i}function oT(t,e,n){t.flags|=16384,t={getSnapshot:e,value:n},null===(e=oh.updateQueue)?(e={lastEffect:null,stores:null},oh.updateQueue=e,e.stores=[t]):null===(n=e.stores)?e.stores=[t]:n.push(t)}function oC(t,e,n,r){e.value=n,e.getSnapshot=r,oL(e)&&oI(t)}function oN(t,e,n){return n(function(){oL(e)&&oI(t)})}function oL(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!nR(t,n)}catch(t){return!0}}function oI(t){var e=iF(t,1);null!==e&&lE(e,t,1,-1)}function oR(t){var e=ok();return"function"==typeof t&&(t=t()),e.memoizedState=e.baseState=t,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:oS,lastRenderedState:t},e.queue=t,t=t.dispatch=o0.bind(null,oh,t),[e.memoizedState,t]}function oD(t,e,n,r){return t={tag:t,create:e,destroy:n,deps:r,next:null},null===(e=oh.updateQueue)?(e={lastEffect:null,stores:null},oh.updateQueue=e,e.lastEffect=t.next=t):null===(n=e.lastEffect)?e.lastEffect=t.next=t:(r=n.next,n.next=t,t.next=r,e.lastEffect=t),t}function oF(){return oM().memoizedState}function oz(t,e,n,r){var i=ok();oh.flags|=t,i.memoizedState=oD(1|e,n,void 0,void 0===r?null:r)}function oB(t,e,n,r){var i=oM();r=void 0===r?null:r;var o=void 0;if(null!==od){var a=od.memoizedState;if(o=a.destroy,null!==r&&oO(r,a.deps)){i.memoizedState=oD(e,n,o,r);return}}oh.flags|=t,i.memoizedState=oD(1|e,n,o,r)}function oW(t,e){return oz(8390656,8,t,e)}function o$(t,e){return oB(2048,8,t,e)}function oG(t,e){return oB(4,2,t,e)}function oV(t,e){return oB(4,4,t,e)}function oH(t,e){return"function"==typeof e?(e(t=t()),function(){e(null)}):null!=e?(t=t(),e.current=t,function(){e.current=null}):void 0}function oU(t,e,n){return n=null!=n?n.concat([t]):null,oB(4,4,oH.bind(null,e,t),n)}function oq(){}function oY(t,e){var n=oM();e=void 0===e?null:e;var r=n.memoizedState;return null!==r&&null!==e&&oO(e,r[1])?r[0]:(n.memoizedState=[t,e],t)}function oX(t,e){var n=oM();e=void 0===e?null:e;var r=n.memoizedState;return null!==r&&null!==e&&oO(e,r[1])?r[0]:(t=t(),n.memoizedState=[t,e],t)}function oK(t,e,n){return 0==(21&op)?(t.baseState&&(t.baseState=!1,as=!0),t.memoizedState=n):(nR(n,e)||(n=ea(),oh.lanes|=n,lr|=n,t.baseState=!0),e)}function oZ(t,e){var n=ec;ec=0!==n&&4>n?n:4,t(!0);var r=of.transition;of.transition={};try{t(!1),e()}finally{ec=n,of.transition=r}}function oQ(){return oM().memoizedState}function oJ(t,e,n){var r=lw(t);n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},o1(t)?o2(e,n):null!==(n=iD(t,e,n,r))&&(lE(n,t,r,lO()),o5(n,e,r))}function o0(t,e,n){var r=lw(t),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(o1(t))o2(e,i);else{var o=t.alternate;if(0===t.lanes&&(null===o||0===o.lanes)&&null!==(o=e.lastRenderedReducer))try{var a=e.lastRenderedState,l=o(a,n);if(i.hasEagerState=!0,i.eagerState=l,nR(l,a)){var s=e.interleaved;null===s?(i.next=i,iR(e)):(i.next=s.next,s.next=i),e.interleaved=i;return}}catch(t){}finally{}null!==(n=iD(t,e,i,r))&&(lE(n,t,r,i=lO()),o5(n,e,r))}}function o1(t){var e=t.alternate;return t===oh||null!==e&&e===oh}function o2(t,e){ov=og=!0;var n=t.pending;null===n?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function o5(t,e,n){if(0!=(4194240&n)){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,eu(t,n)}}var o3={readContext:iL,useCallback:ox,useContext:ox,useEffect:ox,useImperativeHandle:ox,useInsertionEffect:ox,useLayoutEffect:ox,useMemo:ox,useReducer:ox,useRef:ox,useState:ox,useDebugValue:ox,useDeferredValue:ox,useTransition:ox,useMutableSource:ox,useSyncExternalStore:ox,useId:ox,unstable_isNewReconciler:!1},o4={readContext:iL,useCallback:function(t,e){return ok().memoizedState=[t,void 0===e?null:e],t},useContext:iL,useEffect:oW,useImperativeHandle:function(t,e,n){return n=null!=n?n.concat([t]):null,oz(4194308,4,oH.bind(null,e,t),n)},useLayoutEffect:function(t,e){return oz(4194308,4,t,e)},useInsertionEffect:function(t,e){return oz(4,2,t,e)},useMemo:function(t,e){var n=ok();return e=void 0===e?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var r=ok();return e=void 0!==n?n(e):e,r.memoizedState=r.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},r.queue=t,t=t.dispatch=oJ.bind(null,oh,t),[r.memoizedState,t]},useRef:function(t){var e=ok();return t={current:t},e.memoizedState=t},useState:oR,useDebugValue:oq,useDeferredValue:function(t){return ok().memoizedState=t},useTransition:function(){var t=oR(!1),e=t[0];return t=oZ.bind(null,t[1]),ok().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,n){var r=oh,i=ok();if(ih){if(void 0===n)throw Error(f(407));n=n()}else{if(n=e(),null===a6)throw Error(f(349));0!=(30&op)||oT(r,e,n)}i.memoizedState=n;var o={value:n,getSnapshot:e};return i.queue=o,oW(oN.bind(null,r,o,t),[t]),r.flags|=2048,oD(9,oC.bind(null,r,o,n,e),void 0,null),n},useId:function(){var t=ok(),e=a6.identifierPrefix;if(ih){var n=io,r=ii;e=":"+e+"R"+(n=(r&~(1<<32-t9(r)-1)).toString(32)+n),0<(n=om++)&&(e+="H"+n.toString(32)),e+=":"}else e=":"+e+"r"+(n=ob++).toString(32)+":";return t.memoizedState=e},unstable_isNewReconciler:!1},o6={readContext:iL,useCallback:oY,useContext:iL,useEffect:o$,useImperativeHandle:oU,useInsertionEffect:oG,useLayoutEffect:oV,useMemo:oX,useReducer:o_,useRef:oF,useState:function(){return o_(oS)},useDebugValue:oq,useDeferredValue:function(t){return oK(oM(),od.memoizedState,t)},useTransition:function(){return[o_(oS)[0],oM().memoizedState]},useMutableSource:oj,useSyncExternalStore:oA,useId:oQ,unstable_isNewReconciler:!1},o8={readContext:iL,useCallback:oY,useContext:iL,useEffect:o$,useImperativeHandle:oU,useInsertionEffect:oG,useLayoutEffect:oV,useMemo:oX,useReducer:oP,useRef:oF,useState:function(){return oP(oS)},useDebugValue:oq,useDeferredValue:function(t){var e=oM();return null===od?e.memoizedState=t:oK(e,od.memoizedState,t)},useTransition:function(){return[oP(oS)[0],oM().memoizedState]},useMutableSource:oj,useSyncExternalStore:oA,useId:oQ,unstable_isNewReconciler:!1};function o9(t,e){try{var n="",r=e;do n+=function(t){switch(t.tag){case 5:return V(t.type);case 16:return V("Lazy");case 13:return V("Suspense");case 19:return V("SuspenseList");case 0:case 2:case 15:return t=U(t.type,!1);case 11:return t=U(t.type.render,!1);case 1:return t=U(t.type,!0);default:return""}}(r),r=r.return;while(r);var i=n}catch(t){i="\nError generating stack: "+t.message+"\n"+t.stack}return{value:t,source:e,stack:i,digest:null}}function o7(t,e,n){return{value:t,source:null,stack:null!=n?n:null,digest:null!=e?e:null}}function at(t,e){try{console.error(e.value)}catch(t){setTimeout(function(){throw t})}}var ae="function"==typeof WeakMap?WeakMap:Map;function an(t,e,n){(n=i$(-1,n)).tag=3,n.payload={element:null};var r=e.value;return n.callback=function(){lf||(lf=!0,lp=r),at(t,e)},n}function ar(t,e,n){(n=i$(-1,n)).tag=3;var r=t.type.getDerivedStateFromError;if("function"==typeof r){var i=e.value;n.payload=function(){return r(i)},n.callback=function(){at(t,e)}}var o=t.stateNode;return null!==o&&"function"==typeof o.componentDidCatch&&(n.callback=function(){at(t,e),"function"!=typeof r&&(null===lh?lh=new Set([this]):lh.add(this));var n=e.stack;this.componentDidCatch(e.value,{componentStack:null!==n?n:""})}),n}function ai(t,e,n){var r=t.pingCache;if(null===r){r=t.pingCache=new ae;var i=new Set;r.set(e,i)}else void 0===(i=r.get(e))&&(i=new Set,r.set(e,i));i.has(n)||(i.add(n),t=lV.bind(null,t,e,n),e.then(t,t))}function ao(t){do{var e;if((e=13===t.tag)&&(e=null===(e=t.memoizedState)||null!==e.dehydrated),e)return t;t=t.return}while(null!==t);return null}function aa(t,e,n,r,i){return 0==(1&t.mode)?(t===e?t.flags|=65536:(t.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((e=i$(-1,1)).tag=2,iG(n,e,1))),n.lanes|=1),t):(t.flags|=65536,t.lanes=i,t)}var al=S.ReactCurrentOwner,as=!1;function au(t,e,n,r){e.child=null===t?i6(e,null,n,r):i4(e,t.child,n,r)}function ac(t,e,n,r,i){n=n.render;var o=e.ref;return(iN(e,i),r=ow(t,e,n,r,o,i),n=oE(),null===t||as)?(ih&&n&&is(e),e.flags|=1,au(t,e,r,i),e.child):(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,aj(t,e,i))}function af(t,e,n,r,i){if(null===t){var o=n.type;return"function"!=typeof o||lZ(o)||void 0!==o.defaultProps||null!==n.compare||void 0!==n.defaultProps?((t=lJ(n.type,null,r,e,e.mode,i)).ref=e.ref,t.return=e,e.child=t):(e.tag=15,e.type=o,ap(t,e,o,r,i))}if(o=t.child,0==(t.lanes&i)){var a=o.memoizedProps;if((n=null!==(n=n.compare)?n:nD)(a,r)&&t.ref===e.ref)return aj(t,e,i)}return e.flags|=1,(t=lQ(o,r)).ref=e.ref,t.return=e,e.child=t}function ap(t,e,n,r,i){if(null!==t){var o=t.memoizedProps;if(nD(o,r)&&t.ref===e.ref){if(as=!1,e.pendingProps=r=o,0==(t.lanes&i))return e.lanes=t.lanes,aj(t,e,i);else 0!=(131072&t.flags)&&(as=!0)}}return ay(t,e,n,r,i)}function ah(t,e,n){var r=e.pendingProps,i=r.children,o=null!==t?t.memoizedState:null;if("hidden"===r.mode){if(0==(1&e.mode))e.memoizedState={baseLanes:0,cachePool:null,transitions:null},rG(lt,a7),a7|=n;else{if(0==(0x40000000&n))return t=null!==o?o.baseLanes|n:n,e.lanes=e.childLanes=0x40000000,e.memoizedState={baseLanes:t,cachePool:null,transitions:null},e.updateQueue=null,rG(lt,a7),a7|=t,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==o?o.baseLanes:n,rG(lt,a7),a7|=r}}else null!==o?(r=o.baseLanes|n,e.memoizedState=null):r=n,rG(lt,a7),a7|=r;return au(t,e,i,n),e.child}function ad(t,e){var n=e.ref;(null===t&&null!==n||null!==t&&t.ref!==n)&&(e.flags|=512,e.flags|=2097152)}function ay(t,e,n,r,i){var o=rX(n)?rq:rH.current;return(o=rY(e,o),iN(e,i),n=ow(t,e,n,r,o,i),r=oE(),null===t||as)?(ih&&r&&is(e),e.flags|=1,au(t,e,n,i),e.child):(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,aj(t,e,i))}function ag(t,e,n,r,i){if(rX(n)){var o=!0;rJ(e)}else o=!1;if(iN(e,i),null===e.stateNode)aP(t,e),iQ(e,n,r),i0(e,n,r,i),r=!0;else if(null===t){var a=e.stateNode,l=e.memoizedProps;a.props=l;var s=a.context,u=n.contextType;u="object"==typeof u&&null!==u?iL(u):rY(e,u=rX(n)?rq:rH.current);var c=n.getDerivedStateFromProps,f="function"==typeof c||"function"==typeof a.getSnapshotBeforeUpdate;f||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(l!==r||s!==u)&&iJ(e,a,r,u),iz=!1;var p=e.memoizedState;a.state=p,iU(e,r,a,i),s=e.memoizedState,l!==r||p!==s||rU.current||iz?("function"==typeof c&&(iX(e,n,c,r),s=e.memoizedState),(l=iz||iZ(e,n,l,r,p,s,u))?(f||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||("function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"==typeof a.componentDidMount&&(e.flags|=4194308)):("function"==typeof a.componentDidMount&&(e.flags|=4194308),e.memoizedProps=r,e.memoizedState=s),a.props=r,a.state=s,a.context=u,r=l):("function"==typeof a.componentDidMount&&(e.flags|=4194308),r=!1)}else{a=e.stateNode,iW(t,e),l=e.memoizedProps,u=e.type===e.elementType?l:iM(e.type,l),a.props=u,f=e.pendingProps,p=a.context,s="object"==typeof(s=n.contextType)&&null!==s?iL(s):rY(e,s=rX(n)?rq:rH.current);var h=n.getDerivedStateFromProps;(c="function"==typeof h||"function"==typeof a.getSnapshotBeforeUpdate)||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(l!==f||p!==s)&&iJ(e,a,r,s),iz=!1,p=e.memoizedState,a.state=p,iU(e,r,a,i);var d=e.memoizedState;l!==f||p!==d||rU.current||iz?("function"==typeof h&&(iX(e,n,h,r),d=e.memoizedState),(u=iz||iZ(e,n,u,r,p,d,s)||!1)?(c||"function"!=typeof a.UNSAFE_componentWillUpdate&&"function"!=typeof a.componentWillUpdate||("function"==typeof a.componentWillUpdate&&a.componentWillUpdate(r,d,s),"function"==typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,d,s)),"function"==typeof a.componentDidUpdate&&(e.flags|=4),"function"==typeof a.getSnapshotBeforeUpdate&&(e.flags|=1024)):("function"!=typeof a.componentDidUpdate||l===t.memoizedProps&&p===t.memoizedState||(e.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||l===t.memoizedProps&&p===t.memoizedState||(e.flags|=1024),e.memoizedProps=r,e.memoizedState=d),a.props=r,a.state=d,a.context=s,r=u):("function"!=typeof a.componentDidUpdate||l===t.memoizedProps&&p===t.memoizedState||(e.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||l===t.memoizedProps&&p===t.memoizedState||(e.flags|=1024),r=!1)}return av(t,e,n,r,o,i)}function av(t,e,n,r,i,o){ad(t,e);var a=0!=(128&e.flags);if(!r&&!a)return i&&r0(e,n,!1),aj(t,e,o);r=e.stateNode,al.current=e;var l=a&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return e.flags|=1,null!==t&&a?(e.child=i4(e,t.child,null,o),e.child=i4(e,null,l,o)):au(t,e,l,o),e.memoizedState=r.state,i&&r0(e,n,!0),e.child}function am(t){var e=t.stateNode;e.pendingContext?rZ(t,e.pendingContext,e.pendingContext!==e.context):e.context&&rZ(t,e.context,!1),on(t,e.containerInfo)}function ab(t,e,n,r,i){return iw(),iE(i),e.flags|=256,au(t,e,n,r),e.child}var ax={dehydrated:null,treeContext:null,retryLane:0};function aO(t){return{baseLanes:t,cachePool:null,transitions:null}}function aw(t,e,n){var r,i=e.pendingProps,o=oa.current,a=!1,l=0!=(128&e.flags);if((r=l)||(r=(null===t||null!==t.memoizedState)&&0!=(2&o)),r?(a=!0,e.flags&=-129):(null===t||null!==t.memoizedState)&&(o|=1),rG(oa,1&o),null===t)return(im(e),null!==(t=e.memoizedState)&&null!==(t=t.dehydrated))?(0==(1&e.mode)?e.lanes=1:"$!"===t.data?e.lanes=8:e.lanes=0x40000000,null):(l=i.children,t=i.fallback,a?(i=e.mode,a=e.child,l={mode:"hidden",children:l},0==(1&i)&&null!==a?(a.childLanes=0,a.pendingProps=l):a=l1(l,i,0,null),t=l0(t,i,n,null),a.return=e,t.return=e,a.sibling=t,e.child=a,e.child.memoizedState=aO(n),e.memoizedState=ax,t):aE(e,l));if(null!==(o=t.memoizedState)&&null!==(r=o.dehydrated))return function(t,e,n,r,i,o,a){if(n)return 256&e.flags?(e.flags&=-257,ak(t,e,a,r=o7(Error(f(422))))):null!==e.memoizedState?(e.child=t.child,e.flags|=128,null):(o=r.fallback,i=e.mode,r=l1({mode:"visible",children:r.children},i,0,null),o=l0(o,i,a,null),o.flags|=2,r.return=e,o.return=e,r.sibling=o,e.child=r,0!=(1&e.mode)&&i4(e,t.child,null,a),e.child.memoizedState=aO(a),e.memoizedState=ax,o);if(0==(1&e.mode))return ak(t,e,a,null);if("$!"===i.data){if(r=i.nextSibling&&i.nextSibling.dataset)var l=r.dgst;return r=l,ak(t,e,a,r=o7(o=Error(f(419)),r,void 0))}if(l=0!=(a&t.childLanes),as||l){if(null!==(r=a6)){switch(a&-a){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 0x1000000:case 0x2000000:case 0x4000000:i=32;break;case 0x20000000:i=0x10000000;break;default:i=0}0!==(i=0!=(i&(r.suspendedLanes|a))?0:i)&&i!==o.retryLane&&(o.retryLane=i,iF(t,i),lE(r,t,i,-1))}return lR(),ak(t,e,a,r=o7(Error(f(421))))}return"$?"===i.data?(e.flags|=128,e.child=t.child,e=lU.bind(null,t),i._reactRetry=e,null):(t=o.treeContext,ip=rS(i.nextSibling),ic=e,ih=!0,id=null,null!==t&&(it[ie++]=ii,it[ie++]=io,it[ie++]=ir,ii=t.id,io=t.overflow,ir=e),e=aE(e,r.children),e.flags|=4096,e)}(t,e,l,i,r,o,n);if(a){a=i.fallback,l=e.mode,r=(o=t.child).sibling;var s={mode:"hidden",children:i.children};return 0==(1&l)&&e.child!==o?((i=e.child).childLanes=0,i.pendingProps=s,e.deletions=null):(i=lQ(o,s)).subtreeFlags=0xe00000&o.subtreeFlags,null!==r?a=lQ(r,a):(a=l0(a,l,n,null),a.flags|=2),a.return=e,i.return=e,i.sibling=a,e.child=i,i=a,a=e.child,l=null===(l=t.child.memoizedState)?aO(n):{baseLanes:l.baseLanes|n,cachePool:null,transitions:l.transitions},a.memoizedState=l,a.childLanes=t.childLanes&~n,e.memoizedState=ax,i}return t=(a=t.child).sibling,i=lQ(a,{mode:"visible",children:i.children}),0==(1&e.mode)&&(i.lanes=n),i.return=e,i.sibling=null,null!==t&&(null===(n=e.deletions)?(e.deletions=[t],e.flags|=16):n.push(t)),e.child=i,e.memoizedState=null,i}function aE(t,e){return(e=l1({mode:"visible",children:e},t.mode,0,null)).return=t,t.child=e}function ak(t,e,n,r){return null!==r&&iE(r),i4(e,t.child,null,n),t=aE(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function aM(t,e,n){t.lanes|=e;var r=t.alternate;null!==r&&(r.lanes|=e),iC(t.return,e,n)}function aS(t,e,n,r,i){var o=t.memoizedState;null===o?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=e,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function a_(t,e,n){var r=e.pendingProps,i=r.revealOrder,o=r.tail;if(au(t,e,r.children,n),0!=(2&(r=oa.current)))r=1&r|2,e.flags|=128;else{if(null!==t&&0!=(128&t.flags))r:for(t=e.child;null!==t;){if(13===t.tag)null!==t.memoizedState&&aM(t,n,e);else if(19===t.tag)aM(t,n,e);else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)break r;t=t.return}t.sibling.return=t.return,t=t.sibling}r&=1}if(rG(oa,r),0==(1&e.mode))e.memoizedState=null;else switch(i){case"forwards":for(i=null,n=e.child;null!==n;)null!==(t=n.alternate)&&null===ol(t)&&(i=n),n=n.sibling;null===(n=i)?(i=e.child,e.child=null):(i=n.sibling,n.sibling=null),aS(e,!1,i,n,o);break;case"backwards":for(n=null,i=e.child,e.child=null;null!==i;){if(null!==(t=i.alternate)&&null===ol(t)){e.child=i;break}t=i.sibling,i.sibling=n,n=i,i=t}aS(e,!0,n,null,o);break;case"together":aS(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function aP(t,e){0==(1&e.mode)&&null!==t&&(t.alternate=null,e.alternate=null,e.flags|=2)}function aj(t,e,n){if(null!==t&&(e.dependencies=t.dependencies),lr|=e.lanes,0==(n&e.childLanes))return null;if(null!==t&&e.child!==t.child)throw Error(f(153));if(null!==e.child){for(n=lQ(t=e.child,t.pendingProps),e.child=n,n.return=e;null!==t.sibling;)t=t.sibling,(n=n.sibling=lQ(t,t.pendingProps)).return=e;n.sibling=null}return e.child}function aA(t,e){if(!ih)switch(t.tailMode){case"hidden":e=t.tail;for(var n=null;null!==e;)null!==e.alternate&&(n=e),e=e.sibling;null===n?t.tail=null:n.sibling=null;break;case"collapsed":n=t.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?e||null===t.tail?t.tail=null:t.tail.sibling=null:r.sibling=null}}function aT(t){var e=null!==t.alternate&&t.alternate.child===t.child,n=0,r=0;if(e)for(var i=t.child;null!==i;)n|=i.lanes|i.childLanes,r|=0xe00000&i.subtreeFlags,r|=0xe00000&i.flags,i.return=t,i=i.sibling;else for(i=t.child;null!==i;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=t,i=i.sibling;return t.subtreeFlags|=r,t.childLanes=n,e}i=function(t,e){for(var n=e.child;null!==n;){if(5===n.tag||6===n.tag)t.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===e)break;for(;null===n.sibling;){if(null===n.return||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},o=function(){},a=function(t,e,n,r){var i=t.memoizedProps;if(i!==r){t=e.stateNode,oe(i9.current);var o,a=null;switch(n){case"input":i=Q(t,i),r=Q(t,r),a=[];break;case"select":i=G({},i,{value:void 0}),r=G({},r,{value:void 0}),a=[];break;case"textarea":i=ta(t,i),r=ta(t,r),a=[];break;default:"function"!=typeof i.onClick&&"function"==typeof r.onClick&&(t.onclick=rg)}for(u in tO(n,r),n=null,i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&null!=i[u]){if("style"===u){var l=i[u];for(o in l)l.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else"dangerouslySetInnerHTML"!==u&&"children"!==u&&"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&"autoFocus"!==u&&(h.hasOwnProperty(u)?a||(a=[]):(a=a||[]).push(u,null))}for(u in r){var s=r[u];if(l=null!=i?i[u]:void 0,r.hasOwnProperty(u)&&s!==l&&(null!=s||null!=l)){if("style"===u){if(l){for(o in l)!l.hasOwnProperty(o)||s&&s.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in s)s.hasOwnProperty(o)&&l[o]!==s[o]&&(n||(n={}),n[o]=s[o])}else n||(a||(a=[]),a.push(u,n)),n=s}else"dangerouslySetInnerHTML"===u?(s=s?s.__html:void 0,l=l?l.__html:void 0,null!=s&&l!==s&&(a=a||[]).push(u,s)):"children"===u?"string"!=typeof s&&"number"!=typeof s||(a=a||[]).push(u,""+s):"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&(h.hasOwnProperty(u)?(null!=s&&"onScroll"===u&&rn("scroll",t),a||l===s||(a=[])):(a=a||[]).push(u,s))}}n&&(a=a||[]).push("style",n);var u=a;(e.updateQueue=u)&&(e.flags|=4)}},l=function(t,e,n,r){n!==r&&(e.flags|=4)};var aC=!1,aN=!1,aL="function"==typeof WeakSet?WeakSet:Set,aI=null;function aR(t,e){var n=t.ref;if(null!==n){if("function"==typeof n)try{n(null)}catch(n){lG(t,e,n)}else n.current=null}}function aD(t,e,n){try{n()}catch(n){lG(t,e,n)}}var aF=!1;function az(t,e,n){var r=e.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var i=r=r.next;do{if((i.tag&t)===t){var o=i.destroy;i.destroy=void 0,void 0!==o&&aD(e,n,o)}i=i.next}while(i!==r)}}function aB(t,e){if(null!==(e=null!==(e=e.updateQueue)?e.lastEffect:null)){var n=e=e.next;do{if((n.tag&t)===t){var r=n.create;n.destroy=r()}n=n.next}while(n!==e)}}function aW(t){var e=t.ref;if(null!==e){var n=t.stateNode;t.tag;t=n;"function"==typeof e?e(t):e.current=t}}function a$(t){return 5===t.tag||3===t.tag||4===t.tag}function aG(t){r:for(;;){for(;null===t.sibling;){if(null===t.return||a$(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;5!==t.tag&&6!==t.tag&&18!==t.tag;){if(2&t.flags)continue r;if(null===t.child||4===t.tag)continue r;t.child.return=t,t=t.child}if(!(2&t.flags))return t.stateNode}}var aV=null,aH=!1;function aU(t,e,n){for(n=n.child;null!==n;)aq(t,e,n),n=n.sibling}function aq(t,e,n){if(t8&&"function"==typeof t8.onCommitFiberUnmount)try{t8.onCommitFiberUnmount(t6,n)}catch(t){}switch(n.tag){case 5:aN||aR(n,e);case 6:var r=aV,i=aH;aV=null,aU(t,e,n),aV=r,aH=i,null!==aV&&(aH?(t=aV,n=n.stateNode,8===t.nodeType?t.parentNode.removeChild(n):t.removeChild(n)):aV.removeChild(n.stateNode));break;case 18:null!==aV&&(aH?(t=aV,n=n.stateNode,8===t.nodeType?rM(t.parentNode,n):1===t.nodeType&&rM(t,n),eN(t)):rM(aV,n.stateNode));break;case 4:r=aV,i=aH,aV=n.stateNode.containerInfo,aH=!0,aU(t,e,n),aV=r,aH=i;break;case 0:case 11:case 14:case 15:if(!aN&&null!==(r=n.updateQueue)&&null!==(r=r.lastEffect)){i=r=r.next;do{var o=i,a=o.destroy;o=o.tag,void 0!==a&&(0!=(2&o)?aD(n,e,a):0!=(4&o)&&aD(n,e,a)),i=i.next}while(i!==r)}aU(t,e,n);break;case 1:if(!aN&&(aR(n,e),"function"==typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(t){lG(n,e,t)}aU(t,e,n);break;case 21:default:aU(t,e,n);break;case 22:1&n.mode?(aN=(r=aN)||null!==n.memoizedState,aU(t,e,n),aN=r):aU(t,e,n)}}function aY(t){var e=t.updateQueue;if(null!==e){t.updateQueue=null;var n=t.stateNode;null===n&&(n=t.stateNode=new aL),e.forEach(function(e){var r=lq.bind(null,t,e);n.has(e)||(n.add(e),e.then(r,r))})}}function aX(t,e){var n=e.deletions;if(null!==n)for(var r=0;r<n.length;r++){var i=n[r];try{var o=e,a=o;r:for(;null!==a;){switch(a.tag){case 5:aV=a.stateNode,aH=!1;break r;case 3:case 4:aV=a.stateNode.containerInfo,aH=!0;break r}a=a.return}if(null===aV)throw Error(f(160));aq(t,o,i),aV=null,aH=!1;var l=i.alternate;null!==l&&(l.return=null),i.return=null}catch(t){lG(i,e,t)}}if(12854&e.subtreeFlags)for(e=e.child;null!==e;)aK(e,t),e=e.sibling}function aK(t,e){var n=t.alternate,r=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(aX(e,t),aZ(t),4&r){try{az(3,t,t.return),aB(3,t)}catch(e){lG(t,t.return,e)}try{az(5,t,t.return)}catch(e){lG(t,t.return,e)}}break;case 1:aX(e,t),aZ(t),512&r&&null!==n&&aR(n,n.return);break;case 5:if(aX(e,t),aZ(t),512&r&&null!==n&&aR(n,n.return),32&t.flags){var i=t.stateNode;try{ty(i,"")}catch(e){lG(t,t.return,e)}}if(4&r&&null!=(i=t.stateNode)){var o=t.memoizedProps,a=null!==n?n.memoizedProps:o,l=t.type,s=t.updateQueue;if(t.updateQueue=null,null!==s)try{"input"===l&&"radio"===o.type&&null!=o.name&&tt(i,o),tw(l,a);var u=tw(l,o);for(a=0;a<s.length;a+=2){var c=s[a],p=s[a+1];"style"===c?tb(i,p):"dangerouslySetInnerHTML"===c?td(i,p):"children"===c?ty(i,p):M(i,c,p,u)}switch(l){case"input":te(i,o);break;case"textarea":ts(i,o);break;case"select":var h=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!o.multiple;var d=o.value;null!=d?to(i,!!o.multiple,d,!1):!!o.multiple!==h&&(null!=o.defaultValue?to(i,!!o.multiple,o.defaultValue,!0):to(i,!!o.multiple,o.multiple?[]:"",!1))}i[rA]=o}catch(e){lG(t,t.return,e)}}break;case 6:if(aX(e,t),aZ(t),4&r){if(null===t.stateNode)throw Error(f(162));i=t.stateNode,o=t.memoizedProps;try{i.nodeValue=o}catch(e){lG(t,t.return,e)}}break;case 3:if(aX(e,t),aZ(t),4&r&&null!==n&&n.memoizedState.isDehydrated)try{eN(e.containerInfo)}catch(e){lG(t,t.return,e)}break;case 4:default:aX(e,t),aZ(t);break;case 13:aX(e,t),aZ(t),8192&(i=t.child).flags&&(o=null!==i.memoizedState,i.stateNode.isHidden=o,o&&(null===i.alternate||null===i.alternate.memoizedState)&&(ls=tJ())),4&r&&aY(t);break;case 22:if(c=null!==n&&null!==n.memoizedState,1&t.mode?(aN=(u=aN)||c,aX(e,t),aN=u):aX(e,t),aZ(t),8192&r){if(u=null!==t.memoizedState,(t.stateNode.isHidden=u)&&!c&&0!=(1&t.mode))for(aI=t,c=t.child;null!==c;){for(p=aI=c;null!==aI;){switch(d=(h=aI).child,h.tag){case 0:case 11:case 14:case 15:az(4,h,h.return);break;case 1:aR(h,h.return);var y=h.stateNode;if("function"==typeof y.componentWillUnmount){r=h,n=h.return;try{e=r,y.props=e.memoizedProps,y.state=e.memoizedState,y.componentWillUnmount()}catch(t){lG(r,n,t)}}break;case 5:aR(h,h.return);break;case 22:if(null!==h.memoizedState){aJ(p);continue}}null!==d?(d.return=h,aI=d):aJ(p)}c=c.sibling}r:for(c=null,p=t;;){if(5===p.tag){if(null===c){c=p;try{i=p.stateNode,u?(o=i.style,"function"==typeof o.setProperty?o.setProperty("display","none","important"):o.display="none"):(l=p.stateNode,a=null!=(s=p.memoizedProps.style)&&s.hasOwnProperty("display")?s.display:null,l.style.display=tm("display",a))}catch(e){lG(t,t.return,e)}}}else if(6===p.tag){if(null===c)try{p.stateNode.nodeValue=u?"":p.memoizedProps}catch(e){lG(t,t.return,e)}}else if((22!==p.tag&&23!==p.tag||null===p.memoizedState||p===t)&&null!==p.child){p.child.return=p,p=p.child;continue}if(p===t)break;for(;null===p.sibling;){if(null===p.return||p.return===t)break r;c===p&&(c=null),p=p.return}c===p&&(c=null),p.sibling.return=p.return,p=p.sibling}}break;case 19:aX(e,t),aZ(t),4&r&&aY(t);case 21:}}function aZ(t){var e=t.flags;if(2&e){try{r:{for(var n=t.return;null!==n;){if(a$(n)){var r=n;break r}n=n.return}throw Error(f(160))}switch(r.tag){case 5:var i=r.stateNode;32&r.flags&&(ty(i,""),r.flags&=-33);var o=aG(t);!function t(e,n,r){var i=e.tag;if(5===i||6===i)e=e.stateNode,n?r.insertBefore(e,n):r.appendChild(e);else if(4!==i&&null!==(e=e.child))for(t(e,n,r),e=e.sibling;null!==e;)t(e,n,r),e=e.sibling}(t,o,i);break;case 3:case 4:var a=r.stateNode.containerInfo,l=aG(t);!function t(e,n,r){var i=e.tag;if(5===i||6===i)e=e.stateNode,n?8===r.nodeType?r.parentNode.insertBefore(e,n):r.insertBefore(e,n):(8===r.nodeType?(n=r.parentNode).insertBefore(e,r):(n=r).appendChild(e),null!=(r=r._reactRootContainer)||null!==n.onclick||(n.onclick=rg));else if(4!==i&&null!==(e=e.child))for(t(e,n,r),e=e.sibling;null!==e;)t(e,n,r),e=e.sibling}(t,l,a);break;default:throw Error(f(161))}}catch(e){lG(t,t.return,e)}t.flags&=-3}4096&e&&(t.flags&=-4097)}function aQ(t){for(;null!==aI;){var e=aI;if(0!=(8772&e.flags)){var n=e.alternate;try{if(0!=(8772&e.flags))switch(e.tag){case 0:case 11:case 15:aN||aB(5,e);break;case 1:var r=e.stateNode;if(4&e.flags&&!aN){if(null===n)r.componentDidMount();else{var i=e.elementType===e.type?n.memoizedProps:iM(e.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}}var o=e.updateQueue;null!==o&&iq(e,o,r);break;case 3:var a=e.updateQueue;if(null!==a){if(n=null,null!==e.child)switch(e.child.tag){case 5:case 1:n=e.child.stateNode}iq(e,a,n)}break;case 5:var l=e.stateNode;if(null===n&&4&e.flags){n=l;var s=e.memoizedProps;switch(e.type){case"button":case"input":case"select":case"textarea":s.autoFocus&&n.focus();break;case"img":s.src&&(n.src=s.src)}}break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(null===e.memoizedState){var u=e.alternate;if(null!==u){var c=u.memoizedState;if(null!==c){var p=c.dehydrated;null!==p&&eN(p)}}}break;default:throw Error(f(163))}aN||512&e.flags&&aW(e)}catch(t){lG(e,e.return,t)}}if(e===t){aI=null;break}if(null!==(n=e.sibling)){n.return=e.return,aI=n;break}aI=e.return}}function aJ(t){for(;null!==aI;){var e=aI;if(e===t){aI=null;break}var n=e.sibling;if(null!==n){n.return=e.return,aI=n;break}aI=e.return}}function a0(t){for(;null!==aI;){var e=aI;try{switch(e.tag){case 0:case 11:case 15:var n=e.return;try{aB(4,e)}catch(t){lG(e,n,t)}break;case 1:var r=e.stateNode;if("function"==typeof r.componentDidMount){var i=e.return;try{r.componentDidMount()}catch(t){lG(e,i,t)}}var o=e.return;try{aW(e)}catch(t){lG(e,o,t)}break;case 5:var a=e.return;try{aW(e)}catch(t){lG(e,a,t)}}}catch(t){lG(e,e.return,t)}if(e===t){aI=null;break}var l=e.sibling;if(null!==l){l.return=e.return,aI=l;break}aI=e.return}}var a1=Math.ceil,a2=S.ReactCurrentDispatcher,a5=S.ReactCurrentOwner,a3=S.ReactCurrentBatchConfig,a4=0,a6=null,a8=null,a9=0,a7=0,lt=rW(0),le=0,ln=null,lr=0,li=0,lo=0,la=null,ll=null,ls=0,lu=1/0,lc=null,lf=!1,lp=null,lh=null,ld=!1,ly=null,lg=0,lv=0,lm=null,lb=-1,lx=0;function lO(){return 0!=(6&a4)?tJ():-1!==lb?lb:lb=tJ()}function lw(t){return 0==(1&t.mode)?1:0!=(2&a4)&&0!==a9?a9&-a9:null!==ik.transition?(0===lx&&(lx=ea()),lx):0!==(t=ec)?t:t=void 0===(t=window.event)?16:eW(t.type)}function lE(t,e,n,r){if(50<lv)throw lv=0,lm=null,Error(f(185));es(t,n,r),(0==(2&a4)||t!==a6)&&(t===a6&&(0==(2&a4)&&(li|=n),4===le&&lP(t,a9)),lk(t,r),1===n&&0===a4&&0==(1&e.mode)&&(lu=tJ()+500,r2&&r4()))}function lk(t,e){var n,r=t.callbackNode;!function(t,e){for(var n=t.suspendedLanes,r=t.pingedLanes,i=t.expirationTimes,o=t.pendingLanes;0<o;){var a=31-t9(o),l=1<<a,s=i[a];-1===s?(0==(l&n)||0!=(l&r))&&(i[a]=function(t,e){switch(t){case 1:case 2:case 4:return e+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e+5e3;default:return -1}}(l,e)):s<=e&&(t.expiredLanes|=l),o&=~l}}(t,e);var i=ei(t,t===a6?a9:0);if(0===i)null!==r&&tK(r),t.callbackNode=null,t.callbackPriority=0;else if(e=i&-i,t.callbackPriority!==e){if(null!=r&&tK(r),1===e){;0===t.tag?(n=lj.bind(null,t),r2=!0,r3(n)):r3(lj.bind(null,t)),rE(function(){0==(6&a4)&&r4()}),r=null}else{switch(ef(i)){case 1:r=t1;break;case 4:r=t2;break;case 16:default:r=t5;break;case 0x20000000:r=t4}r=function(t,e){return tX(t,e)}(r,lM.bind(null,t))}t.callbackPriority=e,t.callbackNode=r}}function lM(t,e){if(lb=-1,lx=0,0!=(6&a4))throw Error(f(327));var n=t.callbackNode;if(lW()&&t.callbackNode!==n)return null;var r=ei(t,t===a6?a9:0);if(0===r)return null;if(0!=(30&r)||0!=(r&t.expiredLanes)||e)e=lD(t,r);else{e=r;var i=a4;a4|=2;var o=lI();for((a6!==t||a9!==e)&&(lc=null,lu=tJ()+500,lN(t,e));;)try{(function(){for(;null!==a8&&!tZ();)lF(a8)})();break}catch(e){lL(t,e)}iA(),a2.current=o,a4=i,null!==a8?e=0:(a6=null,a9=0,e=le)}if(0!==e){if(2===e&&0!==(i=eo(t))&&(r=i,e=lS(t,i)),1===e)throw n=ln,lN(t,0),lP(t,r),lk(t,tJ()),n;if(6===e)lP(t,r);else{if(i=t.current.alternate,0==(30&r)&&!function(t){for(var e=t;;){if(16384&e.flags){var n=e.updateQueue;if(null!==n&&null!==(n=n.stores))for(var r=0;r<n.length;r++){var i=n[r],o=i.getSnapshot;i=i.value;try{if(!nR(o(),i))return!1}catch(t){return!1}}}if(n=e.child,16384&e.subtreeFlags&&null!==n)n.return=e,e=n;else{if(e===t)break;for(;null===e.sibling;){if(null===e.return||e.return===t)return!0;e=e.return}e.sibling.return=e.return,e=e.sibling}}return!0}(i)&&(2===(e=lD(t,r))&&0!==(o=eo(t))&&(r=o,e=lS(t,o)),1===e))throw n=ln,lN(t,0),lP(t,r),lk(t,tJ()),n;switch(t.finishedWork=i,t.finishedLanes=r,e){case 0:case 1:throw Error(f(345));case 2:case 5:lB(t,ll,lc);break;case 3:if(lP(t,r),(0x7c00000&r)===r&&10<(e=ls+500-tJ())){if(0!==ei(t,0))break;if(((i=t.suspendedLanes)&r)!==r){lO(),t.pingedLanes|=t.suspendedLanes&i;break}t.timeoutHandle=rx(lB.bind(null,t,ll,lc),e);break}lB(t,ll,lc);break;case 4:if(lP(t,r),(4194240&r)===r)break;for(i=-1,e=t.eventTimes;0<r;){var a=31-t9(r);o=1<<a,(a=e[a])>i&&(i=a),r&=~o}if(r=i,10<(r=(120>(r=tJ()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*a1(r/1960))-r)){t.timeoutHandle=rx(lB.bind(null,t,ll,lc),r);break}lB(t,ll,lc);break;default:throw Error(f(329))}}}return lk(t,tJ()),t.callbackNode===n?lM.bind(null,t):null}function lS(t,e){var n=la;return t.current.memoizedState.isDehydrated&&(lN(t,e).flags|=256),2!==(t=lD(t,e))&&(e=ll,ll=n,null!==e&&l_(e)),t}function l_(t){null===ll?ll=t:ll.push.apply(ll,t)}function lP(t,e){for(e&=~lo,e&=~li,t.suspendedLanes|=e,t.pingedLanes&=~e,t=t.expirationTimes;0<e;){var n=31-t9(e),r=1<<n;t[n]=-1,e&=~r}}function lj(t){if(0!=(6&a4))throw Error(f(327));lW();var e=ei(t,0);if(0==(1&e))return lk(t,tJ()),null;var n=lD(t,e);if(0!==t.tag&&2===n){var r=eo(t);0!==r&&(e=r,n=lS(t,r))}if(1===n)throw n=ln,lN(t,0),lP(t,e),lk(t,tJ()),n;if(6===n)throw Error(f(345));return t.finishedWork=t.current.alternate,t.finishedLanes=e,lB(t,ll,lc),lk(t,tJ()),null}function lA(t,e){var n=a4;a4|=1;try{return t(e)}finally{0===(a4=n)&&(lu=tJ()+500,r2&&r4())}}function lT(t){null!==ly&&0===ly.tag&&0==(6&a4)&&lW();var e=a4;a4|=1;var n=a3.transition,r=ec;try{if(a3.transition=null,ec=1,t)return t()}finally{ec=r,a3.transition=n,0==(6&(a4=e))&&r4()}}function lC(){a7=lt.current,r$(lt)}function lN(t,e){t.finishedWork=null,t.finishedLanes=0;var n=t.timeoutHandle;if(-1!==n&&(t.timeoutHandle=-1,rO(n)),null!==a8)for(n=a8.return;null!==n;){var r=n;switch(iu(r),r.tag){case 1:null!=(r=r.type.childContextTypes)&&rK();break;case 3:or(),r$(rU),r$(rH),ou();break;case 5:oo(r);break;case 4:or();break;case 13:case 19:r$(oa);break;case 10:iT(r.type._context);break;case 22:case 23:lC()}n=n.return}if(a6=t,a8=t=lQ(t.current,null),a9=a7=e,le=0,ln=null,lo=li=lr=0,ll=la=null,null!==iI){for(e=0;e<iI.length;e++)if(null!==(r=(n=iI[e]).interleaved)){n.interleaved=null;var i=r.next,o=n.pending;if(null!==o){var a=o.next;o.next=i,r.next=a}n.pending=r}iI=null}return t}function lL(t,e){for(;;){var n=a8;try{if(iA(),oc.current=o3,og){for(var r=oh.memoizedState;null!==r;){var i=r.queue;null!==i&&(i.pending=null),r=r.next}og=!1}if(op=0,oy=od=oh=null,ov=!1,om=0,a5.current=null,null===n||null===n.return){le=1,ln=e,a8=null;break}r:{var o=t,a=n.return,l=n,s=e;if(e=a9,l.flags|=32768,null!==s&&"object"==typeof s&&"function"==typeof s.then){var u=s,c=l,p=c.tag;if(0==(1&c.mode)&&(0===p||11===p||15===p)){var h=c.alternate;h?(c.updateQueue=h.updateQueue,c.memoizedState=h.memoizedState,c.lanes=h.lanes):(c.updateQueue=null,c.memoizedState=null)}var d=ao(a);if(null!==d){d.flags&=-257,aa(d,a,l,o,e),1&d.mode&&ai(o,u,e),e=d,s=u;var y=e.updateQueue;if(null===y){var g=new Set;g.add(s),e.updateQueue=g}else y.add(s);break r}if(0==(1&e)){ai(o,u,e),lR();break r}s=Error(f(426))}else if(ih&&1&l.mode){var v=ao(a);if(null!==v){0==(65536&v.flags)&&(v.flags|=256),aa(v,a,l,o,e),iE(o9(s,l));break r}}o=s=o9(s,l),4!==le&&(le=2),null===la?la=[o]:la.push(o),o=a;do{switch(o.tag){case 3:o.flags|=65536,e&=-e,o.lanes|=e;var m=an(o,s,e);iH(o,m);break r;case 1:l=s;var b=o.type,x=o.stateNode;if(0==(128&o.flags)&&("function"==typeof b.getDerivedStateFromError||null!==x&&"function"==typeof x.componentDidCatch&&(null===lh||!lh.has(x)))){o.flags|=65536,e&=-e,o.lanes|=e;var O=ar(o,l,e);iH(o,O);break r}}o=o.return}while(null!==o)}lz(n)}catch(t){e=t,a8===n&&null!==n&&(a8=n=n.return);continue}break}}function lI(){var t=a2.current;return a2.current=o3,null===t?o3:t}function lR(){(0===le||3===le||2===le)&&(le=4),null===a6||0==(0xfffffff&lr)&&0==(0xfffffff&li)||lP(a6,a9)}function lD(t,e){var n=a4;a4|=2;var r=lI();for((a6!==t||a9!==e)&&(lc=null,lN(t,e));;)try{(function(){for(;null!==a8;)lF(a8)})();break}catch(e){lL(t,e)}if(iA(),a4=n,a2.current=r,null!==a8)throw Error(f(261));return a6=null,a9=0,le}function lF(t){var e=s(t.alternate,t,a7);t.memoizedProps=t.pendingProps,null===e?lz(t):a8=e,a5.current=null}function lz(t){var e=t;do{var n=e.alternate;if(t=e.return,0==(32768&e.flags)){if(null!==(n=function(t,e,n){var r=e.pendingProps;switch(iu(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return aT(e),null;case 1:case 17:return rX(e.type)&&rK(),aT(e),null;case 3:return r=e.stateNode,or(),r$(rU),r$(rH),ou(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(null===t||null===t.child)&&(ix(e)?e.flags|=4:null===t||t.memoizedState.isDehydrated&&0==(256&e.flags)||(e.flags|=1024,null!==id&&(l_(id),id=null))),o(t,e),aT(e),null;case 5:oo(e);var s=oe(ot.current);if(n=e.type,null!==t&&null!=e.stateNode)a(t,e,n,r,s),t.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!r){if(null===e.stateNode)throw Error(f(166));return aT(e),null}if(t=oe(i9.current),ix(e)){r=e.stateNode,n=e.type;var u=e.memoizedProps;switch(r[rj]=e,r[rA]=u,t=0!=(1&e.mode),n){case"dialog":rn("cancel",r),rn("close",r);break;case"iframe":case"object":case"embed":rn("load",r);break;case"video":case"audio":for(s=0;s<n9.length;s++)rn(n9[s],r);break;case"source":rn("error",r);break;case"img":case"image":case"link":rn("error",r),rn("load",r);break;case"details":rn("toggle",r);break;case"input":J(r,u),rn("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!u.multiple},rn("invalid",r);break;case"textarea":tl(r,u),rn("invalid",r)}for(var c in tO(n,u),s=null,u)if(u.hasOwnProperty(c)){var p=u[c];"children"===c?"string"==typeof p?r.textContent!==p&&(!0!==u.suppressHydrationWarning&&ry(r.textContent,p,t),s=["children",p]):"number"==typeof p&&r.textContent!==""+p&&(!0!==u.suppressHydrationWarning&&ry(r.textContent,p,t),s=["children",""+p]):h.hasOwnProperty(c)&&null!=p&&"onScroll"===c&&rn("scroll",r)}switch(n){case"input":X(r),tn(r,u,!0);break;case"textarea":X(r),tu(r);break;case"select":case"option":break;default:"function"==typeof u.onClick&&(r.onclick=rg)}r=s,e.updateQueue=r,null!==r&&(e.flags|=4)}else{c=9===s.nodeType?s:s.ownerDocument,"http://www.w3.org/1999/xhtml"===t&&(t=tc(n)),"http://www.w3.org/1999/xhtml"===t?"script"===n?((t=c.createElement("div")).innerHTML="<script><\/script>",t=t.removeChild(t.firstChild)):"string"==typeof r.is?t=c.createElement(n,{is:r.is}):(t=c.createElement(n),"select"===n&&(c=t,r.multiple?c.multiple=!0:r.size&&(c.size=r.size))):t=c.createElementNS(t,n),t[rj]=e,t[rA]=r,i(t,e,!1,!1),e.stateNode=t;r:{switch(c=tw(n,r),n){case"dialog":rn("cancel",t),rn("close",t),s=r;break;case"iframe":case"object":case"embed":rn("load",t),s=r;break;case"video":case"audio":for(s=0;s<n9.length;s++)rn(n9[s],t);s=r;break;case"source":rn("error",t),s=r;break;case"img":case"image":case"link":rn("error",t),rn("load",t),s=r;break;case"details":rn("toggle",t),s=r;break;case"input":J(t,r),s=Q(t,r),rn("invalid",t);break;case"option":default:s=r;break;case"select":t._wrapperState={wasMultiple:!!r.multiple},s=G({},r,{value:void 0}),rn("invalid",t);break;case"textarea":tl(t,r),s=ta(t,r),rn("invalid",t)}for(u in tO(n,s),p=s)if(p.hasOwnProperty(u)){var d=p[u];"style"===u?tb(t,d):"dangerouslySetInnerHTML"===u?null!=(d=d?d.__html:void 0)&&td(t,d):"children"===u?"string"==typeof d?("textarea"!==n||""!==d)&&ty(t,d):"number"==typeof d&&ty(t,""+d):"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&"autoFocus"!==u&&(h.hasOwnProperty(u)?null!=d&&"onScroll"===u&&rn("scroll",t):null!=d&&M(t,u,d,c))}switch(n){case"input":X(t),tn(t,r,!1);break;case"textarea":X(t),tu(t);break;case"option":null!=r.value&&t.setAttribute("value",""+q(r.value));break;case"select":t.multiple=!!r.multiple,null!=(u=r.value)?to(t,!!r.multiple,u,!1):null!=r.defaultValue&&to(t,!!r.multiple,r.defaultValue,!0);break;default:"function"==typeof s.onClick&&(t.onclick=rg)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break r;case"img":r=!0;break r;default:r=!1}}r&&(e.flags|=4)}null!==e.ref&&(e.flags|=512,e.flags|=2097152)}return aT(e),null;case 6:if(t&&null!=e.stateNode)l(t,e,t.memoizedProps,r);else{if("string"!=typeof r&&null===e.stateNode)throw Error(f(166));if(n=oe(ot.current),oe(i9.current),ix(e)){if(r=e.stateNode,n=e.memoizedProps,r[rj]=e,(u=r.nodeValue!==n)&&null!==(t=ic))switch(t.tag){case 3:ry(r.nodeValue,n,0!=(1&t.mode));break;case 5:!0!==t.memoizedProps.suppressHydrationWarning&&ry(r.nodeValue,n,0!=(1&t.mode))}u&&(e.flags|=4)}else(r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[rj]=e,e.stateNode=r}return aT(e),null;case 13:if(r$(oa),r=e.memoizedState,null===t||null!==t.memoizedState&&null!==t.memoizedState.dehydrated){if(ih&&null!==ip&&0!=(1&e.mode)&&0==(128&e.flags))iO(),iw(),e.flags|=98560,u=!1;else if(u=ix(e),null!==r&&null!==r.dehydrated){if(null===t){if(!u)throw Error(f(318));if(!(u=null!==(u=e.memoizedState)?u.dehydrated:null))throw Error(f(317));u[rj]=e}else iw(),0==(128&e.flags)&&(e.memoizedState=null),e.flags|=4;aT(e),u=!1}else null!==id&&(l_(id),id=null),u=!0;if(!u)return 65536&e.flags?e:null}if(0!=(128&e.flags))return e.lanes=n,e;return(r=null!==r)!=(null!==t&&null!==t.memoizedState)&&r&&(e.child.flags|=8192,0!=(1&e.mode)&&(null===t||0!=(1&oa.current)?0===le&&(le=3):lR())),null!==e.updateQueue&&(e.flags|=4),aT(e),null;case 4:return or(),o(t,e),null===t&&ro(e.stateNode.containerInfo),aT(e),null;case 10:return iT(e.type._context),aT(e),null;case 19:if(r$(oa),null===(u=e.memoizedState))return aT(e),null;if(r=0!=(128&e.flags),null===(c=u.rendering)){if(r)aA(u,!1);else{if(0!==le||null!==t&&0!=(128&t.flags))for(t=e.child;null!==t;){if(null!==(c=ol(t))){for(e.flags|=128,aA(u,!1),null!==(r=c.updateQueue)&&(e.updateQueue=r,e.flags|=4),e.subtreeFlags=0,r=n,n=e.child;null!==n;)u=n,t=r,u.flags&=0xe00002,null===(c=u.alternate)?(u.childLanes=0,u.lanes=t,u.child=null,u.subtreeFlags=0,u.memoizedProps=null,u.memoizedState=null,u.updateQueue=null,u.dependencies=null,u.stateNode=null):(u.childLanes=c.childLanes,u.lanes=c.lanes,u.child=c.child,u.subtreeFlags=0,u.deletions=null,u.memoizedProps=c.memoizedProps,u.memoizedState=c.memoizedState,u.updateQueue=c.updateQueue,u.type=c.type,t=c.dependencies,u.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext}),n=n.sibling;return rG(oa,1&oa.current|2),e.child}t=t.sibling}null!==u.tail&&tJ()>lu&&(e.flags|=128,r=!0,aA(u,!1),e.lanes=4194304)}}else{if(!r){if(null!==(t=ol(c))){if(e.flags|=128,r=!0,null!==(n=t.updateQueue)&&(e.updateQueue=n,e.flags|=4),aA(u,!0),null===u.tail&&"hidden"===u.tailMode&&!c.alternate&&!ih)return aT(e),null}else 2*tJ()-u.renderingStartTime>lu&&0x40000000!==n&&(e.flags|=128,r=!0,aA(u,!1),e.lanes=4194304)}u.isBackwards?(c.sibling=e.child,e.child=c):(null!==(n=u.last)?n.sibling=c:e.child=c,u.last=c)}if(null!==u.tail)return e=u.tail,u.rendering=e,u.tail=e.sibling,u.renderingStartTime=tJ(),e.sibling=null,n=oa.current,rG(oa,r?1&n|2:1&n),e;return aT(e),null;case 22:case 23:return lC(),r=null!==e.memoizedState,null!==t&&null!==t.memoizedState!==r&&(e.flags|=8192),r&&0!=(1&e.mode)?0!=(0x40000000&a7)&&(aT(e),6&e.subtreeFlags&&(e.flags|=8192)):aT(e),null;case 24:case 25:return null}throw Error(f(156,e.tag))}(n,e,a7))){a8=n;return}}else{if(null!==(n=function(t,e){switch(iu(e),e.tag){case 1:return rX(e.type)&&rK(),65536&(t=e.flags)?(e.flags=-65537&t|128,e):null;case 3:return or(),r$(rU),r$(rH),ou(),0!=(65536&(t=e.flags))&&0==(128&t)?(e.flags=-65537&t|128,e):null;case 5:return oo(e),null;case 13:if(r$(oa),null!==(t=e.memoizedState)&&null!==t.dehydrated){if(null===e.alternate)throw Error(f(340));iw()}return 65536&(t=e.flags)?(e.flags=-65537&t|128,e):null;case 19:return r$(oa),null;case 4:return or(),null;case 10:return iT(e.type._context),null;case 22:case 23:return lC(),null;default:return null}}(n,e))){n.flags&=32767,a8=n;return}if(null!==t)t.flags|=32768,t.subtreeFlags=0,t.deletions=null;else{le=6,a8=null;return}}if(null!==(e=e.sibling)){a8=e;return}a8=e=t}while(null!==e);0===le&&(le=5)}function lB(t,e,n){var r=ec,i=a3.transition;try{a3.transition=null,ec=1,function(t,e,n,r){do lW();while(null!==ly);if(0!=(6&a4))throw Error(f(327));n=t.finishedWork;var i=t.finishedLanes;if(null===n)return;if(t.finishedWork=null,t.finishedLanes=0,n===t.current)throw Error(f(177));t.callbackNode=null,t.callbackPriority=0;var o=n.lanes|n.childLanes;if(!function(t,e){var n=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var r=t.eventTimes;for(t=t.expirationTimes;0<n;){var i=31-t9(n),o=1<<i;e[i]=0,r[i]=-1,t[i]=-1,n&=~o}}(t,o),t===a6&&(a8=a6=null,a9=0),0==(2064&n.subtreeFlags)&&0==(2064&n.flags)||ld||(ld=!0,lY(t5,function(){return lW(),null})),o=0!=(15990&n.flags),0!=(15990&n.subtreeFlags)||o){o=a3.transition,a3.transition=null;var a,l,s,u=ec;ec=1;var c=a4;a4|=4,a5.current=null,!function(t,e){if(rv=eI,nW(t=nB())){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else r:{var r=(n=(n=t.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(r&&0!==r.rangeCount){n=r.anchorNode;var i,o=r.anchorOffset,a=r.focusNode;r=r.focusOffset;try{n.nodeType,a.nodeType}catch(t){n=null;break r}var l=0,s=-1,u=-1,c=0,p=0,h=t,d=null;i:for(;;){for(;h!==n||0!==o&&3!==h.nodeType||(s=l+o),h!==a||0!==r&&3!==h.nodeType||(u=l+r),3===h.nodeType&&(l+=h.nodeValue.length),null!==(i=h.firstChild);){;d=h,h=i}for(;;){if(h===t)break i;if(d===n&&++c===o&&(s=l),d===a&&++p===r&&(u=l),null!==(i=h.nextSibling))break;d=(h=d).parentNode}h=i}n=-1===s||-1===u?null:{start:s,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(rm={focusedElem:t,selectionRange:n},eI=!1,aI=e;null!==aI;)if(t=(e=aI).child,0!=(1028&e.subtreeFlags)&&null!==t)t.return=e,aI=t;else for(;null!==aI;){e=aI;try{var y=e.alternate;if(0!=(1024&e.flags))switch(e.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==y){var g=y.memoizedProps,v=y.memoizedState,m=e.stateNode,b=m.getSnapshotBeforeUpdate(e.elementType===e.type?g:iM(e.type,g),v);m.__reactInternalSnapshotBeforeUpdate=b}break;case 3:var x=e.stateNode.containerInfo;1===x.nodeType?x.textContent="":9===x.nodeType&&x.documentElement&&x.removeChild(x.documentElement);break;default:throw Error(f(163))}}catch(t){lG(e,e.return,t)}if(null!==(t=e.sibling)){t.return=e.return,aI=t;break}aI=e.return}y=aF,aF=!1}(t,n),aK(n,t),!function(t){var e=nB(),n=t.focusedElem,r=t.selectionRange;if(e!==n&&n&&n.ownerDocument&&function t(e,n){return!!e&&!!n&&(e===n||(!e||3!==e.nodeType)&&(n&&3===n.nodeType?t(e,n.parentNode):"contains"in e?e.contains(n):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(n))))}(n.ownerDocument.documentElement,n)){if(null!==r&&nW(n)){if(e=r.start,void 0===(t=r.end)&&(t=e),"selectionStart"in n)n.selectionStart=e,n.selectionEnd=Math.min(t,n.value.length);else if((t=(e=n.ownerDocument||document)&&e.defaultView||window).getSelection){t=t.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=void 0===r.end?o:Math.min(r.end,i),!t.extend&&o>r&&(i=r,r=o,o=i),i=nz(n,o);var a=nz(n,r);i&&a&&(1!==t.rangeCount||t.anchorNode!==i.node||t.anchorOffset!==i.offset||t.focusNode!==a.node||t.focusOffset!==a.offset)&&((e=e.createRange()).setStart(i.node,i.offset),t.removeAllRanges(),o>r?(t.addRange(e),t.extend(a.node,a.offset)):(e.setEnd(a.node,a.offset),t.addRange(e)))}}for(e=[],t=n;t=t.parentNode;)1===t.nodeType&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for("function"==typeof n.focus&&n.focus(),n=0;n<e.length;n++)(t=e[n]).element.scrollLeft=t.left,t.element.scrollTop=t.top}}(rm),eI=!!rv,rm=rv=null,t.current=n,a=n,l=t,s=i,aI=a,function t(e,n,r){for(var i=0!=(1&e.mode);null!==aI;){var o=aI,a=o.child;if(22===o.tag&&i){var l=null!==o.memoizedState||aC;if(!l){var s=o.alternate,u=null!==s&&null!==s.memoizedState||aN;s=aC;var c=aN;if(aC=l,(aN=u)&&!c)for(aI=o;null!==aI;)u=(l=aI).child,22===l.tag&&null!==l.memoizedState?a0(o):null!==u?(u.return=l,aI=u):a0(o);for(;null!==a;)aI=a,t(a,n,r),a=a.sibling;aI=o,aC=s,aN=c}aQ(e,n,r)}else 0!=(8772&o.subtreeFlags)&&null!==a?(a.return=o,aI=a):aQ(e,n,r)}}(a,l,s),tQ(),a4=c,ec=u,a3.transition=o}else t.current=n;if(ld&&(ld=!1,ly=t,lg=i),0===(o=t.pendingLanes)&&(lh=null),!function(t){if(t8&&"function"==typeof t8.onCommitFiberRoot)try{t8.onCommitFiberRoot(t6,t,void 0,128==(128&t.current.flags))}catch(t){}}(n.stateNode,r),lk(t,tJ()),null!==e)for(r=t.onRecoverableError,n=0;n<e.length;n++)r((i=e[n]).value,{componentStack:i.stack,digest:i.digest});if(lf)throw lf=!1,t=lp,lp=null,t;0!=(1&lg)&&0!==t.tag&&lW(),0!=(1&(o=t.pendingLanes))?t===lm?lv++:(lv=0,lm=t):lv=0,r4()}(t,e,n,r)}finally{a3.transition=i,ec=r}return null}function lW(){if(null!==ly){var t=ef(lg),e=a3.transition,n=ec;try{if(a3.transition=null,ec=16>t?16:t,null===ly)var r=!1;else{if(t=ly,ly=null,lg=0,0!=(6&a4))throw Error(f(331));var i=a4;for(a4|=4,aI=t.current;null!==aI;){var o=aI,a=o.child;if(0!=(16&aI.flags)){var l=o.deletions;if(null!==l){for(var s=0;s<l.length;s++){var u=l[s];for(aI=u;null!==aI;){var c=aI;switch(c.tag){case 0:case 11:case 15:az(8,c,o)}var p=c.child;if(null!==p)p.return=c,aI=p;else for(;null!==aI;){var h=(c=aI).sibling,d=c.return;if(!function t(e){var n=e.alternate;null!==n&&(e.alternate=null,t(n)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&null!==(n=e.stateNode)&&(delete n[rj],delete n[rA],delete n[rC],delete n[rN],delete n[rL]),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}(c),c===u){aI=null;break}if(null!==h){h.return=d,aI=h;break}aI=d}}}var y=o.alternate;if(null!==y){var g=y.child;if(null!==g){y.child=null;do{var v=g.sibling;g.sibling=null,g=v}while(null!==g)}}aI=o}}if(0!=(2064&o.subtreeFlags)&&null!==a)a.return=o,aI=a;else for(;null!==aI;){if(o=aI,0!=(2048&o.flags))switch(o.tag){case 0:case 11:case 15:az(9,o,o.return)}var m=o.sibling;if(null!==m){m.return=o.return,aI=m;break}aI=o.return}}var b=t.current;for(aI=b;null!==aI;){var x=(a=aI).child;if(0!=(2064&a.subtreeFlags)&&null!==x)x.return=a,aI=x;else for(a=b;null!==aI;){if(l=aI,0!=(2048&l.flags))try{switch(l.tag){case 0:case 11:case 15:aB(9,l)}}catch(t){lG(l,l.return,t)}if(l===a){aI=null;break}var O=l.sibling;if(null!==O){O.return=l.return,aI=O;break}aI=l.return}}if(a4=i,r4(),t8&&"function"==typeof t8.onPostCommitFiberRoot)try{t8.onPostCommitFiberRoot(t6,t)}catch(t){}r=!0}return r}finally{ec=n,a3.transition=e}}return!1}function l$(t,e,n){e=an(t,e=o9(n,e),1),t=iG(t,e,1),e=lO(),null!==t&&(es(t,1,e),lk(t,e))}function lG(t,e,n){if(3===t.tag)l$(t,t,n);else for(;null!==e;){if(3===e.tag){l$(e,t,n);break}if(1===e.tag){var r=e.stateNode;if("function"==typeof e.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===lh||!lh.has(r))){t=ar(e,t=o9(n,t),1),e=iG(e,t,1),t=lO(),null!==e&&(es(e,1,t),lk(e,t));break}}e=e.return}}function lV(t,e,n){var r=t.pingCache;null!==r&&r.delete(e),e=lO(),t.pingedLanes|=t.suspendedLanes&n,a6===t&&(a9&n)===n&&(4===le||3===le&&(0x7c00000&a9)===a9&&500>tJ()-ls?lN(t,0):lo|=n),lk(t,e)}function lH(t,e){0===e&&(0==(1&t.mode)?e=1:(e=en,0==(0x7c00000&(en<<=1))&&(en=4194304)));var n=lO();null!==(t=iF(t,e))&&(es(t,e,n),lk(t,n))}function lU(t){var e=t.memoizedState,n=0;null!==e&&(n=e.retryLane),lH(t,n)}function lq(t,e){var n=0;switch(t.tag){case 13:var r=t.stateNode,i=t.memoizedState;null!==i&&(n=i.retryLane);break;case 19:r=t.stateNode;break;default:throw Error(f(314))}null!==r&&r.delete(e),lH(t,n)}function lY(t,e){return tX(t,e)}function lX(t,e,n,r){this.tag=t,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function lK(t,e,n,r){return new lX(t,e,n,r)}function lZ(t){return!(!(t=t.prototype)||!t.isReactComponent)}s=function(t,e,n){if(null!==t){if(t.memoizedProps!==e.pendingProps||rU.current)as=!0;else{if(0==(t.lanes&n)&&0==(128&e.flags))return as=!1,function(t,e,n){switch(e.tag){case 3:am(e),iw();break;case 5:oi(e);break;case 1:rX(e.type)&&rJ(e);break;case 4:on(e,e.stateNode.containerInfo);break;case 10:var r=e.type._context,i=e.memoizedProps.value;rG(iS,r._currentValue),r._currentValue=i;break;case 13:if(null!==(r=e.memoizedState)){if(null!==r.dehydrated)return rG(oa,1&oa.current),e.flags|=128,null;if(0!=(n&e.child.childLanes))return aw(t,e,n);return rG(oa,1&oa.current),null!==(t=aj(t,e,n))?t.sibling:null}rG(oa,1&oa.current);break;case 19:if(r=0!=(n&e.childLanes),0!=(128&t.flags)){if(r)return a_(t,e,n);e.flags|=128}if(null!==(i=e.memoizedState)&&(i.rendering=null,i.tail=null,i.lastEffect=null),rG(oa,oa.current),!r)return null;break;case 22:case 23:return e.lanes=0,ah(t,e,n)}return aj(t,e,n)}(t,e,n);as=0!=(131072&t.flags)}}else as=!1,ih&&0!=(1048576&e.flags)&&il(e,r7,e.index);switch(e.lanes=0,e.tag){case 2:var r=e.type;aP(t,e),t=e.pendingProps;var i=rY(e,rH.current);iN(e,n),i=ow(null,e,r,t,i,n);var o=oE();return e.flags|=1,"object"==typeof i&&null!==i&&"function"==typeof i.render&&void 0===i.$$typeof?(e.tag=1,e.memoizedState=null,e.updateQueue=null,rX(r)?(o=!0,rJ(e)):o=!1,e.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,iB(e),i.updater=iK,e.stateNode=i,i._reactInternals=e,i0(e,r,t,n),e=av(null,e,r,!0,o,n)):(e.tag=0,ih&&o&&is(e),au(null,e,i,n),e=e.child),e;case 16:r=e.elementType;r:{switch(aP(t,e),t=e.pendingProps,r=(i=r._init)(r._payload),e.type=r,i=e.tag=function(t){if("function"==typeof t)return lZ(t)?1:0;if(null!=t){if((t=t.$$typeof)===L)return 11;if(t===D)return 14}return 2}(r),t=iM(r,t),i){case 0:e=ay(null,e,r,t,n);break r;case 1:e=ag(null,e,r,t,n);break r;case 11:e=ac(null,e,r,t,n);break r;case 14:e=af(null,e,r,iM(r.type,t),n);break r}throw Error(f(306,r,""))}return e;case 0:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:iM(r,i),ay(t,e,r,i,n);case 1:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:iM(r,i),ag(t,e,r,i,n);case 3:r:{if(am(e),null===t)throw Error(f(387));r=e.pendingProps,i=(o=e.memoizedState).element,iW(t,e),iU(e,r,null,n);var a=e.memoizedState;if(r=a.element,o.isDehydrated){if(o={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},e.updateQueue.baseState=o,e.memoizedState=o,256&e.flags){i=o9(Error(f(423)),e),e=ab(t,e,r,n,i);break r}else if(r!==i){i=o9(Error(f(424)),e),e=ab(t,e,r,n,i);break r}else for(ip=rS(e.stateNode.containerInfo.firstChild),ic=e,ih=!0,id=null,n=i6(e,null,r,n),e.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(iw(),r===i){e=aj(t,e,n);break r}au(t,e,r,n)}e=e.child}return e;case 5:return oi(e),null===t&&im(e),r=e.type,i=e.pendingProps,o=null!==t?t.memoizedProps:null,a=i.children,rb(r,i)?a=null:null!==o&&rb(r,o)&&(e.flags|=32),ad(t,e),au(t,e,a,n),e.child;case 6:return null===t&&im(e),null;case 13:return aw(t,e,n);case 4:return on(e,e.stateNode.containerInfo),r=e.pendingProps,null===t?e.child=i4(e,null,r,n):au(t,e,r,n),e.child;case 11:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:iM(r,i),ac(t,e,r,i,n);case 7:return au(t,e,e.pendingProps,n),e.child;case 8:case 12:return au(t,e,e.pendingProps.children,n),e.child;case 10:r:{if(r=e.type._context,i=e.pendingProps,o=e.memoizedProps,a=i.value,rG(iS,r._currentValue),r._currentValue=a,null!==o){if(nR(o.value,a)){if(o.children===i.children&&!rU.current){e=aj(t,e,n);break r}}else for(null!==(o=e.child)&&(o.return=e);null!==o;){var l=o.dependencies;if(null!==l){a=o.child;for(var s=l.firstContext;null!==s;){if(s.context===r){if(1===o.tag){(s=i$(-1,n&-n)).tag=2;var u=o.updateQueue;if(null!==u){var c=(u=u.shared).pending;null===c?s.next=s:(s.next=c.next,c.next=s),u.pending=s}}o.lanes|=n,null!==(s=o.alternate)&&(s.lanes|=n),iC(o.return,n,e),l.lanes|=n;break}s=s.next}}else if(10===o.tag)a=o.type===e.type?null:o.child;else if(18===o.tag){if(null===(a=o.return))throw Error(f(341));a.lanes|=n,null!==(l=a.alternate)&&(l.lanes|=n),iC(a,n,e),a=o.sibling}else a=o.child;if(null!==a)a.return=o;else for(a=o;null!==a;){if(a===e){a=null;break}if(null!==(o=a.sibling)){o.return=a.return,a=o;break}a=a.return}o=a}}au(t,e,i.children,n),e=e.child}return e;case 9:return i=e.type,r=e.pendingProps.children,iN(e,n),r=r(i=iL(i)),e.flags|=1,au(t,e,r,n),e.child;case 14:return i=iM(r=e.type,e.pendingProps),i=iM(r.type,i),af(t,e,r,i,n);case 15:return ap(t,e,e.type,e.pendingProps,n);case 17:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:iM(r,i),aP(t,e),e.tag=1,rX(r)?(t=!0,rJ(e)):t=!1,iN(e,n),iQ(e,r,i),i0(e,r,i,n),av(null,e,r,!0,t,n);case 19:return a_(t,e,n);case 22:return ah(t,e,n)}throw Error(f(156,e.tag))};function lQ(t,e){var n=t.alternate;return null===n?((n=lK(t.tag,e,t.key,t.mode)).elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.type=t.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=0xe00000&t.flags,n.childLanes=t.childLanes,n.lanes=t.lanes,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n}function lJ(t,e,n,r,i,o){var a=2;if(r=t,"function"==typeof t)lZ(t)&&(a=1);else if("string"==typeof t)a=5;else r:switch(t){case j:return l0(n.children,i,o,e);case A:a=8,i|=8;break;case T:return(t=lK(12,n,e,2|i)).elementType=T,t.lanes=o,t;case I:return(t=lK(13,n,e,i)).elementType=I,t.lanes=o,t;case R:return(t=lK(19,n,e,i)).elementType=R,t.lanes=o,t;case z:return l1(n,i,o,e);default:if("object"==typeof t&&null!==t)switch(t.$$typeof){case C:a=10;break r;case N:a=9;break r;case L:a=11;break r;case D:a=14;break r;case F:a=16,r=null;break r}throw Error(f(130,null==t?t:typeof t,""))}return(e=lK(a,n,e,i)).elementType=t,e.type=r,e.lanes=o,e}function l0(t,e,n,r){return(t=lK(7,t,r,e)).lanes=n,t}function l1(t,e,n,r){return(t=lK(22,t,r,e)).elementType=z,t.lanes=n,t.stateNode={isHidden:!1},t}function l2(t,e,n){return(t=lK(6,t,null,e)).lanes=n,t}function l5(t,e,n){return(e=lK(4,null!==t.children?t.children:[],t.key,e)).lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function l3(t,e,n,r,i){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=el(0),this.expirationTimes=el(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=el(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function l4(t,e,n,r,i,o,a,l,s){return t=new l3(t,e,n,l,s),1===e?(e=1,!0===o&&(e|=8)):e=0,o=lK(3,null,null,e),t.current=o,o.stateNode=t,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},iB(o),t}function l6(t){if(!t)return rV;t=t._reactInternals;r:{if(tH(t)!==t||1!==t.tag)throw Error(f(170));var e=t;do{switch(e.tag){case 3:e=e.stateNode.context;break r;case 1:if(rX(e.type)){e=e.stateNode.__reactInternalMemoizedMergedChildContext;break r}}e=e.return}while(null!==e);throw Error(f(171))}if(1===t.tag){var n=t.type;if(rX(n))return rQ(t,n,e)}return e}function l8(t,e,n,r,i,o,a,l,s){return(t=l4(n,r,!0,t,i,o,a,l,s)).context=l6(null),n=t.current,r=lO(),(o=i$(r,i=lw(n))).callback=null!=e?e:null,iG(n,o,i),t.current.lanes=i,es(t,i,r),lk(t,r),t}function l9(t,e,n,r){var i=e.current,o=lO(),a=lw(i);return n=l6(n),null===e.context?e.context=n:e.pendingContext=n,(e=i$(o,a)).payload={element:t},null!==(r=void 0===r?null:r)&&(e.callback=r),null!==(t=iG(i,e,a))&&(lE(t,i,a,o),iV(t,i,a)),a}function l7(t){return(t=t.current).child?(t.child.tag,t.child.stateNode):null}function st(t,e){if(null!==(t=t.memoizedState)&&null!==t.dehydrated){var n=t.retryLane;t.retryLane=0!==n&&n<e?n:e}}function se(t,e){st(t,e),(t=t.alternate)&&st(t,e)}var sn="function"==typeof reportError?reportError:function(t){console.error(t)};function sr(t){this._internalRoot=t}function si(t){this._internalRoot=t}function so(t){return!(!t||1!==t.nodeType&&9!==t.nodeType&&11!==t.nodeType)}function sa(t){return!(!t||1!==t.nodeType&&9!==t.nodeType&&11!==t.nodeType&&(8!==t.nodeType||" react-mount-point-unstable "!==t.nodeValue))}function sl(){}si.prototype.render=sr.prototype.render=function(t){var e=this._internalRoot;if(null===e)throw Error(f(409));l9(t,e,null,null)},si.prototype.unmount=sr.prototype.unmount=function(){var t=this._internalRoot;if(null!==t){this._internalRoot=null;var e=t.containerInfo;lT(function(){l9(null,t,null,null)}),e[rT]=null}},si.prototype.unstable_scheduleHydration=function(t){if(t){var e=ey();t={blockedOn:null,target:t,priority:e};for(var n=0;n<ek.length&&0!==e&&e<ek[n].priority;n++);ek.splice(n,0,t),0===n&&eP(t)}};function ss(t,e,n,r,i){var o=n._reactRootContainer;if(o){var a=o;if("function"==typeof i){var l=i;i=function(){var t=l7(a);l.call(t)}}l9(e,a,t,i)}else a=function(t,e,n,r,i){if(i){if("function"==typeof r){var o=r;r=function(){var t=l7(a);o.call(t)}}var a=l8(e,r,t,0,null,!1,!1,"",sl);return t._reactRootContainer=a,t[rT]=a.current,ro(8===t.nodeType?t.parentNode:t),lT(),a}for(;i=t.lastChild;)t.removeChild(i);if("function"==typeof r){var l=r;r=function(){var t=l7(s);l.call(t)}}var s=l4(t,0,!1,null,null,!1,!1,"",sl);return t._reactRootContainer=s,t[rT]=s.current,ro(8===t.nodeType?t.parentNode:t),lT(function(){l9(e,s,n,r)}),s}(n,e,t,i,r);return l7(a)}ep=function(t){switch(t.tag){case 3:var e=t.stateNode;if(e.current.memoizedState.isDehydrated){var n=er(e.pendingLanes);0!==n&&(eu(e,1|n),lk(e,tJ()),0==(6&a4)&&(lu=tJ()+500,r4()))}break;case 13:lT(function(){var e=iF(t,1);null!==e&&lE(e,t,1,lO())}),se(t,1)}},eh=function(t){if(13===t.tag){var e=iF(t,0x8000000);null!==e&&lE(e,t,0x8000000,lO()),se(t,0x8000000)}},ed=function(t){if(13===t.tag){var e=lw(t),n=iF(t,e);null!==n&&lE(n,t,e,lO()),se(t,e)}},ey=function(){return ec},eg=function(t,e){var n=ec;try{return ec=t,e()}finally{ec=n}},tM=function(t,e,n){switch(e){case"input":if(te(t,n),e=n.name,"radio"===n.type&&null!=e){for(n=t;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+e)+'][type="radio"]'),e=0;e<n.length;e++){var r=n[e];if(r!==t&&r.form===t.form){var i=rF(r);if(!i)throw Error(f(90));K(r),te(r,i)}}}break;case"textarea":ts(t,n);break;case"select":null!=(e=n.value)&&to(t,!!n.multiple,e,!1)}},tT=lA,tC=lT;var su={findFiberByHostInstance:rI,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},sc={bundleType:su.bundleType,version:su.version,rendererPackageName:su.rendererPackageName,rendererConfig:su.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:S.ReactCurrentDispatcher,findHostInstanceByFiber:function(t){return null===(t=tY(t))?null:t.stateNode},findFiberByHostInstance:su.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var sf=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!sf.isDisabled&&sf.supportsFiber)try{t6=sf.inject(sc),t8=sf}catch(t){}}e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED={usingClientEntryPoint:!1,Events:[rR,rD,rF,tj,tA,lA]},e.createPortal=function(t,e){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!so(e))throw Error(f(200));return function(t,e,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:P,key:null==r?null:""+r,children:t,containerInfo:e,implementation:n}}(t,e,null,n)},e.createRoot=function(t,e){if(!so(t))throw Error(f(299));var n=!1,r="",i=sn;return null!=e&&(!0===e.unstable_strictMode&&(n=!0),void 0!==e.identifierPrefix&&(r=e.identifierPrefix),void 0!==e.onRecoverableError&&(i=e.onRecoverableError)),e=l4(t,1,!1,null,null,n,!1,r,i),t[rT]=e.current,ro(8===t.nodeType?t.parentNode:t),new sr(e)},e.findDOMNode=function(t){if(null==t)return null;if(1===t.nodeType)return t;var e=t._reactInternals;if(void 0===e){if("function"==typeof t.render)throw Error(f(188));throw Error(f(268,t=Object.keys(t).join(",")))}return t=null===(t=tY(e))?null:t.stateNode},e.flushSync=function(t){return lT(t)},e.hydrate=function(t,e,n){if(!sa(e))throw Error(f(200));return ss(null,t,e,!0,n)},e.hydrateRoot=function(t,e,n){if(!so(t))throw Error(f(405));var r=null!=n&&n.hydratedSources||null,i=!1,o="",a=sn;if(null!=n&&(!0===n.unstable_strictMode&&(i=!0),void 0!==n.identifierPrefix&&(o=n.identifierPrefix),void 0!==n.onRecoverableError&&(a=n.onRecoverableError)),e=l8(e,null,t,1,null!=n?n:null,i,!1,o,a),t[rT]=e.current,ro(t),r)for(t=0;t<r.length;t++)i=(i=(n=r[t])._getVersion)(n._source),null==e.mutableSourceEagerHydrationData?e.mutableSourceEagerHydrationData=[n,i]:e.mutableSourceEagerHydrationData.push(n,i);return new si(e)},e.render=function(t,e,n){if(!sa(e))throw Error(f(200));return ss(null,t,e,!1,n)},e.unmountComponentAtNode=function(t){if(!sa(t))throw Error(f(40));return!!t._reactRootContainer&&(lT(function(){ss(null,null,t,!1,function(){t._reactRootContainer=null,t[rT]=null})}),!0)},e.unstable_batchedUpdates=lA,e.unstable_renderSubtreeIntoContainer=function(t,e,n,r){if(!sa(n))throw Error(f(200));if(null==t||void 0===t._reactInternals)throw Error(f(38));return ss(t,e,n,!1,r)},e.version="18.2.0-next-9e3b772b8-20220608"},350:function(t,e,n){"use strict";!function t(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(t){console.error(t)}}(),t.exports=n(590)},392:function(t,e){"use strict";function n(t,e){var n=t.length;for(t.push(e);0<n;){var r=n-1>>>1,i=t[r];if(0<o(i,e))t[r]=e,t[n]=i,n=r;else break}}function r(t){return 0===t.length?null:t[0]}function i(t){if(0===t.length)return null;var e=t[0],n=t.pop();if(n!==e){t[0]=n;for(var r=0,i=t.length,a=i>>>1;r<a;){var l=2*(r+1)-1,s=t[l],u=l+1,c=t[u];if(0>o(s,n))u<i&&0>o(c,s)?(t[r]=c,t[u]=n,r=u):(t[r]=s,t[l]=n,r=l);else if(u<i&&0>o(c,n))t[r]=c,t[u]=n,r=u;else break}}return e}function o(t,e){var n=t.sortIndex-e.sortIndex;return 0!==n?n:t.id-e.id}if("object"==typeof performance&&"function"==typeof performance.now){var a,l=performance;e.unstable_now=function(){return l.now()}}else{var s=Date,u=s.now();e.unstable_now=function(){return s.now()-u}}var c=[],f=[],p=1,h=null,d=3,y=!1,g=!1,v=!1,m="function"==typeof setTimeout?setTimeout:null,b="function"==typeof clearTimeout?clearTimeout:null,x="undefined"!=typeof setImmediate?setImmediate:null;function O(t){for(var e=r(f);null!==e;){if(null===e.callback)i(f);else if(e.startTime<=t)i(f),e.sortIndex=e.expirationTime,n(c,e);else break;e=r(f)}}function w(t){if(v=!1,O(t),!g){if(null!==r(c))g=!0,N(E);else{var e=r(f);null!==e&&L(w,e.startTime-t)}}}function E(t,n){g=!1,v&&(v=!1,b(S),S=-1),y=!0;var o=d;try{for(O(n),h=r(c);null!==h&&(!(h.expirationTime>n)||t&&!j());){var a=h.callback;if("function"==typeof a){h.callback=null,d=h.priorityLevel;var l=a(h.expirationTime<=n);n=e.unstable_now(),"function"==typeof l?h.callback=l:h===r(c)&&i(c),O(n)}else i(c);h=r(c)}if(null!==h)var s=!0;else{var u=r(f);null!==u&&L(w,u.startTime-n),s=!1}return s}finally{h=null,d=o,y=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var k=!1,M=null,S=-1,_=5,P=-1;function j(){return!(e.unstable_now()-P<_)}function A(){if(null!==M){var t=e.unstable_now();P=t;var n=!0;try{n=M(!0,t)}finally{n?a():(k=!1,M=null)}}else k=!1}if("function"==typeof x)a=function(){x(A)};else if("undefined"!=typeof MessageChannel){var T=new MessageChannel,C=T.port2;T.port1.onmessage=A,a=function(){C.postMessage(null)}}else a=function(){m(A,0)};function N(t){M=t,k||(k=!0,a())}function L(t,n){S=m(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(t){t.callback=null},e.unstable_continueExecution=function(){g||y||(g=!0,N(E))},e.unstable_forceFrameRate=function(t){0>t||125<t?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):_=0<t?Math.floor(1e3/t):5},e.unstable_getCurrentPriorityLevel=function(){return d},e.unstable_getFirstCallbackNode=function(){return r(c)},e.unstable_next=function(t){switch(d){case 1:case 2:case 3:var e=3;break;default:e=d}var n=d;d=e;try{return t()}finally{d=n}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(t,e){switch(t){case 1:case 2:case 3:case 4:case 5:break;default:t=3}var n=d;d=t;try{return e()}finally{d=n}},e.unstable_scheduleCallback=function(t,i,o){var a=e.unstable_now();switch(o="object"==typeof o&&null!==o?"number"==typeof(o=o.delay)&&0<o?a+o:a:a,t){case 1:var l=-1;break;case 2:l=250;break;case 5:l=0x3fffffff;break;case 4:l=1e4;break;default:l=5e3}return l=o+l,t={id:p++,callback:i,priorityLevel:t,startTime:o,expirationTime:l,sortIndex:-1},o>a?(t.sortIndex=o,n(f,t),null===r(c)&&t===r(f)&&(v?(b(S),S=-1):v=!0,L(w,o-a))):(t.sortIndex=l,n(c,t),g||y||(g=!0,N(E))),t},e.unstable_shouldYield=j,e.unstable_wrapCallback=function(t){var e=d;return function(){var n=d;d=e;try{return t.apply(this,arguments)}finally{d=n}}}},881:function(t,e,n){"use strict";t.exports=n(392)},544:function(t,e,n){"use strict";var r=n(795),i=Array.prototype.concat,o=Array.prototype.slice,a=t.exports=function(t){for(var e=[],n=0,a=t.length;n<a;n++){var l=t[n];r(l)?e=i.call(e,o.call(l)):e.push(l)}return e};a.wrap=function(t){return function(){return t(a(arguments))}}},795:function(t){t.exports=function(t){return!!t&&"string"!=typeof t&&(t instanceof Array||Array.isArray(t)||t.length>=0&&(t.splice instanceof Function||Object.getOwnPropertyDescriptor(t,t.length-1)&&"String"!==t.constructor.name))}}}]);