@nocobase/plugin-data-visualization 2.0.22 → 2.1.0-alpha.10
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.
- package/dist/client/7205d6794142e7fc.js +47 -0
- package/dist/client/8e54c831d0af7a4e.js +10 -0
- package/dist/client/9d5719c8f8ecdabe.js +10 -0
- package/dist/client/f5cb6a049896c3e6.js +10 -0
- package/dist/client/index.js +1 -1
- package/dist/externalVersion.js +10 -10
- package/dist/node_modules/koa-compose/package.json +1 -1
- package/dist/node_modules/moment-timezone/package.json +1 -1
- package/package.json +2 -2
- package/dist/client/3c52bf9434fd3260.js +0 -47
- package/dist/client/3f66fc107a17e7ea.js +0 -10
- package/dist/client/8795975cb8946be4.js +0 -10
- package/dist/client/924c5f5607998e1c.js +0 -10
|
@@ -0,0 +1,47 @@
|
|
|
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([["102"],{4709:function(t,e,n){"use strict";let r,i,o,a;n.r(e),n.d(e,{Column:function(){return GA},Line:function(){return GR},Rose:function(){return GK},Radar:function(){return G$},Scatter:function(){return GB},Box:function(){return G3},BidirectionalBar:function(){return Hg},Area:function(){return G_},WordCloud:function(){return Ha},Waterfall:function(){return GQ},Venn:function(){return Hv},Base:function(){return Gk},Sunburst:function(){return Hw},Sankey:function(){return G6},Tiny:function(){return GY},CirclePacking:function(){return Hp},Violin:function(){return Hd},Pie:function(){return GF},DualAxes:function(){return GC},Gauge:function(){return Hn},Histogram:function(){return G0},Bar:function(){return GP},Treemap:function(){return Hs},G2:function(){return tO},Stock:function(){return G9},Heatmap:function(){return G2},Mix:function(){return Hx},measureTextWidth:function(){return Hk},Bullet:function(){return Ht},RadialBar:function(){return Hc},Funnel:function(){return GL},Liquid:function(){return Hi}});var l,s,u,c,f,p,h,d,y,g,v,b,x,O,w,E,k,M,_,S,P,j,A,T,C,N,L,I,R,D,F,z,B,W,$,G,H,V,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={};n.r(tg),n.d(tg,{add:function(){return nj},adjoint:function(){return e3},clone:function(){return eZ},copy:function(){return eQ},create:function(){return eK},determinant:function(){return e4},equals:function(){return nL},exactEquals:function(){return nN},frob:function(){return nP},fromQuat:function(){return ng},fromQuat2:function(){return nc},fromRotation:function(){return no},fromRotationTranslation:function(){return nu},fromRotationTranslationScale:function(){return nd},fromRotationTranslationScaleOrigin:function(){return ny},fromScaling:function(){return ni},fromTranslation:function(){return nr},fromValues:function(){return eJ},fromXRotation:function(){return na},fromYRotation:function(){return nl},fromZRotation:function(){return ns},frustum:function(){return nm},getRotation:function(){return nh},getScaling:function(){return np},getTranslation:function(){return nf},identity:function(){return e1},invert:function(){return e5},lookAt:function(){return nM},mul:function(){return nI},multiply:function(){return e6},multiplyScalar:function(){return nT},multiplyScalarAndAdd:function(){return nC},ortho:function(){return nE},orthoNO:function(){return nw},orthoZO:function(){return nk},perspective:function(){return nb},perspectiveFromFieldOfView:function(){return nO},perspectiveNO:function(){return nv},perspectiveZO:function(){return nx},rotate:function(){return e7},rotateX:function(){return nt},rotateY:function(){return ne},rotateZ:function(){return nn},scale:function(){return e9},set:function(){return e0},str:function(){return nS},sub:function(){return nR},subtract:function(){return nA},targetTo:function(){return n_},translate:function(){return e8},transpose:function(){return e2}});var tm={};n.r(tm),n.d(tm,{frequency:function(){return S4},id:function(){return S6},name:function(){return S8},weight:function(){return S3}});var tv={};n.r(tv),n.d(tv,{geoAlbers:function(){return Ac},geoAlbersUsa:function(){return Af},geoAzimuthalEqualArea:function(){return Ay},geoAzimuthalEqualAreaRaw:function(){return Ad},geoAzimuthalEquidistant:function(){return Am},geoAzimuthalEquidistantRaw:function(){return Ag},geoConicConformal:function(){return AE},geoConicConformalRaw:function(){return Aw},geoConicEqualArea:function(){return Au},geoConicEqualAreaRaw:function(){return As},geoConicEquidistant:function(){return AS},geoConicEquidistantRaw:function(){return A_},geoEqualEarth:function(){return AA},geoEqualEarthRaw:function(){return Aj},geoEquirectangular:function(){return AM},geoEquirectangularRaw:function(){return Ak},geoGnomonic:function(){return AC},geoGnomonicRaw:function(){return AT},geoIdentity:function(){return AN},geoMercator:function(){return Ab},geoMercatorRaw:function(){return Av},geoNaturalEarth1:function(){return AI},geoNaturalEarth1Raw:function(){return AL},geoOrthographic:function(){return AD},geoOrthographicRaw:function(){return AR},geoProjection:function(){return Ao},geoProjectionMutator:function(){return Aa},geoStereographic:function(){return Az},geoStereographicRaw:function(){return AF},geoTransverseMercator:function(){return AW},geoTransverseMercatorRaw:function(){return AB}});var tb={};n.r(tb),n.d(tb,{area:function(){return T4},bottom:function(){return Cn},bottomLeft:function(){return Cn},bottomRight:function(){return Cn},inside:function(){return Cn},left:function(){return Cn},outside:function(){return Ca},right:function(){return Cn},spider:function(){return Cs},surround:function(){return Cc},top:function(){return Cn},topLeft:function(){return Cn},topRight:function(){return Cn}});var tx={};n.r(tx),n.d(tx,{interpolateBlues:function(){return N0},interpolateBrBG:function(){return Np},interpolateBuGn:function(){return NA},interpolateBuPu:function(){return NC},interpolateCividis:function(){return Le},interpolateCool:function(){return Lf},interpolateCubehelixDefault:function(){return Lu},interpolateGnBu:function(){return NL},interpolateGreens:function(){return N2},interpolateGreys:function(){return N3},interpolateInferno:function(){return Lw},interpolateMagma:function(){return LO},interpolateOrRd:function(){return NR},interpolateOranges:function(){return Lt},interpolatePRGn:function(){return Nd},interpolatePiYG:function(){return Ng},interpolatePlasma:function(){return LE},interpolatePuBu:function(){return NB},interpolatePuBuGn:function(){return NF},interpolatePuOr:function(){return Nv},interpolatePuRd:function(){return N$},interpolatePurples:function(){return N6},interpolateRainbow:function(){return Lh},interpolateRdBu:function(){return Nx},interpolateRdGy:function(){return Nw},interpolateRdPu:function(){return NH},interpolateRdYlBu:function(){return Nk},interpolateRdYlGn:function(){return N_},interpolateReds:function(){return N9},interpolateSinebow:function(){return Lm},interpolateSpectral:function(){return NP},interpolateTurbo:function(){return Lv},interpolateViridis:function(){return Lx},interpolateWarm:function(){return Lc},interpolateYlGn:function(){return NY},interpolateYlGnBu:function(){return NU},interpolateYlOrBr:function(){return NK},interpolateYlOrRd:function(){return NQ},schemeAccent:function(){return CM},schemeBlues:function(){return NJ},schemeBrBG:function(){return Nf},schemeBuGn:function(){return Nj},schemeBuPu:function(){return NT},schemeCategory10:function(){return Ck},schemeDark2:function(){return C_},schemeGnBu:function(){return NN},schemeGreens:function(){return N1},schemeGreys:function(){return N5},schemeObservable10:function(){return CS},schemeOrRd:function(){return NI},schemeOranges:function(){return N7},schemePRGn:function(){return Nh},schemePaired:function(){return CP},schemePastel1:function(){return Cj},schemePastel2:function(){return CA},schemePiYG:function(){return Ny},schemePuBu:function(){return Nz},schemePuBuGn:function(){return ND},schemePuOr:function(){return Nm},schemePuRd:function(){return NW},schemePurples:function(){return N4},schemeRdBu:function(){return Nb},schemeRdGy:function(){return NO},schemeRdPu:function(){return NG},schemeRdYlBu:function(){return NE},schemeRdYlGn:function(){return NM},schemeReds:function(){return N8},schemeSet1:function(){return CT},schemeSet2:function(){return CC},schemeSet3:function(){return CN},schemeSpectral:function(){return NS},schemeTableau10:function(){return CL},schemeYlGn:function(){return Nq},schemeYlGnBu:function(){return NV},schemeYlOrBr:function(){return NX},schemeYlOrRd:function(){return NZ}});var tO={};n.r(tO),n.d(tO,{AREA_CLASS_NAME:function(){return"area"},Academy:function(){return yB},Bin:function(){return EA},BinX:function(){return ET},COMPONENT_CLASS_NAME:function(){return xt},Chart:function(){return IJ},ChartEvent:function(){return xG},Classic:function(){return yI},ClassicDark:function(){return yF},Dark:function(){return yD},DiffY:function(){return EB},DodgeX:function(){return EN},ELEMENT_CLASS_NAME:function(){return b7},Filter:function(){return kr},FlexX:function(){return E7},Group:function(){return E0},GroupColor:function(){return E5},GroupX:function(){return E1},GroupY:function(){return E2},Jitter:function(){return EI},JitterX:function(){return ER},JitterY:function(){return ED},LABEL_CLASS_NAME:function(){return"label"},LABEL_LAYER_CLASS_NAME:function(){return b9},Light:function(){return yL},LinearAxis:function(){return mN},MAIN_LAYER_CLASS_NAME:function(){return b8},MASK_CLASS_NAME:function(){return"mask"},MaybeDefaultX:function(){return hQ},MaybeDefaultY:function(){return h1},MaybeFunctionAttribute:function(){return dn},MaybeGradient:function(){return fE},MaybeIdentityX:function(){return ho},MaybeIdentityY:function(){return hi},MaybeKey:function(){return cN},MaybeSeries:function(){return fk},MaybeSize:function(){return pd},MaybeStackY:function(){return IZ},MaybeTitle:function(){return cA},MaybeTooltip:function(){return cT},MaybeTuple:function(){return pY},MaybeTupleX:function(){return hD},MaybeTupleY:function(){return hB},MaybeVisualPosition:function(){return pK},MaybeZeroPadding:function(){return pJ},MaybeZeroX:function(){return tK},MaybeZeroY:function(){return ph},MaybeZeroY1:function(){return tX},MaybeZeroZ:function(){return IQ},NormalizeY:function(){return EG},PLOT_CLASS_NAME:function(){return"plot"},Pack:function(){return kt},Runtime:function(){return IX},Sample:function(){return kn},Select:function(){return EY},SelectX:function(){return EK},SelectY:function(){return EQ},Selection:function(){return up},SortColor:function(){return E9},SortX:function(){return E6},SortY:function(){return E8},StackEnter:function(){return EW},StackY:function(){return En},SymmetryY:function(){return Ez},VIEW_CLASS_NAME:function(){return"view"},corelib:function(){return kz},extend:function(){return AK},geolib:function(){return AY},graphlib:function(){return Pf},plotlib:function(){return MA},register:function(){return IU},render:function(){return I_},renderToMountedElement:function(){return IS},select:function(){return uf},stdlib:function(){return AX}});let tw=()=>[["cartesian"]];tw.props={};let tE=(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}))},tk=t=>{let{startAngle:e,endAngle:n,innerRadius:r,outerRadius:i}=tE(t);return[["translate",0,.5],["reflect.y"],["translate",0,-.5],["polar",e,n,r,i]]};tk.props={};let tM=()=>[["transpose"],["translate",.5,.5],["reflect.x"],["translate",-.5,-.5]];tM.props={transform:!0};let t_=t=>{let{startAngle:e,endAngle:n,innerRadius:r,outerRadius:i}=((t={})=>Object.assign(Object.assign({},{startAngle:-Math.PI/2,endAngle:3*Math.PI/2,innerRadius:0,outerRadius:1}),t))(t);return[...tM(),...tk({startAngle:e,endAngle:n,innerRadius:r,outerRadius:i})]};t_.props={};let tS=()=>[["parallel",0,1,0,1]];tS.props={};let tP=({focusX:t=0,focusY:e=0,distortionX:n=2,distortionY:r=2,visual:i=!1})=>[["fisheye",t,e,n,r,i]];tP.props={transform:!0};let tj=(t={})=>Object.assign(Object.assign({},{startAngle:-Math.PI/2,endAngle:3*Math.PI/2,innerRadius:0,outerRadius:1}),t),tA=t=>{let{startAngle:e,endAngle:n,innerRadius:r,outerRadius:i}=tj(t);return[["transpose"],["translate",.5,.5],["reflect"],["translate",-.5,-.5],...tk({startAngle:e,endAngle:n,innerRadius:r,outerRadius:i})]};tA.props={};let tT=t=>{let{startAngle:e=-Math.PI/2,endAngle:n=3*Math.PI/2,innerRadius:r=0,outerRadius:i=1}=t;return[...tS(),...tk({startAngle:e,endAngle:n,innerRadius:r,outerRadius:i})]};tT.props={};let tC=({value:t})=>e=>e.map(()=>t);tC.props={};let tN=({value:t})=>e=>e.map(e=>e[t]);tN.props={};let tL=({value:t})=>e=>e.map(t);tL.props={};let tI=({value:t})=>()=>t;tI.props={};var tR={}.toString,tD=function(t,e){return tR.call(t)==="[object "+e+"]"},tF=function(t){return Array.isArray?Array.isArray(t):tD(t,"Array")},tz=function(t){return"object"==typeof t&&null!==t},tB=function(t){if(!tz(t)||!tD(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},tW=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&&tB(a)?(tB(e[o])||(e[o]={}),r<i?t(e[o],a,r+1,i):e[o]=n[o]):tF(a)?(e[o]=[],e[o]=e[o].concat(a)):void 0!==a&&(e[o]=a)}}(t,e[r]);return t};function t$(t,e){if(null!==t)return{type:"column",value:t,field:e}}function tG(t,e){return Object.assign(Object.assign({},t$(t,e)),{inferred:!0})}function tH(t,e){if(null!==t)return{type:"column",value:t,field:e,visual:!0}}function tV(t,e){let n=[];for(let r of t)n[r]=e;return n}function tU(t,e){let n=t[e];if(!n)return[null,null];let{value:r,field:i=null}=n;return[r,i]}function tq(t,...e){for(let n of e)if("string"!=typeof n)return[n,null];else{let[e,r]=tU(t,n);if(null!==e)return[e,r]}return[null,null]}function tY(t){return!(t instanceof Date)&&"object"==typeof t}let tX=()=>(t,e)=>{let{encode:n}=e,{y1:r}=n;return void 0!==r?[t,e]:[t,tW({},e,{encode:{y1:tG(tV(t,0))}})]};tX.props={};let tK=()=>(t,e)=>{let{encode:n}=e,{x:r}=n;return void 0!==r?[t,e]:[t,tW({},e,{encode:{x:tG(tV(t,0))},scale:{x:{guide:null}}})]};function tZ(t){return function(){return t}}tK.props={};let tQ=Math.abs,tJ=Math.atan2,t0=Math.cos,t1=Math.max,t2=Math.min,t5=Math.sin,t3=Math.sqrt,t4=Math.PI,t6=t4/2,t8=2*t4;function t9(t){return t>=1?t6:t<=-1?-t6:Math.asin(t)}let t7=Math.PI,et=2*t7,ee=et-1e-6;function en(t){this._+=t[0];for(let e=1,n=t.length;e<n;++e)this._+=arguments[e]+t[e]}class er{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==t?en:function(t){let e=Math.floor(t);if(!(e>=0))throw Error(`invalid digits: ${t}`);if(e>15)return en;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*=1,e*=1,n*=1,r*=1,(i*=1)<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((t7-Math.acos((d+f-(p*p+h*h))/(2*y*g)))/2),b=v/g,x=v/y;Math.abs(b-1)>1e-6&&this._append`L${t+b*u},${e+b*c}`,this._append`A${i},${i},0,0,${+(c*p>u*h)},${this._x1=t+x*l},${this._y1=e+x*s}`}else this._append`L${this._x1=t},${this._y1=e}`}arc(t,e,n,r,i,o){if(t*=1,e*=1,n*=1,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%et+et),f>ee?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>=t7)},${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*=1}v${+r}h${-n}Z`}toString(){return this._}}function ei(){return new er}function eo(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 er(e)}function ea(t){return t.innerRadius}function el(t){return t.outerRadius}function es(t){return t.startAngle}function eu(t){return t.endAngle}function ec(t){return t&&t.padAngle}function ef(t,e,n,r,i,o,a){var l=t-n,s=e-r,u=(a?o:-o)/t3(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,b=d-p,x=y-h,O=b*b+x*x,w=i-o,E=p*y-d*h,k=(x<0?-1:1)*t3(t1(0,w*w*O-E*E)),M=(E*x-b*k)/O,_=(-E*b-x*k)/O,S=(E*x+b*k)/O,P=(-E*b+x*k)/O,j=M-g,A=_-v,T=S-g,C=P-v;return j*j+A*A>T*T+C*C&&(M=S,_=P),{cx:M,cy:_,x01:-c,y01:-f,x11:M*(i/w-1),y11:_*(i/w-1)}}function ep(){var t=ea,e=el,n=tZ(0),r=null,i=es,o=eu,a=ec,l=null,s=eo(u);function u(){var u,c,f=+t.apply(this,arguments),p=+e.apply(this,arguments),h=i.apply(this,arguments)-t6,d=o.apply(this,arguments)-t6,y=tQ(d-h),g=d>h;if(l||(l=u=s()),p<f&&(c=p,p=f,f=c),p>1e-12)if(y>t8-1e-12)l.moveTo(p*t0(h),p*t5(h)),l.arc(0,0,p,h,d,!g),f>1e-12&&(l.moveTo(f*t0(d),f*t5(d)),l.arc(0,0,f,d,h,g));else{var v,b,x=h,O=d,w=h,E=d,k=y,M=y,_=a.apply(this,arguments)/2,S=_>1e-12&&(r?+r.apply(this,arguments):t3(f*f+p*p)),P=t2(tQ(p-f)/2,+n.apply(this,arguments)),j=P,A=P;if(S>1e-12){var T=t9(S/f*t5(_)),C=t9(S/p*t5(_));(k-=2*T)>1e-12?(T*=g?1:-1,w+=T,E-=T):(k=0,w=E=(h+d)/2),(M-=2*C)>1e-12?(C*=g?1:-1,x+=C,O-=C):(M=0,x=O=(h+d)/2)}var N=p*t0(x),L=p*t5(x),I=f*t0(E),R=f*t5(E);if(P>1e-12){var D,F=p*t0(O),z=p*t5(O),B=f*t0(w),W=f*t5(w);if(y<t4)if(D=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]}(N,L,B,W,F,z,I,R)){var $,G=N-D[0],H=L-D[1],V=F-D[0],U=z-D[1],q=1/t5((($=(G*V+H*U)/(t3(G*G+H*H)*t3(V*V+U*U)))>1?0:$<-1?t4:Math.acos($))/2),Y=t3(D[0]*D[0]+D[1]*D[1]);j=t2(P,(f-Y)/(q-1)),A=t2(P,(p-Y)/(q+1))}else j=A=0}M>1e-12?A>1e-12?(v=ef(B,W,N,L,p,A,g),b=ef(F,z,I,R,p,A,g),l.moveTo(v.cx+v.x01,v.cy+v.y01),A<P?l.arc(v.cx,v.cy,A,tJ(v.y01,v.x01),tJ(b.y01,b.x01),!g):(l.arc(v.cx,v.cy,A,tJ(v.y01,v.x01),tJ(v.y11,v.x11),!g),l.arc(0,0,p,tJ(v.cy+v.y11,v.cx+v.x11),tJ(b.cy+b.y11,b.cx+b.x11),!g),l.arc(b.cx,b.cy,A,tJ(b.y11,b.x11),tJ(b.y01,b.x01),!g))):(l.moveTo(N,L),l.arc(0,0,p,x,O,!g)):l.moveTo(N,L),f>1e-12&&k>1e-12?j>1e-12?(v=ef(I,R,F,z,f,-j,g),b=ef(N,L,B,W,f,-j,g),l.lineTo(v.cx+v.x01,v.cy+v.y01),j<P?l.arc(v.cx,v.cy,j,tJ(v.y01,v.x01),tJ(b.y01,b.x01),!g):(l.arc(v.cx,v.cy,j,tJ(v.y01,v.x01),tJ(v.y11,v.x11),!g),l.arc(0,0,f,tJ(v.cy+v.y11,v.cx+v.x11),tJ(b.cy+b.y11,b.cx+b.x11),g),l.arc(b.cx,b.cy,j,tJ(b.y11,b.x11),tJ(b.y01,b.x01),!g))):l.arc(0,0,f,E,w,g):l.lineTo(I,R)}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-t4/2;return[t0(r)*n,t5(r)*n]},u.innerRadius=function(e){return arguments.length?(t="function"==typeof e?e:tZ(+e),u):t},u.outerRadius=function(t){return arguments.length?(e="function"==typeof t?t:tZ(+t),u):e},u.cornerRadius=function(t){return arguments.length?(n="function"==typeof t?t:tZ(+t),u):n},u.padRadius=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:tZ(+t),u):r},u.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:tZ(+t),u):i},u.endAngle=function(t){return arguments.length?(o="function"==typeof t?t:tZ(+t),u):o},u.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:tZ(+t),u):a},u.context=function(t){return arguments.length?(l=null==t?null:t,u):l},u}function eh(t){let{transformations:e}=t.getOptions();return e.map(([t])=>t).filter(t=>"transpose"===t).length%2!=0}function ed(t){let{transformations:e}=t.getOptions();return e.some(([t])=>"polar"===t)}function ey(t){let{transformations:e}=t.getOptions();return e.some(([t])=>"reflect"===t)&&e.some(([t])=>t.startsWith("transpose"))}function eg(t){let{transformations:e}=t.getOptions();return e.some(([t])=>"helix"===t)}function em(t){let{transformations:e}=t.getOptions();return e.some(([t])=>"parallel"===t)}function ev(t){let{transformations:e}=t.getOptions();return e.some(([t])=>"fisheye"===t)}function eb(t){return eg(t)||ed(t)}function ex(t){let{transformations:e}=t.getOptions(),[,,,n,r]=e.find(t=>"polar"===t[0]);return[+n,+r]}function eO(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]}ei.prototype=er.prototype;var ew=function(t,e){return(ew=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 eE(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}ew(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var ek=function(){return(ek=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function eM(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 e_(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 eS(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){var u=[l,s];if(n)throw TypeError("Generator is already executing.");for(;o&&(o=0,u[0]&&(a=0)),a;)try{if(n=1,r&&(i=2&u[0]?r.return:u[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,u[1])).done)return i;switch(r=0,i&&(u=[2&u[0],i.value]),u[0]){case 0:case 1:i=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,r=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===u[0]||2===u[0])){a=0;continue}if(3===u[0]&&(!i||u[1]>i[0]&&u[1]<i[3])){a.label=u[1];break}if(6===u[0]&&a.label<i[1]){a.label=i[1],i=u;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(u);break}i[2]&&a.ops.pop(),a.trys.pop();continue}u=e.call(t,a)}catch(t){u=[6,t],r=0}finally{n=i=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}}function eP(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 ej(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 eA(){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 eT(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 eC(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)}var eN=n(4269),eL="u">typeof Float32Array?Float32Array:Array;function eI(){var t=new eL(3);return eL!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function eR(t){var e=new eL(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function eD(t){return Math.hypot(t[0],t[1],t[2])}function eF(t,e,n){var r=new eL(3);return r[0]=t,r[1]=e,r[2]=n,r}function ez(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function eB(t,e,n,r){return t[0]=e,t[1]=n,t[2]=r,t}function eW(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function e$(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function eG(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t}function eH(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 eV(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function eU(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 eq(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 eY(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))}Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)});var eX=function(t,e){return Math.hypot(e[0]-t[0],e[1]-t[1],e[2]-t[2])};function eK(){var t=new eL(16);return eL!=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 eZ(t){var e=new eL(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 eQ(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 eJ(t,e,n,r,i,o,a,l,s,u,c,f,p,h,d,y){var g=new eL(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 e0(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 e1(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 e2(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 e5(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],b=n*l-r*a,x=n*s-i*a,O=n*u-o*a,w=r*s-i*l,E=r*u-o*l,k=i*u-o*s,M=c*y-f*d,_=c*g-p*d,S=c*v-h*d,P=f*g-p*y,j=f*v-h*y,A=p*v-h*g,T=b*A-x*j+O*P+w*S-E*_+k*M;return T?(T=1/T,t[0]=(l*A-s*j+u*P)*T,t[1]=(i*j-r*A-o*P)*T,t[2]=(y*k-g*E+v*w)*T,t[3]=(p*E-f*k-h*w)*T,t[4]=(s*S-a*A-u*_)*T,t[5]=(n*A-i*S+o*_)*T,t[6]=(g*O-d*k-v*x)*T,t[7]=(c*k-p*O+h*x)*T,t[8]=(a*j-l*S+u*M)*T,t[9]=(r*S-n*j-o*M)*T,t[10]=(d*E-y*O+v*b)*T,t[11]=(f*O-c*E-h*b)*T,t[12]=(l*_-a*P-s*M)*T,t[13]=(n*P-r*_+i*M)*T,t[14]=(y*x-d*w-g*b)*T,t[15]=(c*w-f*x+p*b)*T,t):null}function e3(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 e4(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 e6(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],b=e[15],x=n[0],O=n[1],w=n[2],E=n[3];return t[0]=x*r+O*l+w*f+E*y,t[1]=x*i+O*s+w*p+E*g,t[2]=x*o+O*u+w*h+E*v,t[3]=x*a+O*c+w*d+E*b,x=n[4],O=n[5],w=n[6],E=n[7],t[4]=x*r+O*l+w*f+E*y,t[5]=x*i+O*s+w*p+E*g,t[6]=x*o+O*u+w*h+E*v,t[7]=x*a+O*c+w*d+E*b,x=n[8],O=n[9],w=n[10],E=n[11],t[8]=x*r+O*l+w*f+E*y,t[9]=x*i+O*s+w*p+E*g,t[10]=x*o+O*u+w*h+E*v,t[11]=x*a+O*c+w*d+E*b,x=n[12],O=n[13],w=n[14],E=n[15],t[12]=x*r+O*l+w*f+E*y,t[13]=x*i+O*s+w*p+E*g,t[14]=x*o+O*u+w*h+E*v,t[15]=x*a+O*c+w*d+E*b,t}function e8(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 e9(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 e7(t,e,n,r){var i,o,a,l,s,u,c,f,p,h,d,y,g,v,b,x,O,w,E,k,M,_,S,P,j=r[0],A=r[1],T=r[2],C=Math.hypot(j,A,T);return C<1e-6?null:(j*=C=1/C,A*=C,T*=C,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],b=e[11],x=j*j*a+o,O=A*j*a+T*i,w=T*j*a-A*i,E=j*A*a-T*i,k=A*A*a+o,M=T*A*a+j*i,_=j*T*a+A*i,S=A*T*a-j*i,P=T*T*a+o,t[0]=l*x+f*O+y*w,t[1]=s*x+p*O+g*w,t[2]=u*x+h*O+v*w,t[3]=c*x+d*O+b*w,t[4]=l*E+f*k+y*M,t[5]=s*E+p*k+g*M,t[6]=u*E+h*k+v*M,t[7]=c*E+d*k+b*M,t[8]=l*_+f*S+y*P,t[9]=s*_+p*S+g*P,t[10]=u*_+h*S+v*P,t[11]=c*_+d*S+b*P,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)}function nt(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 ne(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 nn(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 nr(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 ni(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 no(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 na(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 nl(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 ns(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 nu(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,b=a*u;return t[0]=1-(h+y),t[1]=f+b,t[2]=p-v,t[3]=0,t[4]=f-b,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 nc(t,e){var n=new eL(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),nu(t,e,n),t}function nf(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t}function np(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 nh(t,e){var n=new eL(3);np(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 nd(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,b=l*u,x=l*c,O=r[0],w=r[1],E=r[2];return t[0]=(1-(d+g))*O,t[1]=(p+x)*O,t[2]=(h-b)*O,t[3]=0,t[4]=(p-x)*w,t[5]=(1-(f+g))*w,t[6]=(y+v)*w,t[7]=0,t[8]=(h+b)*E,t[9]=(y-v)*E,t[10]=(1-(f+d))*E,t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function ny(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,b=s*u,x=s*c,O=s*f,w=r[0],E=r[1],k=r[2],M=i[0],_=i[1],S=i[2],P=(1-(y+v))*w,j=(h+O)*w,A=(d-x)*w,T=(h-O)*E,C=(1-(p+v))*E,N=(g+b)*E,L=(d+x)*k,I=(g-b)*k,R=(1-(p+y))*k;return t[0]=P,t[1]=j,t[2]=A,t[3]=0,t[4]=T,t[5]=C,t[6]=N,t[7]=0,t[8]=L,t[9]=I,t[10]=R,t[11]=0,t[12]=n[0]+M-(P*M+T*_+L*S),t[13]=n[1]+_-(j*M+C*_+I*S),t[14]=n[2]+S-(A*M+N*_+R*S),t[15]=1,t}function ng(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 nm(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 nv(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}eI();var nb=nv;function nx(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 nO(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 nw(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 nE=nw;function nk(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 nM(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],b=r[1],x=r[2],O=n[0],w=n[1],E=n[2];return 1e-6>Math.abs(d-O)&&1e-6>Math.abs(y-w)&&1e-6>Math.abs(g-E)?e1(t):(h=1/Math.hypot(c=d-O,f=y-w,p=g-E),c*=h,f*=h,p*=h,(h=Math.hypot(i=b*p-x*f,o=x*c-v*p,a=v*f-b*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 n_(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 nS(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 nP(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 nj(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 nA(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 nT(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 nC(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 nN(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 nL(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],b=e[0],x=e[1],O=e[2],w=e[3],E=e[4],k=e[5],M=e[6],_=e[7],S=e[8],P=e[9],j=e[10],A=e[11],T=e[12],C=e[13],N=e[14],L=e[15];return Math.abs(n-b)<=1e-6*Math.max(1,Math.abs(n),Math.abs(b))&&Math.abs(r-x)<=1e-6*Math.max(1,Math.abs(r),Math.abs(x))&&Math.abs(i-O)<=1e-6*Math.max(1,Math.abs(i),Math.abs(O))&&Math.abs(o-w)<=1e-6*Math.max(1,Math.abs(o),Math.abs(w))&&Math.abs(a-E)<=1e-6*Math.max(1,Math.abs(a),Math.abs(E))&&Math.abs(l-k)<=1e-6*Math.max(1,Math.abs(l),Math.abs(k))&&Math.abs(s-M)<=1e-6*Math.max(1,Math.abs(s),Math.abs(M))&&Math.abs(u-_)<=1e-6*Math.max(1,Math.abs(u),Math.abs(_))&&Math.abs(c-S)<=1e-6*Math.max(1,Math.abs(c),Math.abs(S))&&Math.abs(f-P)<=1e-6*Math.max(1,Math.abs(f),Math.abs(P))&&Math.abs(p-j)<=1e-6*Math.max(1,Math.abs(p),Math.abs(j))&&Math.abs(h-A)<=1e-6*Math.max(1,Math.abs(h),Math.abs(A))&&Math.abs(d-T)<=1e-6*Math.max(1,Math.abs(d),Math.abs(T))&&Math.abs(y-C)<=1e-6*Math.max(1,Math.abs(y),Math.abs(C))&&Math.abs(g-N)<=1e-6*Math.max(1,Math.abs(g),Math.abs(N))&&Math.abs(v-L)<=1e-6*Math.max(1,Math.abs(v),Math.abs(L))}var nI=e6,nR=nA;function nD(){var t=new eL(9);return eL!=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 nF(){var t=new eL(4);return eL!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0),t}function nz(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 nB(){var t=new eL(4);return eL!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}function nW(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 n$(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}function nG(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 nH(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}nF();var nV=function(t,e,n,r){var i=new eL(4);return i[0]=t,i[1]=e,i[2]=n,i[3]=r,i},nU=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t},nq=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};eI(),eF(1,0,0),eF(0,1,0),nB(),nB(),nD(),MV=new eL(2),eL!=Float32Array&&(MV[0]=0,MV[1]=0);var nY={}.toString,nX=function(t,e){return nY.call(t)==="[object "+e+"]"},nK=function(t){return nX(t,"Number")};function nZ(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}var nQ=function(t){return null==t},nJ=function(t){return nX(t,"String")},n0=function(t,e,n){return t<e?e:t>n?n:t},n1={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0};function n2(t){return Array.isArray(t)&&t.every(function(t){var e=t[0].toLowerCase();return n1[e]===t.length-1&&"achlmqstvz".includes(e)})}function n5(t){return n2(t)&&t.every(function(t){var e=t[0];return e===e.toUpperCase()})}function n3(t){return n5(t)&&t.every(function(t){var e=t[0];return"ACLMQZ".includes(e)})}var n4={x1:0,y1:0,x2:0,y2:0,x:0,y:0,qx:null,qy:null};function n6(t){for(var e=t.pathValue[t.segmentStart],n=e.toLowerCase(),r=t.data;r.length>=n1[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,n1[n]))),n1[n]););}function n8(t){return t>=48&&t<=57}function n9(t){for(var e,n=t.pathValue,r=t.max;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 n7=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 rt(t){if(n3(t))return[].concat(t);for(var e=function(t){if(n5(t))return[].concat(t);var e=function(t){if(n2(t))return[].concat(t);var e=new n7(t);for(n9(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=n1[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,n9(t),t.data=[],!o)return n6(t);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):!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)),!n8(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&&n8(e)){t.err="[path-util]: Invalid path value at index "+i+', "'+r[i]+'" illegal number';return}for(;o<n&&n8(r.charCodeAt(o));)o+=1,l=!0;e=r.charCodeAt(o)}if(46===e){for(u=!0,o+=1;n8(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&&n8(r.charCodeAt(o)))for(;o<n&&n8(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),t.err.length)return;t.data.push(t.param),n9(t),t.index<e&&44===n.charCodeAt(t.index)&&(t.index+=1,n9(t))}if(t.index>=t.max||!((a=n.charCodeAt(t.index))>=48&&a<=57||43===a||45===a||46===a))break}n6(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=ek({},n4),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 re(t,e,n){var r=t[0],i=t[1];return[r+(e[0]-r)*n,i+(e[1]-i)*n]}function rn(t,e,n,r,i){var o=nZ([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=re([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 rr(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 ri(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,b=t,x=e,O=0,w=[b,x,0],E=[b,x],k={x:0,y:0},M=[{x:b,y:x}];v&&s<=0&&(k={x:b,y:x});for(var _=0;_<=g;_+=1){if(b=(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,_/g)).x,x=c.y,p&&M.push({x:b,y:x}),d&&(O+=nZ(E,[b,x])),E=[b,x],v&&O>=s&&s>w[2]){var S=(O-s)/(O-w[2]);k={x:E[0]*(1-S)+w[0]*S,y:E[1]*(1-S)+w[1]*S}}w=[b,x,O]}return v&&s>=O&&(k={x:a,y:l}),{length:O,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 ro(t,e,n){for(var r,i,o,a,l,s,u,c,f,p=rt(t),h="number"==typeof e,d=[],y=0,g=0,v=0,b=0,x=[],O=[],w=0,E={x:0,y:0},k=E,M=E,_=E,S=0,P=0,j=p.length;P<j;P+=1)d=(u="M"===(c=(f=p[P])[0]))?d:[y,g].concat(f.slice(1)),u?(k=E={x:v=f[1],y:b=f[2]},w=0,h&&e<.001&&(_=E)):"L"===c?(w=(r=rn(d[0],d[1],d[2],d[3],(e||0)-S)).length,E=r.min,k=r.max,M=r.point):"A"===c?(w=(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,b="number"==typeof u,x=t,O=e,w=0,E=[x,O,0],k=[x,O],M={x:0,y:0},_=[{x:x,y:O}];b&&u<=0&&(M={x:x,y:O});for(var S=0;S<=v;S+=1){if(x=(f=function(t,e,n,r,i,o,a,l,s,u){var c=Math.abs,f=Math.sin,p=Math.cos,h=Math.sqrt,d=Math.PI,y=c(n),g=c(r),v=d/180*((i%360+360)%360);if(t===l&&e===s)return{x:t,y:e};if(0===y||0===g)return rn(t,e,l,s,u).point;var b=(t-l)/2,x=(e-s)/2,O={x:p(v)*b+f(v)*x,y:-f(v)*b+p(v)*x},w=Math.pow(O.x,2)/Math.pow(y,2)+Math.pow(O.y,2)/Math.pow(g,2);w>1&&(y*=h(w),g*=h(w));var E=(Math.pow(y,2)*Math.pow(g,2)-Math.pow(y,2)*Math.pow(O.y,2)-Math.pow(g,2)*Math.pow(O.x,2))/(Math.pow(y,2)*Math.pow(O.y,2)+Math.pow(g,2)*Math.pow(O.x,2)),k=(o!==a?1:-1)*h(E=E<0?0:E),M={x:k*(y*O.y/g),y:k*(-(g*O.x)/y)},_={x:p(v)*M.x-f(v)*M.y+(t+l)/2,y:f(v)*M.x+p(v)*M.y+(e+s)/2},S={x:(O.x-M.x)/y,y:(O.y-M.y)/g},P=rr({x:1,y:0},S),j=rr(S,{x:(-O.x-M.x)/y,y:(-O.y-M.y)/g});!a&&j>0?j-=2*d:a&&j<0&&(j+=2*d);var A=P+(j%=2*d)*u,T=y*p(A),C=g*f(A);return{x:p(v)*T-f(v)*C+_.x,y:f(v)*T+p(v)*C+_.y}}(t,e,n,r,i,o,a,l,s,S/v)).x,O=f.y,h&&_.push({x:x,y:O}),y&&(w+=nZ(k,[x,O])),k=[x,O],b&&w>=u&&u>E[2]){var P=(w-u)/(w-E[2]);M={x:k[0]*(1-P)+E[0]*P,y:k[1]*(1-P)+E[1]*P}}E=[x,O,w]}return b&&u>=w&&(M={x:l,y:s}),{length:w,point:M,min:{x:Math.min.apply(null,_.map(function(t){return t.x})),y:Math.min.apply(null,_.map(function(t){return t.y}))},max:{x:Math.max.apply(null,_.map(function(t){return t.x})),y:Math.max.apply(null,_.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,E=i.min,k=i.max,M=i.point):"C"===c?(w=(o=ri(d[0],d[1],d[2],d[3],d[4],d[5],d[6],d[7],(e||0)-S,n||{})).length,E=o.min,k=o.max,M=o.point):"Q"===c?(w=(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,b=0,x=[g,v,0],O=[g,v],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,k/d)).x,v=s.y,c&&E.push({x:g,y:v}),p&&(b+=nZ(O,[g,v])),O=[g,v],y&&b>=a&&a>x[2]){var M=(b-a)/(b-x[2]);w={x:O[0]*(1-M)+x[0]*M,y:O[1]*(1-M)+x[1]*M}}x=[g,v,b]}return y&&a>=b&&(w={x:i,y:o}),{length:b,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,E=a.min,k=a.max,M=a.point):"Z"===c&&(w=(l=rn((d=[y,g,v,b])[0],d[1],d[2],d[3],(e||0)-S)).length,E=l.min,k=l.max,M=l.point),h&&S<e&&S+w>=e&&(_=M),O.push(k),x.push(E),S+=w,y=(s="Z"!==c?f.slice(-2):[v,b])[0],g=s[1];return h&&e>=S&&(_={x:y,y:g}),{length:S,point:_,min:{x:Math.min.apply(null,x.map(function(t){return t.x})),y:Math.min.apply(null,x.map(function(t){return t.y}))},max:{x:Math.max.apply(null,O.map(function(t){return t.x})),y:Math.max.apply(null,O.map(function(t){return t.y}))}}}var ra=function(t){return Array.isArray?Array.isArray(t):nX(t,"Array")},rl=function(t){if(ra(t))return t.reduce(function(t,e){return Math.min(t,e)},t[0])},rs=function(t){if(ra(t))return t.reduce(function(t,e){return Math.max(t,e)},t[0])},ru=function(t,e){return(t%e+e)%e};function rc(t,e,n){return{x:t*Math.cos(n)-e*Math.sin(n),y:t*Math.sin(n)+e*Math.cos(n)}}var rf=function(t,e,n,r){return eT(eT([],re([t,e],[n,r],.5),!0),[n,r,n,r],!1)};function rp(t,e){if(void 0===e&&(e=!1),n3(t)&&t.every(function(t){var e=t[0];return"MC".includes(e)})){var n,r,i=[].concat(t);return e?[i,[]]:i}for(var o=rt(t),a=ek({},n4),l=[],s="",u=o.length,c=[],f=0;f<u;f+=1){o[f]&&(s=o[f][0]),l[f]=s;var p=function(t,e){var n,r,i,o,a,l,s,u=t[0],c=t.slice(1).map(Number),f=c[0],p=c[1],h=e.x1,d=e.y1,y=e.x,g=e.y;switch(!"TQ".includes(u)&&(e.qx=null,e.qy=null),u){case"M":e.x=f,e.y=p;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,b=r,x=i,O=s,w=u,E=120*Math.PI/180,k=Math.PI/180*(+o||0),M=[];if(c)p=c[0],h=c[1],d=c[2],y=c[3];else{g=(f=rc(g,v,-k)).x,v=f.y,O=(f=rc(O,w,-k)).x,w=f.y;var _=(g-O)/2,S=(v-w)/2,P=_*_/(b*b)+S*S/(x*x);P>1&&(b*=P=Math.sqrt(P),x*=P);var j=b*b,A=x*x,T=(a===l?-1:1)*Math.sqrt(Math.abs((j*A-j*S*S-A*_*_)/(j*S*S+A*_*_)));d=T*b*S/x+(g+O)/2,y=-(T*x)*_/b+(v+w)/2,p=Math.asin(((v-y)/x*1e9|0)/1e9),h=Math.asin(((w-y)/x*1e9|0)/1e9),p=g<d?Math.PI-p:p,h=O<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 C=h-p;if(Math.abs(C)>E){var N=h,L=O,I=w;M=t(O=d+b*Math.cos(h=p+E*(l&&h>p?1:-1)),w=y+x*Math.sin(h),b,x,o,0,l,L,I,[h,N,d,y])}C=h-p;var R=Math.cos(p),D=Math.cos(h),F=Math.tan(C/4),z=4/3*b*F,B=4/3*x*F,W=[g,v],$=[g+z*Math.sin(p),v-B*R],G=[O+z*Math.sin(h),w-B*D],H=[O,w];if($[0]=2*W[0]-$[0],$[1]=2*W[1]-$[1],c)return $.concat(G,H,M);M=$.concat(G,H,M);for(var V=[],U=0,q=M.length;U<q;U+=1)V[U]=U%2?rc(M[U-1],M[U],k).y:rc(M[U],M[U+1],k).x;return V}((s=[h,d].concat(c))[0],s[1],s[2],s[3],s[4],s[5],s[6],s[7],s[8],s[9]));case"Q":return e.qx=f,e.qy=p,["C"].concat((n=(s=[h,d].concat(c))[0],r=s[1],i=s[2],o=s[3],a=s[4],l=s[5],[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(rf(h,d,f,p));case"Z":if(h===y&&d===g)return["C",h,d,y,g,y,g];return["C"].concat(rf(h,d,y,g))}return t}(o[f],a);o[f]=p,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)}}(o,l,f),u=o.length,"Z"===s&&c.push(f),r=(n=o[f]).length,a.x1=+n[r-2],a.y1=+n[r-1],a.x2=+n[r-4]||a.x1,a.y2=+n[r-3]||a.y1}return e?[o,c]:o}function rh(t){return t.map(function(t,e,n){var r,i,o,a,l,s,u,c,f,p,h,d,y=e&&n[e-1].slice(-2).concat(t.slice(1)),g=e?ri(y[0],y[1],y[2],y[3],y[4],y[5],y[6],y[7],y[8],{bbox:!1}).length:0;return d=e?g?(void 0===r&&(r=.5),i=y.slice(0,2),o=y.slice(2,4),a=y.slice(4,6),l=y.slice(6,8),s=re(i,o,r),u=re(o,a,r),c=re(a,l,r),f=re(s,u,r),p=re(u,c,r),h=re(f,p,r),[["C"].concat(s,f,h),["C"].concat(p,c,l)]):[t,t]:[t],{s:t,ss:d,l:g}})}function rd(t){var e,n,r;return e=0,n=0,r=0,rp(t).map(function(t){if("M"===t[0])return e=t[1],n=t[2],0;var i,o,a,l=t.slice(1),s=l[0],u=l[1],c=l[2],f=l[3],p=l[4],h=l[5];return o=e,r=3*((h-(a=n))*(s+c)-(p-o)*(u+f)+u*(o-c)-s*(a-f)+h*(c+o/3)-p*(f+a/3))/20,e=(i=t.slice(-2))[0],n=i[1],r}).reduce(function(t,e){return t+e},0)>=0}var ry=function(t){return nX(t,"Boolean")},rg=function(t){var e=typeof t;return null!==t&&"object"===e||"function"===e},rm=function(t){return void 0===t};function rv(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function rb(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function rx(){}var rO="\\s*([+-]?\\d+)\\s*",rw="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",rE="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",rk=/^#([0-9a-f]{3,8})$/,rM=RegExp("^rgb\\("+[rO,rO,rO]+"\\)$"),r_=RegExp("^rgb\\("+[rE,rE,rE]+"\\)$"),rS=RegExp("^rgba\\("+[rO,rO,rO,rw]+"\\)$"),rP=RegExp("^rgba\\("+[rE,rE,rE,rw]+"\\)$"),rj=RegExp("^hsl\\("+[rw,rE,rE]+"\\)$"),rA=RegExp("^hsla\\("+[rw,rE,rE,rw]+"\\)$"),rT={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 rC(){return this.rgb().formatHex()}function rN(){return this.rgb().formatRgb()}function rL(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=rk.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?rI(e):3===n?new rD(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?rR(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?rR(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=rM.exec(t))?new rD(e[1],e[2],e[3],1):(e=r_.exec(t))?new rD(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=rS.exec(t))?rR(e[1],e[2],e[3],e[4]):(e=rP.exec(t))?rR(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=rj.exec(t))?rW(e[1],e[2]/100,e[3]/100,1):(e=rA.exec(t))?rW(e[1],e[2]/100,e[3]/100,e[4]):rT.hasOwnProperty(t)?rI(rT[t]):"transparent"===t?new rD(NaN,NaN,NaN,0):null}function rI(t){return new rD(t>>16&255,t>>8&255,255&t,1)}function rR(t,e,n,r){return r<=0&&(t=e=n=NaN),new rD(t,e,n,r)}function rD(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function rF(){return"#"+rB(this.r)+rB(this.g)+rB(this.b)}function rz(){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 rB(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function rW(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new rG(t,e,n,r)}function r$(t){if(t instanceof rG)return new rG(t.h,t.s,t.l,t.opacity);if(t instanceof rx||(t=rL(t)),!t)return new rG;if(t instanceof rG)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 rG(a,l,s,t.opacity)}function rG(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function rH(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 rV(t,e,n){return void 0===n&&(n=1e-5),Math.abs(t-e)<n}function rU(t,e,n,r){var i=t-n,o=e-r;return Math.sqrt(i*i+o*o)}function rq(t,e){var n=Math.min.apply(Math,eT([],ej(t),!1)),r=Math.min.apply(Math,eT([],ej(e),!1));return{x:n,y:r,width:Math.max.apply(Math,eT([],ej(t),!1))-n,height:Math.max.apply(Math,eT([],ej(e),!1))-r}}function rY(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,eT([],ej(t.concat([h])),!1)),i.apply(void 0,eT([],ej(e.concat([h])),!1))],y=rU(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,b=a+f,d=[i.apply(void 0,eT([],ej(t.concat([v])),!1)),i.apply(void 0,eT([],ej(e.concat([v])),!1))],y=rU(s[0],s[1],d[0],d[1]);if(v>=0&&y<l)a=v,l=y;else{var x=[i.apply(void 0,eT([],ej(t.concat([b])),!1)),i.apply(void 0,eT([],ej(e.concat([b])),!1))],O=rU(s[0],s[1],x[0],x[1]);b<=1&&O<l?(a=b,l=O):f*=.5}}return{x:i.apply(void 0,eT([],ej(t.concat([a])),!1)),y:i.apply(void 0,eT([],ej(e.concat([a])),!1))}}rv(rx,rL,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:rC,formatHex:rC,formatHsl:function(){return r$(this).formatHsl()},formatRgb:rN,toString:rN}),rv(rD,function(t,e,n,r){var i;return 1==arguments.length?((i=t)instanceof rx||(i=rL(i)),i)?new rD((i=i.rgb()).r,i.g,i.b,i.opacity):new rD:new rD(t,e,n,null==r?1:r)},rb(rx,{brighter:function(t){return t=null==t?1.4285714285714286:Math.pow(1.4285714285714286,t),new rD(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new rD(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:rF,formatHex:rF,formatRgb:rz,toString:rz})),rv(rG,function(t,e,n,r){return 1==arguments.length?r$(t):new rG(t,e,n,null==r?1:r)},rb(rx,{brighter:function(t){return t=null==t?1.4285714285714286:Math.pow(1.4285714285714286,t),new rG(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new rG(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 rD(rH(t>=240?t-240:t+120,i,r),rH(t,i,r),rH(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 rX(t,e,n,r,i){return{x:(1-i)*t+i*n,y:(1-i)*e+i*r}}function rK(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 rZ(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(rV(l,0))!rV(s,0)&&(i=-u/s)>=0&&i<=1&&c.push(i);else{var f=s*s-4*l*u;rV(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 rQ(t,e,n,r,i,o,a,l,s,u,c){var f=rY([t,n,i,a],[e,r,o,l],s,u,rK,c);return rU(f.x,f.y,s,u)}function rJ(t,e,n,r){var i=1-r;return i*i*t+2*r*i*e+r*r*n}function r0(t,e,n){var r=t+n-2*e;if(rV(r,0))return[.5];var i=(t-e)/r;return i<=1&&i>=0?[i]:[]}"u">typeof globalThis||("u">typeof window?window:void 0!==n.g?n.g:"u">typeof self&&self);var r1={exports:{}};r1.exports=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)}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()};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())-(r=l.pop())<=o)){var s=r+Math.ceil((i-r)/o/2)*o;(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)}})(n,s,r||0,i||n.length-1,a||e),l.push(r,s,s,i)}}return 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,c,f=e.children[l],p=s(f),h=(u=t,(Math.max((c=f).maxX,u.maxX)-Math.min(c.minX,u.minX))*(Math.max(c.maxY,u.maxY)-Math.min(c.minY,u.minY))-p);h<o?(o=h,i=p<i?p:i,a=f):h===o&&p<i&&(i=p,a=f)}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)},n}();var r2=r1.exports;(MU=_c||(_c={})).GROUP="g",MU.CIRCLE="circle",MU.ELLIPSE="ellipse",MU.IMAGE="image",MU.RECT="rect",MU.LINE="line",MU.POLYLINE="polyline",MU.POLYGON="polygon",MU.TEXT="text",MU.PATH="path",MU.HTML="html",MU.MESH="mesh",(Mq=_f||(_f={}))[Mq.ZERO=0]="ZERO",Mq[Mq.NEGATIVE_ONE=1]="NEGATIVE_ONE";var r5=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}(),r3=function(){function t(t){this.clipSpaceNearZ=_f.NEGATIVE_ONE,this.plugins=[],this.config=ek({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 r4(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function r6(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function r8(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function r9(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t}function r7(t){return void 0===t?0:t>360||t<-360?t%360:t}function it(t,e,n){return(void 0===e&&(e=0),void 0===n&&(n=0),Array.isArray(t)&&3===t.length)?eR(t):nK(t)?eF(t,e,n):eF(t[0],t[1]||e,t[2]||n)}function ie(t){return Math.PI/180*t}function ir(t){return 180/Math.PI*t}function ii(t,e){var n,r,i,o,a,l,s,u,c,f,p,h,d,y,g,v,b;return 16===e.length?(i=.5*Math.PI,a=(o=ej(np(eI(),e),3))[0],l=o[1],s=o[2],(u=Math.asin(-e[2]/a))<i?u>-i?(n=Math.atan2(e[6]/l,e[10]/s),r=Math.atan2(e[1]/a,e[0]/a)):(r=0,n=-Math.atan2(e[4]/l,e[5]/l)):(r=0,n=Math.atan2(e[4]/l,e[5]/l)),t[0]=n,t[1]=u,t[2]=r,t):(c=e[0],f=e[1],p=e[2],h=e[3],v=c*c+(d=f*f)+(y=p*p)+(g=h*h),(b=c*h-f*p)>.499995*v?(t[0]=Math.PI/2,t[1]=2*Math.atan2(f,c),t[2]=0):b<-.499995*v?(t[0]=-Math.PI/2,t[1]=2*Math.atan2(f,c),t[2]=0):(t[0]=Math.asin(2*(c*p-h*f)),t[1]=Math.atan2(2*(c*h+f*p),1-2*(y+g)),t[2]=Math.atan2(2*(c*f+p*h),1-2*(d+y))),t)}function io(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=ir(Math.atan2(n,e));return[t[6],t[7],o,a,l]}var ia=eK(),il=eK(),is=nF(),iu=[eI(),eI(),eI()],ic=eI();function ip(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 ih=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){r4(this.center,t),r4(this.halfExtents,e),r6(this.min,this.center,this.halfExtents),r8(this.max,this.center,this.halfExtents)},t.prototype.setMinMax=function(t,e){r8(this.center,e,t),r9(this.center,this.center,.5),r6(this.halfExtents,e,t),r9(this.halfExtents,this.halfExtents,.5),r4(this.min,t),r4(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))return void this.setMinMax(e.getMin(),e.getMax());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],b=g[1],x=g[2],O=e.halfExtents,w=O[0],E=O[1],k=O[2],M=v-w,_=v+w,S=b-E,P=b+E,j=x-k,A=x+k;M<c&&(c=M),_>f&&(f=_),S<p&&(p=S),P>h&&(h=P),j<d&&(d=j),A>y&&(y=A),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),b=Math.abs(u),x=Math.abs(c),O=Math.abs(f),w=Math.abs(p),E=Math.abs(h),k=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]=b*o[0]+x*o[1]+O*o[2],r[2]=w*o[0]+E*o[1]+k*o[2],r6(this.min,n,r),r8(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,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),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 r4([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]];if(256===t.pnVertexFlag)return[this.min[0],this.max[1],this.max[2]];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 r4([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]];if(256===t.pnVertexFlag)return[this.max[0],this.min[1],this.min[2]];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}(),id=function(){function t(t,e){this.distance=t||0,this.normal=e||eF(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 eV(t,this.normal)-this.distance},t.prototype.normalize=function(){var t=1/eD(this.normal);eG(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&&eU(n,t,e,i),o},t}();(MY=_p||(_p={}))[MY.OUTSIDE=0xffffffff]="OUTSIDE",MY[MY.INSIDE=0]="INSIDE",MY[MY.INDETERMINATE=0x7fffffff]="INDETERMINATE";var iy=function(){function t(t){if(this.planes=[],t)this.planes=t;else for(var e=0;e<6;e++)this.planes.push(new id)}return t.prototype.extractFromVPMatrix=function(t){var e=ej(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];eB(this.planes[0].normal,o-n,u-a,h-c),this.planes[0].distance=v-d,eB(this.planes[1].normal,o+n,u+a,h+c),this.planes[1].distance=v+d,eB(this.planes[2].normal,o+r,u+l,h+f),this.planes[2].distance=v+y,eB(this.planes[3].normal,o-r,u-l,h-f),this.planes[3].distance=v-y,eB(this.planes[4].normal,o-i,u-s,h-p),this.planes[4].distance=v-g,eB(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}(),ig=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}(),im=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}(),iv="Method not implemented.",ib="Use document.documentElement instead.";(MX=_h||(_h={}))[MX.ORBITING=0]="ORBITING",MX[MX.EXPLORING=1]="EXPLORING",MX[MX.TRACKING=2]="TRACKING",(MK=_d||(_d={}))[MK.DEFAULT=0]="DEFAULT",MK[MK.ROTATIONAL=1]="ROTATIONAL",MK[MK.TRANSLATIONAL=2]="TRANSLATIONAL",MK[MK.CINEMATIC=3]="CINEMATIC",(MZ=_y||(_y={}))[MZ.ORTHOGRAPHIC=0]="ORTHOGRAPHIC",MZ[MZ.PERSPECTIVE=1]="PERSPECTIVE";var ix="updated",iO=function(){function t(){this.clipSpaceNearZ=_f.NEGATIVE_ONE,this.eventEmitter=new eN,this.matrix=eK(),this.right=eF(1,0,0),this.up=eF(0,1,0),this.forward=eF(0,0,1),this.position=eF(0,0,1),this.focalPoint=eF(0,0,0),this.distanceVector=eF(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=eK(),this.projectionMatrixInverse=eK(),this.jitteredProjectionMatrix=void 0,this.enableUpdate=!0,this.type=_h.EXPLORING,this.trackingMode=_d.DEFAULT,this.projectionMode=_y.PERSPECTIVE,this.frustum=new iy,this.orthoMatrix=eK()}return t.prototype.isOrtho=function(){return this.projectionMode===_y.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===_h.EXPLORING?this.setWorldRotation(!0):this.setWorldRotation(!1),this._getAngles(),this.type===_h.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!==_h.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 e5(eK(),this.matrix)},t.prototype.getWorldTransform=function(){return this.matrix},t.prototype.jitterProjectionMatrix=function(t,e){var n=nr(eK(),[t,e,0]);this.jitteredProjectionMatrix=e6(eK(),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===_y.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===_y.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===_y.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===_y.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===_y.ORTHOGRAPHIC?this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far):this.projectionMode===_y.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=eF(a.x-r,a.y-i,0),s=eV(l,this.right)/eD(this.right),u=eV(l,this.up)/eD(this.up);return this.pan(-s,-u),this},t.prototype.setPerspective=function(t,e,n,r){this.projectionMode=_y.PERSPECTIVE,this.fov=n,this.near=t,this.far=e,this.aspect=r;var i,o,a,l,s,u,c,f,p,h=this.near*Math.tan(ie(.5*this.fov))/this.zoom,d=2*h,y=this.aspect*d,g=-.5*y;if(null==(p=this.view)?void 0:p.enabled){var v=this.view.fullWidth,b=this.view.fullHeight;g+=this.view.offsetX*y/v,h-=this.view.offsetY*d/b,y*=this.view.width/v,d*=this.view.height/b}return i=this.projectionMatrix,o=g,a=g+y,l=h,s=h-d,u=this.far,this.clipSpaceNearZ===_f.ZERO?(c=-u/(u-t),f=-u*t/(u-t)):(c=-(u+t)/(u-t),f=-2*u*t/(u-t)),i[0]=2*t/(a-o),i[1]=0,i[2]=0,i[3]=0,i[4]=0,i[5]=2*t/(l-s),i[6]=0,i[7]=0,i[8]=(a+o)/(a-o),i[9]=(l+s)/(l-s),i[10]=c,i[11]=-1,i[12]=0,i[13]=0,i[14]=f,i[15]=0,e9(this.projectionMatrix,this.projectionMatrix,eF(1,-1,1)),e5(this.projectionMatrixInverse,this.projectionMatrix),this.triggerUpdate(),this},t.prototype.setOrthographic=function(t,e,n,r,i,o){this.projectionMode=_y.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.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===_f.NEGATIVE_ONE?nE(this.projectionMatrix,f,p,d,h,i,o):nk(this.projectionMatrix,f,p,d,h,i,o),e9(this.projectionMatrix,this.projectionMatrix,eF(1,-1,1)),e5(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=it(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=eF(0,1,0);if(this.focalPoint=it(t,e,n),this.trackingMode===_d.CINEMATIC){var i=e$(eI(),this.focalPoint,this.position);t=i[0],e=i[1],n=i[2];var o=ir(Math.asin(e/eD(i))),a=90+ir(Math.atan2(n,t)),l=eK();ne(l,l,ie(a)),nt(l,l,ie(o)),r=eq(eI(),[0,1,0],l)}return e5(this.matrix,nM(eK(),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=eI();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=r7(t),this.computeMatrix(),this._getAxes(),this.type===_h.ORBITING||this.type===_h.EXPLORING?this._getPosition():this.type===_h.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},t.prototype.getAzimuth=function(){return this.azimuth},t.prototype.setElevation=function(t){return this.elevation=r7(t),this.computeMatrix(),this._getAxes(),this.type===_h.ORBITING||this.type===_h.EXPLORING?this._getPosition():this.type===_h.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},t.prototype.getElevation=function(){return this.elevation},t.prototype.setRoll=function(t){return this.roll=r7(t),this.computeMatrix(),this._getAxes(),this.type===_h.ORBITING||this.type===_h.EXPLORING?this._getPosition():this.type===_h.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=nW(nB(),[0,0,1],ie(this.roll));e1(this.matrix);var e=nW(nB(),[1,0,0],ie((this.rotateWorld&&this.type!==_h.TRACKING||this.type===_h.TRACKING?1:-1)*this.elevation)),n=nW(nB(),[0,1,0],ie((this.rotateWorld&&this.type!==_h.TRACKING||this.type===_h.TRACKING?1:-1)*this.azimuth)),r=n$(nB(),n,e);r=n$(nB(),r,t);var i=ng(eK(),r);this.type===_h.ORBITING||this.type===_h.EXPLORING?(e8(this.matrix,this.matrix,this.focalPoint),e6(this.matrix,this.matrix,i),e8(this.matrix,this.matrix,[0,0,this.distance])):this.type===_h.TRACKING&&(e8(this.matrix,this.matrix,this.position),e6(this.matrix,this.matrix,i))},t.prototype._setPosition=function(t,e,n){this.position=it(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(){ez(this.right,it(nz(nF(),[1,0,0,0],this.matrix))),ez(this.up,it(nz(nF(),[0,1,0,0],this.matrix))),ez(this.forward,it(nz(nF(),[0,0,1,0],this.matrix))),eH(this.right,this.right),eH(this.up,this.up),eH(this.forward,this.forward)},t.prototype._getAngles=function(){var t=this.distanceVector[0],e=this.distanceVector[1],n=this.distanceVector[2],r=eD(this.distanceVector);if(0===r){this.elevation=0,this.azimuth=0;return}this.type===_h.TRACKING||this.rotateWorld?(this.elevation=ir(Math.asin(e/r)),this.azimuth=ir(Math.atan2(-t,-n))):(this.elevation=-ir(Math.asin(e/r)),this.azimuth=-ir(Math.atan2(-t,-n)))},t.prototype._getPosition=function(){ez(this.position,it(nz(nF(),[0,0,0,1],this.matrix))),this._getDistance()},t.prototype._getFocalPoint=function(){var t,e,n,r,i,o,a;n=this.distanceVector,r=[0,0,-this.distance],t=nD(),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],i=r[0],o=r[1],a=r[2],n[0]=i*m[0]+o*m[3]+a*m[6],n[1]=i*m[1]+o*m[4]+a*m[7],n[2]=i*m[2]+o*m[5]+a*m[8],eW(this.focalPoint,this.position,this.distanceVector),this._getDistance()},t.prototype._getDistance=function(){this.distanceVector=e$(eI(),this.focalPoint,this.position),this.distance=eD(this.distanceVector),this.dollyingStep=this.distance/100},t.prototype._getOrthoMatrix=function(){if(this.projectionMode===_y.ORTHOGRAPHIC){var t=this.position,e=nW(nB(),[0,0,1],-this.roll*Math.PI/180);ny(this.orthoMatrix,e,eF((this.rright-this.left)/2-t[0],(this.top-this.bottom)/2-t[1],0),eF(this.zoom,this.zoom,1),t)}},t.prototype.triggerUpdate=function(){if(this.enableUpdate){var t=this.getViewTransform(),e=e6(eK(),this.getPerspective(),t);this.getFrustum().extractFromVPMatrix(e),this.eventEmitter.emit(ix)}},t.prototype.rotate=function(t,e,n){throw Error(iv)},t.prototype.pan=function(t,e){throw Error(iv)},t.prototype.dolly=function(t){throw Error(iv)},t.prototype.createLandmark=function(t,e){throw Error(iv)},t.prototype.gotoLandmark=function(t,e){throw Error(iv)},t.prototype.cancelLandmarkAnimation=function(){throw Error(iv)},t}();function iw(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(iw.Cache||Map),n}iw.Cache=Map,(MQ=_g||(_g={}))[MQ.kUnknown=0]="kUnknown",MQ[MQ.kNumber=1]="kNumber",MQ[MQ.kPercentage=2]="kPercentage",MQ[MQ.kEms=3]="kEms",MQ[MQ.kPixels=4]="kPixels",MQ[MQ.kRems=5]="kRems",MQ[MQ.kDegrees=6]="kDegrees",MQ[MQ.kRadians=7]="kRadians",MQ[MQ.kGradians=8]="kGradians",MQ[MQ.kTurns=9]="kTurns",MQ[MQ.kMilliseconds=10]="kMilliseconds",MQ[MQ.kSeconds=11]="kSeconds",MQ[MQ.kInteger=12]="kInteger",(MJ=_m||(_m={}))[MJ.kUNumber=0]="kUNumber",MJ[MJ.kUPercent=1]="kUPercent",MJ[MJ.kULength=2]="kULength",MJ[MJ.kUAngle=3]="kUAngle",MJ[MJ.kUTime=4]="kUTime",MJ[MJ.kUOther=5]="kUOther",(M0=_v||(_v={}))[M0.kAll=0]="kAll",M0[M0.kNonNegative=1]="kNonNegative",M0[M0.kInteger=2]="kInteger",M0[M0.kNonNegativeInteger=3]="kNonNegativeInteger",M0[M0.kPositiveInteger=4]="kPositiveInteger",(M1=_b||(_b={}))[M1.kYes=0]="kYes",M1[M1.kNo=1]="kNo",(M2=_x||(_x={}))[M2.kYes=0]="kYes",M2[M2.kNo=1]="kNo";var iE=[{name:"em",unit_type:_g.kEms},{name:"px",unit_type:_g.kPixels},{name:"deg",unit_type:_g.kDegrees},{name:"rad",unit_type:_g.kRadians},{name:"grad",unit_type:_g.kGradians},{name:"ms",unit_type:_g.kMilliseconds},{name:"s",unit_type:_g.kSeconds},{name:"rem",unit_type:_g.kRems},{name:"turn",unit_type:_g.kTurns}];(M5=_O||(_O={}))[M5.kUnknownType=0]="kUnknownType",M5[M5.kUnparsedType=1]="kUnparsedType",M5[M5.kKeywordType=2]="kKeywordType",M5[M5.kUnitType=3]="kUnitType",M5[M5.kSumType=4]="kSumType",M5[M5.kProductType=5]="kProductType",M5[M5.kNegateType=6]="kNegateType",M5[M5.kInvertType=7]="kInvertType",M5[M5.kMinType=8]="kMinType",M5[M5.kMaxType=9]="kMaxType",M5[M5.kClampType=10]="kClampType",M5[M5.kTransformType=11]="kTransformType",M5[M5.kPositionType=12]="kPositionType",M5[M5.kURLImageType=13]="kURLImageType",M5[M5.kColorType=14]="kColorType",M5[M5.kUnsupportedColorType=15]="kUnsupportedColorType";var ik=function(t){return t?"number"===t?_g.kNumber:"percent"===t||"%"===t?_g.kPercentage:iE.find(function(e){return e.name===t}).unit_type:_g.kUnknown},iM=function(t){switch(t){case _g.kNumber:case _g.kInteger:return _m.kUNumber;case _g.kPercentage:return _m.kUPercent;case _g.kPixels:return _m.kULength;case _g.kMilliseconds:case _g.kSeconds:return _m.kUTime;case _g.kDegrees:case _g.kRadians:case _g.kGradians:case _g.kTurns:return _m.kUAngle;default:return _m.kUOther}},i_=function(t){switch(t){case _m.kUNumber:return _g.kNumber;case _m.kULength:return _g.kPixels;case _m.kUPercent:return _g.kPercentage;case _m.kUTime:return _g.kSeconds;case _m.kUAngle:return _g.kDegrees;default:return _g.kUnknown}},iS=function(t){var e=1;switch(t){case _g.kPixels:case _g.kDegrees:case _g.kSeconds:break;case _g.kMilliseconds:e=.001;break;case _g.kRadians:e=180/Math.PI;break;case _g.kGradians:e=.9;break;case _g.kTurns:e=360}return e},iP=function(t){switch(t){case _g.kNumber:case _g.kInteger:break;case _g.kPercentage:return"%";case _g.kEms:return"em";case _g.kRems:return"rem";case _g.kPixels:return"px";case _g.kDegrees:return"deg";case _g.kRadians:return"rad";case _g.kGradians:return"grad";case _g.kMilliseconds:return"ms";case _g.kSeconds:return"s";case _g.kTurns:return"turn"}return""},ij=function(){function t(){}return t.isAngle=function(t){return t===_g.kDegrees||t===_g.kRadians||t===_g.kGradians||t===_g.kTurns},t.isLength=function(t){return t>=_g.kEms&&t<_g.kDegrees},t.isRelativeUnit=function(t){return t===_g.kPercentage||t===_g.kEms||t===_g.kRems},t.isTime=function(t){return t===_g.kSeconds||t===_g.kMilliseconds},t.prototype.toString=function(){return this.buildCSSText(_b.kNo,_x.kNo,"")},t.prototype.isNumericValue=function(){return this.getType()>=_O.kUnitType&&this.getType()<=_O.kClampType},t}(),iA=function(t){function e(e){var n=t.call(this)||this;return n.colorSpace=e,n}return eE(e,t),e.prototype.getType=function(){return _O.kColorType},e.prototype.to=function(t){return this},e}(ij);(M3=_w||(_w={}))[M3.Constant=0]="Constant",M3[M3.LinearGradient=1]="LinearGradient",M3[M3.RadialGradient=2]="RadialGradient";var iT=function(t){function e(e,n){var r=t.call(this)||this;return r.type=e,r.value=n,r}return eE(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 _O.kColorType},e}(ij),iC=function(t){function e(e){var n=t.call(this)||this;return n.value=e,n}return eE(e,t),e.prototype.clone=function(){return new e(this.value)},e.prototype.getType=function(){return _O.kKeywordType},e.prototype.buildCSSText=function(t,e,n){return n+this.value},e}(ij),iN=iw(function(t){return void 0===t&&(t=""),t.replace(/-([a-z])/g,function(t){return t[1].toUpperCase()})}),iL=function(t){return t.split("").map(function(t,e){return t.toUpperCase()===t?"".concat(0!==e?"-":"").concat(t.toLowerCase()):t}).join("")};function iI(t){return"function"==typeof t}var iR={d:{alias:"path"},strokeDasharray:{alias:"lineDash"},strokeWidth:{alias:"lineWidth"},textAnchor:{alias:"textAlign"},src:{alias:"img"}},iD=iw(function(t){var e=iN(t),n=iR[e];return(null==n?void 0:n.alias)||e}),iF=function(t,e){void 0===e&&(e="");var n="";if(Number.isFinite(t)){if(!Number.isNaN(t))throw Error();n="NaN"}else n=t>0?"infinity":"-infinity";return n+e},iz=function(t){return i_(iM(t))},iB=function(t){function e(e,n){void 0===n&&(n=_g.kNumber);var r=t.call(this)||this;return r.unit="string"==typeof n?ik(n):n,r.value=e,r}return eE(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 _O.kUnitType},e.prototype.convertTo=function(t){if(this.unit===t)return new e(this.value,this.unit);var n=iz(this.unit);if(n!==iz(t)||n===_g.kUnknown)return null;var r=iS(this.unit)/iS(t);return new e(this.value*r,t)},e.prototype.buildCSSText=function(t,e,n){var r;switch(this.unit){case _g.kUnknown:break;case _g.kInteger:r=Number(this.value).toFixed(0);break;case _g.kNumber:case _g.kPercentage:case _g.kEms:case _g.kRems:case _g.kPixels:case _g.kDegrees:case _g.kRadians:case _g.kGradians:case _g.kMilliseconds:case _g.kSeconds:case _g.kTurns:var i=this.value,o=iP(this.unit);if(i<-999999||i>999999){var a=iP(this.unit);r=!Number.isFinite(i)||Number.isNaN(i)?iF(i,a):i+(a||"")}else r="".concat(i).concat(o)}return n+r},e}(ij),iW=new iB(0,"px");new iB(1,"px");var i$=new iB(0,"deg"),iG=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 eE(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}(iA),iH=new iC("unset"),iV={"":iH,unset:iH,initial:new iC("initial"),inherit:new iC("inherit")},iU=function(t){return iV[t]||(iV[t]=new iC(t)),iV[t]},iq=new iG(0,0,0,0,!0),iY=new iG(0,0,0,0),iX=iw(function(t,e,n,r){return new iG(t,e,n,r)},function(t,e,n,r){return"rgba(".concat(t,",").concat(e,",").concat(n,",").concat(r,")")}),iK=function(t,e){return void 0===e&&(e=_g.kNumber),new iB(t,e)},iZ=new iB(50,"%");(M4=_E||(_E={}))[M4.Standard=0]="Standard",(M6=_k||(_k={}))[M6.ADDED=0]="ADDED",M6[M6.REMOVED=1]="REMOVED",M6[M6.Z_INDEX_CHANGED=2]="Z_INDEX_CHANGED";var iQ={absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new im(0,0,0,0)};(M8=_M||(_M={})).COORDINATE="<coordinate>",M8.COLOR="<color>",M8.PAINT="<paint>",M8.NUMBER="<number>",M8.ANGLE="<angle>",M8.OPACITY_VALUE="<opacity-value>",M8.SHADOW_BLUR="<shadow-blur>",M8.LENGTH="<length>",M8.PERCENTAGE="<percentage>",M8.LENGTH_PERCENTAGE="<length> | <percentage>",M8.LENGTH_PERCENTAGE_12="[<length> | <percentage>]{1,2}",M8.LENGTH_PERCENTAGE_14="[<length> | <percentage>]{1,4}",M8.LIST_OF_POINTS="<list-of-points>",M8.PATH="<path>",M8.FILTER="<filter>",M8.Z_INDEX="<z-index>",M8.OFFSET_DISTANCE="<offset-distance>",M8.DEFINED_PATH="<defined-path>",M8.MARKER="<marker>",M8.TRANSFORM="<transform>",M8.TRANSFORM_ORIGIN="<transform-origin>",M8.TEXT="<text>",M8.TEXT_TRANSFORM="<text-transform>";var iJ=function(){var t=/^(linear\-gradient)/i,e=/^(repeating\-linear\-gradient)/i,n=/^(radial\-gradient)/i,r=/^(repeating\-radial\-gradient)/i,i=/^(conic\-gradient)/i,o=/^to (left (top|bottom)|right (top|bottom)|top (left|right)|bottom (left|right)|left|right|top|bottom)/i,a=/^(closest\-side|closest\-corner|farthest\-side|farthest\-corner|contain|cover)/,l=/^(left|center|right|top|bottom)/i,s=/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))px/,u=/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))\%/,c=/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))em/,f=/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))deg/,p=/^\(/,h=/^\)/,d=/^,/,y=/^\#([0-9a-fA-F]+)/,g=/^([a-zA-Z]+)/,v=/^rgb/i,b=/^rgba/i,x=/^(([0-9]*\.[0-9]+)|([0-9]+\.?))/,O="";function w(t){throw Error(O+": "+t)}function E(){return k("linear-gradient",t,_)||k("repeating-linear-gradient",e,_)||k("radial-gradient",n,S)||k("repeating-radial-gradient",r,S)||k("conic-gradient",i,S)}function k(t,e,n){return M(e,function(e){var r=n();return r&&!F(d)&&w("Missing comma before color stops"),{type:t,orientation:r,colorStops:C(N)}})}function M(t,e){var n=F(t);if(n){F(p)||w("Missing (");var r=e(n);return F(h)||w("Missing )"),r}}function _(){return D("directional",o,1)||D("angular",f,1)}function S(){var t,e,n=P();return n&&((t=[]).push(n),e=O,F(d)&&((n=P())?t.push(n):O=e)),t}function P(){var t,e,n=((t=D("shape",/^(circle)/i,0))&&(t.style=R()||j()),t||((e=D("shape",/^(ellipse)/i,0))&&(e.style=I()||j()),e));if(n)n.at=A();else{var r=j();if(r){n=r;var i=A();i&&(n.at=i)}else{var o=T();o&&(n={type:"default-radial",at:o})}}return n}function j(){return D("extent-keyword",a,1)}function A(){if(D("position",/^at/,0)){var t=T();return t||w("Missing positioning value"),t}}function T(){var t={x:I(),y:I()};if(t.x||t.y)return{type:"position",value:t}}function C(t){var e=t(),n=[];if(e)for(n.push(e);F(d);)(e=t())?n.push(e):w("One extra comma");return n}function N(){var t=D("hex",y,1)||M(b,function(){return{type:"rgba",value:C(L)}})||M(v,function(){return{type:"rgb",value:C(L)}})||D("literal",g,0);return t||w("Expected color definition"),t.length=I(),t}function L(){return F(x)[1]}function I(){return D("%",u,1)||D("position-keyword",l,1)||R()}function R(){return D("px",s,1)||D("em",c,1)}function D(t,e,n){var r=F(e);if(r)return{type:t,value:r[n]}}function F(t){var e=/^[\n\r\t\s]+/.exec(O);e&&z(e[0].length);var n=t.exec(O);return n&&z(n[0].length),n}function z(t){O=O.substring(t)}return function(t){var e;return O=t,e=C(E),O.length>0&&w("Invalid input not EOF"),e}}(),i0=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,i1=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,i2=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,i5=/[\d.]+:(#[^\s]+|[^\)]+\))/gi,i3={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},i4=iw(function(t){return iK("angular"===t.type?Number(t.value):i3[t.value]||0,"deg")}),i6=iw(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:iK(e,r),cy:iK(n,i)}}),i8=iw(function(t){if(t.indexOf("linear")>-1||t.indexOf("radial")>-1){var e;return iJ(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)?e:{type:"%",value:"100"},i>1&&(t[0].length=null!=(n=t[0].length)?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.value;if(!nQ(s)&&!nQ(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){var e,n,r;return{offset:iK(Number(t.length.value),"%"),color:(n=(e=t).type,r=e.value,"hex"===n?"#".concat(r):"literal"===n?r:"rgb"===n?"rgb(".concat(r.join(","),")"):"rgba(".concat(r.join(","),")"))}});if("linear-gradient"===e)return new iT(_w.LinearGradient,{angle:n?i4(n):i$,steps:i});if("radial-gradient"===e&&(n||(n=[{type:"shape",value:"circle"}]),"shape"===n[0].type&&"circle"===n[0].value)){var o=i6(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?iU(f):iK(f,c)}return new iT(_w.RadialGradient,{cx:a,cy:l,size:s,steps:i})}})}var n=t[0];if("("===t[1]||"("===t[2]){if("l"===n){var r=i0.exec(t);if(r){var i=(null==(e=r[2].match(i5))?void 0:e.map(function(t){return t.split(":")}))||[];return[new iT(_w.LinearGradient,{angle:iK(parseFloat(r[1]),"deg"),steps:i.map(function(t){var e=ej(t,2),n=e[0],r=e[1];return{offset:iK(100*Number(n),"%"),color:r}})})]}}else if("r"===n){var o=function(t){var e,n=i1.exec(t);if(n){var r=(null==(e=n[4].match(i5))?void 0:e.map(function(t){return t.split(":")}))||[];return{cx:iK(50,"%"),cy:iK(50,"%"),steps:r.map(function(t){var e=ej(t,2),n=e[0],r=e[1];return{offset:iK(100*Number(n),"%"),color:r}})}}return null}(t);if(o)if(!nJ(o))return[new iT(_w.RadialGradient,o)];else t=o}else if("p"===n){var a=t,l=i2.exec(a);if(l){var s=l[1],u=l[2];switch(s){case"a":s="repeat";break;case"x":s="repeat-x";break;case"y":s="repeat-y";break;default:s="no-repeat"}return{image:u,repetition:s}}return null}}});function i9(t){return t&&!!t.image}function i7(t){return t&&!nQ(t.r)&&!nQ(t.g)&&!nQ(t.b)}var ot=iw(function(t){if(i9(t))return ek({repetition:"repeat"},t);if(nQ(t)&&(t=""),"transparent"===t)return iY;"currentColor"===t&&(t="black");var e=i8(t);if(e)return e;var n=rL(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),iX.apply(void 0,eT([],ej(r),!1))});function oe(t,e){if(i7(t)&&i7(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(n0(e[n],0,255));return e[3]=n0(e[3],0,1),"rgba(".concat(e.join(","),")")}]}function on(t,e){if(nQ(e))return iK(0,"px");if(isFinite(Number(e="".concat(e).trim().toLowerCase()))){if("px".search(t)>=0)return iK(Number(e),"px");else if("deg".search(t)>=0)return iK(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 iK(Number(e.replace(RegExp("U"+t,"g"),"").replace(RegExp(r,"g"),"*0")),t)})[0]}var or=function(t){return on(/px/g,t)},oi=iw(or);iw(function(t){return on(RegExp("%","g"),t)});var oo=function(t){return nK(t)||isFinite(Number(t))?iK(Number(t)||0,"px"):on(RegExp("px|%|em|rem","g"),t)},oa=iw(oo),ol=function(t){return on(RegExp("deg|rad|grad|turn","g"),t)},os=iw(ol);function ou(t){var e=0;return t.unit===_g.kDegrees?e=t.value:t.unit===_g.kRadians?e=ir(Number(t.value)):t.unit===_g.kTurns&&(e=360*Number(t.value)),e}function oc(t,e){var n;if(Array.isArray(t)?n=t.map(function(t){return Number(t)}):nJ(t)?n=t.split(" ").map(function(t){return Number(t)}):nK(t)&&(n=[t]),2===e)if(1===n.length)return[n[0],n[0]];else return[n[0],n[1]];return 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]]}function of(t){return nJ(t)?t.split(" ").map(function(t){return oa(t)}):t.map(function(t){return oa(t.toString())})}function op(t,e,n){if(0===t.value)return 0;if(t.unit===_g.kPixels)return Number(t.value);if(t.unit===_g.kPercentage&&n){var r=n.nodeName===_c.GROUP?n.getLocalBounds():n.geometry.contentBounds;return t.value/100*r.halfExtents[e]*2}return 0}var oh=["blur","brightness","drop-shadow","contrast","grayscale","sepia","saturate","hue-rotate","invert"];function od(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,oh.indexOf(e[1])>-1&&r.push({name:e[1],params:e[2].split(" ").map(function(t){return on(/deg|rad|grad|turn|px|%/g,t)||ot(t)})}),n.lastIndex===t.length)return r;return[]}function oy(t){return t.toString()}var og=function(t){return"number"==typeof t?iK(t):/^\s*[-+]?(\d*\.)?\d+\s*$/.test(t)?iK(Number(t)):iK(0)},om=iw(og);function ov(t,e){return[t,e,oy]}function ob(t,e){return function(n,r){return[n,r,function(n){return oy(n0(n,t,e))}]}}function ox(t,e){if(t.length===e.length)return[t,e,function(t){return t}]}function oO(t){return 0===t.parsedStyle.path.totalLength&&(t.parsedStyle.path.totalLength=ro(t.parsedStyle.path.absolutePath,void 0,ek(ek({},void 0),{bbox:!1,length:!0})).length),t.parsedStyle.path.totalLength}function ow(t,e){return t[0]===e[0]&&t[1]===e[1]}function oE(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 ok(t,e){return[e[0]+(e[0]-t[0]),e[1]+(e[1]-t[1])]}iw(function(t){return nJ(t)?t.split(" ").map(om):t.map(om)});var oM=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)},o_=function(t,e,n,r,i,o,a,l){e=Math.abs(e),n=Math.abs(n);var s=ie(r=ru(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 u=(t.x-a.x)/2,c=(t.y-a.y)/2,f={x:Math.cos(s)*u+Math.sin(s)*c,y:-Math.sin(s)*u+Math.cos(s)*c},p=Math.pow(f.x,2)/Math.pow(e,2)+Math.pow(f.y,2)/Math.pow(n,2);p>1&&(e=Math.sqrt(p)*e,n=Math.sqrt(p)*n);var h=(Math.pow(e,2)*Math.pow(n,2)-Math.pow(e,2)*Math.pow(f.y,2)-Math.pow(n,2)*Math.pow(f.x,2))/(Math.pow(e,2)*Math.pow(f.y,2)+Math.pow(n,2)*Math.pow(f.x,2)),d=(i!==o?1:-1)*Math.sqrt(h=h<0?0:h),y={x:d*(e*f.y/n),y:d*(-(n*f.x)/e)},g={x:Math.cos(s)*y.x-Math.sin(s)*y.y+(t.x+a.x)/2,y:Math.sin(s)*y.x+Math.cos(s)*y.y+(t.y+a.y)/2},v={x:(f.x-y.x)/e,y:(f.y-y.y)/n},b=oM({x:1,y:0},v),x=oM(v,{x:(-f.x-y.x)/e,y:(-f.y-y.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(s)*w-Math.sin(s)*E+g.x,y:Math.sin(s)*w+Math.cos(s)*E+g.y,ellipticalArcStartAngle:b,ellipticalArcEndAngle:b+x,ellipticalArcAngle:O,ellipticalArcCenter:g,resultantRx:e,resultantRy:n}};function oS(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=o_({x:t.prePoint[0],y:t.prePoint[1]},o,l,s,!!u,!!c,{x:t.currentPoint[0],y:t.currentPoint[1]},e),p=o_({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 oP(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function oj(t,e){return oP(t)*oP(e)?(t[0]*e[0]+t[1]*e[1])/(oP(t)*oP(e)):1}function oA(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(oj(t,e))}function oT(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 oC(t,e){void 0===e&&(e=t.getLocalTransform());var n,r,i,o,a,l,s,u,c,f,p=[];switch(t.nodeName){case _c.LINE:var h=t.parsedStyle,d=h.x1,y=h.y1,g=h.x2,v=h.y2;p=[["M",void 0===d?0:d,void 0===y?0:y],["L",void 0===g?0:g,void 0===v?0:v]];break;case _c.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;p=oT(O,O,E,M);break;case _c.ELLIPSE:var _=t.parsedStyle,S=_.rx,P=_.ry,j=_.cx,E=void 0===j?0:j,A=_.cy,M=void 0===A?0:A;p=oT(void 0===S?0:S,void 0===P?0:P,E,M);break;case _c.POLYLINE:case _c.POLYGON:n=t.parsedStyle.points.points,r=t.nodeName===_c.POLYGON,i=n.map(function(t,e){return[0===e?"M":"L",t[0],t[1]]}),r&&i.push(["Z"]),p=i;break;case _c.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;p=function(t,e,n,r,i){if(i){var o=ej(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);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 n0(t,0,Math.min(Math.abs(N)/2,Math.abs(I)/2))}));break;case _c.PATH:p=eT([],ej(t.parsedStyle.path.absolutePath),!1)}if(p.length)return o=p,a=e,u=void 0===(s=(l=t.parsedStyle).defX)?0:s,f=void 0===(c=l.defY)?0:c,o.reduce(function(t,e){var n="";if("M"===e[0]||"L"===e[0]){var r=eF(e[1]-u,e[2]-f,0);a&&eq(r,r,a),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=eF(e[1]-u,e[2]-f,0),o=eF(e[3]-u,e[4]-f,0),l=eF(e[5]-u,e[6]-f,0);a&&(eq(i,i,a),eq(o,o,a),eq(l,l,a)),n="".concat(e[0]).concat(i[0],",").concat(i[1],",").concat(o[0],",").concat(o[1],",").concat(l[0],",").concat(l[1])}else if("A"===e[0]){var s=eF(e[6]-u,e[7]-f,0);a&&eq(s,s,a),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=eF(e[1]-u,e[2]-f,0),o=eF(e[3]-u,e[4]-f,0);a&&(eq(i,i,a),eq(o,o,a)),n="".concat(e[0]).concat(e[1],",").concat(e[2],",").concat(e[3],",").concat(e[4],"}")}return t+n},"")}var oN=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=rt(t)}catch(n){e=rt(""),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&&ow(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":c.arcParams=function(t,e){var n=e[1],r=e[2],i=ru(ie(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,b=(l+u)/2+Math.cos(i)*g-Math.sin(i)*v,x=(s+c)/2+Math.sin(i)*g+Math.cos(i)*v,O=[(f-g)/n,(p-v)/r],w=[(-1*f-g)/n,(-1*p-v)/r],E=oA([1,0],O),k=oA(O,w);return -1>=oj(O,w)&&(k=Math.PI),oj(O,w)>=1&&(k=0),0===a&&k>0&&(k-=2*Math.PI),1===a&&k<0&&(k+=2*Math.PI),{cx:b,cy:x,rx:ow(t,[u,c])?0:n,ry:ow(t,[u,c])?0:r,startAngle:E,endAngle:E+k,xRotation:i,arcFlag:o,sweepFlag:a}}(n,s)}if("Z"===u)n=i,r=t[o+1];else{var f=s.length;n=[s[f-2],s[f-1]]}r&&"Z"===r[0]&&(r=t[o],e[o]&&(e[o].prePoint=n)),c.currentPoint=n,e[o]&&ow(n,e[o].currentPoint)&&(e[o].prePoint=c.prePoint),c.nextPoint=r?[r[r.length-2],r[r.length-1]]:null;var p=c.prePoint;if(["L","H","V"].includes(u))c.startTangent=[p[0]-n[0],p[1]-n[1]],c.endTangent=[n[0]-p[0],n[1]-p[1]];else if("Q"===u){var h=[s[1],s[2]];c.startTangent=[p[0]-h[0],p[1]-h[1]],c.endTangent=[n[0]-h[0],n[1]-h[1]]}else if("T"===u){var d=e[l-1],h=ok(d.currentPoint,p);"Q"===d.command?(c.command="Q",c.startTangent=[p[0]-h[0],p[1]-h[1]],c.endTangent=[n[0]-h[0],n[1]-h[1]]):(c.command="TL",c.startTangent=[p[0]-n[0],p[1]-n[1]],c.endTangent=[n[0]-p[0],n[1]-p[1]])}else if("C"===u){var y=[s[1],s[2]],g=[s[3],s[4]];c.startTangent=[p[0]-y[0],p[1]-y[1]],c.endTangent=[n[0]-g[0],n[1]-g[1]],0===c.startTangent[0]&&0===c.startTangent[1]&&(c.startTangent=[y[0]-g[0],y[1]-g[1]]),0===c.endTangent[0]&&0===c.endTangent[1]&&(c.endTangent=[g[0]-y[0],g[1]-y[1]])}else if("S"===u){var d=e[l-1],y=ok(d.currentPoint,p),g=[s[1],s[2]];"C"===d.command?(c.command="C",c.startTangent=[p[0]-y[0],p[1]-y[1]]):(c.command="SQ",c.startTangent=[p[0]-g[0],p[1]-g[1]]),c.endTangent=[n[0]-g[0],n[1]-g[1]]}else if("A"===u){var v=oS(c,0),b=v.x,x=v.y,O=oS(c,1,!1),w=O.x,E=O.y;c.startTangent=[b,x],c.endTangent=[w,E]}e.push(c)}return e}(e),l=function(t){for(var e=[],n=[],r=[],i=0;i<t.length;i++){var o=t[i],a=o.currentPoint,l=o.params,s=o.prePoint,u=void 0;switch(o.command){case"Q":u=function(t,e,n,r,i,o){var a=r0(t,n,i)[0],l=r0(e,r,o)[0],s=[t,i],u=[e,o];return void 0!==a&&s.push(rJ(t,n,i,a)),void 0!==l&&u.push(rJ(e,r,o,l)),rq(s,u)}(s[0],s[1],l[1],l[2],l[3],l[4]);break;case"C":u=function(t,e,n,r,i,o,a,l){for(var s=[t,a],u=[e,l],c=rZ(t,n,i,a),f=rZ(e,r,o,l),p=0;p<c.length;p++)s.push(rK(t,n,i,a,c[p]));for(var p=0;p<f.length;p++)u.push(rK(e,r,o,l,f[p]));return rq(s,u)}(s[0],s[1],l[1],l[2],l[3],l[4],l[5],l[6]);break;case"A":var c=o.arcParams;u=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=n*Math.cos(i)*Math.cos(h=c[f])-r*Math.sin(i)*Math.sin(h)+t;d<s&&(s=d),d>u&&(u=d)}for(var y=Math.atan(r/(n*Math.tan(i))),g=1/0,v=-1/0,b=[o,a],f=-(2*Math.PI);f<=2*Math.PI;f+=Math.PI){var x=y+f;o<a?o<x&&x<a&&b.push(x):a<x&&x<o&&b.push(x)}for(var f=0;f<b.length;f++){var O,w=n*Math.sin(i)*Math.cos(O=b[f])+r*Math.cos(i)*Math.sin(O)+e;w<g&&(g=w),w>v&&(v=w)}return{x:s,y:g,width:u-s,height:v-g}}(c.cx,c.cy,c.rx,c.ry,c.xRotation,c.startAngle,c.endAngle);break;default:e.push(a[0]),n.push(a[1])}u&&(o.box=u,e.push(u.x,u.x+u.width),n.push(u.y,u.y+u.height))}e=e.filter(function(t){return!Number.isNaN(t)&&t!==1/0&&t!==-1/0}),n=n.filter(function(t){return!Number.isNaN(t)&&t!==1/0&&t!==-1/0});var f=rl(e),p=rl(n),h=rs(e),d=rs(n);if(0===r.length)return{x:f,y:p,width:h-f,height:d-p};for(var i=0;i<r.length;i++){var o=r[i],a=o.currentPoint;a[0]===f?f-=oE(o,0).xExtra:a[0]===h&&(h+=oE(o,0).xExtra),a[1]===p?p-=oE(o,0).yExtra:a[1]===d&&(d+=oE(o,0).yExtra)}return{x:f,y:p,width:h-f,height:d-p}}(a),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}}},oL=iw(oN);function oI(t){return nJ(t)?oL(t):oN(t)}function oR(t,e,n){var r,i,o,a,l,s,u,c,f,p=t.curve,h=e.curve;p&&0!==p.length||(p=rp(t.absolutePath,!1),t.curve=p),h&&0!==h.length||(h=rp(e.absolutePath,!1),e.curve=h);var d=[p,h];p.length!==h.length&&(d=function t(e,n,r){var i=rh(e),o=rh(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,y?t.ss:[t.s]}).flat()});return g[0].length===g[1].length?g:t(g[0],g[1],p)}(p,h));var y=rd(d[0])!==rd(d[1])?[["M"].concat((i=(r=d[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))})):d[0].map(function(t){return Array.isArray(t)?[].concat(t):t});return[y,(o=d[1],a=o.length-1,l=[],s=0,(c=(u=o.length)-1,f=o.map(function(t,e){return o.map(function(t,n){var r=e+n;return 0===n||o[r]&&"M"===o[r][0]?["M"].concat(o[r].slice(-2)):(r>=u&&(r-=c),o[r])})})).forEach(function(t,e){o.slice(1).forEach(function(t,n){s+=nZ(o[(e+n)%a].slice(-2),y[n%a].slice(-2))}),l[e]=s,s=0}),f[l.indexOf(Math.min.apply(null,l))]),function(t){return t}]}function oD(t,e){var n,r,i=nJ(t)?t.split(" ").map(function(t){var e=ej(t.split(","),2),n=e[0],r=e[1];return[Number(n),Number(r)]}):t,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+=rU(r[0],r[1],i[0],i[1])}return e}(i);i.forEach(function(t,e){if(i[e+1]){var s,u;(n=[0,0])[0]=a/l,s=t[0],u=t[1],r=rU(s,u,i[e+1][0],i[e+1][1]),a+=r,n[1]=a/l,o.push(n)}});var s=Math.min.apply(Math,eT([],ej(i.map(function(t){return t[0]})),!1)),u=Math.min.apply(Math,eT([],ej(i.map(function(t){return t[1]})),!1));return e&&(e.parsedStyle.defX=s,e.parsedStyle.defY=u),{points:i,totalLength:l,segments:o}}function oF(t,e){return[t.points,e.points,function(t){return t}]}function oz(t){return function(e){var n=0;return t.map(function(t){return null===t?e[n++]:t})}}function oB(t){return t}var oW={matrix:["NNNNNN",[null,null,0,0,null,null,0,0,0,0,1,0,null,null,0,1],oB],matrix3d:["NNNNNNNNNNNNNNNN",oB],rotate:["A"],rotatex:["A"],rotatey:["A"],rotatez:["A"],rotate3d:["NNNA"],perspective:["L"],scale:["Nn",oz([null,null,new iB(1)]),oB],scalex:["N",oz([null,new iB(1),new iB(1)]),oz([null,new iB(1)])],scaley:["N",oz([new iB(1),null,new iB(1)]),oz([new iB(1),null])],scalez:["N",oz([new iB(1),new iB(1),null])],scale3d:["NNN",oB],skew:["Aa",null,oB],skewx:["A",null,oz([null,i$])],skewy:["A",null,oz([i$,null])],translate:["Tt",oz([null,null,iW]),oB],translatex:["T",oz([null,iW,iW]),oz([null,iW])],translatey:["T",oz([iW,null,iW]),oz([iW,null])],translatez:["L",oz([iW,iW,null])],translate3d:["TTL",oB]};function o$(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=oW[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()?i$:os(t)},N:om,T:oa,L:oi})[p.toUpperCase()](f):({a:i$,n:u[0],t:iW})[p]))return[];u.push(h)}if(r.push({t:o,d:u}),n.lastIndex===t.length)return r}return[]}function oG(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=oW[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()?i$:ol(t)},N:og,T:oo,L:or})[p.toUpperCase()](f):({a:i$,n:u[0],t:iW})[p]))return[];u.push(h)}if(r.push({t:o,d:u}),n.lastIndex===t.length)return r}return[]}function oH(t){switch(t.t){case"rotatex":return[1,0,0,0,0,Math.cos(i=ie(ou(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=ie(ou(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=ie(ou(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;var e,n,r,i=ie(ou(t.d[3])),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=ie(ou(t.d[0]));return[1,Math.tan(ie(ou(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=ie(ou(t.d[0]))),1,0,0,0,0,1,0,0,0,0,1];case"skewy":return[1,Math.tan(i=ie(ou(t.d[0]))),0,0,0,1,0,0,0,0,1,0,0,0,0,1];case"translate":return[1,0,0,0,0,1,0,0,0,0,1,0,e=op(t.d[0],0,null)||0,n=op(t.d[1],0,null)||0,0,1];case"translatex":return[1,0,0,0,0,1,0,0,0,0,1,0,e=op(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=op(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=op(t.d[0],0,null)||0,1];case"translate3d":return e=op(t.d[0],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,e,n=op(t.d[1],0,null)||0,r=op(t.d[2],0,null)||0,1];case"perspective":var f=op(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 oV(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 oU(t){var e=[0,0,0],n=[1,1,1],r=[0,0,0],i=[0,0,0,1],o=[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}(ia,t)||(eQ(il,ia),il[3]=0,il[7]=0,il[11]=0,il[15]=1,1e-8>Math.abs(e4(il))))){var a,l,s,u,c,f,p,h,d,y,g=ia[3],v=ia[7],b=ia[11],x=ia[12],O=ia[13],w=ia[14],E=ia[15];if(0!==g||0!==v||0!==b){if(is[0]=g,is[1]=v,is[2]=b,is[3]=E,!e5(il,il))return;e2(il,il),nz(i,is,il)}else i[0]=i[1]=i[2]=0,i[3]=1;if(e[0]=x,e[1]=O,e[2]=w,a=iu,l=ia,a[0][0]=l[0],a[0][1]=l[1],a[0][2]=l[2],a[1][0]=l[4],a[1][1]=l[5],a[1][2]=l[6],a[2][0]=l[8],a[2][1]=l[9],a[2][2]=l[10],n[0]=eD(iu[0]),eH(iu[0],iu[0]),r[0]=eV(iu[0],iu[1]),ip(iu[1],iu[1],iu[0],1,-r[0]),n[1]=eD(iu[1]),eH(iu[1],iu[1]),r[0]/=n[1],r[1]=eV(iu[0],iu[2]),ip(iu[2],iu[2],iu[0],1,-r[1]),r[2]=eV(iu[1],iu[2]),ip(iu[2],iu[2],iu[1],1,-r[2]),n[2]=eD(iu[2]),eH(iu[2],iu[2]),r[1]/=n[2],r[2]/=n[2],s=iu[1],u=iu[2],c=s[0],f=s[1],p=s[2],h=u[0],d=u[1],y=u[2],ic[0]=f*y-p*d,ic[1]=p*h-c*y,ic[2]=c*d-f*h,0>eV(iu[0],ic))for(var k=0;k<3;k++)n[k]*=-1,iu[k][0]*=-1,iu[k][1]*=-1,iu[k][2]*=-1;o[0]=.5*Math.sqrt(Math.max(1+iu[0][0]-iu[1][1]-iu[2][2],0)),o[1]=.5*Math.sqrt(Math.max(1-iu[0][0]+iu[1][1]-iu[2][2],0)),o[2]=.5*Math.sqrt(Math.max(1-iu[0][0]-iu[1][1]+iu[2][2],0)),o[3]=.5*Math.sqrt(Math.max(1+iu[0][0]+iu[1][1]+iu[2][2],0)),iu[2][1]>iu[1][2]&&(o[0]=-o[0]),iu[0][2]>iu[2][0]&&(o[1]=-o[1]),iu[1][0]>iu[0][1]&&(o[2]=-o[2])}}(0===t.length?[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]:t.map(oH).reduce(oV),e,n,r,i,o),[[e,n,r,o,i]]}var oq=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 oY(t){return t.toFixed(6).replace(".000000","")}function oX(t,e){var n,r;return(t.decompositionPair!==e&&(t.decompositionPair=e,n=oU(t)),e.decompositionPair!==t&&(e.decompositionPair=t,r=oU(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=n0(r,-1,1);var i=[];if(1===r)i=t;else for(var o=Math.acos(r),a=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 oq(t[0],t[1],t[2],e,t[4]).map(oY).join(",")}])}function oK(t){return t.replace(/[xy]/,"")}function oZ(t){return t.replace(/(x|y|z|3d)?$/,"3d")}function oQ(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));e.push({t:i,d:o.map(function(t){return"number"==typeof t?iK(a):iK(a,t.unit)})})}(i)}var o=[],a=[],l=[];if(t.length!==e.length){var s=oX(t,e);o=[s[0]],a=[s[1]],l=[["matrix",[s[2]]]]}else for(var i=0;i<t.length;i++){var u=t[i].t,c=e[i].t,f=t[i].d,p=e[i].d,h=oW[u],d=oW[c],y=void 0;if("perspective"===u&&"perspective"===c||("matrix"===u||"matrix3d"===u)&&("matrix"===c||"matrix3d"===c)){var s=oX([t[i]],[e[i]]);o.push(s[0]),a.push(s[1]),l.push(["matrix",[s[2]]]);continue}if(u===c)y=u;else if(h[2]&&d[2]&&oK(u)===oK(c))y=oK(u),f=h[2](f),p=d[2](p);else if(h[1]&&d[1]&&oZ(u)===oZ(c))y=oZ(u),f=h[1](f),p=d[1](p);else{var s=oX(t,e);o=[s[0]],a=[s[1]],l=[["matrix",[s[2]]]];break}for(var g=[],v=[],b=[],x=0;x<f.length;x++){var s=function(t,e,n,r,i){void 0===i&&(i=0);var o="",a=t.value||0,l=e.value||0,s=iz(t.unit),u=t.convertTo(s),c=e.convertTo(s);return u&&c?(a=u.value,l=c.value,o=iP(t.unit)):(iB.isLength(t.unit)||iB.isLength(e.unit))&&(a=op(t,i,n),l=op(e,i,n),o="px"),[a,l,function(t){return r&&(t=Math.max(t,0)),t+o}]}(f[x],p[x],n,!1,x);g[x]=s[0],v[x]=s[1],b.push(s[2])}o.push(g),a.push(v),l.push([y,b])}if(r){var O=o;o=a,a=O}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 oJ=iw(function(t){if(!nJ(t))return[iK(t[0]||0,"px"),iK(t[1]||0,"px")];if("text-anchor"===t)return[iK(0,"px"),iK(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:[oa(o1(e[0])),oa(o1(e[1]))]}),o0=function(t){if(!nJ(t))return[iK(t[0]||0,"px"),iK(t[1]||0,"px")];if("text-anchor"===t)return[iK(0,"px"),iK(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:[oo(o1(e[0])),oo(o1(e[1]))]};function o1(t){return"center"===t?"50%":"left"===t||"top"===t?"0":"right"===t||"bottom"===t?"100%":t}var o2=[{n:"display",k:["none"]},{n:"opacity",int:!0,inh:!0,d:"1",syntax:_M.OPACITY_VALUE},{n:"fillOpacity",int:!0,inh:!0,d:"1",syntax:_M.OPACITY_VALUE},{n:"strokeOpacity",int:!0,inh:!0,d:"1",syntax:_M.OPACITY_VALUE},{n:"fill",int:!0,k:["none"],d:"none",syntax:_M.PAINT},{n:"fillRule",k:["nonzero","evenodd"],d:"nonzero"},{n:"stroke",int:!0,k:["none"],d:"none",syntax:_M.PAINT,l:!0},{n:"shadowType",k:["inner","outer","both"],d:"outer",l:!0},{n:"shadowColor",int:!0,syntax:_M.COLOR},{n:"shadowOffsetX",int:!0,l:!0,d:"0",syntax:_M.LENGTH_PERCENTAGE},{n:"shadowOffsetY",int:!0,l:!0,d:"0",syntax:_M.LENGTH_PERCENTAGE},{n:"shadowBlur",int:!0,l:!0,d:"0",syntax:_M.SHADOW_BLUR},{n:"lineWidth",int:!0,inh:!0,d:"1",l:!0,a:["strokeWidth"],syntax:_M.LENGTH_PERCENTAGE},{n:"increasedLineWidthForHitTesting",inh:!0,d:"0",l:!0,syntax:_M.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:_M.LENGTH_PERCENTAGE_12},{n:"lineDashOffset",int:!0,inh:!0,d:"0",a:["strokeDashoffset"],syntax:_M.LENGTH_PERCENTAGE},{n:"offsetPath",syntax:_M.DEFINED_PATH},{n:"offsetDistance",int:!0,syntax:_M.OFFSET_DISTANCE},{n:"dx",int:!0,l:!0,d:"0",syntax:_M.LENGTH_PERCENTAGE},{n:"dy",int:!0,l:!0,d:"0",syntax:_M.LENGTH_PERCENTAGE},{n:"zIndex",ind:!0,int:!0,d:"0",k:["auto"],syntax:_M.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:_M.FILTER},{n:"clipPath",syntax:_M.DEFINED_PATH},{n:"textPath",syntax:_M.DEFINED_PATH},{n:"textPathSide",k:["left","right"],d:"left"},{n:"textPathStartOffset",l:!0,d:"0",syntax:_M.LENGTH_PERCENTAGE},{n:"transform",p:100,int:!0,k:["none"],d:"none",syntax:_M.TRANSFORM},{n:"transformOrigin",p:100,d:function(t){return t===_c.CIRCLE||t===_c.ELLIPSE?"center":t===_c.TEXT?"text-anchor":"left top"},l:!0,syntax:_M.TRANSFORM_ORIGIN},{n:"anchor",p:99,d:function(t){return t===_c.CIRCLE||t===_c.ELLIPSE?"0.5 0.5":"0 0"},l:!0,syntax:_M.LENGTH_PERCENTAGE_12},{n:"cx",int:!0,d:"0",syntax:_M.COORDINATE},{n:"cy",int:!0,d:"0",syntax:_M.COORDINATE},{n:"cz",int:!0,d:"0",syntax:_M.COORDINATE},{n:"r",int:!0,l:!0,d:"0",syntax:_M.LENGTH_PERCENTAGE},{n:"rx",int:!0,l:!0,d:"0",syntax:_M.LENGTH_PERCENTAGE},{n:"ry",int:!0,l:!0,d:"0",syntax:_M.LENGTH_PERCENTAGE},{n:"x",int:!0,d:"0",syntax:_M.COORDINATE},{n:"y",int:!0,d:"0",syntax:_M.COORDINATE},{n:"z",int:!0,d:"0",syntax:_M.COORDINATE},{n:"width",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:_M.LENGTH_PERCENTAGE},{n:"height",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:_M.LENGTH_PERCENTAGE},{n:"radius",int:!0,l:!0,d:"0",syntax:_M.LENGTH_PERCENTAGE_14},{n:"x1",int:!0,l:!0,syntax:_M.COORDINATE},{n:"y1",int:!0,l:!0,syntax:_M.COORDINATE},{n:"z1",int:!0,l:!0,syntax:_M.COORDINATE},{n:"x2",int:!0,l:!0,syntax:_M.COORDINATE},{n:"y2",int:!0,l:!0,syntax:_M.COORDINATE},{n:"z2",int:!0,l:!0,syntax:_M.COORDINATE},{n:"path",int:!0,l:!0,d:"",a:["d"],syntax:_M.PATH,p:50},{n:"points",int:!0,l:!0,syntax:_M.LIST_OF_POINTS,p:50},{n:"text",l:!0,d:"",syntax:_M.TEXT,p:50},{n:"textTransform",l:!0,inh:!0,k:["capitalize","uppercase","lowercase","none"],d:"none",syntax:_M.TEXT_TRANSFORM,p:51},{n:"font",l:!0},{n:"fontSize",int:!0,inh:!0,d:"16px",l:!0,syntax:_M.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:_M.LENGTH,int:!0,d:"0"},{n:"letterSpacing",l:!0,syntax:_M.LENGTH,int:!0,d:"0"},{n:"miterLimit",l:!0,syntax:_M.NUMBER,d:function(t){return t===_c.PATH||t===_c.POLYGON||t===_c.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:_M.MARKER},{n:"markerEnd",syntax:_M.MARKER},{n:"markerMid",syntax:_M.MARKER},{n:"markerStartOffset",syntax:_M.LENGTH,l:!0,int:!0,d:"0"},{n:"markerEndOffset",syntax:_M.LENGTH,l:!0,int:!0,d:"0"}],o5=o2.filter(function(t){return!!t.l}).map(function(t){return t.n}),o3={},o4=new WeakMap,o6=function(t,e){var n=o4.get(t);return!n||0===n.length||n.includes(e)},o8=function(){function t(t){var e=this;this.runtime=t,o2.forEach(function(t){e.registerMetadata(t)})}return t.prototype.registerMetadata=function(t){eT([t.n],ej(t.a||[]),!1).forEach(function(e){o3[e]=t})},t.prototype.unregisterMetadata=function(t){delete o3[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<o5.length;s++)if(o5[s]in e){l=!0;break}}e.fill&&(t.parsedStyle.fill=ot(e.fill)),e.stroke&&(t.parsedStyle.stroke=ot(e.stroke)),e.shadowColor&&(t.parsedStyle.shadowColor=ot(e.shadowColor)),e.filter&&(t.parsedStyle.filter=od(e.filter)),nQ(e.radius)||(t.parsedStyle.radius=oc(e.radius,4)),nQ(e.lineDash)||(t.parsedStyle.lineDash=oc(e.lineDash,2)),e.points&&(t.parsedStyle.points=oD(e.points,t)),""===e.path&&(t.parsedStyle.path=ek({},iQ)),e.path&&(t.parsedStyle.path=oI(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=oc(e.anchor,2)),e.transform&&(t.parsedStyle.transform=o$(e.transform)),e.transformOrigin&&(t.parsedStyle.transformOrigin=oJ(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!==_c.CIRCLE&&t.nodeName!==_c.ELLIPSE||nQ(e.cx)&&nQ(e.cy))&&(t.nodeName!==_c.RECT&&t.nodeName!==_c.IMAGE&&t.nodeName!==_c.GROUP&&t.nodeName!==_c.HTML&&t.nodeName!==_c.TEXT&&t.nodeName!==_c.MESH||nQ(e.x)&&nQ(e.y)&&nQ(e.z))&&(t.nodeName!==_c.LINE||nQ(e.x1)&&nQ(e.y1)&&nQ(e.z1)&&nQ(e.x2)&&nQ(e.y2)&&nQ(e.z2))||this.runtime.CSSPropertySyntaxFactory["<coordinate>"].postProcessor(t,i),nQ(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),nQ(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=o3[n])?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=o3[t],o=e;if((""===e||nQ(e))&&(e="unset"),"unset"===e||"initial"===e||"inherit"===e)o=iU(e);else if(i){var a=i.k,l=i.syntax,s=l&&this.getPropertySyntax(l);a&&a.indexOf(e)>-1?o=iU(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=o3[t],o="g-root"===n.id,a=e;if(i){var l=i.syntax,s=i.inh,u=i.d;if(e instanceof iC){var c=e.value;if("unset"===c&&(c=s&&!o?"inherit":"initial"),"initial"===c)nQ(u)||(e=this.parseProperty(t,iI(u)?u(n.nodeName):u,n,r));else if("inherit"===c){var f=this.tryToResolveProperty(n,t,{inherited:!0});return nQ(f)?void this.addUnresolveProperty(n,t):f}}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 iC?e.value:e}return a},t.prototype.postProcessProperty=function(t,e,n){var r=o3[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=o4.get(t);n||(o4.set(t,[]),n=o4.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&&o6(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=o4.get(t);if(e&&e.length){var n={};e.forEach(function(e){n[e]=t.attributes[e]}),this.processProperties(t,n),o4.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 ih),r.renderBounds||(r.renderBounds=new ih);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,b=i.filter,x=i.transformOrigin,O=i.anchor;e===_c.TEXT?delete i.anchor:e===_c.MESH&&(i.anchor[2]=.5);var w=[(1-2*(O&&O[0]||0))*a/2+(void 0===u?0:u),(1-2*(O&&O[1]||0))*l/2+(void 0===c?0:c),(1-2*(O&&O[2]||0))*p[2]+(void 0===f?0:f)];r.contentBounds.update(w,p);var E=e===_c.POLYLINE||e===_c.POLYGON||e===_c.PATH?Math.SQRT2:.5;if(h&&!h.isNone){var k=((d||0)+(y||0))*E;p[0]+=k,p[1]+=k}if(r.renderBounds.update(w,p),v&&g&&"inner"!==g){var M=r.renderBounds,_=M.min,S=M.max,P=i.shadowBlur,j=i.shadowOffsetX,A=i.shadowOffsetY,T=P||0,C=j||0,N=A||0,L=_[0]-T+C,I=S[0]+T+C,R=_[1]-T+N,D=S[1]+T+N;_[0]=Math.min(_[0],L),S[0]=Math.max(S[0],I),_[1]=Math.min(_[1],R),S[1]=Math.max(S[1],D),r.renderBounds.setMinMax(_,S)}(void 0===b?[]:b).forEach(function(t){var e=t.name,n=t.params;if("blur"===e){var i=n[0].value;r.renderBounds.update(r.renderBounds.center,r8(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)}}),O=i.anchor;var F=a<0,z=l<0,B=(F?-1:1)*(x?op(x[0],0,t):0),W=(z?-1:1)*(x?op(x[1],1,t):0);B-=(F?-1:1)*(O&&O[0]||0)*r.contentBounds.halfExtents[0]*2,W-=(z?-1:1)*(O&&O[1]||0)*r.contentBounds.halfExtents[1]*2,t.setOrigin(B,W),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===_c.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===_c.CIRCLE&&t.style.rawR&&(t.style.r=t.style.rawR,delete t.style.rawR))},t.prototype.isPropertyInheritable=function(t){var e=o3[t];return!!e&&e.inh},t}(),o9=function(){function t(){this.parser=os,this.parserUnmemoize=ol,this.parserWithCSSDisabled=null,this.mixer=ov}return t.prototype.calculator=function(t,e,n,r){return ou(n)},t}(),o7=function(){function t(){}return t.prototype.calculator=function(t,e,n,r,i){return n instanceof iC&&(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}(),at=function(){function t(){this.parser=ot,this.parserWithCSSDisabled=ot,this.mixer=oe}return t.prototype.calculator=function(t,e,n,r){return n instanceof iC?"none"===n.value?iq:iY:n},t}(),ae=function(){function t(){this.parser=od}return t.prototype.calculator=function(t,e,n){return n instanceof iC?[]:n},t}();function an(t){var e=t.parsedStyle.fontSize;return nQ(e)?null:e}var ar=function(){function t(){this.parser=oa,this.parserUnmemoize=oo,this.parserWithCSSDisabled=null,this.mixer=ov}return t.prototype.calculator=function(t,e,n,r,i){if(nK(n))return n;if(!iB.isRelativeUnit(n.unit))return n.value;var o,a=i.styleValueRegistry;if(n.unit===_g.kPercentage)return 0;if(n.unit===_g.kEms){if(r.parentNode){var l=an(r.parentNode);if(l)return l*n.value;a.addUnresolveProperty(r,t)}else a.addUnresolveProperty(r,t);return 0}if(n.unit===_g.kRems){if(null==(o=null==r?void 0:r.ownerDocument)?void 0:o.documentElement){var l=an(r.ownerDocument.documentElement);if(l)return l*n.value;a.addUnresolveProperty(r,t)}else a.addUnresolveProperty(r,t);return 0}},t}(),ai=function(){function t(){this.mixer=ox}return t.prototype.parser=function(t){var e=of(nK(t)?[t]:t);return 1===e.length?[e[0],e[0]]:[e[0],e[1]]},t.prototype.calculator=function(t,e,n){return n.map(function(t){return t.value})},t}(),ao=function(){function t(){this.mixer=ox}return t.prototype.parser=function(t){var e=of(nK(t)?[t]:t);return 1===e.length?[e[0],e[0],e[0],e[0]]:2===e.length?[e[0],e[1],e[0],e[1]]:3===e.length?[e[0],e[1],e[2],e[1]]:[e[0],e[1],e[2],e[3]]},t.prototype.calculator=function(t,e,n){return n.map(function(t){return t.value})},t}(),aa=eK();function al(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||[iW,iW];e.translateLocal(l[0].value,l[1].value,0)}else if("translatex"===i){var l=o||[iW];e.translateLocal(l[0].value,0,0)}else if("translatey"===i){var l=o||[iW];e.translateLocal(0,l[0].value,0)}else if("translatez"===i){var l=o||[iW];e.translateLocal(0,0,l[0].value)}else if("translate3d"===i){var l=o||[iW,iW,iW];e.translateLocal(l[0].value,l[1].value,l[2].value)}else if("rotate"===i){var s=o||[i$];e.rotateLocal(0,0,ou(s[0]))}else if("rotatex"===i){var s=o||[i$];e.rotateLocal(ou(s[0]),0,0)}else if("rotatey"===i){var s=o||[i$];e.rotateLocal(0,ou(s[0]),0)}else if("rotatez"===i){var s=o||[i$];e.rotateLocal(0,0,ou(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(ie(u[0]),ie(u[1]))}else if("skewx"===i){var u=(null==o?void 0:o.map(function(t){return t.value}))||[0];e.setLocalSkew(ie(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],ie(u[0]))}else if("matrix"===i){var c=ej(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(e0(aa,f,p,0,0,h,d,0,0,0,0,1,0,y+n,g+r,0,1))}else"matrix3d"===i&&(e0.apply(tg,eT([aa],ej(o.map(function(t){return t.value})),!1)),aa[12]+=n,aa[13]+=r,e.setLocalTransform(aa))}),e.getLocalTransform()}var as=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return eE(e,t),e.prototype.postProcessor=function(t,e){switch(t.nodeName){case _c.CIRCLE:case _c.ELLIPSE:var n,r,i,o=t.parsedStyle,a=o.cx,l=o.cy,s=o.cz;nQ(a)||(n=a),nQ(l)||(r=l),nQ(s)||(i=s);break;case _c.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 _c.RECT:case _c.IMAGE:case _c.GROUP:case _c.HTML:case _c.TEXT:case _c.MESH:nQ(t.parsedStyle.x)||(n=t.parsedStyle.x),nQ(t.parsedStyle.y)||(r=t.parsedStyle.y),nQ(t.parsedStyle.z)||(i=t.parsedStyle.z)}if(t.nodeName!==_c.PATH&&t.nodeName!==_c.POLYLINE&&t.nodeName!==_c.POLYGON&&(t.parsedStyle.defX=n||0,t.parsedStyle.defY=r||0),(!nQ(n)||!nQ(r)||!nQ(i))&&-1===e.indexOf("transform")){var h=t.parsedStyle.transform;if(h&&h.length)al(h,t);else{var d=ej(t.getLocalPosition(),3),y=d[0],g=d[1],v=d[2];t.setLocalPosition(nQ(n)?y:n,nQ(r)?g:r,nQ(i)?v:i)}}},e}(ar),au=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){n instanceof iC&&(n=null);var i=null==n?void 0:n.cloneNode(!0);return i&&(i.style.isMarker=!0),i},t}(),ac=function(){function t(){this.mixer=ov,this.parser=om,this.parserUnmemoize=og,this.parserWithCSSDisabled=null}return t.prototype.calculator=function(t,e,n){return n.value},t}(),af=function(){function t(){this.parser=om,this.parserUnmemoize=og,this.parserWithCSSDisabled=null,this.mixer=ob(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===_c.LINE||i===_c.PATH||i===_c.POLYLINE){var o=n.getPoint(r);o&&(t.parsedStyle.defX=o.x,t.parsedStyle.defY=o.y,t.setLocalPosition(o.x,o.y))}}},t}(),ap=function(){function t(){this.parser=om,this.parserUnmemoize=og,this.parserWithCSSDisabled=null,this.mixer=ob(0,1)}return t.prototype.calculator=function(t,e,n){return n.value},t}(),ah=function(){function t(){this.parser=oI,this.parserWithCSSDisabled=oI,this.mixer=oR}return t.prototype.calculator=function(t,e,n){return n instanceof iC&&"unset"===n.value?{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new im(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===_c.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}(),ad=function(){function t(){this.parser=oD,this.mixer=oF}return t.prototype.postProcessor=function(t,e){if((t.nodeName===_c.POLYGON||t.nodeName===_c.POLYLINE)&&-1===e.indexOf("transform")){var n=t.parsedStyle,r=n.defX,i=n.defY;t.setLocalPosition(r,i)}},t}(),ay=function(t){function e(){var e=t.apply(this,eT([],ej(arguments),!1))||this;return e.mixer=ob(0,1/0),e}return eE(e,t),e}(ar),ag=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){if(n instanceof iC)if("unset"===n.value)return"";else return n.value;return"".concat(n)},t.prototype.postProcessor=function(t){t.nodeValue="".concat(t.parsedStyle.text)||""},t}(),am=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}(),av={},ab=0,ax="u">typeof window&&void 0!==window.document;function aO(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 aw(t){var e,n=t;do{if(null==(e=n.parsedStyle)?void 0:e.clipPath)return n;n=n.parentElement}while(null!==n);return null}function aE(t,e){if(ax)return document.defaultView.getComputedStyle(t,null).getPropertyValue(e)}var ak={touchstart:"pointerdown",touchend:"pointerup",touchendoutside:"pointerupoutside",touchmove:"pointermove",touchcancel:"pointercancel"},aM="object"==typeof performance&&performance.now?performance:Date;function a_(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 aS=1,aP="object"==typeof self&&self.self==self?self:"object"==typeof n.g&&n.g.global==n.g?n.g:{},aj=Date.now(),aA={},aT=Date.now(),aC=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function");var e=Date.now(),n=e-aT,r=aS++;return aA[r]=t,Object.keys(aA).length>1||setTimeout(function(){aT=e;var t=aA;aA={},Object.keys(t).forEach(function(e){return t[e](aP.performance&&"function"==typeof aP.performance.now?aP.performance.now():Date.now()-aj)})},n>16?0:16-n),r},aN=function(t){return"string"!=typeof t?aC:""===t?aP.requestAnimationFrame:aP[t+"RequestAnimationFrame"]},aL=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!!aN(t)}),aI=aN(aL),aR="string"!=typeof aL?function(t){delete aA[t]}:""===aL?aP.cancelAnimationFrame:aP[aL+"CancelAnimationFrame"]||aP[aL+"CancelRequestAnimationFrame"];aP.requestAnimationFrame=aI,aP.cancelAnimationFrame=aR;var aD=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,eT([],ej(t),!1))}))},t}(),aF=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 e_(this,void 0,void 0,function(){var e,n,r;return eS(this,function(i){switch(i.label){case 0:if(!this.callbacks.length)return[3,6];return[4,(r=this.callbacks)[0].apply(r,eT([],ej(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}(),az=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}(),aB=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}(),aW=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],a$=/([\"\'])[^\'\"]+\1/,aG=function(){function t(){this.parser=o$,this.parserUnmemoize=oG,this.parserWithCSSDisabled=oG,this.mixer=oQ}return t.prototype.calculator=function(t,e,n,r){return n instanceof iC?[]:n},t.prototype.postProcessor=function(t){al(t.parsedStyle.transform,t)},t}(),aH=function(){function t(){this.parser=om,this.parserUnmemoize=og}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=_k.Z_INDEX_CHANGED)}},t}(),aV=function(){function t(){}return t.prototype.update=function(t,e){var n=t.r;return{width:2*n,height:2*n}},t}(),aU=function(){function t(){}return t.prototype.update=function(t,e){return{width:2*t.rx,height:2*t.ry}},t}(),aq=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.min(n,i);return{width:Math.max(e,r)-o,height:Math.max(n,i)-a}},t}(),aY=function(){function t(){}return t.prototype.update=function(t){var e=t.path.rect;return{width:e.width,height:e.height}},t}(),aX=function(){function t(){}return t.prototype.update=function(t){if(t.points&&ra(t.points.points)){var e=t.points.points,n=Math.min.apply(Math,eT([],ej(e.map(function(t){return t[0]})),!1)),r=Math.max.apply(Math,eT([],ej(e.map(function(t){return t[0]})),!1)),i=Math.min.apply(Math,eT([],ej(e.map(function(t){return t[1]})),!1));return{width:r-n,height:Math.max.apply(Math,eT([],ej(e.map(function(t){return t[1]})),!1))-i}}return{width:0,height:0}},t}(),aK=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&&!nJ(n)&&(o||(t.width=o=n.width),a||(t.height=a=n.height)),{width:o,height:a}},t}(),aZ=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&&!nQ(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.defaultView)?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],b=0;"center"===o||"middle"===o?(b=a/2,v=[.5,1]):("right"===o||"end"===o)&&(b=a,v=[1,1]);var x=0;return"middle"===l?x=g[1]:"top"===l||"hanging"===l?x=2*g[1]:"alphabetic"===l?x=this.globalRuntime.enableCSSParsing?d-y.ascent:0:("bottom"===l||"ideographic"===l)&&(x=0),s&&(b+=s),u&&(x+=u),t.anchor=[v[0],v[1],0],{width:2*g[0],height:2*g[1],offsetX:b,offsetY:x}},t}(),aQ=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 ig,this.page=new ig,this.canvas=new ig,this.viewport=new ig,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(iv)},t}(),aJ=function(t){function e(){var e=t.apply(this,eT([],ej(arguments),!1))||this;return e.client=new ig,e.movement=new ig,e.offset=new ig,e.global=new ig,e.screen=new ig,e}return eE(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(iv)},e}(aQ),a0=function(t){function e(){var e=t.apply(this,eT([],ej(arguments),!1))||this;return e.width=0,e.height=0,e.isPrimary=!1,e}return eE(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}(aJ),a1=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return eE(e,t),e.prototype.clone=function(){return this.manager.cloneWheelEvent(this)},e}(aJ),a2=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 eE(e,t),e}(aQ),a5=function(){function t(){this.emitter=new eN}return t.prototype.on=function(t,e,n){return this.addEventListener(t,e,n),this},t.prototype.addEventListener=function(t,e,n){var r=ry(n)&&n||rg(n)&&n.capture,i=rg(n)&&n.once,o=iI(e)?void 0:e,a=!1,l="";if(t.indexOf(":")>-1){var s=ej(t.split(":"),2),u=s[0];t=s[1],l=u,a=!0}if(t=r?"".concat(t,"capture"):t,e=iI(e)?e:e.handleEvent,a){var c=e;e=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];(null==(t=e[0].target)?void 0:t.name)===l&&c.apply(void 0,eT([],ej(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=ry(n)&&n||rg(n)&&n.capture,i=iI(e)?void 0:e;return t=r?"".concat(t,"capture"):t,e=iI(e)?e:null==e?void 0:e.handleEvent,this.emitter.off(t,e,i),this},t.prototype.emit=function(t,e){this.dispatchEvent(new a2(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.defaultView){if(t.manager=i.getEventService()||null,!t.manager)return!1;t.defaultPrevented=!1,t.path=[],e||(t.target=this),null==(r=t.manager)||r.dispatchEvent(t,t.type,e)}return!t.defaultPrevented},t}(),a3=function(t){function e(){var e=t.apply(this,eT([],ej(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 eE(e,t),e.isNode=function(t){return!!t.childNodes},Object.defineProperty(e.prototype,"textContent",{get:function(){var t,e,n="";this.nodeName===_c.TEXT&&(n+=this.style.text);try{for(var r=eP(this.childNodes),i=r.next();!i.done;i=r.next()){var o=i.value;o.nodeName===_c.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===_c.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(iv)},e.prototype.lookupNamespaceURI=function(t){throw Error(iv)},e.prototype.lookupPrefix=function(t){throw Error(iv)},e.prototype.normalize=function(){throw Error(iv)},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)?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;else 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}(a5),a4=function(){function t(t,e){var n=this;this.globalRuntime=t,this.context=e,this.emitter=new eN,this.nativeHTMLMap=new WeakMap,this.cursor="default",this.mappingTable={},this.mappingState={trackingData:{}},this.eventPool=new Map,this.tmpMatrix=eK(),this.tmpVec3=eI(),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=aM.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")}a3.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.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"),a3.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&&a3.isNode(o)&&o.parentNode;f&&f!==(a3.isNode(n.rootTarget)&&n.rootTarget.parentNode)&&f!==e.target;)f=f.parentNode;if(!f||f===(a3.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!==(a3.isNode(n.rootTarget)&&n.rootTarget.parentNode);)p.currentTarget=p.target,n.notifyTarget(p),r&&n.notifyTarget(p,"mouseenter"),a3.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!==(a3.isNode(n.rootTarget)&&n.rootTarget.parentNode);)a.currentTarget=a.target,n.notifyTarget(a),r&&n.notifyTarget(a,"mouseleave"),a3.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!==(a3.isNode(n.rootTarget)&&n.rootTarget.parentNode);)o.currentTarget=o.target,n.notifyTarget(o),i&&n.notifyTarget(o,"mouseenter"),a3.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"),a3.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 ig(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 ig(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=e6(this.tmpMatrix,s,l),c=eB(this.tmpVec3,e/o*2-1,(1-n/a)*2-1,0);return eq(c,c,u),new ig(c[0],c[1])},t.prototype.canvas2Viewport=function(t){var e=this.rootTarget.defaultView.getCamera(),n=e.getPerspective(),r=e.getViewTransform(),i=e6(this.tmpMatrix,n,r),o=eB(this.tmpVec3,t.x,t.y,0);eq(this.tmpVec3,this.tmpVec3,i);var a=this.context.config,l=a.width,s=a.height;return new ig((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){n?(t.eventPhase=t.AT_TARGET,t.currentTarget=this.rootTarget.defaultView||null,this.notifyListeners(t,e)):(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++)a3.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.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=eP(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(a0);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(a1);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(a1);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(a0);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=aM.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||a3.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=a3.isNode(e)&&e.parentNode}},t}(),a6=function(){function t(){}return t.prototype.getOrCreateCanvas=function(t,e){if(this.canvas)return this.canvas;if(t||lc.offscreenCanvas)this.canvas=t||lc.offscreenCanvas,this.context=this.canvas.getContext("2d",ek({willReadFrequently:!0},e));else try{this.canvas=new window.OffscreenCanvas(0,0),this.context=this.canvas.getContext("2d",ek({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",ek({willReadFrequently:!0},e))}return this.canvas.width=10,this.canvas.height=10,this.canvas},t.prototype.getOrCreateContext=function(t,e){return this.context||this.getOrCreateCanvas(t,e),this.context},t}();(M9=__||(__={}))[M9.CAMERA_CHANGED=0]="CAMERA_CHANGED",M9[M9.DISPLAY_OBJECT_CHANGED=1]="DISPLAY_OBJECT_CHANGED",M9[M9.NONE=2]="NONE";var a8=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 az,initAsync:new aD,dirtycheck:new aB,cull:new aB,beginFrame:new az,beforeRender:new az,render:new az,afterRender:new az,endFrame:new az,destroy:new az,pick:new aF,pickSync:new aB,pointerDown:new az,pointerUp:new az,pointerMove:new az,pointerOut:new az,pointerOver:new az,pointerWheel:new az,pointerCancel:new az,click:new az}}return t.prototype.init=function(t){var e=this,n=ek(ek({},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(__.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(__.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!==_k.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>aO(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(aO)},t.prototype.destroy=function(){this.inited=!1,this.hooks.destroy.call(),this.globalRuntime.sceneGraphService.clearPendingEvents()},t.prototype.dirtify=function(){this.context.renderingContext.renderReasons.add(__.DISPLAY_OBJECT_CHANGED)},t}(),a9=/\[\s*(.*)=(.*)\s*\]/,a7=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});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});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;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(a9),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 nQ(n)?"":n.toString?n.toString():""},t}(),lt=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 eE(e,t),e.ADDITION=2,e.MODIFICATION=1,e.REMOVAL=3,e}(aQ);function le(t){var e=t.renderable;e&&(e.renderBoundsDirty=!0,e.boundsDirty=!0)}(M7=_S||(_S={})).REPARENT="reparent",M7.DESTROY="destroy",M7.ATTR_MODIFIED="DOMAttrModified",M7.INSERTED="DOMNodeInserted",M7.REMOVED="removed",M7.MOUNTED="DOMNodeInsertedIntoDocument",M7.UNMOUNTED="DOMNodeRemovedFromDocument",M7.BOUNDS_CHANGED="bounds-changed",M7.CULLED="culled";var ln=new lt(_S.REPARENT,null,"","","",0,"",""),lr=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 a2(_S.BOUNDS_CHANGED),this.rotate=(e=nB(),function(t,n,r,i){void 0===r&&(r=0),void 0===i&&(i=0),"number"==typeof n&&(n=eF(n,r,i));var o=t.transformable;if(null!==t.parentNode&&t.parentNode.transformable){var a=nB();nH(a,n[0],n[1],n[2]);var l=h.getRotation(t);nU(e,h.getRotation(t.parentNode)),nG(e,e),n$(a,e,a),n$(o.localRotation,a,l),nq(o.localRotation,o.localRotation),h.dirtifyLocal(t,o)}else h.rotateLocal(t,n)}),this.rotateLocal=(n=nB(),function(t,e,r,i){void 0===r&&(r=0),void 0===i&&(i=0),"number"==typeof e&&(e=eF(e,r,i));var o=t.transformable;nH(n,e[0],e[1],e[2]),n$(o.localRotation,o.localRotation,n),h.dirtifyLocal(t,o)}),this.setEulerAngles=(r=nB(),function(t,e,n,i){void 0===n&&(n=0),void 0===i&&(i=0),"number"==typeof e&&(e=eF(e,n,i));var o=t.transformable;if(null!==t.parentNode&&t.parentNode.transformable){nH(o.localRotation,e[0],e[1],e[2]);var a=h.getRotation(t.parentNode);nU(r,nG(nB(),a)),n$(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=eF(e,n,r));var i,o,a,l,s,u,c,f,p,d,y,g,v,b,x,O,w,E=t.transformable;eY(e,eI())||(i=e,o=e,l=(a=E.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,b=s*v-u*g,x=u*y-l*v,O=l*g-s*y,y*=w=2*c,g*=w,v*=w,b*=2,x*=2,O*=2,i[0]=f+y+b,i[1]=p+g+x,i[2]=d+v+O,eW(E.localPosition,E.localPosition,e),h.dirtifyLocal(t,E))},this.setPosition=(i=eK(),o=eI(),function(t,e){var n=t.transformable;o[0]=e[0],o[1]=e[1],o[2]=e[2]||0,eY(h.getPosition(t),o)||(ez(n.position,o),null!==t.parentNode&&t.parentNode.transformable?(eQ(i,t.parentNode.transformable.worldTransform),e5(i,i),eq(n.localPosition,o,i)):ez(n.localPosition,o),h.dirtifyLocal(t,n))}),this.setLocalPosition=(a=eI(),function(t,e){var n=t.transformable;a[0]=e[0],a[1]=e[1],a[2]=e[2]||0,eY(n.localPosition,a)||(ez(n.localPosition,a),h.dirtifyLocal(t,n))}),this.translate=(l=eI(),s=eI(),u=eI(),function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=eB(s,e,n,r)),eY(e,l)||(eW(u,h.getPosition(t),e),h.setPosition(t,u))}),this.setRotation=function(){var t=nB();return function(e,n,r,i,o){var a=e.transformable;"number"==typeof n&&(n=nV(n,r,i,o)),null!==e.parentNode&&e.parentNode.transformable?(nU(t,h.getRotation(e.parentNode)),nG(t,t),n$(a.localRotation,t,n),nq(a.localRotation,a.localRotation),h.dirtifyLocal(e,a)):h.setLocalRotation(e,n)}},this.displayObjectDependencyMap=new WeakMap,this.calcLocalTransform=(c=eK(),f=eI(),p=nV(0,0,0,1),function(t){if(0!==t.localSkew[0]||0!==t.localSkew[1]){if(ny(t.localTransform,t.localRotation,t.localPosition,eF(1,1,1),t.origin),0!==t.localSkew[0]||0!==t.localSkew[1]){var e=e1(c);e[4]=Math.tan(t.localSkew[0]),e[1]=Math.tan(t.localSkew[1]),e6(t.localTransform,t.localTransform,e)}var n=ny(c,p,f,t.localScale,t.origin);e6(t.localTransform,t.localTransform,n)}else ny(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,nQ(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.length)||(null==(i=t.style)?void 0:i.zIndex))&&(-1===a.dirtyChildren.indexOf(t)&&a.dirtyChildren.push(t),a.dirty=!0,a.dirtyReason=_k.ADDED);var l=t.transformable;l&&this.dirtifyWorld(t,l),l.frozen&&this.unfreezeParentToRoot(t),o&&t.dispatchEvent(ln)},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.length)||(null==(n=t.style)?void 0:n.zIndex))&&(-1===i.dirtyChildren.indexOf(t)&&i.dirtyChildren.push(t),i.dirty=!0,i.dirtyReason=_k.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=eF(e,n,r));var i=t.transformable;nH(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=eF(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=eF(e[0],e[1],e[2]||n.localScale[2]);eY(r,n.localScale)||(ez(n.localScale,r),this.dirtifyLocal(t,n))},t.prototype.setLocalRotation=function(t,e,n,r,i){"number"==typeof e&&(e=nV(e,n,r,i));var o=t.transformable;nU(o.localRotation,e),this.dirtifyLocal(t,o)},t.prototype.setLocalSkew=function(t,e,n){"number"==typeof e&&(r=e,(i=new eL(2))[0]=r,i[1]=n,e=i);var r,i,o,a,l=t.transformable;o=l.localSkew,a=e,o[0]=a[0],o[1]=a[1],this.dirtifyLocal(t,l)},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=ej(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;)le(n),n=n.parentNode;e&&t.forEach(function(t){le(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 lt(_S.ATTR_MODIFIED,n,e,e,t,lt.MODIFICATION,e,e)),n.isCustomElement&&n.isConnected&&n.attributeChangedCallback&&n.attributeChangedCallback(t,e,e)})})},t.prototype.getPosition=function(t){var e=t.transformable;return nf(e.position,this.getWorldTransform(t,e))},t.prototype.getRotation=function(t){var e=t.transformable;return nh(e.rotation,this.getWorldTransform(t,e))},t.prototype.getScale=function(t){var e=t.transformable;return np(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},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=nf(eI(),e),r=nh(nB(),e),i=np(eI(),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(ih.isEmpty(r))return null;var i=n||new ih;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 ih},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 ih).update(r.center,r.halfExtents))}),e){var a=aw(t);if(a){var l=a.parsedStyle.clipPath.getBounds(e);o?l&&(o=l.intersection(o)):o=l}}return o||(o=new ih),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=eK();t.parentNode.transformable&&(e=e5(eK(),this.getWorldTransform(t.parentNode)));var n=this.getBounds(t);if(!ih.isEmpty(n)){var r=new ih;return r.setFromTransformedAABB(n,e),r}}return this.getBounds(t)},t.prototype.getBoundingClientRect=function(t){var e,n,r,i=this.getGeometryBounds(t);ih.isEmpty(i)||(r=new ih).setFromTransformedAABB(i,this.getWorldTransform(t));var o=null==(n=null==(e=t.ownerDocument)?void 0:e.defaultView)?void 0:n.getContextService().getBoundingClientRect();if(r){var a=ej(r.getMin(),2),l=a[0],s=a[1],u=ej(r.getMax(),2),c=u[0],f=u[1];return new im(l+((null==o?void 0:o.left)||0),s+((null==o?void 0:o.top)||0),c-l,f-s)}return new im((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?e6(e.worldTransform,r.worldTransform,e.localTransform):eQ(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}(),li=[10,13],lo=[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288],la=/[a-zA-Z0-9\u00C0-\u00D6\u00D8-\u00f6\u00f8-\u00ff!"#$%&'()*+,-./:;]/,ll=new RegExp("".concat(/[!%),.:;?\]}¢°·'""†‡›℃∶、。〃〆〕〗〞﹚﹜!"%'),.:;?!]}~]/.source,"|").concat(/[!),.:;?\]}¢·–—'"•"、。〆〞〕〉》」︰︱︲︳﹐﹑﹒﹔﹕﹖﹘﹚﹜!),.:;?︶︸︺︼︾﹀﹂﹗]|}、]/.source,"|").concat(/[)\]}〕〉》」』】〙〗〟'"⦆»ヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻‐゠–〜?!‼⁇⁈⁉・、:;,。.]/.source,"|").concat(/[!%),.:;?\]}¢°'"†‡℃〆〈《「『〕!%),.:;?]}]/.source)),ls=new RegExp("".concat(/[$(£¥·'"〈《「『【〔〖〝﹙﹛$(.[{£¥]/.source,"|").concat(/[([{£¥'"‵〈《「『〔〝︴﹙﹛({︵︷︹︻︽︿﹁﹃﹏]/.source,"|").concat(/[([{〔〈《「『【〘〖〝'"⦅«—...‥〳〴〵]/.source,"|").concat(/[$([{£¥'"々〇〉》」〔$([{⦆¥₩#]/.source)),lu=function(){function t(t){var e=this;this.runtime=t,this.fontMetricsCache={},this.shouldBreakByKinsokuShorui=function(t,n){return!e.isBreakingSpace(n)&&!!(t&&(ls.exec(n)||ll.exec(t)))},this.trimByKinsokuShorui=function(t){var e=eT([],ej(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="|\xc9q\xc5M",a=Math.ceil(i.measureText(o).width),l=Math.ceil(i.measureText("M").width),s=2*l;l=1.4*l|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=nK(e)&&"".concat(e,"px")||"16px",l=n.split(","),s=l.length-1;s>=0;s--){var u=l[s].trim();!a$.test(u)&&0>aW.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),b=0;if(c){c.getTotalLength();for(var x=0;x<g.length;x++)var O=y.measureText(g[x]).width+(g[x].length-1)*u}else{for(var x=0;x<g.length;x++){var w=y.measureText(g[x]).width+(g[x].length-1)*u;v[x]=w,b=Math.max(b,w)}var O=b+a,E=o||d.fontSize+a,k=Math.max(E,d.fontSize+a)+(g.length-1)*(E+p);E+=p;var M=0;return"middle"===l?M=-k/2:"bottom"===l||"alphabetic"===l||"ideographic"===l?M=-k:("top"===l||"hanging"===l)&&(M=0),{font:h,width:O,height:k,lines:g,lineWidths:v,lineHeight:E,maxLineWidth:b,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 im(n-a/2,M+e*E,t+a,E)})}}},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),b=Array.from(t),x=0;x<b.length;x++){var O=b[x],w=t[x-1],E=t[x+1],k=g(O);if(this.isNewline(O)){if(++h>=l){e.isOverflowing=!0;break}d=0,p[h]="";continue}if(d>0&&d+k>c){if(h+1>=l){if(e.isOverflowing=!0,v>0&&v<=c){for(var M=p[h].length,_=0,S=M,P=0;P<M;P++){var j=g(p[h][P]);if(_+j+v>c){S=P;break}_+=j}p[h]=(p[h]||"").slice(0,S)+f}break}if(d=0,p[++h]="",this.isBreakingSpace(O))continue;this.canBreakInLastChar(O)||(p=this.trimToBreakable(p),d=this.sumTextWidthByCache(p[h]||"",y)),this.shouldBreakByKinsokuShorui(O,E)&&(p=this.trimByKinsokuShorui(p),d+=g(w||""))}d+=k,p[h]=(p[h]||"")+O}return p.join("\n")},t.prototype.isBreakingSpace=function(t){return"string"==typeof t&&lo.indexOf(t.charCodeAt(0))>=0},t.prototype.isNewline=function(t){return"string"==typeof t&&li.indexOf(t.charCodeAt(0))>=0},t.prototype.trimToBreakable=function(t){var e=eT([],ej(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);return e[e.length-1]+=n.slice(r+1,n.length),e[e.length-2]=n.slice(0,r+ +!o),e},t.prototype.canBreakInLastChar=function(t){return!(t&&la.test(t))},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(!la.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}(),lc={},lf=(_e=new aK,_n=new aX,(_t={})[_c.CIRCLE]=new aV,_t[_c.ELLIPSE]=new aU,_t[_c.RECT]=_e,_t[_c.IMAGE]=_e,_t[_c.GROUP]=_e,_t[_c.LINE]=new aq,_t[_c.TEXT]=new aZ(lc),_t[_c.POLYLINE]=_n,_t[_c.POLYGON]=_n,_t[_c.PATH]=new aY,_t[_c.HTML]=null,_t[_c.MESH]=null,_t),lp=(_i=new at,_o=new ar,(_r={})[_M.PERCENTAGE]=null,_r[_M.NUMBER]=new ac,_r[_M.ANGLE]=new o9,_r[_M.DEFINED_PATH]=new o7,_r[_M.PAINT]=_i,_r[_M.COLOR]=_i,_r[_M.FILTER]=new ae,_r[_M.LENGTH]=_o,_r[_M.LENGTH_PERCENTAGE]=_o,_r[_M.LENGTH_PERCENTAGE_12]=new ai,_r[_M.LENGTH_PERCENTAGE_14]=new ao,_r[_M.COORDINATE]=new as,_r[_M.OFFSET_DISTANCE]=new af,_r[_M.OPACITY_VALUE]=new ap,_r[_M.PATH]=new ah,_r[_M.LIST_OF_POINTS]=new ad,_r[_M.SHADOW_BLUR]=new ay,_r[_M.TEXT]=new ag,_r[_M.TEXT_TRANSFORM]=new am,_r[_M.TRANSFORM]=new aG,_r[_M.TRANSFORM_ORIGIN]=new function(){this.parser=oJ,this.parserUnmemoize=o0},_r[_M.Z_INDEX]=new aH,_r[_M.MARKER]=new au,_r);lc.CameraContribution=iO,lc.AnimationTimeline=null,lc.EasingFunction=null,lc.offscreenCanvasCreator=new a6,lc.sceneGraphSelector=new a7,lc.sceneGraphService=new lr(lc),lc.textService=new lu(lc),lc.geometryUpdaterFactory=lf,lc.CSSPropertySyntaxFactory=lp,lc.styleValueRegistry=new o8(lc),lc.layoutRegistry=null,lc.globalThis="u">typeof globalThis?globalThis:"u">typeof self?self:"u">typeof window?window:void 0!==n.g?n.g:{},lc.enableCSSParsing=!0,lc.enableDataset=!1,lc.enableStyleSyntax=!0,lc.enableSizeAttenuation=!1;var lh=0,ld=new lt(_S.INSERTED,null,"","","",0,"",""),ly=new lt(_S.REMOVED,null,"","","",0,"",""),lg=new a2(_S.DESTROY),lm=function(t){function e(){var e=t.apply(this,eT([],ej(arguments),!1))||this;return e.entity=lh++,e.renderable={bounds:void 0,boundsDirty:!0,renderBounds:void 0,renderBoundsDirty:!0,dirtyRenderBounds:void 0,dirty:!1},e.cullable={strategy:_E.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=lc.enableCSSParsing?{anchor:iH,opacity:iH,fillOpacity:iH,strokeOpacity:iH,fill:iH,stroke:iH,transform:iH,transformOrigin:iH,visibility:iH,pointerEvents:iH,lineWidth:iH,lineCap:iH,lineJoin:iH,increasedLineWidthForHitTesting:iH,fontSize:iH,fontFamily:iH,fontStyle:iH,fontWeight:iH,fontVariant:iH,textAlign:iH,textBaseline:iH,textTransform:iH,zIndex:iH,filter:iH,shadowType:iH}:null,e.parsedStyle={},e.attributes={},e}return eE(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(iv)},e.prototype.appendChild=function(t,e){var n;if(t.destroyed)throw Error("Cannot append a destroyed element.");return lc.sceneGraphService.attach(t,this,e),(null==(n=this.ownerDocument)?void 0:n.defaultView)&&this.ownerDocument.defaultView.mountChildren(t),ld.relatedNode=this,t.dispatchEvent(ld),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 ly.relatedNode=this,t.dispatchEvent(ly),(null==(e=t.ownerDocument)?void 0:e.defaultView)&&t.ownerDocument.defaultView.unmountChildren(t),lc.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 lc.sceneGraphService.matches(t,this)},e.prototype.getElementById=function(t){return lc.sceneGraphService.querySelector("#".concat(t),this)},e.prototype.getElementsByName=function(t){return lc.sceneGraphService.querySelectorAll('[name="'.concat(t,'"]'),this)},e.prototype.getElementsByClassName=function(t){return lc.sceneGraphService.querySelectorAll(".".concat(t),this)},e.prototype.getElementsByTagName=function(t){return lc.sceneGraphService.querySelectorAll(t,this)},e.prototype.querySelector=function(t){return lc.sceneGraphService.querySelector(t,this)},e.prototype.querySelectorAll=function(t){return lc.sceneGraphService.querySelectorAll(t,this)},e.prototype.closest=function(t){var e=this;do{if(lc.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.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=ej(t),i=r[0],o=r.slice(1);this.parentNode.appendChild(i,n),i.after.apply(i,eT([],ej(o),!1))}},e.prototype.replaceWith=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.after.apply(this,eT([],ej(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,eT([],ej(t),!1))},e.prototype.remove=function(){return this.parentNode?this.parentNode.removeChild(this):this},e.prototype.destroy=function(){this.dispatchEvent(lg),this.remove(),this.emitter.removeAllListeners(),this.destroyed=!0},e.prototype.getGeometryBounds=function(){return lc.sceneGraphService.getGeometryBounds(this)},e.prototype.getRenderBounds=function(){return lc.sceneGraphService.getBounds(this,!0)},e.prototype.getBounds=function(){return lc.sceneGraphService.getBounds(this)},e.prototype.getLocalBounds=function(){return lc.sceneGraphService.getLocalBounds(this)},e.prototype.getBoundingClientRect=function(){return lc.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 lc.enableCSSParsing?null:void 0;var e=this.attributes[t];if(void 0!==e)return e;var n=iD(t);return e=this.attributes[n],lc.enableCSSParsing&&nQ(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(iv)},e.prototype.getAttributeNode=function(t){throw Error(iv)},e.prototype.getAttributeNodeNS=function(t,e){throw Error(iv)},e.prototype.hasAttributeNS=function(t,e){throw Error(iv)},e.prototype.removeAttributeNS=function(t,e){throw Error(iv)},e.prototype.removeAttributeNode=function(t){throw Error(iv)},e.prototype.setAttributeNS=function(t,e,n){throw Error(iv)},e.prototype.setAttributeNode=function(t){throw Error(iv)},e.prototype.setAttributeNodeNS=function(t){throw Error(iv)},e.prototype.toggleAttribute=function(t,e){throw Error(iv)},e}(a3);function lv(t){return!!(null==t?void 0:t.nodeName)}var lb=new lt(_S.ATTR_MODIFIED,null,null,null,null,lt.MODIFICATION,null,null),lx={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:""},lO={anchor:[0,0],fill:iq,stroke:iq,transform:[],zIndex:0,filter:[],shadowType:"outer",miterLimit:10},lw=ek(ek({},lO),{opacity:1,fillOpacity:1,strokeOpacity:1,visibility:"visible",pointerEvents:"auto",lineWidth:1,lineCap:"butt",lineJoin:"miter",increasedLineWidthForHitTesting:0,fillRule:"nonzero"}),lE=eT(eT([],ej(["opacity","fillOpacity","strokeOpacity","transformOrigin","visibility","pointerEvents","lineWidth","lineCap","lineJoin","increasedLineWidthForHitTesting"]),!1),["fontSize","fontFamily","fontStyle","fontWeight","fontVariant","textAlign","textBaseline","textTransform"],!1),lk="data-",lM=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)?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||_c.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,lc.enableCSSParsing?lO:lw,r.config.initialParsedStyle),lc.enableCSSParsing&&Object.assign(r.attributes,lx),r.initAttributes(r.config.style);var i=lc.globalThis.Proxy?lc.globalThis.Proxy:function(){};return lc.enableDataset&&(r.dataset=new i({},{get:function(t,e){var n="".concat(lk).concat(iL(e));return void 0!==t[n]?t[n]:r.getAttribute(n)},set:function(t,e,n){return r.setAttribute("".concat(lk).concat(iL(e)),n),!0}})),lc.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 eE(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=ek({},this.attributes);for(var r in n){var i=n[r];lv(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};lc.enableCSSParsing&&(n.usedAttributes=lE);var r={};for(var i in t)r[iD(i)]=t[i];lc.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=iD(e);!rm(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];lc.styleValueRegistry.processProperties(this,((r={})[t]=e,r),n),i.dirty=!0;var l=this.parsedStyle[t];this.isConnected&&(lb.relatedNode=this,lb.prevValue=o,lb.newValue=e,lb.attrName=t,lb.prevParsedValue=a,lb.newParsedValue=l,this.isMutationObserved?this.dispatchEvent(lb):(lb.target=this,this.ownerDocument.defaultView.dispatchEvent(lb,!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=ej(t.getMin(),2),n=e[0],r=e[1],i=ej(t.getMax(),2);return new im(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),lc.sceneGraphService.setOrigin(this,it(t,e,n)),this},e.prototype.getOrigin=function(){return lc.sceneGraphService.getOrigin(this)},e.prototype.setPosition=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),lc.sceneGraphService.setPosition(this,it(t,e,n)),this},e.prototype.setLocalPosition=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),lc.sceneGraphService.setLocalPosition(this,it(t,e,n)),this},e.prototype.translate=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),lc.sceneGraphService.translate(this,it(t,e,n)),this},e.prototype.translateLocal=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),lc.sceneGraphService.translateLocal(this,it(t,e,n)),this},e.prototype.getPosition=function(){return lc.sceneGraphService.getPosition(this)},e.prototype.getLocalPosition=function(){return lc.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=it(t,e,n)),lc.sceneGraphService.scaleLocal(this,t),this},e.prototype.setLocalScale=function(t,e,n){return"number"==typeof t&&(e=e||t,n=n||t,t=it(t,e,n)),lc.sceneGraphService.setLocalScale(this,t),this},e.prototype.getLocalScale=function(){return lc.sceneGraphService.getLocalScale(this)},e.prototype.getScale=function(){return lc.sceneGraphService.getScale(this)},e.prototype.getEulerAngles=function(){return ir(ej(ii(eI(),lc.sceneGraphService.getWorldTransform(this)),3)[2])},e.prototype.getLocalEulerAngles=function(){return ir(ej(ii(eI(),lc.sceneGraphService.getLocalRotation(this)),3)[2])},e.prototype.setEulerAngles=function(t){return lc.sceneGraphService.setEulerAngles(this,0,0,t),this},e.prototype.setLocalEulerAngles=function(t){return lc.sceneGraphService.setLocalEulerAngles(this,0,0,t),this},e.prototype.rotateLocal=function(t,e,n){return nQ(e)&&nQ(n)?lc.sceneGraphService.rotateLocal(this,0,0,t):lc.sceneGraphService.rotateLocal(this,t,e,n),this},e.prototype.rotate=function(t,e,n){return nQ(e)&&nQ(n)?lc.sceneGraphService.rotate(this,0,0,t):lc.sceneGraphService.rotate(this,t,e,n),this},e.prototype.setRotation=function(t,e,n,r){return lc.sceneGraphService.setRotation(this,t,e,n,r),this},e.prototype.setLocalRotation=function(t,e,n,r){return lc.sceneGraphService.setLocalRotation(this,t,e,n,r),this},e.prototype.setLocalSkew=function(t,e){return lc.sceneGraphService.setLocalSkew(this,t,e),this},e.prototype.getRotation=function(){return lc.sceneGraphService.getRotation(this)},e.prototype.getLocalRotation=function(){return lc.sceneGraphService.getLocalRotation(this)},e.prototype.getLocalSkew=function(){return lc.sceneGraphService.getLocalSkew(this)},e.prototype.getLocalTransform=function(){return lc.sceneGraphService.getLocalTransform(this)},e.prototype.getWorldTransform=function(){return lc.sceneGraphService.getWorldTransform(this)},e.prototype.setLocalTransform=function(t){return lc.sceneGraphService.setLocalTransform(this,t),this},e.prototype.resetLocalTransform=function(){lc.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.timeline;return r?r.play(this,t,e):null},e.prototype.isVisible=function(){var t;return(null==(t=this.parsedStyle)?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.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,eT([],ej(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,eT([],ej(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=ej(e,2),i=r[0],o=r[1];return i?rg(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=t||this.getWorldTransform(),c=ej(nf(eI(),u),2),f=c[0],p=c[1],h=ej(np(eI(),u),2),d=h[0],y=h[1],g=nh(nB(),u),v=ej(ii(eI(),g),3),b=v[0],x=v[2];return n=Math.cos(e=b||x),r=Math.sin(e),i=d*n,o=y*r,a=-d*r,l=y*n,(s=new eL(9))[0]=i,s[1]=o,s[2]=0,s[3]=a,s[4]=l,s[5]=0,s[6]=f,s[7]=p,s[8]=1,s},e.prototype.getLocalMatrix=function(){return this.getMatrix(this.getLocalTransform())},e.prototype.setMatrix=function(t){var e=ej(io(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=ej(io(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(){lc.enableCSSParsing?this.style.visibility="visible":this.forEach(function(t){t.style.visibility="visible"})},e.prototype.hide=function(){lc.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}(lm),l_=function(t){var e=t.name,n=t.inherits,r=t.interpolable,i=t.initialValue,o=t.syntax;lc.styleValueRegistry.registerMetadata({n:e,inh:n,int:r,d:i,syntax:o})},lS=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=eM(e,["style"]);return t.call(this,ek({type:_c.CIRCLE,style:lc.enableCSSParsing?ek({cx:"",cy:"",r:""},n):ek({},n),initialParsedStyle:{anchor:[.5,.5],transformOrigin:lc.enableCSSParsing?null:[iZ,iZ]}},r))||this}return eE(e,t),e}(lM),lP=function(t){function e(e){void 0===e&&(e={});var n=this,r=e.style,i=eM(e,["style"]);return(n=t.call(this,ek({style:lc.enableCSSParsing?ek({x:"",y:""},r):ek({},r)},i))||this).isCustomElement=!0,n}return eE(e,t),e}(lM),lj=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=eM(e,["style"]);return t.call(this,ek({type:_c.ELLIPSE,style:lc.enableCSSParsing?ek({cx:"",cy:"",rx:"",ry:""},n):ek({},n),initialParsedStyle:{anchor:[.5,.5],transformOrigin:lc.enableCSSParsing?null:[iZ,iZ]}},r))||this}return eE(e,t),e}(lM),lA=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=eM(e,["style"]);return t.call(this,ek({type:_c.GROUP,style:lc.enableCSSParsing?ek({x:"",y:"",width:"",height:""},n):ek({},n)},r))||this}return eE(e,t),e}(lM),lT=function(t){function e(e){void 0===e&&(e={});var n=this,r=e.style,i=eM(e,["style"]);return(n=t.call(this,ek({type:_c.HTML,style:lc.enableCSSParsing?ek({x:"",y:"",width:"auto",height:"auto",innerHTML:""},r):ek({},r)},i))||this).cullable.enable=!1,n}return eE(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 im(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.defaultView)?void 0:e.getContextService().getBoundingClientRect(),i=new ih,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=e5(eK(),this.parentNode.getWorldTransform()),e=this.getBounds();if(!ih.isEmpty(e)){var n=new ih;return n.setFromTransformedAABB(e,t),n}}return this.getBounds()},e}(lM),lC=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=eM(e,["style"]);return t.call(this,ek({type:_c.IMAGE,style:lc.enableCSSParsing?ek({x:"",y:"",img:"",width:"",height:""},n):ek({},n)},r))||this}return eE(e,t),e}(lM),lN=function(t){function e(e){void 0===e&&(e={});var n=this,r=e.style,i=eM(e,["style"]);(n=t.call(this,ek({type:_c.LINE,style:ek({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&&lv(a)&&(n.markerStartAngle=a.getLocalEulerAngles(),n.appendChild(a)),l&&lv(l)&&(n.markerEndAngle=l.getLocalEulerAngles(),n.appendChild(l)),n.transformMarker(!0),n.transformMarker(!1),n}return eE(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&&lv(r)&&(this.markerStartAngle=0,r.remove()),i&&lv(i)&&(this.markerStartAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!0))):"markerEnd"===t&&(r&&lv(r)&&(this.markerEndAngle=0,r.remove()),i&&lv(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,b=t?s:u;if(b&&lv(b)){var x=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),x=Math.atan2(n,e),b.setLocalEulerAngles(180*x/Math.PI+a),b.setLocalPosition(r+Math.cos(x)*o,i+Math.sin(x)*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=rX(r,i,o,a,t),c=u.x,f=u.y,p=eq(eI(),eF(c-l,f-s,0),e?this.getWorldTransform():this.getLocalTransform());return new ig(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 rU(t.x1,t.y1,t.x2,t.y2)},e}(lM),lL=function(t){function e(e){void 0===e&&(e={});var n=this,r=e.style,i=eM(e,["style"]);(n=t.call(this,ek({type:_c.PATH,style:lc.enableCSSParsing?ek({path:"",miterLimit:""},r):ek({},r),initialParsedStyle:lc.enableCSSParsing?null:{miterLimit:4,path:ek({},iQ)}},i))||this).markerStartAngle=0,n.markerEndAngle=0,n.markerMidList=[];var o=n.parsedStyle,a=o.markerStart,l=o.markerEnd,s=o.markerMid;return a&&lv(a)&&(n.markerStartAngle=a.getLocalEulerAngles(),n.appendChild(a)),s&&lv(s)&&n.placeMarkerMid(s),l&&lv(l)&&(n.markerEndAngle=l.getLocalEulerAngles(),n.appendChild(l)),n.transformMarker(!0),n.transformMarker(!1),n}return eE(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&&lv(r)&&(this.markerStartAngle=0,r.remove()),i&&lv(i)&&(this.markerStartAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!0))):"markerEnd"===t?(r&&lv(r)&&(this.markerEndAngle=0,r.remove()),i&&lv(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&&lv(d)){var y=0;if(t){var g=ej(this.getStartTangent(),2),v=g[0],b=g[1];r=b[0]-p,i=b[1]-h,e=v[0]-b[0],n=v[1]-b[1],o=c||0,a=this.markerStartAngle}else{var x=ej(this.getEndTangent(),2),v=x[0],b=x[1];r=b[0]-p,i=b[1]-h,e=v[0]-b[0],n=v[1]-b[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&&lv(t))for(var o=1;o<n.length-1;o++){var a=ej(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 oO(this)},e.prototype.getPointAtLength=function(t,e){void 0===e&&(e=!1);var n=this.parsedStyle,r=n.defX,i=n.defY,o=ro(n.path.absolutePath,t,ek(ek({},void 0),{bbox:!1,length:!0})).point,a=o.x,l=o.y,s=eq(eI(),eF(a-r,l-i,0),e?this.getWorldTransform():this.getLocalTransform());return new ig(s[0],s[1])},e.prototype.getPoint=function(t,e){return void 0===e&&(e=!1),this.getPointAtLength(t*oO(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}(lM),lI=function(t){function e(e){void 0===e&&(e={});var n=this,r=e.style,i=eM(e,["style"]);(n=t.call(this,ek({type:_c.POLYGON,style:lc.enableCSSParsing?ek({points:"",miterLimit:"",isClosed:!0},r):ek({},r),initialParsedStyle:lc.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&&lv(a)&&(n.markerStartAngle=a.getLocalEulerAngles(),n.appendChild(a)),s&&lv(s)&&n.placeMarkerMid(s),l&&lv(l)&&(n.markerEndAngle=l.getLocalEulerAngles(),n.appendChild(l)),n.transformMarker(!0),n.transformMarker(!1),n}return eE(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&&lv(r)&&(this.markerStartAngle=0,r.remove()),i&&lv(i)&&(this.markerStartAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!0))):"markerEnd"===t?(r&&lv(r)&&(this.markerEndAngle=0,r.remove()),i&&lv(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&&lv(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 b=y.length;this.parsedStyle.isClosed?(e=y[b-1][0]-y[0][0],n=y[b-1][1]-y[0][1]):(r=y[b-1][0]-h,i=y[b-1][1]-d,e=y[b-2][0]-y[b-1][0],n=y[b-2][1]-y[b-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&&lv(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}(lM),lR=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=eM(e,["style"]);return t.call(this,ek({type:_c.POLYLINE,style:lc.enableCSSParsing?ek({points:"",miterLimit:"",isClosed:!1},n):ek({},n),initialParsedStyle:lc.enableCSSParsing?null:{points:{points:[],totalLength:0,segments:[]},miterLimit:4,isClosed:!1}},r))||this}return eE(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=rX(a[u][0],a[u][1],a[u+1][0],a[u+1][1],s),f=c.x,p=c.y,h=eq(eI(),eF(f-r,p-i,0),e?this.getWorldTransform():this.getLocalTransform());return new ig(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}(lI),lD=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=eM(e,["style"]);return t.call(this,ek({type:_c.RECT,style:lc.enableCSSParsing?ek({x:"",y:"",width:"",height:"",radius:""},n):ek({},n)},r))||this}return eE(e,t),e}(lM),lF=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=eM(e,["style"]);return t.call(this,ek({type:_c.TEXT,style:lc.enableCSSParsing?ek({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):ek({fill:"black"},n),initialParsedStyle:lc.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 eE(e,t),e.prototype.getComputedTextLength=function(){var t;return(null==(t=this.parsedStyle.metrics)?void 0:t.maxLineWidth)||0},e.prototype.getLineBoundingRects=function(){var t;return(null==(t=this.parsedStyle.metrics)?void 0:t.lineMetrics)||[]},e.prototype.isOverflowing=function(){return!!this.parsedStyle.isOverflowing},e}(lM),lz=function(){function t(){this.registry={},this.define(_c.CIRCLE,lS),this.define(_c.ELLIPSE,lj),this.define(_c.RECT,lD),this.define(_c.IMAGE,lC),this.define(_c.LINE,lN),this.define(_c.GROUP,lA),this.define(_c.PATH,lL),this.define(_c.POLYGON,lI),this.define(_c.POLYLINE,lR),this.define(_c.TEXT,lF),this.define(_c.HTML,lT)}return t.prototype.define=function(t,e){this.registry[t]=e},t.prototype.get=function(t){return this.registry[t]},t}(),lB=function(t){function e(){var e=t.call(this)||this;e.defaultView=null,e.ownerDocument=null,e.nodeName="document";try{e.timeline=new lc.AnimationTimeline(e)}catch(t){}var n={};return o2.forEach(function(t){var e=t.n,r=t.inh,i=t.d;r&&i&&(n[e]=iI(i)?i(_c.GROUP):i)}),e.documentElement=new lA({id:"g-root",style:n}),e.documentElement.ownerDocument=e,e.documentElement.parentNode=e,e.childNodes=[e.documentElement],e}return eE(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?lF:lA);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(iv)},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 e_(this,void 0,void 0,function(){var n,r,i,o,a,l,s,u,c,f;return eS(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 e_(this,void 0,void 0,function(){var n,r,i,o,a,l,s,u,c,f;return eS(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(ib)},e.prototype.insertBefore=function(t,e){throw Error(ib)},e.prototype.removeChild=function(t,e){throw Error(ib)},e.prototype.replaceChild=function(t,e,n){throw Error(ib)},e.prototype.append=function(){throw Error(ib)},e.prototype.prepend=function(){throw Error(ib)},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}(a3),lW=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 a2(_S.CULLED)),null)}return t}),r.hooks.afterRender.tap(t.tag,function(t){t.cullable.visibilityPlaneMask=-1})},t.tag="Culling",t}(),l$=function(){function t(){var t=this;this.autoPreventDefault=!1,this.rootPointerEvent=new a0(null),this.rootWheelEvent=new a1(null),this.onPointerMove=function(e){var n,r,i,o,a=null==(o=null==(i=t.context.renderingContext.root)?void 0:i.ownerDocument)?void 0:o.defaultView;if(!a.supportsTouchEvents||"touch"!==e.pointerType){var l=t.normalizeToPointerEvent(e,a);try{for(var s=eP(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.ownerDocument)?void 0:o.defaultView,l=t.normalizeToPointerEvent(e,a);try{for(var s=eP(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=eP(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=eP(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=eP(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||nQ(r)||nQ(i)){var l=this.context.eventService.client2Viewport(new ig(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=ak[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=aM.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];rm(i.button)&&(i.button=0),rm(i.buttons)&&(i.buttons=1),rm(i.isPrimary)&&(i.isPrimary=1===t.touches.length&&"touchstart"===t.type),rm(i.width)&&(i.width=i.radiusX||1),rm(i.height)&&(i.height=i.radiusY||1),rm(i.tiltX)&&(i.tiltX=0),rm(i.tiltY)&&(i.tiltY=0),rm(i.pointerType)&&(i.pointerType="touch"),rm(i.pointerId)&&(i.pointerId=i.identifier||0),rm(i.pressure)&&(i.pressure=i.force||.5),rm(i.twist)&&(i.twist=0),rm(i.tangentialPressure)&&(i.tangentialPressure=0),i.isNormalized=!0,i.type=t.type,n.push(i)}else e.isMouseEvent(t)&&(rm(t.isPrimary)&&(t.isPrimary=!0),rm(t.width)&&(t.width=1),rm(t.height)&&(t.height=1),rm(t.tiltX)&&(t.tiltX=0),rm(t.tiltY)&&(t.tiltY=0),rm(t.pointerType)&&(t.pointerType="mouse"),rm(t.pointerId)&&(t.pointerId=1),rm(t.pressure)&&(t.pressure=.5),rm(t.twist)&&(t.twist=0),rm(t.tangentialPressure)&&(t.tangentialPressure=0),t.isNormalized=!0),n.push(t);return n},t.tag="Event",t}(),lG=[_c.CIRCLE,_c.ELLIPSE,_c.IMAGE,_c.RECT,_c.LINE,_c.POLYLINE,_c.POLYGON,_c.TEXT,_c.PATH,_c.HTML],lH=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(ih.isEmpty(o))return!1;var a=t.getFrustum(),l=null==(r=null==(n=e.parentNode)?void 0:n.cullable)?void 0:r.visibilityPlaneMask;return i.visibilityPlaneMask=this.computeVisibilityWithPlaneMask(e,o,l||_p.INDETERMINATE,a.planes),i.visible=i.visibilityPlaneMask!==_p.OUTSIDE,i.visible},t.prototype.computeVisibilityWithPlaneMask=function(t,e,n,r){if(n===_p.OUTSIDE||n===_p.INSIDE)return n;for(var i=_p.INSIDE,o=lG.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(eV(c,e.getPositiveFarPoint(r[a]))+f<0)return _p.OUTSIDE;eV(c,e.getNegativeFarPoint(r[a]))+f<0&&(i|=s)}}return i},t}(),lV=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;lc.enableSizeAttenuation&&lc.styleValueRegistry.updateSizeAttenuation(e,a.getCamera().getZoom()),lc.enableCSSParsing&&lc.styleValueRegistry.recalc(e),lc.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),lc.sceneGraphService.dirtifyToRoot(e),r.dirtify()};r.hooks.init.tap(t.tag,function(){a.addEventListener(_S.MOUNTED,u),a.addEventListener(_S.UNMOUNTED,c),a.addEventListener(_S.ATTR_MODIFIED,l),a.addEventListener(_S.BOUNDS_CHANGED,s)}),r.hooks.destroy.tap(t.tag,function(){a.removeEventListener(_S.MOUNTED,u),a.removeEventListener(_S.UNMOUNTED,c),a.removeEventListener(_S.ATTR_MODIFIED,l),a.removeEventListener(_S.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=ej(i.getMin(),2),a=o[0],l=o[1],s=ej(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}();(_a=_P||(_P={})).READY="ready",_a.BEFORE_RENDER="beforerender",_a.RERENDER="rerender",_a.AFTER_RENDER="afterrender",_a.BEFORE_DESTROY="beforedestroy",_a.AFTER_DESTROY="afterdestroy",_a.RESIZE="resize",_a.DIRTY_RECTANGLE="dirtyrectangle",_a.RENDERER_CHANGED="rendererchanged";var lU=new a2(_S.MOUNTED),lq=new a2(_S.UNMOUNTED),lY=new a2(_P.BEFORE_RENDER),lX=new a2(_P.RERENDER),lK=new a2(_P.AFTER_RENDER),lZ=function(t){function e(e){var n,r,i=t.call(this)||this;i.Element=lM,i.inited=!1,i.context={},i.document=new lB,i.document.defaultView=i,i.customElements=new lz;var o=e.container,a=e.canvas,l=e.offscreenCanvas,s=e.width,u=e.height,c=e.devicePixelRatio,f=e.renderer,p=e.background,h=e.cursor,d=e.document,y=e.requestAnimationFrame,g=e.cancelAnimationFrame,v=e.createImage,b=e.supportsPointerEvents,x=e.supportsTouchEvents,O=e.supportsCSSTransform,w=e.supportsMutipleCanvasesInOneContainer,E=e.useNativeClickEvent,k=e.alwaysTriggerPointerEventOnCanvas,M=e.isTouchEvent,_=e.isMouseEvent;w||function(t,e){if(t){var n="string"==typeof t?t:t.id||ab++;av[n]&&av[n].destroy(),av[n]=e}}(o,i);var S=s,P=u,j=c;return a&&(j=(j=c||ax&&window.devicePixelRatio||1)>=1?Math.ceil(j):1,S=s||("auto"===(n=aE(a,"width"))?a.offsetWidth:parseFloat(n))||a.width/j,P=u||("auto"===(r=aE(a,"height"))?a.offsetHeight:parseFloat(r))||a.height/j),l&&(lc.offscreenCanvas=l),i.devicePixelRatio=j,i.requestAnimationFrame=null!=y?y:aI.bind(lc.globalThis),i.cancelAnimationFrame=null!=g?g:aR.bind(lc.globalThis),i.supportsTouchEvents=null!=x?x:"ontouchstart"in lc.globalThis,i.supportsPointerEvents=null!=b?b:!!lc.globalThis.PointerEvent,i.isTouchEvent=null!=M?M:function(t){return i.supportsTouchEvents&&t instanceof lc.globalThis.TouchEvent},i.isMouseEvent=null!=_?_:function(t){return!lc.globalThis.MouseEvent||t instanceof lc.globalThis.MouseEvent&&(!i.supportsPointerEvents||!(t instanceof lc.globalThis.PointerEvent))},i.initRenderingContext({container:o,canvas:a,width:S,height:P,renderer:f,offscreenCanvas:l,devicePixelRatio:j,cursor:h||"default",background:p||"transparent",createImage:v,document:d,supportsCSSTransform:O,useNativeClickEvent:E,alwaysTriggerPointerEventOnCanvas:k}),i.initDefaultCamera(S,P,f.clipSpaceNearZ),i.initRenderer(f,!0),i}return eE(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 lc.CameraContribution;i.clipSpaceNearZ=n,i.setType(_h.EXPLORING,_d.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(ix,function(){r.context.renderingContext.renderReasons.add(__.CAMERA_CHANGED),lc.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){lc.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 a2(_P.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 a2(_P.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===_y.ORTHOGRAPHIC?r.setOrthographic(-(t/2),t/2,e/2,-(e/2),r.getNear(),r.getFar()):r.setAspect(t/e),this.dispatchEvent(new a2(_P.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(lY),this.getRenderingService().render(this.getConfig(),function(){t.dispatchEvent(lX)}),this.dispatchEvent(lK)},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 r2,this.context.renderingPlugins=[],this.context.renderingPlugins.push(new l$,new lV,new lW([new lH])),this.loadRendererContainerModule(t),this.context.contextService=new this.context.ContextService(ek(ek({},lc),this.context)),this.context.renderingService=new a8(lc,this.context),this.context.eventService=new a4(lc,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 a2(_P.READY))}):r.dispatchEvent(new a2(_P.READY)),r.readyPromise&&r.resolveReadyPromise()):r.dispatchEvent(new a2(_P.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(lc)})},e.prototype.setRenderer=function(t){var e=this.getConfig();if(e.renderer!==t){var n=e.renderer;e.renderer=t,this.destroy(!1,!0),eT([],ej(null==n?void 0:n.getPlugins()),!1).reverse().forEach(function(t){t.destroy(lc)}),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(lq):(lq.target=t,this.dispatchEvent(lq,!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(lU):(lU.target=t,this.dispatchEvent(lU,!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}(a5),lQ={}.toString,lJ=function(t,e){return lQ.call(t)==="[object "+e+"]"},l0=function(t){function e(){var e=t.apply(this,eT([],ej(arguments),!1))||this;return e.landmarks=[],e}return eE(e,t),e.prototype.rotate=function(t,e,n){if(this.relElevation=r7(e),this.relAzimuth=r7(t),this.relRoll=r7(n),this.elevation+=this.relElevation,this.azimuth+=this.relAzimuth,this.roll+=this.relRoll,this.type===_h.EXPLORING){var r=nW(nB(),[1,0,0],ie((this.rotateWorld?1:-1)*this.relElevation)),i=nW(nB(),[0,1,0],ie((this.rotateWorld?1:-1)*this.relAzimuth)),o=nW(nB(),[0,0,1],ie(this.relRoll)),a=n$(nB(),i,r);a=n$(nB(),a,o);var l=ng(eK(),a);e8(this.matrix,this.matrix,[0,0,-this.distance]),e6(this.matrix,this.matrix,l),e8(this.matrix,this.matrix,[0,0,this.distance])}else{if(Math.abs(this.elevation)>90)return this;this.computeMatrix()}return this._getAxes(),this.type===_h.ORBITING||this.type===_h.EXPLORING?this._getPosition():this.type===_h.TRACKING&&this._getFocalPoint(),this._update(),this},e.prototype.pan=function(t,e){var n=it(t,e,0),r=eR(this.position);return eW(r,r,eG(eI(),this.right,n[0])),eW(r,r,eG(eI(),this.up,n[1])),this._setPosition(r),this.triggerUpdate(),this},e.prototype.dolly=function(t){var e=this.forward,n=eR(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===_h.ORBITING||this.type===_h.EXPLORING?this._getDistance():this.type===_h.TRACKING&&eW(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 lc.CameraContribution;p.setType(this.type,void 0),p.setPosition(l[0],null!=(n=l[1])?n:this.position[1],null!=(r=l[2])?r:this.position[2]),p.setFocalPoint(u[0],null!=(i=u[1])?i:this.focalPoint[1],null!=(o=u[2])?o:this.focalPoint[2]),p.setRoll(null!=c?c:this.roll),p.setZoom(null!=f?f:this.zoom);var h={name:t,matrix:eZ(p.getWorldTransform()),right:eR(p.right),up:eR(p.up),forward:eR(p.forward),position:eR(p.getPosition()),focalPoint:eR(p.getFocalPoint()),distanceVector:eR(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=lJ(t,"String")?this.landmarks.find(function(e){return e.name===t}):t;if(r){var i,o=lJ(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,b=(void 0===u?void 0:u)||lc.EasingFunction(void 0===a?"linear":a),x=function(){n.setFocalPoint(y),n.setPosition(d),n.setRoll(v),n.setZoom(g),n.computeMatrix(),n.triggerUpdate(),f&&f()},O=function(t){void 0===i&&(i=t);var e=t-i;if(e>s)return void x();var r=b(e/s),o=eI(),a=eI(),l=1,u=0;(eU(o,n.focalPoint,y,r),eU(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),eX(o,y)+eX(a,d)<=.01&&void 0==g&&void 0==v)?x():(n.computeMatrix(),n.triggerUpdate(),e<s&&(h&&h(r),n.landmarkAnimationID=n.canvas.requestAnimationFrame(O)))};this.canvas.requestAnimationFrame(O)}},e.prototype.syncFromLandmark=function(t){this.matrix=eQ(this.matrix,t.matrix),this.right=ez(this.right,t.right),this.up=ez(this.up,t.up),this.forward=ez(this.forward,t.forward),this.position=ez(this.position,t.position),this.focalPoint=ez(this.focalPoint,t.focalPoint),this.distanceVector=ez(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}(iO);lc.CameraContribution=l0;var l1=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}(),l2=0,l5=new WeakMap,l3=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,n=this.observer.records,r=n.length;if(n.length>0){var i=function(t,e){return t===e?t:_A&&(t===_A||t===_j)?_A:null}(n[r-1],t);if(i){n[r-1]=i;return}}else{e=this.observer,l9.push(e),l8||(l8=!0,void 0!==lc.globalThis?lc.globalThis.setTimeout(l7):l7())}n[r]=t},t.prototype.addListeners=function(){this.addListeners_(this.target)},t.prototype.addListeners_=function(t){var e=this.options;e.attributes&&t.addEventListener(_S.ATTR_MODIFIED,this,!0),e.childList&&t.addEventListener(_S.INSERTED,this,!0),(e.childList||e.subtree)&&t.addEventListener(_S.REMOVED,this,!0)},t.prototype.removeListeners=function(){this.removeListeners_(this.target)},t.prototype.removeListeners_=function(t){var e=this.options;e.attributes&&t.removeEventListener(_S.ATTR_MODIFIED,this,!0),e.childList&&t.removeEventListener(_S.INSERTED,this,!0),(e.childList||e.subtree)&&t.removeEventListener(_S.REMOVED,this,!0)},t.prototype.removeTransientObservers=function(){var t=this.transientObservedNodes;this.transientObservedNodes=[],t.forEach(function(t){this.removeListeners_(t);for(var e=l5.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 _S.ATTR_MODIFIED:var e,n,r=t.attrName,i=t.relatedNode.namespaceURI;(e=_j=new l1("attributes",n=t.target)).attributeName=r,e.attributeNamespace=i;var o=t.attrChange===lt.ADDITION?null:t.prevValue;l6(n,function(t){if(t.attributes&&(!t.attributeFilter||!t.attributeFilter.length||-1!==t.attributeFilter.indexOf(r)||-1!==t.attributeFilter.indexOf(i))){var n;return t.attributeOldValue?(n=o,_A||((_A=l1.copy(_j)).oldValue=n),_A):e}});break;case _S.REMOVED:case _S.INSERTED:n=t.relatedNode;var a=t.target,l=void 0,s=void 0;t.type===_S.INSERTED?(l=[a],s=[]):(l=[],s=[a]);var u=a.previousSibling,c=a.nextSibling;(e=_j=new l1("childList",n)).addedNodes=l,e.removedNodes=s,e.previousSibling=u,e.nextSibling=c,l6(n,function(t){if(t.childList)return e})}_j=_A=void 0},t}();function l4(t){this.callback=t,this.nodes=[],this.records=[],this.uid=l2++}function l6(t,e){for(var n=t;n;n=n.parentNode){var r=l5.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)}}}}l4.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=l5.get(t);r||l5.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 l3(this,t,e),r.push(n),this.nodes.push(t)),n.addListeners()},l4.prototype.disconnect=function(){var t=this;this.nodes.forEach(function(e){for(var n=l5.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=[]},l4.prototype.takeRecords=function(){var t=this.records;return this.records=[],t};var l8=!1,l9=[];function l7(){l8=!1;var t=l9;l9=[],t.sort(function(t,e){return t.uid-e.uid});var e=!1;t.forEach(function(t){var n=t.takeRecords();t.nodes.forEach(function(e){var n=l5.get(e);n&&n.forEach(function(e){e.observer===t&&e.removeTransientObservers()})}),n.length&&(t.callback(n,t),e=!0)}),e&&l7()}var st=function(t,e,n){return t<e?e:t>n?n:t},se={}.toString,sn=function(t){return"[object Number]"===se.call(t)},sr=function(t){return null==t},si=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 eE(e,t),e}(aQ),so=0,sa=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(so++),this._inEffect=!!this.effect.update(0),this._totalDuration=Number(null==(n=this.effect)?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;isNaN(t=Number(t))||(this.timeline.restart(),this._paused||null===this._startTime||(this._startTime=Number(null==(e=this.timeline)?void 0:e.currentTime)-t/this.playbackRate),this.currentTimePending=!1,this._currentTime!==t&&(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){null!==t&&(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 si(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.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(iv)},t.prototype.addEventListener=function(t,e,n){throw Error(iv)},t.prototype.removeEventListener=function(t,e,n){throw Error(iv)},t.prototype.dispatchEvent=function(t){throw Error(iv)},t.prototype.commitStyles=function(){throw Error(iv)},t.prototype.ensureAlive=function(){var t,e;this.playbackRate<0&&0===this.currentTime?this._inEffect=!!(null==(t=this.effect)?void 0:t.update(-1)):this._inEffect=!!(null==(e=this.effect)?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 si(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 si(null,this,this.currentTime,t);this.onframe(r)}this._finishedFlag=!1}},t}(),sl="function"==typeof Float32Array,ss=function(t,e){return 1-3*e+3*t},su=function(t,e){return 3*e-6*t},sc=function(t){return 3*t},sf=function(t,e,n){return((ss(e,n)*t+su(e,n))*t+sc(e))*t},sp=function(t,e,n){return 3*ss(e,n)*t*t+2*su(e,n)*t+sc(e)},sh=function(t,e,n,r,i){var o,a,l=0;do(o=sf(a=e+(n-e)/2,r,i)-t)>0?n=a:e=a;while(Math.abs(o)>1e-7&&++l<10);return a},sd=function(t,e,n,r){for(var i=0;i<4;++i){var o=sp(e,n,r);if(0===o)break;var a=sf(e,n,r)-t;e-=a/o}return e},sy=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=sl?new Float32Array(11):Array(11),o=0;o<11;++o)i[o]=sf(.1*o,t,n);var a=function(e){for(var r=0,o=1;10!==o&&i[o]<=e;++o)r+=.1;var a=r+(e-i[--o])/(i[o+1]-i[o])*.1,l=sp(a,t,n);return l>=.001?sd(e,a,t,n):0===l?a:sh(e,r,r+.1,t,n)};return function(t){return 0===t||1===t?t:sf(a(t),e,r)}},sg=function(t){return Math.pow(t,2)},sm=function(t){return Math.pow(t,3)},sv=function(t){return Math.pow(t,4)},sb=function(t){return Math.pow(t,5)},sx=function(t){return Math.pow(t,6)},sO=function(t){return 1-Math.cos(t*Math.PI/2)},sw=function(t){return 1-Math.sqrt(1-t*t)},sE=function(t){return t*t*(3*t-2)},sk=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)},sM=function(t,e){void 0===e&&(e=[]);var n=ej(e,2),r=n[0],i=n[1],o=st(Number(void 0===r?1:r),1,10),a=st(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)},s_=function(t,e,n){void 0===e&&(e=[]);var r=ej(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=st(o,.1,1e3),l=st(l,.1,1e3),u=st(u,.1,1e3),f=st(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)*(+Math.cos(d*g)+y*Math.sin(d*g)):(1+y*g)*Math.exp(-g*p),0===t||1===t)?t:1-g},sS=function(t,e){void 0===e&&(e=[]);var n=ej(e,2),r=n[0],i=void 0===r?10:r;return("start"==n[1]?Math.ceil:Math.floor)(st(t,0,1)*i)/i},sP=function(t,e){void 0===e&&(e=[]);var n=ej(e,4);return sy(n[0],n[1],n[2],n[3])(t)},sj=sy(.42,0,1,1),sA=function(t){return function(e,n,r){return void 0===n&&(n=[]),1-t(1-e,n,r)}},sT=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}},sC=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}},sN={steps:sS,"step-start":function(t){return sS(t,[1,"start"])},"step-end":function(t){return sS(t,[1,"end"])},linear:function(t){return t},"cubic-bezier":sP,ease:function(t){return sP(t,[.25,.1,.25,1])},in:sj,out:sA(sj),"in-out":sT(sj),"out-in":sC(sj),"in-quad":sg,"out-quad":sA(sg),"in-out-quad":sT(sg),"out-in-quad":sC(sg),"in-cubic":sm,"out-cubic":sA(sm),"in-out-cubic":sT(sm),"out-in-cubic":sC(sm),"in-quart":sv,"out-quart":sA(sv),"in-out-quart":sT(sv),"out-in-quart":sC(sv),"in-quint":sb,"out-quint":sA(sb),"in-out-quint":sT(sb),"out-in-quint":sC(sb),"in-expo":sx,"out-expo":sA(sx),"in-out-expo":sT(sx),"out-in-expo":sC(sx),"in-sine":sO,"out-sine":sA(sO),"in-out-sine":sT(sO),"out-in-sine":sC(sO),"in-circ":sw,"out-circ":sA(sw),"in-out-circ":sT(sw),"out-in-circ":sC(sw),"in-back":sE,"out-back":sA(sE),"in-out-back":sT(sE),"out-in-back":sC(sE),"in-bounce":sk,"out-bounce":sA(sk),"in-out-bounce":sT(sk),"out-in-bounce":sC(sk),"in-elastic":sM,"out-elastic":sA(sM),"in-out-elastic":sT(sM),"out-in-elastic":sC(sM),spring:s_,"spring-in":s_,"spring-out":sA(s_),"spring-in-out":sT(s_),"spring-out-in":sC(s_)},sL=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()},sI=function(t){return t};function sR(t,e){return function(n){if(n>=1)return 1;var r=1/t;return(n+=e*r)-n%r}}var sD="\\s*(-?\\d+\\.?\\d*|-?\\.\\d+)\\s*",sF=RegExp("cubic-bezier\\("+sD+","+sD+","+sD+","+sD+"\\)"),sz=/steps\(\s*(\d+)\s*\)/,sB=/steps\(\s*(\d+)\s*,\s*(start|middle|end)\s*\)/;function sW(t){var e=sF.exec(t);if(e)return sy.apply(void 0,eT([],ej(e.slice(1).map(Number)),!1));var n=sz.exec(t);if(n)return sR(Number(n[1]),0);var r=sB.exec(t);return r?sR(Number(r[1]),{start:1,middle:.5,end:0}[r[2]]):sN[sL(t)]||sN.linear}function s$(t){return"offset"!==t&&"easing"!==t&&"composite"!==t&&"computedOffset"!==t}var sG=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!lc.enableCSSParsing&&sn(i)?i:n(i)}},sH=function(){function t(){this.delay=0,this.direction="normal",this.duration="auto",this._easing="linear",this.easingFunction=sI,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=sW(t),this._easing=t},enumerable:!1,configurable:!0}),t}();function sV(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(sr(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)?t:1),r>1&&(n[0].computedOffset=Number(null!=(e=n[0].offset)?e:0));for(var i=0,o=Number(n[0].computedOffset),a=1;a<r;a++){var l=n[a].computedOffset;if(!sr(l)&&!sr(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 sU="backwards|forwards|both|none".split("|"),sq="reverse|alternate|alternate-reverse".split("|"),sY=function(){function t(t,e,n){var r,i,o,a,l,s,u,c,f,p,h,d,y=this;this.composite="replace",this.iterationComposite="replace",this.target=t,this.timing=("number"==typeof(r=null!=(a=n)?a:{duration:"auto"})&&(r=isNaN(r)?{duration:"auto"}:{duration:r}),l=a=r,s=new sH,"number"!=typeof l||isNaN(l)?void 0!==l&&Object.keys(l).forEach(function(t){void 0!==l[t]&&null!==l[t]&&"auto"!==l[t]&&(("number"==typeof s[t]||"duration"===t)&&("number"!=typeof l[t]||isNaN(l[t]))||"fill"===t&&-1===sU.indexOf(l[t])||("direction"!==t||-1!==sq.indexOf(l[t]))&&(s[t]=l[t]))}):s.duration=l,s),this.timing.effect=this,this.timing.activeDuration=Math.abs((0===(i=u=this.timing).duration||0===i.iterations?0:("auto"===i.duration?0:Number(i.duration))*(null!=(o=i.iterations)?o:1))/(u.playbackRate||1)),this.timing.endTime=Math.max(0,this.timing.delay+this.timing.activeDuration+this.timing.endDelay),this.normalizedKeyframes=sV(e,this.timing),this.interpolations=(c=this.normalizedKeyframes,f=this.timing,p=this.target,d=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=o3[t];if(i&&i.syntax&&i.int){var o=lc.styleValueRegistry.getPropertySyntax(i.syntax);if(o){var a=void 0,l=void 0;if(lc.enableCSSParsing){var s=lc.styleValueRegistry.parseProperty(t,e,r,!1),u=lc.styleValueRegistry.parseProperty(t,n,r,!1);a=lc.styleValueRegistry.computeProperty(t,s,r,!1),l=lc.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=sG.apply(void 0,eT([],ej(f),!1));return function(t){return 0===t?e:1===t?n:p(t)}}}}return sG(!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}(h=function(t,e){for(var n={},r=0;r<t.length;r++)for(var i in t[r])if(s$(i)){var o={offset:t[r].offset,computedOffset:t[r].computedOffset,easing:t[r].easing,easingFunction:sW(t[r].easing)||e.easingFunction,value:t[r][i]};n[i]=n[i]||[],n[i].push(o)}return n}(c,f),p),function(t,e){if(null!==e)d.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 h)s$(n)&&t.setAttribute(n,null)});var g=lc.globalThis.Proxy;this.computedTiming=g?new g(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 y.animation&&y.animation.currentTime||null;if("currentIteration"===e)return y.animation&&"running"===y.animation.playState?t.currentIteration||0:null;if("progress"===e)return y.animation&&"running"===y.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=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),f=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,c,n.delay);if(null===f)return null;var p="auto"===n.duration?0:n.duration,h=(r=n.iterations,o=i=n.iterationStart,0===p?1!==c&&(o+=r):o+=f/p,o),d=(a=n.iterationStart,l=n.iterations,0==(s=h===1/0?a%1:h%1)&&2===c&&0!==l&&(0!==f||0===p)&&(s=1),s),y=(u=n.iterations,2===c&&u===1/0?1/0:1===d?Math.floor(h)-1:Math.floor(h)),g=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,y,d);return n.currentIteration=y,n.progress=g,n.easingFunction(g)}(this.timing.activeDuration,t,this.timing),null!==this.timeFraction)},t.prototype.getKeyframes=function(){return this.normalizedKeyframes},t.prototype.setKeyframes=function(t){this.normalizedKeyframes=sV(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 sX(t,e){return Number(t.id)-Number(e.id)}var sK=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(sX),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 sa(new sY(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(sX),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,eT([],ej(a),!1)),(i=this.pendingEffects).push.apply(i,eT([],ej(l),!1)),this.ticking&&this.requestAnimationFrame(function(){}),this.inTick=!1,[s,u]},t}();lc.EasingFunction=sW,lc.AnimationTimeline=sK;class sZ extends Map{constructor(t,e=sJ){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(const[e,n]of t)this.set(e,n)}get(t){return super.get(sQ(this,t))}has(t){return super.has(sQ(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 sQ({_intern:t,_key:e},n){let r=e(n);return t.has(r)?t.get(r):n}function sJ(t){return null!==t&&"object"==typeof t?t.valueOf():t}function s0(t){return t}function s1(t,...e){return s4(t,s0,s0,e)}function s2(t,...e){return s4(t,Array.from,s0,e)}function s5(t,e,...n){return s4(t,s0,e,n)}function s3(t,e,...n){return s4(t,Array.from,e,n)}function s4(t,e,n,r){return function t(i,o){if(o>=r.length)return n(i);let a=new sZ,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)}var s6=function(t){return null==t},s8=function(t){return s6(t)?"":t.toString()},s9=function(t){var e=s8(t);return e.charAt(0).toLowerCase()+e.substring(1)};function s7(t){return t}function ut(t){return t.reduce((t,e)=>(n,...r)=>e(t(n,...r),...r),s7)}function ue(t){return t.replace(/( |^)[a-z]/g,t=>t.toUpperCase())}function un(t=""){throw Error(t)}function ur(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 ui(t){return null!=t&&!Number.isNaN(t)}function uo(t,e){return ua(t,e)||{}}function ua(t,e){let n=Object.entries(t||{}).filter(([t])=>t.startsWith(e)).map(([t,n])=>[s9(t.replace(e,"").trim()),n]).filter(([t])=>!!t);return 0===n.length?null:Object.fromEntries(n)}function ul(t,...e){return Object.fromEntries(Object.entries(t).filter(([t])=>e.every(e=>!t.startsWith(e))))}function us(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 uu(t){return"object"==typeof t&&!(t instanceof Date)&&null!==t&&!Array.isArray(t)}function uc(t){return null===t||!1===t}function uf(t){return new up([t],null,t,t.ownerDocument)}class up{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 up("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 up(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 up([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 up(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 up(n,null,n[0],this._document)}maybeAppend(t,e,n){let r=this._elements[0],i=r.getElementById(t);if(i)return new up([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 up([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=s1(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 up([],r,this._parent,this._document),new up(i,null,this._parent,this._document),new up(o,null,this._parent,this._document),new up([],a,this._parent,this._document),new up(l,null,this._parent,this._document)];return new up(this._elements,null,this._parent,this._document,f)}merge(t){let e=[...this._elements,...t._elements],n=[...this._transitions,...t._transitions];return new up(e,null,this._parent,this._document,void 0,n)}createElement(t){if(this._document)return this._document.createElement(t,{});let e=up.registry[t];return e?new e:un(`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 up([],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 uh([t,e],[n,r]){return[t-n,e-r]}function ud([t,e],[n,r]){return Math.sqrt(Math.pow(t-n,2)+Math.pow(e-r,2))}function uy([t,e]){return Math.atan2(e,t)}function ug([t,e]){return uy([t,e])+Math.PI/2}function um(t,e){let n=uy(t),r=uy(e);return n<r?r-n:2*Math.PI-(n-r)}function uv(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 ub([t,e],[n,r]){return[(t+n)/2,(e+r)/2]}function ux(t,e,n){return Math.max(e,Math.min(t,n))}function uO(t,e=10){return"number"!=typeof t||1e-15>Math.abs(t)?t:parseFloat(t.toFixed(e))}up.registry={g:lA,rect:lD,circle:lS,path:lL,text:lF,ellipse:lj,image:lC,line:lN,polygon:lI,polyline:lR,html:lT};var uw={}.toString,uE=function(t,e){return uw.call(t)==="[object "+e+"]"},uk=function(t){return Array.isArray?Array.isArray(t):uE(t,"Array")},uM=function(t){var e=typeof t;return null!==t&&"object"===e||"function"===e},u_=function(t,e){if(t){if(uk(t))for(var n,r=0,i=t.length;r<i&&!1!==e(t[r],r);r++);else if(uM(t)){for(var o in t)if(t.hasOwnProperty(o)&&!1===e(t[o],o))break}}},uS=function(t){return uE(t,"Function")},uP=Array.prototype;uP.splice,uP.indexOf,Array.prototype.splice,Object.prototype.hasOwnProperty;var uj=function(t){return uE(t,"Number")},uA=Object.values?function(t){return Object.values(t)}:function(t){var e=[];return u_(t,function(n,r){uS(t)&&"prototype"===r||e.push(n)}),e},uT=function(t){if("object"!=typeof t||null===t||!uE(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},uC=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&&uT(a)?(uT(e[o])||(e[o]={}),r<i?t(e[o],a,r+1,i):e[o]=n[o]):uk(a)?(e[o]=[],e[o]=e[o].concat(a)):void 0!==a&&(e[o]=a)}}(t,e[r]);return t},uN=function(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)},uL=function(t,e){if(!uN(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 uI=function(t){return t};function uR(t){return null==t?0:uN(t)?t.length:Object.keys(t).length}function uD(){this.map={}}!function(t,e){if(!uS(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 _T||(_T=document.createElement("canvas").getContext("2d")),_T.font=[o,a,i,n+"px",r].join(" "),_T.measureText(uE(t,"String")?t:"").width},function(t,e){return void 0===e&&(e={}),eA([t],uA(e)).join("")}),uD.prototype.has=function(t){return void 0!==this.map[t]},uD.prototype.get=function(t,e){var n=this.map[t];return void 0===n?e:n},uD.prototype.set=function(t,e){this.map[t]=e},uD.prototype.clear=function(){this.map={}},uD.prototype.delete=function(t){delete this.map[t]},uD.prototype.size=function(){return Object.keys(this.map).length};class uF{constructor(t){this.options=uC({},this.getDefaultOptions()),this.update(t)}getOptions(){return this.options}update(t={}){this.options=uC({},this.options,t),this.rescale(t)}rescale(t){}}function uz(t,e){return e-t?n=>(n-t)/(e-t):t=>.5}function uB(t,...e){return e.reduce((t,e)=>n=>t(e(n)),t)}function uW(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 u$=n(2927),uG=n.n(u$);function uH(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 uV(t){let e=uG().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;return[255*uH(a,o,e+1/3),255*uH(a,o,e),255*uH(a,o,e-1/3),i]}(r):null}let uU=(t,e)=>n=>t*(1-n)+e*n,uq=(t,e)=>{if("number"==typeof t&&"number"==typeof e)return uU(t,e);if("string"==typeof t&&"string"==typeof e){let n,r;return n=uV(t),r=uV(e),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})`}}return()=>t},uY=(t,e)=>{let n=uU(t,e);return t=>Math.round(n(t))};function uX(t){return null!=t&&!Number.isNaN(t)}let uK=Math.sqrt(50),uZ=Math.sqrt(10),uQ=Math.sqrt(2);function uJ(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>=uK?10:o>=uZ?5:o>=uQ?2:1)*10**i:-(10**-i)/(o>=uK?10:o>=uZ?5:o>=uQ?2:1)}function u0(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>=uK?i*=10:o>=uZ?i*=5:o>=uQ&&(i*=2),e<t?-i:i}let u1=(t,e,n=5)=>{let r,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=uJ(l,s,n))>0?r=uJ(l=Math.floor(l/r)*r,s=Math.ceil(s/r)*r,n):r<0&&(r=uJ(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},u2=(t,e,n,r)=>(Math.min(t.length,e.length)>2?(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]=uz(l[t],l[t+1]),o[t]=n(s[t],s[t+1]);return e=>{let n=uW(t,e,1,r)-1,a=i[n];return uB(o[n],a)(e)}}:(t,e,n)=>{let r,i,[o,a]=t,[l,s]=e;return o<a?(r=uz(o,a),i=n(l,s)):(r=uz(a,o),i=n(s,l)),uB(i,r)})(t,e,r?uY:n);class u5 extends uF{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:uU,tickCount:5}}map(t){return uX(t)?this.output(t):this.options.unknown}invert(t){return uX(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;return[t[0],t[t.length-1],e]}chooseNice(){return u1}rescale(){this.nice();let[t,e]=this.chooseTransforms();this.composeOutput(t,this.chooseClamp(t)),this.composeInput(t,e,this.chooseClamp(e))}chooseClamp(t){var e,n;let r,i,{clamp:o,range:a}=this.options,l=this.options.domain.map(t),s=Math.min(l.length,a.length);return o?(e=l[0],r=(n=l[s-1])<e?n:e,i=e>n?e:n,t=>Math.min(Math.max(r,t),i)):uI}composeOutput(t,e){let{domain:n,range:r,round:i,interpolate:o}=this.options,a=u2(n.map(t),r,o,i);this.output=uB(a,e,t)}composeInput(t,e,n){let{domain:r,range:i}=this.options,o=u2(i,r.map(t),uU);this.input=uB(e,n,o)}}let u3=(t,e,n)=>{let r,i,o=t,a=e;if(o===a&&n>0)return[o];let l=uJ(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 u4 extends u5{getDefaultOptions(){return{domain:[0,1],range:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolate:uq,tickMethod:u3,tickCount:5}}chooseTransforms(){return[uI,uI]}clone(){return new u4(this.options)}}var u6=function(t){return tD(t,"Number")};function u8(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 u9(t,e){return Object.entries(t).reduce((n,[r,i])=>(n[r]=e(i,r,t),n),{})}function u7(t){return t.map((t,e)=>e)}function ct(t){return t[t.length-1]}function ce(t,e){let n=[[],[]];return t.forEach(t=>{n[+!e(t)].push(t)}),n}function cn(t,e){for(let[n,r]of Object.entries(e))t.style(n,r)}function cr(t,e,n,r,i){let o=uy(uh(r,e))+Math.PI,a=uy(uh(r,n))+Math.PI;return t.arc(r[0],r[1],i,o,a,a-o<0),t}function ci(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)if(e)return 180;else return 90;return 90*!!e})(r,o),s=u7(a),[u,c]=u8(s,t=>a[t]),f=new u4({domain:[u,c],range:[0,100]}),p=t=>u6(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 co(t){let[e,n,r,i]=t;return[i,e,n,r]}function ca(t,e,n){let[r,i,,o]=eh(t)?co(e):e,[a,l]=n,s=t.getCenter(),u=ug(uh(r,s)),c=ug(uh(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:ud(o,s),outerRadius:ud(r,s)}}function cl(t){let{colorAttribute:e,opacityAttribute:n=e}=t;return`${n}Opacity`}function cs(t,e){if(!ed(t))return"";let n=t.getCenter(),{transform:r}=e;return`translate(${n[0]}, ${n[1]}) ${r||""}`}function cu(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 cc=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 cf(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,b=cc(i,["inset","radius","insetLeft","insetTop","insetRight","insetBottom","radiusBottomLeft","radiusBottomRight","radiusTopLeft","radiusTopRight","minWidth","maxWidth","minHeight"]);if(!ed(r)&&!eg(r)){let n=!!eh(r),[i,,o]=n?co(e):e,[a,x]=i,[O,w]=uh(o,i),E=Math.abs(O),k=Math.abs(w),M=(O>0?a:a+O)+l,_=(w>0?x:x+w)+s,S=E-(l+u),P=k-(s+c),j=n?ux(S,v,1/0):ux(S,y,g),A=n?ux(P,y,g):ux(P,v,1/0),T=n?M:M-(j-S)/2,C=n?_-(A-P)/2:_-(A-P);return uf(t.createElement("rect",{})).style("x",T).style("y",C).style("width",j).style("height",A).style("radius",[h,d,p,f]).call(cn,b).node()}let{y:x,y1:O}=n,w=r.getCenter(),E=ca(r,e,[x,O]),k=ep().cornerRadius(a).padAngle(o*Math.PI/180);return uf(t.createElement("path",{})).style("path",k(E)).style("transform",`translate(${w[0]}, ${w[1]})`).style("radius",a).style("inset",o).call(cn,b).node()}let cp=(t,e)=>{let{colorAttribute:n,opacityAttribute:r="fill",first:i=!0,last:o=!0}=t,a=cc(t,["colorAttribute","opacityAttribute","first","last"]),{coordinate:l,document:s}=e;return(e,r,u)=>{let{color:c,radius:f=0}=u,p=cc(u,["color","radius"]),h=p.lineWidth||1,{stroke:d,radius:y=f,radiusTopLeft:g=y,radiusTopRight:v=y,radiusBottomRight:b=y,radiusBottomLeft:x=y,innerRadius:O=0,innerRadiusTopLeft:w=O,innerRadiusTopRight:E=O,innerRadiusBottomRight:k=O,innerRadiusBottomLeft:M=O,lineWidth:_="stroke"===n||d?h:0,inset:S=0,insetLeft:P=S,insetRight:j=S,insetBottom:A=S,insetTop:T=S,minWidth:C,maxWidth:N,minHeight:L}=a,I=cc(a,["stroke","radius","radiusTopLeft","radiusTopRight","radiusBottomRight","radiusBottomLeft","innerRadius","innerRadiusTopLeft","innerRadiusTopRight","innerRadiusBottomRight","innerRadiusBottomLeft","lineWidth","inset","insetLeft","insetRight","insetBottom","insetTop","minWidth","maxWidth","minHeight"]),{color:R=c,opacity:D}=r,F=[i?g:w,i?v:E,o?b:k,o?x:M],z=["radiusTopLeft","radiusTopRight","radiusBottomRight","radiusBottomLeft"];eh(l)&&z.push(z.shift());let B=Object.assign(Object.assign({radius:y},Object.fromEntries(z.map((t,e)=>[t,F[e]]))),{inset:S,insetLeft:P,insetRight:j,insetBottom:A,insetTop:T,minWidth:C,maxWidth:N,minHeight:L});return uf(cf(s,e,r,l,B)).call(cn,p).style("fill","transparent").style(n,R).style(cl(t),D).style("lineWidth",_).style("stroke",void 0===d?R:d).call(cn,I).node()}};cp.props={defaultEnterAnimation:"scaleInY",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let ch=(t,e)=>cp(Object.assign({colorAttribute:"fill"},t),e);ch.props=Object.assign(Object.assign({},cp.props),{defaultMarker:"square"});let cd=(t,e)=>cp(Object.assign({colorAttribute:"stroke"},t),e);function cy(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function cg(t){this._context=t}function cm(t){return new cg(t)}function cv(t){return t[0]}function cb(t){return t[1]}function cx(t,e){var n=tZ(!0),r=null,i=cm,o=null,a=eo(l);function l(l){var s,u,c,f=(l=cy(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?cv:tZ(t),e="function"==typeof e?e:void 0===e?cb:tZ(e),l.x=function(e){return arguments.length?(t="function"==typeof e?e:tZ(+e),l):t},l.y=function(t){return arguments.length?(e="function"==typeof t?t:tZ(+t),l):e},l.defined=function(t){return arguments.length?(n="function"==typeof t?t:tZ(!!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 cO(){}function cw(t){this._context=t}function cE(t){return new cw(t)}cd.props=Object.assign(Object.assign({},cp.props),{defaultMarker:"hollowSquare"}),Array.prototype.slice,cg.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*=1,e*=1,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)}}},cw.prototype={areaStart:cO,areaEnd:cO,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t*=1,e*=1,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}};var ck=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 cM(t,e,n){let[r,i,o,a]=t;return eh(n)?[r,[e?e[0][0]:i[0],i[1]],[e?e[3][0]:o[0],o[1]],a]:[r,[i[0],e?e[0][1]:i[1]],[o[0],e?e[3][1]:o[1]],a]}let c_=(t,e)=>{let{adjustPoints:n=cM}=t,r=ck(t,["adjustPoints"]),{coordinate:i,document:o}=e;return(t,e,a,l)=>{let{index:s}=e,{color:u}=a,c=ck(a,["color"]),f=n(t,l[s+1],i),[p,h,d,y]=eh(i)?co(f):f,{color:g=u,opacity:v}=e,b=cx().curve(cE)([p,h,d,y]);return uf(o.createElement("path",{})).call(cn,c).style("path",b).style("fill",g).style("fillOpacity",v).call(cn,r).node()}};function cS(t,e,n){let[r,i,o,a]=t;return eh(n)?[r,[e?e[0][0]:(i[0]+o[0])/2,i[1]],[e?e[3][0]:(i[0]+o[0])/2,o[1]],a]:[r,[i[0],e?e[0][1]:(i[1]+o[1])/2],[o[0],e?e[3][1]:(i[1]+o[1])/2],a]}c_.props={defaultMarker:"square"};let cP=(t,e)=>c_(Object.assign({adjustPoints:cS},t),e);function cj(t){return Math.abs(t)>10?String(t):t.toString().padStart(2,"0")}cP.props={defaultMarker:"square"};let cA=(t={})=>{let{channel:e="x"}=t;return(t,n)=>{let{encode:r}=n,{tooltip:i}=n;if(uc(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=>tU(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=cj(t.getMonth()+1),r=cj(t.getDate()),i=`${e}-${n}-${r}`,o=t.getHours(),a=t.getMinutes(),l=t.getSeconds();return o||a||l?`${i} ${cj(o)}:${cj(a)}:${cj(l)}`:i}(t[e]):t[e]).join(", ")};return[t,tW({},n,{tooltip:{title:l}})]}};cA.props={};let cT=t=>{let{channel:e}=t;return(t,n)=>{let{encode:r,tooltip:i}=n;if(uc(i))return[t,n];let{items:o=[]}=i;return!o||o.length>0?[t,n]:[t,tW({},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))}})]}};cT.props={};var cC=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 cN=()=>(t,e)=>{let{encode:n}=e,{key:r}=n,i=cC(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,tW({},e,{encode:{key:t$(a)}})]};function cL(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 cI(t={}){return[...cL(t),{name:"title",scale:"identity"}]}function cR(){return[{type:cA,channel:"color"},{type:cT,channel:["x","y"]}]}function cD(){return[{type:cA,channel:"x"},{type:cT,channel:["y"]}]}function cF(t={}){return cL(t)}function cz(){return[{type:cN}]}cN.props={};function cB(t,e){return t.getBandWidth(t.invert(e))}function cW(t,e,n={}){let{x:r,y:i,series:o}=e,{x:a,y:l,series:s}=t,{style:{bandOffset:u=.5*!s,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?cB(a,r[e]):0,u=h?cB(l,i[e]):0,y=d&&o?(cB(s,o[e])/2+ +o[e])*n:0,[g,v]=t;return[g+c*n+y,v+f*u]}:t=>t}function c$(t){return parseFloat(t)/100}function cG(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];return[["string"==typeof e?c$(e)*a:+e,"string"==typeof n?c$(n)*l:+n]]});return[t,s]}function cH(t){return"function"==typeof t?t:e=>e[t]}function cV(t,e){return Array.from(t,cH(e))}function cU(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=cV(o,n),s=cV(o,r),u=cV(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}))}}function cq(t,e){return t.getBandWidth(t.invert(e))}let cY={rect:ch,hollow:cd,funnel:c_,pyramid:cP},cX=()=>(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=cq(u,i[t]),n=c?cq(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]};cX.props={defaultShape:"rect",defaultLabelShape:"label",composite:!1,shape:cY,channels:[...cI({shapes:Object.keys(cY)}),{name:"x",scale:"band",required:!0},{name:"y",required:!0},{name:"series",scale:"band"},{name:"size"}],preInference:[...cz(),{type:tX},{type:tK}],postInference:[...cD()],interaction:{shareTooltip:!0}};let cK={rect:ch,hollow:cd},cZ=()=>(t,e,n,r)=>{let{x:i,x1:o,y:a,y1:l}=n,s=Array.from(t,t=>[[+i[t],+a[t]],[+o[t],+a[t]],[+o[t],+l[t]],[+i[t],+l[t]]].map(t=>r.map(t)));return[t,s]};cZ.props={defaultShape:"rect",defaultLabelShape:"label",composite:!1,shape:cK,channels:[...cI({shapes:Object.keys(cK)}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...cz(),{type:tX}],postInference:[...cD()],interaction:{shareTooltip:!0}};var cQ=c0(cm);function cJ(t){this._curve=t}function c0(t){function e(e){return new cJ(t(e))}return e._curve=t,e}function c1(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(c0(t)):e()._curve},t}function c2(t){let e="function"==typeof t?t:t.render;return class extends lP{connectedCallback(){this.draw()}attributeChangedCallback(){this.draw()}draw(){e(this)}}}cJ.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)))}};var c5=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 c3=c2(t=>{let{d1:e,d2:n,style1:r,style2:i}=t.attributes,o=t.ownerDocument;uf(t).maybeAppend("line",()=>o.createElement("path",{})).style("d",e).call(cn,r),uf(t).maybeAppend("line1",()=>o.createElement("path",{})).style("d",n).call(cn,i)}),c4=(t,e)=>{let{curve:n,gradient:r=!1,gradientColor:i="between",defined:o=t=>!Number.isNaN(t)&&null!=t,connect:a=!1}=t,l=c5(t,["curve","gradient","gradientColor","defined","connect"]),{coordinate:s,document:u}=e;return(t,e,c)=>{let f,{color:p,lineWidth:h}=c,d=c5(c,["color","lineWidth"]),{color:y=p,size:g=h,seriesColor:v,seriesX:b,seriesY:x}=e,O=cs(s,e),w=eh(s),E=r&&v?ci(v,b,x,r,i,w):y,k=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},d),E&&{stroke:E}),g&&{lineWidth:g}),O&&{transform:O}),l);if(ed(s)){let t=s.getCenter();f=e=>c1(cx().curve(cQ)).angle((n,r)=>ug(uh(e[r],t))).radius((n,r)=>ud(e[r],t)).defined(([t,e])=>o(t)&&o(e)).curve(n)(e)}else f=cx().x(t=>t[0]).y(t=>t[1]).defined(([t,e])=>o(t)&&o(e)).curve(n);let[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=uo(k,"connect"),P=!!_.length;return P&&(!a||Object.keys(S).length)?P&&!a?uf(u.createElement("path",{})).style("d",f(t)).call(cn,k).node():uf(new c3).style("style1",Object.assign(Object.assign({},k),S)).style("style2",k).style("d1",_.map(f).join(",")).style("d2",f(t)).node():uf(u.createElement("path",{})).style("d",f(M)||[]).call(cn,k).node()}};c4.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let c6=(t,e)=>{let{coordinate:n}=e;return(...r)=>c4(Object.assign({curve:ed(n)?cE:cm},t),e)(...r)};function c8(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 c9(t,e){this._context=t,this._k=(1-e)/6}function c7(t,e){this._context=t,this._k=(1-e)/6}function ft(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 fe(t,e){this._context=t,this._alpha=e}function fn(t,e){this._context=t,this._alpha=e}c6.props=Object.assign(Object.assign({},c4.props),{defaultMarker:"line"}),c9.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:c8(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*=1,e*=1,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:c8(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 c9(t,e)}return n.tension=function(e){return t(+e)},n}(0),c7.prototype={areaStart:cO,areaEnd:cO,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*=1,e*=1,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:c8(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 c7(t,e)}return n.tension=function(e){return t(+e)},n}(0),fe.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t*=1,e*=1,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:ft(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 fe(t,e):new c9(t,0)}return n.alpha=function(e){return t(+e)},n}(.5),fn.prototype={areaStart:cO,areaEnd:cO,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*=1,e*=1,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:ft(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 fr=function t(e){function n(t){return e?new fn(t,e):new c7(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function fi(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);return((o<0?-1:1)+(a<0?-1:1))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs((o*i+a*r)/(r+i)))||0}function fo(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function fa(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 fl(t){this._context=t}function fs(t){this._context=new fu(t)}function fu(t){this._context=t}function fc(t){return new fl(t)}function ff(t){return new fs(t)}fl.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:fa(this,this._t0,fo(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(e*=1,(t*=1)!==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,fa(this,fo(this,n=fi(this,t,e)),n);break;default:fa(this,this._t0,n=fi(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}},(fs.prototype=Object.create(fl.prototype)).point=function(t,e){fl.prototype.point.call(this,e,t)},fu.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 fp=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 fh=(t,e)=>{let n=fp(t,[]),{coordinate:r}=e;return(...t)=>c4(Object.assign({curve:ed(r)?fr:eh(r)?ff:fc},n),e)(...t)};function fd(t,e){this._context=t,this._t=e}function fy(t){return new fd(t,.5)}function fg(t){return new fd(t,0)}function fm(t){return new fd(t,1)}fh.props=Object.assign(Object.assign({},c4.props),{defaultMarker:"smooth"}),fd.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*=1,e*=1,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 fv=(t,e)=>c4(Object.assign({curve:fm},t),e);fv.props=Object.assign(Object.assign({},c4.props),{defaultMarker:"hv"});let fb=(t,e)=>c4(Object.assign({curve:fg},t),e);fb.props=Object.assign(Object.assign({},c4.props),{defaultMarker:"vh"});let fx=(t,e)=>c4(Object.assign({curve:fy},t),e);fx.props=Object.assign(Object.assign({},c4.props),{defaultMarker:"hvh"});var fO=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 fw=(t,e)=>{let{document:n}=e;return(e,r,i)=>{let{seriesSize:o,color:a}=r,{color:l}=i,s=fO(i,["color"]),u=ei();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(ui)&&function(t,e,n,r,i){let o=uy(uh(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=uh(d,s),g=uh(n,s),v=uh(e,l),b=uh(v,c),x=uh(e,c),O=uh(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(...b,...x,r/2),t.arcTo(...O,...f,r/2),t.closePath()}(u,n,r,i,a)}return uf(n.createElement("path",{})).call(cn,s).style("fill",a||l).style("d",u.toString()).call(cn,t).node()}};fw.props=Object.assign(Object.assign({},c4.props),{defaultMarker:"line"});let fE=()=>(t,e)=>{let{style:n={},encode:r}=e,{series:i}=r,{gradient:o}=n;return!o||i?[t,e]:[t,tW({},e,{encode:{series:tH(tV(t,void 0))}})]};fE.props={};let fk=()=>(t,e)=>{let{encode:n}=e,{series:r,color:i}=n;if(void 0!==r||void 0===i)return[t,e];let[o,a]=tU(n,"color");return[t,tW({},e,{encode:{series:t$(o,a)}})]};fk.props={};let fM={line:c6,smooth:fh,hv:fv,vh:fb,hvh:fx,trail:fw},f_=()=>(t,e,n,r)=>(em(r)?(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]}:(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(s1(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.call(u))||0)/2,d=((null==(o=null==c?void 0:c.getBandWidth)?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]})(t,e,n,r);f_.props={defaultShape:"line",defaultLabelShape:"label",composite:!1,shape:fM,channels:[...cI({shapes:Object.keys(fM)}),{name:"x"},{name:"y"},{name:"position",independent:!0},{name:"size"},{name:"series",scale:"band"}],preInference:[...cz(),{type:fE},{type:fk}],postInference:[...cD(),{type:cA,channel:"color"},{type:cT,channel:["position"]}],interaction:{shareTooltip:!0,seriesTooltip:!0,crosshairs:!0}};var fS=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 fP=(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"]];fP.style=["fill"];let fj=fP.bind(void 0);fj.style=["stroke","lineWidth"];let fA=(t,e,n)=>[["M",t-n,e-n],["L",t+n,e-n],["L",t+n,e+n],["L",t-n,e+n],["Z"]];fA.style=["fill"];let fT=fA.bind(void 0);fT.style=["fill"];let fC=fA.bind(void 0);fC.style=["stroke","lineWidth"];let fN=(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"]]};fN.style=["fill"];let fL=fN.bind(void 0);fL.style=["stroke","lineWidth"];let fI=(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"]]};fI.style=["fill"];let fR=fI.bind(void 0);fR.style=["stroke","lineWidth"];let fD=(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"]]};fD.style=["fill"];let fF=fD.bind(void 0);fF.style=["stroke","lineWidth"];let fz=(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"]]};fz.style=["fill"];let fB=fz.bind(void 0);fB.style=["stroke","lineWidth"];let fW=(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"]]};fW.style=["fill"];let f$=fW.bind(void 0);f$.style=["stroke","lineWidth"];let fG=(t,e,n)=>[["M",t,e+n],["L",t,e-n]];fG.style=["stroke","lineWidth"];let fH=(t,e,n)=>[["M",t-n,e-n],["L",t+n,e+n],["M",t+n,e-n],["L",t-n,e+n]];fH.style=["stroke","lineWidth"];let fV=(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]];fV.style=["stroke","lineWidth"];let fU=(t,e,n)=>[["M",t-n,e],["L",t+n,e],["M",t,e-n],["L",t,e+n]];fU.style=["stroke","lineWidth"];let fq=(t,e,n)=>[["M",t-n,e],["L",t+n,e]];fq.style=["stroke","lineWidth"];let fY=(t,e,n)=>[["M",t-n,e],["L",t+n,e]];fY.style=["stroke","lineWidth"];let fX=fY.bind(void 0);fX.style=["stroke","lineWidth"];let fK=(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]];fK.style=["stroke","lineWidth"];let fZ=(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]];fZ.style=["stroke","lineWidth"];let fQ=(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]];fQ.style=["stroke","lineWidth"];let fJ=(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]];fJ.style=["stroke","lineWidth"];let f0=(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]];f0.style=["stroke","lineWidth"];let f1=new Map([["bowtie",fW],["cross",fH],["dash",fX],["diamond",fN],["dot",fY],["hexagon",fz],["hollowBowtie",f$],["hollowDiamond",fL],["hollowHexagon",fB],["hollowPoint",fj],["hollowSquare",fC],["hollowTriangle",fR],["hollowTriangleDown",fF],["hv",fZ],["hvh",fJ],["hyphen",fq],["line",fG],["plus",fU],["point",fP],["rect",fT],["smooth",fK],["square",fA],["tick",fV],["triangleDown",fD],["triangle",fI],["vh",fQ],["vhv",f0]]);var f2=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 f5=(t,e)=>{let{colorAttribute:n,symbol:r,mode:i="auto"}=t,o=f2(t,["colorAttribute","symbol","mode"]),a=f1.get(r)||f1.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]=cu(e),b=function(t,e,n,r){if(1===e.length)return;let{size:i}=n;if("fixed"===t)return i;if("normal"===t||ev(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 uf(s.createElement("path",{})).call(cn,u).style("fill","transparent").style("d",a(g,v,b)).style("lineWidth",p).style("transform",d).style("stroke",h).style(cl(t),y).style(n,h).call(cn,o).node()}};f5.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let f3=(t,e)=>f5(Object.assign({colorAttribute:"stroke",symbol:"point"},t),e);f3.props=Object.assign({defaultMarker:"hollowPoint"},f5.props);let f4=(t,e)=>f5(Object.assign({colorAttribute:"stroke",symbol:"diamond"},t),e);f4.props=Object.assign({defaultMarker:"hollowDiamond"},f5.props);let f6=(t,e)=>f5(Object.assign({colorAttribute:"stroke",symbol:"hexagon"},t),e);f6.props=Object.assign({defaultMarker:"hollowHexagon"},f5.props);let f8=(t,e)=>f5(Object.assign({colorAttribute:"stroke",symbol:"square"},t),e);f8.props=Object.assign({defaultMarker:"hollowSquare"},f5.props);let f9=(t,e)=>f5(Object.assign({colorAttribute:"stroke",symbol:"triangle-down"},t),e);f9.props=Object.assign({defaultMarker:"hollowTriangleDown"},f5.props);let f7=(t,e)=>f5(Object.assign({colorAttribute:"stroke",symbol:"triangle"},t),e);f7.props=Object.assign({defaultMarker:"hollowTriangle"},f5.props);let pt=(t,e)=>f5(Object.assign({colorAttribute:"stroke",symbol:"bowtie"},t),e);pt.props=Object.assign({defaultMarker:"hollowBowtie"},f5.props);let pe=(t,e)=>f5(Object.assign({colorAttribute:"fill",symbol:"point"},t),e);pe.props=Object.assign({defaultMarker:"point"},f5.props);let pn=(t,e)=>f5(Object.assign({colorAttribute:"stroke",symbol:"plus"},t),e);pn.props=Object.assign({defaultMarker:"plus"},f5.props);let pr=(t,e)=>f5(Object.assign({colorAttribute:"fill",symbol:"diamond"},t),e);pr.props=Object.assign({defaultMarker:"diamond"},f5.props);let pi=(t,e)=>f5(Object.assign({colorAttribute:"fill",symbol:"square"},t),e);pi.props=Object.assign({defaultMarker:"square"},f5.props);let po=(t,e)=>f5(Object.assign({colorAttribute:"fill",symbol:"triangle"},t),e);po.props=Object.assign({defaultMarker:"triangle"},f5.props);let pa=(t,e)=>f5(Object.assign({colorAttribute:"fill",symbol:"hexagon"},t),e);pa.props=Object.assign({defaultMarker:"hexagon"},f5.props);let pl=(t,e)=>f5(Object.assign({colorAttribute:"stroke",symbol:"cross"},t),e);pl.props=Object.assign({defaultMarker:"cross"},f5.props);let ps=(t,e)=>f5(Object.assign({colorAttribute:"fill",symbol:"bowtie"},t),e);ps.props=Object.assign({defaultMarker:"bowtie"},f5.props);let pu=(t,e)=>f5(Object.assign({colorAttribute:"stroke",symbol:"hyphen"},t),e);pu.props=Object.assign({defaultMarker:"hyphen"},f5.props);let pc=(t,e)=>f5(Object.assign({colorAttribute:"stroke",symbol:"line"},t),e);pc.props=Object.assign({defaultMarker:"line"},f5.props);let pf=(t,e)=>f5(Object.assign({colorAttribute:"stroke",symbol:"tick"},t),e);pf.props=Object.assign({defaultMarker:"tick"},f5.props);let pp=(t,e)=>f5(Object.assign({colorAttribute:"fill",symbol:"triangle-down"},t),e);pp.props=Object.assign({defaultMarker:"triangleDown"},f5.props);let ph=()=>(t,e)=>{let{encode:n}=e,{y:r}=n;return void 0!==r?[t,e]:[t,tW({},e,{encode:{y:tG(tV(t,0))},scale:{y:{guide:null}}})]};ph.props={};let pd=()=>(t,e)=>{let{encode:n}=e,{size:r}=n;return void 0!==r?[t,e]:[t,tW({},e,{encode:{size:tH(tV(t,3))}})]};pd.props={};let py={hollow:f3,hollowDiamond:f4,hollowHexagon:f6,hollowSquare:f8,hollowTriangleDown:f9,hollowTriangle:f7,hollowBowtie:pt,point:pe,plus:pn,diamond:pr,square:pi,triangle:po,hexagon:pa,cross:pl,bowtie:ps,hyphen:pu,line:pc,tick:pf,triangleDown:pp},pg=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=cW(n,r,t),y=t=>{let e=+((null==c?void 0:c[t])||0),n=+((null==f?void 0:f[t])||0);return[(l?(+o[t]+ +l[t])/2:+o[t])+e,(s?(+a[t]+ +s[t])/2:+a[t])+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]};pg.props={defaultShape:"hollow",defaultLabelShape:"label",composite:!1,shape:py,channels:[...cI({shapes:Object.keys(py)}),{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:[...cz(),{type:tK},{type:ph}],postInference:[{type:pd},...cR()]};var pm=function(t){return"function"==typeof t};function pv(t){px(t,!0)}function pb(t){px(t,!1)}function px(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 pO=function(t){return"object"==typeof t&&null!==t},pw={}.toString,pE=function(t,e){return pw.call(t)==="[object "+e+"]"},pk=function(t){if(!pO(t)||!pE(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},pM=function(t){return Array.isArray?Array.isArray(t):pE(t,"Array")},p_=function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=5),Object.entries(e).forEach(function(i){var o=ej(i,2),a=o[0],l=o[1];Object.prototype.hasOwnProperty.call(e,a)&&(l?pk(l)?(pk(t[a])||(t[a]={}),n<r?p_(t[a],l,n+1,r):t[a]=e[a]):pM(l)?(t[a]=[],t[a]=t[a].concat(l)):t[a]=l:t[a]=l)})},pS=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)p_(t,e[r]);return t},pP=function(t){function e(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=t.apply(this,eT([],ej(e),!1))||this;return r.addEventListener(_S.INSERTED,function(){pb(r)}),r}return eE(e,t),e}(lA);function pj(t){var e=t.appendChild(new pP({class:"offscreen"}));return pb(e),e}function pA(){px(this,"hidden"!==this.attributes.visibility)}var pT=function(t){function e(e,n){void 0===n&&(n={});var r=t.call(this,pS({},{style:n},e))||this;return r.initialized=!1,r._defaultOptions=n,r}return eE(e,t),Object.defineProperty(e.prototype,"offscreenGroup",{get:function(){return this._offscreen||(this._offscreen=pj(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)||t.destroy()},e.prototype.attributeChangedCallback=function(t){"visibility"===t&&pA.call(this)},e.prototype.update=function(t,e){var n;return this.attr(pS({},this.attributes,t||{})),null==(n=this.render)?void 0:n.call(this,this.attributes,this,e)},e.prototype.clear=function(){this.removeChildren()},e.prototype.bindEvents=function(t,e){},e}(lP);function pC(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 pN=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=eM(e,["style"]);return t.call(this,ek({style:ek({text:"",fill:"black",fontFamily:"sans-serif",fontSize:16,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",lineWidth:1,textAlign:"start",textBaseline:"middle"},n)},r))||this}return eE(e,t),Object.defineProperty(e.prototype,"offscreenGroup",{get:function(){return this._offscreen||(this._offscreen=pj(this)),this._offscreen},enumerable:!1,configurable:!0}),e.prototype.disconnectedCallback=function(){var t;null==(t=this._offscreen)||t.destroy()},e}(lF),pL=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=ej(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=eC(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=eC(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=eC(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});for(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]})),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 b=t[v],x=n(b,v),O=r(b,v);if(d.has(x)){var w=d.get(x);w.__data__=b,w.__facet__=!1,c.push(w),f.delete(w),d.delete(x)}else if(y.has(x)){var w=y.get(x);w.__data__=b,w.__facet__=!0,c.push(w),y.delete(x)}else if(g.has(x)){var E=g.get(x);p.push([b,E]);try{for(var k=(l=void 0,eP(E)),M=k.next();!M.done;M=k.next()){var w=M.value;f.delete(w)}}catch(t){l={error:t}}finally{try{M&&!M.done&&(s=k.return)&&s.call(k)}finally{if(l)throw l.error}}g.delete(x)}else if(d.has(O)){var w=d.get(O);w.__toData__?w.__toData__.push(b):w.__toData__=[b],h.add(w),f.delete(w)}else u.push(b)}var _=[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,_)},r.prototype.merge=function(t){var n=eT(eT([],ej(this._elements),!1),ej(t._elements),!1),r=eT(eT([],ej(this._transitions),!1),ej(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];if(n)return new n;throw Error("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=ej(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,eT([this._parent,this],ej(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:lA,rect:lD,circle:lS,path:lL,text:pN,ellipse:lj,image:lC,line:lN,polygon:lI,polyline:lR,html:lT},r}();function pI(t){return new pL([t],null,t,t.ownerDocument)}var pR=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"]]},pD=function(t,e,n){return[["M",t,e+n],["L",t,e-n]]},pF=function(t,e,n){return[["M",t-n,e],["L",t+n,e]]},pz=function(t){var e=typeof t;return null!==t&&"object"===e||"function"===e},pB=function(t){return pE(t,"String")},pW=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return eE(e,t),e.prototype.render=function(t,n){var r,i=t.symbol,o=t.size,a=void 0===o?16:o,l=eM(t,["symbol","size"]),s=["base64","url","image"].includes(r=function(t){var e="default";if(pz(t)&&t instanceof Image)e="image";else if(pm(t))e="symbol";else if(pB(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}(i))?"image":i&&"symbol"===r?"path":null;pC(!!s,pI(n),function(t){t.maybeAppendByClassName("marker",s).attr("className","marker ".concat(s,"-marker")).call(function(t){if("image"===s){var n=2*a;t.styles({img:i,width:n,height:n,x:-a,y:-a})}else{var n=a/2,r=pm(i)?i:e.getSymbol(i);t.styles(ek({path:null==r?void 0:r(0,0,n)},l))}})})},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}(pT);pW.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]]}),pW.registerSymbol("hyphen",function(t,e,n){return[["M",t-n,e],["L",t+n,e]]}),pW.registerSymbol("line",pD),pW.registerSymbol("plus",function(t,e,n){return[["M",t-n,e],["L",t+n,e],["M",t,e-n],["L",t,e+n]]}),pW.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]]}),pW.registerSymbol("circle",pR),pW.registerSymbol("point",pR),pW.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"]]}),pW.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"]]}),pW.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"]]}),pW.registerSymbol("diamond",function(t,e,n){return[["M",t-n,e],["L",t,e-n],["L",t+n,e],["L",t,e+n],["Z"]]}),pW.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"]]}),pW.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"]]}),pW.registerSymbol("line",pD),pW.registerSymbol("dot",pF),pW.registerSymbol("dash",pF),pW.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]]}),pW.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]]}),pW.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]]}),pW.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]]}),pW.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 p$=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 pG=c2(t=>{let e,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:b,innerHTML:x}=n,O=p$(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=>!u6(t)))return void t.children.forEach(t=>t.remove());let w=uo(O,"background"),{padding:E}=w,k=p$(w,["padding"]),M=uo(O,"connector"),{points:_=[]}=M,S=p$(M,["points"]),P=[[+f,+p],[+u,+c]];e=x?uf(t).maybeAppend("html","html",r).style("zIndex",0).style("innerHTML",x).call(cn,Object.assign({transform:l,transformOrigin:s},O)).node():uf(t).maybeAppend("text","text").style("zIndex",0).style("text",h).call(cn,Object.assign({textBaseline:"middle",transform:l,transformOrigin:s},O)).node();let j=function(t,e,n,r){let i,o,[[a,l],[s,u]]=e,[c,f]=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(a===s&&l===u)return cx()([[0,0],[c,f]]);let p=[[a-s,l-u]].concat(n.length?n:[[0,0]]),h=[r[0]-s,r[1]-u],[d,y]=p;if(i=ud(h,d),(Math.pow(i,2)+Math.pow(o=ud(d,y),2)-Math.pow(ud(y,h),2))/(2*i*o)>0){let e=(()=>{let{min:e,max:n}=t.getLocalBounds(),r=d[0]+(d[1]-h[1])*(d[1]-0)/(d[0]-h[0]);return n[0]<h[0]?Math.min(n[0],r):Math.max(e[0],r)})();p.splice(1,1,[e,0])}return cx()(p)}(uf(t).maybeAppend("background","rect").style("zIndex",-1).call(cn,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,E)).call(cn,d?k:{}).node(),P,_,b),A=g&&new pW({id:"startMarker",style:Object.assign({x:0,y:0},uo(O,"startMarker"))}),T=v&&new pW({id:"endMarker",style:Object.assign({x:0,y:0},uo(O,"endMarker"))});uf(t).maybeAppend("connector","path").style("zIndex",0).style("path",j).style("markerStart",A).style("markerEnd",T).call(cn,y?S:{})}),pH=(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 uf(new pG).style("x",f).style("y",p).call(cn,i).style("transform",`${u}rotate(${+s})`).style("coordCenter",n.getCenter()).call(cn,c).call(cn,t).node()}};pH.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var pV=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 pU=c2(t=>{let e=t.attributes,{class:n,x:r,y:i}=e,o=pV(e,["class","x","y"]),a=uo(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]}(uf(t).maybeAppend("marker",()=>new pW({})).call(t=>t.node().update(Object.assign({symbol:s},a))).node());uf(t).maybeAppend("text","text").style("x",u).style("y",c).call(cn,o)}),pq=(t,e)=>{let n=pV(t,[]);return(t,e,r)=>{let{color:i}=r,o=pV(r,["color"]),{color:a=i,text:l=""}=e,s={text:String(l),stroke:a,fill:a},[[u,c]]=t;return uf(new pU).call(cn,o).style("x",u).style("y",c).call(cn,s).call(cn,n).node()}};pq.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let pY=()=>(t,e)=>{let{data:n}=e;if(!Array.isArray(n)||n.some(tY))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,tW({},e,{encode:{x:t$(i),y:t$(o)}})]};pY.props={};var pX=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 pK=()=>(t,e)=>{let{data:n,style:r={}}=e,i=pX(e,["data","style"]),{x:o,y:a}=r,l=pX(r,["x","y"]);return void 0==o||void 0==a?[t,e]:[[0],tW({},i,{data:[0],cartesian:!0,encode:{x:t$([o||0]),y:t$([a||0])},scale:{x:{type:"identity",independent:!0,guide:null},y:{type:"identity",independent:!0,guide:null}},style:l})]};pK.props={};let pZ={text:pH,badge:pq},pQ=t=>{let{cartesian:e=!1}=t;return e?cG:(e,n,r,i)=>{let{x:o,y:a}=r,l=cW(n,r,t),s=Array.from(e,t=>{let e=[+o[t],+a[t]];return[i.map(l(e,t))]});return[e,s]}};pQ.props={defaultShape:"text",defaultLabelShape:"label",composite:!1,shape:pZ,channels:[...cI({shapes:Object.keys(pZ)}),{name:"x",required:!0},{name:"y",required:!0},{name:"text",scale:"identity"},{name:"fontSize"},{name:"rotate"}],preInference:[...cz(),{type:pY},{type:pK}],postInference:[...cR()]};let pJ=()=>(t,e)=>[t,tW({scale:{x:{padding:0},y:{padding:0}}},e)];pJ.props={};let p0={cell:ch,hollow:cd},p1=()=>(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 p2(t,e,n){var r=null,i=tZ(!0),o=null,a=cm,l=null,s=eo(u);function u(u){var c,f,p,h,d,y=(u=cy(u)).length,g=!1,v=Array(y),b=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],b[p]);l.lineEnd(),l.areaEnd()}g&&(v[c]=+t(h,c,u),b[c]=+e(h,c,u),l.point(r?+r(h,c,u):v[c],n?+n(h,c,u):b[c]))}if(d)return l=null,d+""||null}function c(){return cx().defined(i).curve(a).context(o)}return t="function"==typeof t?t:void 0===t?cv:tZ(+t),e="function"==typeof e?e:void 0===e?tZ(0):tZ(+e),n="function"==typeof n?n:void 0===n?cb:tZ(+n),u.x=function(e){return arguments.length?(t="function"==typeof e?e:tZ(+e),r=null,u):t},u.x0=function(e){return arguments.length?(t="function"==typeof e?e:tZ(+e),u):t},u.x1=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:tZ(+t),u):r},u.y=function(t){return arguments.length?(e="function"==typeof t?t:tZ(+t),n=null,u):e},u.y0=function(t){return arguments.length?(e="function"==typeof t?t:tZ(+t),u):e},u.y1=function(t){return arguments.length?(n=null==t?null:"function"==typeof t?t:tZ(+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:tZ(!!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}p1.props={defaultShape:"cell",defaultLabelShape:"label",shape:p0,composite:!1,channels:[...cI({shapes:Object.keys(p0)}),{name:"x",required:!0,scale:"band"},{name:"y",required:!0,scale:"band"}],preInference:[...cz(),{type:tK},{type:ph},{type:pJ}],postInference:[...cR()]};var p5=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 p3=c2(t=>{let{areaPath:e,connectPath:n,areaStyle:r,connectStyle:i}=t.attributes,o=t.ownerDocument;uf(t).maybeAppend("connect-path",()=>o.createElement("path",{})).style("d",n).call(cn,i),uf(t).maybeAppend("area-path",()=>o.createElement("path",{})).style("d",e).call(cn,r)}),p4=(t,e)=>{let{curve:n,gradient:r=!1,defined:i=t=>!Number.isNaN(t)&&null!=t,connect:o=!1}=t,a=p5(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=eh(l),g=cs(l,e),v=r&&p?ci(p,h,d,r,void 0,y):f,b=Object.assign(Object.assign(Object.assign(Object.assign({},u),{stroke:v,fill:v}),g&&{transform:g}),a),[x,O]=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),w=uo(b,"connect"),E=!!O.length,k=t=>uf(s.createElement("path",{})).style("d",t||"").call(cn,b).node();if(ed(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=p2().curve(cQ)).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 c1(o())},delete e.lineX0,e.lineEndAngle=function(){return c1(a())},delete e.lineX1,e.lineInnerRadius=function(){return c1(s())},delete e.lineY0,e.lineOuterRadius=function(){return c1(u())},delete e.lineY1,e.curve=function(t){return arguments.length?r(c0(t)):r()._curve},e).angle((t,e)=>ug(uh(f[e],c))).outerRadius((t,e)=>ud(f[e],c)).innerRadius((t,e)=>ud(p[e],c)).defined((t,e)=>[...f[e],...p[e]].every(i)).curve(n)(p)};return E&&(!o||Object.keys(w).length)?E&&!o?k(e(t)):uf(new p3).style("areaStyle",b).style("connectStyle",Object.assign(Object.assign({},w),a)).style("areaPath",e(t)).style("connectPath",O.map(e).join("")).node():k(e(x))}{let e=t=>{let e=t.slice(0,t.length/2),r=t.slice(t.length/2);return y?p2().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):p2().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 E&&(!o||Object.keys(w).length)?E&&!o?k(e(t)):uf(new p3).style("areaStyle",b).style("connectStyle",Object.assign(Object.assign({},w),a)).style("areaPath",e(t)).style("connectPath",O.map(e).join("")).node():k(e(x))}}};p4.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let p6=(t,e)=>{let{coordinate:n}=e;return(...r)=>p4(Object.assign({curve:ed(n)?cE:cm},t),e)(...r)};p6.props=Object.assign(Object.assign({},p4.props),{defaultMarker:"square"});var p8=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 p9=(t,e)=>{let n=p8(t,[]),{coordinate:r}=e;return(...t)=>p4(Object.assign({curve:ed(r)?fr:eh(r)?ff:fc},n),e)(...t)};p9.props=Object.assign(Object.assign({},p4.props),{defaultMarker:"smooth"});let p7=(t,e)=>(...n)=>p4(Object.assign({curve:fy},t),e)(...n);p7.props=Object.assign(Object.assign({},p4.props),{defaultMarker:"hvh"});let ht=(t,e)=>(...n)=>p4(Object.assign({curve:fg},t),e)(...n);ht.props=Object.assign(Object.assign({},p4.props),{defaultMarker:"vh"});let he=(t,e)=>(...n)=>p4(Object.assign({curve:fm},t),e)(...n);he.props=Object.assign(Object.assign({},p4.props),{defaultMarker:"hv"});let hn={area:p6,smooth:p9,hvh:p7,vh:ht,hv:he},hr=()=>(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(s1(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.call(c))||0)/2,y=((null==(o=null==f?void 0:f.getBandWidth)?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]};hr.props={defaultShape:"area",defaultLabelShape:"label",composite:!1,shape:hn,channels:[...cI({shapes:Object.keys(hn)}),{name:"x",required:!0},{name:"y",required:!0},{name:"size"},{name:"series",scale:"band"}],preInference:[...cz(),{type:fk},{type:tX},{type:pJ}],postInference:[...cD()],interaction:{shareTooltip:!0,seriesTooltip:!0,crosshairs:!0}};let hi=()=>(t,e)=>{let{encode:n}=e,{y1:r}=n;if(r)return[t,e];let[i]=tU(n,"y");return[t,tW({},e,{encode:{y1:t$([...i])}})]};hi.props={};let ho=()=>(t,e)=>{let{encode:n}=e,{x1:r}=n;if(r)return[t,e];let[i]=tU(n,"x");return[t,tW({},e,{encode:{x1:t$([...i])}})]};ho.props={};var ha=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 hl=(t,e)=>{let{arrow:n=!0,arrowSize:r="40%"}=t,i=ha(t,["arrow","arrowSize"]),{document:o}=e;return(t,e,a)=>{let{defaultColor:l}=a,s=ha(a,["defaultColor"]),{color:u=l,transform:c}=e,[f,p]=t,h=ei();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*ud(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 uf(o.createElement("path",{})).call(cn,s).style("d",h.toString()).style("stroke",u).style("transform",c).call(cn,i).node()}};hl.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let hs=(t,e)=>{let{arrow:n=!1}=t;return(...r)=>hl(Object.assign(Object.assign({},t),{arrow:n}),e)(...r)};hs.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var hu=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 hc=(t,e)=>{let n=hu(t,[]),{coordinate:r,document:i}=e;return(t,e,o)=>{let{color:a}=o,l=hu(o,["color"]),{color:s=a,transform:u}=e,[c,f]=t,p=ei();if(p.moveTo(c[0],c[1]),ed(r)){let t=r.getCenter();p.quadraticCurveTo(t[0],t[1],f[0],f[1])}else{let t=ub(c,f),e=ud(c,f)/2;cr(p,c,f,t,e)}return uf(i.createElement("path",{})).call(cn,l).style("d",p.toString()).style("stroke",s).style("transform",u).call(cn,n).node()}};hc.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var hf=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 hp=(t,e)=>{let n=hf(t,[]),{document:r}=e;return(t,e,i)=>{let{color:o}=i,a=hf(i,["color"]),{color:l=o,transform:s}=e,[u,c]=t,f=ei();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]),uf(r.createElement("path",{})).call(cn,a).style("d",f.toString()).style("stroke",l).style("transform",s).call(cn,n).node()}};hp.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var hh=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 hd=(t,e)=>{let{cornerRatio:n=1/3}=t,r=hh(t,["cornerRatio"]),{coordinate:i,document:o}=e;return(t,e,a)=>{let{defaultColor:l}=a,s=hh(a,["defaultColor"]),{color:u=l,transform:c}=e,[f,p]=t,h=function(t,e,n,r){let i=ei();if(ed(n)){let o=n.getCenter(),a=ud(t,o),l=ud(e,o);return i.moveTo(t[0],t[1]),cr(i,t,e,o,(l-a)*r+a),i.lineTo(e[0],e[1]),i}return eh(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.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 uf(o.createElement("path",{})).call(cn,s).style("d",h.toString()).style("stroke",u).style("transform",c).call(cn,r).node()}};hd.props={defaultMarker:"vhv",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let hy={link:hs,arc:hc,smooth:hp,vhv:hd},hg=t=>(e,n,r,i)=>{let{x:o,y:a,x1:l=o,y1:s=a}=r,u=cW(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]};hg.props={defaultShape:"link",defaultLabelShape:"label",composite:!1,shape:hy,channels:[...cI({shapes:Object.keys(hy)}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...cz(),{type:hi},{type:ho}],postInference:[...cR()]};var hm=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 hv=(t,e)=>{let{coordinate:n,document:r}=e;return(e,i,o)=>{let{color:a}=o,l=hm(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?c$(p)*g:p,h="string"==typeof h?c$(h)*v:h;let b=d-Number(p)/2,x=y-Number(h)/2;return uf(r.createElement("image",{})).call(cn,l).style("x",b).style("y",x).style("img",u).style("stroke",s).style("transform",f).call(cn,t).style("width",p).style("height",h).node()}};hv.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let hb={image:hv},hx=t=>{let{cartesian:e}=t;return e?cG:(e,n,r,i)=>{let{x:o,y:a}=r,l=cW(n,r,t),s=Array.from(e,t=>{let e=[+o[t],+a[t]];return[i.map(l(e,t))]});return[e,s]}};hx.props={defaultShape:"image",defaultLabelShape:"label",composite:!1,shape:hb,channels:[...cI({shapes:Object.keys(hb)}),{name:"x",required:!0},{name:"y",required:!0},{name:"src",scale:"identity"},{name:"size"}],preInference:[...cz(),{type:pY},{type:pK}],postInference:[...cR()]};var hO=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 hw=(t,e)=>{let{coordinate:n,document:r}=e;return(e,i,o)=>{let{color:a}=o,l=hO(o,["color"]),{color:s=a,transform:u}=i,c=function(t,e){let n=ei();if(ed(e)){let r=e.getCenter(),i=[...t,t[0]],o=i.map(t=>ud(t,r));return i.forEach((e,i)=>{if(0===i)return void n.moveTo(e[0],e[1]);let a=o[i],l=t[i-1],s=o[i-1];void 0!==s&&1e-10>Math.abs(a-s)?cr(n,l,e,r,a):n.lineTo(e[0],e[1])}),n.closePath(),n}return t.forEach((t,e)=>0===e?n.moveTo(t[0],t[1]):n.lineTo(t[0],t[1])),n.closePath(),n}(e,n);return uf(r.createElement("path",{})).call(cn,l).style("d",c.toString()).style("stroke",s).style("fill",s).style("transform",u).call(cn,t).node()}};hw.props={defaultMarker:"square",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var hE=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 hk=(t,e)=>{let n=hE(t,[]),{coordinate:r,document:i}=e;return(t,e,o)=>{let{color:a}=o,l=hE(o,["color"]),{color:s=a,transform:u}=e,c=function(t,e){let[n,r,i,o]=t,a=ei();if(ed(e)){let t=e.getCenter(),l=ud(t,n);return a.moveTo(n[0],n[1]),a.quadraticCurveTo(t[0],t[1],i[0],i[1]),cr(a,i,o,t,l),a.quadraticCurveTo(t[0],t[1],r[0],r[1]),cr(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 uf(i.createElement("path",{})).call(cn,l).style("d",c.toString()).style("fill",s||a).style("stroke",s||a).style("transform",u).call(cn,n).node()}};hk.props={defaultMarker:"square",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let hM={polygon:hw,ribbon:hk},h_=()=>(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]};h_.props={defaultShape:"polygon",defaultLabelShape:"label",composite:!1,shape:hM,channels:[...cI({shapes:Object.keys(hM)}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...cz()],postInference:[...cR()]};var hS=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 hP=(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=hS(o,["color","fill","stroke"]),p=function(t,e){let n=ei();if(ed(e)){let r=e.getCenter(),[i,o]=r,a=uy(uh(t[0],r)),l=uy(uh(t[1],r)),s=ud(r,t[2]),u=ud(r,t[3]),c=ud(r,t[8]),f=ud(r,t[10]),p=ud(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 uf(r.createElement("path",{})).call(cn,f).style("d",p.toString()).style("stroke",c).style("fill",a||u).style("transform",l).call(cn,t).node()}};hP.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var hj=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 hA=(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=hj(o,["color","fill","stroke"]),p=function(t,e,n=4){let r=ei();if(!ed(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=ud(i,t[3]),s=ud(i,t[8]),u=ud(i,t[10]),c=uy(uh(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 uf(r.createElement("path",{})).call(cn,f).style("d",p.toString()).style("stroke",c).style("fill",a||u).style("transform",l).call(cn,t).node()}};hA.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let hT={box:hP,violin:hA},hC=()=>(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,b,x]=[+o[t],+a[t],+l[t],+s[t],+u[t]];return[[d-n/2,x],[d+n/2,x],[d,x],[d,b],[d-n/2,b],[d+n/2,b],[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]};hC.props={defaultShape:"box",defaultLabelShape:"label",composite:!1,shape:hT,channels:[...cI({shapes:Object.keys(hT)}),{name:"x",scale:"band",required:!0},{name:"y",required:!0},{name:"series",scale:"band"}],preInference:[...cz(),{type:tK}],postInference:[...cD()],interaction:{shareTooltip:!0}};let hN={vector:hl},hL=()=>(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]};hL.props={defaultShape:"vector",defaultLabelShape:"label",composite:!1,shape:hN,channels:[...cI({shapes:Object.keys(hN)}),{name:"x",required:!0},{name:"y",required:!0},{name:"rotate",required:!0,scale:"identity"},{name:"size",required:!0}],preInference:[...cz()],postInference:[...cR()]};var hI=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 hR=(t,e)=>{let{arrow:n,arrowSize:r=4}=t,i=hI(t,["arrow","arrowSize"]),{coordinate:o,document:a}=e;return(t,e,l)=>{var s;let{color:u,lineWidth:c}=l,f=hI(l,["color","lineWidth"]),{color:p=u,size:h=c}=e,d=n?(s=Object.assign({fill:i.stroke||p,stroke:i.stroke||p},uo(i,"arrow")),a.createElement("path",{style:Object.assign({path:`M ${r},${r} L -${r},0 L ${r},-${r} L 0,0 Z`,anchor:"0.5 0.5",transformOrigin:"center"},s)})):null,y=function(t,e){if(!ed(e))return cx().x(t=>t[0]).y(t=>t[1])(t);let n=e.getCenter();return ep()({startAngle:0,endAngle:2*Math.PI,outerRadius:ud(t[0],n),innerRadius:ud(t[1],n)})}(t,o),g=function(t,e){if(!ed(t))return e;let[n,r]=t.getCenter();return`translate(${n}, ${r}) ${e||""}`}(o,e.transform);return uf(a.createElement("path",{})).call(cn,f).style("d",y).style("stroke",p).style("lineWidth",h).style("transform",g).style("markerEnd",d).call(cn,i).node()}};hR.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let hD=()=>(t,e)=>{let{data:n}=e;return!Array.isArray(n)||n.some(tY)?[t,e]:[t,tW({},e,{encode:{x:t$(n)}})]};hD.props={};let hF={line:hR},hz=t=>(e,n,r,i)=>{let{x:o}=r,a=cW(n,r,tW({style:{bandOffset:0}},t)),l=Array.from(e,t=>[[o[t],1],[o[t],0]].map(e=>i.map(a(e,t))));return[e,l]};hz.props={defaultShape:"line",defaultLabelShape:"label",composite:!1,shape:hF,channels:[...cF({shapes:Object.keys(hF)}),{name:"x",required:!0}],preInference:[...cz(),{type:hD}],postInference:[]};let hB=()=>(t,e)=>{let{data:n}=e;return!Array.isArray(n)||n.some(tY)?[t,e]:[t,tW({},e,{encode:{y:t$(n)}})]};hB.props={};let hW={line:hR},h$=t=>(e,n,r,i)=>{let{y:o}=r,a=cW(n,r,tW({style:{bandOffset:0}},t)),l=Array.from(e,t=>[[0,o[t]],[1,o[t]]].map(e=>i.map(a(e,t))));return[e,l]};h$.props={defaultShape:"line",defaultLabelShape:"label",composite:!1,shape:hW,channels:[...cF({shapes:Object.keys(hW)}),{name:"y",required:!0}],preInference:[...cz(),{type:hB}],postInference:[]};var hG=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 hH(t,e,n){return[["M",t,e],["L",t+2*n,e-n],["L",t+2*n,e+n],["Z"]]}let hV=(t,e)=>{let{offset:n=0,offset1:r=n,offset2:i=n,connectLength1:o,endMarker:a=!0}=t,l=hG(t,["offset","offset1","offset2","connectLength1","endMarker"]),{coordinate:s}=e;return(t,e,n)=>{let{color:u,connectLength1:c}=n,f=hG(n,["color","connectLength1"]),{color:p,transform:h}=e,d=function(t,e,n,r,i=0){let[[o,a],[l,s]]=e;if(eh(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:c),y=uo(Object.assign(Object.assign({},l),n),"endMarker");return uf(new lL).call(cn,f).style("path",cx().x(t=>t[0]).y(t=>t[1])(d)).style("stroke",p||u).style("transform",h).style("markerEnd",a?new pW({className:"marker",style:Object.assign(Object.assign({},y),{symbol:hH})}):null).call(cn,l).node()}};hV.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let hU={connector:hV},hq=(...t)=>hg(...t);function hY(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.call(r,r.invert(+o[t])))||0;return[i[t],o[t]+n]}}function hX(t={}){let{extendX:e=!1,extendY:n=!1}=t;return(t,r,i,o)=>{let a=hY("x",e,i,r.x),l=hY("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]}}hq.props={defaultShape:"connector",defaultLabelShape:"label",composite:!1,shape:hU,channels:[...cF({shapes:Object.keys(hU)}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...cz()],postInference:[]};let hK={range:ch},hZ=()=>hX();hZ.props={defaultShape:"range",defaultLabelShape:"label",composite:!1,shape:hK,channels:[...cF({shapes:Object.keys(hK)}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...cz()],postInference:[]};let hQ=()=>(t,e)=>{let{data:n}=e;if(Array.isArray(n)&&(n.every(Array.isArray)||!n.some(tY))){let r=(t,e)=>Array.isArray(t[0])?t.map(t=>t[e]):[t[e]];return[t,tW({},e,{encode:{x:t$(r(n,0)),x1:t$(r(n,1))}})]}return[t,e]};hQ.props={};let hJ={range:ch},h0=()=>hX({extendY:!0});h0.props={defaultShape:"range",defaultLabelShape:"label",composite:!1,shape:hJ,channels:[...cF({shapes:Object.keys(hJ)}),{name:"x",required:!0}],preInference:[...cz(),{type:hQ}],postInference:[]};let h1=()=>(t,e)=>{let{data:n}=e;if(Array.isArray(n)&&(n.every(Array.isArray)||!n.some(tY))){let r=(t,e)=>Array.isArray(t[0])?t.map(t=>t[e]):[t[e]];return[t,tW({},e,{encode:{y:t$(r(n,0)),y1:t$(r(n,1))}})]}return[t,e]};h1.props={};let h2={range:ch},h5=()=>hX({extendX:!0});h5.props={defaultShape:"range",defaultLabelShape:"label",composite:!1,shape:h2,channels:[...cF({shapes:Object.keys(h2)}),{name:"y",required:!0}],preInference:[...cz(),{type:h1}],postInference:[]};var h3=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 h4=(t,e)=>{let{arrow:n,colorAttribute:r}=t,i=h3(t,["arrow","colorAttribute"]),{coordinate:o,document:a}=e;return(t,e,n)=>{let{color:l,stroke:s}=n,u=h3(n,["color","stroke"]),{d:c,color:f=l}=e,[p,h]=o.getSize();return uf(a.createElement("path",{})).call(cn,u).style("d","function"==typeof c?c({width:p,height:h}):c).style(r,f).call(cn,i).node()}};h4.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let h6=(t,e)=>h4(Object.assign({colorAttribute:"fill"},t),e);h6.props={defaultMarker:"hvh",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let h8=(t,e)=>h4(Object.assign({fill:"none",colorAttribute:"stroke"},t),e);h8.props={defaultMarker:"hvh",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let h9={path:h6,hollow:h8},h7=t=>(t,e,n,r)=>[t,t.map(()=>[[0,0]])];h7.props={defaultShape:"path",defaultLabelShape:"label",shape:h9,composite:!1,channels:[...cI({shapes:Object.keys(h9)}),{name:"d",scale:"identity"}],preInference:[...cz()],postInference:[]};var dt=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 de=(t,e)=>{let{render:n}=t,r=dt(t,["render"]);return t=>{let[[i,o]]=t;return n(Object.assign(Object.assign({},r),{x:i,y:o}),e)}};de.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let dn=()=>(t,e)=>{let{style:n={}}=e;return[t,tW({},e,{style:Object.assign(Object.assign({},n),Object.fromEntries(Object.entries(n).filter(([,t])=>"function"==typeof t).map(([t,e])=>[t,()=>e])))})]};dn.props={};let dr=t=>{let{cartesian:e}=t;return e?cG:(e,n,r,i)=>{let{x:o,y:a}=r,l=cW(n,r,t),s=Array.from(e,t=>{let e=[+o[t],+a[t]];return[i.map(l(e,t))]});return[e,s]}};dr.props={defaultShape:"shape",defaultLabelShape:"label",composite:!1,shape:{shape:de},channels:[{name:"x",required:!0},{name:"y",required:!0}],preInference:[...cz(),{type:pY},{type:pK},{type:dn}]};var di=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 da=(t,e)=>{let{document:n}=e;return(e,r,i)=>{let{transform:o}=r,{color:a}=i,l=di(i,["color"]),{color:s=a}=r,[u,...c]=e,f=ei();return f.moveTo(...u),c.forEach(([t,e])=>{f.lineTo(t,e)}),f.closePath(),uf(n.createElement("path",{})).call(cn,l).style("d",f.toString()).style("stroke",s||a).style("fill",s||a).style("fillOpacity",.4).style("transform",o).call(cn,t).node()}};da.props={defaultMarker:"square",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let dl={density:da},ds=()=>(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 du(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 dc(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 df(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)}}}function dp(t,e,n){let r=t?t():document.createElement("canvas");return r.width=e,r.height=n,r}ds.props={defaultShape:"density",defaultLabelShape:"label",composite:!1,shape:dl,channels:[...cI({shapes:Object.keys(dl)}),{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:[...cz(),{type:tX},{type:tK}],postInference:[...cD()],interaction:{shareTooltip:!0}},df(3);let dh=function(t,e=(...t)=>`${t[0]}`,n=16){let r=df(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=dp(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 dd=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 dy=(t,e)=>{let{gradient:n,opacity:r,maxOpacity:i,minOpacity:o,blur:a,useGradientOpacity:l}=t,s=dd(t,["gradient","opacity","maxOpacity","minOpacity","blur","useGradientOpacity"]),{coordinate:u,createCanvas:c,document:f}=e;return(t,e,p)=>{var h,d,y,g;let v,b,x,O,w,E,k,{transform:M}=e,[_,S]=u.getSize(),P=t.map(t=>({x:t[0],y:t[1],value:t[2],radius:t[3]})),j=du(t,t=>t[2]),A=dc(t,t=>t[2]),T=_&&S?(h={gradient:n,opacity:r,minOpacity:o,maxOpacity:i,blur:a,useGradientOpacity:l},d=t=>void 0===t,y=Object.keys(h).reduce((t,e)=>{let n=h[e];return d(n,e)||(t[e]=n),t},{}),v=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)"]]},y),v.minOpacity*=255,v.opacity*=255,v.maxOpacity*=255,b=dp(c,_,S).getContext("2d"),g=v.gradient,O=(x=dp(c,256,1).getContext("2d")).createLinearGradient(0,0,256,1),("string"==typeof g?g.split(" ").map(t=>{let[e,n]=t.split(":");return[+e,n]}):g).forEach(([t,e])=>{O.addColorStop(t,e)}),x.fillStyle=O,x.fillRect(0,0,256,1),w=x.getImageData(0,0,256,1).data,b.clearRect(0,0,_,S),!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=dh(c,1-a,o);t.globalAlpha=Math.max((f-e)/(n-e),.001),t.drawImage(d,p,h)}}(b,j,A,P,v,c),E=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}(b,_,S,w,v),(k=dp(c,_,S).getContext("2d")).putImageData(E,0,0),k):{canvas:null};return uf(f.createElement("image",{})).call(cn,p).style("x",0).style("y",0).style("width",_).style("height",S).style("src",T.canvas).style("transform",M).call(cn,s).node()}};dy.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let dg={heatmap:dy},dm=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]})]]};dm.props={defaultShape:"heatmap",defaultLabelShape:"label",composite:!1,shape:dg,channels:[...cI({shapes:Object.keys(dg)}),{name:"x",required:!0},{name:"y",required:!0},{name:"color",scale:"identity",required:!0},{name:"size"}],preInference:[...cz(),{type:tK},{type:ph}],postInference:[...cR()]};let dv=()=>["#5B8FF9","#5AD8A6","#5D7092","#F6BD16","#6F5EF9","#6DC8EC","#945FB9","#FF9845","#1E9493","#FF99C3"];dv.props={};let db=()=>["#5B8FF9","#CDDDFD","#5AD8A6","#CDF3E4","#5D7092","#CED4DE","#F6BD16","#FCEBB9","#6F5EF9","#D3CEFD","#6DC8EC","#D3EEF9","#945FB9","#DECFEA","#FF9845","#FFE0C7","#1E9493","#BBDEDE","#FF99C3","#FFE0ED"];db.props={};let dx=t=>new u4(t);dx.props={};let dO=Symbol("defaultUnknown");function dw(t,e,n){for(let r=0;r<e.length;r+=1)t.has(e[r])||t.set(n(e[r]),r)}function dE(t){let{value:e,from:n,to:r,mapper:i,notFoundReturn:o}=t,a=i.get(e);if(void 0===a){if(o!==dO)return o;a=n.push(e)-1,i.set(e,a)}return r[a%r.length]}function dk(t){return t instanceof Date?t=>`${t}`:"object"==typeof t?t=>JSON.stringify(t):t=>t}class dM extends uF{getDefaultOptions(){return{domain:[],range:[],unknown:dO}}constructor(t){super(t)}map(t){return 0===this.domainIndexMap.size&&dw(this.domainIndexMap,this.getDomain(),this.domainKey),dE({value:this.domainKey(t),mapper:this.domainIndexMap,from:this.getDomain(),to:this.getRange(),notFoundReturn:this.options.unknown})}invert(t){return 0===this.rangeIndexMap.size&&dw(this.rangeIndexMap,this.getRange(),this.rangeKey),dE({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=dk(e),this.rangeKey=dk(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 dM(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 d_=t=>new dM(t);function dS({map:t,initKey:e},n){let r=e(n);return t.has(r)?t.get(r):n}function dP(t){return"object"==typeof t?t.valueOf():t}d_.props={};class dj extends Map{constructor(t){if(super(),this.map=new Map,this.initKey=dP,null!==t)for(const[e,n]of t)this.set(e,n)}get(t){return super.get(dS({map:this.map,initKey:this.initKey},t))}has(t){return super.has(dS({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 dA extends dM{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,paddingInner:0,paddingOuter:0,padding:0,unknown:dO,flex:[]}}constructor(t){super(t)}clone(){return new dA(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,{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.length)return function(t){let e,n,{domain:r,range:i,paddingOuter:o,paddingInner:a,flex:l,round:s,align:u}=t,c=r.length,f=(e=c-l.length)>0?[...l,...Array(e).fill(1)]:e<0?l.slice(0,c):l,[p,h]=i,d=h-p,y=d/(2/c*o+1-1/c*a),g=y*a/c,v=y-c*g,b=(n=Math.min(...f),f.map(t=>t/n)),x=v/b.reduce((t,e)=>t+e),O=new dj(r.map((t,e)=>{let n=b[e]*x;return[t,s?Math.floor(n):n]})),w=new dj(r.map((t,e)=>{let n=b[e]*x+g;return[t,s?Math.floor(n):n]})),E=Array.from(w.values()).reduce((t,e)=>t+e),k=p+(d-(E-E/c*a))*u,M=s?Math.round(k):k,_=Array(c);for(let t=0;t<c;t+=1){_[t]=Math.round(1e12*M)/1e12;let e=r[t];M+=w.get(e)}return{valueBandWidth:O,valueStep:w,adjustedRange:_}}(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 dT=t=>new dA(t);function dC(t){return 1e-14>Math.abs(t)?t:parseFloat(t.toFixed(14))}dT.props={};let dN=[1,5,2,2.5,4,3],dL=100*Number.EPSILON,dI=(t,e,n=5,r=!0,i=dN,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 c=i[n],f=function(t,e,n){let r=uR(e);return 1-uL(e,t)/(r-1)-n+1}(c,i,s);if(o[0]*f+o[1]+o[2]+o[3]<l.score){s=1/0;break}let p=2;for(;p<1/0;){var u;let n=(u=p)>=a?2-(u-1)/(a-1):1;if(o[0]*f+o[1]+o[2]*n+o[3]<l.score)break;let h=Math.ceil(Math.log10((e-t)/(p+1)/s/c));for(;h<1/0;){let u=s*c*10**h,d=function(t,e,n){let r=e-t;return n>r?1-((n-r)/2)**2/(.1*r)**2:1}(t,e,u*(p-1));if(o[0]*f+o[1]*d+o[2]*n+o[3]<l.score)break;let y=Math.floor(e/u)*s-(p-1)*s,g=Math.ceil(t/u)*s;if(y<=g){let n=g-y;for(let f=0;f<=n;f+=1){let n=u/s*(y+f),h=n+u*(p-1),d=function(t,e,n,r,i,o){let a=uR(e),l=uL(e,t),s=0,u=(r%o+o)%o;return(u<dL||o-u<dL)&&r<=0&&i>=0&&(s=1),1-l/(a-1)-n+s}(c,i,s,n,h,u),g=1-.5*((e-h)**2+(t-n)**2)/(.1*(e-t))**2,v=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)}(p,a,t,e,n,h),b=o[0]*d+o[1]*g+o[2]*v+ +o[3];b>l.score&&(!r||n<=t&&h>=e)&&(l.lmin=n,l.lmax=h,l.lstep=u,l.score=b)}}h+=1}p+=1}}s+=1}let c=dC(l.lmax),f=dC(l.lmin),p=dC(l.lstep),h=Math.floor(Math.round((c-f)/p*1e12)/1e12)+1,d=Array(h);d[0]=dC(f);for(let t=1;t<h;t+=1)d[t]=dC(d[t-1]+p);return d};class dR extends uF{getDefaultOptions(){return{domain:[0,1],range:[0,1],tickCount:5,unknown:void 0,tickMethod:dI}}map(t){return uX(t)?t:this.options.unknown}invert(t){return this.map(t)}clone(){return new dR(this.options)}getTicks(){let{domain:t,tickCount:e,tickMethod:n}=this.options,[r,i]=t;return uj(r)&&uj(i)?n(r,i,e):[]}}let dD=t=>new dR(t);dD.props={};class dF extends dA{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,padding:0,unknown:dO,paddingInner:1,paddingOuter:0}}constructor(t){super(t)}getPaddingInner(){return 1}clone(){return new dF(this.options)}update(t){super.update(t)}getPaddingOuter(){return this.options.padding}}let dz=t=>new dF(t);dz.props={};var dB=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,dW=/\[([^]*?)\]/gm;function d$(t,e){for(var n=[],r=0,i=t.length;r<i;r++)n.push(t[r].substr(0,e));return n}var dG=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 dH(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 dV=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dU=["January","February","March","April","May","June","July","August","September","October","November","December"],dq=d$(dU,3),dY=dH({},{dayNamesShort:d$(dV,3),dayNames:dV,monthNamesShort:dq,monthNames:dU,amPm:["am","pm"],DoFn:function(t){return t+["th","st","nd","rd"][t%10>3?0:(t-t%10!=10)*t%10]}}),dX=function(t,e){for(void 0===e&&(e=2),t=String(t);t.length<e;)t="0"+t;return t},dK={D:function(t){return String(t.getDate())},DD:function(t){return dX(t.getDate())},Do:function(t,e){return e.DoFn(t.getDate())},d:function(t){return String(t.getDay())},dd:function(t){return dX(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 dX(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 dX(String(t.getFullYear()),4).substr(2)},YYYY:function(t){return dX(t.getFullYear(),4)},h:function(t){return String(t.getHours()%12||12)},hh:function(t){return dX(t.getHours()%12||12)},H:function(t){return String(t.getHours())},HH:function(t){return dX(t.getHours())},m:function(t){return String(t.getMinutes())},mm:function(t){return dX(t.getMinutes())},s:function(t){return String(t.getSeconds())},ss:function(t){return dX(t.getSeconds())},S:function(t){return String(Math.round(t.getMilliseconds()/100))},SS:function(t){return dX(Math.round(t.getMilliseconds()/10),2)},SSS:function(t){return dX(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?"-":"+")+dX(100*Math.floor(Math.abs(e)/60)+Math.abs(e)%60,4)},Z:function(t){var e=t.getTimezoneOffset();return(e>0?"-":"+")+dX(Math.floor(Math.abs(e)/60),2)+":"+dX(Math.abs(e)%60,2)}};dG("monthNamesShort"),dG("monthNames");var dZ={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"},dQ=function(t,e,n){if(void 0===e&&(e=dZ.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=dZ[e]||e;var r=[];e=e.replace(dW,function(t,e){return r.push(e),"@@@"});var i=dH(dH({},dY),n);return(e=e.replace(dB,function(e){return dK[e](t,i)})).replace(/@@@/g,function(){return r.shift()})};function dJ(t,e,n,r){let i=(t,i)=>{i&&((t,e)=>{let i=t=>r(t)%e==0,o=e;for(;o&&!i(t);)n(t,-1),o-=1})(t,i),e(t)},o=(t,e)=>{let r=new Date(t-1);return i(r,e),n(r,e),i(r),r};return{ceil:o,floor:(t,e)=>{let n=new Date(+t);return i(n,e),n},range:(t,e,r,a)=>{let l=[],s=Math.floor(r),u=a?o(t,r):o(t);for(;u<e;n(u,s),i(u))l.push(new Date(+u));return l},duration:t}}let d0=dJ(1,t=>t,(t,e=1)=>{t.setTime(+t+e)},t=>t.getTime()),d1=dJ(1e3,t=>{t.setMilliseconds(0)},(t,e=1)=>{t.setTime(+t+1e3*e)},t=>t.getSeconds()),d2=dJ(6e4,t=>{t.setSeconds(0,0)},(t,e=1)=>{t.setTime(+t+6e4*e)},t=>t.getMinutes()),d5=dJ(36e5,t=>{t.setMinutes(0,0,0)},(t,e=1)=>{t.setTime(+t+36e5*e)},t=>t.getHours()),d3=dJ(864e5,t=>{t.setHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+864e5*e)},t=>t.getDate()-1),d4=dJ(2592e6,t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e=1)=>{let n=t.getMonth();t.setMonth(n+e)},t=>t.getMonth()),d6={millisecond:d0,second:d1,minute:d2,hour:d5,day:d3,week:dJ(6048e5,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=d4.floor(t);return Math.floor((new Date(+t)-e)/6048e5)}),month:d4,year:dJ(31536e6,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())},d8=dJ(1,t=>t,(t,e=1)=>{t.setTime(+t+e)},t=>t.getTime()),d9=dJ(1e3,t=>{t.setUTCMilliseconds(0)},(t,e=1)=>{t.setTime(+t+1e3*e)},t=>t.getUTCSeconds()),d7=dJ(6e4,t=>{t.setUTCSeconds(0,0)},(t,e=1)=>{t.setTime(+t+6e4*e)},t=>t.getUTCMinutes()),yt=dJ(36e5,t=>{t.setUTCMinutes(0,0,0)},(t,e=1)=>{t.setTime(+t+36e5*e)},t=>t.getUTCHours()),ye=dJ(864e5,t=>{t.setUTCHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+864e5*e)},t=>t.getUTCDate()-1),yn=dJ(2592e6,t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e=1)=>{let n=t.getUTCMonth();t.setUTCMonth(n+e)},t=>t.getUTCMonth()),yr={millisecond:d8,second:d9,minute:d7,hour:yt,day:ye,week:dJ(6048e5,t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7)%7),t.setUTCHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+6048e5*e)},t=>{let e=yn.floor(t);return Math.floor((new Date(+t)-e)/6048e5)}),month:yn,year:dJ(31536e6,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 yi(t,e,n,r,i){let o,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?yr:d6;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=uW(s,h,0,d,f);if(y===d){let t=u0(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(u0(a,l,p),1)];return o}let yo=(t,e,n,r,i)=>{let o=t>e,a=o?e:t,l=o?t:e,[s,u]=yi(a,l,n,r,i),c=s.range(a,new Date(+l+1),u,!0);return o?c.reverse():c},ya=(t,e,n,r,i)=>{let o=t>e,a=o?e:t,l=o?t:e,[s,u]=yi(a,l,n,r,i),c=[s.floor(a,u),s.ceil(l,u)];return o?c.reverse():c};function yl(t){let e=t.getTimezoneOffset(),n=new Date(t);return n.setMinutes(n.getMinutes()+e,n.getSeconds(),n.getMilliseconds()),n}class ys extends u5{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:yo,interpolate:uU,mask:void 0,utc:!1}}chooseTransforms(){return[t=>+t,t=>new Date(t)]}chooseNice(){return ya}getTickMethodOptions(){let{domain:t,tickCount:e,tickInterval:n,utc:r}=this.options;return[t[0],t[t.length-1],e,n,r]}getFormatter(){let{mask:t,utc:e}=this.options,n=e?yr:d6,r=e?yl:uI;return e=>dQ(r(e),t||function(t,e){let{second:n,minute:r,hour:i,day:o,week:a,month:l,year:s}=e;return n.floor(t)<t?".SSS":r.floor(t)<t?":ss":i.floor(t)<t?"hh:mm":o.floor(t)<t?"hh A":l.floor(t)<t?a.floor(t)<t?"MMM DD":"ddd DD":s.floor(t)<t?"MMMM":"YYYY"}(e,n))}clone(){return new ys(this.options)}}let yu=t=>new ys(t);yu.props={};let yc=t=>e=>-t(-e),yf=(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?yc(r):r},yp=(t,e)=>{let n=t===Math.E?Math.exp:e=>t**e;return e?yc(n):n},yh=(t,e,n,r=10)=>{let i=t<0,o=yp(r,i),a=yf(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=u3(s,u,n))}else{let t=-1===n?f-c:Math.min(f-c,n);p=u3(c,f,t).map(o)}return l?p.reverse():p},yd=(t,e,n,r)=>{let i=t<0,o=yf(r,i),a=yp(r,i),l=t>e,s=[a(Math.floor(o(l?e:t))),a(Math.ceil(o(l?t:e)))];return l?s.reverse():s};class yy extends u5{getDefaultOptions(){return{domain:[1,10],range:[0,1],base:10,interpolate:uq,tickMethod:yh,tickCount:5}}chooseNice(){return yd}getTickMethodOptions(){let{domain:t,tickCount:e,base:n}=this.options;return[t[0],t[t.length-1],e,n]}chooseTransforms(){let{base:t,domain:e}=this.options,n=e[0]<0;return[yf(t,n),yp(t,n)]}clone(){return new yy(this.options)}}let yg=t=>new yy(t);yg.props={};let ym=t=>t<0?-Math.sqrt(-t):Math.sqrt(t);class yv extends u5{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,exponent:2,interpolate:uq,tickMethod:u3,tickCount:5}}constructor(t){super(t)}chooseTransforms(){let{exponent:t}=this.options;return 1===t?[uI,uI]:[.5===t?ym:e=>e<0?-((-e)**t):e**t,e=>e<0?-((-e)**(1/t)):e**(1/t)]}clone(){return new yv(this.options)}}let yb=t=>new yv(t);yb.props={};class yx extends yv{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:uq,tickMethod:u3,tickCount:5,exponent:.5}}constructor(t){super(t)}update(t){super.update(t)}clone(){return new yx(this.options)}}let yO=t=>new yx(t);yO.props={};class yw extends uF{getDefaultOptions(){return{domain:[.5],range:[0,1]}}constructor(t){super(t)}map(t){if(!uX(t))return this.options.unknown;let e=uW(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 yw(this.options)}rescale(){let{domain:t,range:e}=this.options;this.n=Math.min(t.length,e.length-1),this.thresholds=t}}let yE=t=>new yw(t);yE.props={};class yk extends yw{getDefaultOptions(){return{domain:[],range:[],tickCount:5,unknown:void 0,tickMethod:dI}}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 yk(this.options)}getTicks(){let{tickCount:t,domain:e,tickMethod:n}=this.options,r=e.length-1;return n(e[0],e[r],t)}}let yM=t=>new yk(t);yM.props={};class y_ extends yw{getDefaultOptions(){return{domain:[0,1],range:[.5],nice:!1,tickCount:5,tickMethod:dI}}constructor(t){super(t)}nice(){let{nice:t}=this.options;if(t){let[t,e,n]=this.getTickMethodOptions();this.options.domain=u1(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;return[t[0],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 y_(this.options)}}let yS=t=>new y_(t);yS.props={};let yP=_C=class extends u4{getDefaultOptions(){return{domain:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolator:uI,tickMethod:u3,tickCount:5}}constructor(t){super(t)}clone(){return new _C(this.options)}};yP=_C=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}([(_l=function(t){return[t(0),t(1)]},_s=t=>{let[e,n]=t;return uB(uU(0,1),uz(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=_l(t)},t.prototype.composeOutput=function(t,e){let{domain:n,interpolator:r,round:i}=this.getOptions(),o=_s(n.map(t)),a=i?t=>{let e=r(t);return uj(e)?Math.round(e):e}:r;this.output=uB(a,o,e,t)},t.prototype.invert=void 0})],yP);let yj=t=>new yP(t);yj.props={};class yA extends uF{getDefaultOptions(){return{range:[0],domain:[0,1],unknown:void 0,tickCount:5,tickMethod:u3}}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 uj(r)&&uj(i)?t(r,i,n):[]}clone(){return new yA(this.options)}}let yT=t=>new yA(t);function yC({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"}}}yT.props={};let yN=yC({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}),yL=t=>tW({},yN,t);yL.props={};let yI=t=>tW({},yL(),{category10:"category10",category20:"category20"},t);yI.props={};let yR=yC({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}),yD=t=>tW({},yR,{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),yF=t=>Object.assign({},yD(),{category10:"category10",category20:"category20"},t);yF.props={};let yz=yC({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}),yB=t=>tW({},yz,{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);yB.props={};var yW=function(t){return null==t};function y$(t){if(!t)return{enter:!1,update:!1,exit:!1};var e=["enter","update","exit"],n=Object.fromEntries(Object.entries(t).filter(function(t){var n=ej(t,1)[0];return!e.includes(n)}));return Object.fromEntries(e.map(function(e){return"boolean"!=typeof t&&"enter"in t&&"update"in t&&"exit"in t?!1===t[e]?[e,!1]:[e,ek(ek({},t[e]),n)]:[e,n]}))}function yG(t,e){t?t.finished.then(e):e()}function yH(t,e){"update"in t?t.update(e):t.attr(e)}function yV(t,e,n){return 0===e.length?null:n?t.animate(e,n):(yH(t,{style:e.slice(-1)[0]}),null)}function yU(t,e,n){var r={},i={};return(Object.entries(e).forEach(function(e){var n=ej(e,2),o=n[0],a=n[1];if(!yW(a)){var l=t.style[o]||t.parsedStyle[o]||0;l!==a&&(r[o]=l,i[o]=a)}}),n)?yV(t,[r,i],ek({fill:"both"},n)):(yH(t,i),null)}var yq=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&&pk(a)?(pk(e[o])||(e[o]={}),r<i?t(e[o],a,r+1,i):e[o]=n[o]):pM(a)?(e[o]=[],e[o]=e[o].concat(a)):void 0!==a&&(e[o]=a)}}(t,e[r]);return t},yY=function(t,e){var n=function(t){return"".concat(e,"-").concat(t)},r=Object.fromEntries(Object.entries(t).map(function(t){var e=ej(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},yX={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 lL({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:[]};yq({},yX,{style:{type:"arc"}}),yq({},yX,{style:{}});var yK=yY({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 yZ(t,e){return[t[0]*e,t[1]*e]}function yQ(t,e){return[t[0]+e[0],t[1]+e[1]]}function yJ(t,e){return[t[0]-e[0],t[1]-e[1]]}function y0(t,e){return[Math.min(t[0],e[0]),Math.min(t[1],e[1])]}function y1(t,e){return[Math.max(t[0],e[0]),Math.max(t[1],e[1])]}function y2(t,e){return Math.sqrt(Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2))}function y5(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 y3(t){return t*Math.PI/180}function y4(t){return Number((180*t/Math.PI).toPrecision(5))}function y6(t){return t.toString().charAt(0).toUpperCase()+t.toString().slice(1)}function y8(t,e,n){void 0===n&&(n=!0);var r,i=e||(null==(r=t.match(/^([a-z][a-z0-9]+)/))?void 0:r[0])||"",o=t.replace(new RegExp("^(".concat(i,")")),"");return n?o.toString().charAt(0).toLowerCase()+o.toString().slice(1):o}var y9=function(t,e){if(!(null==t?void 0:t.startsWith(e)))return!1;var n=t[e.length];return n>="A"&&n<="Z"};function y7(t,e,n){void 0===n&&(n=!1);var r={};return Object.entries(t).forEach(function(t){var i=ej(t,2),o=i[0],a=i[1];if("className"===o||"class"===o);else if(y9(o,"show")&&y9(y8(o,"show"),e)!==n)o==="".concat("show").concat(y6(e))?r[o]=a:r[o.replace(new RegExp(y6(e)),"")]=a;else if(!y9(o,"show")&&y9(o,e)!==n){var l=y8(o,e);"filter"===l&&"function"==typeof a||(r[l]=a)}}),r}function gt(t,e){return Object.entries(t).reduce(function(t,n){var r=ej(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(y6(i))]=o,t},{})}function ge(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=ej(t,2),a=o[0],l=o[1];e.includes(a)||(-1!==n.indexOf(a)?i[a]=l:r[a]=l)}),[r,i]}function gn(t,e){return pm(t)?t.apply(void 0,eT([],ej(e),!1)):t}function gr(t,e){return t.style.opacity||(t.style.opacity=1),yU(t,{opacity:0},e)}var gi=["$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 go(t){var e={};for(var n in t)gi.includes(n)&&(e[n]=t[n]);return e}var ga=yY({lineGroup:"line-group",line:"line",regionGroup:"region-group",region:"region"},"grid");function gl(t){return t.reduce(function(t,e,n){return t.push(eT([0===n?"M":"L"],ej(e),!1)),t},[])}function gs(t,e,n){if("surround"===e.type){var r=e.connect,i=e.center;if("line"===(void 0===r?"line":r))return gl(t);if(!i)return[];var o=y2(t[0],i),a=+!n;return t.reduce(function(t,e,n){return 0===n?t.push(eT(["M"],ej(e),!1)):t.push(eT(["A",o,o,0,0,a],ej(e),!1)),t},[])}return gl(t)}var gu=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return eE(e,t),e.prototype.render=function(t,e){t.type,t.center,t.areaFill,t.closed;var n,r,i,o,a,l=eM(t,["type","center","areaFill","closed"]),s=(r=void 0===(n=t.data)?[]:n,t.closed?r.map(function(t){var e=t.points,n=ej(e,1)[0];return ek(ek({},t),{points:eT(eT([],ej(e),!1),[n],!1)})}):r),u=pI(e).maybeAppendByClassName(ga.lineGroup,"g"),c=pI(e).maybeAppendByClassName(ga.regionGroup,"g"),f=(i=t.animate,o=t.isBillboard,a=s.map(function(e,n){return{id:e.id||"grid-line-".concat(n),path:gs(e.points,t)}}),u.selectAll(ga.line.class).data(a,function(t){return t.id}).join(function(t){return t.append("path").each(function(t,e){var n=gn(go(ek({path:t.path},l)),[t,e,a]);this.attr(ek({class:ga.line.name,stroke:"#D9D9D9",lineWidth:1,lineDash:[4,4],isBillboard:o},n))})},function(t){return t.transition(function(t,e){return yU(this,gn(go(ek({path:t.path},l)),[t,e,a]),i.update)})},function(t){return t.transition(function(){var t=this,e=gr(this,i.exit);return yG(e,function(){return t.remove()}),e})}).transitions()),p=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=ej([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=ej([gs(t,n),gs(e.slice().reverse(),n,!0)],2),s=l[0],u=l[1],c=ej([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([eT(["L"],ej(p),!1)],[eT(["L"],ej(f),!1)]);if(!o)throw Error("Arc grid need to specified center");var d=ej([y2(p,o),y2(f,o)],2),y=d[0],g=d[1];return h([eT(["A",y,y,0,0,1],ej(p),!1),eT(["L"],ej(p),!1)],[eT(["A",g,g,0,0,0],ej(f),!1),eT(["L"],ej(f),!1)])}(u[0],u[1],n);l.push({path:c,fill:a[s%a.length]})}return t.selectAll(ga.region.class).data(l,function(t,e){return e}).join(function(t){return t.append("path").each(function(t,e){var n=gn(t,[t,e,l]);this.attr(n)}).attr("className",ga.region.name)},function(t){return t.transition(function(t,e){return yU(this,gn(t,[t,e,l]),r.update)})},function(t){return t.transition(function(){var t=this,e=gr(this,r.exit);return yG(e,function(){return t.remove()}),e})}).transitions()}(c,s,t);return eT(eT([],ej(f),!1),ej(p),!1)},e}(pT),gc=function(t,e,n){for(var r=0,i=pB(e)?e.split("."):e;t&&r<i.length;)t=t[i[r++]];return void 0===t||r<i.length?n:t},gf=function(t){return pE(t,"Number")};function gp(t){return"function"==typeof t?t():pB(t)||gf(t)?new pN({style:{text:String(t)}}):t}function gh(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 gd(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 gy(t,e){return Object.fromEntries(Object.entries(t).map(function(t){var n=ej(t,2);return[n[0],gn(n[1],e)]}))}function gg(t,e){return e&&pm(e)?t.filter(e):t}function gm(t,e){var n=e.startAngle;return(e.endAngle-n)*t+n}function gv(t,e){if("linear"===e.type){var n=ej(e.startPos,2),r=n[0],i=n[1],o=ej(e.endPos,2),a=ej([o[0]-r,o[1]-i],2);return y5([a[0],a[1]])}var l=y3(gm(t,e));return[-Math.sin(l),Math.cos(l)]}function gb(t,e,n){var r;return r=gv(t,n),"positive"!==e?[r[1],-r[0]]:[-r[1],r[0]]}function gx(t,e){return gb(t,e.labelDirection,e)}function gO(t,e){var n,r,i,o,a,l,s,u,c,f;return"linear"===e.type?(r=(n=ej(e.startPos,2))[0],i=n[1],o=ej(e.endPos,2),a=ej([o[0]-r,o[1]-i],2),[r+a[0]*t,i+a[1]*t]):(l=e.radius,u=(s=ej(e.center,2))[0],c=s[1],[u+l*Math.cos(f=y3(gm(t,e))),c+l*Math.sin(f)])}function gw(t){return 0===gv(0,t)[1]}function gE(t){return 0===gv(0,t)[0]}function gk(t,e,n,r,i){var o=e-t,a=ej([i,i],2),l=a[0],s=a[1],u=ej([y3(t),y3(e)],2),c=u[0],f=u[1],p=function(t){return[n+i*Math.cos(t),r+i*Math.sin(t)]},h=ej(p(c),2),d=h[0],y=h[1],g=ej(p(f),2),v=g[0],b=g[1];if(e-t==360){var x=ej(p((f+c)/2),2);return[["M",d,y],["A",l,s,0,1,0,x[0],x[1]],["A",l,s,0,1,0,v,b]]}return"M".concat(d,",").concat(y,",A").concat(l,",").concat(s,",0,").concat(+(o>180),",").concat(t>e?0:1,",").concat(v,",").concat(b)}function gM(t){var e=ej(t,2),n=ej(e[0],2),r=n[0],i=n[1],o=ej(e[1],2);return{x1:r,y1:i,x2:o[0],y2:o[1]}}function g_(t){var e=t.type,n=t.gridCenter;return"linear"===e?n:n||t.center}function gS(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 gP=function(t,e,n){if(void 0===n&&(n=128),!pm(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 _L?_L(t,n):(_N||(_N=lc.offscreenCanvasCreator.getOrCreateContext(void 0)),_N.font=[o,a,i,"".concat(n,"px"),r].join(" "),_N.measureText(t).width)},function(t,e){return[t,Object.values(e||gj(t)).join()].join("")},4096),gj=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 gA(t){return"text"===t.nodeName?t:"g"===t.nodeName&&1===t.children.length&&"text"===t.children[0].nodeName?t.children[0]:null}function gT(t,e){var n=gA(t);n&&n.attr(e)}function gC(t,e,n){void 0===n&&(n="..."),gT(t,{wordWrap:!0,wordWrapWidth:e,maxLines:1,textOverflow:n})}function gN(t,e){if(e)try{var n=e.replace(/translate\(([+-]*[\d]+[%]*),[ ]*([+-]*[\d]+[%]*)\)/g,function(e,n,r){var i,o,a,l;return"translate(".concat((o=(i=t.getBBox()).width,a=i.height,[(l=ej([n,r].map(function(t,e){var n;return t.includes("%")?parseFloat((null==(n=t.match(/[+-]?([0-9]*[.])?[0-9]+/))?void 0:n[0])||"0")/100*(0===e?o:a):t}),2))[0],l[1]]),")")});t.attr("transform",n)}catch(t){}}var gL=function(t){return void 0!==t&&null!=t&&!Number.isNaN(t)};function gI(t){if(gf(t))return[t,t,t,t];if(pM(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 gR=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 gD(t,e){var n=t.getEulerAngles()||0;t.setEulerAngles(0);var r=t.getLocalBounds(),i=ej(r.min,2),o=i[0],a=i[1],l=ej(r.max,2),s=l[0],u=l[1],c=gF(t),f=c.width,p=c.height,h=0,d=0,y=o,g=a,v=gA(t);if(v){p-=1.5;var b=v.style.textAlign,x=v.style.textBaseline;"center"===b?y=(o+s)/2:("right"===b||"end"===b)&&(y=s),"middle"===x?g=(a+u)/2:"bottom"===x&&(g=u)}var O=ej(gI(e),4),w=O[0],E=void 0===w?0:w,k=O[1],M=void 0===k?0:k,_=O[2],S=O[3],P=new gR((h+=o)-(void 0===S?M:S),(d+=a)-E,h+f+M,d+p+(void 0===_?E:_));return t.setEulerAngles(n),P.rotatedPoints(y3(n),y,g)}function gF(t){return t.__bbox__?t.__bbox__:t.getBBox()}function gz(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 gB(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 gW(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=ej(o,2),s=l[0],u=l[1],c="negative"===r?0:i,f=-a-c,p=a+c,h=ej(gI(e),4),d=h[0],y=h[1],g=h[2];return new gR(s+f-h[3],u+f-d,s+p+y,u+p+g)}var v=ej(t.startPos,2),b=v[0],x=v[1],O=ej(t.endPos,2),w=O[0],E=O[1],k=ej(gE(t)?[-e,0,e,0]:[0,e,0,-e],4),M=k[0],_=k[1],S=k[2],P=k[3],j=yZ(gx(0,t),i),A=new gR(b,x,w,E);return A.x1+=P,A.y1+=M,A.x2+=_+j[0],A.y2+=S+j[1],A}(e,o);try{for(var u=eP(t),c=u.next();!c.done;c=u.next()){var f,p=c.value;!function(t){if(s){var e,n,r,i,o,a;return e=s.x1,n=s.x2,r=s.y1,i=s.y2,o=gD(t,void 0),a=[[e,r],[n,r],[n,i],[e,i]],o.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=gB(t[0],t[1],e[0]),r=gB(t[0],t[1],e[1]),i=gB(e[0],e[1],t[0]),o=gB(e[0],e[1],t[1]);return!!(n!==r&&i!==o||0===n&&gz(t,e[0])||0===r&&gz(t,e[1])||0===i&&gz(e,t[0])||0===o&&gz(e,t[1]))}(a,r)){if(0===gB(a[0],e,a[1]))return gz(a,e);i++}o=(o+1)%n}while(0!==o);return!!(1&i)}(a,t)})}return!0}(p)?a.add(p):l&&(f=l,f?function(t,e,n){var r,i,o=gD(t,n).flat(1),a=gD(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=eP(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=ej(t,4),r=n[0],i=n[1],o=n[2],a=n[3],l=ej(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,b=r-s,x=i-u,O=p*x-h*b;if(O<0===v)return!1;var w=d*x-y*b;return w<0!==v&&O>g!==v&&w>g!==v}(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,gI(n)):0)?(a.add(l),a.add(p)):l=p}}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 g$(t,e){return(void 0===e&&(e={}),yW(t))?0:"number"==typeof t?t:Math.floor(gP(t,e))}function gG(t){var e=t.getLocalBounds(),n=ej([e.min,e.max],2),r=ej(n[0],2),i=r[0],o=r[1],a=ej(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 gH(t,e){var n=ej(t,2),r=n[0],i=n[1],o=ej(e,2),a=o[0],l=o[1];return r!==a&&i===l}var gV=function(t,e){var n=e.seq,r=void 0===n?2:n;return t.filter(function(t,e){return!(e%r)||(pb(t),!1)})},gU=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=function(t){return t.forEach(r.show),t},c=2,f=t.slice(),p=t.slice(),h=Math.min.apply(Math,eT([1],ej(t.map(function(t){return gF(t).width})),!1));if("linear"===n.type&&(gw(n)||gE(n))){var d=gG(t[0]).left,y=Math.abs(gG(t[a-1]).right-d)||1;c=Math.max(Math.floor(a*h/y),c)}for(l&&(i=f.splice(0,1)[0]),s&&(o=f.splice(-1,1)[0],f.reverse()),u(f);c<t.length&&gW((o?eT(eT([o],ej(p),!1),[i],!1):eT([i],ej(p),!1)).filter(gL),n,null==e?void 0:e.margin).length;){if(o&&!i&&c%2==0){var g=f.splice(0,1);g.forEach(r.hide)}else if(o&&i){var g=f.splice(0,1);g.forEach(r.hide)}p=gV(u(f),{seq:c}),c++}}}],["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=eP(void 0===a?[0,45,90]:a),p=f.next();!p.done;p=f.next()){var h=p.value;if(c(h),gW(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=gj(r.getTextShape(t[0])),h=g$(void 0===u?" ":u,p),d=a?g$(a,p):h,y=g$(s,p);(yW(y)||y===1/0)&&(y=Math.max.apply(null,t.map(function(t){return gF(t).width})));for(var g=t.slice(),v=ej(f,4),b=(v[0],v[1],v[2],v[3],function(e){if(g.forEach(function(t){r.ellipsis(r.getTextShape(t),e,o)}),(g=gW(t,n,f)).length<1)return{value:void 0}}),x=y;x>d+h;x-=h){var O=b(x);if("object"==typeof O)return O.value}}}],["wrap",function(t,e,n,r){var i,o,a=e.wordWrapWidth,l=void 0===a?50:a,s=e.maxLines,u=void 0===s?3:s,c=e.recoverWhenFailed,f=e.margin,p=void 0===f?[0,0,0,0]:f,h=t.map(function(t){return t.attr("maxLines")||1}),d=Math.min.apply(Math,eT([],ej(h),!1)),y=(i=n.type,o=n.labelDirection,"linear"===i&&gw(n)?"negative"===o?"bottom":"top":"middle"),g=function(e){return t.forEach(function(t,n){var i=Array.isArray(e)?e[n]:e;r.wrap(t,l,i,y)})};if(!(d>u)){for(var v=d;v<=u;v++)if(g(v),gW(t,n,p).length<1)return;(void 0===c||c)&&g(h)}}]]);function gq(t){for(var e=t;e<0;)e+=360;return Math.round(e%360)}function gY(t,e){var n=ej(t,2),r=n[0],i=n[1],o=ej(e,2),a=o[0],l=o[1],s=ej([r*a+i*l,r*l-i*a],2),u=s[0];return Math.atan2(s[1],u)}function gX(t,e,n){var r=n.type,i=n.labelAlign,o=gx(t,n),a=gq(e),l=gq(y4(gY([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?gS(a,0,90,!1,!0)?s="start":(gS(a,0,90)||gS(a,270,360))&&(s="start"):90===l?gS(a,0,90,!1,!0)?s="start":(gS(a,90,180)||gS(a,270,360))&&(s="end"):270===l?gS(a,0,90,!1,!0)?s="end":(gS(a,90,180)||gS(a,270,360))&&(s="start"):180===l&&(90===a?s="start":(gS(a,0,90)||gS(a,270,360))&&(s="end")):"parallel"===i?u=gS(l,0,180,!0)?"top":"bottom":"horizontal"===i?gS(l,90,270,!1)?s="end":(gS(l,270,360,!1)||gS(l,0,90))&&(s="start"):"perpendicular"===i&&(s=gS(l,90,270)?"end":"start"),{textAlign:s,textBaseline:u}}function gK(t,e,n){var r=n.showTick,i=n.tickLength,o=n.tickDirection,a=n.labelDirection,l=n.labelSpacing,s=e.indexOf(t),u=gn(l,[t,s,e]),c=ej([gx(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=ej(yQ(yZ(c[0],u+(1===c[1]?gn(r?i:0,[t,s,e]):0)),gO(t.value,n)),2);return{x:f[0],y:f[1]}}function gZ(t,e){"text"===t.nodeName&&t.attr(e)}function gQ(t){var e,n,r,i;e=this.node().childNodes,n={hide:pb,show:pv,rotate:function(e,n){var r,i,o;r=+n,e.setLocalEulerAngles(r),i=gX(e.__data__.value,r,t),(o=e.querySelector(yK.labelItem.class))&&gZ(o,i)},ellipsis:function(t,e,n){t&&gC(t,e||1/0,n)},wrap:function(t,e,n){var r,i;t&&(void 0===(r=n)&&(r=2),void 0===i&&(i="top"),gT(t,{wordWrap:!0,wordWrapWidth:e,maxLines:r,textBaseline:i}))},getTextShape:function(t){return t.querySelector("text")}},(i=void 0===(r=t.labelOverlap)?[]:r).length&&i.forEach(function(r){var i=r.type,o=gU.get(i);t.labelOverlap.length<1||("hide"===i?function(t){for(var e=t;e;){if("offscreen"===e.className)return!0;e=e.parent}return!1}(e[0]):"rotate"===i?e.some(function(t){var e;return!!(null==(e=t.attr("transform"))?void 0:e.includes("rotate"))}):("ellipsis"===i||"wrap"===i)&&!(e.filter(function(t){return t.querySelector("text")}).length>1))||null==o||o(e,r,t,n)})}function gJ(t,e,n,r,i){var o,a=n.indexOf(e),l=pI(t).append(pm(o=i.labelFormatter)?function(){return gp(gn(o,[e,a,n,gx(e.value,i)]))}:function(){return gp(e.label||"")}).attr("className",yK.labelItem.name).node(),s=ej(ge(gy(r,[e,a,n])),2),u=s[0],c=s[1],f=c.transform,p=eM(c,["transform"]);gN(t,f);var h=function(t,e,n){var r,i,o=n.labelAlign;if(null==(i=e.style.transform)?void 0:i.includes("rotate"))return e.getLocalEulerAngles();var a=0,l=gx(t.value,n),s=gv(t.value,n);return"horizontal"===o?0:(gS(r=(y4(a="perpendicular"===o?gY([1,0],l):gY([s[0]<0?-1:1,0],s))+360)%180,-90,90)||(r+=180),r)}(e,t,i);return t.setLocalEulerAngles(+h),gZ(l,ek(ek({},gX(e.value,h,i)),u)),gN(t,f),t.attr(p),l}function g0(t,e){return gb(t,e.tickDirection,e)}function g1(t,e,n,r,i,o){var a,l,s,u,c,f,p,h,d,y,g,v,b,x,O,w,E,k,M,_,S=(a=pI(this),l=r.tickFormatter,s=g0(t.value,r),u="line",pm(l)&&(u=function(){return gn(l,[t,e,n,s])}),a.append(u).attr("className",yK.tickItem.name));c=g0(t.value,r),x=(h=ej((f=gn(r.tickLength,[t,e,n]),[[0,0],[(p=ej(c,2))[0]*f,p[1]*f]]),2),y=(d=ej(h[0],2))[0],g=d[1],b={x1:y,x2:(v=ej(h[1],2))[0],y1:g,y2:v[1]}).x1,O=b.x2,w=b.y1,E=b.y2,M=(k=ej(ge(gy(i,[t,e,n,c])),2))[0],_=k[1],"line"===S.node().nodeName&&S.styles(ek({x1:x,x2:O,y1:w,y2:E},M)),this.attr(_),S.styles(M);var P=ej(gO(t.value,r),2);return yU(this,{x:P[0],y:P[1]},o)}var g2=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}(),g5=yY({text:"text"},"title");function g3(t){return/\S+-\S+/g.test(t)?t.split("-").map(function(t){return t[0]}):t.length>2?[t[0]]:t.split("")}function g4(t,e){var n=Object.entries(e).reduce(function(e,n){var r=ej(n,2),i=r[0],o=r[1];return t.node().attr(i)||(e[i]=o),e},{});t.styles(n)}var g6=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 eE(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(g5.text.class);if(!a)return new g2(0,0,+e,+n);var l=a.getBBox(),s=l.width,u=l.height,c=ej(gI(i),4),f=c[0],p=c[1],h=c[2],d=c[3],y=ej([0,0,+e,+n],4),g=y[0],v=y[1],b=y[2],x=y[3],O=g3(r);if(O.includes("i"))return new g2(g,v,b,x);O.forEach(function(t,r){var i,o;"t"===t&&(v=(i=ej(0===r?[u+h,n-u-h]:[0,+n],2))[0],x=i[1]),"r"===t&&(b=ej([e-s-d],1)[0]),"b"===t&&(x=ej([n-u-f],1)[0]),"l"===t&&(g=(o=ej(0===r?[s+p,e-s-p]:[0,+e],2))[0],b=o[1])});var w=ej(gI(o),4),E=w[0],k=w[1],M=w[2],_=w[3],S=ej([_+k,E+M],2),P=S[0],j=S[1];return new g2(g+_,v+E,b-P,x-j)},e.prototype.getBBox=function(){return this.title?this.title.getBBox():new g2(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=this;t.width,t.height,t.position,t.spacing;var v=eM(t,["width","height","position","spacing"]),b=ej(ge(v),1)[0],x=(a=t.width,l=t.height,s=t.position,u=ej([a/2,l/2],2),f=(c=ej([+u[0],+u[1],"center","middle"],4))[0],p=c[1],h=c[2],d=c[3],(y=g3(s)).includes("l")&&(f=(n=ej([0,"start"],2))[0],h=n[1]),y.includes("r")&&(f=(r=ej([+a,"end"],2))[0],h=r[1]),y.includes("t")&&(p=(i=ej([0,"top"],2))[0],d=i[1]),y.includes("b")&&(p=(o=ej([+l,"bottom"],2))[0],d=o[1]),{x:f,y:p,textAlign:h,textBaseline:d}),O=x.x,w=x.y,E=x.textAlign,k=x.textBaseline;pC(!!v.text,pI(e),function(t){g.title=t.maybeAppendByClassName(g5.text,"text").styles(b).call(g4,{x:O,y:w,textAlign:E,textBaseline:k}).node()})},e}(pT);function g8(t,e,n,r,i){var o=ej(ge(y7(r,"title")),2),a=o[0],l=o[1],s=l.transform,u=eM(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);gN(t.node(),c);var f=function(t,e,n){var r=n.titlePosition,i=void 0===r?"lb":r,o=n.titleSpacing,a=g3(i),l=t.node().getLocalBounds(),s=ej(l.min,2),u=s[0],c=s[1],f=ej(l.halfExtents,2),p=f[0],h=f[1],d=ej(e.node().getLocalBounds().halfExtents,2),y=d[0],g=d[1],v=ej([u+p,c+h],2),b=v[0],x=v[1],O=ej(gI(o),4),w=O[0],E=O[1],k=O[2],M=O[3];if(["start","end"].includes(i)&&"linear"===n.type){var _=n.startPos,S=n.endPos,P=ej("start"===i?[_,S]:[S,_],2),j=P[0],A=P[1],T=ej(yZ(y5([-A[0]+j[0],-A[1]+j[1]]),w),2),C=T[0],N=T[1];return{x:j[0]+C,y:j[1]+N}}return a.includes("t")&&(x-=h+g+w),a.includes("r")&&(b+=p+y+E),a.includes("l")&&(b-=p+2*y+M),a.includes("b")&&(x+=h+2*g+k),{x:b,y:x}}(pI(n._offscreen||n.querySelector(yK.mainGroup.class)),e,r),p=f.x,h=f.y,d=yU(e.node(),{x:p,y:h},i);return gN(t.node(),c),d}function g9(t,e,n,r){var i=t.showLine,o=t.showTick,a=t.showLabel,l=pC(i,e.maybeAppendByClassName(yK.lineGroup,"g"),function(e){return function(t,e,n){var r,i,o,a,l,s,u=e.type,c=y7(e,"line");return"linear"===u?s=function(t,e,n,r){var i,o,a,l,s,u,c,f,p,h,d,y,g,v,b,x,O,w,E=e.showTrunc,k=e.startPos,M=e.endPos,_=e.truncRange,S=e.lineExtension,P=ej([k,M],2),j=ej(P[0],2),A=j[0],T=j[1],C=ej(P[1],2),N=C[0],L=C[1],I=ej(S?(void 0===(i=S)&&(i=[0,0]),o=ej([k,M,i],3),l=(a=ej(o[0],2))[0],s=a[1],c=(u=ej(o[1],2))[0],f=u[1],h=(p=ej(o[2],2))[0],d=p[1],g=(y=ej([c-l,f-s],2))[0],[(O=(x=ej([-h/(b=Math.sqrt(Math.pow(g,2)+Math.pow(v=y[1],2))),d/b],2))[0])*g,O*v,(w=x[1])*g,w*v]):[,,,,].fill(0),4),R=I[0],D=I[1],F=I[2],z=I[3],B=function(e){return t.selectAll(yK.line.class).data(e,function(t,e){return e}).join(function(t){return t.append("line").attr("className",function(t){return"".concat(yK.line.name," ").concat(t.className)}).styles(n).transition(function(t){return yU(this,gM(t.line),!1)})},function(t){return t.styles(n).transition(function(t){return yU(this,gM(t.line),r.update)})},function(t){return t.remove()}).transitions()};if(!E||!_)return B([{line:[[A+R,T+D],[N+F,L+z]],className:yK.line.name}]);var W=ej(_,2),$=W[0],G=W[1],H=N-A,V=L-T,U=ej([A+H*$,T+V*$],2),q=U[0],Y=U[1],X=ej([A+H*G,T+V*G],2),K=X[0],Z=X[1],Q=B([{line:[[A+R,T+D],[q,Y]],className:yK.lineFirst.name},{line:[[K,Z],[N+F,L+z]],className:yK.lineSecond.name}]);return e.truncRange,e.truncShape,e.lineExtension,Q}(t,e,gd(c,"arrow"),n):(r=gd(c,"arrow"),i=e.startAngle,o=e.endAngle,a=e.center,l=e.radius,s=t.selectAll(yK.line.class).data([{path:gk.apply(void 0,eT(eT([i,o],ej(a),!1),[l],!1))}],function(t,e){return e}).join(function(t){return t.append("path").attr("className",yK.line.name).styles(e).styles({path:function(t){return t.path}})},function(t){return t.transition(function(){var t,e,r,s,u,c=this,f=function(t,e,n,r){if(!r)return t.attr("__keyframe_data__",n),null;var i=r.duration,o=function t(e,n){var r,i,o,a,l,s;return"number"==typeof e&&"number"==typeof n?function(t){return e*(1-t)+n*t}:Array.isArray(e)&&Array.isArray(n)?(r=n?n.length:0,i=e?Math.min(r,e.length):0,function(o){var a=Array(i),l=Array(r),s=0;for(s=0;s<i;++s)a[s]=t(e[s],n[s]);for(;s<r;++s)l[s]=n[s];for(s=0;s<i;++s)l[s]=a[s](o);return l}):"object"==typeof e&&"object"==typeof n?(void 0===(o=e)&&(o={}),void 0===(a=n)&&(a={}),l={},s={},Object.entries(a).forEach(function(e){var n=ej(e,2),r=n[0],i=n[1];r in o?l[r]=t(o[r],i):s[r]=i}),function(t){return Object.entries(l).forEach(function(e){var n=ej(e,2),r=n[0],i=n[1];return s[r]=i(t)}),s}):function(t){return e}}(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,ek({fill:"both"},r))}(this,(e=(t=this.attributes).startAngle,r=t.endAngle,s=t.center,u=t.radius,eT(eT([e,r],ej(s),!1),[u],!1)),eT(eT([i,o],ej(a),!1),[l],!1),n.update);if(f){var p=function(){var t=gc(c.attributes,"__keyframe_data__");c.style.path=gk.apply(void 0,eT([],ej(t),!1))};f.onframe=p,f.onfinish=p}return f}).styles(e)},function(t){return t.remove()}).styles(r).transitions()),!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(yK.line.class):l?t.select(yK.lineSecond.class):t.select(yK.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=gp(s);p.attr(r),gh(p,c,!0),o.style("markerEnd",p).style("markerEndOffset",-u)}(t,u,e,c),s}(e,t,r)})||[],s=pC(o,e.maybeAppendByClassName(yK.tickGroup,"g"),function(e){var i,o;return i=gg(n,t.tickFilter),o=y7(t,"tick"),e.selectAll(yK.tick.class).data(i,function(t){return t.id||t.label}).join(function(e){return e.append("g").attr("className",yK.tick.name).transition(function(e,n){return g1.call(this,e,n,i,t,o,!1)})},function(e){return e.transition(function(e,n){return this.removeChildren(),g1.call(this,e,n,i,t,o,r.update)})},function(t){return t.transition(function(){var t=this,e=gr(this.childNodes[0],r.exit);return yG(e,function(){return t.remove()}),e})}).transitions()})||[],u=pC(a,e.maybeAppendByClassName(yK.labelGroup,"g"),function(e){var i,o;return i=gg(n,t.labelFilter),o=y7(t,"label"),e.selectAll(yK.label.class).data(i,function(t,e){return e}).join(function(r){return r.append("g").attr("className",yK.label.name).transition(function(e){return gJ(this,e,n,o,t),this.attr(gK(e,n,t)),this.__bbox__=e.bbox,null}).call(function(){return gQ.call(e,t)})},function(i){return i.transition(function(e){var i=function(t,e,n,r){if(void 0===r&&(r="destroy"),"text"===t.nodeName&&"text"===e.nodeName&&t.attributes.text===e.attributes.text&&1)return t.remove(),[null];var i=function(){"destroy"===r?t.destroy():"hide"===r&&pb(t),e.isVisible()&&pv(e)};if(!n)return i(),[null];var o=n.duration,a=void 0===o?0:o,l=n.delay,s=void 0===l?0:l,u=Math.ceil(a/2),c=a/4,f=function(t){if("circle"===t.nodeName){var e=ej(t.getLocalPosition(),2),n=e[0],r=e[1],i=t.attr("r");return[n-i,r-i]}return t.getLocalPosition()},p=ej(f(t),2),h=p[0],d=p[1],y=ej(f(e),2),g=ej([(h+y[0])/2-h,(d+y[1])/2-d],2),v=g[0],b=g[1],x=t.style.opacity,O=e.style.opacity,w=t.animate([{opacity:void 0===x?1:x,transform:"translate(0, 0)"},{opacity:0,transform:"translate(".concat(v,", ").concat(b,")")}],ek(ek({fill:"both"},n),{duration:s+u+c})),E=e.animate([{opacity:0,transform:"translate(".concat(-v,", ").concat(-b,")"),offset:.01},{opacity:void 0===O?1:O,transform:"translate(0, 0)"}],ek(ek({fill:"both"},n),{duration:u+c,delay:s+u-c}));return yG(E,i),[w,E]}(this.querySelector(yK.labelItem.class),gJ(this,e,n,o,t),r.update),a=yU(this,gK(e,n,t),r.update);return this.__bbox__=e.bbox,eT(eT([],ej(i),!1),[a],!1)}).call(function(n){var r,i;r=gc(n,"_transitions").flat().filter(gL),i=function(){return gQ.call(e,t)},0===r.length?i():Promise.all(r.map(function(t){return null==t?void 0:t.finished})).then(i)})},function(t){return t.transition(function(){var t=this,e=gr(this.childNodes[0],r.exit);return yG(e,function(){return pI(t).remove()}),e})}).transitions()})||[];return eT(eT(eT([],ej(l),!1),ej(s),!1),ej(u),!1).filter(function(t){return!!t})}var g7=function(t){function e(e){return t.call(this,e,yX)||this}return eE(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])}),p=y$(void 0===n?a:n),h=pC(s,pI(e).maybeAppendByClassName(yK.gridGroup,"g"),function(e){var n,r,i,o,a,l,s,u;return r=(n=y7(t,"grid")).type,i=n.areaFill,o=g_(t),a=gg(f,t.gridFilter),s="segment"===r?(l=t.gridLength,a.map(function(e,n){var r=e.value,i=ej(gO(r,t),2),o=i[0],a=i[1],s=ej(yZ(gb(r,t.gridDirection,t),l),2);return{id:n,points:[[o,a],[o+s[0],a+s[1]]]}})):function(t,e){var n=e.gridControlAngles,r=g_(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=ej(r,2),o=i[0],a=i[1];return t.map(function(t,r){var i=ej(gO(t.value,e),2),l=ej([i[0]-o,i[1]-a],2),s=l[0],u=l[1],c=[];return n.forEach(function(t){var e=y3(t),n=ej([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}})}(a,t),u=ek(ek({},n),{center:o,areaFill:pm(i)?a.map(function(t,e){return gn(i,[t,e,a])}):i,animate:p,data:s}),e.selectAll(yK.grid.class).data([1]).join(function(t){return t.append(function(){return new gu({style:u})}).attr("className",yK.grid.name)},function(t){return t.transition(function(){return this.update(u)})},function(t){return t.remove()}).transitions()})||[],d=pI(e).maybeAppendByClassName(yK.mainGroup,"g");i&&(!this.initialized&&p.enter||this.initialized&&p.update)&&g9(t,pI(this.offscreenGroup),f,y$(!1));var y=g9(t,pI(d.node()),f,p),g=pC(l,pI(e).maybeAppendByClassName(yK.titleGroup,"g"),function(e){var n;return n=t.titleText,e.selectAll(yK.title.class).data([{title:n}].filter(function(t){return!!t.title}),function(t,e){return t.title}).join(function(i){return i.append(function(){return gp(n)}).attr("className",yK.title.name).transition(function(){return g8(pI(this),e,r,t,p.enter)})},function(n){return n.transition(function(){return g8(pI(this),e,r,t,p.update)})},function(t){return t.remove()}).transitions()})||[];return eT(eT(eT([],ej(h),!1),ej(y),!1),ej(g),!1).flat().filter(function(t){return!!t})},e}(pT),mt=function(t){var e=typeof t;return null!==t&&"object"===e||"function"===e},me=function(t,e){if(t){if(tF(t))for(var n,r=0,i=t.length;r<i&&!1!==e(t[r],r);r++);else if(mt(t)){for(var o in t)if(t.hasOwnProperty(o)&&!1===e(t[o],o))break}}},mn=function(t,e,n){if(!tF(t)&&!tB(t))return t;var r=n;return me(t,function(t,n){r=e(r,t,n)}),r},mr=function(t,e){return mn(t,function(t,n,r){return e.includes(r)||(t[r]=n),t},{})},mi=function(t){var e=s8(t);return e.charAt(0).toUpperCase()+e.substring(1)};function mo(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 ma=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function ml(t){var e;if(!(e=ma.exec(t)))throw Error("invalid format: "+t);return new ms({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 ms(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+""}function mu(t,e){var n=mo(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")}ml.prototype=ms.prototype,ms.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};var mc={"%":(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)=>mu(100*t,e),r:mu,s:function(t,e){var n=mo(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(_I=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")+mo(t,Math.max(0,e+o-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function mf(t){return t}var mp=Array.prototype.map,mh=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"];function md(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=ej([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 g2(e,n,r-e,i-n)}_D=(_R=function(t){var e,n,r,i=void 0===t.grouping||void 0===t.thousands?mf:(e=mp.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?mf:(r=mp.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=ml(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,b=t.type;"n"===b?(y=!0,b="g"):mc[b]||(void 0===g&&(g=12),v=!0,b="g"),(h||"0"===e&&"="===n)&&(h=!0,e="0",n="=");var x="$"===p?o:"#"===p&&/[boxX]/.test(b)?"0"+b.toLowerCase():"",O="$"===p?a:/[%p]/.test(b)?u:"",w=mc[b],E=/[defgprs%]/.test(b);function k(t){var o,a,u,p=x,k=O;if("c"===b)k=w(t)+k,t="";else{var M=(t*=1)<0||1/t<0;if(t=isNaN(t)?f:w(Math.abs(t),g),v&&(t=function(t){t: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 t;i>0&&(i=0)}return i>0?t.slice(0,i)+t.slice(e+1):t}(t)),M&&0==+t&&"+"!==r&&(M=!1),p=(M?"("===r?r:c:"-"===r||"("===r?"":r)+p,k=("s"===b?mh[8+_I/3]:"")+k+(M&&"("===r?")":""),E){for(o=-1,a=t.length;++o<a;)if(48>(u=t.charCodeAt(o))||u>57){k=(46===u?l+t.slice(o+1):t.slice(o))+k,t=t.slice(0,o);break}}}y&&!h&&(t=i(t,1/0));var _=p.length+t.length+k.length,S=_<d?Array(d-_+1).join(e):"";switch(y&&h&&(t=i(S+t,S.length?d-k.length:1/0),S=""),n){case"<":t=p+t+k+S;break;case"=":t=p+S+t+k;break;case"^":t=S.slice(0,_=S.length>>1)+p+t+k+S.slice(_);break;default:t=S+p+t+k}return s(t)}return g=void 0===g?6:/[gprs]/.test(b)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),k.toString=function(){return t+""},k}return{format:p,formatPrefix:function(t,e){var n,r=p(((t=ml(t)).type="f",t)),i=3*Math.max(-8,Math.min(8,Math.floor(((n=mo(Math.abs(n=e)))?n[1]:NaN)/3))),o=Math.pow(10,-i),a=mh[8+i/3];return function(t){return r(o*t)+a}}}}({thousands:",",grouping:[3],currency:["$",""]})).format,_R.formatPrefix;var my=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=ej([0,0],2),y=d[0],g=d[1],v=e.map(function(t){var e,n=t.width,r=t.height,i=ej([y,g],2),o=i[0],a=i[1];return y=(e=ej([y+n*h[0],g+r*h[1]],2))[0],g=e[1],new g2(o,a,n,r)}),b=md(v),x={"flex-start":0,"flex-end":f?r-b.width:i-b.height,center:f?(r-b.width)/2:(i-b.height)/2},O=v.map(function(t){var e=t.x,n=t.y,r=g2.fromRect(t);return r.x=f?e+x[s]:e,r.y=f?n:n+x[s],r});md(O);var w=function(t){var e=ej(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 O.map(function(t){var e=t.x,n=t.y,r=g2.fromRect(t);return r.x=f?e:e+w(r),r.y=f?n+w(r):n,r}).map(function(e){var n,r,i=g2.fromRect(e);return i.x+=null!=(n=t.x)?n:0,i.y+=null!=(r=t.y)?r:0,i})},mg=function(t,e,n){return[]},mm=function(t,e,n){if(0===e.length)return[];var r={flex:my,grid:mg},i=n.display in r?r[n.display]:null;return(null==i?void 0:i.call(null,t,e,n))||[]},mv=function(t){function e(e){var n=t.call(this,e)||this;n.layoutEvents=[_S.BOUNDS_CHANGED,_S.INSERTED,_S.REMOVED],n.$margin=gI(0),n.$padding=gI(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 eE(e,t),Object.defineProperty(e.prototype,"margin",{get:function(){return this.$margin},set:function(t){this.$margin=gI(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"padding",{get:function(){return this.$padding},set:function(t){this.$padding=gI(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=ej(this.$margin,4),a=o[0],l=o[1],s=o[2],u=o[3];return new g2((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=ej(this.$padding,4),i=r[0],o=r[1],a=r[2],l=r[3],s=ej(this.$margin,4),u=s[0];return new g2(l+s[3],i+u,e-l-o,n-i-a)},e.prototype.layout=function(){if(this.attributes.display&&this.isConnected&&!this.children.some(function(t){return!t.isConnected}))try{var t=mm(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}(lA),mb=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 mx(t,e,n){return t.querySelector(e)?uf(t).select(e):uf(t).append(n)}function mO(t){return Array.isArray(t)?t.join(", "):`${t||""}`}function mw(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 mE extends mv{get child(){var t;return null==(t=this.children)?void 0:t[0]}update(t){var e;this.attr(t);let{subOptions:n}=t;null==(e=this.child)||e.update(n)}}class mk extends mE{update(t){var e;let{subOptions:n}=t;this.attr(t),null==(e=this.child)||e.update(n)}}function mM(t,e){var n;return null==(n=t.filter(t=>t.getOptions().name===e))?void 0:n[0]}function m_(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 mS(t){let e=["arrow","crosshairs","grid","handle","handleLabel","indicator","label","line","tick","tip","title","trunc"],{style:n}=t,r=mb(t,["style"]),i={};return Object.entries(r).forEach(([t,n])=>{e.includes(t)?i[`show${mi(t)}`]=n:i[t]=n}),Object.assign(Object.assign({},i),n)}var mP=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 mj(t,e){let{eulerAngles:n,origin:r}=e;r&&t.setOrigin(r),n&&t.rotate(n[0],n[1],n[2])}function mA(t){let{innerWidth:e,innerHeight:n,depth:r}=t.getOptions();return[e,n,r]}function mT(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]=u8(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.call(t))||f,h=function(t,e){if(ed(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 u4({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(!ev(e))return i;let o=e.map("bottom"===t?[i,1]:[0,i]);if("bottom"===t){let t=o[0];return new u4({domain:[0,n],range:[0,1]}).map(t)}if("left"===t){let t=o[1];return new u4({domain:[0,r],range:[0,1]}).map(t)}return i}}(a,l),y=t=>["left","right"].includes(t);return ed(l)||eh(l)?c.map((e,n,r)=>{var i,o;let s=(null==(i=t.getBandWidth)?void 0:i.call(t,e))/2||0,u=h(t.map(e)+s);return{value:ey(l)&&"center"===a||eh(l)&&(null==(o=t.getTicks)?void 0:o.call(t))&&["top","bottom","center","outer"].includes(a)||eh(l)&&y(a)?1-u:u,label:f(p(uO(e),n,r)),id:String(n)}}):c.map((e,n,r)=>{var i;let o=(null==(i=t.getBandWidth)?void 0:i.call(t,e))/2||0,l=d(h(t.map(e)+o));return{value:y(a)?1-l:l,label:f(p(uO(e),n,r)),id:String(n)}})}let mC=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.call(a))||a.getOptions().domain,s="string"==typeof n?_D(n):n;return t(Object.assign(Object.assign({},e),{labelFormatter:s,labelFilter:(t,e,n)=>r(l[e],e,l),scale:a}))(i)}},mN=mC(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=mP(t,["direction","important","labelFormatter","order","orientation","actualPosition","position","size","style","title","tickCount","tickFilter","tickMethod","transform","indexBBox"]);return({scales:i,value:v,coordinate:b,theme:x})=>{var O;let{bbox:w}=v,[E]=i,{domain:k,xScale:M}=E.getOptions(),_=Object.assign(Object.assign(Object.assign({},function(t,e,n,r,i){let o,a,l,s=(o=e.axis,a=["top","right","bottom","left"].includes(r)?e[`axis${ue(r)}`]:e.axisLinear,l=t.getOptions().name,Object.assign({},o,a,e[`axis${mi(l)}`]||{}));return"center"===r?Object.assign(Object.assign(Object.assign(Object.assign({},s),{labelDirection:"right"===n?"negative":"positive"}),"center"===n?{labelTransform:"translate(50%,0)"}:null),{tickDirection:"right"===n?"negative":"positive",labelSpacing:4*("center"!==n),titleSpacing:10*("vertical"===i||i===-Math.PI/2),tick:"center"!==n&&void 0}):s}(E,x,e,l,o)),u),g),S=function(t,e,n="xy"){let[r,i,o]=mA(e);return"xy"===n?t.includes("bottom")||t.includes("top")?i:r:"xz"===n?t.includes("bottom")||t.includes("top")?o:r:t.includes("bottom")||t.includes("top")?i:o}(a||l,b,t.plane),P=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]};else if("horizontal"===e)return{startPos:[o,a],endPos:[o+l,a]};else if("number"==typeof e){let[t,n]=r.getCenter(),[u,c]=ex(r),[f,p]=eO(r),h=Math.min(l,s)/2,{insetLeft:d,insetTop:y}=r.getOptions(),g=u*h,v=c*h,[b,x]=[t+o-d,n+a-y],[O,w]=[Math.cos(e),Math.sin(e)],E=ed(r)&&i?(()=>{let{domain:t}=i.getOptions();return t.length})():3;return{startPos:[b+v*O,x+v*w],endPos:[b+g*O,x+g*w],gridClosed:1e-6>Math.abs(p-f-360),gridCenter:[b,x],gridControlAngles:Array(E).fill(0).map((t,e,n)=>(p-f)/E*e)}}}return{}}(l,o,w,b,M),j=function(t){let{depth:e}=t.getOptions();return e?{tickIsBillboard:!0,lineIsBillboard:!0,labelIsBillboard:!0,titleIsBillboard:!0,gridIsBillboard:!0}:{}}(b),A=mT(E,k,f,r,p,h,l,b),T=y?A.map((t,e)=>{let n=y.get(e);return n&&n[0]===t.label?Object.assign(Object.assign({},t),{bbox:n[1]}):t}):A,C=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},_),{type:"linear",data:T,crossSize:s,titleText:mO(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,_),grid:(O=_.grid,!(ed(b)&&eh(b)||em(b))&&(void 0===O?!!E.getTicks:O)),gridLength:S,line:!0,indexBBox:y}),_.line?null:{lineOpacity:0}),P),j),n);return C.labelOverlap.find(t=>"hide"===t.type)&&(C.crossSize=!1),new g7({className:"axis",style:mS(C)})}}),mL=mC(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=mP(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=mT(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,[b,x]=ex(n),O=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]=eO(i),[h,d]=mA(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,b,x,n),{axis:w,axisArc:E={}}=i,k=mS(tW({},w,E,O,Object.assign(Object.assign({type:"arc",data:v,titleText:mO(p),grid:h},d),u)));return new g7({style:mr(k,["transform"])})}});mN.props={defaultPosition:"center",defaultSize:45,defaultOrder:0,defaultCrossPadding:[12,12],defaultPadding:[12,12]},mL.props={defaultPosition:"outer",defaultOrientation:"vertical",defaultSize:45,defaultOrder:0,defaultCrossPadding:[12,12],defaultPadding:[12,12]};let mI=t=>(...e)=>{let n=mN(Object.assign({},{crossPadding:50},t))(...e);return mj(n,t),n};mI.props=Object.assign(Object.assign({},mN.props),{defaultPosition:"bottom"});let mR=t=>(...e)=>{let n=mN(Object.assign({},{crossPadding:10},t))(...e);return mj(n,t),n};mR.props=Object.assign(Object.assign({},mN.props),{defaultPosition:"left"});var mD=function(){},mF=function(t,e,n){var r=t,i=pB(e)?e.split("."):e;return i.forEach(function(t,e){e<i.length-1?(pz(r[t])||(r[t]=gf(i[e+1])?[]:{}),r=r[t]):r[t]=n}),t},mz=function(t,e,n){return t<e?e:t>n?n:t},mB=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)}},mW=yY({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"),m$=function(t){function e(e){var n=t.call(this,e,{animate:{easing:"linear",duration:200,fill:"both"},buttonCursor:"pointer",buttonFill:"black",buttonPath:[["M",-6,-6],["L",6,0],["L",-6,6],["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 n.playState="idle",n.contentGroup=n.appendChild(new lA({class:mW.contentGroup.name})),n.playWindow=n.contentGroup.appendChild(new lA({class:mW.playWindow.name})),n.innerCurrPage=n.defaultPage,n}return eE(e,t),Object.defineProperty(e.prototype,"defaultPage",{get:function(){return mz(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=ej(((null==(e=(t=this.pageViews.map(function(t){var e=t.getBBox();return[e.width,e.height]}))[0])?void 0:e.map(function(e,n){return t.map(function(t){return t[n]})}))||[]).map(function(t){return Math.max.apply(Math,eT([],ej(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 g2(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=ej(this.getFollowingPageDiff(t),2),s=l[0],u=l[1];this.playState="running";var c=yV(o,[{transform:"translate(0, 0)"},{transform:"translate(".concat(-s,", ").concat(-u,")")}],n);return yG(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:mz(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:mz(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(mW.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)?pv(e):pb(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=ej("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),b="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"},x=ej(b.offset,3),O=ej(x[0],2),w=O[0],E=O[1],k=ej(x[1],2),M=k[0],_=k[1],S=ej(x[2],2),P=S[0],j=S[1],A=b.textAlign,T=n.querySelector("text");T&&(T.style.textAlign=A),t.setLocalPosition(w,E),n.setLocalPosition(M,_),e.setLocalPosition(P,j)},e.prototype.updatePageInfo=function(){var t,e=this.currPage,n=this.pageViews,r=this.attributes.formatter;n.length<2||(null==(t=this.pageInfoGroup.querySelector(mW.pageInfo.class))||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=ej(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(mW.controller,"g");if(px(l.node(),a),a){var s=y7(this.attributes,"button"),u=y7(this.attributes,"pageNum"),c=ej(ge(s),2),f=c[0],p=c[1],h=f.size,d=eM(f,["size"]),y=!l.select(mW.prevBtnGroup.class).node(),g=l.maybeAppendByClassName(mW.prevBtnGroup,"g").styles(p);this.prevBtnGroup=g.node();var v=g.maybeAppendByClassName(mW.prevBtn,"path"),b=l.maybeAppendByClassName(mW.nextBtnGroup,"g").styles(p);this.nextBtnGroup=b.node(),[v,b.maybeAppendByClassName(mW.nextBtn,"path")].forEach(function(t){t.styles(ek(ek({},d),{transformOrigin:"center"})),gh(t.node(),h,!0)});var x=l.maybeAppendByClassName(mW.pageInfoGroup,"g");this.pageInfoGroup=x.node(),x.maybeAppendByClassName(mW.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=pI(e);this.renderClipPath(n),this.renderController(n),this.setVisiblePages([this.defaultPage]),this.goTo(this.defaultPage)},e.prototype.bindEvents=function(){var t=this,e=mB(function(){return t.render(t.attributes,t)},50);this.playWindow.addEventListener(_S.INSERTED,e),this.playWindow.addEventListener(_S.REMOVED,e)},e}(pT);function mG(t,e,n){return void 0===t&&(t="horizontal"),"horizontal"===t?e:n}pW.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"]]}),pW.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]]}),pW.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]]});var mH=yY({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"),mV=function(t){function e(e){return t.call(this,e,{span:[1,1],marker:function(){return new lS({style:{r:6}})},markerSize:10,labelFill:"#646464",valueFill:"#646464",labelFontSize:12,valueFontSize:12,labelTextBaseline:"middle",valueTextBaseline:"middle"})||this}return eE(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=ej(gI(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=ej(this.spacing,2),f=c[0],p=c[1];if(r){var h=r-n-f-p,d=ej(this.span,2);s=(t=ej([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=ej(gI(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=ej(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(mH.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)*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=y7(this.attributes,"marker");this.markerGroup=t.maybeAppendByClassName(mH.markerGroup,"g").style("zIndex",0),pC(!!n,this.markerGroup,function(){var t=e.markerGroup.node(),i=t.getElementsByClassName(mH.marker.name)[0],o=n();i?o.nodeName===i.nodeName?(!function(t,e){var n,r,i=e.attributes;try{for(var o=eP(Object.entries(i)),a=o.next();!a.done;a=o.next()){var l=ej(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),pI(i).styles(r)):(i.remove(),pI(o).attr("className",mH.marker.name).styles(r),t.appendChild(o)):(pI(o).attr("className",mH.marker.name).styles(r),t.appendChild(o)),e.markerGroup.node().scale(1/e.markerGroup.node().getScale()[0]),gh(e.markerGroup.node(),e.scaleSize,!0)})},e.prototype.renderLabel=function(t){var e=y7(this.attributes,"label"),n=e.text,r=eM(e,["text"]);this.labelGroup=t.maybeAppendByClassName(mH.labelGroup,"g").style("zIndex",0),this.labelGroup.maybeAppendByClassName(mH.label,function(){return gp(n)}).styles(r)},e.prototype.renderValue=function(t){var e=this,n=y7(this.attributes,"value"),r=n.text,i=eM(n,["text"]);this.valueGroup=t.maybeAppendByClassName(mH.valueGroup,"g").style("zIndex",0),pC(this.showValue,this.valueGroup,function(){e.valueGroup.maybeAppendByClassName(mH.value,function(){return gp(r)}).styles(i)})},e.prototype.renderBackground=function(t){var e=this.shape,n=e.width,r=e.height,i=y7(this.attributes,"background");this.background=t.maybeAppendByClassName(mH.backgroundGroup,"g").style("zIndex",-1),this.background.maybeAppendByClassName(mH.background,"rect").styles(ek({width:n,height:r},i))},e.prototype.adjustLayout=function(){var t=this.layout,e=t.labelWidth,n=t.valueWidth,r=t.height,i=ej(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}),gC(this.labelGroup.select(mH.label.class).node(),Math.ceil(e)),this.showValue&&(this.valueGroup.styles({x:l,y:s}),gC(this.valueGroup.select(mH.value.class).node(),Math.ceil(n)))},e.prototype.render=function(t,e){var n=pI(e);this.renderMarker(n),this.renderLabel(n),this.renderValue(n),this.renderBackground(n),this.adjustLayout()},e}(pT),mU=yY({page:"item-page",navigator:"navigator",item:"item"},"items"),mq=function(t,e,n){return(void 0===n&&(n=!0),t)?e(t):n},mY=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:mD,mouseenter:mD,mouseleave:mD})||this;return n.navigatorShape=[0,0],n}return eE(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=y7(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:ek({layout:n,labelText:l,valueText:s},Object.fromEntries(Object.entries(r).map(function(n){var r=ej(n,2);return[r[0],gn(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=ej(this.navigatorShape,1)[0],l=ej(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 b=ej(v,2),x=b[0],O=b[1],w=(r-a-(u-1)*o)/u,E=e.getBBox().height,k=ej([0,0],2),M=k[0],_=k[1];return"horizontal"===n?(M=(p=ej([f,x*(E+i)],2))[0],_=p[1],f=O===u-1?0:f+w+o):(M=(h=ej([O*(w+o),f],2))[0],_=h[1],f=x===s-1?0:f+E+i),{page:d,index:l,row:x,col:O,pageIndex:y,width:w,height:E,x:M,y:_}})},e.prototype.getFlexLayout=function(){var t=this.attributes,e=t.width,n=t.height,r=t.rowPadding,i=t.colPadding,o=ej(this.navigatorShape,1)[0],a=ej(this.grid,2),l=a[0],s=a[1],u=ej([e-o,n],2),c=u[0],f=u[1],p=ej([0,0,0,0,0,0,0,0],8),h=p[0],d=p[1],y=p[2],g=p[3],v=p[4],b=p[5],x=p[6],O=p[7];return this.pageViews.children.map(function(t,e){var n,o,a,u,p=t.getBBox(),w=p.width,E=p.height,k=0===x?0:i,M=x+k+w;return M<=c&&mq(v,function(t){return t<s})?(h=(n=ej([x+k,O,M],3))[0],d=n[1],x=n[2]):(b=(o=ej([b+1,0,0,O+E+r],4))[0],v=o[1],x=o[2],(O=o[3])+E<=f&&mq(b,function(t){return t<l}))?(h=(a=ej([x,O,w],3))[0],d=a[1],x=a[2]):(h=(u=ej([0,0,w,0,y+1,0,0,0],8))[0],d=u[1],x=u[2],O=u[3],y=u[4],g=u[5],b=u[6],v=u[7]),{width:w,height:E,x:h,y:d,page:y,index:e,pageIndex:g++,row:b,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 mG(this.attributes.orientation,t,e)},e.prototype.flattenPage=function(t){t.querySelectorAll(mU.item.class).forEach(function(e){t.appendChild(e)}),t.querySelectorAll(mU.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);pI(t).selectAll(mU.item.class).data(this.renderData,function(t){return t.id}).join(function(t){return t.append(function(t){return new mV({style:t.style})}).attr("className",mU.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.getBBox().height)||0,o=ej(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,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=ej(t,2);return{page:e[0],layouts:e[1]}}),i=eT([],ej(this.navigator.getContainer().children),!1);r.forEach(function(t){var e=t.layouts,r=n.pageViews.appendChild(new lA({className:mU.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),mF(s,"__layout__",t),s.update({x:e,y:n,width:a,height:l})})}),this.relayoutNavigator()},e.prototype.renderNavigator=function(t){var e=pS({orientation:this.attributes.orientation},y7(this.attributes,"nav")),n=this;return t.selectAll(mU.navigator.class).data(["nav"]).join(function(t){return t.append(function(){return new m$({style:e})}).attr("className",mU.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(pI(e));this.renderItems(r.getContainer()),this.adjustLayout()}},e.prototype.dispatchCustomEvent=function(t,e){var n=new a2(t,{detail:e});this.dispatchEvent(n)},e}(pT),mX=yY({markerGroup:"marker-group",marker:"marker",labelGroup:"label-group",label:"label"},"handle"),mK={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},mZ=function(t){function e(e){return t.call(this,e,mK)||this}return eE(e,t),e.prototype.render=function(t,e){var n=pI(e).maybeAppendByClassName(mX.markerGroup,"g");this.renderMarker(n);var r=pI(e).maybeAppendByClassName(mX.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?mG(r,"horizontalHandle","verticalHandle"):i;pC(!!o,t,function(t){var n=y7(e.attributes,"marker"),r=ek({symbol:o},n);e.marker=t.maybeAppendByClassName(mX.marker,function(){return new pW({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;pC(r,t,function(t){var n,r=y7(e.attributes,"label"),o=r.text,s=eM(r,["text"]),u=(null==(n=t.select(mX.marker.class))?void 0:n.node().getBBox())||{},c=u.width,f=u.height,p=ej(mG(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(mX.label,"text").styles(ek(ek({},s),{x:h,y:d,text:l(o).toString(),textAlign:y,textBaseline:g}))})},e}(pT),mQ={showTitle:!0,padding:0,orientation:"horizontal",backgroundFill:"transparent",titleText:"",titleSpacing:4,titlePosition:"top-left",titleFill:"#2C3542",titleFontWeight:"bold",titleFontFamily:"sans-serif",titleFontSize:12},mJ=pS({},mQ,{}),m0=pS({},mQ,gt(mK,"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"}),m1=yY({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"),m2=function(t){function e(e){return t.call(this,e,mJ)||this}return eE(e,t),e.prototype.renderTitle=function(t,e,n){var r=this.attributes,i=r.showTitle,o=r.titleText,a=ej(ge(y7(this.attributes,"title")),2),l=a[0],s=a[1];this.titleGroup=t.maybeAppendByClassName(m1.titleGroup,"g").styles(s);var u=ek(ek({width:e,height:n},l),{text:i?o:""});this.title=this.titleGroup.maybeAppendByClassName(m1.title,function(){return new g6({style:u})}).update(u)},e.prototype.renderItems=function(t,e){var n=e.x,r=e.y,i=e.width,o=e.height,a=ej(ge(y7(this.attributes,"title",!0)),2),l=a[0],s=a[1],u=ek(ek({},l),{width:i,height:o,x:0,y:0});this.itemsGroup=t.maybeAppendByClassName(m1.itemsGroup,"g").styles(ek({x:n,y:r},s));var c=this;this.itemsGroup.selectAll(m1.items.class).data(["items"]).join(function(t){return t.append(function(){return new mY({style:u})}).attr("className",m1.items.name).each(function(){c.items=pI(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 g2(0,0,n,r)},enumerable:!1,configurable:!0}),e.prototype.getBBox=function(){var e,n,r=null==(e=this.title)?void 0:e.node(),i=null==(n=this.items)?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=g3(r),c=ej(gI(a?i:0),4),f=c[0],p=c[1],h=c[2],d=c[3],y=ej(gI(o),4),g=y[0],v=y[1],b=y[2],x=y[3],O=ej([d+p,f+h],2),w=O[0],E=O[1],k=ej([x+v,g+b],2),M=k[0],_=k[1];if("l"===u[0])return new g2(l.x,l.y,s.width+l.width+w+M,Math.max(s.height+_,l.height));if("t"===u[0])return new g2(l.x,l.y,Math.max(s.width+M,l.width),s.height+l.height+E+_);var S=ej([e.attributes.width||s.width,e.attributes.height||s.height],2),P=S[0],j=S[1];return new g2(s.x,s.y,P+l.width+w+M,j+l.height+E+_)}(r,i):t.prototype.getBBox.call(this)},e.prototype.render=function(t,e){var n=t.width,r=t.height,i=pI(e);this.renderTitle(i,n,r),this.renderItems(i,this.availableSpace),this.adjustLayout()},e}(pT),m5=function(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)};function m3(t){if(m5(t))return t[t.length-1]}var m4=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 m6=t=>{let{labelFormatter:e,layout:n,order:r,orientation:i,position:o,size:a,title:l,cols:s,itemMarker:u}=t,c=m4(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}=m_(t,e,n);return{width:i,height:o}}(r,t,m6),h=mw(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:mO(l)}),function(t,e){let n,{labelFormatter:r=t=>`${t}`}=t,{scales:i,theme:o}=e,a=o.legendCategory.itemMarkerSize,l=(n=mM(i,"size"))instanceof dR?2*n.map(NaN):a,s={itemMarker:function(t,e){let{scales:n,library:r,markState:i}=e,[o,a]=function(t,e){let n=mM(t,"shape"),r=mM(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.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.props)?void 0:i.shape[t])?void 0:a.props.defaultMarker)||m3(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=fS(e,["d","fill","strokeWidth","path","stroke","lineWidth","color"]);let c=f1.get(t)||f1.get("point");return(...t)=>new lL({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 mM(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:l}),e),itemMarkerSize:l,itemMarkerOpacity:function(t){let e=mM(t,"opacity");if(e){let{range:t}=e.getOptions();return(e,n)=>t[n]}}(i)},u="string"==typeof r?_D(r):r,c=mM(i,"color"),f=i.find(t=>t.getOptions().domain.length>0).getOptions().domain,p=c?t=>c.map(t):()=>e.theme.color;return Object.assign(Object.assign({},s),{data:f.map(t=>({id:t,label:u(t),color:p(t)}))})}(t,e)),{legendCategory:y={}}=i,g=mS(Object.assign({},y,d,c)),v=new mk({style:Object.assign(Object.assign({x:a.x,y:a.y,width:a.width,height:a.height},h),{subOptions:g})});return v.appendChild(new m2({className:"legend-category",style:g})),v}};m6.props={defaultPosition:"top",defaultOrder:1,defaultSize:40,defaultCrossPadding:[12,12],defaultPadding:[12,12]};var m8={}.toString,m9=function(t,e){return m8.call(t)==="[object "+e+"]"},m7=function(t){return Array.isArray?Array.isArray(t):m9(t,"Array")},vt=function(t){var e=typeof t;return null!==t&&"object"===e||"function"===e},ve=function(t,e){if(t){if(m7(t))for(var n,r=0,i=t.length;r<i&&!1!==e(t[r],r);r++);else if(vt(t)){for(var o in t)if(t.hasOwnProperty(o)&&!1===e(t[o],o))break}}},vn=function(t){return m9(t,"Function")},vr=Array.prototype;vr.splice,vr.indexOf,Array.prototype.splice,Object.prototype.hasOwnProperty;var vi=Object.values?function(t){return Object.values(t)}:function(t){var e=[];return ve(t,function(n,r){vn(t)&&"prototype"===r||e.push(n)}),e},vo=function(t){if("object"!=typeof t||null===t||!m9(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},va=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&&vo(a)?(vo(e[o])||(e[o]={}),r<i?t(e[o],a,r+1,i):e[o]=n[o]):m7(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 vl=function(t){return t};function vs(){this.map={}}!function(t,e){if(!vn(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 _F||(_F=document.createElement("canvas").getContext("2d")),_F.font=[o,a,i,n+"px",r].join(" "),_F.measureText(m9(t,"String")?t:"").width},function(t,e){return void 0===e&&(e={}),eA([t],vi(e)).join("")}),vs.prototype.has=function(t){return void 0!==this.map[t]},vs.prototype.get=function(t,e){var n=this.map[t];return void 0===n?e:n},vs.prototype.set=function(t,e){this.map[t]=e},vs.prototype.clear=function(){this.map={}},vs.prototype.delete=function(t){delete this.map[t]},vs.prototype.size=function(){return Object.keys(this.map).length};class vu{constructor(t){this.options=va({},this.getDefaultOptions()),this.update(t)}getOptions(){return this.options}update(t={}){this.options=va({},this.options,t),this.rescale(t)}rescale(t){}}function vc(t,e){return e-t?n=>(n-t)/(e-t):t=>.5}function vf(t,...e){return e.reduce((t,e)=>n=>t(e(n)),t)}function vp(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 vh(t){let e=uG().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;return[255*vp(a,o,e+1/3),255*vp(a,o,e),255*vp(a,o,e-1/3),i]}(r):null}let vd=(t,e)=>n=>t*(1-n)+e*n,vy=(t,e)=>{if("number"==typeof t&&"number"==typeof e)return vd(t,e);if("string"==typeof t&&"string"==typeof e){let n,r;return n=vh(t),r=vh(e),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})`}}return()=>t},vg=(t,e)=>{let n=vd(t,e);return t=>Math.round(n(t))};function vm(t){return null!=t&&!Number.isNaN(t)}let vv=Math.sqrt(50),vb=Math.sqrt(10),vx=Math.sqrt(2);function vO(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>=vv?10:o>=vb?5:o>=vx?2:1)*10**i:-(10**-i)/(o>=vv?10:o>=vb?5:o>=vx?2:1)}let vw=(t,e,n=5)=>{let r,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=vO(l,s,n))>0?r=vO(l=Math.floor(l/r)*r,s=Math.ceil(s/r)*r,n):r<0&&(r=vO(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},vE=(t,e,n,r)=>(Math.min(t.length,e.length)>2?(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]=vc(l[t],l[t+1]),o[t]=n(s[t],s[t+1]);return e=>{let n=function(t,e,n){let r=1,i=n||t.length,o=t=>t;for(;r<i;){let n=Math.floor((r+i)/2);o(t[n])>e?i=n:r=n+1}return r}(t,e,r)-1,a=i[n];return vf(o[n],a)(e)}}:(t,e,n)=>{let r,i,[o,a]=t,[l,s]=e;return o<a?(r=vc(o,a),i=n(l,s)):(r=vc(a,o),i=n(s,l)),vf(i,r)})(t,e,r?vg:n);class vk extends vu{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:vd,tickCount:5}}map(t){return vm(t)?this.output(t):this.options.unknown}invert(t){return vm(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;return[t[0],t[t.length-1],e]}chooseNice(){return vw}rescale(){this.nice();let[t,e]=this.chooseTransforms();this.composeOutput(t,this.chooseClamp(t)),this.composeInput(t,e,this.chooseClamp(e))}chooseClamp(t){var e,n;let r,i,{clamp:o,range:a}=this.options,l=this.options.domain.map(t),s=Math.min(l.length,a.length);return o?(e=l[0],r=(n=l[s-1])<e?n:e,i=e>n?e:n,t=>Math.min(Math.max(r,t),i)):vl}composeOutput(t,e){let{domain:n,range:r,round:i,interpolate:o}=this.options,a=vE(n.map(t),r,o,i);this.output=vf(a,e,t)}composeInput(t,e,n){let{domain:r,range:i}=this.options,o=vE(i,r.map(t),vd);this.input=vf(e,n,o)}}let vM=(t,e,n)=>{let r,i,o=t,a=e;if(o===a&&n>0)return[o];let l=vO(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 v_ extends vk{getDefaultOptions(){return{domain:[0,1],range:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolate:vy,tickMethod:vM,tickCount:5}}chooseTransforms(){return[vl,vl]}clone(){return new v_(this.options)}}function vS(t,e){return+t.toPrecision(e)}function vP(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 vj={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},vA=yY({background:"background",labelGroup:"label-group",label:"label"},"indicator"),vT=function(t){function e(e){var n=t.call(this,e,vj)||this;return n.point=[0,0],n.group=n.appendChild(new lA({})),n.isMutationObserved=!0,n}return eE(e,t),e.prototype.renderBackground=function(){if(this.label){var t=this.attributes,e=t.position,n=ej(gI(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 g2(s[0]-a,s[1]-r,u[0]+i-s[0]+a,u[1]+o-s[1]+r),f=this.getPath(e,c),p=y7(this.attributes,"background");this.background=pI(this.group).maybeAppendByClassName(vA.background,"path").styles(ek(ek({},p),{path:f})),this.group.appendChild(this.label.node())}},e.prototype.renderLabel=function(){var t=this.attributes,e=t.formatter,n=t.labelText,r=ej(ge(y7(this.attributes,"label")),2),i=r[0],o=r[1],a=(i.text,eM(i,["text"]));this.label=pI(this.group).maybeAppendByClassName(vA.labelGroup,"g").styles(o),n&&this.label.maybeAppendByClassName(vA.label,function(){return gp(e(n))}).style("text",e(n).toString()).selectAll("text").styles(a)},e.prototype.adjustLayout=function(){var t=ej(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,eT([s+1,1],ej(u),!1)),l[0][0]="M",l},e.prototype.createCorner=function(t,e){void 0===e&&(e=10);var n=gH.apply(void 0,eT([],ej(t),!1)),r=ej(t,2),i=ej(r[0],2),o=i[0],a=i[1],l=ej(r[1],2),s=l[0],u=l[1],c=ej(n?[s-o,[o,s]]:[u-a,[a,u]],2),f=c[0],p=ej(c[1],2),h=p[0],d=p[1],y=f/2,g=f/Math.abs(f)*e,v=g/2,b=g*Math.sqrt(3)/2*.8,x=ej([h,h+y-v,h+y,h+y+v,d],5),O=x[0],w=x[1],E=x[2],k=x[3],M=x[4];return n?(this.point=[E,a-b],[["L",O,a],["L",w,a],["L",E,a-b],["L",k,a],["L",M,a]]):(this.point=[o+b,E],[["L",o,O],["L",o,w],["L",o+b,E],["L",o,k],["L",o,M]])},e.prototype.applyVisibility=function(){"hidden"===this.attributes.visibility?pb(this):pv(this)},e.prototype.bindEvents=function(){this.label.on(_S.BOUNDS_CHANGED,this.renderBackground)},e.prototype.render=function(){this.renderLabel(),this.renderBackground(),this.adjustLayout(),this.applyVisibility()},e}(pT),vC={fill:"#fff",lineWidth:1,radius:2,size:10,stroke:"#bfbfbf",strokeOpacity:1,zIndex:0},vN={fill:"#000",fillOpacity:.45,fontSize:12,textAlign:"center",textBaseline:"middle",zIndex:1},vL={orientation:"horizontal",showLabel:!0,type:"start"},vI=yY({foreground:"foreground",handle:"handle",selection:"selection",sparkline:"sparkline",sparklineGroup:"sparkline-group",track:"track",brushArea:"brush-area"},"slider"),vR=yY({labelGroup:"label-group",label:"label",iconGroup:"icon-group",icon:"icon",iconRect:"icon-rect",iconLine:"icon-line"},"handle"),vD=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return eE(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=eM(t,["size","radius","orientation"]),l=2.4*r,s=pI(e).maybeAppendByClassName(vR.iconRect,"rect").styles(ek(ek({},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(vR.iconLine,"-1"),"line").styles(ek({x1:u,x2:u,y1:f,y2:p},a)),s.maybeAppendByClassName("".concat(vR.iconLine,"-2"),"line").styles(ek({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}(pT),vF=function(t){function e(e){return t.call(this,e,vL)||this}return eE(e,t),e.prototype.renderLabel=function(t){var e=this,n=this.attributes.showLabel,r=y7(this.attributes,"label"),i=r.transform,o=ej(ge(eM(r,["transform"]),[]),2),a=o[0],l=o[1],s=pI(t).maybeAppendByClassName(vR.labelGroup,"g").styles(l),u=ek(ek({},vN),a),c=u.text,f=eM(u,["text"]);pC(!!n,s,function(t){e.label=t.maybeAppendByClassName(vR.label,"text").styles(ek(ek({},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=ek(ek({orientation:n},vC),y7(this.attributes,"icon")),o=this.attributes.iconShape,a=void 0===o?function(){return new vD({style:i})}:o;pI(t).maybeAppendByClassName(vR.iconGroup,"g").selectAll(vR.icon.class).data([a]).join(function(t){return t.append("string"==typeof a?a:function(){return a(r)}).attr("className",vR.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}(pT);function vz(t,e){var n=ej(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 vB=yY({trackGroup:"background-group",track:"background",selectionGroup:"ribbon-group",selection:"ribbon",clipPath:"clip-path"},"ribbon");function vW(t){var e=t.orientation,n=t.size,r=t.length;return mG(e,[r,n],[n,r])}function v$(t){var e=t.type,n=ej(vW(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 vG=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 eE(e,t),e.prototype.render=function(t,e){n=pI(e).maybeAppendByClassName(vB.trackGroup,"g"),r=y7(t,"track"),n.maybeAppendByClassName(vB.track,"path").styles(ek({path:v$(t)},r));var n,r,i=pI(e).maybeAppendByClassName(vB.selectionGroup,"g"),o=y7(t,"selection"),a=function(t){var e,n,r,i=t.orientation,o=t.color,a=t.block,l=t.partition,s=(r=pm(o)?Array(20).fill(0).map(function(t,e,n){return o(e/(n.length-1))}):o).length,u=r.map(function(t){return ot(t).toString()});return s?1===s?u[0]:a?(e=Array.from(u),Array(n=l.length).fill(0).reduce(function(t,r,i){var o=e[i%e.length];return t+" ".concat(l[i],":").concat(o).concat(i<n-1?" ".concat(l[i+1],":").concat(o):"")},"l(".concat("horizontal"===i?"0":"270",")"))):u.reduce(function(t,e,n){return t+" ".concat(n/(s-1),":").concat(e)},"l(".concat(mG(i,"0","270"),")")):""}(t),l=i.maybeAppendByClassName(vB.selection,"path").styles(ek({path:v$(t),fill:a},o)),s=l.maybeAppendByClassName(vB.clipPath,"path").styles({path:function(t){var e=t.orientation,n=t.range;if(!n)return[];var r=ej(vW(t),2),i=r[0],o=r[1],a=ej(n,2),l=a[0],s=a[1],u=mG(e,l*i,0),c=mG(e,0,l*o),f=mG(e,s*i,i),p=mG(e,o,s*o);return[["M",u,c],["L",u,p],["L",f,p],["L",f,c],["Z"]]}(t)}).node();l.style("clip-path",s)},e}(pT),vH=function(t){function e(e){var n=t.call(this,e,m0)||this;return n.eventToOffsetScale=new v_({}),n.innerRibbonScale=new v_({}),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=vz(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=ej(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 eE(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 g2(0,0,t.width,t.height)},e.prototype.render=function(t,e){var n=this,r=t.showLabel;this.renderTitle(pI(e));var i=this.availableSpace,o=i.x,a=i.y,l=pI(e).maybeAppendByClassName(m1.contentGroup,"g").styles({x:o,y:a});pC(!!r,l.maybeAppendByClassName(m1.labelGroup,"g").styles({zIndex:1}),function(t){n.renderLabel(t)});var s=l.maybeAppendByClassName(m1.ribbonGroup,"g").styles({zIndex:0});this.handlesGroup=l.maybeAppendByClassName(m1.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=this.attributes,e=t.data,n=t.domain;return n?{min:n[0],max:n[1]}:{min:Math.min.apply(Math,eT([],ej(e.map(function(t){return t.value})),!1)),max:Math.max.apply(Math,eT([],ej(e.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=ej(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=ej(void 0===r?[e,n]:r,2);return[i[0],i[1]]},enumerable:!1,configurable:!0}),e.prototype.ifHorizontal=function(t,e){return mG(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=y7(this.attributes,"title"),l=ek(ek({},a),{width:i,height:o,text:r}),s=this;t.selectAll(m1.title.class).data(n?[r]:[]).join(function(t){return t.append(function(){return new g6({style:l})}).attr("className",m1.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 g2(0,0,t.width,t.height)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"labelFixedSpacing",{get:function(){return 5*!!this.attributes.showTick},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"labelPosition",{get:function(){var t=this.attributes;return({vertical:{positive:"right",negative:"left"},horizontal:{positive:"bottom",negative:"top"}})[t.orientation][t.labelDirection]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"labelBBox",{get:function(){if(!this.attributes.showLabel)return new g2(0,0,0,0);if(this.cacheLabelBBox)return this.cacheLabelBBox;var t,e=(null==(t=this.label.querySelector(yK.labelGroup.class))?void 0:t.children.slice(-1)[0]).getBBox(),n=e.width,r=e.height;return this.cacheLabelBBox=new g2(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=ej(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||(["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 b=Math.max(d,s),x=f-b,O=ej(this.ifHorizontal([x,g],[g,x]),2),w=O[0],E=O[1],k=["top","left"].includes(v)?l:0,M=ej(this.ifHorizontal([b/2,k],[k,b/2]),2);return new g2(M[0],M[1],w,E)},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=y7(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=pS({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(m1.ribbon,function(){return new vG({style:y})}).update(y)},e.prototype.getHandleClassName=function(t){return"".concat(m1.prefix("".concat(t,"-handle")))},e.prototype.renderHandles=function(){var t=this.attributes,e=t.showHandle,n=t.orientation,r=y7(this.attributes,"handle"),i=ej(this.selection,2),o=i[0],a=i[1],l=ek(ek({},r),{orientation:n}),s=r.shape,u="basic"===(void 0===s?"slider":s)?mZ:vF,c=this;this.handlesGroup.selectAll(m1.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(m1.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=ej(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=ej(this.getElementsByClassName(m1.title.name),1)[0],i=this.handlesGroup.select(".".concat(this.getHandleClassName("start"))).node();if(r&&i&&"top-left"===e&&"horizontal"===n){var o=ej(i.getLocalBounds().min,1)[0],a=ej(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 g2(0,0,0,0);var t=this.startHandle.getBBox(),e=t.width,n=t.height,r=this.endHandle.getBBox(),i=ej([Math.max(e,r.width),Math.max(n,r.height)],2),o=i[0],a=i[1];return this.cacheHandleBBox=new g2(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=ej(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=ej(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=y7(this.attributes,"indicator");this.indicator=t.maybeAppendByClassName(m1.indicator,function(){return new vT({})}).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)?o:r.toString();if(e.push(ek(ek({},n),{id:l,index:r,type:"value",label:null!=(a=null==n?void 0:n.label)?a:n.value.toString(),value:t.ribbonScale.map(n.value)})),r<i.length-1){var s=i[r+1],u=ej([n.value,s.value],2),c=u[0],f=u[1],p=(c+f)/2;e.push(ek(ek({},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=ej(["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=y7(this.attributes,"tick"),a=y7(this.attributes,"label"),l=a.align,s=pS(ek({showLine:!1,showGrid:!1,showTick:void 0!==n&&n,type:"linear",startPos:[0,0],endPos:[0,0],tickDirection:"negative",labelTransform:"rotate(0)"},this.labelStyle),gt(o,"tick"),gt(a,"label"),{data:this.labelData}),u=ek(ek(ek({},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(m1.label,function(){return new g7({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=ej([0,0,0],3),u=s[0],c=(s[1],s[2]),f=null!=i?i:o;return e?(c=f,"positive"===n?"right"===a?(u=f,c=f):"bottom"===a&&(u=c):"negative"===n&&("top"===a?u=o:"left"===a&&(u=o))):"positive"===n&&("right"===a||"bottom"===a&&(u=o+l)),{offset:u,spacing:r,tickLength:c}},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=ej(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)return void this.hideIndicator();var n=this.range,r=n.min,i=n.max,o=this.ribbonBBox,a=o.x,l=o.y,s=mz(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}),pv(this.indicator.node())},e.prototype.hideIndicator=function(){pb(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,o,a,l,s,u,c,f,p,h,d,y,g,v,b,x,O,w,E=ej(this.selection,2),k=E[0],M=E[1],_=ej([t,e],2),S=_[0],P=_[1];n&&(S+=k,P+=M);var j=this.range;S=(w=ej((r=[j.min,j.max],i=[S,P],o=this.selection,void 0===a&&(a=4),u=(s=ej(r,2))[0],c=s[1],p=(f=ej(i,2))[0],h=f[1],y=(d=ej(o,2))[0],g=d[1],b=(v=ej([p,h],2))[0],O=(x=v[1])-b,(b>x&&(b=(l=ej([x,b],2))[0],x=l[1]),O>c-u)?[u,c]:b<u?y===u&&g===x?[u,x]:[u,O+u]:x>c?g===c&&y===b?[b,c]:[c-O,c]:[b,x]),2))[0],P=w[1],this.update({defaultValue:[S,P]}),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?vS((i-r)*.01,0):e},enumerable:!1,configurable:!0}),e.prototype.getTickValue=function(t){var e,n,r=this.attributes,i=r.data,o=r.block,a=this.range.min;return o?vz(i.map(function(t){return t.value}),t).tick:(n=Math.round((t-a)/(e=this.step)),a+n*e)},e.prototype.getValueByCanvasPoint=function(t,e){void 0===e&&(e=!1);var n=this.range,r=n.min,i=n.max,o=ej(this.ribbon.node().getPosition(),2),a=o[0],l=o[1],s=this.ifHorizontal(a,l),u=this.ifHorizontal.apply(this,eT([],ej(vP(t)),!1));return mz(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 a2("valuechange",{detail:{value:this.selection}});this.dispatchEvent(t)},e.prototype.dispatchIndicated=function(t,e){var n=new a2("indicate",{detail:{value:t,range:e}});this.dispatchEvent(n)},e}(pT),vV=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 vU(t){let{domain:e}=t.getOptions(),[n,r]=[e[0],ct(e)];return[n,r]}let vq=t=>{let{labelFormatter:e,layout:n,order:r,orientation:i,position:o,size:a,title:l,style:s,crossPadding:u,padding:c}=t,f=vV(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=mw(o,n),{legendContinuous:v={}}=a,b=mS(Object.assign({},v,Object.assign(Object.assign({titleText:mO(l),labelAlign:"value",labelFormatter:"string"==typeof e?t=>_D(e)(t.label):e},function(t,e,n,r,i,o){let a=mM(t,"color"),l=function(t,e,n){let{size:r}=e,i=m_(t,e,n);var o=i.orientation;return(i.size=r,"horizontal"===o||0===o)?i.height=r:i.width=r,i}(n,r,i);if(a instanceof yw){let t,{range:e}=a.getOptions(),[n,r]=vU(a);if(a instanceof y_||a instanceof yk){let t,i;return t=a.thresholds,i=t=>({value:t/r,label:String(t)}),Object.assign(Object.assign({},l),{color:e,data:[n,...t,r].map(i)})}return t=[-1/0,...a.thresholds,1/0].map((t,e)=>({value:e,label:t})),Object.assign(Object.assign({},l),{data:t,color:e,labelFilter:(e,n)=>n>0&&n<t.length-1})}return function(t,e,n,r,i,o){let a,l,{length:s}=t,u=n||r,c=i.color?o.legendContinuous.ribbonFill||"black":o.color,f=e||(a=u.getOptions(),(l=u.clone()).update(Object.assign(Object.assign({},a),{range:[ot(c).toString()]})),l),[p,h]=vU(f),[d,y]=vU([e,n,r].filter(t=>void 0!==t).find(t=>!(t instanceof yA)));return Object.assign(Object.assign({},t),{domain:[d,y],data:f.getTicks().map(t=>({value:t})),color:Array(Math.floor(s)).fill(0).map((t,e)=>{let n=(h-p)/(s-1)*e+p,i=f.map(n)||c,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,mM(t,"size"),mM(t,"opacity"),e,o)}(r,u,i,t,vq,a)),s),f)),x=new mE({style:Object.assign(Object.assign({x:p,y:h,width:d,height:y},g),{subOptions:b})});return x.appendChild(new vH({className:"legend-continuous",style:b})),x}};vq.props={defaultPosition:"top",defaultOrientation:"vertical",defaultOrder:1,defaultSize:60,defaultLength:200,defaultLegendSize:60,defaultPadding:[20,10],defaultCrossPadding:[12,12]};let vY=t=>()=>new lA;vY.props={};var vX=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 vK(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 vZ=(_u={render(t,e){let{width:n,title:r,subtitle:i,spacing:o=2,align:a="left"}=t,l=vX(t,["width","title","subtitle","spacing","align"]),s=uo(l,"title"),u=uo(l,"subtitle"),c=mx(e,".title","text").attr("className","title").call(cn,Object.assign(Object.assign(Object.assign({},vK(0,0,n,a)),{fontSize:14,textBaseline:"top",text:r}),s)).node().getLocalBounds();mx(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({},vK(0,c.max[1]+o,n,a)),{fontSize:12,textBaseline:"top",text:i}),u))})}},class extends lP{constructor(t){super(t),this.descriptor=_u}connectedCallback(){var t,e;null==(e=(t=this.descriptor).render)||e.call(t,this.attributes,this)}update(t={}){var e,n;this.attr(tW({},this.attributes,t)),null==(n=(e=this.descriptor).render)||n.call(e,this.attributes,this)}}),vQ=t=>({value:e,theme:n})=>{let{x:r,y:i,width:o,height:a}=e.bbox;return new vZ({style:tW({},n.title,Object.assign({x:r,y:i,width:o,height:a},t))})};function vJ({map:t,initKey:e},n){let r=e(n);return t.has(r)?t.get(r):n}function v0(t){return"object"==typeof t?t.valueOf():t}vQ.props={defaultPosition:"top",defaultOrder:2,defaultSize:36,defaultCrossPadding:[20,20],defaultPadding:[12,12]};class v1 extends Map{constructor(t){if(super(),this.map=new Map,this.initKey=v0,null!==t)for(const[e,n]of t)this.set(e,n)}get(t){return super.get(vJ({map:this.map,initKey:this.initKey},t))}has(t){return super.has(vJ({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 v2=Symbol("defaultUnknown");function v5(t,e,n){for(let r=0;r<e.length;r+=1)t.has(e[r])||t.set(n(e[r]),r)}function v3(t){let{value:e,from:n,to:r,mapper:i,notFoundReturn:o}=t,a=i.get(e);if(void 0===a){if(o!==v2)return o;a=n.push(e)-1,i.set(e,a)}return r[a%r.length]}function v4(t){return t instanceof Date?t=>`${t}`:"object"==typeof t?t=>JSON.stringify(t):t=>t}class v6 extends vu{getDefaultOptions(){return{domain:[],range:[],unknown:v2}}constructor(t){super(t)}map(t){return 0===this.domainIndexMap.size&&v5(this.domainIndexMap,this.getDomain(),this.domainKey),v3({value:this.domainKey(t),mapper:this.domainIndexMap,from:this.getDomain(),to:this.getRange(),notFoundReturn:this.options.unknown})}invert(t){return 0===this.rangeIndexMap.size&&v5(this.rangeIndexMap,this.getRange(),this.rangeKey),v3({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=v4(e),this.rangeKey=v4(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 v6(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 v8 extends v6{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,paddingInner:0,paddingOuter:0,padding:0,unknown:v2,flex:[]}}constructor(t){super(t)}clone(){return new v8(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,{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.length)return function(t){let e,n,{domain:r,range:i,paddingOuter:o,paddingInner:a,flex:l,round:s,align:u}=t,c=r.length,f=(e=c-l.length)>0?[...l,...Array(e).fill(1)]:e<0?l.slice(0,c):l,[p,h]=i,d=h-p,y=d/(2/c*o+1-1/c*a),g=y*a/c,v=y-c*g,b=(n=Math.min(...f),f.map(t=>t/n)),x=v/b.reduce((t,e)=>t+e),O=new v1(r.map((t,e)=>{let n=b[e]*x;return[t,s?Math.floor(n):n]})),w=new v1(r.map((t,e)=>{let n=b[e]*x+g;return[t,s?Math.floor(n):n]})),E=Array.from(w.values()).reduce((t,e)=>t+e),k=p+(d-(E-E/c*a))*u,M=s?Math.round(k):k,_=Array(c);for(let t=0;t<c;t+=1){_[t]=Math.round(1e12*M)/1e12;let e=r[t];M+=w.get(e)}return{valueBandWidth:O,valueStep:w,adjustedRange:_}}(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 v9=function(t){if("object"!=typeof t||null===t)return t;if(pM(t)){e=[];for(var e,n=0,r=t.length;n<r;n++)"object"==typeof t[n]&&null!=t[n]?e[n]=v9(t[n]):e[n]=t[n]}else for(var i in e={},t)"object"==typeof t[i]&&null!=t[i]?e[i]=v9(t[i]):e[i]=t[i];return e},v7=function(t){function e(e){var n=this,r=e.style,i=eM(e,["style"]);return(n=t.call(this,yq({},{type:"column"},ek({style:r},i)))||this).columnsGroup=new lA({name:"columns"}),n.appendChild(n.columnsGroup),n.render(),n}return eE(e,t),e.prototype.render=function(){var t=this.attributes.columns;pI(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(pS({},this.attributes,t)),this.render()},e.prototype.clear=function(){this.removeChildren()},e}(lM),bt=function(t){function e(e){var n=this,r=e.style,i=eM(e,["style"]);return(n=t.call(this,yq({},{type:"lines"},ek({style:r},i)))||this).linesGroup=n.appendChild(new lA),n.areasGroup=n.appendChild(new lA),n.render(),n}return eE(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(pS({},this.attributes,t)),this.render()},e.prototype.renderLines=function(t){pI(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){pI(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}(lM),be=function(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)},bn=function(t,e){if(t===e)return!0;if(!t||!e||pB(t)||pB(e))return!1;if(be(t)||be(e)){if(t.length!==e.length)return!1;for(var n=!0,r=0;r<t.length&&(n=bn(t[r],e[r]));r++);return n}if(pO(t)||pO(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=bn(t[i[r]],e[i[r]]));r++);return n}return!1};function br(t,e){void 0===e&&(e=!1);var n=e?t.length-1:0,r=t.map(function(t,e){return eT([e===n?"M":"L"],ej(t),!1)});return e?r.reverse():r}function bi(t,e){if(void 0===e&&(e=!1),t.length<=2)return br(t);for(var n=[],r=t.length,i=0;i<r;i+=1){var o=e?t[r-i-1]:t[i];bn(o,n.slice(-2))||n.push.apply(n,eT([],ej(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){var r,i,o,a,l,s,u=[],c=!!n,f=[1/0,1/0],p=[-1/0,-1/0];if(c){f=(r=ej(n,2))[0],p=r[1];for(var h=0,d=t.length;h<d;h+=1){var y=t[h];f=y0(f,y),p=y1(p,y)}}for(var h=0,g=t.length;h<g;h+=1){var y=t[h];if(0!==h||e)if(h!==g-1||e){i=t[[h?h-1:g-1,h-1][+!e]];var v=[0,0];v=yZ(v=yJ(o=t[e?(h+1)%g:h+1],i),.4);var b=y2(y,i),x=y2(y,o),O=b+x;0!==O&&(b/=O,x/=O);var w=yZ(v,-b),E=yZ(v,x);l=yQ(y,w),a=y0(a=yQ(y,E),y1(o,y)),w=yZ(w=yJ(a=y1(a,y0(o,y)),y),-b/x),l=y0(l=yQ(y,w),y1(i,y)),l=y1(l,y0(i,y)),E=yZ(E=yJ(y,l),x/b),a=yQ(y,E),c&&(l=y0(l=y1(l,f),p),a=y0(a=y1(a,f),p)),u.push(s),u.push(l),s=a}else l=y,u.push(s),u.push(l);else s=y}return e&&u.push(u.shift()),u}(l,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=ej(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(eT(["M"],ej(t[r-1]),!1)):a.unshift(eT(["M"],ej(t[0]),!1)),a}function bo(t,e,n){var r=v9(t);return r.push(["L",e,n],["L",0,n],["Z"]),r}var ba=function(t){if(pM(t))return t.reduce(function(t,e){return Math.min(t,e)},t[0])},bl=function(t,e){if(pM(t)){for(var n,r=1/0,i=0;i<t.length;i++){var o=t[i],a=pm(e)?e(o):o[e];a<r&&(n=o,r=a)}return n}},bs=function(t){if(pM(t))return t.reduce(function(t,e){return Math.max(t,e)},t[0])},bu=function(t,e){if(pM(t)){for(var n,r=-1/0,i=0;i<t.length;i++){var o=t[i],a=pm(e)?e(o):o[e];a>r&&(n=o,r=a)}return n}};function bc(t){return 0===t.length?[0,0]:[ba(bl(t,function(t){return ba(t)||0})),bs(bu(t,function(t){return bs(t)||0}))]}function bf(t){for(var e=v9(t),n=e[0].length,r=ej([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 bp=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 eE(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=v9(t);return gf(e[0])?[e]:e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"data",{get:function(){return this.attributes.isStack?bf(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=ej(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=y7(this.attributes,"area"),a=y7(this.attributes,"line"),l=this.containerShape.width,s=this.data;if(0===s[0].length)return{lines:[],areas:[]};var u=this.scales,c=(d=(p={type:"line",x:u.x,y:u.y}).x,v=(g=ej((y=p.y).getOptions().range||[0,0],2))[0],(b=g[1])>v&&(b=(h=ej([v,b],2))[0],v=h[1]),s.map(function(t){return t.map(function(t,e){return[d.map(e),mz(y.map(t),b,v)]})})),f=[];if(o){var p,h,d,y,g,v,b,x=this.baseline;f=r?i?function(t,e,n){for(var r=[],i=t.length-1;i>=0;i-=1){var o=t[i],a=bi(o),l=void 0;if(0===i)l=bo(a,e,n);else{var s=bi(t[i-1],!0),u=o[0];s[0][0]="L",l=eT(eT(eT([],ej(a),!1),ej(s),!1),[eT(["M"],ej(u),!1),["Z"]],!1)}r.push(l)}return r}(c,l,x):function(t,e,n){for(var r=[],i=t.length-1;i>=0;i-=1){var o=br(t[i]),a=void 0;if(0===i)a=bo(o,e,n);else{var l=br(t[i-1],!0);l[0][0]="L",a=eT(eT(eT([],ej(o),!1),ej(l),!1),[["Z"]],!1)}r.push(a)}return r}(c,l,x):c.map(function(t){return bo(i?bi(t):br(t),l,x)})}return{lines:c.map(function(e,n){return ek({stroke:t.getColor(n),path:i?bi(e):br(e)},a)}),areas:f.map(function(e,n){return ek({path:e,fill:t.getColor(n)},o)})}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"columnsStyle",{get:function(){var t=this,e=y7(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=bf(l));var s=this.createScales(l),u=s.x,c=s.y,f=ej(bc(l),2),p=f[0],h=new v_({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 ek(ek({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){(n=".container",!e.querySelector(n)?pI(e).append("rect"):pI(e).select(n)).attr("className","container").node();var n,r=t.type,i="spark".concat(r),o="line"===r?this.linesStyle:this.columnsStyle;pI(e).selectAll(".spark").data([r]).join(function(t){return t.append(function(t){return"line"===t?new bt({className:i,style:o}):new v7({className:i,style:o})}).attr("className","spark ".concat(i))},function(t){return t.update(o)},function(t){return t.remove()})},e.prototype.getColor=function(t){var e=this.attributes.color;return pM(e)?e[t%e.length]:pm(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=ej(bc(t),2),h=p[0],d=p[1],y=new v_({domain:[null!=(e=l[0])?e:h,null!=(n=l[1])?n:d],range:[f,f*(1-o)]});return"line"===i?{type:i,x:new v_({domain:[0,t[0].length-1],range:[0,c]}),y:y}:{type:i,x:new v8({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}(pT),bh=function(t){function e(e){var n=t.call(this,e,ek(ek(ek({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},gt(vL,"handle")),gt(vC,"handleIcon")),gt(vN,"handleLabel")))||this;return n.range=[0,1],n.onDragStart=function(t){return function(e){e.stopPropagation(),n.target=t,n.prevPos=n.getOrientVal(vP(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(vP(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 a2("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 eE(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=y7(this.attributes,"sparkline");return ek(ek({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=ej(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=ej(gI(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(vI.selection.class).each(function(n,r){yU(this,e[r],t)})},e.prototype.updateHandlesPosition=function(t){this.attributes.showHandle&&(this.startHandle&&yU(this.startHandle,this.getHandleStyle("start"),t),this.endHandle&&yU(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=y7(this.attributes,"track");this.trackShape=pI(t).maybeAppendByClassName(vI.track,"rect").styles(ek(ek({},this.shape),e))},e.prototype.renderBrushArea=function(t){var e=this.attributes.brushable;this.brushArea=pI(t).maybeAppendByClassName(vI.brushArea,"rect").styles(ek({fill:"transparent",cursor:e?"crosshair":"default"},this.shape))},e.prototype.renderSparkline=function(t){var e=this;pC("horizontal"===this.attributes.orientation,pI(t).maybeAppendByClassName(vI.sparklineGroup,"g"),function(t){var n=e.sparklineStyle;t.maybeAppendByClassName(vI.sparkline,function(){return new bp({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)||t.selectAll(vI.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 vF({style:e.getHandleStyle(n)})}).each(function(t){var e=t.type;this.attr("class","".concat(vI.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=pI(t).maybeAppendByClassName(vI.foreground,"g");var i=y7(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(vI.selection.class).data("value"===n?[]:this.calcSelectionArea().map(function(t,e){return{style:ek({},t),index:e,show:"select"===r?1===e:1!==e}}),function(t){return t.index}).join(function(t){return t.append("rect").attr("className",vI.selection.name).call(o).each(function(t,e){var n=this;1===e?(a.selectionShape=pI(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=ej(this.range,2),i=r[0],o=r[1],a=ej(this.getValues().map(function(t){return vS(t,e)}),2),l=a[0],s=a[1],u=ej(((Array.isArray(t)?t:[l,null!=t?t:s])||[l,s]).map(function(t){return vS(t,e)}),2),c=u[0],f=u[1];if("value"===this.attributes.type)return[0,mz(f,i,o)];c>f&&(c=(n=ej([f,c],2))[0],f=n[1]);var p=f-c;return p>o-i?[i,o]:c<i?l===i&&s===f?[i,f]:[i,p+i]:f>o?s===o&&l===c?[c,o]:[o-p,o]:[c,f]},e.prototype.calcSelectionArea=function(t){var e=ej(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=ej(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=y7(this.attributes,"handle"),s=y7(l,"label"),u=l.spacing,c=this.getHandleSize(),f=this.clampValues(),p=o("start"===t?f[0]:f[1]),h=new pN({style:ek(ek(ek({},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 b=0,x=0,O=this.availableSpace,w=O.width,E=O.height,k=this.calcSelectionArea()[1],M=k.x,_=k.y,S=k.width,P=k.height,j=u+c;if("horizontal"===i){var A=j+y/2;b="start"===t?M-j-y>0?-A:A:w-M-S-j>y?A:-A}else{var T=g+j;x="start"===t?_-c>g?-T:j:E-(_+P)-c>g?T:-j}return{x:b,y:x,text:p}},e.prototype.getHandleLabelStyle=function(t){var e=y7(this.attributes,"handleLabel");return ek(ek(ek({},e),this.calcHandleText(t)),this.inferTextStyle(t))},e.prototype.getHandleIconStyle=function(){var t=this.attributes.handleIconShape,e=y7(this.attributes,"handleIcon"),n=this.getOrientVal(["ew-resize","ns-resize"]),r=this.getHandleSize();return ek({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),ek(ek(ek(ek({},gt(this.getHandleIconStyle(),"icon")),gt(ek(ek({},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||Math.floor((this.getOrientVal([+r,+n])+4)/2.4)},e.prototype.getOrientVal=function(t){var e=ej(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=ej(this.getValues(),2),o=[i[0]+("range"===r?t:0),i[1]+e].sort();n?this.setValues(o):this.innerSetValues(o,!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 a2(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}(pT);function bd(t,e){return null==t||null==e?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function by(t,e){return null==t||null==e?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function bg(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=bd,n=(e,n)=>bd(t(e),n),r=(e,n)=>t(e)-n):(e=t===bd||t===by?t:bm,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 bm(){return 0}function bv(t){return null===t?NaN:+t}let bb=bg(bd),bx=bb.right,bO=bb.left,bw=bg(bv).center;function bE(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=bM(r[t],r[n]);if(e)return e}})):(n=t.map(n),i.sort((t,e)=>bM(n[t],n[e]))),r=t,Array.from(i,t=>r[t])}return t.sort(bk(n))}function bk(t=bd){if(t===bd)return bM;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 bM(t,e){return(null==t||!(t>=t))-(null==e||!(e>=e))||(t<e?-1:+(t>e))}function b_(t){return!!t.getBandWidth}function bS(t,e,n){var r;if(!b_(t))return t.invert(e);let{adjustedRange:i}=t,{domain:o}=t.getOptions(),a=t.getStep(),l=(r=bO(n?i:i.map(t=>t+a),e)+(n?-1:0),Math.min(o.length-1,Math.max(0,r)));return o[l]}function bP(t,e,n){if(!e)return t.getOptions().domain;if(!b_(t)){let r=bE(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 bj(t,e,n,r,i,o){let{x:a,y:l}=i,s=(t,e)=>{let[n,r]=o.invert(t);return[bS(a,n,e),bS(l,r,e)]},u=s([t,e],!0),c=s([n,r],!1);return[bP(a,[u[0],c[0]]),bP(l,[u[1],c[1]])]}function bA(t,e){let[n,r]=t;return[e.map(n),e.map(r)+(e.getStep?e.getStep():0)]}var bT=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 bC=t=>{let{orientation:e,labelFormatter:n,size:r,style:i={},position:o}=t,a=bT(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.call(s))||(t=>t+""),v="string"==typeof n?_D(n):n,b="horizontal"===e,x=eh(f)&&b,{trackSize:O=y.trackSize}=i,[w,E]=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,O);return new bh({className:"slider",style:Object.assign({},y,Object.assign(Object.assign({x:w,y:E,trackLength:b?h:d,orientation:e,formatter:t=>(v||g)(bS(s,x?1-t:t,!0)),sparklineData:function(t,e){let{markState:n}=e;return tF(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))})}};bC.props={defaultPosition:"bottom",defaultSize:24,defaultOrder:1,defaultCrossPadding:[12,12],defaultPadding:[12,12]};let bN=t=>bC(Object.assign(Object.assign({},t),{orientation:"horizontal"}));bN.props=Object.assign(Object.assign({},bC.props),{defaultPosition:"bottom"});let bL=t=>bC(Object.assign(Object.assign({},t),{orientation:"vertical"}));bL.props=Object.assign(Object.assign({},bC.props),{defaultPosition:"left"});var bI=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 a2("scroll",r)),n.dispatchEvent(new a2("valuechange",r))}},n.onTrackClick=function(t){if(n.attributes.slidable){var e=ej(n.getLocalPosition(),2),r=e[0],i=e[1],o=ej(n.padding,4),a=o[0],l=o[3],s=n.getOrientVal([r+l,i+a]),u=(n.getOrientVal(vP(t))-s)/n.trackLength;n.setValue(u,!0)}},n.onThumbMouseenter=function(t){n.dispatchEvent(new a2("thumbMouseenter",{detail:t.detail}))},n.onTrackMouseenter=function(t){n.dispatchEvent(new a2("trackMouseenter",{detail:t.detail}))},n.onThumbMouseleave=function(t){n.dispatchEvent(new a2("thumbMouseleave",{detail:t.detail}))},n.onTrackMouseleave=function(t){n.dispatchEvent(new a2("trackMouseleave",{detail:t.detail}))},n}return eE(e,t),Object.defineProperty(e.prototype,"padding",{get:function(){return gI(this.attributes.padding)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){var t=this.attributes.value,e=ej(this.range,2);return mz(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=ej(this.padding,4),r=n[0],i=n[1],o=n[2],a=n[3],l=ej(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=ej(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=y7(this.attributes,"track"),l=y7(this.attributes,"thumb"),s=ek(ek({brushable:!1,orientation:n,padding:i,selectionRadius:this.thumbRadius,showHandle:!1,slidable:o,trackLength:this.trackLength,trackRadius:this.trackRadius,trackSize:r,values:this.getValues()},gt(a,"track")),gt(l,"selection"));this.slider=pI(t).maybeAppendByClassName("scrollbar",function(){return new bh({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=ej(this.range,2),i=r[0],o=r[1];this.slider.setValues(this.getValues(mz(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}(pT),bR=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 bD=t=>{let{orientation:e,labelFormatter:n,style:r}=t,i=bR(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 bI({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}))})}};bD.props={defaultPosition:"bottom",defaultSize:24,defaultOrder:1,defaultCrossPadding:[12,12],defaultPadding:[12,12]};let bF=t=>bD(Object.assign(Object.assign({},t),{orientation:"horizontal"}));bF.props=Object.assign(Object.assign({},bD.props),{defaultPosition:"bottom"});let bz=t=>bD(Object.assign(Object.assign({},t),{orientation:"vertical"}));bz.props=Object.assign(Object.assign({},bD.props),{defaultPosition:"left"});let bB=(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]=eh(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))}},bW=(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]=eh(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))}},b$=(t,e)=>{let{coordinate:n}=e;return l_({name:"scaleInYRadius",inherits:!1,initialValue:"",interpolable:!0,syntax:_M.NUMBER}),(e,r,i)=>{let[o]=e;return ed(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=ca(n,f,[p,h]),{innerRadius:y,outerRadius:g}=d,v=ep().cornerRadius(a).padAngle(l*Math.PI/180),b=new lL({}),x=n.getCenter(),O=t=>{b.attr({d:v(t),transform:`translate(${x[0]}, ${x[1]})`});let e=oC(b);return b.style.transform="",e},w=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 w.onframe=function(){e.style.path=O(Object.assign(Object.assign({},d),{outerRadius:Number(e.style.scaleInYRadius)}))},w.onfinish=function(){e.style.path=O(Object.assign(Object.assign({},d),{outerRadius:g}))},w})(o):(e=>{let{style:r}=e,{transform:o="",fillOpacity:a=1,strokeOpacity:l=1,opacity:s=1}=r,[u,c]=eh(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)}},bG=(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]=eh(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))}},bH=(t,e)=>{l_({name:"waveInArcAngle",inherits:!1,initialValue:"",interpolable:!0,syntax:_M.NUMBER});let{coordinate:n}=e;return(r,i,o)=>{let[a]=r;if(!ed(n))return bB(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,b=ep().cornerRadius(c).padAngle(f*Math.PI/180),x=ca(n,y,[g,v]),{startAngle:O,endAngle:w}=x,E=new lL({}),k=t=>{E.attr({d:b(t),transform:`translate(${l[0]}, ${l[1]})`});let e=oC(E);return E.style.transform="",e},M=a.animate([{waveInArcAngle:O+1e-4,fillOpacity:0,strokeOpacity:0,opacity:0},{waveInArcAngle:O+1e-4,fillOpacity:p,strokeOpacity:h,opacity:d,offset:.01},{waveInArcAngle:w,fillOpacity:p,strokeOpacity:h,opacity:d}],Object.assign(Object.assign({},o),t));return M.onframe=function(){a.style.path=k(Object.assign(Object.assign({},x),{endAngle:Number(a.style.waveInArcAngle)}))},M.onfinish=function(){a.style.path=k(Object.assign(Object.assign({},x),{endAngle:w}))},M}};bH.props={};let bV=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))};bV.props={};let bU=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))};bU.props={};let bq=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))},bY=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))},bX=t=>(e,n,r)=>{var i;let[o]=e,a=(null==(i=o.getTotalLength)?void 0:i.call(o))||0;return o.animate([{lineDash:[0,a]},{lineDash:[a,0]}],Object.assign(Object.assign({},r),t))};function bK(t,e){let n={};for(let r of e){let e=t.style[r];e&&(n[r]=e)}return n}bX.props={};let bZ=["fill","stroke","fillOpacity","strokeOpacity","opacity","lineWidth"];function bQ(t){let{min:e,max:n}=t.getLocalBounds(),[r,i]=e,[o,a]=n;return[r,i,o-r,a-i]}function bJ(t,e){let[n,r,i,o]=bQ(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 b0(t,e){t.__data__=e.__data__,t.className=e.className,t.markType=e.markType,e.parentNode.replaceChild(t,e)}function b1(t,e){return t.indexOf(e)===t.lastIndexOf(e)}function b2(t){let e=oC(t);if(e&&!(!b1(e,"m")||!b1(e,"M")))return e}function b5(t,e,n,r){let{nodeName:i}=e,{nodeName:o}=n,a=b2(e),l=b2(n),s=void 0===a||void 0===l;if(i===o&&"path"!==i||s)return function(t,e,n){let[r,i,o,a]=bQ(t),{transform:l}=t.style,{transform:s}=e.style;b0(e,t);let[u,c,f,p]=bQ(e),h=[Object.assign({transform:`${l?l+" ":""}translate(${r-u}, ${i-c}) scale(${o/f}, ${a/p})`},bK(t,bZ)),Object.assign({transform:`${s?s+" ":""}translate(0, 0) scale(1, 1)`},bK(e,bZ))];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 lL({style:Object.assign(Object.assign({},bK(t,bZ)),{d:e})});return b0(r,t),r}(t,a),c=[Object.assign({path:a},bK(e,bZ)),Object.assign({path:l},bK(n,bZ))],f=u.animate(c,r);return f.onfinish=()=>{u.style.transform="none",ur(u,n)},u.style.transform="none",f}let b3=t=>(e,n,r)=>{let i=function(t="pack"){return"function"==typeof t?t:bJ}(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 b5(t,t,r,o)}if(1===a&&l>1){let t,[r]=e;return r.style.visibility="hidden",t=i(r,n.length),n.map((e,n)=>b5(e,new lL({style:Object.assign({path:t[n]},bK(r,bZ))}),e,o))}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)=>b5(t,t,new lL({style:{path:i[r],fill:e.style.fill}}),n)),s]}(e,t,o,i)}return null};b3.props={};let b4=(t,e)=>(n,r,i)=>{let[o]=n,{height:a,width:l}=o.getBoundingClientRect(),s=new lL({style:{path:`M0,0L${l},0L${l},${a}L0,${a}Z`}});return o.appendChild(s),o.style.clipPath=s,bB(t,e)([s],r,i)};b4.props={};let b6=(t,e)=>(n,r,i)=>{let[o]=n,{height:a,width:l}=o.getBoundingClientRect(),s=new lL({style:{path:`M0,0L${l},0L${l},${a}L0,${a}Z`}});return o.appendChild(s),o.style.clipPath=s,b$(t,e)([s],r,i)};b6.props={};let b8="main-layer",b9="label-layer",b7="element",xt="component",xe={visibility:"visible",opacity:1,fillOpacity:1,strokeOpacity:1};function xn(t,e,n,r){t.style[e]=n,r&&t.children.forEach(t=>xn(t,e,n,r))}function xr(t){xn(t,"visibility","hidden",!0)}function xi(t){xn(t,"visibility","visible",!0)}var xo=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 xa(t){return uf(t).selectAll(`.${b7}`).nodes().filter(t=>!t.__removed__)}function xl(t,e){return xs(t,e).flatMap(({container:t})=>xa(t))}function xs(t,e){return e.filter(e=>e!==t&&e.options.parentKey===t.options.key)}function xu(t){return uf(t).select(".plot").node()}function xc(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 xf(t,e){let{offsetX:n,offsetY:r}=e,{min:[i,o],max:[a,l]}=xc(t);return n<i||n>a||r<o||r>l?null:[n-i,r-o]}function xp(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 xh(t){return t=>t.__data__.color}function xd(t){return t=>t.__data__.x}function xy(t){let e=new Map((Array.isArray(t)?t:[t]).flatMap(t=>Array.from(t.markState.keys()).map(e=>[xm(t.key,e.key),e.data])));return t=>{let{index:n,markKey:r,viewKey:i}=t.__data__;return e.get(xm(i,r))[n]}}function xg(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])?n:xe[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 xm(t,e){return`${t},${e}`}function xv(t,e){let n=(Array.isArray(t)?t:[t]).flatMap(t=>t.marks.map(e=>[xm(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!==xm(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 xb(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 xx(t){var{link:e=!1,valueof:n=(t,e)=>t,coordinate:r}=t,i=xo(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=bE(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=ei(),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=u9(i,t=>n(t,s)),{fill:y=s.getAttribute("fill")}=d,g=xo(d,["fill"]),v=new lL({className:"element-link",style:Object.assign({d:l.toString(),fill:y,zIndex:-2},g)});null==(e=s.link)||e.remove(),s.parentNode.appendChild(v),s.link=v}},t=>{var e;null==(e=t.link)||e.remove(),t.link=null}]}function xO(t,e,n){let r=e=>{let{transform:n}=t.style;return n?`${n} ${e}`:e};if(ed(n)){let{points:i}=t.__data__,[o,a]=eh(n)?co(i):i,l=n.getCenter(),s=uh(o,l),u=uh(a,l),c=uy(s)+um(s,u)/2,f=e*Math.cos(c),p=e*Math.sin(c);return r(`translate(${f}, ${p})`)}return r(eh(n)?`translate(${e}, 0)`:`translate(0, ${-e})`)}function xw(t){var{document:e,background:n,scale:r,coordinate:i,valueof:o}=t,a=xo(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]};return[t=>{t.background&&t.background.remove();let n=u9(a,e=>o(e,t)),{fill:u="#CCD6EC",fillOpacity:c=.3,zIndex:f=-2,padding:p=.001,strokeWidth:h=0}=n,d=Object.assign(Object.assign({},xo(n,["fill","fillOpacity","zIndex","padding","strokeWidth"])),{fill:u,fillOpacity:c,zIndex:f,padding:p,strokeWidth:h}),y=((()=>{let{x:t,y:e}=r;return[t,e].some(b_)})()?(t,n)=>{let{padding:o}=n,[a,l]=((t,e)=>{let{x:n}=r;if(!b_(n))return[0,1];let{__data__:i}=t,{x:o}=i,[a,l]=s(n,o,e);return[a,l]})(t,o),[u,c]=((t,e)=>{let{y:n}=r;if(!b_(n))return[0,1];let{__data__:i}=t,{y:o}=i,[a,l]=s(n,o,e);return[a,l]})(t,o),f=[[a,u],[l,u],[l,c],[a,c]].map(t=>i.map(t)),{__data__:p}=t,{y:h,y1:d}=p;return cf(e,f,{y:h,y1:d},i,n)}:(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},xo(e,["transform","transformOrigin","stroke"])),a=t.cloneNode(!0);for(let[t,e]of Object.entries(o))a.style[t]=e;return a})(t,d);y.className=l,t.parentNode.parentNode.appendChild(y),t.background=y},t=>{var e;null==(e=t.background)||e.remove(),t.background=null},t=>t.className===l]}function xE(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 xk(t,e,n){return t.find(t=>Object.entries(e).every(([e,r])=>n(t)[e]===r))}var xM=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 x_(t){var{delay:e,createGroup:n,background:r=!1,link:i=!1}=t,o=xM(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,h=e(t),d=new Set(h),y=s1(h,r),g=xb(h,n),[v,b]=xx(Object.assign({elements:h,valueof:g,link:i,coordinate:s},uo(c.active,"link"))),[x,O,w]=xw(Object.assign({document:t.ownerDocument,scale:l,coordinate:s,background:o,valueof:g},uo(c.active,"background"))),{setState:E,removeState:k,hasState:M}=xg(tW(c,{active:Object.assign({},(null==(f=c.active)?void 0:f.offset)&&{transform:(...t)=>{let e=c.active.offset(...t),[,n]=t;return xO(h[n],e,s)}})}),g),_=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)?M(t,"active")||E(t,"active"):(E(t,"inactive"),b(t)),t!==e&&O(t);x(e),v(a),i&&u.emit("element:highlight",{nativeEvent:i,data:{data:n(e),group:a.map(n)}})},S=(t=!0)=>{for(let t of h)k(t,"active","inactive"),O(t),b(t);t&&u.emit("element:unhighlight",{nativeEvent:t})},P=t=>{let{target:e}=t;o&&!w(e)||(o||d.has(e))&&(a>0?(p&&clearTimeout(p),p=setTimeout(()=>{S(),p=null},a)):S())},j=()=>{S()};t.addEventListener("pointerover",_),t.addEventListener("pointerout",P),t.addEventListener("pointerleave",j);let A=t=>{let{nativeEvent:e}=t;e||S(!1)},T=t=>{let{nativeEvent:e}=t;if(e)return;let{data:r}=t.data,i=xk(h,r,n);i&&_({target:i,nativeEvent:!1})};return u.on("element:highlight",T),u.on("element:unhighlight",A),()=>{for(let e of(t.removeEventListener("pointerover",_),t.removeEventListener("pointerout",P),t.removeEventListener("pointerleave",j),u.off("element:highlight",T),u.off("element:unhighlight",A),h))O(e),b(e)}}(xu(s),Object.assign({elements:xa,datum:xy(u),groupKey:n?n(u):void 0,coordinate:p,scale:f,state:xv(c,[["active",r?{}:{lineWidth:"1",stroke:"#000"}],"inactive"]),background:r,link:i,delay:e,emitter:l},o))}}function xS(t){return x_(Object.assign(Object.assign({},t),{createGroup:xd}))}function xP(t){return x_(Object.assign(Object.assign({},t),{createGroup:xh}))}x_.props={reapplyWhenUpdate:!0},xS.props={reapplyWhenUpdate:!0},xP.props={reapplyWhenUpdate:!0};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};function xA(t){var{createGroup:e,background:n=!1,link:r=!1}=t,i=xj(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=s1(p,r),y=xb(p,n),[g,v]=xx(Object.assign({link:i,elements:p,valueof:y,coordinate:a},uo(c.selected,"link"))),[b,x]=xw(Object.assign({document:t.ownerDocument,background:l,coordinate:a,scale:s,valueof:y},uo(c.selected,"background"))),{setState:O,removeState:w,hasState:E}=xg(tW(c,{selected:Object.assign({},(null==(f=c.selected)?void 0:f.offset)&&{transform:(...t)=>{let e=c.selected.offset(...t),[,n]=t;return xO(p[n],e,a)}})}),y),k=(t=!0)=>{for(let t of p)w(t,"selected","unselected"),v(t),x(t);t&&u.emit("element:unselect",{nativeEvent:!0})},M=t=>{let{target:e,nativeEvent:a=!0}=t;return h.has(e)?o?((t,e,i=!0)=>{if(E(e,"selected"))k();else{let o=r(e),a=d.get(o),l=new Set(a);for(let t of p)l.has(t)?O(t,"selected"):(O(t,"unselected"),v(t)),t!==e&&x(t);if(g(a),b(e),!i)return;u.emit("element:select",Object.assign(Object.assign({},t),{nativeEvent:i,data:{data:[n(e),...a.map(n)]}}))}})(t,e,a):((t,e,o=!0)=>{let a=r(e),l=d.get(a),s=new Set(l);if(E(e,"selected")){if(!p.some(t=>!s.has(t)&&E(t,"selected")))return k();for(let t of l)O(t,"unselected"),v(t),x(t)}else{let t=l.some(t=>E(t,"selected"));for(let t of p)s.has(t)?O(t,"selected"):E(t,"selected")||O(t,"unselected");!t&&i&&g(l),b(e)}o&&u.emit("element:select",Object.assign(Object.assign({},t),{nativeEvent:o,data:{data:p.filter(t=>E(t,"selected")).map(n)}}))})(t,e,a):k()};t.addEventListener("click",M);let _=t=>{let{nativeEvent:e,data:r}=t;if(!e)for(let t of o?r.data.slice(0,1):r.data)M({target:xk(p,t,n),nativeEvent:!1})},S=()=>{k(!1)};return u.on("element:select",_),u.on("element:unselect",S),()=>{for(let t of p)v(t);t.removeEventListener("click",M),u.off("element:select",_),u.off("element:unselect",S)}}(xu(l),Object.assign({elements:xa,datum:xy(s),groupKey:e?e(s):void 0,coordinate:c,scale:f,state:xv(u,[["selected",n?{}:{lineWidth:"1",stroke:"#000"}],"unselected"]),background:n,link:r,emitter:a},i))}}function xT(t){return xA(Object.assign(Object.assign({},t),{createGroup:xd}))}function xC(t){return xA(Object.assign(Object.assign({},t),{createGroup:xh}))}xA.props={reapplyWhenUpdate:!0},xT.props={reapplyWhenUpdate:!0},xC.props={reapplyWhenUpdate:!0};var xN=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 xL({wait:t=30,leading:e,trailing:n=!1}){return r=>{let{options:i,update:o,setState:a,container:l}=r,s=xu(l),u=xN(t=>{let e=xf(s,t);if(!e){a("fisheye"),o();return}a("fisheye",t=>{let n=tW({},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 xI=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 xR(t){var{wait:e=20,leading:n,trailing:r=!1,labelFormatter:i=t=>`${t}`}=t,o=xI(t,["wait","leading","trailing","labelFormatter"]);return t=>{let a,{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,b=y.map((t,e)=>e),x=bE(b.map(t=>g[t])),O=xu(s),w=s.getElementsByClassName(b7),E=s1(s.getElementsByClassName("label"),t=>t.__data__.key.split("-")[0]),k=new lN({style:Object.assign({x1:0,y1:0,x2:0,y2:O.getAttribute("height"),stroke:"black",lineWidth:1},uo(o,"rule"))}),M=new lF({style:Object.assign({x:0,y:O.getAttribute("height"),text:"",fontSize:10},uo(o,"label"))});k.append(M),O.appendChild(k);let _=(t,e,n)=>{let[r]=t.invert(n);return x[bw(x,e.invert(r))]},S=(t,e)=>{k.setAttribute("x1",t[0]),k.setAttribute("x2",t[0]),M.setAttribute("text",i(e))},P=t=>{var e,n,r,i;return e=this,n=void 0,r=void 0,i=function*(){let{x:e}=p,n=_(h,e,t);S(t,n),c("chartIndex",t=>{let e=tW({},t),r=e.marks.find(t=>"line"===t.type),i=dc(s5(b,t=>dc(t,t=>+y[t])/du(t,t=>+y[t]),t=>v[t]).values());tW(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[bg(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())})},j=xN(t=>{let e=xf(O,t);e&&(t=>{let{scale:e,coordinate:n}=a,{x:r,y:i}=e,o=_(n,r,t);for(let e of(S(t,o),w)){let{seriesIndex:t,key:r}=e.__data__,a=t[bg(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)}})(e)},e,{leading:n,trailing:r});return P([0,0]),O.addEventListener("pointerenter",j),O.addEventListener("pointermove",j),O.addEventListener("pointerleave",j),()=>{k.remove(),O.removeEventListener("pointerenter",j),O.removeEventListener("pointermove",j),O.removeEventListener("pointerleave",j)}}}function xD(t,e){let n=0,r=0;if(void 0===e)for(let e of t)null!=e&&(e*=1)>=e&&(++n,r+=e);else{let i=-1;for(let o of t)null!=(o=e(o,++i,t))&&(o*=1)>=o&&(++n,r+=o)}if(n)return r/n}function xF(t,e){let n,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 xz(t){var e=document.createElement("div");e.innerHTML=t;var n=e.childNodes[0];return n&&e.contains(n)&&e.removeChild(n),n}function xB(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")}}xR.props={reapplyWhenUpdate:!0};var xW={overflow:"hidden","white-space":"nowrap","text-overflow":"ellipsis"},x$=function(t){function e(e){var n,r,i,o,a,l=this,s=null==(a=null==(o=e.style)?void 0:o.template)?void 0:a.prefixCls,u=xB(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=xB(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)]=ek({flex:1},xW),r[".".concat(i.VALUE)]=ek({display:"inline-block",float:"right",flex:1,"text-align":"right","min-width":"28px","margin-left":"30px",color:"rgba(0, 0, 0, 0.85)"},xW),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 eE(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=t.name,o=t.color,a=t.index,l=eM(t,["name","color","index"]),s=ek({name:void 0===i?"":i,color:void 0===o?"black":o,index:null!=a?a:e},l);return xz((r=n.item,r&&s?r.replace(/\\?\{([^{}]+)\}/g,function(t,e){return"\\"===t.charAt(0)?t.slice(1):void 0===s[e]?"":s[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)||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=xz(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=xB(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[0])||e.remove();var c=this.HTMLTooltipItemsElements,f=document.createElement("ul");f.className=s.LIST,f.replaceChildren.apply(f,eT([],ej(c),!1));var p=this.element.querySelector(".".concat(s.LIST));p?p.replaceWith(f):u.appendChild(f)}Object.entries(a).forEach(function(t){var e=ej(t,2),n=e[0],r=e[1];eT([u],ej(u.querySelectorAll(n)),!1).filter(function(t){return t.matches(n)}).forEach(function(t){t&&(t.style.cssText+=Object.entries(r).reduce(function(t,e){return"".concat(t).concat(e.join(":"),";")},""))})})},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=ej(u,2),n=e[0],i=e[1],a=ej(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=ej(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=ej(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=ej([+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,b={left:h<g,right:h+c>g+l.width,top:d<v,bottom:d+f>v+l.height},x=[];s.split("-").forEach(function(t){b[t]?x.push(y[t]):x.push(t)});var O=x.join("-");return this.getRelativeOffsetFromCursor(O)},e.prototype.isCursorEntered=function(t,e){if(this.element){var n=this.element.getBoundingClientRect();return new g2(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}(pT);let xG={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 xH(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 xV(t,e){if(e(t))return t;let n=t.parent;for(;n&&!e(n);)n=n.parent;return n}function xU(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=xV(o,t=>"element"===t.className),s=xV(o,t=>"component"===t.className),u=xV(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:xH(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 xq(){return(t,e,n)=>{let{container:r,view:i}=t,o=xU(xG.CLICK,i,n,t=>1===t.detail),a=xU(xG.DBLCLICK,i,n,t=>2===t.detail),l=xU(xG.POINTER_TAP,i,n),s=xU(xG.POINTER_DOWN,i,n),u=xU(xG.POINTER_UP,i,n),c=xU(xG.POINTER_OVER,i,n),f=xU(xG.POINTER_OUT,i,n),p=xU(xG.POINTER_MOVE,i,n),h=xU(xG.POINTER_ENTER,i,n),d=xU(xG.POINTER_LEAVE,i,n),y=xU(xG.POINTER_UPOUTSIDE,i,n),g=xU(xG.DRAG_START,i,n),v=xU(xG.DRAG,i,n),b=xU(xG.DRAG_END,i,n),x=xU(xG.DRAG_ENTER,i,n),O=xU(xG.DRAG_LEAVE,i,n),w=xU(xG.DRAG_OVER,i,n),E=xU(xG.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",b),r.addEventListener("dragenter",x),r.addEventListener("dragleave",O),r.addEventListener("dragover",w),r.addEventListener("drop",E),()=>{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",b),r.removeEventListener("dragenter",x),r.removeEventListener("dragleave",O),r.removeEventListener("dragover",w),r.removeEventListener("drop",E)}}}xq.props={reapplyWhenUpdate:!0};var xY=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 xX(t,e){return e?"string"==typeof e?document.querySelector(e):e:t.ownerDocument.defaultView.getContextService().getDomElement().parentElement}function xK({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,h,d=xX(t,c),y=xX(t),g=a?y:t,v=f||function(t){let{min:[e,n],max:[r,i]}=t.getRenderBounds();return{x:e,y:n,width:r-e,height:i-n}}(t),b=(p=y.getBoundingClientRect(),h=d.getBoundingClientRect(),{x:p.x-h.x,y:p.y-h.y}),{tooltipElement:x=function(t,e,n,r,i,o,a,l={}){let s=new x$({className:"tooltip",style:{x:e,y:n,container:a,data:[],bounding:o,position:r,enterable:i,title:"",offset:[10,10],template:{prefixCls:"g2-"},style:tW({".g2-tooltip":{},".g2-tooltip-title":{overflow:"hidden","white-space":"nowrap","text-overflow":"ellipsis"}},l)}});return t.appendChild(s.HTMLTooltipElement),s}(d,n,r,l,s,v,b,u)}=g,{items:O,title:w=""}=e;x.update(Object.assign({x:n,y:r,data:O,title:w,position:l,enterable:s},void 0!==i&&{content:i(o,{items:O,title:w})})),g.tooltipElement=x}function xZ({root:t,single:e,emitter:n,nativeEvent:r=!0,event:i=null}){r&&n.emit("tooltip:hide",{nativeEvent:r});let o=xX(t),{tooltipElement:a}=e?o:t;a&&a.hide(null==i?void 0:i.clientX,null==i?void 0:i.clientY)}function xQ({root:t,single:e}){let n=xX(t),r=e?n:t;if(!r)return;let{tooltipElement:i}=r;i&&(i.destroy(),r.tooltipElement=void 0)}function xJ(t){let{value:e}=t;return Object.assign(Object.assign({},t),{value:void 0===e?"undefined":e})}function x0(t){let e=t.getAttribute("fill"),n=t.getAttribute("stroke"),{__data__:r}=t,{color:i=e&&"transparent"!==e?e:n}=r;return i}function x1(t,e=t=>t){return Array.from(new Map(t.map(t=>[e(t),t])).values())}function x2(t,e,n,r=t.map(t=>t.__data__),i={}){let o=t=>t instanceof Date?+t:t,a=x1(r.map(t=>t.title),o).filter(ui),l=r.flatMap((r,o)=>{let a=t[o],{items:l=[],title:s}=r,u=l.filter(ui),c=void 0!==n?n:l.length<=1;return u.map(t=>{var{color:n=x0(a)||i.color,name:o}=t,l=xY(t,["color","name"]);let u=function(t,e){let{color:n,series:r,facet:i=!1}=t,{color:o,series:a}=e,l=t=>t&&t.invert&&!(t instanceof dA)&&!(t instanceof yA);if(l(r))return r.clone().invert(a);if(a&&r instanceof dA&&r.invert(a)!==o&&!i)return r.invert(a);if(l(n)){let t=n.invert(o);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(xJ);return Object.assign(Object.assign({},a.length>0&&{title:a.join(",")}),{items:x1(l,t=>`(${o(t.name)}, ${o(t.value)}, ${o(t.color)})`)})}function x5(t){t.ruleY&&(t.ruleY.remove(),t.ruleY=void 0)}function x3(t){t.markers&&(t.markers.forEach(t=>t.remove()),t.markers=[])}function x4(t,e){return Array.from(t.values()).some(t=>{var n;return null==(n=t.interaction)?void 0:n[e]})}function x6(t,e){return void 0===t?e:t}function x8(t){let{title:e,items:n}=t;return 0===n.length&&void 0===e}function x9(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:b,enterable:x,mount:O,bounding:w,theme:E,disableNative:k=!1,marker:M=!0,preserve:_=!1,style:S={},css:P={}}=e,j=xY(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 A=n(t),T=eh(a),C=ed(a),N=tW(S,j),{innerWidth:L,innerHeight:I,width:R,height:D,insetLeft:F,insetTop:z}=a.getOptions(),B=[],W=[];for(let t of A){let{__data__:e}=t,{seriesX:n,title:r,items:i}=e;n?B.push(t):(r||i)&&W.push(t)}let $=!!(T?o.y:o.x).getBandWidth&&W.length>0;B.sort((t,e)=>{let n=+!T,r=t=>t.getBounds().min[n];return T?r(e)-r(t):r(t)-r(e)});let G=t=>{let e=+!!T,{min:n,max:r}=t.getLocalBounds();return bE([n[e],r[e]])};W.sort((t,e)=>{let[n,r]=G(t),[i,o]=G(e),a=(n+r)/2,l=(i+o)/2;return T?l-a:a-l});let H=new Map(B.map(t=>{let{__data__:e}=t,{seriesX:n}=e;return[t,[bE(n.map((t,e)=>e),t=>n[+t]),n]]})),{x:V}=o,U=(null==V?void 0:V.getBandWidth)?V.getBandWidth()/2:0,q=t=>{let[e]=a.invert(t);return e-U},Y=(t,e,n)=>{let r=q(t),i=n.filter(ui),[o,a]=bE([i[0],i[i.length-1]]);if(!$&&(r<o||r>a)&&o!==a)return null;let l=(0,bg(t=>n[+t]).center)(e,r);return e[l]},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[s9(t.replace("series","")),r]}))},K=xN(e=>{let n=xf(t,e);if(!n)return;let f=xc(t),p=f.min[0],h=f.min[1],k=[n[0]-d,n[1]-y];if(!k)return;let _=((t,e)=>{let n=t[+!!T],r=e.filter(t=>{let[e,r]=G(t);return n>=e&&n<=r});if(!$||r.length>0)return r;let i=(0,bg(t=>{let[e,n]=G(t);return(e+n)/2}).center)(e,n);return[e[i]].filter(ui)})(k,W),S=[],j=[];for(let t of B){let[e,n]=H.get(t),r=Y(k,e,n);if(null!==r){S.push(t);let e=X(t,r),{x:n,y:i}=e,o=a.map([(n||0)+U,i||0]);j.push([Object.assign(Object.assign({},e),{element:t}),o])}}let A=Array.from(new Set(j.map(t=>t[0].x))),V=A[xF(A,t=>Math.abs(t-q(k)))],K=j.filter(t=>t[0].x===V),Q=[...K.map(t=>t[0]),..._.map(t=>t.__data__)],J=[...S,..._],tt=x2(J,o,u,Q,E);(r&&tt.items.sort((t,e)=>r(t)-r(e)),i&&(tt.items=tt.items.filter(i)),0===J.length||x8(tt))?Z(e):(g&&xK({root:t,data:tt,x:n[0]+p,y:n[1]+h,render:s,event:e,single:v,position:b,enterable:x,mount:O,bounding:w,css:P}),l&&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},xY(n,["plotWidth","plotHeight","mainWidth","mainHeight","startX","startY","transposed","polar","insetLeft","insetTop"])),d=e.map(t=>t[1]),y=e.map(t=>t[0]),g=xD(d),v=xD(y),[b,x,O,w]=(()=>{if(c){let t=Math.min(o,a)/2,e=l+f+o/2,n=s+p+a/2,r=uy(uh([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,n=t.ruleY||(e=new lN({style:Object.assign({x1:b,x2:x,y1:O,y2:w},h)}),t.appendChild(e),e);n.style.x1=b,n.style.x2=x,n.style.y1=O,n.style.y2=w,t.ruleY=n}}(t,K.map(t=>t[1]),Object.assign(Object.assign({},uo(N,"crosshairs")),{plotWidth:L,plotHeight:I,mainWidth:R,mainHeight:D,insetLeft:F,insetTop:z,startX:d,startY:y,transposed:T,polar:C})),M&&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 ui(e)&&ui(n)}).map(t=>{let[{color:e,element:i},o]=t,a=e||i.style.fill||i.style.stroke||r.color;return new lS({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:K,style:uo(N,"marker"),theme:E}),c.emit("tooltip:show",Object.assign(Object.assign({},e),{nativeEvent:!0,data:{data:{x:bS(o.x,q(k),!0)}}})))},f,{leading:p,trailing:h}),Z=e=>{xZ({root:t,single:v,emitter:c,event:e}),l&&x5(t),M&&x3(t)},Q=()=>{xQ({root:t,single:v}),l&&x5(t),M&&x3(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=()=>{xZ({root:t,single:v,emitter:c,nativeEvent:!1})},te=()=>{ti(),Q()},tn=()=>{tr()},tr=()=>{k||(t.addEventListener("pointerenter",K),t.addEventListener("pointermove",K),t.addEventListener("pointerleave",Z))},ti=()=>{k||(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),_?xZ({root:t,single:v,emitter:c,nativeEvent:!1}):Q()}}function x7(t){let{shared:e,crosshairs:n,series:r,name:i,item:o=()=>({}),facet:a=!1}=t,l=xY(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=x4(p,"seriesTooltip"),g=x4(p,"crosshairs"),v=xu(u),b=x6(r,y);if(b&&Array.from(p.values()).some(t=>{var e;return(null==(e=t.interaction)?void 0:e.seriesTooltip)&&t.tooltip})&&!a)return x9(v,Object.assign(Object.assign({},l),{theme:d,elements:xa,scale:f,coordinate:h,crosshairs:x6(n,g),item:o,emitter:s}));if(b&&a){let e=i.filter(e=>e!==t&&e.options.parentKey===t.options.key),r=xl(t,i),a=e[0].view.scale,u=v.getBounds(),c=u.min[0],f=u.min[1];return Object.assign(a,{facet:!0}),x9(v.parentNode.parentNode,Object.assign(Object.assign({},l),{theme:d,elements:()=>r,scale:a,coordinate:h,crosshairs:x6(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:b,theme:x,shared:O=!1,body:w=!0,disableNative:E=!1,preserve:k=!1,css:M={}}){let _=e(t),S=new Set(_),P=s1(_,f),j=xN(e=>{let{target:s}=e;if(!S.has(s))return void xZ({root:t,single:p,emitter:l,event:e});let u=f(s),c=P.get(u),y=1!==c.length||O?x2(c,n,i,void 0,x):function(t){let{__data__:e}=t,{title:n,items:r=[]}=e,i=r.filter(ui).map(e=>{var{color:n=x0(t)}=e;return Object.assign(Object.assign({},xY(e,["color"])),{color:n})}).map(xJ);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)),x8(y))return void xZ({root:t,single:p,emitter:l,event:e});let{offsetX:E,offsetY:k}=e;w&&xK({root:t,data:y,x:E,y:k,render:r,event:e,single:p,position:h,enterable:d,mount:v,bounding:b,css:M}),l.emit("tooltip:show",Object.assign(Object.assign({},e),{nativeEvent:!0,data:{data:xH(s,g)}}))},s,{leading:u,trailing:c}),A=e=>{xZ({root:t,single:p,emitter:l,event:e})},T=()=>{E||(t.addEventListener("pointermove",j),t.addEventListener("pointerleave",A))},C=()=>{E||(t.removeEventListener("pointermove",j),t.removeEventListener("pointerleave",A))},N=({nativeEvent:t,data:e})=>{if(t)return;let n=xk(_,e.data,y);if(!n)return;let{x:r,y:i,width:o,height:a}=n.getBBox();j({target:n,offsetX:r+o/2,offsetY:i+a/2})},L=({nativeEvent:e}={})=>{e||xZ({root:t,single:p,emitter:l,nativeEvent:!1})};return l.on("tooltip:show",N),l.on("tooltip:hide",L),l.on("tooltip:enable",()=>{T()}),l.on("tooltip:disable",()=>{C(),xQ({root:t,single:p})}),T(),()=>{C(),l.off("tooltip:show",N),l.off("tooltip:hide",L),k?xZ({root:t,single:p,emitter:l,nativeEvent:!1}):xQ({root:t,single:p})}}(v,Object.assign(Object.assign({},l),{datum:xy(c),elements:xa,scale:f,coordinate:h,groupKey:e?xd(c):void 0,item:o,emitter:s,view:c,theme:d,shared:e}))}}x7.props={reapplyWhenUpdate:!0};var Ot=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 Oe="legend-category";function On(t){return t.getElementsByClassName("legend-category-item-marker")[0]}function Or(t){return t.getElementsByClassName("legend-category-item-label")[0]}function Oi(t){return t.getElementsByClassName("items-item")}function Oo(t){return t.getElementsByClassName(Oe)}function Oa(t){return t.getElementsByClassName("legend-continuous")}function Ol(t){let e=t.parentNode;for(;e&&!e.__data__;)e=e.parentNode;return e.__data__}function Os(t,{legend:e,channel:n,value:r,ordinal:i,channels:o,allChannels:a,facet:l=!1}){return Ot(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}}),tW({},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 Ou(t,e){for(let n of t)Os(n,Object.assign(Object.assign({},e),{facet:!0}))}function Oc(){return(t,e,n)=>{let{container:r}=t,i=e.filter(e=>e!==t),o=i.length>0,a=t=>Ol(t).scales.map(t=>t.name),l=[...Oo(r),...Oa(r)],s=l.flatMap(a),u=o?xN(Ou,50,{trailing:!0}):xN(Os,50,{trailing:!0}),c=l.map(e=>{let{name:l,domain:c}=Ol(e).scales[0],f=a(e),p={legend:e,channel:l,channels:f,allChannels:s};return e.className===Oe?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:uo(p,"marker")},d={unselected:uo(p,"label")},{setState:y,removeState:g}=xg(h,void 0),{setState:v,removeState:b}=xg(d,void 0),x=Array.from(e(t)),O=x.map(i),w=()=>{for(let t of x){let e=i(t),o=n(t),a=r(t);O.includes(e)?(g(o,"unselected"),b(a,"unselected")):(y(o,"unselected"),v(a,"unselected"))}};for(let e of x){let n=()=>{xE(t,"pointer")},r=()=>{xE(t,t.cursor)},s=t=>Ot(this,void 0,void 0,function*(){let n=i(e),r=O.indexOf(n);-1===r?O.push(n):O.splice(r,1),0===O.length&&O.push(...x.map(i)),yield o(O),w();let{nativeEvent:s=!0}=t;s&&(O.length===x.length?a.emit("legend:reset",{nativeEvent:s}):a.emit("legend:filter",Object.assign(Object.assign({},t),{nativeEvent:s,data:{channel:l,values:O}})))});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 E=t=>Ot(this,void 0,void 0,function*(){let{nativeEvent:e}=t;if(e)return;let{data:n}=t,{channel:r,values:i}=n;r===l&&(O=i,yield o(O),w())}),k=t=>Ot(this,void 0,void 0,function*(){let{nativeEvent:e}=t;e||(O=x.map(i),yield o(O),w())});return a.on("legend:filter",E),a.on("legend:reset",k),()=>{for(let t of x)t.removeEventListener("click",u.get(t)),t.removeEventListener("pointerenter",c.get(t)),t.removeEventListener("pointerout",f.get(t)),a.off("legend:filter",E),a.off("legend:reset",k)}}(r,{legends:Oi,marker:On,label:Or,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({legend:t,filter:e,emitter:n,channel:r}){let i=({detail:{value:t}})=>{e(t),n.emit({nativeEvent:!0,data:{channel:r,values:t}})};return t.addEventListener("valuechange",i),()=>{t.removeEventListener("valuechange",i)}}({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 Of(){return(t,e,n)=>{let{container:r,view:i,options:o}=t,a=Oo(r),l=xa(r),s=t=>Ol(t).scales[0].name,u=t=>{let{scale:{[t]:e}}=i;return e},c=xv(o,["active","inactive"]),f=xb(l,xy(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=Oi(t),o=u(r),a=s1(l,t=>o.invert(t.__data__[r])),{state:h={}}=t.attributes,{inactive:d={}}=h,{setState:y,removeState:g}=xg(c,f),v={inactive:uo(d,"marker")},b={inactive:uo(d,"label")},{setState:x,removeState:O}=xg(v),{setState:w,removeState:E}=xg(b),k=t=>{for(let e of i){let n=On(e),r=Or(e);e===t||null===t?(O(n,"inactive"),E(r,"inactive")):(x(n,"inactive"),w(r,"inactive"))}},M=(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");k(i);let{nativeEvent:u=!0}=t;u&&n.emit("legend:highlight",Object.assign(Object.assign({},t),{nativeEvent:u,data:{channel:r,value:o}}))},_=new Map;for(let t of i){let e=e=>{M(e,t)};t.addEventListener("pointerover",e),_.set(t,e)}let S=t=>{for(let t of l)g(t,"inactive","active");k(null);let{nativeEvent:e=!0}=t;e&&n.emit("legend:unhighlight",{nativeEvent:e})},P=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&&M({nativeEvent:!1},s)},j=t=>{let{nativeEvent:e}=t;e||S({nativeEvent:!1})};t.addEventListener("pointerleave",S),n.on("legend:highlight",P),n.on("legend:unhighlight",j);let A=()=>{for(let[e,r]of(t.removeEventListener(S),n.off("legend:highlight",P),n.off("legend:unhighlight",j),_))e.removeEventListener(r)};p.push(A)}return()=>p.forEach(t=>t())}}var Op=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 Oh(t,e){for(let[n,r]of Object.entries(e))t.style(n,r)}let Od=c2(t=>{let e=t.attributes,{x:n,y:r,width:i,height:o,class:a,renders:l={},handleSize:s=10,document:u}=e,c=Op(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=uo(ul(c,"handleNW","handleNE"),"handleN"),{render:d=p}=h,y=Op(h,["render"]),g=uo(c,"handleE"),{render:v=p}=g,b=Op(g,["render"]),x=uo(ul(c,"handleSE","handleSW"),"handleS"),{render:O=p}=x,w=Op(x,["render"]),E=uo(c,"handleW"),{render:k=p}=E,M=Op(E,["render"]),_=uo(c,"handleNW"),{render:S=p}=_,P=Op(_,["render"]),j=uo(c,"handleNE"),{render:A=p}=j,T=Op(j,["render"]),C=uo(c,"handleSE"),{render:N=p}=C,L=Op(C,["render"]),I=uo(c,"handleSW"),{render:R=p}=I,D=Op(I,["render"]),F=t=>()=>new(c2(e=>((t,e)=>{let{id:n}=t,r=t.attributes,{x:i,y:o}=r,a=e(t,Object.assign({x:0,y:0},Op(r,["x","y"])),u);a.id=n,a.style.draggable=!0})(e,t)))({}),z=uf(t).attr("className",a).style("x",n).style("y",r).style("draggable",!0);z.maybeAppend("selection","rect").style("draggable",!0).style("fill","transparent").call(Oh,Object.assign({width:i,height:o},ul(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(Oh,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(Oh,b),z.maybeAppend("handle-s",F(O)).style("x",f).style("y",o-f).style("width",i-s).style("height",s).style("fill","transparent").call(Oh,w),z.maybeAppend("handle-w",F(k)).style("x",-f).style("y",f).style("width",s).style("height",o-s).style("fill","transparent").call(Oh,M),z.maybeAppend("handle-nw",F(S)).style("x",-f).style("y",-f).style("width",s).style("height",s).style("fill","transparent").call(Oh,P),z.maybeAppend("handle-ne",F(A)).style("x",i-f).style("y",-f).style("width",s).style("height",s).style("fill","transparent").call(Oh,T),z.maybeAppend("handle-se",F(N)).style("x",i-f).style("y",o-f).style("width",s).style("height",s).style("fill","transparent").call(Oh,L),z.maybeAppend("handle-sw",F(R)).style("x",-f).style("y",o-f).style("width",s).style("height",s).style("fill","transparent").call(Oh,D)});function Oy(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=Op(e,["brushed","brushended","brushcreated","brushstarted","brushupdated","extent","brushRegion","reverse","fill","fillOpacity","stroke","selectedHandles"]);let y=null,g=null,v=null,b=null,x=null,O=!1,[w,E,k,M]=l;xE(t,"crosshair"),t.style.draggable=!0;let _=(t,e,n)=>{if(o(n),b&&b.remove(),x&&x.remove(),y=[t,e],u)return S();P()},S=()=>{x=new lL({style:Object.assign(Object.assign({},d),{fill:c,fillOpacity:f,stroke:p,pointerEvents:"none"})}),b=new Od({style:{x:0,y:0,width:0,height:0,draggable:!0,document:t.ownerDocument},className:"mask"}),t.appendChild(x),t.appendChild(b)},P=()=>{b=new Od({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(b)},j=(t=!0)=>{b&&b.remove(),x&&x.remove(),y=null,g=null,v=null,O=!1,b=null,x=null,r(t)},A=(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?C(f,p,h,d):T(f,p,h,d),n(f,p,h,d,r),[f,p,h,d]},T=(t,e,n,r)=>{b.style.x=t,b.style.y=e,b.style.width=n-t,b.style.height=r-e},C=(t,e,n,r)=>{x.style.d=`
|
|
17
|
+
M${w},${E}L${k},${E}L${k},${M}L${w},${M}Z
|
|
18
|
+
M${t},${e}L${t},${r}L${n},${r}L${n},${e}Z
|
|
19
|
+
`,b.style.x=t,b.style.y=e,b.style.width=n-t,b.style.height=r-e},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===b.getElementById("selection"),D=e=>{let{target:n}=e,[r,i]=xp(t,e);if(!b||!L(n)){_(r,i,e),O=!0;return}L(n)&&(v=[r,i])},F=e=>{let{target:n}=e,r=xp(t,e);if(!y)return;if(!v)return A(y,r);if(R(n)){let t,e,n,i,o;return t=(t,e,n,r,i)=>t+e<r?r-e:t+n>i?i-n:t,e=r[0]-v[0],n=r[1]-v[1],i=t(e,y[0],g[0],w,k),o=t(n,y[1],g[1],E,M),void A([y[0]+i,y[1]+o],[g[0]+i,g[1]+o])}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 A([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}=b.style;y=[t,n],g=[t+r,n+i],a(t,n,t+r,n+i,e);return}g=xp(t,e);let[n,r,o,l]=A(y,g);O=!1,i(n,r,o,l,e)},B=t=>{let{target:e}=t;b&&!L(e)&&j()},W=e=>{let{target:n}=e;b&&L(n)&&!O?R(n)?xE(t,"move"):I(n)&&xE(t,N[n.id].cursor):xE(t,"crosshair")},$=()=>{xE(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:b,move(t,e,n,r,i=!0){b||_(t,e,{}),y=[t,e],g=[n,r],A([t,e],[n,r],i)},remove(t=!0){b&&j(t)},destroy(){b&&j(!1),xE(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 Og(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 Om(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=Op(e,["elements","selectedHandles","siblings","datum","brushRegion","extent","reverse","scale","coordinate","series","key","bboxOf","state","emitter"]);let v=n(t),b=i(t),x=b.flatMap(n),O=xb(v,o),w=uo(g,"mask"),{setState:E,removeState:k}=xg(d,O),M=new Map,{width:_,height:S,x:P=0,y:j=0}=h(t),A=Oy(t,Object.assign(Object.assign({},w),{extent:l||[0,0,_,S],brushRegion:a,reverse:s,selectedHandles:r,brushended:t=>{t&&y.emit("brush:remove",{nativeEvent:!0}),(f?()=>{for(let t of v)k(t,"inactive");for(let t of M.values())t.remove();M.clear()}:()=>{for(let t of[...v,...x])k(t,"active","inactive")})()},brushed:(t,e,n,r,i)=>{let o=bj(t,e,n,r,u,c);i&&y.emit("brush:highlight",{nativeEvent:!0,data:{selection:o}}),(f?(t,e,n,r)=>{let i=t=>{let e=t.cloneNode();return e.__data__=t.__data__,t.parentNode.appendChild(e),M.set(t,e),e};for(let o of v){let a=M.get(o)||i(o);a.style.clipPath=new lD({style:{x:t+P,y:e+j,width:n-t,height:r-e}}),E(o,"inactive"),E(a,"active")}}:(t,e,n,r)=>{var i;for(let t of b)null==(i=t.brush)||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])?E(i,"inactive"):(E(i,"active"),o.add(p(i)))}for(let t of x)o.has(p(t))?E(t,"active"):E(t,"inactive")})(t,e,n,r)},brushcreated:(t,e,n,r,i)=>{let o=bj(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=bj(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)}})),T=({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=bA(o,r),s=bA(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);A.move(r,i,o,a,!1)};y.on("brush:highlight",T);let C=({nativeEvent:t}={})=>{t||A.remove(!1)};y.on("brush:remove",C);let N=A.destroy.bind(A);return A.destroy=()=>{y.off("brush:highlight",T),y.off("brush:remove",C),N()},A}function Ov(t){var{facet:e,brushKey:n}=t,r=Op(t,["facet","brushKey"]);return(t,i,o)=>{let{container:a,view:l,options:s}=t,u=xu(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 Om(u.parentNode.parentNode,Object.assign(Object.assign({elements:()=>xl(t,i),datum:xy(xs(t,i).map(t=>t.view)),brushRegion:(t,e,n,r)=>[t,e,n,r],extent:[n,a,l,s],state:xv(xs(t,i).map(t=>t.options),f),emitter:o,scale:p,coordinate:h,selectedHandles:void 0},c),r))}let d=Om(u,Object.assign(Object.assign({elements:xa,key:t=>t.__data__.key,siblings:()=>Og(t,i,n).map(t=>xu(t.container)),datum:xy([l,...Og(t,i,n).map(t=>t.view)]),brushRegion:(t,e,n,r)=>[t,e,n,r],extent:void 0,state:xv([s,...Og(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 Ob(t,e,n,r,i){let[,o,,a]=i;return[t,o,n,a]}function Ox(t){return Ov(Object.assign(Object.assign({},t),{brushRegion:Ob,selectedHandles:["handle-e","handle-w"]}))}function OO(t,e,n,r,i){let[o,,a]=i;return[o,e,a,r]}function Ow(t){return Ov(Object.assign(Object.assign({},t),{brushRegion:OO,selectedHandles:["handle-n","handle-s"]}))}var OE=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 Ok="axis-hot-area";function OM(t){return t.getElementsByClassName("axis")}function O_(t){return t.getElementsByClassName("axis-line")[0]}function OS(t){return t.getElementsByClassName("axis-main-group")[0].getLocalBounds()}function OP(t){return(e,n,r)=>{let{container:i,view:o,options:a}=e,{x:l,y:s}=xu(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=OE(e,["axes","elements","points","horizontal","datum","offsetY","offsetX","reverse","state","emitter","coordinate"]);let d=r(t),y=n(t),{setState:g,removeState:v}=xg(c,xb(d,a)),b=new Map,x=uo(h,"mask"),O=t=>Array.from(b.values()).every(([e,n,r,i])=>t.some(([t,o])=>t>=e&&t<=r&&o>=n&&o<=i)),w=y.map(t=>t.attributes.scale),E=t=>t.length>2?[t[0],t[t.length-1]]:t,k=new Map,M=()=>{k.clear();for(let t=0;t<y.length;t++){let{domain:e}=w[t].getOptions();k.set(t,E(e))}};M();let _=(t,e)=>{let n=[];for(let t of d)O(i(t))?(g(t,"active"),n.push(t)):g(t,"inactive");k.set(t,P(n,t)),e&&f.emit("brushAxis:highlight",{nativeEvent:!0,data:{selection:(()=>{if(!j)return Array.from(k.values());let t=[];for(let[e,n]of k){let{name:r}=w[e].getOptions();"x"===r?t[0]=n:t[1]=n}return t})()}})},S=t=>{for(let t of d)v(t,"active","inactive");M(),t&&f.emit("brushAxis:remove",{nativeEvent:!0})},P=(t,e)=>{let n=w[e],{name:r}=n.getOptions(),i=t.map(t=>{let e=t.__data__;return n.invert(e[r])});return E(bP(n,i))},j=y.some(o)&&y.some(t=>!o(t)),A=[];for(let t=0;t<y.length;t++){let e=y[t],{hotZone:n,brushRegion:r,extent:i}=(o(e)?function(t,e){var{offsetY:n,offsetX:r,cross:i=!1}=e,o=OE(e,["offsetY","offsetX","cross"]);let a=OS(t),[,l]=O_(t).getLocalBounds().min,[s,u]=a.min,[c,f]=a.max,p=f-u;return{brushRegion:Ob,hotZone:new lD({className:Ok,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(t,e){var{cross:n,offsetX:r,offsetY:i}=e,o=OE(e,["cross","offsetX","offsetY"]);let a=OS(t),[l]=O_(t).getLocalBounds().min,[s,u]=a.min,[c,f]=a.max,p=(c-s)*2;return{brushRegion:OO,hotZone:new lD({className:Ok,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]}})(e,{offsetY:l,offsetX:s,cross:j,zIndex:999,fill:"transparent"});e.parentNode.appendChild(n);let a=Oy(n,Object.assign(Object.assign({},x),{reverse:u,brushRegion:r,brushended(n){b.delete(e),0===Array.from(b.entries()).length?S(n):_(t,n)},brushed(n,r,o,a,l){b.set(e,i(n,r,o,a)),_(t,l)}}));A.push(a)}let T=(t={})=>{let{nativeEvent:e}=t;e||A.forEach(t=>t.remove(!1))},C=(t,e,n)=>{let[r,i]=t,a=N(r,e,n),l=N(i,e,n)+(e.getStep?e.getStep():0);return o(n)?[a,-1/0,l,1/0]:[-1/0,a,1/0,l]},N=(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)},L=t=>{let{nativeEvent:e}=t;if(e)return;let{selection:n}=t.data;for(let t=0;t<A.length;t++){let e=n[t],r=A[t],i=y[t];if(e){let n=w[t];r.move(...C(e,n,i),!1)}else r.remove(!1)}};return f.on("brushAxis:remove",T),f.on("brushAxis:highlight",L),()=>{A.forEach(t=>t.destroy()),f.off("brushAxis:remove",T),f.off("brushAxis:highlight",L)}}(i,Object.assign({elements:xa,axes:OM,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:xy(o),state:xv(a,["active",["inactive",{opacity:.5}]]),coordinate:u,emitter:r},t))}}var Oj=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 OA(t){var{hideX:e=!0,hideY:n=!0}=t,r=Oj(t,["hideX","hideY"]);return(t,i,o)=>{let{container:a,view:l,options:s,update:u,setState:c}=t,f=xu(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=uo(Oj(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=Oy(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()}}));function v(t){y(t)&&(t.nativeEvent=!0,r(t))}t.addEventListener("click",v);let b=({nativeEvent:t,data:e})=>{if(t)return;let{selection:r}=e;n(r,{nativeEvent:!1})};return l.on("brush:filter",b),()=>{g.destroy(),l.off("brush:filter",b),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 bj(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=>tW({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 OT(t){return OA(Object.assign(Object.assign({hideX:!0},t),{brushRegion:Ob}))}function OC(t){return OA(Object.assign(Object.assign({hideY:!0},t),{brushRegion:OO}))}var ON=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 OL(t){return[t[0],t[t.length-1]]}function OI({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.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:b,coordinate:x,layout:O}=h,{paddingLeft:w,paddingTop:E,paddingBottom:k,paddingRight:M}=O,{x:_,y:S}=b,P=eh(x),j=t=>{let e="vertical"===t?"y":"x",n="vertical"===t?"x":"y";return P?[n,e]:[e,n]},A=new Map,T=new Set,C={x:t.x||_.getOptions().domain,y:t.y||S.getOptions().domain};for(let t of g){let{orientation:e}=t.attributes,[u,c]=j(e),p=`${n}${mi(u)}:filter`,h="x"===u,{ratio:g}=_.getOptions(),{ratio:x}=S.getOptions(),O=t=>{if(t.data){let{selection:e}=t.data,[n=OL(C.x),r=OL(C.y)]=e;return h?[bP(_,n,g),bP(S,r,x)]:[bP(S,r,x),bP(_,n,g)]}let{value:n}=t.detail;return[function(t,e,n){let[r,i]=t,o=n?t=>1-t:t=>t,a=bS(e,o(r),!0),l=bS(e,o(i),!1);return bP(e,[a,l])}(n,b[u],P&&"horizontal"===e),C[c]]},N=xN(e=>ON(this,void 0,void 0,function*(){let{initValue:r=!1}=e;if(v&&!r)return;v=!0;let{nativeEvent:o=!0}=e,[a,l]=O(e);if(C[u]=a,C[c]=l,o){let t=h?a:l,n=h?l:a;f.emit(p,Object.assign(Object.assign({},e),{nativeEvent:o,data:{selection:[OL(t),OL(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 tW({axis:{x:{transform:[{type:"hide"}]},y:{transform:[{type:"hide"}]}}},t,{scale:e,[n]:Object.assign(Object.assign({},(null==(a=t[n])?void 0:a[i])&&{[i]:Object.assign({preserve:!0},r&&{ratio:null})}),(null==(l=t[n])?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:w,paddingTop:E,paddingBottom:k,paddingRight:M})),yield d(),v=!1}),o,{leading:a,trailing:l}),L=e=>{let{nativeEvent:n}=e;if(n)return;let{data:i}=e,{selection:o}=i,[a,l]=o;t.dispatchEvent(new a2("valuechange",{data:i,nativeEvent:!1})),r(t,h?bA(a,_):bA(l,S))};f.on(p,L),t.addEventListener("valuechange",N),A.set(t,N),T.add([p,L]);let I=s(t);I&&t.dispatchEvent(new a2("valuechange",{detail:{value:I},nativeEvent:!1,initValue:!0}))}return d(),()=>{for(let[t,e]of A)t.removeEventListener("valuechange",e);for(let[t,e]of T)f.off(t,e)}}}let OR="g2-scrollbar";function OD(t={}){return(e,n,r)=>{let{view:i,container:o}=e;if(!o.getElementsByClassName(OR).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}),OI(Object.assign(Object.assign({},t),{initDomain:u,className:OR,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 OF(t){return t.replace(/-(\w)/g,function(t,e){return e.toUpperCase()})}var Oz=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 OB={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 OW(t){return"text"===t.nodeName&&!!t.isOverflowing()}function O$(t){var{offsetX:e=8,offsetY:n=8}=t,r=Oz(t,["offsetX","offsetY"]);return t=>{let{container:i}=t,[o,a]=i.getBounds().min,l=uo(r,"tip"),s=new Set,u=t=>{var r;let{target:u}=t;if(!OW(u))return void t.stopPropagation();let{offsetX:c,offsetY:f}=t,p=c+e-o,h=f+n-a;if(u.tip){u.tip.style.x=p,u.tip.style.y=h;return}let{text:d}=u.style,y=new lT({className:"poptip",style:{innerHTML:(r=Object.assign(Object.assign({},OB),l),`<div style="${Object.entries(r).map(([t,e])=>`${t.replace(/([A-Z])/g,"-$1").toLowerCase()}:${e}`).join(";")}">${d}</div>`),x:p,y:h}});i.appendChild(y),u.tip=y,s.add(y)},c=t=>{let{target:e}=t;OW(e)?e.tip&&(e.tip.remove(),e.tip=null,s.delete(e.tip)):t.stopPropagation()};return i.addEventListener("pointerover",u),i.addEventListener("pointerout",c),()=>{i.removeEventListener("pointerover",u),i.removeEventListener("pointerout",c),s.forEach(t=>t.remove())}}}function OG(t){return s6(t)?0:m5(t)?t.length:Object.keys(t).length}O$.props={reapplyWhenUpdate:!0};var OH=function(t){return tD(t,"String")},OV=function(t,e,n){for(var r=0,i=OH(e)?e.split("."):e;t&&r<i.length;)t=t[i[r++]];return void 0===t||r<i.length?n:t},OU=function(t){return"function"==typeof t},Oq=Object.keys?function(t){return Object.keys(t)}:function(t){var e=[];return me(t,function(n,r){OU(t)&&"prototype"===r||e.push(r)}),e},OY=function(t,e){var n=Oq(e),r=n.length;if(s6(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},OX=function(t,e){if(!tF(t))return null;if(OU(e)&&(n=e),tB(e)&&(n=function(t){return OY(t,e)}),n){for(var n,r=0;r<t.length;r+=1)if(n(t[r]))return t[r]}return null},OK=Object.prototype.hasOwnProperty,OZ=function(t,e){if(null===t||!tB(t))return{};var n={};return me(e,function(e){OK.call(t,e)&&(n[e]=t[e])}),n};function OQ(t){return null==t?null:OJ(t)}function OJ(t){if("function"!=typeof t)throw Error();return t}function O0(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}function O1(t,e){t instanceof Map?(t=[void 0,t],void 0===e&&(e=O5)):void 0===e&&(e=O2);for(var n,r,i,o,a,l=new O6(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 O6(i[o])),r.parent=n,r.depth=n.depth+1;return l.eachBefore(O4)}function O2(t){return t.children}function O5(t){return Array.isArray(t)?t[1]:null}function O3(t){void 0!==t.data.value&&(t.value=t.data.value),t.data=t.data.data}function O4(t){var e=0;do t.height=e;while((t=t.parent)&&t.height<++e)}function O6(t){this.data=t,this.depth=this.height=0,this.parent=null}O6.prototype=O1.prototype={constructor:O6,count:function(){return this.eachAfter(O0)},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;)r.push(e=e.parent);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 O1(this).eachBefore(O3)},[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)}};var O8={depth:-1},O9={},O7={};function wt(t){return t.id}function we(t){return t.parentId}function wn(){var t,e=wt,n=we;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)=>{var i;let o;return i=t(e,n,r),o=(i=`${i}`).length,wi(i,o-1)&&!wi(i,o-2)&&(i=i.slice(0,-1)),"/"===i[0]?i:`/${i}`}),n=e.map(wr),i=new Set(e).add("");for(let t of n)i.has(t)||(i.add(t),e.push(t),n.push(wr(t)),p.push(O7));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 O6(o),null!=(c=h(o,a,r))&&(c+="")&&(f=u.id=c,y.set(f,y.has(f)?O9: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===O9)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===O7&&1===l.children.length;)l=l.children[0],--i;for(let t=p.length-1;t>=0&&(u=p[t]).data===O7;--t)u.data=null}if(l.parent=O8,l.eachBefore(function(t){t.depth=t.parent.depth+1,--i}).eachBefore(O4),l.parent=null,i>0)throw Error("cycle");return l}return r.id=function(t){return arguments.length?(e=OQ(t),r):e},r.parentId=function(t){return arguments.length?(n=OQ(t),r):n},r.path=function(e){return arguments.length?(t=OQ(e),r):t},r}function wr(t){let e=t.length;if(e<2)return"";for(;--e>1&&!wi(t,e););return t.slice(0,e)}function wi(t,e){if("/"===t[e]){let n=0;for(;e>0&&"\\"===t[--e];)++n;if((1&n)==0)return!0}return!1}function wo(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 b=r?(i*v+a*g)/r:a;t(e,h,g,i,o,b,s),t(h,n,v,b,o,a,s)}else{var x=r?(o*v+s*g)/r:s;t(e,h,g,i,o,a,x),t(h,n,v,i,x,a,s)}}(0,s,t.value,e,n,r,i)}function wa(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 wl(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 ws(t,e,n,r,i){(1&t.depth?wl:wa)(t,e,n,r,i)}var wu=(1+Math.sqrt(5))/2;function wc(t,e,n,r,i,o){for(var a,l,s,u,c,f,p,h,d,y,g,v=[],b=e.children,x=0,O=0,w=b.length,E=e.value;x<w;){s=i-n,u=o-r;do c=b[O++].value;while(!c&&O<w);for(f=p=c,d=Math.max(p/(g=c*c*(y=Math.max(u/s,s/u)/(E*t))),g/f);O<w;++O){if(c+=l=b[O].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:b.slice(x,O)}),a.dice?wa(a,n,r,i,E?r+=u*c/E:o):wl(a,n,r,E?n+=s*c/E:i,o),E-=c,x=O}return v}var wf=function t(e){function n(t,n,r,i,o){wc(e,t,n,r,i,o)}return n.ratio=function(e){return t((e*=1)>1?e:1)},n}(wu),wp=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?wa(l,n,r,i,h?r+=(o-r)*l.value/h:o):wl(l,n,r,h?n+=(i-n)*l.value/h:i,o),h-=l.value}else t._squarify=a=wc(e,t,n,r,i,o),a.ratio=e}return n.ratio=function(e){return t((e*=1)>1?e:1)},n}(wu);function wh(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 wd(){return 0}function wy(t){return function(){return t}}function wg(t,e,n){var r;let{value:i}=n,o=function(t,e){let n={treemapBinary:wo,treemapDice:wa,treemapSlice:wl,treemapSliceDice:ws,treemapSquarify:wf,treemapResquarify:wp},r="treemapSquarify"===t?n[t].ratio(e):n[t];if(!r)throw TypeError("Invalid tile method!");return r}(e.tile,e.ratio),a=(r=e.path,Array.isArray(t)?"function"==typeof r?wn().path(r)(t):wn()(t):O1(t));tF(t)?function t(e){let n=OV(e,["data","name"]);n.replaceAll&&(e.path=n.replaceAll(".","/").split("/")),e.children&&e.children.forEach(e=>{t(e)})}(a):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)})}(a),i?a.sum(t=>e.ignoreParentValue&&t.children?0:cH(i)(t)).sort(e.sort):a.count(),(function(){var t=wf,e=!1,n=1,r=1,i=[0],o=wd,a=wd,l=wd,s=wd,u=wd;function c(t){return t.x0=t.y0=0,t.x1=n,t.y1=r,t.eachBefore(f),i=[0],e&&t.eachBefore(wh),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=OJ(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:wy(+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:wy(+t),c):a},c.paddingRight=function(t){return arguments.length?(l="function"==typeof t?t:wy(+t),c):l},c.paddingBottom=function(t){return arguments.length?(s="function"==typeof t?t:wy(+t),c):s},c.paddingLeft=function(t){return arguments.length?(u="function"==typeof t?t:wy(+t),c):u},c})().tile(o).size(e.size).round(e.round).paddingInner(e.paddingInner).paddingOuter(e.paddingOuter).paddingTop(e.paddingTop).paddingRight(e.paddingRight).paddingBottom(e.paddingBottom).paddingLeft(e.paddingLeft)(a);let l=a.descendants().map(t=>Object.assign(t,{id:t.id.replace(/^\//,""),x:[t.x0,t.x1],y:[t.y0,t.y1]}));return[l.filter("function"==typeof e.layer?e.layer:t=>t.height===e.layer),l]}var wm=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 wv={breadCrumbFill:"rgba(0, 0, 0, 0.85)",breadCrumbFontSize:12,breadCrumbY:12,activeFill:"rgba(0, 0, 0, 0.5)"};function wb(t={}){let{originData:e=[],layout:n}=t,r=tW({},wv,wm(t,["originData","layout"])),i=uo(r,"breadCrumb"),o=uo(r,"active");return t=>{let{update:r,setState:a,container:l,options:s}=t,u=uf(l).select(".plot").node(),{state:c}=s.marks[0],f=new lA;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 lF({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 lF({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===OG(t)-1&&c.remove(),u});s.forEach((t,e)=>{if(e===OG(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(OV(t,["style","path"]),OV(t,["style","depth"]))})})}[...Oo(l),...Oa(l)].forEach(t=>{a(t,t=>t)}),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=OV(t,["id"]);return e&&(e.match(`${o}/`)||o.match(e))}).map(t=>({value:0===t.height?OV(t,["value"]):void 0,name:OV(t,["id"])})),{paddingLeft:i,paddingBottom:a,paddingRight:l}=n;r=wg(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(m3(t))}),tW({},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"!==OV(n,["markType"]))return;let r=OV(n,["__data__","key"]),i=OX(e,t=>t.id===r);OV(i,"height")&&p(OV(i,"path"),OV(i,"depth"))};u.addEventListener("click",h);let d=Oq(Object.assign(Object.assign({},c.active),c.inactive)),y=()=>{u.querySelectorAll(".element").forEach(t=>{let n=OV(t,["style","cursor"]),r=OX(e,e=>e.id===OV(t,["__data__","key"]));if("pointer"!==n&&(null==r?void 0:r.height)){t.style.cursor="pointer";let e=OZ(t.attributes,d);t.addEventListener("mouseenter",()=>{t.attr(c.active)}),t.addEventListener("mouseleave",()=>{t.attr(tW(e,c.inactive))})}})};return y(),u.addEventListener("mousemove",y),()=>{f.remove(),u.removeEventListener("click",h),u.removeEventListener("mousemove",y)}}}var wx=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 wO(t){return(e,...n)=>tW({},t(e,...n),e)}function ww(t){return(e,...n)=>tW({},e,t(e,...n))}function wE(t,e){if(!t)return e;if(Array.isArray(t))return t;let{value:n=e}=t;return Object.assign(Object.assign({},wx(t,["value"])),{value:n})}var wk=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 wM=()=>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({},wk(t,["data","x","y","width","height"])),{data:wE(e,a),x:null!=l?l:n,y:null!=s?s:r,width:null!=u?u:i,height:null!=c?c:o})})};wM.props={};var w_=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 wS=()=>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=w_(r,["data"]),y=wE(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};wS.props={};class wP{constructor(t){this.$value=t}static of(t){return new wP(t)}call(t,...e){return this.$value=t(this.$value,...e),this}value(){return this.$value}}var wj=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 wA=wO(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=s1(n,e=>e[t]),l=(null==(o=null==r?void 0:r[e])?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"))}}}),wT=wO(t=>{let e,n,r,{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.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)?[u8(a)]:[Array.from(new Set(a)),"ordinal"]})();return{encode:{color:e},scale:{color:tW({},n,{domain:s,type:u})},legend:{color:tW({title:l},r)}}}),wC=wO(()=>({animate:{enterType:"fadeIn"}})),wN=ww(()=>({frame:!1,encode:{shape:"hollow"},style:{lineWidth:0}})),wL=ww(()=>({type:"cell"})),wI=ww(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]))):[];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}}]}}}),wR=ww((t,e=wD,n=wz,r=wB,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:b,paddingTop:x,marginLeft:O,marginTop:w}=a,{domain:E}=s.getOptions(),{domain:k}=g.getOptions(),M=u7(t),_=t.map(e),S=t.map(({x:t,y:e})=>[s.invert(t),g.invert(e)]),P=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)),j=f?dc(P,t=>t.length):void 0,A=S.map(([t,e])=>({columnField:d,columnIndex:E.indexOf(t),columnValue:t,columnValuesLength:E.length,rowField:y,rowIndex:k.indexOf(e),rowValue:e,rowValuesLength:k.length})),T=A.map(t=>Array.isArray(l)?l:[l(t)].flat(1));return M.flatMap(t=>{let[e,o,a,l]=_[t],s=A[t],f=P[t];return T[t].map(g=>{var E,k,{scale:M,key:_,facet:S=!0,axis:P={},legend:A={}}=g,T=wj(g,["scale","key","facet","axis","legend"]);let C=(null==(E=null==M?void 0:M.y)?void 0:E.guide)||P.y,N=(null==(k=null==M?void 0:M.x)?void 0:k.guide)||P.x,L=S?f:0===f.length?[]:h,I={x:wW(N,n)(s,L),y:wW(C,r)(s,L)};return Object.assign(Object.assign({key:`${_}-${t}`,data:L,margin:0,x:e+b+u+O,y:o+x+c+w,parentKey:p,width:a,height:l,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,frame:!!L.length,dataDomain:j,scale:tW({x:{tickCount:d?5:void 0},y:{tickCount:y?5:void 0}},M,{color:{domain:v}}),axis:tW({},P,I),legend:!1},T),i)})})}}});function wD(t){let{points:e}=t;return uv(e)}function wF(t,e){return e.length?tW({title:!1,tick:null,label:null},t):tW({title:!1,tick:null,label:null,grid:null},t)}function wz(t){return(e,n)=>{let{rowIndex:r,rowValuesLength:i,columnIndex:o,columnValuesLength:a}=e;return r!==i-1?wF(t,n):tW({title:o===a-1&&void 0,grid:n.length?void 0:null},t)}}function wB(t){return(e,n)=>{let{rowIndex:r,columnIndex:i}=e;return 0!==i?wF(t,n):tW({title:0===r&&void 0,grid:n.length?void 0:null},t)}}function wW(t,e){return"function"==typeof t?t:null===t||!1===t?()=>null:e(t)}let w$=()=>t=>[wP.of(t).call(wL).call(wT).call(wC).call(wA).call(wN).call(wI).call(wR).value()];w$.props={};var wG=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 wH=wO(t=>({scale:{x:{guide:null,paddingOuter:0,paddingInner:.1},y:{guide:null,range:[0,1],paddingOuter:0,paddingInner:.1}}})),wV=ww(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=u7(t),v=t.map(({points:t})=>uv(t)),b=t.map(({x:t,y:e})=>[s.invert(t),u.invert(e)]),x=b.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})),O=x.map(t=>Array.isArray(n)?n:[n(t)].flat(1));return g.flatMap(t=>{let[n,a,l,s]=v[t],[u,d]=b[t],y=x[t];return O[t].map(g=>{var v,b,x,O;let{scale:w,key:E,encode:k,axis:M,interaction:_}=g,S=wG(g,["scale","key","encode","axis","interaction"]),P=null==(v=null==w?void 0:w.y)?void 0:v.guide,j={x:("function"==typeof(x=null==(b=null==w?void 0:w.x)?void 0:b.guide)?x:null===x?()=>null:(t,e)=>{let{rowIndex:n,rowValuesLength:r}=t;if(n!==r-1)return wF(x,e)})(y,e),y:("function"==typeof(O=P)?O:null===O?()=>null:(t,e)=>{let{columnIndex:n}=t;if(0!==n)return wF(O,e)})(y,e)};return Object.assign({data:e,parentKey:o,key:`${E}-${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:tW({x:{facet:!1},y:{facet:!1}},w),axis:tW({x:{tickCount:5},y:{tickCount:5}},M,j),legend:!1,encode:tW({},k,{x:u,y:d}),interaction:tW({},_,{legendFilter:!1})},S)})})}}}),wU=ww(t=>{let{encode:e}=t,n=wG(t,["encode"]),{position:r=[],x:i=r,y:o=[...r].reverse()}=e,a=wG(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}})})}),wq=()=>t=>[wP.of(t).call(wL).call(wT).call(wV).call(wU).call(wC).call(wN).call(wH).value()];var wY=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 wX=wO(t=>({scale:{x:{guide:{type:"axisArc"},paddingOuter:0,paddingInner:.1},y:{guide:null,range:[0,1],paddingOuter:0,paddingInner:.1}}})),wK=wO(t=>({coordinate:{type:"polar"}})),wZ=t=>{let{encode:e}=t,n=wY(t,["encode"]),{position:r}=e;return Object.assign(Object.assign({},n),{encode:{x:r}})};function wQ(t){return t=>null}function wJ(t){let{points:e}=t,[n,r,i,o]=e,a=ud(n,o),l=uh(n,o),s=um(l,uh(r,i)),u=1/Math.sin(s/2),c=a/(1+u),f=c*Math.sqrt(2),[p,h]=i,d=ug(l)+s/2,y=c*u;return[p+y*Math.sin(d)-f/2,h-y*Math.cos(d)-f/2,f,f]}let w0=()=>t=>[wP.of(t).call(wL).call(wZ).call(wT).call(wK).call(wI).call(wR,wJ,wQ,wQ,{frame:!1}).call(wC).call(wN).call(wX).value()],w1=()=>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=tW({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 w2(t,e){let n,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 w5(t,e,n){var r;let{encode:i}=n;if(null===t)return[e];let o=(Array.isArray(r=t)?r:[r]).map(t=>{var e;return[t,null==(e=tU(i,t))?void 0:e[0]]}).filter(([,t])=>ui(t));return Array.from(s1(e,t=>o.map(([,e])=>e[t]).join("-")).values())}function w3(t){var e,n;return Array.isArray(t)?(e=t,(t,n,r)=>(n,r)=>e.reduce((e,i)=>0!==e?e:bd(t[n][i],t[r][i]),0)):"function"==typeof t?(n=t,(t,e,r)=>Ee(e=>n(t[e]))):"series"===t?w8:"value"===t?w9:"sum"===t?w7:"maxIndex"===t?Et:()=>null}function w4(t,e){for(let n of t)n.sort(e)}function w6(t,e){return(null==e?void 0:e.domain)||Array.from(new Set(t))}function w8(t,e,n){return Ee(t=>n[t])}function w9(t,e,n){return Ee(t=>e[t])}function w7(t,e,n){let r=new Map(Array.from(s1(u7(t),t=>n[+t]).entries()).map(([t,n])=>[t,n.reduce((t,n)=>t+ +e[n])]));return Ee(t=>r.get(n[t]))}function Et(t,e,n){let r=new Map(Array.from(s1(u7(t),t=>n[+t]).entries()).map(([t,n])=>[t,w2(n,t=>e[t])]));return Ee(t=>r.get(n[t]))}function Ee(t){return(e,n)=>bd(t(e),t(n))}w1.props={};let En=(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]=tU(u,"y"),[h,d]=tU(u,"y1"),[y]=a?tq(u,"series","color"):tU(u,"color"),g=w5(e,t,l),v=w3(n)(s,f,y);v&&w4(g,v);let b=Array(t.length),x=Array(t.length),O=Array(t.length),w=[],E=[];for(let t of g){r&&t.reverse();let e=h?+h[t[0]]:0,n=[],i=[];for(let r of t){let t=O[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++;w.push(o[l]),E.push(a[s]);let u=e;for(let t of i.reverse()){let e=O[t];u=b[t]=(x[t]=u)+e}let c=e;for(let t of n){let e=O[t];e>0?c=b[t]=(x[t]=c)+e:b[t]=x[t]=c}}let k=new Set(w),M=new Set(E),_="y"===i?b:x,S="y"===o?b:x;return[t,tW({},l,{encode:{y0:tG(f,p),y:t$(_,p),y1:t$(S,d)},style:Object.assign({first:(t,e)=>k.has(e),last:(t,e)=>M.has(e)},c)})]}};function Er(t,e){let n=0;if(void 0===e)for(let e of t)null!=e&&(e*=1)>=e&&++n;else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(i*=1)>=i&&++n}return n}function Ei(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*=1)>=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*=1)>=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}En.props={};var Eo=Array.prototype,Ea=Eo.slice;Eo.map;let El=Math.sqrt(50),Es=Math.sqrt(10),Eu=Math.sqrt(2);function Ec(t,e,n){let r,i,o,a=(e-t)/Math.max(0,n),l=Math.floor(Math.log10(a)),s=a/Math.pow(10,l),u=s>=El?10:s>=Es?5:s>=Eu?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)?Ec(t,e,2*n):[r,i,o]}function Ef(t,e,n){return Ec(t*=1,e*=1,n*=1)[2]}function Ep(t){return Math.max(1,Math.ceil(Math.log(Er(t))/Math.LN2)+1)}function Eh(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?bM:bk(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));Eh(t,e,c,f,i)}let o=t[e],a=n,l=r;for(Ed(t,n,e),i(t[r],o)>0&&Ed(t,n,r);a<l;){for(Ed(t,a,l),++a,--l;0>i(t[a],o);)++a;for(;i(t[l],o)>0;)--l}0===i(t[n],o)?Ed(t,n,l):Ed(t,++l,r),l<=e&&(n=l+1),e<=l&&(r=l-1)}return t}function Ed(t,e,n){let r=t[e];t[e]=t[n],t[n]=r}function Ey(t,e,n){if(!(!(r=(t=Float64Array.from(function*(t,e){if(void 0===e)for(let e of t)null!=e&&(e*=1)>=e&&(yield e);else{let n=-1;for(let r of t)null!=(r=e(r,++n,t))&&(r*=1)>=r&&(yield r)}}(t,n))).length)||isNaN(e*=1))){if(e<=0||r<2)return du(t);if(e>=1)return dc(t);var r,i=(r-1)*e,o=Math.floor(i),a=dc(Eh(t,o).subarray(0,o+1));return a+(du(t.subarray(o+1))-a)*(i-o)}}function Eg(t,e){let n=0;if(void 0===e)for(let e of t)(e*=1)&&(n+=e);else{let r=-1;for(let i of t)(i=+e(i,++r,t))&&(n+=i)}return n}var Em=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 Ev(t){return e=>null===e?t:`${t} of ${e}`}function Eb(){return[(t,e)=>xD(t,t=>+e[t]),Ev("mean")]}function Ex(){return[(t,e)=>Ey(t,.5,t=>+e[t]),Ev("median")]}function EO(){return[(t,e)=>dc(t,t=>+e[t]),Ev("max")]}function Ew(){return[(t,e)=>du(t,t=>+e[t]),Ev("min")]}function EE(){return[(t,e)=>t.length,Ev("count")]}function Ek(){return[(t,e)=>Eg(t,t=>+e[t]),Ev("sum")]}function EM(){return[(t,e)=>e[t[0]],Ev("first")]}function E_(){return[(t,e)=>e[t[t.length-1]],Ev("last")]}let ES=(t={})=>{let{groupBy:e}=t,n=Em(t,["groupBy"]);return(t,r)=>{let{data:i,encode:o}=r,a=e(t,r);if(!a)return[t,r];let l=Object.entries(n).map(([t,e])=>{let[n,r]=function(t){if("function"==typeof t)return[t,null];let e={mean:Eb,max:EO,count:EE,first:EM,last:E_,sum:Ek,min:Ew,median:Ex}[t];if(!e)throw Error(`Unknown reducer: ${t}.`);return e()}(e),[l,s]=tU(o,t),u=((t,e)=>{if(t)return t;let{from:n}=e;if(!n)return t;let[,r]=tU(o,n);return r})(s,e);return[t,Object.assign(Object.assign({},Object.assign(Object.assign({},t$(a.map(t=>n(t,null!=l?l:i)),(null==r?void 0:r(u))||u)),{constant:!1})),{aggregate:!0})]}),s=Object.keys(o).map(t=>{let[e,n]=tU(o,t);return[t,t$(a.map(t=>e[t[0]]),n)]}),u=a.map(t=>i[t[0]]);return[u7(a),tW({},r,{data:u,encode:Object.fromEntries([...s,...l])})]}};ES.props={};var EP=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 Ej="thresholds",EA=(t={})=>{let{groupChannels:e=["color"],binChannels:n=["x","y"]}=t,r=EP(t,["groupChannels","binChannels"]),i={};return ES(Object.assign(Object.assign(Object.assign({},Object.fromEntries(Object.entries(r).filter(([t])=>!t.startsWith(Ej)))),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]=tU(a,t);return e}),s=uo(r,Ej),u=t.filter(t=>l.every(e=>ui(e[t]))),c=[...e.map(t=>{let[e]=tU(a,t);return e}).filter(ui).map(t=>e=>t[e]),...n.map((t,e)=>{let n=l[e],r=s[t]||function(t){let e,n,[r,i]=u8(t);return Math.min(200,(e=Er(t),n=Ei(t),e&&n?Math.ceil((i-r)*Math.cbrt(e)/(3.49*n)):1))}(n),o=new Map((function(){var t=s0,e=u8,n=Ep;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===u8&&([c,f]=function(t,e,n){let r;for(;;){let i=Ef(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*=1,t*=1,!((n*=1)>0))return[];if(t===e)return[t];let r=e<t,[i,o,a]=r?Ec(e,t,n):Ec(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=Ef(c,f,n)),p[p.length-1]>=f)if(t>=f&&e===u8){let t=Ef(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[bx(p,o,0,h)].push(r[i]);return v}return r.value=function(e){return arguments.length?(t="function"==typeof e?e:()=>e,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)?Ea.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(s1(u,t=>c.map(e=>e(t)).join("-")).values())}}))};EA.props={};let ET=(t={})=>{let{thresholds:e}=t;return EA(Object.assign(Object.assign({},t),{thresholdsX:e,groupChannels:["color"],binChannels:["x"]}))};ET.props={};var EC=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 EN=(t={})=>{let{groupBy:e="x",reverse:n=!1,orderBy:r,padding:i}=t;return EC(t,["groupBy","reverse","orderBy","padding"]),(t,o)=>{let{data:a,encode:l,scale:s}=o,{series:u}=s,[c]=tU(l,"y"),[f]=tq(l,"series","color"),p=w6(f,u),h=w5(e,t,o),d=w3(r)(a,c,f);d&&w4(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,tW({},o,{scale:{series:{domain:p,paddingInner:i}},encode:{series:t$(y)}})]}};function EL(t,e,n){if(null===t)return[-.5,.5];let r=new dA({domain:w6(t,e),range:[0,1],padding:n}).getBandWidth();return[-r/2,r/2]}EN.props={};let EI=(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]=tU(o,"x"),[c]=tU(o,"y"),f=EL(u,l,n),p=EL(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,tW({scale:{x:{padding:.5},y:{padding:.5}}},e,{encode:{dy:t$(h),dx:t$(d)}})]}};EI.props={};let ER=(t={})=>{let{padding:e=0,random:n=Math.random}=t;return(t,r)=>{let{encode:i,scale:o}=r,{x:a}=o,[l]=tU(i,"x"),s=EL(l,a,e),u=t.map(()=>(function(t,e,n){return e*(1-t)+n*t})(n(),...s));return[t,tW({scale:{x:{padding:.5}}},r,{encode:{dx:t$(u)}})]}};ER.props={};let ED=(t={})=>{let{padding:e=0,random:n=Math.random}=t;return(t,r)=>{let{encode:i,scale:o}=r,{y:a}=o,[l]=tU(i,"y"),s=EL(l,a,e),u=t.map(()=>(function(t,e,n){return e*(1-t)+n*t})(n(),...s));return[t,tW({scale:{y:{padding:.5}}},r,{encode:{dy:t$(u)}})]}};ED.props={};var EF=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 Ez=(t={})=>{let{groupBy:e="x"}=t;return(t,n)=>{let{encode:r}=n,{x:i}=r,o=Object.entries(EF(r,["x"])).filter(([t])=>t.startsWith("y")).map(([t])=>[t,tU(r,t)[0]]),a=o.map(([e])=>[e,Array(t.length)]),l=w5(e,t,n),s=Array(l.length);for(let t=0;t<l.length;t++){let[e,n]=u8(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,tW({},n,{encode:Object.fromEntries(a.map(([t,e])=>[t,t$(e,tU(r,t)[1])]))})]}};Ez.props={};let EB=(t={})=>{let{groupBy:e="x",series:n=!0}=t;return(t,r)=>{let{encode:i}=r,[o]=tU(i,"y"),[a,l]=tU(i,"y1"),[s]=n?tq(i,"series","color"):tU(i,"color"),u=w5(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,tW({},r,{encode:{y1:t$(c,l)}})]}};EB.props={};let EW=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,tU(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(s1(n,e=>t[e]).values());e.push(...r)}u=e}if(r){let[t]=tU(l,r);t&&u.sort((e,r)=>n(e,t)-n(r,t)),i&&u.reverse()}let c=(o||3e3)/u.length,[f]=o?[tV(t,c)]:tq(l,"enterDuration",tV(t,c)),[p]=tq(l,"enterDelay",tV(t,0)),h=Array(t.length);for(let t=0,e=0;t<u.length;t++){let n=u[t],r=dc(n,t=>+f[t]);for(let t of n)h[t]=+p[t]+e;e+=r}return[t,tW({},a,{encode:{enterDuration:tH(f),enterDelay:tH(h)}})]}};EW.props={};var E$=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 EG=(t={})=>{let{groupBy:e="x",basis:n="max"}=t;return(t,r)=>{let{encode:i,tooltip:o}=r,{x:a}=i,l=Object.entries(E$(i,["x"])).filter(([t])=>t.startsWith("y")).map(([t])=>[t,tU(i,t)[0]]),[,s]=l.find(([t])=>"y"===t),u=l.map(([e])=>[e,Array(t.length)]),c=w5(e,t,r),f="function"==typeof n?n:({min:(t,e)=>du(t,t=>e[+t]),max:(t,e)=>dc(t,t=>e[+t]),first:(t,e)=>e[t[0]],last:(t,e)=>e[t[t.length-1]],mean:(t,e)=>xD(t,t=>e[+t]),median:(t,e)=>Ey(t,.5,t=>e[+t]),sum:(t,e)=>Eg(t,t=>e[+t]),deviation:(t,e)=>Ei(t,t=>e[+t])})[n]||dc;for(let t of c){let e=f(t,s);for(let n of t)for(let t=0;t<l.length;t++){let[,r]=l[t],[,i]=u[t];i[n]=r[n]/e}}let p=uc(o)||(null==o?void 0:o.items)&&(null==o?void 0:o.items.length)!==0;return[t,tW({},r,Object.assign({encode:Object.fromEntries(u.map(([t,e])=>[t,t$(e,tU(i,t)[1])]))},!p&&i.y0&&{tooltip:{items:[{channel:"y0"}]}}))]}};function EH(t,e){return[t[0]]}function EV(t,e){let n=t.length-1;return[t[n]]}function EU(t,e){let n=w2(t,t=>e[t]);return[t[n]]}function Eq(t,e){let n=xF(t,t=>e[t]);return[t[n]]}EG.props={};let EY=(t={})=>{let{groupBy:e="series",channel:n,selector:r}=t;return(t,i)=>{let{encode:o}=i,a=w5(e,t,i),[l]=tU(o,n),s="function"==typeof r?r:({first:EH,last:EV,max:EU,min:Eq})[r]||EH;return[a.flatMap(t=>s(t,l)),i]}};EY.props={};var EX=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 EK=(t={})=>{let{selector:e}=t;return EY(Object.assign({channel:"x",selector:e},EX(t,["selector"])))};EK.props={};var EZ=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 EQ=(t={})=>{let{selector:e}=t;return EY(Object.assign({channel:"y",selector:e},EZ(t,["selector"])))};EQ.props={};var EJ=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 E0=(t={})=>{let{channels:e=["x","y"]}=t;return ES(Object.assign(Object.assign({},EJ(t,["channels"])),{groupBy:(t,n)=>w5(e,t,n)}))};E0.props={};let E1=(t={})=>E0(Object.assign(Object.assign({},t),{channels:["x","color","series"]}));E1.props={};let E2=(t={})=>E0(Object.assign(Object.assign({},t),{channels:["y","color","series"]}));E2.props={};let E5=(t={})=>E0(Object.assign(Object.assign({},t),{channels:["color"]}));E5.props={};var E3=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 E4=(t={})=>{let{reverse:e=!1,slice:n,channel:r,ordinal:i=!0}=t,o=E3(t,["reverse","slice","channel","ordinal"]);return(t,a)=>i?function(t,e,n){var r,i,o;let{reverse:a,slice:l,channel:s}=n,u=E3(n,["reverse","slice","channel"]),{encode:c,scale:f={}}=e,p=null==(r=f[s])?void 0:r.domain,[h]=tU(c,s),d=function(t,e,n){let{by:r=t,reducer:i="max"}=e,[o]=tU(n,r);if("function"==typeof i)return t=>i(t,o);if("max"===i)return t=>dc(t,t=>+o[t]);if("min"===i)return t=>du(t,t=>+o[t]);if("sum"===i)return t=>Eg(t,t=>+o[t]);if("median"===i)return t=>Ey(t,.5,t=>+o[t]);if("mean"===i)return t=>xD(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}`)}(s,u,c),y=(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,h,p),o=t=>h[t],(2!==d.length?bE(s5(i,d,o),([t,e],[n,r])=>bd(e,r)||bd(t,n)):bE(s1(i,o),([t,e],[n,r])=>d(e,r)||bd(t,n))).map(([t])=>t));return a&&y.reverse(),[t,tW(e,{scale:{[s]:{domain:l?y.slice(..."number"==typeof l?[0,l]:l):y}}})]}(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]=tU(o,i),l=bE(t,t=>a[t]);return r&&l.reverse(),[l,e]}(t,a,Object.assign({reverse:e,slice:n,channel:r},o))};E4.props={};let E6=(t={})=>E4(Object.assign(Object.assign({},t),{channel:"x"}));E6.props={};let E8=(t={})=>E4(Object.assign(Object.assign({},t),{channel:"y"}));E8.props={};let E9=(t={})=>E4(Object.assign(Object.assign({},t),{channel:"color"}));E9.props={};let E7=(t={})=>{let{field:e,channel:n="y",reducer:r="sum"}=t;return(t,i)=>{let{data:o,encode:a}=i,[l]=tU(a,"x"),s=s3(t,function(t,e){if("function"==typeof t)return n=>t(n,e);if("sum"===t)return t=>Eg(t,t=>+e[t]);throw Error(`Unknown reducer: ${t}`)}(r,e?"string"==typeof e?o.map(t=>t[e]):o.map(e):tU(a,n)[0]),t=>l[t]).map(t=>t[1]);return[t,tW({},i,{scale:{x:{flex:s}}})]}};E7.props={};let kt=t=>(e,n)=>[e,tW({},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]=uv(t),f="col"===n?r%s:Math.floor(r/c),g="col"===n?Math.floor(r/s):r%c,v=f*u,b=(c-g-1)*u+p,x=(u-e)/a,O=(u-e)/l;return`translate(${v-i+d*f+.5*e}, ${b-o-h*g-y+.5*e}) scale(${x}, ${O})`})}}(t),axis:!1})];function ke(t,e,n,r){let i,o,a,l=t.length;if(r>=l||0===r)return t;let s=n=>+e[t[n]],u=e=>+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])}kt.props={};let kn=(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 ke;let e={first:t=>[t[0]],last:t=>[t[t.length-1]],min:(t,e,n)=>[t[xF(t,t=>n[t])]],max:(t,e,n)=>[t[w2(t,t=>n[t])]],median:(t,e,n)=>[t[function(t,e,n=bv){if(!isNaN(e*=1)){if(r=Float64Array.from(t,(e,r)=>bv(n(t[r],r,t))),e<=0)return xF(r);if(e>=1)return w2(r);var r,i=Uint32Array.from(t,(t,e)=>e),o=r.length-1,a=Math.floor(o*e);return Eh(i,a,0,o,(t,e)=>bM(r[t],r[e])),(a=function(t,e=bd){let n,r=!1;if(1===e.length){let i;for(let o of t){let t=e(o);(r?bd(t,i)>0:0===bd(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=w5(r,t,e),[l]=tU(o,"x"),[s]=tU(o,"y");return[a.flatMap(t=>i(t,l,s,n)),e]}};kn.props={};let kr=(t={})=>(e,n)=>{let{encode:r,data:i}=n,o=Object.entries(t).map(([t,e])=>{let[n]=tU(r,t);if(!n)return null;let[i,o=!0]="object"==typeof e?[e.value,e.ordinal]:[e,!0];if("function"==typeof i)return t=>i(n[t]);if(o){let t=Array.isArray(i)?i:[i];return 0===t.length?null:e=>t.includes(n[e])}{let[t,e]=i;return r=>n[r]>=t&&n[r]<=e}}).filter(ui);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,tW({},n,{encode:Object.fromEntries(s),data:a.map(t=>i[t])})]};kr.props={};var ki={},ko={};function ka(t){return Function("d","return {"+t.map(function(t,e){return JSON.stringify(t)+": d["+e+'] || ""'}).join(",")+"}")}function kl(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 ks(t,e){var n=t+"",r=n.length;return r<e?Array(e-r+1).join(0)+n:n}function ku(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 kc&&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 kc=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours(),kf=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 ko;if(u)return u=!1,ki;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())!==ko;){for(var f=[];r!==ki&&r!==ko;)f.push(r),r=c();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())<0?"-"+ks(-l,6):l>9999?"+"+ks(l,6):ks(l,4))+"-"+ks(n.getUTCMonth()+1,2)+"-"+ks(n.getUTCDate(),2)+(a?"T"+ks(r,2)+":"+ks(i,2)+":"+ks(o,2)+"."+ks(a,3)+"Z":o?"T"+ks(r,2)+":"+ks(i,2)+":"+ks(o,2)+"Z":i||r?"T"+ks(r,2)+":"+ks(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;if(n)return n(t,r-1);i=t,n=e?(o=ka(t),function(n,r){return e(o(n),r,t)}):ka(t)});return o.columns=i||[],o},parseRows:r,format:function(e,n){return null==n&&(n=kl(e)),[n.map(a).join(t)].concat(i(e,n)).join("\n")},formatBody:function(t,e){return null==e&&(e=kl(t)),i(t,e).join("\n")},formatRows:function(t){return t.map(o).join("\n")},formatRow:o,formatValue:a}})(r).parse(e,i?ku:s7)}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())})}};kf.props={};let kp=t=>{let{value:e}=t;return()=>e};kp.props={};let kh=t=>{let{fields:e=[]}=t,n=e.map(t=>{if(Array.isArray(t)){let[e,n=!0]=t;return[e,n]}return[t,!0]});return t=>[...t].sort((t,e)=>n.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))};kh.props={};let kd=t=>{let{callback:e}=t;return t=>Array.isArray(t)?[...t].sort(e):t};function ky(t){return null!=t&&!Number.isNaN(t)}kd.props={};let kg=t=>{let{callback:e=ky}=t;return t=>t.filter(e)};kg.props={};let km=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))};km.props={};let kv=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;kv.props={};let kb=t=>{let{fields:e,key:n="key",value:r="value"}=t;return t=>e&&0!==Object.keys(e).length?t.flatMap(t=>e.map(e=>Object.assign(Object.assign({},t),{[n]:e,[r]:t[e]}))):t};kb.props={};let kx=t=>{let{start:e,end:n}=t;return t=>t.slice(e,n)};kx.props={};let kO=t=>{let{callback:e=s7}=t;return t=>e(t)};kO.props={};let kw=t=>{let{callback:e=s7}=t;return t=>Array.isArray(t)?t.map(e):t};function kE(t){return"string"==typeof t?e=>e[t]:t}kw.props={};let kk=t=>{let{join:e,on:n,select:r=[],as:i=r,unknown:o=NaN}=t,[a,l]=n,s=kE(l),u=kE(a),c=s5(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),{}))})};kk.props={};var kM=n(7067),k_=n.n(kM);let kS=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(s1(t,t=>n.map(e=>t[e]).join("-")).values()).map(t=>{let n=k_().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})})};kS.props={};let kP=()=>t=>(console.log("G2 data section:",t),t);function kj(t){let{min:e,max:n}=t;return[[e[0],e[1]],[n[0],n[1]]]}function kA(t,e){let[n,r]=t,[i,o]=e;return n>=i[0]&&n<=o[0]&&r>=i[1]&&r<=o[1]}kP.props={};let kT=t=>{let{priority:e}=t;return t=>{let n=[];return e&&t.sort(e),t.forEach(t=>{xi(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]})(kj(e),kj(t.getLocalBounds())))?xr(t):n.push(t)}),t}};function kC(){let t=new Map;return[e=>t.get(e),(e,n)=>t.set(e,n)]}let kN=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]=kC(),[l,s]=kC(),[u,c]=kC(),[f,p]=kC();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)=>bd(l(t),l(e)));let e=0;for(let n=0;n<i-1;n++){let i,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}},kL=()=>t=>(t.forEach(t=>{xi(t);let e=t.attr("bounds");(function(t,e){let[n,r]=t;return!(kA(n,e)&&kA(r,e))})(kj(t.getLocalBounds()),e)&&xr(t)}),t);function kI(t){let e=t/255;return e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)}function kR(t,e,n){return .2126*kI(t)+.7152*kI(e)+.0722*kI(n)}function kD(t,e){let{r:n,g:r,b:i}=t,{r:o,g:a,b:l}=e,s=kR(n,r,i),u=kR(o,a,l);return(Math.max(s,u)+.05)/(Math.min(s,u)+.05)}let kF=t=>{let{threshold:e=4.5,palette:n=["#000","#fff"]}=t;return t=>(t.forEach(t=>{let r,i=t.attr("dependentElement").parsedStyle.fill;kD(t.parsedStyle.fill,i)<e&&t.attr("fill",(r=w2(n,t=>kD(i,"object"==typeof t?t:ot(t))),n[r]))}),t)};function kz(){return{"data.fetch":kf,"data.inline":kp,"data.sortBy":kh,"data.sort":kd,"data.filter":kg,"data.pick":km,"data.rename":kv,"data.fold":kb,"data.slice":kx,"data.custom":kO,"data.map":kw,"data.join":kk,"data.kde":kS,"data.log":kP,"transform.stackY":En,"transform.binX":ET,"transform.bin":EA,"transform.dodgeX":EN,"transform.jitter":EI,"transform.jitterX":ER,"transform.jitterY":ED,"transform.symmetryY":Ez,"transform.diffY":EB,"transform.stackEnter":EW,"transform.normalizeY":EG,"transform.select":EY,"transform.selectX":EK,"transform.selectY":EQ,"transform.groupX":E1,"transform.groupY":E2,"transform.groupColor":E5,"transform.group":E0,"transform.sortX":E6,"transform.sortY":E8,"transform.sortColor":E9,"transform.flexX":E7,"transform.pack":kt,"transform.sample":kn,"transform.filter":kr,"coordinate.cartesian":tw,"coordinate.polar":tk,"coordinate.transpose":tM,"coordinate.theta":t_,"coordinate.parallel":tS,"coordinate.fisheye":tP,"coordinate.radial":tA,"coordinate.radar":tT,"encode.constant":tC,"encode.field":tN,"encode.transform":tL,"encode.column":tI,"mark.interval":cX,"mark.rect":cZ,"mark.line":f_,"mark.point":pg,"mark.text":pQ,"mark.cell":p1,"mark.area":hr,"mark.link":hg,"mark.image":hx,"mark.polygon":h_,"mark.box":hC,"mark.vector":hL,"mark.lineX":hz,"mark.lineY":h$,"mark.connector":hq,"mark.range":hZ,"mark.rangeX":h0,"mark.rangeY":h5,"mark.path":h7,"mark.shape":dr,"mark.density":ds,"mark.heatmap":dm,"palette.category10":dv,"palette.category20":db,"scale.linear":dx,"scale.ordinal":d_,"scale.band":dT,"scale.identity":dD,"scale.point":dz,"scale.time":yu,"scale.log":yg,"scale.pow":yb,"scale.sqrt":yO,"scale.threshold":yE,"scale.quantile":yM,"scale.quantize":yS,"scale.sequential":yj,"scale.constant":yT,"theme.classic":yI,"theme.classicDark":yF,"theme.academy":yB,"theme.light":yL,"theme.dark":yD,"component.axisX":mI,"component.axisY":mR,"component.legendCategory":m6,"component.legendContinuous":vq,"component.legends":vY,"component.title":vQ,"component.sliderX":bN,"component.sliderY":bL,"component.scrollbarX":bF,"component.scrollbarY":bz,"animation.scaleInX":bB,"animation.scaleOutX":bW,"animation.scaleInY":b$,"animation.scaleOutY":bG,"animation.waveIn":bH,"animation.fadeIn":bV,"animation.fadeOut":bU,"animation.zoomIn":bq,"animation.zoomOut":bY,"animation.pathIn":bX,"animation.morphing":b3,"animation.growInX":b4,"animation.growInY":b6,"interaction.elementHighlight":x_,"interaction.elementHighlightByX":xS,"interaction.elementHighlightByColor":xP,"interaction.elementSelect":xA,"interaction.elementSelectByX":xT,"interaction.elementSelectByColor":xC,"interaction.fisheye":xL,"interaction.chartIndex":xR,"interaction.tooltip":x7,"interaction.legendFilter":Oc,"interaction.legendHighlight":Of,"interaction.brushHighlight":Ov,"interaction.brushXHighlight":Ox,"interaction.brushYHighlight":Ow,"interaction.brushAxisHighlight":OP,"interaction.brushFilter":OA,"interaction.brushXFilter":OT,"interaction.brushYFilter":OC,"interaction.sliderFilter":OI,"interaction.scrollbarFilter":OD,"interaction.poptip":O$,"interaction.treemapDrillDown":wb,"composition.spaceLayer":wM,"composition.spaceFlex":wS,"composition.facetRect":w$,"composition.repeatMatrix":wq,"composition.facetCircle":w0,"composition.timingKeyframe":w1,"labelTransform.overlapHide":kT,"labelTransform.overlapDodgeY":kN,"labelTransform.overflowHide":kL,"labelTransform.contrastReverse":kF}}function kB(t,e,n={},r=!1){return uc(t)||Array.isArray(t)&&r?t:tW(n,uo(t,e))}function kW(t,e={}){return uc(t)||Array.isArray(t)||!k$(t)?t:tW(e,t)}function k$(t){if(0===Object.keys(t).length)return!0;let{title:e,items:n}=t;return void 0!==e||void 0!==n}function kG(t,e){return"object"==typeof t?uo(t,e):t}var kH=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 kV(t,e){return du(t,t=>e[t])}function kU(t,e){return dc(t,t=>e[t])}function kq(t,e){let n=2.5*kY(t,e)-1.5*kK(t,e);return du(t,t=>e[t]>=n?e[t]:NaN)}function kY(t,e){return Ey(t,.25,t=>e[t])}function kX(t,e){return Ey(t,.5,t=>e[t])}function kK(t,e){return Ey(t,.75,t=>e[t])}function kZ(t,e){let n=2.5*kK(t,e)-1.5*kY(t,e);return dc(t,t=>e[t]<=n?e[t]:NaN)}function kQ(){return(t,e)=>{let{encode:n}=e,{y:r,x:i}=n,{value:o}=r,{value:a}=i;return[Array.from(s1(t,t=>a[+t]).values()).flatMap(t=>{let e=kq(t,o),n=kZ(t,o);return t.filter(t=>o[t]<e||o[t]>n)}),e]}}let kJ=t=>{let{data:e,encode:n,style:r={},tooltip:i={},transform:o,animate:a}=t,l=kH(t,["data","encode","style","tooltip","transform","animate"]),{point:s=!0}=r,u=kH(r,["point"]),{y:c}=n,f={y:c,y1:c,y2:c,y3:c,y4:c},p={y1:kY,y2:kX,y3:kK},h=kB(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=kB(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:kV},p),{y4:kU})],encode:Object.assign(Object.assign({},n),f),style:u,tooltip:h},l);let y=uo(u,"box"),g=uo(u,"point");return[Object.assign({type:"box",data:e,transform:[Object.assign(Object.assign({type:"groupX",y:kq},p),{y4:kZ})],encode:Object.assign(Object.assign({},n),f),style:y,tooltip:h,animate:kG(a,"box")},l),{type:"point",data:e,transform:[{type:kQ}],encode:n,style:Object.assign({},g),tooltip:d,animate:kG(a,"point")}]};kJ.props={};var k0=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 k1={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"]}}},k2={style:{shape:(t,e)=>{let{shape:n,radius:r}=t,i=k0(t,["shape","radius"]),o=uo(i,"pointer"),a=uo(i,"pin"),{shape:l}=o,s=k0(o,["shape"]),{shape:u}=a,c=k0(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=tA({startAngle:o,endAngle:a,innerRadius:h,outerRadius:r});g.push(["cartesian"]),d.update({transformations:g});let v=n.map(t=>d.map(t)),[b,x]=cu(v),[O,w]=f.getCenter(),E=Object.assign(Object.assign({x1:b,y1:x,x2:O,y2:w,stroke:y},s),i),k=Object.assign(Object.assign({cx:O,cy:w,stroke:y},c),i),M=uf(new lA);return uc(l)||("function"==typeof l?M.append(()=>l(v,e,d,p)):M.append("line").call(cn,E).node()),uc(u)||("function"==typeof u?M.append(()=>u(v,e,d,p)):M.append("circle").call(cn,k).node()),M.node()}},lineWidth:4,pointerLineCap:"round",pinR:10,pinFill:"#fff",radius:.6}},k5={type:"text",style:{x:"50%",y:"60%",textAlign:"center",textBaseline:"middle",fontSize:20,fontWeight:800,fill:"#888"}},k3=t=>{var e;let{data:n={},scale:r={},style:i={},animate:o={},transform:a=[]}=t,l=k0(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(u6(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=uo(i,"text"),d=(e=["pointer","pin"],Object.fromEntries(Object.entries(i).filter(([t])=>e.find(e=>t.startsWith(e)))));return[tW({},k1,Object.assign({type:"interval",transform:[{type:"stackY"}],data:u,scale:p,style:uo(i,"arc"),animate:"object"==typeof o?uo(o,"arc"):o},l)),tW({},k1,k2,Object.assign({type:"point",data:s,scale:p,style:d,animate:"object"==typeof o?uo(o,"indicator"):o},l)),tW({},k5,{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?uo(o,"text"):o})]};k3.props={};let k4=Math.PI/180;function k6(t){return t.text}function k8(){return"serif"}function k9(){return"normal"}function k7(t){return t.value}function Mt(){return 90*~~(2*Math.random())}function Me(){return 1}function Mn(){}function Mr(t){let e=t[0]/t[1];return function(t){return[e*(t*=.1)*Math.cos(t),t*Math.sin(t)]}}function Mi(t){let e=[],n=-1;for(;++n<t;)e[n]=0;return e}function Mo(t){return"function"==typeof t?t:function(){return t}}let Ma={archimedean:Mr,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 Ml=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 Ms={size:[500,500],fontSize:[14,28]};function Mu(t){return new Promise((e,n)=>{if(t instanceof HTMLImageElement)return void e(t);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 Mc=t=>e=>{var n,r,i,o;return n=void 0,r=void 0,i=void 0,o=function*(){let n,r,i,o,a,l,s,u,c,f,p,h,d,y,g=Object.assign({},Ms,t),v=(n=[256,256],r=k6,i=k8,o=k7,a=k9,l=Mt,s=Me,u=Mr,c=Math.random,f=Mn,p=[],h=null,d=1/0,(y={}).start=function(){var t;let e,g,[v,b]=n,x=((t=document.createElement("canvas")).width=t.height=1,e=Math.sqrt(t.getContext("2d").getImageData(0,0,1,1).data.length>>2),t.width=2048/e,t.height=2048/e,(g=t.getContext("2d")).fillStyle=g.strokeStyle="red",g.textAlign="center",{context:g,ratio:e}),O=y.board?y.board:Mi((n[0]>>5)*n[1]),w=p.length,E=[],k=p.map(function(t,e,n){return t.text=r.call(this,t,e,n),t.font=i.call(this,t,e,n),t.style=k9.call(this,t,e,n),t.weight=a.call(this,t,e,n),t.rotate=l.call(this,t,e,n),t.size=~~o.call(this,t,e,n),t.padding=s.call(this,t,e,n),t}).sort(function(t,e){return e.size-t.size}),M=-1,_=y.board?[{x:0,y:0},{x:v,y:b}]:void 0;function S(){let t=Date.now();for(;Date.now()-t<d&&++M<w;){let t=k[M];t.x=v*(c()+.5)>>1,t.y=b*(c()+.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*k4),r=Math.cos(e.rotate*k4),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*k4),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)}}(x,t,k,M),t.hasText&&function(t,e,r){let i=e.x,o=e.y,a=Math.sqrt(n[0]*n[0]+n[1]*n[1]),l=u(n),s=.5>c()?1:-1,f,p=-s,h,d;for(;(f=l(p+=s))&&!(Math.min(Math.abs(h=~~f[0]),Math.abs(d=~~f[1]))>=a);){;if((e.x=i+h,e.y=o+d,!(e.x+e.x0<0)&&!(e.y+e.y0<0)&&!(e.x+e.x1>n[0])&&!(e.y+e.y1>n[1]))&&(!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}(e,t,n[0]))&&(!r||e.x+e.x1>r[0].x&&e.x+e.x0<r[1].x&&e.y+e.y1>r[0].y&&e.y+e.y0<r[1].y)){let r=e.sprite,i=e.width>>5,o=n[0]>>5,a=e.x-(i<<4),l=127&a,s=32-l,u=e.y1-e.y0,c,f=(e.y+e.y0)*o+(a>>5);for(let e=0;e<u;e++){c=0;for(let n=0;n<=i;n++)t[f+n]|=c<<s|(n<i?(c=r[e*i+n])>>>l:0);f+=o}return delete e.sprite,!0}}return!1}(O,t,_)&&(f.call(null,"word",{cloud:y,word:t}),E.push(t),_?y.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)}(_,t):_=[{x:t.x+t.x0,y:t.y+t.y0},{x:t.x+t.x1,y:t.y+t.y1}],t.x-=n[0]>>1,t.y-=n[1]>>1)}y._tags=E,y._bounds=_,M>=w&&(y.stop(),f.call(null,"end",{cloud:y,words:E,bounds:_}))}return h&&clearInterval(h),h=setInterval(S,0),S(),y},y.stop=function(){return h&&(clearInterval(h),h=null),y},y.createMask=t=>{let e=document.createElement("canvas"),[r,i]=n;if(!r||!i)return;let o=r>>5,a=Mi((r>>5)*i);e.width=r,e.height=i;let l=e.getContext("2d");l.drawImage(t,0,0,t.width,t.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}y.board=a,y.hasImage=!0},y.timeInterval=function(t){d=null==t?1/0:t},y.words=function(t){p=t},y.size=function(t=[]){n=[+t[0],+t[1]]},y.text=function(t){r=Mo(t)},y.font=function(t){i=Mo(t)},y.fontWeight=function(t){a=Mo(t)},y.rotate=function(t){l=Mo(t)},y.spiral=function(t){u=Ma[t]||t},y.fontSize=function(t){o=Mo(t)},y.padding=function(t){s=Mo(t)},y.random=function(t){c=Mo(t)},y.on=function(t){f=Mo(t)},y);yield({set(t,e,n){if(void 0===g[t])return this;let r=e?e.call(null,g[t]):g[t];return n?n.call(null,r):"function"==typeof v[t]?v[t](r):v[t]=r,this},setAsync(t,e,n){var r,i,o,a;return r=this,i=void 0,o=void 0,a=function*(){if(void 0===g[t])return this;let r=e?yield e.call(null,g[t]):g[t];return n?n.call(null,r):"function"==typeof v[t]?v[t](r):v[t]=r,this},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())})}}).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,[du(n),dc(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",Mu,v.createMask),v.words([...e]);let b=v.start(),[x,O]=g.size,w=[{x:0,y:0},{x:x,y:O}],{_bounds:E=w,_tags:k,hasImage:M}=b,_=k.map(t=>{var{x:e,y:n}=t;return Object.assign(Object.assign({},Ml(t,["x","y"])),{x:e+x/2,y:n+O/2})}),[{x:S,y:P},{x:j,y:A}]=E,T={text:"",value:0,opacity:0,fontSize:0};return _.push(Object.assign(Object.assign({},T),{x:M?0:S,y:M?0:P}),Object.assign(Object.assign({},T),{x:M?x:j,y:M?O:A})),_},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())})};Mc.props={};var Mf=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 Mp=(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=Mf(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 Mc(Object.assign(Object.assign({},{size:[n,r]}),s))(c);return tW({},{axis:!1,type:"text",encode:{x:"x",y:"y",text:"text",rotate:"rotate",fontSize:"size"},scale:{x:{domain:[0,n],range:[0,1]},y:{domain:[0,r],range:[0,1]},fontSize:{type:"identity"},rotate:{type:"identity"}},style:{textAlign:"center"}},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())})};Mp.props={};let Mh={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 Md=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 My=(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=Md(i,["background","outline","wave"]),{border:f=2,distance:p=0}=s,h=Md(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),b=s.createElement("g",{}),[x,O]=n.getCenter(),w=n.getSize(),E=Math.min(...w)/2,k=(OU(o)?o:((t="circle")=>Mh[t]||Mh.circle)(o))(x,O,E,...w);if(Object.keys(l).length){let t=s.createElement("path",{style:Object.assign({path:k,fill:"#fff"},l)});b.appendChild(t)}if(a>0){let t=s.createElement("path",{style:{path:k}});b.appendChild(t),b.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++){let d=r<=1?1:i/(r-1),y=function(t,e,n,r,i,o){let a=4*Math.ceil(2*t/n*4),l=[],s=0;for(;s<-(2*Math.PI);)s+=2*Math.PI;for(;s>0;)s-=2*Math.PI;let u=i-t+(s=s/Math.PI/2*n)-2*t;l.push(["M",u,e]);let c=0;for(let t=0;t<a;++t){var f;let i=t%4,o=(f=t*n/4,0===i?[[f+.5*n/Math.PI/2,r/2],[f+.5*n/Math.PI,r],[f+n/4,r]]:1===i?[[f+.5*n/Math.PI/2*(Math.PI-2),r],[f+.5*n/Math.PI/2*(Math.PI-1),r/2],[f+n/4,0]]:2===i?[[f+.5*n/Math.PI/2,-r/2],[f+.5*n/Math.PI,-r],[f+n/4,-r]]:[[f+.5*n/Math.PI/2*(Math.PI-2),-r],[f+.5*n/Math.PI/2*(Math.PI-1),-r/2],[f+n/4,0]]);l.push(["C",o[0][0]+u,-o[0][1]+e,o[1][0]+u,-o[1][1]+e,o[2][0]+u,-o[2][1]+e]),t===a-1&&(c=o[2][0])}return l.push(["L",c+u,o+t]),l.push(["L",u,o+t]),l.push(["Z"]),l}(l,a+l*n,s,l/40,t,e),g=c.createElement("path",{style:{path:y,fill:f,opacity:(.2+.7*d)*Number(h||p)}});o.appendChild(g);try{if(!1===u)return;let t=[{transform:"translate(0, 0)"},{transform:`translate(${2*s}px, 0)`}];g.animate(t,{duration:2*(2500+2500*d),iterations:1/0})}catch(t){console.warn("off-screen group animate error!")}}}(x,O,1-a,y,v,b,t.getBBox().y,2*E,d,!0,s)}let M=s.createElement("path",{style:{path:k,fill:"transparent",lineWidth:f+2*p,stroke:"#fff"}}),_=s.createElement("path",{style:Object.assign(Object.assign(Object.assign({path:k,stroke:u,strokeOpacity:g,lineWidth:f},v),h),{fill:"transparent"})});return b.appendChild(M),b.appendChild(_),b}};My.props={};var Mg=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 Mm={axis:{x:!1,y:!1},legend:!1,tooltip:!1,encode:{x:"type",y:"percent"},scale:{y:{domain:[0,1]}},style:{shape:My},animate:{enter:{type:"fadeIn"}}},Mv={type:"text",style:{x:"50%",y:"50%",textAlign:"center",textBaseline:"middle",fontSize:20,fontWeight:800,fill:"#888"},animate:{enter:{type:"fadeIn"}}},Mb=t=>{let{data:e={},style:n={},animate:r}=t,i=Mg(t,["data","style","animate"]),o=Math.max(0,u6(e)?e:null==e?void 0:e.percent),a=[{percent:o,type:"liquid"}],l=Object.assign(Object.assign({},uo(n,"text")),uo(n,"content")),s=uo(n,"outline"),u=uo(n,"wave"),c=uo(n,"background");return[tW({},Mm,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)),tW({},Mv,{style:Object.assign({text:`${uO(100*o)} %`},l),animate:r})]};Mb.props={};var Mx=n(8115);function MO(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=MM(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){var n=e,r=t;for(let t=0;t<r.length;++t)if(ME(n,r[t])>r[t].radius+1e-10)return!1;return!0}),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=ME(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+=Mw(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(ME(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 Mw(t,e){return t*t*Math.acos(1-e/t)-(t-e)*Math.sqrt(e*(2*t-e))}function ME(t,e){return Math.sqrt((t.x-e.x)*(t.x-e.x)+(t.y-e.y)*(t.y-e.y))}function Mk(t,e,n){return n>=t+e?0:n<=Math.abs(t-e)?Math.PI*Math.min(t,e)*Math.min(t,e):Mw(t,t-(n*n-e*e+t*t)/(2*n))+Mw(e,e-(n*n-t*t+e*e)/(2*n))}function MM(t,e){let n=ME(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 M_(t,e,n){return Math.min(t,e)*Math.min(t,e)*Math.PI<=n+1e-10?Math.abs(t-e):(0,Mx.bisect)(function(r){return Mk(t,e,r)-n},0,t+e)}function MS(t,e){let n=function(t,e){let n,r=e&&e.lossFunction?e.lossFunction:MP,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=M_(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=M_(n.radius,t.radius,f[o].size),l=MM({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||MP;if(t.length>=8){let i=function(t,e){let n,r,i,o,a,l=(e=e||{}).restarts||10,s=[],u={};for(n=0;n<t.length;++n){let e=t[n];1==e.sets.length&&(u[e.sets[0]]=s.length,s.push(e))}let c=(o=(0,Mx.zerosM)(s.length,s.length),a=(0,Mx.zerosM)(s.length,s.length),t.filter(function(t){return 2==t.sets.length}).map(function(t){let e=u[t.sets[0]],n=u[t.sets[1]],r=M_(Math.sqrt(s[e].size/Math.PI),Math.sqrt(s[n].size/Math.PI),t.size);o[e][n]=o[n][e]=r;let i=0;t.size+1e-10>=Math.min(s[e].size,s[n].size)?i=1:t.size<=1e-10&&(i=-1),a[e][n]=a[n][e]=i}),{distances:o,constraints:a}),f=c.distances,p=c.constraints,h=(0,Mx.norm2)(f.map(Mx.norm2))/f.length;f=f.map(function(t){return t.map(function(t){return t/h})});let d=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;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,f,p)};for(n=0;n<l;++n){let t=(0,Mx.zeros)(2*f.length).map(Math.random);i=(0,Mx.conjugateGradient)(d,t,e),(!r||i.fx<r.fx)&&(r=i)}let y=r.x,g={};for(n=0;n<s.length;++n){let t=s[n];g[t.sets[0]]={x:y[2*n]*h,y:y[2*n+1]*h,radius:Math.sqrt(t.size/Math.PI)}}if(e.history)for(n=0;n<e.history.length;++n)(0,Mx.scale)(e.history[n].x,h);return g}(t,e);r(i,t)+1e-8<r(n,t)&&(n=i)}return n}function MP(t,e){let n=0;for(let r=0;r<e.length;++r){let i,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=Mk(e.radius,n.radius,ME(e,n))}else i=MO(o.sets.map(function(e){return t[e]}));n+=(o.hasOwnProperty("weight")?o.weight:1)*(i-o.size)*(i-o.size)}}return n}let Mj=t=>{let{sets:e="sets",size:n="size",as:r=["key","path"],padding:i=0}=t,[o,a]=r;return t=>{let r,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||MS,i=e.lossFunction||MP,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&&(a[[r=n.sets[0],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,Mx.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=[],a=[];for(let e in t)t.hasOwnProperty(e)&&(a.push(e),o.push(t[e]));e-=2*r,n-=2*r;let l={xRange:(i=function(t){return{max:Math.max.apply(null,o.map(function(e){return e[t]+e.radius})),min:Math.min.apply(null,o.map(function(e){return e[t]-e.radius}))}})("x"),yRange:i("y")},s=l.xRange,u=l.yRange;if(s.max==s.min||u.max==u.min)return console.log("not scaling solution: zero size detected"),t;let c=e/(s.max-s.min),f=Math.min(n/(u.max-u.min),c),p=(e-(s.max-s.min)*f)/2,h=(n-(u.max-u.min)*f)/2,d={};for(let t=0;t<o.length;++t){let e=o[t];d[a[t]]={radius:f*e.radius,x:r+p+(e.x-s.min)*f,y:r+h+(e.y-u.min)*f}}return d}(s,t,e,i);let o=function(t){let e={};MO(t,e);let n=e.arcs;if(0===n.length)return"M 0 0";if(1==n.length){var r,i,o;let t,e,a=n[0].circle;return r=a.x,i=a.y,o=a.radius,t=[],e=r-o,t.push("M",e,i),t.push("A",o,o,0,1,0,e+2*o,i),t.push("A",o,o,0,1,0,e,i),t.join(" ")}{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,r.p1.x,r.p1.y)}return t.join(" ")}}(n.map(t=>r[t]));return/[zZ]$/.test(o)||(o+=" Z"),o}})})}};function MA(){return{"data.venn":Mj,"mark.boxplot":kJ,"mark.gauge":k3,"mark.wordCloud":Mp,"mark.liquid":Mb}}function MT(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,b=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+b)/2))?g=a:b=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+b)/2))?g=a:b=a;while((f=c<<1|u)==(p=(s>=a)<<1|l>=o));return i[p]=h,i[f]=d,t}function MC(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i}function MN(t){return t[0]}function ML(t){return t[1]}function MI(t,e,n){var r=new MR(null==e?MN:e,null==n?ML:n,NaN,NaN,NaN,NaN);return null==t?r:r.addAll(t)}function MR(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 MD(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}Mj.props={};var MF=MI.prototype=MR.prototype;function Mz(t){return function(){return t}}function MB(t){return(t()-.5)*1e-6}MF.copy=function(){var t,e,n=new MR(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=MD(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]=MD(e));return n},MF.add=function(t){let e=+this._x.call(null,t),n=+this._y.call(null,t);return MT(this.cover(e,n),e,n,t)},MF.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)MT(this,a[n],l[n],t[n]);return this},MF.cover=function(t,e){if(isNaN(t*=1)||isNaN(e*=1))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},MF.data=function(){var t=[];return this.visit(function(e){if(!e.length)do t.push(e.data);while(e=e.next)}),t},MF.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]]},MF.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 MC(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 MC(y[3],g,v,a,l),new MC(y[2],i,v,g,l),new MC(y[1],g,o,a,v),new MC(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 b=t-this._x.call(null,y.data),x=e-this._y.call(null,y.data),O=b*b+x*x;if(O<n){var w=Math.sqrt(n=O);c=t-w,f=e-w,p=t+w,h=e+w,r=y.data}}return r},MF.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: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._root=i,this},MF.removeAll=function(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this},MF.root=function(){return this._root},MF.size=function(){var t=0;return this.visit(function(e){if(!e.length)do++t;while(e=e.next)}),t},MF.visit=function(t){var e,n,r,i,o,a,l=[],s=this._root;for(s&&l.push(new MC(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 MC(n,u,c,o,a)),(n=s[2])&&l.push(new MC(n,r,c,u,a)),(n=s[1])&&l.push(new MC(n,u,i,o,c)),(n=s[0])&&l.push(new MC(n,r,i,u,c))}return this},MF.visitAfter=function(t){var e,n=[],r=[];for(this._root&&n.push(new MC(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 MC(o,a,l,c,f)),(o=i[1])&&n.push(new MC(o,c,l,s,f)),(o=i[2])&&n.push(new MC(o,a,f,c,u)),(o=i[3])&&n.push(new MC(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},MF.x=function(t){return arguments.length?(this._x=t,this):this._x},MF.y=function(t){return arguments.length?(this._y=t,this):this._y};var MW={value:()=>{}};function M$(){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 MG(r)}function MG(t){this._=t}function MH(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=MW,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}MG.prototype=M$.prototype={constructor:MG,on:function(t,e){var n,r=this._,i=(t+"").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}}),o=-1,a=i.length;if(arguments.length<2){for(;++o<a;)if((n=(t=i[o]).type)&&(n=function(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}(r[n],t.name)))return n;return}if(null!=e&&"function"!=typeof e)throw Error("invalid callback: "+e);for(;++o<a;)if(n=(t=i[o]).type)r[n]=MH(r[n],t.name,e);else if(null==e)for(n in r)r[n]=MH(r[n],t.name,null);return this},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new MG(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)}};var MV,MU,Mq,MY,MX,MK,MZ,MQ,MJ,M0,M1,M2,M5,M3,M4,M6,M8,M9,M7,_t,_e,_n,_r,_i,_o,_a,_l,_s,_u,_c,_f,_p,_h,_d,_y,_g,_m,_v,_b,_x,_O,_w,_E,_k,_M,__,_S,_P,_j,_A,_T,_C,_N,_L,_I,_R,_D,_F,_z,_B,_W=0,_$=0,_G=0,_H=0,_V=0,_U=0,_q="object"==typeof performance&&performance.now?performance:Date,_Y="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function _X(){return _V||(_Y(_K),_V=_q.now()+_U)}function _K(){_V=0}function _Z(){this._call=this._time=this._next=null}function _Q(t,e,n){var r=new _Z;return r.restart(t,e,n),r}function _J(){_V=(_H=_q.now())+_U,_W=_$=0;try{_X(),++_W;for(var t,e=_z;e;)(t=_V-e._time)>=0&&e._call.call(void 0,t),e=e._next;--_W}finally{_W=0,function(){for(var t,e,n=_z,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:_z=e);_B=t,_1(r)}(),_V=0}}function _0(){var t=_q.now(),e=t-_H;e>1e3&&(_U-=e,_H=t)}function _1(t){!_W&&(_$&&(_$=clearTimeout(_$)),t-_V>24?(t<1/0&&(_$=setTimeout(_J,t-_q.now()-_U)),_G&&(_G=clearInterval(_G))):(_G||(_H=_q.now(),_G=setInterval(_0,1e3)),_W=1,_Y(_J)))}function _2(t){return t.x}function _5(t){return t.y}_Z.prototype=_Q.prototype={constructor:_Z,restart:function(t,e,n){if("function"!=typeof t)throw TypeError("callback is not a function");n=(null==n?_X():+n)+(null==e?0:+e),this._next||_B===this||(_B?_B._next=this:_z=this,_B=this),this._call=t,this._time=n,_1()},stop:function(){this._call&&(this._call=null,this._time=1/0,_1())}};var _3=Math.PI*(3-Math.sqrt(5));function _4(t){return t.index}function _6(t,e){var n=t.get(e);if(!n)throw Error("node not found: "+e);return n}var _8=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 _9={joint:!0},_7={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}},St={type:"point",axis:!1,legend:!1,encode:{x:"x",y:"y",size:5,color:"group",shape:"point"},style:{stroke:"#fff"}},Se={text:""},Sn=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},_8(n,["nodeKey","linkKey"])),h=uo(p,"node"),d=uo(p,"link"),{links:y,nodes:g}=cU(e,p),{nodesData:v,linksData:b}=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=Mz(-30),a=1,l=1/0,s=.81;function u(n){var i,o=t.length,a=MI(t,_2,_5).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=MB(n))*f),0===p&&(d+=(p=MB(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=MB(n))*f),0===p&&(d+=(p=MB(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:Mz(+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=_4,s=function(t){return 1/Math.min(i[t.source.index],i[t.target.index])},u=Mz(30),c=1;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,d=((d=Math.sqrt((p=(f=s.target).x+f.vx-u.x-u.vx||MB(a))*p+(h=f.y+f.vy-u.y-u.vy||MB(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=_6(f,s.source)),"object"!=typeof s.target&&(s.target=_6(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 null==t&&(t=[]),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:Mz(+t),h(),f):s},f.distance=function(t){return arguments.length?(u="function"==typeof t?t:Mz(+t),d(),f):u},f})(i).id(cH(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=_Q(p),c=M$("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*_3;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)(a=(i=e-(l=t[u]).x)*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=Mz(.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=Mz(null==t?0:+t)),o.initialize=function(t){e=t,a()},o.strength=function(t){return arguments.length?(i="function"==typeof t?t:Mz(+t),a(),o):i},o.x=function(e){return arguments.length?(t="function"==typeof e?e:Mz(+e),a(),o):t},o}()).force("y",function(t){var e,n,r,i=Mz(.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=Mz(null==t?0:+t)),o.initialize=function(t){e=t,a()},o.strength=function(t){return arguments.length?(i="function"==typeof t?t:Mz(+t),a(),o):i},o.y=function(e){return arguments.length?(t="function"==typeof e?e:Mz(+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},tW({},_9,o),p),x=kB(u,"link",{items:[t=>({name:"source",value:cH(f)(t.source)}),t=>({name:"target",value:cH(f)(t.target)})]}),O=kB(u,"node",{items:[t=>({name:"key",value:cH(c)(t)})]},!0);return[tW({},_7,{data:b,encode:d,labels:l,style:uo(i,"link"),tooltip:x,animate:kG(s,"link")}),tW({},St,{data:v,encode:Object.assign({},h),scale:r,style:uo(i,"node"),tooltip:O,labels:[Object.assign(Object.assign({},Se),uo(i,"label")),...a],animate:kG(s,"link")})]};function Sr(t,e){return t.parent===e.parent?1:2}function Si(t){var e=t.children;return e?e[0]:t.t}function So(t){var e=t.children;return e?e[e.length-1]:t.t}function Sa(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}function Sl(){var t=Sr,e=1,n=1,r=null;function i(i){var s=function(t){for(var e,n,r,i,o,a=new Sa(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 Sa(r[i],i)),n.parent=e;return(a.parent=new Sa(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=e,s=e,u=n,c=l.parent.children[0],f=l.m,p=s.m,h=u.m,d=c.m;u=So(u),l=Si(l),u&&l;)c=Si(c),(s=So(s)).a=e,(a=u.z+h-l.z-f+t(u._,l._))>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=u,o=r,i.a.parent===e.parent?i.a:o),e,a),f+=a,p+=a),h+=u.m,f+=l.m,d+=c.m,p+=s.m;u&&!So(s)&&(s.t=u,s.m+=h-p),l&&!Si(c)&&(c.t=l,c.m+=f-d,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 Ss(t,e){return t.parent===e.parent?1:2}function Su(t,e){return t+e.x}function Sc(t,e){return Math.max(t,e.y)}function Sf(){var t=Ss,e=1,n=1,r=!1;function i(i){var o,a=0;i.eachAfter(function(e){var n=e.children;n?(e.x=n.reduce(Su,0)/n.length,e.y=1+n.reduce(Sc,0)):(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}Sn.props={},Sa.prototype=Object.create(O6.prototype);let Sp=t=>e=>n=>{let{field:r="value",nodeSize:i,separation:o,sortBy:a,as:l=["x","y"]}=e,[s,u]=l,c=O1(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}},Sh=t=>Sp(Sf)(t);Sh.props={};let Sd=t=>Sp(Sl)(t);Sd.props={};let Sy={sortBy:(t,e)=>e.value-t.value},Sg={axis:!1,legend:!1,type:"point",encode:{x:"x",y:"y",size:2,shape:"point"}},Sm={type:"link",encode:{x:"x",y:"y",shape:"smooth"}},Sv={text:"",fontSize:10},Sb=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}=Sd(Object.assign(Object.assign(Object.assign({},Sy),o),{field:c}))(e),h=kB(u,"node",{title:"name",items:["value"]},!0),d=kB(u,"link",{title:"",items:[t=>({name:"source",value:t.source.name}),t=>({name:"target",value:t.target.name})]});return[tW({},Sm,{data:p,encode:uo(n,"link"),scale:uo(r,"link"),labels:l,style:Object.assign({stroke:"#999"},uo(i,"link")),tooltip:d,animate:kG(s,"link")}),tW({},Sg,{data:f,scale:uo(r,"node"),encode:uo(n,"node"),labels:[Object.assign(Object.assign({},Sv),uo(i,"label")),...a],style:Object.assign({},uo(i,"node")),tooltip:h,animate:kG(s,"node")})]};function Sx(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 SO(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 Sw(t,e){for(var n=0;n<e.length;++n)if(!SO(t,e[n]))return!1;return!0}function SE(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 Sk(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,b=r*r+i*i-o*o,x=b-a*a-l*l+s*s,O=b-u*u-c*c+f*f,w=h*d-p*y,E=(d*O-y*x)/(2*w)-r,k=(y*g-d*v)/w,M=(h*x-p*O)/(2*w)-i,_=(p*v-h*g)/w,S=k*k+_*_-1,P=2*(o+E*k+M*_),j=E*E+M*M-o*o,A=-(Math.abs(S)>1e-6?(P+Math.sqrt(P*P-4*S*j))/(2*S):j/P);return{x:r+E+k*A,y:i+M+_*A,r:A}}function SM(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 S_(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 SS(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 SP(t){this._=t,this.next=null,this.previous=null}function Sj(t){return Math.sqrt(t.value)}function SA(t){return function(e){e.children||(e.r=Math.max(0,+t(e)||0))}}function ST(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;SM(r,n,i=t[2]),n=new SP(n),r=new SP(r),i=new SP(i),n.next=i.previous=r,r.next=n.previous=i,i.next=r.previous=n;e:for(s=3;s<o;++s){SM(n._,r._,i=t[s]),i=new SP(i),u=r.next,c=n.previous,f=r._.r,p=n._.r;do if(f<=p){if(S_(u._,i._)){r=u,n.next=r,r.previous=n,--s;continue e}f+=u._.r,u=u.next}else{if(S_(c._,i._)){(n=c).next=r,r.previous=n,--s;continue e}p+=c._.r,c=c.previous}while(u!==c.next);for(i.previous=n,i.next=r,n.next=r.previous=r=i,a=SS(n);(i=i.next)!==r;)(l=SS(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&&SO(r,n)?++i:(r=function(t){switch(t.length){case 1:var e;return{x:(e=t[0]).x,y:e.y,r:e.r};case 2:return SE(t[0],t[1]);case 3:return Sk(t[0],t[1],t[2])}}(a=function(t,e){var n,r;if(Sw(e,t))return[e];for(n=0;n<t.length;++n)if(Sx(e,t[n])&&Sw(SE(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(Sx(SE(t[n],t[r]),e)&&Sx(SE(t[n],e),t[r])&&Sx(SE(t[r],e),t[n])&&Sw(Sk(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 SC(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)}}Sb.props={};var SN=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 SL={text:"",position:"inside",textOverflow:"clip",wordWrap:!0,maxLines:1,wordWrapWidth:t=>2*t.r},SI={title:t=>t.data.name,items:[{field:"value"}]},SR=(t,e)=>{let{width:n,height:r}=e,{data:i,encode:o={},scale:a={},style:l={},layout:s={},labels:u=[],tooltip:c={}}=t,f=SN(t,["data","encode","scale","style","layout","labels","tooltip"]),p={type:"point",axis:!1,legend:!1,scale:{x:{domain:[0,n]},y:{domain:[0,r]},size:{type:"identity"}},encode:{x:"x",y:"y",size:"r",shape:"point"},style:{fill:o.color?void 0:t=>0===t.height?"#ddd":"#fff",stroke:o.color?void 0:t=>0===t.height?"":"#000"}},h=((t,e,n)=>{let{value:r}=n,i=tF(t)?wn().path(e.path)(t):O1(t);return r?i.sum(t=>cH(r)(t)).sort(e.sort):i.count(),(function(){var t=null,e=1,n=1,r=wd;function i(i){let o,a=(o=1,()=>(o=(1664525*o+0x3c6ef35f)%0x100000000)/0x100000000);return i.x=e/2,i.y=n/2,t?i.eachBefore(SA(t)).eachAfter(ST(r,.5,a)).eachBefore(SC(1)):i.eachBefore(SA(Sj)).eachAfter(ST(wd,1,a)).eachAfter(ST(r,i.r/Math.min(e,n),a)).eachBefore(SC(Math.min(e,n)/(2*i.r))),i}return i.radius=function(e){return arguments.length?(t=OQ(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:wy(+t),i):r},i})().size(e.size).padding(e.padding)(i),i.descendants()})(i,tW({},{size:[n,r],padding:0,sort:(t,e)=>e.value-t.value},s),tW({},p.encode,o)),d=uo(l,"label");return tW({},p,Object.assign(Object.assign({data:h,encode:o,scale:a,style:l,labels:[Object.assign(Object.assign({},SL),d),...u]},f),{tooltip:kW(c,SI),axis:!1}))};function SD(t){return t.target.depth}function SF(t,e){return t.sourceLinks.length?t.depth:e-1}function Sz(t){return function(){return t}}function SB(t,e){return S$(t.source,e.source)||t.index-e.index}function SW(t,e){return S$(t.target,e.target)||t.index-e.index}function S$(t,e){return t.y0-e.y0}function SG(t){return t.value}function SH(t){return t.index}function SV(t){return t.nodes}function SU(t){return t.links}function Sq(t,e){let n=t.get(e);if(!n)throw Error("missing: "+e);return n}function SY({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}}SR.props={};let SX={nodeAlign:"justify",nodeWidth:.008,nodePadding:.03,nodes:t=>t.nodes,links:t=>t.links,nodeSort:void 0,linkSort:void 0,iterations:6},SK={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?du(t.sourceLinks,SD)-1:0},justify:SF},SZ=t=>e=>{let n,{nodeId:r,nodeSort:i,nodeAlign:o,nodeWidth:a,nodePadding:l,nodeDepth:s,nodes:u,links:c,linkSort:f,iterations:p}=Object.assign({},SX,t),h=(function(){let t,e,n,r=0,i=0,o=1,a=1,l=24,s=8,u,c=SH,f=SF,p=SV,h=SU,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=Sq(r,n)),"object"!=typeof i&&(i=t.target=Sq(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(Eg(e.sourceLinks,SG),Eg(e.targetLinks,SG)):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,r=Math.max(dc(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(dc(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)/(dc(c,t=>t.length)-1));let p=du(c,t=>(a-i-(t.length-1)*u)/Eg(t,SG));for(let t of c){let e=i;for(let n of t)for(let t of(n.y0=e,n.y1=e+n.value*p,e=n.y1+u,n.sourceLinks))t.width=t.value*p;e=(a-e+u)/(t.length+1);for(let n=0;n<t.length;++n){let r=t[n];r.y0+=e*(n+1),r.y1+=e*(n+1)}var h=t;if(void 0===n)for(let{sourceLinks:t,targetLinks:e}of h)t.sort(SW),e.sort(SB)}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,x(t)}void 0===e&&i.sort(S$),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,x(t)}void 0===e&&o.sort(S$),o.length&&g(o,r)}}(c,n,r)}}(v),SY(v),v}function g(t,e){let n=t.length>>1,r=t[n];b(t,r.y0-u,n-1,e),v(t,r.y1+u,n+1,e),b(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 b(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 x({sourceLinks:t,targetLinks:e}){if(void 0===n){for(let{source:{sourceLinks:t}}of e)t.sort(SW);for(let{target:{targetLinks:e}}of t)e.sort(SB)}}return y.update=function(t){return SY(t),t},y.nodeId=function(t){return arguments.length?(c="function"==typeof t?t:Sz(t),y):c},y.nodeAlign=function(t){return arguments.length?(f="function"==typeof t?t:Sz(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:Sz(t),y):p},y.links=function(t){return arguments.length?(h="function"==typeof t?t:Sz(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},y})().nodeSort(i).linkSort(f).links(c).nodes(u).nodeWidth(a).nodePadding(l).nodeDepth(s).nodeAlign("string"==(n=typeof o)?SK[o]||SF:"function"===n?o:SF).iterations(p).extent([[0,0],[1,1]]);"function"==typeof r&&h.nodeId(r);let{nodes:d,links:y}=h(e);return{nodes:d.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]})}),links:y.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]})})}};SZ.props={};var SQ=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 SJ={nodeId:t=>t.key,nodeWidth:.02,nodePadding:.02},S0={type:"polygon",axis:!1,legend:!1,encode:{shape:"polygon",x:"x",y:"y"},scale:{x:{type:"identity"},y:{type:"identity"}},style:{stroke:"#000"}},S1={type:"polygon",axis:!1,legend:!1,encode:{shape:"ribbon",x:"x",y:"y"},style:{fillOpacity:.5,stroke:void 0}},S2={textAlign:t=>t.x[0]<.5?"start":"end",position:t=>t.x[0]<.5?"right":"left",fontSize:10},S5=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}=cU(e,n),p=uo(n,"node"),h=uo(n,"link"),{key:d=t=>t.key,color:y=d}=p,{links:g,nodes:v}=SZ(Object.assign(Object.assign(Object.assign({},SJ),{nodeId:cH(d)}),o))({links:c,nodes:f}),b=uo(i,"label"),{text:x=d,spacing:O=5}=b,w=SQ(b,["text","spacing"]),E=cH(d),k=kB(u,"node",{title:E,items:[{field:"value"}]},!0),M=kB(u,"link",{title:"",items:[t=>({name:"source",value:E(t.source)}),t=>({name:"target",value:E(t.target)})]});return[tW({},S0,{data:v,encode:Object.assign(Object.assign({},p),{color:y}),scale:r,style:uo(i,"node"),labels:[Object.assign(Object.assign(Object.assign({},S2),{text:x,dx:t=>t.x[0]<.5?O:-O}),w),...a],tooltip:k,animate:kG(s,"node"),axis:!1}),tW({},S1,{data:g,encode:h,labels:l,style:Object.assign({fill:h.color?void 0:"#aaa",strokeWidth:0},uo(i,"link")),tooltip:M,animate:kG(s,"link")})]};function S3(t,e){return e.value-t.value}function S4(t,e){return e.frequency-t.frequency}function S6(t,e){return`${t.id}`.localeCompare(`${e.id}`)}function S8(t,e){return`${t.name}`.localeCompare(`${e.name}`)}S5.props={};let S9={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},S7=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({},S9),t);return function(t){var f,p,h;let d,y,g,v=t.nodes.map(t=>Object.assign({},t)),b=t.edges.map(t=>Object.assign({},t));return f=v,(p=b).forEach(t=>{t.source=a(t),t.target=l(t),t.sourceWeight=s(t),t.targetWeight=u(t)}),d=s1(p,t=>t.source),y=s1(p,t=>t.target),f.forEach(t=>{t.id=o(t);let e=d.has(t.id)?d.get(t.id):[],n=y.has(t.id)?y.get(t.id):[];t.frequency=e.length+n.length,t.value=Eg(e,t=>t.sourceWeight)+Eg(n,t=>t.targetWeight)}),h=v,(g="function"==typeof c?c:tm[c])&&h.sort(g),function(t){let o=t.length;if(!o)throw un("Invalid nodes: it's empty!");if(!r){let n=1/o;return t.forEach((t,r)=>{t.x=(r+.5)*n,t.y=e})}let a=i/(2*o),l=t.reduce((t,e)=>t+=e.value,0);t.reduce((t,r)=>{r.weight=r.value/l,r.width=r.weight*(1-i),r.height=n;let o=a+t,s=o+r.width,u=e-n/2,c=u+n;return r.x=[o,s,s,o],r.y=[u,u,c,c],t+r.width+2*a},0)}(v),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=s1(n,t=>t.source),s=s1(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})})}(v,b),{nodes:v,edges:b}}})(t)(e);S7.props={};var Pt=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={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},Pn={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}},Pr={type:"polygon",axis:!1,legend:!1,encode:{shape:"ribbon",x:"x",y:"y"},style:{opacity:.5,lineWidth:1,strokeWidth:1}},Pi={position:"outside",fontSize:10},Po=(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}=cU(n,r),h=uo(r,"node"),d=uo(r,"link"),{key:y=t=>t.key,color:g=y}=h,{linkEncodeColor:v=t=>t.source}=d,{nodeWidthRatio:b=Pe.thickness,nodePaddingRatio:x=Pe.marginRatio}=a,O=Pt(a,["nodeWidthRatio","nodePaddingRatio"]),{nodes:w,edges:E}=S7(Object.assign(Object.assign(Object.assign(Object.assign({},Pe),{id:cH(y),thickness:b,marginRatio:x}),O),{weight:!0}))({nodes:f,edges:p}),k=uo(o,"label"),{text:M=y}=k,_=Pt(k,["text"]),S=kB(c,"node",{title:"",items:[t=>({name:t.key,value:t.value})]},!0),P=kB(c,"link",{title:"",items:[t=>({name:`${t.source} -> ${t.target}`,value:t.value})]}),{height:j,width:A}=e,T=Math.min(j,A);return[tW({},Pr,{data:E,encode:Object.assign(Object.assign({},d),{color:v}),labels:s,style:Object.assign({fill:v?void 0:"#aaa"},uo(o,"link")),tooltip:P,animate:kG(u,"link")}),tW({},Pn,{data:w,encode:Object.assign(Object.assign({},h),{color:g}),scale:i,style:uo(o,"node"),coordinate:{type:"polar",outerRadius:(T-20)/T,startAngle:-(2*Math.PI),endAngle:0},labels:[Object.assign(Object.assign(Object.assign({},Pi),{text:M}),_),...l],tooltip:S,animate:kG(u,"node"),axis:!1})]};Po.props={};var Pa=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={fontSize:10,text:t=>m3(t.path),position:"inside",fill:"#000",textOverflow:"clip",wordWrap:!0,maxLines:1,wordWrapWidth:t=>t.x1-t.x0},Ps={title:t=>{var e,n;return null==(n=null==(e=t.path)?void 0:e.join)?void 0:n.call(e,".")},items:[{field:"value"}]},Pu={title:t=>m3(t.path),items:[{field:"value"}]},Pc=(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=Pa(t,["data","encode","scale","style","layout","labels","tooltip"]),h=OV(i,["interaction","treemapDrillDown"]),d=tW({},{tile:"treemapSquarify",ratio:.5*(1+Math.sqrt(5)),size:[n,r],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},u,{layer:h?t=>1===t.depth:u.layer}),[y,g]=wg(o,d,a),v=uo(s,"label");return tW({},{type:"rect",axis:!1,encode:{x:"x",y:"y",key:"id",color:t=>t.path[1]},scale:{x:{domain:[0,n],range:[0,1]},y:{domain:[0,r],range:[0,1]}},style:{stroke:"#fff"},state:{active:{opacity:.6},inactive:{opacity:1}}},Object.assign(Object.assign({data:y,scale:l,style:s,labels:[Object.assign(Object.assign({},Pl),v),...c]},p),{encode:a,tooltip:kW(f,Ps),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=>m3(t.path)},a),tooltip:kW(f,Pu)}:{})};function Pf(){return{"data.arc":S7,"data.cluster":Sh,"mark.forceGraph":Sn,"mark.tree":Sb,"mark.pack":SR,"mark.sankey":S5,"mark.chord":Po,"mark.treemap":Pc}}Pc.props={};var Pp=t=>t;function Ph(t,e){t&&Py.hasOwnProperty(t.type)&&Py[t.type](t,e)}var Pd={Feature:function(t,e){Ph(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)Ph(n[r].geometry,e)}},Py={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){Pg(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)Pg(n[r],e,0)},Polygon:function(t,e){Pm(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)Pm(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)Ph(n[r],e)}};function Pg(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 Pm(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)Pg(t[n],e,1);e.polygonEnd()}function Pv(t,e){t&&Pd.hasOwnProperty(t.type)?Pd[t.type](t,e):Ph(t,e)}class Pb{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 Px=Math.PI,PO=Px/2,Pw=Px/4,PE=2*Px,Pk=180/Px,PM=Px/180,P_=Math.abs,PS=Math.atan,PP=Math.atan2,Pj=Math.cos,PA=Math.ceil,PT=Math.exp,PC=Math.log,PN=Math.pow,PL=Math.sin,PI=Math.sign||function(t){return t>0?1:t<0?-1:0},PR=Math.sqrt,PD=Math.tan;function PF(t){return t>1?0:t<-1?Px:Math.acos(t)}function Pz(t){return t>1?PO:t<-1?-PO:Math.asin(t)}function PB(){}var PW,P$,PG,PH,PV=new Pb,PU=new Pb,Pq={point:PB,lineStart:PB,lineEnd:PB,polygonStart:function(){Pq.lineStart=PY,Pq.lineEnd=PZ},polygonEnd:function(){Pq.lineStart=Pq.lineEnd=Pq.point=PB,PV.add(P_(PU)),PU=new Pb},result:function(){var t=PV/2;return PV=new Pb,t}};function PY(){Pq.point=PX}function PX(t,e){Pq.point=PK,PW=PG=t,P$=PH=e}function PK(t,e){PU.add(PH*t-PG*e),PG=t,PH=e}function PZ(){PK(PW,P$)}var PQ,PJ,P0,P1,P2=1/0,P5=1/0,P3=-1/0,P4=P3,P6={point:function(t,e){t<P2&&(P2=t),t>P3&&(P3=t),e<P5&&(P5=e),e>P4&&(P4=e)},lineStart:PB,lineEnd:PB,polygonStart:PB,polygonEnd:PB,result:function(){var t=[[P2,P5],[P3,P4]];return P3=P4=-(P5=P2=1/0),t}},P8=0,P9=0,P7=0,jt=0,je=0,jn=0,jr=0,ji=0,jo=0,ja={point:jl,lineStart:js,lineEnd:jf,polygonStart:function(){ja.lineStart=jp,ja.lineEnd=jh},polygonEnd:function(){ja.point=jl,ja.lineStart=js,ja.lineEnd=jf},result:function(){var t=jo?[jr/jo,ji/jo]:jn?[jt/jn,je/jn]:P7?[P8/P7,P9/P7]:[NaN,NaN];return P8=P9=P7=jt=je=jn=jr=ji=jo=0,t}};function jl(t,e){P8+=t,P9+=e,++P7}function js(){ja.point=ju}function ju(t,e){ja.point=jc,jl(P0=t,P1=e)}function jc(t,e){var n=t-P0,r=e-P1,i=PR(n*n+r*r);jt+=i*(P0+t)/2,je+=i*(P1+e)/2,jn+=i,jl(P0=t,P1=e)}function jf(){ja.point=jl}function jp(){ja.point=jd}function jh(){jy(PQ,PJ)}function jd(t,e){ja.point=jy,jl(PQ=P0=t,PJ=P1=e)}function jy(t,e){var n=t-P0,r=e-P1,i=PR(n*n+r*r);jt+=i*(P0+t)/2,je+=i*(P1+e)/2,jn+=i,jr+=(i=P1*t-P0*e)*(P0+t),ji+=i*(P1+e),jo+=3*i,jl(P0=t,P1=e)}function jg(t){this._context=t}jg.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,PE)}},result:PB};var jm,jv,jb,jx,jO,jw=new Pb,jE={point:PB,lineStart:function(){jE.point=jk},lineEnd:function(){jm&&jM(jv,jb),jE.point=PB},polygonStart:function(){jm=!0},polygonEnd:function(){jm=null},result:function(){var t=+jw;return jw=new Pb,t}};function jk(t,e){jE.point=jM,jv=jx=t,jb=jO=e}function jM(t,e){jx-=t,jO-=e,jw.add(PR(jx*jx+jO*jO)),jx=t,jO=e}class j_{constructor(t){this._append=null==t?jS:function(t){let e=Math.floor(t);if(!(e>=0))throw RangeError(`invalid digits: ${t}`);if(e>15)return jS;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 jS(t){let e=1;this._+=t[0];for(let n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function jP(t,e){let n=3,r=4.5,i,o;function a(t){return t&&("function"==typeof r&&o.pointRadius(+r.apply(this,arguments)),Pv(t,i(o))),o.result()}return a.area=function(t){return Pv(t,i(Pq)),Pq.result()},a.measure=function(t){return Pv(t,i(jE)),jE.result()},a.bounds=function(t){return Pv(t,i(P6)),P6.result()},a.centroid=function(t){return Pv(t,i(ja)),ja.result()},a.projection=function(e){return arguments.length?(i=null==e?(t=null,Pp):(t=e).stream,a):t},a.context=function(t){return arguments.length?(o=null==t?(e=null,new j_(n)):new jg(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 j_(n)),a},a.projection(t).digits(n).context(e)}function jj(t,e,n){t*=1,e*=1,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 jA(t,e,n){var r=jj(t,e-1e-6,n).concat(e);return function(t){return r.map(function(e){return[t,e]})}}function jT(t,e,n){var r=jj(t,e-1e-6,n).concat(e);return function(t){return r.map(function(e){return[e,t]})}}function jC(){var t,e=[];return{point:function(e,n,r){t.push([e,n,r])},lineStart:function(){e.push(t=[])},lineEnd:PB,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}function jN(t,e){return 1e-6>P_(t[0]-e[0])&&1e-6>P_(t[1]-e[1])}function jL(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 jI(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(jN(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 jL(r,t,null,!0)),s.push(n.o=new jL(r,null,n,!1)),l.push(n=new jL(a,t,null,!1)),s.push(n.o=new jL(a,null,n,!0))}}),l.length){for(s.sort(e),jR(l),jR(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 jR(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 jD(t){return[PP(t[1],t[0]),Pz(t[2])]}function jF(t){var e=t[0],n=t[1],r=Pj(n);return[r*Pj(e),r*PL(e),PL(n)]}function jz(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function jB(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 jW(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function j$(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function jG(t){var e=PR(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}function jH(t){return P_(t[0])<=Px?t[0]:PI(t[0])*((P_(t[0])+Px)%PE-Px)}function jV(t){return Array.from(function*(t){for(let e of t)yield*e}(t))}function jU(t,e,n,r){return function(i){var o,a,l,s=e(i),u=jC(),c=e(u),f=!1,p={point:h,lineStart:y,lineEnd:g,polygonStart:function(){p.point=v,p.lineStart=b,p.lineEnd=x,a=[],o=[]},polygonEnd:function(){p.point=h,p.lineStart=y,p.lineEnd=g,a=jV(a);var t=function(t,e){var n=jH(e),r=e[1],i=PL(r),o=[PL(n),-Pj(n),0],a=0,l=0,s=new Pb;1===i?r=PO+1e-6:-1===i&&(r=-PO-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=jH(h),y=h[1]/2+Pw,g=PL(y),v=Pj(y),b=0;b<p;++b,d=O,g=E,v=k,h=x){var x=f[b],O=jH(x),w=x[1]/2+Pw,E=PL(w),k=Pj(w),M=O-d,_=M>=0?1:-1,S=_*M,P=S>Px,j=g*E;if(s.add(PP(j*_*PL(S),v*k+j*Pj(S))),a+=P?M+_*PE:M,P^d>=n^O>=n){var A=jB(jF(h),jF(x));jG(A);var T=jB(o,A);jG(T);var C=(P^M>=0?-1:1)*Pz(T[2]);(r>C||r===C&&(A[0]||A[1]))&&(l+=P^M>=0?1:-1)}}return(a<-1e-6||a<1e-6&&s<-1e-12)^1&l}(o,r);a.length?(f||(i.polygonStart(),f=!0),jI(a,jY,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 b(){c.lineStart(),l=[]}function x(){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(jq))}}return p}}function jq(t){return t.length>1}function jY(t,e){return((t=t.x)[0]<0?t[1]-PO-1e-6:PO-t[1])-((e=e.x)[0]<0?e[1]-PO-1e-6:PO-e[1])}var jX=jU(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,s,u,c,f,p,h,d=o>0?Px:-Px,y=P_(o-n);1e-6>P_(y-Px)?(t.point(n,r=(r+a)/2>0?PO:-PO),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(d,r),t.point(o,r),e=0):i!==d&&y>=Px&&(1e-6>P_(n-i)&&(n-=1e-6*i),1e-6>P_(o-d)&&(o-=1e-6*d),l=n,s=r,u=o,c=a,r=P_(h=PL(l-u))>1e-6?PS((PL(s)*(p=Pj(c))*PL(u)-PL(c)*(f=Pj(s))*PL(l))/(f*p*h)):(s+c)/2,t.point(i,r),t.lineEnd(),t.lineStart(),t.point(d,r),e=0),t.point(n=o,r=a),i=d},lineEnd:function(){t.lineEnd(),n=r=NaN},clean:function(){return 2-e}}},function(t,e,n,r){var i;if(null==t)i=n*PO,r.point(-Px,i),r.point(0,i),r.point(Px,i),r.point(Px,0),r.point(Px,-i),r.point(0,-i),r.point(-Px,-i),r.point(-Px,0),r.point(-Px,i);else if(P_(t[0]-e[0])>1e-6){var o=t[0]<e[0]?Px:-Px;i=n*o/2,r.point(-o,i),r.point(0,i),r.point(o,i)}else r.point(e[0],e[1])},[-Px,-PO]);function jK(t,e){e=jF(e),e[0]-=t,jG(e);var n=PF(-e[1]);return((0>-e[2]?-n:n)+PE-1e-6)%PE}function jZ(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>P_(r[0]-t)?i>0?0:3:1e-6>P_(r[0]-n)?i>0?2:1:1e-6>P_(r[1]-e)?+(i>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,b,x=a,O=jC(),w={point:E,lineStart:function(){w.point=k,u&&u.push(c=[]),v=!0,g=!1,d=y=NaN},lineEnd:function(){s&&(k(f,p),h&&g&&O.rejoin(),s.push(O.result())),w.point=E,g&&x.lineEnd()},polygonStart:function(){x=O,s=[],u=[],b=!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=b&&e,i=(s=jV(s)).length;(n||i)&&(a.polygonStart(),n&&(a.lineStart(),o(null,null,1,a),a.lineEnd()),i&&jI(s,l,e,o,a),a.polygonEnd()),x=a,s=u=c=null}};function E(t,e){i(t,e)&&x.point(t,e)}function k(o,a){var l=i(o,a);if(u&&c.push([o,a]),v)f=o,p=a,h=l,v=!1,l&&(x.lineStart(),x.point(o,a));else if(l&&g)x.point(o,a);else{var s=[d=Math.max(-1e9,Math.min(1e9,d)),y=Math.max(-1e9,Math.min(1e9,y))],O=[o=Math.max(-1e9,Math.min(1e9,o)),a=Math.max(-1e9,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)){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,O,t,e,n,r)?l&&(x.lineStart(),x.point(o,a),b=!1):(g||(x.lineStart(),x.point(s[0],s[1])),x.point(O[0],O[1]),l||x.lineEnd(),b=!1)}d=o,y=a,g=l}return w}}function jQ(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 jJ(t,e){return P_(t)>Px&&(t-=Math.round(t/PE)*PE),[t,e]}function j0(t,e,n){return(t%=PE)?e||n?jQ(j2(t),j5(e,n)):j2(t):e||n?j5(e,n):jJ}function j1(t){return function(e,n){return P_(e+=t)>Px&&(e-=Math.round(e/PE)*PE),[e,n]}}function j2(t){var e=j1(t);return e.invert=j1(-t),e}function j5(t,e){var n=Pj(t),r=PL(t),i=Pj(e),o=PL(e);function a(t,e){var a=Pj(e),l=Pj(t)*a,s=PL(t)*a,u=PL(e),c=u*n+l*r;return[PP(s*i-c*o,l*n-u*r),Pz(c*i+s*o)]}return a.invert=function(t,e){var a=Pj(e),l=Pj(t)*a,s=PL(t)*a,u=PL(e),c=u*i-s*o;return[PP(s*i+u*o,l*n+c*r),Pz(c*n-l*r)]},a}function j3(t){return function(e){var n=new j4;for(var r in t)n[r]=t[r];return n.stream=e,n}}function j4(){}function j6(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),Pv(n,t.stream(P6)),e(P6.result()),null!=r&&t.clipExtent(r),t}function j8(t,e,n){return j6(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 j9(t,e,n){return j8(t,[[0,0],e],n)}function j7(t,e,n){return j6(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 At(t,e,n){return j6(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)}jJ.invert=jJ,j4.prototype={constructor:j4,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 Ae=Pj(30*PM);function An(t,e){var n;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,b=c-i,x=v*v+b*b;if(x>4*e&&y--){var O=a+p,w=l+h,E=s+d,k=PR(O*O+w*w+E*E),M=Pz(E/=k),_=1e-6>P_(P_(E)-1)||1e-6>P_(o-f)?(o+f)/2:PP(w,O),S=t(_,M),P=S[0],j=S[1],A=P-r,T=j-i,C=b*A-v*T;(C*C/x>e||P_((v*A+b*T)/x-.5)>.3||a*p+l*h+s*d<Ae)&&(n(r,i,o,a,l,s,P,j,_,O/=k,w/=k,E,y,g),g.point(P,j),n(P,j,_,O,w,E,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:x,polygonStart:function(){e.polygonStart(),y.lineStart=O},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=b,e.lineStart()}function b(r,i){var o=jF([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 x(){y.point=g,e.lineEnd()}function O(){v(),y.point=w,y.lineEnd=E}function w(t,e){b(r=t,e),i=c,o=f,a=p,l=h,s=d,y.point=b}function E(){n(c,f,u,p,h,d,i,o,r,a,l,s,16,e),y.lineEnd=x,x()}return y}}(t,e):(n=t,j3({point:function(t,e){t=n(t,e),this.stream.point(t[0],t[1])}}))}var Ar=j3({point:function(t,e){this.stream.point(t*PM,e*PM)}});function Ai(t,e,n,r,i,o){if(!o){function a(o,a){return[e+t*(o*=r),n-t*(a*=i)]}return a.invert=function(o,a){return[(o-e)/t*r,(n-a)/t*i]},a}var l=Pj(o),s=PL(o),u=l*t,c=s*t,f=l/t,p=s/t,h=(s*n-l*e)/t,d=(s*e+l*n)/t;function y(t,o){return[u*(t*=r)-c*(o*=i)+e,n-c*t-u*o]}return y.invert=function(t,e){return[r*(f*t-p*e+h),i*(d-p*t-f*e)]},y}function Ao(t){return Aa(function(){return t})()}function Aa(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,b=0,x=0,O=1,w=1,E=null,k=jX,M=null,_=Pp,S=.5;function P(t){return s(t[0]*PM,t[1]*PM)}function j(t){return(t=s.invert(t[0],t[1]))&&[t[0]*Pk,t[1]*Pk]}function A(){var t=Ai(f,0,0,O,w,x).apply(null,e(d,y)),r=Ai(f,p-t[0],h-t[1],O,w,x);return n=j0(g,v,b),l=jQ(e,r),s=jQ(n,l),a=An(l,S),T()}function T(){return u=c=null,P}return P.stream=function(t){var e;return u&&c===t?u:u=Ar((e=n,j3({point:function(t,n){var r=e(t,n);return this.stream.point(r[0],r[1])}}))(k(a(_(c=t)))))},P.preclip=function(t){return arguments.length?(k=t,E=void 0,T()):k},P.postclip=function(t){return arguments.length?(_=t,M=r=i=o=null,T()):_},P.clipAngle=function(t){return arguments.length?(k=+t?function(t){var e=Pj(t),n=2*PM,r=e>0,i=P_(e)>1e-6;function o(t,n){return Pj(t)*Pj(n)>e}function a(t,n,r){var i=jF(t),o=jF(n),a=[1,0,0],l=jB(i,o),s=jz(l,l),u=l[0],c=s-u*u;if(!c)return!r&&t;var f=jB(a,l),p=j$(a,e*s/c);jW(p,j$(l,-e*u/c));var h=jz(p,f),d=jz(f,f),y=h*h-d*(jz(p,p)-1);if(!(y<0)){var g=PR(y),v=j$(f,(-h-g)/d);if(jW(v,p),v=jD(v),!r)return v;var b,x=t[0],O=n[0],w=t[1],E=n[1];O<x&&(b=x,x=O,O=b);var k=O-x,M=1e-6>P_(k-Px);if(!M&&E<w&&(b=w,w=E,E=b),M||k<1e-6?M?w+E>0^v[1]<(1e-6>P_(v[0]-x)?w:E):w<=v[1]&&v[1]<=E:k>Px^(x<=v[0]&&v[0]<=O)){var _=j$(f,(-h+g)/d);return jW(_,p),[v,jD(_)]}}}function l(e,n){var i=r?t:Px-t,o=0;return e<-i?o|=1:e>i&&(o|=2),n<-i?o|=4:n>i&&(o|=8),o}return jU(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?Px:-Px),p):0;!e&&(u=s=g)&&t.lineStart(),g!==s&&(!(d=a(e,y))||jN(e,d)||jN(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&&jN(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=Pj(e),l=PL(e),s=r*n;null==i?(i=e+r*PE,o=e-s/2):(i=jK(a,i),o=jK(a,o),(r>0?i<o:i>o)&&(i+=r*PE));for(var u,c=i;r>0?c>o:c<o;c-=s)u=jD([a,-l*Pj(c),-l*PL(c)]),t.point(u[0],u[1])}}(o,t,n,i,e,r)},r?[0,-t]:[-Px,t-Px])}(E=t*PM):(E=null,jX),T()):E*Pk},P.clipExtent=function(t){return arguments.length?(_=null==t?(M=r=i=o=null,Pp):jZ(M=+t[0][0],r=+t[0][1],i=+t[1][0],o=+t[1][1]),T()):null==M?null:[[M,r],[i,o]]},P.scale=function(t){return arguments.length?(f=+t,A()):f},P.translate=function(t){return arguments.length?(p=+t[0],h=+t[1],A()):[p,h]},P.center=function(t){return arguments.length?(d=t[0]%360*PM,y=t[1]%360*PM,A()):[d*Pk,y*Pk]},P.rotate=function(t){return arguments.length?(g=t[0]%360*PM,v=t[1]%360*PM,b=t.length>2?t[2]%360*PM:0,A()):[g*Pk,v*Pk,b*Pk]},P.angle=function(t){return arguments.length?(x=t%360*PM,A()):x*Pk},P.reflectX=function(t){return arguments.length?(O=t?-1:1,A()):O<0},P.reflectY=function(t){return arguments.length?(w=t?-1:1,A()):w<0},P.precision=function(t){return arguments.length?(a=An(l,S=t*t),T()):PR(S)},P.fitExtent=function(t,e){return j8(P,t,e)},P.fitSize=function(t,e){return j9(P,t,e)},P.fitWidth=function(t,e){return j7(P,t,e)},P.fitHeight=function(t,e){return At(P,t,e)},function(){return e=t.apply(this,arguments),P.invert=e.invert&&j,A()}}function Al(t){var e=0,n=Px/3,r=Aa(t),i=r(e,n);return i.parallels=function(t){return arguments.length?r(e=t[0]*PM,n=t[1]*PM):[e*Pk,n*Pk]},i}function As(t,e){var n=PL(t),r=(n+PL(e))/2;if(1e-6>P_(r)){var i=Pj(t);function o(t,e){return[t*i,PL(e)/i]}return o.invert=function(t,e){return[t/i,Pz(e*i)]},o}var a=1+n*(2*r-n),l=PR(a)/r;function s(t,e){var n=PR(a-2*r*PL(e))/r;return[n*PL(t*=r),l-n*Pj(t)]}return s.invert=function(t,e){var n=l-e,i=PP(t,P_(n))*PI(n);return n*r<0&&(i-=Px*PI(t)*PI(n)),[i/r,Pz((a-(t*t+n*n)*r*r)/(2*r))]},s}function Au(){return Al(As).scale(155.424).center([0,33.6442])}function Ac(){return Au().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function Af(){var t,e,n,r,i,o,a=Ac(),l=Au().rotate([154,0]).center([-2,58.5]).parallels([55,65]),s=Au().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 j8(c,t,e)},c.fitSize=function(t,e){return j9(c,t,e)},c.fitWidth=function(t,e){return j7(c,t,e)},c.fitHeight=function(t,e){return At(c,t,e)},c.scale(1070)}function Ap(t){return function(e,n){var r=Pj(e),i=Pj(n),o=t(r*i);return o===1/0?[2,0]:[o*i*PL(e),o*PL(n)]}}function Ah(t){return function(e,n){var r=PR(e*e+n*n),i=t(r),o=PL(i);return[PP(e*o,r*Pj(i)),Pz(r&&n*o/r)]}}var Ad=Ap(function(t){return PR(2/(1+t))});function Ay(){return Ao(Ad).scale(124.75).clipAngle(179.999)}Ad.invert=Ah(function(t){return 2*Pz(t/2)});var Ag=Ap(function(t){return(t=PF(t))&&t/PL(t)});function Am(){return Ao(Ag).scale(79.4188).clipAngle(179.999)}function Av(t,e){return[t,PC(PD((PO+e)/2))]}function Ab(){return Ax(Av).scale(961/PE)}function Ax(t){var e,n,r,i=Ao(t),o=i.center,a=i.scale,l=i.translate,s=i.clipExtent,u=null;function c(){var o=Px*a(),l=i((function(t){function e(e){return e=t(e[0]*PM,e[1]*PM),e[0]*=Pk,e[1]*=Pk,e}return t=j0(t[0]*PM,t[1]*PM,t.length>2?t[2]*PM:0),e.invert=function(e){return e=t.invert(e[0]*PM,e[1]*PM),e[0]*=Pk,e[1]*=Pk,e},e})(i.rotate()).invert([0,0]));return s(null==u?[[l[0]-o,l[1]-o],[l[0]+o,l[1]+o]]:t===Av?[[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 AO(t){return PD((PO+t)/2)}function Aw(t,e){var n=Pj(t),r=t===e?PL(t):PC(n/Pj(e))/PC(AO(e)/AO(t)),i=n*PN(AO(t),r)/r;if(!r)return Av;function o(t,e){i>0?e<-PO+1e-6&&(e=-PO+1e-6):e>PO-1e-6&&(e=PO-1e-6);var n=i/PN(AO(e),r);return[n*PL(r*t),i-n*Pj(r*t)]}return o.invert=function(t,e){var n=i-e,o=PI(r)*PR(t*t+n*n),a=PP(t,P_(n))*PI(n);return n*r<0&&(a-=Px*PI(t)*PI(n)),[a/r,2*PS(PN(i/o,1/r))-PO]},o}function AE(){return Al(Aw).scale(109.5).parallels([30,30])}function Ak(t,e){return[t,e]}function AM(){return Ao(Ak).scale(152.63)}function A_(t,e){var n=Pj(t),r=t===e?PL(t):(n-Pj(e))/(e-t),i=n/r+t;if(1e-6>P_(r))return Ak;function o(t,e){var n=i-e,o=r*t;return[n*PL(o),i-n*Pj(o)]}return o.invert=function(t,e){var n=i-e,o=PP(t,P_(n))*PI(n);return n*r<0&&(o-=Px*PI(t)*PI(n)),[o/r,i-PI(r)*PR(t*t+n*n)]},o}function AS(){return Al(A_).scale(131.154).center([0,13.9389])}Ag.invert=Ah(function(t){return t}),Av.invert=function(t,e){return[t,2*PS(PT(e))-PO]},Ak.invert=Ak;var AP=PR(3)/2;function Aj(t,e){var n=Pz(AP*PL(e)),r=n*n,i=r*r*r;return[t*Pj(n)/(AP*(1.340264+-.24331799999999998*r+i*(.0062510000000000005+.034164*r))),n*(1.340264+-.081106*r+i*(893e-6+.003796*r))]}function AA(){return Ao(Aj).scale(177.158)}function AT(t,e){var n=Pj(e),r=Pj(t)*n;return[n*PL(t)/r,PL(e)/r]}function AC(){return Ao(AT).scale(144.049).clipAngle(60)}function AN(){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=j3({point:function(t,e){var n=x([t,e]);this.stream.point(n[0],n[1])}}),v=Pp;function b(){return d=l*c,y=l*f,o=a=null,x}function x(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 x.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]},x.stream=function(t){return o&&a===t?o:o=g(v(a=t))},x.postclip=function(t){return arguments.length?(v=t,h=n=r=i=null,b()):v},x.clipExtent=function(t){return arguments.length?(v=null==t?(h=n=r=i=null,Pp):jZ(h=+t[0][0],n=+t[0][1],r=+t[1][0],i=+t[1][1]),b()):null==h?null:[[h,n],[r,i]]},x.scale=function(t){return arguments.length?(l=+t,b()):l},x.translate=function(t){return arguments.length?(s=+t[0],u=+t[1],b()):[s,u]},x.angle=function(n){return arguments.length?(e=PL(p=n%360*PM),t=Pj(p),b()):p*Pk},x.reflectX=function(t){return arguments.length?(c=t?-1:1,b()):c<0},x.reflectY=function(t){return arguments.length?(f=t?-1:1,b()):f<0},x.fitExtent=function(t,e){return j8(x,t,e)},x.fitSize=function(t,e){return j9(x,t,e)},x.fitWidth=function(t,e){return j7(x,t,e)},x.fitHeight=function(t,e){return At(x,t,e)},x}function AL(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 AI(){return Ao(AL).scale(175.295)}function AR(t,e){return[Pj(e)*PL(t),PL(e)]}function AD(){return Ao(AR).scale(249.5).clipAngle(90.000001)}function AF(t,e){var n=Pj(e),r=1+Pj(t)*n;return[n*PL(t)/r,PL(e)/r]}function Az(){return Ao(AF).scale(250).clipAngle(142)}function AB(t,e){return[PC(PD((PO+e)/2)),-t]}function AW(){var t=Ax(AB),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)}Aj.invert=function(t,e){for(var n,r,i=e,o=i*i,a=o*o*o,l=0;l<12&&(r=i*(1.340264+-.081106*o+a*(893e-6+.003796*o))-e,i-=n=r/(1.340264+-.24331799999999998*o+a*(.0062510000000000005+.034164*o)),a=(o=i*i)*o*o,!(1e-12>P_(n)));++l);return[AP*t*(1.340264+-.24331799999999998*o+a*(.0062510000000000005+.034164*o))/Pj(i),Pz(PL(i)/AP)]},AT.invert=Ah(PS),AL.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(P_(n)>1e-6&&--i>0);return[t/(.8707+(o=r*r)*(-.131979+o*(-.013791+o*o*o*(.003971-.001529*o)))),r]},AR.invert=Ah(Pz),AF.invert=Ah(function(t){return 2*PS(t)}),AB.invert=function(t,e){return[-e,2*PS(PT(t))-PO]};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 AG(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:b()}}function b(){return jj(PA(r/d)*d,n,d).map(c).concat(jj(PA(l/y)*y,a,y).map(f)).concat(jj(PA(e/p)*p,t,p).filter(function(t){return P_(t%d)>1e-6}).map(s)).concat(jj(PA(o/h)*h,i,h).filter(function(t){return P_(t%y)>1e-6}).map(u))}return v.lines=function(){return b().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=jA(o,i,90),u=jT(e,t,g),c=jA(l,a,90),f=jT(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 AH(t){return"geoPath"===t.type}let AV=()=>t=>{let e,{children:n,coordinate:r={}}=t;if(!Array.isArray(n))return[];let{type:i="equalEarth"}=r,o=A$(r,["type"]),a=function(t){if("function"==typeof t)return t;let e=tv[`geo${mi(t)}`];if(!e)throw Error(`Unknown coordinate: ${t}`);return e}(i),l=n.map(AG);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)=>{var s;let u=a();for(let[e,a]of(!function(t,e,n,r){let i,{outline:o=(i=e.filter(AH)).find(t=>t.sphere)?{type:"Sphere"}:{type:"FeatureCollection",features:i.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];return e?"geometry"===e?{type:"FeatureCollection",features:[{type:"Feature",properties:{},geometry:t}]}:"feature"===e?{type:"FeatureCollection",features:[t]}:"featureCollection"===e?t:void 0:null})(t).features)}}=r,{size:a="fitExtent"}=r;"fitExtent"===a?function(t,e,n){let{x:r,y:i,width:o,height:a}=n;t.fitExtent([[r,i],[o,a]],e)}(t,o,n):"fitWidth"===a&&function(t,e,n){let{width:r,height:i}=n,[[o,a],[l,s]]=jP(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,o,n)}(u,l,{x:t,y:n,width:r,height:i},o),Object.entries(o)))null==(s=u[e])||s.call(u,a);e=jP(u);let c=new u4({domain:[t,t+r]}),f=new u4({domain:[n,n+i]});return{transform:t=>(t=>{let e=u(t);if(!e)return[null,null];let[n,r]=e;return[c.map(n),f.map(r)]})(t),untransform:t=>(t=>{if(!t)return null;let[e,n]=t,r=[c.invert(e),f.invert(n)];return u.invert(r)})(t)}}]]}},children:l.flatMap(t=>AH(t)?function(t){let{style:n,tooltip:r={}}=t;return Object.assign(Object.assign({},t),{type:"path",tooltip:kW(r,{title:"id",items:[{channel:"color"}]}),style:Object.assign(Object.assign({},n),{d:t=>e(t)||[]})})}(t):t)})]};AV.props={};var AU=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 Aq=()=>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"},AU(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 AY(){return{"composition.geoView":AV,"composition.geoPath":Aq}}function AX(){return Object.assign(Object.assign(Object.assign(Object.assign({},AY()),Pf()),MA()),kz())}function AK(t,e){return class extends t{constructor(t){super(Object.assign(Object.assign({},t),{lib:e}))}}}function AZ(t,e){var n=e.r;t.arc(n,n,n,0,2*Math.PI,!1)}function AQ(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 AJ(t,e){var n=e.x1,r=e.y1,i=e.x2,o=e.y2,a=e.defX,l=void 0===a?0:a,s=e.defY,u=void 0===s?0:s,c=e.markerStart,f=e.markerEnd,p=e.markerStartOffset,h=e.markerEndOffset,d=0,y=0,g=0,v=0,b=0;c&&lv(c)&&p&&(d=Math.cos(b=Math.atan2(o-r,i-n))*(p||0),y=Math.sin(b)*(p||0)),f&&lv(f)&&h&&(g=Math.cos(b=Math.atan2(r-o,n-i))*(h||0),v=Math.sin(b)*(h||0)),t.moveTo(n-l+d,r-u+y),t.lineTo(i-l+g,o-u+v)}function A0(t,e){var n,r=e.defX,i=void 0===r?0:r,o=e.defY,a=void 0===o?0:o,l=e.markerStart,s=e.markerEnd,u=e.markerStartOffset,c=e.markerEndOffset,f=e.path,p=f.absolutePath,h=f.segments,d=0,y=0,g=0,v=0,b=0;if(l&&lv(l)&&u){var x=ej(l.parentNode.getStartTangent(),2),O=x[0],w=x[1];n=O[0]-w[0],d=Math.cos(b=Math.atan2(O[1]-w[1],n))*(u||0),y=Math.sin(b)*(u||0)}if(s&&lv(s)&&c){var E=ej(s.parentNode.getEndTangent(),2),O=E[0],w=E[1];n=O[0]-w[0],g=Math.cos(b=Math.atan2(O[1]-w[1],n))*(c||0),v=Math.sin(b)*(c||0)}for(var k=0;k<p.length;k++){var M=p[k],_=M[0],S=p[k+1],P=0===k&&(0!==d||0!==y),j=(k===p.length-1||S&&("M"===S[0]||"Z"===S[0]))&&0!==g&&0!==v;switch(_){case"M":P?(t.moveTo(M[1]-i+d,M[2]-a+y),t.lineTo(M[1]-i,M[2]-a)):t.moveTo(M[1]-i,M[2]-a);break;case"L":j?t.lineTo(M[1]-i+g,M[2]-a+v):t.lineTo(M[1]-i,M[2]-a);break;case"Q":t.quadraticCurveTo(M[1]-i,M[2]-a,M[3]-i,M[4]-a),j&&t.lineTo(M[3]-i+g,M[4]-a+v);break;case"C":t.bezierCurveTo(M[1]-i,M[2]-a,M[3]-i,M[4]-a,M[5]-i,M[6]-a),j&&t.lineTo(M[5]-i+g,M[6]-a+v);break;case"A":var A=h[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-i,C-a,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-i,C-a),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-i),-(C-a))}j&&t.lineTo(M[6]-i+g,M[7]-a+v);break;case"Z":t.closePath()}}}function A1(t,e){var n,r=e.defX,i=void 0===r?0:r,o=e.defY,a=void 0===o?0:o,l=e.markerStart,s=e.markerEnd,u=e.markerStartOffset,c=e.markerEndOffset,f=e.points.points,p=f.length,h=f[0][0]-i,d=f[0][1]-a,y=f[p-1][0]-i,g=f[p-1][1]-a,v=0,b=0,x=0,O=0,w=0;l&&lv(l)&&u&&(n=f[1][0]-f[0][0],v=Math.cos(w=Math.atan2(f[1][1]-f[0][1],n))*(u||0),b=Math.sin(w)*(u||0)),s&&lv(s)&&c&&(n=f[p-1][0]-f[0][0],x=Math.cos(w=Math.atan2(f[p-1][1]-f[0][1],n))*(c||0),O=Math.sin(w)*(c||0)),t.moveTo(h+(v||x),d+(b||O));for(var E=1;E<p-1;E++){var k=f[E];t.lineTo(k[0]-i,k[1]-a)}t.lineTo(y,g)}function A2(t,e){var n,r=e.defX,i=void 0===r?0:r,o=e.defY,a=void 0===o?0:o,l=e.markerStart,s=e.markerEnd,u=e.markerStartOffset,c=e.markerEndOffset,f=e.points.points,p=f.length,h=f[0][0]-i,d=f[0][1]-a,y=f[p-1][0]-i,g=f[p-1][1]-a,v=0,b=0,x=0,O=0,w=0;l&&lv(l)&&u&&(n=f[1][0]-f[0][0],v=Math.cos(w=Math.atan2(f[1][1]-f[0][1],n))*(u||0),b=Math.sin(w)*(u||0)),s&&lv(s)&&c&&(n=f[p-2][0]-f[p-1][0],x=Math.cos(w=Math.atan2(f[p-2][1]-f[p-1][1],n))*(c||0),O=Math.sin(w)*(c||0)),t.moveTo(h+v,d+b);for(var E=1;E<p-1;E++){var k=f[E];t.lineTo(k[0]-i,k[1]-a)}t.lineTo(y+x,g+O)}function A5(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=ej(n.map(function(t){var e;return e=Math.min(Math.abs(r)/2,Math.abs(i)/2),t<0?0:t>e?e:t}),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)}Aq.props={};var A3=function(t){function e(){var e=t.apply(this,eT([],ej(arguments),!1))||this;return e.name="canvas-path-generator",e}return eE(e,t),e.prototype.init=function(){var t,e=((t={})[_c.CIRCLE]=AZ,t[_c.ELLIPSE]=AQ,t[_c.RECT]=A5,t[_c.LINE]=AJ,t[_c.POLYLINE]=A2,t[_c.POLYGON]=A1,t[_c.PATH]=A0,t[_c.TEXT]=void 0,t[_c.GROUP]=void 0,t[_c.IMAGE]=void 0,t[_c.HTML]=void 0,t[_c.MESH]=void 0,t);this.context.pathGeneratorFactory=e},e.prototype.destroy=function(){delete this.context.pathGeneratorFactory},e}(r5);function A4(t,e,n){return{x:t*Math.cos(n)-e*Math.sin(n),y:t*Math.sin(n)+e*Math.cos(n)}}var A6=eI(),A8=eI(),A9=eI(),A7=eK(),Tt=function(){function t(){var t=this;this.isHit=function(e,n,r,i){var o=t.context.pointInPathPickerFactory[e.nodeName];if(o){var a=e5(A7,r),l=eq(A8,eB(A9,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 ig(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.ownerDocument;o.hooks.pick.tapPromise(t.tag,function(t){return e_(i,void 0,void 0,function(){return eS(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=eB(A6,o.x,o.y,0),l=t.elementsFromBBox(a[0],a[1],a[0],a[1]),s=[];try{for(var u=eP(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=aw(f);if(h){var d=h.parsedStyle.clipPath;if(this.isHit(d,a,d.getWorldTransform(),!0))if(i)return e.picked=[f],e;else 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 Te(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=rU(i,i,e.x,e.y),p=ej(a_(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 Tn(t,e,n){var r,i,o,a,l,s,u=t.parsedStyle,c=u.rx,f=u.ry,p=u.fill,h=u.stroke,d=u.lineWidth,y=u.increasedLineWidthForHitTesting,g=u.pointerEvents,v=e.x,b=e.y,x=ej(a_(g,p,h),2),O=x[0],w=x[1],E=((d||0)+(y||0))/2,k=(v-c)*(v-c),M=(b-f)*(b-f);return O&&w||n?1>=k/((r=c+E)*r)+M/((i=f+E)*i):O?1>=k/(c*c)+M/(f*f):!!w&&k/((o=c-E)*o)+M/((a=f-E)*a)>=1&&1>=k/((l=c+E)*l)+M/((s=f+E)*s)}function Tr(t,e,n,r,i,o){return i>=t&&i<=t+n&&o>=e&&o<=e+r}function Ti(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 rU(u.x,u.y,a,l)<=o/2}function To(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=[n-t,r-e];if(a=[0,0],f[0]===a[0]&&f[1]===a[1])return Math.sqrt((i-t)*(i-t)+(o-e)*(o-e));var p=[-f[1],f[0]];return(u=(l=p[0])*l+(s=p[1])*s)>0&&(u=1/Math.sqrt(u)),p[0]=p[0]*u,p[1]=p[1]*u,Math.abs((c=[i-t,o-e])[0]*p[0]+c[1]*p[1])}(t,e,n,r,o,a)<=i/2}function Ta(t,e,n,r,i){var o=t.length;if(o<2)return!1;for(var a=0;a<o-1;a++)if(To(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(To(l[0],l[1],s[0],s[1],e,n,r))return!0}return!1}function Tl(t){return 1e-6>Math.abs(t)?0:t<0?-1:1}function Ts(t,e,n){var r=!1,i=t.length;if(i<=2)return!1;for(var o=0;o<i;o++){var a,l=t[o],s=t[(o+1)%i];if(((a=[e,n])[0]-l[0])*(s[1]-l[1])==(s[0]-l[0])*(a[1]-l[1])&&Math.min(l[0],s[0])<=a[0]&&a[0]<=Math.max(l[0],s[0])&&Math.min(l[1],s[1])<=a[1]&&a[1]<=Math.max(l[1],s[1]))return!0;Tl(l[1]-n)>0!=Tl(s[1]-n)>0&&0>Tl(e-(n-l[1])*(l[0]-s[0])/(l[1]-s[1])-l[0])&&(r=!r)}return r}function Tu(t,e,n){for(var r=!1,i=0;i<t.length&&!(r=Ts(t[i],e,n));i++);return r}function Tc(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(!!ej(a_(r.pointerEvents,r.fill,r.stroke),2)[1]||!!n)&&!!s&&To(i,o,a,l,(s||0)+(u||0),e.x+(void 0===c?0:c),e.y+(void 0===f?0:f))}function Tf(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,b=y.hasArc,x=y.polylines,O=y.polygons,w=ej(a_(g,(null==O?void 0:O.length)&&c,u),2),E=w[0],k=w[1],M=oO(t),_=!1;return E||n?_=b?r(t,e):Tu(O,e.x+p,e.y+d)||Tu(x,e.x+p,e.y+d):(k||n)&&(_=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||Tr(p.x-a,p.y-a,p.width+e,p.height+e,n,r))switch(s.command){case"L":case"Z":if(o=To(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=rY([t,n,i],[e,r,o],a,l,rJ);return rU(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=rQ(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,b=r,x=i,O=s,w=u,E=120*Math.PI/180,k=Math.PI/180*(+o||0),M=[];if(c)p=c[0],h=c[1],d=c[2],y=c[3];else{g=(f=A4(g,v,-k)).x,v=f.y,O=(f=A4(O,w,-k)).x,w=f.y;var _=(g-O)/2,S=(v-w)/2,P=_*_/(b*b)+S*S/(x*x);P>1&&(b*=P=Math.sqrt(P),x*=P);var j=b*b,A=x*x,T=(a===l?-1:1)*Math.sqrt(Math.abs((j*A-j*S*S-A*_*_)/(j*S*S+A*_*_)));d=T*b*S/x+(g+O)/2,y=-(T*x)*_/b+(v+w)/2,p=Math.asin(((v-y)/x*1e9|0)/1e9),h=Math.asin(((w-y)/x*1e9|0)/1e9),p=g<d?Math.PI-p:p,h=O<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 C=h-p;if(Math.abs(C)>E){var N=h,L=O,I=w;M=t(O=d+b*Math.cos(h=p+E*(l&&h>p?1:-1)),w=y+x*Math.sin(h),b,x,o,0,l,L,I,[h,N,d,y])}C=h-p;var R=Math.cos(p),D=Math.cos(h),F=Math.tan(C/4),z=4/3*b*F,B=4/3*x*F,W=[g,v],$=[g+z*Math.sin(p),v-B*R],G=[O+z*Math.sin(h),w-B*D],H=[O,w];if($[0]=2*W[0]-$[0],$[1]=2*W[1]-$[1],c)return $.concat(G,H,M);M=$.concat(G,H,M);for(var V=[],U=0,q=M.length;U<q;U+=1)V[U]=U%2?A4(M[U-1],M[U],k).y:A4(M[U],M[U+1],k).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=rQ(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,M)),_}function Tp(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=ej(a_(r.pointerEvents,o,i),2),d=h[0],y=h[1],g=!1;return(y||n)&&(g=Ta(s.points,(a||0)+(l||0),e.x+c,e.y+p,!0)),!g&&(d||n)&&(g=Ts(s.points,e.x+c,e.y+p)),g}function Th(t,e,n){var r=t.parsedStyle,i=r.lineWidth,o=r.increasedLineWidthForHitTesting,a=r.points,l=r.defX,s=r.defY;return(!!ej(a_(r.pointerEvents,r.fill,r.stroke),2)[1]||!!n)&&!!i&&Ta(a.points,(i||0)+(o||0),e.x+(void 0===l?0:l),e.y+(void 0===s?0:s),!1)}function Td(t,e,n,r,i){var o=t.parsedStyle,a=o.radius,l=o.fill,s=o.stroke,u=o.lineWidth,c=o.increasedLineWidthForHitTesting,f=o.width,p=o.height,h=ej(a_(o.pointerEvents,l,s),2),d=h[0],y=h[1],g=a&&a.some(function(t){return 0!==t}),v=(u||0)+(c||0);if(g){var b,x,O,w,E,k,M,_,S,P,j,A=!1;return(y||n)&&(b=f,x=p,O=a.map(function(t){var e;return e=Math.min(Math.abs(f)/2,Math.abs(p)/2),t<0?0:t>e?e:t}),w=v,E=e.x,k=e.y,_=(M=ej(O,4))[0],S=M[1],P=M[2],j=M[3],A=To(0+_,0,0+b-S,0,w,E,k)||To(0+b,0+S,0+b,0+x-P,w,E,k)||To(0+b-P,0+x,0+j,0+x,w,E,k)||To(0,0+x-j,0,0+_,w,E,k)||Ti(0+b-S,0+S,S,1.5*Math.PI,2*Math.PI,w,E,k)||Ti(0+b-P,0+x-P,P,0,.5*Math.PI,w,E,k)||Ti(0+j,0+x-j,j,.5*Math.PI,Math.PI,w,E,k)||Ti(0+_,0+_,_,Math.PI,1.5*Math.PI,w,E,k)),!A&&(d||n)&&(A=r(t,e)),A}var T,C,N,L=v/2;return d&&y||n?Tr(0-L,0-L,f+L,p+L,e.x,e.y):d?Tr(0,0,f,p,e.x,e.y):!!y&&(T=e.x,C=e.y,Tr(0-(N=v/2),0-N,f,v,T,C)||Tr(0+f-N,0-N,v,p,T,C)||Tr(0+N,0+p-N,f,v,T,C)||Tr(0-N,0+N,v,p,T,C))}function Ty(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[_c.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 Tg=function(t){function e(){var e=t.apply(this,eT([],ej(arguments),!1))||this;return e.name="canvas-picker",e}return eE(e,t),e.prototype.init=function(){var t,e=((t={})[_c.CIRCLE]=Te,t[_c.ELLIPSE]=Tn,t[_c.RECT]=Td,t[_c.LINE]=Tc,t[_c.POLYLINE]=Th,t[_c.POLYGON]=Tp,t[_c.PATH]=Tf,t[_c.TEXT]=function(){return!0},t[_c.GROUP]=null,t[_c.IMAGE]=Ty,t[_c.HTML]=null,t[_c.MESH]=null,t);this.context.pointInPathPickerFactory=e,this.addRenderingPlugin(new Tt)},e.prototype.destroy=function(){delete this.context.pointInPathPickerFactory,this.removeAllRenderingPlugins()},e}(r5),Tm=function(t){return null==t},Tv={}.toString,Tb=function(t){return"[object String]"===Tv.call(t)},Tx=function(){function t(t){this.canvasRendererPluginOptions=t,this.removedRBushNodeAABBs=[],this.renderQueue=[],this.restoreStack=[],this.clearFullScreen=!1,this.vpMatrix=eK(),this.dprMatrix=eK(),this.tmpMat4=eK(),this.vec3a=eI(),this.vec3b=eI(),this.vec3c=eI(),this.vec3d=eI()}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(_S.UNMOUNTED,p),f.addEventListener(_S.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(_S.UNMOUNTED,p),f.removeEventListener(_S.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(ni(r.dprMatrix,[e,e,1]),e6(r.vpMatrix,r.dprMatrix,o.getOrthoMatrix()),r.clearFullScreen)d(l.root,t);else{var a=r.safeMergeAABB.apply(r,eT([r.mergeDirtyAABBs(r.renderQueue)],ej(r.removedRBushNodeAABBs.map(function(t){var e=t.minX,n=t.minY,r=t.maxX,i=t.maxY,o=new ih;return o.setMinMax([e,n,0],[r,i,0]),o})),!1));if(r.removedRBushNodeAABBs=[],ih.isEmpty(a)){r.renderQueue=[];return}var s=r.convertAABB2Rect(a),u=s.x,p=s.y,h=s.width,y=s.height,g=eq(r.vec3a,[u,p,0],r.vpMatrix),v=eq(r.vec3b,[u+h,p,0],r.vpMatrix),b=eq(r.vec3c,[u,p+y,0],r.vpMatrix),x=eq(r.vec3d,[u+h,p+y,0],r.vpMatrix),O=Math.min(g[0],v[0],x[0],b[0]),w=Math.min(g[1],v[1],x[1],b[1]),E=Math.max(g[0],v[0],x[0],b[0]),k=Math.max(g[1],v[1],x[1],b[1]),M=Math.floor(O),_=Math.floor(w),S=Math.ceil(E-O),P=Math.ceil(k-w);t.save(),r.clearRect(t,M,_,S,P,i.background),t.beginPath(),t.rect(M,_,S,P),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 a2(_P.DIRTY_RECTANGLE,{dirtyRect:{x:M,y:_,width:S,height:P}})),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)&a3.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!==_c.LINE&&t.nodeName!==_c.PATH&&t.nodeName!==_c.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]);return{x:r,y:i,width:Math.ceil(n[0])-r,height:Math.ceil(n[1])-i}},t.prototype.mergeDirtyAABBs=function(t){var e=new ih;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=ej(t.getMin(),2),n=e[0],r=e[1],i=ej(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 ih);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),Tm(l)||(t.lineDashOffset=l),Tm(o)||(t.globalAlpha*=o),Tm(r)||Array.isArray(r)||r.isNone||(t.strokeStyle=e.attributes.stroke),Tm(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?(eQ(this.tmpMat4,e.getLocalTransform()),this.vec3a[0]=r,this.vec3a[1]=i,this.vec3a[2]=0,e8(this.tmpMat4,this.tmpMat4,this.vec3a),e6(this.tmpMat4,n,this.tmpMat4)):(eQ(this.tmpMat4,e.getWorldTransform()),this.vec3a[0]=r,this.vec3a[1]=i,this.vec3a[2]=0,e8(this.tmpMat4,this.tmpMat4,this.vec3a)),e6(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 ih;return t.forEach(function(t){n.add(t)}),n},t.tag="CanvasRenderer",t}(),TO=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,b=e.filter,x=e.miterLimit,O=!Tm(a)&&!a.isNone,w=!Tm(c)&&!c.isNone&&p>0,E=0===a.alpha,k=!!(b&&b.length),M=!Tm(g)&&v>0,_=n.nodeName,S="inner"===y,P=w&&M&&(_===_c.PATH||_===_c.LINE||_===_c.POLYLINE||E||S);O&&(t.globalAlpha=s*u,P||Tw(n,t,M),this.fill(t,n,a,l,r,i,o),P||this.clearShadowAndFilter(t,k,M)),w&&(t.globalAlpha=s*f,t.lineWidth=p,Tm(x)||(t.miterLimit=x),Tm(h)||(t.lineCap=h),Tm(d)||(t.lineJoin=d),P&&(S&&(t.globalCompositeOperation="source-atop"),Tw(n,t,!0),S&&(this.stroke(t,n,c,r,i,o),t.globalCompositeOperation="source-over",this.clearShadowAndFilter(t,k,!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;!Tm(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()}):(i9(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()}):(i9(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===_w.LinearGradient||t.type===_w.RadialGradient){var i=e.getGeometryBounds(),o=i&&2*i.halfExtents[0]||1,a=i&&2*i.halfExtents[1]||1;r=this.imagePool.getOrCreateGradient(ek(ek({type:t.type},t.value),{width:o,height:a}),n)}return r},t}();function Tw(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 TE=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(Tb(a)?r=this.imagePool.getImageSync(a):(u||(u=a.width),c||(c=a.height),r=a),r){Tw(n,t,!Tm(l)&&s>0);try{t.drawImage(r,0,0,u,c)}catch(t){}}},t}(),Tk=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,b=e.dx,x=e.dy,O=e.shadowColor,w=e.shadowBlur,E=v.font,k=v.lines,M=v.height,_=v.lineHeight,S=v.lineMetrics;t.font=E,t.lineWidth=a,t.textAlign="middle"===l?"center":l;var P=s;o.enableCSSParsing||"alphabetic"!==P||(P="bottom"),t.lineJoin=u,Tm(c)||(t.miterLimit=c);var j=0;"middle"===s?j=-M/2-_/2:"bottom"===s||"alphabetic"===s||"ideographic"===s?j=-M:("top"===s||"hanging"===s)&&(j=-_);var A=b||0;j+=x||0,1===k.length&&("bottom"===P?(P="middle",j-=.5*M):"top"===P&&(P="middle",j+=.5*M)),t.textBaseline=P,Tw(n,t,!Tm(O)&&w>0);for(var T=0;T<k.length;T++){var C=a/2+A;j+=_,Tm(p)||p.isNone||!a||this.drawLetterSpacing(t,k[T],S[T],l,C,j,f,d,y,g,!0),Tm(h)||this.drawLetterSpacing(t,k[T],S[T],l,C,j,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)return void(c?this.strokeText(t,e,i,o,s):this.fillText(t,e,i,o,l,u));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=!Tm(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=!Tm(i)&&1!==i;a&&(o=t.globalAlpha,t.globalAlpha=i),t.strokeText(e,n,r),a&&(t.globalAlpha=o)},t}();eE(function(){return null!==l&&l.apply(this,arguments)||this},l=TO),eE(function(){return null!==s&&s.apply(this,arguments)||this},s=TO),eE(function(){return null!==u&&u.apply(this,arguments)||this},u=TO),eE(function(){return null!==c&&c.apply(this,arguments)||this},c=TO),eE(function(){return null!==f&&f.apply(this,arguments)||this},f=TO),eE(function(){return null!==p&&p.apply(this,arguments)||this},p=TO),eE(function(){return null!==h&&h.apply(this,arguments)||this},h=TO);var TM=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 eE(e,t),e.prototype.init=function(){var t,e=ek({dirtyObjectNumThreshold:500,dirtyObjectRatioThreshold:.8},this.options),n=this.context.imagePool,r=new TO(n),i=((t={})[_c.CIRCLE]=r,t[_c.ELLIPSE]=r,t[_c.RECT]=r,t[_c.IMAGE]=new TE(n),t[_c.TEXT]=new Tk,t[_c.LINE]=r,t[_c.POLYLINE]=r,t[_c.POLYGON]=r,t[_c.PATH]=r,t[_c.GROUP]=void 0,t[_c.HTML]=void 0,t[_c.MESH]=void 0,t);this.context.defaultStyleRendererFactory=i,this.context.styleRendererFactory=i,this.addRenderingPlugin(new Tx(e))},e.prototype.destroy=function(){this.removeAllRenderingPlugins(),delete this.context.defaultStyleRendererFactory,delete this.context.styleRendererFactory},e}(r5),T_=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)},b=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)},x=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)},O=function(t){t.removeEventListener("touchstart",c,!0),t.removeEventListener("touchend",u,!0),t.removeEventListener("touchmove",s,!0),t.removeEventListener("touchcancel",h,!0)},w=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):b(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?x(t):w(t),l.supportsTouchEvents&&O(t),a.useNativeClickEvent&&t.removeEventListener("click",y,!0),t.removeEventListener("wheel",d,!0)})},t.tag="DOMInteraction",t}(),TS=function(t){function e(){var e=t.apply(this,eT([],ej(arguments),!1))||this;return e.name="dom-interaction",e}return eE(e,t),e.prototype.init=function(){this.addRenderingPlugin(new T_)},e.prototype.destroy=function(){this.removeAllRenderingPlugins()},e}(r5),TP={}.toString,Tj=function(t,e){return TP.call(t)==="[object "+e+"]"},TA=function(t){return Tj(t,"Number")},TT=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===_c.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===_c.HTML&&r.$camera){var n=r.getOrCreateEl(e);n&&(n.remove(),s.delete(n))}},p=function(t){var e=t.target;if(e.nodeName===_c.HTML){var n=t.attrName;r.updateAttribute(n,e)}},h=function(t){var e=t.target;if(e.nodeName===_c.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(_P.RESIZE,d),l.addEventListener(_S.MOUNTED,c),l.addEventListener(_S.UNMOUNTED,f),l.addEventListener(_S.ATTR_MODIFIED,p),l.addEventListener(_S.BOUNDS_CHANGED,h)}),a.hooks.endFrame.tap(t.tag,function(){r.$camera&&o.renderReasons.has(__.CAMERA_CHANGED)&&(r.$camera.style.transform=r.joinTransformMatrix(i.getOrthoMatrix()))}),a.hooks.destroy.tap(t.tag,function(){r.$camera&&r.$camera.remove(),l.removeEventListener(_P.RESIZE,d),l.removeEventListener(_S.MOUNTED,c),l.removeEventListener(_S.UNMOUNTED,f),l.removeEventListener(_S.ATTR_MODIFIED,p),l.removeEventListener(_S.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=this.getOrCreateEl(e);switch(t){case"innerHTML":var r=e.parsedStyle.innerHTML;Tj(r,"String")?n.innerHTML=r:(n.innerHTML="",n.appendChild(r));break;case"transformOrigin":var i=e.parsedStyle.transformOrigin;n.style["transform-origin"]="".concat(i[0].value," ").concat(i[1].value);break;case"width":if(this.context.enableCSSParsing){var o=e.computedStyleMap().get("width");n.style.width=o.toString()}else{var o=e.parsedStyle.width;n.style.width=TA(o)?"".concat(o,"px"):o.toString()}break;case"height":if(this.context.enableCSSParsing){var a=e.computedStyleMap().get("height");n.style.height=a.toString()}else{var a=e.parsedStyle.height;n.style.height=TA(a)?"".concat(a,"px"):a.toString()}break;case"zIndex":var l=e.parsedStyle.zIndex;n.style["z-index"]="".concat(l);break;case"visibility":var s=e.parsedStyle.visibility;n.style.visibility=s;break;case"pointerEvents":var u=e.parsedStyle.pointerEvents;n.style.pointerEvents=u;break;case"opacity":var c=e.parsedStyle.opacity;n.style.opacity="".concat(c);break;case"fill":var f=e.parsedStyle.fill,p="";i7(f)?p=f.isNone?"transparent":e.getAttribute("fill"):Array.isArray(f)?p=e.getAttribute("fill"):i9(f),n.style.background=p;break;case"stroke":var h=e.parsedStyle.stroke,d="";i7(h)?d=h.isNone?"transparent":e.getAttribute("stroke"):Array.isArray(h)?d=e.getAttribute("stroke"):i9(h),n.style["border-color"]=d,n.style["border-style"]="solid";break;case"lineWidth":var y=e.parsedStyle.lineWidth;n.style["border-width"]="".concat(y||0,"px");break;case"lineDash":n.style["border-style"]="dashed";break;case"filter":var g=e.style.filter;n.style.filter=g;break;default:"x"!==t&&"y"!==t&&null!=e.style[t]&&""!==e.style[t]&&(n.style[t]=e.style[t])}},t.tag="HTMLRendering",t}(),TC=function(t){function e(){var e=t.apply(this,eT([],ej(arguments),!1))||this;return e.name="html-renderer",e}return eE(e,t),e.prototype.init=function(){this.addRenderingPlugin(new TT)},e.prototype.destroy=function(){this.removeAllRenderingPlugins()},e}(r5),TN={}.toString,TL=function(t){return"[object String]"===TN.call(t)},TI=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):ax&&(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;TL(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?al(o$(u),new lM({})):e1(eK()),c&&e9(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===_w.LinearGradient){var p,h,d,y,g=(p=ie(l.value),h=0+o/2,d=0+a/2,y=Math.abs(o*Math.cos(p))+Math.abs(a*Math.sin(p)),{x1:h-Math.cos(p)*y/2,y1:d-Math.sin(p)*y/2,x2:h+Math.cos(p)*y/2,y2:d+Math.sin(p)*y/2}),v=g.x1,b=g.y1,x=g.x2,O=g.y2;f=e.createLinearGradient(v,b,x,O)}else if(r===_w.RadialGradient){var w,E,k,M=(w=s.value,E=u.value,s.unit===_g.kPercentage&&(w=s.value/100*o),u.unit===_g.kPercentage&&(E=u.value/100*a),k=Math.max(nZ([0,0],[w,E]),nZ([0,a],[w,E]),nZ([o,a],[w,E]),nZ([o,0],[w,E])),c&&(c instanceof iB?k=c.value:c instanceof iC&&("closest-side"===c.value?k=Math.min(w,o-w,E,a-E):"farthest-side"===c.value?k=Math.max(w,o-w,E,a-E):"closest-corner"===c.value&&(k=Math.min(nZ([0,0],[w,E]),nZ([0,a],[w,E]),nZ([o,a],[w,E]),nZ([o,0],[w,E]))))),{x:w,y:E,r:k}),_=M.x,S=M.y,P=M.r;f=e.createRadialGradient(_,S,0,_,S,P)}return f&&(i.forEach(function(t){var e=t.offset,n=t.color;e.unit===_g.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 TL(e)?"pattern-".concat(e,"-").concat(n):"rect"===e.nodeName?"pattern-".concat(e.entity,"-").concat(n):void 0},t}(),TR=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===_c.IMAGE){var l=o.img,s=o.keepAspectRatio;TL(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===_c.IMAGE&&"img"===r&&TL(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(_S.MOUNTED,l),o.addEventListener(_S.ATTR_MODIFIED,s)}),n.hooks.destroy.tap(t.tag,function(){o.removeEventListener(_S.MOUNTED,l),o.removeEventListener(_S.ATTR_MODIFIED,s)})},t.tag="LoadImage",t}(),TD=function(t){function e(){var e=t.apply(this,eT([],ej(arguments),!1))||this;return e.name="image-loader",e}return eE(e,t),e.prototype.init=function(){this.context.imagePool=new TI(this.context.config),this.addRenderingPlugin(new TR)},e.prototype.destroy=function(){this.removeAllRenderingPlugins()},e}(r5),TF={}.toString,Tz=function(t){return"[object String]"===TF.call(t)},TB=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=Tz(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=this.canvasConfig.devicePixelRatio||ax&&window.devicePixelRatio||1;r=r>=1?Math.ceil(r):1,this.dpr=r,this.$canvas&&(this.$canvas.width=this.dpr*t,this.$canvas.height=this.dpr*e,n=this.$canvas,ax&&n.style&&(n.style.width=t+"px",n.style.height=e+"px")),this.renderingContext.renderReasons.add(__.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={}),e_(this,void 0,void 0,function(){var e,n;return eS(this,function(r){return e=t.type,n=t.encoderOptions,[2,this.context.canvas.toDataURL(e,n)]})})},t}(),TW=function(t){function e(){var e=t.apply(this,eT([],ej(arguments),!1))||this;return e.name="canvas-context-register",e}return eE(e,t),e.prototype.init=function(){this.context.ContextService=TB},e.prototype.destroy=function(){delete this.context.ContextService},e}(r5),T$=function(t){function e(e){var n=t.call(this,e)||this;return n.registerPlugin(new TW),n.registerPlugin(new TD),n.registerPlugin(new A3),n.registerPlugin(new TM),n.registerPlugin(new TS),n.registerPlugin(new Tg),n.registerPlugin(new TC),n}return eE(e,t),e}(r3),TG=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 e_(n,void 0,void 0,function(){var n,o,p,h,d,y;return eS(this,function(g){switch(g.label){case 0:if(!l){var v;if(n=t.timeStamp-s,v=[t.clientX,t.clientY],o=Math.sqrt((v[0]-u[0])*(v[0]-u[0])+(v[1]-u[1])*(v[1]-u[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}(),TH=function(t){function e(e){void 0===e&&(e={});var n=t.call(this)||this;return n.options=e,n.name="dragndrop",n}return eE(e,t),e.prototype.init=function(){this.addRenderingPlugin(new TG(ek({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}(r5),TV=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)}},TU=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}(),Tq=function(t,e){if(t===e)return!0;if(!t||!e||OH(t)||OH(e))return!1;if(m5(t)||m5(e)){if(t.length!==e.length)return!1;for(var n=!0,r=0;r<t.length&&(n=Tq(t[r],e[r]));r++);return n}if(tz(t)||tz(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=Tq(t[i[r]],e[i[r]]));r++);return n}return!1};let TY=[["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 TX=n(5682),TK=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 TZ=t=>{let{important:e={}}=t,n=TK(t,["important"]);return r=>{let i,{theme:o,coordinate:a,scales:l}=r;return mN(Object.assign(Object.assign(Object.assign({},n),(i=t.orientation%(2*Math.PI))==Math.PI/2?{titleTransform:"translate(0, 50%)"}:i>-Math.PI/2&&i<Math.PI/2?{titleTransform:"translate(50%, 0)"}:i>Math.PI/2&&i<3*Math.PI/2?{titleTransform:"translate(-50%, 0)"}:{}),{important:Object.assign(Object.assign({},function(t,e,n,r){let{radar:i}=t,[o]=r,a=o.getOptions().name,[l,s]=eO(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,o,a,l)),e)}))(r)}};TZ.props=Object.assign(Object.assign({},mN.props),{defaultPosition:"center"});let TQ=t=>(...e)=>vq(Object.assign({},{block:!0},t))(...e);TQ.props=Object.assign(Object.assign({},vq.props),{defaultPosition:"top",defaultOrientation:"horizontal"});let TJ=t=>e=>{let{scales:n}=e;return vq(Object.assign({},{type:"size",data:mM(n,"size").getTicks().map((t,e)=>({value:t,label:String(t)}))},t))(e)};TJ.props=Object.assign(Object.assign({},vq.props),{defaultPosition:"top",defaultOrientation:"horizontal"});let T0=t=>TJ(Object.assign({},{block:!0},t));T0.props=Object.assign(Object.assign({},vq.props),{defaultPosition:"top",defaultOrientation:"horizontal"});var T1=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 T2=({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:b,marginRight:x,data:O,coordinate:w,theme:E,component:k,interaction:M,x:_,y:S,z:P,key:j,frame:A,labelTransform:T,parentKey:C,clip:N,viewStyle:L,title:I}=e,R=T1(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:_,y:S,z:P,key:j,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:E,coordinate:w,component:k,interaction:M,frame:A,labelTransform:T,margin:y,marginLeft:g,marginBottom:v,marginTop:b,marginRight:x,parentKey:C,clip:N,style:L},!t&&{title:I}),{marks:[Object.assign(Object.assign(Object.assign({},R),{key:`${j}-0`,data:O}),t&&{title:I})]})]};T2.props={};var T5=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 T3=()=>t=>{let{children:e}=t,n=T5(t,["children"]);if(!Array.isArray(e))return[];let{data:r,scale:i={},axis:o={},legend:a={},encode:l={},transform:s=[]}=n,u=T5(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=T5(t,["data","scale","axis","legend","encode","transform"]);return Object.assign({data:wE(e,r),scale:tW({},i,n),encode:tW({},l,f),transform:[...s,...p],axis:!!u&&!!o&&tW({},o,u),legend:!!c&&!!a&&tW({},a,c)},h)});return[Object.assign(Object.assign({},u),{marks:c,type:"standardView"})]};function T4(t,e,n,r){let i=e.length/2,o=e.slice(0,i),a=e.slice(i),l=w2(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=uy(uh(s(l+1),c))/Math.PI*180;return{x:u[0],y:u[1],transform:`rotate(${f})`,textAlign:"center",textBaseline:"middle"}}function T6(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=us(n.x,u),l=us(n.y,c);return Object.assign(Object.assign({},t),{x:(i||e)+o,y:(l||r)+a})};return f("left"===t?{x:0,y:c/2,textAnchor:"start",textBaseline:"middle"}:"right"===t?{x:u,y:c/2,textAnchor:"end",textBaseline:"middle"}:"top"===t?{x:u/2,y:0,textAnchor:"center",textBaseline:"top"}:"bottom"===t?{x:u/2,y:c,textAnchor:"center",textBaseline:"bottom"}:"top-left"===t?{x:0,y:0,textAnchor:"start",textBaseline:"top"}:"top-right"===t?{x:u,y:0,textAnchor:"end",textBaseline:"top"}:"bottom-left"===t?{x:0,y:c,textAnchor:"start",textBaseline:"bottom"}:"bottom-right"===t?{x:u,y:c,textAnchor:"end",textBaseline:"bottom"}:{x:u/2,y:c/2,textAnchor:"center",textBaseline:"middle"})}function T8(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}=ca(r,e,[i,o]),h="inside"===t?(f+p)/2:p,d=T7(h,a,l);return Object.assign(Object.assign({},(()=>{let[n,r]=e,[i,o]="inside"===t?T9(s,h,u+(c-u)*.5):ub(n,r);return{x:i,y:o}})()),{textAlign:"inside"===t?"center":"start",textBaseline:"middle",rotate:d})}function T9(t,e,n){return[t[0]+Math.sin(e)*n,t[1]-Math.cos(e)*n]}function T7(t,e,n){if(!e)return 0;let r=n?0:0>Math.sin(t)?90:-90;return t/Math.PI*180+r}function Ct(t){return void 0===t?null:t}function Ce(t,e,n,r){let{bounds:i}=n,[o]=i;return{x:Ct(o[0]),y:Ct(o[1])}}function Cn(t,e,n,r){let{bounds:i}=n;return 1===i.length?Ce(t,e,n,r):(ey(r)?T8:eb(r)?function(t,e,n,r){let{y:i,y1:o,autoRotate:a,rotateToAlignArc:l,radius:s=.5,offset:u=0}=n,c=ca(r,e,[i,o]),{startAngle:f,endAngle:p}=c,h=r.getCenter(),d=(f+p)/2,y=T7(d,a,l),{innerRadius:g,outerRadius:v}=c,[b,x]=T9(h,d,g+(v-g)*s+u);return Object.assign({x:b,y:x},{textAlign:"center",textBaseline:"middle",rotate:y})}:T6)(t,e,n,r)}function Cr(t,e,n){let{innerRadius:r,outerRadius:i}=ca(n,t,[e.y,e.y1]);return r+(i-r)}function Ci(t,e,n){let{startAngle:r,endAngle:i}=ca(n,t,[e.y,e.y1]);return(r+i)/2}function Co(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=Ci(e,n,r),h=Math.sin(p)>0?1:-1,d=T7(p,i,o),y={textAlign:h>0||ey(r)?"start":"end",textBaseline:"middle",rotate:d},g=Cr(e,n,r),[[v,b],[x,O],[w,E]]=function(t,e,n,r,i){let[o,a]=T9(t,e,n),[l,s]=T9(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),k=l?c*h:0,M=w+k;return Object.assign(Object.assign({x0:v,y0:b,x:w+k,y:E},y),{connector:l,connectorPoints:[[x-M,O-E],[w-M,E-E]]})}function Ca(t,e,n,r){let{bounds:i}=n;return 1===i.length?Ce(t,e,n,r):(ey(r)?T8:eb(r)?Co:T6)(t,e,n,r)}T3.props={};var Cl=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 Cs(t,e,n,r){if(!eb(r))return{};let{connectorLength:i,connectorLength2:o,connectorDistance:a}=n,l=Cl(Co("outside",e,n,r),[]),s=r.getCenter(),u=Cr(e,n,r),c=Math.sin(Ci(e,n,r))>0?1:-1,f=s[0]+(u+i+o+ +a)*c,{x:p}=l,h=f-p;return l.x+=h,l.connectorPoints[0][0]-=h,l}var Cu=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 Cc(t,e,n,r){if(!eb(r))return{};let{connectorLength:i,connectorLength2:o,connectorDistance:a}=n,l=Cu(Co("outside",e,n,r),[]),{x0:s,y0:u}=l,c=r.getCenter(),f=function(t){if(eb(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=ug([s-c[0],u-c[1]]),h=Math.sin(p)>0?1:-1,[d,y]=T9(c,p,f+i);return l.x=d+(o+a)*h,l.y=y,l}var Cf=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 Cp=(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=Cf(o,["text","x","y","transform","transformOrigin","className"]),h=function(t,e,n,r,i){let{position:o}=e,{render:a}=i,l=void 0!==o?o:eb(n)?"inside":eh(n)?"right":"top",s=r[a?"htmlLabel":"inside"===l?"innerLabel":"label"],u=Object.assign({},s,e),c=tb[OF(l)];if(!c)throw Error(`Unknown position: ${l}`);return Object.assign(Object.assign({},s),c(l,t,u,n,i))}(e,o,n,r,t),{rotate:d=0,transform:y=""}=h,g=Cf(h,["rotate","transform"]);return uf(new pG).call(cn,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(cn,p).node()}};Cp.props={defaultMarker:"point"};var Ch=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 Cd(t,e){let n=Object.assign(Object.assign({},{"component.axisRadar":TZ,"component.axisLinear":mN,"component.axisArc":mL,"component.legendContinuousBlock":TQ,"component.legendContinuousBlockSize":T0,"component.legendContinuousSize":TJ,"interaction.event":xq,"composition.mark":T2,"composition.view":T3,"shape.label.label":Cp}),e),r=e=>{if("string"!=typeof e)return e;let r=`${t}.${e}`;return n[r]||un(`Unknown Component: ${r}`)};return[(t,e)=>{let{type:n}=t,i=Ch(t,["type"]);n||un("Plot type is required!");let o=r(n);return null==o?void 0:o(i,e)},r]}function Cy(t){let{canvas:e,group:n}=t;return(null==e?void 0:e.document)||(null==n?void 0:n.ownerDocument)||un("Cannot find library document")}var Cg=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 Cm(t,e){let{coordinate:n={}}=t,r=Cg(t,["coordinate"]),{type:i,transform:o=[]}=n,a=Cg(n,["type","transform"]);if(!i)return Object.assign(Object.assign({},r),{coordinates:o});let[,l]=Cd("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 Cv(t,e){return t.filter(t=>t.type===e)}function Cb(t){return Cv(t,"polar").length>0}function Cx(t){return Cv(t,"transpose").length%2==1}function CO(t){return Cv(t,"theta").length>0}function Cw(t){return Cv(t,"radial").length>0}function CE(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 Ck=CE("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),CM=CE("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),C_=CE("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),CS=CE("4269d0efb118ff725c6cc5b03ca951ff8ab7a463f297bbf59c6b4e9498a0"),CP=CE("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),Cj=CE("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),CA=CE("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),CT=CE("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),CC=CE("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),CN=CE("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),CL=CE("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function CI(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function CR(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function CD(){}var CF="\\s*([+-]?\\d+)\\s*",Cz="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",CB="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",CW=/^#([0-9a-f]{3,8})$/,C$=RegExp(`^rgb\\(${CF},${CF},${CF}\\)$`),CG=RegExp(`^rgb\\(${CB},${CB},${CB}\\)$`),CH=RegExp(`^rgba\\(${CF},${CF},${CF},${Cz}\\)$`),CV=RegExp(`^rgba\\(${CB},${CB},${CB},${Cz}\\)$`),CU=RegExp(`^hsl\\(${Cz},${CB},${CB}\\)$`),Cq=RegExp(`^hsla\\(${Cz},${CB},${CB},${Cz}\\)$`),CY={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 CX(){return this.rgb().formatHex()}function CK(){return this.rgb().formatRgb()}function CZ(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=CW.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?CQ(e):3===n?new C2(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?CJ(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?CJ(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=C$.exec(t))?new C2(e[1],e[2],e[3],1):(e=CG.exec(t))?new C2(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=CH.exec(t))?CJ(e[1],e[2],e[3],e[4]):(e=CV.exec(t))?CJ(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=CU.exec(t))?C9(e[1],e[2]/100,e[3]/100,1):(e=Cq.exec(t))?C9(e[1],e[2]/100,e[3]/100,e[4]):CY.hasOwnProperty(t)?CQ(CY[t]):"transparent"===t?new C2(NaN,NaN,NaN,0):null}function CQ(t){return new C2(t>>16&255,t>>8&255,255&t,1)}function CJ(t,e,n,r){return r<=0&&(t=e=n=NaN),new C2(t,e,n,r)}function C0(t){return(t instanceof CD||(t=CZ(t)),t)?new C2((t=t.rgb()).r,t.g,t.b,t.opacity):new C2}function C1(t,e,n,r){return 1==arguments.length?C0(t):new C2(t,e,n,null==r?1:r)}function C2(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function C5(){return`#${C8(this.r)}${C8(this.g)}${C8(this.b)}`}function C3(){let t=C4(this.opacity);return`${1===t?"rgb(":"rgba("}${C6(this.r)}, ${C6(this.g)}, ${C6(this.b)}${1===t?")":`, ${t})`}`}function C4(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function C6(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function C8(t){return((t=C6(t))<16?"0":"")+t.toString(16)}function C9(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Nt(t,e,n,r)}function C7(t){if(t instanceof Nt)return new Nt(t.h,t.s,t.l,t.opacity);if(t instanceof CD||(t=CZ(t)),!t)return new Nt;if(t instanceof Nt)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 Nt(a,l,s,t.opacity)}function Nt(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Ne(t){return(t=(t||0)%360)<0?t+360:t}function Nn(t){return Math.max(0,Math.min(1,t||0))}function Nr(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 Ni(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}CI(CD,CZ,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:CX,formatHex:CX,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return C7(this).formatHsl()},formatRgb:CK,toString:CK}),CI(C2,C1,CR(CD,{brighter(t){return t=null==t?1.4285714285714286:Math.pow(1.4285714285714286,t),new C2(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new C2(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new C2(C6(this.r),C6(this.g),C6(this.b),C4(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:C5,formatHex:C5,formatHex8:function(){return`#${C8(this.r)}${C8(this.g)}${C8(this.b)}${C8((isNaN(this.opacity)?1:this.opacity)*255)}`},formatRgb:C3,toString:C3})),CI(Nt,function(t,e,n,r){return 1==arguments.length?C7(t):new Nt(t,e,n,null==r?1:r)},CR(CD,{brighter(t){return t=null==t?1.4285714285714286:Math.pow(1.4285714285714286,t),new Nt(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new Nt(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 C2(Nr(t>=240?t-240:t+120,i,r),Nr(t,i,r),Nr(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new Nt(Ne(this.h),Nn(this.s),Nn(this.l),C4(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=C4(this.opacity);return`${1===t?"hsl(":"hsla("}${Ne(this.h)}, ${100*Nn(this.s)}%, ${100*Nn(this.l)}%${1===t?")":`, ${t})`}`}}));var No=t=>()=>t;function Na(t,e){return function(n){return t+n*e}}function Nl(t,e){var n=e-t;return n?Na(t,n):No(isNaN(t)?e:t)}function Ns(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=C1(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=+e)?Nl: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)}):No(isNaN(t)?e:t)};function i(t,e){var n=r((t=C1(t)).r,(e=C1(e)).r),i=r(t.g,e.g),o=r(t.b,e.b),a=Nl(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 Nu=Ns(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 Ni((n-r/e)*e,a,i,o,l)}});Ns(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 Ni((n-r/e)*e,i,o,a,l)}});var Nc=t=>Nu(t[t.length-1]),Nf=[,,,].concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(CE),Np=Nc(Nf),Nh=[,,,].concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(CE),Nd=Nc(Nh),Ny=[,,,].concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(CE),Ng=Nc(Ny),Nm=[,,,].concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(CE),Nv=Nc(Nm),Nb=[,,,].concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(CE),Nx=Nc(Nb),NO=[,,,].concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(CE),Nw=Nc(NO),NE=[,,,].concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(CE),Nk=Nc(NE),NM=[,,,].concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(CE),N_=Nc(NM),NS=[,,,].concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(CE),NP=Nc(NS),Nj=[,,,].concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(CE),NA=Nc(Nj),NT=[,,,].concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(CE),NC=Nc(NT),NN=[,,,].concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(CE),NL=Nc(NN),NI=[,,,].concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(CE),NR=Nc(NI),ND=[,,,].concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(CE),NF=Nc(ND),Nz=[,,,].concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(CE),NB=Nc(Nz),NW=[,,,].concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(CE),N$=Nc(NW),NG=[,,,].concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(CE),NH=Nc(NG),NV=[,,,].concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(CE),NU=Nc(NV),Nq=[,,,].concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(CE),NY=Nc(Nq),NX=[,,,].concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(CE),NK=Nc(NX),NZ=[,,,].concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(CE),NQ=Nc(NZ),NJ=[,,,].concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(CE),N0=Nc(NJ),N1=[,,,].concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(CE),N2=Nc(N1),N5=[,,,].concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(CE),N3=Nc(N5),N4=[,,,].concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(CE),N6=Nc(N4),N8=[,,,].concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(CE),N9=Nc(N8),N7=[,,,].concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(CE),Lt=Nc(N7);function Le(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 Ln=Math.PI/180,Lr=180/Math.PI;var Li=-1.78277*.29227-.1347134789;function Lo(t,e,n,r){return 1==arguments.length?function(t){if(t instanceof La)return new La(t.h,t.s,t.l,t.opacity);t instanceof C2||(t=C0(t));var e=t.r/255,n=t.g/255,r=t.b/255,i=(Li*r+-1.7884503806*e-3.5172982438*n)/(Li+-1.7884503806-3.5172982438),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)*Lr-120:NaN;return new La(s<0?s+360:s,l,i,t.opacity)}(t):new La(t,e,n,null==r?1:r)}function La(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Ll(t){return function e(n){function r(e,r){var i=t((e=Lo(e)).h,(r=Lo(r)).h),o=Nl(e.s,r.s),a=Nl(e.l,r.l),l=Nl(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*=1,r.gamma=e,r}(1)}CI(La,Lo,CR(CD,{brighter(t){return t=null==t?1.4285714285714286:Math.pow(1.4285714285714286,t),new La(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new La(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=isNaN(this.h)?0:(this.h+120)*Ln,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),i=Math.sin(t);return new C2(255*(e+n*(-.14861*r+1.78277*i)),255*(e+n*(-.29227*r+-.90649*i)),255*(e+1.97294*r*n),this.opacity)}})),Ll(function(t,e){var n=e-t;return n?Na(t,n>180||n<-180?n-360*Math.round(n/360):n):No(isNaN(t)?e:t)});var Ls=Ll(Nl),Lu=Ls(Lo(300,.5,0),Lo(-240,.5,1)),Lc=Ls(Lo(-100,.75,.35),Lo(80,1.5,.8)),Lf=Ls(Lo(260,.75,.35),Lo(80,1.5,.8)),Lp=Lo();function Lh(t){(t<0||t>1)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return Lp.h=360*t-100,Lp.s=1.5-1.5*e,Lp.l=.8-.9*e,Lp+""}var Ld=C1(),Ly=Math.PI/3,Lg=2*Math.PI/3;function Lm(t){var e;return Ld.r=255*(e=Math.sin(t=(.5-t)*Math.PI))*e,Ld.g=255*(e=Math.sin(t+Ly))*e,Ld.b=255*(e=Math.sin(t+Lg))*e,Ld+""}function Lv(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 Lb(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}var Lx=Lb(CE("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),LO=Lb(CE("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),Lw=Lb(CE("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),LE=Lb(CE("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));function Lk(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=dc(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 LM(t,e){let n,r,[i]=Cd("scale",e),{relations:o}=t,[a]=o&&Array.isArray(o)?[t=>{var e;n=t.map.bind(t),r=null==(e=t.invert)?void 0:e.bind(t);let i=o.filter(([t])=>"function"==typeof t),a=o.filter(([t])=>"function"!=typeof t),l=new Map(a);if(t.map=t=>{for(let[e,n]of i)if(e(t))return n;return l.has(t)?l.get(t):n(t)},!r)return t;let s=new Map(a.map(([t,e])=>[e,t])),u=new Map(i.map(([t,e])=>[e,t]));return t.invert=t=>u.has(t)?t:s.has(t)?s.get(t):r(t),t},t=>(null!==n&&(t.map=n),null!==r&&(t.invert=r),t)]:[s7,s7];return a(i(t))}function L_(t,e){let n=t.filter(({name:t,facet:n=!0})=>n&&t===e),r=n.flatMap(t=>t.domain),i=n.every(LS)?u8(r):n.every(LP)?Array.from(new Set(r)):null;if(null!==i)for(let t of n)t.domain=i}function LS(t){let{type:e}=t;return"string"==typeof e&&["linear","log","pow","time"].includes(e)}function LP(t){let{type:e}=t;return"string"==typeof e&&["band","point","ordinal"].includes(e)}function Lj(t,e,n,r,i){let[o]=Cd("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=mi(t),i=tx[`scheme${r}`],o=tx[`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 LA(t,e){var n;return e||((n=t).startsWith("x")||n.startsWith("y")||n.startsWith("position")||n.startsWith("size")?"point":"ordinal")}function LT(t,e,n){return n||("color"!==t||e?"linear":"sequential")}function LC(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 LN(t){return Array.from(new Set(t.flat()))}function LL(t){return LR(t,t=>{let e=typeof t;return"string"===e||"boolean"===e})}function LI(t){return LR(t,t=>t instanceof Date)}function LR(t,e){for(let n of t)if(n.some(e))return!0;return!1}let LD={linear:"linear",identity:"identity",log:"log",pow:"pow",sqrt:"sqrt",sequential:"sequential"},LF={threshold:"threshold",quantize:"quantize",quantile:"quantile"},Lz={ordinal:"ordinal",band:"band",point:"point"},LB={constant:"constant"};var LW=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,e,n,r,i){let[o]=Cd("component",r),{scaleInstances:a,scale:l,bbox:s}=t;return o(LW(t,["scaleInstances","scale","bbox"]))({coordinate:e,library:r,markState:i,scales:a,theme:n,value:{bbox:s,library:r},scale:l})}function LG(t,e){let n=["left","right","bottom","top"];return s2(t,({type:t,position:e,group:r})=>n.includes(e)?void 0===r?t.startsWith("legend")?`legend-${e}`:Symbol("independent"):"independent"===r?Symbol("independent"):r:Symbol("independent")).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=Eg(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=dc(t,t=>t.size),r=dc(t,t=>t.order),i=dc(t,t=>t.crossPadding);return{type:"group",size:n,order:r,position:t[0].position,children:t,crossPadding:i}})}function LH(t){let e=Cv(t,"polar");if(e.length){let{startAngle:t,endAngle:n}=tE(e[e.length-1]);return[t,n]}let n=Cv(t,"radial");if(n.length){let{startAngle:t,endAngle:e}=tj(n[n.length-1]);return[t,e]}return[-Math.PI/2,Math.PI/2*3]}function LV(t,e,n,r,i,o){let{type:a}=t;if(["left","right","bottom","top"].includes(r)&&"string"==typeof a)return(a.startsWith("axis")?function(t,e,n,r,i,o){t.transform=t.transform||[{type:"hide"}];let a="left"===r||"right"===r,l=LX(t,r,i),{tickLength:s=0,labelSpacing:u=0,titleSpacing:c=0,labelAutoRotate:f}=l,p=LW(l,["tickLength","labelSpacing","titleSpacing","labelAutoRotate"]),h=LU(t,o),d=Lq(p,h),y=s+u;if(d&&d.length){let r=dc(d,t=>t.width),i=dc(d,t=>t.height);if(a)t.size=r+y;else{let{tickFilter:o,labelTransform:a}=t;(function(t,e,n,r,i){if(Eg(e,t=>t.width)>n)return!0;let o=t.clone();o.update({range:[0,n]});let a=LK(t,i),l=a.map(t=>o.map(t)+(o.getBandWidth?o.getBandWidth(t)/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=LY(p);g&&(a?t.size+=c+g.width:t.size+=c+g.height)}:a.startsWith("group")?function(t,e,n,r,i,o){let{children:a}=t,l=dc(a,t=>t.crossPadding);a.forEach(t=>t.crossPadding=l),a.forEach(t=>LV(t,e,n,r,i,o));let s=dc(a,t=>t.size);t.size=s,a.forEach(t=>t.size=s)}:a.startsWith("legendContinuous")?function(t,e,n,r,i,o){let a=(()=>{let{legendContinuous:e}=i;return tW({},e,t)})(),{labelSpacing:l=0,titleSpacing:s=0}=a,u=LW(a,["labelSpacing","titleSpacing"]),c="left"===r||"right"===r,{size:f}=uo(u,"ribbon"),{size:p}=uo(u,"handleIcon");t.size=Math.max(f,2.4*p);let h=Lq(u,LU(t,o));if(h){let e=c?"width":"height",n=dc(h,t=>t[e]);t.size+=n+l}let d=LY(u);d&&(c?t.size=Math.max(t.size,d.width):t.size+=s+d.height)}:"legendCategory"===a?function(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 tW({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=LW(a,["itemSpacing","itemMarkerSize","titleSpacing","rowPadding","colPadding","maxCols","maxRows"]),{cols:y,length:g}=t,v="left"===r||"right"===r,b=void 0===g?e+(v?0:n[0]+n[1]):g,x=LY(d),O=Lq(d,LU(t,o),"itemLabel"),w=Math.max(O[0].height,s)+c,E=(t,e=0)=>s+t+l[0]+e;if(v)(()=>{let e=-1/0,n=0,r=1,i=0,o=-1/0,a=-1/0,l=x?x.height:0,s=b-l;for(let{width:t}of O)e=Math.max(e,E(t,f)),n+w>s?(r++,o=Math.max(o,i),a=Math.max(a,n),i=1,n=w):(n+=w,i++);r<=1&&(o=i,a=n),t.size=e*Math.min(r,p),t.length=a+l,tW(t,{cols:Math.min(r,p),gridRow:o})})();else if("number"==typeof y){let e=Math.ceil(O.length/y),n=dc(O,t=>E(t.width))*y;t.size=w*Math.min(e,h)-c,t.length=Math.min(n,b)}else{let e=1,n=0,r=-1/0;for(let{width:t}of O){let i=E(t,f);n+i>b?(r=Math.max(r,n),n=i,e++):n+=i}1===e&&(r=n),t.size=w*Math.min(e,h)-c,t.length=r}x&&(v?t.size=Math.max(t.size,x.width):t.size+=u+x.height)}:a.startsWith("slider")?function(t,e,n,r,i,o){let{trackSize:a,handleIconSize:l}=(()=>{let{slider:e}=i;return tW({},e,t)})();t.size=Math.max(a,2.4*l)}:"title"===a?function(t,e,n,r,i,o){let a=tW({},i.title,t),{title:l,subtitle:s,spacing:u=0}=a,c=LW(a,["title","subtitle","spacing"]);if(l&&(t.size=LZ(l,uo(c,"title")).height),s){let e=LZ(s,uo(c,"subtitle"));t.size+=u+e.height}}:a.startsWith("scrollbar")?function(t,e,n,r,i,o){let{trackSize:a=6}=tW({},i.scrollbar,t);t.size=a}:()=>{})(t,e,n,r,i,o)}function LU(t,e){let[n]=Cd("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 Lq(t,e,n="label"){var r,i;let o,a,{labelFormatter:l,tickFilter:s,label:u=!0}=t,c=LW(t,["labelFormatter","tickFilter","label"]);if(!u)return null;let f=(r=e,i=l,o=LK(r,s).map(t=>"number"==typeof t?uO(t):t),a=i?"string"==typeof i?_D(i):i:r.getFormatter?r.getFormatter():t=>`${t}`,o.map(a)),p=uo(c,n),h=f.map((t,e)=>Object.fromEntries(Object.entries(p).map(([n,r])=>[n,"function"==typeof r?r(t,e):r]))),d=f.map((t,e)=>LZ(t,h[e]));return h.some(t=>t.transform)||(t.indexBBox=new Map(f.map((t,e)=>e).map(t=>[t,[f[t],d[t]]]))),d}function LY(t){let{title:e}=t,n=LW(t,["title"]);if(!1===e||null==e)return null;let r=uo(n,"title"),{direction:i,transform:o}=r,a=Array.isArray(e)?e.join(","):e;return"string"!=typeof a?null:LZ(a,Object.assign(Object.assign({},r),{transform:o||("vertical"===i?"rotate(-90)":"")}))}function LX(t,e,n){let{title:r}=t,[i,o]=Array.isArray(r)?[r,void 0]:[void 0,r],{axis:a,[`axis${ue(e)}`]:l}=n;return tW({title:i},a,l,Object.assign(Object.assign({},t),{title:o}))}function LK(t,e){let n=t.getTicks?t.getTicks():t.getOptions().domain;return e?n.filter(e):n}function LZ(t,e){var n;let r=(n=t)instanceof lM?n:new lF({style:{text:`${n}`}}),{filter:i}=e,o=LW(e,["filter"]);return r.attr(Object.assign(Object.assign({},o),{visibility:"none"})),r.getBBox()}function LQ(t,e,n,r,i,o,a){let l=s1(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${ue(OF(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=dc(t.children,t=>t.size)):t.size=t.defaultSize},f=r=>{r.size||("auto"!==s?c(r):(LV(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=du(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=LG(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 LJ({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,b=r+u,x=o+s,O=t-a-u,w=[g+h,v+y,f-h-d,c-y-p,"center",null,null];return{top:[g,0,f,v,"vertical",!0,bd,a,O],right:[t-b,v,b,c,"horizontal",!1,bd],bottom:[g,e-x,f,x,"vertical",!1,bd,a,O],left:[0,v,g,c,"horizontal",!0,bd],"top-left":[g,0,f,v,"vertical",!0,bd],"top-right":[g,0,f,v,"vertical",!0,bd],"bottom-left":[g,e-x,f,x,"vertical",!1,bd],"bottom-right":[g,e-x,f,x,"vertical",!1,bd],center:w,inner:w,outer:w}}var L0=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 L1(t,e,n){let{encode:r={},scale:i={},transform:o=[]}=e;return[t,Object.assign(Object.assign({},L0(e,["encode","scale","transform"])),{encode:r,scale:i,transform:o})]}function L2(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]=Cd("data",t),o=function(t){if(u6(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({},L0(t,["type"])),{type:e})}(r),{transform:a=[]}=o,l=[L0(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())})},s7)})(l)(r),u=!r||Array.isArray(r)||Array.isArray(s)?s:{value:s};return[Array.isArray(s)?u7(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 L5(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 L3(t,e,n){let{encode:r,data:i}=e;if(!r)return[t,e];let o=u9(r,t=>{var e,n,r,o;return!function(t){if("object"!=typeof t||t instanceof Date||null===t)return!1;let{type:e}=t;return ui(e)}(t)?{type:(e=i,"function"==typeof(n=t)?"transform":"string"==typeof n&&(r=e,o=n,Array.isArray(r)&&r.some(t=>void 0!==t[o]))?"field":"constant"),value:t}:t});return[t,Object.assign(Object.assign({},e),{encode:o})]}function L4(t,e,n){let{encode:r}=e;if(!r)return[t,e];let i=u9(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 L6(t,e,n){let{encode:r,data:i}=e;if(!r)return[t,e];let{library:o}=n,a=function(t){let[e]=Cd("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=u9(r,t=>a(i,t));return[t,Object.assign(Object.assign({},e),{encode:l})]}function L8(t,e,n){let{tooltip:r={}}=e;return uc(r)?[t,e]:Array.isArray(r)?[t,Object.assign(Object.assign({},e),{tooltip:{items:r}})]:uu(r)&&k$(r)?[t,Object.assign(Object.assign({},e),{tooltip:r})]:[t,Object.assign(Object.assign({},e),{tooltip:{items:[r]}})]}function L9(t,e,n){let{data:r,encode:i,tooltip:o={}}=e;if(uc(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(uu(e)){let{field:n,channel:o,color:a,name:l=n,valueFormatter:s=t=>t}=e,u="string"==typeof s?_D(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);uu(t)?n[o]=t:n[o]={value:t}}return n}return e},{title:l,items:s=[]}=o,u=L0(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 L7(t,e,n){let{encode:r}=e,i=L0(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=L0(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 It(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 tW(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 Ie(t,e,n){let{animate:r}=e;return r||void 0===r||tW(e,{animate:{enter:{type:null},exit:{type:null},update:{type:null}}}),[t,e]}var In=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())})},Ir=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},Ii=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())})},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};function Ia(t,e,n,r){var i;return Ii(this,void 0,void 0,function*(){let[o]=Cd("composition",n),[a]=Cd("interaction",n),l=new Set(Object.keys(n).map(t=>{var e;return null==(e=/mark\.(.*)/.exec(t))?void 0:e[1]}).filter(ui)),s=new Set(Object.keys(n).map(t=>{var e;return null==(e=/component\.(.*)/.exec(t))?void 0:e[1]}).filter(ui)),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=>f(t)?[t]:o({type:u(t),static:(t=>{let{type:e}=t;return"string"==typeof e&&!!s.has(e)})(t)})(t),h=[],d=new Map,y=new Map,g=[t],v=[];for(;g.length;){let t=g.shift();if(f(t)){let e=y.get(t),[r,i]=e?If(e,t,n):yield Is(t,n);d.set(r,t),h.push(r);let o=i.flatMap(p).map(t=>Cm(t,n));if(g.push(...o),o.every(f)){let t=yield Promise.all(o.map(t=>Iu(t,n)));!function(t){let e=t.flatMap(t=>Array.from(t.values())).flatMap(t=>t.channels.map(t=>t.scale));L_(e,"x"),L_(e,"y")}(t);for(let e=0;e<o.length;e++){let n=o[e],r=t[e];y.set(n,r)}}}else{let e=p(c(t)?t:yield Ib(t,n));Array.isArray(e)?g.push(...e):"function"==typeof e&&v.push(e())}}r.emitter.emit(xG.BEFORE_PAINT);let b=new Map,x=new Map,O=[];e.selectAll(IE("view")).data(h,t=>t.key).join(t=>t.append("g").attr("className","view").attr("id",t=>t.key).call(Il).each(function(t,e,i){Ip(t,uf(i),O,n,r),b.set(t,i)}),t=>t.call(Il).each(function(t,e,i){Ip(t,uf(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=d.get(o),u=function(t,e,n,r){let i=function(t){let[,e]=Cd("interaction",t);return t=>{let[n,r]=t;try{return[n,e(n)]}catch(t){return[n,r.type]}}}(n),o=Iv(e).map(i).filter(t=>t[1]&&t[1].props&&t[1].props.reapplyWhenUpdate).map(t=>t[0]);return(e,i,a)=>Ii(this,void 0,void 0,function*(){let[l,s]=yield Is(e,n);for(let a of(Ip(l,t,[],n,r),o.filter(t=>t!==i)))!function(t,e,n,r,i,o){var a;let[l]=Cd("interaction",i),s=e.node().nameInteraction,u=Iv(n).find(([e])=>e===t),c=s.get(t);if(!c||(null==(a=c.destroy)||a.call(c),!u[1]))return;let f=Ic(r,t,u[1],l)({options:n,view:r,container:e.node(),update:t=>Promise.resolve(t)},[],o.emitter);s.set(t,{destroy:f})}(a,t,e,l,n,r);for(let e of s)Ia(e,t,n,r);return a(),{options:e,view:l}})}(uf(a),s,n,r);return{view:o,container:a,options:s,setState:(t,e=t=>t)=>l.set(t,e),update:(n,r)=>Ii(this,void 0,void 0,function*(){let i=ut(Array.from(l.values()))(s);return yield u(i,n,()=>{tF(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=Iv(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)||i.call(u)),l){let n=Ic(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,Iv(e))){let[e,o]=i;if(o){let i=Ic(t.view,e,o,a)(t,k,r.emitter);n.set(e,{destroy:i})}}}E();let{width:M,height:_}=t,S=[];for(let t of v){let i=new Promise(i=>Ii(this,void 0,void 0,function*(){for(let i of t){let t=Object.assign({width:M,height:_},i);yield Ia(t,e,n,r)}i()}));S.push(i)}return r.views=h,null==(i=r.animations)||i.forEach(t=>null==t?void 0:t.cancel()),r.animations=O,r.emitter.emit(xG.AFTER_PAINT),Promise.all([...O.filter(ui).map(Ig).map(t=>t.finished),...S])})}function Il(t){t.style("transform",t=>`translate(${t.layout.x}, ${t.layout.y})`)}function Is(t,e){return Ii(this,void 0,void 0,function*(){let n=function(t){let{coordinate:e={},interaction:n={},style:r={},marks:i}=t,o=Io(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)=>tW(t,e),{}),c=[n,...l].reduce((t,e)=>tW(t,e),{}),f=[...s,r].reduce((t,e)=>tW(t,e),{});return Object.assign(Object.assign({},o),{marks:i,coordinate:u,interaction:c,style:f})}((yield function(t,e){return Ii(this,void 0,void 0,function*(){let[n,r]=Cd("mark",e),i=new Set(Object.keys(e).map(t=>{var e;return null==(e=/component\.(.*)/.exec(t))?void 0:e[1]}).filter(ui)),{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,b=t=>"auto"===t?20:t;return{width:n-b(i)-b(o)-u-c-d-y,height:e-b(a)-b(l)-f-p-g-v}}(t),f={options:t,width:u,height:c};for(;s.length;){let[t]=s.splice(0,1),o=yield Ib(t,e),{type:u=un("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=Cm(n,e);return If((yield Iu(r,e)),r,e)})}function Iu(t,e){return Ii(this,void 0,void 0,function*(){let[n]=Cd("theme",e),[,r]=Cd("mark",e),{theme:i,marks:o,coordinates:a=[]}=t,l=n(Im(i)),s=new Map;for(let t of o){let{type:n}=t,{props:i={}}=r(n),o=yield function(t,e,n){return In(this,void 0,void 0,function*(){let[r,i]=yield function(t,e,n){return In(this,void 0,void 0,function*(){let{library:r}=n,[i]=Cd("transform",r),{preInference:o=[],postInference:a=[]}=e,{transform:l=[]}=t,s=[L1,L2,L5,L3,L4,L6,L7,Ie,It,L8,...o.map(i),...l.map(i),...a.map(i),L9],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=s3(Object.entries(o).filter(([,t])=>ui(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[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=Ir(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 s1(Array.from(s.values()).flatMap(t=>t.channels),({scaleKey:t})=>t).values()){let n=t.reduce((t,{scale:e})=>tW(t,e),{}),{scaleKey:r}=t[0],{values:i}=t[0],o=Array.from(new Set(i.map(t=>t.field).filter(ui))),s=tW({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;return LR(e,uu)?"identity":"string"==typeof o?"linear":(i||o||[]).length>2?LA(t,l):void 0!==i?LL([i])?LA(t,l):LI(e)?"time":LT(t,o,a):LL(e)?LA(t,l):LI(e)?"time":LT(t,o,a)}(t,e,n);if("string"!=typeof l)return n;let s=function(t,e,n){let{domain:r}=n;if(void 0!==r)return r;switch(t){case"linear":case"time":case"log":case"pow":case"sqrt":case"quantize":case"threshold":return LC(function(t,e){let{zero:n=!1}=e,r=1/0,i=-1/0;for(let e of t)for(let t of e)ui(t)&&(r=Math.min(r,+t),i=Math.max(i,+t));return r===1/0?[]:n?[Math.min(0,r),i]:[r,i]}(e,n),n);case"band":case"ordinal":case"point":return LN(e);case"quantile":return LN(e).sort();case"sequential":return LC(function(t){let e=1/0,n=-1/0;for(let r of t)for(let t of r)ui(t)&&(e=Math.min(e,+t),n=Math.max(n,+t));return e===1/0?[]:[e<0?-n:e,n]}(e),n);default:return[]}}(l,e,n),u=function(t,e,n){let{ratio:r}=n;return null==r?e:LS({type:t})?function(t,e,n){let r=t.map(Number),i=new u4({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):LP({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){switch(t){case"linear":case"time":case"log":case"pow":case"sqrt":return function(t){let{interpolate:e=uq,nice:n=!1,tickCount:r=5}=t;return Object.assign(Object.assign({},t),{interpolate:e,nice:n,tickCount:r})}(n);case"band":case"point":return function(t,e,n,r){var i,o,a;if(void 0!==r.padding||void 0!==r.paddingInner||void 0!==r.paddingOuter)return Object.assign(Object.assign({},r),{unknown:NaN});let l=(i=t,o=e,a=n,"enterDelay"===o||"enterDuration"===o||"size"===o?0:"band"===i?.1*!CO(a):.5*("point"===i)),{paddingInner:s=l,paddingOuter:u=l}=r;return Object.assign(Object.assign({},r),{paddingInner:s,paddingOuter:u,padding:l,unknown:NaN})}(t,e,r,n);case"sequential":return function(t){let{palette:e="ylGnBu",offset:n}=t,r=mi(e),i=tx[`interpolate${r}`];if(!i)throw Error(`Unknown palette: ${r}`);return{interpolator:n?t=>i(n(t)):i}}(n);default:return n}}(l,t,n,r)),{domain:u,range:function(t,e,n,r,i,o,a){let{range:l}=r;if("string"==typeof l)return l.split("-");if(void 0!==l)return l;let{rangeMin:s,rangeMax:u}=r;switch(t){case"linear":case"time":case"log":case"pow":case"sqrt":{var c,f;let[t,l]=(c=e,f=Lj(n,r,i,o,a),"enterDelay"===c?[0,1e3]:"enterDuration"==c?[300,1e3]:c.startsWith("y")||c.startsWith("position")?[1,0]:"color"===c?[f[0],ct(f)]:"opacity"===c?[0,1]:"size"===c?[1,10]:[0,1]);return[s||t,u||l]}case"band":case"point":{let t=5*("size"===e),n="size"===e?10:1;return[s||t,u||n]}case"ordinal":return Lj(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 Ic(t,e,n,r){let i=t.theme;return r(tW("string"==typeof e&&i[e]||{},Object.assign({type:e},n)))}function If(t,e,n){let[r]=Cd("mark",n),[i]=Cd("theme",n),[o]=Cd("labelTransform",n),{key:a,frame:l=!1,theme:s,clip:u,style:c={},labelTransform:f=[]}=e,p=i(Im(s)),h=Array.from(t.values()),d=(function(t,e,n){let{coordinates:r=[],title:i}=e,[,o]=Cd("component",n),a=t.filter(({guide:t})=>null!==t),l=[],s=function(t,e,n){let[,r]=Cd("component",n),{coordinates:i}=t;function o(t,e,n,o){let a=function(t,e,n=[]){return"x"===t?Cx(n)?`${e}Y`:`${e}X`:"y"===t?Cx(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){let n=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)})(t));return[...function(t){let e=["shape","size","color","opacity"],n=t.filter(({type:t,name:n})=>"string"==typeof t&&e.includes(n)&&("constant"!==t||"size"!==n)),r=n.filter(({type:t})=>"constant"===t),i=new Map(s2(n.filter(({type:t})=>"constant"!==t),t=>t.field?t.field:Symbol("independent")).map(([t,e])=>[t,[...e,...r]]).filter(([,t])=>t.some(t=>"constant"!==t.type)));if(0===i.size)return[];let o=t=>t.sort(([t],[e])=>t.localeCompare(e));return Array.from(i).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 LD?"continuous":e in Lz?"discrete":e in LF?"distribution":e in LB?"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 TY)for(let{option:r,combination:i}of e)if(n.some(t=>Tq(o(t),o(r))))return[t,i];return null}).filter(ui)}(n),...n.map(t=>{let{name:n}=t;if(Cv(e,"helix").length>0||CO(e)||Cx(e)&&(Cb(e)||Cw(e)))return null;if(n.startsWith("x"))return Cb(e)?["axisArc",[t]]:Cw(e)?["axisLinear",[t]]:[Cx(e)?"axisY":"axisX",[t]];if(n.startsWith("y"))return Cb(e)?["axisLinear",[t]]:Cw(e)?["axisArc",[t]]:[Cx(e)?"axisX":"axisY",[t]];if(n.startsWith("z"))return["axisZ",[t]];if(n.startsWith("position")){if(Cv(e,"radar").length>0)return["axisRadar",[t]];if(!Cb(e))return["axisY",[t]]}return null}).filter(ui)]})(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}=tW({},...e);for(let n of Array.isArray(y)?y:[y]){let[o,y]=function(t,e,n,r,i,o,a){let[l]=LH(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,e=r.filter(t=>t.name.startsWith("position")),n=(t=/position(\d*)/g.exec(o))?+t[1]:null;if(o===e.slice(-1)[0].name||null===n)return[null,null];let[a,l]=LH(i);return["center",(l-a)/(e.length-1)*n+a]}if("axisY"===t&&Cv(i,"parallel").length>0)return Cx(i)?["center","horizontal"]:["center","vertical"];if("axisLinear"===t){let[t]=LH(i);return["center",t]}return"axisArc"===t?"inner"===e[0]?["inner",null]:["outer",null]:Cb(i)||Cw(i)?["center",null]:"axisX"===t&&Cv(i,"reflect").length>0||"axisX"===t&&Cv(i,"reflectY").length>0?["top",null]:e}(t,s,i,o,a):"string"==typeof t&&t.startsWith("legend")&&Cb(a)&&"center"===r.position?["center","vertical"]:s}(t,i,u,n,e,a,r);if(!o&&!y)continue;let v="left"===o||"right"===o,b=v?h[1]:h[0],x=v?d[1]:d[0],{size:O,order:w=f,length:E=p,padding:k=b,crossPadding:M=x}=n;l.push(Object.assign(Object.assign({title:g},n),{defaultSize:c,length:E,position:o,plane:s,orientation:y,padding:k,order:w,crossPadding:M,size:O,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.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[e])||{},{independent:s=!1}=l;if(r&&!s){let{guide:e}=r;r.guide=tW({},"boolean"==typeof e?{}:e,t),Object.assign(r,l)}else{let n=Object.assign(Object.assign({},l),{expectedDomain:l.domain,name:e,guide:mr(t,i)});o.push(n)}}return o}(h,e)),h,t),e,n).map(t=>{let e=tW(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)?i:0,insetLeft:h=p,insetTop:d=p,insetBottom:y=p,insetRight:g=p,margin:v=null!=(o=n.margin)?o:0,marginLeft:b=v,marginBottom:x=v,marginTop:O=v,marginRight:w=v,padding:E=n.padding,paddingBottom:k=E,paddingLeft:M=E,paddingRight:_=E,paddingTop:S=E}=function(t,e,n,r){let{coordinates:i}=e;if(!Cb(i)&&!Cw(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 LX(t,e,n)}),l=dc(a,t=>{var e;return null!=(e=t.labelSpacing)?e:0}),s=dc(o.flatMap((t,e)=>Lq(a[e],LU(t,r))).filter(ui),t=>t.height)+l,u=o.flatMap((t,e)=>LY(a[e])).filter(t=>null!==t),c=0===u.length?0:dc(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),P=1/4,j=(t,n,r,i,o)=>{let{marks:a}=e;if(0===a.length||t-i-o-t*P>0)return[i,o];let l=t*(1-P);return["auto"===n?l*i/(i+o):i,"auto"===r?l*o/(i+o):o]},A=t=>"auto"===t?20:null!=t?t:20,T=A(S),C=A(k),{paddingLeft:N,paddingRight:L}=LQ(t,l-T-C,[T+O,C+x],["left","right"],e,n,r),I=a-b-w,[R,D]=j(I,M,_,N,L),F=I-R-D,{paddingTop:z,paddingBottom:B}=LQ(t,F,[R+b,D+w],["bottom","top"],e,n,r),W=l-x-O,[$,G]=j(W,k,S,B,z);return{width:a,height:l,depth:s,insetLeft:h,insetTop:d,insetBottom:y,insetRight:g,innerWidth:F,innerHeight:W-$-G,paddingLeft:R,paddingRight:D,paddingTop:G,paddingBottom:$,marginLeft:b,marginBottom:x,marginTop:O,marginRight:w,x:u,y:c,z:f}}(d,e,p,n),g=function(t,e,n){var r;let[i]=Cd("coordinate",n),{innerHeight:o,innerWidth:a,insetLeft:l,insetTop:s,insetRight:u,insetBottom:c}=t,{coordinates:f=[]}=e,p=(r=f).find(t=>"cartesian"===t.type||"cartesian3D"===t.type)?r:[...r,{type:"cartesian"}],h="cartesian3D"===p[0].type,d=Object.assign(Object.assign({},t),{x:l,y:s,width:a-l-u,height:o-c-s,transformations:p.flatMap(i)});return h?new TX.Coordinate3D(d):new TX.Coordinate(d)}(y,e,n),v=l?tW({mainLineWidth:1,mainStroke:"#000"},c):c;!function(t,e,n){let r=s1(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:b,width:x,depth:O}=n,w={xy:LJ({width:x,height:b,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:LJ({width:O,height:b,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,marginLeft:0,marginTop:0,marginBottom:0,marginRight:0,innerWidth:O,innerHeight:b,insetBottom:0,insetLeft:0,insetRight:0,insetTop:0}),xz:LJ({width:x,height:O,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,marginLeft:0,marginTop:0,marginBottom:0,marginRight:0,innerWidth:x,innerHeight:O,insetBottom:0,insetLeft:0,insetRight:0,insetTop:0})};for(let[t,n]of r.entries()){let[r,i]=t.split("-"),o=w[r][i],[a,l]=ce(n,t=>"string"==typeof t.type&&!!("center"===i||t.type.startsWith("axis")&&["inner","outer"].includes(i)));a.length&&function(t,e,n,r){let[i,o]=ce(t,t=>!!("string"==typeof t.type&&t.type.startsWith("axis")));(function(t,e,n,r){if("center"===r)if(em(e)&&ed(e))!function(t,e){let[n,r,i,o]=e;for(let e of t)e.bbox={x:n,y:r,width:i,height:o},e.radar={index:t.indexOf(e),count:t.length}}(t,n);else{var i,o,a,l;ed(e)?function(t,e){let[n,r,i,o]=e;for(let e of t)e.bbox={x:n,y:r,width:i,height:o}}(t,n):em(e)&&(i=t,o=e,a=n,"horizontal"===(l=t[0].orientation)?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}}}(i,o,a):"vertical"===l&&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}}}(i,o,a))}else"inner"===r?function(t,e,n){let[r,i,,o]=n,[a,l]=e.getCenter(),[s]=ex(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){let[n,r,i,o]=e;for(let e of t)e.bbox={x:n,y:r,width:i,height:o}}(t,n)})(i,e,n,r),function(t,e,n){if(0===t.length)return;let[r,i,o,a]=n,[l]=ex(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){let[n,r,i,o,a,l,s,u,c]=e,[f,p,h,d,y,g,v,b]="vertical"===a?["y",r,"x",n,"height",o,"width",i]:["x",n,"y",r,"width",i,"height",o];t.sort((t,e)=>null==s?void 0:s(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=l?p+g:p;e<t.length;e++){let r=t[e],{crossPadding:i=0,type:o}=r,{size:a}=r;r.bbox={[f]:l?n-a-i:n+i,[h]:w(o,d,u),[y]:a,[v]:O(o,b,c)},n+=(a+i)*(l?-1:1)}for(let e of t.filter(t=>"group"===t.type)){let{bbox:t,children:n}=e,r=t[v],i=r/n.length,o=n.reduce((t,e)=>{var n;return(null==(n=e.layout)?void 0:n.justifyContent)||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-Eg(a),s="flex-start"===o?0:"center"===o?l/2:l;for(let e=0,r=t[h]+s;e<n.length;e++){let i=n[e],{padding:l=0}=i,s=e===n.length-1?0:l;i.bbox={[y]:t[y],[f]:t[f],[h]:r,[v]:a[e]-s},tW(i,{layout:{justifyContent:o}}),r+=a[e]}}}(n,o)}}(LG(d),g,y);let b=d.find(({type:t})=>"axisZ"===t);if(b){let t=d.find(({type:t})=>"axisX"===t);t.plane="xy";let e=d.find(({type:t})=>"axisY"===t);e.plane="xy",b.plane="yz",b.origin=[t.bbox.x,t.bbox.y,0],b.eulerAngles=[0,-90,0],b.bbox.x=t.bbox.x,b.bbox.y=t.bbox.y,d.push(Object.assign(Object.assign({},t),{plane:"xz",showLabel:!1,showTitle:!1,origin:[t.bbox.x,t.bbox.y,0],eulerAngles:[-90,0,0]})),d.push(Object.assign(Object.assign({},e),{plane:"yz",showLabel:!1,showTitle:!1,origin:[e.bbox.x+e.bbox.width,e.bbox.y,0],eulerAngles:[0,-90,0]})),d.push(Object.assign(Object.assign({},b),{plane:"xz",actualPosition:"left",showLabel:!1,showTitle:!1,eulerAngles:[90,-90,0]}))}let x={};for(let t of d){let{scales:e=[]}=t,r=[];for(let t of e){let{name:e}=t,i=LM(t,n);r.push(i),"y"===e&&i.update(Object.assign(Object.assign({},i.getOptions()),{xScale:x.x})),Lk(x,{[e]:i})}t.scaleInstances=r}let O=[];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=u9(Object.fromEntries(c.map(({name:t,scale:e})=>[t,e])),t=>LM(t,n));Lk(x,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,b]=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])=>ui(t)&&ui(e))&&(r.push(o),i.push(a))}return[r,i]}(r(e)(u,p,h,g)),w=o||d.length,E=l?l(v,w,y):[],k=t=>{var e,n;return null==(n=null==(e=f.title)?void 0:e[t])?void 0:n.value},M=t=>f.items.map(e=>e[t]),_=d.map((t,e)=>{let n=Object.assign({points:v[e],transform:E[e],index:t,markKey:s,viewKey:a},f&&{title:k(t),items:M(t)});for(let[r,i]of Object.entries(h))n[r]=i[t],b&&(n[`series${mi(r)}`]=b[e].map(t=>i[t]));return b&&(n.seriesIndex=b[e]),b&&f&&(n.seriesItems=b[e].map(t=>M(t)),n.seriesTitle=b[e].map(t=>k(t))),n});i.data=_,i.index=d;let S=null==t?void 0:t(_,p,y);O.push(...S||[])}return[{layout:y,theme:p,coordinate:g,markState:t,key:a,clip:u,scale:x,style:v,components:d,labelTransform:ut(f.map(o))},O]}function Ip(t,e,n,r,i){return Ii(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,b=Io(l,["x","y","width","height"]),x=["view","plot","main","content"],O=x.map((t,e)=>e),w=x.map(t=>ua(Object.assign({},a.view,f),t)),E=["a","margin","padding","inset"].map(t=>uo(b,t)),k=t=>t.style("x",t=>j[t].x).style("y",t=>j[t].y).style("width",t=>j[t].width).style("height",t=>j[t].height).each(function(t,e,n){var r=uf(n),i=w[t];for(let[t,e]of Object.entries(i))r.style(t,e)}),M=0,_=0,S=g,P=v,j=O.map(t=>{let{left:e=0,top:n=0,bottom:r=0,right:i=0}=E[t];return M+=e,_+=n,S-=e+i,P-=n+r,{x:M,y:_,width:S,height:P}});e.selectAll(IE("area")).data(O.filter(t=>ui(w[t])),t=>x[t]).join(t=>t.append("rect").attr("className","area").style("zIndex",-2).call(k),t=>t.call(k),t=>t.remove());let A=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:b=g,exitDelay:x=v,exitType:O=y}=t;(void 0===r||r)&&(e=Math.max(e,i+o),n=Math.min(n,o)),(void 0===O||O)&&(e=Math.max(e,b+x),n=Math.min(n,x)),(void 0===a||a)&&(e=Math.max(e,l+s),n=Math.min(n,s))}}return e===-1/0?null:[n,e-n]}(s),T=!!A&&{duration:A[1]};for(let[,t]of s2(o,t=>`${t.type}-${t.position}`))t.forEach((t,e)=>t.index=e);let C=e.selectAll(IE(xt)).data(o,t=>`${t.type}-${t.position}-${t.index}`).join(t=>t.append("g").style("zIndex",({zIndex:t})=>t||-1).attr("className",xt).append(t=>L$(tW({animate:T,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}=L$(tW({animate:T,scale:h},t),u,a,r,s),[l]=n.childNodes;return l.update(o,!1)})).transitions();n.push(...C.flat().filter(ui));let N=e.selectAll(IE("plot")).data([l],()=>c).join(t=>t.append("rect").style("zIndex",0).style("fill","transparent").attr("className","plot").call(Ix).call(Iw,Array.from(s.keys())).call(Ik,p),t=>t.call(Iw,Array.from(s.keys())).call(t=>A?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,A):Ix(t)).call(Ik,p)).transitions();for(let[o,a]of(n.push(...N.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]=Cd("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:Cy(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({},Io(e,["shape","points","seriesIndex","index"])),{index:p}),v=s?s.map(t=>a[t]):a[p],b=s||p,x=u9(d,t=>Ih(t,v,b,a));return(u[r]?u[r](x,y):o(Object.assign(Object.assign({},x),{type:IO(t,r)}),y))(i,g,Id(f,h,r,l),c)}}(o,a,t,r,i),h=Iy("enter",o,a,t,r),d=Iy("update",o,a,t,r),y=Iy("exit",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(IE(b7)).selectFacetAll(g).data(l,t=>t.key,t=>t.groupKey).join(t=>t.append(p).attr("className",b7).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{transform:n}=t.style,r="none"===n||void 0===n?"":n;t.style.transform=`${r} ${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||(i.nodeName===o.nodeName&&"g"!==o.nodeName?ur(i,o):(i.parentNode.replaceChild(o,i),o.className=b7,o.markType=c,o.__data__=i.__data__)),a}).attr("markType",c).attr("className",b7)}),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",b7).attr("markType",c).transition(function(t,e,n){let{__fromElements__:r}=n,i=d(t,r,[n]);return new up(r,null,n.parentNode).transition(i).remove(),i}),t=>t.transition(function(t,e,n){let r=new up([],n.__toData__,n.parentNode).append(p).attr("className",b7).attr("markType",c).nodes();return d(t,[n],r)}).remove()).transitions();n.push(...v.flat())}!function(t,e,n,r){let[i]=Cd("labelTransform",n),{markState:o,labelTransform:a}=t,l=e.select(IE(b9)).node(),s=new Map,u=new Map,c=Array.from(o.entries()).flatMap(([i,o])=>{let{labels:a=[],key:l}=i,c=function(t,e,n,r,i){let[o]=Cd("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:Cy(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=u9(Object.assign(Object.assign({},Io(t,["formatter","transform","style","render"])),f),t=>Ih(t,r,e,a)),{shape:y=s,text:g}=d,v=Io(d,["shape","text"]),b="string"==typeof i?_D(i):i,x=Object.assign(Object.assign({},v),{text:b(g,r,e,a),datum:r});return o(Object.assign({type:`label.${y}`,render:h},v),p)(n,x,Id(c,"label",y,"label"),u)}}(i,o,t,n,r),f=e.select(`#${l}`).selectAll(IE(b7)).nodes().filter(t=>!t.__removed__);return a.flatMap((t,e)=>{let{transform:n=[]}=t,r=Io(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=>{s.set(e,c),u.set(e,t)}),i})})}),f=uf(l).selectAll(IE("label")).data(c,t=>t.key).join(t=>t.append(t=>s.get(t)(t)).attr("className","label"),t=>t.each(function(t,e,n){ur(n,s.get(t)(t))}),t=>t.remove()).nodes(),p=s1(f,t=>u.get(t.__data__)),{coordinate:h}=t;for(let[t,e]of p){let{transform:n=[]}=t;ut(n.map(i))(e,h)}a&&a(f,h)}(t,e,r,i)})}function Ih(t,e,n,r){return"function"==typeof t?t(e,n,r):"string"!=typeof t?t:void 0!==e[t]?e[t]:t}function Id(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 Iy(t,e,n,r,i){var o,a;let[,l]=Cd("shape",i),[s]=Cd("animation",i),{defaultShape:u,shape:c}=n,{theme:f,coordinate:p}=r,h=mi(t),d=`default${h}Animation`,{[d]:y}=(null==(o=c[u])?void 0:o.props)||l(IO(e,u)).props,{[t]:g={}}=f,v=(null==(a=e.animate)?void 0:a[t])||{},b={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,b)(n,r,tW(g,{delay:o,duration:a,easing:l}));return Array.isArray(c)?c:[c]}}function Ig(t){return t.finished.then(()=>{t.cancel()}),t}function Im(t={}){if("string"==typeof t)return{type:t};let{type:e="light"}=t;return Object.assign(Object.assign({},Io(t,["type"])),{type:e})}function Iv(t){let{interaction:e={}}=t;return Object.entries(tW({event:!0,tooltip:!0,sliderFilter:!0,legendFilter:!0,scrollbarFilter:!0},e)).reverse()}function Ib(t,e){return Ii(this,void 0,void 0,function*(){let{data:n}=t,r=Io(t,["data"]);if(void 0==n)return t;let[,{data:i}]=yield L2([],{data:n},{library:e});return Object.assign({data:i},r)})}function Ix(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 IO(t,e){let{type:n}=t;return"string"==typeof e?`${n}.${e}`:e}function Iw(t,e){let n=t=>void 0!==t.class?`${t.class}`:"";0===t.nodes().length||(t.selectAll(IE(b8)).data(e,t=>t.key).join(t=>t.append("g").attr("className",b8).attr("id",t=>t.key).style("facet",n).style("fill","transparent").style("zIndex",t=>{var e;return null!=(e=t.zIndex)?e:0}),t=>t.style("facet",n).style("fill","transparent").style("zIndex",t=>{var e;return null!=(e=t.zIndex)?e:0}),t=>t.remove()),t.select(IE(b9)).node()||t.append("g").attr("className",b9).style("zIndex",0))}function IE(...t){return t.map(t=>`.${t}`).join("")}function Ik(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 lD({style:{x:r+i,y:n+o,width:a,height:l}})})}function IM(t){let e=tW({},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);t.key=null===e?"0":`${e.key}-${i}`}let{children:e=[]}=t;if(Array.isArray(e))for(let o=0;o<e.length;o++){let a=tW({},e[o]);e[o]=a,n.set(a,t),r.set(a,o),i.push(a)}}return e}function I_(t,e={},n=()=>{},r=t=>{throw t}){var i;let o,{width:a=640,height:l=480,depth:s=0}=t,u=IM(t),{canvas:c=((o=new T$).registerPlugin(new TH),new lZ({width:a,height:l,container:document.createElement("div"),renderer:o})),emitter:f=new TU,library:p}=e;e.canvas=c,e.emitter=f;let{width:h,height:d}=c.getConfig();(h!==a||d!==l)&&c.resize(a,l),f.emit(xG.BEFORE_RENDER);let y=uf(c.document.documentElement);return c.ready.then(()=>Ia(Object.assign(Object.assign({},u),{width:a,height:l,depth:s}),y,p,e)).then(()=>{if(s){let[t,e]=c.document.documentElement.getPosition();c.document.documentElement.setPosition(t,e,-s/2)}c.requestAnimationFrame(()=>{f.emit(xG.AFTER_RENDER),null==n||n()})}).catch(t=>{null==r||r(t)}),"string"==typeof(i=c.getConfig().container)?document.getElementById(i):i}function IS(t,e={},n=()=>{},r=t=>{throw t}){var i;let{width:o=640,height:a=480}=t,l=IM(t),{group:s=new lA,emitter:u=new TU,library:c}=e;(null==s?void 0:s.parentElement)||un("renderToMountedElement can't render chart to unmounted group.");let f=uf(s);return e.group=s,e.emitter=u,e.canvas=e.canvas||(null==(i=null==s?void 0:s.ownerDocument)?void 0:i.defaultView),u.emit(xG.BEFORE_RENDER),Ia(Object.assign(Object.assign({},l),{width:o,height:a}),f,c,e).then(()=>{var t;null==(t=e.canvas)||t.requestAnimationFrame(()=>{u.emit(xG.AFTER_RENDER),null==n||n()})}).catch(t=>{null==r||r(t)}),s}function IP(t,e={},n=!1){let r,{canvas:i,emitter:o}=e;i&&(null==(r=i.getRoot().querySelectorAll(".view"))||r.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()})}),n?i.destroy():i.destroyChildren()),o.off()}let Ij=t=>t?parseInt(t):0;function IA(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 IT{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 IA(this,n=>{t===n.attr("key")&&(e=n)}),e}getNodesByType(t){let e=[];return IA(this,n=>{t===n.type&&e.push(n)}),e}getNodeByType(t){let e=null;return IA(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 IC=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 IN=["width","height","depth","padding","paddingLeft","paddingRight","paddingBottom","paddingTop","inset","insetLeft","insetRight","insetTop","insetBottom","margin","marginLeft","marginRight","marginTop","marginBottom","autoFit","theme","title"],IL="__remove__",II="__callback__";function IR(t){return Object.assign(Object.assign({},t.value),{type:t.type})}function ID(t,e){let{width:n,height:r,autoFit:i,depth:o=0}=t,a=640,l=480;if(i){let t,n,r,{width:i,height:o}=(t=getComputedStyle(e),n=e.clientWidth||Ij(t.width),r=e.clientHeight||Ij(t.height),{width:n-(Ij(t.paddingLeft)+Ij(t.paddingRight)),height:r-(Ij(t.paddingTop)+Ij(t.paddingBottom))});a=i||a,l=o||l}return a=n||a,l=r||l,{width:Math.max(u6(a)?a:1,1),height:Math.max(u6(l)?l:1,1),depth:o}}function IF(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(uu(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 Iz(t){return Object.fromEntries(Object.entries(t).map(([t,e])=>[t,{type:"node",ctor:e}]))}let IB={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"}},IW=Object.assign(Object.assign({},IB),{tooltip:{type:"mix"},viewStyle:{type:"object"}}),I$=Object.assign(Object.assign({},IB),{labelTransform:{type:"array"}}),IG=class extends IT{changeData(t){var e;let n=this.getRoot();if(n)return this.attr("data",t),(null==(e=this.children)?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.scale}getScaleByChannel(t){let e=this.getScale();if(e)return e[t]}getCoordinate(){var t;return null==(t=this.getView())?void 0:t.coordinate}getTheme(){var t;return null==(t=this.getView())?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()||xi(t))}hide(){let t=this.getGroup();t&&t.isVisible()&&xr(t)}};IG=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}([IF(I$)],IG);let IH=class extends IT{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.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.getView();if(e)return null==e?void 0:e.scale}getScaleByChannel(t){var e,n;let r=null==(e=this.getRoot())?void 0:e.getView();if(r)return null==(n=null==r?void 0:r.scale)?void 0:n[t]}getGroup(){let t=this.attr("key");if(t)return this.getRoot().getContext().canvas.getRoot().getElementById(t)}};IH=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}([IF(IW)],IH);let IV={};function IU(t,e){Object.assign(IV,{[t]:e})}var Iq=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},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};class IX extends IG{constructor(t){const{container:e,canvas:n,renderer:r,plugins:i,lib:o}=t;super(IY(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=TV(()=>{this.forceFit()},300),this._renderer=r||new T$,this._plugins=i||[],this._container=function(t){if(void 0===t){let t=document.createElement("div");return t[IL]=!0,t}return"string"==typeof t?document.getElementById(t):t}(e),this._emitter=new TU,this._context={library:Object.assign(Object.assign({},o),IV),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)=>I_(this._computedOptions(),this._context,this._createResolve(t),this._createReject(e))),[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 IN)e.attr(n,t.attr(n));return e}(t),n=[e],r=new Map;for(r.set(e,IR(e));n.length;){let t=n.pop(),e=r.get(t),{children:i=[]}=t;for(let t of i)if(t.type===II)e.children=t.value;else{let i=IR(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){let{type:o}=t,{type:a=n||o}=e;if("function"!=typeof a&&new Set(Object.keys(i)).has(a)){for(let n of IN)void 0!==t.attr(n)&&void 0===e[n]&&(e[n]=t.attr(n));return e}if("function"==typeof a||new Set(Object.keys(r)).has(a)){let t={type:"view"},n=Object.assign({},e);for(let e of IN)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=IC(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];tB(a)&&tB(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 IT;return e.value=t,e.type=II,e}let{type:r,children:i}=t,o=IC(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(xG.BEFORE_CLEAR),this._reset(),IP(t,this._context,!1),this.emit(xG.AFTER_CLEAR)}destroy(){var t;let e,n=this.options();this.emit(xG.BEFORE_DESTROY),this._unbindAutoFit(),this._reset(),IP(n,this._context,!0),this._container[IL]&&(e=(t=this._container).parentNode)&&e.removeChild(t),this.emit(xG.AFTER_DESTROY)}forceFit(){this.options.autoFit=!0;let{width:t,height:e}=ID(this.options(),this._container);if(t===this._width&&e===this._height)return Promise.resolve(this);this.emit(xG.BEFORE_CHANGE_SIZE);let n=this.render();return n.then(()=>{this.emit(xG.AFTER_CHANGE_SIZE)}),n}changeSize(t,e){if(t===this._width&&e===this._height)return Promise.resolve(this);this.emit(xG.BEFORE_CHANGE_SIZE),this.attr("width",t),this.attr("height",e);let n=this.render();return n.then(()=>{this.emit(xG.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 IH{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 IG{constructor(){super({},e)}};return[e,n=Iq([IF(Iz(this._marks))],n)]})),Object.values(this._compositions)))IF(Iz(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}=ID(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}=ID(this.options(),this._container);this._plugins.push(new TH),this._plugins.forEach(t=>this._renderer.registerPlugin(t)),this._context.canvas=new lZ({container:this._container,width:t,height:e,renderer:this._renderer})}_addToTrailing(){var t;return null==(t=this._trailingResolve)||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 IK(t){let{type:e}=t;return"string"==typeof e&&["stackY","dodgeX","groupX"].includes(e)}let IZ=t=>(e,n,r)=>{let{encode:i,transform:o=[]}=n;if(o.some(IK))return[e,n];let{x:a,y:l}=i;if(void 0===a||void 0===l)return[e,n];let{series:s}=t;return En({groupBy:s?["x","series"]:"x"})(e,n,r)};IZ.props={};let IQ=()=>(t,e)=>{let{encode:n}=e,{z:r}=n;return void 0!==r?[t,e]:[t,tW({},e,{encode:{z:tG(tV(t,0))},scale:{z:{guide:null}}})]};IQ.props={},lc.enableCSSParsing=!1;let IJ=AK(IX,Object.assign({},AX()));var I0=n(9155),I1=n.n(I0),I2=n(1098),I5=n.t(I2,2),I3=function(){return(I3=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},I4=I3({},I5),I6=I4.version,I8=I4.render;I4.unmountComponentAtNode;try{Number((I6||"").split(".")[0])>=18&&(th=I4.createRoot)}catch(t){}function I9(t){var e=I4.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;e&&"object"==typeof e&&(e.usingClientEntryPoint=t)}var I7="__rc_react_root__",Rt=new Map;Rt.set("tooltip",document.createElement("div"));var Re=function(t,e){void 0===e&&(e=!1);var n=null;if(e)n=Rt.get("tooltip");else if(n=document.createElement("div"),null==t?void 0:t.key){var r=Rt.get(t.key);r?n=r:Rt.set(t.key,n)}return!function(t,e){if(th){var n;return I9(!0),n=e[I7]||th(e),I9(!1),n.render(t),e[I7]=n}I8(t,e)}(t,n),n},Rn=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)},Rr=function(t){var e=t.loadingTemplate,n=t.theme,r=I1().useRef(null);return I1().useEffect(function(){!e&&r.current&&Rn(r.current)},[]),I1().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||I1().createElement("div",{ref:r}))},Ri=(d=function(t,e){return(d=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}d(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),Ro=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||I1().createElement("h5",null,"组件出错了,请核查后重试: ",t.message)},e}return Ri(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):I1().createElement(I0.Fragment,null,this.props.children)},e}(I1().Component),Ra="object"==typeof global&&global&&global.Object===Object&&global,Rl="object"==typeof self&&self&&self.Object===Object&&self,Rs=Ra||Rl||Function("return this")(),Ru=Rs.Symbol,Rc=Object.prototype,Rf=Rc.hasOwnProperty,Rp=Rc.toString,Rh=Ru?Ru.toStringTag:void 0,Rd=function(t){var e=Rf.call(t,Rh),n=t[Rh];try{t[Rh]=void 0;var r=!0}catch(t){}var i=Rp.call(t);return r&&(e?t[Rh]=n:delete t[Rh]),i},Ry=Object.prototype.toString,Rg=Ru?Ru.toStringTag:void 0,Rm=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":Rg&&Rg in Object(t)?Rd(t):Ry.call(t)},Rv=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)},Rb=function(t){if(!Rv(t))return!1;var e=Rm(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e},Rx=Array.isArray,RO=function(t,e){return t===e||t!=t&&e!=e},Rw=function(t,e){for(var n=t.length;n--;)if(RO(t[n][0],e))return n;return -1},RE=Array.prototype.splice;function Rk(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])}}Rk.prototype.clear=function(){this.__data__=[],this.size=0},Rk.prototype.delete=function(t){var e=this.__data__,n=Rw(e,t);return!(n<0)&&(n==e.length-1?e.pop():RE.call(e,n,1),--this.size,!0)},Rk.prototype.get=function(t){var e=this.__data__,n=Rw(e,t);return n<0?void 0:e[n][1]},Rk.prototype.has=function(t){return Rw(this.__data__,t)>-1},Rk.prototype.set=function(t,e){var n=this.__data__,r=Rw(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};var RM=Rs["__core-js_shared__"],R_=(y=/[^.]+$/.exec(RM&&RM.keys&&RM.keys.IE_PROTO||""))?"Symbol(src)_1."+y:"",RS=Function.prototype.toString,RP=function(t){if(null!=t){try{return RS.call(t)}catch(t){}try{return t+""}catch(t){}}return""},Rj=/^\[object .+?Constructor\]$/,RA=Object.prototype,RT=Function.prototype.toString,RC=RA.hasOwnProperty,RN=RegExp("^"+RT.call(RC).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),RL=function(t){return!!Rv(t)&&(!R_||!(R_ in t))&&(Rb(t)?RN:Rj).test(RP(t))},RI=function(t,e){var n=null==t?void 0:t[e];return RL(n)?n:void 0},RR=RI(Rs,"Map"),RD=RI(Object,"create"),RF=Object.prototype.hasOwnProperty,Rz=Object.prototype.hasOwnProperty;function RB(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])}}RB.prototype.clear=function(){this.__data__=RD?RD(null):{},this.size=0},RB.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=!!e,e},RB.prototype.get=function(t){var e=this.__data__;if(RD){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return RF.call(e,t)?e[t]:void 0},RB.prototype.has=function(t){var e=this.__data__;return RD?void 0!==e[t]:Rz.call(e,t)},RB.prototype.set=function(t,e){var n=this.__data__;return this.size+=+!this.has(t),n[t]=RD&&void 0===e?"__lodash_hash_undefined__":e,this};var RW=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t},R$=function(t,e){var n=t.__data__;return RW(e)?n["string"==typeof e?"string":"hash"]:n.map};function RG(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])}}function RH(t){var e=this.__data__=new Rk(t);this.size=e.size}function RV(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new RG;++e<n;)this.add(t[e])}RG.prototype.clear=function(){this.size=0,this.__data__={hash:new RB,map:new(RR||Rk),string:new RB}},RG.prototype.delete=function(t){var e=R$(this,t).delete(t);return this.size-=!!e,e},RG.prototype.get=function(t){return R$(this,t).get(t)},RG.prototype.has=function(t){return R$(this,t).has(t)},RG.prototype.set=function(t,e){var n=R$(this,t),r=n.size;return n.set(t,e),this.size+=+(n.size!=r),this},RH.prototype.clear=function(){this.__data__=new Rk,this.size=0},RH.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},RH.prototype.get=function(t){return this.__data__.get(t)},RH.prototype.has=function(t){return this.__data__.has(t)},RH.prototype.set=function(t,e){var n=this.__data__;if(n instanceof Rk){var r=n.__data__;if(!RR||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new RG(r)}return n.set(t,e),this.size=n.size,this},RV.prototype.add=RV.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},RV.prototype.has=function(t){return this.__data__.has(t)};var RU=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},Rq=function(t,e){return t.has(e)},RY=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 RV: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(!RU(e,function(t,e){if(!Rq(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},RX=Rs.Uint8Array,RK=function(t){var e=-1,n=Array(t.size);return t.forEach(function(t,r){n[++e]=[r,t]}),n},RZ=function(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=t}),n},RQ=Ru?Ru.prototype:void 0,RJ=RQ?RQ.valueOf:void 0,R0=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 RX(t),new RX(e)))break;return!0;case"[object Boolean]":case"[object Date]":case"[object Number]":return RO(+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=RK;case"[object Set]":var s=1&r;if(l||(l=RZ),t.size!=e.size&&!s)break;var u=a.get(t);if(u)return u==e;r|=2,a.set(t,e);var c=RY(l(t),l(e),r,i,o,a);return a.delete(t),c;case"[object Symbol]":if(RJ)return RJ.call(t)==RJ.call(e)}return!1},R1=function(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t},R2=function(t,e,n){var r=e(t);return Rx(t)?r:R1(r,n(t))},R5=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},R3=function(){return[]},R4=Object.prototype.propertyIsEnumerable,R6=Object.getOwnPropertySymbols,R8=R6?function(t){return null==t?[]:R5(R6(t=Object(t)),function(e){return R4.call(t,e)})}:R3,R9=function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r},R7=function(t){return null!=t&&"object"==typeof t},Dt=function(t){return R7(t)&&"[object Arguments]"==Rm(t)},De=Object.prototype,Dn=De.hasOwnProperty,Dr=De.propertyIsEnumerable,Di=Dt(function(){return arguments}())?Dt:function(t){return R7(t)&&Dn.call(t,"callee")&&!Dr.call(t,"callee")},Do="object"==typeof exports&&exports&&!exports.nodeType&&exports,Da=Do&&"object"==typeof module&&module&&!module.nodeType&&module,Dl=Da&&Da.exports===Do?Rs.Buffer:void 0,Ds=(Dl?Dl.isBuffer:void 0)||function(){return!1},Du=/^(?:0|[1-9]\d*)$/,Dc=function(t,e){var n=typeof t;return!!(e=null==e?0x1fffffffffffff:e)&&("number"==n||"symbol"!=n&&Du.test(t))&&t>-1&&t%1==0&&t<e},Df=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=0x1fffffffffffff},Dp={};Dp["[object Float32Array]"]=Dp["[object Float64Array]"]=Dp["[object Int8Array]"]=Dp["[object Int16Array]"]=Dp["[object Int32Array]"]=Dp["[object Uint8Array]"]=Dp["[object Uint8ClampedArray]"]=Dp["[object Uint16Array]"]=Dp["[object Uint32Array]"]=!0,Dp["[object Arguments]"]=Dp["[object Array]"]=Dp["[object ArrayBuffer]"]=Dp["[object Boolean]"]=Dp["[object DataView]"]=Dp["[object Date]"]=Dp["[object Error]"]=Dp["[object Function]"]=Dp["[object Map]"]=Dp["[object Number]"]=Dp["[object Object]"]=Dp["[object RegExp]"]=Dp["[object Set]"]=Dp["[object String]"]=Dp["[object WeakMap]"]=!1;var Dh=function(t){return function(e){return t(e)}},Dd="object"==typeof exports&&exports&&!exports.nodeType&&exports,Dy=Dd&&"object"==typeof module&&module&&!module.nodeType&&module,Dg=Dy&&Dy.exports===Dd&&Ra.process,Dm=function(){try{var t=Dy&&Dy.require&&Dy.require("util").types;if(t)return t;return Dg&&Dg.binding&&Dg.binding("util")}catch(t){}}(),Dv=Dm&&Dm.isTypedArray,Db=Dv?Dh(Dv):function(t){return R7(t)&&Df(t.length)&&!!Dp[Rm(t)]},Dx=Object.prototype.hasOwnProperty,DO=function(t,e){var n=Rx(t),r=!n&&Di(t),i=!n&&!r&&Ds(t),o=!n&&!r&&!i&&Db(t),a=n||r||i||o,l=a?R9(t.length,String):[],s=l.length;for(var u in t)(e||Dx.call(t,u))&&!(a&&("length"==u||i&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||Dc(u,s)))&&l.push(u);return l},Dw=Object.prototype,DE=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Dw)},Dk=function(t,e){return function(n){return t(e(n))}},DM=Dk(Object.keys,Object),D_=Object.prototype.hasOwnProperty,DS=function(t){if(!DE(t))return DM(t);var e=[];for(var n in Object(t))D_.call(t,n)&&"constructor"!=n&&e.push(n);return e},DP=function(t){return null!=t&&Df(t.length)&&!Rb(t)},Dj=function(t){return DP(t)?DO(t):DS(t)},DA=function(t){return R2(t,Dj,R8)},DT=Object.prototype.hasOwnProperty,DC=function(t,e,n,r,i,o){var a=1&n,l=DA(t),s=l.length;if(s!=DA(e).length&&!a)return!1;for(var u=s;u--;){var c=l[u];if(!(a?c in e:DT.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 b=t.constructor,x=e.constructor;b!=x&&"constructor"in t&&"constructor"in e&&!("function"==typeof b&&b instanceof b&&"function"==typeof x&&x instanceof x)&&(h=!1)}return o.delete(t),o.delete(e),h},DN=RI(Rs,"DataView"),DL=RI(Rs,"Promise"),DI=RI(Rs,"Set"),DR=RI(Rs,"WeakMap"),DD="[object Map]",DF="[object Promise]",Dz="[object Set]",DB="[object WeakMap]",DW="[object DataView]",D$=RP(DN),DG=RP(RR),DH=RP(DL),DV=RP(DI),DU=RP(DR),Dq=Rm;(DN&&Dq(new DN(new ArrayBuffer(1)))!=DW||RR&&Dq(new RR)!=DD||DL&&Dq(DL.resolve())!=DF||DI&&Dq(new DI)!=Dz||DR&&Dq(new DR)!=DB)&&(Dq=function(t){var e=Rm(t),n="[object Object]"==e?t.constructor:void 0,r=n?RP(n):"";if(r)switch(r){case D$:return DW;case DG:return DD;case DH:return DF;case DV:return Dz;case DU:return DB}return e});var DY=Dq,DX="[object Arguments]",DK="[object Array]",DZ="[object Object]",DQ=Object.prototype.hasOwnProperty,DJ=function(t,e,n,r,i,o){var a=Rx(t),l=Rx(e),s=a?DK:DY(t),u=l?DK:DY(e);s=s==DX?DZ:s,u=u==DX?DZ:u;var c=s==DZ,f=u==DZ,p=s==u;if(p&&Ds(t)){if(!Ds(e))return!1;a=!0,c=!1}if(p&&!c)return o||(o=new RH),a||Db(t)?RY(t,e,n,r,i,o):R0(t,e,s,n,r,i,o);if(!(1&n)){var h=c&&DQ.call(t,"__wrapped__"),d=f&&DQ.call(e,"__wrapped__");if(h||d){var y=h?t.value():t,g=d?e.value():e;return o||(o=new RH),i(y,g,n,r,o)}}return!!p&&(o||(o=new RH),DC(t,e,n,r,i,o))},D0=function t(e,n,r,i,o){return e===n||(null!=e&&null!=n&&(R7(e)||R7(n))?DJ(e,n,r,i,t,o):e!=e&&n!=n)},D1=function(t,e){return D0(t,e)},D2=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t},D5=function(){try{var t=RI(Object,"defineProperty");return t({},"",{}),t}catch(t){}}(),D3=function(t,e,n){"__proto__"==e&&D5?D5(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n},D4=Object.prototype.hasOwnProperty,D6=function(t,e,n){var r=t[e];D4.call(t,e)&&RO(r,n)&&(void 0!==n||e in t)||D3(t,e,n)},D8=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?D3(n,l,s):D6(n,l,s)}return n},D9=function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e},D7=Object.prototype.hasOwnProperty,Ft=function(t){if(!Rv(t))return D9(t);var e=DE(t),n=[];for(var r in t)"constructor"==r&&(e||!D7.call(t,r))||n.push(r);return n},Fe=function(t){return DP(t)?DO(t,!0):Ft(t)},Fn="object"==typeof exports&&exports&&!exports.nodeType&&exports,Fr=Fn&&"object"==typeof module&&module&&!module.nodeType&&module,Fi=Fr&&Fr.exports===Fn?Rs.Buffer:void 0,Fo=Fi?Fi.allocUnsafe:void 0,Fa=function(t,e){if(e)return t.slice();var n=t.length,r=Fo?Fo(n):new t.constructor(n);return t.copy(r),r},Fl=function(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e},Fs=Dk(Object.getPrototypeOf,Object),Fu=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)R1(e,R8(t)),t=Fs(t);return e}:R3,Fc=function(t){return R2(t,Fe,Fu)},Ff=Object.prototype.hasOwnProperty,Fp=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&Ff.call(t,"index")&&(n.index=t.index,n.input=t.input),n},Fh=function(t){var e=new t.constructor(t.byteLength);return new RX(e).set(new RX(t)),e},Fd=function(t,e){var n=e?Fh(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)},Fy=/\w*$/,Fg=function(t){var e=new t.constructor(t.source,Fy.exec(t));return e.lastIndex=t.lastIndex,e},Fm=Ru?Ru.prototype:void 0,Fv=Fm?Fm.valueOf:void 0,Fb=function(t,e){var n=e?Fh(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)},Fx=function(t,e,n){var r=t.constructor;switch(e){case"[object ArrayBuffer]":return Fh(t);case"[object Boolean]":case"[object Date]":return new r(+t);case"[object DataView]":return Fd(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 Fb(t,n);case"[object Map]":case"[object Set]":return new r;case"[object Number]":case"[object String]":return new r(t);case"[object RegExp]":return Fg(t);case"[object Symbol]":return Fv?Object(Fv.call(t)):{}}},FO=Object.create,Fw=function(){function t(){}return function(e){if(!Rv(e))return{};if(FO)return FO(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}(),FE=function(t){return"function"!=typeof t.constructor||DE(t)?{}:Fw(Fs(t))},Fk=Dm&&Dm.isMap,FM=Fk?Dh(Fk):function(t){return R7(t)&&"[object Map]"==DY(t)},F_=Dm&&Dm.isSet,FS=F_?Dh(F_):function(t){return R7(t)&&"[object Set]"==DY(t)},FP="[object Arguments]",Fj="[object Function]",FA="[object Object]",FT={};FT[FP]=FT["[object Array]"]=FT["[object ArrayBuffer]"]=FT["[object DataView]"]=FT["[object Boolean]"]=FT["[object Date]"]=FT["[object Float32Array]"]=FT["[object Float64Array]"]=FT["[object Int8Array]"]=FT["[object Int16Array]"]=FT["[object Int32Array]"]=FT["[object Map]"]=FT["[object Number]"]=FT[FA]=FT["[object RegExp]"]=FT["[object Set]"]=FT["[object String]"]=FT["[object Symbol]"]=FT["[object Uint8Array]"]=FT["[object Uint8ClampedArray]"]=FT["[object Uint16Array]"]=FT["[object Uint32Array]"]=!0,FT["[object Error]"]=FT[Fj]=FT["[object WeakMap]"]=!1;var FC=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(!Rv(e))return e;var f=Rx(e);if(f){if(l=Fp(e),!s)return Fl(e,l)}else{var p,h,d,y,g=DY(e),v=g==Fj||"[object GeneratorFunction]"==g;if(Ds(e))return Fa(e,s);if(g==FA||g==FP||v&&!o){if(l=u||v?{}:FE(e),!s)return u?(h=(p=l)&&D8(e,Fe(e),p),D8(e,Fu(e),h)):(y=(d=l)&&D8(e,Dj(e),d),D8(e,R8(e),y))}else{if(!FT[g])return o?e:{};l=Fx(e,g,s)}}a||(a=new RH);var b=a.get(e);if(b)return b;a.set(e,l),FS(e)?e.forEach(function(i){l.add(t(i,n,r,i,e,a))}):FM(e)&&e.forEach(function(i,o){l.set(o,t(i,n,r,o,e,a))});var x=c?u?Fc:DA:u?Fe:Dj,O=f?void 0:x(e);return D2(O||e,function(i,o){O&&(i=e[o=i]),D6(l,o,t(i,n,r,o,e,a))}),l},FN=function(t){return FC(t,5)},FL=function(t){return"symbol"==typeof t||R7(t)&&"[object Symbol]"==Rm(t)},FI=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,FR=/^\w*$/,FD=function(t,e){if(Rx(t))return!1;var n=typeof t;return!!("number"==n||"symbol"==n||"boolean"==n||null==t||FL(t))||FR.test(t)||!FI.test(t)||null!=e&&t in Object(e)};function FF(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(FF.Cache||RG),n}FF.Cache=RG;var Fz=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,FB=/\\(\\)?/g,FW=(v=(g=FF(function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(Fz,function(t,n,r,i){e.push(r?i.replace(FB,"$1"):n||t)}),e},function(t){return 500===v.size&&v.clear(),t})).cache,g),F$=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},FG=1/0,FH=Ru?Ru.prototype:void 0,FV=FH?FH.toString:void 0,FU=function t(e){if("string"==typeof e)return e;if(Rx(e))return F$(e,t)+"";if(FL(e))return FV?FV.call(e):"";var n=e+"";return"0"==n&&1/e==-FG?"-0":n},Fq=function(t){return null==t?"":FU(t)},FY=function(t,e){return Rx(t)?t:FD(t,e)?[t]:FW(Fq(t))},FX=1/0,FK=function(t){if("string"==typeof t||FL(t))return t;var e=t+"";return"0"==e&&1/t==-FX?"-0":e},FZ=function(t,e){e=FY(e,t);for(var n=0,r=e.length;null!=t&&n<r;)t=t[FK(e[n++])];return n&&n==r?t:void 0},FQ=function(t,e,n){var r=null==t?void 0:FZ(t,e);return void 0===r?n:r},FJ=function(){return(FJ=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},F0=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},F1={}.toString,F2=function(t,e){return F1.call(t)==="[object "+e+"]"},F5=function(t){return Array.isArray?Array.isArray(t):F2(t,"Array")},F3=function(t){var e=typeof t;return null!==t&&"object"===e||"function"===e},F4=function(t,e){if(t){if(F5(t))for(var n,r=0,i=t.length;r<i&&!1!==e(t[r],r);r++);else if(F3(t)){for(var o in t)if(t.hasOwnProperty(o)&&!1===e(t[o],o))break}}},F6=function(t){if("object"!=typeof t||null===t||!F2(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},F8=Object.prototype.hasOwnProperty,F9=function(t,e){if(null===t||!F6(t))return{};var n={};return F4(e,function(e){F8.call(t,e)&&(n[e]=t[e])}),n},F7=function(t){return F2(t,"String")},zt=function(t,e,n){for(var r=0,i=F7(e)?e.split("."):e;t&&r<i.length;)t=t[i[r++]];return void 0===t||r<i.length?n:t},ze=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&&F6(a)?(F6(e[o])||(e[o]={}),r<i?t(e[o],a,r+1,i):e[o]=n[o]):F5(a)?(e[o]=[],e[o]=e[o].concat(a)):void 0!==a&&(e[o]=a)}}(t,e[r]);return t},zn=function(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)},zr=function(t,e){if(!zn(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 zi(t,e){for(var n in e)e.hasOwnProperty(n)&&"constructor"!==n&&void 0!==e[n]&&(t[n]=e[n])}var zo=function(t,e,n){if(!F5(t)&&!F6(t))return t;var r=n;return F4(t,function(t,n){r=e(r,t,n)}),r};let za={field:"value",size:[1,1],round:!1,padding:0,sort:(t,e)=>e.value-t.value,as:["x","y"],ignoreParentValue:!0},zl="childNodeCount",zs="Invalid field: it must be a string!";var zu=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 zc="sunburst",zf="markType",zp="path",zh="ancestor-node",zd={id:zc,encode:{x:"x",y:"y",key:zp,color:zh,value:"value"},axis:{x:!1,y:!1},style:{[zf]:zc,stroke:"#fff",lineWidth:.5,fillOpacity:"fillOpacity",[zl]:zl,depth:"depth"},state:{active:{zIndex:2,stroke:"#000"},inactive:{zIndex:1,stroke:"#fff"}},legend:!1,interaction:{drillDown:!0},coordinate:{type:"polar",innerRadius:.2}},zy=t=>{let{encode:e,data:n=[],legend:r}=t,i=zu(t,["encode","data","legend"]),o=Object.assign(Object.assign({},i.coordinate),{innerRadius:Math.max(zt(i,["coordinate","innerRadius"],.2),1e-5)}),a=Object.assign(Object.assign({},zd.encode),e),{value:l}=a;return[ze({},zd,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;let i;n={},r=e,za&&zi(n,za),r&&zi(n,r);let o=(e=n).as;if(!F5(o)||2!==o.length)throw TypeError('Invalid as: it must be an array with 2 strings (e.g. [ "x", "y" ])!');try{i=function(t){let{field:e,fields:n}=t;if(F7(e))return e;if(F5(e))return console.warn(zs),e[0];if(console.warn(`${zs} will try to get fields instead.`),F7(n))return n;if(F5(n)&&n.length)return n[0];throw TypeError(zs)}(e)}catch(t){console.warn(t)}let a=(function(){var t=1,e=1,n=0,r=!1;function i(i){var o,a=i.height+1;return i.x0=i.y0=n,i.x1=t,i.y1=e/a,i.eachBefore((o=e,function(t){t.children&&wa(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(wh),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)(O1(t).sum(t=>{var n;return(null==(n=t.children)?0:zn(n)?n.length:Object.keys(n).length)?e.ignoreParentValue?0:t[i]-zo(t.children,(t,e)=>t+e[i],0):t[i]}).sort(e.sort)),l=o[0],s=o[1];a.each(t=>{var e,n;t[l]=[t.x0,t.x1,t.x1,t.x0],t[s]=[t.y1,t.y1,t.y0,t.y0],t.name=t.name||(null==(e=t.data)?void 0:e.name)||(null==(n=t.data)?void 0:n.label),t.data.name=t.name,["x0","x1","y0","y1"].forEach(e=>{-1===o.indexOf(e)&&delete t[e]})});let u=[];if(a&&a.each){let t,e;a.each(n=>{var r,i;n.parent!==t?(t=n.parent,e=0):e+=1;let o=zr(((null==(r=n.ancestors)?void 0:r.call(n))||[]).map(t=>u.find(e=>e.name===t.name)||t),({depth:t})=>t>0&&t<n.depth);n.nodeAncestor=o,n[zl]=(null==(i=n.children)?void 0:i.length)||0,n.nodeIndex=e,u.push(n)})}else a&&a.eachNode&&a.eachNode(t=>{u.push(t)});return 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.name} / ${s}`,u.unshift(null==(n=c.parent.data)?void 0:n.name),c=c.parent;let f=Object.assign(Object.assign(Object.assign({},F9(t.data,[i])),{[zp]:s,[zh]:c.data.name}),t);r&&r!==zh&&(f[r]=t.data[r]||(null==(l=null==(o=t.parent)?void 0:o.data)?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}))]};zy.props={};var zg=Object.keys?function(t){return Object.keys(t)}:function(t){var e=[];return F4(t,function(n,r){("function"!=typeof t||"prototype"!==r)&&e.push(r)}),e};let zm={rootText:"root",style:{fill:"rgba(0, 0, 0, 0.85)",fontSize:12,y:1},active:{fill:"rgba(0, 0, 0, 0.5)"}};lc.enableCSSParsing=!1;var zv=function(){return(zv=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},zb=AK(IX,zv(zv({},AX()),{"interaction.drillDown":function(t={}){let{breadCrumb:e={},fixedColor:n=!0}=t,r=ze({},zm,e);return t=>{let{update:e,setState:i,container:o,view:a,options:l}=t,s=uf(o).select(".plot").node(),{state:u}=l.marks.find(({id:t})=>t===zc),c=new lA;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 lF({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 lF({style:Object.assign(Object.assign({x:a,text:" / "},r.style),{y:o})});c.appendChild(i),a+=i.getBBox().width;let s=new lF({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,zt(t,["style","depth"]))})})}i("drillDown",e=>{let{marks:r}=e,i=r.map(e=>{if(e.id!==zc&&"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[zh]=r.split(" / ")[o]),!t||RegExp(`^${t}.+`).test(r)});return ze({},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(zt(e,["style",zf])!==zc||"rect"!==zt(e,["markType"])||!zt(e,["style",zl]))return;let n=zt(e,["__data__","key"]),r=zt(e,["style","depth"]);e.style.cursor="pointer",f(n,r)};s.addEventListener("click",p);let h=zg(Object.assign(Object.assign({},u.active),u.inactive)),d=()=>{s.querySelectorAll(".element").filter(t=>zt(t,["style",zf])===zc).forEach(t=>{let e=zt(t,["style",zl]);if("pointer"!==zt(t,["style","cursor"])&&e){t.style.cursor="pointer";let e=F9(t.attributes,h);t.addEventListener("mouseenter",()=>{t.attr(u.active)}),t.addEventListener("mouseleave",()=>{t.attr(ze(e,u.inactive))})}})};return s.addEventListener("mousemove",d),()=>{c.remove(),s.removeEventListener("click",p),s.removeEventListener("mousemove",d)}}},"mark.sunburst":zy})),zx=function(t){return!0===t||!1===t||R7(t)&&"[object Boolean]"==Rm(t)},zO=function(){return(zO=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},zw=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},zE=["renderer"],zk=["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"],zM="__transform__",z_=function(t,e){return zx(e)?{type:t,available:e}:zO({type:t},e)},zS={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 z_("stackY",t)}},normalize:{target:"transform",value:function(t){return z_("normalizeY",t)}},percent:{target:"transform",value:function(t){return z_("normalizeY",t)}},group:{target:"transform",value:function(t){return z_("dodgeX",t)}},sort:{target:"transform",value:function(t){return z_("sortX",t)}},symmetry:{target:"transform",value:function(t){return z_("symmetryY",t)}},diff:{target:"transform",value:function(t){return z_("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 zx(t)?{connect:t}:t}}},zP=["xField","yField","seriesField","colorField","keyField","positionField","meta","tooltip","animate","stack","normalize","percent","group","sort","symmetry","diff"],zj=[{key:"annotations",extend_keys:[]},{key:"line",type:"line",extend_keys:zP},{key:"point",type:"point",extend_keys:zP},{key:"area",type:"area",extend_keys:zP}],zA=[{key:"transform",callback:function(t,e,n){t[e]=t[e]||[];var r,i=n.available,o=zw(n,["available"]);void 0===i||i?t[e].push(zO(((r={})[zM]=!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||Rx(n)){t[e]=n||[];return}n.text||(n.text=t.yField),t[e]=t[e]||[],t[e].push(zO(((r={})[zM]=!0,r),n))}}],zT=[{key:"conversionTag",shape:"ConversionTag"},{key:"axisText",shape:"BidirectionalBarAxisText"}],zC=(b=function(t,e){return(b=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}b(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),zN=function(){return(zN=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},zL=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},zI=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=zL(e,["style"]);return t.call(this,zN({style:zN({fill:"#eee"},n)},r))||this}return zC(e,t),e}(lI),zR=(x=function(t,e){return(x=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}x(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),zD=function(){return(zD=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},zF=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},zz=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=zF(e,["style"]);return t.call(this,zD({style:zD({text:"",fontSize:12,textBaseline:"middle",textAlign:"center",fill:"#000",fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",lineWidth:1},n)},r))||this}return zR(e,t),e}(lF),zB=function(t,e,n){(void 0===n||RO(t[e],n))&&(void 0!==n||e in t)||D3(t,e,n)},zW=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},z$=Object.prototype,zG=Function.prototype.toString,zH=z$.hasOwnProperty,zV=zG.call(Object),zU=function(t){if(!R7(t)||"[object Object]"!=Rm(t))return!1;var e=Fs(t);if(null===e)return!0;var n=zH.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&zG.call(n)==zV},zq=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]},zY=function(t,e,n,r,i,o,a){var l=zq(t,n),s=zq(e,n),u=a.get(s);if(u)return void zB(t,n,u);var c=o?o(l,s,n+"",t,e,a):void 0,f=void 0===c;if(f){var p=Rx(s),h=!p&&Ds(s),d=!p&&!h&&Db(s);(c=s,p||h||d)?Rx(l)?c=l:R7(l)&&DP(l)?c=Fl(l):h?(f=!1,c=Fa(s,!0)):d?(f=!1,c=Fb(s,!0)):c=[]:zU(s)||Di(s)?(c=l,Di(l))?c=D8(l,Fe(l)):(!Rv(l)||Rb(l))&&(c=FE(s)):f=!1}f&&(a.set(s,c),i(c,s,r,o,a),a.delete(s)),zB(t,n,c)},zX=function t(e,n,r,i,o){e!==n&&zW(n,function(a,l){if(o||(o=new RH),Rv(a))zY(e,n,l,r,t,i,o);else{var s=i?i(zq(e,l),a,l+"",e,n,o):void 0;void 0===s&&(s=a),zB(e,l,s)}},Fe)},zK=function(t){return t},zZ=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)},zQ=Math.max,zJ=function(t,e,n){return e=zQ(void 0===e?t.length-1:e,0),function(){for(var r=arguments,i=-1,o=zQ(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),zZ(t,this,l)}},z0=Date.now,z1=(O=D5?function(t,e){return D5(t,"toString",{configurable:!0,enumerable:!1,value:function(){return e},writable:!0})}:zK,w=0,E=0,function(){var t=z0(),e=16-(t-E);if(E=t,e>0){if(++w>=800)return arguments[0]}else w=0;return O.apply(void 0,arguments)}),z2=function(t,e,n){if(!Rv(n))return!1;var r=typeof e;return("number"==r?!!(DP(n)&&Dc(e,n.length)):"string"==r&&e in n)&&RO(n[e],t)},z5=function(t){var e;return z1(zJ(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&&z2(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,zK),e+"")},z3=z5(function(t,e,n,r){zX(t,e,n,r)}),z4=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))},z6=function(t,e){if(Rx(e))return e},z8=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return z3.apply(void 0,z4(z4([],t,!1),[z6],!1))},z9=(k=function(t,e){return(k=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}k(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),z7=function(t){function e(e,n,r){var i=t.call(this,{style:z8(r,n)})||this;return i.chart=e,i}return z9(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(z8({},this.attributes,t||{})),null==(n=this.render)?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}(lP),Bt=(M=function(t,e){return(M=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}M(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),Be=function(){return(Be=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},Bn=function(t){function e(n,r){return t.call(this,n,r,{type:e.tag})||this}return Bt(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=FQ(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,b=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=FQ(l,s),y=d/2;if(t){var v=r+a/2,x=i;f.push({points:[[v+y,x-c+b],[v+y,x-g-b],[v,x-b],[v-y,x-g-b],[v-y,x-c+b]],center:[v,x-c/2-b],width:c,value:[u,h],key:p})}else{var v=r,x=i+o/2;f.push({points:[[r-c+b,x-y],[r-g-b,x-y],[v-b,x],[r-g-b,x+y],[r-c+b,x+y]],center:[v-c/2-b,x],width:c,value:[u,h],key:p})}u=h}}),f},e.prototype.render=function(){this.setDirection(),this.drawConversionTag()},e.prototype.setDirection=function(){var t=FQ(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 zI({style:Be({points:n,fill:"#eee"},r),id:"polygon-".concat(s)}),d=new zz({style:Be({x:f,y:p,text:Rb(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}(z7),Br=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 RH;if(r)var p=r(u,c,s,t,e,f);if(!(void 0===p?D0(c,u,3,r,f):p))return!1}}return!0},Bi=function(t){return t==t&&!Rv(t)},Bo=function(t){for(var e=Dj(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,Bi(i)]}return e},Ba=function(t,e){return function(n){return null!=n&&n[t]===e&&(void 0!==e||t in Object(n))}},Bl=function(t){var e=Bo(t);return 1==e.length&&e[0][2]?Ba(e[0][0],e[0][1]):function(n){return n===t||Br(n,t,e)}},Bs=function(t,e){return null!=t&&e in Object(t)},Bu=function(t,e,n){e=FY(e,t);for(var r=-1,i=e.length,o=!1;++r<i;){var a=FK(e[r]);if(!(o=null!=t&&n(t,a)))break;t=t[a]}return o||++r!=i?o:!!(i=null==t?0:t.length)&&Df(i)&&Dc(a,i)&&(Rx(t)||Di(t))},Bc=function(t,e){return null!=t&&Bu(t,e,Bs)},Bf=function(t){var e;return FD(t)?(e=FK(t),function(t){return null==t?void 0:t[e]}):function(e){return FZ(e,t)}},Bp=function(t){if("function"==typeof t)return t;if(null==t)return zK;if("object"==typeof t){var e,n;return Rx(t)?(e=t[0],n=t[1],FD(e)&&Bi(n)?Ba(FK(e),n):function(t){var r=FQ(t,e);return void 0===r&&r===n?Bc(t,e):D0(n,r,3)}):Bl(t)}return Bf(t)},Bh=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},Bd=function(t){return t!=t},By=function(t,e,n){for(var r=n-1,i=t.length;++r<i;)if(t[r]===e)return r;return -1},Bg=function(t,e,n){return e==e?By(t,e,n):Bh(t,Bd,n)},Bm=function(t,e){return!!(null==t?0:t.length)&&Bg(t,e,0)>-1},Bv=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},Bb=function(){},Bx=DI&&1/RZ(new DI([,-0]))[1]==1/0?function(t){return new DI(t)}:Bb,BO=function(t,e,n){var r=-1,i=Bm,o=t.length,a=!0,l=[],s=l;if(n)a=!1,i=Bv;else if(o>=200){var u=e?null:Bx(t);if(u)return RZ(u);a=!1,i=Rq,s=new RV}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},Bw=function(t,e){return t&&t.length?BO(t,Bp(e,2)):[]},BE=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},Bk=(_=function(t,e){return t&&zW(t,e,Dj)},function(t,e){if(null==t)return t;if(!DP(t))return _(t,e);for(var n=t.length,r=-1,i=Object(t);++r<n&&!1!==e(i[r],r,i););return t}),BM=function(t,e,n,r){return Bk(t,function(t,i,o){e(r,t,n(t),o)}),r},B_=Object.prototype.hasOwnProperty,BS=(S=function(t,e,n){B_.call(t,n)?t[n].push(e):D3(t,n,[e])},function(t,e){return(Rx(t)?BE:BM)(t,S,Bp(e,2),{})}),BP=(P=function(t,e){return(P=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}P(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),Bj=function(){return(Bj=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},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},BT={ConversionTag:Bn,BidirectionalBarAxisText:function(t){function e(n,r){return t.call(this,n,r,{type:e.tag})||this}return BP(e,t),e.prototype.render=function(){this.drawText()},e.prototype.getBidirectionalBarAxisTextLayout=function(){var t="vertical"===this.attributes.layout,e=this.getElementsLayout(),n=t?Bw(e,"x"):Bw(e,"y"),r=["title"],i=[],o=FQ(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=FQ(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})}),Bw(i,"text").length!==i.length&&(i=Object.values(BS(i,"text")).map(function(e){var n,r=e.reduce(function(e,n){return e+(t?n.x:n.y)},0);return Bj(Bj({},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=BA(n,["layout","labelFormatter"]);e.forEach(function(e){var n=e.x,a=e.y,l=e.text,s=e.key,u=new zz({style:Bj({x:n,y:a,text:Rb(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}(z7)},BC=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;zT.forEach(function(e){var n,r=e.key,i=e.shape,o=t.config[r];if(o){var a=new BT[i](t.chart,o);t.chart.getContext().canvas.appendChild(a),t.container.set(r,a)}else null==(n=t.container.get(r))||n.clear()})},t.prototype.update=function(){var t=this;this.container.size&&zT.forEach(function(e){var n=e.key,r=t.container.get(n);null==r||r.update()})},t}(),BN=function(t,e,n,r){if(!Rv(t))return t;e=FY(e,t);for(var i=-1,o=e.length,a=o-1,l=t;null!=l&&++i<o;){var s=FK(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=Rv(c)?c:Dc(e[i+1])?[]:{})}D6(l,s,u),l=l[s]}return t},BL=function(t,e,n){for(var r=-1,i=e.length,o={};++r<i;){var a=e[r],l=FZ(t,a);n(l,a)&&BN(o,FY(a,t),l)}return o},BI=Ru?Ru.isConcatSpreadable:void 0,BR=function(t){return Rx(t)||Di(t)||!!(BI&&t&&t[BI])},BD=function t(e,n,r,i,o){var a=-1,l=e.length;for(r||(r=BR),o||(o=[]);++a<l;){var s=e[a];n>0&&r(s)?n>1?t(s,n-1,r,i,o):R1(o,s):i||(o[o.length]=s)}return o},BF=function(t){return(null==t?0:t.length)?BD(t,1):[]},Bz=function(t){return z1(zJ(t,void 0,BF),t+"")},BB=Bz(function(t,e){return null==t?{}:BL(t,e,function(e,n){return Bc(t,n)})}),BW=(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)}),B$=function(){return(B$=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},BG="data-chart-source-type",BH=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 BW(e,t),e.prototype.getChartOptions=function(){return B$(B$({},BB(this.options,zE)),{container:this.container})},e.prototype.getSpecOptions=function(){return"base"===this.type||this.__skipDelCustomKeys__?B$(B$({},this.options),this.getChartOptions()):this.options},e.prototype.createG2=function(){if(!this.container)throw Error("The container is not initialized!");this.chart=new zb(this.getChartOptions()),this.container.setAttribute(BG,"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 BC(t.chart,t.options)}),this.bindSizeSensor()},e.prototype.update=function(t){this.options=this.mergeOption(t)},e.prototype.mergeOption=function(t){return z8({},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(BG)},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(xG.AFTER_CHANGE_SIZE,function(){t.annotation.update()})},e}(TU),BV=(A=function(t,e){return(A=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}A(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),BU=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="base",e}return BV(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}(BH),Bq=function(){};function BY(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=void 0}BY.prototype=Fw(Bq.prototype),BY.prototype.constructor=BY;var BX=DR&&new DR,BK=BX?function(t){return BX.get(t)}:Bb,BZ={},BQ=Object.prototype.hasOwnProperty,BJ=function(t){for(var e=t.name+"",n=BZ[e],r=BQ.call(BZ,e)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==t)return i.name}return e};function B0(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=0xffffffff,this.__views__=[]}B0.prototype=Fw(Bq.prototype),B0.prototype.constructor=B0;var B1=function(t){if(t instanceof B0)return t.clone();var e=new BY(t.__wrapped__,t.__chain__);return e.__actions__=Fl(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e},B2=Object.prototype.hasOwnProperty;function B5(t){if(R7(t)&&!Rx(t)&&!(t instanceof B0)){if(t instanceof BY)return t;if(B2.call(t,"__wrapped__"))return B1(t)}return new BY(t)}B5.prototype=Bq.prototype,B5.prototype.constructor=B5;var B3=function(t){var e=BJ(t),n=B5[e];if("function"!=typeof n||!(e in B0.prototype))return!1;if(t===n)return!0;var r=BK(n);return!!r&&t===r[0]},B4=Bz(function(t){var e=t.length,n=e,r=BY.prototype.thru;for(T&&t.reverse();n--;){var i=t[n];if("function"!=typeof i)throw TypeError("Expected a function");if(r&&!o&&"wrapper"==BJ(i))var o=new BY([],!0)}for(n=o?n:e;++n<e;){var a=BJ(i=t[n]),l="wrapper"==a?BK(i):void 0;o=l&&B3(l[0])&&424==l[1]&&!l[4].length&&1==l[9]?o[BJ(l[0])].apply(o,l[3]):1==i.length&&B3(i)?o[a]():o.thru(i)}return function(){var n=arguments,r=n[0];if(o&&1==n.length&&Rx(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}}),B6=function(t){var e=t.options,n=e.children;return(void 0===n?[]:n).forEach(function(t){Object.keys(t).forEach(function(e){Rx(t[e])&&"data"!==e&&(t[e]=t[e].filter(function(t){return!t[zM]}))})}),e},B8=function(t){var e=null==t?0:t.length;return e?t[e-1]:void 0},B9=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},B7=function(t,e){var n,r;return e=FY(e,t),n=t,null==(t=(r=e).length<2?n:FZ(n,B9(r,0,-1)))||delete t[FK(B8(e))]},Wt=function(t){return zU(t)?void 0:t},We=Bz(function(t,e){var n={};if(null==t)return n;var r=!1;e=F$(e,function(e){return e=FY(e,t),r||(r=e.length>1),e}),D8(t,Fc(t),n),r&&(n=FC(n,7,Wt));for(var i=e.length;i--;)B7(n,e[i]);return n}),Wn=function(t,e,n){return null==t?t:BN(t,e,n)},Wr=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))},Wi=function(t){var e=t.children,n=Object.keys(zS).concat(zj.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){Wr(Wr([],zk,!0),zT.map(function(t){return t.key}),!0).includes(e)||delete t[e]}),t},Wo=function(t){var e=B6(t),n=e.children,r=void 0===n?[]:n,i=We(e,[].concat(zk,zj.map(function(t){return t.key}))),o=function(t){var e;return null==(e=zA.find(function(e){return e.key===t}))?void 0:e.callback},a=function(t,e,n){var r=o(e);r?r(t,e,n):t[e]=z8({},t[e],n)},l=function(t){Object.keys(t).forEach(function(e){var n=zj.find(function(t){return t.key===e});if(n){var i=n.type,o=n.extend_keys;i?r.push(s(z8({},BB(t,o),{type:i},t[e]))):Rx(t[e])&&t[e].forEach(function(t){r.push(s(t))})}})},s=function(t){return l(t),Object.keys(zS).forEach(function(e){var n=zS[e];if(void 0!==t[e])if(Rv(n)){var r=n.value,i=n.target,o=r(t[e]);a(t,i,o)}else Wn(t,n,t[e])}),t};return r.forEach(function(t){var e=z8({},i,t);s(z8(t,e))}),l(e),Wi(e),t},Wa=function(){return(Wa=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function Wl(t){var e=t.options,n=e.stack,r=e.tooltip,i=e.xField;if(!n)return t;var o=zj.map(function(t){return t.type}).filter(function(t){return!!t}),a=!1;return o.forEach(function(t){e[t]&&(a=!0,Wn(e,[t,"stack"],Wa({y1:"y"},"object"==typeof n?n:{})))}),!a||zx(r)||r||Wn(e,"tooltip",{title:i,items:[{channel:"y"}]}),t}function Ws(t){return B4(Wl)(t)}function Wu(t){return B4(Ws,Wo)(t)}var Wc=(C=function(t,e){return(C=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}C(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),Wf=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="area",e}return Wc(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 Wu},e}(BH),Wp=function(){return(Wp=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function Wh(t){return B4(function(t){var e=t.options;FQ(e,"children.length")>1&&Wn(e,"children",[{type:"interval"}]);var n=e.scale,r=e.markBackground,i=e.data,o=e.children,a=e.yField,l=FQ(n,"y.domain",[]);if(r&&l.length&&Rx(i)){var s="domainMax",u=i.map(function(t){var e;return Wp(Wp({originData:Wp({},t)},We(t,a)),((e={})[s]=l[l.length-1],e))});o.unshift(Wp({type:"interval",data:u,yField:s,tooltip:!1,style:{fill:"#eee"},label:!1},r))}return t},Ws,Wo)(t)}var Wd=(N=function(t,e){return(N=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}N(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});IU("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,b=v.createElement("g",{}),x=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}}),O=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}}),w=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 b.appendChild(x),b.appendChild(O),b.appendChild(w),b}});var Wy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="Bar",e}return Wd(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 Wh},e}(BH),Wg=(L=function(t,e){return(L=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}L(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});IU("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 Wm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="column",e}return Wg(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 Wh},e}(BH);function Wv(t){return B4(function(t){var e=t.options,n=e.children;return e.legend&&(void 0===n?[]:n).forEach(function(t){if(!FQ(t,"colorField")){var e=FQ(t,"yField");Wn(t,"colorField",function(){return e})}}),t},function(t){var e=t.options,n=e.annotations,r=void 0===n?[]:n,i=e.children,o=e.scale,a=!1;return FQ(o,"y.key")||(void 0===i?[]:i).forEach(function(t,e){if(!FQ(t,"scale.y.key")){var n="child".concat(e,"Scale");Wn(t,"scale.y.key",n);var i=t.annotations,o=void 0===i?[]:i;o.length>0&&(Wn(t,"scale.y.independent",!1),o.forEach(function(t){Wn(t,"scale.y.key",n)})),!a&&r.length>0&&void 0===FQ(t,"scale.y.independent")&&(a=!0,Wn(t,"scale.y.independent",!1),r.forEach(function(t){Wn(t,"scale.y.key",n)}))}}),t},Ws,Wo)(t)}var Wb=(I=function(t,e){return(I=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}I(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),Wx=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="DualAxes",e}return Wb(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 Wv},e}(BH);function WO(t){return B4(function(t){var e=t.options,n=e.xField;return e.colorField||Wn(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?Wn(e,"transform",[]):Wn(e,"transform",[{type:"symmetryY"}])),!o&&(void 0===i||i)&&Wn(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(BS(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&&(Wn(e,"type","spaceFlex"),Wn(e,"ratio",[1,1]),Wn(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||Wn(e,"tooltip",{title:!1,items:[function(t){return{name:t[r],value:t[i]}}]}),t},Ws,Wo)(t)}var Ww=(R=function(t,e){return(R=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}R(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),WE=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="column",e}return Ww(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 WO},e}(BH);function Wk(t){return B4(Ws,Wo)(t)}var WM=(D=function(t,e){return(D=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}D(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),W_=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="line",e}return WM(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 Wk},e}(BH),WS=function(){return(WS=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function WP(t){return B4(function(t){var e=t.options,n=e.angleField,r=e.data,i=e.label,o=e.tooltip,a=e.colorField;return Rx(r)&&0===r.reduce(function(t,e){return t+e[n]},0)&&(Wn(e,"data",r.map(function(t){var e;return WS(WS({},t),((e={})[n]=1,e))})),i&&Wn(e,"label",WS(WS({},i),{formatter:function(){return 0}})),!1!==o&&Wn(e,"tooltip",WS(WS({},o),{items:[function(t){return{name:t[a],value:0}}]}))),t},Wo)(t)}var Wj=(F=function(t,e){return(F=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}F(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),WA=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="pie",e}return Wj(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 WP},e}(BH);function WT(t){return B4(Ws,Wo)(t)}var WC=(z=function(t,e){return(z=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}z(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),WN=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="scatter",e}return WC(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 WT},e}(BH);function WL(t){return B4(function(t){return Wn(t,"options.coordinate",{type:FQ(t,"options.coordinateType","polar")}),t},Wo)(t)}var WI=(B=function(t,e){return(B=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}B(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),WR=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="radar",e}return WI(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 WL},e}(BH),WD=function(t,e){var n=-1,r=DP(t)?Array(t.length):[];return Bk(t,function(t,i,o){r[++n]=e(t,i,o)}),r},WF=function(t,e){return(Rx(t)?F$:WD)(t,Bp(e,3))},Wz=function(){return(Wz=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function WB(t){return B4(function(t){var e=t.options,n=e.data,r=e.yField;return t.options.data=WF(n,function(t){var e=t&&Wz({},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=WF(t.options.children,function(t,e){var r=0===e;return Wz(Wz({},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:Wz(Wz({},t.encode||{}),{y:r?[s,u]:[a,l],color:function(t){return Math.sign(t[l]-t[a])}}),style:Wz(Wz({},t.style||{}),{lineWidth:r?1:10})})}),delete e.yField,t.options.legend={color:!1},i&&Wn(t,"options.scale.color.range[0]",i),o&&Wn(t,"options.scale.color.range[2]",o),t},Wo)(t)}var WW=(W=function(t,e){return(W=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}W(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),W$=["#26a69a","#999999","#ef5350"],WG=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="stock",e}return WW(e,t),e.getDefaultOptions=function(){return{type:"view",scale:{color:{domain:[-1,0,1],range:W$},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 WB},e}(BH);function WH(t){return B4(Ws,Wo)(t)}var WV=($=function(t,e){return($=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,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),WU=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="TinyLine",e}return WV(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 WH},e}(BH);function Wq(t){return B4(Ws,Wo)(t)}var WY=(G=function(t,e){return(G=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}G(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),WX=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="TinyArea",e}return WY(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 Wq},e}(BH);function WK(t){return B4(Ws,Wo)(t)}var WZ=(H=function(t,e){return(H=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}H(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),WQ=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="TinyColumn",e}return WZ(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 WK},e}(BH),WJ=function(){return(WJ=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function W0(t){return B4(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,WJ({},o)),t},Ws,Wo)(t)}var W1=(V=function(t,e){return(V=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}V(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),W2=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="TinyProgress",e}return W1(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 W0},e}(BH),W5=function(){return(W5=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function W3(t){return B4(function(t){var e=t.options.radius;return Wn(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,W5({},o)),t},Ws,Wo)(t)}var W4=(U=function(t,e){return(U=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}U(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),W6=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="TinyRing",e}return W4(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 W3},e}(BH);function W8(t){return B4(Wo)(t)}var W9=(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)}),W7=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="rose",e}return W9(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 W8},e}(BH),$t="__start__",$e="__end__",$n="__waterfall_value__",$r=function(){return($r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},$i=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 $o(t){return B4(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[$t]=0,e[$e]=e[i],e[$n]=e[i];else{var o=null!=(r=t[$e])?r:t[i];e[$t]=o,e[$e]=o+e[i],e[$n]=t[$e]}return e},[]),Object.assign(e,{yField:[$t,$e]})),t},function(t){var e=t.options,n=e.data,r=e.xField,i=e.children,o=e.linkStyle,a=$i([],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[$e]),e},[]),a.shift(),i.push({type:"link",xField:["x1","x2"],yField:"y1",zIndex:-1,data:a,style:$r({stroke:"#697474"},o),label:!1,tooltip:!1}),t},Ws,Wo)(t)}var $a=(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)}),$l=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="waterfall",e}return $a(e,t),e.getDefaultOptions=function(){return{type:"view",legend:null,tooltip:{field:$n,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 $o},e}(BH),$s=function(t){return"number"==typeof t||R7(t)&&"[object Number]"==Rm(t)},$u=Object.prototype.hasOwnProperty,$c=z5(function(t,e){if(DE(e)||DP(e))return void D8(e,Dj(e),t);for(var n in e)$u.call(e,n)&&D6(t,n,e[n])}),$f=/\s/,$p=function(t){for(var e=t.length;e--&&$f.test(t.charAt(e)););return e},$h=/^\s+/,$d=0/0,$y=/^[-+]0x[0-9a-f]+$/i,$g=/^0b[01]+$/i,$m=/^0o[0-7]+$/i,$v=parseInt,$b=function(t){if("number"==typeof t)return t;if(FL(t))return $d;if(Rv(t)){var e,n="function"==typeof t.valueOf?t.valueOf():t;t=Rv(n)?n+"":n}if("string"!=typeof t)return 0===t?t:+t;t=(e=t)?e.slice(0,$p(e)+1).replace($h,""):e;var r=$g.test(t);return r||$m.test(t)?$v(t.slice(2),r?2:8):$y.test(t)?$d:+t},$x=1/0,$O=function(t){var e,n=(e=t)?(e=$b(e))===$x||e===-$x?(e<0?-1:1)*17976931348623157e292:e==e?e:0:0===e?e:0,r=n%1;return n==n?r?n-r:n:0},$w=Rs.isFinite,$E=Math.min,$k=(X=Math.ceil,function(t,e){if(t=$b(t),(e=null==e?0:$E($O(e),292))&&$w(t)){var n=(Fq(t)+"e").split("e");return+((n=(Fq(X(n[0]+"e"+(+n[1]+e)))+"e").split("e"))[0]+"e"+(n[1]-e))}return X(t)}),$M=0/0,$_=function(t){return"number"==typeof t?t:FL(t)?$M:+t},$S=(K=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=FU(t),e=FU(e)):(t=$_(t),e=$_(e)),n=K(t,e)}return n});function $P(t){return B4(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=FQ(o,"[0].transform[0]",{});return $s(i)?$c(s,{thresholds:$k($S(n.length,i)),y:l}):$s(r)&&$c(s,{thresholds:r,y:l}),t},Ws,Wo)(t)}var $j=(Z=function(t,e){return(Z=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}Z(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),$A=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="Histogram",e}return $j(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 $P},e}(BH);function $T(t){return B4(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},Ws,Wo)(t)}var $C=(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)}),$N=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="heatmap",e}return $C(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 $T},e}(BH);function $L(t){return B4(function(t){var e=t.options.boxType;return t.options.children[0].type=void 0===e?"box":e,t},Ws,Wo)(t)}var $I=(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)}),$R=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="box",e}return $I(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 $L},e}(BH);function $D(t){return B4(function(t){var e=t.options,n=e.data,r=[{type:"custom",callback:function(t){return{links:t}}}];if(Rx(n))n.length>0?Wn(e,"data",{value:n,transform:r}):delete e.children;else if("fetch"===FQ(n,"type")&&FQ(n,"value")){var i=FQ(n,"transform");Rx(i)?Wn(n,"transform",i.concat(r)):Wn(n,"transform",r)}return t},Ws,Wo)(t)}var $F=(tt=function(t,e){return(tt=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}tt(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),$z=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="sankey",e}return $F(e,t),e.getDefaultOptions=function(){return{type:"view",children:[{type:"sankey"}]}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return $D},e}(BH);function $B(t){e=t.options.layout,t.options.coordinate.transform="horizontal"!==(void 0===e?"horizontal":e)?void 0:[{type:"transpose"}];var e,n=t.options.layout,r=void 0===n?"horizontal":n;return t.options.children.forEach(function(t){var e;(null==(e=null==t?void 0:t.coordinate)?void 0:e.transform)&&(t.coordinate.transform="horizontal"!==r?void 0:[{type:"transpose"}])}),t}var $W=function(t){return"string"==typeof t||!Rx(t)&&R7(t)&&"[object String]"==Rm(t)},$$=function(t){return null==t?[]:F$(Dj(t),function(e){return t[e]})},$G=Math.max,$H=function(t,e,n,r){t=DP(t)?t:$$(t),n=n&&!r?$O(n):0;var i=t.length;return n<0&&(n=$G(i+n,0)),$W(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&Bg(t,e,n)>-1},$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])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},$U=["#f0efff","#5B8FF9","#3D76DD"];function $q(t,e,n,r){void 0===r&&(r=!0);var i=0,o=!1,a=WF(t,function(t){var a,l,s=FQ(t,[e]);if(null==s)return[];if($W(s)){var u=Number(s);return isNaN(u)?[]:((a={})[n]=t[n],a[e]=u,a)}return Rx(s)?(o=!0,i=Math.max(i,s.length),WF(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 $V({index:0},t)}),i]:[a,i]}function $Y(t,e){return Array(t).fill("").map(function(t,n){return Rx(e)?e[n%e.length]:e})}function $X(t){return B4(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=$q(p,i,c),d=h[0],y=h[1],g=$q(p,a,c,!1),v=g[0],b=g[1],x=$q(p,s,c,!1),O=x[0],w=x[1],E=FQ(n,[i],$U[0]),k=FQ(n,[a],$U[1]),M=FQ(n,[s],$U[2]),_=[$Y(y,E),$Y(b,k),$Y(w,M)].flat();return t.options.children=WF(t.options.children,function(t,e){var n=[d,v,O][e],r=[i,a,s][e];return $V($V({},t),{data:n,encode:$V($V({},t.encode||{}),{x:c,y:r,color:function(t){var e=t.index,n=$s(e)?"".concat(r,"_").concat(e):r;return f?FQ(f,[r,e],n):n}}),style:$V($V({},t.style||{}),{zIndex:function(t){return-t[r]}}),labels:0!==e?WF(t.labels,function(t){return $V($V({},t),{text:r})}):void 0})}),t.options.scale.color.range=_,t.options.legend.color.itemMarker=function(t){return f&&$H(null==f?void 0:f[s],t)||(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)&&Wn(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 z8(o[e],t)}),t},$B,Wo)(t)}var $K=(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)}),$Z=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="bullet",e}return $K(e,t),e.getDefaultOptions=function(){return{type:"view",scale:{color:{range:$U}},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 $X},e}(BH);function $Q(t){return B4(function(t){var e=t.options.data;return t.options.data={value:e},t},Ws,Wo)(t)}var $J=(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)}),$0=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="Gauge",e}return $J(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 $Q},e}(BH);function $1(t){return B4(function(t){var e=t.options.percent;return $s(e)&&Wn(t,"options.data",e),t},Ws,Wo)(t)}var $2=(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)}),$5=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="Liquid",e}return $2(e,t),e.getDefaultOptions=function(){return{type:"view",children:[{type:"liquid"}]}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return $1},e}(BH);function $3(t){return B4(Ws,Wo)(t)}var $4=(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)}),$6=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="WordCloud",e}return $4(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 $3},e}(BH);function $8(t){return B4(function(t){var e=t.options,n=e.data;return n&&Wn(e,"data",{value:n}),t},Ws,Wo)(t)}var $9=(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)}),$7=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="treemap",e}return $9(e,t),e.getDefaultOptions=function(){return{type:"view",children:[{type:"treemap"}]}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return $8},e}(BH),Gt=function(){return(Gt=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function Ge(t){return B4(function(t){var e=t.options,n=e.startAngle,r=e.maxAngle,i=e.coordinate,o=$s(n)?n/(2*Math.PI)*360:-90,a=$s(r)?(Number(r)+o)/180*Math.PI:Math.PI;return Wn(t,["options","coordinate"],Gt(Gt({},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||Wn(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=FQ(i,"y.domain",[]);return n&&r.unshift(Gt({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:Gt(Gt({},o),{startAngle:-Math.PI/2,endAngle:1.5*Math.PI}),animate:!1},n)),t},Ws,Wo)(t)}var Gn=(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)}),Gr=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="radial",e}return Gn(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 Ge},e}(BH);function Gi(t){return B4(Wo)(t)}var Go=(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)}),Ga=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="CirclePacking",e}return Go(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 Gi},e}(BH),Gl=function(){return(Gl=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function Gs(t){return B4(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 Gl(Gl({},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 Wn(e,"children",a),"polar"===e.violinType&&Wn(e,"coordinate",{type:"polar"}),Wn(e,"violinType",void 0),t},Ws,Wo)(t)}var Gu=(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)}),Gc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="violin",e}return Gu(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 Gs},e}(BH),Gf=function(){return(Gf=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},Gp=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 Gh(t){return B4(function(t){var e=t.options,n=e.yField;return e.children.forEach(function(t,e){Wn(t,"yField",n[e])}),t},function(t){var e=t.options,n=e.yField,r=e.children,i=e.data;if(zU(i))return t;var o=Rx(FQ(i,[0]))?i:[i,i];return r.forEach(function(t,e){Wn(t,"data",Gp([],o[e].map(function(t){return Gf({groupKey:n[e]},t)}),!0))}),t},function(t){var e=t.options,n=e.yField,r=n[0],i=n[1];return e.tooltip||Wn(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;Wn(e,"axisText",Gf(Gf({},(null==l?void 0:l.x)||{}),{layout:r}));var s=n[0],u=n[1];if("vertical"===r)Wn(e,"direction","col"),Wn(e,"paddingLeft",void 0===a?48:a),Wn(e,"coordinate.transform",i.filter(function(t){return"transpose"!==t.type})),Wn(s,"paddingBottom",16),Wn(u,"paddingTop",16),Wn(u,"axis",{x:{position:"top"}}),Wn(u,"scale",{y:{range:[0,1]}});else{Wn(e,"paddingBottom",void 0===o?48:o),Wn(s,"scale",{y:{range:[0,1]}});var c=s.paddingRight,f=u.paddingLeft;Wn(s,"paddingRight",void 0===c?32:c),Wn(s,"axis",{x:{position:"right"}}),Wn(u,"paddingLeft",void 0===f?32:f)}return t},Ws,Wo)(t)}var Gd=(tu=function(t,e){return(tu=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}tu(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),Gy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="BidirectionalBar",e}return Gd(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 Gh},e}(BH);function Gg(t){return B4(function(t){var e=t.options,n=e.data,r=e.setsField,i=e.sizeField;return Rx(n)&&(Wn(e,"data",{type:"inline",value:n,transform:[{type:"venn",sets:r,size:i,as:[td.color,td.d]}]}),Wn(e,"colorField",r),Wn(e,["children","0","encode","d"],td.d)),Wn(t,"options",We(e,["sizeField","setsField"])),t},Wo)(t)}(tc=td||(td={})).color="key",tc.d="path";var Gm=(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)}),Gv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="venn",e}return Gm(e,t),e.getDefaultOptions=function(){return{type:"view",children:[{type:"path"}],legend:{color:{itemMarker:"circle"}},encode:{color:td.color,d:td.d}}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return Gg},e}(BH);function Gb(t){return B4(function(t){return t},Wo)(t)}var Gx=(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)}),GO={Base:BU,Line:W_,Column:Wm,Pie:WA,Area:Wf,Bar:Wy,DualAxes:Wx,Funnel:WE,Scatter:WN,Radar:WR,Rose:W7,Stock:WG,TinyLine:WU,TinyArea:WX,TinyColumn:WQ,TinyProgress:W2,TinyRing:W6,Waterfall:$l,Histogram:$A,Heatmap:$N,Box:$R,Sankey:$z,Bullet:$Z,Gauge:$0,Liquid:$5,WordCloud:$6,Treemap:$7,RadialBar:Gr,CirclePacking:Ga,Violin:Gc,BidirectionalBar:Gy,Venn:Gv,Mix:Wx,Sunburst:function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="Sunburst",e}return Gx(e,t),e.getDefaultOptions=function(){return{type:"view",children:[{type:"sunburst"}]}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return Gb},e}(BH)},Gw=function(){return(Gw=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},GE=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},Gk=(0,I0.forwardRef)(function(t,e){var n,r,i,o,a,l,s,u,c,f=t.chartType,p=GE(t,["chartType"]),h=p.containerStyle,d=p.containerAttributes,y=p.className,g=p.loading,v=p.loadingTemplate,b=p.errorTemplate,x=GE(p,["containerStyle","containerAttributes","className","loading","loadingTemplate","errorTemplate"]),O=(n=GO[void 0===f?"Base":f],r=(0,I0.useRef)(),i=(0,I0.useRef)(),o=(0,I0.useRef)(null),a=x.onReady,l=x.onEvent,s=function(t,e){void 0===t&&(t="image/png");var n,r=null==(n=o.current)?void 0:n.getElementsByTagName("canvas")[0];return null==r?void 0:r.toDataURL(t,e)},u=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=s(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},c=function(t,e){void 0===e&&(e=!1);var n=Object.keys(t),r=e;n.forEach(function(n){var i,o=t[n];("tooltip"===n&&(r=!0),Rb(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 Re(o.apply(void 0,t),r)}:Rx(o)?o.forEach(function(t){c(t,r)}):Rv(o)?c(o,r):r=e})},(0,I0.useEffect)(function(){if(r.current&&!D1(i.current,x)){var t=!1;if(i.current){var e=i.current,n=(e.data,F0(e,["data"]));x.data,t=D1(n,F0(x,["data"]))}i.current=FN(x),t?r.current.changeData(FQ(x,"data")):(c(x),r.current.update(x),r.current.render())}},[x]),(0,I0.useEffect)(function(){if(!o.current)return function(){return null};i.current||(i.current=FN(x)),c(x);var t=new n(o.current,FJ({},x));t.toDataURL=s,t.downloadImage=u,t.render(),r.current=t,a&&a(t);var e=function(e){l&&l(t,e)};return t.on("*",e),function(){r.current&&(r.current.destroy(),r.current.off("*",e),r.current=void 0)}},[]),{chart:r,container:o}),w=O.chart,E=O.container;return(0,I0.useImperativeHandle)(e,function(){return w.current}),I1().createElement(Ro,{errorTemplate:b},g&&I1().createElement(Rr,{loadingTemplate:v}),I1().createElement("div",Gw({className:y,style:void 0===h?{height:"inherit"}:h,ref:E},void 0===d?{}:d)))}),GM=function(){return(GM=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},G_=function(t){return I1().createElement(Gk,GM({},t,{chartType:"Area"}))},GS=function(){return(GS=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},GP=function(t){return I1().createElement(Gk,GS({},t,{chartType:"Bar"}))},Gj=function(){return(Gj=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},GA=function(t){return I1().createElement(Gk,Gj({},t,{chartType:"Column"}))},GT=function(){return(GT=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},GC=function(t){return I1().createElement(Gk,GT({},t,{chartType:"DualAxes"}))},GN=function(){return(GN=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},GL=function(t){return I1().createElement(Gk,GN({},t,{chartType:"Funnel"}))},GI=function(){return(GI=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},GR=function(t){return I1().createElement(Gk,GI({},t,{chartType:"Line"}))},GD=function(){return(GD=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},GF=function(t){return I1().createElement(Gk,GD({},t,{chartType:"Pie"}))},Gz=function(){return(Gz=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},GB=function(t){return I1().createElement(Gk,Gz({},t,{chartType:"Scatter"}))},GW=function(){return(GW=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},G$=function(t){return I1().createElement(Gk,GW({},t,{chartType:"Radar"}))},GG=function(){return(GG=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},GH=function(){return(GH=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},GV=function(){return(GV=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},GU=function(){return(GU=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},Gq=function(){return(Gq=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},GY={Line:function(t){return I1().createElement(Gk,GG({},t,{chartType:"TinyLine"}))},Area:function(t){return I1().createElement(Gk,GH({},t,{chartType:"TinyArea"}))},Column:function(t){return I1().createElement(Gk,GV({},t,{chartType:"TinyColumn"}))},Progress:function(t){return I1().createElement(Gk,GU({},t,{chartType:"TinyProgress"}))},Ring:function(t){return I1().createElement(Gk,Gq({},t,{chartType:"TinyRing"}))}},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])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},GK=function(t){return I1().createElement(Gk,GX({},t,{chartType:"Rose"}))},GZ=function(){return(GZ=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},GQ=function(t){return I1().createElement(Gk,GZ({},t,{chartType:"Waterfall"}))},GJ=function(){return(GJ=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},G0=function(t){return I1().createElement(Gk,GJ({},t,{chartType:"Histogram"}))},G1=function(){return(G1=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},G2=function(t){return I1().createElement(Gk,G1({},t,{chartType:"Heatmap"}))},G5=function(){return(G5=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},G3=function(t){return I1().createElement(Gk,G5({},t,{chartType:"Box"}))},G4=function(){return(G4=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},G6=function(t){return I1().createElement(Gk,G4({},t,{chartType:"Sankey"}))},G8=function(){return(G8=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},G9=function(t){return I1().createElement(Gk,G8({},t,{chartType:"Stock"}))},G7=function(){return(G7=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},Ht=function(t){return I1().createElement(Gk,G7({},t,{chartType:"Bullet"}))},He=function(){return(He=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},Hn=function(t){return I1().createElement(Gk,He({},t,{chartType:"Gauge"}))},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])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},Hi=function(t){return I1().createElement(Gk,Hr({},t,{chartType:"Liquid"}))},Ho=function(){return(Ho=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},Ha=function(t){return I1().createElement(Gk,Ho({},t,{chartType:"WordCloud"}))},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])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},Hs=function(t){return I1().createElement(Gk,Hl({},t,{chartType:"Treemap"}))},Hu=function(){return(Hu=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},Hc=function(t){return I1().createElement(Gk,Hu({},t,{chartType:"RadialBar"}))},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])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},Hp=function(t){return I1().createElement(Gk,Hf({},t,{chartType:"CirclePacking"}))},Hh=function(){return(Hh=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},Hd=function(t){return I1().createElement(Gk,Hh({},t,{chartType:"Violin"}))},Hy=function(){return(Hy=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},Hg=function(t){return I1().createElement(Gk,Hy({},t,{chartType:"BidirectionalBar"}))},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])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},Hv=function(t){return I1().createElement(Gk,Hm({},t,{chartType:"Venn"}))},Hb=function(){return(Hb=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},Hx=function(t){return I1().createElement(Gk,Hb({},t,{chartType:"Mix"}))},HO=function(){return(HO=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},Hw=function(t){return I1().createElement(Gk,HO({},t,{chartType:"Sunburst"}))},HE=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))},Hk=FF(function(t,e){void 0===e&&(e={});var n=e.fontSize,r=e.fontFamily,i=e.fontWeight,o=e.fontStyle,a=e.fontVariant,l=(ty||(ty=document.createElement("canvas").getContext("2d")),ty);return l.font=[o,i,a,"".concat(n,"px"),void 0===r?"sans-serif":r].join(" "),l.measureText($W(t)?t:"").width},function(t,e){return void 0===e&&(e={}),HE([t],$$(e),!0).join("")})},5682:function(t,e){!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="u">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],b=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+b*a+n*u,t[7]=v*i+b*l+n*c,t[8]=v*o+b*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 b=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],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*e,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*e,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*e,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*e,t};function x(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 O(t){return t instanceof Float32Array||t instanceof Array}function w(t,e,n){for(;t<e;)t+=2*Math.PI;for(;n<t;)t-=2*Math.PI;return t}function E(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 k(t,...e){return e.reduce((t,e)=>n=>t(e(n)),t)}function M(t,e){return e-t?n=>(n-t)/(e-t):t=>.5}L=new d(3),d!=Float32Array&&(L[0]=0,L[1]=0,L[2]=0),L=new d(4),d!=Float32Array&&(L[0]=0,L[1]=0,L[2]=0,L[3]=0);let _=Math.sqrt(50),S=Math.sqrt(10),P=Math.sqrt(2);function j(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>=_?10:n>=S?5:n>=P?2:1)*10**t:-(10**-t)/(n>=_?10:n>=S?5:n>=P?2:1)}let A=(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=j(o,a,n))?l=j(o=Math.floor(o/l)*l,a=Math.ceil(a/l)*l,n):l<0&&(l=j(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 T(t){return null!=t&&!Number.isNaN(t)}function C(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=k(o,r,n,t)},n.prototype.invert=void 0}}var N,L={exports:{}},I={exports:{}},R=Array.prototype.concat,D=Array.prototype.slice,F=I.exports=function(t){for(var e=[],n=0,r=t.length;n<r;n++){var i=t[n];!(!i||"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=R.call(e,D.call(i)):e.push(i)}return e},z=(F.wrap=function(t){return function(){return t(F(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]}),B=I.exports,W=Object.hasOwnProperty,$=Object.create(null);for(N in z)W.call(z,N)&&($[z[N]]=N);var G=L.exports={to:{},get:{}};function H(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}G.get=function(t){var e,n;switch(t.substring(0,3).toLowerCase()){case"hsl":e=G.get.hsl(t),n="hsl";break;case"hwb":e=G.get.hwb(t),n="hwb";break;default:e=G.get.rgb(t),n="rgb"}return e?{model:n,value:e}:null},G.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]:W.call(z,e[1])?((i=z[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]=H(i[n],0,255);return i[3]=H(i[3],0,1),i},G.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,H(parseFloat(t[2]),0,100),H(parseFloat(t[3]),0,100),H(isNaN(e)?1:e,0,1)]):null},G.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,H(parseFloat(t[2]),0,100),H(parseFloat(t[3]),0,100),H(isNaN(e)?1:e,0,1)]):null},G.to.hex=function(){var t=B(arguments);return"#"+V(t[0])+V(t[1])+V(t[2])+(t[3]<1?V(Math.round(255*t[3])):"")},G.to.rgb=function(){var t=B(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]+")"},G.to.rgb.percent=function(){var t=B(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]+")"},G.to.hsl=function(){var t=B(arguments);return t.length<4||1===t[3]?"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)":"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+t[3]+")"},G.to.hwb=function(){var t=B(arguments),e="";return 4<=t.length&&1!==t[3]&&(e=", "+t[3]),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+e+")"},G.to.keyword=function(t){return $[t.slice(0,3)]};var U=L.exports;function q(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 Y(t){var e,n,r,t=U.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*q(n=2*r-(r=r<.5?r*(1+n):r+n-r*n),r,e+1/3),255*q(n,r,e),255*q(n,r,e-1/3),t]):null):null}let X=(t,e)=>n=>t*(1-n)+e*n,K=(t,e)=>{if("number"==typeof t&&"number"==typeof e)return X(t,e);if("string"!=typeof t||"string"!=typeof e)return()=>t;{let n=Y(t),r=Y(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})`}}},Z=(t,e)=>{let n=X(t,e);return t=>Math.round(n(t))};function Q({map:t,initKey:e},n){return e=e(n),t.has(e)?t.get(e):n}function J(t){return"object"==typeof t?t.valueOf():t}class tt extends Map{constructor(t){if(super(),this.map=new Map,this.initKey=J,null!==t)for(var[e,n]of t)this.set(e,n)}get(t){return super.get(Q({map:this.map,initKey:this.initKey},t))}has(t){return super.has(Q({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 te{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 tn=Symbol("defaultUnknown");function tr(t,e,n){for(let r=0;r<e.length;r+=1)t.has(e[r])||t.set(n(e[r]),r)}function ti(t){var{value:t,from:e,to:n,mapper:r,notFoundReturn:i}=t;let o=r.get(t);if(void 0===o){if(i!==tn)return i;o=e.push(t)-1,r.set(t,o)}return n[o%n.length]}function to(t){return t instanceof Date?t=>""+t:"object"==typeof t?t=>JSON.stringify(t):t=>t}class ta extends te{getDefaultOptions(){return{domain:[],range:[],unknown:tn}}constructor(t){super(t)}map(t){return 0===this.domainIndexMap.size&&tr(this.domainIndexMap,this.getDomain(),this.domainKey),ti({value:this.domainKey(t),mapper:this.domainIndexMap,from:this.getDomain(),to:this.getRange(),notFoundReturn:this.options.unknown})}invert(t){return 0===this.rangeIndexMap.size&&tr(this.rangeIndexMap,this.getRange(),this.rangeKey),ti({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=to(e),this.rangeKey=to(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 ta(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 tl extends ta{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,paddingInner:0,paddingOuter:0,padding:0,unknown:tn,flex:[]}}constructor(t){super(t)}clone(){return new tl(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 e,{domain:n,range:r,paddingOuter:i,paddingInner:o,flex:a,round:l,align:s}=t;var u,c=n.length,f=0<(f=(t=c)-(p=a).length)?[...p,...Array(f).fill(1)]:f<0?p.slice(0,t):p,[t,p]=r,p=p-t,h=p/(2/c*i+1-1/c*o);let d=h*o/c;h-=c*d;let y=(e=Math.min(...u=f),u.map(t=>t/e)),g=h/y.reduce((t,e)=>t+e);var f=new tt(n.map((t,e)=>(e=y[e]*g,[t,l?Math.floor(e):e]))),v=new tt(n.map((t,e)=>(e=y[e]*g+d,[t,l?Math.floor(e):e]))),h=Array.from(v.values()).reduce((t,e)=>t+e),t=t+(p-(h-h/c*o))*s;let b=l?Math.round(t):t;var x=Array(c);for(let t=0;t<c;t+=1){x[t]=Math.round(1e12*(O=b))/1e12;var O=n[t];b+=v.get(O)}return{valueBandWidth:f,valueStep:v,adjustedRange:x}}(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 ts=(t,e,n)=>{let r,i,o=t,a=e;if(o===a&&0<n)return[o];let l=j(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},tu=(t,e,n,r)=>(2<Math.min(t.length,e.length)?(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]=M(l[t],l[t+1]),o[t]=n(s[t],s[t+1]);return e=>{var n=function(t,e,n){let r=1,i=n||t.length;for(var o=t=>t;r<i;){var a=Math.floor((r+i)/2);o(t[a])>e?i=a:r=a+1}return r}(t,e,r)-1,a=i[n];return k(o[n],a)(e)}}:(t,e,n)=>{let r;var[t,i]=t,[e,o]=e;return k(t<i?(r=M(t,i),n(e,o)):(r=M(i,t),n(o,e)),r)})(t,e,r?Z:n);class tc extends te{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:X,tickCount:5}}map(t){return T(t)?this.output(t):this.options.unknown}invert(t){return T(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 A}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=tu(n.map(t),r,o,i);this.output=k(n,e,t)}composeInput(t,e,n){var{domain:r,range:i}=this.options,i=tu(i,r.map(t),X);this.input=k(e,n,i)}}class tf extends tc{getDefaultOptions(){return{domain:[0,1],range:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolate:K,tickMethod:ts,tickCount:5}}chooseTransforms(){return[p,p]}clone(){return new tf(this.options)}}class tp extends tl{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,padding:0,unknown:tn,paddingInner:1,paddingOuter:0}}constructor(t){super(t)}getPaddingInner(){return 1}clone(){return new tp(this.options)}update(t){super.update(t)}getPaddingOuter(){return this.options.padding}}function th(t,e){for(var n=[],r=0,i=t.length;r<i;r++)n.push(t[r].substr(0,e));return n}var td,I=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],L=["January","February","March","April","May","June","July","August","September","October","November","December"],ty=th(L,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:th(I,3),dayNames:I,monthNamesShort:ty,monthNames:L,amPm:["am","pm"],DoFn:function(t){return t+["th","st","nd","rd"][3<t%10?0:(t-t%10!=10)*t%10]}});let tg=td=class extends tf{getDefaultOptions(){return{domain:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolator:p,tickMethod:ts,tickCount:5}}constructor(t){super(t)}clone(){return new td(this.options)}};tg=td=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}([C(function(t){return[t(0),t(1)]},t=>{var[t,e]=t;return k(X(0,1),M(t,e))})],tg);let tm=o=class extends tf{getDefaultOptions(){return{domain:[0,.5,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolator:p,tickMethod:ts,tickCount:5}}constructor(t){super(t)}clone(){return new o(this.options)}};function tv(t,e,r,i,o){var a=new tf({range:[e,e+i]}),l=new tf({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 tb(t,e,r,i,o){return(0,n(t,1)[0])(e,r,i,o)}function tx(t,e,r,i,o){return n(t,1)[0]}function tO(t,e,r,i,o){var a=(t=n(t,4))[0],l=t[1],s=t[2],t=t[3],u=new tf({range:[s,t]}),c=new tf({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=w(Math.atan2(t,e),a,l);return[c.invert(t),u.invert(r)]}}}function tw(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 tE(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];return tj.apply(void 0,r([[-1,-1]],n(e),!1))}function tk(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];return tj.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 tj.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 tS(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 tf({range:[s,s+.99*u]}),p=new tf({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=w(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 tP(t,e,r,i,o){var a=(t=n(t,4))[0],l=t[1],s=t[2],t=t[3],u=new tf({range:[s,t]});return{transform:function(t){for(var e=[],n=t.length,r=new tp({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}([C(function(t){return[t(0),t(.5),t(1)]},t=>{let[e,n,r]=t,i=k(X(0,.5),M(e,n)),o=k(X(.5,1),M(n,r));return t=>(e>r?t<n?o:i:t<n?i:o)(t)})],tm);var tj=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 tA(t){return 1/Math.tan(t)}function tT(t,e,r,i,o){var a=tA(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 tC(t,e,r,i,o){var a=tA(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 tN(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 tL(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 tI(t,e,n){return n?new tf({range:[0,1],domain:[0,e]}).map(t):t}function tR(t,e,r,i,o){var a=(t=n(t,3))[0],l=t[1],t=t[2],s=tI(a,i,void 0!==t&&t);return{transform:function(t){var t=n(t,2),e=t[0],t=t[1];return[tN(e,s,l,0,1),t]},untransform:function(t){var t=n(t,2),e=t[0],t=t[1];return[tL(e,s,l,0,1),t]}}}function tD(t,e,r,i,o){var a=(t=n(t,3))[0],l=t[1],t=t[2],s=tI(a,o,void 0!==t&&t);return{transform:function(t){return[(t=n(t,2))[0],tN(t[1],s,l,0,1)]},untransform:function(t){return[(t=n(t,2))[0],tL(t[1],s,l,0,1)]}}}function tF(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=tI(a,i,t=void 0!==t&&t),f=tI(l,o,t);return{transform:function(t){var t=n(t,2),e=t[0],t=t[1];return[tN(e,c,s,0,1),tN(t,f,u,0,1)]},untransform: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)]}}}function tz(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 tf({range:[0,i]}),f=new tf({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]:(o=p+(e=tN(o,0,u,0,s))*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]:(o=p+(e=tL(o,0,u,0,s))*Math.cos(t=Math.atan2(i,r)),i=h+e*Math.sin(t),[c.invert(o),f.invert(i)])}}}function tB(t,e,r,i,o,a,l){var s=new tf({range:[e,e+o]}),u=new tf({range:[r,r+a]}),c=new tf({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 tW(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 t$(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 tG(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:tv,translate:E,custom:tb,matrix:tx,polar:tO,transpose:tw,scale:tj,"shear.x":tT,"shear.y":tC,reflect:tE,"reflect.x":tk,"reflect.y":tM,rotate:t_,helix:tS,parallel:tP,fisheye:tF,"fisheye.x":tR,"fisheye.y":tD,"fisheye.circular":tz},this.update(t)}function tV(t){this.options={x:0,y:0,z:0,width:300,height:150,depth:150,transformations:[]},this.transformers={cartesian3D:tB,translate3D:tW,scale3D:tG,transpose3D:t$},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,b,w,E=n(h.value),k=E[0],M=E.slice(1),_=this.transformers[k];_&&(y=(d=this.options).x,g=d.y,v=d.width,b=d.height,O(w=_(r([],n(M),!1),y,g,v,b))?u.push(w):(u.length&&(i(this.createMatrixTransform(u,t)),u.splice(0,u.length)),i(s(w)||p,"parallel"!==k)))}}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)),x.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]]}},I=tH,tV.prototype.update=function(t){this.options=f({},this.options,t),this.recoordinate()},tV.prototype.clone=function(){return new tV(this.options)},tV.prototype.getOptions=function(){return this.options},tV.prototype.clear=function(){this.update({transformations:[]})},tV.prototype.getSize=function(){var t=this.options;return[t.width,t.height,t.depth]},tV.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]},tV.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},tV.prototype.map=function(t){return this.output(t)},tV.prototype.invert=function(t){return this.input(t)},tV.prototype.recoordinate=function(){this.output=this.compose(),this.input=this.compose(!0)},tV.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,b,w,E,k,M=n(h.value),_=M[0],S=M.slice(1),P=this.transformers[_];P&&(y=(d=this.options).x,g=d.y,v=d.z,b=d.width,w=d.height,E=d.depth,O(k=P(r([],n(S),!1),y,g,v,b,w,E))?u.push(k):(u.length&&(i(this.createMatrixTransform(u,t)),u.splice(0,u.length)),i(s(k)||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)),x.apply(void 0,r([],n(c),!1))},tV.prototype.createMatrixTransform=function(t,e){var n,r,i,o,a,l,s,u,c,f,p,h,y,g,x,O,w,E,k,M,_,S,P,j,A,T,C,N,L=v();return e&&t.reverse(),t.forEach(function(t){return b(L,L,t)}),e&&(e=t=L,(N=new d(16))[0]=e[0],N[1]=e[1],N[2]=e[2],N[3]=e[3],N[4]=e[4],N[5]=e[5],N[6]=e[6],N[7]=e[7],N[8]=e[8],N[9]=e[9],N[10]=e[10],N[11]=e[11],N[12]=e[12],N[13]=e[13],N[14]=e[14],N[15]=e[15],N=(e=N)[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],C=(x=N*a-n*o)*(T=f*e-p*g)-(O=N*l-r*o)*(A=c*e-p*y)+(w=N*s-i*o)*(j=c*g-f*y)+(E=n*l-r*a)*(P=u*e-p*h)-(k=n*s-i*a)*(S=u*g-f*h)+(M=r*s-i*l)*(_=u*y-c*h))&&(t[0]=(a*T-l*A+s*j)*(C=1/C),t[1]=(r*A-n*T-i*j)*C,t[2]=(y*M-g*k+e*E)*C,t[3]=(f*k-c*M-p*E)*C,t[4]=(l*P-o*T-s*S)*C,t[5]=(N*T-r*P+i*S)*C,t[6]=(g*w-h*M-e*O)*C,t[7]=(u*M-f*w+p*O)*C,t[8]=(o*A-a*P+s*_)*C,t[9]=(n*P-N*A-i*_)*C,t[10]=(h*k-y*w+e*x)*C,t[11]=(c*w-u*k-p*x)*C,t[12]=(a*S-o*j-l*_)*C,t[13]=(N*j-n*S+r*_)*C,t[14]=(y*O-h*E-g*x)*C,t[15]=(u*E-c*O+f*x)*C),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]=L[0]*r+L[4]*i+L[8]*o+L[12]*n,e[1]=L[1]*r+L[5]*i+L[9]*o+L[13]*n,e[2]=L[2]*r+L[6]*i+L[10]*o+L[14]*n,e[3]=L[3]*r+L[7]*i+L[11]*o+L[15]*n,[t[0],t[1],t[2]]}},ty=tV,t.Coordinate=I,t.Coordinate3D=ty,Object.defineProperty(t,"__esModule",{value:!0})}(e)},4269: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},6841: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]}},2927:function(t,e,n){var r=n(6841),i=n(5941),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)]}},8115:function(t,e){!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 b(t){for(var e=0;e<t.length;e++)y[d][e]=t[e];y[d].fx=t.fx}for(var x=function(t,e){return t.fx-e.fx},O=e.slice(),w=e.slice(),E=e.slice(),k=e.slice(),M=0;M<i;++M){if(y.sort(x),n.history){var _=y.map(function(t){var e=t.slice();return e.fx=t.fx,e.id=t.id,e});_.sort(function(t,e){return t.id-e.id}),n.history.push({x:y[0].slice(),fx:y[0].fx,simplex:_})}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){O[g]=0;for(var S=0;S<d;++S)O[g]+=y[S][g];O[g]/=d}var P=y[d];if(o(w,1+c,O,-c,P),w.fx=t(w),w.fx<y[0].fx)o(k,1+f,O,-f,P),k.fx=t(k),b(k.fx<w.fx?k:w);else if(w.fx>=y[d-1].fx){var j=!1;if(w.fx>P.fx?(o(E,1+p,O,-p,P),E.fx=t(E),E.fx<P.fx?b(E):j=!0):(o(E,1-p*c,O,p*c,P),E.fx=t(E),E.fx<w.fx?b(E):j=!0),j){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 b(w)}return y.sort(x),{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)},5967: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}},7067:function(t,e,n){"use strict";var r=Math.log(2),i=t.exports,o=n(5967);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+=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+=u*y)}});var v=g,b=0,x=0;return f.forEach(function(t){b+=t.y,t.y=v+=b,x+=v}),x>0&&f.forEach(function(t){t.y/=x}),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)}}},9006:function(t,e,n){"use strict";var r,i,o,a,l,s,u=n(9155),c=n(7433);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="u">typeof window&&void 0!==window.document&&void 0!==window.document.createElement,v=Object.prototype.hasOwnProperty,b=/^[: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]*$/,x={},O={};function w(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 E={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){E[t]=new w(t,0,!1,t,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];E[e]=new w(e,1,!1,t[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(t){E[t]=new w(t,2,!1,t.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){E[t]=new w(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){E[t]=new w(t,3,!1,t.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(t){E[t]=new w(t,3,!0,t,null,!1,!1)}),["capture","download"].forEach(function(t){E[t]=new w(t,4,!1,t,null,!1,!1)}),["cols","rows","size","span"].forEach(function(t){E[t]=new w(t,6,!1,t,null,!1,!1)}),["rowSpan","start"].forEach(function(t){E[t]=new w(t,5,!1,t.toLowerCase(),null,!1,!1)});var k=/[\-:]([a-z])/g;function M(t){return t[1].toUpperCase()}function _(t,e,n,r){var i,o=E.hasOwnProperty(e)?E[e]:null;(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(O,i)||!v.call(x,i)&&(b.test(i)?O[i]=!0:(x[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(k,M);E[e]=new w(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(k,M);E[e]=new w(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(k,M);E[e]=new w(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(t){E[t]=new w(t,1,!1,t.toLowerCase(),null,!1,!1)}),E.xlinkHref=new w("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(t){E[t]=new w(t,1,!1,t.toLowerCase(),null,!0,!0)});var S=u.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,P=Symbol.for("react.element"),j=Symbol.for("react.portal"),A=Symbol.for("react.fragment"),T=Symbol.for("react.strict_mode"),C=Symbol.for("react.profiler"),N=Symbol.for("react.provider"),L=Symbol.for("react.context"),I=Symbol.for("react.forward_ref"),R=Symbol.for("react.suspense"),D=Symbol.for("react.suspense_list"),F=Symbol.for("react.memo"),z=Symbol.for("react.lazy");Symbol.for("react.scope"),Symbol.for("react.debug_trace_mode");var B=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden"),Symbol.for("react.cache"),Symbol.for("react.tracing_marker");var W=Symbol.iterator;function $(t){return null===t||"object"!=typeof t?null:"function"==typeof(t=W&&t[W]||t["@@iterator"])?t:null}var G,H=Object.assign;function V(t){if(void 0===G)try{throw Error()}catch(t){var e=t.stack.trim().match(/\n( *(at )?)/);G=e&&e[1]||""}return"\n"+G+t}var U=!1;function q(t,e){if(!t||U)return"";U=!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{U=!1,Error.prepareStackTrace=n}return(t=t?t.displayName||t.name:"")?V(t):""}function Y(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":case"object":return t;default:return""}}function X(t){var e=t.type;return(t=t.nodeName)&&"input"===t.toLowerCase()&&("checkbox"===e||"radio"===e)}function K(t){t._valueTracker||(t._valueTracker=function(t){var e=X(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 Z(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),r="";return t&&(r=X(t)?t.checked?"true":"false":t.value),(t=r)!==n&&(e.setValue(t),!0)}function Q(t){if(void 0===(t=t||("u">typeof document?document:void 0)))return null;try{return t.activeElement||t.body}catch(e){return t.body}}function J(t,e){var n=e.checked;return H({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:t._wrapperState.initialChecked})}function tt(t,e){var n=null==e.defaultValue?"":e.defaultValue;t._wrapperState={initialChecked:null!=e.checked?e.checked:e.defaultChecked,initialValue:n=Y(null!=e.value?e.value:n),controlled:"checkbox"===e.type||"radio"===e.type?null!=e.checked:null!=e.value}}function te(t,e){null!=(e=e.checked)&&_(t,"checked",e,!1)}function tn(t,e){te(t,e);var n=Y(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)return void t.removeAttribute("value");e.hasOwnProperty("value")?ti(t,e.type,n):e.hasOwnProperty("defaultValue")&&ti(t,e.type,Y(e.defaultValue)),null==e.checked&&null!=e.defaultChecked&&(t.defaultChecked=!!e.defaultChecked)}function tr(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 ti(t,e,n){("number"!==e||Q(t.ownerDocument)!==t)&&(null==n?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}var to=Array.isArray;function ta(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=""+Y(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 tl(t,e){if(null!=e.dangerouslySetInnerHTML)throw Error(f(91));return H({},e,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})}function ts(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(to(n)){if(1<n.length)throw Error(f(93));n=n[0]}e=n}null==e&&(e=""),n=e}t._wrapperState={initialValue:Y(n)}}function tu(t,e){var n=Y(e.value),r=Y(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 tc(t){var e=t.textContent;e===t._wrapperState.initialValue&&""!==e&&null!==e&&(t.value=e)}function tf(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 tp(t,e){return null==t||"http://www.w3.org/1999/xhtml"===t?tf(e):"http://www.w3.org/2000/svg"===t&&"foreignObject"===e?"http://www.w3.org/1999/xhtml":t}var th,td,ty=(th=function(t,e){if("http://www.w3.org/2000/svg"!==t.namespaceURI||"innerHTML"in t)t.innerHTML=e;else{for((td=td||document.createElement("div")).innerHTML="<svg>"+e.valueOf().toString()+"</svg>",e=td.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}},"u">typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,e,n,r){MSApp.execUnsafeLocalFunction(function(){return th(t,e,n,r)})}:th);function tg(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&3===n.nodeType){n.nodeValue=e;return}}t.textContent=e}var tm={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 tb(t,e,n){return null==e||"boolean"==typeof e||""===e?"":n||"number"!=typeof e||0===e||tm.hasOwnProperty(t)&&tm[t]?(""+e).trim():e+"px"}function tx(t,e){for(var n in t=t.style,e)if(e.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=tb(n,e[n],r);"float"===n&&(n="cssFloat"),r?t.setProperty(n,i):t[n]=i}}Object.keys(tm).forEach(function(t){tv.forEach(function(e){tm[e=e+t.charAt(0).toUpperCase()+t.substring(1)]=tm[t]})});var tO=H({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 tw(t,e){if(e){if(tO[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 tE(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 tk=null;function tM(t){return(t=t.target||t.srcElement||window).correspondingUseElement&&(t=t.correspondingUseElement),3===t.nodeType?t.parentNode:t}var t_=null,tS=null,tP=null;function tj(t){if(t=rD(t)){if("function"!=typeof t_)throw Error(f(280));var e=t.stateNode;e&&(e=rz(e),t_(t.stateNode,t.type,e))}}function tA(t){tS?tP?tP.push(t):tP=[t]:tS=t}function tT(){if(tS){var t=tS,e=tP;if(tP=tS=null,tj(t),e)for(t=0;t<e.length;t++)tj(e[t])}}function tC(t,e){return t(e)}function tN(){}var tL=!1;function tI(t,e,n){if(tL)return t(e,n);tL=!0;try{return tC(t,e,n)}finally{tL=!1,(null!==tS||null!==tP)&&(tN(),tT())}}function tR(t,e){var n=t.stateNode;if(null===n)return null;var r=rz(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 tD=!1;if(g)try{var tF={};Object.defineProperty(tF,"passive",{get:function(){tD=!0}}),window.addEventListener("test",tF,tF),window.removeEventListener("test",tF,tF)}catch(t){tD=!1}function tz(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 tB=!1,tW=null,t$=!1,tG=null,tH={onError:function(t){tB=!0,tW=t}};function tV(t,e,n,r,i,o,a,l,s){tB=!1,tW=null,tz.apply(tH,arguments)}function tU(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 tq(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 tY(t){if(tU(t)!==t)throw Error(f(188))}function tX(t){return null!==(t=function(t){var e=t.alternate;if(!e){if(null===(e=tU(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 tY(i),t;if(o===r)return tY(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 tK=c.unstable_scheduleCallback,tZ=c.unstable_cancelCallback,tQ=c.unstable_shouldYield,tJ=c.unstable_requestPaint,t0=c.unstable_now,t1=c.unstable_getCurrentPriorityLevel,t2=c.unstable_ImmediatePriority,t5=c.unstable_UserBlockingPriority,t3=c.unstable_NormalPriority,t4=c.unstable_LowPriority,t6=c.unstable_IdlePriority,t8=null,t9=null,t7=Math.clz32?Math.clz32:function(t){return 0==(t>>>=0)?32:31-(et(t)/ee|0)|0},et=Math.log,ee=Math.LN2,en=64,er=4194304;function ei(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 eo(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=ei(l):0!=(o&=a)&&(r=ei(o))}else 0!=(a=n&~i)?r=ei(a):0!==o&&(r=ei(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-t7(e)),r|=t[n],e&=~i;return r}function ea(t){return 0!=(t=-0x40000001&t.pendingLanes)?t:0x40000000&t?0x40000000:0}function el(){var t=en;return 0==(4194240&(en<<=1))&&(en=64),t}function es(t){for(var e=[],n=0;31>n;n++)e.push(t);return e}function eu(t,e,n){t.pendingLanes|=e,0x20000000!==e&&(t.suspendedLanes=0,t.pingedLanes=0),(t=t.eventTimes)[e=31-t7(e)]=n}function ec(t,e){var n=t.entangledLanes|=e;for(t=t.entanglements;n;){var r=31-t7(n),i=1<<r;i&e|t[r]&e&&(t[r]|=e),n&=~i}}var ef=0;function ep(t){return 1<(t&=-t)?4<t?0!=(0xfffffff&t)?16:0x20000000:4:1}var eh,ed,ey,eg,em,ev=!1,eb=[],ex=null,eO=null,ew=null,eE=new Map,ek=new Map,eM=[],e_="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":ex=null;break;case"dragenter":case"dragleave":eO=null;break;case"mouseover":case"mouseout":ew=null;break;case"pointerover":case"pointerout":eE.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":ek.delete(e.pointerId)}}function eP(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=rD(e))&&ed(e)):(t.eventSystemFlags|=r,e=t.targetContainers,null!==i&&-1===e.indexOf(i)&&e.push(i)),t}function ej(t){var e=rR(t.target);if(null!==e){var n=tU(e);if(null!==n){if(13===(e=n.tag)){if(null!==(e=tq(n))){t.blockedOn=e,em(t.priority,function(){ey(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 eA(t){if(null!==t.blockedOn)return!1;for(var e=t.targetContainers;0<e.length;){var n=eW(t.domEventName,t.eventSystemFlags,e[0],t.nativeEvent);if(null!==n)return null!==(e=rD(n))&&ed(e),t.blockedOn=n,!1;var r=new(n=t.nativeEvent).constructor(n.type,n);tk=r,n.target.dispatchEvent(r),tk=null,e.shift()}return!0}function eT(t,e,n){eA(t)&&n.delete(e)}function eC(){ev=!1,null!==ex&&eA(ex)&&(ex=null),null!==eO&&eA(eO)&&(eO=null),null!==ew&&eA(ew)&&(ew=null),eE.forEach(eT),ek.forEach(eT)}function eN(t,e){t.blockedOn===e&&(t.blockedOn=null,ev||(ev=!0,c.unstable_scheduleCallback(c.unstable_NormalPriority,eC)))}function eL(t){function e(e){return eN(e,t)}if(0<eb.length){eN(eb[0],t);for(var n=1;n<eb.length;n++){var r=eb[n];r.blockedOn===t&&(r.blockedOn=null)}}for(null!==ex&&eN(ex,t),null!==eO&&eN(eO,t),null!==ew&&eN(ew,t),eE.forEach(e),ek.forEach(e),n=0;n<eM.length;n++)(r=eM[n]).blockedOn===t&&(r.blockedOn=null);for(;0<eM.length&&null===(n=eM[0]).blockedOn;)ej(n),null===n.blockedOn&&eM.shift()}var eI=S.ReactCurrentBatchConfig,eR=!0;function eD(t,e,n,r){var i=ef,o=eI.transition;eI.transition=null;try{ef=1,ez(t,e,n,r)}finally{ef=i,eI.transition=o}}function eF(t,e,n,r){var i=ef,o=eI.transition;eI.transition=null;try{ef=4,ez(t,e,n,r)}finally{ef=i,eI.transition=o}}function ez(t,e,n,r){if(eR){var i=eW(t,e,n,r);if(null===i)rs(t,e,r,eB,n),eS(t,r);else if(function(t,e,n,r,i){switch(e){case"focusin":return ex=eP(ex,t,e,n,r,i),!0;case"dragenter":return eO=eP(eO,t,e,n,r,i),!0;case"mouseover":return ew=eP(ew,t,e,n,r,i),!0;case"pointerover":var o=i.pointerId;return eE.set(o,eP(eE.get(o)||null,t,e,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,ek.set(o,eP(ek.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<e_.indexOf(t)){for(;null!==i;){var o=rD(i);if(null!==o&&eh(o),null===(o=eW(t,e,n,r))&&rs(t,e,r,eB,n),o===i)break;i=o}null!==i&&r.stopPropagation()}else rs(t,e,r,null,n)}}var eB=null;function eW(t,e,n,r){if(eB=null,null!==(t=rR(t=tM(r))))if(null===(e=tU(t)))t=null;else if(13===(n=e.tag)){if(null!==(t=tq(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 eB=t,null}function e$(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(t1()){case t2:return 1;case t5:return 4;case t3:case t4:return 16;case t6:return 0x20000000;default:return 16}default:return 16}}var eG=null,eH=null,eV=null;function eU(){if(eV)return eV;var t,e,n=eH,r=n.length,i="value"in eG?eG.value:eG.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 eq(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 eY(){return!0}function eX(){return!1}function eK(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)?eY:eX,this.isPropagationStopped=eX,this}return H(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=eY)},stopPropagation:function(){var t=this.nativeEvent;t&&(t.stopPropagation?t.stopPropagation():"unknown"!=typeof t.cancelBubble&&(t.cancelBubble=!0),this.isPropagationStopped=eY)},persist:function(){},isPersistent:eY}),e}var eZ,eQ,eJ,e0={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},e1=eK(e0),e2=H({},e0,{view:0,detail:0}),e5=eK(e2),e3=H({},e2,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:no,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!==eJ&&(eJ&&"mousemove"===t.type?(eZ=t.screenX-eJ.screenX,eQ=t.screenY-eJ.screenY):eQ=eZ=0,eJ=t),eZ)},movementY:function(t){return"movementY"in t?t.movementY:eQ}}),e4=eK(e3),e6=eK(H({},e3,{dataTransfer:0})),e8=eK(H({},e2,{relatedTarget:0})),e9=eK(H({},e0,{animationName:0,elapsedTime:0,pseudoElement:0})),e7=eK(H({},e0,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}})),nt=eK(H({},e0,{data:0})),ne={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},nn={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"},nr={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function ni(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):!!(t=nr[t])&&!!e[t]}function no(){return ni}var na=eK(H({},e2,{key:function(t){if(t.key){var e=ne[t.key]||t.key;if("Unidentified"!==e)return e}return"keypress"===t.type?13===(t=eq(t))?"Enter":String.fromCharCode(t):"keydown"===t.type||"keyup"===t.type?nn[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:no,charCode:function(t){return"keypress"===t.type?eq(t):0},keyCode:function(t){return"keydown"===t.type||"keyup"===t.type?t.keyCode:0},which:function(t){return"keypress"===t.type?eq(t):"keydown"===t.type||"keyup"===t.type?t.keyCode:0}})),nl=eK(H({},e3,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),ns=eK(H({},e2,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:no})),nu=eK(H({},e0,{propertyName:0,elapsedTime:0,pseudoElement:0})),nc=eK(H({},e3,{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})),nf=[9,13,27,32],np=g&&"CompositionEvent"in window,nh=null;g&&"documentMode"in document&&(nh=document.documentMode);var nd=g&&"TextEvent"in window&&!nh,ny=g&&(!np||nh&&8<nh&&11>=nh),ng=!1;function nm(t,e){switch(t){case"keyup":return -1!==nf.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 nb=!1,nx={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 nO(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return"input"===e?!!nx[t.type]:"textarea"===e}function nw(t,e,n,r){tA(r),0<(e=rc(e,"onChange")).length&&(n=new e1("onChange","change",null,n,r),t.push({event:n,listeners:e}))}var nE=null,nk=null;function nM(t){rn(t,0)}function n_(t){if(Z(rF(t)))return t}function nS(t,e){if("change"===t)return e}var nP=!1;if(g){if(g){var nj="oninput"in document;if(!nj){var nA=document.createElement("div");nA.setAttribute("oninput","return;"),nj="function"==typeof nA.oninput}r=nj}else r=!1;nP=r&&(!document.documentMode||9<document.documentMode)}function nT(){nE&&(nE.detachEvent("onpropertychange",nC),nk=nE=null)}function nC(t){if("value"===t.propertyName&&n_(nk)){var e=[];nw(e,nk,t,tM(t)),tI(nM,e)}}function nN(t,e,n){"focusin"===t?(nT(),nE=e,nk=n,nE.attachEvent("onpropertychange",nC)):"focusout"===t&&nT()}function nL(t){if("selectionchange"===t||"keyup"===t||"keydown"===t)return n_(nk)}function nI(t,e){if("click"===t)return n_(e)}function nR(t,e){if("input"===t||"change"===t)return n_(e)}var nD="function"==typeof Object.is?Object.is:function(t,e){return t===e&&(0!==t||1/t==1/e)||t!=t&&e!=e};function nF(t,e){if(nD(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)||!nD(t[i],e[i]))return!1}return!0}function nz(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function nB(t,e){var n,r=nz(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=nz(r)}}function nW(){for(var t=window,e=Q();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=Q(t.document)}return e}function n$(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 nG=g&&"documentMode"in document&&11>=document.documentMode,nH=null,nV=null,nU=null,nq=!1;function nY(t,e,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;nq||null==nH||nH!==Q(r)||(r="selectionStart"in(r=nH)&&n$(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},nU&&nF(nU,r)||(nU=r,0<(r=rc(nV,"onSelect")).length&&(e=new e1("onSelect","select",null,e,n),t.push({event:e,listeners:r}),e.target=nH)))}function nX(t,e){var n={};return n[t.toLowerCase()]=e.toLowerCase(),n["Webkit"+t]="webkit"+e,n["Moz"+t]="moz"+e,n}var nK={animationend:nX("Animation","AnimationEnd"),animationiteration:nX("Animation","AnimationIteration"),animationstart:nX("Animation","AnimationStart"),transitionend:nX("Transition","TransitionEnd")},nZ={},nQ={};function nJ(t){if(nZ[t])return nZ[t];if(!nK[t])return t;var e,n=nK[t];for(e in n)if(n.hasOwnProperty(e)&&e in nQ)return nZ[t]=n[e];return t}g&&(nQ=document.createElement("div").style,"AnimationEvent"in window||(delete nK.animationend.animation,delete nK.animationiteration.animation,delete nK.animationstart.animation),"TransitionEvent"in window||delete nK.transitionend.transition);var n0=nJ("animationend"),n1=nJ("animationiteration"),n2=nJ("animationstart"),n5=nJ("transitionend"),n3=new Map,n4="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 n6(t,e){n3.set(t,e),d(e,[t])}for(var n8=0;n8<n4.length;n8++){var n9=n4[n8];n6(n9.toLowerCase(),"on"+(n9[0].toUpperCase()+n9.slice(1)))}n6(n0,"onAnimationEnd"),n6(n1,"onAnimationIteration"),n6(n2,"onAnimationStart"),n6("dblclick","onDoubleClick"),n6("focusin","onFocus"),n6("focusout","onBlur"),n6(n5,"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 n7="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(" "),rt=new Set("cancel close invalid load scroll toggle".split(" ").concat(n7));function re(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),tB){if(tB){var u=tW;tB=!1,tW=null}else throw Error(f(198));t$||(t$=!0,tG=u)}}(r,e,void 0,t),t.currentTarget=null}function rn(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;re(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;re(i,l,u),o=s}}}if(t$)throw t=tG,t$=!1,tG=null,t}function rr(t,e){var n=e[rN];void 0===n&&(n=e[rN]=new Set);var r=t+"__bubble";n.has(r)||(rl(e,t,2,!1),n.add(r))}function ri(t,e,n){var r=0;e&&(r|=4),rl(n,t,r,e)}var ro="_reactListening"+Math.random().toString(36).slice(2);function ra(t){if(!t[ro]){t[ro]=!0,p.forEach(function(e){"selectionchange"!==e&&(rt.has(e)||ri(e,!1,t),ri(e,!0,t))});var e=9===t.nodeType?t:t.ownerDocument;null===e||e[ro]||(e[ro]=!0,ri("selectionchange",!1,e))}}function rl(t,e,n,r){switch(e$(e)){case 1:var i=eD;break;case 4:i=eF;break;default:i=ez}n=i.bind(null,e,n,t),i=void 0,tD&&("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 rs(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=rR(l)))return;if(5===(s=a.tag)||6===s){r=o=a;continue r}l=l.parentNode}}r=r.return}tI(function(){var r=o,i=tM(n),a=[];r:{var l=n3.get(t);if(void 0!==l){var s=e1,u=t;switch(t){case"keypress":if(0===eq(n))break r;case"keydown":case"keyup":s=na;break;case"focusin":u="focus",s=e8;break;case"focusout":u="blur",s=e8;break;case"beforeblur":case"afterblur":s=e8;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=e4;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":s=e6;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":s=ns;break;case n0:case n1:case n2:s=e9;break;case n5:s=nu;break;case"scroll":s=e5;break;case"wheel":s=nc;break;case"copy":case"cut":case"paste":s=e7;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":s=nl}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=tR(d,p))&&c.push(ru(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)){if((l="mouseover"===t||"pointerover"===t,s="mouseout"===t||"pointerout"===t,!(l&&n!==tk&&(u=n.relatedTarget||n.fromElement)&&(rR(u)||u[rC])))&&(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?rR(u):null)&&(f=tU(u),u!==f||5!==u.tag&&6!==u.tag)&&(u=null)):(s=null,u=r),s!==u)){if(c=e4,y="onMouseLeave",p="onMouseEnter",d="mouse",("pointerout"===t||"pointerover"===t)&&(c=nl,y="onPointerLeave",p="onPointerEnter",d="pointer"),f=null==s?l:rF(s),h=null==u?l:rF(u),(l=new c(y,d+"leave",s,n,i)).target=f,l.relatedTarget=h,y=null,rR(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=rf(h))d++;for(h=0,y=p;y;y=rf(y))h++;for(;0<d-h;)c=rf(c),d--;for(;0<h-d;)p=rf(p),h--;for(;d--;){if(c===p||null!==p&&c===p.alternate)break i;c=rf(c),p=rf(p)}c=null}else c=null;null!==s&&rp(a,l,s,c,!1),null!==u&&null!==f&&rp(a,f,u,c,!0)}r:{if("select"===(s=(l=r?rF(r):window).nodeName&&l.nodeName.toLowerCase())||"input"===s&&"file"===l.type)var g,v=nS;else if(nO(l))if(nP)v=nR;else{v=nL;var b=nN}else(s=l.nodeName)&&"input"===s.toLowerCase()&&("checkbox"===l.type||"radio"===l.type)&&(v=nI);if(v&&(v=v(t,r))){nw(a,v,n,i);break r}b&&b(t,l,r),"focusout"===t&&(b=l._wrapperState)&&b.controlled&&"number"===l.type&&ti(l,"number",l.value)}switch(b=r?rF(r):window,t){case"focusin":(nO(b)||"true"===b.contentEditable)&&(nH=b,nV=r,nU=null);break;case"focusout":nU=nV=nH=null;break;case"mousedown":nq=!0;break;case"contextmenu":case"mouseup":case"dragend":nq=!1,nY(a,n,i);break;case"selectionchange":if(nG)break;case"keydown":case"keyup":nY(a,n,i)}if(np)i:{switch(t){case"compositionstart":var x="onCompositionStart";break i;case"compositionend":x="onCompositionEnd";break i;case"compositionupdate":x="onCompositionUpdate";break i}x=void 0}else nb?nm(t,n)&&(x="onCompositionEnd"):"keydown"===t&&229===n.keyCode&&(x="onCompositionStart");x&&(ny&&"ko"!==n.locale&&(nb||"onCompositionStart"!==x?"onCompositionEnd"===x&&nb&&(g=eU()):(eH="value"in(eG=i)?eG.value:eG.textContent,nb=!0)),0<(b=rc(r,x)).length&&(x=new nt(x,t,null,n,i),a.push({event:x,listeners:b}),g?x.data=g:null!==(g=nv(n))&&(x.data=g))),(g=nd?function(t,e){switch(t){case"compositionend":return nv(e);case"keypress":if(32!==e.which)return null;return ng=!0," ";case"textInput":return" "===(t=e.data)&&ng?null:t;default:return null}}(t,n):function(t,e){if(nb)return"compositionend"===t||!np&&nm(t,e)?(t=eU(),eV=eH=eG=null,nb=!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 ny&&"ko"!==e.locale?null:e.data}}(t,n))&&0<(r=rc(r,"onBeforeInput")).length&&(i=new nt("onBeforeInput","beforeinput",null,n,i),a.push({event:i,listeners:r}),i.data=g)}rn(a,e)})}function ru(t,e,n){return{instance:t,listener:e,currentTarget:n}}function rc(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=tR(t,n))&&r.unshift(ru(t,o,i)),null!=(o=tR(t,e))&&r.push(ru(t,o,i))),t=t.return}return r}function rf(t){if(null===t)return null;do t=t.return;while(t&&5!==t.tag);return t||null}function rp(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=tR(n,o))&&a.unshift(ru(n,s,l)):i||null!=(s=tR(n,o))&&a.push(ru(n,s,l))),n=n.return}0!==a.length&&t.push({event:e,listeners:a})}var rh=/\r\n?/g,rd=/\u0000|\uFFFD/g;function ry(t){return("string"==typeof t?t:""+t).replace(rh,"\n").replace(rd,"")}function rg(t,e,n){if(e=ry(e),ry(t)!==e&&n)throw Error(f(425))}function rm(){}var rv=null,rb=null;function rx(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 rO="function"==typeof setTimeout?setTimeout:void 0,rw="function"==typeof clearTimeout?clearTimeout:void 0,rE="function"==typeof Promise?Promise:void 0,rk="function"==typeof queueMicrotask?queueMicrotask:void 0!==rE?function(t){return rE.resolve(null).then(t).catch(rM)}:rO;function rM(t){setTimeout(function(){throw t})}function r_(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),eL(e);return}r--}else"$"!==n&&"$?"!==n&&"$!"!==n||r++;n=i}while(n);eL(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 rP(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 rj=Math.random().toString(36).slice(2),rA="__reactFiber$"+rj,rT="__reactProps$"+rj,rC="__reactContainer$"+rj,rN="__reactEvents$"+rj,rL="__reactListeners$"+rj,rI="__reactHandles$"+rj;function rR(t){var e=t[rA];if(e)return e;for(var n=t.parentNode;n;){if(e=n[rC]||n[rA]){if(n=e.alternate,null!==e.child||null!==n&&null!==n.child)for(t=rP(t);null!==t;){if(n=t[rA])return n;t=rP(t)}return e}n=(t=n).parentNode}return null}function rD(t){return(t=t[rA]||t[rC])&&(5===t.tag||6===t.tag||13===t.tag||3===t.tag)?t:null}function rF(t){if(5===t.tag||6===t.tag)return t.stateNode;throw Error(f(33))}function rz(t){return t[rT]||null}var rB=[],rW=-1;function r$(t){return{current:t}}function rG(t){0>rW||(t.current=rB[rW],rB[rW]=null,rW--)}function rH(t,e){rB[++rW]=t.current,t.current=e}var rV={},rU=r$(rV),rq=r$(!1),rY=rV;function rX(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 rK(t){return null!=(t=t.childContextTypes)}function rZ(){rG(rq),rG(rU)}function rQ(t,e,n){if(rU.current!==rV)throw Error(f(168));rH(rU,e),rH(rq,n)}function rJ(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 A:return"Fragment";case j:return"Portal";case C:return"Profiler";case T:return"StrictMode";case R:return"Suspense";case D:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case L:return(e.displayName||"Context")+".Consumer";case N:return(e._context.displayName||"Context")+".Provider";case I:var n=e.render;return(e=e.displayName)||(e=""!==(e=n.displayName||n.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case F:return null!==(n=e.displayName||null)?n:t(e.type)||"Memo";case z:n=e._payload,e=e._init;try{return t(e(n))}catch(t){}}return null}(e);case 8:return e===T?"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 H({},n,r)}function r0(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||rV,rY=rU.current,rH(rU,t),rH(rq,rq.current),!0}function r1(t,e,n){var r=t.stateNode;if(!r)throw Error(f(169));n?(r.__reactInternalMemoizedMergedChildContext=t=rJ(t,e,rY),rG(rq),rG(rU),rH(rU,t)):rG(rq),rH(rq,n)}var r2=null,r5=!1,r3=!1;function r4(t){null===r2?r2=[t]:r2.push(t)}function r6(){if(!r3&&null!==r2){r3=!0;var t=0,e=ef;try{var n=r2;for(ef=1;t<n.length;t++){var r=n[t];do r=r(!0);while(null!==r)}r2=null,r5=!1}catch(e){throw null!==r2&&(r2=r2.slice(t+1)),tK(t2,r6),e}finally{ef=e,r3=!1}}return null}var r8=[],r9=0,r7=null,it=0,ie=[],ir=0,ii=null,io=1,ia="";function il(t,e){r8[r9++]=it,r8[r9++]=r7,r7=t,it=e}function is(t,e,n){ie[ir++]=io,ie[ir++]=ia,ie[ir++]=ii,ii=t;var r=io;t=ia;var i=32-t7(r)-1;r&=~(1<<i),n+=1;var o=32-t7(e)+i;if(30<o){var a=i-i%5;o=(r&(1<<a)-1).toString(32),r>>=a,i-=a,io=1<<32-t7(e)+i|n<<i|r,ia=o+t}else io=1<<o|n<<i|r,ia=t}function iu(t){null!==t.return&&(il(t,1),is(t,1,0))}function ic(t){for(;t===r7;)r7=r8[--r9],r8[r9]=null,it=r8[--r9],r8[r9]=null;for(;t===ii;)ii=ie[--ir],ie[ir]=null,ia=ie[--ir],ie[ir]=null,io=ie[--ir],ie[ir]=null}var ip=null,ih=null,id=!1,iy=null;function ig(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 im(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,ip=t,ih=rS(e.firstChild),!0);case 6:return null!==(e=""===t.pendingProps||3!==e.nodeType?null:e)&&(t.stateNode=e,ip=t,ih=null,!0);case 13:return null!==(e=8!==e.nodeType?null:e)&&(t.memoizedState={dehydrated:e,treeContext:n=null!==ii?{id:io,overflow:ia}:null,retryLane:0x40000000},(n=lK(18,null,null,0)).stateNode=e,n.return=t,t.child=n,ip=t,ih=null,!0);default:return!1}}function iv(t){return 0!=(1&t.mode)&&0==(128&t.flags)}function ib(t){if(id){var e=ih;if(e){var n=e;if(!im(t,e)){if(iv(t))throw Error(f(418));e=rS(n.nextSibling);var r=ip;e&&im(t,e)?ig(r,n):(t.flags=-4097&t.flags|2,id=!1,ip=t)}}else{if(iv(t))throw Error(f(418));t.flags=-4097&t.flags|2,id=!1,ip=t}}}function ix(t){for(t=t.return;null!==t&&5!==t.tag&&3!==t.tag&&13!==t.tag;)t=t.return;ip=t}function iO(t){if(t!==ip)return!1;if(!id)return ix(t),id=!0,!1;if((e=3!==t.tag)&&!(e=5!==t.tag)&&(e="head"!==(e=t.type)&&"body"!==e&&!rx(t.type,t.memoizedProps)),e&&(e=ih)){if(iv(t))throw iw(),Error(f(418));for(;e;)ig(t,e),e=rS(e.nextSibling)}if(ix(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){ih=rS(t.nextSibling);break r}e--}else"$"!==n&&"$!"!==n&&"$?"!==n||e++}t=t.nextSibling}ih=null}}else ih=ip?rS(t.stateNode.nextSibling):null;return!0}function iw(){for(var t=ih;t;)t=rS(t.nextSibling)}function iE(){ih=ip=null,id=!1}function ik(t){null===iy?iy=[t]:iy.push(t)}var iM=S.ReactCurrentBatchConfig;function i_(t,e){if(t&&t.defaultProps)for(var n in e=H({},e),t=t.defaultProps)void 0===e[n]&&(e[n]=t[n]);return e}var iS=r$(null),iP=null,ij=null,iA=null;function iT(){iA=ij=iP=null}function iC(t){var e=iS.current;rG(iS),t._currentValue=e}function iN(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 iL(t,e){iP=t,iA=ij=null,null!==(t=t.dependencies)&&null!==t.firstContext&&(0!=(t.lanes&e)&&(au=!0),t.firstContext=null)}function iI(t){var e=t._currentValue;if(iA!==t)if(t={context:t,memoizedValue:e,next:null},null===ij){if(null===iP)throw Error(f(308));ij=t,iP.dependencies={lanes:0,firstContext:t}}else ij=ij.next=t;return e}var iR=null;function iD(t){null===iR?iR=[t]:iR.push(t)}function iF(t,e,n,r){var i=e.interleaved;return null===i?(n.next=n,iD(e)):(n.next=i.next,i.next=n),e.interleaved=n,iz(t,r)}function iz(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 iB=!1;function iW(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function i$(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 iG(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function iH(t,e,n){var r=t.updateQueue;if(null===r)return null;if(r=r.shared,0!=(2&a6)){var i=r.pending;return null===i?e.next=e:(e.next=i.next,i.next=e),r.pending=e,iz(t,n)}return null===(i=r.interleaved)?(e.next=e,iD(r)):(e.next=i.next,i.next=e),r.interleaved=e,iz(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,ec(t,n)}}function iU(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 iq(t,e,n,r){var i=t.updateQueue;iB=!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=H({},f,p);break r;case 2:iB=!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);li|=a,t.lanes=a,t.memoizedState=f}}function iY(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 iX=(new u.Component).refs;function iK(t,e,n,r){n=null==(n=n(r,e=t.memoizedState))?e:H({},e,n),t.memoizedState=n,0===t.lanes&&(t.updateQueue.baseState=n)}var iZ={isMounted:function(t){return!!(t=t._reactInternals)&&tU(t)===t},enqueueSetState:function(t,e,n){t=t._reactInternals;var r=lw(),i=lE(t),o=iG(r,i);o.payload=e,null!=n&&(o.callback=n),null!==(e=iH(t,o,i))&&(lk(e,t,i,r),iV(e,t,i))},enqueueReplaceState:function(t,e,n){t=t._reactInternals;var r=lw(),i=lE(t),o=iG(r,i);o.tag=1,o.payload=e,null!=n&&(o.callback=n),null!==(e=iH(t,o,i))&&(lk(e,t,i,r),iV(e,t,i))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var n=lw(),r=lE(t),i=iG(n,r);i.tag=2,null!=e&&(i.callback=e),null!==(e=iH(t,i,r))&&(lk(e,t,r,n),iV(e,t,r))}};function iQ(t,e,n,r,i,o,a){return"function"==typeof(t=t.stateNode).shouldComponentUpdate?t.shouldComponentUpdate(r,o,a):!e.prototype||!e.prototype.isPureReactComponent||!nF(n,r)||!nF(i,o)}function iJ(t,e,n){var r=!1,i=rV,o=e.contextType;return"object"==typeof o&&null!==o?o=iI(o):(i=rK(e)?rY:rU.current,o=(r=null!=(r=e.contextTypes))?rX(t,i):rV),e=new e(n,o),t.memoizedState=null!==e.state&&void 0!==e.state?e.state:null,e.updater=iZ,t.stateNode=e,e._reactInternals=t,r&&((t=t.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,t.__reactInternalMemoizedMaskedChildContext=o),e}function i0(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&&iZ.enqueueReplaceState(e,e.state,null)}function i1(t,e,n,r){var i=t.stateNode;i.props=n,i.state=t.memoizedState,i.refs=iX,iW(t);var o=e.contextType;"object"==typeof o&&null!==o?i.context=iI(o):i.context=rX(t,o=rK(e)?rY:rU.current),i.state=t.memoizedState,"function"==typeof(o=e.getDerivedStateFromProps)&&(iK(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&&iZ.enqueueReplaceState(i,i.state,null),iq(t,n,i,r),i.state=t.memoizedState),"function"==typeof i.componentDidMount&&(t.flags|=4194308)}function i2(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===iX&&(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 i5(t,e){throw Error(f(31,"[object Object]"===(t=Object.prototype.toString.call(e))?"object with keys {"+Object.keys(e).join(", ")+"}":t))}function i3(t){return(0,t._init)(t._payload)}function i4(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=i(e,n)).return=t,e}function s(t,e,n,r){var o=n.type;return o===A?c(t,e,n.props.children,r,n.key):(null!==e&&(e.elementType===o||"object"==typeof o&&null!==o&&o.$$typeof===z&&i3(o)===e.type)?(r=i(e,n.props)).ref=i2(t,e,n):(r=lJ(n.type,n.key,n.props,null,t.mode,r)).ref=i2(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=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=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 P:return(n=lJ(e.type,e.key,e.props,null,t.mode,n)).ref=i2(t,null,e),n.return=t,n;case j:return(e=l5(e,t.mode,n)).return=t,e;case z:return p(t,(0,e._init)(e._payload),n)}if(to(e)||$(e))return(e=l0(e,t.mode,n,null)).return=t,e;i5(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 P:return n.key===i?s(t,e,n,r):null;case j:return n.key===i?u(t,e,n,r):null;case z:return h(t,e,(i=n._init)(n._payload),r)}if(to(n)||$(n))return null!==i?null:c(t,e,n,r,null);i5(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 P:return s(e,t=t.get(null===r.key?n:r.key)||null,r,i);case j:return u(e,t=t.get(null===r.key?n:r.key)||null,r,i);case z:return d(t,e,n,(0,r._init)(r._payload),i)}if(to(r)||$(r))return c(e,t=t.get(n)||null,r,i,null);i5(e,r)}return null}return function l(s,u,c,y){if("object"==typeof c&&null!==c&&c.type===A&&null===c.key&&(c=c.props.children),"object"==typeof c&&null!==c){switch(c.$$typeof){case P:r:{for(var g=c.key,v=u;null!==v;){if(v.key===g){if((g=c.type)===A){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===z&&i3(g)===v.type){n(s,v.sibling),(u=i(v,c.props)).ref=i2(s,v,c),u.return=s,s=u;break r}n(s,v);break}e(s,v),v=v.sibling}c.type===A?((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=i2(s,u,c),y.return=s,s=y)}return a(s);case j: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 z:return l(s,u,(v=c._init)(c._payload),y)}if(to(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),id&&il(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 id&&il(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)}),id&&il(i,y),u}(s,u,c,y);if($(c))return function(i,a,l,s){var u=$(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,b=l.next();null!==y&&!b.done;g++,b=l.next()){y.index>g?(v=y,y=null):v=y.sibling;var x=h(i,y,b.value,s);if(null===x){null===y&&(y=v);break}t&&y&&null===x.alternate&&e(i,y),a=o(x,a,g),null===c?u=x:c.sibling=x,c=x,y=v}if(b.done)return n(i,y),id&&il(i,g),u;if(null===y){for(;!b.done;g++,b=l.next())null!==(b=p(i,b.value,s))&&(a=o(b,a,g),null===c?u=b:c.sibling=b,c=b);return id&&il(i,g),u}for(y=r(i,y);!b.done;g++,b=l.next())null!==(b=d(y,i,g,b.value,s))&&(t&&null!==b.alternate&&y.delete(null===b.key?g:b.key),a=o(b,a,g),null===c?u=b:c.sibling=b,c=b);return t&&y.forEach(function(t){return e(i,t)}),id&&il(i,g),u}(s,u,c,y);i5(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 i6=i4(!0),i8=i4(!1),i9={},i7=r$(i9),ot=r$(i9),oe=r$(i9);function on(t){if(t===i9)throw Error(f(174));return t}function or(t,e){switch(rH(oe,e),rH(ot,t),rH(i7,i9),t=e.nodeType){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:tp(null,"");break;default:e=tp(e=(t=8===t?e.parentNode:e).namespaceURI||null,t=t.tagName)}rG(i7),rH(i7,e)}function oi(){rG(i7),rG(ot),rG(oe)}function oo(t){on(oe.current);var e=on(i7.current),n=tp(e,t.type);e!==n&&(rH(ot,t),rH(i7,n))}function oa(t){ot.current===t&&(rG(i7),rG(ot))}var ol=r$(0);function os(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 ou=[];function oc(){for(var t=0;t<ou.length;t++)ou[t]._workInProgressVersionPrimary=null;ou.length=0}var of=S.ReactCurrentDispatcher,op=S.ReactCurrentBatchConfig,oh=0,od=null,oy=null,og=null,om=!1,ov=!1,ob=0,ox=0;function oO(){throw Error(f(321))}function ow(t,e){if(null===e)return!1;for(var n=0;n<e.length&&n<t.length;n++)if(!nD(t[n],e[n]))return!1;return!0}function oE(t,e,n,r,i,o){if(oh=o,od=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,of.current=null===t||null===t.memoizedState?o6:o8,t=n(r,i),ov){o=0;do{if(ov=!1,ob=0,25<=o)throw Error(f(301));o+=1,og=oy=null,e.updateQueue=null,of.current=o9,t=n(r,i)}while(ov)}if(of.current=o4,e=null!==oy&&null!==oy.next,oh=0,og=oy=od=null,om=!1,e)throw Error(f(300));return t}function ok(){var t=0!==ob;return ob=0,t}function oM(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===og?od.memoizedState=og=t:og=og.next=t,og}function o_(){if(null===oy){var t=od.alternate;t=null!==t?t.memoizedState:null}else t=oy.next;var e=null===og?od.memoizedState:og.next;if(null!==e)og=e,oy=t;else{if(null===t)throw Error(f(310));t={memoizedState:(oy=t).memoizedState,baseState:oy.baseState,baseQueue:oy.baseQueue,queue:oy.queue,next:null},null===og?od.memoizedState=og=t:og=og.next=t}return og}function oS(t,e){return"function"==typeof e?e(t):e}function oP(t){var e=o_(),n=e.queue;if(null===n)throw Error(f(311));n.lastRenderedReducer=t;var r=oy,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((oh&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,od.lanes|=c,li|=c}u=u.next}while(null!==u&&u!==o);null===s?a=r:s.next=l,nD(r,e.memoizedState)||(au=!0),e.memoizedState=r,e.baseState=a,e.baseQueue=s,n.lastRenderedState=r}if(null!==(t=n.interleaved)){i=t;do o=i.lane,od.lanes|=o,li|=o,i=i.next;while(i!==t)}else null===i&&(n.lanes=0);return[e.memoizedState,n.dispatch]}function oj(t){var e=o_(),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);nD(o,e.memoizedState)||(au=!0),e.memoizedState=o,null===e.baseQueue&&(e.baseState=o),n.lastRenderedState=o}return[o,r]}function oA(){}function oT(t,e){var n=od,r=o_(),i=e(),o=!nD(r.memoizedState,i);if(o&&(r.memoizedState=i,au=!0),r=r.queue,oG(oL.bind(null,n,r,t),[t]),r.getSnapshot!==e||o||null!==og&&1&og.memoizedState.tag){if(n.flags|=2048,oF(9,oN.bind(null,n,r,i,e),void 0,null),null===a8)throw Error(f(349));0!=(30&oh)||oC(n,e,i)}return i}function oC(t,e,n){t.flags|=16384,t={getSnapshot:e,value:n},null===(e=od.updateQueue)?(e={lastEffect:null,stores:null},od.updateQueue=e,e.stores=[t]):null===(n=e.stores)?e.stores=[t]:n.push(t)}function oN(t,e,n,r){e.value=n,e.getSnapshot=r,oI(e)&&oR(t)}function oL(t,e,n){return n(function(){oI(e)&&oR(t)})}function oI(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!nD(t,n)}catch(t){return!0}}function oR(t){var e=iz(t,1);null!==e&&lk(e,t,1,-1)}function oD(t){var e=oM();return"function"==typeof t&&(t=t()),e.memoizedState=e.baseState=t,e.queue=t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:oS,lastRenderedState:t},t=t.dispatch=o1.bind(null,od,t),[e.memoizedState,t]}function oF(t,e,n,r){return t={tag:t,create:e,destroy:n,deps:r,next:null},null===(e=od.updateQueue)?(e={lastEffect:null,stores:null},od.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 oz(){return o_().memoizedState}function oB(t,e,n,r){var i=oM();od.flags|=t,i.memoizedState=oF(1|e,n,void 0,void 0===r?null:r)}function oW(t,e,n,r){var i=o_();r=void 0===r?null:r;var o=void 0;if(null!==oy){var a=oy.memoizedState;if(o=a.destroy,null!==r&&ow(r,a.deps)){i.memoizedState=oF(e,n,o,r);return}}od.flags|=t,i.memoizedState=oF(1|e,n,o,r)}function o$(t,e){return oB(8390656,8,t,e)}function oG(t,e){return oW(2048,8,t,e)}function oH(t,e){return oW(4,2,t,e)}function oV(t,e){return oW(4,4,t,e)}function oU(t,e){return"function"==typeof e?(e(t=t()),function(){e(null)}):null!=e?(e.current=t=t(),function(){e.current=null}):void 0}function oq(t,e,n){return n=null!=n?n.concat([t]):null,oW(4,4,oU.bind(null,e,t),n)}function oY(){}function oX(t,e){var n=o_();e=void 0===e?null:e;var r=n.memoizedState;return null!==r&&null!==e&&ow(e,r[1])?r[0]:(n.memoizedState=[t,e],t)}function oK(t,e){var n=o_();e=void 0===e?null:e;var r=n.memoizedState;return null!==r&&null!==e&&ow(e,r[1])?r[0]:(n.memoizedState=[t=t(),e],t)}function oZ(t,e,n){return 0==(21&oh)?(t.baseState&&(t.baseState=!1,au=!0),t.memoizedState=n):(nD(n,e)||(n=el(),od.lanes|=n,li|=n,t.baseState=!0),e)}function oQ(t,e){var n=ef;ef=0!==n&&4>n?n:4,t(!0);var r=op.transition;op.transition={};try{t(!1),e()}finally{ef=n,op.transition=r}}function oJ(){return o_().memoizedState}function o0(t,e,n){var r=lE(t);n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},o2(t)?o5(e,n):null!==(n=iF(t,e,n,r))&&(lk(n,t,r,lw()),o3(n,e,r))}function o1(t,e,n){var r=lE(t),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(o2(t))o5(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,nD(l,a)){var s=e.interleaved;null===s?(i.next=i,iD(e)):(i.next=s.next,s.next=i),e.interleaved=i;return}}catch(t){}finally{}null!==(n=iF(t,e,i,r))&&(lk(n,t,r,i=lw()),o3(n,e,r))}}function o2(t){var e=t.alternate;return t===od||null!==e&&e===od}function o5(t,e){ov=om=!0;var n=t.pending;null===n?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function o3(t,e,n){if(0!=(4194240&n)){var r=e.lanes;r&=t.pendingLanes,e.lanes=n|=r,ec(t,n)}}var o4={readContext:iI,useCallback:oO,useContext:oO,useEffect:oO,useImperativeHandle:oO,useInsertionEffect:oO,useLayoutEffect:oO,useMemo:oO,useReducer:oO,useRef:oO,useState:oO,useDebugValue:oO,useDeferredValue:oO,useTransition:oO,useMutableSource:oO,useSyncExternalStore:oO,useId:oO,unstable_isNewReconciler:!1},o6={readContext:iI,useCallback:function(t,e){return oM().memoizedState=[t,void 0===e?null:e],t},useContext:iI,useEffect:o$,useImperativeHandle:function(t,e,n){return n=null!=n?n.concat([t]):null,oB(4194308,4,oU.bind(null,e,t),n)},useLayoutEffect:function(t,e){return oB(4194308,4,t,e)},useInsertionEffect:function(t,e){return oB(4,2,t,e)},useMemo:function(t,e){return e=void 0===e?null:e,oM().memoizedState=[t=t(),e],t},useReducer:function(t,e,n){var r=oM();return r.memoizedState=r.baseState=e=void 0!==n?n(e):e,r.queue=t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},t=t.dispatch=o0.bind(null,od,t),[r.memoizedState,t]},useRef:function(t){return oM().memoizedState={current:t}},useState:oD,useDebugValue:oY,useDeferredValue:function(t){return oM().memoizedState=t},useTransition:function(){var t=oD(!1),e=t[0];return t=oQ.bind(null,t[1]),oM().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,n){var r=od,i=oM();if(id){if(void 0===n)throw Error(f(407));n=n()}else{if(n=e(),null===a8)throw Error(f(349));0!=(30&oh)||oC(r,e,n)}i.memoizedState=n;var o={value:n,getSnapshot:e};return i.queue=o,o$(oL.bind(null,r,o,t),[t]),r.flags|=2048,oF(9,oN.bind(null,r,o,n,e),void 0,null),n},useId:function(){var t=oM(),e=a8.identifierPrefix;if(id){var n=ia,r=io;e=":"+e+"R"+(n=(r&~(1<<32-t7(r)-1)).toString(32)+n),0<(n=ob++)&&(e+="H"+n.toString(32)),e+=":"}else e=":"+e+"r"+(n=ox++).toString(32)+":";return t.memoizedState=e},unstable_isNewReconciler:!1},o8={readContext:iI,useCallback:oX,useContext:iI,useEffect:oG,useImperativeHandle:oq,useInsertionEffect:oH,useLayoutEffect:oV,useMemo:oK,useReducer:oP,useRef:oz,useState:function(){return oP(oS)},useDebugValue:oY,useDeferredValue:function(t){return oZ(o_(),oy.memoizedState,t)},useTransition:function(){return[oP(oS)[0],o_().memoizedState]},useMutableSource:oA,useSyncExternalStore:oT,useId:oJ,unstable_isNewReconciler:!1},o9={readContext:iI,useCallback:oX,useContext:iI,useEffect:oG,useImperativeHandle:oq,useInsertionEffect:oH,useLayoutEffect:oV,useMemo:oK,useReducer:oj,useRef:oz,useState:function(){return oj(oS)},useDebugValue:oY,useDeferredValue:function(t){var e=o_();return null===oy?e.memoizedState=t:oZ(e,oy.memoizedState,t)},useTransition:function(){return[oj(oS)[0],o_().memoizedState]},useMutableSource:oA,useSyncExternalStore:oT,useId:oJ,unstable_isNewReconciler:!1};function o7(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 q(t.type,!1);case 11:return q(t.type.render,!1);case 1:return q(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 at(t,e,n){return{value:t,source:null,stack:null!=n?n:null,digest:null!=e?e:null}}function ae(t,e){try{console.error(e.value)}catch(t){setTimeout(function(){throw t})}}var an="function"==typeof WeakMap?WeakMap:Map;function ar(t,e,n){(n=iG(-1,n)).tag=3,n.payload={element:null};var r=e.value;return n.callback=function(){lp||(lp=!0,lh=r),ae(t,e)},n}function ai(t,e,n){(n=iG(-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(){ae(t,e)}}var o=t.stateNode;return null!==o&&"function"==typeof o.componentDidCatch&&(n.callback=function(){ae(t,e),"function"!=typeof r&&(null===ld?ld=new Set([this]):ld.add(this));var n=e.stack;this.componentDidCatch(e.value,{componentStack:null!==n?n:""})}),n}function ao(t,e,n){var r=t.pingCache;if(null===r){r=t.pingCache=new an;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 aa(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 al(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=iG(-1,1)).tag=2,iH(n,e,1))),n.lanes|=1):(t.flags|=65536,t.lanes=i),t}var as=S.ReactCurrentOwner,au=!1;function ac(t,e,n,r){e.child=null===t?i8(e,null,n,r):i6(e,t.child,n,r)}function af(t,e,n,r,i){n=n.render;var o=e.ref;return(iL(e,i),r=oE(t,e,n,r,o,i),n=ok(),null===t||au)?(id&&n&&iu(e),e.flags|=1,ac(t,e,r,i),e.child):(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,aA(t,e,i))}function ap(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,ah(t,e,o,r,i))}if(o=t.child,0==(t.lanes&i)){var a=o.memoizedProps;if((n=null!==(n=n.compare)?n:nF)(a,r)&&t.ref===e.ref)return aA(t,e,i)}return e.flags|=1,(t=lQ(o,r)).ref=e.ref,t.return=e,e.child=t}function ah(t,e,n,r,i){if(null!==t){var o=t.memoizedProps;if(nF(o,r)&&t.ref===e.ref)if(au=!1,e.pendingProps=r=o,0==(t.lanes&i))return e.lanes=t.lanes,aA(t,e,i);else 0!=(131072&t.flags)&&(au=!0)}return ag(t,e,n,r,i)}function ad(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},rH(le,lt),lt|=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,rH(le,lt),lt|=t,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==o?o.baseLanes:n,rH(le,lt),lt|=r}else null!==o?(r=o.baseLanes|n,e.memoizedState=null):r=n,rH(le,lt),lt|=r;return ac(t,e,i,n),e.child}function ay(t,e){var n=e.ref;(null===t&&null!==n||null!==t&&t.ref!==n)&&(e.flags|=512,e.flags|=2097152)}function ag(t,e,n,r,i){var o=rK(n)?rY:rU.current;return(o=rX(e,o),iL(e,i),n=oE(t,e,n,r,o,i),r=ok(),null===t||au)?(id&&r&&iu(e),e.flags|=1,ac(t,e,n,i),e.child):(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,aA(t,e,i))}function am(t,e,n,r,i){if(rK(n)){var o=!0;r0(e)}else o=!1;if(iL(e,i),null===e.stateNode)aj(t,e),iJ(e,n,r),i1(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?iI(u):rX(e,u=rK(n)?rY:rU.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)&&i0(e,a,r,u),iB=!1;var p=e.memoizedState;a.state=p,iq(e,r,a,i),s=e.memoizedState,l!==r||p!==s||rq.current||iB?("function"==typeof c&&(iK(e,n,c,r),s=e.memoizedState),(l=iB||iQ(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,i$(t,e),l=e.memoizedProps,u=e.type===e.elementType?l:i_(e.type,l),a.props=u,f=e.pendingProps,p=a.context,s="object"==typeof(s=n.contextType)&&null!==s?iI(s):rX(e,s=rK(n)?rY:rU.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)&&i0(e,a,r,s),iB=!1,p=e.memoizedState,a.state=p,iq(e,r,a,i);var d=e.memoizedState;l!==f||p!==d||rq.current||iB?("function"==typeof h&&(iK(e,n,h,r),d=e.memoizedState),(u=iB||iQ(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){ay(t,e);var a=0!=(128&e.flags);if(!r&&!a)return i&&r1(e,n,!1),aA(t,e,o);r=e.stateNode,as.current=e;var l=a&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return e.flags|=1,null!==t&&a?(e.child=i6(e,t.child,null,o),e.child=i6(e,null,l,o)):ac(t,e,l,o),e.memoizedState=r.state,i&&r1(e,n,!0),e.child}function ab(t){var e=t.stateNode;e.pendingContext?rQ(t,e.pendingContext,e.pendingContext!==e.context):e.context&&rQ(t,e.context,!1),or(t,e.containerInfo)}function ax(t,e,n,r,i){return iE(),ik(i),e.flags|=256,ac(t,e,n,r),e.child}var aO={dehydrated:null,treeContext:null,retryLane:0};function aw(t){return{baseLanes:t,cachePool:null,transitions:null}}function aE(t,e,n){var r,i=e.pendingProps,o=ol.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),rH(ol,1&o),null===t)return(ib(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=aw(n),e.memoizedState=aO,t):ak(e,l));if(null!==(o=t.memoizedState)&&null!==(r=o.dehydrated)){var s=t,u=e,c=l,p=i,h=r,d=o,y=n;if(c)return 256&u.flags?(u.flags&=-257,aM(s,u,y,p=at(Error(f(422))))):null!==u.memoizedState?(u.child=s.child,u.flags|=128,null):(d=p.fallback,h=u.mode,p=l1({mode:"visible",children:p.children},h,0,null),d=l0(d,h,y,null),d.flags|=2,p.return=u,d.return=u,p.sibling=d,u.child=p,0!=(1&u.mode)&&i6(u,s.child,null,y),u.child.memoizedState=aw(y),u.memoizedState=aO,d);if(0==(1&u.mode))return aM(s,u,y,null);if("$!"===h.data){if(p=h.nextSibling&&h.nextSibling.dataset)var g=p.dgst;return p=g,aM(s,u,y,p=at(d=Error(f(419)),p,void 0))}if(g=0!=(y&s.childLanes),au||g){if(null!==(p=a8)){switch(y&-y){case 4:h=2;break;case 16:h=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:h=32;break;case 0x20000000:h=0x10000000;break;default:h=0}0!==(h=0!=(h&(p.suspendedLanes|y))?0:h)&&h!==d.retryLane&&(d.retryLane=h,iz(s,h),lk(p,s,h,-1))}return lD(),aM(s,u,y,p=at(Error(f(421))))}return"$?"===h.data?(u.flags|=128,u.child=s.child,u=lq.bind(null,s),h._reactRetry=u,null):(s=d.treeContext,ih=rS(h.nextSibling),ip=u,id=!0,iy=null,null!==s&&(ie[ir++]=io,ie[ir++]=ia,ie[ir++]=ii,io=s.id,ia=s.overflow,ii=u),u=ak(u,p.children),u.flags|=4096,u)}if(a){a=i.fallback,l=e.mode,r=(o=t.child).sibling;var v={mode:"hidden",children:i.children};return 0==(1&l)&&e.child!==o?((i=e.child).childLanes=0,i.pendingProps=v,e.deletions=null):(i=lQ(o,v)).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)?aw(n):{baseLanes:l.baseLanes|n,cachePool:null,transitions:l.transitions},a.memoizedState=l,a.childLanes=t.childLanes&~n,e.memoizedState=aO,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 ak(t,e){return(e=l1({mode:"visible",children:e},t.mode,0,null)).return=t,t.child=e}function aM(t,e,n,r){return null!==r&&ik(r),i6(e,t.child,null,n),t=ak(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function a_(t,e,n){t.lanes|=e;var r=t.alternate;null!==r&&(r.lanes|=e),iN(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 aP(t,e,n){var r=e.pendingProps,i=r.revealOrder,o=r.tail;if(ac(t,e,r.children,n),0!=(2&(r=ol.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&&a_(t,n,e);else if(19===t.tag)a_(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(rH(ol,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===os(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===os(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 aj(t,e){0==(1&e.mode)&&null!==t&&(t.alternate=null,e.alternate=null,e.flags|=2)}function aA(t,e,n){if(null!==t&&(e.dependencies=t.dependencies),li|=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 aT(t,e){if(!id)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 aC(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,on(i7.current);var o,a=null;switch(n){case"input":i=J(t,i),r=J(t,r),a=[];break;case"select":i=H({},i,{value:void 0}),r=H({},r,{value:void 0}),a=[];break;case"textarea":i=tl(t,i),r=tl(t,r),a=[];break;default:"function"!=typeof i.onClick&&"function"==typeof r.onClick&&(t.onclick=rm)}for(u in tw(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&&rr("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 aN=!1,aL=!1,aI="function"==typeof WeakSet?WeakSet:Set,aR=null;function aD(t,e){var n=t.ref;if(null!==n)if("function"==typeof n)try{n(null)}catch(n){lH(t,e,n)}else n.current=null}function aF(t,e,n){try{n()}catch(n){lH(t,e,n)}}var az=!1;function aB(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&&aF(e,n,o)}i=i.next}while(i!==r)}}function aW(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 a$(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 aG(t){return 5===t.tag||3===t.tag||4===t.tag}function aH(t){r:for(;;){for(;null===t.sibling;){if(null===t.return||aG(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||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,aU=!1;function aq(t,e,n){for(n=n.child;null!==n;)aY(t,e,n),n=n.sibling}function aY(t,e,n){if(t9&&"function"==typeof t9.onCommitFiberUnmount)try{t9.onCommitFiberUnmount(t8,n)}catch(t){}switch(n.tag){case 5:aL||aD(n,e);case 6:var r=aV,i=aU;aV=null,aq(t,e,n),aV=r,aU=i,null!==aV&&(aU?(t=aV,n=n.stateNode,8===t.nodeType?t.parentNode.removeChild(n):t.removeChild(n)):aV.removeChild(n.stateNode));break;case 18:null!==aV&&(aU?(t=aV,n=n.stateNode,8===t.nodeType?r_(t.parentNode,n):1===t.nodeType&&r_(t,n),eL(t)):r_(aV,n.stateNode));break;case 4:r=aV,i=aU,aV=n.stateNode.containerInfo,aU=!0,aq(t,e,n),aV=r,aU=i;break;case 0:case 11:case 14:case 15:if(!aL&&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)?aF(n,e,a):0!=(4&o)&&aF(n,e,a)),i=i.next}while(i!==r)}aq(t,e,n);break;case 1:if(!aL&&(aD(n,e),"function"==typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(t){lH(n,e,t)}aq(t,e,n);break;case 21:default:aq(t,e,n);break;case 22:1&n.mode?(aL=(r=aL)||null!==n.memoizedState,aq(t,e,n),aL=r):aq(t,e,n)}}function aX(t){var e=t.updateQueue;if(null!==e){t.updateQueue=null;var n=t.stateNode;null===n&&(n=t.stateNode=new aI),e.forEach(function(e){var r=lY.bind(null,t,e);n.has(e)||(n.add(e),e.then(r,r))})}}function aK(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,aU=!1;break r;case 3:case 4:aV=a.stateNode.containerInfo,aU=!0;break r}a=a.return}if(null===aV)throw Error(f(160));aY(t,o,i),aV=null,aU=!1;var l=i.alternate;null!==l&&(l.return=null),i.return=null}catch(t){lH(i,e,t)}}if(12854&e.subtreeFlags)for(e=e.child;null!==e;)aZ(e,t),e=e.sibling}function aZ(t,e){var n=t.alternate,r=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(aK(e,t),aQ(t),4&r){try{aB(3,t,t.return),aW(3,t)}catch(e){lH(t,t.return,e)}try{aB(5,t,t.return)}catch(e){lH(t,t.return,e)}}break;case 1:aK(e,t),aQ(t),512&r&&null!==n&&aD(n,n.return);break;case 5:if(aK(e,t),aQ(t),512&r&&null!==n&&aD(n,n.return),32&t.flags){var i=t.stateNode;try{tg(i,"")}catch(e){lH(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&&te(i,o),tE(l,a);var u=tE(l,o);for(a=0;a<s.length;a+=2){var c=s[a],p=s[a+1];"style"===c?tx(i,p):"dangerouslySetInnerHTML"===c?ty(i,p):"children"===c?tg(i,p):_(i,c,p,u)}switch(l){case"input":tn(i,o);break;case"textarea":tu(i,o);break;case"select":var h=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!o.multiple;var d=o.value;null!=d?ta(i,!!o.multiple,d,!1):!!o.multiple!==h&&(null!=o.defaultValue?ta(i,!!o.multiple,o.defaultValue,!0):ta(i,!!o.multiple,o.multiple?[]:"",!1))}i[rT]=o}catch(e){lH(t,t.return,e)}}break;case 6:if(aK(e,t),aQ(t),4&r){if(null===t.stateNode)throw Error(f(162));i=t.stateNode,o=t.memoizedProps;try{i.nodeValue=o}catch(e){lH(t,t.return,e)}}break;case 3:if(aK(e,t),aQ(t),4&r&&null!==n&&n.memoizedState.isDehydrated)try{eL(e.containerInfo)}catch(e){lH(t,t.return,e)}break;case 4:default:aK(e,t),aQ(t);break;case 13:aK(e,t),aQ(t),8192&(i=t.child).flags&&(o=null!==i.memoizedState,i.stateNode.isHidden=o,o&&(null===i.alternate||null===i.alternate.memoizedState)&&(lu=t0())),4&r&&aX(t);break;case 22:if(c=null!==n&&null!==n.memoizedState,1&t.mode?(aL=(u=aL)||c,aK(e,t),aL=u):aK(e,t),aQ(t),8192&r){if(u=null!==t.memoizedState,(t.stateNode.isHidden=u)&&!c&&0!=(1&t.mode))for(aR=t,c=t.child;null!==c;){for(p=aR=c;null!==aR;){switch(d=(h=aR).child,h.tag){case 0:case 11:case 14:case 15:aB(4,h,h.return);break;case 1:aD(h,h.return);var y=h.stateNode;if("function"==typeof y.componentWillUnmount){r=h,n=h.return;try{y.props=(e=r).memoizedProps,y.state=e.memoizedState,y.componentWillUnmount()}catch(t){lH(r,n,t)}}break;case 5:aD(h,h.return);break;case 22:if(null!==h.memoizedState){a0(p);continue}}null!==d?(d.return=h,aR=d):a0(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=tb("display",a))}catch(e){lH(t,t.return,e)}}}else if(6===p.tag){if(null===c)try{p.stateNode.nodeValue=u?"":p.memoizedProps}catch(e){lH(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:aK(e,t),aQ(t),4&r&&aX(t);case 21:}}function aQ(t){var e=t.flags;if(2&e){try{r:{for(var n=t.return;null!==n;){if(aG(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&&(tg(i,""),r.flags&=-33);var o=aH(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=aH(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=rm));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){lH(t,t.return,e)}t.flags&=-3}4096&e&&(t.flags&=-4097)}function aJ(t){for(;null!==aR;){var e=aR;if(0!=(8772&e.flags)){var n=e.alternate;try{if(0!=(8772&e.flags))switch(e.tag){case 0:case 11:case 15:aL||aW(5,e);break;case 1:var r=e.stateNode;if(4&e.flags&&!aL)if(null===n)r.componentDidMount();else{var i=e.elementType===e.type?n.memoizedProps:i_(e.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=e.updateQueue;null!==o&&iY(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}iY(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&&eL(p)}}}break;default:throw Error(f(163))}aL||512&e.flags&&a$(e)}catch(t){lH(e,e.return,t)}}if(e===t){aR=null;break}if(null!==(n=e.sibling)){n.return=e.return,aR=n;break}aR=e.return}}function a0(t){for(;null!==aR;){var e=aR;if(e===t){aR=null;break}var n=e.sibling;if(null!==n){n.return=e.return,aR=n;break}aR=e.return}}function a1(t){for(;null!==aR;){var e=aR;try{switch(e.tag){case 0:case 11:case 15:var n=e.return;try{aW(4,e)}catch(t){lH(e,n,t)}break;case 1:var r=e.stateNode;if("function"==typeof r.componentDidMount){var i=e.return;try{r.componentDidMount()}catch(t){lH(e,i,t)}}var o=e.return;try{a$(e)}catch(t){lH(e,o,t)}break;case 5:var a=e.return;try{a$(e)}catch(t){lH(e,a,t)}}}catch(t){lH(e,e.return,t)}if(e===t){aR=null;break}var l=e.sibling;if(null!==l){l.return=e.return,aR=l;break}aR=e.return}}var a2=Math.ceil,a5=S.ReactCurrentDispatcher,a3=S.ReactCurrentOwner,a4=S.ReactCurrentBatchConfig,a6=0,a8=null,a9=null,a7=0,lt=0,le=r$(0),ln=0,lr=null,li=0,lo=0,la=0,ll=null,ls=null,lu=0,lc=1/0,lf=null,lp=!1,lh=null,ld=null,ly=!1,lg=null,lm=0,lv=0,lb=null,lx=-1,lO=0;function lw(){return 0!=(6&a6)?t0():-1!==lx?lx:lx=t0()}function lE(t){return 0==(1&t.mode)?1:0!=(2&a6)&&0!==a7?a7&-a7:null!==iM.transition?(0===lO&&(lO=el()),lO):0!==(t=ef)?t:t=void 0===(t=window.event)?16:e$(t.type)}function lk(t,e,n,r){if(50<lv)throw lv=0,lb=null,Error(f(185));eu(t,n,r),(0==(2&a6)||t!==a8)&&(t===a8&&(0==(2&a6)&&(lo|=n),4===ln&&lj(t,a7)),lM(t,r),1===n&&0===a6&&0==(1&e.mode)&&(lc=t0()+500,r5&&r6()))}function lM(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-t7(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=eo(t,t===a8?a7:0);if(0===i)null!==r&&tZ(r),t.callbackNode=null,t.callbackPriority=0;else if(e=i&-i,t.callbackPriority!==e){if(null!=r&&tZ(r),1===e)0===t.tag?(n=lA.bind(null,t),r5=!0,r4(n)):r4(lA.bind(null,t)),rk(function(){0==(6&a6)&&r6()}),r=null;else{switch(ep(i)){case 1:r=t2;break;case 4:r=t5;break;case 16:default:r=t3;break;case 0x20000000:r=t6}r=tK(r,l_.bind(null,t))}t.callbackPriority=e,t.callbackNode=r}}function l_(t,e){if(lx=-1,lO=0,0!=(6&a6))throw Error(f(327));var n=t.callbackNode;if(l$()&&t.callbackNode!==n)return null;var r=eo(t,t===a8?a7:0);if(0===r)return null;if(0!=(30&r)||0!=(r&t.expiredLanes)||e)e=lF(t,r);else{e=r;var i=a6;a6|=2;var o=lR();for((a8!==t||a7!==e)&&(lf=null,lc=t0()+500,lL(t,e));;)try{for(;null!==a9&&!tQ();)lz(a9);break}catch(e){lI(t,e)}iT(),a5.current=o,a6=i,null!==a9?e=0:(a8=null,a7=0,e=ln)}if(0!==e){if(2===e&&0!==(i=ea(t))&&(r=i,e=lS(t,i)),1===e)throw n=lr,lL(t,0),lj(t,r),lM(t,t0()),n;if(6===e)lj(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(!nD(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=lF(t,r))&&0!==(o=ea(t))&&(r=o,e=lS(t,o)),1===e))throw n=lr,lL(t,0),lj(t,r),lM(t,t0()),n;switch(t.finishedWork=i,t.finishedLanes=r,e){case 0:case 1:throw Error(f(345));case 2:case 5:lW(t,ls,lf);break;case 3:if(lj(t,r),(0x7c00000&r)===r&&10<(e=lu+500-t0())){if(0!==eo(t,0))break;if(((i=t.suspendedLanes)&r)!==r){lw(),t.pingedLanes|=t.suspendedLanes&i;break}t.timeoutHandle=rO(lW.bind(null,t,ls,lf),e);break}lW(t,ls,lf);break;case 4:if(lj(t,r),(4194240&r)===r)break;for(i=-1,e=t.eventTimes;0<r;){var a=31-t7(r);o=1<<a,(a=e[a])>i&&(i=a),r&=~o}if(r=i,10<(r=(120>(r=t0()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*a2(r/1960))-r)){t.timeoutHandle=rO(lW.bind(null,t,ls,lf),r);break}lW(t,ls,lf);break;default:throw Error(f(329))}}}return lM(t,t0()),t.callbackNode===n?l_.bind(null,t):null}function lS(t,e){var n=ll;return t.current.memoizedState.isDehydrated&&(lL(t,e).flags|=256),2!==(t=lF(t,e))&&(e=ls,ls=n,null!==e&&lP(e)),t}function lP(t){null===ls?ls=t:ls.push.apply(ls,t)}function lj(t,e){for(e&=~la,e&=~lo,t.suspendedLanes|=e,t.pingedLanes&=~e,t=t.expirationTimes;0<e;){var n=31-t7(e),r=1<<n;t[n]=-1,e&=~r}}function lA(t){if(0!=(6&a6))throw Error(f(327));l$();var e=eo(t,0);if(0==(1&e))return lM(t,t0()),null;var n=lF(t,e);if(0!==t.tag&&2===n){var r=ea(t);0!==r&&(e=r,n=lS(t,r))}if(1===n)throw n=lr,lL(t,0),lj(t,e),lM(t,t0()),n;if(6===n)throw Error(f(345));return t.finishedWork=t.current.alternate,t.finishedLanes=e,lW(t,ls,lf),lM(t,t0()),null}function lT(t,e){var n=a6;a6|=1;try{return t(e)}finally{0===(a6=n)&&(lc=t0()+500,r5&&r6())}}function lC(t){null!==lg&&0===lg.tag&&0==(6&a6)&&l$();var e=a6;a6|=1;var n=a4.transition,r=ef;try{if(a4.transition=null,ef=1,t)return t()}finally{ef=r,a4.transition=n,0==(6&(a6=e))&&r6()}}function lN(){lt=le.current,rG(le)}function lL(t,e){t.finishedWork=null,t.finishedLanes=0;var n=t.timeoutHandle;if(-1!==n&&(t.timeoutHandle=-1,rw(n)),null!==a9)for(n=a9.return;null!==n;){var r=n;switch(ic(r),r.tag){case 1:null!=(r=r.type.childContextTypes)&&rZ();break;case 3:oi(),rG(rq),rG(rU),oc();break;case 5:oa(r);break;case 4:oi();break;case 13:case 19:rG(ol);break;case 10:iC(r.type._context);break;case 22:case 23:lN()}n=n.return}if(a8=t,a9=t=lQ(t.current,null),a7=lt=e,ln=0,lr=null,la=lo=li=0,ls=ll=null,null!==iR){for(e=0;e<iR.length;e++)if(null!==(r=(n=iR[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}iR=null}return t}function lI(t,e){for(;;){var n=a9;try{if(iT(),of.current=o4,om){for(var r=od.memoizedState;null!==r;){var i=r.queue;null!==i&&(i.pending=null),r=r.next}om=!1}if(oh=0,og=oy=od=null,ov=!1,ob=0,a3.current=null,null===n||null===n.return){ln=1,lr=e,a9=null;break}r:{var o=t,a=n.return,l=n,s=e;if(e=a7,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=aa(a);if(null!==d){d.flags&=-257,al(d,a,l,o,e),1&d.mode&&ao(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)){ao(o,u,e),lD();break r}s=Error(f(426))}else if(id&&1&l.mode){var v=aa(a);if(null!==v){0==(65536&v.flags)&&(v.flags|=256),al(v,a,l,o,e),ik(o7(s,l));break r}}o=s=o7(s,l),4!==ln&&(ln=2),null===ll?ll=[o]:ll.push(o),o=a;do{switch(o.tag){case 3:o.flags|=65536,e&=-e,o.lanes|=e;var b=ar(o,s,e);iU(o,b);break r;case 1:l=s;var x=o.type,O=o.stateNode;if(0==(128&o.flags)&&("function"==typeof x.getDerivedStateFromError||null!==O&&"function"==typeof O.componentDidCatch&&(null===ld||!ld.has(O)))){o.flags|=65536,e&=-e,o.lanes|=e;var w=ai(o,l,e);iU(o,w);break r}}o=o.return}while(null!==o)}lB(n)}catch(t){e=t,a9===n&&null!==n&&(a9=n=n.return);continue}break}}function lR(){var t=a5.current;return a5.current=o4,null===t?o4:t}function lD(){(0===ln||3===ln||2===ln)&&(ln=4),null===a8||0==(0xfffffff&li)&&0==(0xfffffff&lo)||lj(a8,a7)}function lF(t,e){var n=a6;a6|=2;var r=lR();for((a8!==t||a7!==e)&&(lf=null,lL(t,e));;)try{for(;null!==a9;)lz(a9);break}catch(e){lI(t,e)}if(iT(),a6=n,a5.current=r,null!==a9)throw Error(f(261));return a8=null,a7=0,ln}function lz(t){var e=s(t.alternate,t,lt);t.memoizedProps=t.pendingProps,null===e?lB(t):a9=e,a3.current=null}function lB(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(ic(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return aC(e),null;case 1:case 17:return rK(e.type)&&rZ(),aC(e),null;case 3:return r=e.stateNode,oi(),rG(rq),rG(rU),oc(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(null===t||null===t.child)&&(iO(e)?e.flags|=4:null===t||t.memoizedState.isDehydrated&&0==(256&e.flags)||(e.flags|=1024,null!==iy&&(lP(iy),iy=null))),o(t,e),aC(e),null;case 5:oa(e);var s=on(oe.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 aC(e),null}if(t=on(i7.current),iO(e)){r=e.stateNode,n=e.type;var u=e.memoizedProps;switch(r[rA]=e,r[rT]=u,t=0!=(1&e.mode),n){case"dialog":rr("cancel",r),rr("close",r);break;case"iframe":case"object":case"embed":rr("load",r);break;case"video":case"audio":for(s=0;s<n7.length;s++)rr(n7[s],r);break;case"source":rr("error",r);break;case"img":case"image":case"link":rr("error",r),rr("load",r);break;case"details":rr("toggle",r);break;case"input":tt(r,u),rr("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!u.multiple},rr("invalid",r);break;case"textarea":ts(r,u),rr("invalid",r)}for(var c in tw(n,u),s=null,u)if(u.hasOwnProperty(c)){var p=u[c];"children"===c?"string"==typeof p?r.textContent!==p&&(!0!==u.suppressHydrationWarning&&rg(r.textContent,p,t),s=["children",p]):"number"==typeof p&&r.textContent!==""+p&&(!0!==u.suppressHydrationWarning&&rg(r.textContent,p,t),s=["children",""+p]):h.hasOwnProperty(c)&&null!=p&&"onScroll"===c&&rr("scroll",r)}switch(n){case"input":K(r),tr(r,u,!0);break;case"textarea":K(r),tc(r);break;case"select":case"option":break;default:"function"==typeof u.onClick&&(r.onclick=rm)}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=tf(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[rA]=e,t[rT]=r,i(t,e,!1,!1),e.stateNode=t;r:{switch(c=tE(n,r),n){case"dialog":rr("cancel",t),rr("close",t),s=r;break;case"iframe":case"object":case"embed":rr("load",t),s=r;break;case"video":case"audio":for(s=0;s<n7.length;s++)rr(n7[s],t);s=r;break;case"source":rr("error",t),s=r;break;case"img":case"image":case"link":rr("error",t),rr("load",t),s=r;break;case"details":rr("toggle",t),s=r;break;case"input":tt(t,r),s=J(t,r),rr("invalid",t);break;case"option":default:s=r;break;case"select":t._wrapperState={wasMultiple:!!r.multiple},s=H({},r,{value:void 0}),rr("invalid",t);break;case"textarea":ts(t,r),s=tl(t,r),rr("invalid",t)}for(u in tw(n,s),p=s)if(p.hasOwnProperty(u)){var d=p[u];"style"===u?tx(t,d):"dangerouslySetInnerHTML"===u?null!=(d=d?d.__html:void 0)&&ty(t,d):"children"===u?"string"==typeof d?("textarea"!==n||""!==d)&&tg(t,d):"number"==typeof d&&tg(t,""+d):"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&"autoFocus"!==u&&(h.hasOwnProperty(u)?null!=d&&"onScroll"===u&&rr("scroll",t):null!=d&&_(t,u,d,c))}switch(n){case"input":K(t),tr(t,r,!1);break;case"textarea":K(t),tc(t);break;case"option":null!=r.value&&t.setAttribute("value",""+Y(r.value));break;case"select":t.multiple=!!r.multiple,null!=(u=r.value)?ta(t,!!r.multiple,u,!1):null!=r.defaultValue&&ta(t,!!r.multiple,r.defaultValue,!0);break;default:"function"==typeof s.onClick&&(t.onclick=rm)}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 aC(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=on(oe.current),on(i7.current),iO(e)){if(r=e.stateNode,n=e.memoizedProps,r[rA]=e,(u=r.nodeValue!==n)&&null!==(t=ip))switch(t.tag){case 3:rg(r.nodeValue,n,0!=(1&t.mode));break;case 5:!0!==t.memoizedProps.suppressHydrationWarning&&rg(r.nodeValue,n,0!=(1&t.mode))}u&&(e.flags|=4)}else(r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[rA]=e,e.stateNode=r}return aC(e),null;case 13:if(rG(ol),r=e.memoizedState,null===t||null!==t.memoizedState&&null!==t.memoizedState.dehydrated){if(id&&null!==ih&&0!=(1&e.mode)&&0==(128&e.flags))iw(),iE(),e.flags|=98560,u=!1;else if(u=iO(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[rA]=e}else iE(),0==(128&e.flags)&&(e.memoizedState=null),e.flags|=4;aC(e),u=!1}else null!==iy&&(lP(iy),iy=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&ol.current)?0===ln&&(ln=3):lD())),null!==e.updateQueue&&(e.flags|=4),aC(e),null;case 4:return oi(),o(t,e),null===t&&ra(e.stateNode.containerInfo),aC(e),null;case 10:return iC(e.type._context),aC(e),null;case 19:if(rG(ol),null===(u=e.memoizedState))return aC(e),null;if(r=0!=(128&e.flags),null===(c=u.rendering))if(r)aT(u,!1);else{if(0!==ln||null!==t&&0!=(128&t.flags))for(t=e.child;null!==t;){if(null!==(c=os(t))){for(e.flags|=128,aT(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 rH(ol,1&ol.current|2),e.child}t=t.sibling}null!==u.tail&&t0()>lc&&(e.flags|=128,r=!0,aT(u,!1),e.lanes=4194304)}else{if(!r)if(null!==(t=os(c))){if(e.flags|=128,r=!0,null!==(n=t.updateQueue)&&(e.updateQueue=n,e.flags|=4),aT(u,!0),null===u.tail&&"hidden"===u.tailMode&&!c.alternate&&!id)return aC(e),null}else 2*t0()-u.renderingStartTime>lc&&0x40000000!==n&&(e.flags|=128,r=!0,aT(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=t0(),e.sibling=null,n=ol.current,rH(ol,r?1&n|2:1&n),e;return aC(e),null;case 22:case 23:return lN(),r=null!==e.memoizedState,null!==t&&null!==t.memoizedState!==r&&(e.flags|=8192),r&&0!=(1&e.mode)?0!=(0x40000000<)&&(aC(e),6&e.subtreeFlags&&(e.flags|=8192)):aC(e),null;case 24:case 25:return null}throw Error(f(156,e.tag))}(n,e,lt))){a9=n;return}}else{if(null!==(n=function(t,e){switch(ic(e),e.tag){case 1:return rK(e.type)&&rZ(),65536&(t=e.flags)?(e.flags=-65537&t|128,e):null;case 3:return oi(),rG(rq),rG(rU),oc(),0!=(65536&(t=e.flags))&&0==(128&t)?(e.flags=-65537&t|128,e):null;case 5:return oa(e),null;case 13:if(rG(ol),null!==(t=e.memoizedState)&&null!==t.dehydrated){if(null===e.alternate)throw Error(f(340));iE()}return 65536&(t=e.flags)?(e.flags=-65537&t|128,e):null;case 19:return rG(ol),null;case 4:return oi(),null;case 10:return iC(e.type._context),null;case 22:case 23:return lN(),null;default:return null}}(n,e))){n.flags&=32767,a9=n;return}if(null!==t)t.flags|=32768,t.subtreeFlags=0,t.deletions=null;else{ln=6,a9=null;return}}if(null!==(e=e.sibling)){a9=e;return}a9=e=t}while(null!==e);0===ln&&(ln=5)}function lW(t,e,n){var r=ef,i=a4.transition;try{a4.transition=null,ef=1,function(t,e,n,r){do l$();while(null!==lg);if(0!=(6&a6))throw Error(f(327));n=t.finishedWork;var i=t.finishedLanes;if(null!==n){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,a=t,l=o,s=a.pendingLanes&~l;a.pendingLanes=l,a.suspendedLanes=0,a.pingedLanes=0,a.expiredLanes&=l,a.mutableReadLanes&=l,a.entangledLanes&=l,l=a.entanglements;var u=a.eventTimes;for(a=a.expirationTimes;0<s;){var c=31-t7(s),p=1<<c;l[c]=0,u[c]=-1,a[c]=-1,s&=~p}if(t===a8&&(a9=a8=null,a7=0),0==(2064&n.subtreeFlags)&&0==(2064&n.flags)||ly||(ly=!0,function(t,e){tK(t,e)}(t3,function(){return l$(),null})),o=0!=(15990&n.flags),0!=(15990&n.subtreeFlags)||o){o=a4.transition,a4.transition=null;var h,d,y,g=ef;ef=1;var v=a6;a6|=4,a3.current=null,function(t,e){if(rv=eR,n$(t=nW())){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(rb={focusedElem:t,selectionRange:n},eR=!1,aR=e;null!==aR;)if(t=(e=aR).child,0!=(1028&e.subtreeFlags)&&null!==t)t.return=e,aR=t;else for(;null!==aR;){e=aR;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,b=e.stateNode,x=b.getSnapshotBeforeUpdate(e.elementType===e.type?g:i_(e.type,g),v);b.__reactInternalSnapshotBeforeUpdate=x}break;case 3:var O=e.stateNode.containerInfo;1===O.nodeType?O.textContent="":9===O.nodeType&&O.documentElement&&O.removeChild(O.documentElement);break;default:throw Error(f(163))}}catch(t){lH(e,e.return,t)}if(null!==(t=e.sibling)){t.return=e.return,aR=t;break}aR=e.return}y=az,az=!1}(t,n),aZ(n,t),function(t){var e=nW(),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&&n$(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=nB(n,o);var a=nB(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}}(rb),eR=!!rv,rb=rv=null,t.current=n,h=n,d=t,y=i,aR=h,function t(e,n,r){for(var i=0!=(1&e.mode);null!==aR;){var o=aR,a=o.child;if(22===o.tag&&i){var l=null!==o.memoizedState||aN;if(!l){var s=o.alternate,u=null!==s&&null!==s.memoizedState||aL;s=aN;var c=aL;if(aN=l,(aL=u)&&!c)for(aR=o;null!==aR;)u=(l=aR).child,22===l.tag&&null!==l.memoizedState?a1(o):null!==u?(u.return=l,aR=u):a1(o);for(;null!==a;)aR=a,t(a,n,r),a=a.sibling;aR=o,aN=s,aL=c}aJ(e,n,r)}else 0!=(8772&o.subtreeFlags)&&null!==a?(a.return=o,aR=a):aJ(e,n,r)}}(h,d,y),tJ(),a6=v,ef=g,a4.transition=o}else t.current=n;ly&&(ly=!1,lg=t,lm=i),0===(o=t.pendingLanes)&&(ld=null);var b=n.stateNode;if(t9&&"function"==typeof t9.onCommitFiberRoot)try{t9.onCommitFiberRoot(t8,b,void 0,128==(128&b.current.flags))}catch(t){}if(lM(t,t0()),null!==e)for(r=t.onRecoverableError,n=0;n<e.length;n++)r((i=e[n]).value,{componentStack:i.stack,digest:i.digest});if(lp)throw lp=!1,t=lh,lh=null,t;0!=(1&lm)&&0!==t.tag&&l$(),0!=(1&(o=t.pendingLanes))?t===lb?lv++:(lv=0,lb=t):lv=0,r6()}}(t,e,n,r)}finally{a4.transition=i,ef=r}return null}function l$(){if(null!==lg){var t=ep(lm),e=a4.transition,n=ef;try{if(a4.transition=null,ef=16>t?16:t,null===lg)var r=!1;else{if(t=lg,lg=null,lm=0,0!=(6&a6))throw Error(f(331));var i=a6;for(a6|=4,aR=t.current;null!==aR;){var o=aR,a=o.child;if(0!=(16&aR.flags)){var l=o.deletions;if(null!==l){for(var s=0;s<l.length;s++){var u=l[s];for(aR=u;null!==aR;){var c=aR;switch(c.tag){case 0:case 11:case 15:aB(8,c,o)}var p=c.child;if(null!==p)p.return=c,aR=p;else for(;null!==aR;){var h=(c=aR).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[rA],delete n[rT],delete n[rN],delete n[rL],delete n[rI]),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){aR=null;break}if(null!==h){h.return=d,aR=h;break}aR=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)}}aR=o}}if(0!=(2064&o.subtreeFlags)&&null!==a)a.return=o,aR=a;else for(;null!==aR;){if(o=aR,0!=(2048&o.flags))switch(o.tag){case 0:case 11:case 15:aB(9,o,o.return)}var b=o.sibling;if(null!==b){b.return=o.return,aR=b;break}aR=o.return}}var x=t.current;for(aR=x;null!==aR;){var O=(a=aR).child;if(0!=(2064&a.subtreeFlags)&&null!==O)O.return=a,aR=O;else for(a=x;null!==aR;){if(l=aR,0!=(2048&l.flags))try{switch(l.tag){case 0:case 11:case 15:aW(9,l)}}catch(t){lH(l,l.return,t)}if(l===a){aR=null;break}var w=l.sibling;if(null!==w){w.return=l.return,aR=w;break}aR=l.return}}if(a6=i,r6(),t9&&"function"==typeof t9.onPostCommitFiberRoot)try{t9.onPostCommitFiberRoot(t8,t)}catch(t){}r=!0}return r}finally{ef=n,a4.transition=e}}return!1}function lG(t,e,n){e=ar(t,e=o7(n,e),1),t=iH(t,e,1),e=lw(),null!==t&&(eu(t,1,e),lM(t,e))}function lH(t,e,n){if(3===t.tag)lG(t,t,n);else for(;null!==e;){if(3===e.tag){lG(e,t,n);break}if(1===e.tag){var r=e.stateNode;if("function"==typeof e.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===ld||!ld.has(r))){t=ai(e,t=o7(n,t),1),e=iH(e,t,1),t=lw(),null!==e&&(eu(e,1,t),lM(e,t));break}}e=e.return}}function lV(t,e,n){var r=t.pingCache;null!==r&&r.delete(e),e=lw(),t.pingedLanes|=t.suspendedLanes&n,a8===t&&(a7&n)===n&&(4===ln||3===ln&&(0x7c00000&a7)===a7&&500>t0()-lu?lL(t,0):la|=n),lM(t,e)}function lU(t,e){0===e&&(0==(1&t.mode)?e=1:(e=er,0==(0x7c00000&(er<<=1))&&(er=4194304)));var n=lw();null!==(t=iz(t,e))&&(eu(t,e,n),lM(t,n))}function lq(t){var e=t.memoizedState,n=0;null!==e&&(n=e.retryLane),lU(t,n)}function lY(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),lU(t,n)}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)}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 A:return l0(n.children,i,o,e);case T:a=8,i|=8;break;case C:return(t=lK(12,n,e,2|i)).elementType=C,t.lanes=o,t;case R:return(t=lK(13,n,e,i)).elementType=R,t.lanes=o,t;case D:return(t=lK(19,n,e,i)).elementType=D,t.lanes=o,t;case B:return l1(n,i,o,e);default:if("object"==typeof t&&null!==t)switch(t.$$typeof){case N:a=10;break r;case L:a=9;break r;case I:a=11;break r;case F:a=14;break r;case z: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=B,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=es(0),this.expirationTimes=es(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=es(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},iW(o),t}function l6(t){if(!t)return rV;t=t._reactInternals;r:{if(tU(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(rK(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(rK(n))return rJ(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,(o=iG(r=lw(),i=lE(n))).callback=null!=e?e:null,iH(n,o,i),t.current.lanes=i,eu(t,i,r),lM(t,r),t}function l9(t,e,n,r){var i=e.current,o=lw(),a=lE(i);return n=l6(n),null===e.context?e.context=n:e.pendingContext=n,(e=iG(o,a)).payload={element:t},null!==(r=void 0===r?null:r)&&(e.callback=r),null!==(t=iH(i,e,a))&&(lk(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)}s=function(t,e,n){if(null!==t)if(t.memoizedProps!==e.pendingProps||rq.current)au=!0;else{if(0==(t.lanes&n)&&0==(128&e.flags))return au=!1,function(t,e,n){switch(e.tag){case 3:ab(e),iE();break;case 5:oo(e);break;case 1:rK(e.type)&&r0(e);break;case 4:or(e,e.stateNode.containerInfo);break;case 10:var r=e.type._context,i=e.memoizedProps.value;rH(iS,r._currentValue),r._currentValue=i;break;case 13:if(null!==(r=e.memoizedState)){if(null!==r.dehydrated)return rH(ol,1&ol.current),e.flags|=128,null;if(0!=(n&e.child.childLanes))return aE(t,e,n);return rH(ol,1&ol.current),null!==(t=aA(t,e,n))?t.sibling:null}rH(ol,1&ol.current);break;case 19:if(r=0!=(n&e.childLanes),0!=(128&t.flags)){if(r)return aP(t,e,n);e.flags|=128}if(null!==(i=e.memoizedState)&&(i.rendering=null,i.tail=null,i.lastEffect=null),rH(ol,ol.current),!r)return null;break;case 22:case 23:return e.lanes=0,ad(t,e,n)}return aA(t,e,n)}(t,e,n);au=0!=(131072&t.flags)}else au=!1,id&&0!=(1048576&e.flags)&&is(e,it,e.index);switch(e.lanes=0,e.tag){case 2:var r=e.type;aj(t,e),t=e.pendingProps;var i=rX(e,rU.current);iL(e,n),i=oE(null,e,r,t,i,n);var o=ok();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,rK(r)?(o=!0,r0(e)):o=!1,e.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,iW(e),i.updater=iZ,e.stateNode=i,i._reactInternals=e,i1(e,r,t,n),e=av(null,e,r,!0,o,n)):(e.tag=0,id&&o&&iu(e),ac(null,e,i,n),e=e.child),e;case 16:r=e.elementType;r:{switch(aj(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);if(null!=t){if((t=t.$$typeof)===I)return 11;if(t===F)return 14}return 2}(r),t=i_(r,t),i){case 0:e=ag(null,e,r,t,n);break r;case 1:e=am(null,e,r,t,n);break r;case 11:e=af(null,e,r,t,n);break r;case 14:e=ap(null,e,r,i_(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:i_(r,i),ag(t,e,r,i,n);case 1:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:i_(r,i),am(t,e,r,i,n);case 3:r:{if(ab(e),null===t)throw Error(f(387));r=e.pendingProps,i=(o=e.memoizedState).element,i$(t,e),iq(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=o7(Error(f(423)),e),e=ax(t,e,r,n,i);break r}else if(r!==i){i=o7(Error(f(424)),e),e=ax(t,e,r,n,i);break r}else for(ih=rS(e.stateNode.containerInfo.firstChild),ip=e,id=!0,iy=null,n=i8(e,null,r,n),e.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling;else{if(iE(),r===i){e=aA(t,e,n);break r}ac(t,e,r,n)}e=e.child}return e;case 5:return oo(e),null===t&&ib(e),r=e.type,i=e.pendingProps,o=null!==t?t.memoizedProps:null,a=i.children,rx(r,i)?a=null:null!==o&&rx(r,o)&&(e.flags|=32),ay(t,e),ac(t,e,a,n),e.child;case 6:return null===t&&ib(e),null;case 13:return aE(t,e,n);case 4:return or(e,e.stateNode.containerInfo),r=e.pendingProps,null===t?e.child=i6(e,null,r,n):ac(t,e,r,n),e.child;case 11:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:i_(r,i),af(t,e,r,i,n);case 7:return ac(t,e,e.pendingProps,n),e.child;case 8:case 12:return ac(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,rH(iS,r._currentValue),r._currentValue=a,null!==o)if(nD(o.value,a)){if(o.children===i.children&&!rq.current){e=aA(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=iG(-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),iN(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),iN(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}ac(t,e,i.children,n),e=e.child}return e;case 9:return i=e.type,r=e.pendingProps.children,iL(e,n),r=r(i=iI(i)),e.flags|=1,ac(t,e,r,n),e.child;case 14:return i=i_(r=e.type,e.pendingProps),i=i_(r.type,i),ap(t,e,r,i,n);case 15:return ah(t,e,e.type,e.pendingProps,n);case 17:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:i_(r,i),aj(t,e),e.tag=1,rK(r)?(t=!0,r0(e)):t=!1,iL(e,n),iJ(e,r,i),i1(e,r,i,n),av(null,e,r,!0,t,n);case 19:return aP(t,e,n);case 22:return ad(t,e,n)}throw Error(f(156,e.tag))};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(){}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[rC]=a.current,ra(8===t.nodeType?t.parentNode:t),lC(),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[rC]=s.current,ra(8===t.nodeType?t.parentNode:t),lC(function(){l9(e,s,n,r)}),s}(n,e,t,i,r);return l7(a)}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;lC(function(){l9(null,t,null,null)}),e[rC]=null}},si.prototype.unstable_scheduleHydration=function(t){if(t){var e=eg();t={blockedOn:null,target:t,priority:e};for(var n=0;n<eM.length&&0!==e&&e<eM[n].priority;n++);eM.splice(n,0,t),0===n&&ej(t)}},eh=function(t){switch(t.tag){case 3:var e=t.stateNode;if(e.current.memoizedState.isDehydrated){var n=ei(e.pendingLanes);0!==n&&(ec(e,1|n),lM(e,t0()),0==(6&a6)&&(lc=t0()+500,r6()))}break;case 13:lC(function(){var e=iz(t,1);null!==e&&lk(e,t,1,lw())}),se(t,1)}},ed=function(t){if(13===t.tag){var e=iz(t,0x8000000);null!==e&&lk(e,t,0x8000000,lw()),se(t,0x8000000)}},ey=function(t){if(13===t.tag){var e=lE(t),n=iz(t,e);null!==n&&lk(n,t,e,lw()),se(t,e)}},eg=function(){return ef},em=function(t,e){var n=ef;try{return ef=t,e()}finally{ef=n}},t_=function(t,e,n){switch(e){case"input":if(tn(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=rz(r);if(!i)throw Error(f(90));Z(r),tn(r,i)}}}break;case"textarea":tu(t,n);break;case"select":null!=(e=n.value)&&ta(t,!!n.multiple,e,!1)}},tC=lT,tN=lC;var su={findFiberByHostInstance:rR,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=tX(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("u">typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var sf=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!sf.isDisabled&&sf.supportsFiber)try{t8=sf.inject(sc),t9=sf}catch(t){}}e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED={usingClientEntryPoint:!1,Events:[rD,rF,rz,tA,tT,lT]},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:j,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[rC]=e.current,ra(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 null===(t=tX(e))?null:t.stateNode},e.flushSync=function(t){return lC(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[rC]=e.current,ra(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&&(lC(function(){ss(null,null,t,!1,function(){t._reactRootContainer=null,t[rC]=null})}),!0)},e.unstable_batchedUpdates=lT,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"},1098:function(t,e,n){"use strict";!function t(){if("u">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(9006)},4006: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,b="function"==typeof setTimeout?setTimeout:null,x="function"==typeof clearTimeout?clearTimeout:null,O="u">typeof setImmediate?setImmediate:null;function w(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 E(t){if(v=!1,w(t),!g)if(null!==r(c))g=!0,L(k);else{var e=r(f);null!==e&&I(E,e.startTime-t)}}function k(t,n){g=!1,v&&(v=!1,x(S),S=-1),y=!0;var o=d;try{for(w(n),h=r(c);null!==h&&(!(h.expirationTime>n)||t&&!A());){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),w(n)}else i(c);h=r(c)}if(null!==h)var s=!0;else{var u=r(f);null!==u&&I(E,u.startTime-n),s=!1}return s}finally{h=null,d=o,y=!1}}"u">typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var M=!1,_=null,S=-1,P=5,j=-1;function A(){return!(e.unstable_now()-j<P)}function T(){if(null!==_){var t=e.unstable_now();j=t;var n=!0;try{n=_(!0,t)}finally{n?a():(M=!1,_=null)}}else M=!1}if("function"==typeof O)a=function(){O(T)};else if("u">typeof MessageChannel){var C=new MessageChannel,N=C.port2;C.port1.onmessage=T,a=function(){N.postMessage(null)}}else a=function(){b(T,0)};function L(t){_=t,M||(M=!0,a())}function I(t,n){S=b(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,L(k))},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"):P=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,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?(x(S),S=-1):v=!0,I(E,o-a))):(t.sortIndex=l,n(c,t),g||y||(g=!0,L(k))),t},e.unstable_shouldYield=A,e.unstable_wrapCallback=function(t){var e=d;return function(){var n=d;d=e;try{return t.apply(this,arguments)}finally{d=n}}}},7433:function(t,e,n){"use strict";t.exports=n(4006)},5941:function(t,e,n){"use strict";var r=n(3571),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))}}},3571: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))}}}]);
|