@nocobase/plugin-data-visualization 2.0.0-alpha.47 → 2.0.0-alpha.48
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.
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
(self.webpackChunk_nocobase_plugin_data_visualization=self.webpackChunk_nocobase_plugin_data_visualization||[]).push([["950"],{6823:function(t,e,n){"use strict";let r,i,o,a;n.r(e),n.d(e,{Sankey:function(){return Hk},Mix:function(){return HY},Bar:function(){return G2},Stock:function(){return HS},Rose:function(){return Hd},Sunburst:function(){return HK},Histogram:function(){return Hv},Funnel:function(){return G9},DualAxes:function(){return G6},G2:function(){return tw},Liquid:function(){return HC},Column:function(){return G3},CirclePacking:function(){return Hz},Radar:function(){return Ha},Box:function(){return Hw},Scatter:function(){return Hi},Waterfall:function(){return Hg},Treemap:function(){return HR},BidirectionalBar:function(){return HH},Area:function(){return G0},WordCloud:function(){return HL},Line:function(){return Ht},RadialBar:function(){return HF},Gauge:function(){return HA},Venn:function(){return HU},Tiny:function(){return Hp},Heatmap:function(){return Hx},Bullet:function(){return HP},measureTextWidth:function(){return HQ},Base:function(){return GQ},Violin:function(){return H$},Pie:function(){return Hn}});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,B,z,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,tm={};n.r(tm),n.d(tm,{add:function(){return nT},adjoint:function(){return e6},clone:function(){return eJ},copy:function(){return e0},create:function(){return eQ},determinant:function(){return e8},equals:function(){return nR},exactEquals:function(){return nI},frob:function(){return nA},fromQuat:function(){return nv},fromQuat2:function(){return np},fromRotation:function(){return nl},fromRotationTranslation:function(){return nf},fromRotationTranslationScale:function(){return ng},fromRotationTranslationScaleOrigin:function(){return nm},fromScaling:function(){return na},fromTranslation:function(){return no},fromValues:function(){return e1},fromXRotation:function(){return ns},fromYRotation:function(){return nu},fromZRotation:function(){return nc},frustum:function(){return nb},getRotation:function(){return ny},getScaling:function(){return nd},getTranslation:function(){return nh},identity:function(){return e5},invert:function(){return e4},lookAt:function(){return n_},mul:function(){return nD},multiply:function(){return e9},multiplyScalar:function(){return nN},multiplyScalarAndAdd:function(){return nL},ortho:function(){return nM},orthoNO:function(){return nk},orthoZO:function(){return nS},perspective:function(){return nO},perspectiveFromFieldOfView:function(){return nE},perspectiveNO:function(){return nx},perspectiveZO:function(){return nw},rotate:function(){return ne},rotateX:function(){return nn},rotateY:function(){return nr},rotateZ:function(){return ni},scale:function(){return nt},set:function(){return e2},str:function(){return nj},sub:function(){return nF},subtract:function(){return nC},targetTo:function(){return nP},translate:function(){return e7},transpose:function(){return e3}});var tv={};n.r(tv),n.d(tv,{frequency:function(){return _A},id:function(){return _T},name:function(){return _C},weight:function(){return _j}});var tb={};n.r(tb),n.d(tb,{geoAlbers:function(){return Af},geoAlbersUsa:function(){return Ap},geoAzimuthalEqualArea:function(){return Ai},geoAzimuthalEqualAreaRaw:function(){return Ar},geoAzimuthalEquidistant:function(){return jK},geoAzimuthalEquidistantRaw:function(){return jX},geoConicConformal:function(){return j8},geoConicConformalRaw:function(){return j6},geoConicEqualArea:function(){return Ac},geoConicEqualAreaRaw:function(){return Au},geoConicEquidistant:function(){return An},geoConicEquidistantRaw:function(){return Ae},geoEqualEarth:function(){return jU},geoEqualEarthRaw:function(){return jV},geoEquirectangular:function(){return j0},geoEquirectangularRaw:function(){return jJ},geoGnomonic:function(){return As},geoGnomonicRaw:function(){return Al},geoIdentity:function(){return At},geoMercator:function(){return j5},geoMercatorRaw:function(){return j2},geoNaturalEarth1:function(){return jQ},geoNaturalEarth1Raw:function(){return jZ},geoOrthographic:function(){return j7},geoOrthographicRaw:function(){return j9},geoProjection:function(){return j$},geoProjectionMutator:function(){return jG},geoStereographic:function(){return Ad},geoStereographicRaw:function(){return Ah},geoTransverseMercator:function(){return Aa},geoTransverseMercatorRaw:function(){return Ao}});var tx={};n.r(tx),n.d(tx,{area:function(){return Cw},bottom:function(){return Cj},bottomLeft:function(){return Cj},bottomRight:function(){return Cj},inside:function(){return Cj},left:function(){return Cj},outside:function(){return CN},right:function(){return Cj},spider:function(){return CI},surround:function(){return CD},top:function(){return Cj},topLeft:function(){return Cj},topRight:function(){return Cj}});var tO={};n.r(tO),n.d(tO,{interpolateBlues:function(){return Lm},interpolateBrBG:function(){return NB},interpolateBuGn:function(){return N5},interpolateBuPu:function(){return N4},interpolateCividis:function(){return LP},interpolateCool:function(){return LF},interpolateCubehelixDefault:function(){return LR},interpolateGnBu:function(){return N8},interpolateGreens:function(){return Lb},interpolateGreys:function(){return LO},interpolateInferno:function(){return LX},interpolateMagma:function(){return LY},interpolateOrRd:function(){return N7},interpolateOranges:function(){return L_},interpolatePRGn:function(){return NW},interpolatePiYG:function(){return NG},interpolatePlasma:function(){return LK},interpolatePuBu:function(){return Lr},interpolatePuBuGn:function(){return Le},interpolatePuOr:function(){return NV},interpolatePuRd:function(){return Lo},interpolatePurples:function(){return LE},interpolateRainbow:function(){return Lz},interpolateRdBu:function(){return Nq},interpolateRdGy:function(){return NX},interpolateRdPu:function(){return Ll},interpolateRdYlBu:function(){return NZ},interpolateRdYlGn:function(){return NJ},interpolateReds:function(){return LM},interpolateSinebow:function(){return LH},interpolateSpectral:function(){return N1},interpolateTurbo:function(){return LV},interpolateViridis:function(){return Lq},interpolateWarm:function(){return LD},interpolateYlGn:function(){return Lf},interpolateYlGnBu:function(){return Lu},interpolateYlOrBr:function(){return Lh},interpolateYlOrRd:function(){return Ly},schemeAccent:function(){return CQ},schemeBlues:function(){return Lg},schemeBrBG:function(){return NF},schemeBuGn:function(){return N2},schemeBuPu:function(){return N3},schemeCategory10:function(){return CZ},schemeDark2:function(){return CJ},schemeGnBu:function(){return N6},schemeGreens:function(){return Lv},schemeGreys:function(){return Lx},schemeObservable10:function(){return C0},schemeOrRd:function(){return N9},schemeOranges:function(){return LS},schemePRGn:function(){return Nz},schemePaired:function(){return C1},schemePastel1:function(){return C2},schemePastel2:function(){return C5},schemePiYG:function(){return N$},schemePuBu:function(){return Ln},schemePuBuGn:function(){return Lt},schemePuOr:function(){return NH},schemePuRd:function(){return Li},schemePurples:function(){return Lw},schemeRdBu:function(){return NU},schemeRdGy:function(){return NY},schemeRdPu:function(){return La},schemeRdYlBu:function(){return NK},schemeRdYlGn:function(){return NQ},schemeReds:function(){return Lk},schemeSet1:function(){return C3},schemeSet2:function(){return C4},schemeSet3:function(){return C6},schemeSpectral:function(){return N0},schemeTableau10:function(){return C8},schemeYlGn:function(){return Lc},schemeYlGnBu:function(){return Ls},schemeYlOrBr:function(){return Lp},schemeYlOrRd:function(){return Ld}});var tw={};n.r(tw),n.d(tw,{AREA_CLASS_NAME:function(){return xm},Academy:function(){return yK},Bin:function(){return EX},BinX:function(){return EK},COMPONENT_CLASS_NAME:function(){return xy},Chart:function(){return Rg},ChartEvent:function(){return x8},Classic:function(){return yV},ClassicDark:function(){return yY},Dark:function(){return yq},DiffY:function(){return E4},DodgeX:function(){return EQ},ELEMENT_CLASS_NAME:function(){return xp},Filter:function(){return kw},FlexX:function(){return kv},Group:function(){return ku},GroupColor:function(){return kp},GroupX:function(){return kc},GroupY:function(){return kf},Jitter:function(){return E0},JitterX:function(){return E1},JitterY:function(){return E2},LABEL_CLASS_NAME:function(){return xg},LABEL_LAYER_CLASS_NAME:function(){return xf},Light:function(){return yH},LinearAxis:function(){return mG},MAIN_LAYER_CLASS_NAME:function(){return xc},MASK_CLASS_NAME:function(){return xv},MaybeDefaultX:function(){return h4},MaybeDefaultY:function(){return h9},MaybeFunctionAttribute:function(){return dc},MaybeGradient:function(){return f_},MaybeIdentityX:function(){return hp},MaybeIdentityY:function(){return hf},MaybeKey:function(){return cD},MaybeSeries:function(){return fP},MaybeSize:function(){return px},MaybeStackY:function(){return Rd},MaybeTitle:function(){return cL},MaybeTooltip:function(){return cI},MaybeTuple:function(){return p1},MaybeTupleX:function(){return hH},MaybeTupleY:function(){return hq},MaybeVisualPosition:function(){return p5},MaybeZeroPadding:function(){return p6},MaybeZeroX:function(){return tQ},MaybeZeroY:function(){return pb},MaybeZeroY1:function(){return tZ},MaybeZeroZ:function(){return Ry},NormalizeY:function(){return E9},PLOT_CLASS_NAME:function(){return xd},Pack:function(){return kb},Runtime:function(){return Rp},Sample:function(){return kO},Select:function(){return kr},SelectX:function(){return ko},SelectY:function(){return kl},Selection:function(){return uh},SortColor:function(){return km},SortX:function(){return ky},SortY:function(){return kg},StackEnter:function(){return E6},StackY:function(){return EO},SymmetryY:function(){return E3},VIEW_CLASS_NAME:function(){return xh},corelib:function(){return k3},extend:function(){return Th},geolib:function(){return AO},graphlib:function(){return _Y},plotlib:function(){return Tf},register:function(){return Ru},render:function(){return IJ},renderToMountedElement:function(){return I0},select:function(){return up},stdlib:function(){return Tp}});let tE=()=>[["cartesian"]];tE.props={};let tk=(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}))},tM=t=>{let{startAngle:e,endAngle:n,innerRadius:r,outerRadius:i}=tk(t);return[["translate",0,.5],["reflect.y"],["translate",0,-.5],["polar",e,n,r,i]]};tM.props={};let tS=()=>[["transpose"],["translate",.5,.5],["reflect.x"],["translate",-.5,-.5]];tS.props={transform:!0};let t_=(t={})=>Object.assign(Object.assign({},{startAngle:-Math.PI/2,endAngle:3*Math.PI/2,innerRadius:0,outerRadius:1}),t),tP=t=>{let{startAngle:e,endAngle:n,innerRadius:r,outerRadius:i}=t_(t);return[...tS(),...tM({startAngle:e,endAngle:n,innerRadius:r,outerRadius:i})]};tP.props={};let tj=()=>[["parallel",0,1,0,1]];tj.props={};let tA=({focusX:t=0,focusY:e=0,distortionX:n=2,distortionY:r=2,visual:i=!1})=>[["fisheye",t,e,n,r,i]];tA.props={transform:!0};let tT=(t={})=>Object.assign(Object.assign({},{startAngle:-Math.PI/2,endAngle:3*Math.PI/2,innerRadius:0,outerRadius:1}),t),tC=t=>{let{startAngle:e,endAngle:n,innerRadius:r,outerRadius:i}=tT(t);return[["transpose"],["translate",.5,.5],["reflect"],["translate",-.5,-.5],...tM({startAngle:e,endAngle:n,innerRadius:r,outerRadius:i})]};tC.props={};let tN=t=>{let{startAngle:e=-Math.PI/2,endAngle:n=3*Math.PI/2,innerRadius:r=0,outerRadius:i=1}=t;return[...tj(),...tM({startAngle:e,endAngle:n,innerRadius:r,outerRadius:i})]};tN.props={};let tL=({value:t})=>e=>e.map(()=>t);tL.props={};let tI=({value:t})=>e=>e.map(e=>e[t]);tI.props={};let tR=({value:t})=>e=>e.map(t);tR.props={};let tD=({value:t})=>()=>t;tD.props={};var tF={}.toString,tB=function(t,e){return tF.call(t)==="[object "+e+"]"},tz=function(t){return Array.isArray?Array.isArray(t):tB(t,"Array")},tW=function(t){return"object"==typeof t&&null!==t},t$=function(t){if(!tW(t)||!tB(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},tG=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&&t$(a)?(t$(e[o])||(e[o]={}),r<i?t(e[o],a,r+1,i):e[o]=n[o]):tz(a)?(e[o]=[],e[o]=e[o].concat(a)):void 0!==a&&(e[o]=a)}}(t,e[r]);return t};function tH(t,e){if(null!==t)return{type:"column",value:t,field:e}}function tV(t,e){return Object.assign(Object.assign({},tH(t,e)),{inferred:!0})}function tU(t,e){if(null!==t)return{type:"column",value:t,field:e,visual:!0}}function tq(t,e){let n=[];for(let r of t)n[r]=e;return n}function tY(t,e){let n=t[e];if(!n)return[null,null];let{value:r,field:i=null}=n;return[r,i]}function tX(t,...e){for(let n of e)if("string"!=typeof n)return[n,null];else{let[e,r]=tY(t,n);if(null!==e)return[e,r]}return[null,null]}function tK(t){return!(t instanceof Date)&&"object"==typeof t}let tZ=()=>(t,e)=>{let{encode:n}=e,{y1:r}=n;return void 0!==r?[t,e]:[t,tG({},e,{encode:{y1:tV(tq(t,0))}})]};tZ.props={};let tQ=()=>(t,e)=>{let{encode:n}=e,{x:r}=n;return void 0!==r?[t,e]:[t,tG({},e,{encode:{x:tV(tq(t,0))},scale:{x:{guide:null}}})]};function tJ(t){return function(){return t}}tQ.props={};let t0=Math.abs,t1=Math.atan2,t2=Math.cos,t5=Math.max,t3=Math.min,t4=Math.sin,t6=Math.sqrt,t8=Math.PI,t9=t8/2,t7=2*t8;function et(t){return t>=1?t9:t<=-1?-t9:Math.asin(t)}let ee=Math.PI,en=2*ee,er=en-1e-6;function ei(t){this._+=t[0];for(let e=1,n=t.length;e<n;++e)this._+=arguments[e]+t[e]}class eo{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==t?ei:function(t){let e=Math.floor(t);if(!(e>=0))throw Error(`invalid digits: ${t}`);if(e>15)return ei;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((ee-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%en+en),f>er?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>=ee)},${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 ea(){return new eo}function el(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 eo(e)}function es(t){return t.innerRadius}function eu(t){return t.outerRadius}function ec(t){return t.startAngle}function ef(t){return t.endAngle}function ep(t){return t&&t.padAngle}function eh(t,e,n,r,i,o,a){var l=t-n,s=e-r,u=(a?o:-o)/t6(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)*t6(t5(0,w*w*O-E*E)),M=(E*x-b*k)/O,S=(-E*b-x*k)/O,_=(E*x+b*k)/O,P=(-E*b+x*k)/O,j=M-g,A=S-v,T=_-g,C=P-v;return j*j+A*A>T*T+C*C&&(M=_,S=P),{cx:M,cy:S,x01:-c,y01:-f,x11:M*(i/w-1),y11:S*(i/w-1)}}function ed(){var t=es,e=eu,n=tJ(0),r=null,i=ec,o=ef,a=ep,l=null,s=el(u);function u(){var u,c,f=+t.apply(this,arguments),p=+e.apply(this,arguments),h=i.apply(this,arguments)-t9,d=o.apply(this,arguments)-t9,y=t0(d-h),g=d>h;if(l||(l=u=s()),p<f&&(c=p,p=f,f=c),p>1e-12)if(y>t7-1e-12)l.moveTo(p*t2(h),p*t4(h)),l.arc(0,0,p,h,d,!g),f>1e-12&&(l.moveTo(f*t2(d),f*t4(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,S=a.apply(this,arguments)/2,_=S>1e-12&&(r?+r.apply(this,arguments):t6(f*f+p*p)),P=t3(t0(p-f)/2,+n.apply(this,arguments)),j=P,A=P;if(_>1e-12){var T=et(_/f*t4(S)),C=et(_/p*t4(S));(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*t2(x),L=p*t4(x),I=f*t2(E),R=f*t4(E);if(P>1e-12){var D,F=p*t2(O),B=p*t4(O),z=f*t2(w),W=f*t4(w);if(y<t8)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,z,W,F,B,I,R)){var $,G=N-D[0],H=L-D[1],V=F-D[0],U=B-D[1],q=1/t4((($=(G*V+H*U)/(t6(G*G+H*H)*t6(V*V+U*U)))>1?0:$<-1?t8:Math.acos($))/2),Y=t6(D[0]*D[0]+D[1]*D[1]);j=t3(P,(f-Y)/(q-1)),A=t3(P,(p-Y)/(q+1))}else j=A=0}M>1e-12?A>1e-12?(v=eh(z,W,N,L,p,A,g),b=eh(F,B,I,R,p,A,g),l.moveTo(v.cx+v.x01,v.cy+v.y01),A<P?l.arc(v.cx,v.cy,A,t1(v.y01,v.x01),t1(b.y01,b.x01),!g):(l.arc(v.cx,v.cy,A,t1(v.y01,v.x01),t1(v.y11,v.x11),!g),l.arc(0,0,p,t1(v.cy+v.y11,v.cx+v.x11),t1(b.cy+b.y11,b.cx+b.x11),!g),l.arc(b.cx,b.cy,A,t1(b.y11,b.x11),t1(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=eh(I,R,F,B,f,-j,g),b=eh(N,L,z,W,f,-j,g),l.lineTo(v.cx+v.x01,v.cy+v.y01),j<P?l.arc(v.cx,v.cy,j,t1(v.y01,v.x01),t1(b.y01,b.x01),!g):(l.arc(v.cx,v.cy,j,t1(v.y01,v.x01),t1(v.y11,v.x11),!g),l.arc(0,0,f,t1(v.cy+v.y11,v.cx+v.x11),t1(b.cy+b.y11,b.cx+b.x11),g),l.arc(b.cx,b.cy,j,t1(b.y11,b.x11),t1(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-t8/2;return[t2(r)*n,t4(r)*n]},u.innerRadius=function(e){return arguments.length?(t="function"==typeof e?e:tJ(+e),u):t},u.outerRadius=function(t){return arguments.length?(e="function"==typeof t?t:tJ(+t),u):e},u.cornerRadius=function(t){return arguments.length?(n="function"==typeof t?t:tJ(+t),u):n},u.padRadius=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:tJ(+t),u):r},u.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:tJ(+t),u):i},u.endAngle=function(t){return arguments.length?(o="function"==typeof t?t:tJ(+t),u):o},u.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:tJ(+t),u):a},u.context=function(t){return arguments.length?(l=null==t?null:t,u):l},u}function ey(t){let{transformations:e}=t.getOptions();return e.map(([t])=>t).filter(t=>"transpose"===t).length%2!=0}function eg(t){let{transformations:e}=t.getOptions();return e.some(([t])=>"polar"===t)}function em(t){let{transformations:e}=t.getOptions();return e.some(([t])=>"reflect"===t)&&e.some(([t])=>t.startsWith("transpose"))}function ev(t){let{transformations:e}=t.getOptions();return e.some(([t])=>"helix"===t)}function eb(t){let{transformations:e}=t.getOptions();return e.some(([t])=>"parallel"===t)}function ex(t){let{transformations:e}=t.getOptions();return e.some(([t])=>"fisheye"===t)}function eO(t){return ev(t)||eg(t)}function ew(t){let{transformations:e}=t.getOptions(),[,,,n,r]=e.find(t=>"polar"===t[0]);return[+n,+r]}function eE(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]}ea.prototype=eo.prototype;var ek=function(t,e){return(ek=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 eM(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}ek(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var eS=function(){return(eS=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 e_(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 eP(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 ej(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 eA(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 eT(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 eC(){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 eN(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 eL(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 eI=n(9420),eR="undefined"!=typeof Float32Array?Float32Array:Array;function eD(){var t=new eR(3);return eR!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function eF(t){var e=new eR(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function eB(t){return Math.hypot(t[0],t[1],t[2])}function ez(t,e,n){var r=new eR(3);return r[0]=t,r[1]=e,r[2]=n,r}function eW(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function e$(t,e,n,r){return t[0]=e,t[1]=n,t[2]=r,t}function eG(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function eH(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function eV(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t}function eU(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 eq(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function eY(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 eX(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 eK(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 eZ=function(t,e){return Math.hypot(e[0]-t[0],e[1]-t[1],e[2]-t[2])};function eQ(){var t=new eR(16);return eR!=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 eJ(t){var e=new eR(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 e0(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 e1(t,e,n,r,i,o,a,l,s,u,c,f,p,h,d,y){var g=new eR(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 e2(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 e5(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 e3(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 e4(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,S=c*g-p*d,_=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*_-E*S+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*_-a*A-u*S)*T,t[5]=(n*A-i*_+o*S)*T,t[6]=(g*O-d*k-v*x)*T,t[7]=(c*k-p*O+h*x)*T,t[8]=(a*j-l*_+u*M)*T,t[9]=(r*_-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*S-a*P-s*M)*T,t[13]=(n*P-r*S+i*M)*T,t[14]=(y*x-d*w-g*b)*T,t[15]=(c*w-f*x+p*b)*T,t):null}function e6(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 e8(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 e9(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 e7(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 nt(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 ne(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,S=j*T*a+A*i,_=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*S+f*_+y*P,t[9]=s*S+p*_+g*P,t[10]=u*S+h*_+v*P,t[11]=c*S+d*_+b*P,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)}function nn(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 nr(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 ni(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 no(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 na(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 nl(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 ns(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 nu(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 nc(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 nf(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 np(t,e){var n=new eR(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),nf(t,e,n),t}function nh(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t}function nd(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 ny(t,e){var n=new eR(3);nd(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 ng(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 nm(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],S=i[1],_=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*S+L*_),t[13]=n[1]+S-(j*M+C*S+I*_),t[14]=n[2]+_-(A*M+N*S+R*_),t[15]=1,t}function nv(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 nb(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 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+r)*o,t[14]=2*i*r*o):(t[10]=-1,t[14]=-2*r),t}eD();var nO=nx;function nw(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 nE(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 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]=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 nM=nk;function nS(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 n_(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)?e5(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 nP(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 nj(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 nA(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 nT(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 nC(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 nN(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 nL(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 nI(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 nR(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],S=e[7],_=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-S)<=1e-6*Math.max(1,Math.abs(u),Math.abs(S))&&Math.abs(c-_)<=1e-6*Math.max(1,Math.abs(c),Math.abs(_))&&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 nD=e9,nF=nC;function nB(){var t=new eR(9);return eR!=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 nz(){var t=new eR(4);return eR!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0),t}function nW(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 n$(){var t=new eR(4);return eR!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}function nG(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 nH(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 nV(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 nU(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}nz();var nq=function(t,e,n,r){var i=new eR(4);return i[0]=t,i[1]=e,i[2]=n,i[3]=r,i},nY=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t},nX=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};eD(),ez(1,0,0),ez(0,1,0),n$(),n$(),nB(),Mu=new eR(2),eR!=Float32Array&&(Mu[0]=0,Mu[1]=0);var nK={}.toString,nZ=function(t,e){return nK.call(t)==="[object "+e+"]"},nQ=function(t){return nZ(t,"Number")};function nJ(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}var n0=function(t){return null==t},n1=function(t){return nZ(t,"String")},n2=function(t,e,n){return t<e?e:t>n?n:t},n5={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0};function n3(t){return Array.isArray(t)&&t.every(function(t){var e=t[0].toLowerCase();return n5[e]===t.length-1&&"achlmqstvz".includes(e)})}function n4(t){return n3(t)&&t.every(function(t){var e=t[0];return e===e.toUpperCase()})}function n6(t){return n4(t)&&t.every(function(t){var e=t[0];return"ACLMQZ".includes(e)})}var n8={x1:0,y1:0,x2:0,y2:0,x:0,y:0,qx:null,qy:null};function n9(t){for(var e=t.pathValue[t.segmentStart],n=e.toLowerCase(),r=t.data;r.length>=n5[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,n5[n]))),n5[n]););}function n7(t){return t>=48&&t<=57}function rt(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 re=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 rn(t){if(n6(t))return[].concat(t);for(var e=function(t){if(n4(t))return[].concat(t);var e=function(t){if(n3(t))return[].concat(t);var e=new re(t);for(rt(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=n5[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,rt(t),t.data=[],!o)return n9(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)),!n7(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&&n7(e)){t.err="[path-util]: Invalid path value at index "+i+', "'+r[i]+'" illegal number';return}for(;o<n&&n7(r.charCodeAt(o));)o+=1,l=!0;e=r.charCodeAt(o)}if(46===e){for(u=!0,o+=1;n7(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&&n7(r.charCodeAt(o)))for(;o<n&&n7(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),rt(t),t.index<e&&44===n.charCodeAt(t.index)&&(t.index+=1,rt(t))}if(t.index>=t.max||!((a=n.charCodeAt(t.index))>=48&&a<=57||43===a||45===a||46===a))break}n9(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=eS({},n8),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 rr(t,e,n){var r=t[0],i=t[1];return[r+(e[0]-r)*n,i+(e[1]-i)*n]}function ri(t,e,n,r,i){var o=nJ([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=rr([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 ro(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 ra(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=0,M={x:0,y:0},S=[{x:b,y:x}];v&&s<=0&&(M={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&&S.push({x:b,y:x}),d&&(O+=nJ(E,[b,x])),E=[b,x],v&&O>=s&&s>w[2]){var P=(O-s)/(O-w[2]);M={x:E[0]*(1-P)+w[0]*P,y:E[1]*(1-P)+w[1]*P}}w=[b,x,O]}return v&&s>=O&&(M={x:a,y:l}),{length:O,point:M,min:{x:Math.min.apply(null,S.map(function(t){return t.x})),y:Math.min.apply(null,S.map(function(t){return t.y}))},max:{x:Math.max.apply(null,S.map(function(t){return t.x})),y:Math.max.apply(null,S.map(function(t){return t.y}))}}}function rl(t,e,n){for(var r,i,o,a,l,s,u,c,f,p=rn(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,S=E,_=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&&(S=E)):"L"===c?(w=(r=ri(d[0],d[1],d[2],d[3],(e||0)-_)).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=0,S={x:0,y:0},_=[{x:x,y:O}];b&&u<=0&&(S={x:x,y:O});for(var P=0;P<=v;P+=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 ri(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)},S={x:p(v)*M.x-f(v)*M.y+(t+l)/2,y:f(v)*M.x+p(v)*M.y+(e+s)/2},_={x:(O.x-M.x)/y,y:(O.y-M.y)/g},P=ro({x:1,y:0},_),j=ro(_,{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+S.x,y:f(v)*T+p(v)*C+S.y}}(t,e,n,r,i,o,a,l,s,P/v)).x,O=f.y,h&&_.push({x:x,y:O}),y&&(w+=nJ(k,[x,O])),k=[x,O],b&&w>=u&&u>E[2]){var j=(w-u)/(w-E[2]);S={x:k[0]*(1-j)+E[0]*j,y:k[1]*(1-j)+E[1]*j}}E=[x,O,w]}return b&&u>=w&&(S={x:l,y:s}),{length:w,point:S,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)-_,n||{})).length,E=i.min,k=i.max,M=i.point):"C"===c?(w=(o=ra(d[0],d[1],d[2],d[3],d[4],d[5],d[6],d[7],(e||0)-_,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=0,E={x:0,y:0},k=[{x:g,y:v}];y&&a<=0&&(E={x:g,y:v});for(var M=0;M<=d;M+=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,M/d)).x,v=s.y,c&&k.push({x:g,y:v}),p&&(b+=nJ(O,[g,v])),O=[g,v],y&&b>=a&&a>x[2]){var S=(b-a)/(b-x[2]);E={x:O[0]*(1-S)+x[0]*S,y:O[1]*(1-S)+x[1]*S}}x=[g,v,b]}return y&&a>=b&&(E={x:i,y:o}),{length:b,point:E,min:{x:Math.min.apply(null,k.map(function(t){return t.x})),y:Math.min.apply(null,k.map(function(t){return t.y}))},max:{x:Math.max.apply(null,k.map(function(t){return t.x})),y:Math.max.apply(null,k.map(function(t){return t.y}))}}}(d[0],d[1],d[2],d[3],d[4],d[5],(e||0)-_,n||{})).length,E=a.min,k=a.max,M=a.point):"Z"===c&&(w=(l=ri((d=[y,g,v,b])[0],d[1],d[2],d[3],(e||0)-_)).length,E=l.min,k=l.max,M=l.point),h&&_<e&&_+w>=e&&(S=M),O.push(k),x.push(E),_+=w,y=(s="Z"!==c?f.slice(-2):[v,b])[0],g=s[1];return h&&e>=_&&(S={x:y,y:g}),{length:_,point:S,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 rs=function(t){return Array.isArray?Array.isArray(t):nZ(t,"Array")},ru=function(t){if(rs(t))return t.reduce(function(t,e){return Math.min(t,e)},t[0])},rc=function(t){if(rs(t))return t.reduce(function(t,e){return Math.max(t,e)},t[0])},rf=function(t,e){return(t%e+e)%e};function rp(t,e,n){return{x:t*Math.cos(n)-e*Math.sin(n),y:t*Math.sin(n)+e*Math.cos(n)}}var rh=function(t,e,n,r){return eN(eN([],rr([t,e],[n,r],.5),!0),[n,r,n,r],!1)};function rd(t,e){if(void 0===e&&(e=!1),n6(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=rn(t),a=eS({},n8),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,c,f=t[0],p=t.slice(1).map(Number),h=p[0],d=p[1],y=e.x1,g=e.y1,v=e.x,b=e.y;switch(!"TQ".includes(f)&&(e.qx=null,e.qy=null),f){case"M":e.x=h,e.y=d;break;case"A":return["C"].concat(function t(e,n,r,i,o,a,l,s,u,c){var f,p,h,d,y,g=e,v=n,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=rp(g,v,-k)).x,v=f.y,O=(f=rp(O,w,-k)).x,w=f.y;var S=(g-O)/2,_=(v-w)/2,P=S*S/(b*b)+_*_/(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*_*_-A*S*S)/(j*_*_+A*S*S)));d=T*b*_/x+(g+O)/2,y=-(T*x)*S/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),B=4/3*b*F,z=4/3*x*F,W=[g,v],$=[g+B*Math.sin(p),v-z*R],G=[O+B*Math.sin(h),w-z*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?rp(M[U-1],M[U],k).y:rp(M[U],M[U+1],k).x;return V}((c=[y,g].concat(p))[0],c[1],c[2],c[3],c[4],c[5],c[6],c[7],c[8],c[9]));case"Q":return e.qx=h,e.qy=d,["C"].concat((n=(c=[y,g].concat(p))[0],r=c[1],i=c[2],o=c[3],a=c[4],l=c[5],[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(rh(y,g,h,d));case"Z":if(y===v&&g===b)return["C",y,g,v,b,v,b];return["C"].concat(rh(y,g,v,b))}return t}(o[f],a);o[f]=p;var h=f;if(o[h].length>7){o[h].shift();for(var d=o[h],y=h;d.length;)l[h]="A",o.splice(y+=1,0,["C"].concat(d.splice(0,6)));o.splice(h,1)}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 ry(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?ra(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=rr(i,o,r),u=rr(o,a,r),c=rr(a,l,r),f=rr(s,u,r),p=rr(u,c,r),h=rr(f,p,r),[["C"].concat(s,f,h),["C"].concat(p,c,l)]):[t,t]:[t],{s:t,ss:d,l:g}})}function rg(t){var e,n,r;return e=0,n=0,r=0,rd(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 rm=function(t){return nZ(t,"Boolean")},rv=function(t){var e=typeof t;return null!==t&&"object"===e||"function"===e},rb=function(t){return void 0===t};function rx(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function rO(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function rw(){}var rE="\\s*([+-]?\\d+)\\s*",rk="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",rM="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",rS=/^#([0-9a-f]{3,8})$/,r_=RegExp("^rgb\\("+[rE,rE,rE]+"\\)$"),rP=RegExp("^rgb\\("+[rM,rM,rM]+"\\)$"),rj=RegExp("^rgba\\("+[rE,rE,rE,rk]+"\\)$"),rA=RegExp("^rgba\\("+[rM,rM,rM,rk]+"\\)$"),rT=RegExp("^hsl\\("+[rk,rM,rM]+"\\)$"),rC=RegExp("^hsla\\("+[rk,rM,rM,rk]+"\\)$"),rN={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 rL(){return this.rgb().formatHex()}function rI(){return this.rgb().formatRgb()}function rR(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=rS.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?rD(e):3===n?new rB(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?rF(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?rF(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=r_.exec(t))?new rB(e[1],e[2],e[3],1):(e=rP.exec(t))?new rB(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=rj.exec(t))?rF(e[1],e[2],e[3],e[4]):(e=rA.exec(t))?rF(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=rT.exec(t))?rG(e[1],e[2]/100,e[3]/100,1):(e=rC.exec(t))?rG(e[1],e[2]/100,e[3]/100,e[4]):rN.hasOwnProperty(t)?rD(rN[t]):"transparent"===t?new rB(NaN,NaN,NaN,0):null}function rD(t){return new rB(t>>16&255,t>>8&255,255&t,1)}function rF(t,e,n,r){return r<=0&&(t=e=n=NaN),new rB(t,e,n,r)}function rB(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function rz(){return"#"+r$(this.r)+r$(this.g)+r$(this.b)}function rW(){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 r$(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function rG(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new rV(t,e,n,r)}function rH(t){if(t instanceof rV)return new rV(t.h,t.s,t.l,t.opacity);if(t instanceof rw||(t=rR(t)),!t)return new rV;if(t instanceof rV)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 rV(a,l,s,t.opacity)}function rV(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function rU(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 rq(t,e,n){return void 0===n&&(n=1e-5),Math.abs(t-e)<n}function rY(t,e,n,r){var i=t-n,o=e-r;return Math.sqrt(i*i+o*o)}function rX(t,e){var n=Math.min.apply(Math,eN([],eT(t),!1)),r=Math.min.apply(Math,eN([],eT(e),!1));return{x:n,y:r,width:Math.max.apply(Math,eN([],eT(t),!1))-n,height:Math.max.apply(Math,eN([],eT(e),!1))-r}}function rK(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,eN([],eT(t.concat([h])),!1)),i.apply(void 0,eN([],eT(e.concat([h])),!1))],y=rY(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,eN([],eT(t.concat([v])),!1)),i.apply(void 0,eN([],eT(e.concat([v])),!1))],y=rY(s[0],s[1],d[0],d[1]);if(v>=0&&y<l)a=v,l=y;else{var x=[i.apply(void 0,eN([],eT(t.concat([b])),!1)),i.apply(void 0,eN([],eT(e.concat([b])),!1))],O=rY(s[0],s[1],x[0],x[1]);b<=1&&O<l?(a=b,l=O):f*=.5}}return{x:i.apply(void 0,eN([],eT(t.concat([a])),!1)),y:i.apply(void 0,eN([],eT(e.concat([a])),!1))}}rx(rw,rR,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:rL,formatHex:rL,formatHsl:function(){return rH(this).formatHsl()},formatRgb:rI,toString:rI}),rx(rB,function(t,e,n,r){var i;return 1==arguments.length?((i=t)instanceof rw||(i=rR(i)),i)?new rB((i=i.rgb()).r,i.g,i.b,i.opacity):new rB:new rB(t,e,n,null==r?1:r)},rO(rw,{brighter:function(t){return t=null==t?1.4285714285714286:Math.pow(1.4285714285714286,t),new rB(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new rB(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:rz,formatHex:rz,formatRgb:rW,toString:rW})),rx(rV,function(t,e,n,r){return 1==arguments.length?rH(t):new rV(t,e,n,null==r?1:r)},rO(rw,{brighter:function(t){return t=null==t?1.4285714285714286:Math.pow(1.4285714285714286,t),new rV(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new rV(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 rB(rU(t>=240?t-240:t+120,i,r),rU(t,i,r),rU(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 rZ(t,e,n,r,i){return{x:(1-i)*t+i*n,y:(1-i)*e+i*r}}function rQ(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 rJ(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(rq(l,0))!rq(s,0)&&(i=-u/s)>=0&&i<=1&&c.push(i);else{var f=s*s-4*l*u;rq(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 r0(t,e,n,r,i,o,a,l,s,u,c){var f=rK([t,n,i,a],[e,r,o,l],s,u,rQ,c);return rY(f.x,f.y,s,u)}function r1(t,e,n,r){var i=1-r;return i*i*t+2*r*i*e+r*r*n}function r2(t,e,n){var r=t+n-2*e;if(rq(r,0))return[.5];var i=(t-e)/r;return i<=1&&i>=0?[i]:[]}"undefined"!=typeof globalThis||("undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self&&self);var r5={exports:{}};r5.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 r3=r5.exports;(Mc=MF||(MF={})).GROUP="g",Mc.CIRCLE="circle",Mc.ELLIPSE="ellipse",Mc.IMAGE="image",Mc.RECT="rect",Mc.LINE="line",Mc.POLYLINE="polyline",Mc.POLYGON="polygon",Mc.TEXT="text",Mc.PATH="path",Mc.HTML="html",Mc.MESH="mesh",(Mf=MB||(MB={}))[Mf.ZERO=0]="ZERO",Mf[Mf.NEGATIVE_ONE=1]="NEGATIVE_ONE";var r4=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}(),r6=function(){function t(t){this.clipSpaceNearZ=MB.NEGATIVE_ONE,this.plugins=[],this.config=eS({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 r8(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function r9(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function r7(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function it(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t}function ie(t){return void 0===t?0:t>360||t<-360?t%360:t}function ir(t,e,n){return(void 0===e&&(e=0),void 0===n&&(n=0),Array.isArray(t)&&3===t.length)?eF(t):nQ(t)?ez(t,e,n):ez(t[0],t[1]||e,t[2]||n)}function ii(t){return Math.PI/180*t}function io(t){return 180/Math.PI*t}function ia(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=eT(nd(eD(),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 il(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=io(Math.atan2(n,e));return[t[6],t[7],o,a,l]}var is=eQ(),iu=eQ(),ic=nz(),ip=[eD(),eD(),eD()],ih=eD();function id(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 iy=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){r8(this.center,t),r8(this.halfExtents,e),r9(this.min,this.center,this.halfExtents),r7(this.max,this.center,this.halfExtents)},t.prototype.setMinMax=function(t,e){r7(this.center,e,t),it(this.center,this.center,.5),r9(this.halfExtents,e,t),it(this.halfExtents,this.halfExtents,.5),r8(this.min,t),r8(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,S=v+w,_=b-E,P=b+E,j=x-k,A=x+k;M<c&&(c=M),S>f&&(f=S),_<p&&(p=_),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],r9(this.min,n,r),r7(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 r8([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 r8([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}(),ig=function(){function t(t,e){this.distance=t||0,this.normal=e||ez(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 eq(t,this.normal)-this.distance},t.prototype.normalize=function(){var t=1/eB(this.normal);eV(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&&eY(n,t,e,i),o},t}();(Mp=Mz||(Mz={}))[Mp.OUTSIDE=0xffffffff]="OUTSIDE",Mp[Mp.INSIDE=0]="INSIDE",Mp[Mp.INDETERMINATE=0x7fffffff]="INDETERMINATE";var im=function(){function t(t){if(this.planes=[],t)this.planes=t;else for(var e=0;e<6;e++)this.planes.push(new ig)}return t.prototype.extractFromVPMatrix=function(t){var e=eT(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];e$(this.planes[0].normal,o-n,u-a,h-c),this.planes[0].distance=v-d,e$(this.planes[1].normal,o+n,u+a,h+c),this.planes[1].distance=v+d,e$(this.planes[2].normal,o+r,u+l,h+f),this.planes[2].distance=v+y,e$(this.planes[3].normal,o-r,u-l,h-f),this.planes[3].distance=v-y,e$(this.planes[4].normal,o-i,u-s,h-p),this.planes[4].distance=v-g,e$(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}(),iv=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}(),ib=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}(),ix="Method not implemented.",iO="Use document.documentElement instead.";(Mh=MW||(MW={}))[Mh.ORBITING=0]="ORBITING",Mh[Mh.EXPLORING=1]="EXPLORING",Mh[Mh.TRACKING=2]="TRACKING",(Md=M$||(M$={}))[Md.DEFAULT=0]="DEFAULT",Md[Md.ROTATIONAL=1]="ROTATIONAL",Md[Md.TRANSLATIONAL=2]="TRANSLATIONAL",Md[Md.CINEMATIC=3]="CINEMATIC",(My=MG||(MG={}))[My.ORTHOGRAPHIC=0]="ORTHOGRAPHIC",My[My.PERSPECTIVE=1]="PERSPECTIVE";var iw={UPDATED:"updated"},iE=function(){function t(){this.clipSpaceNearZ=MB.NEGATIVE_ONE,this.eventEmitter=new eI,this.matrix=eQ(),this.right=ez(1,0,0),this.up=ez(0,1,0),this.forward=ez(0,0,1),this.position=ez(0,0,1),this.focalPoint=ez(0,0,0),this.distanceVector=ez(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=eQ(),this.projectionMatrixInverse=eQ(),this.jitteredProjectionMatrix=void 0,this.enableUpdate=!0,this.type=MW.EXPLORING,this.trackingMode=M$.DEFAULT,this.projectionMode=MG.PERSPECTIVE,this.frustum=new im,this.orthoMatrix=eQ()}return t.prototype.isOrtho=function(){return this.projectionMode===MG.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===MW.EXPLORING?this.setWorldRotation(!0):this.setWorldRotation(!1),this._getAngles(),this.type===MW.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!==MW.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 e4(eQ(),this.matrix)},t.prototype.getWorldTransform=function(){return this.matrix},t.prototype.jitterProjectionMatrix=function(t,e){var n=no(eQ(),[t,e,0]);this.jitteredProjectionMatrix=e9(eQ(),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===MG.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===MG.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===MG.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===MG.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===MG.ORTHOGRAPHIC?this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far):this.projectionMode===MG.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=ez(a.x-r,a.y-i,0),s=eq(l,this.right)/eB(this.right),u=eq(l,this.up)/eB(this.up);return this.pan(-s,-u),this},t.prototype.setPerspective=function(t,e,n,r){this.projectionMode=MG.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(ii(.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===MB.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,nt(this.projectionMatrix,this.projectionMatrix,ez(1,-1,1)),e4(this.projectionMatrixInverse,this.projectionMatrix),this.triggerUpdate(),this},t.prototype.setOrthographic=function(t,e,n,r,i,o){this.projectionMode=MG.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===MB.NEGATIVE_ONE?nM(this.projectionMatrix,f,p,d,h,i,o):nS(this.projectionMatrix,f,p,d,h,i,o),nt(this.projectionMatrix,this.projectionMatrix,ez(1,-1,1)),e4(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=ir(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=ez(0,1,0);if(this.focalPoint=ir(t,e,n),this.trackingMode===M$.CINEMATIC){var i=eH(eD(),this.focalPoint,this.position);t=i[0],e=i[1],n=i[2];var o=io(Math.asin(e/eB(i))),a=90+io(Math.atan2(n,t)),l=eQ();nr(l,l,ii(a)),nn(l,l,ii(o)),r=eX(eD(),[0,1,0],l)}return e4(this.matrix,n_(eQ(),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=eD();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=ie(t),this.computeMatrix(),this._getAxes(),this.type===MW.ORBITING||this.type===MW.EXPLORING?this._getPosition():this.type===MW.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},t.prototype.getAzimuth=function(){return this.azimuth},t.prototype.setElevation=function(t){return this.elevation=ie(t),this.computeMatrix(),this._getAxes(),this.type===MW.ORBITING||this.type===MW.EXPLORING?this._getPosition():this.type===MW.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},t.prototype.getElevation=function(){return this.elevation},t.prototype.setRoll=function(t){return this.roll=ie(t),this.computeMatrix(),this._getAxes(),this.type===MW.ORBITING||this.type===MW.EXPLORING?this._getPosition():this.type===MW.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=nG(n$(),[0,0,1],ii(this.roll));e5(this.matrix);var e=nG(n$(),[1,0,0],ii((this.rotateWorld&&this.type!==MW.TRACKING||this.type===MW.TRACKING?1:-1)*this.elevation)),n=nG(n$(),[0,1,0],ii((this.rotateWorld&&this.type!==MW.TRACKING||this.type===MW.TRACKING?1:-1)*this.azimuth)),r=nH(n$(),n,e);r=nH(n$(),r,t);var i=nv(eQ(),r);this.type===MW.ORBITING||this.type===MW.EXPLORING?(e7(this.matrix,this.matrix,this.focalPoint),e9(this.matrix,this.matrix,i),e7(this.matrix,this.matrix,[0,0,this.distance])):this.type===MW.TRACKING&&(e7(this.matrix,this.matrix,this.position),e9(this.matrix,this.matrix,i))},t.prototype._setPosition=function(t,e,n){this.position=ir(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(){eW(this.right,ir(nW(nz(),[1,0,0,0],this.matrix))),eW(this.up,ir(nW(nz(),[0,1,0,0],this.matrix))),eW(this.forward,ir(nW(nz(),[0,0,1,0],this.matrix))),eU(this.right,this.right),eU(this.up,this.up),eU(this.forward,this.forward)},t.prototype._getAngles=function(){var t=this.distanceVector[0],e=this.distanceVector[1],n=this.distanceVector[2],r=eB(this.distanceVector);if(0===r){this.elevation=0,this.azimuth=0;return}this.type===MW.TRACKING||this.rotateWorld?(this.elevation=io(Math.asin(e/r)),this.azimuth=io(Math.atan2(-t,-n))):(this.elevation=-io(Math.asin(e/r)),this.azimuth=-io(Math.atan2(-t,-n)))},t.prototype._getPosition=function(){eW(this.position,ir(nW(nz(),[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=nB(),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],eG(this.focalPoint,this.position,this.distanceVector),this._getDistance()},t.prototype._getDistance=function(){this.distanceVector=eH(eD(),this.focalPoint,this.position),this.distance=eB(this.distanceVector),this.dollyingStep=this.distance/100},t.prototype._getOrthoMatrix=function(){if(this.projectionMode===MG.ORTHOGRAPHIC){var t=this.position,e=nG(n$(),[0,0,1],-this.roll*Math.PI/180);nm(this.orthoMatrix,e,ez((this.rright-this.left)/2-t[0],(this.top-this.bottom)/2-t[1],0),ez(this.zoom,this.zoom,1),t)}},t.prototype.triggerUpdate=function(){if(this.enableUpdate){var t=this.getViewTransform(),e=e9(eQ(),this.getPerspective(),t);this.getFrustum().extractFromVPMatrix(e),this.eventEmitter.emit(iw.UPDATED)}},t.prototype.rotate=function(t,e,n){throw Error(ix)},t.prototype.pan=function(t,e){throw Error(ix)},t.prototype.dolly=function(t){throw Error(ix)},t.prototype.createLandmark=function(t,e){throw Error(ix)},t.prototype.gotoLandmark=function(t,e){throw Error(ix)},t.prototype.cancelLandmarkAnimation=function(){throw Error(ix)},t}();function ik(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(ik.Cache||Map),n}ik.Cache=Map,(Mg=MH||(MH={}))[Mg.kUnknown=0]="kUnknown",Mg[Mg.kNumber=1]="kNumber",Mg[Mg.kPercentage=2]="kPercentage",Mg[Mg.kEms=3]="kEms",Mg[Mg.kPixels=4]="kPixels",Mg[Mg.kRems=5]="kRems",Mg[Mg.kDegrees=6]="kDegrees",Mg[Mg.kRadians=7]="kRadians",Mg[Mg.kGradians=8]="kGradians",Mg[Mg.kTurns=9]="kTurns",Mg[Mg.kMilliseconds=10]="kMilliseconds",Mg[Mg.kSeconds=11]="kSeconds",Mg[Mg.kInteger=12]="kInteger",(Mm=MV||(MV={}))[Mm.kUNumber=0]="kUNumber",Mm[Mm.kUPercent=1]="kUPercent",Mm[Mm.kULength=2]="kULength",Mm[Mm.kUAngle=3]="kUAngle",Mm[Mm.kUTime=4]="kUTime",Mm[Mm.kUOther=5]="kUOther",(Mv=MU||(MU={}))[Mv.kAll=0]="kAll",Mv[Mv.kNonNegative=1]="kNonNegative",Mv[Mv.kInteger=2]="kInteger",Mv[Mv.kNonNegativeInteger=3]="kNonNegativeInteger",Mv[Mv.kPositiveInteger=4]="kPositiveInteger",(Mb=Mq||(Mq={}))[Mb.kYes=0]="kYes",Mb[Mb.kNo=1]="kNo",(Mx=MY||(MY={}))[Mx.kYes=0]="kYes",Mx[Mx.kNo=1]="kNo";var iM=[{name:"em",unit_type:MH.kEms},{name:"px",unit_type:MH.kPixels},{name:"deg",unit_type:MH.kDegrees},{name:"rad",unit_type:MH.kRadians},{name:"grad",unit_type:MH.kGradians},{name:"ms",unit_type:MH.kMilliseconds},{name:"s",unit_type:MH.kSeconds},{name:"rem",unit_type:MH.kRems},{name:"turn",unit_type:MH.kTurns}];(MO=MX||(MX={}))[MO.kUnknownType=0]="kUnknownType",MO[MO.kUnparsedType=1]="kUnparsedType",MO[MO.kKeywordType=2]="kKeywordType",MO[MO.kUnitType=3]="kUnitType",MO[MO.kSumType=4]="kSumType",MO[MO.kProductType=5]="kProductType",MO[MO.kNegateType=6]="kNegateType",MO[MO.kInvertType=7]="kInvertType",MO[MO.kMinType=8]="kMinType",MO[MO.kMaxType=9]="kMaxType",MO[MO.kClampType=10]="kClampType",MO[MO.kTransformType=11]="kTransformType",MO[MO.kPositionType=12]="kPositionType",MO[MO.kURLImageType=13]="kURLImageType",MO[MO.kColorType=14]="kColorType",MO[MO.kUnsupportedColorType=15]="kUnsupportedColorType";var iS=function(t){return t?"number"===t?MH.kNumber:"percent"===t||"%"===t?MH.kPercentage:iM.find(function(e){return e.name===t}).unit_type:MH.kUnknown},i_=function(t){switch(t){case MH.kNumber:case MH.kInteger:return MV.kUNumber;case MH.kPercentage:return MV.kUPercent;case MH.kPixels:return MV.kULength;case MH.kMilliseconds:case MH.kSeconds:return MV.kUTime;case MH.kDegrees:case MH.kRadians:case MH.kGradians:case MH.kTurns:return MV.kUAngle;default:return MV.kUOther}},iP=function(t){switch(t){case MV.kUNumber:return MH.kNumber;case MV.kULength:return MH.kPixels;case MV.kUPercent:return MH.kPercentage;case MV.kUTime:return MH.kSeconds;case MV.kUAngle:return MH.kDegrees;default:return MH.kUnknown}},ij=function(t){var e=1;switch(t){case MH.kPixels:case MH.kDegrees:case MH.kSeconds:break;case MH.kMilliseconds:e=.001;break;case MH.kRadians:e=180/Math.PI;break;case MH.kGradians:e=.9;break;case MH.kTurns:e=360}return e},iA=function(t){switch(t){case MH.kNumber:case MH.kInteger:break;case MH.kPercentage:return"%";case MH.kEms:return"em";case MH.kRems:return"rem";case MH.kPixels:return"px";case MH.kDegrees:return"deg";case MH.kRadians:return"rad";case MH.kGradians:return"grad";case MH.kMilliseconds:return"ms";case MH.kSeconds:return"s";case MH.kTurns:return"turn"}return""},iT=function(){function t(){}return t.isAngle=function(t){return t===MH.kDegrees||t===MH.kRadians||t===MH.kGradians||t===MH.kTurns},t.isLength=function(t){return t>=MH.kEms&&t<MH.kDegrees},t.isRelativeUnit=function(t){return t===MH.kPercentage||t===MH.kEms||t===MH.kRems},t.isTime=function(t){return t===MH.kSeconds||t===MH.kMilliseconds},t.prototype.toString=function(){return this.buildCSSText(Mq.kNo,MY.kNo,"")},t.prototype.isNumericValue=function(){return this.getType()>=MX.kUnitType&&this.getType()<=MX.kClampType},t}(),iC=function(t){function e(e){var n=t.call(this)||this;return n.colorSpace=e,n}return eM(e,t),e.prototype.getType=function(){return MX.kColorType},e.prototype.to=function(t){return this},e}(iT);(Mw=MK||(MK={}))[Mw.Constant=0]="Constant",Mw[Mw.LinearGradient=1]="LinearGradient",Mw[Mw.RadialGradient=2]="RadialGradient";var iN=function(t){function e(e,n){var r=t.call(this)||this;return r.type=e,r.value=n,r}return eM(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 MX.kColorType},e}(iT),iL=function(t){function e(e){var n=t.call(this)||this;return n.value=e,n}return eM(e,t),e.prototype.clone=function(){return new e(this.value)},e.prototype.getType=function(){return MX.kKeywordType},e.prototype.buildCSSText=function(t,e,n){return n+this.value},e}(iT),iI=ik(function(t){return void 0===t&&(t=""),t.replace(/-([a-z])/g,function(t){return t[1].toUpperCase()})}),iR=function(t){return t.split("").map(function(t,e){return t.toUpperCase()===t?"".concat(0!==e?"-":"").concat(t.toLowerCase()):t}).join("")};function iD(t){return"function"==typeof t}var iF={d:{alias:"path"},strokeDasharray:{alias:"lineDash"},strokeWidth:{alias:"lineWidth"},textAnchor:{alias:"textAlign"},src:{alias:"img"}},iB=ik(function(t){var e=iI(t),n=iF[e];return(null==n?void 0:n.alias)||e}),iz=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},iW=function(t){return iP(i_(t))},i$=function(t){function e(e,n){void 0===n&&(n=MH.kNumber);var r,i=t.call(this)||this;return i.unit="string"==typeof n?iS(n):n,i.value=e,i}return eM(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 MX.kUnitType},e.prototype.convertTo=function(t){if(this.unit===t)return new e(this.value,this.unit);var n=iW(this.unit);if(n!==iW(t)||n===MH.kUnknown)return null;var r=ij(this.unit)/ij(t);return new e(this.value*r,t)},e.prototype.buildCSSText=function(t,e,n){var r;switch(this.unit){case MH.kUnknown:break;case MH.kInteger:r=Number(this.value).toFixed(0);break;case MH.kNumber:case MH.kPercentage:case MH.kEms:case MH.kRems:case MH.kPixels:case MH.kDegrees:case MH.kRadians:case MH.kGradians:case MH.kMilliseconds:case MH.kSeconds:case MH.kTurns:var i=this.value,o=iA(this.unit);if(i<-999999||i>999999){var a=iA(this.unit);r=!Number.isFinite(i)||Number.isNaN(i)?iz(i,a):i+(a||"")}else r="".concat(i).concat(o)}return n+r},e}(iT),iG=new i$(0,"px");new i$(1,"px");var iH=new i$(0,"deg"),iV=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 eM(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}(iC),iU=new iL("unset"),iq={"":iU,unset:iU,initial:new iL("initial"),inherit:new iL("inherit")},iY=function(t){return iq[t]||(iq[t]=new iL(t)),iq[t]},iX=new iV(0,0,0,0,!0),iK=new iV(0,0,0,0),iZ=ik(function(t,e,n,r){return new iV(t,e,n,r)},function(t,e,n,r){return"rgba(".concat(t,",").concat(e,",").concat(n,",").concat(r,")")}),iQ=function(t,e){return void 0===e&&(e=MH.kNumber),new i$(t,e)},iJ=new i$(50,"%");(ME=MZ||(MZ={}))[ME.Standard=0]="Standard",(Mk=MQ||(MQ={}))[Mk.ADDED=0]="ADDED",Mk[Mk.REMOVED=1]="REMOVED",Mk[Mk.Z_INDEX_CHANGED=2]="Z_INDEX_CHANGED";var i0={absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new ib(0,0,0,0)};(MM=MJ||(MJ={})).COORDINATE="<coordinate>",MM.COLOR="<color>",MM.PAINT="<paint>",MM.NUMBER="<number>",MM.ANGLE="<angle>",MM.OPACITY_VALUE="<opacity-value>",MM.SHADOW_BLUR="<shadow-blur>",MM.LENGTH="<length>",MM.PERCENTAGE="<percentage>",MM.LENGTH_PERCENTAGE="<length> | <percentage>",MM.LENGTH_PERCENTAGE_12="[<length> | <percentage>]{1,2}",MM.LENGTH_PERCENTAGE_14="[<length> | <percentage>]{1,4}",MM.LIST_OF_POINTS="<list-of-points>",MM.PATH="<path>",MM.FILTER="<filter>",MM.Z_INDEX="<z-index>",MM.OFFSET_DISTANCE="<offset-distance>",MM.DEFINED_PATH="<defined-path>",MM.MARKER="<marker>",MM.TRANSFORM="<transform>",MM.TRANSFORM_ORIGIN="<transform-origin>",MM.TEXT="<text>",MM.TEXT_TRANSFORM="<text-transform>";var i1=function(){var t={linearGradient:/^(linear\-gradient)/i,repeatingLinearGradient:/^(repeating\-linear\-gradient)/i,radialGradient:/^(radial\-gradient)/i,repeatingRadialGradient:/^(repeating\-radial\-gradient)/i,conicGradient:/^(conic\-gradient)/i,sideOrCorner:/^to (left (top|bottom)|right (top|bottom)|top (left|right)|bottom (left|right)|left|right|top|bottom)/i,extentKeywords:/^(closest\-side|closest\-corner|farthest\-side|farthest\-corner|contain|cover)/,positionKeywords:/^(left|center|right|top|bottom)/i,pixelValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))px/,percentageValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))\%/,emValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))em/,angleValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))deg/,startCall:/^\(/,endCall:/^\)/,comma:/^,/,hexColor:/^\#([0-9a-fA-F]+)/,literalColor:/^([a-zA-Z]+)/,rgbColor:/^rgb/i,rgbaColor:/^rgba/i,number:/^(([0-9]*\.[0-9]+)|([0-9]+\.?))/},e="";function n(t){throw Error(e+": "+t)}function r(){return i("linear-gradient",t.linearGradient,a)||i("repeating-linear-gradient",t.repeatingLinearGradient,a)||i("radial-gradient",t.radialGradient,l)||i("repeating-radial-gradient",t.repeatingRadialGradient,l)||i("conic-gradient",t.conicGradient,l)}function i(e,r,i){return o(r,function(r){var o=i();return o&&!b(t.comma)&&n("Missing comma before color stops"),{type:e,orientation:o,colorStops:p(h)}})}function o(e,r){var i=b(e);if(i){b(t.startCall)||n("Missing (");var o=r(i);return b(t.endCall)||n("Missing )"),o}}function a(){return v("directional",t.sideOrCorner,1)||v("angular",t.angleValue,1)}function l(){var n,r,i=s();return i&&((n=[]).push(i),r=e,b(t.comma)&&((i=s())?n.push(i):e=r)),n}function s(){var t,e,n=((t=v("shape",/^(circle)/i,0))&&(t.style=g()||u()),t||((e=v("shape",/^(ellipse)/i,0))&&(e.style=y()||u()),e));if(n)n.at=c();else{var r=u();if(r){n=r;var i=c();i&&(n.at=i)}else{var o=f();o&&(n={type:"default-radial",at:o})}}return n}function u(){return v("extent-keyword",t.extentKeywords,1)}function c(){if(v("position",/^at/,0)){var t=f();return t||n("Missing positioning value"),t}}function f(){var t={x:y(),y:y()};if(t.x||t.y)return{type:"position",value:t}}function p(e){var r=e(),i=[];if(r)for(i.push(r);b(t.comma);)(r=e())?i.push(r):n("One extra comma");return i}function h(){var e=v("hex",t.hexColor,1)||o(t.rgbaColor,function(){return{type:"rgba",value:p(d)}})||o(t.rgbColor,function(){return{type:"rgb",value:p(d)}})||v("literal",t.literalColor,0);return e||n("Expected color definition"),e.length=y(),e}function d(){return b(t.number)[1]}function y(){return v("%",t.percentageValue,1)||v("position-keyword",t.positionKeywords,1)||g()}function g(){return v("px",t.pixelValue,1)||v("em",t.emValue,1)}function v(t,e,n){var r=b(e);if(r)return{type:t,value:r[n]}}function b(t){var n=/^[\n\r\t\s]+/.exec(e);n&&x(n[0].length);var r=t.exec(e);return r&&x(r[0].length),r}function x(t){e=e.substring(t)}return function(t){var i;return e=t,i=p(r),e.length>0&&n("Invalid input not EOF"),i}}(),i2=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,i5=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,i3=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,i4=/[\d.]+:(#[^\s]+|[^\)]+\))/gi,i6={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},i8=ik(function(t){var e;return iQ("angular"===t.type?Number(t.value):i6[t.value]||0,"deg")}),i9=ik(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:iQ(e,r),cy:iQ(n,i)}}),i7=ik(function(t){if(t.indexOf("linear")>-1||t.indexOf("radial")>-1){var e;return i1(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(!n0(s)&&!n0(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:iQ(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 iN(MK.LinearGradient,{angle:n?i8(n):iH,steps:i});if("radial-gradient"===e&&(n||(n=[{type:"shape",value:"circle"}]),"shape"===n[0].type&&"circle"===n[0].value)){var o=i9(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?iY(f):iQ(f,c)}return new iN(MK.RadialGradient,{cx:a,cy:l,size:s,steps:i})}})}var n=t[0];if("("===t[1]||"("===t[2]){if("l"===n){var r=i2.exec(t);if(r){var i=(null==(e=r[2].match(i4))?void 0:e.map(function(t){return t.split(":")}))||[];return[new iN(MK.LinearGradient,{angle:iQ(parseFloat(r[1]),"deg"),steps:i.map(function(t){var e=eT(t,2),n=e[0],r=e[1];return{offset:iQ(100*Number(n),"%"),color:r}})})]}}else if("r"===n){var o=function(t){var e,n=i5.exec(t);if(n){var r=(null==(e=n[4].match(i4))?void 0:e.map(function(t){return t.split(":")}))||[];return{cx:iQ(50,"%"),cy:iQ(50,"%"),steps:r.map(function(t){var e=eT(t,2),n=e[0],r=e[1];return{offset:iQ(100*Number(n),"%"),color:r}})}}return null}(t);if(o)if(!n1(o))return[new iN(MK.RadialGradient,o)];else t=o}else if("p"===n){var a=t,l=i3.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 ot(t){return t&&!!t.image}function oe(t){return t&&!n0(t.r)&&!n0(t.g)&&!n0(t.b)}var on=ik(function(t){if(ot(t))return eS({repetition:"repeat"},t);if(n0(t)&&(t=""),"transparent"===t)return iK;"currentColor"===t&&(t="black");var e=i7(t);if(e)return e;var n=rR(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),iZ.apply(void 0,eN([],eT(r),!1))});function or(t,e){if(oe(t)&&oe(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(n2(e[n],0,255));return e[3]=n2(e[3],0,1),"rgba(".concat(e.join(","),")")}]}function oi(t,e){if(n0(e))return iQ(0,"px");if(isFinite(Number(e="".concat(e).trim().toLowerCase()))){if("px".search(t)>=0)return iQ(Number(e),"px");else if("deg".search(t)>=0)return iQ(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 iQ(Number(e.replace(RegExp("U"+t,"g"),"").replace(RegExp(r,"g"),"*0")),t)})[0]}var oo=function(t){return oi(/px/g,t)},oa=ik(oo);ik(function(t){return oi(RegExp("%","g"),t)});var ol=function(t){return nQ(t)||isFinite(Number(t))?iQ(Number(t)||0,"px"):oi(RegExp("px|%|em|rem","g"),t)},os=ik(ol),ou=function(t){return oi(RegExp("deg|rad|grad|turn","g"),t)},oc=ik(ou);function of(t){var e=0;return t.unit===MH.kDegrees?e=t.value:t.unit===MH.kRadians?e=io(Number(t.value)):t.unit===MH.kTurns&&(e=360*Number(t.value)),e}function op(t,e){var n;if(Array.isArray(t)?n=t.map(function(t){return Number(t)}):n1(t)?n=t.split(" ").map(function(t){return Number(t)}):nQ(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 oh(t){return n1(t)?t.split(" ").map(function(t){return os(t)}):t.map(function(t){return os(t.toString())})}function od(t,e,n){if(0===t.value)return 0;if(t.unit===MH.kPixels)return Number(t.value);if(t.unit===MH.kPercentage&&n){var r=n.nodeName===MF.GROUP?n.getLocalBounds():n.geometry.contentBounds;return t.value/100*r.halfExtents[e]*2}return 0}var oy=["blur","brightness","drop-shadow","contrast","grayscale","sepia","saturate","hue-rotate","invert"];function og(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,oy.indexOf(e[1])>-1&&r.push({name:e[1],params:e[2].split(" ").map(function(t){return oi(/deg|rad|grad|turn|px|%/g,t)||on(t)})}),n.lastIndex===t.length)return r;return[]}function om(t){return t.toString()}var ov=function(t){return"number"==typeof t?iQ(t):/^\s*[-+]?(\d*\.)?\d+\s*$/.test(t)?iQ(Number(t)):iQ(0)},ob=ik(ov);function ox(t,e){return[t,e,om]}function oO(t,e){return function(n,r){return[n,r,function(n){return om(n2(n,t,e))}]}}function ow(t,e){if(t.length===e.length)return[t,e,function(t){return t}]}function oE(t){return 0===t.parsedStyle.path.totalLength&&(t.parsedStyle.path.totalLength=rl(t.parsedStyle.path.absolutePath,void 0,eS(eS({},void 0),{bbox:!1,length:!0})).length),t.parsedStyle.path.totalLength}function ok(t,e){return t[0]===e[0]&&t[1]===e[1]}function oM(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 oS(t,e){return[e[0]+(e[0]-t[0]),e[1]+(e[1]-t[1])]}ik(function(t){return n1(t)?t.split(" ").map(ob):t.map(ob)});var o_=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)},oP=function(t,e,n,r,i,o,a,l){e=Math.abs(e),n=Math.abs(n);var s=ii(r=rf(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=o_({x:1,y:0},v),x=o_(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 oj(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=oP({x:t.prePoint[0],y:t.prePoint[1]},o,l,s,!!u,!!c,{x:t.currentPoint[0],y:t.currentPoint[1]},e),p=oP({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 oA(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function oT(t,e){return oA(t)*oA(e)?(t[0]*e[0]+t[1]*e[1])/(oA(t)*oA(e)):1}function oC(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(oT(t,e))}function oN(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 oL(t,e){void 0===e&&(e=t.getLocalTransform());var n,r,i,o,a,l,s,u,c,f,p=[];switch(t.nodeName){case MF.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 MF.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=oN(O,O,E,M);break;case MF.ELLIPSE:var S=t.parsedStyle,_=S.rx,P=S.ry,j=S.cx,E=void 0===j?0:j,A=S.cy,M=void 0===A?0:A;p=oN(void 0===_?0:_,void 0===P?0:P,E,M);break;case MF.POLYLINE:case MF.POLYGON:n=t.parsedStyle.points.points,r=t.nodeName===MF.POLYGON,i=n.map(function(t,e){return[0===e?"M":"L",t[0],t[1]]}),r&&i.push(["Z"]),p=i;break;case MF.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=eT(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 n2(t,0,Math.min(Math.abs(N)/2,Math.abs(I)/2))}));break;case MF.PATH:p=eN([],eT(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=ez(e[1]-u,e[2]-f,0);a&&eX(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=ez(e[1]-u,e[2]-f,0),o=ez(e[3]-u,e[4]-f,0),l=ez(e[5]-u,e[6]-f,0);a&&(eX(i,i,a),eX(o,o,a),eX(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=ez(e[6]-u,e[7]-f,0);a&&eX(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=ez(e[1]-u,e[2]-f,0),o=ez(e[3]-u,e[4]-f,0);a&&(eX(i,i,a),eX(o,o,a)),n="".concat(e[0]).concat(e[1],",").concat(e[2],",").concat(e[3],",").concat(e[4],"}")}return t+n},"")}var oI=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=rn(t)}catch(n){e=rn(""),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&&ok(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=rf(ii(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=oC([1,0],O),k=oC(O,w);return -1>=oT(O,w)&&(k=Math.PI),oT(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:ok(t,[u,c])?0:n,ry:ok(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]&&ok(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=oS(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=oS(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=oj(c,0),b=v.x,x=v.y,O=oj(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,e){for(var n=[],r=[],i=[],o=0;o<t.length;o++){var a=t[o],l=a.currentPoint,s=a.params,u=a.prePoint,c=void 0;switch(a.command){case"Q":c=function(t,e,n,r,i,o){var a=r2(t,n,i)[0],l=r2(e,r,o)[0],s=[t,i],u=[e,o];return void 0!==a&&s.push(r1(t,n,i,a)),void 0!==l&&u.push(r1(e,r,o,l)),rX(s,u)}(u[0],u[1],s[1],s[2],s[3],s[4]);break;case"C":c=function(t,e,n,r,i,o,a,l){for(var s=[t,a],u=[e,l],c=rJ(t,n,i,a),f=rJ(e,r,o,l),p=0;p<c.length;p++)s.push(rQ(t,n,i,a,c[p]));for(var p=0;p<f.length;p++)u.push(rQ(e,r,o,l,f[p]));return rX(s,u)}(u[0],u[1],s[1],s[2],s[3],s[4],s[5],s[6]);break;case"A":var f=a.arcParams;c=function(t,e,n,r,i,o,a){for(var l=Math.atan(-r/n*Math.tan(i)),s=1/0,u=-1/0,c=[o,a],f=-(2*Math.PI);f<=2*Math.PI;f+=Math.PI){var p=l+f;o<a?o<p&&p<a&&c.push(p):a<p&&p<o&&c.push(p)}for(var f=0;f<c.length;f++){var h,d=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}}(f.cx,f.cy,f.rx,f.ry,f.xRotation,f.startAngle,f.endAngle);break;default:n.push(l[0]),r.push(l[1])}c&&(a.box=c,n.push(c.x,c.x+c.width),r.push(c.y,c.y+c.height))}n=n.filter(function(t){return!Number.isNaN(t)&&t!==1/0&&t!==-1/0}),r=r.filter(function(t){return!Number.isNaN(t)&&t!==1/0&&t!==-1/0});var p=ru(n),h=ru(r),d=rc(n),y=rc(r);if(0===i.length)return{x:p,y:h,width:d-p,height:y-h};for(var o=0;o<i.length;o++){var a=i[o],l=a.currentPoint,g=void 0;l[0]===p?p-=oM(a,0).xExtra:l[0]===d&&(d+=oM(a,e).xExtra),l[1]===h?h-=oM(a,e).yExtra:l[1]===y&&(y+=oM(a,e).yExtra)}return{x:p,y:h,width:d-p,height:y-h}}(a,0),s=l.x,u=l.y,c=l.width,f=l.height;return{absolutePath:e,hasArc:n,segments:a,polygons:i,polylines:o,totalLength:0,rect:{x:Number.isFinite(s)?s:0,y:Number.isFinite(u)?u:0,width:Number.isFinite(c)?c:0,height:Number.isFinite(f)?f:0}}},oR=ik(oI);function oD(t){return n1(t)?oR(t):oI(t)}function oF(t,e,n){var r,i,o,a,l,s,u,c,f,p,h=t.curve,d=e.curve;h&&0!==h.length||(h=rd(t.absolutePath,!1),t.curve=h),d&&0!==d.length||(d=rd(e.absolutePath,!1),e.curve=d);var y=[h,d];h.length!==d.length&&(y=function t(e,n,r){var i=ry(e),o=ry(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)}(h,d));var g=rg(y[0])!==rg(y[1])?[["M"].concat((i=(r=y[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))})):y[0].map(function(t){return Array.isArray(t)?[].concat(t):t});return[g,(o=y[1],a=o.length-1,l=[],u=0,(f=(c=o.length)-1,p=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>=c&&(r-=f),o[r])})})).forEach(function(t,e){o.slice(1).forEach(function(t,n){u+=nJ(o[(e+n)%a].slice(-2),g[n%a].slice(-2))}),l[e]=u,u=0}),p[l.indexOf(Math.min.apply(null,l))]),function(t){return t}]}function oB(t,e){var n,r,i=n1(t)?t.split(" ").map(function(t){var e=eT(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+=rY(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=rY(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,eN([],eT(i.map(function(t){return t[0]})),!1)),u=Math.min.apply(Math,eN([],eT(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 oz(t,e){return[t.points,e.points,function(t){return t}]}function oW(t){return function(e){var n=0;return t.map(function(t){return null===t?e[n++]:t})}}function o$(t){return t}var oG={matrix:["NNNNNN",[null,null,0,0,null,null,0,0,0,0,1,0,null,null,0,1],o$],matrix3d:["NNNNNNNNNNNNNNNN",o$],rotate:["A"],rotatex:["A"],rotatey:["A"],rotatez:["A"],rotate3d:["NNNA"],perspective:["L"],scale:["Nn",oW([null,null,new i$(1)]),o$],scalex:["N",oW([null,new i$(1),new i$(1)]),oW([null,new i$(1)])],scaley:["N",oW([new i$(1),null,new i$(1)]),oW([new i$(1),null])],scalez:["N",oW([new i$(1),new i$(1),null])],scale3d:["NNN",o$],skew:["Aa",null,o$],skewx:["A",null,oW([null,iH])],skewy:["A",null,oW([iH,null])],translate:["Tt",oW([null,null,iG]),o$],translatex:["T",oW([null,iG,iG]),oW([null,iG])],translatey:["T",oW([iG,null,iG]),oW([iG,null])],translatez:["L",oW([iG,iG,null])],translate3d:["TTL",o$]};function oH(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=oG[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()?iH:oc(t)},N:ob,T:os,L:oa})[p.toUpperCase()](f):({a:iH,n:u[0],t:iG})[p]))return[];u.push(h)}if(r.push({t:o,d:u}),n.lastIndex===t.length)return r}return[]}function oV(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=oG[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()?iH:ou(t)},N:ov,T:ol,L:oo})[p.toUpperCase()](f):({a:iH,n:u[0],t:iG})[p]))return[];u.push(h)}if(r.push({t:o,d:u}),n.lastIndex===t.length)return r}return[]}function oU(t){switch(t.t){case"rotatex":return[1,0,0,0,0,Math.cos(i=ii(of(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=ii(of(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=ii(of(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=ii(of(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=ii(of(t.d[0]));return[1,Math.tan(ii(of(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=ii(of(t.d[0]))),1,0,0,0,0,1,0,0,0,0,1];case"skewy":return[1,Math.tan(i=ii(of(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=od(t.d[0],0,null)||0,n=od(t.d[1],0,null)||0,0,1];case"translatex":return[1,0,0,0,0,1,0,0,0,0,1,0,e=od(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=od(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=od(t.d[0],0,null)||0,1];case"translate3d":return e=od(t.d[0],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,e,n=od(t.d[1],0,null)||0,r=od(t.d[2],0,null)||0,1];case"perspective":var f=od(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 oq(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 oY(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}(is,t)||(e0(iu,is),iu[3]=0,iu[7]=0,iu[11]=0,iu[15]=1,1e-8>Math.abs(e8(iu))))){var a,l,s,u,c,f,p,h,d,y,g=is[3],v=is[7],b=is[11],x=is[12],O=is[13],w=is[14],E=is[15];if(0!==g||0!==v||0!==b){if(ic[0]=g,ic[1]=v,ic[2]=b,ic[3]=E,!e4(iu,iu))return;e3(iu,iu),nW(i,ic,iu)}else i[0]=i[1]=i[2]=0,i[3]=1;if(e[0]=x,e[1]=O,e[2]=w,a=ip,l=is,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]=eB(ip[0]),eU(ip[0],ip[0]),r[0]=eq(ip[0],ip[1]),id(ip[1],ip[1],ip[0],1,-r[0]),n[1]=eB(ip[1]),eU(ip[1],ip[1]),r[0]/=n[1],r[1]=eq(ip[0],ip[2]),id(ip[2],ip[2],ip[0],1,-r[1]),r[2]=eq(ip[1],ip[2]),id(ip[2],ip[2],ip[1],1,-r[2]),n[2]=eB(ip[2]),eU(ip[2],ip[2]),r[1]/=n[2],r[2]/=n[2],s=ip[1],u=ip[2],c=s[0],f=s[1],p=s[2],h=u[0],d=u[1],y=u[2],ih[0]=f*y-p*d,ih[1]=p*h-c*y,ih[2]=c*d-f*h,0>eq(ip[0],ih))for(var k=0;k<3;k++)n[k]*=-1,ip[k][0]*=-1,ip[k][1]*=-1,ip[k][2]*=-1;o[0]=.5*Math.sqrt(Math.max(1+ip[0][0]-ip[1][1]-ip[2][2],0)),o[1]=.5*Math.sqrt(Math.max(1-ip[0][0]+ip[1][1]-ip[2][2],0)),o[2]=.5*Math.sqrt(Math.max(1-ip[0][0]-ip[1][1]+ip[2][2],0)),o[3]=.5*Math.sqrt(Math.max(1+ip[0][0]+ip[1][1]+ip[2][2],0)),ip[2][1]>ip[1][2]&&(o[0]=-o[0]),ip[0][2]>ip[2][0]&&(o[1]=-o[1]),ip[1][0]>ip[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(oU).reduce(oq),e,n,r,i,o),[[e,n,r,o,i]]}var oX=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 oK(t){return t.toFixed(6).replace(".000000","")}function oZ(t,e){var n,r;return(t.decompositionPair!==e&&(t.decompositionPair=e,n=oY(t)),e.decompositionPair!==t&&(e.decompositionPair=t,r=oY(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=n2(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 oX(t[0],t[1],t[2],e,t[4]).map(oK).join(",")}])}function oQ(t){return t.replace(/[xy]/,"")}function oJ(t){return t.replace(/(x|y|z|3d)?$/,"3d")}function o0(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?iQ(a):iQ(a,t.unit)})})}(i)}var o=[],a=[],l=[];if(t.length!==e.length){var s=oZ(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=oG[u],d=oG[c],y=void 0;if("perspective"===u&&"perspective"===c||("matrix"===u||"matrix3d"===u)&&("matrix"===c||"matrix3d"===c)){var s=oZ([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]&&oQ(u)===oQ(c))y=oQ(u),f=h[2](f),p=d[2](p);else if(h[1]&&d[1]&&oJ(u)===oJ(c))y=oJ(u),f=h[1](f),p=d[1](p);else{var s=oZ(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=iW(t.unit),u=t.convertTo(s),c=e.convertTo(s);return u&&c?(a=u.value,l=c.value,o=iA(t.unit)):(i$.isLength(t.unit)||i$.isLength(e.unit))&&(a=od(t,i,n),l=od(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 o1=ik(function(t){if(!n1(t))return[iQ(t[0]||0,"px"),iQ(t[1]||0,"px")];if("text-anchor"===t)return[iQ(0,"px"),iQ(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:[os(o5(e[0])),os(o5(e[1]))]}),o2=function(t){if(!n1(t))return[iQ(t[0]||0,"px"),iQ(t[1]||0,"px")];if("text-anchor"===t)return[iQ(0,"px"),iQ(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:[ol(o5(e[0])),ol(o5(e[1]))]};function o5(t){return"center"===t?"50%":"left"===t||"top"===t?"0":"right"===t||"bottom"===t?"100%":t}var o3=[{n:"display",k:["none"]},{n:"opacity",int:!0,inh:!0,d:"1",syntax:MJ.OPACITY_VALUE},{n:"fillOpacity",int:!0,inh:!0,d:"1",syntax:MJ.OPACITY_VALUE},{n:"strokeOpacity",int:!0,inh:!0,d:"1",syntax:MJ.OPACITY_VALUE},{n:"fill",int:!0,k:["none"],d:"none",syntax:MJ.PAINT},{n:"fillRule",k:["nonzero","evenodd"],d:"nonzero"},{n:"stroke",int:!0,k:["none"],d:"none",syntax:MJ.PAINT,l:!0},{n:"shadowType",k:["inner","outer","both"],d:"outer",l:!0},{n:"shadowColor",int:!0,syntax:MJ.COLOR},{n:"shadowOffsetX",int:!0,l:!0,d:"0",syntax:MJ.LENGTH_PERCENTAGE},{n:"shadowOffsetY",int:!0,l:!0,d:"0",syntax:MJ.LENGTH_PERCENTAGE},{n:"shadowBlur",int:!0,l:!0,d:"0",syntax:MJ.SHADOW_BLUR},{n:"lineWidth",int:!0,inh:!0,d:"1",l:!0,a:["strokeWidth"],syntax:MJ.LENGTH_PERCENTAGE},{n:"increasedLineWidthForHitTesting",inh:!0,d:"0",l:!0,syntax:MJ.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:MJ.LENGTH_PERCENTAGE_12},{n:"lineDashOffset",int:!0,inh:!0,d:"0",a:["strokeDashoffset"],syntax:MJ.LENGTH_PERCENTAGE},{n:"offsetPath",syntax:MJ.DEFINED_PATH},{n:"offsetDistance",int:!0,syntax:MJ.OFFSET_DISTANCE},{n:"dx",int:!0,l:!0,d:"0",syntax:MJ.LENGTH_PERCENTAGE},{n:"dy",int:!0,l:!0,d:"0",syntax:MJ.LENGTH_PERCENTAGE},{n:"zIndex",ind:!0,int:!0,d:"0",k:["auto"],syntax:MJ.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:MJ.FILTER},{n:"clipPath",syntax:MJ.DEFINED_PATH},{n:"textPath",syntax:MJ.DEFINED_PATH},{n:"textPathSide",k:["left","right"],d:"left"},{n:"textPathStartOffset",l:!0,d:"0",syntax:MJ.LENGTH_PERCENTAGE},{n:"transform",p:100,int:!0,k:["none"],d:"none",syntax:MJ.TRANSFORM},{n:"transformOrigin",p:100,d:function(t){return t===MF.CIRCLE||t===MF.ELLIPSE?"center":t===MF.TEXT?"text-anchor":"left top"},l:!0,syntax:MJ.TRANSFORM_ORIGIN},{n:"anchor",p:99,d:function(t){return t===MF.CIRCLE||t===MF.ELLIPSE?"0.5 0.5":"0 0"},l:!0,syntax:MJ.LENGTH_PERCENTAGE_12},{n:"cx",int:!0,d:"0",syntax:MJ.COORDINATE},{n:"cy",int:!0,d:"0",syntax:MJ.COORDINATE},{n:"cz",int:!0,d:"0",syntax:MJ.COORDINATE},{n:"r",int:!0,l:!0,d:"0",syntax:MJ.LENGTH_PERCENTAGE},{n:"rx",int:!0,l:!0,d:"0",syntax:MJ.LENGTH_PERCENTAGE},{n:"ry",int:!0,l:!0,d:"0",syntax:MJ.LENGTH_PERCENTAGE},{n:"x",int:!0,d:"0",syntax:MJ.COORDINATE},{n:"y",int:!0,d:"0",syntax:MJ.COORDINATE},{n:"z",int:!0,d:"0",syntax:MJ.COORDINATE},{n:"width",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:MJ.LENGTH_PERCENTAGE},{n:"height",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:MJ.LENGTH_PERCENTAGE},{n:"radius",int:!0,l:!0,d:"0",syntax:MJ.LENGTH_PERCENTAGE_14},{n:"x1",int:!0,l:!0,syntax:MJ.COORDINATE},{n:"y1",int:!0,l:!0,syntax:MJ.COORDINATE},{n:"z1",int:!0,l:!0,syntax:MJ.COORDINATE},{n:"x2",int:!0,l:!0,syntax:MJ.COORDINATE},{n:"y2",int:!0,l:!0,syntax:MJ.COORDINATE},{n:"z2",int:!0,l:!0,syntax:MJ.COORDINATE},{n:"path",int:!0,l:!0,d:"",a:["d"],syntax:MJ.PATH,p:50},{n:"points",int:!0,l:!0,syntax:MJ.LIST_OF_POINTS,p:50},{n:"text",l:!0,d:"",syntax:MJ.TEXT,p:50},{n:"textTransform",l:!0,inh:!0,k:["capitalize","uppercase","lowercase","none"],d:"none",syntax:MJ.TEXT_TRANSFORM,p:51},{n:"font",l:!0},{n:"fontSize",int:!0,inh:!0,d:"16px",l:!0,syntax:MJ.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:MJ.LENGTH,int:!0,d:"0"},{n:"letterSpacing",l:!0,syntax:MJ.LENGTH,int:!0,d:"0"},{n:"miterLimit",l:!0,syntax:MJ.NUMBER,d:function(t){return t===MF.PATH||t===MF.POLYGON||t===MF.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:MJ.MARKER},{n:"markerEnd",syntax:MJ.MARKER},{n:"markerMid",syntax:MJ.MARKER},{n:"markerStartOffset",syntax:MJ.LENGTH,l:!0,int:!0,d:"0"},{n:"markerEndOffset",syntax:MJ.LENGTH,l:!0,int:!0,d:"0"}],o4=o3.filter(function(t){return!!t.l}).map(function(t){return t.n}),o6={},o8=new WeakMap,o9=function(t,e){var n=o8.get(t);return!n||0===n.length||n.includes(e)},o7=function(){function t(t){var e=this;this.runtime=t,o3.forEach(function(t){e.registerMetadata(t)})}return t.prototype.registerMetadata=function(t){eN([t.n],eT(t.a||[]),!1).forEach(function(e){o6[e]=t})},t.prototype.unregisterMetadata=function(t){delete o6[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<o4.length;s++)if(o4[s]in e){l=!0;break}}e.fill&&(t.parsedStyle.fill=on(e.fill)),e.stroke&&(t.parsedStyle.stroke=on(e.stroke)),e.shadowColor&&(t.parsedStyle.shadowColor=on(e.shadowColor)),e.filter&&(t.parsedStyle.filter=og(e.filter)),n0(e.radius)||(t.parsedStyle.radius=op(e.radius,4)),n0(e.lineDash)||(t.parsedStyle.lineDash=op(e.lineDash,2)),e.points&&(t.parsedStyle.points=oB(e.points,t)),""===e.path&&(t.parsedStyle.path=eS({},i0)),e.path&&(t.parsedStyle.path=oD(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=op(e.anchor,2)),e.transform&&(t.parsedStyle.transform=oH(e.transform)),e.transformOrigin&&(t.parsedStyle.transformOrigin=o1(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!==MF.CIRCLE&&t.nodeName!==MF.ELLIPSE||n0(e.cx)&&n0(e.cy))&&(t.nodeName!==MF.RECT&&t.nodeName!==MF.IMAGE&&t.nodeName!==MF.GROUP&&t.nodeName!==MF.HTML&&t.nodeName!==MF.TEXT&&t.nodeName!==MF.MESH||n0(e.x)&&n0(e.y)&&n0(e.z))&&(t.nodeName!==MF.LINE||n0(e.x1)&&n0(e.y1)&&n0(e.z1)&&n0(e.x2)&&n0(e.y2)&&n0(e.z2))||this.runtime.CSSPropertySyntaxFactory["<coordinate>"].postProcessor(t,i),n0(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),n0(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=o6[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=o6[t],o=e;if((""===e||n0(e))&&(e="unset"),"unset"===e||"initial"===e||"inherit"===e)o=iY(e);else if(i){var a=i.k,l=i.syntax,s=l&&this.getPropertySyntax(l);a&&a.indexOf(e)>-1?o=iY(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=o6[t],o="g-root"===n.id,a=e;if(i){var l=i.syntax,s=i.inh,u=i.d;if(e instanceof iL){var c=e.value;if("unset"===c&&(c=s&&!o?"inherit":"initial"),"initial"===c)n0(u)||(e=this.parseProperty(t,iD(u)?u(n.nodeName):u,n,r));else if("inherit"===c){var f=this.tryToResolveProperty(n,t,{inherited:!0});return n0(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 iL?e.value:e}return a},t.prototype.postProcessProperty=function(t,e,n){var r=o6[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=o8.get(t);n||(o8.set(t,[]),n=o8.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&&o9(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=o8.get(t);if(e&&e.length){var n={};e.forEach(function(e){n[e]=t.attributes[e]}),this.processProperties(t,n),o8.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 iy),r.renderBounds||(r.renderBounds=new iy);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===MF.TEXT?delete i.anchor:e===MF.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===MF.POLYLINE||e===MF.POLYGON||e===MF.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,S=M.min,_=M.max,P=i.shadowBlur,j=i.shadowOffsetX,A=i.shadowOffsetY,T=P||0,C=j||0,N=A||0,L=S[0]-T+C,I=_[0]+T+C,R=S[1]-T+N,D=_[1]+T+N;S[0]=Math.min(S[0],L),_[0]=Math.max(_[0],I),S[1]=Math.min(S[1],R),_[1]=Math.max(_[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,r7(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,B=l<0,z=(F?-1:1)*(x?od(x[0],0,t):0),W=(B?-1:1)*(x?od(x[1],1,t):0);z-=(F?-1:1)*(O&&O[0]||0)*r.contentBounds.halfExtents[0]*2,W-=(B?-1:1)*(O&&O[1]||0)*r.contentBounds.halfExtents[1]*2,t.setOrigin(z,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===MF.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===MF.CIRCLE&&t.style.rawR&&(t.style.r=t.style.rawR,delete t.style.rawR))},t.prototype.isPropertyInheritable=function(t){var e=o6[t];return!!e&&e.inh},t}(),at=function(){function t(){this.parser=oc,this.parserUnmemoize=ou,this.parserWithCSSDisabled=null,this.mixer=ox}return t.prototype.calculator=function(t,e,n,r){return of(n)},t}(),ae=function(){function t(){}return t.prototype.calculator=function(t,e,n,r,i){return n instanceof iL&&(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}(),an=function(){function t(){this.parser=on,this.parserWithCSSDisabled=on,this.mixer=or}return t.prototype.calculator=function(t,e,n,r){return n instanceof iL?"none"===n.value?iX:iK:n},t}(),ar=function(){function t(){this.parser=og}return t.prototype.calculator=function(t,e,n){return n instanceof iL?[]:n},t}();function ai(t){var e=t.parsedStyle.fontSize;return n0(e)?null:e}var ao=function(){function t(){this.parser=os,this.parserUnmemoize=ol,this.parserWithCSSDisabled=null,this.mixer=ox}return t.prototype.calculator=function(t,e,n,r,i){if(nQ(n))return n;if(!i$.isRelativeUnit(n.unit))return n.value;var o,a=i.styleValueRegistry;if(n.unit===MH.kPercentage)return 0;if(n.unit===MH.kEms){if(r.parentNode){var l=ai(r.parentNode);if(l)return l*n.value;a.addUnresolveProperty(r,t)}else a.addUnresolveProperty(r,t);return 0}if(n.unit===MH.kRems){if(null==(o=null==r?void 0:r.ownerDocument)?void 0:o.documentElement){var l=ai(r.ownerDocument.documentElement);if(l)return l*n.value;a.addUnresolveProperty(r,t)}else a.addUnresolveProperty(r,t);return 0}},t}(),aa=function(){function t(){this.mixer=ow}return t.prototype.parser=function(t){var e,n=oh(nQ(t)?[t]:t);return 1===n.length?[n[0],n[0]]:[n[0],n[1]]},t.prototype.calculator=function(t,e,n){return n.map(function(t){return t.value})},t}(),al=function(){function t(){this.mixer=ow}return t.prototype.parser=function(t){var e,n=oh(nQ(t)?[t]:t);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]]},t.prototype.calculator=function(t,e,n){return n.map(function(t){return t.value})},t}(),as=eQ();function au(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||[iG,iG];e.translateLocal(l[0].value,l[1].value,0)}else if("translatex"===i){var l=o||[iG];e.translateLocal(l[0].value,0,0)}else if("translatey"===i){var l=o||[iG];e.translateLocal(0,l[0].value,0)}else if("translatez"===i){var l=o||[iG];e.translateLocal(0,0,l[0].value)}else if("translate3d"===i){var l=o||[iG,iG,iG];e.translateLocal(l[0].value,l[1].value,l[2].value)}else if("rotate"===i){var s=o||[iH];e.rotateLocal(0,0,of(s[0]))}else if("rotatex"===i){var s=o||[iH];e.rotateLocal(of(s[0]),0,0)}else if("rotatey"===i){var s=o||[iH];e.rotateLocal(0,of(s[0]),0)}else if("rotatez"===i){var s=o||[iH];e.rotateLocal(0,0,of(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(ii(u[0]),ii(u[1]))}else if("skewx"===i){var u=(null==o?void 0:o.map(function(t){return t.value}))||[0];e.setLocalSkew(ii(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],ii(u[0]))}else if("matrix"===i){var c=eT(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(e2(as,f,p,0,0,h,d,0,0,0,0,1,0,y+n,g+r,0,1))}else"matrix3d"===i&&(e2.apply(tm,eN([as],eT(o.map(function(t){return t.value})),!1)),as[12]+=n,as[13]+=r,e.setLocalTransform(as))}),e.getLocalTransform()}var ac=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return eM(e,t),e.prototype.postProcessor=function(t,e){switch(t.nodeName){case MF.CIRCLE:case MF.ELLIPSE:var n,r,i,o=t.parsedStyle,a=o.cx,l=o.cy,s=o.cz;n0(a)||(n=a),n0(l)||(r=l),n0(s)||(i=s);break;case MF.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 MF.RECT:case MF.IMAGE:case MF.GROUP:case MF.HTML:case MF.TEXT:case MF.MESH:n0(t.parsedStyle.x)||(n=t.parsedStyle.x),n0(t.parsedStyle.y)||(r=t.parsedStyle.y),n0(t.parsedStyle.z)||(i=t.parsedStyle.z)}if(t.nodeName!==MF.PATH&&t.nodeName!==MF.POLYLINE&&t.nodeName!==MF.POLYGON&&(t.parsedStyle.defX=n||0,t.parsedStyle.defY=r||0),(!n0(n)||!n0(r)||!n0(i))&&-1===e.indexOf("transform")){var h=t.parsedStyle.transform;if(h&&h.length)au(h,t);else{var d=eT(t.getLocalPosition(),3),y=d[0],g=d[1],v=d[2];t.setLocalPosition(n0(n)?y:n,n0(r)?g:r,n0(i)?v:i)}}},e}(ao),af=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){n instanceof iL&&(n=null);var i=null==n?void 0:n.cloneNode(!0);return i&&(i.style.isMarker=!0),i},t}(),ap=function(){function t(){this.mixer=ox,this.parser=ob,this.parserUnmemoize=ov,this.parserWithCSSDisabled=null}return t.prototype.calculator=function(t,e,n){return n.value},t}(),ah=function(){function t(){this.parser=ob,this.parserUnmemoize=ov,this.parserWithCSSDisabled=null,this.mixer=oO(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===MF.LINE||i===MF.PATH||i===MF.POLYLINE){var o=n.getPoint(r);o&&(t.parsedStyle.defX=o.x,t.parsedStyle.defY=o.y,t.setLocalPosition(o.x,o.y))}}},t}(),ad=function(){function t(){this.parser=ob,this.parserUnmemoize=ov,this.parserWithCSSDisabled=null,this.mixer=oO(0,1)}return t.prototype.calculator=function(t,e,n){return n.value},t}(),ay=function(){function t(){this.parser=oD,this.parserWithCSSDisabled=oD,this.mixer=oF}return t.prototype.calculator=function(t,e,n){return n instanceof iL&&"unset"===n.value?{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new ib(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===MF.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}(),ag=function(){function t(){this.parser=oB,this.mixer=oz}return t.prototype.postProcessor=function(t,e){if((t.nodeName===MF.POLYGON||t.nodeName===MF.POLYLINE)&&-1===e.indexOf("transform")){var n=t.parsedStyle,r=n.defX,i=n.defY;t.setLocalPosition(r,i)}},t}(),am=function(t){function e(){var e=t.apply(this,eN([],eT(arguments),!1))||this;return e.mixer=oO(0,1/0),e}return eM(e,t),e}(ao),av=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){if(n instanceof iL)if("unset"===n.value)return"";else return n.value;return"".concat(n)},t.prototype.postProcessor=function(t){t.nodeValue="".concat(t.parsedStyle.text)||""},t}(),ab=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}(),ax={},aO=0,aw="undefined"!=typeof window&&void 0!==window.document;function aE(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 ak(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 aM(t,e){if(aw)return document.defaultView.getComputedStyle(t,null).getPropertyValue(e)}var aS={touchstart:"pointerdown",touchend:"pointerup",touchendoutside:"pointerupoutside",touchmove:"pointermove",touchcancel:"pointercancel"},a_="object"==typeof performance&&performance.now?performance:Date;function aP(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 aj=1,aA="object"==typeof self&&self.self==self?self:"object"==typeof n.g&&n.g.global==n.g?n.g:{},aT=Date.now(),aC={},aN=Date.now(),aL=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function");var e=Date.now(),n=e-aN,r=aj++;return aC[r]=t,Object.keys(aC).length>1||setTimeout(function(){aN=e;var t=aC;aC={},Object.keys(t).forEach(function(e){return t[e](aA.performance&&"function"==typeof aA.performance.now?aA.performance.now():Date.now()-aT)})},n>16?0:16-n),r},aI=function(t){return"string"!=typeof t?aL:""===t?aA.requestAnimationFrame:aA[t+"RequestAnimationFrame"]},aR=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!!aI(t)}),aD=aI(aR),aF="string"!=typeof aR?function(t){delete aC[t]}:""===aR?aA.cancelAnimationFrame:aA[aR+"CancelAnimationFrame"]||aA[aR+"CancelRequestAnimationFrame"];aA.requestAnimationFrame=aD,aA.cancelAnimationFrame=aF;var aB=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,eN([],eT(t),!1))}))},t}(),az=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 eP(this,void 0,void 0,function(){var e,n,r;return ej(this,function(i){switch(i.label){case 0:if(!this.callbacks.length)return[3,6];return[4,(r=this.callbacks)[0].apply(r,eN([],eT(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}(),aW=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}(),a$=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}(),aG=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],aH=/([\"\'])[^\'\"]+\1/,aV=function(){function t(){this.parser=oH,this.parserUnmemoize=oV,this.parserWithCSSDisabled=oV,this.mixer=o0}return t.prototype.calculator=function(t,e,n,r){return n instanceof iL?[]:n},t.prototype.postProcessor=function(t){au(t.parsedStyle.transform,t)},t}(),aU=function(){function t(){this.parser=ob,this.parserUnmemoize=ov}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=MQ.Z_INDEX_CHANGED)}},t}(),aq=function(){function t(){}return t.prototype.update=function(t,e){var n=t.r;return{width:2*n,height:2*n}},t}(),aY=function(){function t(){}return t.prototype.update=function(t,e){return{width:2*t.rx,height:2*t.ry}},t}(),aX=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}(),aK=function(){function t(){}return t.prototype.update=function(t){var e=t.path.rect;return{width:e.width,height:e.height}},t}(),aZ=function(){function t(){}return t.prototype.update=function(t){if(t.points&&rs(t.points.points)){var e=t.points.points,n=Math.min.apply(Math,eN([],eT(e.map(function(t){return t[0]})),!1)),r=Math.max.apply(Math,eN([],eT(e.map(function(t){return t[0]})),!1)),i=Math.min.apply(Math,eN([],eT(e.map(function(t){return t[1]})),!1));return{width:r-n,height:Math.max.apply(Math,eN([],eT(e.map(function(t){return t[1]})),!1))-i}}return{width:0,height:0}},t}(),aQ=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&&!n1(n)&&(o||(t.width=o=n.width),a||(t.height=a=n.height)),{width:o,height:a}},t}(),aJ=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&&!n0(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}(),a0=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 iv,this.page=new iv,this.canvas=new iv,this.viewport=new iv,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(ix)},t}(),a1=function(t){function e(){var e=t.apply(this,eN([],eT(arguments),!1))||this;return e.client=new iv,e.movement=new iv,e.offset=new iv,e.global=new iv,e.screen=new iv,e}return eM(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(ix)},e}(a0),a2=function(t){function e(){var e=t.apply(this,eN([],eT(arguments),!1))||this;return e.width=0,e.height=0,e.isPrimary=!1,e}return eM(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}(a1),a5=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return eM(e,t),e.prototype.clone=function(){return this.manager.cloneWheelEvent(this)},e}(a1),a3=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 eM(e,t),e}(a0),a4=function(){function t(){this.emitter=new eI}return t.prototype.on=function(t,e,n){return this.addEventListener(t,e,n),this},t.prototype.addEventListener=function(t,e,n){var r=rm(n)&&n||rv(n)&&n.capture,i=rv(n)&&n.once,o=iD(e)?void 0:e,a=!1,l="";if(t.indexOf(":")>-1){var s=eT(t.split(":"),2),u=s[0];t=s[1],l=u,a=!0}if(t=r?"".concat(t,"capture"):t,e=iD(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,eN([],eT(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=rm(n)&&n||rv(n)&&n.capture,i=iD(e)?void 0:e;return t=r?"".concat(t,"capture"):t,e=iD(e)?e:null==e?void 0:e.handleEvent,this.emitter.off(t,e,i),this},t.prototype.emit=function(t,e){this.dispatchEvent(new a3(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}(),a6=function(t){function e(){var e=t.apply(this,eN([],eT(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 eM(e,t),e.isNode=function(t){return!!t.childNodes},Object.defineProperty(e.prototype,"textContent",{get:function(){var t,e,n="";this.nodeName===MF.TEXT&&(n+=this.style.text);try{for(var r=eA(this.childNodes),i=r.next();!i.done;i=r.next()){var o=i.value;o.nodeName===MF.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===MF.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(ix)},e.prototype.lookupNamespaceURI=function(t){throw Error(ix)},e.prototype.lookupPrefix=function(t){throw Error(ix)},e.prototype.normalize=function(){throw Error(ix)},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}(a4),a8=function(){function t(t,e){var n=this;this.globalRuntime=t,this.context=e,this.emitter=new eI,this.nativeHTMLMap=new WeakMap,this.cursor="default",this.mappingTable={},this.mappingState={trackingData:{}},this.eventPool=new Map,this.tmpMatrix=eQ(),this.tmpVec3=eD(),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=a_.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")}a6.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"),a6.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&&a6.isNode(o)&&o.parentNode;f&&f!==(a6.isNode(n.rootTarget)&&n.rootTarget.parentNode)&&f!==e.target;)f=f.parentNode;if(!f||f===(a6.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!==(a6.isNode(n.rootTarget)&&n.rootTarget.parentNode);)p.currentTarget=p.target,n.notifyTarget(p),r&&n.notifyTarget(p,"mouseenter"),a6.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!==(a6.isNode(n.rootTarget)&&n.rootTarget.parentNode);)a.currentTarget=a.target,n.notifyTarget(a),r&&n.notifyTarget(a,"mouseleave"),a6.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!==(a6.isNode(n.rootTarget)&&n.rootTarget.parentNode);)o.currentTarget=o.target,n.notifyTarget(o),i&&n.notifyTarget(o,"mouseenter"),a6.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"),a6.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 iv(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 iv(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=e9(this.tmpMatrix,s,l),c=e$(this.tmpVec3,e/o*2-1,(1-n/a)*2-1,0);return eX(c,c,u),new iv(c[0],c[1])},t.prototype.canvas2Viewport=function(t){var e=this.rootTarget.defaultView.getCamera(),n=e.getPerspective(),r=e.getViewTransform(),i=e9(this.tmpMatrix,n,r),o=e$(this.tmpVec3,t.x,t.y,0);eX(this.tmpVec3,this.tmpVec3,i);var a=this.context.config,l=a.width,s=a.height;return new iv((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++)a6.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=eA(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(a2);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(a5);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(a5);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(a2);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=a_.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||a6.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=a6.isNode(e)&&e.parentNode}},t}(),a9=function(){function t(){}return t.prototype.getOrCreateCanvas=function(t,e){if(this.canvas)return this.canvas;if(t||lf.offscreenCanvas)this.canvas=t||lf.offscreenCanvas,this.context=this.canvas.getContext("2d",eS({willReadFrequently:!0},e));else try{this.canvas=new window.OffscreenCanvas(0,0),this.context=this.canvas.getContext("2d",eS({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",eS({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}();(MS=M0||(M0={}))[MS.CAMERA_CHANGED=0]="CAMERA_CHANGED",MS[MS.DISPLAY_OBJECT_CHANGED=1]="DISPLAY_OBJECT_CHANGED",MS[MS.NONE=2]="NONE";var a7=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 aW,initAsync:new aB,dirtycheck:new a$,cull:new a$,beginFrame:new aW,beforeRender:new aW,render:new aW,afterRender:new aW,endFrame:new aW,destroy:new aW,pick:new az,pickSync:new a$,pointerDown:new aW,pointerUp:new aW,pointerMove:new aW,pointerOut:new aW,pointerOver:new aW,pointerWheel:new aW,pointerCancel:new aW,click:new aW}}return t.prototype.init=function(t){var e=this,n=eS(eS({},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(M0.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(M0.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!==MQ.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>aE(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(aE)},t.prototype.destroy=function(){this.inited=!1,this.hooks.destroy.call(),this.globalRuntime.sceneGraphService.clearPendingEvents()},t.prototype.dirtify=function(){this.context.renderingContext.renderReasons.add(M0.DISPLAY_OBJECT_CHANGED)},t}(),lt=/\[\s*(.*)=(.*)\s*\]/,le=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(lt),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 n0(n)?"":n.toString?n.toString():""},t}(),ln=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 eM(e,t),e.ADDITION=2,e.MODIFICATION=1,e.REMOVAL=3,e}(a0);function lr(t){var e=t.renderable;e&&(e.renderBoundsDirty=!0,e.boundsDirty=!0)}(M_=M1||(M1={})).REPARENT="reparent",M_.DESTROY="destroy",M_.ATTR_MODIFIED="DOMAttrModified",M_.INSERTED="DOMNodeInserted",M_.REMOVED="removed",M_.MOUNTED="DOMNodeInsertedIntoDocument",M_.UNMOUNTED="DOMNodeRemovedFromDocument",M_.BOUNDS_CHANGED="bounds-changed",M_.CULLED="culled";var li=new ln(M1.REPARENT,null,"","","",0,"",""),lo=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 a3(M1.BOUNDS_CHANGED),this.rotate=(e=n$(),function(t,n,r,i){void 0===r&&(r=0),void 0===i&&(i=0),"number"==typeof n&&(n=ez(n,r,i));var o=t.transformable;if(null!==t.parentNode&&t.parentNode.transformable){var a=n$();nU(a,n[0],n[1],n[2]);var l=h.getRotation(t);nY(e,h.getRotation(t.parentNode)),nV(e,e),nH(a,e,a),nH(o.localRotation,a,l),nX(o.localRotation,o.localRotation),h.dirtifyLocal(t,o)}else h.rotateLocal(t,n)}),this.rotateLocal=(n=n$(),function(t,e,r,i){void 0===r&&(r=0),void 0===i&&(i=0),"number"==typeof e&&(e=ez(e,r,i));var o=t.transformable;nU(n,e[0],e[1],e[2]),nH(o.localRotation,o.localRotation,n),h.dirtifyLocal(t,o)}),this.setEulerAngles=(r=n$(),function(t,e,n,i){void 0===n&&(n=0),void 0===i&&(i=0),"number"==typeof e&&(e=ez(e,n,i));var o=t.transformable;if(null!==t.parentNode&&t.parentNode.transformable){nU(o.localRotation,e[0],e[1],e[2]);var a=h.getRotation(t.parentNode);nY(r,nV(n$(),a)),nH(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=ez(e,n,r));var i,o,a,l,s,u,c,f,p,d,y,g,v,b,x,O,w,E=t.transformable;eK(e,eD())||(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,eG(E.localPosition,E.localPosition,e),h.dirtifyLocal(t,E))},this.setPosition=(i=eQ(),o=eD(),function(t,e){var n=t.transformable;o[0]=e[0],o[1]=e[1],o[2]=e[2]||0,eK(h.getPosition(t),o)||(eW(n.position,o),null!==t.parentNode&&t.parentNode.transformable?(e0(i,t.parentNode.transformable.worldTransform),e4(i,i),eX(n.localPosition,o,i)):eW(n.localPosition,o),h.dirtifyLocal(t,n))}),this.setLocalPosition=(a=eD(),function(t,e){var n=t.transformable;a[0]=e[0],a[1]=e[1],a[2]=e[2]||0,eK(n.localPosition,a)||(eW(n.localPosition,a),h.dirtifyLocal(t,n))}),this.translate=(l=eD(),s=eD(),u=eD(),function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=e$(s,e,n,r)),eK(e,l)||(eG(u,h.getPosition(t),e),h.setPosition(t,u))}),this.setRotation=function(){var t=n$();return function(e,n,r,i,o){var a=e.transformable;"number"==typeof n&&(n=nq(n,r,i,o)),null!==e.parentNode&&e.parentNode.transformable?(nY(t,h.getRotation(e.parentNode)),nV(t,t),nH(a.localRotation,t,n),nX(a.localRotation,a.localRotation),h.dirtifyLocal(e,a)):h.setLocalRotation(e,n)}},this.displayObjectDependencyMap=new WeakMap,this.calcLocalTransform=(c=eQ(),f=eD(),p=nq(0,0,0,1),function(t){if(0!==t.localSkew[0]||0!==t.localSkew[1]){if(nm(t.localTransform,t.localRotation,t.localPosition,ez(1,1,1),t.origin),0!==t.localSkew[0]||0!==t.localSkew[1]){var e=e5(c);e[4]=Math.tan(t.localSkew[0]),e[1]=Math.tan(t.localSkew[1]),e9(t.localTransform,t.localTransform,e)}var n=nm(c,p,f,t.localScale,t.origin);e9(t.localTransform,t.localTransform,n)}else nm(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,n0(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=MQ.ADDED);var l=t.transformable;l&&this.dirtifyWorld(t,l),l.frozen&&this.unfreezeParentToRoot(t),o&&t.dispatchEvent(li)},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=MQ.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=ez(e,n,r));var i=t.transformable;nU(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=ez(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=ez(e[0],e[1],e[2]||n.localScale[2]);eK(r,n.localScale)||(eW(n.localScale,r),this.dirtifyLocal(t,n))},t.prototype.setLocalRotation=function(t,e,n,r,i){"number"==typeof e&&(e=nq(e,n,r,i));var o=t.transformable;nY(o.localRotation,e),this.dirtifyLocal(t,o)},t.prototype.setLocalSkew=function(t,e,n){"number"==typeof e&&(r=e,(i=new eR(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=eT(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;)lr(n),n=n.parentNode;e&&t.forEach(function(t){lr(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 ln(M1.ATTR_MODIFIED,n,e,e,t,ln.MODIFICATION,e,e)),n.isCustomElement&&n.isConnected&&n.attributeChangedCallback&&n.attributeChangedCallback(t,e,e)})})},t.prototype.getPosition=function(t){var e=t.transformable;return nh(e.position,this.getWorldTransform(t,e))},t.prototype.getRotation=function(t){var e=t.transformable;return ny(e.rotation,this.getWorldTransform(t,e))},t.prototype.getScale=function(t){var e=t.transformable;return nd(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=nh(eD(),e),r=ny(n$(),e),i=nd(eD(),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(iy.isEmpty(r))return null;var i=n||new iy;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 iy},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 iy).update(r.center,r.halfExtents))}),e){var a=ak(t);if(a){var l=a.parsedStyle.clipPath.getBounds(e);o?l&&(o=l.intersection(o)):o=l}}return o||(o=new iy),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=eQ();t.parentNode.transformable&&(e=e4(eQ(),this.getWorldTransform(t.parentNode)));var n=this.getBounds(t);if(!iy.isEmpty(n)){var r=new iy;return r.setFromTransformedAABB(n,e),r}}return this.getBounds(t)},t.prototype.getBoundingClientRect=function(t){var e,n,r,i=this.getGeometryBounds(t);iy.isEmpty(i)||(r=new iy).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=eT(r.getMin(),2),l=a[0],s=a[1],u=eT(r.getMax(),2),c=u[0],f=u[1];return new ib(l+((null==o?void 0:o.left)||0),s+((null==o?void 0:o.top)||0),c-l,f-s)}return new ib((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?e9(e.worldTransform,r.worldTransform,e.localTransform):e0(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}(),la={MetricsString:"|\xc9q\xc5",BaselineSymbol:"M",BaselineMultiplier:1.4,HeightMultiplier:2,Newlines:[10,13],BreakingSpaces:[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288]},ll=/[a-zA-Z0-9\u00C0-\u00D6\u00D8-\u00f6\u00f8-\u00ff!"#$%&'()*+,-./:;]/,ls=new RegExp("".concat(/[!%),.:;?\]}¢°·'""†‡›℃∶、。〃〆〕〗〞﹚﹜!"%'),.:;?!]}~]/.source,"|").concat(/[!),.:;?\]}¢·–—'"•"、。〆〞〕〉》」︰︱︲︳﹐﹑﹒﹔﹕﹖﹘﹚﹜!),.:;?︶︸︺︼︾﹀﹂﹗]|}、]/.source,"|").concat(/[)\]}〕〉》」』】〙〗〟'"⦆»ヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻‐゠–〜?!‼⁇⁈⁉・、:;,。.]/.source,"|").concat(/[!%),.:;?\]}¢°'"†‡℃〆〈《「『〕!%),.:;?]}]/.source)),lu=new RegExp("".concat(/[$(£¥·'"〈《「『【〔〖〝﹙﹛$(.[{£¥]/.source,"|").concat(/[([{£¥'"‵〈《「『〔〝︴﹙﹛({︵︷︹︻︽︿﹁﹃﹏]/.source,"|").concat(/[([{〔〈《「『【〘〖〝'"⦅«—...‥〳〴〵]/.source,"|").concat(/[$([{£¥'"々〇〉》」〔$([{⦆¥₩#]/.source)),lc=function(){function t(t){var e=this;this.runtime=t,this.fontMetricsCache={},this.shouldBreakByKinsokuShorui=function(t,n){return!e.isBreakingSpace(n)&&!!(t&&(lu.exec(n)||ls.exec(t)))},this.trimByKinsokuShorui=function(t){var e=eN([],eT(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=la.MetricsString+la.BaselineSymbol,a=Math.ceil(i.measureText(o).width),l=Math.ceil(i.measureText(la.BaselineSymbol).width),s=la.HeightMultiplier*l;l=l*la.BaselineMultiplier|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=nQ(e)&&"".concat(e,"px")||"16px",l=n.split(","),s=l.length-1;s>=0;s--){var u=l[s].trim();!aH.test(u)&&0>aG.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 ib(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,S=0,_=M,P=0;P<M;P++){var j=g(p[h][P]);if(S+j+v>c){_=P;break}S+=j}p[h]=(p[h]||"").slice(0,_)+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&&la.BreakingSpaces.indexOf(t.charCodeAt(0))>=0},t.prototype.isNewline=function(t){return"string"==typeof t&&la.Newlines.indexOf(t.charCodeAt(0))>=0},t.prototype.trimToBreakable=function(t){var e=eN([],eT(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&&ll.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(!ll.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}(),lf={},lp=(Mj=new aQ,MA=new aZ,(MP={})[MF.CIRCLE]=new aq,MP[MF.ELLIPSE]=new aY,MP[MF.RECT]=Mj,MP[MF.IMAGE]=Mj,MP[MF.GROUP]=Mj,MP[MF.LINE]=new aX,MP[MF.TEXT]=new aJ(lf),MP[MF.POLYLINE]=MA,MP[MF.POLYGON]=MA,MP[MF.PATH]=new aK,MP[MF.HTML]=null,MP[MF.MESH]=null,MP),lh=(MC=new an,MN=new ao,(MT={})[MJ.PERCENTAGE]=null,MT[MJ.NUMBER]=new ap,MT[MJ.ANGLE]=new at,MT[MJ.DEFINED_PATH]=new ae,MT[MJ.PAINT]=MC,MT[MJ.COLOR]=MC,MT[MJ.FILTER]=new ar,MT[MJ.LENGTH]=MN,MT[MJ.LENGTH_PERCENTAGE]=MN,MT[MJ.LENGTH_PERCENTAGE_12]=new aa,MT[MJ.LENGTH_PERCENTAGE_14]=new al,MT[MJ.COORDINATE]=new ac,MT[MJ.OFFSET_DISTANCE]=new ah,MT[MJ.OPACITY_VALUE]=new ad,MT[MJ.PATH]=new ay,MT[MJ.LIST_OF_POINTS]=new ag,MT[MJ.SHADOW_BLUR]=new am,MT[MJ.TEXT]=new av,MT[MJ.TEXT_TRANSFORM]=new ab,MT[MJ.TRANSFORM]=new aV,MT[MJ.TRANSFORM_ORIGIN]=new function(){this.parser=o1,this.parserUnmemoize=o2},MT[MJ.Z_INDEX]=new aU,MT[MJ.MARKER]=new af,MT);lf.CameraContribution=iE,lf.AnimationTimeline=null,lf.EasingFunction=null,lf.offscreenCanvasCreator=new a9,lf.sceneGraphSelector=new le,lf.sceneGraphService=new lo(lf),lf.textService=new lc(lf),lf.geometryUpdaterFactory=lp,lf.CSSPropertySyntaxFactory=lh,lf.styleValueRegistry=new o7(lf),lf.layoutRegistry=null,lf.globalThis="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==n.g?n.g:{},lf.enableCSSParsing=!0,lf.enableDataset=!1,lf.enableStyleSyntax=!0,lf.enableSizeAttenuation=!1;var ld=0,ly=new ln(M1.INSERTED,null,"","","",0,"",""),lg=new ln(M1.REMOVED,null,"","","",0,"",""),lm=new a3(M1.DESTROY),lv=function(t){function e(){var e=t.apply(this,eN([],eT(arguments),!1))||this;return e.entity=ld++,e.renderable={bounds:void 0,boundsDirty:!0,renderBounds:void 0,renderBoundsDirty:!0,dirtyRenderBounds:void 0,dirty:!1},e.cullable={strategy:MZ.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=lf.enableCSSParsing?{anchor:iU,opacity:iU,fillOpacity:iU,strokeOpacity:iU,fill:iU,stroke:iU,transform:iU,transformOrigin:iU,visibility:iU,pointerEvents:iU,lineWidth:iU,lineCap:iU,lineJoin:iU,increasedLineWidthForHitTesting:iU,fontSize:iU,fontFamily:iU,fontStyle:iU,fontWeight:iU,fontVariant:iU,textAlign:iU,textBaseline:iU,textTransform:iU,zIndex:iU,filter:iU,shadowType:iU}:null,e.parsedStyle={},e.attributes={},e}return eM(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(ix)},e.prototype.appendChild=function(t,e){var n;if(t.destroyed)throw Error("Cannot append a destroyed element.");return lf.sceneGraphService.attach(t,this,e),(null==(n=this.ownerDocument)?void 0:n.defaultView)&&this.ownerDocument.defaultView.mountChildren(t),ly.relatedNode=this,t.dispatchEvent(ly),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 lg.relatedNode=this,t.dispatchEvent(lg),(null==(e=t.ownerDocument)?void 0:e.defaultView)&&t.ownerDocument.defaultView.unmountChildren(t),lf.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 lf.sceneGraphService.matches(t,this)},e.prototype.getElementById=function(t){return lf.sceneGraphService.querySelector("#".concat(t),this)},e.prototype.getElementsByName=function(t){return lf.sceneGraphService.querySelectorAll('[name="'.concat(t,'"]'),this)},e.prototype.getElementsByClassName=function(t){return lf.sceneGraphService.querySelectorAll(".".concat(t),this)},e.prototype.getElementsByTagName=function(t){return lf.sceneGraphService.querySelectorAll(t,this)},e.prototype.querySelector=function(t){return lf.sceneGraphService.querySelector(t,this)},e.prototype.querySelectorAll=function(t){return lf.sceneGraphService.querySelectorAll(t,this)},e.prototype.closest=function(t){var e=this;do{if(lf.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=eT(t),i=r[0],o=r.slice(1);this.parentNode.appendChild(i,n),i.after.apply(i,eN([],eT(o),!1))}},e.prototype.replaceWith=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.after.apply(this,eN([],eT(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,eN([],eT(t),!1))},e.prototype.remove=function(){return this.parentNode?this.parentNode.removeChild(this):this},e.prototype.destroy=function(){this.dispatchEvent(lm),this.remove(),this.emitter.removeAllListeners(),this.destroyed=!0},e.prototype.getGeometryBounds=function(){return lf.sceneGraphService.getGeometryBounds(this)},e.prototype.getRenderBounds=function(){return lf.sceneGraphService.getBounds(this,!0)},e.prototype.getBounds=function(){return lf.sceneGraphService.getBounds(this)},e.prototype.getLocalBounds=function(){return lf.sceneGraphService.getLocalBounds(this)},e.prototype.getBoundingClientRect=function(){return lf.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 lf.enableCSSParsing?null:void 0;var e=this.attributes[t];if(void 0!==e)return e;var n=iB(t);return e=this.attributes[n],lf.enableCSSParsing&&n0(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(ix)},e.prototype.getAttributeNode=function(t){throw Error(ix)},e.prototype.getAttributeNodeNS=function(t,e){throw Error(ix)},e.prototype.hasAttributeNS=function(t,e){throw Error(ix)},e.prototype.removeAttributeNS=function(t,e){throw Error(ix)},e.prototype.removeAttributeNode=function(t){throw Error(ix)},e.prototype.setAttributeNS=function(t,e,n){throw Error(ix)},e.prototype.setAttributeNode=function(t){throw Error(ix)},e.prototype.setAttributeNodeNS=function(t){throw Error(ix)},e.prototype.toggleAttribute=function(t,e){throw Error(ix)},e}(a6);function lb(t){return!!(null==t?void 0:t.nodeName)}var lx=new ln(M1.ATTR_MODIFIED,null,null,null,null,ln.MODIFICATION,null,null),lO={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:""},lw={anchor:[0,0],fill:iX,stroke:iX,transform:[],zIndex:0,filter:[],shadowType:"outer",miterLimit:10},lE=eS(eS({},lw),{opacity:1,fillOpacity:1,strokeOpacity:1,visibility:"visible",pointerEvents:"auto",lineWidth:1,lineCap:"butt",lineJoin:"miter",increasedLineWidthForHitTesting:0,fillRule:"nonzero"}),lk=eN(eN([],eT(["opacity","fillOpacity","strokeOpacity","transformOrigin","visibility","pointerEvents","lineWidth","lineCap","lineJoin","increasedLineWidthForHitTesting"]),!1),["fontSize","fontFamily","fontStyle","fontWeight","fontVariant","textAlign","textBaseline","textTransform"],!1),lM="data-",lS=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||MF.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,lf.enableCSSParsing?lw:lE,r.config.initialParsedStyle),lf.enableCSSParsing&&Object.assign(r.attributes,lO),r.initAttributes(r.config.style);var i=lf.globalThis.Proxy?lf.globalThis.Proxy:function(){};return lf.enableDataset&&(r.dataset=new i({},{get:function(t,e){var n="".concat(lM).concat(iR(e));return void 0!==t[n]?t[n]:r.getAttribute(n)},set:function(t,e,n){return r.setAttribute("".concat(lM).concat(iR(e)),n),!0}})),lf.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 eM(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=eS({},this.attributes);for(var r in n){var i=n[r];lb(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};lf.enableCSSParsing&&(n.usedAttributes=lk);var r={};for(var i in t)r[iB(i)]=t[i];lf.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=iB(e);!rb(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];lf.styleValueRegistry.processProperties(this,((r={})[t]=e,r),n),i.dirty=!0;var l=this.parsedStyle[t];this.isConnected&&(lx.relatedNode=this,lx.prevValue=o,lx.newValue=e,lx.attrName=t,lx.prevParsedValue=a,lx.newParsedValue=l,this.isMutationObserved?this.dispatchEvent(lx):(lx.target=this,this.ownerDocument.defaultView.dispatchEvent(lx,!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=eT(t.getMin(),2),n=e[0],r=e[1],i=eT(t.getMax(),2);return new ib(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),lf.sceneGraphService.setOrigin(this,ir(t,e,n)),this},e.prototype.getOrigin=function(){return lf.sceneGraphService.getOrigin(this)},e.prototype.setPosition=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),lf.sceneGraphService.setPosition(this,ir(t,e,n)),this},e.prototype.setLocalPosition=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),lf.sceneGraphService.setLocalPosition(this,ir(t,e,n)),this},e.prototype.translate=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),lf.sceneGraphService.translate(this,ir(t,e,n)),this},e.prototype.translateLocal=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),lf.sceneGraphService.translateLocal(this,ir(t,e,n)),this},e.prototype.getPosition=function(){return lf.sceneGraphService.getPosition(this)},e.prototype.getLocalPosition=function(){return lf.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=ir(t,e,n)),lf.sceneGraphService.scaleLocal(this,t),this},e.prototype.setLocalScale=function(t,e,n){return"number"==typeof t&&(e=e||t,n=n||t,t=ir(t,e,n)),lf.sceneGraphService.setLocalScale(this,t),this},e.prototype.getLocalScale=function(){return lf.sceneGraphService.getLocalScale(this)},e.prototype.getScale=function(){return lf.sceneGraphService.getScale(this)},e.prototype.getEulerAngles=function(){return io(eT(ia(eD(),lf.sceneGraphService.getWorldTransform(this)),3)[2])},e.prototype.getLocalEulerAngles=function(){return io(eT(ia(eD(),lf.sceneGraphService.getLocalRotation(this)),3)[2])},e.prototype.setEulerAngles=function(t){return lf.sceneGraphService.setEulerAngles(this,0,0,t),this},e.prototype.setLocalEulerAngles=function(t){return lf.sceneGraphService.setLocalEulerAngles(this,0,0,t),this},e.prototype.rotateLocal=function(t,e,n){return n0(e)&&n0(n)?lf.sceneGraphService.rotateLocal(this,0,0,t):lf.sceneGraphService.rotateLocal(this,t,e,n),this},e.prototype.rotate=function(t,e,n){return n0(e)&&n0(n)?lf.sceneGraphService.rotate(this,0,0,t):lf.sceneGraphService.rotate(this,t,e,n),this},e.prototype.setRotation=function(t,e,n,r){return lf.sceneGraphService.setRotation(this,t,e,n,r),this},e.prototype.setLocalRotation=function(t,e,n,r){return lf.sceneGraphService.setLocalRotation(this,t,e,n,r),this},e.prototype.setLocalSkew=function(t,e){return lf.sceneGraphService.setLocalSkew(this,t,e),this},e.prototype.getRotation=function(){return lf.sceneGraphService.getRotation(this)},e.prototype.getLocalRotation=function(){return lf.sceneGraphService.getLocalRotation(this)},e.prototype.getLocalSkew=function(){return lf.sceneGraphService.getLocalSkew(this)},e.prototype.getLocalTransform=function(){return lf.sceneGraphService.getLocalTransform(this)},e.prototype.getWorldTransform=function(){return lf.sceneGraphService.getWorldTransform(this)},e.prototype.setLocalTransform=function(t){return lf.sceneGraphService.setLocalTransform(this,t),this},e.prototype.resetLocalTransform=function(){lf.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,eN([],eT(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,eN([],eT(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=eT(e,2),i=r[0],o=r[1];return i?rv(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=eT(nh(eD(),u),2),f=c[0],p=c[1],h=eT(nd(eD(),u),2),d=h[0],y=h[1],g=ny(n$(),u),v=eT(ia(eD(),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 eR(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=eT(il(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=eT(il(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(){lf.enableCSSParsing?this.style.visibility="visible":this.forEach(function(t){t.style.visibility="visible"})},e.prototype.hide=function(){lf.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}(lv),l_=function(t){var e=t.name,n=t.inherits,r=t.interpolable,i=t.initialValue,o=t.syntax;lf.styleValueRegistry.registerMetadata({n:e,inh:n,int:r,d:i,syntax:o})},lP=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=e_(e,["style"]);return t.call(this,eS({type:MF.CIRCLE,style:lf.enableCSSParsing?eS({cx:"",cy:"",r:""},n):eS({},n),initialParsedStyle:{anchor:[.5,.5],transformOrigin:lf.enableCSSParsing?null:[iJ,iJ]}},r))||this}return eM(e,t),e}(lS),lj=function(t){function e(e){void 0===e&&(e={});var n=this,r=e.style,i=e_(e,["style"]);return(n=t.call(this,eS({style:lf.enableCSSParsing?eS({x:"",y:""},r):eS({},r)},i))||this).isCustomElement=!0,n}return eM(e,t),e}(lS),lA=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=e_(e,["style"]);return t.call(this,eS({type:MF.ELLIPSE,style:lf.enableCSSParsing?eS({cx:"",cy:"",rx:"",ry:""},n):eS({},n),initialParsedStyle:{anchor:[.5,.5],transformOrigin:lf.enableCSSParsing?null:[iJ,iJ]}},r))||this}return eM(e,t),e}(lS),lT=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=e_(e,["style"]);return t.call(this,eS({type:MF.GROUP,style:lf.enableCSSParsing?eS({x:"",y:"",width:"",height:""},n):eS({},n)},r))||this}return eM(e,t),e}(lS),lC=function(t){function e(e){void 0===e&&(e={});var n=this,r=e.style,i=e_(e,["style"]);return(n=t.call(this,eS({type:MF.HTML,style:lf.enableCSSParsing?eS({x:"",y:"",width:"auto",height:"auto",innerHTML:""},r):eS({},r)},i))||this).cullable.enable=!1,n}return eM(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 ib(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 iy,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=e4(eQ(),this.parentNode.getWorldTransform()),e=this.getBounds();if(!iy.isEmpty(e)){var n=new iy;return n.setFromTransformedAABB(e,t),n}}return this.getBounds()},e}(lS),lN=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=e_(e,["style"]);return t.call(this,eS({type:MF.IMAGE,style:lf.enableCSSParsing?eS({x:"",y:"",img:"",width:"",height:""},n):eS({},n)},r))||this}return eM(e,t),e}(lS),lL=function(t){function e(e){void 0===e&&(e={});var n=this,r=e.style,i=e_(e,["style"]);(n=t.call(this,eS({type:MF.LINE,style:eS({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&&lb(a)&&(n.markerStartAngle=a.getLocalEulerAngles(),n.appendChild(a)),l&&lb(l)&&(n.markerEndAngle=l.getLocalEulerAngles(),n.appendChild(l)),n.transformMarker(!0),n.transformMarker(!1),n}return eM(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&&lb(r)&&(this.markerStartAngle=0,r.remove()),i&&lb(i)&&(this.markerStartAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!0))):"markerEnd"===t&&(r&&lb(r)&&(this.markerEndAngle=0,r.remove()),i&&lb(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&&lb(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=rZ(r,i,o,a,t),c=u.x,f=u.y,p=eX(eD(),ez(c-l,f-s,0),e?this.getWorldTransform():this.getLocalTransform());return new iv(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 rY(t.x1,t.y1,t.x2,t.y2)},e}(lS),lI=function(t){function e(e){void 0===e&&(e={});var n=this,r=e.style,i=e_(e,["style"]);(n=t.call(this,eS({type:MF.PATH,style:lf.enableCSSParsing?eS({path:"",miterLimit:""},r):eS({},r),initialParsedStyle:lf.enableCSSParsing?null:{miterLimit:4,path:eS({},i0)}},i))||this).markerStartAngle=0,n.markerEndAngle=0,n.markerMidList=[];var o=n.parsedStyle,a=o.markerStart,l=o.markerEnd,s=o.markerMid;return a&&lb(a)&&(n.markerStartAngle=a.getLocalEulerAngles(),n.appendChild(a)),s&&lb(s)&&n.placeMarkerMid(s),l&&lb(l)&&(n.markerEndAngle=l.getLocalEulerAngles(),n.appendChild(l)),n.transformMarker(!0),n.transformMarker(!1),n}return eM(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&&lb(r)&&(this.markerStartAngle=0,r.remove()),i&&lb(i)&&(this.markerStartAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!0))):"markerEnd"===t?(r&&lb(r)&&(this.markerEndAngle=0,r.remove()),i&&lb(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&&lb(d)){var y=0;if(t){var g=eT(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=eT(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&&lb(t))for(var o=1;o<n.length-1;o++){var a=eT(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 oE(this)},e.prototype.getPointAtLength=function(t,e){void 0===e&&(e=!1);var n=this.parsedStyle,r=n.defX,i=n.defY,o=rl(n.path.absolutePath,t,eS(eS({},void 0),{bbox:!1,length:!0})).point,a=o.x,l=o.y,s=eX(eD(),ez(a-r,l-i,0),e?this.getWorldTransform():this.getLocalTransform());return new iv(s[0],s[1])},e.prototype.getPoint=function(t,e){return void 0===e&&(e=!1),this.getPointAtLength(t*oE(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}(lS),lR=function(t){function e(e){void 0===e&&(e={});var n=this,r=e.style,i=e_(e,["style"]);(n=t.call(this,eS({type:MF.POLYGON,style:lf.enableCSSParsing?eS({points:"",miterLimit:"",isClosed:!0},r):eS({},r),initialParsedStyle:lf.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&&lb(a)&&(n.markerStartAngle=a.getLocalEulerAngles(),n.appendChild(a)),s&&lb(s)&&n.placeMarkerMid(s),l&&lb(l)&&(n.markerEndAngle=l.getLocalEulerAngles(),n.appendChild(l)),n.transformMarker(!0),n.transformMarker(!1),n}return eM(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&&lb(r)&&(this.markerStartAngle=0,r.remove()),i&&lb(i)&&(this.markerStartAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!0))):"markerEnd"===t?(r&&lb(r)&&(this.markerEndAngle=0,r.remove()),i&&lb(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&&lb(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&&lb(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}(lS),lD=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=e_(e,["style"]);return t.call(this,eS({type:MF.POLYLINE,style:lf.enableCSSParsing?eS({points:"",miterLimit:"",isClosed:!1},n):eS({},n),initialParsedStyle:lf.enableCSSParsing?null:{points:{points:[],totalLength:0,segments:[]},miterLimit:4,isClosed:!1}},r))||this}return eM(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=rZ(a[u][0],a[u][1],a[u+1][0],a[u+1][1],s),f=c.x,p=c.y,h=eX(eD(),ez(f-r,p-i,0),e?this.getWorldTransform():this.getLocalTransform());return new iv(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}(lR),lF=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=e_(e,["style"]);return t.call(this,eS({type:MF.RECT,style:lf.enableCSSParsing?eS({x:"",y:"",width:"",height:"",radius:""},n):eS({},n)},r))||this}return eM(e,t),e}(lS),lB=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=e_(e,["style"]);return t.call(this,eS({type:MF.TEXT,style:lf.enableCSSParsing?eS({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):eS({fill:"black"},n),initialParsedStyle:lf.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 eM(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}(lS),lz=function(){function t(){this.registry={},this.define(MF.CIRCLE,lP),this.define(MF.ELLIPSE,lA),this.define(MF.RECT,lF),this.define(MF.IMAGE,lN),this.define(MF.LINE,lL),this.define(MF.GROUP,lT),this.define(MF.PATH,lI),this.define(MF.POLYGON,lR),this.define(MF.POLYLINE,lD),this.define(MF.TEXT,lB),this.define(MF.HTML,lC)}return t.prototype.define=function(t,e){this.registry[t]=e},t.prototype.get=function(t){return this.registry[t]},t}(),lW=function(t){function e(){var e=t.call(this)||this;e.defaultView=null,e.ownerDocument=null,e.nodeName="document";try{e.timeline=new lf.AnimationTimeline(e)}catch(t){}var n={};return o3.forEach(function(t){var e=t.n,r=t.inh,i=t.d;r&&i&&(n[e]=iD(i)?i(MF.GROUP):i)}),e.documentElement=new lT({id:"g-root",style:n}),e.documentElement.ownerDocument=e,e.documentElement.parentNode=e,e.childNodes=[e.documentElement],e}return eM(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?lB:lT);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(ix)},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 eP(this,void 0,void 0,function(){var n,r,i,o,a,l,s,u,c,f;return ej(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 eP(this,void 0,void 0,function(){var n,r,i,o,a,l,s,u,c,f;return ej(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(iO)},e.prototype.insertBefore=function(t,e){throw Error(iO)},e.prototype.removeChild=function(t,e){throw Error(iO)},e.prototype.replaceChild=function(t,e,n){throw Error(iO)},e.prototype.append=function(){throw Error(iO)},e.prototype.prepend=function(){throw Error(iO)},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}(a6),l$=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 a3(M1.CULLED)),null)}return t}),r.hooks.afterRender.tap(t.tag,function(t){t.cullable.visibilityPlaneMask=-1})},t.tag="Culling",t}(),lG=function(){function t(){var t=this;this.autoPreventDefault=!1,this.rootPointerEvent=new a2(null),this.rootWheelEvent=new a5(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=eA(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=eA(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=eA(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=eA(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=eA(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||n0(r)||n0(i)){var l=this.context.eventService.client2Viewport(new iv(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=aS[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=a_.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];rb(i.button)&&(i.button=0),rb(i.buttons)&&(i.buttons=1),rb(i.isPrimary)&&(i.isPrimary=1===t.touches.length&&"touchstart"===t.type),rb(i.width)&&(i.width=i.radiusX||1),rb(i.height)&&(i.height=i.radiusY||1),rb(i.tiltX)&&(i.tiltX=0),rb(i.tiltY)&&(i.tiltY=0),rb(i.pointerType)&&(i.pointerType="touch"),rb(i.pointerId)&&(i.pointerId=i.identifier||0),rb(i.pressure)&&(i.pressure=i.force||.5),rb(i.twist)&&(i.twist=0),rb(i.tangentialPressure)&&(i.tangentialPressure=0),i.isNormalized=!0,i.type=t.type,n.push(i)}else e.isMouseEvent(t)&&(rb(t.isPrimary)&&(t.isPrimary=!0),rb(t.width)&&(t.width=1),rb(t.height)&&(t.height=1),rb(t.tiltX)&&(t.tiltX=0),rb(t.tiltY)&&(t.tiltY=0),rb(t.pointerType)&&(t.pointerType="mouse"),rb(t.pointerId)&&(t.pointerId=1),rb(t.pressure)&&(t.pressure=.5),rb(t.twist)&&(t.twist=0),rb(t.tangentialPressure)&&(t.tangentialPressure=0),t.isNormalized=!0),n.push(t);return n},t.tag="Event",t}(),lH=[MF.CIRCLE,MF.ELLIPSE,MF.IMAGE,MF.RECT,MF.LINE,MF.POLYLINE,MF.POLYGON,MF.TEXT,MF.PATH,MF.HTML],lV=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(iy.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||Mz.INDETERMINATE,a.planes),i.visible=i.visibilityPlaneMask!==Mz.OUTSIDE,i.visible},t.prototype.computeVisibilityWithPlaneMask=function(t,e,n,r){if(n===Mz.OUTSIDE||n===Mz.INSIDE)return n;for(var i=Mz.INSIDE,o=lH.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(eq(c,e.getPositiveFarPoint(r[a]))+f<0)return Mz.OUTSIDE;eq(c,e.getNegativeFarPoint(r[a]))+f<0&&(i|=s)}}return i},t}(),lU=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;lf.enableSizeAttenuation&&lf.styleValueRegistry.updateSizeAttenuation(e,a.getCamera().getZoom()),lf.enableCSSParsing&&lf.styleValueRegistry.recalc(e),lf.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),lf.sceneGraphService.dirtifyToRoot(e),r.dirtify()};r.hooks.init.tap(t.tag,function(){a.addEventListener(M1.MOUNTED,u),a.addEventListener(M1.UNMOUNTED,c),a.addEventListener(M1.ATTR_MODIFIED,l),a.addEventListener(M1.BOUNDS_CHANGED,s)}),r.hooks.destroy.tap(t.tag,function(){a.removeEventListener(M1.MOUNTED,u),a.removeEventListener(M1.UNMOUNTED,c),a.removeEventListener(M1.ATTR_MODIFIED,l),a.removeEventListener(M1.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=eT(i.getMin(),2),a=o[0],l=o[1],s=eT(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}();(ML=M2||(M2={})).READY="ready",ML.BEFORE_RENDER="beforerender",ML.RERENDER="rerender",ML.AFTER_RENDER="afterrender",ML.BEFORE_DESTROY="beforedestroy",ML.AFTER_DESTROY="afterdestroy",ML.RESIZE="resize",ML.DIRTY_RECTANGLE="dirtyrectangle",ML.RENDERER_CHANGED="rendererchanged";var lq=new a3(M1.MOUNTED),lY=new a3(M1.UNMOUNTED),lX=new a3(M2.BEFORE_RENDER),lK=new a3(M2.RERENDER),lZ=new a3(M2.AFTER_RENDER),lQ=function(t){function e(e){var n,r,i=t.call(this)||this;i.Element=lS,i.inited=!1,i.context={},i.document=new lW,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,S=e.isMouseEvent;w||function(t,e){if(t){var n="string"==typeof t?t:t.id||aO++;ax[n]&&ax[n].destroy(),ax[n]=e}}(o,i);var _=s,P=u,j=c;return a&&(j=(j=c||aw&&window.devicePixelRatio||1)>=1?Math.ceil(j):1,_=s||("auto"===(n=aM(a,"width"))?a.offsetWidth:parseFloat(n))||a.width/j,P=u||("auto"===(r=aM(a,"height"))?a.offsetHeight:parseFloat(r))||a.height/j),l&&(lf.offscreenCanvas=l),i.devicePixelRatio=j,i.requestAnimationFrame=null!=y?y:aD.bind(lf.globalThis),i.cancelAnimationFrame=null!=g?g:aF.bind(lf.globalThis),i.supportsTouchEvents=null!=x?x:"ontouchstart"in lf.globalThis,i.supportsPointerEvents=null!=b?b:!!lf.globalThis.PointerEvent,i.isTouchEvent=null!=M?M:function(t){return i.supportsTouchEvents&&t instanceof lf.globalThis.TouchEvent},i.isMouseEvent=null!=S?S:function(t){return!lf.globalThis.MouseEvent||t instanceof lf.globalThis.MouseEvent&&(!i.supportsPointerEvents||!(t instanceof lf.globalThis.PointerEvent))},i.initRenderingContext({container:o,canvas:a,width:_,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(_,P,f.clipSpaceNearZ),i.initRenderer(f,!0),i}return eM(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 lf.CameraContribution;i.clipSpaceNearZ=n,i.setType(MW.EXPLORING,M$.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(iw.UPDATED,function(){r.context.renderingContext.renderReasons.add(M0.CAMERA_CHANGED),lf.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){lf.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 a3(M2.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 a3(M2.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===MG.ORTHOGRAPHIC?r.setOrthographic(-(t/2),t/2,e/2,-(e/2),r.getNear(),r.getFar()):r.setAspect(t/e),this.dispatchEvent(new a3(M2.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(lX),this.getRenderingService().render(this.getConfig(),function(){t.dispatchEvent(lK)}),this.dispatchEvent(lZ)},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 r3,this.context.renderingPlugins=[],this.context.renderingPlugins.push(new lG,new lU,new l$([new lV])),this.loadRendererContainerModule(t),this.context.contextService=new this.context.ContextService(eS(eS({},lf),this.context)),this.context.renderingService=new a7(lf,this.context),this.context.eventService=new a8(lf,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 a3(M2.READY))}):r.dispatchEvent(new a3(M2.READY)),r.readyPromise&&r.resolveReadyPromise()):r.dispatchEvent(new a3(M2.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(lf)})},e.prototype.setRenderer=function(t){var e=this.getConfig();if(e.renderer!==t){var n=e.renderer;e.renderer=t,this.destroy(!1,!0),eN([],eT(null==n?void 0:n.getPlugins()),!1).reverse().forEach(function(t){t.destroy(lf)}),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(lY):(lY.target=t,this.dispatchEvent(lY,!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(lq):(lq.target=t,this.dispatchEvent(lq,!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}(a4),lJ={}.toString,l0=function(t,e){return lJ.call(t)==="[object "+e+"]"},l1=function(t){function e(){var e=t.apply(this,eN([],eT(arguments),!1))||this;return e.landmarks=[],e}return eM(e,t),e.prototype.rotate=function(t,e,n){if(this.relElevation=ie(e),this.relAzimuth=ie(t),this.relRoll=ie(n),this.elevation+=this.relElevation,this.azimuth+=this.relAzimuth,this.roll+=this.relRoll,this.type===MW.EXPLORING){var r=nG(n$(),[1,0,0],ii((this.rotateWorld?1:-1)*this.relElevation)),i=nG(n$(),[0,1,0],ii((this.rotateWorld?1:-1)*this.relAzimuth)),o=nG(n$(),[0,0,1],ii(this.relRoll)),a=nH(n$(),i,r);a=nH(n$(),a,o);var l=nv(eQ(),a);e7(this.matrix,this.matrix,[0,0,-this.distance]),e9(this.matrix,this.matrix,l),e7(this.matrix,this.matrix,[0,0,this.distance])}else{if(Math.abs(this.elevation)>90)return this;this.computeMatrix()}return this._getAxes(),this.type===MW.ORBITING||this.type===MW.EXPLORING?this._getPosition():this.type===MW.TRACKING&&this._getFocalPoint(),this._update(),this},e.prototype.pan=function(t,e){var n=ir(t,e,0),r=eF(this.position);return eG(r,r,eV(eD(),this.right,n[0])),eG(r,r,eV(eD(),this.up,n[1])),this._setPosition(r),this.triggerUpdate(),this},e.prototype.dolly=function(t){var e=this.forward,n=eF(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===MW.ORBITING||this.type===MW.EXPLORING?this._getDistance():this.type===MW.TRACKING&&eG(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 lf.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:eJ(p.getWorldTransform()),right:eF(p.right),up:eF(p.up),forward:eF(p.forward),position:eF(p.getPosition()),focalPoint:eF(p.getFocalPoint()),distanceVector:eF(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=l0(t,"String")?this.landmarks.find(function(e){return e.name===t}):t;if(r){var i,o=l0(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)||lf.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=eD(),a=eD(),l=1,u=0;if(eY(o,n.focalPoint,y,r),eY(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),eZ(o,y)+eZ(a,d)<=.01&&void 0==g&&void 0==v)return void 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=e0(this.matrix,t.matrix),this.right=eW(this.right,t.right),this.up=eW(this.up,t.up),this.forward=eW(this.forward,t.forward),this.position=eW(this.position,t.position),this.focalPoint=eW(this.focalPoint,t.focalPoint),this.distanceVector=eW(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}(iE);lf.CameraContribution=l1;var l2=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}(),l5=0,l3=new WeakMap,l4=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:M3&&(t===M3||t===M5)?M3:null}(n[r-1],t);if(i){n[r-1]=i;return}}else{e=this.observer,l7.push(e),l9||(l9=!0,void 0!==lf.globalThis?lf.globalThis.setTimeout(st):st())}n[r]=t},t.prototype.addListeners=function(){this.addListeners_(this.target)},t.prototype.addListeners_=function(t){var e=this.options;e.attributes&&t.addEventListener(M1.ATTR_MODIFIED,this,!0),e.childList&&t.addEventListener(M1.INSERTED,this,!0),(e.childList||e.subtree)&&t.addEventListener(M1.REMOVED,this,!0)},t.prototype.removeListeners=function(){this.removeListeners_(this.target)},t.prototype.removeListeners_=function(t){var e=this.options;e.attributes&&t.removeEventListener(M1.ATTR_MODIFIED,this,!0),e.childList&&t.removeEventListener(M1.INSERTED,this,!0),(e.childList||e.subtree)&&t.removeEventListener(M1.REMOVED,this,!0)},t.prototype.removeTransientObservers=function(){var t=this.transientObservedNodes;this.transientObservedNodes=[],t.forEach(function(t){this.removeListeners_(t);for(var e=l3.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 M1.ATTR_MODIFIED:var e,n,r=t.attrName,i=t.relatedNode.namespaceURI;(e=M5=new l2("attributes",n=t.target)).attributeName=r,e.attributeNamespace=i;var o=t.attrChange===ln.ADDITION?null:t.prevValue;l8(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,M3||((M3=l2.copy(M5)).oldValue=n),M3):e}});break;case M1.REMOVED:case M1.INSERTED:n=t.relatedNode;var a=t.target,l=void 0,s=void 0;t.type===M1.INSERTED?(l=[a],s=[]):(l=[],s=[a]);var u=a.previousSibling,c=a.nextSibling;(e=M5=new l2("childList",n)).addedNodes=l,e.removedNodes=s,e.previousSibling=u,e.nextSibling=c,l8(n,function(t){if(t.childList)return e})}M5=M3=void 0},t}();function l6(t){this.callback=t,this.nodes=[],this.records=[],this.uid=l5++}function l8(t,e){for(var n=t;n;n=n.parentNode){var r=l3.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)}}}}l6.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=l3.get(t);r||l3.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 l4(this,t,e),r.push(n),this.nodes.push(t)),n.addListeners()},l6.prototype.disconnect=function(){var t=this;this.nodes.forEach(function(e){for(var n=l3.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=[]},l6.prototype.takeRecords=function(){var t=this.records;return this.records=[],t};var l9=!1,l7=[];function st(){l9=!1;var t=l7;l7=[],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=l3.get(e);n&&n.forEach(function(e){e.observer===t&&e.removeTransientObservers()})}),n.length&&(t.callback(n,t),e=!0)}),e&&st()}var se=function(t,e,n){return t<e?e:t>n?n:t},sn={}.toString,sr=function(t){return"[object Number]"===sn.call(t)},si=function(t){return null==t},so=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 eM(e,t),e}(a0),sa=0,sl=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(sa++),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 so(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(ix)},t.prototype.addEventListener=function(t,e,n){throw Error(ix)},t.prototype.removeEventListener=function(t,e,n){throw Error(ix)},t.prototype.dispatchEvent=function(t){throw Error(ix)},t.prototype.commitStyles=function(){throw Error(ix)},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 so(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 so(null,this,this.currentTime,t);this.onframe(r)}this._finishedFlag=!1}},t}(),ss="function"==typeof Float32Array,su=function(t,e){return 1-3*e+3*t},sc=function(t,e){return 3*e-6*t},sf=function(t){return 3*t},sp=function(t,e,n){return((su(e,n)*t+sc(e,n))*t+sf(e))*t},sh=function(t,e,n){return 3*su(e,n)*t*t+2*sc(e,n)*t+sf(e)},sd=function(t,e,n,r,i){var o,a,l=0;do(o=sp(a=e+(n-e)/2,r,i)-t)>0?n=a:e=a;while(Math.abs(o)>1e-7&&++l<10);return a},sy=function(t,e,n,r){for(var i=0;i<4;++i){var o=sh(e,n,r);if(0===o)break;var a=sp(e,n,r)-t;e-=a/o}return e},sg=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=ss?new Float32Array(11):Array(11),o=0;o<11;++o)i[o]=sp(.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=sh(a,t,n);return l>=.001?sy(e,a,t,n):0===l?a:sd(e,r,r+.1,t,n)};return function(t){return 0===t||1===t?t:sp(a(t),e,r)}},sm=function(t){return Math.pow(t,2)},sv=function(t){return Math.pow(t,3)},sb=function(t){return Math.pow(t,4)},sx=function(t){return Math.pow(t,5)},sO=function(t){return Math.pow(t,6)},sw=function(t){return 1-Math.cos(t*Math.PI/2)},sE=function(t){return 1-Math.sqrt(1-t*t)},sk=function(t){return t*t*(3*t-2)},sM=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)},sS=function(t,e){void 0===e&&(e=[]);var n=eT(e,2),r=n[0],i=n[1],o=se(Number(void 0===r?1:r),1,10),a=se(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=eT(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=se(o,.1,1e3),l=se(l,.1,1e3),u=se(u,.1,1e3),f=se(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},sP=function(t,e){void 0===e&&(e=[]);var n=eT(e,2),r=n[0],i=void 0===r?10:r;return("start"==n[1]?Math.ceil:Math.floor)(se(t,0,1)*i)/i},sj=function(t,e){void 0===e&&(e=[]);var n=eT(e,4);return sg(n[0],n[1],n[2],n[3])(t)},sA=sg(.42,0,1,1),sT=function(t){return function(e,n,r){return void 0===n&&(n=[]),1-t(1-e,n,r)}},sC=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}},sN=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}},sL={steps:sP,"step-start":function(t){return sP(t,[1,"start"])},"step-end":function(t){return sP(t,[1,"end"])},linear:function(t){return t},"cubic-bezier":sj,ease:function(t){return sj(t,[.25,.1,.25,1])},in:sA,out:sT(sA),"in-out":sC(sA),"out-in":sN(sA),"in-quad":sm,"out-quad":sT(sm),"in-out-quad":sC(sm),"out-in-quad":sN(sm),"in-cubic":sv,"out-cubic":sT(sv),"in-out-cubic":sC(sv),"out-in-cubic":sN(sv),"in-quart":sb,"out-quart":sT(sb),"in-out-quart":sC(sb),"out-in-quart":sN(sb),"in-quint":sx,"out-quint":sT(sx),"in-out-quint":sC(sx),"out-in-quint":sN(sx),"in-expo":sO,"out-expo":sT(sO),"in-out-expo":sC(sO),"out-in-expo":sN(sO),"in-sine":sw,"out-sine":sT(sw),"in-out-sine":sC(sw),"out-in-sine":sN(sw),"in-circ":sE,"out-circ":sT(sE),"in-out-circ":sC(sE),"out-in-circ":sN(sE),"in-back":sk,"out-back":sT(sk),"in-out-back":sC(sk),"out-in-back":sN(sk),"in-bounce":sM,"out-bounce":sT(sM),"in-out-bounce":sC(sM),"out-in-bounce":sN(sM),"in-elastic":sS,"out-elastic":sT(sS),"in-out-elastic":sC(sS),"out-in-elastic":sN(sS),spring:s_,"spring-in":s_,"spring-out":sT(s_),"spring-in-out":sC(s_),"spring-out-in":sN(s_)},sI=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()},sR=function(t){return t};function sD(t,e){return function(n){if(n>=1)return 1;var r=1/t;return(n+=e*r)-n%r}}var sF="\\s*(-?\\d+\\.?\\d*|-?\\.\\d+)\\s*",sB=RegExp("cubic-bezier\\("+sF+","+sF+","+sF+","+sF+"\\)"),sz=/steps\(\s*(\d+)\s*\)/,sW=/steps\(\s*(\d+)\s*,\s*(start|middle|end)\s*\)/;function s$(t){var e=sB.exec(t);if(e)return sg.apply(void 0,eN([],eT(e.slice(1).map(Number)),!1));var n=sz.exec(t);if(n)return sD(Number(n[1]),0);var r=sW.exec(t);return r?sD(Number(r[1]),{start:1,middle:.5,end:0}[r[2]]):sL[sI(t)]||sL.linear}function sG(t){return"offset"!==t&&"easing"!==t&&"composite"!==t&&"computedOffset"!==t}var sH=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!lf.enableCSSParsing&&sr(i)?i:n(i)}},sV=function(){function t(){this.delay=0,this.direction="normal",this.duration="auto",this._easing="linear",this.easingFunction=sR,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=s$(t),this._easing=t},enumerable:!1,configurable:!0}),t}();function sU(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(si(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(!si(l)&&!si(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 sq="backwards|forwards|both|none".split("|"),sY="reverse|alternate|alternate-reverse".split("|"),sX=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 sV,"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===sq.indexOf(l[t])||("direction"!==t||-1!==sY.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=sU(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=o6[t];if(i&&i.syntax&&i.int){var o=lf.styleValueRegistry.getPropertySyntax(i.syntax);if(o){var a=void 0,l=void 0;if(lf.enableCSSParsing){var s=lf.styleValueRegistry.parseProperty(t,e,r,!1),u=lf.styleValueRegistry.parseProperty(t,n,r,!1);a=lf.styleValueRegistry.computeProperty(t,s,r,!1),l=lf.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=sH.apply(void 0,eN([],eT(f),!1));return function(t){return 0===t?e:1===t?n:p(t)}}}}return sH(!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(sG(i)){var o={offset:t[r].offset,computedOffset:t[r].computedOffset,easing:t[r].easing,easingFunction:s$(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)sG(n)&&t.setAttribute(n,null)});var g=lf.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=sU(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 sK(t,e){return Number(t.id)-Number(e.id)}var sZ=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(sK),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 sl(new sX(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(sK),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,eN([],eT(a),!1)),(i=this.pendingEffects).push.apply(i,eN([],eT(l),!1)),this.ticking&&this.requestAnimationFrame(function(){}),this.inTick=!1,[s,u]},t}();lf.EasingFunction=s$,lf.AnimationTimeline=sZ;class sQ extends Map{constructor(t,e=s0){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(let[e,n]of t)this.set(e,n)}get(t){return super.get(sJ(this,t))}has(t){return super.has(sJ(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 sJ({_intern:t,_key:e},n){let r=e(n);return t.has(r)?t.get(r):n}function s0(t){return null!==t&&"object"==typeof t?t.valueOf():t}function s1(t){return t}function s2(t,...e){return s6(t,s1,s1,e)}function s5(t,...e){return s6(t,Array.from,s1,e)}function s3(t,e,...n){return s6(t,s1,e,n)}function s4(t,e,...n){return s6(t,Array.from,e,n)}function s6(t,e,n,r){return function t(i,o){if(o>=r.length)return n(i);let a=new sQ,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 s8=function(t){return null==t},s9=function(t){return s8(t)?"":t.toString()},s7=function(t){var e=s9(t);return e.charAt(0).toLowerCase()+e.substring(1)};function ut(t){return t}function ue(t){return t.reduce((t,e)=>(n,...r)=>e(t(n,...r),...r),ut)}function un(t){return t.replace(/( |^)[a-z]/g,t=>t.toUpperCase())}function ur(t=""){throw Error(t)}function ui(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 uo(t){return null!=t&&!Number.isNaN(t)}function ua(t,e){return ul(t,e)||{}}function ul(t,e){let n=Object.entries(t||{}).filter(([t])=>t.startsWith(e)).map(([t,n])=>[s7(t.replace(e,"").trim()),n]).filter(([t])=>!!t);return 0===n.length?null:Object.fromEntries(n)}function us(t,...e){return Object.fromEntries(Object.entries(t).filter(([t])=>e.every(e=>!t.startsWith(e))))}function uu(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 uc(t){return"object"==typeof t&&!(t instanceof Date)&&null!==t&&!Array.isArray(t)}function uf(t){return null===t||!1===t}function up(t){return new uh([t],null,t,t.ownerDocument)}class uh{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 uh("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 uh(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 uh([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 uh(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 uh(n,null,n[0],this._document)}maybeAppend(t,e,n){let r=this._elements[0],i=r.getElementById(t);if(i)return new uh([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 uh([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=s2(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 uh([],r,this._parent,this._document),new uh(i,null,this._parent,this._document),new uh(o,null,this._parent,this._document),new uh([],a,this._parent,this._document),new uh(l,null,this._parent,this._document)];return new uh(this._elements,null,this._parent,this._document,f)}merge(t){let e=[...this._elements,...t._elements],n=[...this._transitions,...t._transitions];return new uh(e,null,this._parent,this._document,void 0,n)}createElement(t){if(this._document)return this._document.createElement(t,{});let e=uh.registry[t];return e?new e:ur(`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 uh([],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 ud([t,e],[n,r]){return[t-n,e-r]}function uy([t,e],[n,r]){return Math.sqrt(Math.pow(t-n,2)+Math.pow(e-r,2))}function ug([t,e]){return Math.atan2(e,t)}function um([t,e]){return ug([t,e])+Math.PI/2}function uv(t,e){let n=ug(t),r=ug(e);return n<r?r-n:2*Math.PI-(n-r)}function ub(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 ux([t,e],[n,r]){return[(t+n)/2,(e+r)/2]}function uO(t,e,n){return Math.max(e,Math.min(t,n))}function uw(t,e=10){return"number"!=typeof t||1e-15>Math.abs(t)?t:parseFloat(t.toFixed(e))}uh.registry={g:lT,rect:lF,circle:lP,path:lI,text:lB,ellipse:lA,image:lN,line:lL,polygon:lR,polyline:lD,html:lC};var uE={}.toString,uk=function(t,e){return uE.call(t)==="[object "+e+"]"},uM=function(t){return Array.isArray?Array.isArray(t):uk(t,"Array")},uS=function(t){var e=typeof t;return null!==t&&"object"===e||"function"===e},u_=function(t,e){if(t){if(uM(t))for(var n,r=0,i=t.length;r<i&&!1!==e(t[r],r);r++);else if(uS(t)){for(var o in t)if(t.hasOwnProperty(o)&&!1===e(t[o],o))break}}},uP=function(t){return uk(t,"Function")},uj=Array.prototype;uj.splice,uj.indexOf,Array.prototype.splice,Object.prototype.hasOwnProperty;var uA=function(t){return uk(t,"Number")},uT=Object.values?function(t){return Object.values(t)}:function(t){var e=[];return u_(t,function(n,r){uP(t)&&"prototype"===r||e.push(n)}),e},uC=function(t){if("object"!=typeof t||null===t||!uk(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},uN=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&&uC(a)?(uC(e[o])||(e[o]={}),r<i?t(e[o],a,r+1,i):e[o]=n[o]):uM(a)?(e[o]=[],e[o]=e[o].concat(a)):void 0!==a&&(e[o]=a)}}(t,e[r]);return t},uL=function(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)},uI=function(t,e){if(!uL(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 uR=function(t){return t};function uD(t){return null==t?0:uL(t)?t.length:Object.keys(t).length}function uF(){this.map={}}!function(t,e){if(!uP(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 M4||(M4=document.createElement("canvas").getContext("2d")),M4.font=[o,a,i,n+"px",r].join(" "),M4.measureText(uk(t,"String")?t:"").width},function(t,e){return void 0===e&&(e={}),eC([t],uT(e)).join("")}),uF.prototype.has=function(t){return void 0!==this.map[t]},uF.prototype.get=function(t,e){var n=this.map[t];return void 0===n?e:n},uF.prototype.set=function(t,e){this.map[t]=e},uF.prototype.clear=function(){this.map={}},uF.prototype.delete=function(t){delete this.map[t]},uF.prototype.size=function(){return Object.keys(this.map).length};class uB{constructor(t){this.options=uN({},this.getDefaultOptions()),this.update(t)}getOptions(){return this.options}update(t={}){this.options=uN({},this.options,t),this.rescale(t)}rescale(t){}}function uz(t,e){return e-t?n=>(n-t)/(e-t):t=>.5}function uW(t,...e){return e.reduce((t,e)=>n=>t(e(n)),t)}function u$(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 uG=n(4254),uH=n.n(uG);function uV(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 uU(t){let e=uH().get(t);if(!e)return null;let{model:n,value:r}=e;return"rgb"===n?r:"hsl"===n?function(t){let e=t[0]/360,n=t[1]/100,r=t[2]/100,i=t[3];if(0===n)return[255*r,255*r,255*r,i];let o=r<.5?r*(1+n):r+n-r*n,a=2*r-o,l=uV(a,o,e+1/3);return[255*l,255*uV(a,o,e),255*uV(a,o,e-1/3),i]}(r):null}let uq=(t,e)=>n=>t*(1-n)+e*n,uY=(t,e)=>{let n=uU(t),r=uU(e);return null===n||null===r?n?()=>t:()=>e:t=>{let e=[,,,,];for(let i=0;i<4;i+=1){let o=n[i],a=r[i];e[i]=o*(1-t)+a*t}let[i,o,a,l]=e;return`rgba(${Math.round(i)}, ${Math.round(o)}, ${Math.round(a)}, ${l})`}},uX=(t,e)=>"number"==typeof t&&"number"==typeof e?uq(t,e):"string"==typeof t&&"string"==typeof e?uY(t,e):()=>t,uK=(t,e)=>{let n=uq(t,e);return t=>Math.round(n(t))};function uZ(t){return null!=t&&!Number.isNaN(t)}let uQ=Math.sqrt(50),uJ=Math.sqrt(10),u0=Math.sqrt(2);function u1(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>=uQ?10:o>=uJ?5:o>=u0?2:1)*10**i:-(10**-i)/(o>=uQ?10:o>=uJ?5:o>=u0?2:1)}function u2(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>=uQ?i*=10:o>=uJ?i*=5:o>=u0&&(i*=2),e<t?-i:i}let u5=(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=u1(l,s,n))>0?r=u1(l=Math.floor(l/r)*r,s=Math.ceil(s/r)*r,n):r<0&&(r=u1(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},u3=(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)),uW(i,r)},u4=(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=u$(t,e,1,r)-1,a=i[n];return uW(o[n],a)(e)}},u6=(t,e,n,r)=>(Math.min(t.length,e.length)>2?u4:u3)(t,e,r?uK:n);class u8 extends uB{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:uq,tickCount:5}}map(t){return uZ(t)?this.output(t):this.options.unknown}invert(t){return uZ(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 u5}rescale(){this.nice();let[t,e]=this.chooseTransforms();this.composeOutput(t,this.chooseClamp(t)),this.composeInput(t,e,this.chooseClamp(e))}chooseClamp(t){let{clamp:e,range:n}=this.options,r=this.options.domain.map(t),i=Math.min(r.length,n.length);return e?function(t,e){let n=e<t?e:t,r=t>e?t:e;return t=>Math.min(Math.max(n,t),r)}(r[0],r[i-1]):uR}composeOutput(t,e){let{domain:n,range:r,round:i,interpolate:o}=this.options,a=u6(n.map(t),r,o,i);this.output=uW(a,e,t)}composeInput(t,e,n){let{domain:r,range:i}=this.options,o=u6(i,r.map(t),uq);this.input=uW(e,n,o)}}let u9=(t,e,n)=>{let r,i,o=t,a=e;if(o===a&&n>0)return[o];let l=u1(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 u7 extends u8{getDefaultOptions(){return{domain:[0,1],range:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolate:uX,tickMethod:u9,tickCount:5}}chooseTransforms(){return[uR,uR]}clone(){return new u7(this.options)}}var ct=function(t){return tB(t,"Number")};function ce(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 cn(t,e){return Object.entries(t).reduce((n,[r,i])=>(n[r]=e(i,r,t),n),{})}function cr(t){return t.map((t,e)=>e)}function ci(t){return t[t.length-1]}function co(t,e){let n=[[],[]];return t.forEach(t=>{n[+!e(t)].push(t)}),n}function ca(t,e){for(let[n,r]of Object.entries(e))t.style(n,r)}function cl(t,e,n,r,i){let o=ug(ud(r,e))+Math.PI,a=ug(ud(r,n))+Math.PI;return t.arc(r[0],r[1],i,o,a,a-o<0),t}function cs(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=cr(a),[u,c]=ce(s,t=>a[t]),f=new u7({domain:[u,c],range:[0,100]}),p=t=>ct(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 cu(t){let[e,n,r,i]=t;return[i,e,n,r]}function cc(t,e,n){let[r,i,,o]=ey(t)?cu(e):e,[a,l]=n,s=t.getCenter(),u=um(ud(r,s)),c=um(ud(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:uy(o,s),outerRadius:uy(r,s)}}function cf(t){let{colorAttribute:e,opacityAttribute:n=e}=t;return`${n}Opacity`}function cp(t,e){if(!eg(t))return"";let n=t.getCenter(),{transform:r}=e;return`translate(${n[0]}, ${n[1]}) ${r||""}`}function ch(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 cd=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 cy(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=cd(i,["inset","radius","insetLeft","insetTop","insetRight","insetBottom","radiusBottomLeft","radiusBottomRight","radiusTopLeft","radiusTopRight","minWidth","maxWidth","minHeight"]);if(!eg(r)&&!ev(r)){let n=!!ey(r),[i,,o]=n?cu(e):e,[a,x]=i,[O,w]=ud(o,i),E=Math.abs(O),k=Math.abs(w),M=(O>0?a:a+O)+l,S=(w>0?x:x+w)+s,_=E-(l+u),P=k-(s+c),j=n?uO(_,v,1/0):uO(_,y,g),A=n?uO(P,y,g):uO(P,v,1/0),T=n?M:M-(j-_)/2,C=n?S-(A-P)/2:S-(A-P);return up(t.createElement("rect",{})).style("x",T).style("y",C).style("width",j).style("height",A).style("radius",[h,d,p,f]).call(ca,b).node()}let{y:x,y1:O}=n,w=r.getCenter(),E=cc(r,e,[x,O]),k=ed().cornerRadius(a).padAngle(o*Math.PI/180);return up(t.createElement("path",{})).style("path",k(E)).style("transform",`translate(${w[0]}, ${w[1]})`).style("radius",a).style("inset",o).call(ca,b).node()}let cg=(t,e)=>{let{colorAttribute:n,opacityAttribute:r="fill",first:i=!0,last:o=!0}=t,a=cd(t,["colorAttribute","opacityAttribute","first","last"]),{coordinate:l,document:s}=e;return(e,r,u)=>{let{color:c,radius:f=0}=u,p=cd(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:S="stroke"===n||d?h:0,inset:_=0,insetLeft:P=_,insetRight:j=_,insetBottom:A=_,insetTop:T=_,minWidth:C,maxWidth:N,minHeight:L}=a,I=cd(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],B=["radiusTopLeft","radiusTopRight","radiusBottomRight","radiusBottomLeft"];ey(l)&&B.push(B.shift());let z=Object.assign(Object.assign({radius:y},Object.fromEntries(B.map((t,e)=>[t,F[e]]))),{inset:_,insetLeft:P,insetRight:j,insetBottom:A,insetTop:T,minWidth:C,maxWidth:N,minHeight:L});return up(cy(s,e,r,l,z)).call(ca,p).style("fill","transparent").style(n,R).style(cf(t),D).style("lineWidth",S).style("stroke",void 0===d?R:d).call(ca,I).node()}};cg.props={defaultEnterAnimation:"scaleInY",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let cm=(t,e)=>cg(Object.assign({colorAttribute:"fill"},t),e);cm.props=Object.assign(Object.assign({},cg.props),{defaultMarker:"square"});let cv=(t,e)=>cg(Object.assign({colorAttribute:"stroke"},t),e);function cb(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function cx(t){this._context=t}function cO(t){return new cx(t)}function cw(t){return t[0]}function cE(t){return t[1]}function ck(t,e){var n=tJ(!0),r=null,i=cO,o=null,a=el(l);function l(l){var s,u,c,f=(l=cb(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?cw:tJ(t),e="function"==typeof e?e:void 0===e?cE:tJ(e),l.x=function(e){return arguments.length?(t="function"==typeof e?e:tJ(+e),l):t},l.y=function(t){return arguments.length?(e="function"==typeof t?t:tJ(+t),l):e},l.defined=function(t){return arguments.length?(n="function"==typeof t?t:tJ(!!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 cM(){}function cS(t){this._context=t}function c_(t){return new cS(t)}cv.props=Object.assign(Object.assign({},cg.props),{defaultMarker:"hollowSquare"}),Array.prototype.slice,cx.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)}}},cS.prototype={areaStart:cM,areaEnd:cM,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 cP=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 cj(t,e,n){let[r,i,o,a]=t;return ey(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 cA=(t,e)=>{let{adjustPoints:n=cj}=t,r=cP(t,["adjustPoints"]),{coordinate:i,document:o}=e;return(t,e,a,l)=>{let{index:s}=e,{color:u}=a,c=cP(a,["color"]),f=n(t,l[s+1],i),[p,h,d,y]=ey(i)?cu(f):f,{color:g=u,opacity:v}=e,b=ck().curve(c_)([p,h,d,y]);return up(o.createElement("path",{})).call(ca,c).style("path",b).style("fill",g).style("fillOpacity",v).call(ca,r).node()}};function cT(t,e,n){let[r,i,o,a]=t;return ey(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]}cA.props={defaultMarker:"square"};let cC=(t,e)=>cA(Object.assign({adjustPoints:cT},t),e);function cN(t){return Math.abs(t)>10?String(t):t.toString().padStart(2,"0")}cC.props={defaultMarker:"square"};let cL=(t={})=>{let{channel:e="x"}=t;return(t,n)=>{let{encode:r}=n,{tooltip:i}=n;if(uf(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=>tY(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=cN(t.getMonth()+1),r=cN(t.getDate()),i=`${e}-${n}-${r}`,o=t.getHours(),a=t.getMinutes(),l=t.getSeconds();return o||a||l?`${i} ${cN(o)}:${cN(a)}:${cN(l)}`:i}(t[e]):t[e]).join(", ")};return[t,tG({},n,{tooltip:{title:l}})]}};cL.props={};let cI=t=>{let{channel:e}=t;return(t,n)=>{let{encode:r,tooltip:i}=n;if(uf(i))return[t,n];let{items:o=[]}=i;return!o||o.length>0?[t,n]:[t,tG({},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))}})]}};cI.props={};var cR=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 cD=()=>(t,e)=>{let{encode:n}=e,{key:r}=n,i=cR(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,tG({},e,{encode:{key:tH(a)}})]};function cF(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 cB(t={}){return[...cF(t),{name:"title",scale:"identity"}]}function cz(){return[{type:cL,channel:"color"},{type:cI,channel:["x","y"]}]}function cW(){return[{type:cL,channel:"x"},{type:cI,channel:["y"]}]}function c$(t={}){return cF(t)}function cG(){return[{type:cD}]}cD.props={};function cH(t,e){return t.getBandWidth(t.invert(e))}function cV(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?cH(a,r[e]):0,u=h?cH(l,i[e]):0,y=d&&o?(cH(s,o[e])/2+ +o[e])*n:0,[g,v]=t;return[g+c*n+y,v+f*u]}:t=>t}function cU(t){return parseFloat(t)/100}function cq(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?cU(e)*a:+e,"string"==typeof n?cU(n)*l:+n]]});return[t,s]}function cY(t){return"function"==typeof t?t:e=>e[t]}function cX(t,e){return Array.from(t,cY(e))}function cK(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=cX(o,n),s=cX(o,r),u=cX(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 cZ(t,e){return t.getBandWidth(t.invert(e))}let cQ={rect:cm,hollow:cv,funnel:cA,pyramid:cC},cJ=()=>(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=cZ(u,i[t]),n=c?cZ(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]};cJ.props={defaultShape:"rect",defaultLabelShape:"label",composite:!1,shape:cQ,channels:[...cB({shapes:Object.keys(cQ)}),{name:"x",scale:"band",required:!0},{name:"y",required:!0},{name:"series",scale:"band"},{name:"size"}],preInference:[...cG(),{type:tZ},{type:tQ}],postInference:[...cW()],interaction:{shareTooltip:!0}};let c0={rect:cm,hollow:cv},c1=()=>(t,e,n,r)=>{let{x:i,x1:o,y:a,y1:l}=n,s=Array.from(t,t=>{let e=[+i[t],+a[t]],n=[+o[t],+a[t]];return[e,n,[+o[t],+l[t]],[+i[t],+l[t]]].map(t=>r.map(t))});return[t,s]};c1.props={defaultShape:"rect",defaultLabelShape:"label",composite:!1,shape:c0,channels:[...cB({shapes:Object.keys(c0)}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...cG(),{type:tZ}],postInference:[...cW()],interaction:{shareTooltip:!0}};var c2=c3(cO);function c5(t){this._curve=t}function c3(t){function e(e){return new c5(t(e))}return e._curve=t,e}function c4(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(c3(t)):e()._curve},t}function c6(t){let e="function"==typeof t?t:t.render;return class extends lj{connectedCallback(){this.draw()}attributeChangedCallback(){this.draw()}draw(){e(this)}}}c5.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 c8=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 c9=c6(t=>{let{d1:e,d2:n,style1:r,style2:i}=t.attributes,o=t.ownerDocument;up(t).maybeAppend("line",()=>o.createElement("path",{})).style("d",e).call(ca,r),up(t).maybeAppend("line1",()=>o.createElement("path",{})).style("d",n).call(ca,i)}),c7=(t,e)=>{let{curve:n,gradient:r=!1,gradientColor:i="between",defined:o=t=>!Number.isNaN(t)&&null!=t,connect:a=!1}=t,l=c8(t,["curve","gradient","gradientColor","defined","connect"]),{coordinate:s,document:u}=e;return(t,e,c)=>{let f,{color:p,lineWidth:h}=c,d=c8(c,["color","lineWidth"]),{color:y=p,size:g=h,seriesColor:v,seriesX:b,seriesY:x}=e,O=cp(s,e),w=ey(s),E=r&&v?cs(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(eg(s)){let t=s.getCenter();f=e=>c4(ck().curve(c2)).angle((n,r)=>um(ud(e[r],t))).radius((n,r)=>uy(e[r],t)).defined(([t,e])=>o(t)&&o(e)).curve(n)(e)}else f=ck().x(t=>t[0]).y(t=>t[1]).defined(([t,e])=>o(t)&&o(e)).curve(n);let[M,S]=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),_=ua(k,"connect"),P=!!S.length;return P&&(!a||Object.keys(_).length)?P&&!a?up(u.createElement("path",{})).style("d",f(t)).call(ca,k).node():up(new c9).style("style1",Object.assign(Object.assign({},k),_)).style("style2",k).style("d1",S.map(f).join(",")).style("d2",f(t)).node():up(u.createElement("path",{})).style("d",f(M)||[]).call(ca,k).node()}};c7.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let ft=(t,e)=>{let{coordinate:n}=e;return(...r)=>c7(Object.assign({curve:eg(n)?c_:cO},t),e)(...r)};function fe(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 fn(t,e){this._context=t,this._k=(1-e)/6}function fr(t,e){this._context=t,this._k=(1-e)/6}function fi(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 fo(t,e){this._context=t,this._alpha=e}function fa(t,e){this._context=t,this._alpha=e}ft.props=Object.assign(Object.assign({},c7.props),{defaultMarker:"line"}),fn.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:fe(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:fe(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 fn(t,e)}return n.tension=function(e){return t(+e)},n}(0),fr.prototype={areaStart:cM,areaEnd:cM,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:fe(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 fr(t,e)}return n.tension=function(e){return t(+e)},n}(0),fo.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:fi(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 fo(t,e):new fn(t,0)}return n.alpha=function(e){return t(+e)},n}(.5),fa.prototype={areaStart:cM,areaEnd:cM,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:fi(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 fl=function t(e){function n(t){return e?new fa(t,e):new fr(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function fs(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 fu(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function fc(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 ff(t){this._context=t}function fp(t){this._context=new fh(t)}function fh(t){this._context=t}function fd(t){return new ff(t)}function fy(t){return new fp(t)}ff.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:fc(this,this._t0,fu(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,fc(this,fu(this,n=fs(this,t,e)),n);break;default:fc(this,this._t0,n=fs(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}},(fp.prototype=Object.create(ff.prototype)).point=function(t,e){ff.prototype.point.call(this,e,t)},fh.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 fg=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 fm=(t,e)=>{let n=fg(t,[]),{coordinate:r}=e;return(...t)=>c7(Object.assign({curve:eg(r)?fl:ey(r)?fy:fd},n),e)(...t)};function fv(t,e){this._context=t,this._t=e}function fb(t){return new fv(t,.5)}function fx(t){return new fv(t,0)}function fO(t){return new fv(t,1)}fm.props=Object.assign(Object.assign({},c7.props),{defaultMarker:"smooth"}),fv.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 fw=(t,e)=>c7(Object.assign({curve:fO},t),e);fw.props=Object.assign(Object.assign({},c7.props),{defaultMarker:"hv"});let fE=(t,e)=>c7(Object.assign({curve:fx},t),e);fE.props=Object.assign(Object.assign({},c7.props),{defaultMarker:"vh"});let fk=(t,e)=>c7(Object.assign({curve:fb},t),e);fk.props=Object.assign(Object.assign({},c7.props),{defaultMarker:"hvh"});var fM=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 fS=(t,e)=>{let{document:n}=e;return(e,r,i)=>{let{seriesSize:o,color:a}=r,{color:l}=i,s=fM(i,["color"]),u=ea();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(uo)&&function(t,e,n,r,i){let o=ug(ud(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=ud(d,s),g=ud(n,s),v=ud(e,l),b=ud(v,c),x=ud(e,c),O=ud(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 up(n.createElement("path",{})).call(ca,s).style("fill",a||l).style("d",u.toString()).call(ca,t).node()}};fS.props=Object.assign(Object.assign({},c7.props),{defaultMarker:"line"});let f_=()=>(t,e)=>{let{style:n={},encode:r}=e,{series:i}=r,{gradient:o}=n;return!o||i?[t,e]:[t,tG({},e,{encode:{series:tU(tq(t,void 0))}})]};f_.props={};let fP=()=>(t,e)=>{let{encode:n}=e,{series:r,color:i}=n;if(void 0!==r||void 0===i)return[t,e];let[o,a]=tY(n,"color");return[t,tG({},e,{encode:{series:tH(o,a)}})]};fP.props={};let fj={line:ft,smooth:fm,hv:fw,vh:fE,hvh:fk,trail:fS},fA=(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(s2(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]},fT=(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]},fC=()=>(t,e,n,r)=>(eb(r)?fT:fA)(t,e,n,r);fC.props={defaultShape:"line",defaultLabelShape:"label",composite:!1,shape:fj,channels:[...cB({shapes:Object.keys(fj)}),{name:"x"},{name:"y"},{name:"position",independent:!0},{name:"size"},{name:"series",scale:"band"}],preInference:[...cG(),{type:f_},{type:fP}],postInference:[...cW(),{type:cL,channel:"color"},{type:cI,channel:["position"]}],interaction:{shareTooltip:!0,seriesTooltip:!0,crosshairs:!0}};var fN=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 fL=(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"]];fL.style=["fill"];let fI=fL.bind(void 0);fI.style=["stroke","lineWidth"];let fR=(t,e,n)=>[["M",t-n,e-n],["L",t+n,e-n],["L",t+n,e+n],["L",t-n,e+n],["Z"]];fR.style=["fill"];let fD=fR.bind(void 0);fD.style=["fill"];let fF=fR.bind(void 0);fF.style=["stroke","lineWidth"];let fB=(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"]]};fB.style=["fill"];let fz=fB.bind(void 0);fz.style=["stroke","lineWidth"];let fW=(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"]]};fW.style=["fill"];let f$=fW.bind(void 0);f$.style=["stroke","lineWidth"];let fG=(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"]]};fG.style=["fill"];let fH=fG.bind(void 0);fH.style=["stroke","lineWidth"];let fV=(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"]]};fV.style=["fill"];let fU=fV.bind(void 0);fU.style=["stroke","lineWidth"];let fq=(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"]]};fq.style=["fill"];let fY=fq.bind(void 0);fY.style=["stroke","lineWidth"];let fX=(t,e,n)=>[["M",t,e+n],["L",t,e-n]];fX.style=["stroke","lineWidth"];let fK=(t,e,n)=>[["M",t-n,e-n],["L",t+n,e+n],["M",t+n,e-n],["L",t-n,e+n]];fK.style=["stroke","lineWidth"];let fZ=(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]];fZ.style=["stroke","lineWidth"];let fQ=(t,e,n)=>[["M",t-n,e],["L",t+n,e],["M",t,e-n],["L",t,e+n]];fQ.style=["stroke","lineWidth"];let fJ=(t,e,n)=>[["M",t-n,e],["L",t+n,e]];fJ.style=["stroke","lineWidth"];let f0=(t,e,n)=>[["M",t-n,e],["L",t+n,e]];f0.style=["stroke","lineWidth"];let f1=f0.bind(void 0);f1.style=["stroke","lineWidth"];let f2=(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]];f2.style=["stroke","lineWidth"];let f5=(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]];f5.style=["stroke","lineWidth"];let f3=(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]];f3.style=["stroke","lineWidth"];let f4=(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]];f4.style=["stroke","lineWidth"];let f6=(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]];f6.style=["stroke","lineWidth"];let f8=new Map([["bowtie",fq],["cross",fK],["dash",f1],["diamond",fB],["dot",f0],["hexagon",fV],["hollowBowtie",fY],["hollowDiamond",fz],["hollowHexagon",fU],["hollowPoint",fI],["hollowSquare",fF],["hollowTriangle",f$],["hollowTriangleDown",fH],["hv",f5],["hvh",f4],["hyphen",fJ],["line",fX],["plus",fQ],["point",fL],["rect",fD],["smooth",f2],["square",fR],["tick",fZ],["triangleDown",fG],["triangle",fW],["vh",f3],["vhv",f6]]);var f9=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 f7=(t,e)=>{let{colorAttribute:n,symbol:r,mode:i="auto"}=t,o=f9(t,["colorAttribute","symbol","mode"]),a=f8.get(r)||f8.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]=ch(e),b=function(t,e,n,r){if(1===e.length)return;let{size:i}=n;if("fixed"===t)return i;if("normal"===t||ex(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 up(s.createElement("path",{})).call(ca,u).style("fill","transparent").style("d",a(g,v,b)).style("lineWidth",p).style("transform",d).style("stroke",h).style(cf(t),y).style(n,h).call(ca,o).node()}};f7.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let pt=(t,e)=>f7(Object.assign({colorAttribute:"stroke",symbol:"point"},t),e);pt.props=Object.assign({defaultMarker:"hollowPoint"},f7.props);let pe=(t,e)=>f7(Object.assign({colorAttribute:"stroke",symbol:"diamond"},t),e);pe.props=Object.assign({defaultMarker:"hollowDiamond"},f7.props);let pn=(t,e)=>f7(Object.assign({colorAttribute:"stroke",symbol:"hexagon"},t),e);pn.props=Object.assign({defaultMarker:"hollowHexagon"},f7.props);let pr=(t,e)=>f7(Object.assign({colorAttribute:"stroke",symbol:"square"},t),e);pr.props=Object.assign({defaultMarker:"hollowSquare"},f7.props);let pi=(t,e)=>f7(Object.assign({colorAttribute:"stroke",symbol:"triangle-down"},t),e);pi.props=Object.assign({defaultMarker:"hollowTriangleDown"},f7.props);let po=(t,e)=>f7(Object.assign({colorAttribute:"stroke",symbol:"triangle"},t),e);po.props=Object.assign({defaultMarker:"hollowTriangle"},f7.props);let pa=(t,e)=>f7(Object.assign({colorAttribute:"stroke",symbol:"bowtie"},t),e);pa.props=Object.assign({defaultMarker:"hollowBowtie"},f7.props);let pl=(t,e)=>f7(Object.assign({colorAttribute:"fill",symbol:"point"},t),e);pl.props=Object.assign({defaultMarker:"point"},f7.props);let ps=(t,e)=>f7(Object.assign({colorAttribute:"stroke",symbol:"plus"},t),e);ps.props=Object.assign({defaultMarker:"plus"},f7.props);let pu=(t,e)=>f7(Object.assign({colorAttribute:"fill",symbol:"diamond"},t),e);pu.props=Object.assign({defaultMarker:"diamond"},f7.props);let pc=(t,e)=>f7(Object.assign({colorAttribute:"fill",symbol:"square"},t),e);pc.props=Object.assign({defaultMarker:"square"},f7.props);let pf=(t,e)=>f7(Object.assign({colorAttribute:"fill",symbol:"triangle"},t),e);pf.props=Object.assign({defaultMarker:"triangle"},f7.props);let pp=(t,e)=>f7(Object.assign({colorAttribute:"fill",symbol:"hexagon"},t),e);pp.props=Object.assign({defaultMarker:"hexagon"},f7.props);let ph=(t,e)=>f7(Object.assign({colorAttribute:"stroke",symbol:"cross"},t),e);ph.props=Object.assign({defaultMarker:"cross"},f7.props);let pd=(t,e)=>f7(Object.assign({colorAttribute:"fill",symbol:"bowtie"},t),e);pd.props=Object.assign({defaultMarker:"bowtie"},f7.props);let py=(t,e)=>f7(Object.assign({colorAttribute:"stroke",symbol:"hyphen"},t),e);py.props=Object.assign({defaultMarker:"hyphen"},f7.props);let pg=(t,e)=>f7(Object.assign({colorAttribute:"stroke",symbol:"line"},t),e);pg.props=Object.assign({defaultMarker:"line"},f7.props);let pm=(t,e)=>f7(Object.assign({colorAttribute:"stroke",symbol:"tick"},t),e);pm.props=Object.assign({defaultMarker:"tick"},f7.props);let pv=(t,e)=>f7(Object.assign({colorAttribute:"fill",symbol:"triangle-down"},t),e);pv.props=Object.assign({defaultMarker:"triangleDown"},f7.props);let pb=()=>(t,e)=>{let{encode:n}=e,{y:r}=n;return void 0!==r?[t,e]:[t,tG({},e,{encode:{y:tV(tq(t,0))},scale:{y:{guide:null}}})]};pb.props={};let px=()=>(t,e)=>{let{encode:n}=e,{size:r}=n;return void 0!==r?[t,e]:[t,tG({},e,{encode:{size:tU(tq(t,3))}})]};px.props={};let pO={hollow:pt,hollowDiamond:pe,hollowHexagon:pn,hollowSquare:pr,hollowTriangleDown:pi,hollowTriangle:po,hollowBowtie:pa,point:pl,plus:ps,diamond:pu,square:pc,triangle:pf,hexagon:pp,cross:ph,bowtie:pd,hyphen:py,line:pg,tick:pm,triangleDown:pv},pw=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=cV(n,r,t),y=t=>{let e=+((null==c?void 0:c[t])||0),n=+((null==f?void 0:f[t])||0),r=l?(+o[t]+ +l[t])/2:+o[t];return[r+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]};pw.props={defaultShape:"hollow",defaultLabelShape:"label",composite:!1,shape:pO,channels:[...cB({shapes:Object.keys(pO)}),{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:[...cG(),{type:tQ},{type:pb}],postInference:[{type:px},...cz()]};var pE=function(t){return"function"==typeof t};function pk(t){pS(t,!0)}function pM(t){pS(t,!1)}function pS(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 p_=function(t){return"object"==typeof t&&null!==t},pP={}.toString,pj=function(t,e){return pP.call(t)==="[object "+e+"]"},pA=function(t){if(!p_(t)||!pj(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},pT=function(t){return Array.isArray?Array.isArray(t):pj(t,"Array")},pC=function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=5),Object.entries(e).forEach(function(i){var o=eT(i,2),a=o[0],l=o[1];Object.prototype.hasOwnProperty.call(e,a)&&(l?pA(l)?(pA(t[a])||(t[a]={}),n<r?pC(t[a],l,n+1,r):t[a]=e[a]):pT(l)?(t[a]=[],t[a]=t[a].concat(l)):t[a]=l:t[a]=l)})},pN=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)pC(t,e[r]);return t},pL=function(t){function e(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=t.apply(this,eN([],eT(e),!1))||this;return r.addEventListener(M1.INSERTED,function(){pM(r)}),r}return eM(e,t),e}(lT);function pI(t){var e=t.appendChild(new pL({class:"offscreen"}));return pM(e),e}function pR(){pS(this,"hidden"!==this.attributes.visibility)}var pD=function(t){function e(e,n){void 0===n&&(n={});var r=t.call(this,pN({},{style:n},e))||this;return r.initialized=!1,r._defaultOptions=n,r}return eM(e,t),Object.defineProperty(e.prototype,"offscreenGroup",{get:function(){return this._offscreen||(this._offscreen=pI(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&&pR.call(this)},e.prototype.update=function(t,e){var n;return this.attr(pN({},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}(lj);function pF(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 pB=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=e_(e,["style"]);return t.call(this,eS({style:eS({text:"",fill:"black",fontFamily:"sans-serif",fontSize:16,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",lineWidth:1,textAlign:"start",textBaseline:"middle"},n)},r))||this}return eM(e,t),Object.defineProperty(e.prototype,"offscreenGroup",{get:function(){return this._offscreen||(this._offscreen=pI(this)),this._offscreen},enumerable:!1,configurable:!0}),e.prototype.disconnectedCallback=function(){var t;null==(t=this._offscreen)||t.destroy()},e}(lB),pz=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=eT(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=eL(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=eL(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=eL(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,eA(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 S=[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,S)},r.prototype.merge=function(t){var n=eN(eN([],eT(this._elements),!1),eT(t._elements),!1),r=eN(eN([],eT(this._transitions),!1),eT(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=eT(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,eN([this._parent,this],eT(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:lT,rect:lF,circle:lP,path:lI,text:pB,ellipse:lA,image:lN,line:lL,polygon:lR,polyline:lD,html:lC},r}();function pW(t){return new pz([t],null,t,t.ownerDocument)}var p$=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"]]},pG=function(t,e,n){return[["M",t,e+n],["L",t,e-n]]},pH=function(t,e,n){return[["M",t-n,e],["L",t+n,e]]},pV=function(t){var e=typeof t;return null!==t&&"object"===e||"function"===e},pU=function(t){return pj(t,"String")},pq=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return eM(e,t),e.prototype.render=function(t,n){var r,i=t.symbol,o=t.size,a=void 0===o?16:o,l=e_(t,["symbol","size"]),s=["base64","url","image"].includes(r=function(t){var e="default";if(pV(t)&&t instanceof Image)e="image";else if(pE(t))e="symbol";else if(pU(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;pF(!!s,pW(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=pE(i)?i:e.getSymbol(i);t.styles(eS({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}(pD);pq.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]]}),pq.registerSymbol("hyphen",function(t,e,n){return[["M",t-n,e],["L",t+n,e]]}),pq.registerSymbol("line",pG),pq.registerSymbol("plus",function(t,e,n){return[["M",t-n,e],["L",t+n,e],["M",t,e-n],["L",t,e+n]]}),pq.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]]}),pq.registerSymbol("circle",p$),pq.registerSymbol("point",p$),pq.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"]]}),pq.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"]]}),pq.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"]]}),pq.registerSymbol("diamond",function(t,e,n){return[["M",t-n,e],["L",t,e-n],["L",t+n,e],["L",t,e+n],["Z"]]}),pq.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"]]}),pq.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"]]}),pq.registerSymbol("line",pG),pq.registerSymbol("dot",pH),pq.registerSymbol("dash",pH),pq.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]]}),pq.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]]}),pq.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]]}),pq.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]]}),pq.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 pY=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 pX=(t,e,n)=>{let r=uy(t,e),i=uy(e,n);return(Math.pow(r,2)+Math.pow(i,2)-Math.pow(uy(n,t),2))/(2*r*i)},pK=c6(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=pY(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=>!ct(t)))return void t.children.forEach(t=>t.remove());let w=ua(O,"background"),{padding:E}=w,k=pY(w,["padding"]),M=ua(O,"connector"),{points:S=[]}=M,_=pY(M,["points"]),P=[[+f,+p],[+u,+c]];e=x?up(t).maybeAppend("html","html",r).style("zIndex",0).style("innerHTML",x).call(ca,Object.assign({transform:l,transformOrigin:s},O)).node():up(t).maybeAppend("text","text").style("zIndex",0).style("text",h).call(ca,Object.assign({textBaseline:"middle",transform:l,transformOrigin:s},O)).node();let j=function(t,e,n,r){let[[i,o],[a,l]]=e,[s,u]=function(t){let{min:[e,n],max:[r,i]}=t.getLocalBounds(),o=0,a=0;return e>0&&(o=e),r<0&&(o=r),n>0&&(a=n),i<0&&(a=i),[o,a]}(t);if(i===a&&o===l)return ck()([[0,0],[s,u]]);let c=[[i-a,o-l]].concat(n.length?n:[[0,0]]),f=[r[0]-a,r[1]-l],[p,h]=c;if(pX(f,p,h)>0){let e=(()=>{let{min:e,max:n}=t.getLocalBounds(),r=p[0]+(p[1]-f[1])*(p[1]-0)/(p[0]-f[0]);return n[0]<f[0]?Math.min(n[0],r):Math.max(e[0],r)})();c.splice(1,1,[e,0])}return ck()(c)}(up(t).maybeAppend("background","rect").style("zIndex",-1).call(ca,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(ca,d?k:{}).node(),P,S,b),A=g&&new pq({id:"startMarker",style:Object.assign({x:0,y:0},ua(O,"startMarker"))}),T=v&&new pq({id:"endMarker",style:Object.assign({x:0,y:0},ua(O,"endMarker"))});up(t).maybeAppend("connector","path").style("zIndex",0).style("path",j).style("markerStart",A).style("markerEnd",T).call(ca,y?_:{})}),pZ=(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 up(new pK).style("x",f).style("y",p).call(ca,i).style("transform",`${u}rotate(${+s})`).style("coordCenter",n.getCenter()).call(ca,c).call(ca,t).node()}};pZ.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var pQ=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 pJ=c6(t=>{let e=t.attributes,{class:n,x:r,y:i}=e,o=pQ(e,["class","x","y"]),a=ua(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]}(up(t).maybeAppend("marker",()=>new pq({})).call(t=>t.node().update(Object.assign({symbol:s},a))).node());up(t).maybeAppend("text","text").style("x",u).style("y",c).call(ca,o)}),p0=(t,e)=>{let n=pQ(t,[]);return(t,e,r)=>{let{color:i}=r,o=pQ(r,["color"]),{color:a=i,text:l=""}=e,s={text:String(l),stroke:a,fill:a},[[u,c]]=t;return up(new pJ).call(ca,o).style("x",u).style("y",c).call(ca,s).call(ca,n).node()}};p0.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let p1=()=>(t,e)=>{let{data:n}=e;if(!Array.isArray(n)||n.some(tK))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,tG({},e,{encode:{x:tH(i),y:tH(o)}})]};p1.props={};var p2=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 p5=()=>(t,e)=>{let{data:n,style:r={}}=e,i=p2(e,["data","style"]),{x:o,y:a}=r,l=p2(r,["x","y"]);return void 0==o||void 0==a?[t,e]:[[0],tG({},i,{data:[0],cartesian:!0,encode:{x:tH([o||0]),y:tH([a||0])},scale:{x:{type:"identity",independent:!0,guide:null},y:{type:"identity",independent:!0,guide:null}},style:l})]};p5.props={};let p3={text:pZ,badge:p0},p4=t=>{let{cartesian:e=!1}=t;return e?cq:(e,n,r,i)=>{let{x:o,y:a}=r,l=cV(n,r,t),s=Array.from(e,t=>{let e=[+o[t],+a[t]];return[i.map(l(e,t))]});return[e,s]}};p4.props={defaultShape:"text",defaultLabelShape:"label",composite:!1,shape:p3,channels:[...cB({shapes:Object.keys(p3)}),{name:"x",required:!0},{name:"y",required:!0},{name:"text",scale:"identity"},{name:"fontSize"},{name:"rotate"}],preInference:[...cG(),{type:p1},{type:p5}],postInference:[...cz()]};let p6=()=>(t,e)=>[t,tG({scale:{x:{padding:0},y:{padding:0}}},e)];p6.props={};let p8={cell:cm,hollow:cv},p9=()=>(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 p7(t,e,n){var r=null,i=tJ(!0),o=null,a=cO,l=null,s=el(u);function u(u){var c,f,p,h,d,y=(u=cb(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 ck().defined(i).curve(a).context(o)}return t="function"==typeof t?t:void 0===t?cw:tJ(+t),e="function"==typeof e?e:void 0===e?tJ(0):tJ(+e),n="function"==typeof n?n:void 0===n?cE:tJ(+n),u.x=function(e){return arguments.length?(t="function"==typeof e?e:tJ(+e),r=null,u):t},u.x0=function(e){return arguments.length?(t="function"==typeof e?e:tJ(+e),u):t},u.x1=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:tJ(+t),u):r},u.y=function(t){return arguments.length?(e="function"==typeof t?t:tJ(+t),n=null,u):e},u.y0=function(t){return arguments.length?(e="function"==typeof t?t:tJ(+t),u):e},u.y1=function(t){return arguments.length?(n=null==t?null:"function"==typeof t?t:tJ(+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:tJ(!!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}p9.props={defaultShape:"cell",defaultLabelShape:"label",shape:p8,composite:!1,channels:[...cB({shapes:Object.keys(p8)}),{name:"x",required:!0,scale:"band"},{name:"y",required:!0,scale:"band"}],preInference:[...cG(),{type:tQ},{type:pb},{type:p6}],postInference:[...cz()]};var ht=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 he=c6(t=>{let{areaPath:e,connectPath:n,areaStyle:r,connectStyle:i}=t.attributes,o=t.ownerDocument;up(t).maybeAppend("connect-path",()=>o.createElement("path",{})).style("d",n).call(ca,i),up(t).maybeAppend("area-path",()=>o.createElement("path",{})).style("d",e).call(ca,r)}),hn=(t,e)=>{let{curve:n,gradient:r=!1,defined:i=t=>!Number.isNaN(t)&&null!=t,connect:o=!1}=t,a=ht(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=ey(l),g=cp(l,e),v=r&&p?cs(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=ua(b,"connect"),E=!!O.length,k=t=>up(s.createElement("path",{})).style("d",t||"").call(ca,b).node();if(eg(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=p7().curve(c2)).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 c4(o())},delete e.lineX0,e.lineEndAngle=function(){return c4(a())},delete e.lineX1,e.lineInnerRadius=function(){return c4(s())},delete e.lineY0,e.lineOuterRadius=function(){return c4(u())},delete e.lineY1,e.curve=function(t){return arguments.length?r(c3(t)):r()._curve},e).angle((t,e)=>um(ud(f[e],c))).outerRadius((t,e)=>uy(f[e],c)).innerRadius((t,e)=>uy(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)):up(new he).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?p7().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):p7().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)):up(new he).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))}}};hn.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let hr=(t,e)=>{let{coordinate:n}=e;return(...r)=>hn(Object.assign({curve:eg(n)?c_:cO},t),e)(...r)};hr.props=Object.assign(Object.assign({},hn.props),{defaultMarker:"square"});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 ho=(t,e)=>{let n=hi(t,[]),{coordinate:r}=e;return(...t)=>hn(Object.assign({curve:eg(r)?fl:ey(r)?fy:fd},n),e)(...t)};ho.props=Object.assign(Object.assign({},hn.props),{defaultMarker:"smooth"});let ha=(t,e)=>(...n)=>hn(Object.assign({curve:fb},t),e)(...n);ha.props=Object.assign(Object.assign({},hn.props),{defaultMarker:"hvh"});let hl=(t,e)=>(...n)=>hn(Object.assign({curve:fx},t),e)(...n);hl.props=Object.assign(Object.assign({},hn.props),{defaultMarker:"vh"});let hs=(t,e)=>(...n)=>hn(Object.assign({curve:fO},t),e)(...n);hs.props=Object.assign(Object.assign({},hn.props),{defaultMarker:"hv"});let hu={area:hr,smooth:ho,hvh:ha,vh:hl,hv:hs},hc=()=>(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(s2(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]};hc.props={defaultShape:"area",defaultLabelShape:"label",composite:!1,shape:hu,channels:[...cB({shapes:Object.keys(hu)}),{name:"x",required:!0},{name:"y",required:!0},{name:"size"},{name:"series",scale:"band"}],preInference:[...cG(),{type:fP},{type:tZ},{type:p6}],postInference:[...cW()],interaction:{shareTooltip:!0,seriesTooltip:!0,crosshairs:!0}};let hf=()=>(t,e)=>{let{encode:n}=e,{y1:r}=n;if(r)return[t,e];let[i]=tY(n,"y");return[t,tG({},e,{encode:{y1:tH([...i])}})]};hf.props={};let hp=()=>(t,e)=>{let{encode:n}=e,{x1:r}=n;if(r)return[t,e];let[i]=tY(n,"x");return[t,tG({},e,{encode:{x1:tH([...i])}})]};hp.props={};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{arrow:n=!0,arrowSize:r="40%"}=t,i=hh(t,["arrow","arrowSize"]),{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=ea();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*uy(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 up(o.createElement("path",{})).call(ca,s).style("d",h.toString()).style("stroke",u).style("transform",c).call(ca,i).node()}};hd.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let hy=(t,e)=>{let{arrow:n=!1}=t;return(...r)=>hd(Object.assign(Object.assign({},t),{arrow:n}),e)(...r)};hy.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};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};let hm=(t,e)=>{let n=hg(t,[]),{coordinate:r,document:i}=e;return(t,e,o)=>{let{color:a}=o,l=hg(o,["color"]),{color:s=a,transform:u}=e,[c,f]=t,p=ea();if(p.moveTo(c[0],c[1]),eg(r)){let t=r.getCenter();p.quadraticCurveTo(t[0],t[1],f[0],f[1])}else{let t=ux(c,f),e=uy(c,f)/2;cl(p,c,f,t,e)}return up(i.createElement("path",{})).call(ca,l).style("d",p.toString()).style("stroke",s).style("transform",u).call(ca,n).node()}};hm.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var hv=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 hb=(t,e)=>{let n=hv(t,[]),{document:r}=e;return(t,e,i)=>{let{color:o}=i,a=hv(i,["color"]),{color:l=o,transform:s}=e,[u,c]=t,f=ea();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]),up(r.createElement("path",{})).call(ca,a).style("d",f.toString()).style("stroke",l).style("transform",s).call(ca,n).node()}};hb.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var hx=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 hO=(t,e)=>{let{cornerRatio:n=1/3}=t,r=hx(t,["cornerRatio"]),{coordinate:i,document:o}=e;return(t,e,a)=>{let{defaultColor:l}=a,s=hx(a,["defaultColor"]),{color:u=l,transform:c}=e,[f,p]=t,h=function(t,e,n,r){let i=ea();if(eg(n)){let o=n.getCenter(),a=uy(t,o),l=uy(e,o);return i.moveTo(t[0],t[1]),cl(i,t,e,o,(l-a)*r+a),i.lineTo(e[0],e[1]),i}return ey(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 up(o.createElement("path",{})).call(ca,s).style("d",h.toString()).style("stroke",u).style("transform",c).call(ca,r).node()}};hO.props={defaultMarker:"vhv",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let hw={link:hy,arc:hm,smooth:hb,vhv:hO},hE=t=>(e,n,r,i)=>{let{x:o,y:a,x1:l=o,y1:s=a}=r,u=cV(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]};hE.props={defaultShape:"link",defaultLabelShape:"label",composite:!1,shape:hw,channels:[...cB({shapes:Object.keys(hw)}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...cG(),{type:hf},{type:hp}],postInference:[...cz()]};var hk=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 hM=(t,e)=>{let{coordinate:n,document:r}=e;return(e,i,o)=>{let{color:a}=o,l=hk(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?cU(p)*g:p,h="string"==typeof h?cU(h)*v:h;let b=d-Number(p)/2,x=y-Number(h)/2;return up(r.createElement("image",{})).call(ca,l).style("x",b).style("y",x).style("img",u).style("stroke",s).style("transform",f).call(ca,t).style("width",p).style("height",h).node()}};hM.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let hS={image:hM},h_=t=>{let{cartesian:e}=t;return e?cq:(e,n,r,i)=>{let{x:o,y:a}=r,l=cV(n,r,t),s=Array.from(e,t=>{let e=[+o[t],+a[t]];return[i.map(l(e,t))]});return[e,s]}};h_.props={defaultShape:"image",defaultLabelShape:"label",composite:!1,shape:hS,channels:[...cB({shapes:Object.keys(hS)}),{name:"x",required:!0},{name:"y",required:!0},{name:"src",scale:"identity"},{name:"size"}],preInference:[...cG(),{type:p1},{type:p5}],postInference:[...cz()]};var hP=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 hj=(t,e)=>{let{coordinate:n,document:r}=e;return(e,i,o)=>{let{color:a}=o,l=hP(o,["color"]),{color:s=a,transform:u}=i,c=function(t,e){let n=ea();if(eg(e)){let r=e.getCenter(),i=[...t,t[0]],o=i.map(t=>uy(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)?cl(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 up(r.createElement("path",{})).call(ca,l).style("d",c.toString()).style("stroke",s).style("fill",s).style("transform",u).call(ca,t).node()}};hj.props={defaultMarker:"square",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};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 hT=(t,e)=>{let n=hA(t,[]),{coordinate:r,document:i}=e;return(t,e,o)=>{let{color:a}=o,l=hA(o,["color"]),{color:s=a,transform:u}=e,c=function(t,e){let[n,r,i,o]=t,a=ea();if(eg(e)){let t=e.getCenter(),l=uy(t,n);return a.moveTo(n[0],n[1]),a.quadraticCurveTo(t[0],t[1],i[0],i[1]),cl(a,i,o,t,l),a.quadraticCurveTo(t[0],t[1],r[0],r[1]),cl(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 up(i.createElement("path",{})).call(ca,l).style("d",c.toString()).style("fill",s||a).style("stroke",s||a).style("transform",u).call(ca,n).node()}};hT.props={defaultMarker:"square",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let hC={polygon:hj,ribbon:hT},hN=()=>(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]};hN.props={defaultShape:"polygon",defaultLabelShape:"label",composite:!1,shape:hC,channels:[...cB({shapes:Object.keys(hC)}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...cG()],postInference:[...cz()]};var hL=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 hI=(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=hL(o,["color","fill","stroke"]),p=function(t,e){let n=ea();if(eg(e)){let r=e.getCenter(),[i,o]=r,a=ug(ud(t[0],r)),l=ug(ud(t[1],r)),s=uy(r,t[2]),u=uy(r,t[3]),c=uy(r,t[8]),f=uy(r,t[10]),p=uy(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 up(r.createElement("path",{})).call(ca,f).style("d",p.toString()).style("stroke",c).style("fill",a||u).style("transform",l).call(ca,t).node()}};hI.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var hR=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{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=hR(o,["color","fill","stroke"]),p=function(t,e,n=4){let r=ea();if(!eg(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=uy(i,t[3]),s=uy(i,t[8]),u=uy(i,t[10]),c=ug(ud(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 up(r.createElement("path",{})).call(ca,f).style("d",p.toString()).style("stroke",c).style("fill",a||u).style("transform",l).call(ca,t).node()}};hD.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let hF={box:hI,violin:hD},hB=()=>(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]};hB.props={defaultShape:"box",defaultLabelShape:"label",composite:!1,shape:hF,channels:[...cB({shapes:Object.keys(hF)}),{name:"x",scale:"band",required:!0},{name:"y",required:!0},{name:"series",scale:"band"}],preInference:[...cG(),{type:tQ}],postInference:[...cW()],interaction:{shareTooltip:!0}};let hz={vector:hd},hW=()=>(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]};hW.props={defaultShape:"vector",defaultLabelShape:"label",composite:!1,shape:hz,channels:[...cB({shapes:Object.keys(hz)}),{name:"x",required:!0},{name:"y",required:!0},{name:"rotate",required:!0,scale:"identity"},{name:"size",required:!0}],preInference:[...cG()],postInference:[...cz()]};var h$=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 hG=(t,e)=>{let{arrow:n,arrowSize:r=4}=t,i=h$(t,["arrow","arrowSize"]),{coordinate:o,document:a}=e;return(t,e,l)=>{var s;let{color:u,lineWidth:c}=l,f=h$(l,["color","lineWidth"]),{color:p=u,size:h=c}=e,d=n?(s=Object.assign({fill:i.stroke||p,stroke:i.stroke||p},ua(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(!eg(e))return ck().x(t=>t[0]).y(t=>t[1])(t);let n=e.getCenter();return ed()({startAngle:0,endAngle:2*Math.PI,outerRadius:uy(t[0],n),innerRadius:uy(t[1],n)})}(t,o),g=function(t,e){if(!eg(t))return e;let[n,r]=t.getCenter();return`translate(${n}, ${r}) ${e||""}`}(o,e.transform);return up(a.createElement("path",{})).call(ca,f).style("d",y).style("stroke",p).style("lineWidth",h).style("transform",g).style("markerEnd",d).call(ca,i).node()}};hG.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let hH=()=>(t,e)=>{let{data:n}=e;return!Array.isArray(n)||n.some(tK)?[t,e]:[t,tG({},e,{encode:{x:tH(n)}})]};hH.props={};let hV={line:hG},hU=t=>(e,n,r,i)=>{let{x:o}=r,a=cV(n,r,tG({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]};hU.props={defaultShape:"line",defaultLabelShape:"label",composite:!1,shape:hV,channels:[...c$({shapes:Object.keys(hV)}),{name:"x",required:!0}],preInference:[...cG(),{type:hH}],postInference:[]};let hq=()=>(t,e)=>{let{data:n}=e;return!Array.isArray(n)||n.some(tK)?[t,e]:[t,tG({},e,{encode:{y:tH(n)}})]};hq.props={};let hY={line:hG},hX=t=>(e,n,r,i)=>{let{y:o}=r,a=cV(n,r,tG({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]};hX.props={defaultShape:"line",defaultLabelShape:"label",composite:!1,shape:hY,channels:[...c$({shapes:Object.keys(hY)}),{name:"y",required:!0}],preInference:[...cG(),{type:hq}],postInference:[]};var hK=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 hZ(t,e,n){return[["M",t,e],["L",t+2*n,e-n],["L",t+2*n,e+n],["Z"]]}let hQ=(t,e)=>{let{offset:n=0,offset1:r=n,offset2:i=n,connectLength1:o,endMarker:a=!0}=t,l=hK(t,["offset","offset1","offset2","connectLength1","endMarker"]),{coordinate:s}=e;return(t,e,n)=>{let{color:u,connectLength1:c}=n,f=hK(n,["color","connectLength1"]),{color:p,transform:h}=e,d=function(t,e,n,r,i=0){let[[o,a],[l,s]]=e;if(ey(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=ua(Object.assign(Object.assign({},l),n),"endMarker");return up(new lI).call(ca,f).style("path",ck().x(t=>t[0]).y(t=>t[1])(d)).style("stroke",p||u).style("transform",h).style("markerEnd",a?new pq({className:"marker",style:Object.assign(Object.assign({},y),{symbol:hZ})}):null).call(ca,l).node()}};hQ.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let hJ={connector:hQ},h0=(...t)=>hE(...t);function h1(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 h2(t={}){let{extendX:e=!1,extendY:n=!1}=t;return(t,r,i,o)=>{let a=h1("x",e,i,r.x),l=h1("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]}}h0.props={defaultShape:"connector",defaultLabelShape:"label",composite:!1,shape:hJ,channels:[...c$({shapes:Object.keys(hJ)}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...cG()],postInference:[]};let h5={range:cm},h3=()=>h2();h3.props={defaultShape:"range",defaultLabelShape:"label",composite:!1,shape:h5,channels:[...c$({shapes:Object.keys(h5)}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...cG()],postInference:[]};let h4=()=>(t,e)=>{let{data:n}=e;if(Array.isArray(n)&&(n.every(Array.isArray)||!n.some(tK))){let r=(t,e)=>Array.isArray(t[0])?t.map(t=>t[e]):[t[e]];return[t,tG({},e,{encode:{x:tH(r(n,0)),x1:tH(r(n,1))}})]}return[t,e]};h4.props={};let h6={range:cm},h8=()=>h2({extendY:!0});h8.props={defaultShape:"range",defaultLabelShape:"label",composite:!1,shape:h6,channels:[...c$({shapes:Object.keys(h6)}),{name:"x",required:!0}],preInference:[...cG(),{type:h4}],postInference:[]};let h9=()=>(t,e)=>{let{data:n}=e;if(Array.isArray(n)&&(n.every(Array.isArray)||!n.some(tK))){let r=(t,e)=>Array.isArray(t[0])?t.map(t=>t[e]):[t[e]];return[t,tG({},e,{encode:{y:tH(r(n,0)),y1:tH(r(n,1))}})]}return[t,e]};h9.props={};let h7={range:cm},dt=()=>h2({extendX:!0});dt.props={defaultShape:"range",defaultLabelShape:"label",composite:!1,shape:h7,channels:[...c$({shapes:Object.keys(h7)}),{name:"y",required:!0}],preInference:[...cG(),{type:h9}],postInference:[]};var de=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 dn=(t,e)=>{let{arrow:n,colorAttribute:r}=t,i=de(t,["arrow","colorAttribute"]),{coordinate:o,document:a}=e;return(t,e,n)=>{let{color:l,stroke:s}=n,u=de(n,["color","stroke"]),{d:c,color:f=l}=e,[p,h]=o.getSize();return up(a.createElement("path",{})).call(ca,u).style("d","function"==typeof c?c({width:p,height:h}):c).style(r,f).call(ca,i).node()}};dn.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let dr=(t,e)=>dn(Object.assign({colorAttribute:"fill"},t),e);dr.props={defaultMarker:"hvh",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let di=(t,e)=>dn(Object.assign({fill:"none",colorAttribute:"stroke"},t),e);di.props={defaultMarker:"hvh",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let da={path:dr,hollow:di},dl=t=>(t,e,n,r)=>[t,t.map(()=>[[0,0]])];dl.props={defaultShape:"path",defaultLabelShape:"label",shape:da,composite:!1,channels:[...cB({shapes:Object.keys(da)}),{name:"d",scale:"identity"}],preInference:[...cG()],postInference:[]};var ds=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 du=(t,e)=>{let{render:n}=t,r=ds(t,["render"]);return t=>{let[[i,o]]=t;return n(Object.assign(Object.assign({},r),{x:i,y:o}),e)}};du.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let dc=()=>(t,e)=>{let{style:n={}}=e;return[t,tG({},e,{style:Object.assign(Object.assign({},n),Object.fromEntries(Object.entries(n).filter(([,t])=>"function"==typeof t).map(([t,e])=>[t,()=>e])))})]};dc.props={};let df=t=>{let{cartesian:e}=t;return e?cq:(e,n,r,i)=>{let{x:o,y:a}=r,l=cV(n,r,t),s=Array.from(e,t=>{let e=[+o[t],+a[t]];return[i.map(l(e,t))]});return[e,s]}};df.props={defaultShape:"shape",defaultLabelShape:"label",composite:!1,shape:{shape:du},channels:[{name:"x",required:!0},{name:"y",required:!0}],preInference:[...cG(),{type:p1},{type:p5},{type:dc}]};var dp=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 dh=(t,e)=>{let{document:n}=e;return(e,r,i)=>{let{transform:o}=r,{color:a}=i,l=dp(i,["color"]),{color:s=a}=r,[u,...c]=e,f=ea();return f.moveTo(...u),c.forEach(([t,e])=>{f.lineTo(t,e)}),f.closePath(),up(n.createElement("path",{})).call(ca,l).style("d",f.toString()).style("stroke",s||a).style("fill",s||a).style("fillOpacity",.4).style("transform",o).call(ca,t).node()}};dh.props={defaultMarker:"square",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let dd={density:dh},dy=()=>(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 dg(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 dm(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 dv(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 db(t,e,n){let r=t?t():document.createElement("canvas");return r.width=e,r.height=n,r}dy.props={defaultShape:"density",defaultLabelShape:"label",composite:!1,shape:dd,channels:[...cB({shapes:Object.keys(dd)}),{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:[...cG(),{type:tZ},{type:tQ}],postInference:[...cW()],interaction:{shareTooltip:!0}},dv(3);let dx=function(t,e=(...t)=>`${t[0]}`,n=16){let r=dv(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=db(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 dO=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 dw=(t,e)=>{let{gradient:n,opacity:r,maxOpacity:i,minOpacity:o,blur:a,useGradientOpacity:l}=t,s=dO(t,["gradient","opacity","maxOpacity","minOpacity","blur","useGradientOpacity"]),{coordinate:u,createCanvas:c,document:f}=e;return(t,e,p)=>{var h,d;let{transform:y}=e,[g,v]=u.getSize(),b=t.map(t=>({x:t[0],y:t[1],value:t[2],radius:t[3]})),x=dg(t,t=>t[2]),O=dm(t,t=>t[2]),w=g&&v?function(t,e,n,r,i,o,a){let l=Object.assign({blur:.85,minOpacity:0,opacity:.6,maxOpacity:1,gradient:[[.25,"rgb(0,0,255)"],[.55,"rgb(0,255,0)"],[.85,"yellow"],[1,"rgb(255,0,0)"]]},o);l.minOpacity*=255,l.opacity*=255,l.maxOpacity*=255;let s=db(a,t,e).getContext("2d"),u=function(t,e){let n=db(e,256,1).getContext("2d"),r=n.createLinearGradient(0,0,256,1);return("string"==typeof t?t.split(" ").map(t=>{let[e,n]=t.split(":");return[+e,n]}):t).forEach(([t,e])=>{r.addColorStop(t,e)}),n.fillStyle=r,n.fillRect(0,0,256,1),n.getImageData(0,0,256,1).data}(l.gradient,a);s.clearRect(0,0,t,e),function(t,e,n,r,i,o){let{blur:a}=i,l=r.length;for(;l--;){let{x:i,y:s,value:u,radius:c}=r[l],f=Math.min(u,n),p=i-c,h=s-c,d=dx(c,1-a,o);t.globalAlpha=Math.max((f-e)/(n-e),.001),t.drawImage(d,p,h)}}(s,n,r,i,l,a);let c=function(t,e,n,r,i){let{minOpacity:o,opacity:a,maxOpacity:l,useGradientOpacity:s}=i,u=t.getImageData(0,0,e,n),c=u.data,f=c.length;for(let t=3;t<f;t+=4){let e=c[t],n=4*e;if(!n)continue;let i=a||Math.max(0,Math.min(l,Math.max(o,e)));c[t-3]=r[n],c[t-2]=r[n+1],c[t-1]=r[n+2],c[t]=s?r[n+3]:i}return u}(s,t,e,u,l),f=db(a,t,e).getContext("2d");return f.putImageData(c,0,0),f}(g,v,x,O,b,(h={gradient:n,opacity:r,minOpacity:o,maxOpacity:i,blur:a,useGradientOpacity:l},d=t=>void 0===t,Object.keys(h).reduce((t,e)=>{let n=h[e];return d(n,e)||(t[e]=n),t},{})),c):{canvas:null};return up(f.createElement("image",{})).call(ca,p).style("x",0).style("y",0).style("width",g).style("height",v).style("src",w.canvas).style("transform",y).call(ca,s).node()}};dw.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let dE={heatmap:dw},dk=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]})]]};dk.props={defaultShape:"heatmap",defaultLabelShape:"label",composite:!1,shape:dE,channels:[...cB({shapes:Object.keys(dE)}),{name:"x",required:!0},{name:"y",required:!0},{name:"color",scale:"identity",required:!0},{name:"size"}],preInference:[...cG(),{type:tQ},{type:pb}],postInference:[...cz()]};let dM=()=>["#5B8FF9","#5AD8A6","#5D7092","#F6BD16","#6F5EF9","#6DC8EC","#945FB9","#FF9845","#1E9493","#FF99C3"];dM.props={};let dS=()=>["#5B8FF9","#CDDDFD","#5AD8A6","#CDF3E4","#5D7092","#CED4DE","#F6BD16","#FCEBB9","#6F5EF9","#D3CEFD","#6DC8EC","#D3EEF9","#945FB9","#DECFEA","#FF9845","#FFE0C7","#1E9493","#BBDEDE","#FF99C3","#FFE0ED"];dS.props={};let d_=t=>new u7(t);d_.props={};let dP=Symbol("defaultUnknown");function dj(t,e,n){for(let r=0;r<e.length;r+=1)t.has(e[r])||t.set(n(e[r]),r)}function dA(t){let{value:e,from:n,to:r,mapper:i,notFoundReturn:o}=t,a=i.get(e);if(void 0===a){if(o!==dP)return o;a=n.push(e)-1,i.set(e,a)}return r[a%r.length]}function dT(t){return t instanceof Date?t=>`${t}`:"object"==typeof t?t=>JSON.stringify(t):t=>t}class dC extends uB{getDefaultOptions(){return{domain:[],range:[],unknown:dP}}constructor(t){super(t)}map(t){return 0===this.domainIndexMap.size&&dj(this.domainIndexMap,this.getDomain(),this.domainKey),dA({value:this.domainKey(t),mapper:this.domainIndexMap,from:this.getDomain(),to:this.getRange(),notFoundReturn:this.options.unknown})}invert(t){return 0===this.rangeIndexMap.size&&dj(this.rangeIndexMap,this.getRange(),this.rangeKey),dA({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=dT(e),this.rangeKey=dT(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 dC(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 dN=t=>new dC(t);function dL({map:t,initKey:e},n){let r=e(n);return t.has(r)?t.get(r):n}function dI(t){return"object"==typeof t?t.valueOf():t}dN.props={};class dR extends Map{constructor(t){if(super(),this.map=new Map,this.initKey=dI,null!==t)for(let[e,n]of t)this.set(e,n)}get(t){return super.get(dL({map:this.map,initKey:this.initKey},t))}has(t){return super.has(dL({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 dD extends dC{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,paddingInner:0,paddingOuter:0,padding:0,unknown:dP,flex:[]}}constructor(t){super(t)}clone(){return new dD(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{domain:e,range:n,paddingOuter:r,paddingInner:i,flex:o,round:a,align:l}=t,s=e.length,u=function(t,e){let n=e-t.length;return n>0?[...t,...Array(n).fill(1)]:n<0?t.slice(0,e):t}(o,s),[c,f]=n,p=f-c,h=p/(2/s*r+1-1/s*i),d=h*i/s,y=h-s*d,g=function(t){let e=Math.min(...t);return t.map(t=>t/e)}(u),v=y/g.reduce((t,e)=>t+e),b=new dR(e.map((t,e)=>{let n=g[e]*v;return[t,a?Math.floor(n):n]})),x=new dR(e.map((t,e)=>{let n=g[e]*v+d;return[t,a?Math.floor(n):n]})),O=Array.from(x.values()).reduce((t,e)=>t+e),w=c+(p-(O-O/s*i))*l,E=a?Math.round(w):w,k=Array(s);for(let t=0;t<s;t+=1){k[t]=Math.round(1e12*E)/1e12;let n=e[t];E+=x.get(n)}return{valueBandWidth:b,valueStep:x,adjustedRange:k}}(t);let{range:a,paddingOuter:l,paddingInner:s,round:u,align:c}=t,f=a[0],p=a[1]-f;n=p/Math.max(1,2*l+(o-s)),u&&(n=Math.floor(n)),f+=(p-n*(o-s))*c,r=n*(1-s),u&&(f=Math.round(f),r=Math.round(r));let h=Array(o).fill(0).map((t,e)=>f+e*n);return{valueStep:n,valueBandWidth:r,adjustedRange:h}}({align:t,range:n,round:r,flex:i,paddingInner:this.getPaddingInner(),paddingOuter:this.getPaddingOuter(),domain:e});this.valueStep=l,this.valueBandWidth=a,this.adjustedRange=o}}let dF=t=>new dD(t);function dB(t){return 1e-14>Math.abs(t)?t:parseFloat(t.toFixed(14))}dF.props={};let dz=[1,5,2,2.5,4,3],dW=100*Number.EPSILON,d$=(t,e,n=5,r=!0,i=dz,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=uD(e);return 1-uI(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=uD(e),l=uI(e,t),s=0,u=(r%o+o)%o;return(u<dW||o-u<dW)&&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=dB(l.lmax),f=dB(l.lmin),p=dB(l.lstep),h=Math.floor(Math.round((c-f)/p*1e12)/1e12)+1,d=Array(h);d[0]=dB(f);for(let t=1;t<h;t+=1)d[t]=dB(d[t-1]+p);return d};class dG extends uB{getDefaultOptions(){return{domain:[0,1],range:[0,1],tickCount:5,unknown:void 0,tickMethod:d$}}map(t){return uZ(t)?t:this.options.unknown}invert(t){return this.map(t)}clone(){return new dG(this.options)}getTicks(){let{domain:t,tickCount:e,tickMethod:n}=this.options,[r,i]=t;return uA(r)&&uA(i)?n(r,i,e):[]}}let dH=t=>new dG(t);dH.props={};class dV extends dD{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,padding:0,unknown:dP,paddingInner:1,paddingOuter:0}}constructor(t){super(t)}getPaddingInner(){return 1}clone(){return new dV(this.options)}update(t){super.update(t)}getPaddingOuter(){return this.options.padding}}let dU=t=>new dV(t);dU.props={};var dq=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,dY=/\[([^]*?)\]/gm;function dX(t,e){for(var n=[],r=0,i=t.length;r<i;r++)n.push(t[r].substr(0,e));return n}var dK=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 dZ(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 dQ=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dJ=["January","February","March","April","May","June","July","August","September","October","November","December"],d0=dX(dJ,3),d1=dZ({},{dayNamesShort:dX(dQ,3),dayNames:dQ,monthNamesShort:d0,monthNames:dJ,amPm:["am","pm"],DoFn:function(t){return t+["th","st","nd","rd"][t%10>3?0:+(t-t%10!=10)*t%10]}}),d2=function(t,e){for(void 0===e&&(e=2),t=String(t);t.length<e;)t="0"+t;return t},d5={D:function(t){return String(t.getDate())},DD:function(t){return d2(t.getDate())},Do:function(t,e){return e.DoFn(t.getDate())},d:function(t){return String(t.getDay())},dd:function(t){return d2(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 d2(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 d2(String(t.getFullYear()),4).substr(2)},YYYY:function(t){return d2(t.getFullYear(),4)},h:function(t){return String(t.getHours()%12||12)},hh:function(t){return d2(t.getHours()%12||12)},H:function(t){return String(t.getHours())},HH:function(t){return d2(t.getHours())},m:function(t){return String(t.getMinutes())},mm:function(t){return d2(t.getMinutes())},s:function(t){return String(t.getSeconds())},ss:function(t){return d2(t.getSeconds())},S:function(t){return String(Math.round(t.getMilliseconds()/100))},SS:function(t){return d2(Math.round(t.getMilliseconds()/10),2)},SSS:function(t){return d2(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?"-":"+")+d2(100*Math.floor(Math.abs(e)/60)+Math.abs(e)%60,4)},Z:function(t){var e=t.getTimezoneOffset();return(e>0?"-":"+")+d2(Math.floor(Math.abs(e)/60),2)+":"+d2(Math.abs(e)%60,2)}};dK("monthNamesShort"),dK("monthNames");var d3={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"},d4=function(t,e,n){if(void 0===e&&(e=d3.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=d3[e]||e;var r=[];e=e.replace(dY,function(t,e){return r.push(e),"@@@"});var i=dZ(dZ({},d1),n);return(e=e.replace(dq,function(e){return d5[e](t,i)})).replace(/@@@/g,function(){return r.shift()})};function d6(t,e,n,r){let i=(t,e)=>{let i=t=>r(t)%e==0,o=e;for(;o&&!i(t);)n(t,-1),o-=1;return t},o=(t,n)=>{n&&i(t,n),e(t)},a=(t,e)=>{let r=new Date(+t-1);return o(r,e),n(r,e),o(r),r};return{ceil:a,floor:(t,e)=>{let n=new Date(+t);return o(n,e),n},range:(t,e,r,i)=>{let l=[],s=Math.floor(r),u=i?a(t,r):a(t);for(;u<e;n(u,s),o(u))l.push(new Date(+u));return l},duration:t}}let d8=d6(1,t=>t,(t,e=1)=>{t.setTime(+t+e)},t=>t.getTime()),d9=d6(1e3,t=>{t.setMilliseconds(0)},(t,e=1)=>{t.setTime(+t+1e3*e)},t=>t.getSeconds()),d7=d6(6e4,t=>{t.setSeconds(0,0)},(t,e=1)=>{t.setTime(+t+6e4*e)},t=>t.getMinutes()),yt=d6(36e5,t=>{t.setMinutes(0,0,0)},(t,e=1)=>{t.setTime(+t+36e5*e)},t=>t.getHours()),ye=d6(864e5,t=>{t.setHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+864e5*e)},t=>t.getDate()-1),yn=d6(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()),yr={millisecond:d8,second:d9,minute:d7,hour:yt,day:ye,week:d6(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=yn.floor(t);return Math.floor((+new Date(+t)-+e)/6048e5)}),month:yn,year:d6(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())},yi=d6(1,t=>t,(t,e=1)=>{t.setTime(+t+e)},t=>t.getTime()),yo=d6(1e3,t=>{t.setUTCMilliseconds(0)},(t,e=1)=>{t.setTime(+t+1e3*e)},t=>t.getUTCSeconds()),ya=d6(6e4,t=>{t.setUTCSeconds(0,0)},(t,e=1)=>{t.setTime(+t+6e4*e)},t=>t.getUTCMinutes()),yl=d6(36e5,t=>{t.setUTCMinutes(0,0,0)},(t,e=1)=>{t.setTime(+t+36e5*e)},t=>t.getUTCHours()),ys=d6(864e5,t=>{t.setUTCHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+864e5*e)},t=>t.getUTCDate()-1),yu=d6(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()),yc={millisecond:yi,second:yo,minute:ya,hour:yl,day:ys,week:d6(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=yu.floor(t);return Math.floor((+new Date(+t)-+e)/6048e5)}),month:yu,year:d6(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 yf(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?yc:yr;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=u$(s,h,0,d,f);if(y===d){let t=u2(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(u2(a,l,p),1)];return o}let yp=(t,e,n,r,i)=>{let o=t>e,a=o?e:t,l=o?t:e,[s,u]=yf(a,l,n,r,i),c=s.range(a,new Date(+l+1),u,!0);return o?c.reverse():c},yh=(t,e,n,r,i)=>{let o=t>e,a=o?e:t,l=o?t:e,[s,u]=yf(a,l,n,r,i),c=[s.floor(a,u),s.ceil(l,u)];return o?c.reverse():c};function yd(t){let e=t.getTimezoneOffset(),n=new Date(t);return n.setMinutes(n.getMinutes()+e,n.getSeconds(),n.getMilliseconds()),n}class yy extends u8{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:yp,interpolate:uq,mask:void 0,utc:!1}}chooseTransforms(){return[t=>+t,t=>new Date(t)]}chooseNice(){return yh}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?yc:yr,r=e?yd:uR;return e=>d4(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 yy(this.options)}}let yg=t=>new yy(t);yg.props={};let ym=t=>e=>-t(-e),yv=(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?ym(r):r},yb=(t,e)=>{let n=t===Math.E?Math.exp:e=>t**e;return e?ym(n):n},yx=(t,e,n,r=10)=>{let i=t<0,o=yb(r,i),a=yv(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=u9(s,u,n))}else{let t=-1===n?f-c:Math.min(f-c,n);p=u9(c,f,t).map(o)}return l?p.reverse():p},yO=(t,e,n,r)=>{let i=t<0,o=yv(r,i),a=yb(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 yw extends u8{getDefaultOptions(){return{domain:[1,10],range:[0,1],base:10,interpolate:uX,tickMethod:yx,tickCount:5}}chooseNice(){return yO}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[yv(t,n),yb(t,n)]}clone(){return new yw(this.options)}}let yE=t=>new yw(t);yE.props={};let yk=t=>e=>e<0?-((-e)**t):e**t,yM=t=>e=>e<0?-((-e)**(1/t)):e**(1/t),yS=t=>t<0?-Math.sqrt(-t):Math.sqrt(t);class y_ extends u8{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,exponent:2,interpolate:uX,tickMethod:u9,tickCount:5}}constructor(t){super(t)}chooseTransforms(){let{exponent:t}=this.options;return 1===t?[uR,uR]:[.5===t?yS:yk(t),yM(t)]}clone(){return new y_(this.options)}}let yP=t=>new y_(t);yP.props={};class yj extends y_{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:uX,tickMethod:u9,tickCount:5,exponent:.5}}constructor(t){super(t)}update(t){super.update(t)}clone(){return new yj(this.options)}}let yA=t=>new yj(t);yA.props={};class yT extends uB{getDefaultOptions(){return{domain:[.5],range:[0,1]}}constructor(t){super(t)}map(t){if(!uZ(t))return this.options.unknown;let e=u$(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 yT(this.options)}rescale(){let{domain:t,range:e}=this.options;this.n=Math.min(t.length,e.length-1),this.thresholds=t}}let yC=t=>new yT(t);yC.props={};class yN extends yT{getDefaultOptions(){return{domain:[],range:[],tickCount:5,unknown:void 0,tickMethod:d$}}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 yN(this.options)}getTicks(){let{tickCount:t,domain:e,tickMethod:n}=this.options,r=e.length-1;return n(e[0],e[r],t)}}let yL=t=>new yN(t);yL.props={};class yI extends yT{getDefaultOptions(){return{domain:[0,1],range:[.5],nice:!1,tickCount:5,tickMethod:d$}}constructor(t){super(t)}nice(){let{nice:t}=this.options;if(t){let[t,e,n]=this.getTickMethodOptions();this.options.domain=u5(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 yI(this.options)}}let yR=t=>new yI(t);yR.props={};let yD=t=>e=>{let n=t(e);return uA(n)?Math.round(n):n},yF=M6=class extends u7{getDefaultOptions(){return{domain:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolator:uR,tickMethod:u9,tickCount:5}}constructor(t){super(t)}clone(){return new M6(this.options)}};yF=M6=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}([(MI=function(t){return[t(0),t(1)]},MR=t=>{let[e,n]=t;return uW(uq(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=MI(t)},t.prototype.composeOutput=function(t,e){let{domain:n,interpolator:r,round:i}=this.getOptions(),o=MR(n.map(t)),a=i?yD(r):r;this.output=uW(a,o,e,t)},t.prototype.invert=void 0})],yF);let yB=t=>new yF(t);yB.props={};class yz extends uB{getDefaultOptions(){return{range:[0],domain:[0,1],unknown:void 0,tickCount:5,tickMethod:u9}}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 uA(r)&&uA(i)?t(r,i,n):[]}clone(){return new yz(this.options)}}let yW=t=>new yz(t);function y$({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"}}}yW.props={};let yG=y$({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}),yH=t=>tG({},yG,t);yH.props={};let yV=t=>tG({},yH(),{category10:"category10",category20:"category20"},t);yV.props={};let yU=y$({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}),yq=t=>tG({},yU,{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),yY=t=>Object.assign({},yq(),{category10:"category10",category20:"category20"},t);yY.props={};let yX=y$({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}),yK=t=>tG({},yX,{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);yK.props={};var yZ=function(t){return null==t};function yQ(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=eT(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,eS(eS({},t[e]),n)]:[e,n]}))}function yJ(t,e){t?t.finished.then(e):e()}function y0(t,e){"update"in t?t.update(e):t.attr(e)}function y1(t,e,n){return 0===e.length?null:n?t.animate(e,n):(y0(t,{style:e.slice(-1)[0]}),null)}function y2(t,e,n){var r={},i={};return(Object.entries(e).forEach(function(e){var n=eT(e,2),o=n[0],a=n[1];if(!yZ(a)){var l=t.style[o]||t.parsedStyle[o]||0;l!==a&&(r[o]=l,i[o]=a)}}),n)?y1(t,[r,i],eS({fill:"both"},n)):(y0(t,i),null)}var y5=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&&pA(a)?(pA(e[o])||(e[o]={}),r<i?t(e[o],a,r+1,i):e[o]=n[o]):pT(a)?(e[o]=[],e[o]=e[o].concat(a)):void 0!==a&&(e[o]=a)}}(t,e[r]);return t},y3=function(t,e){var n=function(t){return"".concat(e,"-").concat(t)},r=Object.fromEntries(Object.entries(t).map(function(t){var e=eT(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},y4={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 lI({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:[]};y5({},y4,{style:{type:"arc"}}),y5({},y4,{style:{}});var y6=y3({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 y8(t,e){return[t[0]*e,t[1]*e]}function y9(t,e){return[t[0]+e[0],t[1]+e[1]]}function y7(t,e){return[t[0]-e[0],t[1]-e[1]]}function gt(t,e){return[Math.min(t[0],e[0]),Math.min(t[1],e[1])]}function ge(t,e){return[Math.max(t[0],e[0]),Math.max(t[1],e[1])]}function gn(t,e){return Math.sqrt(Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2))}function gr(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 gi(t){return t*Math.PI/180}function go(t){return Number((180*t/Math.PI).toPrecision(5))}function ga(t){return t.toString().charAt(0).toUpperCase()+t.toString().slice(1)}function gl(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 gs=function(t,e){if(!(null==t?void 0:t.startsWith(e)))return!1;var n=t[e.length];return n>="A"&&n<="Z"};function gu(t,e,n){void 0===n&&(n=!1);var r={};return Object.entries(t).forEach(function(t){var i=eT(t,2),o=i[0],a=i[1];if("className"===o||"class"===o);else if(gs(o,"show")&&gs(gl(o,"show"),e)!==n)o==="".concat("show").concat(ga(e))?r[o]=a:r[o.replace(new RegExp(ga(e)),"")]=a;else if(!gs(o,"show")&&gs(o,e)!==n){var l=gl(o,e);"filter"===l&&"function"==typeof a||(r[l]=a)}}),r}function gc(t,e){return Object.entries(t).reduce(function(t,n){var r=eT(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(ga(i))]=o,t},{})}function gf(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=eT(t,2),a=o[0],l=o[1];e.includes(a)||(-1!==n.indexOf(a)?i[a]=l:r[a]=l)}),[r,i]}function gp(t,e){return pE(t)?t.apply(void 0,eN([],eT(e),!1)):t}function gh(t,e){return t.style.opacity||(t.style.opacity=1),y2(t,{opacity:0},e)}var gd=["$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 gy(t){var e={};for(var n in t)gd.includes(n)&&(e[n]=t[n]);return e}var gg=y3({lineGroup:"line-group",line:"line",regionGroup:"region-group",region:"region"},"grid");function gm(t){return t.reduce(function(t,e,n){return t.push(eN([0===n?"M":"L"],eT(e),!1)),t},[])}function gv(t,e,n){if("surround"===e.type){var r=e.connect,i=e.center;if("line"===(void 0===r?"line":r))return gm(t);if(!i)return[];var o=gn(t[0],i),a=+!n;return t.reduce(function(t,e,n){return 0===n?t.push(eN(["M"],eT(e),!1)):t.push(eN(["A",o,o,0,0,a],eT(e),!1)),t},[])}return gm(t)}var gb=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return eM(e,t),e.prototype.render=function(t,e){t.type,t.center,t.areaFill,t.closed;var n,r,i,o,a,l=e_(t,["type","center","areaFill","closed"]),s=(r=void 0===(n=t.data)?[]:n,t.closed?r.map(function(t){var e=t.points,n=eT(e,1)[0];return eS(eS({},t),{points:eN(eN([],eT(e),!1),[n],!1)})}):r),u=pW(e).maybeAppendByClassName(gg.lineGroup,"g"),c=pW(e).maybeAppendByClassName(gg.regionGroup,"g"),f=(i=t.animate,o=t.isBillboard,a=s.map(function(e,n){return{id:e.id||"grid-line-".concat(n),path:gv(e.points,t)}}),u.selectAll(gg.line.class).data(a,function(t){return t.id}).join(function(t){return t.append("path").each(function(t,e){var n=gp(gy(eS({path:t.path},l)),[t,e,a]);this.attr(eS({class:gg.line.name,stroke:"#D9D9D9",lineWidth:1,lineDash:[4,4],isBillboard:o},n))})},function(t){return t.transition(function(t,e){return y2(this,gp(gy(eS({path:t.path},l)),[t,e,a]),i.update)})},function(t){return t.transition(function(){var t=this,e=gh(this,i.exit);return yJ(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=eT([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=eT([gv(t,n),gv(e.slice().reverse(),n,!0)],2),s=l[0],u=l[1],c=eT([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([eN(["L"],eT(p),!1)],[eN(["L"],eT(f),!1)]);if(!o)throw Error("Arc grid need to specified center");var d=eT([gn(p,o),gn(f,o)],2),y=d[0],g=d[1];return h([eN(["A",y,y,0,0,1],eT(p),!1),eN(["L"],eT(p),!1)],[eN(["A",g,g,0,0,0],eT(f),!1),eN(["L"],eT(f),!1)])}(u[0],u[1],n);l.push({path:c,fill:a[s%a.length]})}return t.selectAll(gg.region.class).data(l,function(t,e){return e}).join(function(t){return t.append("path").each(function(t,e){var n=gp(t,[t,e,l]);this.attr(n)}).attr("className",gg.region.name)},function(t){return t.transition(function(t,e){return y2(this,gp(t,[t,e,l]),r.update)})},function(t){return t.transition(function(){var t=this,e=gh(this,r.exit);return yJ(e,function(){return t.remove()}),e})}).transitions()}(c,s,t);return eN(eN([],eT(f),!1),eT(p),!1)},e}(pD),gx=function(t,e,n){for(var r=0,i=pU(e)?e.split("."):e;t&&r<i.length;)t=t[i[r++]];return void 0===t||r<i.length?n:t},gO=function(t){return pj(t,"Number")};function gw(t){return"function"==typeof t?t():pU(t)||gO(t)?new pB({style:{text:String(t)}}):t}function gE(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 gk(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 gM(t,e){return Object.fromEntries(Object.entries(t).map(function(t){var n=eT(t,2);return[n[0],gp(n[1],e)]}))}function gS(t,e){return e&&pE(e)?t.filter(e):t}function g_(t,e){var n=e.startAngle;return(e.endAngle-n)*t+n}function gP(t,e){if("linear"===e.type){var n=eT(e.startPos,2),r=n[0],i=n[1],o=eT(e.endPos,2),a=eT([o[0]-r,o[1]-i],2);return gr([a[0],a[1]])}var l=gi(g_(t,e));return[-Math.sin(l),Math.cos(l)]}function gj(t,e,n){var r;return r=gP(t,n),"positive"!==e?[r[1],-r[0]]:[-r[1],r[0]]}function gA(t,e){return gj(t,e.labelDirection,e)}function gT(t,e){var n,r,i,o,a,l,s,u,c,f;return"linear"===e.type?(r=(n=eT(e.startPos,2))[0],i=n[1],o=eT(e.endPos,2),a=eT([o[0]-r,o[1]-i],2),[r+a[0]*t,i+a[1]*t]):(l=e.radius,u=(s=eT(e.center,2))[0],c=s[1],[u+l*Math.cos(f=gi(g_(t,e))),c+l*Math.sin(f)])}function gC(t){return 0===gP(0,t)[1]}function gN(t){return 0===gP(0,t)[0]}function gL(t,e,n,r,i){var o=e-t,a=eT([i,i],2),l=a[0],s=a[1],u=eT([gi(t),gi(e)],2),c=u[0],f=u[1],p=function(t){return[n+i*Math.cos(t),r+i*Math.sin(t)]},h=eT(p(c),2),d=h[0],y=h[1],g=eT(p(f),2),v=g[0],b=g[1];if(e-t==360){var x=eT(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 gI(t){var e=eT(t,2),n=eT(e[0],2),r=n[0],i=n[1],o=eT(e[1],2);return{x1:r,y1:i,x2:o[0],y2:o[1]}}function gR(t){var e=t.type,n=t.gridCenter;return"linear"===e?n:n||t.center}function gD(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 gF=function(t,e,n){if(void 0===n&&(n=128),!pE(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 M9?M9(t,n):(M8||(M8=lf.offscreenCanvasCreator.getOrCreateContext(void 0)),M8.font=[o,a,i,"".concat(n,"px"),r].join(" "),M8.measureText(t).width)},function(t,e){return[t,Object.values(e||gB(t)).join()].join("")},4096),gB=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 gz(t){return"text"===t.nodeName?t:"g"===t.nodeName&&1===t.children.length&&"text"===t.children[0].nodeName?t.children[0]:null}function gW(t,e){var n=gz(t);n&&n.attr(e)}function g$(t,e,n){void 0===n&&(n="..."),gW(t,{wordWrap:!0,wordWrapWidth:e,maxLines:1,textOverflow:n})}function gG(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=eT([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 gH=function(t){return void 0!==t&&null!=t&&!Number.isNaN(t)};function gV(t){if(gO(t))return[t,t,t,t];if(pT(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 gU=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 gq(t,e){var n=t.getEulerAngles()||0;t.setEulerAngles(0);var r=t.getLocalBounds(),i=eT(r.min,2),o=i[0],a=i[1],l=eT(r.max,2),s=l[0],u=l[1],c=gY(t),f=c.width,p=c.height,h=0,d=0,y=o,g=a,v=gz(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=eT(gV(e),4),w=O[0],E=void 0===w?0:w,k=O[1],M=void 0===k?0:k,S=O[2],_=O[3],P=new gU((h+=o)-(void 0===_?M:_),(d+=a)-E,h+f+M,d+p+(void 0===S?E:S));return t.setEulerAngles(n),P.rotatedPoints(gi(n),y,g)}function gY(t){return t.__bbox__?t.__bbox__:t.getBBox()}function gX(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 gK(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 gZ(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=eT(o,2),s=l[0],u=l[1],c="negative"===r?0:i,f=-a-c,p=a+c,h=eT(gV(e),4),d=h[0],y=h[1],g=h[2];return new gU(s+f-h[3],u+f-d,s+p+y,u+p+g)}var v=eT(t.startPos,2),b=v[0],x=v[1],O=eT(t.endPos,2),w=O[0],E=O[1],k=eT(gN(t)?[-e,0,e,0]:[0,e,0,-e],4),M=k[0],S=k[1],_=k[2],P=k[3],j=y8(gA(0,t),i),A=new gU(b,x,w,E);return A.x1+=P,A.y1+=M,A.x2+=S+j[0],A.y2+=_+j[1],A}(e,o);try{for(var u=eA(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=gq(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=gK(t[0],t[1],e[0]),r=gK(t[0],t[1],e[1]),i=gK(e[0],e[1],t[0]),o=gK(e[0],e[1],t[1]);return!!(n!==r&&i!==o||0===n&&gX(t,e[0])||0===r&&gX(t,e[1])||0===i&&gX(e,t[0])||0===o&&gX(e,t[1]))}(a,r)){if(0===gK(a[0],e,a[1]))return gX(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=gq(t,n).flat(1),a=gq(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=eA(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=eT(t,4),r=n[0],i=n[1],o=n[2],a=n[3],l=eT(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,gV(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 gQ(t,e){return(void 0===e&&(e={}),yZ(t))?0:"number"==typeof t?t:Math.floor(gF(t,e))}function gJ(t){var e=t.getLocalBounds(),n=eT([e.min,e.max],2),r=eT(n[0],2),i=r[0],o=r[1],a=eT(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 g0(t,e){var n=eT(t,2),r=n[0],i=n[1],o=eT(e,2),a=o[0],l=o[1];return r!==a&&i===l}var g1={parity:function(t,e){var n=e.seq,r=void 0===n?2:n;return t.filter(function(t,e){return!(e%r)||(pM(t),!1)})}},g2=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=g1.parity,c=function(t){return t.forEach(r.show),t},f=2,p=t.slice(),h=t.slice(),d=Math.min.apply(Math,eN([1],eT(t.map(function(t){return gY(t).width})),!1));if("linear"===n.type&&(gC(n)||gN(n))){var y=gJ(t[0]).left,g=Math.abs(gJ(t[a-1]).right-y)||1;f=Math.max(Math.floor(a*d/g),f)}for(l&&(i=p.splice(0,1)[0]),s&&(o=p.splice(-1,1)[0],p.reverse()),c(p);f<t.length&&gZ((o?eN(eN([o],eT(h),!1),[i],!1):eN([i],eT(h),!1)).filter(gH),n,null==e?void 0:e.margin).length;){if(o&&!i&&f%2==0){var v=p.splice(0,1);v.forEach(r.hide)}else if(o&&i){var v=p.splice(0,1);v.forEach(r.hide)}h=u(c(p),{seq:f}),f++}}}],["rotate",function(t,e,n,r){var i,o,a=e.optionalAngles,l=e.margin,s=e.recoverWhenFailed,u=t.map(function(t){return t.getLocalEulerAngles()}),c=function(e){return t.forEach(function(t,n){var i=Array.isArray(e)?e[n]:e;r.rotate(t,+i)})};try{for(var f=eA(void 0===a?[0,45,90]:a),p=f.next();!p.done;p=f.next()){var h=p.value;if(c(h),gZ(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=gB(r.getTextShape(t[0])),h=gQ(void 0===u?" ":u,p),d=a?gQ(a,p):h,y=gQ(s,p);(yZ(y)||y===1/0)&&(y=Math.max.apply(null,t.map(function(t){return gY(t).width})));for(var g=t.slice(),v=eT(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=gZ(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,eN([],eT(h),!1)),y=(i=n.type,o=n.labelDirection,"linear"===i&&gC(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),gZ(t,n,p).length<1)return;(void 0===c||c)&&g(h)}}]]);function g5(t){for(var e=t;e<0;)e+=360;return Math.round(e%360)}function g3(t,e){var n=eT(t,2),r=n[0],i=n[1],o=eT(e,2),a=o[0],l=o[1],s=eT([r*a+i*l,r*l-i*a],2),u=s[0];return Math.atan2(s[1],u)}function g4(t,e,n){var r=n.type,i=n.labelAlign,o=gA(t,n),a=g5(e),l=g5(go(g3([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?gD(a,0,90,!1,!0)?s="start":(gD(a,0,90)||gD(a,270,360))&&(s="start"):90===l?gD(a,0,90,!1,!0)?s="start":(gD(a,90,180)||gD(a,270,360))&&(s="end"):270===l?gD(a,0,90,!1,!0)?s="end":(gD(a,90,180)||gD(a,270,360))&&(s="start"):180===l&&(90===a?s="start":(gD(a,0,90)||gD(a,270,360))&&(s="end")):"parallel"===i?u=gD(l,0,180,!0)?"top":"bottom":"horizontal"===i?gD(l,90,270,!1)?s="end":(gD(l,270,360,!1)||gD(l,0,90))&&(s="start"):"perpendicular"===i&&(s=gD(l,90,270)?"end":"start"),{textAlign:s,textBaseline:u}}function g6(t,e,n){var r=n.showTick,i=n.tickLength,o=n.tickDirection,a=n.labelDirection,l=n.labelSpacing,s=e.indexOf(t),u=gp(l,[t,s,e]),c=eT([gA(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=eT(y9(y8(c[0],u+(1===c[1]?gp(r?i:0,[t,s,e]):0)),gT(t.value,n)),2);return{x:f[0],y:f[1]}}function g8(t,e){"text"===t.nodeName&&t.attr(e)}function g9(t){var e,n,r,i;e=this.node().childNodes,n={hide:pM,show:pk,rotate:function(e,n){var r,i,o;r=+n,e.setLocalEulerAngles(r),i=g4(e.__data__.value,r,t),(o=e.querySelector(y6.labelItem.class))&&g8(o,i)},ellipsis:function(t,e,n){t&&g$(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"),gW(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=g2.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 g7(t,e,n,r,i){var o,a=n.indexOf(e),l=pW(t).append(pE(o=i.labelFormatter)?function(){return gw(gp(o,[e,a,n,gA(e.value,i)]))}:function(){return gw(e.label||"")}).attr("className",y6.labelItem.name).node(),s=eT(gf(gM(r,[e,a,n])),2),u=s[0],c=s[1],f=c.transform,p=e_(c,["transform"]);gG(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=gA(t.value,n),s=gP(t.value,n);return"horizontal"===o?0:(gD(r=(go(a="perpendicular"===o?g3([1,0],l):g3([s[0]<0?-1:1,0],s))+360)%180,-90,90)||(r+=180),r)}(e,t,i);return t.setLocalEulerAngles(+h),g8(l,eS(eS({},g4(e.value,h,i)),u)),gG(t,f),t.attr(p),l}function mt(t,e){return gj(t,e.tickDirection,e)}function me(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=pW(this),l=r.tickFormatter,s=mt(t.value,r),u="line",pE(l)&&(u=function(){return gp(l,[t,e,n,s])}),a.append(u).attr("className",y6.tickItem.name));c=mt(t.value,r),x=(h=eT((f=gp(r.tickLength,[t,e,n]),[[0,0],[(p=eT(c,2))[0]*f,p[1]*f]]),2),y=(d=eT(h[0],2))[0],g=d[1],b={x1:y,x2:(v=eT(h[1],2))[0],y1:g,y2:v[1]}).x1,O=b.x2,w=b.y1,E=b.y2,M=(k=eT(gf(gM(i,[t,e,n,c])),2))[0],S=k[1],"line"===_.node().nodeName&&_.styles(eS({x1:x,x2:O,y1:w,y2:E},M)),this.attr(S),_.styles(M);var P=eT(gT(t.value,r),2);return y2(this,{x:P[0],y:P[1]},o)}var mn=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}(),mr=y3({text:"text"},"title");function mi(t){return/\S+-\S+/g.test(t)?t.split("-").map(function(t){return t[0]}):t.length>2?[t[0]]:t.split("")}function mo(t,e){var n=Object.entries(e).reduce(function(e,n){var r=eT(n,2),i=r[0],o=r[1];return t.node().attr(i)||(e[i]=o),e},{});t.styles(n)}var ma=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 eM(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(mr.text.class);if(!a)return new mn(0,0,+e,+n);var l=a.getBBox(),s=l.width,u=l.height,c=eT(gV(i),4),f=c[0],p=c[1],h=c[2],d=c[3],y=eT([0,0,+e,+n],4),g=y[0],v=y[1],b=y[2],x=y[3],O=mi(r);if(O.includes("i"))return new mn(g,v,b,x);O.forEach(function(t,r){var i,o;"t"===t&&(v=(i=eT(0===r?[u+h,+n-u-h]:[0,+n],2))[0],x=i[1]),"r"===t&&(b=eT([+e-s-d],1)[0]),"b"===t&&(x=eT([+n-u-f],1)[0]),"l"===t&&(g=(o=eT(0===r?[s+p,+e-s-p]:[0,+e],2))[0],b=o[1])});var w=eT(gV(o),4),E=w[0],k=w[1],M=w[2],S=w[3],_=eT([S+k,E+M],2),P=_[0],j=_[1];return new mn(g+S,v+E,b-P,x-j)},e.prototype.getBBox=function(){return this.title?this.title.getBBox():new mn(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=e_(t,["width","height","position","spacing"]),b=eT(gf(v),1)[0],x=(a=t.width,l=t.height,s=t.position,u=eT([+a/2,+l/2],2),f=(c=eT([+u[0],+u[1],"center","middle"],4))[0],p=c[1],h=c[2],d=c[3],(y=mi(s)).includes("l")&&(f=(n=eT([0,"start"],2))[0],h=n[1]),y.includes("r")&&(f=(r=eT([+a,"end"],2))[0],h=r[1]),y.includes("t")&&(p=(i=eT([0,"top"],2))[0],d=i[1]),y.includes("b")&&(p=(o=eT([+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;pF(!!v.text,pW(e),function(t){g.title=t.maybeAppendByClassName(mr.text,"text").styles(b).call(mo,{x:O,y:w,textAlign:E,textBaseline:k}).node()})},e}(pD);function ml(t,e,n,r,i){var o=eT(gf(gu(r,"title")),2),a=o[0],l=o[1],s=l.transform,u=e_(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);gG(t.node(),c);var f=function(t,e,n){var r=n.titlePosition,i=void 0===r?"lb":r,o=n.titleSpacing,a=mi(i),l=t.node().getLocalBounds(),s=eT(l.min,2),u=s[0],c=s[1],f=eT(l.halfExtents,2),p=f[0],h=f[1],d=eT(e.node().getLocalBounds().halfExtents,2),y=d[0],g=d[1],v=eT([u+p,c+h],2),b=v[0],x=v[1],O=eT(gV(o),4),w=O[0],E=O[1],k=O[2],M=O[3];if(["start","end"].includes(i)&&"linear"===n.type){var S=n.startPos,_=n.endPos,P=eT("start"===i?[S,_]:[_,S],2),j=P[0],A=P[1],T=eT(y8(gr([-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}}(pW(n._offscreen||n.querySelector(y6.mainGroup.class)),e,r),p=f.x,h=f.y,d=y2(e.node(),{x:p,y:h},i);return gG(t.node(),c),d}function ms(t,e,n,r){var i=t.showLine,o=t.showTick,a=t.showLabel,l=pF(i,e.maybeAppendByClassName(y6.lineGroup,"g"),function(e){return function(t,e,n){var r,i,o,a,l,s,u=e.type,c=gu(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,S=e.truncRange,_=e.lineExtension,P=eT([k,M],2),j=eT(P[0],2),A=j[0],T=j[1],C=eT(P[1],2),N=C[0],L=C[1],I=eT(_?(void 0===(i=_)&&(i=[0,0]),o=eT([k,M,i],3),l=(a=eT(o[0],2))[0],s=a[1],c=(u=eT(o[1],2))[0],f=u[1],h=(p=eT(o[2],2))[0],d=p[1],g=(y=eT([c-l,f-s],2))[0],[(O=(x=eT([-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],B=I[3],z=function(e){return t.selectAll(y6.line.class).data(e,function(t,e){return e}).join(function(t){return t.append("line").attr("className",function(t){return"".concat(y6.line.name," ").concat(t.className)}).styles(n).transition(function(t){return y2(this,gI(t.line),!1)})},function(t){return t.styles(n).transition(function(t){return y2(this,gI(t.line),r.update)})},function(t){return t.remove()}).transitions()};if(!E||!S)return z([{line:[[A+R,T+D],[N+F,L+B]],className:y6.line.name}]);var W=eT(S,2),$=W[0],G=W[1],H=N-A,V=L-T,U=eT([A+H*$,T+V*$],2),q=U[0],Y=U[1],X=eT([A+H*G,T+V*G],2),K=X[0],Z=X[1],Q=z([{line:[[A+R,T+D],[q,Y]],className:y6.lineFirst.name},{line:[[K,Z],[N+F,L+B]],className:y6.lineSecond.name}]);return e.truncRange,e.truncShape,e.lineExtension,Q}(t,e,gk(c,"arrow"),n):(r=gk(c,"arrow"),i=e.startAngle,o=e.endAngle,a=e.center,l=e.radius,s=t.selectAll(y6.line.class).data([{path:gL.apply(void 0,eN(eN([i,o],eT(a),!1),[l],!1))}],function(t,e){return e}).join(function(t){return t.append("path").attr("className",y6.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=eT(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=eT(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,eS({fill:"both"},r))}(this,(e=(t=this.attributes).startAngle,r=t.endAngle,s=t.center,u=t.radius,eN(eN([e,r],eT(s),!1),[u],!1)),eN(eN([i,o],eT(a),!1),[l],!1),n.update);if(f){var p=function(){var t=gx(c.attributes,"__keyframe_data__");c.style.path=gL.apply(void 0,eN([],eT(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(y6.line.class):l?t.select(y6.lineSecond.class):t.select(y6.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=gw(s);p.attr(r),gE(p,c,!0),o.style("markerEnd",p).style("markerEndOffset",-u)}(t,u,e,c),s}(e,t,r)})||[],s=pF(o,e.maybeAppendByClassName(y6.tickGroup,"g"),function(e){var i,o;return i=gS(n,t.tickFilter),o=gu(t,"tick"),e.selectAll(y6.tick.class).data(i,function(t){return t.id||t.label}).join(function(e){return e.append("g").attr("className",y6.tick.name).transition(function(e,n){return me.call(this,e,n,i,t,o,!1)})},function(e){return e.transition(function(e,n){return this.removeChildren(),me.call(this,e,n,i,t,o,r.update)})},function(t){return t.transition(function(){var t=this,e=gh(this.childNodes[0],r.exit);return yJ(e,function(){return t.remove()}),e})}).transitions()})||[],u=pF(a,e.maybeAppendByClassName(y6.labelGroup,"g"),function(e){var i,o;return i=gS(n,t.labelFilter),o=gu(t,"label"),e.selectAll(y6.label.class).data(i,function(t,e){return e}).join(function(r){return r.append("g").attr("className",y6.label.name).transition(function(e){return g7(this,e,n,o,t),this.attr(g6(e,n,t)),this.__bbox__=e.bbox,null}).call(function(){return g9.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&&pM(t),e.isVisible()&&pk(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=eT(t.getLocalPosition(),2),n=e[0],r=e[1],i=t.attr("r");return[n-i,r-i]}return t.getLocalPosition()},p=eT(f(t),2),h=p[0],d=p[1],y=eT(f(e),2),g=eT([(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,")")}],eS(eS({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)"}],eS(eS({fill:"both"},n),{duration:u+c,delay:s+u-c}));return yJ(E,i),[w,E]}(this.querySelector(y6.labelItem.class),g7(this,e,n,o,t),r.update),a=y2(this,g6(e,n,t),r.update);return this.__bbox__=e.bbox,eN(eN([],eT(i),!1),[a],!1)}).call(function(n){var r,i;r=gx(n,"_transitions").flat().filter(gH),i=function(){return g9.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=gh(this.childNodes[0],r.exit);return yJ(e,function(){return pW(t).remove()}),e})}).transitions()})||[];return eN(eN(eN([],eT(l),!1),eT(s),!1),eT(u),!1).filter(function(t){return!!t})}var mu=function(t){function e(e){return t.call(this,e,y4)||this}return eM(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=yQ(void 0===n?a:n),h=pF(s,pW(e).maybeAppendByClassName(y6.gridGroup,"g"),function(e){var n,r,i,o,a,l,s,u;return r=(n=gu(t,"grid")).type,i=n.areaFill,o=gR(t),a=gS(f,t.gridFilter),s="segment"===r?(l=t.gridLength,a.map(function(e,n){var r=e.value,i=eT(gT(r,t),2),o=i[0],a=i[1],s=eT(y8(gj(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=gR(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=eT(r,2),o=i[0],a=i[1];return t.map(function(t,r){var i=eT(gT(t.value,e),2),l=eT([i[0]-o,i[1]-a],2),s=l[0],u=l[1],c=[];return n.forEach(function(t){var e=gi(t),n=eT([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=eS(eS({},n),{center:o,areaFill:pE(i)?a.map(function(t,e){return gp(i,[t,e,a])}):i,animate:p,data:s}),e.selectAll(y6.grid.class).data([1]).join(function(t){return t.append(function(){return new gb({style:u})}).attr("className",y6.grid.name)},function(t){return t.transition(function(){return this.update(u)})},function(t){return t.remove()}).transitions()})||[],d=pW(e).maybeAppendByClassName(y6.mainGroup,"g");i&&(!this.initialized&&p.enter||this.initialized&&p.update)&&ms(t,pW(this.offscreenGroup),f,yQ(!1));var y=ms(t,pW(d.node()),f,p),g=pF(l,pW(e).maybeAppendByClassName(y6.titleGroup,"g"),function(e){var n;return n=t.titleText,e.selectAll(y6.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 gw(n)}).attr("className",y6.title.name).transition(function(){return ml(pW(this),e,r,t,p.enter)})},function(n){return n.transition(function(){return ml(pW(this),e,r,t,p.update)})},function(t){return t.remove()}).transitions()})||[];return eN(eN(eN([],eT(h),!1),eT(y),!1),eT(g),!1).flat().filter(function(t){return!!t})},e}(pD),mc=function(t){var e=typeof t;return null!==t&&"object"===e||"function"===e},mf=function(t,e){if(t){if(tz(t))for(var n,r=0,i=t.length;r<i&&!1!==e(t[r],r);r++);else if(mc(t)){for(var o in t)if(t.hasOwnProperty(o)&&!1===e(t[o],o))break}}},mp=function(t,e,n){if(!tz(t)&&!t$(t))return t;var r=n;return mf(t,function(t,n){r=e(r,t,n)}),r},mh=function(t,e){return mp(t,function(t,n,r){return e.includes(r)||(t[r]=n),t},{})},md=function(t){var e=s9(t);return e.charAt(0).toUpperCase()+e.substring(1)};function my(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 mg=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function mm(t){var e;if(!(e=mg.exec(t)))throw Error("invalid format: "+t);return new mv({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 mv(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 mb(t,e){var n=my(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")}mm.prototype=mv.prototype,mv.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 mx={"%":(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)=>mb(100*t,e),r:mb,s:function(t,e){var n=my(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(M7=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")+my(t,Math.max(0,e+o-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function mO(t){return t}var mw=Array.prototype.map,mE=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"];function mk(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=eT([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 mn(e,n,r-e,i-n)}Se=(St=function(t){var e,n,r,i=void 0===t.grouping||void 0===t.thousands?mO:(e=mw.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?mO:(r=mw.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=mm(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"):mx[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=mx[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?mE[8+M7/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 S=p.length+t.length+k.length,_=S<d?Array(d-S+1).join(e):"";switch(y&&h&&(t=i(_+t,_.length?d-k.length:1/0),_=""),n){case"<":t=p+t+k+_;break;case"=":t=p+_+t+k;break;case"^":t=_.slice(0,S=_.length>>1)+p+t+k+_.slice(S);break;default:t=_+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=mm(t)).type="f",t)),i=3*Math.max(-8,Math.min(8,Math.floor(((n=my(Math.abs(n=e)))?n[1]:NaN)/3))),o=Math.pow(10,-i),a=mE[8+i/3];return function(t){return r(o*t)+a}}}}({thousands:",",grouping:[3],currency:["$",""]})).format,St.formatPrefix;var mM=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=eT([0,0],2),y=d[0],g=d[1],v=e.map(function(t){var e,n=t.width,r=t.height,i=eT([y,g],2),o=i[0],a=i[1];return y=(e=eT([y+n*h[0],g+r*h[1]],2))[0],g=e[1],new mn(o,a,n,r)}),b=mk(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=mn.fromRect(t);return r.x=f?e+x[s]:e,r.y=f?n:n+x[s],r});mk(O);var w=function(t){var e=eT(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=mn.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=mn.fromRect(e);return i.x+=null!=(n=t.x)?n:0,i.y+=null!=(r=t.y)?r:0,i})},mS=function(t,e,n){return[]},m_=function(t,e,n){if(0===e.length)return[];var r={flex:mM,grid:mS},i=n.display in r?r[n.display]:null;return(null==i?void 0:i.call(null,t,e,n))||[]},mP=function(t){function e(e){var n=t.call(this,e)||this;n.layoutEvents=[M1.BOUNDS_CHANGED,M1.INSERTED,M1.REMOVED],n.$margin=gV(0),n.$padding=gV(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 eM(e,t),Object.defineProperty(e.prototype,"margin",{get:function(){return this.$margin},set:function(t){this.$margin=gV(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"padding",{get:function(){return this.$padding},set:function(t){this.$padding=gV(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=eT(this.$margin,4),a=o[0],l=o[1],s=o[2],u=o[3];return new mn((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=eT(this.$padding,4),i=r[0],o=r[1],a=r[2],l=r[3],s=eT(this.$margin,4),u=s[0];return new mn(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=m_(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}(lT),mj=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 mA(t,e,n){return t.querySelector(e)?up(t).select(e):up(t).append(n)}function mT(t){return Array.isArray(t)?t.join(", "):`${t||""}`}function mC(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 mN extends mP{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 mL extends mN{update(t){var e;let{subOptions:n}=t;this.attr(t),null==(e=this.child)||e.update(n)}}function mI(t,e){var n;return null==(n=t.filter(t=>t.getOptions().name===e))?void 0:n[0]}function mR(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 mD(t){let e=["arrow","crosshairs","grid","handle","handleLabel","indicator","label","line","tick","tip","title","trunc"],{style:n}=t,r=mj(t,["style"]),i={};return Object.entries(r).forEach(([t,n])=>{e.includes(t)?i[`show${md(t)}`]=n:i[t]=n}),Object.assign(Object.assign({},i),n)}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};function mB(t,e){let{eulerAngles:n,origin:r}=e;r&&t.setOrigin(r),n&&t.rotate(n[0],n[1],n[2])}function mz(t){let{innerWidth:e,innerHeight:n,depth:r}=t.getOptions();return[e,n,r]}function mW(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]=ce(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(eg(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 u7({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(!ex(e))return i;let o=e.map("bottom"===t?[i,1]:[0,i]);if("bottom"===t){let t=o[0];return new u7({domain:[0,n],range:[0,1]}).map(t)}if("left"===t){let t=o[1];return new u7({domain:[0,r],range:[0,1]}).map(t)}return i}}(a,l),y=t=>["top","bottom","center","outer"].includes(t),g=t=>["left","right"].includes(t);return eg(l)||ey(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:em(l)&&"center"===a||ey(l)&&(null==(o=t.getTicks)?void 0:o.call(t))&&y(a)||ey(l)&&g(a)?1-u:u,label:f(p(uw(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:g(a)?1-l:l,label:f(p(uw(e),n,r)),id:String(n)}})}let m$=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?Se(n):n;return t(Object.assign(Object.assign({},e),{labelFormatter:s,labelFilter:(t,e,n)=>r(l[e],e,l),scale:a}))(i)}},mG=m$(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=mF(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(),S=Object.assign(Object.assign(Object.assign({},function(t,e,n,r,i,o){let a=function(t,e,n,r,i,o){let a=n.axis,l=["top","right","bottom","left"].includes(i)?n[`axis${un(i)}`]:n.axisLinear,s=t.getOptions().name;return Object.assign({},a,l,n[`axis${md(s)}`]||{})}(t,0,n,0,i,0);if("center"===i)return Object.assign(Object.assign(Object.assign(Object.assign({},a),{labelDirection:"right"===r?"negative":"positive"}),"center"===r?{labelTransform:"translate(50%,0)"}:null),{tickDirection:"right"===r?"negative":"positive",labelSpacing:4*("center"!==r),titleSpacing:10*("vertical"===o||o===-Math.PI/2),tick:"center"!==r&&void 0});return a}(E,0,x,e,l,o)),u),g),_=function(t,e,n="xy"){let[r,i,o]=mz(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]=ew(r),[f,p]=eE(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=eg(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=mW(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({},S),{type:"linear",data:T,crossSize:s,titleText:mT(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,S),grid:(O=S.grid,!(eg(b)&&ey(b)||eb(b))&&(void 0===O?!!E.getTicks:O)),gridLength:_,line:!0,indexBBox:y}),S.line?null:{lineOpacity:0}),P),j),n);return C.labelOverlap.find(t=>"hide"===t.type)&&(C.crossSize=!1),new mu({className:"axis",style:mD(C)})}}),mH=m$(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=mF(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=mW(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]=ew(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]=eE(i),[h,d]=mz(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=mD(tG({},w,E,O,Object.assign(Object.assign({type:"arc",data:v,titleText:mT(p),grid:h},d),u)));return new mu({style:mh(k,["transform"])})}});mG.props={defaultPosition:"center",defaultSize:45,defaultOrder:0,defaultCrossPadding:[12,12],defaultPadding:[12,12]},mH.props={defaultPosition:"outer",defaultOrientation:"vertical",defaultSize:45,defaultOrder:0,defaultCrossPadding:[12,12],defaultPadding:[12,12]};let mV=t=>(...e)=>{let n=mG(Object.assign({},{crossPadding:50},t))(...e);return mB(n,t),n};mV.props=Object.assign(Object.assign({},mG.props),{defaultPosition:"bottom"});let mU=t=>(...e)=>{let n=mG(Object.assign({},{crossPadding:10},t))(...e);return mB(n,t),n};mU.props=Object.assign(Object.assign({},mG.props),{defaultPosition:"left"});var mq=function(){},mY=function(t,e,n){var r=t,i=pU(e)?e.split("."):e;return i.forEach(function(t,e){e<i.length-1?(pV(r[t])||(r[t]=gO(i[e+1])?[]:{}),r=r[t]):r[t]=n}),t},mX=function(t,e,n){return t<e?e:t>n?n:t},mK=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)}},mZ=y3({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"),mQ=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 lT({class:mZ.contentGroup.name})),n.playWindow=n.contentGroup.appendChild(new lT({class:mZ.playWindow.name})),n.innerCurrPage=n.defaultPage,n}return eM(e,t),Object.defineProperty(e.prototype,"defaultPage",{get:function(){return mX(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=eT(((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,eN([],eT(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 mn(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=eT(this.getFollowingPageDiff(t),2),s=l[0],u=l[1];this.playState="running";var c=y1(o,[{transform:"translate(0, 0)"},{transform:"translate(".concat(-s,", ").concat(-u,")")}],n);return yJ(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:mX(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:mX(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(mZ.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)?pk(e):pM(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=eT("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=eT(b.offset,3),O=eT(x[0],2),w=O[0],E=O[1],k=eT(x[1],2),M=k[0],S=k[1],_=eT(x[2],2),P=_[0],j=_[1],A=b.textAlign,T=n.querySelector("text");T&&(T.style.textAlign=A),t.setLocalPosition(w,E),n.setLocalPosition(M,S),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(mZ.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=eT(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(mZ.controller,"g");if(pS(l.node(),a),a){var s=gu(this.attributes,"button"),u=gu(this.attributes,"pageNum"),c=eT(gf(s),2),f=c[0],p=c[1],h=f.size,d=e_(f,["size"]),y=!l.select(mZ.prevBtnGroup.class).node(),g=l.maybeAppendByClassName(mZ.prevBtnGroup,"g").styles(p);this.prevBtnGroup=g.node();var v=g.maybeAppendByClassName(mZ.prevBtn,"path"),b=l.maybeAppendByClassName(mZ.nextBtnGroup,"g").styles(p);this.nextBtnGroup=b.node(),[v,b.maybeAppendByClassName(mZ.nextBtn,"path")].forEach(function(t){t.styles(eS(eS({},d),{transformOrigin:"center"})),gE(t.node(),h,!0)});var x=l.maybeAppendByClassName(mZ.pageInfoGroup,"g");this.pageInfoGroup=x.node(),x.maybeAppendByClassName(mZ.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=pW(e);this.renderClipPath(n),this.renderController(n),this.setVisiblePages([this.defaultPage]),this.goTo(this.defaultPage)},e.prototype.bindEvents=function(){var t=this,e=mK(function(){return t.render(t.attributes,t)},50);this.playWindow.addEventListener(M1.INSERTED,e),this.playWindow.addEventListener(M1.REMOVED,e)},e}(pD);function mJ(t,e,n){return void 0===t&&(t="horizontal"),"horizontal"===t?e:n}pq.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"]]}),pq.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]]}),pq.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 m0=y3({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"),m1=function(t){function e(e){return t.call(this,e,{span:[1,1],marker:function(){return new lP({style:{r:6}})},markerSize:10,labelFill:"#646464",valueFill:"#646464",labelFontSize:12,valueFontSize:12,labelTextBaseline:"middle",valueTextBaseline:"middle"})||this}return eM(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=eT(gV(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=eT(this.spacing,2),f=c[0],p=c[1];if(r){var h=r-n-f-p,d=eT(this.span,2);s=(t=eT([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=eT(gV(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=eT(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(m0.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=gu(this.attributes,"marker");this.markerGroup=t.maybeAppendByClassName(m0.markerGroup,"g").style("zIndex",0),pF(!!n,this.markerGroup,function(){var t=e.markerGroup.node(),i=t.getElementsByClassName(m0.marker.name)[0],o=n();i?o.nodeName===i.nodeName?(!function(t,e){var n,r,i=e.attributes;try{for(var o=eA(Object.entries(i)),a=o.next();!a.done;a=o.next()){var l=eT(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),pW(i).styles(r)):(i.remove(),pW(o).attr("className",m0.marker.name).styles(r),t.appendChild(o)):(pW(o).attr("className",m0.marker.name).styles(r),t.appendChild(o)),e.markerGroup.node().scale(1/e.markerGroup.node().getScale()[0]),gE(e.markerGroup.node(),e.scaleSize,!0)})},e.prototype.renderLabel=function(t){var e=gu(this.attributes,"label"),n=e.text,r=e_(e,["text"]);this.labelGroup=t.maybeAppendByClassName(m0.labelGroup,"g").style("zIndex",0),this.labelGroup.maybeAppendByClassName(m0.label,function(){return gw(n)}).styles(r)},e.prototype.renderValue=function(t){var e=this,n=gu(this.attributes,"value"),r=n.text,i=e_(n,["text"]);this.valueGroup=t.maybeAppendByClassName(m0.valueGroup,"g").style("zIndex",0),pF(this.showValue,this.valueGroup,function(){e.valueGroup.maybeAppendByClassName(m0.value,function(){return gw(r)}).styles(i)})},e.prototype.renderBackground=function(t){var e=this.shape,n=e.width,r=e.height,i=gu(this.attributes,"background");this.background=t.maybeAppendByClassName(m0.backgroundGroup,"g").style("zIndex",-1),this.background.maybeAppendByClassName(m0.background,"rect").styles(eS({width:n,height:r},i))},e.prototype.adjustLayout=function(){var t=this.layout,e=t.labelWidth,n=t.valueWidth,r=t.height,i=eT(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}),g$(this.labelGroup.select(m0.label.class).node(),Math.ceil(e)),this.showValue&&(this.valueGroup.styles({x:l,y:s}),g$(this.valueGroup.select(m0.value.class).node(),Math.ceil(n)))},e.prototype.render=function(t,e){var n=pW(e);this.renderMarker(n),this.renderLabel(n),this.renderValue(n),this.renderBackground(n),this.adjustLayout()},e}(pD),m2=y3({page:"item-page",navigator:"navigator",item:"item"},"items"),m5=function(t,e,n){return(void 0===n&&(n=!0),t)?e(t):n},m3=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:mq,mouseenter:mq,mouseleave:mq})||this;return n.navigatorShape=[0,0],n}return eM(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=gu(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:eS({layout:n,labelText:l,valueText:s},Object.fromEntries(Object.entries(r).map(function(n){var r=eT(n,2);return[r[0],gp(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=eT(this.navigatorShape,1)[0],l=eT(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=eT(v,2),x=b[0],O=b[1],w=(r-a-(u-1)*o)/u,E=e.getBBox().height,k=eT([0,0],2),M=k[0],S=k[1];return"horizontal"===n?(M=(p=eT([f,x*(E+i)],2))[0],S=p[1],f=O===u-1?0:f+w+o):(M=(h=eT([O*(w+o),f],2))[0],S=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:S}})},e.prototype.getFlexLayout=function(){var t=this.attributes,e=t.width,n=t.height,r=t.rowPadding,i=t.colPadding,o=eT(this.navigatorShape,1)[0],a=eT(this.grid,2),l=a[0],s=a[1],u=eT([e-o,n],2),c=u[0],f=u[1],p=eT([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&&m5(v,function(t){return t<s})?(h=(n=eT([x+k,O,M],3))[0],d=n[1],x=n[2]):(b=(o=eT([b+1,0,0,O+E+r],4))[0],v=o[1],x=o[2],(O=o[3])+E<=f&&m5(b,function(t){return t<l}))?(h=(a=eT([x,O,w],3))[0],d=a[1],x=a[2]):(h=(u=eT([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 mJ(this.attributes.orientation,t,e)},e.prototype.flattenPage=function(t){t.querySelectorAll(m2.item.class).forEach(function(e){t.appendChild(e)}),t.querySelectorAll(m2.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);pW(t).selectAll(m2.item.class).data(this.renderData,function(t){return t.id}).join(function(t){return t.append(function(t){return new m1({style:t.style})}).attr("className",m2.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=eT(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=eT(t,2);return{page:e[0],layouts:e[1]}}),i=eN([],eT(this.navigator.getContainer().children),!1);r.forEach(function(t){var e=t.layouts,r=n.pageViews.appendChild(new lT({className:m2.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),mY(s,"__layout__",t),s.update({x:e,y:n,width:a,height:l})})}),this.relayoutNavigator()},e.prototype.renderNavigator=function(t){var e=pN({orientation:this.attributes.orientation},gu(this.attributes,"nav")),n=this;return t.selectAll(m2.navigator.class).data(["nav"]).join(function(t){return t.append(function(){return new mQ({style:e})}).attr("className",m2.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(pW(e));this.renderItems(r.getContainer()),this.adjustLayout()}},e.prototype.dispatchCustomEvent=function(t,e){var n=new a3(t,{detail:e});this.dispatchEvent(n)},e}(pD),m4=y3({markerGroup:"marker-group",marker:"marker",labelGroup:"label-group",label:"label"},"handle"),m6={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},m8=function(t){function e(e){return t.call(this,e,m6)||this}return eM(e,t),e.prototype.render=function(t,e){var n=pW(e).maybeAppendByClassName(m4.markerGroup,"g");this.renderMarker(n);var r=pW(e).maybeAppendByClassName(m4.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?mJ(r,"horizontalHandle","verticalHandle"):i;pF(!!o,t,function(t){var n=gu(e.attributes,"marker"),r=eS({symbol:o},n);e.marker=t.maybeAppendByClassName(m4.marker,function(){return new pq({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;pF(r,t,function(t){var n,r=gu(e.attributes,"label"),o=r.text,s=e_(r,["text"]),u=(null==(n=t.select(m4.marker.class))?void 0:n.node().getBBox())||{},c=u.width,f=u.height,p=eT(mJ(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(m4.label,"text").styles(eS(eS({},s),{x:h,y:d,text:l(o).toString(),textAlign:y,textBaseline:g}))})},e}(pD),m9={showTitle:!0,padding:0,orientation:"horizontal",backgroundFill:"transparent",titleText:"",titleSpacing:4,titlePosition:"top-left",titleFill:"#2C3542",titleFontWeight:"bold",titleFontFamily:"sans-serif",titleFontSize:12},m7=pN({},m9,{}),vt=pN({},m9,gc(m6,"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"}),ve=y3({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"),vn=function(t){function e(e){return t.call(this,e,m7)||this}return eM(e,t),e.prototype.renderTitle=function(t,e,n){var r=this.attributes,i=r.showTitle,o=r.titleText,a=eT(gf(gu(this.attributes,"title")),2),l=a[0],s=a[1];this.titleGroup=t.maybeAppendByClassName(ve.titleGroup,"g").styles(s);var u=eS(eS({width:e,height:n},l),{text:i?o:""});this.title=this.titleGroup.maybeAppendByClassName(ve.title,function(){return new ma({style:u})}).update(u)},e.prototype.renderItems=function(t,e){var n=e.x,r=e.y,i=e.width,o=e.height,a=eT(gf(gu(this.attributes,"title",!0)),2),l=a[0],s=a[1],u=eS(eS({},l),{width:i,height:o,x:0,y:0});this.itemsGroup=t.maybeAppendByClassName(ve.itemsGroup,"g").styles(eS({x:n,y:r},s));var c=this;this.itemsGroup.selectAll(ve.items.class).data(["items"]).join(function(t){return t.append(function(){return new m3({style:u})}).attr("className",ve.items.name).each(function(){c.items=pW(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 mn(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=mi(r),c=eT(gV(a?i:0),4),f=c[0],p=c[1],h=c[2],d=c[3],y=eT(gV(o),4),g=y[0],v=y[1],b=y[2],x=y[3],O=eT([d+p,f+h],2),w=O[0],E=O[1],k=eT([x+v,g+b],2),M=k[0],S=k[1];if("l"===u[0])return new mn(l.x,l.y,s.width+l.width+w+M,Math.max(s.height+S,l.height));if("t"===u[0])return new mn(l.x,l.y,Math.max(s.width+M,l.width),s.height+l.height+E+S);var _=eT([e.attributes.width||s.width,e.attributes.height||s.height],2),P=_[0],j=_[1];return new mn(s.x,s.y,P+l.width+w+M,j+l.height+E+S)}(r,i):t.prototype.getBBox.call(this)},e.prototype.render=function(t,e){var n=t.width,r=t.height,i=pW(e);this.renderTitle(i,n,r),this.renderItems(i,this.availableSpace),this.adjustLayout()},e}(pD),vr=function(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)};function vi(t){if(vr(t))return t[t.length-1]}var vo=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 va=t=>{let{labelFormatter:e,layout:n,order:r,orientation:i,position:o,size:a,title:l,cols:s,itemMarker:u}=t,c=vo(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}=mR(t,e,n);return{width:i,height:o}}(r,t,va),h=mC(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:mT(l)}),function(t,e){let{labelFormatter:n=t=>`${t}`}=t,{scales:r,theme:i}=e,o=function(t,e){let n=mI(t,"size");return n instanceof dG?2*n.map(NaN):e}(r,i.legendCategory.itemMarkerSize),a={itemMarker:function(t,e){let{scales:n,library:r,markState:i}=e,[o,a]=function(t,e){let n=mI(t,"shape"),r=mI(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)||vi(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=fN(e,["d","fill","strokeWidth","path","stroke","lineWidth","color"]);let c=f8.get(t)||f8.get("point");return(...t)=>new lI({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 mI(n,"shape")&&!l?(t,e)=>u(c(e),t):"function"==typeof l?(t,e)=>{let n=l(t.id,e);return"string"==typeof n?u(n,t):n}:(t,e)=>u(l||c(e),t)}(Object.assign(Object.assign({},t),{itemMarkerSize:o}),e),itemMarkerSize:o,itemMarkerOpacity:function(t){let e=mI(t,"opacity");if(e){let{range:t}=e.getOptions();return(e,n)=>t[n]}}(r)},l="string"==typeof n?Se(n):n,s=mI(r,"color"),u=r.find(t=>t.getOptions().domain.length>0).getOptions().domain,c=s?t=>s.map(t):()=>e.theme.color;return Object.assign(Object.assign({},a),{data:u.map(t=>({id:t,label:l(t),color:c(t)}))})}(t,e)),{legendCategory:y={}}=i,g=mD(Object.assign({},y,d,c)),v=new mL({style:Object.assign(Object.assign({x:a.x,y:a.y,width:a.width,height:a.height},h),{subOptions:g})});return v.appendChild(new vn({className:"legend-category",style:g})),v}};va.props={defaultPosition:"top",defaultOrder:1,defaultSize:40,defaultCrossPadding:[12,12],defaultPadding:[12,12]};var vl={}.toString,vs=function(t,e){return vl.call(t)==="[object "+e+"]"},vu=function(t){return Array.isArray?Array.isArray(t):vs(t,"Array")},vc=function(t){var e=typeof t;return null!==t&&"object"===e||"function"===e},vf=function(t,e){if(t){if(vu(t))for(var n,r=0,i=t.length;r<i&&!1!==e(t[r],r);r++);else if(vc(t)){for(var o in t)if(t.hasOwnProperty(o)&&!1===e(t[o],o))break}}},vp=function(t){return vs(t,"Function")},vh=Array.prototype;vh.splice,vh.indexOf,Array.prototype.splice,Object.prototype.hasOwnProperty;var vd=Object.values?function(t){return Object.values(t)}:function(t){var e=[];return vf(t,function(n,r){vp(t)&&"prototype"===r||e.push(n)}),e},vy=function(t){if("object"!=typeof t||null===t||!vs(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},vg=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&&vy(a)?(vy(e[o])||(e[o]={}),r<i?t(e[o],a,r+1,i):e[o]=n[o]):vu(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 vm=function(t){return t};function vv(){this.map={}}!function(t,e){if(!vp(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 Sn||(Sn=document.createElement("canvas").getContext("2d")),Sn.font=[o,a,i,n+"px",r].join(" "),Sn.measureText(vs(t,"String")?t:"").width},function(t,e){return void 0===e&&(e={}),eC([t],vd(e)).join("")}),vv.prototype.has=function(t){return void 0!==this.map[t]},vv.prototype.get=function(t,e){var n=this.map[t];return void 0===n?e:n},vv.prototype.set=function(t,e){this.map[t]=e},vv.prototype.clear=function(){this.map={}},vv.prototype.delete=function(t){delete this.map[t]},vv.prototype.size=function(){return Object.keys(this.map).length};class vb{constructor(t){this.options=vg({},this.getDefaultOptions()),this.update(t)}getOptions(){return this.options}update(t={}){this.options=vg({},this.options,t),this.rescale(t)}rescale(t){}}function vx(t,e){return e-t?n=>(n-t)/(e-t):t=>.5}function vO(t,...e){return e.reduce((t,e)=>n=>t(e(n)),t)}function vw(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 vE(t){let e=uH().get(t);if(!e)return null;let{model:n,value:r}=e;return"rgb"===n?r:"hsl"===n?function(t){let e=t[0]/360,n=t[1]/100,r=t[2]/100,i=t[3];if(0===n)return[255*r,255*r,255*r,i];let o=r<.5?r*(1+n):r+n-r*n,a=2*r-o,l=vw(a,o,e+1/3);return[255*l,255*vw(a,o,e),255*vw(a,o,e-1/3),i]}(r):null}let vk=(t,e)=>n=>t*(1-n)+e*n,vM=(t,e)=>{let n=vE(t),r=vE(e);return null===n||null===r?n?()=>t:()=>e:t=>{let e=[,,,,];for(let i=0;i<4;i+=1){let o=n[i],a=r[i];e[i]=o*(1-t)+a*t}let[i,o,a,l]=e;return`rgba(${Math.round(i)}, ${Math.round(o)}, ${Math.round(a)}, ${l})`}},vS=(t,e)=>"number"==typeof t&&"number"==typeof e?vk(t,e):"string"==typeof t&&"string"==typeof e?vM(t,e):()=>t,v_=(t,e)=>{let n=vk(t,e);return t=>Math.round(n(t))};function vP(t){return null!=t&&!Number.isNaN(t)}let vj=Math.sqrt(50),vA=Math.sqrt(10),vT=Math.sqrt(2);function vC(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>=vj?10:o>=vA?5:o>=vT?2:1)*10**i:-(10**-i)/(o>=vj?10:o>=vA?5:o>=vT?2:1)}let vN=(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=vC(l,s,n))>0?r=vC(l=Math.floor(l/r)*r,s=Math.ceil(s/r)*r,n):r<0&&(r=vC(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},vL=(t,e,n)=>{let r,i,[o,a]=t,[l,s]=e;return o<a?(r=vx(o,a),i=n(l,s)):(r=vx(a,o),i=n(s,l)),vO(i,r)},vI=(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]=vx(l[t],l[t+1]),o[t]=n(s[t],s[t+1]);return e=>{let n=function(t,e,n,r,i){let o=1,a=r||t.length,l=t=>t;for(;o<a;){let n=Math.floor((o+a)/2);l(t[n])>e?a=n:o=n+1}return o}(t,e,0,r)-1,a=i[n];return vO(o[n],a)(e)}},vR=(t,e,n,r)=>(Math.min(t.length,e.length)>2?vI:vL)(t,e,r?v_:n);class vD extends vb{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:vk,tickCount:5}}map(t){return vP(t)?this.output(t):this.options.unknown}invert(t){return vP(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 vN}rescale(){this.nice();let[t,e]=this.chooseTransforms();this.composeOutput(t,this.chooseClamp(t)),this.composeInput(t,e,this.chooseClamp(e))}chooseClamp(t){let{clamp:e,range:n}=this.options,r=this.options.domain.map(t),i=Math.min(r.length,n.length);return e?function(t,e){let n=e<t?e:t,r=t>e?t:e;return t=>Math.min(Math.max(n,t),r)}(r[0],r[i-1]):vm}composeOutput(t,e){let{domain:n,range:r,round:i,interpolate:o}=this.options,a=vR(n.map(t),r,o,i);this.output=vO(a,e,t)}composeInput(t,e,n){let{domain:r,range:i}=this.options,o=vR(i,r.map(t),vk);this.input=vO(e,n,o)}}let vF=(t,e,n)=>{let r,i,o=t,a=e;if(o===a&&n>0)return[o];let l=vC(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 vB extends vD{getDefaultOptions(){return{domain:[0,1],range:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolate:vS,tickMethod:vF,tickCount:5}}chooseTransforms(){return[vm,vm]}clone(){return new vB(this.options)}}function vz(t,e){return+t.toPrecision(e)}function vW(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 v$={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},vG=y3({background:"background",labelGroup:"label-group",label:"label"},"indicator"),vH=function(t){function e(e){var n=t.call(this,e,v$)||this;return n.point=[0,0],n.group=n.appendChild(new lT({})),n.isMutationObserved=!0,n}return eM(e,t),e.prototype.renderBackground=function(){if(this.label){var t=this.attributes,e=t.position,n=eT(gV(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 mn(s[0]-a,s[1]-r,u[0]+i-s[0]+a,u[1]+o-s[1]+r),f=this.getPath(e,c),p=gu(this.attributes,"background");this.background=pW(this.group).maybeAppendByClassName(vG.background,"path").styles(eS(eS({},p),{path:f})),this.group.appendChild(this.label.node())}},e.prototype.renderLabel=function(){var t=this.attributes,e=t.formatter,n=t.labelText,r=eT(gf(gu(this.attributes,"label")),2),i=r[0],o=r[1],a=(i.text,e_(i,["text"]));this.label=pW(this.group).maybeAppendByClassName(vG.labelGroup,"g").styles(o),n&&this.label.maybeAppendByClassName(vG.label,function(){return gw(e(n))}).style("text",e(n).toString()).selectAll("text").styles(a)},e.prototype.adjustLayout=function(){var t=eT(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,eN([s+1,1],eT(u),!1)),l[0][0]="M",l},e.prototype.createCorner=function(t,e){void 0===e&&(e=10);var n=g0.apply(void 0,eN([],eT(t),!1)),r=eT(t,2),i=eT(r[0],2),o=i[0],a=i[1],l=eT(r[1],2),s=l[0],u=l[1],c=eT(n?[s-o,[o,s]]:[u-a,[a,u]],2),f=c[0],p=eT(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=eT([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?pM(this):pk(this)},e.prototype.bindEvents=function(){this.label.on(M1.BOUNDS_CHANGED,this.renderBackground)},e.prototype.render=function(){this.renderLabel(),this.renderBackground(),this.adjustLayout(),this.applyVisibility()},e}(pD),vV={fill:"#fff",lineWidth:1,radius:2,size:10,stroke:"#bfbfbf",strokeOpacity:1,zIndex:0},vU={fill:"#000",fillOpacity:.45,fontSize:12,textAlign:"center",textBaseline:"middle",zIndex:1},vq={orientation:"horizontal",showLabel:!0,type:"start"},vY=y3({foreground:"foreground",handle:"handle",selection:"selection",sparkline:"sparkline",sparklineGroup:"sparkline-group",track:"track",brushArea:"brush-area"},"slider"),vX=y3({labelGroup:"label-group",label:"label",iconGroup:"icon-group",icon:"icon",iconRect:"icon-rect",iconLine:"icon-line"},"handle"),vK=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return eM(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=e_(t,["size","radius","orientation"]),l=2.4*r,s=pW(e).maybeAppendByClassName(vX.iconRect,"rect").styles(eS(eS({},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(vX.iconLine,"-1"),"line").styles(eS({x1:u,x2:u,y1:f,y2:p},a)),s.maybeAppendByClassName("".concat(vX.iconLine,"-2"),"line").styles(eS({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}(pD),vZ=function(t){function e(e){return t.call(this,e,vq)||this}return eM(e,t),e.prototype.renderLabel=function(t){var e=this,n=this.attributes.showLabel,r=gu(this.attributes,"label"),i=r.transform,o=eT(gf(e_(r,["transform"]),[]),2),a=o[0],l=o[1],s=pW(t).maybeAppendByClassName(vX.labelGroup,"g").styles(l),u=eS(eS({},vU),a),c=u.text,f=e_(u,["text"]);pF(!!n,s,function(t){e.label=t.maybeAppendByClassName(vX.label,"text").styles(eS(eS({},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=eS(eS({orientation:n},vV),gu(this.attributes,"icon")),o=this.attributes.iconShape,a=void 0===o?function(){return new vK({style:i})}:o;pW(t).maybeAppendByClassName(vX.iconGroup,"g").selectAll(vX.icon.class).data([a]).join(function(t){return t.append("string"==typeof a?a:function(){return a(r)}).attr("className",vX.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}(pD);function vQ(t,e){var n=eT(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 vJ=y3({trackGroup:"background-group",track:"background",selectionGroup:"ribbon-group",selection:"ribbon",clipPath:"clip-path"},"ribbon");function v0(t){var e=t.orientation,n=t.size,r=t.length;return mJ(e,[r,n],[n,r])}function v1(t){var e=t.type,n=eT(v0(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 v2=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 eM(e,t),e.prototype.render=function(t,e){n=pW(e).maybeAppendByClassName(vJ.trackGroup,"g"),r=gu(t,"track"),n.maybeAppendByClassName(vJ.track,"path").styles(eS({path:v1(t)},r));var n,r,i=pW(e).maybeAppendByClassName(vJ.selectionGroup,"g"),o=gu(t,"selection"),a=function(t){var e,n,r,i=t.orientation,o=t.color,a=t.block,l=t.partition,s=(r=pE(o)?Array(20).fill(0).map(function(t,e,n){return o(e/(n.length-1))}):o).length,u=r.map(function(t){return on(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(mJ(i,"0","270"),")")):""}(t),l=i.maybeAppendByClassName(vJ.selection,"path").styles(eS({path:v1(t),fill:a},o)),s=l.maybeAppendByClassName(vJ.clipPath,"path").styles({path:function(t){var e=t.orientation,n=t.range;if(!n)return[];var r=eT(v0(t),2),i=r[0],o=r[1],a=eT(n,2),l=a[0],s=a[1],u=mJ(e,l*i,0),c=mJ(e,0,l*o),f=mJ(e,s*i,i),p=mJ(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}(pD),v5=function(t){function e(e){var n=t.call(this,e,vt)||this;return n.eventToOffsetScale=new vB({}),n.innerRibbonScale=new vB({}),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=vQ(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=eT(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 eM(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 mn(0,0,t.width,t.height)},e.prototype.render=function(t,e){var n=this,r=t.showLabel;this.renderTitle(pW(e));var i=this.availableSpace,o=i.x,a=i.y,l=pW(e).maybeAppendByClassName(ve.contentGroup,"g").styles({x:o,y:a});pF(!!r,l.maybeAppendByClassName(ve.labelGroup,"g").styles({zIndex:1}),function(t){n.renderLabel(t)});var s=l.maybeAppendByClassName(ve.ribbonGroup,"g").styles({zIndex:0});this.handlesGroup=l.maybeAppendByClassName(ve.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,eN([],eT(e.map(function(t){return t.value})),!1)),max:Math.max.apply(Math,eN([],eT(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=eT(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=eT(void 0===r?[e,n]:r,2);return[i[0],i[1]]},enumerable:!1,configurable:!0}),e.prototype.ifHorizontal=function(t,e){return mJ(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=gu(this.attributes,"title"),l=eS(eS({},a),{width:i,height:o,text:r}),s=this;t.selectAll(ve.title.class).data(n?[r]:[]).join(function(t){return t.append(function(){return new ma({style:l})}).attr("className",ve.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 mn(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 mn(0,0,0,0);if(this.cacheLabelBBox)return this.cacheLabelBBox;var t,e=(null==(t=this.label.querySelector(y6.labelGroup.class))?void 0:t.children.slice(-1)[0]).getBBox(),n=e.width,r=e.height;return this.cacheLabelBBox=new mn(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=eT(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=eT(this.ifHorizontal([x,g],[g,x]),2),w=O[0],E=O[1],k=["top","left"].includes(v)?l:0,M=eT(this.ifHorizontal([b/2,k],[k,b/2]),2);return new mn(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=gu(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=pN({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(ve.ribbon,function(){return new v2({style:y})}).update(y)},e.prototype.getHandleClassName=function(t){return"".concat(ve.prefix("".concat(t,"-handle")))},e.prototype.renderHandles=function(){var t=this.attributes,e=t.showHandle,n=t.orientation,r=gu(this.attributes,"handle"),i=eT(this.selection,2),o=i[0],a=i[1],l=eS(eS({},r),{orientation:n}),s=r.shape,u="basic"===(void 0===s?"slider":s)?m8:vZ,c=this;this.handlesGroup.selectAll(ve.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(ve.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=eT(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=eT(this.getElementsByClassName(ve.title.name),1)[0],i=this.handlesGroup.select(".".concat(this.getHandleClassName("start"))).node();if(r&&i&&"top-left"===e&&"horizontal"===n){var o=eT(i.getLocalBounds().min,1)[0],a=eT(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 mn(0,0,0,0);var t=this.startHandle.getBBox(),e=t.width,n=t.height,r=this.endHandle.getBBox(),i=eT([Math.max(e,r.width),Math.max(n,r.height)],2),o=i[0],a=i[1];return this.cacheHandleBBox=new mn(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=eT(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=eT(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=gu(this.attributes,"indicator");this.indicator=t.maybeAppendByClassName(ve.indicator,function(){return new vH({})}).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(eS(eS({},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=eT([n.value,s.value],2),c=u[0],f=u[1],p=(c+f)/2;e.push(eS(eS({},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=eT(["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=gu(this.attributes,"tick"),a=gu(this.attributes,"label"),l=a.align,s=pN(eS({showLine:!1,showGrid:!1,showTick:void 0!==n&&n,type:"linear",startPos:[0,0],endPos:[0,0],tickDirection:"negative",labelTransform:"rotate(0)"},this.labelStyle),gc(o,"tick"),gc(a,"label"),{data:this.labelData}),u=eS(eS(eS({},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(ve.label,function(){return new mu({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=eT([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=eT(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=mX(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}),pk(this.indicator.node())},e.prototype.hideIndicator=function(){pM(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=eT(this.selection,2),k=E[0],M=E[1],S=eT([t,e],2),_=S[0],P=S[1];n&&(_+=k,P+=M);var j=this.range;_=(w=eT((r=[j.min,j.max],i=[_,P],o=this.selection,void 0===a&&(a=4),u=(s=eT(r,2))[0],c=s[1],p=(f=eT(i,2))[0],h=f[1],y=(d=eT(o,2))[0],g=d[1],b=(v=eT([p,h],2))[0],O=(x=v[1])-b,(b>x&&(b=(l=eT([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:[_,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?vz((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?vQ(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=eT(this.ribbon.node().getPosition(),2),a=o[0],l=o[1],s=this.ifHorizontal(a,l),u=this.ifHorizontal.apply(this,eN([],eT(vW(t)),!1));return mX(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 a3("valuechange",{detail:{value:this.selection}});this.dispatchEvent(t)},e.prototype.dispatchIndicated=function(t,e){var n=new a3("indicate",{detail:{value:t,range:e}});this.dispatchEvent(n)},e}(pD),v3=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 v4(t){let{domain:e}=t.getOptions(),[n,r]=[e[0],ci(e)];return[n,r]}let v6=t=>{let{labelFormatter:e,layout:n,order:r,orientation:i,position:o,size:a,title:l,style:s,crossPadding:u,padding:c}=t,f=v3(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=mC(o,n),{legendContinuous:v={}}=a,b=mD(Object.assign({},v,Object.assign(Object.assign({titleText:mT(l),labelAlign:"value",labelFormatter:"string"==typeof e?t=>Se(e)(t.label):e},function(t,e,n,r,i,o){let a=mI(t,"color"),l=function(t,e,n){let{size:r}=e,i=mR(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 yT){let{range:t}=a.getOptions(),[e,n]=v4(a);if(a instanceof yI||a instanceof yN){let r=a.thresholds,i=t=>({value:t/n,label:String(t)});return Object.assign(Object.assign({},l),{color:t,data:[e,...r,n].map(i)})}let r=[-1/0,...a.thresholds,1/0].map((t,e)=>({value:e,label:t}));return Object.assign(Object.assign({},l),{data:r,color:t,labelFilter:(t,e)=>e>0&&e<r.length-1})}return function(t,e,n,r,i,o){let{length:a}=t,l=n||r,s=i.color?o.legendContinuous.ribbonFill||"black":o.color,u=e||function(t,e){let n=t.getOptions(),r=t.clone();return r.update(Object.assign(Object.assign({},n),{range:[on(e).toString()]})),r}(l,s),[c,f]=v4(u),[p,h]=v4([e,n,r].filter(t=>void 0!==t).find(t=>!(t instanceof yz)));return Object.assign(Object.assign({},t),{domain:[p,h],data:u.getTicks().map(t=>({value:t})),color:Array(Math.floor(a)).fill(0).map((t,e)=>{let n=(f-c)/(a-1)*e+c,i=u.map(n)||s,o=r?r.map(n):1;return i.replace(/rgb[a]*\(([\d]{1,3}) *, *([\d]{1,3}) *, *([\d]{1,3})[\S\s]*\)/,(t,e,n,r)=>`rgba(${e}, ${n}, ${r}, ${o})`)})})}(l,a,mI(t,"size"),mI(t,"opacity"),e,o)}(r,u,i,t,v6,a)),s),f)),x=new mN({style:Object.assign(Object.assign({x:p,y:h,width:d,height:y},g),{subOptions:b})});return x.appendChild(new v5({className:"legend-continuous",style:b})),x}};v6.props={defaultPosition:"top",defaultOrientation:"vertical",defaultOrder:1,defaultSize:60,defaultLength:200,defaultLegendSize:60,defaultPadding:[20,10],defaultCrossPadding:[12,12]};let v8=t=>()=>new lT;v8.props={};var v9=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 v7(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 bt=(MD={render(t,e){let{width:n,title:r,subtitle:i,spacing:o=2,align:a="left"}=t,l=v9(t,["width","title","subtitle","spacing","align"]),s=ua(l,"title"),u=ua(l,"subtitle"),c=mA(e,".title","text").attr("className","title").call(ca,Object.assign(Object.assign(Object.assign({},v7(0,0,n,a)),{fontSize:14,textBaseline:"top",text:r}),s)).node().getLocalBounds();mA(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({},v7(0,c.max[1]+o,n,a)),{fontSize:12,textBaseline:"top",text:i}),u))})}},class extends lj{constructor(t){super(t),this.descriptor=MD}connectedCallback(){var t,e;null==(e=(t=this.descriptor).render)||e.call(t,this.attributes,this)}update(t={}){var e,n;this.attr(tG({},this.attributes,t)),null==(n=(e=this.descriptor).render)||n.call(e,this.attributes,this)}}),be=t=>({value:e,theme:n})=>{let{x:r,y:i,width:o,height:a}=e.bbox;return new bt({style:tG({},n.title,Object.assign({x:r,y:i,width:o,height:a},t))})};function bn({map:t,initKey:e},n){let r=e(n);return t.has(r)?t.get(r):n}function br(t){return"object"==typeof t?t.valueOf():t}be.props={defaultPosition:"top",defaultOrder:2,defaultSize:36,defaultCrossPadding:[20,20],defaultPadding:[12,12]};class bi extends Map{constructor(t){if(super(),this.map=new Map,this.initKey=br,null!==t)for(let[e,n]of t)this.set(e,n)}get(t){return super.get(bn({map:this.map,initKey:this.initKey},t))}has(t){return super.has(bn({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 bo=Symbol("defaultUnknown");function ba(t,e,n){for(let r=0;r<e.length;r+=1)t.has(e[r])||t.set(n(e[r]),r)}function bl(t){let{value:e,from:n,to:r,mapper:i,notFoundReturn:o}=t,a=i.get(e);if(void 0===a){if(o!==bo)return o;a=n.push(e)-1,i.set(e,a)}return r[a%r.length]}function bs(t){return t instanceof Date?t=>`${t}`:"object"==typeof t?t=>JSON.stringify(t):t=>t}class bu extends vb{getDefaultOptions(){return{domain:[],range:[],unknown:bo}}constructor(t){super(t)}map(t){return 0===this.domainIndexMap.size&&ba(this.domainIndexMap,this.getDomain(),this.domainKey),bl({value:this.domainKey(t),mapper:this.domainIndexMap,from:this.getDomain(),to:this.getRange(),notFoundReturn:this.options.unknown})}invert(t){return 0===this.rangeIndexMap.size&&ba(this.rangeIndexMap,this.getRange(),this.rangeKey),bl({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=bs(e),this.rangeKey=bs(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 bu(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 bc extends bu{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,paddingInner:0,paddingOuter:0,padding:0,unknown:bo,flex:[]}}constructor(t){super(t)}clone(){return new bc(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{domain:e,range:n,paddingOuter:r,paddingInner:i,flex:o,round:a,align:l}=t,s=e.length,u=function(t,e){let n=e-t.length;return n>0?[...t,...Array(n).fill(1)]:n<0?t.slice(0,e):t}(o,s),[c,f]=n,p=f-c,h=p/(2/s*r+1-1/s*i),d=h*i/s,y=h-s*d,g=function(t){let e=Math.min(...t);return t.map(t=>t/e)}(u),v=y/g.reduce((t,e)=>t+e),b=new bi(e.map((t,e)=>{let n=g[e]*v;return[t,a?Math.floor(n):n]})),x=new bi(e.map((t,e)=>{let n=g[e]*v+d;return[t,a?Math.floor(n):n]})),O=Array.from(x.values()).reduce((t,e)=>t+e),w=c+(p-(O-O/s*i))*l,E=a?Math.round(w):w,k=Array(s);for(let t=0;t<s;t+=1){k[t]=Math.round(1e12*E)/1e12;let n=e[t];E+=x.get(n)}return{valueBandWidth:b,valueStep:x,adjustedRange:k}}(t);let{range:a,paddingOuter:l,paddingInner:s,round:u,align:c}=t,f=a[0],p=a[1]-f;n=p/Math.max(1,2*l+(o-s)),u&&(n=Math.floor(n)),f+=(p-n*(o-s))*c,r=n*(1-s),u&&(f=Math.round(f),r=Math.round(r));let h=Array(o).fill(0).map((t,e)=>f+e*n);return{valueStep:n,valueBandWidth:r,adjustedRange:h}}({align:t,range:n,round:r,flex:i,paddingInner:this.getPaddingInner(),paddingOuter:this.getPaddingOuter(),domain:e});this.valueStep=l,this.valueBandWidth=a,this.adjustedRange=o}}var bf=function(t){if("object"!=typeof t||null===t)return t;if(pT(t)){e=[];for(var e,n=0,r=t.length;n<r;n++)"object"==typeof t[n]&&null!=t[n]?e[n]=bf(t[n]):e[n]=t[n]}else for(var i in e={},t)"object"==typeof t[i]&&null!=t[i]?e[i]=bf(t[i]):e[i]=t[i];return e},bp=function(t){function e(e){var n=this,r=e.style,i=e_(e,["style"]);return(n=t.call(this,y5({},{type:"column"},eS({style:r},i)))||this).columnsGroup=new lT({name:"columns"}),n.appendChild(n.columnsGroup),n.render(),n}return eM(e,t),e.prototype.render=function(){var t=this.attributes.columns;pW(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(pN({},this.attributes,t)),this.render()},e.prototype.clear=function(){this.removeChildren()},e}(lS),bh=function(t){function e(e){var n=this,r=e.style,i=e_(e,["style"]);return(n=t.call(this,y5({},{type:"lines"},eS({style:r},i)))||this).linesGroup=n.appendChild(new lT),n.areasGroup=n.appendChild(new lT),n.render(),n}return eM(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(pN({},this.attributes,t)),this.render()},e.prototype.renderLines=function(t){pW(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){pW(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}(lS),bd=function(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)},by=function(t,e){if(t===e)return!0;if(!t||!e||pU(t)||pU(e))return!1;if(bd(t)||bd(e)){if(t.length!==e.length)return!1;for(var n=!0,r=0;r<t.length&&(n=by(t[r],e[r]));r++);return n}if(p_(t)||p_(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=by(t[i[r]],e[i[r]]));r++);return n}return!1};function bg(t,e){void 0===e&&(e=!1);var n=e?t.length-1:0,r=t.map(function(t,e){return eN([e===n?"M":"L"],eT(t),!1)});return e?r.reverse():r}function bm(t,e){if(void 0===e&&(e=!1),t.length<=2)return bg(t);for(var n=[],r=t.length,i=0;i<r;i+=1){var o=e?t[r-i-1]:t[i];by(o,n.slice(-2))||n.push.apply(n,eN([],eT(o),!1))}var a=function(t,e,n){void 0===e&&(e=!1),void 0===n&&(n=[[0,0],[1,1]]);for(var r,i,o,a=!!e,l=[],s=0,u=t.length;s<u;s+=2)l.push([t[s],t[s+1]]);for(var c=function(t,e,n,r){var i,o,a,l,s,u,c=[],f=!!r,p=[1/0,1/0],h=[-1/0,-1/0];if(f){p=(i=eT(r,2))[0],h=i[1];for(var d=0,y=t.length;d<y;d+=1){var g=t[d];p=gt(p,g),h=ge(h,g)}}for(var d=0,v=t.length;d<v;d+=1){var g=t[d];if(0!==d||n)if(d!==v-1||n){o=t[[d?d-1:v-1,d-1][+!n]];var b=[0,0];b=y8(b=y7(a=t[n?(d+1)%v:d+1],o),.4);var x=gn(g,o),O=gn(g,a),w=x+O;0!==w&&(x/=w,O/=w);var E=y8(b,-x),k=y8(b,O);s=y9(g,E),l=gt(l=y9(g,k),ge(a,g)),E=y8(E=y7(l=ge(l,gt(a,g)),g),-x/O),s=gt(s=y9(g,E),ge(o,g)),s=ge(s,gt(o,g)),k=y8(k=y7(g,s),O/x),l=y9(g,k),f&&(s=gt(s=ge(s,p),h),l=gt(l=ge(l,p),h)),c.push(u),c.push(s),u=l}else s=g,c.push(u),c.push(s);else u=g}return n&&c.push(c.shift()),c}(l,0,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=eT(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(eN(["M"],eT(t[r-1]),!1)):a.unshift(eN(["M"],eT(t[0]),!1)),a}function bv(t,e,n){var r=bf(t);return r.push(["L",e,n],["L",0,n],["Z"]),r}var bb=function(t){if(pT(t))return t.reduce(function(t,e){return Math.min(t,e)},t[0])},bx=function(t,e){if(pT(t)){for(var n,r=1/0,i=0;i<t.length;i++){var o=t[i],a=pE(e)?e(o):o[e];a<r&&(n=o,r=a)}return n}},bO=function(t){if(pT(t))return t.reduce(function(t,e){return Math.max(t,e)},t[0])},bw=function(t,e){if(pT(t)){for(var n,r=-1/0,i=0;i<t.length;i++){var o=t[i],a=pE(e)?e(o):o[e];a>r&&(n=o,r=a)}return n}};function bE(t){return 0===t.length?[0,0]:[bb(bx(t,function(t){return bb(t)||0})),bO(bw(t,function(t){return bO(t)||0}))]}function bk(t){for(var e=bf(t),n=e[0].length,r=eT([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 bM=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 eM(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=bf(t);return gO(e[0])?[e]:e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"data",{get:function(){return this.attributes.isStack?bk(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=eT(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=gu(this.attributes,"area"),a=gu(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=eT((y=p.y).getOptions().range||[0,0],2))[0],(b=g[1])>v&&(b=(h=eT([v,b],2))[0],v=h[1]),s.map(function(t){return t.map(function(t,e){return[d.map(e),mX(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=bm(o),l=void 0;if(0===i)l=bv(a,e,n);else{var s=bm(t[i-1],!0),u=o[0];s[0][0]="L",l=eN(eN(eN([],eT(a),!1),eT(s),!1),[eN(["M"],eT(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=bg(t[i]),a=void 0;if(0===i)a=bv(o,e,n);else{var l=bg(t[i-1],!0);l[0][0]="L",a=eN(eN(eN([],eT(o),!1),eT(l),!1),[["Z"]],!1)}r.push(a)}return r}(c,l,x):c.map(function(t){return bv(i?bm(t):bg(t),l,x)})}return{lines:c.map(function(e,n){return eS({stroke:t.getColor(n),path:i?bm(e):bg(e)},a)}),areas:f.map(function(e,n){return eS({path:e,fill:t.getColor(n)},o)})}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"columnsStyle",{get:function(){var t=this,e=gu(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=bk(l));var s=this.createScales(l),u=s.x,c=s.y,f=eT(bE(l),2),p=f[0],h=new vB({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 eS(eS({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",r="rect",!e.querySelector(n)?pW(e).append(r):pW(e).select(n)).attr("className","container").node();var n,r,i=t.type,o="spark".concat(i),a="line"===i?this.linesStyle:this.columnsStyle;pW(e).selectAll(".spark").data([i]).join(function(t){return t.append(function(t){return"line"===t?new bh({className:o,style:a}):new bp({className:o,style:a})}).attr("className","spark ".concat(o))},function(t){return t.update(a)},function(t){return t.remove()})},e.prototype.getColor=function(t){var e=this.attributes.color;return pT(e)?e[t%e.length]:pE(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=eT(bE(t),2),h=p[0],d=p[1],y=new vB({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 vB({domain:[0,t[0].length-1],range:[0,c]}),y:y}:{type:i,x:new bc({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}(pD),bS=function(t){function e(e){var n=t.call(this,e,eS(eS(eS({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},gc(vq,"handle")),gc(vV,"handleIcon")),gc(vU,"handleLabel")))||this;return n.range=[0,1],n.onDragStart=function(t){return function(e){e.stopPropagation(),n.target=t,n.prevPos=n.getOrientVal(vW(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(vW(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 a3("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 eM(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=gu(this.attributes,"sparkline");return eS(eS({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=eT(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=eT(gV(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(vY.selection.class).each(function(n,r){y2(this,e[r],t)})},e.prototype.updateHandlesPosition=function(t){this.attributes.showHandle&&(this.startHandle&&y2(this.startHandle,this.getHandleStyle("start"),t),this.endHandle&&y2(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=gu(this.attributes,"track");this.trackShape=pW(t).maybeAppendByClassName(vY.track,"rect").styles(eS(eS({},this.shape),e))},e.prototype.renderBrushArea=function(t){var e=this.attributes.brushable;this.brushArea=pW(t).maybeAppendByClassName(vY.brushArea,"rect").styles(eS({fill:"transparent",cursor:e?"crosshair":"default"},this.shape))},e.prototype.renderSparkline=function(t){var e=this;pF("horizontal"===this.attributes.orientation,pW(t).maybeAppendByClassName(vY.sparklineGroup,"g"),function(t){var n=e.sparklineStyle;t.maybeAppendByClassName(vY.sparkline,function(){return new bM({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(vY.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 vZ({style:e.getHandleStyle(n)})}).each(function(t){var e=t.type;this.attr("class","".concat(vY.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=pW(t).maybeAppendByClassName(vY.foreground,"g");var i=gu(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(vY.selection.class).data("value"===n?[]:this.calcSelectionArea().map(function(t,e){return{style:eS({},t),index:e,show:"select"===r?1===e:1!==e}}),function(t){return t.index}).join(function(t){return t.append("rect").attr("className",vY.selection.name).call(o).each(function(t,e){var n=this;1===e?(a.selectionShape=pW(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=eT(this.range,2),i=r[0],o=r[1],a=eT(this.getValues().map(function(t){return vz(t,e)}),2),l=a[0],s=a[1],u=eT(((Array.isArray(t)?t:[l,null!=t?t:s])||[l,s]).map(function(t){return vz(t,e)}),2),c=u[0],f=u[1];if("value"===this.attributes.type)return[0,mX(f,i,o)];c>f&&(c=(n=eT([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=eT(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=eT(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=gu(this.attributes,"handle"),s=gu(l,"label"),u=l.spacing,c=this.getHandleSize(),f=this.clampValues(),p=o("start"===t?f[0]:f[1]),h=new pB({style:eS(eS(eS({},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,S=k.y,_=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-_-j>y?A:-A}else{var T=g+j;x="start"===t?S-c>g?-T:j:E-(S+P)-c>g?T:-j}return{x:b,y:x,text:p}},e.prototype.getHandleLabelStyle=function(t){var e=gu(this.attributes,"handleLabel");return eS(eS(eS({},e),this.calcHandleText(t)),this.inferTextStyle(t))},e.prototype.getHandleIconStyle=function(){var t=this.attributes.handleIconShape,e=gu(this.attributes,"handleIcon"),n=this.getOrientVal(["ew-resize","ns-resize"]),r=this.getHandleSize();return eS({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),eS(eS(eS(eS({},gc(this.getHandleIconStyle(),"icon")),gc(eS(eS({},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=eT(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=eT(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 a3(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}(pD);function b_(t,e){return null==t||null==e?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function bP(t,e){return null==t||null==e?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function bj(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=b_,n=(e,n)=>b_(t(e),n),r=(e,n)=>t(e)-n):(e=t===b_||t===bP?t:bA,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 bA(){return 0}function bT(t){return null===t?NaN:+t}let bC=bj(b_),bN=bC.right,bL=bC.left,bI=bj(bT).center;function bR(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=bF(r[t],r[n]);if(e)return e}})):(n=t.map(n),i.sort((t,e)=>bF(n[t],n[e]))),r=t,Array.from(i,t=>r[t])}return t.sort(bD(n))}function bD(t=b_){if(t===b_)return bF;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 bF(t,e){return(null==t||!(t>=t))-(null==e||!(e>=e))||(t<e?-1:+(t>e))}function bB(t){return!!t.getBandWidth}function bz(t,e,n){var r;if(!bB(t))return t.invert(e);let{adjustedRange:i}=t,{domain:o}=t.getOptions(),a=t.getStep(),l=(r=bL(n?i:i.map(t=>t+a),e)+(n?-1:0),Math.min(o.length-1,Math.max(0,r)));return o[l]}function bW(t,e,n){if(!e)return t.getOptions().domain;if(!bB(t)){let r=bR(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 b$(t,e,n,r,i,o){let{x:a,y:l}=i,s=(t,e)=>{let[n,r]=o.invert(t);return[bz(a,n,e),bz(l,r,e)]},u=s([t,e],!0),c=s([n,r],!1);return[bW(a,[u[0],c[0]]),bW(l,[u[1],c[1]])]}function bG(t,e){let[n,r]=t;return[e.map(n),e.map(r)+(e.getStep?e.getStep():0)]}var bH=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 bV=t=>{let{orientation:e,labelFormatter:n,size:r,style:i={},position:o}=t,a=bH(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?Se(n):n,b="horizontal"===e,x=ey(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 bS({className:"slider",style:Object.assign({},y,Object.assign(Object.assign({x:w,y:E,trackLength:b?h:d,orientation:e,formatter:t=>(v||g)(bz(s,x?1-t:t,!0)),sparklineData:function(t,e){let{markState:n}=e;if(tz(t.sparklineData))return t.sparklineData;var r=["y","series"];let[i]=Array.from(n.entries()).filter(([t])=>"line"===t.type||"area"===t.type).map(([t])=>{let{encode:e,slider:n}=t;if((null==n?void 0:n.x)&&0===Object.keys(n.x).length)return Object.fromEntries(r.map(t=>{let n=e[t];return[t,n?n.value:void 0]}))});return(null==i?void 0:i.series)?Object.values(i.series.reduce((t,e,n)=>(t[e]=t[e]||[],t[e].push(i.y[n]),t),{})):null==i?void 0:i.y}(t,r)},i),a))})}};bV.props={defaultPosition:"bottom",defaultSize:24,defaultOrder:1,defaultCrossPadding:[12,12],defaultPadding:[12,12]};let bU=t=>bV(Object.assign(Object.assign({},t),{orientation:"horizontal"}));bU.props=Object.assign(Object.assign({},bV.props),{defaultPosition:"bottom"});let bq=t=>bV(Object.assign(Object.assign({},t),{orientation:"vertical"}));bq.props=Object.assign(Object.assign({},bV.props),{defaultPosition:"left"});var bY=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 a3("scroll",r)),n.dispatchEvent(new a3("valuechange",r))}},n.onTrackClick=function(t){if(n.attributes.slidable){var e=eT(n.getLocalPosition(),2),r=e[0],i=e[1],o=eT(n.padding,4),a=o[0],l=o[3],s=n.getOrientVal([r+l,i+a]),u=(n.getOrientVal(vW(t))-s)/n.trackLength;n.setValue(u,!0)}},n.onThumbMouseenter=function(t){n.dispatchEvent(new a3("thumbMouseenter",{detail:t.detail}))},n.onTrackMouseenter=function(t){n.dispatchEvent(new a3("trackMouseenter",{detail:t.detail}))},n.onThumbMouseleave=function(t){n.dispatchEvent(new a3("thumbMouseleave",{detail:t.detail}))},n.onTrackMouseleave=function(t){n.dispatchEvent(new a3("trackMouseleave",{detail:t.detail}))},n}return eM(e,t),Object.defineProperty(e.prototype,"padding",{get:function(){return gV(this.attributes.padding)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){var t=this.attributes.value,e=eT(this.range,2);return mX(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=eT(this.padding,4),r=n[0],i=n[1],o=n[2],a=n[3],l=eT(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=eT(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=gu(this.attributes,"track"),l=gu(this.attributes,"thumb"),s=eS(eS({brushable:!1,orientation:n,padding:i,selectionRadius:this.thumbRadius,showHandle:!1,slidable:o,trackLength:this.trackLength,trackRadius:this.trackRadius,trackSize:r,values:this.getValues()},gc(a,"track")),gc(l,"selection"));this.slider=pW(t).maybeAppendByClassName("scrollbar",function(){return new bS({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=eT(this.range,2),i=r[0],o=r[1];this.slider.setValues(this.getValues(mX(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}(pD),bX=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 bK=t=>{let{orientation:e,labelFormatter:n,style:r}=t,i=bX(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 bY({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}))})}};bK.props={defaultPosition:"bottom",defaultSize:24,defaultOrder:1,defaultCrossPadding:[12,12],defaultPadding:[12,12]};let bZ=t=>bK(Object.assign(Object.assign({},t),{orientation:"horizontal"}));bZ.props=Object.assign(Object.assign({},bK.props),{defaultPosition:"bottom"});let bQ=t=>bK(Object.assign(Object.assign({},t),{orientation:"vertical"}));bQ.props=Object.assign(Object.assign({},bK.props),{defaultPosition:"left"});let bJ=(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]=ey(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))}},b0=(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]=ey(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))}},b1=(t,e)=>{let{coordinate:n}=e;return l_({name:"scaleInYRadius",inherits:!1,initialValue:"",interpolable:!0,syntax:MJ.NUMBER}),(e,r,i)=>{let[o]=e;if(eg(n))return(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=cc(n,f,[p,h]),{innerRadius:y,outerRadius:g}=d,v=ed().cornerRadius(a).padAngle(l*Math.PI/180),b=new lI({}),x=n.getCenter(),O=t=>{b.attr({d:v(t),transform:`translate(${x[0]}, ${x[1]})`});let e=oL(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);let{style:a}=o,{transform:l="",fillOpacity:s=1,strokeOpacity:u=1,opacity:c=1}=a,[f,p]=ey(n)?["left top","scale(0.0001, 1)"]:["left bottom","scale(1, 0.0001)"],h=[{transform:`${l} ${p}`.trimStart(),transformOrigin:f,fillOpacity:0,strokeOpacity:0,opacity:0},{transform:`${l} ${p}`.trimStart(),transformOrigin:f,fillOpacity:s,strokeOpacity:u,opacity:c,offset:.01},{transform:`${l} scale(1, 1)`.trimStart(),transformOrigin:f,fillOpacity:s,strokeOpacity:u,opacity:c}];return o.animate(h,Object.assign(Object.assign({},i),t))}},b2=(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]=ey(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))}},b5=(t,e)=>{l_({name:"waveInArcAngle",inherits:!1,initialValue:"",interpolable:!0,syntax:MJ.NUMBER});let{coordinate:n}=e;return(r,i,o)=>{let[a]=r;if(!eg(n))return bJ(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=ed().cornerRadius(c).padAngle(f*Math.PI/180),x=cc(n,y,[g,v]),{startAngle:O,endAngle:w}=x,E=new lI({}),k=t=>{E.attr({d:b(t),transform:`translate(${l[0]}, ${l[1]})`});let e=oL(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}};b5.props={};let b3=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))};b3.props={};let b4=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))};b4.props={};let b6=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))},b8=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))},b9=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 b7(t,e){let n={};for(let r of e){let e=t.style[r];e&&(n[r]=e)}return n}b9.props={};let xt=["fill","stroke","fillOpacity","strokeOpacity","opacity","lineWidth"];function xe(t){let{min:e,max:n}=t.getLocalBounds(),[r,i]=e,[o,a]=n;return[r,i,o-r,a-i]}function xn(t,e){let[n,r,i,o]=xe(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`
|
|
10
|
+
(self.webpackChunk_nocobase_plugin_data_visualization=self.webpackChunk_nocobase_plugin_data_visualization||[]).push([["950"],{6823:function(t,e,n){"use strict";let r,i,o,a;n.r(e),n.d(e,{Sankey:function(){return Hk},Mix:function(){return HY},Bar:function(){return G2},Stock:function(){return HS},Rose:function(){return Hd},Sunburst:function(){return HK},Histogram:function(){return Hv},Funnel:function(){return G9},DualAxes:function(){return G6},G2:function(){return tw},Liquid:function(){return HC},Column:function(){return G3},CirclePacking:function(){return Hz},Radar:function(){return Ha},Box:function(){return Hw},Scatter:function(){return Hi},Waterfall:function(){return Hg},Treemap:function(){return HR},BidirectionalBar:function(){return HH},Area:function(){return G0},WordCloud:function(){return HL},Line:function(){return Ht},RadialBar:function(){return HF},Gauge:function(){return HA},Venn:function(){return HU},Tiny:function(){return Hp},Heatmap:function(){return Hx},Bullet:function(){return HP},measureTextWidth:function(){return HQ},Base:function(){return GQ},Violin:function(){return H$},Pie:function(){return Hn}});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,B,z,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,tm={};n.r(tm),n.d(tm,{add:function(){return nT},adjoint:function(){return e6},clone:function(){return eJ},copy:function(){return e0},create:function(){return eQ},determinant:function(){return e8},equals:function(){return nR},exactEquals:function(){return nI},frob:function(){return nA},fromQuat:function(){return nv},fromQuat2:function(){return np},fromRotation:function(){return nl},fromRotationTranslation:function(){return nf},fromRotationTranslationScale:function(){return ng},fromRotationTranslationScaleOrigin:function(){return nm},fromScaling:function(){return na},fromTranslation:function(){return no},fromValues:function(){return e1},fromXRotation:function(){return ns},fromYRotation:function(){return nu},fromZRotation:function(){return nc},frustum:function(){return nb},getRotation:function(){return ny},getScaling:function(){return nd},getTranslation:function(){return nh},identity:function(){return e5},invert:function(){return e4},lookAt:function(){return n_},mul:function(){return nD},multiply:function(){return e9},multiplyScalar:function(){return nN},multiplyScalarAndAdd:function(){return nL},ortho:function(){return nM},orthoNO:function(){return nk},orthoZO:function(){return nS},perspective:function(){return nO},perspectiveFromFieldOfView:function(){return nE},perspectiveNO:function(){return nx},perspectiveZO:function(){return nw},rotate:function(){return ne},rotateX:function(){return nn},rotateY:function(){return nr},rotateZ:function(){return ni},scale:function(){return nt},set:function(){return e2},str:function(){return nj},sub:function(){return nF},subtract:function(){return nC},targetTo:function(){return nP},translate:function(){return e7},transpose:function(){return e3}});var tv={};n.r(tv),n.d(tv,{frequency:function(){return _A},id:function(){return _T},name:function(){return _C},weight:function(){return _j}});var tb={};n.r(tb),n.d(tb,{geoAlbers:function(){return Af},geoAlbersUsa:function(){return Ap},geoAzimuthalEqualArea:function(){return j7},geoAzimuthalEqualAreaRaw:function(){return j9},geoAzimuthalEquidistant:function(){return Ai},geoAzimuthalEquidistantRaw:function(){return Ar},geoConicConformal:function(){return jQ},geoConicConformalRaw:function(){return jZ},geoConicEqualArea:function(){return Ac},geoConicEqualAreaRaw:function(){return Au},geoConicEquidistant:function(){return j4},geoConicEquidistantRaw:function(){return j3},geoEqualEarth:function(){return An},geoEqualEarthRaw:function(){return Ae},geoEquirectangular:function(){return jV},geoEquirectangularRaw:function(){return jH},geoGnomonic:function(){return As},geoGnomonicRaw:function(){return Al},geoIdentity:function(){return j5},geoMercator:function(){return jY},geoMercatorRaw:function(){return jq},geoNaturalEarth1:function(){return Aa},geoNaturalEarth1Raw:function(){return Ao},geoOrthographic:function(){return j2},geoOrthographicRaw:function(){return j1},geoProjection:function(){return j$},geoProjectionMutator:function(){return jG},geoStereographic:function(){return Ad},geoStereographicRaw:function(){return Ah},geoTransverseMercator:function(){return j8},geoTransverseMercatorRaw:function(){return j6}});var tx={};n.r(tx),n.d(tx,{area:function(){return Cw},bottom:function(){return Cj},bottomLeft:function(){return Cj},bottomRight:function(){return Cj},inside:function(){return Cj},left:function(){return Cj},outside:function(){return CN},right:function(){return Cj},spider:function(){return CI},surround:function(){return CD},top:function(){return Cj},topLeft:function(){return Cj},topRight:function(){return Cj}});var tO={};n.r(tO),n.d(tO,{interpolateBlues:function(){return Lm},interpolateBrBG:function(){return NB},interpolateBuGn:function(){return N5},interpolateBuPu:function(){return N4},interpolateCividis:function(){return LP},interpolateCool:function(){return LF},interpolateCubehelixDefault:function(){return LR},interpolateGnBu:function(){return N8},interpolateGreens:function(){return Lb},interpolateGreys:function(){return LO},interpolateInferno:function(){return LX},interpolateMagma:function(){return LY},interpolateOrRd:function(){return N7},interpolateOranges:function(){return L_},interpolatePRGn:function(){return NW},interpolatePiYG:function(){return NG},interpolatePlasma:function(){return LK},interpolatePuBu:function(){return Lr},interpolatePuBuGn:function(){return Le},interpolatePuOr:function(){return NV},interpolatePuRd:function(){return Lo},interpolatePurples:function(){return LE},interpolateRainbow:function(){return Lz},interpolateRdBu:function(){return Nq},interpolateRdGy:function(){return NX},interpolateRdPu:function(){return Ll},interpolateRdYlBu:function(){return NZ},interpolateRdYlGn:function(){return NJ},interpolateReds:function(){return LM},interpolateSinebow:function(){return LH},interpolateSpectral:function(){return N1},interpolateTurbo:function(){return LV},interpolateViridis:function(){return Lq},interpolateWarm:function(){return LD},interpolateYlGn:function(){return Lf},interpolateYlGnBu:function(){return Lu},interpolateYlOrBr:function(){return Lh},interpolateYlOrRd:function(){return Ly},schemeAccent:function(){return CQ},schemeBlues:function(){return Lg},schemeBrBG:function(){return NF},schemeBuGn:function(){return N2},schemeBuPu:function(){return N3},schemeCategory10:function(){return CZ},schemeDark2:function(){return CJ},schemeGnBu:function(){return N6},schemeGreens:function(){return Lv},schemeGreys:function(){return Lx},schemeObservable10:function(){return C0},schemeOrRd:function(){return N9},schemeOranges:function(){return LS},schemePRGn:function(){return Nz},schemePaired:function(){return C1},schemePastel1:function(){return C2},schemePastel2:function(){return C5},schemePiYG:function(){return N$},schemePuBu:function(){return Ln},schemePuBuGn:function(){return Lt},schemePuOr:function(){return NH},schemePuRd:function(){return Li},schemePurples:function(){return Lw},schemeRdBu:function(){return NU},schemeRdGy:function(){return NY},schemeRdPu:function(){return La},schemeRdYlBu:function(){return NK},schemeRdYlGn:function(){return NQ},schemeReds:function(){return Lk},schemeSet1:function(){return C3},schemeSet2:function(){return C4},schemeSet3:function(){return C6},schemeSpectral:function(){return N0},schemeTableau10:function(){return C8},schemeYlGn:function(){return Lc},schemeYlGnBu:function(){return Ls},schemeYlOrBr:function(){return Lp},schemeYlOrRd:function(){return Ld}});var tw={};n.r(tw),n.d(tw,{AREA_CLASS_NAME:function(){return xm},Academy:function(){return yK},Bin:function(){return EX},BinX:function(){return EK},COMPONENT_CLASS_NAME:function(){return xy},Chart:function(){return Rg},ChartEvent:function(){return x8},Classic:function(){return yV},ClassicDark:function(){return yY},Dark:function(){return yq},DiffY:function(){return E4},DodgeX:function(){return EQ},ELEMENT_CLASS_NAME:function(){return xp},Filter:function(){return kw},FlexX:function(){return kv},Group:function(){return ku},GroupColor:function(){return kp},GroupX:function(){return kc},GroupY:function(){return kf},Jitter:function(){return E0},JitterX:function(){return E1},JitterY:function(){return E2},LABEL_CLASS_NAME:function(){return xg},LABEL_LAYER_CLASS_NAME:function(){return xf},Light:function(){return yH},LinearAxis:function(){return mG},MAIN_LAYER_CLASS_NAME:function(){return xc},MASK_CLASS_NAME:function(){return xv},MaybeDefaultX:function(){return h4},MaybeDefaultY:function(){return h9},MaybeFunctionAttribute:function(){return dc},MaybeGradient:function(){return f_},MaybeIdentityX:function(){return hp},MaybeIdentityY:function(){return hf},MaybeKey:function(){return cD},MaybeSeries:function(){return fP},MaybeSize:function(){return px},MaybeStackY:function(){return Rd},MaybeTitle:function(){return cL},MaybeTooltip:function(){return cI},MaybeTuple:function(){return p1},MaybeTupleX:function(){return hH},MaybeTupleY:function(){return hq},MaybeVisualPosition:function(){return p5},MaybeZeroPadding:function(){return p6},MaybeZeroX:function(){return tQ},MaybeZeroY:function(){return pb},MaybeZeroY1:function(){return tZ},MaybeZeroZ:function(){return Ry},NormalizeY:function(){return E9},PLOT_CLASS_NAME:function(){return xd},Pack:function(){return kb},Runtime:function(){return Rp},Sample:function(){return kO},Select:function(){return kr},SelectX:function(){return ko},SelectY:function(){return kl},Selection:function(){return uh},SortColor:function(){return km},SortX:function(){return ky},SortY:function(){return kg},StackEnter:function(){return E6},StackY:function(){return EO},SymmetryY:function(){return E3},VIEW_CLASS_NAME:function(){return xh},corelib:function(){return k3},extend:function(){return Th},geolib:function(){return AO},graphlib:function(){return _Y},plotlib:function(){return Tf},register:function(){return Ru},render:function(){return IJ},renderToMountedElement:function(){return I0},select:function(){return up},stdlib:function(){return Tp}});let tE=()=>[["cartesian"]];tE.props={};let tk=(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}))},tM=t=>{let{startAngle:e,endAngle:n,innerRadius:r,outerRadius:i}=tk(t);return[["translate",0,.5],["reflect.y"],["translate",0,-.5],["polar",e,n,r,i]]};tM.props={};let tS=()=>[["transpose"],["translate",.5,.5],["reflect.x"],["translate",-.5,-.5]];tS.props={transform:!0};let t_=(t={})=>Object.assign(Object.assign({},{startAngle:-Math.PI/2,endAngle:3*Math.PI/2,innerRadius:0,outerRadius:1}),t),tP=t=>{let{startAngle:e,endAngle:n,innerRadius:r,outerRadius:i}=t_(t);return[...tS(),...tM({startAngle:e,endAngle:n,innerRadius:r,outerRadius:i})]};tP.props={};let tj=()=>[["parallel",0,1,0,1]];tj.props={};let tA=({focusX:t=0,focusY:e=0,distortionX:n=2,distortionY:r=2,visual:i=!1})=>[["fisheye",t,e,n,r,i]];tA.props={transform:!0};let tT=(t={})=>Object.assign(Object.assign({},{startAngle:-Math.PI/2,endAngle:3*Math.PI/2,innerRadius:0,outerRadius:1}),t),tC=t=>{let{startAngle:e,endAngle:n,innerRadius:r,outerRadius:i}=tT(t);return[["transpose"],["translate",.5,.5],["reflect"],["translate",-.5,-.5],...tM({startAngle:e,endAngle:n,innerRadius:r,outerRadius:i})]};tC.props={};let tN=t=>{let{startAngle:e=-Math.PI/2,endAngle:n=3*Math.PI/2,innerRadius:r=0,outerRadius:i=1}=t;return[...tj(),...tM({startAngle:e,endAngle:n,innerRadius:r,outerRadius:i})]};tN.props={};let tL=({value:t})=>e=>e.map(()=>t);tL.props={};let tI=({value:t})=>e=>e.map(e=>e[t]);tI.props={};let tR=({value:t})=>e=>e.map(t);tR.props={};let tD=({value:t})=>()=>t;tD.props={};var tF={}.toString,tB=function(t,e){return tF.call(t)==="[object "+e+"]"},tz=function(t){return Array.isArray?Array.isArray(t):tB(t,"Array")},tW=function(t){return"object"==typeof t&&null!==t},t$=function(t){if(!tW(t)||!tB(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},tG=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&&t$(a)?(t$(e[o])||(e[o]={}),r<i?t(e[o],a,r+1,i):e[o]=n[o]):tz(a)?(e[o]=[],e[o]=e[o].concat(a)):void 0!==a&&(e[o]=a)}}(t,e[r]);return t};function tH(t,e){if(null!==t)return{type:"column",value:t,field:e}}function tV(t,e){return Object.assign(Object.assign({},tH(t,e)),{inferred:!0})}function tU(t,e){if(null!==t)return{type:"column",value:t,field:e,visual:!0}}function tq(t,e){let n=[];for(let r of t)n[r]=e;return n}function tY(t,e){let n=t[e];if(!n)return[null,null];let{value:r,field:i=null}=n;return[r,i]}function tX(t,...e){for(let n of e)if("string"!=typeof n)return[n,null];else{let[e,r]=tY(t,n);if(null!==e)return[e,r]}return[null,null]}function tK(t){return!(t instanceof Date)&&"object"==typeof t}let tZ=()=>(t,e)=>{let{encode:n}=e,{y1:r}=n;return void 0!==r?[t,e]:[t,tG({},e,{encode:{y1:tV(tq(t,0))}})]};tZ.props={};let tQ=()=>(t,e)=>{let{encode:n}=e,{x:r}=n;return void 0!==r?[t,e]:[t,tG({},e,{encode:{x:tV(tq(t,0))},scale:{x:{guide:null}}})]};function tJ(t){return function(){return t}}tQ.props={};let t0=Math.abs,t1=Math.atan2,t2=Math.cos,t5=Math.max,t3=Math.min,t4=Math.sin,t6=Math.sqrt,t8=Math.PI,t9=t8/2,t7=2*t8;function et(t){return t>=1?t9:t<=-1?-t9:Math.asin(t)}let ee=Math.PI,en=2*ee,er=en-1e-6;function ei(t){this._+=t[0];for(let e=1,n=t.length;e<n;++e)this._+=arguments[e]+t[e]}class eo{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==t?ei:function(t){let e=Math.floor(t);if(!(e>=0))throw Error(`invalid digits: ${t}`);if(e>15)return ei;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((ee-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%en+en),f>er?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>=ee)},${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 ea(){return new eo}function el(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 eo(e)}function es(t){return t.innerRadius}function eu(t){return t.outerRadius}function ec(t){return t.startAngle}function ef(t){return t.endAngle}function ep(t){return t&&t.padAngle}function eh(t,e,n,r,i,o,a){var l=t-n,s=e-r,u=(a?o:-o)/t6(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)*t6(t5(0,w*w*O-E*E)),M=(E*x-b*k)/O,S=(-E*b-x*k)/O,_=(E*x+b*k)/O,P=(-E*b+x*k)/O,j=M-g,A=S-v,T=_-g,C=P-v;return j*j+A*A>T*T+C*C&&(M=_,S=P),{cx:M,cy:S,x01:-c,y01:-f,x11:M*(i/w-1),y11:S*(i/w-1)}}function ed(){var t=es,e=eu,n=tJ(0),r=null,i=ec,o=ef,a=ep,l=null,s=el(u);function u(){var u,c,f=+t.apply(this,arguments),p=+e.apply(this,arguments),h=i.apply(this,arguments)-t9,d=o.apply(this,arguments)-t9,y=t0(d-h),g=d>h;if(l||(l=u=s()),p<f&&(c=p,p=f,f=c),p>1e-12)if(y>t7-1e-12)l.moveTo(p*t2(h),p*t4(h)),l.arc(0,0,p,h,d,!g),f>1e-12&&(l.moveTo(f*t2(d),f*t4(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,S=a.apply(this,arguments)/2,_=S>1e-12&&(r?+r.apply(this,arguments):t6(f*f+p*p)),P=t3(t0(p-f)/2,+n.apply(this,arguments)),j=P,A=P;if(_>1e-12){var T=et(_/f*t4(S)),C=et(_/p*t4(S));(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*t2(x),L=p*t4(x),I=f*t2(E),R=f*t4(E);if(P>1e-12){var D,F=p*t2(O),B=p*t4(O),z=f*t2(w),W=f*t4(w);if(y<t8)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,z,W,F,B,I,R)){var $,G=N-D[0],H=L-D[1],V=F-D[0],U=B-D[1],q=1/t4((($=(G*V+H*U)/(t6(G*G+H*H)*t6(V*V+U*U)))>1?0:$<-1?t8:Math.acos($))/2),Y=t6(D[0]*D[0]+D[1]*D[1]);j=t3(P,(f-Y)/(q-1)),A=t3(P,(p-Y)/(q+1))}else j=A=0}M>1e-12?A>1e-12?(v=eh(z,W,N,L,p,A,g),b=eh(F,B,I,R,p,A,g),l.moveTo(v.cx+v.x01,v.cy+v.y01),A<P?l.arc(v.cx,v.cy,A,t1(v.y01,v.x01),t1(b.y01,b.x01),!g):(l.arc(v.cx,v.cy,A,t1(v.y01,v.x01),t1(v.y11,v.x11),!g),l.arc(0,0,p,t1(v.cy+v.y11,v.cx+v.x11),t1(b.cy+b.y11,b.cx+b.x11),!g),l.arc(b.cx,b.cy,A,t1(b.y11,b.x11),t1(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=eh(I,R,F,B,f,-j,g),b=eh(N,L,z,W,f,-j,g),l.lineTo(v.cx+v.x01,v.cy+v.y01),j<P?l.arc(v.cx,v.cy,j,t1(v.y01,v.x01),t1(b.y01,b.x01),!g):(l.arc(v.cx,v.cy,j,t1(v.y01,v.x01),t1(v.y11,v.x11),!g),l.arc(0,0,f,t1(v.cy+v.y11,v.cx+v.x11),t1(b.cy+b.y11,b.cx+b.x11),g),l.arc(b.cx,b.cy,j,t1(b.y11,b.x11),t1(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-t8/2;return[t2(r)*n,t4(r)*n]},u.innerRadius=function(e){return arguments.length?(t="function"==typeof e?e:tJ(+e),u):t},u.outerRadius=function(t){return arguments.length?(e="function"==typeof t?t:tJ(+t),u):e},u.cornerRadius=function(t){return arguments.length?(n="function"==typeof t?t:tJ(+t),u):n},u.padRadius=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:tJ(+t),u):r},u.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:tJ(+t),u):i},u.endAngle=function(t){return arguments.length?(o="function"==typeof t?t:tJ(+t),u):o},u.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:tJ(+t),u):a},u.context=function(t){return arguments.length?(l=null==t?null:t,u):l},u}function ey(t){let{transformations:e}=t.getOptions();return e.map(([t])=>t).filter(t=>"transpose"===t).length%2!=0}function eg(t){let{transformations:e}=t.getOptions();return e.some(([t])=>"polar"===t)}function em(t){let{transformations:e}=t.getOptions();return e.some(([t])=>"reflect"===t)&&e.some(([t])=>t.startsWith("transpose"))}function ev(t){let{transformations:e}=t.getOptions();return e.some(([t])=>"helix"===t)}function eb(t){let{transformations:e}=t.getOptions();return e.some(([t])=>"parallel"===t)}function ex(t){let{transformations:e}=t.getOptions();return e.some(([t])=>"fisheye"===t)}function eO(t){return ev(t)||eg(t)}function ew(t){let{transformations:e}=t.getOptions(),[,,,n,r]=e.find(t=>"polar"===t[0]);return[+n,+r]}function eE(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]}ea.prototype=eo.prototype;var ek=function(t,e){return(ek=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 eM(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}ek(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var eS=function(){return(eS=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 e_(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 eP(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 ej(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 eA(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 eT(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 eC(){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 eN(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 eL(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 eI=n(9420),eR="undefined"!=typeof Float32Array?Float32Array:Array;function eD(){var t=new eR(3);return eR!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function eF(t){var e=new eR(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function eB(t){return Math.hypot(t[0],t[1],t[2])}function ez(t,e,n){var r=new eR(3);return r[0]=t,r[1]=e,r[2]=n,r}function eW(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function e$(t,e,n,r){return t[0]=e,t[1]=n,t[2]=r,t}function eG(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function eH(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function eV(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t}function eU(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 eq(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function eY(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 eX(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 eK(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 eZ=function(t,e){return Math.hypot(e[0]-t[0],e[1]-t[1],e[2]-t[2])};function eQ(){var t=new eR(16);return eR!=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 eJ(t){var e=new eR(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 e0(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 e1(t,e,n,r,i,o,a,l,s,u,c,f,p,h,d,y){var g=new eR(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 e2(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 e5(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 e3(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 e4(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,S=c*g-p*d,_=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*_-E*S+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*_-a*A-u*S)*T,t[5]=(n*A-i*_+o*S)*T,t[6]=(g*O-d*k-v*x)*T,t[7]=(c*k-p*O+h*x)*T,t[8]=(a*j-l*_+u*M)*T,t[9]=(r*_-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*S-a*P-s*M)*T,t[13]=(n*P-r*S+i*M)*T,t[14]=(y*x-d*w-g*b)*T,t[15]=(c*w-f*x+p*b)*T,t):null}function e6(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 e8(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 e9(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 e7(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 nt(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 ne(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,S=j*T*a+A*i,_=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*S+f*_+y*P,t[9]=s*S+p*_+g*P,t[10]=u*S+h*_+v*P,t[11]=c*S+d*_+b*P,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)}function nn(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 nr(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 ni(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 no(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 na(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 nl(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 ns(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 nu(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 nc(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 nf(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 np(t,e){var n=new eR(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),nf(t,e,n),t}function nh(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t}function nd(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 ny(t,e){var n=new eR(3);nd(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 ng(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 nm(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],S=i[1],_=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*S+L*_),t[13]=n[1]+S-(j*M+C*S+I*_),t[14]=n[2]+_-(A*M+N*S+R*_),t[15]=1,t}function nv(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 nb(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 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+r)*o,t[14]=2*i*r*o):(t[10]=-1,t[14]=-2*r),t}eD();var nO=nx;function nw(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 nE(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 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]=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 nM=nk;function nS(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 n_(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)?e5(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 nP(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 nj(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 nA(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 nT(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 nC(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 nN(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 nL(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 nI(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 nR(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],S=e[7],_=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-S)<=1e-6*Math.max(1,Math.abs(u),Math.abs(S))&&Math.abs(c-_)<=1e-6*Math.max(1,Math.abs(c),Math.abs(_))&&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 nD=e9,nF=nC;function nB(){var t=new eR(9);return eR!=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 nz(){var t=new eR(4);return eR!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0),t}function nW(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 n$(){var t=new eR(4);return eR!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}function nG(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 nH(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 nV(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 nU(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}nz();var nq=function(t,e,n,r){var i=new eR(4);return i[0]=t,i[1]=e,i[2]=n,i[3]=r,i},nY=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t},nX=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};eD(),ez(1,0,0),ez(0,1,0),n$(),n$(),nB(),Mu=new eR(2),eR!=Float32Array&&(Mu[0]=0,Mu[1]=0);var nK={}.toString,nZ=function(t,e){return nK.call(t)==="[object "+e+"]"},nQ=function(t){return nZ(t,"Number")};function nJ(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}var n0=function(t){return null==t},n1=function(t){return nZ(t,"String")},n2=function(t,e,n){return t<e?e:t>n?n:t},n5={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0};function n3(t){return Array.isArray(t)&&t.every(function(t){var e=t[0].toLowerCase();return n5[e]===t.length-1&&"achlmqstvz".includes(e)})}function n4(t){return n3(t)&&t.every(function(t){var e=t[0];return e===e.toUpperCase()})}function n6(t){return n4(t)&&t.every(function(t){var e=t[0];return"ACLMQZ".includes(e)})}var n8={x1:0,y1:0,x2:0,y2:0,x:0,y:0,qx:null,qy:null};function n9(t){for(var e=t.pathValue[t.segmentStart],n=e.toLowerCase(),r=t.data;r.length>=n5[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,n5[n]))),n5[n]););}function n7(t){return t>=48&&t<=57}function rt(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 re=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 rn(t){if(n6(t))return[].concat(t);for(var e=function(t){if(n4(t))return[].concat(t);var e=function(t){if(n3(t))return[].concat(t);var e=new re(t);for(rt(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=n5[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,rt(t),t.data=[],!o)return n9(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)),!n7(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&&n7(e)){t.err="[path-util]: Invalid path value at index "+i+', "'+r[i]+'" illegal number';return}for(;o<n&&n7(r.charCodeAt(o));)o+=1,l=!0;e=r.charCodeAt(o)}if(46===e){for(u=!0,o+=1;n7(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&&n7(r.charCodeAt(o)))for(;o<n&&n7(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),rt(t),t.index<e&&44===n.charCodeAt(t.index)&&(t.index+=1,rt(t))}if(t.index>=t.max||!((a=n.charCodeAt(t.index))>=48&&a<=57||43===a||45===a||46===a))break}n9(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=eS({},n8),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 rr(t,e,n){var r=t[0],i=t[1];return[r+(e[0]-r)*n,i+(e[1]-i)*n]}function ri(t,e,n,r,i){var o=nJ([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=rr([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 ro(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 ra(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=0,M={x:0,y:0},S=[{x:b,y:x}];v&&s<=0&&(M={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&&S.push({x:b,y:x}),d&&(O+=nJ(E,[b,x])),E=[b,x],v&&O>=s&&s>w[2]){var P=(O-s)/(O-w[2]);M={x:E[0]*(1-P)+w[0]*P,y:E[1]*(1-P)+w[1]*P}}w=[b,x,O]}return v&&s>=O&&(M={x:a,y:l}),{length:O,point:M,min:{x:Math.min.apply(null,S.map(function(t){return t.x})),y:Math.min.apply(null,S.map(function(t){return t.y}))},max:{x:Math.max.apply(null,S.map(function(t){return t.x})),y:Math.max.apply(null,S.map(function(t){return t.y}))}}}function rl(t,e,n){for(var r,i,o,a,l,s,u,c,f,p=rn(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,S=E,_=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&&(S=E)):"L"===c?(w=(r=ri(d[0],d[1],d[2],d[3],(e||0)-_)).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=0,S={x:0,y:0},_=[{x:x,y:O}];b&&u<=0&&(S={x:x,y:O});for(var P=0;P<=v;P+=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 ri(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)},S={x:p(v)*M.x-f(v)*M.y+(t+l)/2,y:f(v)*M.x+p(v)*M.y+(e+s)/2},_={x:(O.x-M.x)/y,y:(O.y-M.y)/g},P=ro({x:1,y:0},_),j=ro(_,{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+S.x,y:f(v)*T+p(v)*C+S.y}}(t,e,n,r,i,o,a,l,s,P/v)).x,O=f.y,h&&_.push({x:x,y:O}),y&&(w+=nJ(k,[x,O])),k=[x,O],b&&w>=u&&u>E[2]){var j=(w-u)/(w-E[2]);S={x:k[0]*(1-j)+E[0]*j,y:k[1]*(1-j)+E[1]*j}}E=[x,O,w]}return b&&u>=w&&(S={x:l,y:s}),{length:w,point:S,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)-_,n||{})).length,E=i.min,k=i.max,M=i.point):"C"===c?(w=(o=ra(d[0],d[1],d[2],d[3],d[4],d[5],d[6],d[7],(e||0)-_,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=0,E={x:0,y:0},k=[{x:g,y:v}];y&&a<=0&&(E={x:g,y:v});for(var M=0;M<=d;M+=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,M/d)).x,v=s.y,c&&k.push({x:g,y:v}),p&&(b+=nJ(O,[g,v])),O=[g,v],y&&b>=a&&a>x[2]){var S=(b-a)/(b-x[2]);E={x:O[0]*(1-S)+x[0]*S,y:O[1]*(1-S)+x[1]*S}}x=[g,v,b]}return y&&a>=b&&(E={x:i,y:o}),{length:b,point:E,min:{x:Math.min.apply(null,k.map(function(t){return t.x})),y:Math.min.apply(null,k.map(function(t){return t.y}))},max:{x:Math.max.apply(null,k.map(function(t){return t.x})),y:Math.max.apply(null,k.map(function(t){return t.y}))}}}(d[0],d[1],d[2],d[3],d[4],d[5],(e||0)-_,n||{})).length,E=a.min,k=a.max,M=a.point):"Z"===c&&(w=(l=ri((d=[y,g,v,b])[0],d[1],d[2],d[3],(e||0)-_)).length,E=l.min,k=l.max,M=l.point),h&&_<e&&_+w>=e&&(S=M),O.push(k),x.push(E),_+=w,y=(s="Z"!==c?f.slice(-2):[v,b])[0],g=s[1];return h&&e>=_&&(S={x:y,y:g}),{length:_,point:S,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 rs=function(t){return Array.isArray?Array.isArray(t):nZ(t,"Array")},ru=function(t){if(rs(t))return t.reduce(function(t,e){return Math.min(t,e)},t[0])},rc=function(t){if(rs(t))return t.reduce(function(t,e){return Math.max(t,e)},t[0])},rf=function(t,e){return(t%e+e)%e};function rp(t,e,n){return{x:t*Math.cos(n)-e*Math.sin(n),y:t*Math.sin(n)+e*Math.cos(n)}}var rh=function(t,e,n,r){return eN(eN([],rr([t,e],[n,r],.5),!0),[n,r,n,r],!1)};function rd(t,e){if(void 0===e&&(e=!1),n6(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=rn(t),a=eS({},n8),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,c,f=t[0],p=t.slice(1).map(Number),h=p[0],d=p[1],y=e.x1,g=e.y1,v=e.x,b=e.y;switch(!"TQ".includes(f)&&(e.qx=null,e.qy=null),f){case"M":e.x=h,e.y=d;break;case"A":return["C"].concat(function t(e,n,r,i,o,a,l,s,u,c){var f,p,h,d,y,g=e,v=n,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=rp(g,v,-k)).x,v=f.y,O=(f=rp(O,w,-k)).x,w=f.y;var S=(g-O)/2,_=(v-w)/2,P=S*S/(b*b)+_*_/(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*_*_-A*S*S)/(j*_*_+A*S*S)));d=T*b*_/x+(g+O)/2,y=-(T*x)*S/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),B=4/3*b*F,z=4/3*x*F,W=[g,v],$=[g+B*Math.sin(p),v-z*R],G=[O+B*Math.sin(h),w-z*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?rp(M[U-1],M[U],k).y:rp(M[U],M[U+1],k).x;return V}((c=[y,g].concat(p))[0],c[1],c[2],c[3],c[4],c[5],c[6],c[7],c[8],c[9]));case"Q":return e.qx=h,e.qy=d,["C"].concat((n=(c=[y,g].concat(p))[0],r=c[1],i=c[2],o=c[3],a=c[4],l=c[5],[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(rh(y,g,h,d));case"Z":if(y===v&&g===b)return["C",y,g,v,b,v,b];return["C"].concat(rh(y,g,v,b))}return t}(o[f],a);o[f]=p;var h=f;if(o[h].length>7){o[h].shift();for(var d=o[h],y=h;d.length;)l[h]="A",o.splice(y+=1,0,["C"].concat(d.splice(0,6)));o.splice(h,1)}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 ry(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?ra(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=rr(i,o,r),u=rr(o,a,r),c=rr(a,l,r),f=rr(s,u,r),p=rr(u,c,r),h=rr(f,p,r),[["C"].concat(s,f,h),["C"].concat(p,c,l)]):[t,t]:[t],{s:t,ss:d,l:g}})}function rg(t){var e,n,r;return e=0,n=0,r=0,rd(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 rm=function(t){return nZ(t,"Boolean")},rv=function(t){var e=typeof t;return null!==t&&"object"===e||"function"===e},rb=function(t){return void 0===t};function rx(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function rO(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function rw(){}var rE="\\s*([+-]?\\d+)\\s*",rk="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",rM="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",rS=/^#([0-9a-f]{3,8})$/,r_=RegExp("^rgb\\("+[rE,rE,rE]+"\\)$"),rP=RegExp("^rgb\\("+[rM,rM,rM]+"\\)$"),rj=RegExp("^rgba\\("+[rE,rE,rE,rk]+"\\)$"),rA=RegExp("^rgba\\("+[rM,rM,rM,rk]+"\\)$"),rT=RegExp("^hsl\\("+[rk,rM,rM]+"\\)$"),rC=RegExp("^hsla\\("+[rk,rM,rM,rk]+"\\)$"),rN={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 rL(){return this.rgb().formatHex()}function rI(){return this.rgb().formatRgb()}function rR(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=rS.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?rD(e):3===n?new rB(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?rF(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?rF(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=r_.exec(t))?new rB(e[1],e[2],e[3],1):(e=rP.exec(t))?new rB(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=rj.exec(t))?rF(e[1],e[2],e[3],e[4]):(e=rA.exec(t))?rF(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=rT.exec(t))?rG(e[1],e[2]/100,e[3]/100,1):(e=rC.exec(t))?rG(e[1],e[2]/100,e[3]/100,e[4]):rN.hasOwnProperty(t)?rD(rN[t]):"transparent"===t?new rB(NaN,NaN,NaN,0):null}function rD(t){return new rB(t>>16&255,t>>8&255,255&t,1)}function rF(t,e,n,r){return r<=0&&(t=e=n=NaN),new rB(t,e,n,r)}function rB(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function rz(){return"#"+r$(this.r)+r$(this.g)+r$(this.b)}function rW(){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 r$(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function rG(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new rV(t,e,n,r)}function rH(t){if(t instanceof rV)return new rV(t.h,t.s,t.l,t.opacity);if(t instanceof rw||(t=rR(t)),!t)return new rV;if(t instanceof rV)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 rV(a,l,s,t.opacity)}function rV(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function rU(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 rq(t,e,n){return void 0===n&&(n=1e-5),Math.abs(t-e)<n}function rY(t,e,n,r){var i=t-n,o=e-r;return Math.sqrt(i*i+o*o)}function rX(t,e){var n=Math.min.apply(Math,eN([],eT(t),!1)),r=Math.min.apply(Math,eN([],eT(e),!1));return{x:n,y:r,width:Math.max.apply(Math,eN([],eT(t),!1))-n,height:Math.max.apply(Math,eN([],eT(e),!1))-r}}function rK(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,eN([],eT(t.concat([h])),!1)),i.apply(void 0,eN([],eT(e.concat([h])),!1))],y=rY(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,eN([],eT(t.concat([v])),!1)),i.apply(void 0,eN([],eT(e.concat([v])),!1))],y=rY(s[0],s[1],d[0],d[1]);if(v>=0&&y<l)a=v,l=y;else{var x=[i.apply(void 0,eN([],eT(t.concat([b])),!1)),i.apply(void 0,eN([],eT(e.concat([b])),!1))],O=rY(s[0],s[1],x[0],x[1]);b<=1&&O<l?(a=b,l=O):f*=.5}}return{x:i.apply(void 0,eN([],eT(t.concat([a])),!1)),y:i.apply(void 0,eN([],eT(e.concat([a])),!1))}}rx(rw,rR,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:rL,formatHex:rL,formatHsl:function(){return rH(this).formatHsl()},formatRgb:rI,toString:rI}),rx(rB,function(t,e,n,r){var i;return 1==arguments.length?((i=t)instanceof rw||(i=rR(i)),i)?new rB((i=i.rgb()).r,i.g,i.b,i.opacity):new rB:new rB(t,e,n,null==r?1:r)},rO(rw,{brighter:function(t){return t=null==t?1.4285714285714286:Math.pow(1.4285714285714286,t),new rB(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new rB(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:rz,formatHex:rz,formatRgb:rW,toString:rW})),rx(rV,function(t,e,n,r){return 1==arguments.length?rH(t):new rV(t,e,n,null==r?1:r)},rO(rw,{brighter:function(t){return t=null==t?1.4285714285714286:Math.pow(1.4285714285714286,t),new rV(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new rV(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 rB(rU(t>=240?t-240:t+120,i,r),rU(t,i,r),rU(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 rZ(t,e,n,r,i){return{x:(1-i)*t+i*n,y:(1-i)*e+i*r}}function rQ(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 rJ(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(rq(l,0))!rq(s,0)&&(i=-u/s)>=0&&i<=1&&c.push(i);else{var f=s*s-4*l*u;rq(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 r0(t,e,n,r,i,o,a,l,s,u,c){var f=rK([t,n,i,a],[e,r,o,l],s,u,rQ,c);return rY(f.x,f.y,s,u)}function r1(t,e,n,r){var i=1-r;return i*i*t+2*r*i*e+r*r*n}function r2(t,e,n){var r=t+n-2*e;if(rq(r,0))return[.5];var i=(t-e)/r;return i<=1&&i>=0?[i]:[]}"undefined"!=typeof globalThis||("undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self&&self);var r5={exports:{}};r5.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 r3=r5.exports;(Mc=MF||(MF={})).GROUP="g",Mc.CIRCLE="circle",Mc.ELLIPSE="ellipse",Mc.IMAGE="image",Mc.RECT="rect",Mc.LINE="line",Mc.POLYLINE="polyline",Mc.POLYGON="polygon",Mc.TEXT="text",Mc.PATH="path",Mc.HTML="html",Mc.MESH="mesh",(Mf=MB||(MB={}))[Mf.ZERO=0]="ZERO",Mf[Mf.NEGATIVE_ONE=1]="NEGATIVE_ONE";var r4=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}(),r6=function(){function t(t){this.clipSpaceNearZ=MB.NEGATIVE_ONE,this.plugins=[],this.config=eS({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 r8(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function r9(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function r7(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function it(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t}function ie(t){return void 0===t?0:t>360||t<-360?t%360:t}function ir(t,e,n){return(void 0===e&&(e=0),void 0===n&&(n=0),Array.isArray(t)&&3===t.length)?eF(t):nQ(t)?ez(t,e,n):ez(t[0],t[1]||e,t[2]||n)}function ii(t){return Math.PI/180*t}function io(t){return 180/Math.PI*t}function ia(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=eT(nd(eD(),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 il(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=io(Math.atan2(n,e));return[t[6],t[7],o,a,l]}var is=eQ(),iu=eQ(),ic=nz(),ip=[eD(),eD(),eD()],ih=eD();function id(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 iy=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){r8(this.center,t),r8(this.halfExtents,e),r9(this.min,this.center,this.halfExtents),r7(this.max,this.center,this.halfExtents)},t.prototype.setMinMax=function(t,e){r7(this.center,e,t),it(this.center,this.center,.5),r9(this.halfExtents,e,t),it(this.halfExtents,this.halfExtents,.5),r8(this.min,t),r8(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,S=v+w,_=b-E,P=b+E,j=x-k,A=x+k;M<c&&(c=M),S>f&&(f=S),_<p&&(p=_),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],r9(this.min,n,r),r7(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 r8([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 r8([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}(),ig=function(){function t(t,e){this.distance=t||0,this.normal=e||ez(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 eq(t,this.normal)-this.distance},t.prototype.normalize=function(){var t=1/eB(this.normal);eV(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&&eY(n,t,e,i),o},t}();(Mp=Mz||(Mz={}))[Mp.OUTSIDE=0xffffffff]="OUTSIDE",Mp[Mp.INSIDE=0]="INSIDE",Mp[Mp.INDETERMINATE=0x7fffffff]="INDETERMINATE";var im=function(){function t(t){if(this.planes=[],t)this.planes=t;else for(var e=0;e<6;e++)this.planes.push(new ig)}return t.prototype.extractFromVPMatrix=function(t){var e=eT(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];e$(this.planes[0].normal,o-n,u-a,h-c),this.planes[0].distance=v-d,e$(this.planes[1].normal,o+n,u+a,h+c),this.planes[1].distance=v+d,e$(this.planes[2].normal,o+r,u+l,h+f),this.planes[2].distance=v+y,e$(this.planes[3].normal,o-r,u-l,h-f),this.planes[3].distance=v-y,e$(this.planes[4].normal,o-i,u-s,h-p),this.planes[4].distance=v-g,e$(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}(),iv=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}(),ib=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}(),ix="Method not implemented.",iO="Use document.documentElement instead.";(Mh=MW||(MW={}))[Mh.ORBITING=0]="ORBITING",Mh[Mh.EXPLORING=1]="EXPLORING",Mh[Mh.TRACKING=2]="TRACKING",(Md=M$||(M$={}))[Md.DEFAULT=0]="DEFAULT",Md[Md.ROTATIONAL=1]="ROTATIONAL",Md[Md.TRANSLATIONAL=2]="TRANSLATIONAL",Md[Md.CINEMATIC=3]="CINEMATIC",(My=MG||(MG={}))[My.ORTHOGRAPHIC=0]="ORTHOGRAPHIC",My[My.PERSPECTIVE=1]="PERSPECTIVE";var iw={UPDATED:"updated"},iE=function(){function t(){this.clipSpaceNearZ=MB.NEGATIVE_ONE,this.eventEmitter=new eI,this.matrix=eQ(),this.right=ez(1,0,0),this.up=ez(0,1,0),this.forward=ez(0,0,1),this.position=ez(0,0,1),this.focalPoint=ez(0,0,0),this.distanceVector=ez(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=eQ(),this.projectionMatrixInverse=eQ(),this.jitteredProjectionMatrix=void 0,this.enableUpdate=!0,this.type=MW.EXPLORING,this.trackingMode=M$.DEFAULT,this.projectionMode=MG.PERSPECTIVE,this.frustum=new im,this.orthoMatrix=eQ()}return t.prototype.isOrtho=function(){return this.projectionMode===MG.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===MW.EXPLORING?this.setWorldRotation(!0):this.setWorldRotation(!1),this._getAngles(),this.type===MW.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!==MW.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 e4(eQ(),this.matrix)},t.prototype.getWorldTransform=function(){return this.matrix},t.prototype.jitterProjectionMatrix=function(t,e){var n=no(eQ(),[t,e,0]);this.jitteredProjectionMatrix=e9(eQ(),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===MG.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===MG.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===MG.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===MG.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===MG.ORTHOGRAPHIC?this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far):this.projectionMode===MG.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=ez(a.x-r,a.y-i,0),s=eq(l,this.right)/eB(this.right),u=eq(l,this.up)/eB(this.up);return this.pan(-s,-u),this},t.prototype.setPerspective=function(t,e,n,r){this.projectionMode=MG.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(ii(.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===MB.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,nt(this.projectionMatrix,this.projectionMatrix,ez(1,-1,1)),e4(this.projectionMatrixInverse,this.projectionMatrix),this.triggerUpdate(),this},t.prototype.setOrthographic=function(t,e,n,r,i,o){this.projectionMode=MG.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===MB.NEGATIVE_ONE?nM(this.projectionMatrix,f,p,d,h,i,o):nS(this.projectionMatrix,f,p,d,h,i,o),nt(this.projectionMatrix,this.projectionMatrix,ez(1,-1,1)),e4(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=ir(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=ez(0,1,0);if(this.focalPoint=ir(t,e,n),this.trackingMode===M$.CINEMATIC){var i=eH(eD(),this.focalPoint,this.position);t=i[0],e=i[1],n=i[2];var o=io(Math.asin(e/eB(i))),a=90+io(Math.atan2(n,t)),l=eQ();nr(l,l,ii(a)),nn(l,l,ii(o)),r=eX(eD(),[0,1,0],l)}return e4(this.matrix,n_(eQ(),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=eD();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=ie(t),this.computeMatrix(),this._getAxes(),this.type===MW.ORBITING||this.type===MW.EXPLORING?this._getPosition():this.type===MW.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},t.prototype.getAzimuth=function(){return this.azimuth},t.prototype.setElevation=function(t){return this.elevation=ie(t),this.computeMatrix(),this._getAxes(),this.type===MW.ORBITING||this.type===MW.EXPLORING?this._getPosition():this.type===MW.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},t.prototype.getElevation=function(){return this.elevation},t.prototype.setRoll=function(t){return this.roll=ie(t),this.computeMatrix(),this._getAxes(),this.type===MW.ORBITING||this.type===MW.EXPLORING?this._getPosition():this.type===MW.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=nG(n$(),[0,0,1],ii(this.roll));e5(this.matrix);var e=nG(n$(),[1,0,0],ii((this.rotateWorld&&this.type!==MW.TRACKING||this.type===MW.TRACKING?1:-1)*this.elevation)),n=nG(n$(),[0,1,0],ii((this.rotateWorld&&this.type!==MW.TRACKING||this.type===MW.TRACKING?1:-1)*this.azimuth)),r=nH(n$(),n,e);r=nH(n$(),r,t);var i=nv(eQ(),r);this.type===MW.ORBITING||this.type===MW.EXPLORING?(e7(this.matrix,this.matrix,this.focalPoint),e9(this.matrix,this.matrix,i),e7(this.matrix,this.matrix,[0,0,this.distance])):this.type===MW.TRACKING&&(e7(this.matrix,this.matrix,this.position),e9(this.matrix,this.matrix,i))},t.prototype._setPosition=function(t,e,n){this.position=ir(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(){eW(this.right,ir(nW(nz(),[1,0,0,0],this.matrix))),eW(this.up,ir(nW(nz(),[0,1,0,0],this.matrix))),eW(this.forward,ir(nW(nz(),[0,0,1,0],this.matrix))),eU(this.right,this.right),eU(this.up,this.up),eU(this.forward,this.forward)},t.prototype._getAngles=function(){var t=this.distanceVector[0],e=this.distanceVector[1],n=this.distanceVector[2],r=eB(this.distanceVector);if(0===r){this.elevation=0,this.azimuth=0;return}this.type===MW.TRACKING||this.rotateWorld?(this.elevation=io(Math.asin(e/r)),this.azimuth=io(Math.atan2(-t,-n))):(this.elevation=-io(Math.asin(e/r)),this.azimuth=-io(Math.atan2(-t,-n)))},t.prototype._getPosition=function(){eW(this.position,ir(nW(nz(),[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=nB(),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],eG(this.focalPoint,this.position,this.distanceVector),this._getDistance()},t.prototype._getDistance=function(){this.distanceVector=eH(eD(),this.focalPoint,this.position),this.distance=eB(this.distanceVector),this.dollyingStep=this.distance/100},t.prototype._getOrthoMatrix=function(){if(this.projectionMode===MG.ORTHOGRAPHIC){var t=this.position,e=nG(n$(),[0,0,1],-this.roll*Math.PI/180);nm(this.orthoMatrix,e,ez((this.rright-this.left)/2-t[0],(this.top-this.bottom)/2-t[1],0),ez(this.zoom,this.zoom,1),t)}},t.prototype.triggerUpdate=function(){if(this.enableUpdate){var t=this.getViewTransform(),e=e9(eQ(),this.getPerspective(),t);this.getFrustum().extractFromVPMatrix(e),this.eventEmitter.emit(iw.UPDATED)}},t.prototype.rotate=function(t,e,n){throw Error(ix)},t.prototype.pan=function(t,e){throw Error(ix)},t.prototype.dolly=function(t){throw Error(ix)},t.prototype.createLandmark=function(t,e){throw Error(ix)},t.prototype.gotoLandmark=function(t,e){throw Error(ix)},t.prototype.cancelLandmarkAnimation=function(){throw Error(ix)},t}();function ik(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(ik.Cache||Map),n}ik.Cache=Map,(Mg=MH||(MH={}))[Mg.kUnknown=0]="kUnknown",Mg[Mg.kNumber=1]="kNumber",Mg[Mg.kPercentage=2]="kPercentage",Mg[Mg.kEms=3]="kEms",Mg[Mg.kPixels=4]="kPixels",Mg[Mg.kRems=5]="kRems",Mg[Mg.kDegrees=6]="kDegrees",Mg[Mg.kRadians=7]="kRadians",Mg[Mg.kGradians=8]="kGradians",Mg[Mg.kTurns=9]="kTurns",Mg[Mg.kMilliseconds=10]="kMilliseconds",Mg[Mg.kSeconds=11]="kSeconds",Mg[Mg.kInteger=12]="kInteger",(Mm=MV||(MV={}))[Mm.kUNumber=0]="kUNumber",Mm[Mm.kUPercent=1]="kUPercent",Mm[Mm.kULength=2]="kULength",Mm[Mm.kUAngle=3]="kUAngle",Mm[Mm.kUTime=4]="kUTime",Mm[Mm.kUOther=5]="kUOther",(Mv=MU||(MU={}))[Mv.kAll=0]="kAll",Mv[Mv.kNonNegative=1]="kNonNegative",Mv[Mv.kInteger=2]="kInteger",Mv[Mv.kNonNegativeInteger=3]="kNonNegativeInteger",Mv[Mv.kPositiveInteger=4]="kPositiveInteger",(Mb=Mq||(Mq={}))[Mb.kYes=0]="kYes",Mb[Mb.kNo=1]="kNo",(Mx=MY||(MY={}))[Mx.kYes=0]="kYes",Mx[Mx.kNo=1]="kNo";var iM=[{name:"em",unit_type:MH.kEms},{name:"px",unit_type:MH.kPixels},{name:"deg",unit_type:MH.kDegrees},{name:"rad",unit_type:MH.kRadians},{name:"grad",unit_type:MH.kGradians},{name:"ms",unit_type:MH.kMilliseconds},{name:"s",unit_type:MH.kSeconds},{name:"rem",unit_type:MH.kRems},{name:"turn",unit_type:MH.kTurns}];(MO=MX||(MX={}))[MO.kUnknownType=0]="kUnknownType",MO[MO.kUnparsedType=1]="kUnparsedType",MO[MO.kKeywordType=2]="kKeywordType",MO[MO.kUnitType=3]="kUnitType",MO[MO.kSumType=4]="kSumType",MO[MO.kProductType=5]="kProductType",MO[MO.kNegateType=6]="kNegateType",MO[MO.kInvertType=7]="kInvertType",MO[MO.kMinType=8]="kMinType",MO[MO.kMaxType=9]="kMaxType",MO[MO.kClampType=10]="kClampType",MO[MO.kTransformType=11]="kTransformType",MO[MO.kPositionType=12]="kPositionType",MO[MO.kURLImageType=13]="kURLImageType",MO[MO.kColorType=14]="kColorType",MO[MO.kUnsupportedColorType=15]="kUnsupportedColorType";var iS=function(t){return t?"number"===t?MH.kNumber:"percent"===t||"%"===t?MH.kPercentage:iM.find(function(e){return e.name===t}).unit_type:MH.kUnknown},i_=function(t){switch(t){case MH.kNumber:case MH.kInteger:return MV.kUNumber;case MH.kPercentage:return MV.kUPercent;case MH.kPixels:return MV.kULength;case MH.kMilliseconds:case MH.kSeconds:return MV.kUTime;case MH.kDegrees:case MH.kRadians:case MH.kGradians:case MH.kTurns:return MV.kUAngle;default:return MV.kUOther}},iP=function(t){switch(t){case MV.kUNumber:return MH.kNumber;case MV.kULength:return MH.kPixels;case MV.kUPercent:return MH.kPercentage;case MV.kUTime:return MH.kSeconds;case MV.kUAngle:return MH.kDegrees;default:return MH.kUnknown}},ij=function(t){var e=1;switch(t){case MH.kPixels:case MH.kDegrees:case MH.kSeconds:break;case MH.kMilliseconds:e=.001;break;case MH.kRadians:e=180/Math.PI;break;case MH.kGradians:e=.9;break;case MH.kTurns:e=360}return e},iA=function(t){switch(t){case MH.kNumber:case MH.kInteger:break;case MH.kPercentage:return"%";case MH.kEms:return"em";case MH.kRems:return"rem";case MH.kPixels:return"px";case MH.kDegrees:return"deg";case MH.kRadians:return"rad";case MH.kGradians:return"grad";case MH.kMilliseconds:return"ms";case MH.kSeconds:return"s";case MH.kTurns:return"turn"}return""},iT=function(){function t(){}return t.isAngle=function(t){return t===MH.kDegrees||t===MH.kRadians||t===MH.kGradians||t===MH.kTurns},t.isLength=function(t){return t>=MH.kEms&&t<MH.kDegrees},t.isRelativeUnit=function(t){return t===MH.kPercentage||t===MH.kEms||t===MH.kRems},t.isTime=function(t){return t===MH.kSeconds||t===MH.kMilliseconds},t.prototype.toString=function(){return this.buildCSSText(Mq.kNo,MY.kNo,"")},t.prototype.isNumericValue=function(){return this.getType()>=MX.kUnitType&&this.getType()<=MX.kClampType},t}(),iC=function(t){function e(e){var n=t.call(this)||this;return n.colorSpace=e,n}return eM(e,t),e.prototype.getType=function(){return MX.kColorType},e.prototype.to=function(t){return this},e}(iT);(Mw=MK||(MK={}))[Mw.Constant=0]="Constant",Mw[Mw.LinearGradient=1]="LinearGradient",Mw[Mw.RadialGradient=2]="RadialGradient";var iN=function(t){function e(e,n){var r=t.call(this)||this;return r.type=e,r.value=n,r}return eM(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 MX.kColorType},e}(iT),iL=function(t){function e(e){var n=t.call(this)||this;return n.value=e,n}return eM(e,t),e.prototype.clone=function(){return new e(this.value)},e.prototype.getType=function(){return MX.kKeywordType},e.prototype.buildCSSText=function(t,e,n){return n+this.value},e}(iT),iI=ik(function(t){return void 0===t&&(t=""),t.replace(/-([a-z])/g,function(t){return t[1].toUpperCase()})}),iR=function(t){return t.split("").map(function(t,e){return t.toUpperCase()===t?"".concat(0!==e?"-":"").concat(t.toLowerCase()):t}).join("")};function iD(t){return"function"==typeof t}var iF={d:{alias:"path"},strokeDasharray:{alias:"lineDash"},strokeWidth:{alias:"lineWidth"},textAnchor:{alias:"textAlign"},src:{alias:"img"}},iB=ik(function(t){var e=iI(t),n=iF[e];return(null==n?void 0:n.alias)||e}),iz=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},iW=function(t){return iP(i_(t))},i$=function(t){function e(e,n){void 0===n&&(n=MH.kNumber);var r,i=t.call(this)||this;return i.unit="string"==typeof n?iS(n):n,i.value=e,i}return eM(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 MX.kUnitType},e.prototype.convertTo=function(t){if(this.unit===t)return new e(this.value,this.unit);var n=iW(this.unit);if(n!==iW(t)||n===MH.kUnknown)return null;var r=ij(this.unit)/ij(t);return new e(this.value*r,t)},e.prototype.buildCSSText=function(t,e,n){var r;switch(this.unit){case MH.kUnknown:break;case MH.kInteger:r=Number(this.value).toFixed(0);break;case MH.kNumber:case MH.kPercentage:case MH.kEms:case MH.kRems:case MH.kPixels:case MH.kDegrees:case MH.kRadians:case MH.kGradians:case MH.kMilliseconds:case MH.kSeconds:case MH.kTurns:var i=this.value,o=iA(this.unit);if(i<-999999||i>999999){var a=iA(this.unit);r=!Number.isFinite(i)||Number.isNaN(i)?iz(i,a):i+(a||"")}else r="".concat(i).concat(o)}return n+r},e}(iT),iG=new i$(0,"px");new i$(1,"px");var iH=new i$(0,"deg"),iV=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 eM(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}(iC),iU=new iL("unset"),iq={"":iU,unset:iU,initial:new iL("initial"),inherit:new iL("inherit")},iY=function(t){return iq[t]||(iq[t]=new iL(t)),iq[t]},iX=new iV(0,0,0,0,!0),iK=new iV(0,0,0,0),iZ=ik(function(t,e,n,r){return new iV(t,e,n,r)},function(t,e,n,r){return"rgba(".concat(t,",").concat(e,",").concat(n,",").concat(r,")")}),iQ=function(t,e){return void 0===e&&(e=MH.kNumber),new i$(t,e)},iJ=new i$(50,"%");(ME=MZ||(MZ={}))[ME.Standard=0]="Standard",(Mk=MQ||(MQ={}))[Mk.ADDED=0]="ADDED",Mk[Mk.REMOVED=1]="REMOVED",Mk[Mk.Z_INDEX_CHANGED=2]="Z_INDEX_CHANGED";var i0={absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new ib(0,0,0,0)};(MM=MJ||(MJ={})).COORDINATE="<coordinate>",MM.COLOR="<color>",MM.PAINT="<paint>",MM.NUMBER="<number>",MM.ANGLE="<angle>",MM.OPACITY_VALUE="<opacity-value>",MM.SHADOW_BLUR="<shadow-blur>",MM.LENGTH="<length>",MM.PERCENTAGE="<percentage>",MM.LENGTH_PERCENTAGE="<length> | <percentage>",MM.LENGTH_PERCENTAGE_12="[<length> | <percentage>]{1,2}",MM.LENGTH_PERCENTAGE_14="[<length> | <percentage>]{1,4}",MM.LIST_OF_POINTS="<list-of-points>",MM.PATH="<path>",MM.FILTER="<filter>",MM.Z_INDEX="<z-index>",MM.OFFSET_DISTANCE="<offset-distance>",MM.DEFINED_PATH="<defined-path>",MM.MARKER="<marker>",MM.TRANSFORM="<transform>",MM.TRANSFORM_ORIGIN="<transform-origin>",MM.TEXT="<text>",MM.TEXT_TRANSFORM="<text-transform>";var i1=function(){var t={linearGradient:/^(linear\-gradient)/i,repeatingLinearGradient:/^(repeating\-linear\-gradient)/i,radialGradient:/^(radial\-gradient)/i,repeatingRadialGradient:/^(repeating\-radial\-gradient)/i,conicGradient:/^(conic\-gradient)/i,sideOrCorner:/^to (left (top|bottom)|right (top|bottom)|top (left|right)|bottom (left|right)|left|right|top|bottom)/i,extentKeywords:/^(closest\-side|closest\-corner|farthest\-side|farthest\-corner|contain|cover)/,positionKeywords:/^(left|center|right|top|bottom)/i,pixelValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))px/,percentageValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))\%/,emValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))em/,angleValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))deg/,startCall:/^\(/,endCall:/^\)/,comma:/^,/,hexColor:/^\#([0-9a-fA-F]+)/,literalColor:/^([a-zA-Z]+)/,rgbColor:/^rgb/i,rgbaColor:/^rgba/i,number:/^(([0-9]*\.[0-9]+)|([0-9]+\.?))/},e="";function n(t){throw Error(e+": "+t)}function r(){return i("linear-gradient",t.linearGradient,a)||i("repeating-linear-gradient",t.repeatingLinearGradient,a)||i("radial-gradient",t.radialGradient,l)||i("repeating-radial-gradient",t.repeatingRadialGradient,l)||i("conic-gradient",t.conicGradient,l)}function i(e,r,i){return o(r,function(r){var o=i();return o&&!b(t.comma)&&n("Missing comma before color stops"),{type:e,orientation:o,colorStops:p(h)}})}function o(e,r){var i=b(e);if(i){b(t.startCall)||n("Missing (");var o=r(i);return b(t.endCall)||n("Missing )"),o}}function a(){return v("directional",t.sideOrCorner,1)||v("angular",t.angleValue,1)}function l(){var n,r,i=s();return i&&((n=[]).push(i),r=e,b(t.comma)&&((i=s())?n.push(i):e=r)),n}function s(){var t,e,n=((t=v("shape",/^(circle)/i,0))&&(t.style=g()||u()),t||((e=v("shape",/^(ellipse)/i,0))&&(e.style=y()||u()),e));if(n)n.at=c();else{var r=u();if(r){n=r;var i=c();i&&(n.at=i)}else{var o=f();o&&(n={type:"default-radial",at:o})}}return n}function u(){return v("extent-keyword",t.extentKeywords,1)}function c(){if(v("position",/^at/,0)){var t=f();return t||n("Missing positioning value"),t}}function f(){var t={x:y(),y:y()};if(t.x||t.y)return{type:"position",value:t}}function p(e){var r=e(),i=[];if(r)for(i.push(r);b(t.comma);)(r=e())?i.push(r):n("One extra comma");return i}function h(){var e=v("hex",t.hexColor,1)||o(t.rgbaColor,function(){return{type:"rgba",value:p(d)}})||o(t.rgbColor,function(){return{type:"rgb",value:p(d)}})||v("literal",t.literalColor,0);return e||n("Expected color definition"),e.length=y(),e}function d(){return b(t.number)[1]}function y(){return v("%",t.percentageValue,1)||v("position-keyword",t.positionKeywords,1)||g()}function g(){return v("px",t.pixelValue,1)||v("em",t.emValue,1)}function v(t,e,n){var r=b(e);if(r)return{type:t,value:r[n]}}function b(t){var n=/^[\n\r\t\s]+/.exec(e);n&&x(n[0].length);var r=t.exec(e);return r&&x(r[0].length),r}function x(t){e=e.substring(t)}return function(t){var i;return e=t,i=p(r),e.length>0&&n("Invalid input not EOF"),i}}(),i2=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,i5=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,i3=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,i4=/[\d.]+:(#[^\s]+|[^\)]+\))/gi,i6={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},i8=ik(function(t){var e;return iQ("angular"===t.type?Number(t.value):i6[t.value]||0,"deg")}),i9=ik(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:iQ(e,r),cy:iQ(n,i)}}),i7=ik(function(t){if(t.indexOf("linear")>-1||t.indexOf("radial")>-1){var e;return i1(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(!n0(s)&&!n0(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:iQ(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 iN(MK.LinearGradient,{angle:n?i8(n):iH,steps:i});if("radial-gradient"===e&&(n||(n=[{type:"shape",value:"circle"}]),"shape"===n[0].type&&"circle"===n[0].value)){var o=i9(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?iY(f):iQ(f,c)}return new iN(MK.RadialGradient,{cx:a,cy:l,size:s,steps:i})}})}var n=t[0];if("("===t[1]||"("===t[2]){if("l"===n){var r=i2.exec(t);if(r){var i=(null==(e=r[2].match(i4))?void 0:e.map(function(t){return t.split(":")}))||[];return[new iN(MK.LinearGradient,{angle:iQ(parseFloat(r[1]),"deg"),steps:i.map(function(t){var e=eT(t,2),n=e[0],r=e[1];return{offset:iQ(100*Number(n),"%"),color:r}})})]}}else if("r"===n){var o=function(t){var e,n=i5.exec(t);if(n){var r=(null==(e=n[4].match(i4))?void 0:e.map(function(t){return t.split(":")}))||[];return{cx:iQ(50,"%"),cy:iQ(50,"%"),steps:r.map(function(t){var e=eT(t,2),n=e[0],r=e[1];return{offset:iQ(100*Number(n),"%"),color:r}})}}return null}(t);if(o)if(!n1(o))return[new iN(MK.RadialGradient,o)];else t=o}else if("p"===n){var a=t,l=i3.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 ot(t){return t&&!!t.image}function oe(t){return t&&!n0(t.r)&&!n0(t.g)&&!n0(t.b)}var on=ik(function(t){if(ot(t))return eS({repetition:"repeat"},t);if(n0(t)&&(t=""),"transparent"===t)return iK;"currentColor"===t&&(t="black");var e=i7(t);if(e)return e;var n=rR(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),iZ.apply(void 0,eN([],eT(r),!1))});function or(t,e){if(oe(t)&&oe(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(n2(e[n],0,255));return e[3]=n2(e[3],0,1),"rgba(".concat(e.join(","),")")}]}function oi(t,e){if(n0(e))return iQ(0,"px");if(isFinite(Number(e="".concat(e).trim().toLowerCase()))){if("px".search(t)>=0)return iQ(Number(e),"px");else if("deg".search(t)>=0)return iQ(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 iQ(Number(e.replace(RegExp("U"+t,"g"),"").replace(RegExp(r,"g"),"*0")),t)})[0]}var oo=function(t){return oi(/px/g,t)},oa=ik(oo);ik(function(t){return oi(RegExp("%","g"),t)});var ol=function(t){return nQ(t)||isFinite(Number(t))?iQ(Number(t)||0,"px"):oi(RegExp("px|%|em|rem","g"),t)},os=ik(ol),ou=function(t){return oi(RegExp("deg|rad|grad|turn","g"),t)},oc=ik(ou);function of(t){var e=0;return t.unit===MH.kDegrees?e=t.value:t.unit===MH.kRadians?e=io(Number(t.value)):t.unit===MH.kTurns&&(e=360*Number(t.value)),e}function op(t,e){var n;if(Array.isArray(t)?n=t.map(function(t){return Number(t)}):n1(t)?n=t.split(" ").map(function(t){return Number(t)}):nQ(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 oh(t){return n1(t)?t.split(" ").map(function(t){return os(t)}):t.map(function(t){return os(t.toString())})}function od(t,e,n){if(0===t.value)return 0;if(t.unit===MH.kPixels)return Number(t.value);if(t.unit===MH.kPercentage&&n){var r=n.nodeName===MF.GROUP?n.getLocalBounds():n.geometry.contentBounds;return t.value/100*r.halfExtents[e]*2}return 0}var oy=["blur","brightness","drop-shadow","contrast","grayscale","sepia","saturate","hue-rotate","invert"];function og(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,oy.indexOf(e[1])>-1&&r.push({name:e[1],params:e[2].split(" ").map(function(t){return oi(/deg|rad|grad|turn|px|%/g,t)||on(t)})}),n.lastIndex===t.length)return r;return[]}function om(t){return t.toString()}var ov=function(t){return"number"==typeof t?iQ(t):/^\s*[-+]?(\d*\.)?\d+\s*$/.test(t)?iQ(Number(t)):iQ(0)},ob=ik(ov);function ox(t,e){return[t,e,om]}function oO(t,e){return function(n,r){return[n,r,function(n){return om(n2(n,t,e))}]}}function ow(t,e){if(t.length===e.length)return[t,e,function(t){return t}]}function oE(t){return 0===t.parsedStyle.path.totalLength&&(t.parsedStyle.path.totalLength=rl(t.parsedStyle.path.absolutePath,void 0,eS(eS({},void 0),{bbox:!1,length:!0})).length),t.parsedStyle.path.totalLength}function ok(t,e){return t[0]===e[0]&&t[1]===e[1]}function oM(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 oS(t,e){return[e[0]+(e[0]-t[0]),e[1]+(e[1]-t[1])]}ik(function(t){return n1(t)?t.split(" ").map(ob):t.map(ob)});var o_=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)},oP=function(t,e,n,r,i,o,a,l){e=Math.abs(e),n=Math.abs(n);var s=ii(r=rf(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=o_({x:1,y:0},v),x=o_(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 oj(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=oP({x:t.prePoint[0],y:t.prePoint[1]},o,l,s,!!u,!!c,{x:t.currentPoint[0],y:t.currentPoint[1]},e),p=oP({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 oA(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function oT(t,e){return oA(t)*oA(e)?(t[0]*e[0]+t[1]*e[1])/(oA(t)*oA(e)):1}function oC(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(oT(t,e))}function oN(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 oL(t,e){void 0===e&&(e=t.getLocalTransform());var n,r,i,o,a,l,s,u,c,f,p=[];switch(t.nodeName){case MF.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 MF.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=oN(O,O,E,M);break;case MF.ELLIPSE:var S=t.parsedStyle,_=S.rx,P=S.ry,j=S.cx,E=void 0===j?0:j,A=S.cy,M=void 0===A?0:A;p=oN(void 0===_?0:_,void 0===P?0:P,E,M);break;case MF.POLYLINE:case MF.POLYGON:n=t.parsedStyle.points.points,r=t.nodeName===MF.POLYGON,i=n.map(function(t,e){return[0===e?"M":"L",t[0],t[1]]}),r&&i.push(["Z"]),p=i;break;case MF.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=eT(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 n2(t,0,Math.min(Math.abs(N)/2,Math.abs(I)/2))}));break;case MF.PATH:p=eN([],eT(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=ez(e[1]-u,e[2]-f,0);a&&eX(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=ez(e[1]-u,e[2]-f,0),o=ez(e[3]-u,e[4]-f,0),l=ez(e[5]-u,e[6]-f,0);a&&(eX(i,i,a),eX(o,o,a),eX(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=ez(e[6]-u,e[7]-f,0);a&&eX(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=ez(e[1]-u,e[2]-f,0),o=ez(e[3]-u,e[4]-f,0);a&&(eX(i,i,a),eX(o,o,a)),n="".concat(e[0]).concat(e[1],",").concat(e[2],",").concat(e[3],",").concat(e[4],"}")}return t+n},"")}var oI=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=rn(t)}catch(n){e=rn(""),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&&ok(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=rf(ii(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=oC([1,0],O),k=oC(O,w);return -1>=oT(O,w)&&(k=Math.PI),oT(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:ok(t,[u,c])?0:n,ry:ok(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]&&ok(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=oS(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=oS(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=oj(c,0),b=v.x,x=v.y,O=oj(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,e){for(var n=[],r=[],i=[],o=0;o<t.length;o++){var a=t[o],l=a.currentPoint,s=a.params,u=a.prePoint,c=void 0;switch(a.command){case"Q":c=function(t,e,n,r,i,o){var a=r2(t,n,i)[0],l=r2(e,r,o)[0],s=[t,i],u=[e,o];return void 0!==a&&s.push(r1(t,n,i,a)),void 0!==l&&u.push(r1(e,r,o,l)),rX(s,u)}(u[0],u[1],s[1],s[2],s[3],s[4]);break;case"C":c=function(t,e,n,r,i,o,a,l){for(var s=[t,a],u=[e,l],c=rJ(t,n,i,a),f=rJ(e,r,o,l),p=0;p<c.length;p++)s.push(rQ(t,n,i,a,c[p]));for(var p=0;p<f.length;p++)u.push(rQ(e,r,o,l,f[p]));return rX(s,u)}(u[0],u[1],s[1],s[2],s[3],s[4],s[5],s[6]);break;case"A":var f=a.arcParams;c=function(t,e,n,r,i,o,a){for(var l=Math.atan(-r/n*Math.tan(i)),s=1/0,u=-1/0,c=[o,a],f=-(2*Math.PI);f<=2*Math.PI;f+=Math.PI){var p=l+f;o<a?o<p&&p<a&&c.push(p):a<p&&p<o&&c.push(p)}for(var f=0;f<c.length;f++){var h,d=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}}(f.cx,f.cy,f.rx,f.ry,f.xRotation,f.startAngle,f.endAngle);break;default:n.push(l[0]),r.push(l[1])}c&&(a.box=c,n.push(c.x,c.x+c.width),r.push(c.y,c.y+c.height))}n=n.filter(function(t){return!Number.isNaN(t)&&t!==1/0&&t!==-1/0}),r=r.filter(function(t){return!Number.isNaN(t)&&t!==1/0&&t!==-1/0});var p=ru(n),h=ru(r),d=rc(n),y=rc(r);if(0===i.length)return{x:p,y:h,width:d-p,height:y-h};for(var o=0;o<i.length;o++){var a=i[o],l=a.currentPoint,g=void 0;l[0]===p?p-=oM(a,0).xExtra:l[0]===d&&(d+=oM(a,e).xExtra),l[1]===h?h-=oM(a,e).yExtra:l[1]===y&&(y+=oM(a,e).yExtra)}return{x:p,y:h,width:d-p,height:y-h}}(a,0),s=l.x,u=l.y,c=l.width,f=l.height;return{absolutePath:e,hasArc:n,segments:a,polygons:i,polylines:o,totalLength:0,rect:{x:Number.isFinite(s)?s:0,y:Number.isFinite(u)?u:0,width:Number.isFinite(c)?c:0,height:Number.isFinite(f)?f:0}}},oR=ik(oI);function oD(t){return n1(t)?oR(t):oI(t)}function oF(t,e,n){var r,i,o,a,l,s,u,c,f,p,h=t.curve,d=e.curve;h&&0!==h.length||(h=rd(t.absolutePath,!1),t.curve=h),d&&0!==d.length||(d=rd(e.absolutePath,!1),e.curve=d);var y=[h,d];h.length!==d.length&&(y=function t(e,n,r){var i=ry(e),o=ry(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)}(h,d));var g=rg(y[0])!==rg(y[1])?[["M"].concat((i=(r=y[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))})):y[0].map(function(t){return Array.isArray(t)?[].concat(t):t});return[g,(o=y[1],a=o.length-1,l=[],u=0,(f=(c=o.length)-1,p=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>=c&&(r-=f),o[r])})})).forEach(function(t,e){o.slice(1).forEach(function(t,n){u+=nJ(o[(e+n)%a].slice(-2),g[n%a].slice(-2))}),l[e]=u,u=0}),p[l.indexOf(Math.min.apply(null,l))]),function(t){return t}]}function oB(t,e){var n,r,i=n1(t)?t.split(" ").map(function(t){var e=eT(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+=rY(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=rY(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,eN([],eT(i.map(function(t){return t[0]})),!1)),u=Math.min.apply(Math,eN([],eT(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 oz(t,e){return[t.points,e.points,function(t){return t}]}function oW(t){return function(e){var n=0;return t.map(function(t){return null===t?e[n++]:t})}}function o$(t){return t}var oG={matrix:["NNNNNN",[null,null,0,0,null,null,0,0,0,0,1,0,null,null,0,1],o$],matrix3d:["NNNNNNNNNNNNNNNN",o$],rotate:["A"],rotatex:["A"],rotatey:["A"],rotatez:["A"],rotate3d:["NNNA"],perspective:["L"],scale:["Nn",oW([null,null,new i$(1)]),o$],scalex:["N",oW([null,new i$(1),new i$(1)]),oW([null,new i$(1)])],scaley:["N",oW([new i$(1),null,new i$(1)]),oW([new i$(1),null])],scalez:["N",oW([new i$(1),new i$(1),null])],scale3d:["NNN",o$],skew:["Aa",null,o$],skewx:["A",null,oW([null,iH])],skewy:["A",null,oW([iH,null])],translate:["Tt",oW([null,null,iG]),o$],translatex:["T",oW([null,iG,iG]),oW([null,iG])],translatey:["T",oW([iG,null,iG]),oW([iG,null])],translatez:["L",oW([iG,iG,null])],translate3d:["TTL",o$]};function oH(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=oG[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()?iH:oc(t)},N:ob,T:os,L:oa})[p.toUpperCase()](f):({a:iH,n:u[0],t:iG})[p]))return[];u.push(h)}if(r.push({t:o,d:u}),n.lastIndex===t.length)return r}return[]}function oV(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=oG[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()?iH:ou(t)},N:ov,T:ol,L:oo})[p.toUpperCase()](f):({a:iH,n:u[0],t:iG})[p]))return[];u.push(h)}if(r.push({t:o,d:u}),n.lastIndex===t.length)return r}return[]}function oU(t){switch(t.t){case"rotatex":return[1,0,0,0,0,Math.cos(i=ii(of(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=ii(of(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=ii(of(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=ii(of(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=ii(of(t.d[0]));return[1,Math.tan(ii(of(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=ii(of(t.d[0]))),1,0,0,0,0,1,0,0,0,0,1];case"skewy":return[1,Math.tan(i=ii(of(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=od(t.d[0],0,null)||0,n=od(t.d[1],0,null)||0,0,1];case"translatex":return[1,0,0,0,0,1,0,0,0,0,1,0,e=od(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=od(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=od(t.d[0],0,null)||0,1];case"translate3d":return e=od(t.d[0],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,e,n=od(t.d[1],0,null)||0,r=od(t.d[2],0,null)||0,1];case"perspective":var f=od(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 oq(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 oY(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}(is,t)||(e0(iu,is),iu[3]=0,iu[7]=0,iu[11]=0,iu[15]=1,1e-8>Math.abs(e8(iu))))){var a,l,s,u,c,f,p,h,d,y,g=is[3],v=is[7],b=is[11],x=is[12],O=is[13],w=is[14],E=is[15];if(0!==g||0!==v||0!==b){if(ic[0]=g,ic[1]=v,ic[2]=b,ic[3]=E,!e4(iu,iu))return;e3(iu,iu),nW(i,ic,iu)}else i[0]=i[1]=i[2]=0,i[3]=1;if(e[0]=x,e[1]=O,e[2]=w,a=ip,l=is,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]=eB(ip[0]),eU(ip[0],ip[0]),r[0]=eq(ip[0],ip[1]),id(ip[1],ip[1],ip[0],1,-r[0]),n[1]=eB(ip[1]),eU(ip[1],ip[1]),r[0]/=n[1],r[1]=eq(ip[0],ip[2]),id(ip[2],ip[2],ip[0],1,-r[1]),r[2]=eq(ip[1],ip[2]),id(ip[2],ip[2],ip[1],1,-r[2]),n[2]=eB(ip[2]),eU(ip[2],ip[2]),r[1]/=n[2],r[2]/=n[2],s=ip[1],u=ip[2],c=s[0],f=s[1],p=s[2],h=u[0],d=u[1],y=u[2],ih[0]=f*y-p*d,ih[1]=p*h-c*y,ih[2]=c*d-f*h,0>eq(ip[0],ih))for(var k=0;k<3;k++)n[k]*=-1,ip[k][0]*=-1,ip[k][1]*=-1,ip[k][2]*=-1;o[0]=.5*Math.sqrt(Math.max(1+ip[0][0]-ip[1][1]-ip[2][2],0)),o[1]=.5*Math.sqrt(Math.max(1-ip[0][0]+ip[1][1]-ip[2][2],0)),o[2]=.5*Math.sqrt(Math.max(1-ip[0][0]-ip[1][1]+ip[2][2],0)),o[3]=.5*Math.sqrt(Math.max(1+ip[0][0]+ip[1][1]+ip[2][2],0)),ip[2][1]>ip[1][2]&&(o[0]=-o[0]),ip[0][2]>ip[2][0]&&(o[1]=-o[1]),ip[1][0]>ip[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(oU).reduce(oq),e,n,r,i,o),[[e,n,r,o,i]]}var oX=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 oK(t){return t.toFixed(6).replace(".000000","")}function oZ(t,e){var n,r;return(t.decompositionPair!==e&&(t.decompositionPair=e,n=oY(t)),e.decompositionPair!==t&&(e.decompositionPair=t,r=oY(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=n2(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 oX(t[0],t[1],t[2],e,t[4]).map(oK).join(",")}])}function oQ(t){return t.replace(/[xy]/,"")}function oJ(t){return t.replace(/(x|y|z|3d)?$/,"3d")}function o0(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?iQ(a):iQ(a,t.unit)})})}(i)}var o=[],a=[],l=[];if(t.length!==e.length){var s=oZ(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=oG[u],d=oG[c],y=void 0;if("perspective"===u&&"perspective"===c||("matrix"===u||"matrix3d"===u)&&("matrix"===c||"matrix3d"===c)){var s=oZ([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]&&oQ(u)===oQ(c))y=oQ(u),f=h[2](f),p=d[2](p);else if(h[1]&&d[1]&&oJ(u)===oJ(c))y=oJ(u),f=h[1](f),p=d[1](p);else{var s=oZ(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=iW(t.unit),u=t.convertTo(s),c=e.convertTo(s);return u&&c?(a=u.value,l=c.value,o=iA(t.unit)):(i$.isLength(t.unit)||i$.isLength(e.unit))&&(a=od(t,i,n),l=od(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 o1=ik(function(t){if(!n1(t))return[iQ(t[0]||0,"px"),iQ(t[1]||0,"px")];if("text-anchor"===t)return[iQ(0,"px"),iQ(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:[os(o5(e[0])),os(o5(e[1]))]}),o2=function(t){if(!n1(t))return[iQ(t[0]||0,"px"),iQ(t[1]||0,"px")];if("text-anchor"===t)return[iQ(0,"px"),iQ(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:[ol(o5(e[0])),ol(o5(e[1]))]};function o5(t){return"center"===t?"50%":"left"===t||"top"===t?"0":"right"===t||"bottom"===t?"100%":t}var o3=[{n:"display",k:["none"]},{n:"opacity",int:!0,inh:!0,d:"1",syntax:MJ.OPACITY_VALUE},{n:"fillOpacity",int:!0,inh:!0,d:"1",syntax:MJ.OPACITY_VALUE},{n:"strokeOpacity",int:!0,inh:!0,d:"1",syntax:MJ.OPACITY_VALUE},{n:"fill",int:!0,k:["none"],d:"none",syntax:MJ.PAINT},{n:"fillRule",k:["nonzero","evenodd"],d:"nonzero"},{n:"stroke",int:!0,k:["none"],d:"none",syntax:MJ.PAINT,l:!0},{n:"shadowType",k:["inner","outer","both"],d:"outer",l:!0},{n:"shadowColor",int:!0,syntax:MJ.COLOR},{n:"shadowOffsetX",int:!0,l:!0,d:"0",syntax:MJ.LENGTH_PERCENTAGE},{n:"shadowOffsetY",int:!0,l:!0,d:"0",syntax:MJ.LENGTH_PERCENTAGE},{n:"shadowBlur",int:!0,l:!0,d:"0",syntax:MJ.SHADOW_BLUR},{n:"lineWidth",int:!0,inh:!0,d:"1",l:!0,a:["strokeWidth"],syntax:MJ.LENGTH_PERCENTAGE},{n:"increasedLineWidthForHitTesting",inh:!0,d:"0",l:!0,syntax:MJ.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:MJ.LENGTH_PERCENTAGE_12},{n:"lineDashOffset",int:!0,inh:!0,d:"0",a:["strokeDashoffset"],syntax:MJ.LENGTH_PERCENTAGE},{n:"offsetPath",syntax:MJ.DEFINED_PATH},{n:"offsetDistance",int:!0,syntax:MJ.OFFSET_DISTANCE},{n:"dx",int:!0,l:!0,d:"0",syntax:MJ.LENGTH_PERCENTAGE},{n:"dy",int:!0,l:!0,d:"0",syntax:MJ.LENGTH_PERCENTAGE},{n:"zIndex",ind:!0,int:!0,d:"0",k:["auto"],syntax:MJ.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:MJ.FILTER},{n:"clipPath",syntax:MJ.DEFINED_PATH},{n:"textPath",syntax:MJ.DEFINED_PATH},{n:"textPathSide",k:["left","right"],d:"left"},{n:"textPathStartOffset",l:!0,d:"0",syntax:MJ.LENGTH_PERCENTAGE},{n:"transform",p:100,int:!0,k:["none"],d:"none",syntax:MJ.TRANSFORM},{n:"transformOrigin",p:100,d:function(t){return t===MF.CIRCLE||t===MF.ELLIPSE?"center":t===MF.TEXT?"text-anchor":"left top"},l:!0,syntax:MJ.TRANSFORM_ORIGIN},{n:"anchor",p:99,d:function(t){return t===MF.CIRCLE||t===MF.ELLIPSE?"0.5 0.5":"0 0"},l:!0,syntax:MJ.LENGTH_PERCENTAGE_12},{n:"cx",int:!0,d:"0",syntax:MJ.COORDINATE},{n:"cy",int:!0,d:"0",syntax:MJ.COORDINATE},{n:"cz",int:!0,d:"0",syntax:MJ.COORDINATE},{n:"r",int:!0,l:!0,d:"0",syntax:MJ.LENGTH_PERCENTAGE},{n:"rx",int:!0,l:!0,d:"0",syntax:MJ.LENGTH_PERCENTAGE},{n:"ry",int:!0,l:!0,d:"0",syntax:MJ.LENGTH_PERCENTAGE},{n:"x",int:!0,d:"0",syntax:MJ.COORDINATE},{n:"y",int:!0,d:"0",syntax:MJ.COORDINATE},{n:"z",int:!0,d:"0",syntax:MJ.COORDINATE},{n:"width",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:MJ.LENGTH_PERCENTAGE},{n:"height",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:MJ.LENGTH_PERCENTAGE},{n:"radius",int:!0,l:!0,d:"0",syntax:MJ.LENGTH_PERCENTAGE_14},{n:"x1",int:!0,l:!0,syntax:MJ.COORDINATE},{n:"y1",int:!0,l:!0,syntax:MJ.COORDINATE},{n:"z1",int:!0,l:!0,syntax:MJ.COORDINATE},{n:"x2",int:!0,l:!0,syntax:MJ.COORDINATE},{n:"y2",int:!0,l:!0,syntax:MJ.COORDINATE},{n:"z2",int:!0,l:!0,syntax:MJ.COORDINATE},{n:"path",int:!0,l:!0,d:"",a:["d"],syntax:MJ.PATH,p:50},{n:"points",int:!0,l:!0,syntax:MJ.LIST_OF_POINTS,p:50},{n:"text",l:!0,d:"",syntax:MJ.TEXT,p:50},{n:"textTransform",l:!0,inh:!0,k:["capitalize","uppercase","lowercase","none"],d:"none",syntax:MJ.TEXT_TRANSFORM,p:51},{n:"font",l:!0},{n:"fontSize",int:!0,inh:!0,d:"16px",l:!0,syntax:MJ.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:MJ.LENGTH,int:!0,d:"0"},{n:"letterSpacing",l:!0,syntax:MJ.LENGTH,int:!0,d:"0"},{n:"miterLimit",l:!0,syntax:MJ.NUMBER,d:function(t){return t===MF.PATH||t===MF.POLYGON||t===MF.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:MJ.MARKER},{n:"markerEnd",syntax:MJ.MARKER},{n:"markerMid",syntax:MJ.MARKER},{n:"markerStartOffset",syntax:MJ.LENGTH,l:!0,int:!0,d:"0"},{n:"markerEndOffset",syntax:MJ.LENGTH,l:!0,int:!0,d:"0"}],o4=o3.filter(function(t){return!!t.l}).map(function(t){return t.n}),o6={},o8=new WeakMap,o9=function(t,e){var n=o8.get(t);return!n||0===n.length||n.includes(e)},o7=function(){function t(t){var e=this;this.runtime=t,o3.forEach(function(t){e.registerMetadata(t)})}return t.prototype.registerMetadata=function(t){eN([t.n],eT(t.a||[]),!1).forEach(function(e){o6[e]=t})},t.prototype.unregisterMetadata=function(t){delete o6[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<o4.length;s++)if(o4[s]in e){l=!0;break}}e.fill&&(t.parsedStyle.fill=on(e.fill)),e.stroke&&(t.parsedStyle.stroke=on(e.stroke)),e.shadowColor&&(t.parsedStyle.shadowColor=on(e.shadowColor)),e.filter&&(t.parsedStyle.filter=og(e.filter)),n0(e.radius)||(t.parsedStyle.radius=op(e.radius,4)),n0(e.lineDash)||(t.parsedStyle.lineDash=op(e.lineDash,2)),e.points&&(t.parsedStyle.points=oB(e.points,t)),""===e.path&&(t.parsedStyle.path=eS({},i0)),e.path&&(t.parsedStyle.path=oD(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=op(e.anchor,2)),e.transform&&(t.parsedStyle.transform=oH(e.transform)),e.transformOrigin&&(t.parsedStyle.transformOrigin=o1(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!==MF.CIRCLE&&t.nodeName!==MF.ELLIPSE||n0(e.cx)&&n0(e.cy))&&(t.nodeName!==MF.RECT&&t.nodeName!==MF.IMAGE&&t.nodeName!==MF.GROUP&&t.nodeName!==MF.HTML&&t.nodeName!==MF.TEXT&&t.nodeName!==MF.MESH||n0(e.x)&&n0(e.y)&&n0(e.z))&&(t.nodeName!==MF.LINE||n0(e.x1)&&n0(e.y1)&&n0(e.z1)&&n0(e.x2)&&n0(e.y2)&&n0(e.z2))||this.runtime.CSSPropertySyntaxFactory["<coordinate>"].postProcessor(t,i),n0(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),n0(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=o6[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=o6[t],o=e;if((""===e||n0(e))&&(e="unset"),"unset"===e||"initial"===e||"inherit"===e)o=iY(e);else if(i){var a=i.k,l=i.syntax,s=l&&this.getPropertySyntax(l);a&&a.indexOf(e)>-1?o=iY(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=o6[t],o="g-root"===n.id,a=e;if(i){var l=i.syntax,s=i.inh,u=i.d;if(e instanceof iL){var c=e.value;if("unset"===c&&(c=s&&!o?"inherit":"initial"),"initial"===c)n0(u)||(e=this.parseProperty(t,iD(u)?u(n.nodeName):u,n,r));else if("inherit"===c){var f=this.tryToResolveProperty(n,t,{inherited:!0});return n0(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 iL?e.value:e}return a},t.prototype.postProcessProperty=function(t,e,n){var r=o6[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=o8.get(t);n||(o8.set(t,[]),n=o8.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&&o9(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=o8.get(t);if(e&&e.length){var n={};e.forEach(function(e){n[e]=t.attributes[e]}),this.processProperties(t,n),o8.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 iy),r.renderBounds||(r.renderBounds=new iy);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===MF.TEXT?delete i.anchor:e===MF.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===MF.POLYLINE||e===MF.POLYGON||e===MF.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,S=M.min,_=M.max,P=i.shadowBlur,j=i.shadowOffsetX,A=i.shadowOffsetY,T=P||0,C=j||0,N=A||0,L=S[0]-T+C,I=_[0]+T+C,R=S[1]-T+N,D=_[1]+T+N;S[0]=Math.min(S[0],L),_[0]=Math.max(_[0],I),S[1]=Math.min(S[1],R),_[1]=Math.max(_[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,r7(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,B=l<0,z=(F?-1:1)*(x?od(x[0],0,t):0),W=(B?-1:1)*(x?od(x[1],1,t):0);z-=(F?-1:1)*(O&&O[0]||0)*r.contentBounds.halfExtents[0]*2,W-=(B?-1:1)*(O&&O[1]||0)*r.contentBounds.halfExtents[1]*2,t.setOrigin(z,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===MF.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===MF.CIRCLE&&t.style.rawR&&(t.style.r=t.style.rawR,delete t.style.rawR))},t.prototype.isPropertyInheritable=function(t){var e=o6[t];return!!e&&e.inh},t}(),at=function(){function t(){this.parser=oc,this.parserUnmemoize=ou,this.parserWithCSSDisabled=null,this.mixer=ox}return t.prototype.calculator=function(t,e,n,r){return of(n)},t}(),ae=function(){function t(){}return t.prototype.calculator=function(t,e,n,r,i){return n instanceof iL&&(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}(),an=function(){function t(){this.parser=on,this.parserWithCSSDisabled=on,this.mixer=or}return t.prototype.calculator=function(t,e,n,r){return n instanceof iL?"none"===n.value?iX:iK:n},t}(),ar=function(){function t(){this.parser=og}return t.prototype.calculator=function(t,e,n){return n instanceof iL?[]:n},t}();function ai(t){var e=t.parsedStyle.fontSize;return n0(e)?null:e}var ao=function(){function t(){this.parser=os,this.parserUnmemoize=ol,this.parserWithCSSDisabled=null,this.mixer=ox}return t.prototype.calculator=function(t,e,n,r,i){if(nQ(n))return n;if(!i$.isRelativeUnit(n.unit))return n.value;var o,a=i.styleValueRegistry;if(n.unit===MH.kPercentage)return 0;if(n.unit===MH.kEms){if(r.parentNode){var l=ai(r.parentNode);if(l)return l*n.value;a.addUnresolveProperty(r,t)}else a.addUnresolveProperty(r,t);return 0}if(n.unit===MH.kRems){if(null==(o=null==r?void 0:r.ownerDocument)?void 0:o.documentElement){var l=ai(r.ownerDocument.documentElement);if(l)return l*n.value;a.addUnresolveProperty(r,t)}else a.addUnresolveProperty(r,t);return 0}},t}(),aa=function(){function t(){this.mixer=ow}return t.prototype.parser=function(t){var e,n=oh(nQ(t)?[t]:t);return 1===n.length?[n[0],n[0]]:[n[0],n[1]]},t.prototype.calculator=function(t,e,n){return n.map(function(t){return t.value})},t}(),al=function(){function t(){this.mixer=ow}return t.prototype.parser=function(t){var e,n=oh(nQ(t)?[t]:t);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]]},t.prototype.calculator=function(t,e,n){return n.map(function(t){return t.value})},t}(),as=eQ();function au(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||[iG,iG];e.translateLocal(l[0].value,l[1].value,0)}else if("translatex"===i){var l=o||[iG];e.translateLocal(l[0].value,0,0)}else if("translatey"===i){var l=o||[iG];e.translateLocal(0,l[0].value,0)}else if("translatez"===i){var l=o||[iG];e.translateLocal(0,0,l[0].value)}else if("translate3d"===i){var l=o||[iG,iG,iG];e.translateLocal(l[0].value,l[1].value,l[2].value)}else if("rotate"===i){var s=o||[iH];e.rotateLocal(0,0,of(s[0]))}else if("rotatex"===i){var s=o||[iH];e.rotateLocal(of(s[0]),0,0)}else if("rotatey"===i){var s=o||[iH];e.rotateLocal(0,of(s[0]),0)}else if("rotatez"===i){var s=o||[iH];e.rotateLocal(0,0,of(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(ii(u[0]),ii(u[1]))}else if("skewx"===i){var u=(null==o?void 0:o.map(function(t){return t.value}))||[0];e.setLocalSkew(ii(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],ii(u[0]))}else if("matrix"===i){var c=eT(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(e2(as,f,p,0,0,h,d,0,0,0,0,1,0,y+n,g+r,0,1))}else"matrix3d"===i&&(e2.apply(tm,eN([as],eT(o.map(function(t){return t.value})),!1)),as[12]+=n,as[13]+=r,e.setLocalTransform(as))}),e.getLocalTransform()}var ac=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return eM(e,t),e.prototype.postProcessor=function(t,e){switch(t.nodeName){case MF.CIRCLE:case MF.ELLIPSE:var n,r,i,o=t.parsedStyle,a=o.cx,l=o.cy,s=o.cz;n0(a)||(n=a),n0(l)||(r=l),n0(s)||(i=s);break;case MF.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 MF.RECT:case MF.IMAGE:case MF.GROUP:case MF.HTML:case MF.TEXT:case MF.MESH:n0(t.parsedStyle.x)||(n=t.parsedStyle.x),n0(t.parsedStyle.y)||(r=t.parsedStyle.y),n0(t.parsedStyle.z)||(i=t.parsedStyle.z)}if(t.nodeName!==MF.PATH&&t.nodeName!==MF.POLYLINE&&t.nodeName!==MF.POLYGON&&(t.parsedStyle.defX=n||0,t.parsedStyle.defY=r||0),(!n0(n)||!n0(r)||!n0(i))&&-1===e.indexOf("transform")){var h=t.parsedStyle.transform;if(h&&h.length)au(h,t);else{var d=eT(t.getLocalPosition(),3),y=d[0],g=d[1],v=d[2];t.setLocalPosition(n0(n)?y:n,n0(r)?g:r,n0(i)?v:i)}}},e}(ao),af=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){n instanceof iL&&(n=null);var i=null==n?void 0:n.cloneNode(!0);return i&&(i.style.isMarker=!0),i},t}(),ap=function(){function t(){this.mixer=ox,this.parser=ob,this.parserUnmemoize=ov,this.parserWithCSSDisabled=null}return t.prototype.calculator=function(t,e,n){return n.value},t}(),ah=function(){function t(){this.parser=ob,this.parserUnmemoize=ov,this.parserWithCSSDisabled=null,this.mixer=oO(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===MF.LINE||i===MF.PATH||i===MF.POLYLINE){var o=n.getPoint(r);o&&(t.parsedStyle.defX=o.x,t.parsedStyle.defY=o.y,t.setLocalPosition(o.x,o.y))}}},t}(),ad=function(){function t(){this.parser=ob,this.parserUnmemoize=ov,this.parserWithCSSDisabled=null,this.mixer=oO(0,1)}return t.prototype.calculator=function(t,e,n){return n.value},t}(),ay=function(){function t(){this.parser=oD,this.parserWithCSSDisabled=oD,this.mixer=oF}return t.prototype.calculator=function(t,e,n){return n instanceof iL&&"unset"===n.value?{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new ib(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===MF.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}(),ag=function(){function t(){this.parser=oB,this.mixer=oz}return t.prototype.postProcessor=function(t,e){if((t.nodeName===MF.POLYGON||t.nodeName===MF.POLYLINE)&&-1===e.indexOf("transform")){var n=t.parsedStyle,r=n.defX,i=n.defY;t.setLocalPosition(r,i)}},t}(),am=function(t){function e(){var e=t.apply(this,eN([],eT(arguments),!1))||this;return e.mixer=oO(0,1/0),e}return eM(e,t),e}(ao),av=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){if(n instanceof iL)if("unset"===n.value)return"";else return n.value;return"".concat(n)},t.prototype.postProcessor=function(t){t.nodeValue="".concat(t.parsedStyle.text)||""},t}(),ab=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}(),ax={},aO=0,aw="undefined"!=typeof window&&void 0!==window.document;function aE(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 ak(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 aM(t,e){if(aw)return document.defaultView.getComputedStyle(t,null).getPropertyValue(e)}var aS={touchstart:"pointerdown",touchend:"pointerup",touchendoutside:"pointerupoutside",touchmove:"pointermove",touchcancel:"pointercancel"},a_="object"==typeof performance&&performance.now?performance:Date;function aP(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 aj=1,aA="object"==typeof self&&self.self==self?self:"object"==typeof n.g&&n.g.global==n.g?n.g:{},aT=Date.now(),aC={},aN=Date.now(),aL=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function");var e=Date.now(),n=e-aN,r=aj++;return aC[r]=t,Object.keys(aC).length>1||setTimeout(function(){aN=e;var t=aC;aC={},Object.keys(t).forEach(function(e){return t[e](aA.performance&&"function"==typeof aA.performance.now?aA.performance.now():Date.now()-aT)})},n>16?0:16-n),r},aI=function(t){return"string"!=typeof t?aL:""===t?aA.requestAnimationFrame:aA[t+"RequestAnimationFrame"]},aR=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!!aI(t)}),aD=aI(aR),aF="string"!=typeof aR?function(t){delete aC[t]}:""===aR?aA.cancelAnimationFrame:aA[aR+"CancelAnimationFrame"]||aA[aR+"CancelRequestAnimationFrame"];aA.requestAnimationFrame=aD,aA.cancelAnimationFrame=aF;var aB=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,eN([],eT(t),!1))}))},t}(),az=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 eP(this,void 0,void 0,function(){var e,n,r;return ej(this,function(i){switch(i.label){case 0:if(!this.callbacks.length)return[3,6];return[4,(r=this.callbacks)[0].apply(r,eN([],eT(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}(),aW=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}(),a$=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}(),aG=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],aH=/([\"\'])[^\'\"]+\1/,aV=function(){function t(){this.parser=oH,this.parserUnmemoize=oV,this.parserWithCSSDisabled=oV,this.mixer=o0}return t.prototype.calculator=function(t,e,n,r){return n instanceof iL?[]:n},t.prototype.postProcessor=function(t){au(t.parsedStyle.transform,t)},t}(),aU=function(){function t(){this.parser=ob,this.parserUnmemoize=ov}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=MQ.Z_INDEX_CHANGED)}},t}(),aq=function(){function t(){}return t.prototype.update=function(t,e){var n=t.r;return{width:2*n,height:2*n}},t}(),aY=function(){function t(){}return t.prototype.update=function(t,e){return{width:2*t.rx,height:2*t.ry}},t}(),aX=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}(),aK=function(){function t(){}return t.prototype.update=function(t){var e=t.path.rect;return{width:e.width,height:e.height}},t}(),aZ=function(){function t(){}return t.prototype.update=function(t){if(t.points&&rs(t.points.points)){var e=t.points.points,n=Math.min.apply(Math,eN([],eT(e.map(function(t){return t[0]})),!1)),r=Math.max.apply(Math,eN([],eT(e.map(function(t){return t[0]})),!1)),i=Math.min.apply(Math,eN([],eT(e.map(function(t){return t[1]})),!1));return{width:r-n,height:Math.max.apply(Math,eN([],eT(e.map(function(t){return t[1]})),!1))-i}}return{width:0,height:0}},t}(),aQ=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&&!n1(n)&&(o||(t.width=o=n.width),a||(t.height=a=n.height)),{width:o,height:a}},t}(),aJ=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&&!n0(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}(),a0=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 iv,this.page=new iv,this.canvas=new iv,this.viewport=new iv,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(ix)},t}(),a1=function(t){function e(){var e=t.apply(this,eN([],eT(arguments),!1))||this;return e.client=new iv,e.movement=new iv,e.offset=new iv,e.global=new iv,e.screen=new iv,e}return eM(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(ix)},e}(a0),a2=function(t){function e(){var e=t.apply(this,eN([],eT(arguments),!1))||this;return e.width=0,e.height=0,e.isPrimary=!1,e}return eM(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}(a1),a5=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return eM(e,t),e.prototype.clone=function(){return this.manager.cloneWheelEvent(this)},e}(a1),a3=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 eM(e,t),e}(a0),a4=function(){function t(){this.emitter=new eI}return t.prototype.on=function(t,e,n){return this.addEventListener(t,e,n),this},t.prototype.addEventListener=function(t,e,n){var r=rm(n)&&n||rv(n)&&n.capture,i=rv(n)&&n.once,o=iD(e)?void 0:e,a=!1,l="";if(t.indexOf(":")>-1){var s=eT(t.split(":"),2),u=s[0];t=s[1],l=u,a=!0}if(t=r?"".concat(t,"capture"):t,e=iD(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,eN([],eT(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=rm(n)&&n||rv(n)&&n.capture,i=iD(e)?void 0:e;return t=r?"".concat(t,"capture"):t,e=iD(e)?e:null==e?void 0:e.handleEvent,this.emitter.off(t,e,i),this},t.prototype.emit=function(t,e){this.dispatchEvent(new a3(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}(),a6=function(t){function e(){var e=t.apply(this,eN([],eT(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 eM(e,t),e.isNode=function(t){return!!t.childNodes},Object.defineProperty(e.prototype,"textContent",{get:function(){var t,e,n="";this.nodeName===MF.TEXT&&(n+=this.style.text);try{for(var r=eA(this.childNodes),i=r.next();!i.done;i=r.next()){var o=i.value;o.nodeName===MF.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===MF.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(ix)},e.prototype.lookupNamespaceURI=function(t){throw Error(ix)},e.prototype.lookupPrefix=function(t){throw Error(ix)},e.prototype.normalize=function(){throw Error(ix)},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}(a4),a8=function(){function t(t,e){var n=this;this.globalRuntime=t,this.context=e,this.emitter=new eI,this.nativeHTMLMap=new WeakMap,this.cursor="default",this.mappingTable={},this.mappingState={trackingData:{}},this.eventPool=new Map,this.tmpMatrix=eQ(),this.tmpVec3=eD(),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=a_.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")}a6.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"),a6.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&&a6.isNode(o)&&o.parentNode;f&&f!==(a6.isNode(n.rootTarget)&&n.rootTarget.parentNode)&&f!==e.target;)f=f.parentNode;if(!f||f===(a6.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!==(a6.isNode(n.rootTarget)&&n.rootTarget.parentNode);)p.currentTarget=p.target,n.notifyTarget(p),r&&n.notifyTarget(p,"mouseenter"),a6.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!==(a6.isNode(n.rootTarget)&&n.rootTarget.parentNode);)a.currentTarget=a.target,n.notifyTarget(a),r&&n.notifyTarget(a,"mouseleave"),a6.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!==(a6.isNode(n.rootTarget)&&n.rootTarget.parentNode);)o.currentTarget=o.target,n.notifyTarget(o),i&&n.notifyTarget(o,"mouseenter"),a6.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"),a6.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 iv(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 iv(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=e9(this.tmpMatrix,s,l),c=e$(this.tmpVec3,e/o*2-1,(1-n/a)*2-1,0);return eX(c,c,u),new iv(c[0],c[1])},t.prototype.canvas2Viewport=function(t){var e=this.rootTarget.defaultView.getCamera(),n=e.getPerspective(),r=e.getViewTransform(),i=e9(this.tmpMatrix,n,r),o=e$(this.tmpVec3,t.x,t.y,0);eX(this.tmpVec3,this.tmpVec3,i);var a=this.context.config,l=a.width,s=a.height;return new iv((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++)a6.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=eA(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(a2);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(a5);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(a5);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(a2);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=a_.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||a6.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=a6.isNode(e)&&e.parentNode}},t}(),a9=function(){function t(){}return t.prototype.getOrCreateCanvas=function(t,e){if(this.canvas)return this.canvas;if(t||lf.offscreenCanvas)this.canvas=t||lf.offscreenCanvas,this.context=this.canvas.getContext("2d",eS({willReadFrequently:!0},e));else try{this.canvas=new window.OffscreenCanvas(0,0),this.context=this.canvas.getContext("2d",eS({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",eS({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}();(MS=M0||(M0={}))[MS.CAMERA_CHANGED=0]="CAMERA_CHANGED",MS[MS.DISPLAY_OBJECT_CHANGED=1]="DISPLAY_OBJECT_CHANGED",MS[MS.NONE=2]="NONE";var a7=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 aW,initAsync:new aB,dirtycheck:new a$,cull:new a$,beginFrame:new aW,beforeRender:new aW,render:new aW,afterRender:new aW,endFrame:new aW,destroy:new aW,pick:new az,pickSync:new a$,pointerDown:new aW,pointerUp:new aW,pointerMove:new aW,pointerOut:new aW,pointerOver:new aW,pointerWheel:new aW,pointerCancel:new aW,click:new aW}}return t.prototype.init=function(t){var e=this,n=eS(eS({},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(M0.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(M0.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!==MQ.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>aE(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(aE)},t.prototype.destroy=function(){this.inited=!1,this.hooks.destroy.call(),this.globalRuntime.sceneGraphService.clearPendingEvents()},t.prototype.dirtify=function(){this.context.renderingContext.renderReasons.add(M0.DISPLAY_OBJECT_CHANGED)},t}(),lt=/\[\s*(.*)=(.*)\s*\]/,le=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(lt),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 n0(n)?"":n.toString?n.toString():""},t}(),ln=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 eM(e,t),e.ADDITION=2,e.MODIFICATION=1,e.REMOVAL=3,e}(a0);function lr(t){var e=t.renderable;e&&(e.renderBoundsDirty=!0,e.boundsDirty=!0)}(M_=M1||(M1={})).REPARENT="reparent",M_.DESTROY="destroy",M_.ATTR_MODIFIED="DOMAttrModified",M_.INSERTED="DOMNodeInserted",M_.REMOVED="removed",M_.MOUNTED="DOMNodeInsertedIntoDocument",M_.UNMOUNTED="DOMNodeRemovedFromDocument",M_.BOUNDS_CHANGED="bounds-changed",M_.CULLED="culled";var li=new ln(M1.REPARENT,null,"","","",0,"",""),lo=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 a3(M1.BOUNDS_CHANGED),this.rotate=(e=n$(),function(t,n,r,i){void 0===r&&(r=0),void 0===i&&(i=0),"number"==typeof n&&(n=ez(n,r,i));var o=t.transformable;if(null!==t.parentNode&&t.parentNode.transformable){var a=n$();nU(a,n[0],n[1],n[2]);var l=h.getRotation(t);nY(e,h.getRotation(t.parentNode)),nV(e,e),nH(a,e,a),nH(o.localRotation,a,l),nX(o.localRotation,o.localRotation),h.dirtifyLocal(t,o)}else h.rotateLocal(t,n)}),this.rotateLocal=(n=n$(),function(t,e,r,i){void 0===r&&(r=0),void 0===i&&(i=0),"number"==typeof e&&(e=ez(e,r,i));var o=t.transformable;nU(n,e[0],e[1],e[2]),nH(o.localRotation,o.localRotation,n),h.dirtifyLocal(t,o)}),this.setEulerAngles=(r=n$(),function(t,e,n,i){void 0===n&&(n=0),void 0===i&&(i=0),"number"==typeof e&&(e=ez(e,n,i));var o=t.transformable;if(null!==t.parentNode&&t.parentNode.transformable){nU(o.localRotation,e[0],e[1],e[2]);var a=h.getRotation(t.parentNode);nY(r,nV(n$(),a)),nH(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=ez(e,n,r));var i,o,a,l,s,u,c,f,p,d,y,g,v,b,x,O,w,E=t.transformable;eK(e,eD())||(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,eG(E.localPosition,E.localPosition,e),h.dirtifyLocal(t,E))},this.setPosition=(i=eQ(),o=eD(),function(t,e){var n=t.transformable;o[0]=e[0],o[1]=e[1],o[2]=e[2]||0,eK(h.getPosition(t),o)||(eW(n.position,o),null!==t.parentNode&&t.parentNode.transformable?(e0(i,t.parentNode.transformable.worldTransform),e4(i,i),eX(n.localPosition,o,i)):eW(n.localPosition,o),h.dirtifyLocal(t,n))}),this.setLocalPosition=(a=eD(),function(t,e){var n=t.transformable;a[0]=e[0],a[1]=e[1],a[2]=e[2]||0,eK(n.localPosition,a)||(eW(n.localPosition,a),h.dirtifyLocal(t,n))}),this.translate=(l=eD(),s=eD(),u=eD(),function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=e$(s,e,n,r)),eK(e,l)||(eG(u,h.getPosition(t),e),h.setPosition(t,u))}),this.setRotation=function(){var t=n$();return function(e,n,r,i,o){var a=e.transformable;"number"==typeof n&&(n=nq(n,r,i,o)),null!==e.parentNode&&e.parentNode.transformable?(nY(t,h.getRotation(e.parentNode)),nV(t,t),nH(a.localRotation,t,n),nX(a.localRotation,a.localRotation),h.dirtifyLocal(e,a)):h.setLocalRotation(e,n)}},this.displayObjectDependencyMap=new WeakMap,this.calcLocalTransform=(c=eQ(),f=eD(),p=nq(0,0,0,1),function(t){if(0!==t.localSkew[0]||0!==t.localSkew[1]){if(nm(t.localTransform,t.localRotation,t.localPosition,ez(1,1,1),t.origin),0!==t.localSkew[0]||0!==t.localSkew[1]){var e=e5(c);e[4]=Math.tan(t.localSkew[0]),e[1]=Math.tan(t.localSkew[1]),e9(t.localTransform,t.localTransform,e)}var n=nm(c,p,f,t.localScale,t.origin);e9(t.localTransform,t.localTransform,n)}else nm(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,n0(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=MQ.ADDED);var l=t.transformable;l&&this.dirtifyWorld(t,l),l.frozen&&this.unfreezeParentToRoot(t),o&&t.dispatchEvent(li)},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=MQ.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=ez(e,n,r));var i=t.transformable;nU(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=ez(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=ez(e[0],e[1],e[2]||n.localScale[2]);eK(r,n.localScale)||(eW(n.localScale,r),this.dirtifyLocal(t,n))},t.prototype.setLocalRotation=function(t,e,n,r,i){"number"==typeof e&&(e=nq(e,n,r,i));var o=t.transformable;nY(o.localRotation,e),this.dirtifyLocal(t,o)},t.prototype.setLocalSkew=function(t,e,n){"number"==typeof e&&(r=e,(i=new eR(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=eT(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;)lr(n),n=n.parentNode;e&&t.forEach(function(t){lr(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 ln(M1.ATTR_MODIFIED,n,e,e,t,ln.MODIFICATION,e,e)),n.isCustomElement&&n.isConnected&&n.attributeChangedCallback&&n.attributeChangedCallback(t,e,e)})})},t.prototype.getPosition=function(t){var e=t.transformable;return nh(e.position,this.getWorldTransform(t,e))},t.prototype.getRotation=function(t){var e=t.transformable;return ny(e.rotation,this.getWorldTransform(t,e))},t.prototype.getScale=function(t){var e=t.transformable;return nd(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=nh(eD(),e),r=ny(n$(),e),i=nd(eD(),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(iy.isEmpty(r))return null;var i=n||new iy;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 iy},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 iy).update(r.center,r.halfExtents))}),e){var a=ak(t);if(a){var l=a.parsedStyle.clipPath.getBounds(e);o?l&&(o=l.intersection(o)):o=l}}return o||(o=new iy),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=eQ();t.parentNode.transformable&&(e=e4(eQ(),this.getWorldTransform(t.parentNode)));var n=this.getBounds(t);if(!iy.isEmpty(n)){var r=new iy;return r.setFromTransformedAABB(n,e),r}}return this.getBounds(t)},t.prototype.getBoundingClientRect=function(t){var e,n,r,i=this.getGeometryBounds(t);iy.isEmpty(i)||(r=new iy).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=eT(r.getMin(),2),l=a[0],s=a[1],u=eT(r.getMax(),2),c=u[0],f=u[1];return new ib(l+((null==o?void 0:o.left)||0),s+((null==o?void 0:o.top)||0),c-l,f-s)}return new ib((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?e9(e.worldTransform,r.worldTransform,e.localTransform):e0(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}(),la={MetricsString:"|\xc9q\xc5",BaselineSymbol:"M",BaselineMultiplier:1.4,HeightMultiplier:2,Newlines:[10,13],BreakingSpaces:[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288]},ll=/[a-zA-Z0-9\u00C0-\u00D6\u00D8-\u00f6\u00f8-\u00ff!"#$%&'()*+,-./:;]/,ls=new RegExp("".concat(/[!%),.:;?\]}¢°·'""†‡›℃∶、。〃〆〕〗〞﹚﹜!"%'),.:;?!]}~]/.source,"|").concat(/[!),.:;?\]}¢·–—'"•"、。〆〞〕〉》」︰︱︲︳﹐﹑﹒﹔﹕﹖﹘﹚﹜!),.:;?︶︸︺︼︾﹀﹂﹗]|}、]/.source,"|").concat(/[)\]}〕〉》」』】〙〗〟'"⦆»ヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻‐゠–〜?!‼⁇⁈⁉・、:;,。.]/.source,"|").concat(/[!%),.:;?\]}¢°'"†‡℃〆〈《「『〕!%),.:;?]}]/.source)),lu=new RegExp("".concat(/[$(£¥·'"〈《「『【〔〖〝﹙﹛$(.[{£¥]/.source,"|").concat(/[([{£¥'"‵〈《「『〔〝︴﹙﹛({︵︷︹︻︽︿﹁﹃﹏]/.source,"|").concat(/[([{〔〈《「『【〘〖〝'"⦅«—...‥〳〴〵]/.source,"|").concat(/[$([{£¥'"々〇〉》」〔$([{⦆¥₩#]/.source)),lc=function(){function t(t){var e=this;this.runtime=t,this.fontMetricsCache={},this.shouldBreakByKinsokuShorui=function(t,n){return!e.isBreakingSpace(n)&&!!(t&&(lu.exec(n)||ls.exec(t)))},this.trimByKinsokuShorui=function(t){var e=eN([],eT(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=la.MetricsString+la.BaselineSymbol,a=Math.ceil(i.measureText(o).width),l=Math.ceil(i.measureText(la.BaselineSymbol).width),s=la.HeightMultiplier*l;l=l*la.BaselineMultiplier|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=nQ(e)&&"".concat(e,"px")||"16px",l=n.split(","),s=l.length-1;s>=0;s--){var u=l[s].trim();!aH.test(u)&&0>aG.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 ib(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,S=0,_=M,P=0;P<M;P++){var j=g(p[h][P]);if(S+j+v>c){_=P;break}S+=j}p[h]=(p[h]||"").slice(0,_)+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&&la.BreakingSpaces.indexOf(t.charCodeAt(0))>=0},t.prototype.isNewline=function(t){return"string"==typeof t&&la.Newlines.indexOf(t.charCodeAt(0))>=0},t.prototype.trimToBreakable=function(t){var e=eN([],eT(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&&ll.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(!ll.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}(),lf={},lp=(Mj=new aQ,MA=new aZ,(MP={})[MF.CIRCLE]=new aq,MP[MF.ELLIPSE]=new aY,MP[MF.RECT]=Mj,MP[MF.IMAGE]=Mj,MP[MF.GROUP]=Mj,MP[MF.LINE]=new aX,MP[MF.TEXT]=new aJ(lf),MP[MF.POLYLINE]=MA,MP[MF.POLYGON]=MA,MP[MF.PATH]=new aK,MP[MF.HTML]=null,MP[MF.MESH]=null,MP),lh=(MC=new an,MN=new ao,(MT={})[MJ.PERCENTAGE]=null,MT[MJ.NUMBER]=new ap,MT[MJ.ANGLE]=new at,MT[MJ.DEFINED_PATH]=new ae,MT[MJ.PAINT]=MC,MT[MJ.COLOR]=MC,MT[MJ.FILTER]=new ar,MT[MJ.LENGTH]=MN,MT[MJ.LENGTH_PERCENTAGE]=MN,MT[MJ.LENGTH_PERCENTAGE_12]=new aa,MT[MJ.LENGTH_PERCENTAGE_14]=new al,MT[MJ.COORDINATE]=new ac,MT[MJ.OFFSET_DISTANCE]=new ah,MT[MJ.OPACITY_VALUE]=new ad,MT[MJ.PATH]=new ay,MT[MJ.LIST_OF_POINTS]=new ag,MT[MJ.SHADOW_BLUR]=new am,MT[MJ.TEXT]=new av,MT[MJ.TEXT_TRANSFORM]=new ab,MT[MJ.TRANSFORM]=new aV,MT[MJ.TRANSFORM_ORIGIN]=new function(){this.parser=o1,this.parserUnmemoize=o2},MT[MJ.Z_INDEX]=new aU,MT[MJ.MARKER]=new af,MT);lf.CameraContribution=iE,lf.AnimationTimeline=null,lf.EasingFunction=null,lf.offscreenCanvasCreator=new a9,lf.sceneGraphSelector=new le,lf.sceneGraphService=new lo(lf),lf.textService=new lc(lf),lf.geometryUpdaterFactory=lp,lf.CSSPropertySyntaxFactory=lh,lf.styleValueRegistry=new o7(lf),lf.layoutRegistry=null,lf.globalThis="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==n.g?n.g:{},lf.enableCSSParsing=!0,lf.enableDataset=!1,lf.enableStyleSyntax=!0,lf.enableSizeAttenuation=!1;var ld=0,ly=new ln(M1.INSERTED,null,"","","",0,"",""),lg=new ln(M1.REMOVED,null,"","","",0,"",""),lm=new a3(M1.DESTROY),lv=function(t){function e(){var e=t.apply(this,eN([],eT(arguments),!1))||this;return e.entity=ld++,e.renderable={bounds:void 0,boundsDirty:!0,renderBounds:void 0,renderBoundsDirty:!0,dirtyRenderBounds:void 0,dirty:!1},e.cullable={strategy:MZ.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=lf.enableCSSParsing?{anchor:iU,opacity:iU,fillOpacity:iU,strokeOpacity:iU,fill:iU,stroke:iU,transform:iU,transformOrigin:iU,visibility:iU,pointerEvents:iU,lineWidth:iU,lineCap:iU,lineJoin:iU,increasedLineWidthForHitTesting:iU,fontSize:iU,fontFamily:iU,fontStyle:iU,fontWeight:iU,fontVariant:iU,textAlign:iU,textBaseline:iU,textTransform:iU,zIndex:iU,filter:iU,shadowType:iU}:null,e.parsedStyle={},e.attributes={},e}return eM(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(ix)},e.prototype.appendChild=function(t,e){var n;if(t.destroyed)throw Error("Cannot append a destroyed element.");return lf.sceneGraphService.attach(t,this,e),(null==(n=this.ownerDocument)?void 0:n.defaultView)&&this.ownerDocument.defaultView.mountChildren(t),ly.relatedNode=this,t.dispatchEvent(ly),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 lg.relatedNode=this,t.dispatchEvent(lg),(null==(e=t.ownerDocument)?void 0:e.defaultView)&&t.ownerDocument.defaultView.unmountChildren(t),lf.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 lf.sceneGraphService.matches(t,this)},e.prototype.getElementById=function(t){return lf.sceneGraphService.querySelector("#".concat(t),this)},e.prototype.getElementsByName=function(t){return lf.sceneGraphService.querySelectorAll('[name="'.concat(t,'"]'),this)},e.prototype.getElementsByClassName=function(t){return lf.sceneGraphService.querySelectorAll(".".concat(t),this)},e.prototype.getElementsByTagName=function(t){return lf.sceneGraphService.querySelectorAll(t,this)},e.prototype.querySelector=function(t){return lf.sceneGraphService.querySelector(t,this)},e.prototype.querySelectorAll=function(t){return lf.sceneGraphService.querySelectorAll(t,this)},e.prototype.closest=function(t){var e=this;do{if(lf.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=eT(t),i=r[0],o=r.slice(1);this.parentNode.appendChild(i,n),i.after.apply(i,eN([],eT(o),!1))}},e.prototype.replaceWith=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.after.apply(this,eN([],eT(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,eN([],eT(t),!1))},e.prototype.remove=function(){return this.parentNode?this.parentNode.removeChild(this):this},e.prototype.destroy=function(){this.dispatchEvent(lm),this.remove(),this.emitter.removeAllListeners(),this.destroyed=!0},e.prototype.getGeometryBounds=function(){return lf.sceneGraphService.getGeometryBounds(this)},e.prototype.getRenderBounds=function(){return lf.sceneGraphService.getBounds(this,!0)},e.prototype.getBounds=function(){return lf.sceneGraphService.getBounds(this)},e.prototype.getLocalBounds=function(){return lf.sceneGraphService.getLocalBounds(this)},e.prototype.getBoundingClientRect=function(){return lf.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 lf.enableCSSParsing?null:void 0;var e=this.attributes[t];if(void 0!==e)return e;var n=iB(t);return e=this.attributes[n],lf.enableCSSParsing&&n0(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(ix)},e.prototype.getAttributeNode=function(t){throw Error(ix)},e.prototype.getAttributeNodeNS=function(t,e){throw Error(ix)},e.prototype.hasAttributeNS=function(t,e){throw Error(ix)},e.prototype.removeAttributeNS=function(t,e){throw Error(ix)},e.prototype.removeAttributeNode=function(t){throw Error(ix)},e.prototype.setAttributeNS=function(t,e,n){throw Error(ix)},e.prototype.setAttributeNode=function(t){throw Error(ix)},e.prototype.setAttributeNodeNS=function(t){throw Error(ix)},e.prototype.toggleAttribute=function(t,e){throw Error(ix)},e}(a6);function lb(t){return!!(null==t?void 0:t.nodeName)}var lx=new ln(M1.ATTR_MODIFIED,null,null,null,null,ln.MODIFICATION,null,null),lO={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:""},lw={anchor:[0,0],fill:iX,stroke:iX,transform:[],zIndex:0,filter:[],shadowType:"outer",miterLimit:10},lE=eS(eS({},lw),{opacity:1,fillOpacity:1,strokeOpacity:1,visibility:"visible",pointerEvents:"auto",lineWidth:1,lineCap:"butt",lineJoin:"miter",increasedLineWidthForHitTesting:0,fillRule:"nonzero"}),lk=eN(eN([],eT(["opacity","fillOpacity","strokeOpacity","transformOrigin","visibility","pointerEvents","lineWidth","lineCap","lineJoin","increasedLineWidthForHitTesting"]),!1),["fontSize","fontFamily","fontStyle","fontWeight","fontVariant","textAlign","textBaseline","textTransform"],!1),lM="data-",lS=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||MF.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,lf.enableCSSParsing?lw:lE,r.config.initialParsedStyle),lf.enableCSSParsing&&Object.assign(r.attributes,lO),r.initAttributes(r.config.style);var i=lf.globalThis.Proxy?lf.globalThis.Proxy:function(){};return lf.enableDataset&&(r.dataset=new i({},{get:function(t,e){var n="".concat(lM).concat(iR(e));return void 0!==t[n]?t[n]:r.getAttribute(n)},set:function(t,e,n){return r.setAttribute("".concat(lM).concat(iR(e)),n),!0}})),lf.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 eM(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=eS({},this.attributes);for(var r in n){var i=n[r];lb(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};lf.enableCSSParsing&&(n.usedAttributes=lk);var r={};for(var i in t)r[iB(i)]=t[i];lf.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=iB(e);!rb(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];lf.styleValueRegistry.processProperties(this,((r={})[t]=e,r),n),i.dirty=!0;var l=this.parsedStyle[t];this.isConnected&&(lx.relatedNode=this,lx.prevValue=o,lx.newValue=e,lx.attrName=t,lx.prevParsedValue=a,lx.newParsedValue=l,this.isMutationObserved?this.dispatchEvent(lx):(lx.target=this,this.ownerDocument.defaultView.dispatchEvent(lx,!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=eT(t.getMin(),2),n=e[0],r=e[1],i=eT(t.getMax(),2);return new ib(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),lf.sceneGraphService.setOrigin(this,ir(t,e,n)),this},e.prototype.getOrigin=function(){return lf.sceneGraphService.getOrigin(this)},e.prototype.setPosition=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),lf.sceneGraphService.setPosition(this,ir(t,e,n)),this},e.prototype.setLocalPosition=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),lf.sceneGraphService.setLocalPosition(this,ir(t,e,n)),this},e.prototype.translate=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),lf.sceneGraphService.translate(this,ir(t,e,n)),this},e.prototype.translateLocal=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),lf.sceneGraphService.translateLocal(this,ir(t,e,n)),this},e.prototype.getPosition=function(){return lf.sceneGraphService.getPosition(this)},e.prototype.getLocalPosition=function(){return lf.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=ir(t,e,n)),lf.sceneGraphService.scaleLocal(this,t),this},e.prototype.setLocalScale=function(t,e,n){return"number"==typeof t&&(e=e||t,n=n||t,t=ir(t,e,n)),lf.sceneGraphService.setLocalScale(this,t),this},e.prototype.getLocalScale=function(){return lf.sceneGraphService.getLocalScale(this)},e.prototype.getScale=function(){return lf.sceneGraphService.getScale(this)},e.prototype.getEulerAngles=function(){return io(eT(ia(eD(),lf.sceneGraphService.getWorldTransform(this)),3)[2])},e.prototype.getLocalEulerAngles=function(){return io(eT(ia(eD(),lf.sceneGraphService.getLocalRotation(this)),3)[2])},e.prototype.setEulerAngles=function(t){return lf.sceneGraphService.setEulerAngles(this,0,0,t),this},e.prototype.setLocalEulerAngles=function(t){return lf.sceneGraphService.setLocalEulerAngles(this,0,0,t),this},e.prototype.rotateLocal=function(t,e,n){return n0(e)&&n0(n)?lf.sceneGraphService.rotateLocal(this,0,0,t):lf.sceneGraphService.rotateLocal(this,t,e,n),this},e.prototype.rotate=function(t,e,n){return n0(e)&&n0(n)?lf.sceneGraphService.rotate(this,0,0,t):lf.sceneGraphService.rotate(this,t,e,n),this},e.prototype.setRotation=function(t,e,n,r){return lf.sceneGraphService.setRotation(this,t,e,n,r),this},e.prototype.setLocalRotation=function(t,e,n,r){return lf.sceneGraphService.setLocalRotation(this,t,e,n,r),this},e.prototype.setLocalSkew=function(t,e){return lf.sceneGraphService.setLocalSkew(this,t,e),this},e.prototype.getRotation=function(){return lf.sceneGraphService.getRotation(this)},e.prototype.getLocalRotation=function(){return lf.sceneGraphService.getLocalRotation(this)},e.prototype.getLocalSkew=function(){return lf.sceneGraphService.getLocalSkew(this)},e.prototype.getLocalTransform=function(){return lf.sceneGraphService.getLocalTransform(this)},e.prototype.getWorldTransform=function(){return lf.sceneGraphService.getWorldTransform(this)},e.prototype.setLocalTransform=function(t){return lf.sceneGraphService.setLocalTransform(this,t),this},e.prototype.resetLocalTransform=function(){lf.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,eN([],eT(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,eN([],eT(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=eT(e,2),i=r[0],o=r[1];return i?rv(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=eT(nh(eD(),u),2),f=c[0],p=c[1],h=eT(nd(eD(),u),2),d=h[0],y=h[1],g=ny(n$(),u),v=eT(ia(eD(),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 eR(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=eT(il(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=eT(il(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(){lf.enableCSSParsing?this.style.visibility="visible":this.forEach(function(t){t.style.visibility="visible"})},e.prototype.hide=function(){lf.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}(lv),l_=function(t){var e=t.name,n=t.inherits,r=t.interpolable,i=t.initialValue,o=t.syntax;lf.styleValueRegistry.registerMetadata({n:e,inh:n,int:r,d:i,syntax:o})},lP=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=e_(e,["style"]);return t.call(this,eS({type:MF.CIRCLE,style:lf.enableCSSParsing?eS({cx:"",cy:"",r:""},n):eS({},n),initialParsedStyle:{anchor:[.5,.5],transformOrigin:lf.enableCSSParsing?null:[iJ,iJ]}},r))||this}return eM(e,t),e}(lS),lj=function(t){function e(e){void 0===e&&(e={});var n=this,r=e.style,i=e_(e,["style"]);return(n=t.call(this,eS({style:lf.enableCSSParsing?eS({x:"",y:""},r):eS({},r)},i))||this).isCustomElement=!0,n}return eM(e,t),e}(lS),lA=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=e_(e,["style"]);return t.call(this,eS({type:MF.ELLIPSE,style:lf.enableCSSParsing?eS({cx:"",cy:"",rx:"",ry:""},n):eS({},n),initialParsedStyle:{anchor:[.5,.5],transformOrigin:lf.enableCSSParsing?null:[iJ,iJ]}},r))||this}return eM(e,t),e}(lS),lT=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=e_(e,["style"]);return t.call(this,eS({type:MF.GROUP,style:lf.enableCSSParsing?eS({x:"",y:"",width:"",height:""},n):eS({},n)},r))||this}return eM(e,t),e}(lS),lC=function(t){function e(e){void 0===e&&(e={});var n=this,r=e.style,i=e_(e,["style"]);return(n=t.call(this,eS({type:MF.HTML,style:lf.enableCSSParsing?eS({x:"",y:"",width:"auto",height:"auto",innerHTML:""},r):eS({},r)},i))||this).cullable.enable=!1,n}return eM(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 ib(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 iy,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=e4(eQ(),this.parentNode.getWorldTransform()),e=this.getBounds();if(!iy.isEmpty(e)){var n=new iy;return n.setFromTransformedAABB(e,t),n}}return this.getBounds()},e}(lS),lN=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=e_(e,["style"]);return t.call(this,eS({type:MF.IMAGE,style:lf.enableCSSParsing?eS({x:"",y:"",img:"",width:"",height:""},n):eS({},n)},r))||this}return eM(e,t),e}(lS),lL=function(t){function e(e){void 0===e&&(e={});var n=this,r=e.style,i=e_(e,["style"]);(n=t.call(this,eS({type:MF.LINE,style:eS({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&&lb(a)&&(n.markerStartAngle=a.getLocalEulerAngles(),n.appendChild(a)),l&&lb(l)&&(n.markerEndAngle=l.getLocalEulerAngles(),n.appendChild(l)),n.transformMarker(!0),n.transformMarker(!1),n}return eM(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&&lb(r)&&(this.markerStartAngle=0,r.remove()),i&&lb(i)&&(this.markerStartAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!0))):"markerEnd"===t&&(r&&lb(r)&&(this.markerEndAngle=0,r.remove()),i&&lb(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&&lb(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=rZ(r,i,o,a,t),c=u.x,f=u.y,p=eX(eD(),ez(c-l,f-s,0),e?this.getWorldTransform():this.getLocalTransform());return new iv(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 rY(t.x1,t.y1,t.x2,t.y2)},e}(lS),lI=function(t){function e(e){void 0===e&&(e={});var n=this,r=e.style,i=e_(e,["style"]);(n=t.call(this,eS({type:MF.PATH,style:lf.enableCSSParsing?eS({path:"",miterLimit:""},r):eS({},r),initialParsedStyle:lf.enableCSSParsing?null:{miterLimit:4,path:eS({},i0)}},i))||this).markerStartAngle=0,n.markerEndAngle=0,n.markerMidList=[];var o=n.parsedStyle,a=o.markerStart,l=o.markerEnd,s=o.markerMid;return a&&lb(a)&&(n.markerStartAngle=a.getLocalEulerAngles(),n.appendChild(a)),s&&lb(s)&&n.placeMarkerMid(s),l&&lb(l)&&(n.markerEndAngle=l.getLocalEulerAngles(),n.appendChild(l)),n.transformMarker(!0),n.transformMarker(!1),n}return eM(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&&lb(r)&&(this.markerStartAngle=0,r.remove()),i&&lb(i)&&(this.markerStartAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!0))):"markerEnd"===t?(r&&lb(r)&&(this.markerEndAngle=0,r.remove()),i&&lb(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&&lb(d)){var y=0;if(t){var g=eT(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=eT(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&&lb(t))for(var o=1;o<n.length-1;o++){var a=eT(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 oE(this)},e.prototype.getPointAtLength=function(t,e){void 0===e&&(e=!1);var n=this.parsedStyle,r=n.defX,i=n.defY,o=rl(n.path.absolutePath,t,eS(eS({},void 0),{bbox:!1,length:!0})).point,a=o.x,l=o.y,s=eX(eD(),ez(a-r,l-i,0),e?this.getWorldTransform():this.getLocalTransform());return new iv(s[0],s[1])},e.prototype.getPoint=function(t,e){return void 0===e&&(e=!1),this.getPointAtLength(t*oE(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}(lS),lR=function(t){function e(e){void 0===e&&(e={});var n=this,r=e.style,i=e_(e,["style"]);(n=t.call(this,eS({type:MF.POLYGON,style:lf.enableCSSParsing?eS({points:"",miterLimit:"",isClosed:!0},r):eS({},r),initialParsedStyle:lf.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&&lb(a)&&(n.markerStartAngle=a.getLocalEulerAngles(),n.appendChild(a)),s&&lb(s)&&n.placeMarkerMid(s),l&&lb(l)&&(n.markerEndAngle=l.getLocalEulerAngles(),n.appendChild(l)),n.transformMarker(!0),n.transformMarker(!1),n}return eM(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&&lb(r)&&(this.markerStartAngle=0,r.remove()),i&&lb(i)&&(this.markerStartAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!0))):"markerEnd"===t?(r&&lb(r)&&(this.markerEndAngle=0,r.remove()),i&&lb(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&&lb(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&&lb(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}(lS),lD=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=e_(e,["style"]);return t.call(this,eS({type:MF.POLYLINE,style:lf.enableCSSParsing?eS({points:"",miterLimit:"",isClosed:!1},n):eS({},n),initialParsedStyle:lf.enableCSSParsing?null:{points:{points:[],totalLength:0,segments:[]},miterLimit:4,isClosed:!1}},r))||this}return eM(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=rZ(a[u][0],a[u][1],a[u+1][0],a[u+1][1],s),f=c.x,p=c.y,h=eX(eD(),ez(f-r,p-i,0),e?this.getWorldTransform():this.getLocalTransform());return new iv(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}(lR),lF=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=e_(e,["style"]);return t.call(this,eS({type:MF.RECT,style:lf.enableCSSParsing?eS({x:"",y:"",width:"",height:"",radius:""},n):eS({},n)},r))||this}return eM(e,t),e}(lS),lB=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=e_(e,["style"]);return t.call(this,eS({type:MF.TEXT,style:lf.enableCSSParsing?eS({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):eS({fill:"black"},n),initialParsedStyle:lf.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 eM(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}(lS),lz=function(){function t(){this.registry={},this.define(MF.CIRCLE,lP),this.define(MF.ELLIPSE,lA),this.define(MF.RECT,lF),this.define(MF.IMAGE,lN),this.define(MF.LINE,lL),this.define(MF.GROUP,lT),this.define(MF.PATH,lI),this.define(MF.POLYGON,lR),this.define(MF.POLYLINE,lD),this.define(MF.TEXT,lB),this.define(MF.HTML,lC)}return t.prototype.define=function(t,e){this.registry[t]=e},t.prototype.get=function(t){return this.registry[t]},t}(),lW=function(t){function e(){var e=t.call(this)||this;e.defaultView=null,e.ownerDocument=null,e.nodeName="document";try{e.timeline=new lf.AnimationTimeline(e)}catch(t){}var n={};return o3.forEach(function(t){var e=t.n,r=t.inh,i=t.d;r&&i&&(n[e]=iD(i)?i(MF.GROUP):i)}),e.documentElement=new lT({id:"g-root",style:n}),e.documentElement.ownerDocument=e,e.documentElement.parentNode=e,e.childNodes=[e.documentElement],e}return eM(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?lB:lT);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(ix)},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 eP(this,void 0,void 0,function(){var n,r,i,o,a,l,s,u,c,f;return ej(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 eP(this,void 0,void 0,function(){var n,r,i,o,a,l,s,u,c,f;return ej(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(iO)},e.prototype.insertBefore=function(t,e){throw Error(iO)},e.prototype.removeChild=function(t,e){throw Error(iO)},e.prototype.replaceChild=function(t,e,n){throw Error(iO)},e.prototype.append=function(){throw Error(iO)},e.prototype.prepend=function(){throw Error(iO)},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}(a6),l$=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 a3(M1.CULLED)),null)}return t}),r.hooks.afterRender.tap(t.tag,function(t){t.cullable.visibilityPlaneMask=-1})},t.tag="Culling",t}(),lG=function(){function t(){var t=this;this.autoPreventDefault=!1,this.rootPointerEvent=new a2(null),this.rootWheelEvent=new a5(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=eA(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=eA(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=eA(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=eA(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=eA(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||n0(r)||n0(i)){var l=this.context.eventService.client2Viewport(new iv(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=aS[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=a_.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];rb(i.button)&&(i.button=0),rb(i.buttons)&&(i.buttons=1),rb(i.isPrimary)&&(i.isPrimary=1===t.touches.length&&"touchstart"===t.type),rb(i.width)&&(i.width=i.radiusX||1),rb(i.height)&&(i.height=i.radiusY||1),rb(i.tiltX)&&(i.tiltX=0),rb(i.tiltY)&&(i.tiltY=0),rb(i.pointerType)&&(i.pointerType="touch"),rb(i.pointerId)&&(i.pointerId=i.identifier||0),rb(i.pressure)&&(i.pressure=i.force||.5),rb(i.twist)&&(i.twist=0),rb(i.tangentialPressure)&&(i.tangentialPressure=0),i.isNormalized=!0,i.type=t.type,n.push(i)}else e.isMouseEvent(t)&&(rb(t.isPrimary)&&(t.isPrimary=!0),rb(t.width)&&(t.width=1),rb(t.height)&&(t.height=1),rb(t.tiltX)&&(t.tiltX=0),rb(t.tiltY)&&(t.tiltY=0),rb(t.pointerType)&&(t.pointerType="mouse"),rb(t.pointerId)&&(t.pointerId=1),rb(t.pressure)&&(t.pressure=.5),rb(t.twist)&&(t.twist=0),rb(t.tangentialPressure)&&(t.tangentialPressure=0),t.isNormalized=!0),n.push(t);return n},t.tag="Event",t}(),lH=[MF.CIRCLE,MF.ELLIPSE,MF.IMAGE,MF.RECT,MF.LINE,MF.POLYLINE,MF.POLYGON,MF.TEXT,MF.PATH,MF.HTML],lV=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(iy.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||Mz.INDETERMINATE,a.planes),i.visible=i.visibilityPlaneMask!==Mz.OUTSIDE,i.visible},t.prototype.computeVisibilityWithPlaneMask=function(t,e,n,r){if(n===Mz.OUTSIDE||n===Mz.INSIDE)return n;for(var i=Mz.INSIDE,o=lH.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(eq(c,e.getPositiveFarPoint(r[a]))+f<0)return Mz.OUTSIDE;eq(c,e.getNegativeFarPoint(r[a]))+f<0&&(i|=s)}}return i},t}(),lU=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;lf.enableSizeAttenuation&&lf.styleValueRegistry.updateSizeAttenuation(e,a.getCamera().getZoom()),lf.enableCSSParsing&&lf.styleValueRegistry.recalc(e),lf.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),lf.sceneGraphService.dirtifyToRoot(e),r.dirtify()};r.hooks.init.tap(t.tag,function(){a.addEventListener(M1.MOUNTED,u),a.addEventListener(M1.UNMOUNTED,c),a.addEventListener(M1.ATTR_MODIFIED,l),a.addEventListener(M1.BOUNDS_CHANGED,s)}),r.hooks.destroy.tap(t.tag,function(){a.removeEventListener(M1.MOUNTED,u),a.removeEventListener(M1.UNMOUNTED,c),a.removeEventListener(M1.ATTR_MODIFIED,l),a.removeEventListener(M1.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=eT(i.getMin(),2),a=o[0],l=o[1],s=eT(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}();(ML=M2||(M2={})).READY="ready",ML.BEFORE_RENDER="beforerender",ML.RERENDER="rerender",ML.AFTER_RENDER="afterrender",ML.BEFORE_DESTROY="beforedestroy",ML.AFTER_DESTROY="afterdestroy",ML.RESIZE="resize",ML.DIRTY_RECTANGLE="dirtyrectangle",ML.RENDERER_CHANGED="rendererchanged";var lq=new a3(M1.MOUNTED),lY=new a3(M1.UNMOUNTED),lX=new a3(M2.BEFORE_RENDER),lK=new a3(M2.RERENDER),lZ=new a3(M2.AFTER_RENDER),lQ=function(t){function e(e){var n,r,i=t.call(this)||this;i.Element=lS,i.inited=!1,i.context={},i.document=new lW,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,S=e.isMouseEvent;w||function(t,e){if(t){var n="string"==typeof t?t:t.id||aO++;ax[n]&&ax[n].destroy(),ax[n]=e}}(o,i);var _=s,P=u,j=c;return a&&(j=(j=c||aw&&window.devicePixelRatio||1)>=1?Math.ceil(j):1,_=s||("auto"===(n=aM(a,"width"))?a.offsetWidth:parseFloat(n))||a.width/j,P=u||("auto"===(r=aM(a,"height"))?a.offsetHeight:parseFloat(r))||a.height/j),l&&(lf.offscreenCanvas=l),i.devicePixelRatio=j,i.requestAnimationFrame=null!=y?y:aD.bind(lf.globalThis),i.cancelAnimationFrame=null!=g?g:aF.bind(lf.globalThis),i.supportsTouchEvents=null!=x?x:"ontouchstart"in lf.globalThis,i.supportsPointerEvents=null!=b?b:!!lf.globalThis.PointerEvent,i.isTouchEvent=null!=M?M:function(t){return i.supportsTouchEvents&&t instanceof lf.globalThis.TouchEvent},i.isMouseEvent=null!=S?S:function(t){return!lf.globalThis.MouseEvent||t instanceof lf.globalThis.MouseEvent&&(!i.supportsPointerEvents||!(t instanceof lf.globalThis.PointerEvent))},i.initRenderingContext({container:o,canvas:a,width:_,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(_,P,f.clipSpaceNearZ),i.initRenderer(f,!0),i}return eM(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 lf.CameraContribution;i.clipSpaceNearZ=n,i.setType(MW.EXPLORING,M$.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(iw.UPDATED,function(){r.context.renderingContext.renderReasons.add(M0.CAMERA_CHANGED),lf.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){lf.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 a3(M2.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 a3(M2.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===MG.ORTHOGRAPHIC?r.setOrthographic(-(t/2),t/2,e/2,-(e/2),r.getNear(),r.getFar()):r.setAspect(t/e),this.dispatchEvent(new a3(M2.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(lX),this.getRenderingService().render(this.getConfig(),function(){t.dispatchEvent(lK)}),this.dispatchEvent(lZ)},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 r3,this.context.renderingPlugins=[],this.context.renderingPlugins.push(new lG,new lU,new l$([new lV])),this.loadRendererContainerModule(t),this.context.contextService=new this.context.ContextService(eS(eS({},lf),this.context)),this.context.renderingService=new a7(lf,this.context),this.context.eventService=new a8(lf,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 a3(M2.READY))}):r.dispatchEvent(new a3(M2.READY)),r.readyPromise&&r.resolveReadyPromise()):r.dispatchEvent(new a3(M2.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(lf)})},e.prototype.setRenderer=function(t){var e=this.getConfig();if(e.renderer!==t){var n=e.renderer;e.renderer=t,this.destroy(!1,!0),eN([],eT(null==n?void 0:n.getPlugins()),!1).reverse().forEach(function(t){t.destroy(lf)}),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(lY):(lY.target=t,this.dispatchEvent(lY,!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(lq):(lq.target=t,this.dispatchEvent(lq,!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}(a4),lJ={}.toString,l0=function(t,e){return lJ.call(t)==="[object "+e+"]"},l1=function(t){function e(){var e=t.apply(this,eN([],eT(arguments),!1))||this;return e.landmarks=[],e}return eM(e,t),e.prototype.rotate=function(t,e,n){if(this.relElevation=ie(e),this.relAzimuth=ie(t),this.relRoll=ie(n),this.elevation+=this.relElevation,this.azimuth+=this.relAzimuth,this.roll+=this.relRoll,this.type===MW.EXPLORING){var r=nG(n$(),[1,0,0],ii((this.rotateWorld?1:-1)*this.relElevation)),i=nG(n$(),[0,1,0],ii((this.rotateWorld?1:-1)*this.relAzimuth)),o=nG(n$(),[0,0,1],ii(this.relRoll)),a=nH(n$(),i,r);a=nH(n$(),a,o);var l=nv(eQ(),a);e7(this.matrix,this.matrix,[0,0,-this.distance]),e9(this.matrix,this.matrix,l),e7(this.matrix,this.matrix,[0,0,this.distance])}else{if(Math.abs(this.elevation)>90)return this;this.computeMatrix()}return this._getAxes(),this.type===MW.ORBITING||this.type===MW.EXPLORING?this._getPosition():this.type===MW.TRACKING&&this._getFocalPoint(),this._update(),this},e.prototype.pan=function(t,e){var n=ir(t,e,0),r=eF(this.position);return eG(r,r,eV(eD(),this.right,n[0])),eG(r,r,eV(eD(),this.up,n[1])),this._setPosition(r),this.triggerUpdate(),this},e.prototype.dolly=function(t){var e=this.forward,n=eF(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===MW.ORBITING||this.type===MW.EXPLORING?this._getDistance():this.type===MW.TRACKING&&eG(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 lf.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:eJ(p.getWorldTransform()),right:eF(p.right),up:eF(p.up),forward:eF(p.forward),position:eF(p.getPosition()),focalPoint:eF(p.getFocalPoint()),distanceVector:eF(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=l0(t,"String")?this.landmarks.find(function(e){return e.name===t}):t;if(r){var i,o=l0(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)||lf.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=eD(),a=eD(),l=1,u=0;if(eY(o,n.focalPoint,y,r),eY(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),eZ(o,y)+eZ(a,d)<=.01&&void 0==g&&void 0==v)return void 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=e0(this.matrix,t.matrix),this.right=eW(this.right,t.right),this.up=eW(this.up,t.up),this.forward=eW(this.forward,t.forward),this.position=eW(this.position,t.position),this.focalPoint=eW(this.focalPoint,t.focalPoint),this.distanceVector=eW(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}(iE);lf.CameraContribution=l1;var l2=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}(),l5=0,l3=new WeakMap,l4=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:M3&&(t===M3||t===M5)?M3:null}(n[r-1],t);if(i){n[r-1]=i;return}}else{e=this.observer,l7.push(e),l9||(l9=!0,void 0!==lf.globalThis?lf.globalThis.setTimeout(st):st())}n[r]=t},t.prototype.addListeners=function(){this.addListeners_(this.target)},t.prototype.addListeners_=function(t){var e=this.options;e.attributes&&t.addEventListener(M1.ATTR_MODIFIED,this,!0),e.childList&&t.addEventListener(M1.INSERTED,this,!0),(e.childList||e.subtree)&&t.addEventListener(M1.REMOVED,this,!0)},t.prototype.removeListeners=function(){this.removeListeners_(this.target)},t.prototype.removeListeners_=function(t){var e=this.options;e.attributes&&t.removeEventListener(M1.ATTR_MODIFIED,this,!0),e.childList&&t.removeEventListener(M1.INSERTED,this,!0),(e.childList||e.subtree)&&t.removeEventListener(M1.REMOVED,this,!0)},t.prototype.removeTransientObservers=function(){var t=this.transientObservedNodes;this.transientObservedNodes=[],t.forEach(function(t){this.removeListeners_(t);for(var e=l3.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 M1.ATTR_MODIFIED:var e,n,r=t.attrName,i=t.relatedNode.namespaceURI;(e=M5=new l2("attributes",n=t.target)).attributeName=r,e.attributeNamespace=i;var o=t.attrChange===ln.ADDITION?null:t.prevValue;l8(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,M3||((M3=l2.copy(M5)).oldValue=n),M3):e}});break;case M1.REMOVED:case M1.INSERTED:n=t.relatedNode;var a=t.target,l=void 0,s=void 0;t.type===M1.INSERTED?(l=[a],s=[]):(l=[],s=[a]);var u=a.previousSibling,c=a.nextSibling;(e=M5=new l2("childList",n)).addedNodes=l,e.removedNodes=s,e.previousSibling=u,e.nextSibling=c,l8(n,function(t){if(t.childList)return e})}M5=M3=void 0},t}();function l6(t){this.callback=t,this.nodes=[],this.records=[],this.uid=l5++}function l8(t,e){for(var n=t;n;n=n.parentNode){var r=l3.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)}}}}l6.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=l3.get(t);r||l3.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 l4(this,t,e),r.push(n),this.nodes.push(t)),n.addListeners()},l6.prototype.disconnect=function(){var t=this;this.nodes.forEach(function(e){for(var n=l3.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=[]},l6.prototype.takeRecords=function(){var t=this.records;return this.records=[],t};var l9=!1,l7=[];function st(){l9=!1;var t=l7;l7=[],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=l3.get(e);n&&n.forEach(function(e){e.observer===t&&e.removeTransientObservers()})}),n.length&&(t.callback(n,t),e=!0)}),e&&st()}var se=function(t,e,n){return t<e?e:t>n?n:t},sn={}.toString,sr=function(t){return"[object Number]"===sn.call(t)},si=function(t){return null==t},so=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 eM(e,t),e}(a0),sa=0,sl=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(sa++),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 so(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(ix)},t.prototype.addEventListener=function(t,e,n){throw Error(ix)},t.prototype.removeEventListener=function(t,e,n){throw Error(ix)},t.prototype.dispatchEvent=function(t){throw Error(ix)},t.prototype.commitStyles=function(){throw Error(ix)},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 so(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 so(null,this,this.currentTime,t);this.onframe(r)}this._finishedFlag=!1}},t}(),ss="function"==typeof Float32Array,su=function(t,e){return 1-3*e+3*t},sc=function(t,e){return 3*e-6*t},sf=function(t){return 3*t},sp=function(t,e,n){return((su(e,n)*t+sc(e,n))*t+sf(e))*t},sh=function(t,e,n){return 3*su(e,n)*t*t+2*sc(e,n)*t+sf(e)},sd=function(t,e,n,r,i){var o,a,l=0;do(o=sp(a=e+(n-e)/2,r,i)-t)>0?n=a:e=a;while(Math.abs(o)>1e-7&&++l<10);return a},sy=function(t,e,n,r){for(var i=0;i<4;++i){var o=sh(e,n,r);if(0===o)break;var a=sp(e,n,r)-t;e-=a/o}return e},sg=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=ss?new Float32Array(11):Array(11),o=0;o<11;++o)i[o]=sp(.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=sh(a,t,n);return l>=.001?sy(e,a,t,n):0===l?a:sd(e,r,r+.1,t,n)};return function(t){return 0===t||1===t?t:sp(a(t),e,r)}},sm=function(t){return Math.pow(t,2)},sv=function(t){return Math.pow(t,3)},sb=function(t){return Math.pow(t,4)},sx=function(t){return Math.pow(t,5)},sO=function(t){return Math.pow(t,6)},sw=function(t){return 1-Math.cos(t*Math.PI/2)},sE=function(t){return 1-Math.sqrt(1-t*t)},sk=function(t){return t*t*(3*t-2)},sM=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)},sS=function(t,e){void 0===e&&(e=[]);var n=eT(e,2),r=n[0],i=n[1],o=se(Number(void 0===r?1:r),1,10),a=se(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=eT(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=se(o,.1,1e3),l=se(l,.1,1e3),u=se(u,.1,1e3),f=se(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},sP=function(t,e){void 0===e&&(e=[]);var n=eT(e,2),r=n[0],i=void 0===r?10:r;return("start"==n[1]?Math.ceil:Math.floor)(se(t,0,1)*i)/i},sj=function(t,e){void 0===e&&(e=[]);var n=eT(e,4);return sg(n[0],n[1],n[2],n[3])(t)},sA=sg(.42,0,1,1),sT=function(t){return function(e,n,r){return void 0===n&&(n=[]),1-t(1-e,n,r)}},sC=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}},sN=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}},sL={steps:sP,"step-start":function(t){return sP(t,[1,"start"])},"step-end":function(t){return sP(t,[1,"end"])},linear:function(t){return t},"cubic-bezier":sj,ease:function(t){return sj(t,[.25,.1,.25,1])},in:sA,out:sT(sA),"in-out":sC(sA),"out-in":sN(sA),"in-quad":sm,"out-quad":sT(sm),"in-out-quad":sC(sm),"out-in-quad":sN(sm),"in-cubic":sv,"out-cubic":sT(sv),"in-out-cubic":sC(sv),"out-in-cubic":sN(sv),"in-quart":sb,"out-quart":sT(sb),"in-out-quart":sC(sb),"out-in-quart":sN(sb),"in-quint":sx,"out-quint":sT(sx),"in-out-quint":sC(sx),"out-in-quint":sN(sx),"in-expo":sO,"out-expo":sT(sO),"in-out-expo":sC(sO),"out-in-expo":sN(sO),"in-sine":sw,"out-sine":sT(sw),"in-out-sine":sC(sw),"out-in-sine":sN(sw),"in-circ":sE,"out-circ":sT(sE),"in-out-circ":sC(sE),"out-in-circ":sN(sE),"in-back":sk,"out-back":sT(sk),"in-out-back":sC(sk),"out-in-back":sN(sk),"in-bounce":sM,"out-bounce":sT(sM),"in-out-bounce":sC(sM),"out-in-bounce":sN(sM),"in-elastic":sS,"out-elastic":sT(sS),"in-out-elastic":sC(sS),"out-in-elastic":sN(sS),spring:s_,"spring-in":s_,"spring-out":sT(s_),"spring-in-out":sC(s_),"spring-out-in":sN(s_)},sI=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()},sR=function(t){return t};function sD(t,e){return function(n){if(n>=1)return 1;var r=1/t;return(n+=e*r)-n%r}}var sF="\\s*(-?\\d+\\.?\\d*|-?\\.\\d+)\\s*",sB=RegExp("cubic-bezier\\("+sF+","+sF+","+sF+","+sF+"\\)"),sz=/steps\(\s*(\d+)\s*\)/,sW=/steps\(\s*(\d+)\s*,\s*(start|middle|end)\s*\)/;function s$(t){var e=sB.exec(t);if(e)return sg.apply(void 0,eN([],eT(e.slice(1).map(Number)),!1));var n=sz.exec(t);if(n)return sD(Number(n[1]),0);var r=sW.exec(t);return r?sD(Number(r[1]),{start:1,middle:.5,end:0}[r[2]]):sL[sI(t)]||sL.linear}function sG(t){return"offset"!==t&&"easing"!==t&&"composite"!==t&&"computedOffset"!==t}var sH=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!lf.enableCSSParsing&&sr(i)?i:n(i)}},sV=function(){function t(){this.delay=0,this.direction="normal",this.duration="auto",this._easing="linear",this.easingFunction=sR,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=s$(t),this._easing=t},enumerable:!1,configurable:!0}),t}();function sU(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(si(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(!si(l)&&!si(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 sq="backwards|forwards|both|none".split("|"),sY="reverse|alternate|alternate-reverse".split("|"),sX=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 sV,"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===sq.indexOf(l[t])||("direction"!==t||-1!==sY.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=sU(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=o6[t];if(i&&i.syntax&&i.int){var o=lf.styleValueRegistry.getPropertySyntax(i.syntax);if(o){var a=void 0,l=void 0;if(lf.enableCSSParsing){var s=lf.styleValueRegistry.parseProperty(t,e,r,!1),u=lf.styleValueRegistry.parseProperty(t,n,r,!1);a=lf.styleValueRegistry.computeProperty(t,s,r,!1),l=lf.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=sH.apply(void 0,eN([],eT(f),!1));return function(t){return 0===t?e:1===t?n:p(t)}}}}return sH(!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(sG(i)){var o={offset:t[r].offset,computedOffset:t[r].computedOffset,easing:t[r].easing,easingFunction:s$(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)sG(n)&&t.setAttribute(n,null)});var g=lf.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=sU(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 sK(t,e){return Number(t.id)-Number(e.id)}var sZ=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(sK),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 sl(new sX(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(sK),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,eN([],eT(a),!1)),(i=this.pendingEffects).push.apply(i,eN([],eT(l),!1)),this.ticking&&this.requestAnimationFrame(function(){}),this.inTick=!1,[s,u]},t}();lf.EasingFunction=s$,lf.AnimationTimeline=sZ;class sQ extends Map{constructor(t,e=s0){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(let[e,n]of t)this.set(e,n)}get(t){return super.get(sJ(this,t))}has(t){return super.has(sJ(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 sJ({_intern:t,_key:e},n){let r=e(n);return t.has(r)?t.get(r):n}function s0(t){return null!==t&&"object"==typeof t?t.valueOf():t}function s1(t){return t}function s2(t,...e){return s6(t,s1,s1,e)}function s5(t,...e){return s6(t,Array.from,s1,e)}function s3(t,e,...n){return s6(t,s1,e,n)}function s4(t,e,...n){return s6(t,Array.from,e,n)}function s6(t,e,n,r){return function t(i,o){if(o>=r.length)return n(i);let a=new sQ,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 s8=function(t){return null==t},s9=function(t){return s8(t)?"":t.toString()},s7=function(t){var e=s9(t);return e.charAt(0).toLowerCase()+e.substring(1)};function ut(t){return t}function ue(t){return t.reduce((t,e)=>(n,...r)=>e(t(n,...r),...r),ut)}function un(t){return t.replace(/( |^)[a-z]/g,t=>t.toUpperCase())}function ur(t=""){throw Error(t)}function ui(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 uo(t){return null!=t&&!Number.isNaN(t)}function ua(t,e){return ul(t,e)||{}}function ul(t,e){let n=Object.entries(t||{}).filter(([t])=>t.startsWith(e)).map(([t,n])=>[s7(t.replace(e,"").trim()),n]).filter(([t])=>!!t);return 0===n.length?null:Object.fromEntries(n)}function us(t,...e){return Object.fromEntries(Object.entries(t).filter(([t])=>e.every(e=>!t.startsWith(e))))}function uu(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 uc(t){return"object"==typeof t&&!(t instanceof Date)&&null!==t&&!Array.isArray(t)}function uf(t){return null===t||!1===t}function up(t){return new uh([t],null,t,t.ownerDocument)}class uh{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 uh("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 uh(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 uh([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 uh(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 uh(n,null,n[0],this._document)}maybeAppend(t,e,n){let r=this._elements[0],i=r.getElementById(t);if(i)return new uh([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 uh([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=s2(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 uh([],r,this._parent,this._document),new uh(i,null,this._parent,this._document),new uh(o,null,this._parent,this._document),new uh([],a,this._parent,this._document),new uh(l,null,this._parent,this._document)];return new uh(this._elements,null,this._parent,this._document,f)}merge(t){let e=[...this._elements,...t._elements],n=[...this._transitions,...t._transitions];return new uh(e,null,this._parent,this._document,void 0,n)}createElement(t){if(this._document)return this._document.createElement(t,{});let e=uh.registry[t];return e?new e:ur(`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 uh([],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 ud([t,e],[n,r]){return[t-n,e-r]}function uy([t,e],[n,r]){return Math.sqrt(Math.pow(t-n,2)+Math.pow(e-r,2))}function ug([t,e]){return Math.atan2(e,t)}function um([t,e]){return ug([t,e])+Math.PI/2}function uv(t,e){let n=ug(t),r=ug(e);return n<r?r-n:2*Math.PI-(n-r)}function ub(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 ux([t,e],[n,r]){return[(t+n)/2,(e+r)/2]}function uO(t,e,n){return Math.max(e,Math.min(t,n))}function uw(t,e=10){return"number"!=typeof t||1e-15>Math.abs(t)?t:parseFloat(t.toFixed(e))}uh.registry={g:lT,rect:lF,circle:lP,path:lI,text:lB,ellipse:lA,image:lN,line:lL,polygon:lR,polyline:lD,html:lC};var uE={}.toString,uk=function(t,e){return uE.call(t)==="[object "+e+"]"},uM=function(t){return Array.isArray?Array.isArray(t):uk(t,"Array")},uS=function(t){var e=typeof t;return null!==t&&"object"===e||"function"===e},u_=function(t,e){if(t){if(uM(t))for(var n,r=0,i=t.length;r<i&&!1!==e(t[r],r);r++);else if(uS(t)){for(var o in t)if(t.hasOwnProperty(o)&&!1===e(t[o],o))break}}},uP=function(t){return uk(t,"Function")},uj=Array.prototype;uj.splice,uj.indexOf,Array.prototype.splice,Object.prototype.hasOwnProperty;var uA=function(t){return uk(t,"Number")},uT=Object.values?function(t){return Object.values(t)}:function(t){var e=[];return u_(t,function(n,r){uP(t)&&"prototype"===r||e.push(n)}),e},uC=function(t){if("object"!=typeof t||null===t||!uk(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},uN=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&&uC(a)?(uC(e[o])||(e[o]={}),r<i?t(e[o],a,r+1,i):e[o]=n[o]):uM(a)?(e[o]=[],e[o]=e[o].concat(a)):void 0!==a&&(e[o]=a)}}(t,e[r]);return t},uL=function(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)},uI=function(t,e){if(!uL(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 uR=function(t){return t};function uD(t){return null==t?0:uL(t)?t.length:Object.keys(t).length}function uF(){this.map={}}!function(t,e){if(!uP(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 M4||(M4=document.createElement("canvas").getContext("2d")),M4.font=[o,a,i,n+"px",r].join(" "),M4.measureText(uk(t,"String")?t:"").width},function(t,e){return void 0===e&&(e={}),eC([t],uT(e)).join("")}),uF.prototype.has=function(t){return void 0!==this.map[t]},uF.prototype.get=function(t,e){var n=this.map[t];return void 0===n?e:n},uF.prototype.set=function(t,e){this.map[t]=e},uF.prototype.clear=function(){this.map={}},uF.prototype.delete=function(t){delete this.map[t]},uF.prototype.size=function(){return Object.keys(this.map).length};class uB{constructor(t){this.options=uN({},this.getDefaultOptions()),this.update(t)}getOptions(){return this.options}update(t={}){this.options=uN({},this.options,t),this.rescale(t)}rescale(t){}}function uz(t,e){return e-t?n=>(n-t)/(e-t):t=>.5}function uW(t,...e){return e.reduce((t,e)=>n=>t(e(n)),t)}function u$(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 uG=n(4254),uH=n.n(uG);function uV(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 uU(t){let e=uH().get(t);if(!e)return null;let{model:n,value:r}=e;return"rgb"===n?r:"hsl"===n?function(t){let e=t[0]/360,n=t[1]/100,r=t[2]/100,i=t[3];if(0===n)return[255*r,255*r,255*r,i];let o=r<.5?r*(1+n):r+n-r*n,a=2*r-o,l=uV(a,o,e+1/3);return[255*l,255*uV(a,o,e),255*uV(a,o,e-1/3),i]}(r):null}let uq=(t,e)=>n=>t*(1-n)+e*n,uY=(t,e)=>{let n=uU(t),r=uU(e);return null===n||null===r?n?()=>t:()=>e:t=>{let e=[,,,,];for(let i=0;i<4;i+=1){let o=n[i],a=r[i];e[i]=o*(1-t)+a*t}let[i,o,a,l]=e;return`rgba(${Math.round(i)}, ${Math.round(o)}, ${Math.round(a)}, ${l})`}},uX=(t,e)=>"number"==typeof t&&"number"==typeof e?uq(t,e):"string"==typeof t&&"string"==typeof e?uY(t,e):()=>t,uK=(t,e)=>{let n=uq(t,e);return t=>Math.round(n(t))};function uZ(t){return null!=t&&!Number.isNaN(t)}let uQ=Math.sqrt(50),uJ=Math.sqrt(10),u0=Math.sqrt(2);function u1(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>=uQ?10:o>=uJ?5:o>=u0?2:1)*10**i:-(10**-i)/(o>=uQ?10:o>=uJ?5:o>=u0?2:1)}function u2(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>=uQ?i*=10:o>=uJ?i*=5:o>=u0&&(i*=2),e<t?-i:i}let u5=(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=u1(l,s,n))>0?r=u1(l=Math.floor(l/r)*r,s=Math.ceil(s/r)*r,n):r<0&&(r=u1(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},u3=(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)),uW(i,r)},u4=(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=u$(t,e,1,r)-1,a=i[n];return uW(o[n],a)(e)}},u6=(t,e,n,r)=>(Math.min(t.length,e.length)>2?u4:u3)(t,e,r?uK:n);class u8 extends uB{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:uq,tickCount:5}}map(t){return uZ(t)?this.output(t):this.options.unknown}invert(t){return uZ(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 u5}rescale(){this.nice();let[t,e]=this.chooseTransforms();this.composeOutput(t,this.chooseClamp(t)),this.composeInput(t,e,this.chooseClamp(e))}chooseClamp(t){let{clamp:e,range:n}=this.options,r=this.options.domain.map(t),i=Math.min(r.length,n.length);return e?function(t,e){let n=e<t?e:t,r=t>e?t:e;return t=>Math.min(Math.max(n,t),r)}(r[0],r[i-1]):uR}composeOutput(t,e){let{domain:n,range:r,round:i,interpolate:o}=this.options,a=u6(n.map(t),r,o,i);this.output=uW(a,e,t)}composeInput(t,e,n){let{domain:r,range:i}=this.options,o=u6(i,r.map(t),uq);this.input=uW(e,n,o)}}let u9=(t,e,n)=>{let r,i,o=t,a=e;if(o===a&&n>0)return[o];let l=u1(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 u7 extends u8{getDefaultOptions(){return{domain:[0,1],range:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolate:uX,tickMethod:u9,tickCount:5}}chooseTransforms(){return[uR,uR]}clone(){return new u7(this.options)}}var ct=function(t){return tB(t,"Number")};function ce(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 cn(t,e){return Object.entries(t).reduce((n,[r,i])=>(n[r]=e(i,r,t),n),{})}function cr(t){return t.map((t,e)=>e)}function ci(t){return t[t.length-1]}function co(t,e){let n=[[],[]];return t.forEach(t=>{n[+!e(t)].push(t)}),n}function ca(t,e){for(let[n,r]of Object.entries(e))t.style(n,r)}function cl(t,e,n,r,i){let o=ug(ud(r,e))+Math.PI,a=ug(ud(r,n))+Math.PI;return t.arc(r[0],r[1],i,o,a,a-o<0),t}function cs(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=cr(a),[u,c]=ce(s,t=>a[t]),f=new u7({domain:[u,c],range:[0,100]}),p=t=>ct(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 cu(t){let[e,n,r,i]=t;return[i,e,n,r]}function cc(t,e,n){let[r,i,,o]=ey(t)?cu(e):e,[a,l]=n,s=t.getCenter(),u=um(ud(r,s)),c=um(ud(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:uy(o,s),outerRadius:uy(r,s)}}function cf(t){let{colorAttribute:e,opacityAttribute:n=e}=t;return`${n}Opacity`}function cp(t,e){if(!eg(t))return"";let n=t.getCenter(),{transform:r}=e;return`translate(${n[0]}, ${n[1]}) ${r||""}`}function ch(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 cd=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 cy(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=cd(i,["inset","radius","insetLeft","insetTop","insetRight","insetBottom","radiusBottomLeft","radiusBottomRight","radiusTopLeft","radiusTopRight","minWidth","maxWidth","minHeight"]);if(!eg(r)&&!ev(r)){let n=!!ey(r),[i,,o]=n?cu(e):e,[a,x]=i,[O,w]=ud(o,i),E=Math.abs(O),k=Math.abs(w),M=(O>0?a:a+O)+l,S=(w>0?x:x+w)+s,_=E-(l+u),P=k-(s+c),j=n?uO(_,v,1/0):uO(_,y,g),A=n?uO(P,y,g):uO(P,v,1/0),T=n?M:M-(j-_)/2,C=n?S-(A-P)/2:S-(A-P);return up(t.createElement("rect",{})).style("x",T).style("y",C).style("width",j).style("height",A).style("radius",[h,d,p,f]).call(ca,b).node()}let{y:x,y1:O}=n,w=r.getCenter(),E=cc(r,e,[x,O]),k=ed().cornerRadius(a).padAngle(o*Math.PI/180);return up(t.createElement("path",{})).style("path",k(E)).style("transform",`translate(${w[0]}, ${w[1]})`).style("radius",a).style("inset",o).call(ca,b).node()}let cg=(t,e)=>{let{colorAttribute:n,opacityAttribute:r="fill",first:i=!0,last:o=!0}=t,a=cd(t,["colorAttribute","opacityAttribute","first","last"]),{coordinate:l,document:s}=e;return(e,r,u)=>{let{color:c,radius:f=0}=u,p=cd(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:S="stroke"===n||d?h:0,inset:_=0,insetLeft:P=_,insetRight:j=_,insetBottom:A=_,insetTop:T=_,minWidth:C,maxWidth:N,minHeight:L}=a,I=cd(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],B=["radiusTopLeft","radiusTopRight","radiusBottomRight","radiusBottomLeft"];ey(l)&&B.push(B.shift());let z=Object.assign(Object.assign({radius:y},Object.fromEntries(B.map((t,e)=>[t,F[e]]))),{inset:_,insetLeft:P,insetRight:j,insetBottom:A,insetTop:T,minWidth:C,maxWidth:N,minHeight:L});return up(cy(s,e,r,l,z)).call(ca,p).style("fill","transparent").style(n,R).style(cf(t),D).style("lineWidth",S).style("stroke",void 0===d?R:d).call(ca,I).node()}};cg.props={defaultEnterAnimation:"scaleInY",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let cm=(t,e)=>cg(Object.assign({colorAttribute:"fill"},t),e);cm.props=Object.assign(Object.assign({},cg.props),{defaultMarker:"square"});let cv=(t,e)=>cg(Object.assign({colorAttribute:"stroke"},t),e);function cb(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function cx(t){this._context=t}function cO(t){return new cx(t)}function cw(t){return t[0]}function cE(t){return t[1]}function ck(t,e){var n=tJ(!0),r=null,i=cO,o=null,a=el(l);function l(l){var s,u,c,f=(l=cb(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?cw:tJ(t),e="function"==typeof e?e:void 0===e?cE:tJ(e),l.x=function(e){return arguments.length?(t="function"==typeof e?e:tJ(+e),l):t},l.y=function(t){return arguments.length?(e="function"==typeof t?t:tJ(+t),l):e},l.defined=function(t){return arguments.length?(n="function"==typeof t?t:tJ(!!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 cM(){}function cS(t){this._context=t}function c_(t){return new cS(t)}cv.props=Object.assign(Object.assign({},cg.props),{defaultMarker:"hollowSquare"}),Array.prototype.slice,cx.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)}}},cS.prototype={areaStart:cM,areaEnd:cM,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 cP=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 cj(t,e,n){let[r,i,o,a]=t;return ey(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 cA=(t,e)=>{let{adjustPoints:n=cj}=t,r=cP(t,["adjustPoints"]),{coordinate:i,document:o}=e;return(t,e,a,l)=>{let{index:s}=e,{color:u}=a,c=cP(a,["color"]),f=n(t,l[s+1],i),[p,h,d,y]=ey(i)?cu(f):f,{color:g=u,opacity:v}=e,b=ck().curve(c_)([p,h,d,y]);return up(o.createElement("path",{})).call(ca,c).style("path",b).style("fill",g).style("fillOpacity",v).call(ca,r).node()}};function cT(t,e,n){let[r,i,o,a]=t;return ey(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]}cA.props={defaultMarker:"square"};let cC=(t,e)=>cA(Object.assign({adjustPoints:cT},t),e);function cN(t){return Math.abs(t)>10?String(t):t.toString().padStart(2,"0")}cC.props={defaultMarker:"square"};let cL=(t={})=>{let{channel:e="x"}=t;return(t,n)=>{let{encode:r}=n,{tooltip:i}=n;if(uf(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=>tY(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=cN(t.getMonth()+1),r=cN(t.getDate()),i=`${e}-${n}-${r}`,o=t.getHours(),a=t.getMinutes(),l=t.getSeconds();return o||a||l?`${i} ${cN(o)}:${cN(a)}:${cN(l)}`:i}(t[e]):t[e]).join(", ")};return[t,tG({},n,{tooltip:{title:l}})]}};cL.props={};let cI=t=>{let{channel:e}=t;return(t,n)=>{let{encode:r,tooltip:i}=n;if(uf(i))return[t,n];let{items:o=[]}=i;return!o||o.length>0?[t,n]:[t,tG({},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))}})]}};cI.props={};var cR=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 cD=()=>(t,e)=>{let{encode:n}=e,{key:r}=n,i=cR(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,tG({},e,{encode:{key:tH(a)}})]};function cF(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 cB(t={}){return[...cF(t),{name:"title",scale:"identity"}]}function cz(){return[{type:cL,channel:"color"},{type:cI,channel:["x","y"]}]}function cW(){return[{type:cL,channel:"x"},{type:cI,channel:["y"]}]}function c$(t={}){return cF(t)}function cG(){return[{type:cD}]}cD.props={};function cH(t,e){return t.getBandWidth(t.invert(e))}function cV(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?cH(a,r[e]):0,u=h?cH(l,i[e]):0,y=d&&o?(cH(s,o[e])/2+ +o[e])*n:0,[g,v]=t;return[g+c*n+y,v+f*u]}:t=>t}function cU(t){return parseFloat(t)/100}function cq(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?cU(e)*a:+e,"string"==typeof n?cU(n)*l:+n]]});return[t,s]}function cY(t){return"function"==typeof t?t:e=>e[t]}function cX(t,e){return Array.from(t,cY(e))}function cK(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=cX(o,n),s=cX(o,r),u=cX(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 cZ(t,e){return t.getBandWidth(t.invert(e))}let cQ={rect:cm,hollow:cv,funnel:cA,pyramid:cC},cJ=()=>(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=cZ(u,i[t]),n=c?cZ(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]};cJ.props={defaultShape:"rect",defaultLabelShape:"label",composite:!1,shape:cQ,channels:[...cB({shapes:Object.keys(cQ)}),{name:"x",scale:"band",required:!0},{name:"y",required:!0},{name:"series",scale:"band"},{name:"size"}],preInference:[...cG(),{type:tZ},{type:tQ}],postInference:[...cW()],interaction:{shareTooltip:!0}};let c0={rect:cm,hollow:cv},c1=()=>(t,e,n,r)=>{let{x:i,x1:o,y:a,y1:l}=n,s=Array.from(t,t=>{let e=[+i[t],+a[t]],n=[+o[t],+a[t]];return[e,n,[+o[t],+l[t]],[+i[t],+l[t]]].map(t=>r.map(t))});return[t,s]};c1.props={defaultShape:"rect",defaultLabelShape:"label",composite:!1,shape:c0,channels:[...cB({shapes:Object.keys(c0)}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...cG(),{type:tZ}],postInference:[...cW()],interaction:{shareTooltip:!0}};var c2=c3(cO);function c5(t){this._curve=t}function c3(t){function e(e){return new c5(t(e))}return e._curve=t,e}function c4(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(c3(t)):e()._curve},t}function c6(t){let e="function"==typeof t?t:t.render;return class extends lj{connectedCallback(){this.draw()}attributeChangedCallback(){this.draw()}draw(){e(this)}}}c5.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 c8=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 c9=c6(t=>{let{d1:e,d2:n,style1:r,style2:i}=t.attributes,o=t.ownerDocument;up(t).maybeAppend("line",()=>o.createElement("path",{})).style("d",e).call(ca,r),up(t).maybeAppend("line1",()=>o.createElement("path",{})).style("d",n).call(ca,i)}),c7=(t,e)=>{let{curve:n,gradient:r=!1,gradientColor:i="between",defined:o=t=>!Number.isNaN(t)&&null!=t,connect:a=!1}=t,l=c8(t,["curve","gradient","gradientColor","defined","connect"]),{coordinate:s,document:u}=e;return(t,e,c)=>{let f,{color:p,lineWidth:h}=c,d=c8(c,["color","lineWidth"]),{color:y=p,size:g=h,seriesColor:v,seriesX:b,seriesY:x}=e,O=cp(s,e),w=ey(s),E=r&&v?cs(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(eg(s)){let t=s.getCenter();f=e=>c4(ck().curve(c2)).angle((n,r)=>um(ud(e[r],t))).radius((n,r)=>uy(e[r],t)).defined(([t,e])=>o(t)&&o(e)).curve(n)(e)}else f=ck().x(t=>t[0]).y(t=>t[1]).defined(([t,e])=>o(t)&&o(e)).curve(n);let[M,S]=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),_=ua(k,"connect"),P=!!S.length;return P&&(!a||Object.keys(_).length)?P&&!a?up(u.createElement("path",{})).style("d",f(t)).call(ca,k).node():up(new c9).style("style1",Object.assign(Object.assign({},k),_)).style("style2",k).style("d1",S.map(f).join(",")).style("d2",f(t)).node():up(u.createElement("path",{})).style("d",f(M)||[]).call(ca,k).node()}};c7.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let ft=(t,e)=>{let{coordinate:n}=e;return(...r)=>c7(Object.assign({curve:eg(n)?c_:cO},t),e)(...r)};function fe(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 fn(t,e){this._context=t,this._k=(1-e)/6}function fr(t,e){this._context=t,this._k=(1-e)/6}function fi(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 fo(t,e){this._context=t,this._alpha=e}function fa(t,e){this._context=t,this._alpha=e}ft.props=Object.assign(Object.assign({},c7.props),{defaultMarker:"line"}),fn.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:fe(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:fe(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 fn(t,e)}return n.tension=function(e){return t(+e)},n}(0),fr.prototype={areaStart:cM,areaEnd:cM,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:fe(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 fr(t,e)}return n.tension=function(e){return t(+e)},n}(0),fo.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:fi(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 fo(t,e):new fn(t,0)}return n.alpha=function(e){return t(+e)},n}(.5),fa.prototype={areaStart:cM,areaEnd:cM,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:fi(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 fl=function t(e){function n(t){return e?new fa(t,e):new fr(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function fs(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 fu(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function fc(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 ff(t){this._context=t}function fp(t){this._context=new fh(t)}function fh(t){this._context=t}function fd(t){return new ff(t)}function fy(t){return new fp(t)}ff.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:fc(this,this._t0,fu(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,fc(this,fu(this,n=fs(this,t,e)),n);break;default:fc(this,this._t0,n=fs(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}},(fp.prototype=Object.create(ff.prototype)).point=function(t,e){ff.prototype.point.call(this,e,t)},fh.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 fg=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 fm=(t,e)=>{let n=fg(t,[]),{coordinate:r}=e;return(...t)=>c7(Object.assign({curve:eg(r)?fl:ey(r)?fy:fd},n),e)(...t)};function fv(t,e){this._context=t,this._t=e}function fb(t){return new fv(t,.5)}function fx(t){return new fv(t,0)}function fO(t){return new fv(t,1)}fm.props=Object.assign(Object.assign({},c7.props),{defaultMarker:"smooth"}),fv.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 fw=(t,e)=>c7(Object.assign({curve:fO},t),e);fw.props=Object.assign(Object.assign({},c7.props),{defaultMarker:"hv"});let fE=(t,e)=>c7(Object.assign({curve:fx},t),e);fE.props=Object.assign(Object.assign({},c7.props),{defaultMarker:"vh"});let fk=(t,e)=>c7(Object.assign({curve:fb},t),e);fk.props=Object.assign(Object.assign({},c7.props),{defaultMarker:"hvh"});var fM=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 fS=(t,e)=>{let{document:n}=e;return(e,r,i)=>{let{seriesSize:o,color:a}=r,{color:l}=i,s=fM(i,["color"]),u=ea();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(uo)&&function(t,e,n,r,i){let o=ug(ud(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=ud(d,s),g=ud(n,s),v=ud(e,l),b=ud(v,c),x=ud(e,c),O=ud(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 up(n.createElement("path",{})).call(ca,s).style("fill",a||l).style("d",u.toString()).call(ca,t).node()}};fS.props=Object.assign(Object.assign({},c7.props),{defaultMarker:"line"});let f_=()=>(t,e)=>{let{style:n={},encode:r}=e,{series:i}=r,{gradient:o}=n;return!o||i?[t,e]:[t,tG({},e,{encode:{series:tU(tq(t,void 0))}})]};f_.props={};let fP=()=>(t,e)=>{let{encode:n}=e,{series:r,color:i}=n;if(void 0!==r||void 0===i)return[t,e];let[o,a]=tY(n,"color");return[t,tG({},e,{encode:{series:tH(o,a)}})]};fP.props={};let fj={line:ft,smooth:fm,hv:fw,vh:fE,hvh:fk,trail:fS},fA=(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(s2(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]},fT=(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]},fC=()=>(t,e,n,r)=>(eb(r)?fT:fA)(t,e,n,r);fC.props={defaultShape:"line",defaultLabelShape:"label",composite:!1,shape:fj,channels:[...cB({shapes:Object.keys(fj)}),{name:"x"},{name:"y"},{name:"position",independent:!0},{name:"size"},{name:"series",scale:"band"}],preInference:[...cG(),{type:f_},{type:fP}],postInference:[...cW(),{type:cL,channel:"color"},{type:cI,channel:["position"]}],interaction:{shareTooltip:!0,seriesTooltip:!0,crosshairs:!0}};var fN=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 fL=(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"]];fL.style=["fill"];let fI=fL.bind(void 0);fI.style=["stroke","lineWidth"];let fR=(t,e,n)=>[["M",t-n,e-n],["L",t+n,e-n],["L",t+n,e+n],["L",t-n,e+n],["Z"]];fR.style=["fill"];let fD=fR.bind(void 0);fD.style=["fill"];let fF=fR.bind(void 0);fF.style=["stroke","lineWidth"];let fB=(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"]]};fB.style=["fill"];let fz=fB.bind(void 0);fz.style=["stroke","lineWidth"];let fW=(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"]]};fW.style=["fill"];let f$=fW.bind(void 0);f$.style=["stroke","lineWidth"];let fG=(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"]]};fG.style=["fill"];let fH=fG.bind(void 0);fH.style=["stroke","lineWidth"];let fV=(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"]]};fV.style=["fill"];let fU=fV.bind(void 0);fU.style=["stroke","lineWidth"];let fq=(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"]]};fq.style=["fill"];let fY=fq.bind(void 0);fY.style=["stroke","lineWidth"];let fX=(t,e,n)=>[["M",t,e+n],["L",t,e-n]];fX.style=["stroke","lineWidth"];let fK=(t,e,n)=>[["M",t-n,e-n],["L",t+n,e+n],["M",t+n,e-n],["L",t-n,e+n]];fK.style=["stroke","lineWidth"];let fZ=(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]];fZ.style=["stroke","lineWidth"];let fQ=(t,e,n)=>[["M",t-n,e],["L",t+n,e],["M",t,e-n],["L",t,e+n]];fQ.style=["stroke","lineWidth"];let fJ=(t,e,n)=>[["M",t-n,e],["L",t+n,e]];fJ.style=["stroke","lineWidth"];let f0=(t,e,n)=>[["M",t-n,e],["L",t+n,e]];f0.style=["stroke","lineWidth"];let f1=f0.bind(void 0);f1.style=["stroke","lineWidth"];let f2=(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]];f2.style=["stroke","lineWidth"];let f5=(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]];f5.style=["stroke","lineWidth"];let f3=(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]];f3.style=["stroke","lineWidth"];let f4=(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]];f4.style=["stroke","lineWidth"];let f6=(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]];f6.style=["stroke","lineWidth"];let f8=new Map([["bowtie",fq],["cross",fK],["dash",f1],["diamond",fB],["dot",f0],["hexagon",fV],["hollowBowtie",fY],["hollowDiamond",fz],["hollowHexagon",fU],["hollowPoint",fI],["hollowSquare",fF],["hollowTriangle",f$],["hollowTriangleDown",fH],["hv",f5],["hvh",f4],["hyphen",fJ],["line",fX],["plus",fQ],["point",fL],["rect",fD],["smooth",f2],["square",fR],["tick",fZ],["triangleDown",fG],["triangle",fW],["vh",f3],["vhv",f6]]);var f9=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 f7=(t,e)=>{let{colorAttribute:n,symbol:r,mode:i="auto"}=t,o=f9(t,["colorAttribute","symbol","mode"]),a=f8.get(r)||f8.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]=ch(e),b=function(t,e,n,r){if(1===e.length)return;let{size:i}=n;if("fixed"===t)return i;if("normal"===t||ex(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 up(s.createElement("path",{})).call(ca,u).style("fill","transparent").style("d",a(g,v,b)).style("lineWidth",p).style("transform",d).style("stroke",h).style(cf(t),y).style(n,h).call(ca,o).node()}};f7.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let pt=(t,e)=>f7(Object.assign({colorAttribute:"stroke",symbol:"point"},t),e);pt.props=Object.assign({defaultMarker:"hollowPoint"},f7.props);let pe=(t,e)=>f7(Object.assign({colorAttribute:"stroke",symbol:"diamond"},t),e);pe.props=Object.assign({defaultMarker:"hollowDiamond"},f7.props);let pn=(t,e)=>f7(Object.assign({colorAttribute:"stroke",symbol:"hexagon"},t),e);pn.props=Object.assign({defaultMarker:"hollowHexagon"},f7.props);let pr=(t,e)=>f7(Object.assign({colorAttribute:"stroke",symbol:"square"},t),e);pr.props=Object.assign({defaultMarker:"hollowSquare"},f7.props);let pi=(t,e)=>f7(Object.assign({colorAttribute:"stroke",symbol:"triangle-down"},t),e);pi.props=Object.assign({defaultMarker:"hollowTriangleDown"},f7.props);let po=(t,e)=>f7(Object.assign({colorAttribute:"stroke",symbol:"triangle"},t),e);po.props=Object.assign({defaultMarker:"hollowTriangle"},f7.props);let pa=(t,e)=>f7(Object.assign({colorAttribute:"stroke",symbol:"bowtie"},t),e);pa.props=Object.assign({defaultMarker:"hollowBowtie"},f7.props);let pl=(t,e)=>f7(Object.assign({colorAttribute:"fill",symbol:"point"},t),e);pl.props=Object.assign({defaultMarker:"point"},f7.props);let ps=(t,e)=>f7(Object.assign({colorAttribute:"stroke",symbol:"plus"},t),e);ps.props=Object.assign({defaultMarker:"plus"},f7.props);let pu=(t,e)=>f7(Object.assign({colorAttribute:"fill",symbol:"diamond"},t),e);pu.props=Object.assign({defaultMarker:"diamond"},f7.props);let pc=(t,e)=>f7(Object.assign({colorAttribute:"fill",symbol:"square"},t),e);pc.props=Object.assign({defaultMarker:"square"},f7.props);let pf=(t,e)=>f7(Object.assign({colorAttribute:"fill",symbol:"triangle"},t),e);pf.props=Object.assign({defaultMarker:"triangle"},f7.props);let pp=(t,e)=>f7(Object.assign({colorAttribute:"fill",symbol:"hexagon"},t),e);pp.props=Object.assign({defaultMarker:"hexagon"},f7.props);let ph=(t,e)=>f7(Object.assign({colorAttribute:"stroke",symbol:"cross"},t),e);ph.props=Object.assign({defaultMarker:"cross"},f7.props);let pd=(t,e)=>f7(Object.assign({colorAttribute:"fill",symbol:"bowtie"},t),e);pd.props=Object.assign({defaultMarker:"bowtie"},f7.props);let py=(t,e)=>f7(Object.assign({colorAttribute:"stroke",symbol:"hyphen"},t),e);py.props=Object.assign({defaultMarker:"hyphen"},f7.props);let pg=(t,e)=>f7(Object.assign({colorAttribute:"stroke",symbol:"line"},t),e);pg.props=Object.assign({defaultMarker:"line"},f7.props);let pm=(t,e)=>f7(Object.assign({colorAttribute:"stroke",symbol:"tick"},t),e);pm.props=Object.assign({defaultMarker:"tick"},f7.props);let pv=(t,e)=>f7(Object.assign({colorAttribute:"fill",symbol:"triangle-down"},t),e);pv.props=Object.assign({defaultMarker:"triangleDown"},f7.props);let pb=()=>(t,e)=>{let{encode:n}=e,{y:r}=n;return void 0!==r?[t,e]:[t,tG({},e,{encode:{y:tV(tq(t,0))},scale:{y:{guide:null}}})]};pb.props={};let px=()=>(t,e)=>{let{encode:n}=e,{size:r}=n;return void 0!==r?[t,e]:[t,tG({},e,{encode:{size:tU(tq(t,3))}})]};px.props={};let pO={hollow:pt,hollowDiamond:pe,hollowHexagon:pn,hollowSquare:pr,hollowTriangleDown:pi,hollowTriangle:po,hollowBowtie:pa,point:pl,plus:ps,diamond:pu,square:pc,triangle:pf,hexagon:pp,cross:ph,bowtie:pd,hyphen:py,line:pg,tick:pm,triangleDown:pv},pw=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=cV(n,r,t),y=t=>{let e=+((null==c?void 0:c[t])||0),n=+((null==f?void 0:f[t])||0),r=l?(+o[t]+ +l[t])/2:+o[t];return[r+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]};pw.props={defaultShape:"hollow",defaultLabelShape:"label",composite:!1,shape:pO,channels:[...cB({shapes:Object.keys(pO)}),{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:[...cG(),{type:tQ},{type:pb}],postInference:[{type:px},...cz()]};var pE=function(t){return"function"==typeof t};function pk(t){pS(t,!0)}function pM(t){pS(t,!1)}function pS(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 p_=function(t){return"object"==typeof t&&null!==t},pP={}.toString,pj=function(t,e){return pP.call(t)==="[object "+e+"]"},pA=function(t){if(!p_(t)||!pj(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},pT=function(t){return Array.isArray?Array.isArray(t):pj(t,"Array")},pC=function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=5),Object.entries(e).forEach(function(i){var o=eT(i,2),a=o[0],l=o[1];Object.prototype.hasOwnProperty.call(e,a)&&(l?pA(l)?(pA(t[a])||(t[a]={}),n<r?pC(t[a],l,n+1,r):t[a]=e[a]):pT(l)?(t[a]=[],t[a]=t[a].concat(l)):t[a]=l:t[a]=l)})},pN=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)pC(t,e[r]);return t},pL=function(t){function e(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=t.apply(this,eN([],eT(e),!1))||this;return r.addEventListener(M1.INSERTED,function(){pM(r)}),r}return eM(e,t),e}(lT);function pI(t){var e=t.appendChild(new pL({class:"offscreen"}));return pM(e),e}function pR(){pS(this,"hidden"!==this.attributes.visibility)}var pD=function(t){function e(e,n){void 0===n&&(n={});var r=t.call(this,pN({},{style:n},e))||this;return r.initialized=!1,r._defaultOptions=n,r}return eM(e,t),Object.defineProperty(e.prototype,"offscreenGroup",{get:function(){return this._offscreen||(this._offscreen=pI(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&&pR.call(this)},e.prototype.update=function(t,e){var n;return this.attr(pN({},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}(lj);function pF(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 pB=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=e_(e,["style"]);return t.call(this,eS({style:eS({text:"",fill:"black",fontFamily:"sans-serif",fontSize:16,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",lineWidth:1,textAlign:"start",textBaseline:"middle"},n)},r))||this}return eM(e,t),Object.defineProperty(e.prototype,"offscreenGroup",{get:function(){return this._offscreen||(this._offscreen=pI(this)),this._offscreen},enumerable:!1,configurable:!0}),e.prototype.disconnectedCallback=function(){var t;null==(t=this._offscreen)||t.destroy()},e}(lB),pz=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=eT(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=eL(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=eL(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=eL(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,eA(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 S=[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,S)},r.prototype.merge=function(t){var n=eN(eN([],eT(this._elements),!1),eT(t._elements),!1),r=eN(eN([],eT(this._transitions),!1),eT(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=eT(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,eN([this._parent,this],eT(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:lT,rect:lF,circle:lP,path:lI,text:pB,ellipse:lA,image:lN,line:lL,polygon:lR,polyline:lD,html:lC},r}();function pW(t){return new pz([t],null,t,t.ownerDocument)}var p$=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"]]},pG=function(t,e,n){return[["M",t,e+n],["L",t,e-n]]},pH=function(t,e,n){return[["M",t-n,e],["L",t+n,e]]},pV=function(t){var e=typeof t;return null!==t&&"object"===e||"function"===e},pU=function(t){return pj(t,"String")},pq=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return eM(e,t),e.prototype.render=function(t,n){var r,i=t.symbol,o=t.size,a=void 0===o?16:o,l=e_(t,["symbol","size"]),s=["base64","url","image"].includes(r=function(t){var e="default";if(pV(t)&&t instanceof Image)e="image";else if(pE(t))e="symbol";else if(pU(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;pF(!!s,pW(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=pE(i)?i:e.getSymbol(i);t.styles(eS({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}(pD);pq.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]]}),pq.registerSymbol("hyphen",function(t,e,n){return[["M",t-n,e],["L",t+n,e]]}),pq.registerSymbol("line",pG),pq.registerSymbol("plus",function(t,e,n){return[["M",t-n,e],["L",t+n,e],["M",t,e-n],["L",t,e+n]]}),pq.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]]}),pq.registerSymbol("circle",p$),pq.registerSymbol("point",p$),pq.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"]]}),pq.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"]]}),pq.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"]]}),pq.registerSymbol("diamond",function(t,e,n){return[["M",t-n,e],["L",t,e-n],["L",t+n,e],["L",t,e+n],["Z"]]}),pq.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"]]}),pq.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"]]}),pq.registerSymbol("line",pG),pq.registerSymbol("dot",pH),pq.registerSymbol("dash",pH),pq.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]]}),pq.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]]}),pq.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]]}),pq.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]]}),pq.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 pY=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 pX=(t,e,n)=>{let r=uy(t,e),i=uy(e,n);return(Math.pow(r,2)+Math.pow(i,2)-Math.pow(uy(n,t),2))/(2*r*i)},pK=c6(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=pY(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=>!ct(t)))return void t.children.forEach(t=>t.remove());let w=ua(O,"background"),{padding:E}=w,k=pY(w,["padding"]),M=ua(O,"connector"),{points:S=[]}=M,_=pY(M,["points"]),P=[[+f,+p],[+u,+c]];e=x?up(t).maybeAppend("html","html",r).style("zIndex",0).style("innerHTML",x).call(ca,Object.assign({transform:l,transformOrigin:s},O)).node():up(t).maybeAppend("text","text").style("zIndex",0).style("text",h).call(ca,Object.assign({textBaseline:"middle",transform:l,transformOrigin:s},O)).node();let j=function(t,e,n,r){let[[i,o],[a,l]]=e,[s,u]=function(t){let{min:[e,n],max:[r,i]}=t.getLocalBounds(),o=0,a=0;return e>0&&(o=e),r<0&&(o=r),n>0&&(a=n),i<0&&(a=i),[o,a]}(t);if(i===a&&o===l)return ck()([[0,0],[s,u]]);let c=[[i-a,o-l]].concat(n.length?n:[[0,0]]),f=[r[0]-a,r[1]-l],[p,h]=c;if(pX(f,p,h)>0){let e=(()=>{let{min:e,max:n}=t.getLocalBounds(),r=p[0]+(p[1]-f[1])*(p[1]-0)/(p[0]-f[0]);return n[0]<f[0]?Math.min(n[0],r):Math.max(e[0],r)})();c.splice(1,1,[e,0])}return ck()(c)}(up(t).maybeAppend("background","rect").style("zIndex",-1).call(ca,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(ca,d?k:{}).node(),P,S,b),A=g&&new pq({id:"startMarker",style:Object.assign({x:0,y:0},ua(O,"startMarker"))}),T=v&&new pq({id:"endMarker",style:Object.assign({x:0,y:0},ua(O,"endMarker"))});up(t).maybeAppend("connector","path").style("zIndex",0).style("path",j).style("markerStart",A).style("markerEnd",T).call(ca,y?_:{})}),pZ=(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 up(new pK).style("x",f).style("y",p).call(ca,i).style("transform",`${u}rotate(${+s})`).style("coordCenter",n.getCenter()).call(ca,c).call(ca,t).node()}};pZ.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var pQ=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 pJ=c6(t=>{let e=t.attributes,{class:n,x:r,y:i}=e,o=pQ(e,["class","x","y"]),a=ua(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]}(up(t).maybeAppend("marker",()=>new pq({})).call(t=>t.node().update(Object.assign({symbol:s},a))).node());up(t).maybeAppend("text","text").style("x",u).style("y",c).call(ca,o)}),p0=(t,e)=>{let n=pQ(t,[]);return(t,e,r)=>{let{color:i}=r,o=pQ(r,["color"]),{color:a=i,text:l=""}=e,s={text:String(l),stroke:a,fill:a},[[u,c]]=t;return up(new pJ).call(ca,o).style("x",u).style("y",c).call(ca,s).call(ca,n).node()}};p0.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let p1=()=>(t,e)=>{let{data:n}=e;if(!Array.isArray(n)||n.some(tK))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,tG({},e,{encode:{x:tH(i),y:tH(o)}})]};p1.props={};var p2=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 p5=()=>(t,e)=>{let{data:n,style:r={}}=e,i=p2(e,["data","style"]),{x:o,y:a}=r,l=p2(r,["x","y"]);return void 0==o||void 0==a?[t,e]:[[0],tG({},i,{data:[0],cartesian:!0,encode:{x:tH([o||0]),y:tH([a||0])},scale:{x:{type:"identity",independent:!0,guide:null},y:{type:"identity",independent:!0,guide:null}},style:l})]};p5.props={};let p3={text:pZ,badge:p0},p4=t=>{let{cartesian:e=!1}=t;return e?cq:(e,n,r,i)=>{let{x:o,y:a}=r,l=cV(n,r,t),s=Array.from(e,t=>{let e=[+o[t],+a[t]];return[i.map(l(e,t))]});return[e,s]}};p4.props={defaultShape:"text",defaultLabelShape:"label",composite:!1,shape:p3,channels:[...cB({shapes:Object.keys(p3)}),{name:"x",required:!0},{name:"y",required:!0},{name:"text",scale:"identity"},{name:"fontSize"},{name:"rotate"}],preInference:[...cG(),{type:p1},{type:p5}],postInference:[...cz()]};let p6=()=>(t,e)=>[t,tG({scale:{x:{padding:0},y:{padding:0}}},e)];p6.props={};let p8={cell:cm,hollow:cv},p9=()=>(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 p7(t,e,n){var r=null,i=tJ(!0),o=null,a=cO,l=null,s=el(u);function u(u){var c,f,p,h,d,y=(u=cb(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 ck().defined(i).curve(a).context(o)}return t="function"==typeof t?t:void 0===t?cw:tJ(+t),e="function"==typeof e?e:void 0===e?tJ(0):tJ(+e),n="function"==typeof n?n:void 0===n?cE:tJ(+n),u.x=function(e){return arguments.length?(t="function"==typeof e?e:tJ(+e),r=null,u):t},u.x0=function(e){return arguments.length?(t="function"==typeof e?e:tJ(+e),u):t},u.x1=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:tJ(+t),u):r},u.y=function(t){return arguments.length?(e="function"==typeof t?t:tJ(+t),n=null,u):e},u.y0=function(t){return arguments.length?(e="function"==typeof t?t:tJ(+t),u):e},u.y1=function(t){return arguments.length?(n=null==t?null:"function"==typeof t?t:tJ(+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:tJ(!!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}p9.props={defaultShape:"cell",defaultLabelShape:"label",shape:p8,composite:!1,channels:[...cB({shapes:Object.keys(p8)}),{name:"x",required:!0,scale:"band"},{name:"y",required:!0,scale:"band"}],preInference:[...cG(),{type:tQ},{type:pb},{type:p6}],postInference:[...cz()]};var ht=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 he=c6(t=>{let{areaPath:e,connectPath:n,areaStyle:r,connectStyle:i}=t.attributes,o=t.ownerDocument;up(t).maybeAppend("connect-path",()=>o.createElement("path",{})).style("d",n).call(ca,i),up(t).maybeAppend("area-path",()=>o.createElement("path",{})).style("d",e).call(ca,r)}),hn=(t,e)=>{let{curve:n,gradient:r=!1,defined:i=t=>!Number.isNaN(t)&&null!=t,connect:o=!1}=t,a=ht(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=ey(l),g=cp(l,e),v=r&&p?cs(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=ua(b,"connect"),E=!!O.length,k=t=>up(s.createElement("path",{})).style("d",t||"").call(ca,b).node();if(eg(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=p7().curve(c2)).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 c4(o())},delete e.lineX0,e.lineEndAngle=function(){return c4(a())},delete e.lineX1,e.lineInnerRadius=function(){return c4(s())},delete e.lineY0,e.lineOuterRadius=function(){return c4(u())},delete e.lineY1,e.curve=function(t){return arguments.length?r(c3(t)):r()._curve},e).angle((t,e)=>um(ud(f[e],c))).outerRadius((t,e)=>uy(f[e],c)).innerRadius((t,e)=>uy(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)):up(new he).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?p7().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):p7().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)):up(new he).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))}}};hn.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let hr=(t,e)=>{let{coordinate:n}=e;return(...r)=>hn(Object.assign({curve:eg(n)?c_:cO},t),e)(...r)};hr.props=Object.assign(Object.assign({},hn.props),{defaultMarker:"square"});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 ho=(t,e)=>{let n=hi(t,[]),{coordinate:r}=e;return(...t)=>hn(Object.assign({curve:eg(r)?fl:ey(r)?fy:fd},n),e)(...t)};ho.props=Object.assign(Object.assign({},hn.props),{defaultMarker:"smooth"});let ha=(t,e)=>(...n)=>hn(Object.assign({curve:fb},t),e)(...n);ha.props=Object.assign(Object.assign({},hn.props),{defaultMarker:"hvh"});let hl=(t,e)=>(...n)=>hn(Object.assign({curve:fx},t),e)(...n);hl.props=Object.assign(Object.assign({},hn.props),{defaultMarker:"vh"});let hs=(t,e)=>(...n)=>hn(Object.assign({curve:fO},t),e)(...n);hs.props=Object.assign(Object.assign({},hn.props),{defaultMarker:"hv"});let hu={area:hr,smooth:ho,hvh:ha,vh:hl,hv:hs},hc=()=>(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(s2(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]};hc.props={defaultShape:"area",defaultLabelShape:"label",composite:!1,shape:hu,channels:[...cB({shapes:Object.keys(hu)}),{name:"x",required:!0},{name:"y",required:!0},{name:"size"},{name:"series",scale:"band"}],preInference:[...cG(),{type:fP},{type:tZ},{type:p6}],postInference:[...cW()],interaction:{shareTooltip:!0,seriesTooltip:!0,crosshairs:!0}};let hf=()=>(t,e)=>{let{encode:n}=e,{y1:r}=n;if(r)return[t,e];let[i]=tY(n,"y");return[t,tG({},e,{encode:{y1:tH([...i])}})]};hf.props={};let hp=()=>(t,e)=>{let{encode:n}=e,{x1:r}=n;if(r)return[t,e];let[i]=tY(n,"x");return[t,tG({},e,{encode:{x1:tH([...i])}})]};hp.props={};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{arrow:n=!0,arrowSize:r="40%"}=t,i=hh(t,["arrow","arrowSize"]),{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=ea();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*uy(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 up(o.createElement("path",{})).call(ca,s).style("d",h.toString()).style("stroke",u).style("transform",c).call(ca,i).node()}};hd.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let hy=(t,e)=>{let{arrow:n=!1}=t;return(...r)=>hd(Object.assign(Object.assign({},t),{arrow:n}),e)(...r)};hy.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};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};let hm=(t,e)=>{let n=hg(t,[]),{coordinate:r,document:i}=e;return(t,e,o)=>{let{color:a}=o,l=hg(o,["color"]),{color:s=a,transform:u}=e,[c,f]=t,p=ea();if(p.moveTo(c[0],c[1]),eg(r)){let t=r.getCenter();p.quadraticCurveTo(t[0],t[1],f[0],f[1])}else{let t=ux(c,f),e=uy(c,f)/2;cl(p,c,f,t,e)}return up(i.createElement("path",{})).call(ca,l).style("d",p.toString()).style("stroke",s).style("transform",u).call(ca,n).node()}};hm.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var hv=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 hb=(t,e)=>{let n=hv(t,[]),{document:r}=e;return(t,e,i)=>{let{color:o}=i,a=hv(i,["color"]),{color:l=o,transform:s}=e,[u,c]=t,f=ea();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]),up(r.createElement("path",{})).call(ca,a).style("d",f.toString()).style("stroke",l).style("transform",s).call(ca,n).node()}};hb.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var hx=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 hO=(t,e)=>{let{cornerRatio:n=1/3}=t,r=hx(t,["cornerRatio"]),{coordinate:i,document:o}=e;return(t,e,a)=>{let{defaultColor:l}=a,s=hx(a,["defaultColor"]),{color:u=l,transform:c}=e,[f,p]=t,h=function(t,e,n,r){let i=ea();if(eg(n)){let o=n.getCenter(),a=uy(t,o),l=uy(e,o);return i.moveTo(t[0],t[1]),cl(i,t,e,o,(l-a)*r+a),i.lineTo(e[0],e[1]),i}return ey(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 up(o.createElement("path",{})).call(ca,s).style("d",h.toString()).style("stroke",u).style("transform",c).call(ca,r).node()}};hO.props={defaultMarker:"vhv",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let hw={link:hy,arc:hm,smooth:hb,vhv:hO},hE=t=>(e,n,r,i)=>{let{x:o,y:a,x1:l=o,y1:s=a}=r,u=cV(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]};hE.props={defaultShape:"link",defaultLabelShape:"label",composite:!1,shape:hw,channels:[...cB({shapes:Object.keys(hw)}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...cG(),{type:hf},{type:hp}],postInference:[...cz()]};var hk=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 hM=(t,e)=>{let{coordinate:n,document:r}=e;return(e,i,o)=>{let{color:a}=o,l=hk(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?cU(p)*g:p,h="string"==typeof h?cU(h)*v:h;let b=d-Number(p)/2,x=y-Number(h)/2;return up(r.createElement("image",{})).call(ca,l).style("x",b).style("y",x).style("img",u).style("stroke",s).style("transform",f).call(ca,t).style("width",p).style("height",h).node()}};hM.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let hS={image:hM},h_=t=>{let{cartesian:e}=t;return e?cq:(e,n,r,i)=>{let{x:o,y:a}=r,l=cV(n,r,t),s=Array.from(e,t=>{let e=[+o[t],+a[t]];return[i.map(l(e,t))]});return[e,s]}};h_.props={defaultShape:"image",defaultLabelShape:"label",composite:!1,shape:hS,channels:[...cB({shapes:Object.keys(hS)}),{name:"x",required:!0},{name:"y",required:!0},{name:"src",scale:"identity"},{name:"size"}],preInference:[...cG(),{type:p1},{type:p5}],postInference:[...cz()]};var hP=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 hj=(t,e)=>{let{coordinate:n,document:r}=e;return(e,i,o)=>{let{color:a}=o,l=hP(o,["color"]),{color:s=a,transform:u}=i,c=function(t,e){let n=ea();if(eg(e)){let r=e.getCenter(),i=[...t,t[0]],o=i.map(t=>uy(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)?cl(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 up(r.createElement("path",{})).call(ca,l).style("d",c.toString()).style("stroke",s).style("fill",s).style("transform",u).call(ca,t).node()}};hj.props={defaultMarker:"square",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};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 hT=(t,e)=>{let n=hA(t,[]),{coordinate:r,document:i}=e;return(t,e,o)=>{let{color:a}=o,l=hA(o,["color"]),{color:s=a,transform:u}=e,c=function(t,e){let[n,r,i,o]=t,a=ea();if(eg(e)){let t=e.getCenter(),l=uy(t,n);return a.moveTo(n[0],n[1]),a.quadraticCurveTo(t[0],t[1],i[0],i[1]),cl(a,i,o,t,l),a.quadraticCurveTo(t[0],t[1],r[0],r[1]),cl(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 up(i.createElement("path",{})).call(ca,l).style("d",c.toString()).style("fill",s||a).style("stroke",s||a).style("transform",u).call(ca,n).node()}};hT.props={defaultMarker:"square",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let hC={polygon:hj,ribbon:hT},hN=()=>(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]};hN.props={defaultShape:"polygon",defaultLabelShape:"label",composite:!1,shape:hC,channels:[...cB({shapes:Object.keys(hC)}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...cG()],postInference:[...cz()]};var hL=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 hI=(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=hL(o,["color","fill","stroke"]),p=function(t,e){let n=ea();if(eg(e)){let r=e.getCenter(),[i,o]=r,a=ug(ud(t[0],r)),l=ug(ud(t[1],r)),s=uy(r,t[2]),u=uy(r,t[3]),c=uy(r,t[8]),f=uy(r,t[10]),p=uy(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 up(r.createElement("path",{})).call(ca,f).style("d",p.toString()).style("stroke",c).style("fill",a||u).style("transform",l).call(ca,t).node()}};hI.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var hR=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{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=hR(o,["color","fill","stroke"]),p=function(t,e,n=4){let r=ea();if(!eg(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=uy(i,t[3]),s=uy(i,t[8]),u=uy(i,t[10]),c=ug(ud(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 up(r.createElement("path",{})).call(ca,f).style("d",p.toString()).style("stroke",c).style("fill",a||u).style("transform",l).call(ca,t).node()}};hD.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let hF={box:hI,violin:hD},hB=()=>(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]};hB.props={defaultShape:"box",defaultLabelShape:"label",composite:!1,shape:hF,channels:[...cB({shapes:Object.keys(hF)}),{name:"x",scale:"band",required:!0},{name:"y",required:!0},{name:"series",scale:"band"}],preInference:[...cG(),{type:tQ}],postInference:[...cW()],interaction:{shareTooltip:!0}};let hz={vector:hd},hW=()=>(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]};hW.props={defaultShape:"vector",defaultLabelShape:"label",composite:!1,shape:hz,channels:[...cB({shapes:Object.keys(hz)}),{name:"x",required:!0},{name:"y",required:!0},{name:"rotate",required:!0,scale:"identity"},{name:"size",required:!0}],preInference:[...cG()],postInference:[...cz()]};var h$=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 hG=(t,e)=>{let{arrow:n,arrowSize:r=4}=t,i=h$(t,["arrow","arrowSize"]),{coordinate:o,document:a}=e;return(t,e,l)=>{var s;let{color:u,lineWidth:c}=l,f=h$(l,["color","lineWidth"]),{color:p=u,size:h=c}=e,d=n?(s=Object.assign({fill:i.stroke||p,stroke:i.stroke||p},ua(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(!eg(e))return ck().x(t=>t[0]).y(t=>t[1])(t);let n=e.getCenter();return ed()({startAngle:0,endAngle:2*Math.PI,outerRadius:uy(t[0],n),innerRadius:uy(t[1],n)})}(t,o),g=function(t,e){if(!eg(t))return e;let[n,r]=t.getCenter();return`translate(${n}, ${r}) ${e||""}`}(o,e.transform);return up(a.createElement("path",{})).call(ca,f).style("d",y).style("stroke",p).style("lineWidth",h).style("transform",g).style("markerEnd",d).call(ca,i).node()}};hG.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let hH=()=>(t,e)=>{let{data:n}=e;return!Array.isArray(n)||n.some(tK)?[t,e]:[t,tG({},e,{encode:{x:tH(n)}})]};hH.props={};let hV={line:hG},hU=t=>(e,n,r,i)=>{let{x:o}=r,a=cV(n,r,tG({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]};hU.props={defaultShape:"line",defaultLabelShape:"label",composite:!1,shape:hV,channels:[...c$({shapes:Object.keys(hV)}),{name:"x",required:!0}],preInference:[...cG(),{type:hH}],postInference:[]};let hq=()=>(t,e)=>{let{data:n}=e;return!Array.isArray(n)||n.some(tK)?[t,e]:[t,tG({},e,{encode:{y:tH(n)}})]};hq.props={};let hY={line:hG},hX=t=>(e,n,r,i)=>{let{y:o}=r,a=cV(n,r,tG({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]};hX.props={defaultShape:"line",defaultLabelShape:"label",composite:!1,shape:hY,channels:[...c$({shapes:Object.keys(hY)}),{name:"y",required:!0}],preInference:[...cG(),{type:hq}],postInference:[]};var hK=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 hZ(t,e,n){return[["M",t,e],["L",t+2*n,e-n],["L",t+2*n,e+n],["Z"]]}let hQ=(t,e)=>{let{offset:n=0,offset1:r=n,offset2:i=n,connectLength1:o,endMarker:a=!0}=t,l=hK(t,["offset","offset1","offset2","connectLength1","endMarker"]),{coordinate:s}=e;return(t,e,n)=>{let{color:u,connectLength1:c}=n,f=hK(n,["color","connectLength1"]),{color:p,transform:h}=e,d=function(t,e,n,r,i=0){let[[o,a],[l,s]]=e;if(ey(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=ua(Object.assign(Object.assign({},l),n),"endMarker");return up(new lI).call(ca,f).style("path",ck().x(t=>t[0]).y(t=>t[1])(d)).style("stroke",p||u).style("transform",h).style("markerEnd",a?new pq({className:"marker",style:Object.assign(Object.assign({},y),{symbol:hZ})}):null).call(ca,l).node()}};hQ.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let hJ={connector:hQ},h0=(...t)=>hE(...t);function h1(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 h2(t={}){let{extendX:e=!1,extendY:n=!1}=t;return(t,r,i,o)=>{let a=h1("x",e,i,r.x),l=h1("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]}}h0.props={defaultShape:"connector",defaultLabelShape:"label",composite:!1,shape:hJ,channels:[...c$({shapes:Object.keys(hJ)}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...cG()],postInference:[]};let h5={range:cm},h3=()=>h2();h3.props={defaultShape:"range",defaultLabelShape:"label",composite:!1,shape:h5,channels:[...c$({shapes:Object.keys(h5)}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...cG()],postInference:[]};let h4=()=>(t,e)=>{let{data:n}=e;if(Array.isArray(n)&&(n.every(Array.isArray)||!n.some(tK))){let r=(t,e)=>Array.isArray(t[0])?t.map(t=>t[e]):[t[e]];return[t,tG({},e,{encode:{x:tH(r(n,0)),x1:tH(r(n,1))}})]}return[t,e]};h4.props={};let h6={range:cm},h8=()=>h2({extendY:!0});h8.props={defaultShape:"range",defaultLabelShape:"label",composite:!1,shape:h6,channels:[...c$({shapes:Object.keys(h6)}),{name:"x",required:!0}],preInference:[...cG(),{type:h4}],postInference:[]};let h9=()=>(t,e)=>{let{data:n}=e;if(Array.isArray(n)&&(n.every(Array.isArray)||!n.some(tK))){let r=(t,e)=>Array.isArray(t[0])?t.map(t=>t[e]):[t[e]];return[t,tG({},e,{encode:{y:tH(r(n,0)),y1:tH(r(n,1))}})]}return[t,e]};h9.props={};let h7={range:cm},dt=()=>h2({extendX:!0});dt.props={defaultShape:"range",defaultLabelShape:"label",composite:!1,shape:h7,channels:[...c$({shapes:Object.keys(h7)}),{name:"y",required:!0}],preInference:[...cG(),{type:h9}],postInference:[]};var de=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 dn=(t,e)=>{let{arrow:n,colorAttribute:r}=t,i=de(t,["arrow","colorAttribute"]),{coordinate:o,document:a}=e;return(t,e,n)=>{let{color:l,stroke:s}=n,u=de(n,["color","stroke"]),{d:c,color:f=l}=e,[p,h]=o.getSize();return up(a.createElement("path",{})).call(ca,u).style("d","function"==typeof c?c({width:p,height:h}):c).style(r,f).call(ca,i).node()}};dn.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let dr=(t,e)=>dn(Object.assign({colorAttribute:"fill"},t),e);dr.props={defaultMarker:"hvh",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let di=(t,e)=>dn(Object.assign({fill:"none",colorAttribute:"stroke"},t),e);di.props={defaultMarker:"hvh",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let da={path:dr,hollow:di},dl=t=>(t,e,n,r)=>[t,t.map(()=>[[0,0]])];dl.props={defaultShape:"path",defaultLabelShape:"label",shape:da,composite:!1,channels:[...cB({shapes:Object.keys(da)}),{name:"d",scale:"identity"}],preInference:[...cG()],postInference:[]};var ds=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 du=(t,e)=>{let{render:n}=t,r=ds(t,["render"]);return t=>{let[[i,o]]=t;return n(Object.assign(Object.assign({},r),{x:i,y:o}),e)}};du.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let dc=()=>(t,e)=>{let{style:n={}}=e;return[t,tG({},e,{style:Object.assign(Object.assign({},n),Object.fromEntries(Object.entries(n).filter(([,t])=>"function"==typeof t).map(([t,e])=>[t,()=>e])))})]};dc.props={};let df=t=>{let{cartesian:e}=t;return e?cq:(e,n,r,i)=>{let{x:o,y:a}=r,l=cV(n,r,t),s=Array.from(e,t=>{let e=[+o[t],+a[t]];return[i.map(l(e,t))]});return[e,s]}};df.props={defaultShape:"shape",defaultLabelShape:"label",composite:!1,shape:{shape:du},channels:[{name:"x",required:!0},{name:"y",required:!0}],preInference:[...cG(),{type:p1},{type:p5},{type:dc}]};var dp=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 dh=(t,e)=>{let{document:n}=e;return(e,r,i)=>{let{transform:o}=r,{color:a}=i,l=dp(i,["color"]),{color:s=a}=r,[u,...c]=e,f=ea();return f.moveTo(...u),c.forEach(([t,e])=>{f.lineTo(t,e)}),f.closePath(),up(n.createElement("path",{})).call(ca,l).style("d",f.toString()).style("stroke",s||a).style("fill",s||a).style("fillOpacity",.4).style("transform",o).call(ca,t).node()}};dh.props={defaultMarker:"square",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let dd={density:dh},dy=()=>(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 dg(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 dm(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 dv(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 db(t,e,n){let r=t?t():document.createElement("canvas");return r.width=e,r.height=n,r}dy.props={defaultShape:"density",defaultLabelShape:"label",composite:!1,shape:dd,channels:[...cB({shapes:Object.keys(dd)}),{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:[...cG(),{type:tZ},{type:tQ}],postInference:[...cW()],interaction:{shareTooltip:!0}},dv(3);let dx=function(t,e=(...t)=>`${t[0]}`,n=16){let r=dv(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=db(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 dO=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 dw=(t,e)=>{let{gradient:n,opacity:r,maxOpacity:i,minOpacity:o,blur:a,useGradientOpacity:l}=t,s=dO(t,["gradient","opacity","maxOpacity","minOpacity","blur","useGradientOpacity"]),{coordinate:u,createCanvas:c,document:f}=e;return(t,e,p)=>{var h,d;let{transform:y}=e,[g,v]=u.getSize(),b=t.map(t=>({x:t[0],y:t[1],value:t[2],radius:t[3]})),x=dg(t,t=>t[2]),O=dm(t,t=>t[2]),w=g&&v?function(t,e,n,r,i,o,a){let l=Object.assign({blur:.85,minOpacity:0,opacity:.6,maxOpacity:1,gradient:[[.25,"rgb(0,0,255)"],[.55,"rgb(0,255,0)"],[.85,"yellow"],[1,"rgb(255,0,0)"]]},o);l.minOpacity*=255,l.opacity*=255,l.maxOpacity*=255;let s=db(a,t,e).getContext("2d"),u=function(t,e){let n=db(e,256,1).getContext("2d"),r=n.createLinearGradient(0,0,256,1);return("string"==typeof t?t.split(" ").map(t=>{let[e,n]=t.split(":");return[+e,n]}):t).forEach(([t,e])=>{r.addColorStop(t,e)}),n.fillStyle=r,n.fillRect(0,0,256,1),n.getImageData(0,0,256,1).data}(l.gradient,a);s.clearRect(0,0,t,e),function(t,e,n,r,i,o){let{blur:a}=i,l=r.length;for(;l--;){let{x:i,y:s,value:u,radius:c}=r[l],f=Math.min(u,n),p=i-c,h=s-c,d=dx(c,1-a,o);t.globalAlpha=Math.max((f-e)/(n-e),.001),t.drawImage(d,p,h)}}(s,n,r,i,l,a);let c=function(t,e,n,r,i){let{minOpacity:o,opacity:a,maxOpacity:l,useGradientOpacity:s}=i,u=t.getImageData(0,0,e,n),c=u.data,f=c.length;for(let t=3;t<f;t+=4){let e=c[t],n=4*e;if(!n)continue;let i=a||Math.max(0,Math.min(l,Math.max(o,e)));c[t-3]=r[n],c[t-2]=r[n+1],c[t-1]=r[n+2],c[t]=s?r[n+3]:i}return u}(s,t,e,u,l),f=db(a,t,e).getContext("2d");return f.putImageData(c,0,0),f}(g,v,x,O,b,(h={gradient:n,opacity:r,minOpacity:o,maxOpacity:i,blur:a,useGradientOpacity:l},d=t=>void 0===t,Object.keys(h).reduce((t,e)=>{let n=h[e];return d(n,e)||(t[e]=n),t},{})),c):{canvas:null};return up(f.createElement("image",{})).call(ca,p).style("x",0).style("y",0).style("width",g).style("height",v).style("src",w.canvas).style("transform",y).call(ca,s).node()}};dw.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let dE={heatmap:dw},dk=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]})]]};dk.props={defaultShape:"heatmap",defaultLabelShape:"label",composite:!1,shape:dE,channels:[...cB({shapes:Object.keys(dE)}),{name:"x",required:!0},{name:"y",required:!0},{name:"color",scale:"identity",required:!0},{name:"size"}],preInference:[...cG(),{type:tQ},{type:pb}],postInference:[...cz()]};let dM=()=>["#5B8FF9","#5AD8A6","#5D7092","#F6BD16","#6F5EF9","#6DC8EC","#945FB9","#FF9845","#1E9493","#FF99C3"];dM.props={};let dS=()=>["#5B8FF9","#CDDDFD","#5AD8A6","#CDF3E4","#5D7092","#CED4DE","#F6BD16","#FCEBB9","#6F5EF9","#D3CEFD","#6DC8EC","#D3EEF9","#945FB9","#DECFEA","#FF9845","#FFE0C7","#1E9493","#BBDEDE","#FF99C3","#FFE0ED"];dS.props={};let d_=t=>new u7(t);d_.props={};let dP=Symbol("defaultUnknown");function dj(t,e,n){for(let r=0;r<e.length;r+=1)t.has(e[r])||t.set(n(e[r]),r)}function dA(t){let{value:e,from:n,to:r,mapper:i,notFoundReturn:o}=t,a=i.get(e);if(void 0===a){if(o!==dP)return o;a=n.push(e)-1,i.set(e,a)}return r[a%r.length]}function dT(t){return t instanceof Date?t=>`${t}`:"object"==typeof t?t=>JSON.stringify(t):t=>t}class dC extends uB{getDefaultOptions(){return{domain:[],range:[],unknown:dP}}constructor(t){super(t)}map(t){return 0===this.domainIndexMap.size&&dj(this.domainIndexMap,this.getDomain(),this.domainKey),dA({value:this.domainKey(t),mapper:this.domainIndexMap,from:this.getDomain(),to:this.getRange(),notFoundReturn:this.options.unknown})}invert(t){return 0===this.rangeIndexMap.size&&dj(this.rangeIndexMap,this.getRange(),this.rangeKey),dA({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=dT(e),this.rangeKey=dT(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 dC(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 dN=t=>new dC(t);function dL({map:t,initKey:e},n){let r=e(n);return t.has(r)?t.get(r):n}function dI(t){return"object"==typeof t?t.valueOf():t}dN.props={};class dR extends Map{constructor(t){if(super(),this.map=new Map,this.initKey=dI,null!==t)for(let[e,n]of t)this.set(e,n)}get(t){return super.get(dL({map:this.map,initKey:this.initKey},t))}has(t){return super.has(dL({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 dD extends dC{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,paddingInner:0,paddingOuter:0,padding:0,unknown:dP,flex:[]}}constructor(t){super(t)}clone(){return new dD(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{domain:e,range:n,paddingOuter:r,paddingInner:i,flex:o,round:a,align:l}=t,s=e.length,u=function(t,e){let n=e-t.length;return n>0?[...t,...Array(n).fill(1)]:n<0?t.slice(0,e):t}(o,s),[c,f]=n,p=f-c,h=p/(2/s*r+1-1/s*i),d=h*i/s,y=h-s*d,g=function(t){let e=Math.min(...t);return t.map(t=>t/e)}(u),v=y/g.reduce((t,e)=>t+e),b=new dR(e.map((t,e)=>{let n=g[e]*v;return[t,a?Math.floor(n):n]})),x=new dR(e.map((t,e)=>{let n=g[e]*v+d;return[t,a?Math.floor(n):n]})),O=Array.from(x.values()).reduce((t,e)=>t+e),w=c+(p-(O-O/s*i))*l,E=a?Math.round(w):w,k=Array(s);for(let t=0;t<s;t+=1){k[t]=Math.round(1e12*E)/1e12;let n=e[t];E+=x.get(n)}return{valueBandWidth:b,valueStep:x,adjustedRange:k}}(t);let{range:a,paddingOuter:l,paddingInner:s,round:u,align:c}=t,f=a[0],p=a[1]-f;n=p/Math.max(1,2*l+(o-s)),u&&(n=Math.floor(n)),f+=(p-n*(o-s))*c,r=n*(1-s),u&&(f=Math.round(f),r=Math.round(r));let h=Array(o).fill(0).map((t,e)=>f+e*n);return{valueStep:n,valueBandWidth:r,adjustedRange:h}}({align:t,range:n,round:r,flex:i,paddingInner:this.getPaddingInner(),paddingOuter:this.getPaddingOuter(),domain:e});this.valueStep=l,this.valueBandWidth=a,this.adjustedRange=o}}let dF=t=>new dD(t);function dB(t){return 1e-14>Math.abs(t)?t:parseFloat(t.toFixed(14))}dF.props={};let dz=[1,5,2,2.5,4,3],dW=100*Number.EPSILON,d$=(t,e,n=5,r=!0,i=dz,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=uD(e);return 1-uI(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=uD(e),l=uI(e,t),s=0,u=(r%o+o)%o;return(u<dW||o-u<dW)&&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=dB(l.lmax),f=dB(l.lmin),p=dB(l.lstep),h=Math.floor(Math.round((c-f)/p*1e12)/1e12)+1,d=Array(h);d[0]=dB(f);for(let t=1;t<h;t+=1)d[t]=dB(d[t-1]+p);return d};class dG extends uB{getDefaultOptions(){return{domain:[0,1],range:[0,1],tickCount:5,unknown:void 0,tickMethod:d$}}map(t){return uZ(t)?t:this.options.unknown}invert(t){return this.map(t)}clone(){return new dG(this.options)}getTicks(){let{domain:t,tickCount:e,tickMethod:n}=this.options,[r,i]=t;return uA(r)&&uA(i)?n(r,i,e):[]}}let dH=t=>new dG(t);dH.props={};class dV extends dD{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,padding:0,unknown:dP,paddingInner:1,paddingOuter:0}}constructor(t){super(t)}getPaddingInner(){return 1}clone(){return new dV(this.options)}update(t){super.update(t)}getPaddingOuter(){return this.options.padding}}let dU=t=>new dV(t);dU.props={};var dq=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,dY=/\[([^]*?)\]/gm;function dX(t,e){for(var n=[],r=0,i=t.length;r<i;r++)n.push(t[r].substr(0,e));return n}var dK=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 dZ(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 dQ=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dJ=["January","February","March","April","May","June","July","August","September","October","November","December"],d0=dX(dJ,3),d1=dZ({},{dayNamesShort:dX(dQ,3),dayNames:dQ,monthNamesShort:d0,monthNames:dJ,amPm:["am","pm"],DoFn:function(t){return t+["th","st","nd","rd"][t%10>3?0:+(t-t%10!=10)*t%10]}}),d2=function(t,e){for(void 0===e&&(e=2),t=String(t);t.length<e;)t="0"+t;return t},d5={D:function(t){return String(t.getDate())},DD:function(t){return d2(t.getDate())},Do:function(t,e){return e.DoFn(t.getDate())},d:function(t){return String(t.getDay())},dd:function(t){return d2(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 d2(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 d2(String(t.getFullYear()),4).substr(2)},YYYY:function(t){return d2(t.getFullYear(),4)},h:function(t){return String(t.getHours()%12||12)},hh:function(t){return d2(t.getHours()%12||12)},H:function(t){return String(t.getHours())},HH:function(t){return d2(t.getHours())},m:function(t){return String(t.getMinutes())},mm:function(t){return d2(t.getMinutes())},s:function(t){return String(t.getSeconds())},ss:function(t){return d2(t.getSeconds())},S:function(t){return String(Math.round(t.getMilliseconds()/100))},SS:function(t){return d2(Math.round(t.getMilliseconds()/10),2)},SSS:function(t){return d2(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?"-":"+")+d2(100*Math.floor(Math.abs(e)/60)+Math.abs(e)%60,4)},Z:function(t){var e=t.getTimezoneOffset();return(e>0?"-":"+")+d2(Math.floor(Math.abs(e)/60),2)+":"+d2(Math.abs(e)%60,2)}};dK("monthNamesShort"),dK("monthNames");var d3={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"},d4=function(t,e,n){if(void 0===e&&(e=d3.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=d3[e]||e;var r=[];e=e.replace(dY,function(t,e){return r.push(e),"@@@"});var i=dZ(dZ({},d1),n);return(e=e.replace(dq,function(e){return d5[e](t,i)})).replace(/@@@/g,function(){return r.shift()})};function d6(t,e,n,r){let i=(t,e)=>{let i=t=>r(t)%e==0,o=e;for(;o&&!i(t);)n(t,-1),o-=1;return t},o=(t,n)=>{n&&i(t,n),e(t)},a=(t,e)=>{let r=new Date(+t-1);return o(r,e),n(r,e),o(r),r};return{ceil:a,floor:(t,e)=>{let n=new Date(+t);return o(n,e),n},range:(t,e,r,i)=>{let l=[],s=Math.floor(r),u=i?a(t,r):a(t);for(;u<e;n(u,s),o(u))l.push(new Date(+u));return l},duration:t}}let d8=d6(1,t=>t,(t,e=1)=>{t.setTime(+t+e)},t=>t.getTime()),d9=d6(1e3,t=>{t.setMilliseconds(0)},(t,e=1)=>{t.setTime(+t+1e3*e)},t=>t.getSeconds()),d7=d6(6e4,t=>{t.setSeconds(0,0)},(t,e=1)=>{t.setTime(+t+6e4*e)},t=>t.getMinutes()),yt=d6(36e5,t=>{t.setMinutes(0,0,0)},(t,e=1)=>{t.setTime(+t+36e5*e)},t=>t.getHours()),ye=d6(864e5,t=>{t.setHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+864e5*e)},t=>t.getDate()-1),yn=d6(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()),yr={millisecond:d8,second:d9,minute:d7,hour:yt,day:ye,week:d6(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=yn.floor(t);return Math.floor((+new Date(+t)-+e)/6048e5)}),month:yn,year:d6(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())},yi=d6(1,t=>t,(t,e=1)=>{t.setTime(+t+e)},t=>t.getTime()),yo=d6(1e3,t=>{t.setUTCMilliseconds(0)},(t,e=1)=>{t.setTime(+t+1e3*e)},t=>t.getUTCSeconds()),ya=d6(6e4,t=>{t.setUTCSeconds(0,0)},(t,e=1)=>{t.setTime(+t+6e4*e)},t=>t.getUTCMinutes()),yl=d6(36e5,t=>{t.setUTCMinutes(0,0,0)},(t,e=1)=>{t.setTime(+t+36e5*e)},t=>t.getUTCHours()),ys=d6(864e5,t=>{t.setUTCHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+864e5*e)},t=>t.getUTCDate()-1),yu=d6(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()),yc={millisecond:yi,second:yo,minute:ya,hour:yl,day:ys,week:d6(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=yu.floor(t);return Math.floor((+new Date(+t)-+e)/6048e5)}),month:yu,year:d6(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 yf(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?yc:yr;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=u$(s,h,0,d,f);if(y===d){let t=u2(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(u2(a,l,p),1)];return o}let yp=(t,e,n,r,i)=>{let o=t>e,a=o?e:t,l=o?t:e,[s,u]=yf(a,l,n,r,i),c=s.range(a,new Date(+l+1),u,!0);return o?c.reverse():c},yh=(t,e,n,r,i)=>{let o=t>e,a=o?e:t,l=o?t:e,[s,u]=yf(a,l,n,r,i),c=[s.floor(a,u),s.ceil(l,u)];return o?c.reverse():c};function yd(t){let e=t.getTimezoneOffset(),n=new Date(t);return n.setMinutes(n.getMinutes()+e,n.getSeconds(),n.getMilliseconds()),n}class yy extends u8{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:yp,interpolate:uq,mask:void 0,utc:!1}}chooseTransforms(){return[t=>+t,t=>new Date(t)]}chooseNice(){return yh}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?yc:yr,r=e?yd:uR;return e=>d4(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 yy(this.options)}}let yg=t=>new yy(t);yg.props={};let ym=t=>e=>-t(-e),yv=(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?ym(r):r},yb=(t,e)=>{let n=t===Math.E?Math.exp:e=>t**e;return e?ym(n):n},yx=(t,e,n,r=10)=>{let i=t<0,o=yb(r,i),a=yv(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=u9(s,u,n))}else{let t=-1===n?f-c:Math.min(f-c,n);p=u9(c,f,t).map(o)}return l?p.reverse():p},yO=(t,e,n,r)=>{let i=t<0,o=yv(r,i),a=yb(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 yw extends u8{getDefaultOptions(){return{domain:[1,10],range:[0,1],base:10,interpolate:uX,tickMethod:yx,tickCount:5}}chooseNice(){return yO}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[yv(t,n),yb(t,n)]}clone(){return new yw(this.options)}}let yE=t=>new yw(t);yE.props={};let yk=t=>e=>e<0?-((-e)**t):e**t,yM=t=>e=>e<0?-((-e)**(1/t)):e**(1/t),yS=t=>t<0?-Math.sqrt(-t):Math.sqrt(t);class y_ extends u8{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,exponent:2,interpolate:uX,tickMethod:u9,tickCount:5}}constructor(t){super(t)}chooseTransforms(){let{exponent:t}=this.options;return 1===t?[uR,uR]:[.5===t?yS:yk(t),yM(t)]}clone(){return new y_(this.options)}}let yP=t=>new y_(t);yP.props={};class yj extends y_{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:uX,tickMethod:u9,tickCount:5,exponent:.5}}constructor(t){super(t)}update(t){super.update(t)}clone(){return new yj(this.options)}}let yA=t=>new yj(t);yA.props={};class yT extends uB{getDefaultOptions(){return{domain:[.5],range:[0,1]}}constructor(t){super(t)}map(t){if(!uZ(t))return this.options.unknown;let e=u$(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 yT(this.options)}rescale(){let{domain:t,range:e}=this.options;this.n=Math.min(t.length,e.length-1),this.thresholds=t}}let yC=t=>new yT(t);yC.props={};class yN extends yT{getDefaultOptions(){return{domain:[],range:[],tickCount:5,unknown:void 0,tickMethod:d$}}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 yN(this.options)}getTicks(){let{tickCount:t,domain:e,tickMethod:n}=this.options,r=e.length-1;return n(e[0],e[r],t)}}let yL=t=>new yN(t);yL.props={};class yI extends yT{getDefaultOptions(){return{domain:[0,1],range:[.5],nice:!1,tickCount:5,tickMethod:d$}}constructor(t){super(t)}nice(){let{nice:t}=this.options;if(t){let[t,e,n]=this.getTickMethodOptions();this.options.domain=u5(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 yI(this.options)}}let yR=t=>new yI(t);yR.props={};let yD=t=>e=>{let n=t(e);return uA(n)?Math.round(n):n},yF=M6=class extends u7{getDefaultOptions(){return{domain:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolator:uR,tickMethod:u9,tickCount:5}}constructor(t){super(t)}clone(){return new M6(this.options)}};yF=M6=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}([(MI=function(t){return[t(0),t(1)]},MR=t=>{let[e,n]=t;return uW(uq(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=MI(t)},t.prototype.composeOutput=function(t,e){let{domain:n,interpolator:r,round:i}=this.getOptions(),o=MR(n.map(t)),a=i?yD(r):r;this.output=uW(a,o,e,t)},t.prototype.invert=void 0})],yF);let yB=t=>new yF(t);yB.props={};class yz extends uB{getDefaultOptions(){return{range:[0],domain:[0,1],unknown:void 0,tickCount:5,tickMethod:u9}}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 uA(r)&&uA(i)?t(r,i,n):[]}clone(){return new yz(this.options)}}let yW=t=>new yz(t);function y$({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"}}}yW.props={};let yG=y$({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}),yH=t=>tG({},yG,t);yH.props={};let yV=t=>tG({},yH(),{category10:"category10",category20:"category20"},t);yV.props={};let yU=y$({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}),yq=t=>tG({},yU,{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),yY=t=>Object.assign({},yq(),{category10:"category10",category20:"category20"},t);yY.props={};let yX=y$({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}),yK=t=>tG({},yX,{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);yK.props={};var yZ=function(t){return null==t};function yQ(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=eT(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,eS(eS({},t[e]),n)]:[e,n]}))}function yJ(t,e){t?t.finished.then(e):e()}function y0(t,e){"update"in t?t.update(e):t.attr(e)}function y1(t,e,n){return 0===e.length?null:n?t.animate(e,n):(y0(t,{style:e.slice(-1)[0]}),null)}function y2(t,e,n){var r={},i={};return(Object.entries(e).forEach(function(e){var n=eT(e,2),o=n[0],a=n[1];if(!yZ(a)){var l=t.style[o]||t.parsedStyle[o]||0;l!==a&&(r[o]=l,i[o]=a)}}),n)?y1(t,[r,i],eS({fill:"both"},n)):(y0(t,i),null)}var y5=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&&pA(a)?(pA(e[o])||(e[o]={}),r<i?t(e[o],a,r+1,i):e[o]=n[o]):pT(a)?(e[o]=[],e[o]=e[o].concat(a)):void 0!==a&&(e[o]=a)}}(t,e[r]);return t},y3=function(t,e){var n=function(t){return"".concat(e,"-").concat(t)},r=Object.fromEntries(Object.entries(t).map(function(t){var e=eT(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},y4={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 lI({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:[]};y5({},y4,{style:{type:"arc"}}),y5({},y4,{style:{}});var y6=y3({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 y8(t,e){return[t[0]*e,t[1]*e]}function y9(t,e){return[t[0]+e[0],t[1]+e[1]]}function y7(t,e){return[t[0]-e[0],t[1]-e[1]]}function gt(t,e){return[Math.min(t[0],e[0]),Math.min(t[1],e[1])]}function ge(t,e){return[Math.max(t[0],e[0]),Math.max(t[1],e[1])]}function gn(t,e){return Math.sqrt(Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2))}function gr(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 gi(t){return t*Math.PI/180}function go(t){return Number((180*t/Math.PI).toPrecision(5))}function ga(t){return t.toString().charAt(0).toUpperCase()+t.toString().slice(1)}function gl(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 gs=function(t,e){if(!(null==t?void 0:t.startsWith(e)))return!1;var n=t[e.length];return n>="A"&&n<="Z"};function gu(t,e,n){void 0===n&&(n=!1);var r={};return Object.entries(t).forEach(function(t){var i=eT(t,2),o=i[0],a=i[1];if("className"===o||"class"===o);else if(gs(o,"show")&&gs(gl(o,"show"),e)!==n)o==="".concat("show").concat(ga(e))?r[o]=a:r[o.replace(new RegExp(ga(e)),"")]=a;else if(!gs(o,"show")&&gs(o,e)!==n){var l=gl(o,e);"filter"===l&&"function"==typeof a||(r[l]=a)}}),r}function gc(t,e){return Object.entries(t).reduce(function(t,n){var r=eT(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(ga(i))]=o,t},{})}function gf(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=eT(t,2),a=o[0],l=o[1];e.includes(a)||(-1!==n.indexOf(a)?i[a]=l:r[a]=l)}),[r,i]}function gp(t,e){return pE(t)?t.apply(void 0,eN([],eT(e),!1)):t}function gh(t,e){return t.style.opacity||(t.style.opacity=1),y2(t,{opacity:0},e)}var gd=["$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 gy(t){var e={};for(var n in t)gd.includes(n)&&(e[n]=t[n]);return e}var gg=y3({lineGroup:"line-group",line:"line",regionGroup:"region-group",region:"region"},"grid");function gm(t){return t.reduce(function(t,e,n){return t.push(eN([0===n?"M":"L"],eT(e),!1)),t},[])}function gv(t,e,n){if("surround"===e.type){var r=e.connect,i=e.center;if("line"===(void 0===r?"line":r))return gm(t);if(!i)return[];var o=gn(t[0],i),a=+!n;return t.reduce(function(t,e,n){return 0===n?t.push(eN(["M"],eT(e),!1)):t.push(eN(["A",o,o,0,0,a],eT(e),!1)),t},[])}return gm(t)}var gb=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return eM(e,t),e.prototype.render=function(t,e){t.type,t.center,t.areaFill,t.closed;var n,r,i,o,a,l=e_(t,["type","center","areaFill","closed"]),s=(r=void 0===(n=t.data)?[]:n,t.closed?r.map(function(t){var e=t.points,n=eT(e,1)[0];return eS(eS({},t),{points:eN(eN([],eT(e),!1),[n],!1)})}):r),u=pW(e).maybeAppendByClassName(gg.lineGroup,"g"),c=pW(e).maybeAppendByClassName(gg.regionGroup,"g"),f=(i=t.animate,o=t.isBillboard,a=s.map(function(e,n){return{id:e.id||"grid-line-".concat(n),path:gv(e.points,t)}}),u.selectAll(gg.line.class).data(a,function(t){return t.id}).join(function(t){return t.append("path").each(function(t,e){var n=gp(gy(eS({path:t.path},l)),[t,e,a]);this.attr(eS({class:gg.line.name,stroke:"#D9D9D9",lineWidth:1,lineDash:[4,4],isBillboard:o},n))})},function(t){return t.transition(function(t,e){return y2(this,gp(gy(eS({path:t.path},l)),[t,e,a]),i.update)})},function(t){return t.transition(function(){var t=this,e=gh(this,i.exit);return yJ(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=eT([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=eT([gv(t,n),gv(e.slice().reverse(),n,!0)],2),s=l[0],u=l[1],c=eT([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([eN(["L"],eT(p),!1)],[eN(["L"],eT(f),!1)]);if(!o)throw Error("Arc grid need to specified center");var d=eT([gn(p,o),gn(f,o)],2),y=d[0],g=d[1];return h([eN(["A",y,y,0,0,1],eT(p),!1),eN(["L"],eT(p),!1)],[eN(["A",g,g,0,0,0],eT(f),!1),eN(["L"],eT(f),!1)])}(u[0],u[1],n);l.push({path:c,fill:a[s%a.length]})}return t.selectAll(gg.region.class).data(l,function(t,e){return e}).join(function(t){return t.append("path").each(function(t,e){var n=gp(t,[t,e,l]);this.attr(n)}).attr("className",gg.region.name)},function(t){return t.transition(function(t,e){return y2(this,gp(t,[t,e,l]),r.update)})},function(t){return t.transition(function(){var t=this,e=gh(this,r.exit);return yJ(e,function(){return t.remove()}),e})}).transitions()}(c,s,t);return eN(eN([],eT(f),!1),eT(p),!1)},e}(pD),gx=function(t,e,n){for(var r=0,i=pU(e)?e.split("."):e;t&&r<i.length;)t=t[i[r++]];return void 0===t||r<i.length?n:t},gO=function(t){return pj(t,"Number")};function gw(t){return"function"==typeof t?t():pU(t)||gO(t)?new pB({style:{text:String(t)}}):t}function gE(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 gk(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 gM(t,e){return Object.fromEntries(Object.entries(t).map(function(t){var n=eT(t,2);return[n[0],gp(n[1],e)]}))}function gS(t,e){return e&&pE(e)?t.filter(e):t}function g_(t,e){var n=e.startAngle;return(e.endAngle-n)*t+n}function gP(t,e){if("linear"===e.type){var n=eT(e.startPos,2),r=n[0],i=n[1],o=eT(e.endPos,2),a=eT([o[0]-r,o[1]-i],2);return gr([a[0],a[1]])}var l=gi(g_(t,e));return[-Math.sin(l),Math.cos(l)]}function gj(t,e,n){var r;return r=gP(t,n),"positive"!==e?[r[1],-r[0]]:[-r[1],r[0]]}function gA(t,e){return gj(t,e.labelDirection,e)}function gT(t,e){var n,r,i,o,a,l,s,u,c,f;return"linear"===e.type?(r=(n=eT(e.startPos,2))[0],i=n[1],o=eT(e.endPos,2),a=eT([o[0]-r,o[1]-i],2),[r+a[0]*t,i+a[1]*t]):(l=e.radius,u=(s=eT(e.center,2))[0],c=s[1],[u+l*Math.cos(f=gi(g_(t,e))),c+l*Math.sin(f)])}function gC(t){return 0===gP(0,t)[1]}function gN(t){return 0===gP(0,t)[0]}function gL(t,e,n,r,i){var o=e-t,a=eT([i,i],2),l=a[0],s=a[1],u=eT([gi(t),gi(e)],2),c=u[0],f=u[1],p=function(t){return[n+i*Math.cos(t),r+i*Math.sin(t)]},h=eT(p(c),2),d=h[0],y=h[1],g=eT(p(f),2),v=g[0],b=g[1];if(e-t==360){var x=eT(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 gI(t){var e=eT(t,2),n=eT(e[0],2),r=n[0],i=n[1],o=eT(e[1],2);return{x1:r,y1:i,x2:o[0],y2:o[1]}}function gR(t){var e=t.type,n=t.gridCenter;return"linear"===e?n:n||t.center}function gD(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 gF=function(t,e,n){if(void 0===n&&(n=128),!pE(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 M9?M9(t,n):(M8||(M8=lf.offscreenCanvasCreator.getOrCreateContext(void 0)),M8.font=[o,a,i,"".concat(n,"px"),r].join(" "),M8.measureText(t).width)},function(t,e){return[t,Object.values(e||gB(t)).join()].join("")},4096),gB=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 gz(t){return"text"===t.nodeName?t:"g"===t.nodeName&&1===t.children.length&&"text"===t.children[0].nodeName?t.children[0]:null}function gW(t,e){var n=gz(t);n&&n.attr(e)}function g$(t,e,n){void 0===n&&(n="..."),gW(t,{wordWrap:!0,wordWrapWidth:e,maxLines:1,textOverflow:n})}function gG(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=eT([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 gH=function(t){return void 0!==t&&null!=t&&!Number.isNaN(t)};function gV(t){if(gO(t))return[t,t,t,t];if(pT(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 gU=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 gq(t,e){var n=t.getEulerAngles()||0;t.setEulerAngles(0);var r=t.getLocalBounds(),i=eT(r.min,2),o=i[0],a=i[1],l=eT(r.max,2),s=l[0],u=l[1],c=gY(t),f=c.width,p=c.height,h=0,d=0,y=o,g=a,v=gz(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=eT(gV(e),4),w=O[0],E=void 0===w?0:w,k=O[1],M=void 0===k?0:k,S=O[2],_=O[3],P=new gU((h+=o)-(void 0===_?M:_),(d+=a)-E,h+f+M,d+p+(void 0===S?E:S));return t.setEulerAngles(n),P.rotatedPoints(gi(n),y,g)}function gY(t){return t.__bbox__?t.__bbox__:t.getBBox()}function gX(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 gK(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 gZ(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=eT(o,2),s=l[0],u=l[1],c="negative"===r?0:i,f=-a-c,p=a+c,h=eT(gV(e),4),d=h[0],y=h[1],g=h[2];return new gU(s+f-h[3],u+f-d,s+p+y,u+p+g)}var v=eT(t.startPos,2),b=v[0],x=v[1],O=eT(t.endPos,2),w=O[0],E=O[1],k=eT(gN(t)?[-e,0,e,0]:[0,e,0,-e],4),M=k[0],S=k[1],_=k[2],P=k[3],j=y8(gA(0,t),i),A=new gU(b,x,w,E);return A.x1+=P,A.y1+=M,A.x2+=S+j[0],A.y2+=_+j[1],A}(e,o);try{for(var u=eA(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=gq(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=gK(t[0],t[1],e[0]),r=gK(t[0],t[1],e[1]),i=gK(e[0],e[1],t[0]),o=gK(e[0],e[1],t[1]);return!!(n!==r&&i!==o||0===n&&gX(t,e[0])||0===r&&gX(t,e[1])||0===i&&gX(e,t[0])||0===o&&gX(e,t[1]))}(a,r)){if(0===gK(a[0],e,a[1]))return gX(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=gq(t,n).flat(1),a=gq(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=eA(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=eT(t,4),r=n[0],i=n[1],o=n[2],a=n[3],l=eT(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,gV(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 gQ(t,e){return(void 0===e&&(e={}),yZ(t))?0:"number"==typeof t?t:Math.floor(gF(t,e))}function gJ(t){var e=t.getLocalBounds(),n=eT([e.min,e.max],2),r=eT(n[0],2),i=r[0],o=r[1],a=eT(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 g0(t,e){var n=eT(t,2),r=n[0],i=n[1],o=eT(e,2),a=o[0],l=o[1];return r!==a&&i===l}var g1={parity:function(t,e){var n=e.seq,r=void 0===n?2:n;return t.filter(function(t,e){return!(e%r)||(pM(t),!1)})}},g2=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=g1.parity,c=function(t){return t.forEach(r.show),t},f=2,p=t.slice(),h=t.slice(),d=Math.min.apply(Math,eN([1],eT(t.map(function(t){return gY(t).width})),!1));if("linear"===n.type&&(gC(n)||gN(n))){var y=gJ(t[0]).left,g=Math.abs(gJ(t[a-1]).right-y)||1;f=Math.max(Math.floor(a*d/g),f)}for(l&&(i=p.splice(0,1)[0]),s&&(o=p.splice(-1,1)[0],p.reverse()),c(p);f<t.length&&gZ((o?eN(eN([o],eT(h),!1),[i],!1):eN([i],eT(h),!1)).filter(gH),n,null==e?void 0:e.margin).length;){if(o&&!i&&f%2==0){var v=p.splice(0,1);v.forEach(r.hide)}else if(o&&i){var v=p.splice(0,1);v.forEach(r.hide)}h=u(c(p),{seq:f}),f++}}}],["rotate",function(t,e,n,r){var i,o,a=e.optionalAngles,l=e.margin,s=e.recoverWhenFailed,u=t.map(function(t){return t.getLocalEulerAngles()}),c=function(e){return t.forEach(function(t,n){var i=Array.isArray(e)?e[n]:e;r.rotate(t,+i)})};try{for(var f=eA(void 0===a?[0,45,90]:a),p=f.next();!p.done;p=f.next()){var h=p.value;if(c(h),gZ(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=gB(r.getTextShape(t[0])),h=gQ(void 0===u?" ":u,p),d=a?gQ(a,p):h,y=gQ(s,p);(yZ(y)||y===1/0)&&(y=Math.max.apply(null,t.map(function(t){return gY(t).width})));for(var g=t.slice(),v=eT(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=gZ(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,eN([],eT(h),!1)),y=(i=n.type,o=n.labelDirection,"linear"===i&&gC(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),gZ(t,n,p).length<1)return;(void 0===c||c)&&g(h)}}]]);function g5(t){for(var e=t;e<0;)e+=360;return Math.round(e%360)}function g3(t,e){var n=eT(t,2),r=n[0],i=n[1],o=eT(e,2),a=o[0],l=o[1],s=eT([r*a+i*l,r*l-i*a],2),u=s[0];return Math.atan2(s[1],u)}function g4(t,e,n){var r=n.type,i=n.labelAlign,o=gA(t,n),a=g5(e),l=g5(go(g3([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?gD(a,0,90,!1,!0)?s="start":(gD(a,0,90)||gD(a,270,360))&&(s="start"):90===l?gD(a,0,90,!1,!0)?s="start":(gD(a,90,180)||gD(a,270,360))&&(s="end"):270===l?gD(a,0,90,!1,!0)?s="end":(gD(a,90,180)||gD(a,270,360))&&(s="start"):180===l&&(90===a?s="start":(gD(a,0,90)||gD(a,270,360))&&(s="end")):"parallel"===i?u=gD(l,0,180,!0)?"top":"bottom":"horizontal"===i?gD(l,90,270,!1)?s="end":(gD(l,270,360,!1)||gD(l,0,90))&&(s="start"):"perpendicular"===i&&(s=gD(l,90,270)?"end":"start"),{textAlign:s,textBaseline:u}}function g6(t,e,n){var r=n.showTick,i=n.tickLength,o=n.tickDirection,a=n.labelDirection,l=n.labelSpacing,s=e.indexOf(t),u=gp(l,[t,s,e]),c=eT([gA(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=eT(y9(y8(c[0],u+(1===c[1]?gp(r?i:0,[t,s,e]):0)),gT(t.value,n)),2);return{x:f[0],y:f[1]}}function g8(t,e){"text"===t.nodeName&&t.attr(e)}function g9(t){var e,n,r,i;e=this.node().childNodes,n={hide:pM,show:pk,rotate:function(e,n){var r,i,o;r=+n,e.setLocalEulerAngles(r),i=g4(e.__data__.value,r,t),(o=e.querySelector(y6.labelItem.class))&&g8(o,i)},ellipsis:function(t,e,n){t&&g$(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"),gW(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=g2.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 g7(t,e,n,r,i){var o,a=n.indexOf(e),l=pW(t).append(pE(o=i.labelFormatter)?function(){return gw(gp(o,[e,a,n,gA(e.value,i)]))}:function(){return gw(e.label||"")}).attr("className",y6.labelItem.name).node(),s=eT(gf(gM(r,[e,a,n])),2),u=s[0],c=s[1],f=c.transform,p=e_(c,["transform"]);gG(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=gA(t.value,n),s=gP(t.value,n);return"horizontal"===o?0:(gD(r=(go(a="perpendicular"===o?g3([1,0],l):g3([s[0]<0?-1:1,0],s))+360)%180,-90,90)||(r+=180),r)}(e,t,i);return t.setLocalEulerAngles(+h),g8(l,eS(eS({},g4(e.value,h,i)),u)),gG(t,f),t.attr(p),l}function mt(t,e){return gj(t,e.tickDirection,e)}function me(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=pW(this),l=r.tickFormatter,s=mt(t.value,r),u="line",pE(l)&&(u=function(){return gp(l,[t,e,n,s])}),a.append(u).attr("className",y6.tickItem.name));c=mt(t.value,r),x=(h=eT((f=gp(r.tickLength,[t,e,n]),[[0,0],[(p=eT(c,2))[0]*f,p[1]*f]]),2),y=(d=eT(h[0],2))[0],g=d[1],b={x1:y,x2:(v=eT(h[1],2))[0],y1:g,y2:v[1]}).x1,O=b.x2,w=b.y1,E=b.y2,M=(k=eT(gf(gM(i,[t,e,n,c])),2))[0],S=k[1],"line"===_.node().nodeName&&_.styles(eS({x1:x,x2:O,y1:w,y2:E},M)),this.attr(S),_.styles(M);var P=eT(gT(t.value,r),2);return y2(this,{x:P[0],y:P[1]},o)}var mn=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}(),mr=y3({text:"text"},"title");function mi(t){return/\S+-\S+/g.test(t)?t.split("-").map(function(t){return t[0]}):t.length>2?[t[0]]:t.split("")}function mo(t,e){var n=Object.entries(e).reduce(function(e,n){var r=eT(n,2),i=r[0],o=r[1];return t.node().attr(i)||(e[i]=o),e},{});t.styles(n)}var ma=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 eM(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(mr.text.class);if(!a)return new mn(0,0,+e,+n);var l=a.getBBox(),s=l.width,u=l.height,c=eT(gV(i),4),f=c[0],p=c[1],h=c[2],d=c[3],y=eT([0,0,+e,+n],4),g=y[0],v=y[1],b=y[2],x=y[3],O=mi(r);if(O.includes("i"))return new mn(g,v,b,x);O.forEach(function(t,r){var i,o;"t"===t&&(v=(i=eT(0===r?[u+h,+n-u-h]:[0,+n],2))[0],x=i[1]),"r"===t&&(b=eT([+e-s-d],1)[0]),"b"===t&&(x=eT([+n-u-f],1)[0]),"l"===t&&(g=(o=eT(0===r?[s+p,+e-s-p]:[0,+e],2))[0],b=o[1])});var w=eT(gV(o),4),E=w[0],k=w[1],M=w[2],S=w[3],_=eT([S+k,E+M],2),P=_[0],j=_[1];return new mn(g+S,v+E,b-P,x-j)},e.prototype.getBBox=function(){return this.title?this.title.getBBox():new mn(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=e_(t,["width","height","position","spacing"]),b=eT(gf(v),1)[0],x=(a=t.width,l=t.height,s=t.position,u=eT([+a/2,+l/2],2),f=(c=eT([+u[0],+u[1],"center","middle"],4))[0],p=c[1],h=c[2],d=c[3],(y=mi(s)).includes("l")&&(f=(n=eT([0,"start"],2))[0],h=n[1]),y.includes("r")&&(f=(r=eT([+a,"end"],2))[0],h=r[1]),y.includes("t")&&(p=(i=eT([0,"top"],2))[0],d=i[1]),y.includes("b")&&(p=(o=eT([+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;pF(!!v.text,pW(e),function(t){g.title=t.maybeAppendByClassName(mr.text,"text").styles(b).call(mo,{x:O,y:w,textAlign:E,textBaseline:k}).node()})},e}(pD);function ml(t,e,n,r,i){var o=eT(gf(gu(r,"title")),2),a=o[0],l=o[1],s=l.transform,u=e_(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);gG(t.node(),c);var f=function(t,e,n){var r=n.titlePosition,i=void 0===r?"lb":r,o=n.titleSpacing,a=mi(i),l=t.node().getLocalBounds(),s=eT(l.min,2),u=s[0],c=s[1],f=eT(l.halfExtents,2),p=f[0],h=f[1],d=eT(e.node().getLocalBounds().halfExtents,2),y=d[0],g=d[1],v=eT([u+p,c+h],2),b=v[0],x=v[1],O=eT(gV(o),4),w=O[0],E=O[1],k=O[2],M=O[3];if(["start","end"].includes(i)&&"linear"===n.type){var S=n.startPos,_=n.endPos,P=eT("start"===i?[S,_]:[_,S],2),j=P[0],A=P[1],T=eT(y8(gr([-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}}(pW(n._offscreen||n.querySelector(y6.mainGroup.class)),e,r),p=f.x,h=f.y,d=y2(e.node(),{x:p,y:h},i);return gG(t.node(),c),d}function ms(t,e,n,r){var i=t.showLine,o=t.showTick,a=t.showLabel,l=pF(i,e.maybeAppendByClassName(y6.lineGroup,"g"),function(e){return function(t,e,n){var r,i,o,a,l,s,u=e.type,c=gu(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,S=e.truncRange,_=e.lineExtension,P=eT([k,M],2),j=eT(P[0],2),A=j[0],T=j[1],C=eT(P[1],2),N=C[0],L=C[1],I=eT(_?(void 0===(i=_)&&(i=[0,0]),o=eT([k,M,i],3),l=(a=eT(o[0],2))[0],s=a[1],c=(u=eT(o[1],2))[0],f=u[1],h=(p=eT(o[2],2))[0],d=p[1],g=(y=eT([c-l,f-s],2))[0],[(O=(x=eT([-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],B=I[3],z=function(e){return t.selectAll(y6.line.class).data(e,function(t,e){return e}).join(function(t){return t.append("line").attr("className",function(t){return"".concat(y6.line.name," ").concat(t.className)}).styles(n).transition(function(t){return y2(this,gI(t.line),!1)})},function(t){return t.styles(n).transition(function(t){return y2(this,gI(t.line),r.update)})},function(t){return t.remove()}).transitions()};if(!E||!S)return z([{line:[[A+R,T+D],[N+F,L+B]],className:y6.line.name}]);var W=eT(S,2),$=W[0],G=W[1],H=N-A,V=L-T,U=eT([A+H*$,T+V*$],2),q=U[0],Y=U[1],X=eT([A+H*G,T+V*G],2),K=X[0],Z=X[1],Q=z([{line:[[A+R,T+D],[q,Y]],className:y6.lineFirst.name},{line:[[K,Z],[N+F,L+B]],className:y6.lineSecond.name}]);return e.truncRange,e.truncShape,e.lineExtension,Q}(t,e,gk(c,"arrow"),n):(r=gk(c,"arrow"),i=e.startAngle,o=e.endAngle,a=e.center,l=e.radius,s=t.selectAll(y6.line.class).data([{path:gL.apply(void 0,eN(eN([i,o],eT(a),!1),[l],!1))}],function(t,e){return e}).join(function(t){return t.append("path").attr("className",y6.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=eT(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=eT(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,eS({fill:"both"},r))}(this,(e=(t=this.attributes).startAngle,r=t.endAngle,s=t.center,u=t.radius,eN(eN([e,r],eT(s),!1),[u],!1)),eN(eN([i,o],eT(a),!1),[l],!1),n.update);if(f){var p=function(){var t=gx(c.attributes,"__keyframe_data__");c.style.path=gL.apply(void 0,eN([],eT(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(y6.line.class):l?t.select(y6.lineSecond.class):t.select(y6.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=gw(s);p.attr(r),gE(p,c,!0),o.style("markerEnd",p).style("markerEndOffset",-u)}(t,u,e,c),s}(e,t,r)})||[],s=pF(o,e.maybeAppendByClassName(y6.tickGroup,"g"),function(e){var i,o;return i=gS(n,t.tickFilter),o=gu(t,"tick"),e.selectAll(y6.tick.class).data(i,function(t){return t.id||t.label}).join(function(e){return e.append("g").attr("className",y6.tick.name).transition(function(e,n){return me.call(this,e,n,i,t,o,!1)})},function(e){return e.transition(function(e,n){return this.removeChildren(),me.call(this,e,n,i,t,o,r.update)})},function(t){return t.transition(function(){var t=this,e=gh(this.childNodes[0],r.exit);return yJ(e,function(){return t.remove()}),e})}).transitions()})||[],u=pF(a,e.maybeAppendByClassName(y6.labelGroup,"g"),function(e){var i,o;return i=gS(n,t.labelFilter),o=gu(t,"label"),e.selectAll(y6.label.class).data(i,function(t,e){return e}).join(function(r){return r.append("g").attr("className",y6.label.name).transition(function(e){return g7(this,e,n,o,t),this.attr(g6(e,n,t)),this.__bbox__=e.bbox,null}).call(function(){return g9.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&&pM(t),e.isVisible()&&pk(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=eT(t.getLocalPosition(),2),n=e[0],r=e[1],i=t.attr("r");return[n-i,r-i]}return t.getLocalPosition()},p=eT(f(t),2),h=p[0],d=p[1],y=eT(f(e),2),g=eT([(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,")")}],eS(eS({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)"}],eS(eS({fill:"both"},n),{duration:u+c,delay:s+u-c}));return yJ(E,i),[w,E]}(this.querySelector(y6.labelItem.class),g7(this,e,n,o,t),r.update),a=y2(this,g6(e,n,t),r.update);return this.__bbox__=e.bbox,eN(eN([],eT(i),!1),[a],!1)}).call(function(n){var r,i;r=gx(n,"_transitions").flat().filter(gH),i=function(){return g9.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=gh(this.childNodes[0],r.exit);return yJ(e,function(){return pW(t).remove()}),e})}).transitions()})||[];return eN(eN(eN([],eT(l),!1),eT(s),!1),eT(u),!1).filter(function(t){return!!t})}var mu=function(t){function e(e){return t.call(this,e,y4)||this}return eM(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=yQ(void 0===n?a:n),h=pF(s,pW(e).maybeAppendByClassName(y6.gridGroup,"g"),function(e){var n,r,i,o,a,l,s,u;return r=(n=gu(t,"grid")).type,i=n.areaFill,o=gR(t),a=gS(f,t.gridFilter),s="segment"===r?(l=t.gridLength,a.map(function(e,n){var r=e.value,i=eT(gT(r,t),2),o=i[0],a=i[1],s=eT(y8(gj(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=gR(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=eT(r,2),o=i[0],a=i[1];return t.map(function(t,r){var i=eT(gT(t.value,e),2),l=eT([i[0]-o,i[1]-a],2),s=l[0],u=l[1],c=[];return n.forEach(function(t){var e=gi(t),n=eT([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=eS(eS({},n),{center:o,areaFill:pE(i)?a.map(function(t,e){return gp(i,[t,e,a])}):i,animate:p,data:s}),e.selectAll(y6.grid.class).data([1]).join(function(t){return t.append(function(){return new gb({style:u})}).attr("className",y6.grid.name)},function(t){return t.transition(function(){return this.update(u)})},function(t){return t.remove()}).transitions()})||[],d=pW(e).maybeAppendByClassName(y6.mainGroup,"g");i&&(!this.initialized&&p.enter||this.initialized&&p.update)&&ms(t,pW(this.offscreenGroup),f,yQ(!1));var y=ms(t,pW(d.node()),f,p),g=pF(l,pW(e).maybeAppendByClassName(y6.titleGroup,"g"),function(e){var n;return n=t.titleText,e.selectAll(y6.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 gw(n)}).attr("className",y6.title.name).transition(function(){return ml(pW(this),e,r,t,p.enter)})},function(n){return n.transition(function(){return ml(pW(this),e,r,t,p.update)})},function(t){return t.remove()}).transitions()})||[];return eN(eN(eN([],eT(h),!1),eT(y),!1),eT(g),!1).flat().filter(function(t){return!!t})},e}(pD),mc=function(t){var e=typeof t;return null!==t&&"object"===e||"function"===e},mf=function(t,e){if(t){if(tz(t))for(var n,r=0,i=t.length;r<i&&!1!==e(t[r],r);r++);else if(mc(t)){for(var o in t)if(t.hasOwnProperty(o)&&!1===e(t[o],o))break}}},mp=function(t,e,n){if(!tz(t)&&!t$(t))return t;var r=n;return mf(t,function(t,n){r=e(r,t,n)}),r},mh=function(t,e){return mp(t,function(t,n,r){return e.includes(r)||(t[r]=n),t},{})},md=function(t){var e=s9(t);return e.charAt(0).toUpperCase()+e.substring(1)};function my(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 mg=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function mm(t){var e;if(!(e=mg.exec(t)))throw Error("invalid format: "+t);return new mv({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 mv(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 mb(t,e){var n=my(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")}mm.prototype=mv.prototype,mv.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 mx={"%":(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)=>mb(100*t,e),r:mb,s:function(t,e){var n=my(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(M7=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")+my(t,Math.max(0,e+o-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function mO(t){return t}var mw=Array.prototype.map,mE=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"];function mk(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=eT([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 mn(e,n,r-e,i-n)}Se=(St=function(t){var e,n,r,i=void 0===t.grouping||void 0===t.thousands?mO:(e=mw.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?mO:(r=mw.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=mm(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"):mx[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=mx[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?mE[8+M7/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 S=p.length+t.length+k.length,_=S<d?Array(d-S+1).join(e):"";switch(y&&h&&(t=i(_+t,_.length?d-k.length:1/0),_=""),n){case"<":t=p+t+k+_;break;case"=":t=p+_+t+k;break;case"^":t=_.slice(0,S=_.length>>1)+p+t+k+_.slice(S);break;default:t=_+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=mm(t)).type="f",t)),i=3*Math.max(-8,Math.min(8,Math.floor(((n=my(Math.abs(n=e)))?n[1]:NaN)/3))),o=Math.pow(10,-i),a=mE[8+i/3];return function(t){return r(o*t)+a}}}}({thousands:",",grouping:[3],currency:["$",""]})).format,St.formatPrefix;var mM=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=eT([0,0],2),y=d[0],g=d[1],v=e.map(function(t){var e,n=t.width,r=t.height,i=eT([y,g],2),o=i[0],a=i[1];return y=(e=eT([y+n*h[0],g+r*h[1]],2))[0],g=e[1],new mn(o,a,n,r)}),b=mk(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=mn.fromRect(t);return r.x=f?e+x[s]:e,r.y=f?n:n+x[s],r});mk(O);var w=function(t){var e=eT(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=mn.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=mn.fromRect(e);return i.x+=null!=(n=t.x)?n:0,i.y+=null!=(r=t.y)?r:0,i})},mS=function(t,e,n){return[]},m_=function(t,e,n){if(0===e.length)return[];var r={flex:mM,grid:mS},i=n.display in r?r[n.display]:null;return(null==i?void 0:i.call(null,t,e,n))||[]},mP=function(t){function e(e){var n=t.call(this,e)||this;n.layoutEvents=[M1.BOUNDS_CHANGED,M1.INSERTED,M1.REMOVED],n.$margin=gV(0),n.$padding=gV(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 eM(e,t),Object.defineProperty(e.prototype,"margin",{get:function(){return this.$margin},set:function(t){this.$margin=gV(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"padding",{get:function(){return this.$padding},set:function(t){this.$padding=gV(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=eT(this.$margin,4),a=o[0],l=o[1],s=o[2],u=o[3];return new mn((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=eT(this.$padding,4),i=r[0],o=r[1],a=r[2],l=r[3],s=eT(this.$margin,4),u=s[0];return new mn(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=m_(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}(lT),mj=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 mA(t,e,n){return t.querySelector(e)?up(t).select(e):up(t).append(n)}function mT(t){return Array.isArray(t)?t.join(", "):`${t||""}`}function mC(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 mN extends mP{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 mL extends mN{update(t){var e;let{subOptions:n}=t;this.attr(t),null==(e=this.child)||e.update(n)}}function mI(t,e){var n;return null==(n=t.filter(t=>t.getOptions().name===e))?void 0:n[0]}function mR(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 mD(t){let e=["arrow","crosshairs","grid","handle","handleLabel","indicator","label","line","tick","tip","title","trunc"],{style:n}=t,r=mj(t,["style"]),i={};return Object.entries(r).forEach(([t,n])=>{e.includes(t)?i[`show${md(t)}`]=n:i[t]=n}),Object.assign(Object.assign({},i),n)}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};function mB(t,e){let{eulerAngles:n,origin:r}=e;r&&t.setOrigin(r),n&&t.rotate(n[0],n[1],n[2])}function mz(t){let{innerWidth:e,innerHeight:n,depth:r}=t.getOptions();return[e,n,r]}function mW(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]=ce(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(eg(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 u7({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(!ex(e))return i;let o=e.map("bottom"===t?[i,1]:[0,i]);if("bottom"===t){let t=o[0];return new u7({domain:[0,n],range:[0,1]}).map(t)}if("left"===t){let t=o[1];return new u7({domain:[0,r],range:[0,1]}).map(t)}return i}}(a,l),y=t=>["top","bottom","center","outer"].includes(t),g=t=>["left","right"].includes(t);return eg(l)||ey(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:em(l)&&"center"===a||ey(l)&&(null==(o=t.getTicks)?void 0:o.call(t))&&y(a)||ey(l)&&g(a)?1-u:u,label:f(p(uw(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:g(a)?1-l:l,label:f(p(uw(e),n,r)),id:String(n)}})}let m$=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?Se(n):n;return t(Object.assign(Object.assign({},e),{labelFormatter:s,labelFilter:(t,e,n)=>r(l[e],e,l),scale:a}))(i)}},mG=m$(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=mF(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(),S=Object.assign(Object.assign(Object.assign({},function(t,e,n,r,i,o){let a=function(t,e,n,r,i,o){let a=n.axis,l=["top","right","bottom","left"].includes(i)?n[`axis${un(i)}`]:n.axisLinear,s=t.getOptions().name;return Object.assign({},a,l,n[`axis${md(s)}`]||{})}(t,0,n,0,i,0);if("center"===i)return Object.assign(Object.assign(Object.assign(Object.assign({},a),{labelDirection:"right"===r?"negative":"positive"}),"center"===r?{labelTransform:"translate(50%,0)"}:null),{tickDirection:"right"===r?"negative":"positive",labelSpacing:4*("center"!==r),titleSpacing:10*("vertical"===o||o===-Math.PI/2),tick:"center"!==r&&void 0});return a}(E,0,x,e,l,o)),u),g),_=function(t,e,n="xy"){let[r,i,o]=mz(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]=ew(r),[f,p]=eE(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=eg(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=mW(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({},S),{type:"linear",data:T,crossSize:s,titleText:mT(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,S),grid:(O=S.grid,!(eg(b)&&ey(b)||eb(b))&&(void 0===O?!!E.getTicks:O)),gridLength:_,line:!0,indexBBox:y}),S.line?null:{lineOpacity:0}),P),j),n);return C.labelOverlap.find(t=>"hide"===t.type)&&(C.crossSize=!1),new mu({className:"axis",style:mD(C)})}}),mH=m$(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=mF(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=mW(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]=ew(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]=eE(i),[h,d]=mz(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=mD(tG({},w,E,O,Object.assign(Object.assign({type:"arc",data:v,titleText:mT(p),grid:h},d),u)));return new mu({style:mh(k,["transform"])})}});mG.props={defaultPosition:"center",defaultSize:45,defaultOrder:0,defaultCrossPadding:[12,12],defaultPadding:[12,12]},mH.props={defaultPosition:"outer",defaultOrientation:"vertical",defaultSize:45,defaultOrder:0,defaultCrossPadding:[12,12],defaultPadding:[12,12]};let mV=t=>(...e)=>{let n=mG(Object.assign({},{crossPadding:50},t))(...e);return mB(n,t),n};mV.props=Object.assign(Object.assign({},mG.props),{defaultPosition:"bottom"});let mU=t=>(...e)=>{let n=mG(Object.assign({},{crossPadding:10},t))(...e);return mB(n,t),n};mU.props=Object.assign(Object.assign({},mG.props),{defaultPosition:"left"});var mq=function(){},mY=function(t,e,n){var r=t,i=pU(e)?e.split("."):e;return i.forEach(function(t,e){e<i.length-1?(pV(r[t])||(r[t]=gO(i[e+1])?[]:{}),r=r[t]):r[t]=n}),t},mX=function(t,e,n){return t<e?e:t>n?n:t},mK=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)}},mZ=y3({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"),mQ=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 lT({class:mZ.contentGroup.name})),n.playWindow=n.contentGroup.appendChild(new lT({class:mZ.playWindow.name})),n.innerCurrPage=n.defaultPage,n}return eM(e,t),Object.defineProperty(e.prototype,"defaultPage",{get:function(){return mX(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=eT(((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,eN([],eT(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 mn(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=eT(this.getFollowingPageDiff(t),2),s=l[0],u=l[1];this.playState="running";var c=y1(o,[{transform:"translate(0, 0)"},{transform:"translate(".concat(-s,", ").concat(-u,")")}],n);return yJ(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:mX(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:mX(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(mZ.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)?pk(e):pM(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=eT("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=eT(b.offset,3),O=eT(x[0],2),w=O[0],E=O[1],k=eT(x[1],2),M=k[0],S=k[1],_=eT(x[2],2),P=_[0],j=_[1],A=b.textAlign,T=n.querySelector("text");T&&(T.style.textAlign=A),t.setLocalPosition(w,E),n.setLocalPosition(M,S),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(mZ.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=eT(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(mZ.controller,"g");if(pS(l.node(),a),a){var s=gu(this.attributes,"button"),u=gu(this.attributes,"pageNum"),c=eT(gf(s),2),f=c[0],p=c[1],h=f.size,d=e_(f,["size"]),y=!l.select(mZ.prevBtnGroup.class).node(),g=l.maybeAppendByClassName(mZ.prevBtnGroup,"g").styles(p);this.prevBtnGroup=g.node();var v=g.maybeAppendByClassName(mZ.prevBtn,"path"),b=l.maybeAppendByClassName(mZ.nextBtnGroup,"g").styles(p);this.nextBtnGroup=b.node(),[v,b.maybeAppendByClassName(mZ.nextBtn,"path")].forEach(function(t){t.styles(eS(eS({},d),{transformOrigin:"center"})),gE(t.node(),h,!0)});var x=l.maybeAppendByClassName(mZ.pageInfoGroup,"g");this.pageInfoGroup=x.node(),x.maybeAppendByClassName(mZ.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=pW(e);this.renderClipPath(n),this.renderController(n),this.setVisiblePages([this.defaultPage]),this.goTo(this.defaultPage)},e.prototype.bindEvents=function(){var t=this,e=mK(function(){return t.render(t.attributes,t)},50);this.playWindow.addEventListener(M1.INSERTED,e),this.playWindow.addEventListener(M1.REMOVED,e)},e}(pD);function mJ(t,e,n){return void 0===t&&(t="horizontal"),"horizontal"===t?e:n}pq.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"]]}),pq.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]]}),pq.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 m0=y3({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"),m1=function(t){function e(e){return t.call(this,e,{span:[1,1],marker:function(){return new lP({style:{r:6}})},markerSize:10,labelFill:"#646464",valueFill:"#646464",labelFontSize:12,valueFontSize:12,labelTextBaseline:"middle",valueTextBaseline:"middle"})||this}return eM(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=eT(gV(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=eT(this.spacing,2),f=c[0],p=c[1];if(r){var h=r-n-f-p,d=eT(this.span,2);s=(t=eT([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=eT(gV(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=eT(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(m0.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=gu(this.attributes,"marker");this.markerGroup=t.maybeAppendByClassName(m0.markerGroup,"g").style("zIndex",0),pF(!!n,this.markerGroup,function(){var t=e.markerGroup.node(),i=t.getElementsByClassName(m0.marker.name)[0],o=n();i?o.nodeName===i.nodeName?(!function(t,e){var n,r,i=e.attributes;try{for(var o=eA(Object.entries(i)),a=o.next();!a.done;a=o.next()){var l=eT(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),pW(i).styles(r)):(i.remove(),pW(o).attr("className",m0.marker.name).styles(r),t.appendChild(o)):(pW(o).attr("className",m0.marker.name).styles(r),t.appendChild(o)),e.markerGroup.node().scale(1/e.markerGroup.node().getScale()[0]),gE(e.markerGroup.node(),e.scaleSize,!0)})},e.prototype.renderLabel=function(t){var e=gu(this.attributes,"label"),n=e.text,r=e_(e,["text"]);this.labelGroup=t.maybeAppendByClassName(m0.labelGroup,"g").style("zIndex",0),this.labelGroup.maybeAppendByClassName(m0.label,function(){return gw(n)}).styles(r)},e.prototype.renderValue=function(t){var e=this,n=gu(this.attributes,"value"),r=n.text,i=e_(n,["text"]);this.valueGroup=t.maybeAppendByClassName(m0.valueGroup,"g").style("zIndex",0),pF(this.showValue,this.valueGroup,function(){e.valueGroup.maybeAppendByClassName(m0.value,function(){return gw(r)}).styles(i)})},e.prototype.renderBackground=function(t){var e=this.shape,n=e.width,r=e.height,i=gu(this.attributes,"background");this.background=t.maybeAppendByClassName(m0.backgroundGroup,"g").style("zIndex",-1),this.background.maybeAppendByClassName(m0.background,"rect").styles(eS({width:n,height:r},i))},e.prototype.adjustLayout=function(){var t=this.layout,e=t.labelWidth,n=t.valueWidth,r=t.height,i=eT(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}),g$(this.labelGroup.select(m0.label.class).node(),Math.ceil(e)),this.showValue&&(this.valueGroup.styles({x:l,y:s}),g$(this.valueGroup.select(m0.value.class).node(),Math.ceil(n)))},e.prototype.render=function(t,e){var n=pW(e);this.renderMarker(n),this.renderLabel(n),this.renderValue(n),this.renderBackground(n),this.adjustLayout()},e}(pD),m2=y3({page:"item-page",navigator:"navigator",item:"item"},"items"),m5=function(t,e,n){return(void 0===n&&(n=!0),t)?e(t):n},m3=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:mq,mouseenter:mq,mouseleave:mq})||this;return n.navigatorShape=[0,0],n}return eM(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=gu(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:eS({layout:n,labelText:l,valueText:s},Object.fromEntries(Object.entries(r).map(function(n){var r=eT(n,2);return[r[0],gp(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=eT(this.navigatorShape,1)[0],l=eT(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=eT(v,2),x=b[0],O=b[1],w=(r-a-(u-1)*o)/u,E=e.getBBox().height,k=eT([0,0],2),M=k[0],S=k[1];return"horizontal"===n?(M=(p=eT([f,x*(E+i)],2))[0],S=p[1],f=O===u-1?0:f+w+o):(M=(h=eT([O*(w+o),f],2))[0],S=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:S}})},e.prototype.getFlexLayout=function(){var t=this.attributes,e=t.width,n=t.height,r=t.rowPadding,i=t.colPadding,o=eT(this.navigatorShape,1)[0],a=eT(this.grid,2),l=a[0],s=a[1],u=eT([e-o,n],2),c=u[0],f=u[1],p=eT([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&&m5(v,function(t){return t<s})?(h=(n=eT([x+k,O,M],3))[0],d=n[1],x=n[2]):(b=(o=eT([b+1,0,0,O+E+r],4))[0],v=o[1],x=o[2],(O=o[3])+E<=f&&m5(b,function(t){return t<l}))?(h=(a=eT([x,O,w],3))[0],d=a[1],x=a[2]):(h=(u=eT([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 mJ(this.attributes.orientation,t,e)},e.prototype.flattenPage=function(t){t.querySelectorAll(m2.item.class).forEach(function(e){t.appendChild(e)}),t.querySelectorAll(m2.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);pW(t).selectAll(m2.item.class).data(this.renderData,function(t){return t.id}).join(function(t){return t.append(function(t){return new m1({style:t.style})}).attr("className",m2.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=eT(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=eT(t,2);return{page:e[0],layouts:e[1]}}),i=eN([],eT(this.navigator.getContainer().children),!1);r.forEach(function(t){var e=t.layouts,r=n.pageViews.appendChild(new lT({className:m2.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),mY(s,"__layout__",t),s.update({x:e,y:n,width:a,height:l})})}),this.relayoutNavigator()},e.prototype.renderNavigator=function(t){var e=pN({orientation:this.attributes.orientation},gu(this.attributes,"nav")),n=this;return t.selectAll(m2.navigator.class).data(["nav"]).join(function(t){return t.append(function(){return new mQ({style:e})}).attr("className",m2.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(pW(e));this.renderItems(r.getContainer()),this.adjustLayout()}},e.prototype.dispatchCustomEvent=function(t,e){var n=new a3(t,{detail:e});this.dispatchEvent(n)},e}(pD),m4=y3({markerGroup:"marker-group",marker:"marker",labelGroup:"label-group",label:"label"},"handle"),m6={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},m8=function(t){function e(e){return t.call(this,e,m6)||this}return eM(e,t),e.prototype.render=function(t,e){var n=pW(e).maybeAppendByClassName(m4.markerGroup,"g");this.renderMarker(n);var r=pW(e).maybeAppendByClassName(m4.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?mJ(r,"horizontalHandle","verticalHandle"):i;pF(!!o,t,function(t){var n=gu(e.attributes,"marker"),r=eS({symbol:o},n);e.marker=t.maybeAppendByClassName(m4.marker,function(){return new pq({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;pF(r,t,function(t){var n,r=gu(e.attributes,"label"),o=r.text,s=e_(r,["text"]),u=(null==(n=t.select(m4.marker.class))?void 0:n.node().getBBox())||{},c=u.width,f=u.height,p=eT(mJ(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(m4.label,"text").styles(eS(eS({},s),{x:h,y:d,text:l(o).toString(),textAlign:y,textBaseline:g}))})},e}(pD),m9={showTitle:!0,padding:0,orientation:"horizontal",backgroundFill:"transparent",titleText:"",titleSpacing:4,titlePosition:"top-left",titleFill:"#2C3542",titleFontWeight:"bold",titleFontFamily:"sans-serif",titleFontSize:12},m7=pN({},m9,{}),vt=pN({},m9,gc(m6,"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"}),ve=y3({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"),vn=function(t){function e(e){return t.call(this,e,m7)||this}return eM(e,t),e.prototype.renderTitle=function(t,e,n){var r=this.attributes,i=r.showTitle,o=r.titleText,a=eT(gf(gu(this.attributes,"title")),2),l=a[0],s=a[1];this.titleGroup=t.maybeAppendByClassName(ve.titleGroup,"g").styles(s);var u=eS(eS({width:e,height:n},l),{text:i?o:""});this.title=this.titleGroup.maybeAppendByClassName(ve.title,function(){return new ma({style:u})}).update(u)},e.prototype.renderItems=function(t,e){var n=e.x,r=e.y,i=e.width,o=e.height,a=eT(gf(gu(this.attributes,"title",!0)),2),l=a[0],s=a[1],u=eS(eS({},l),{width:i,height:o,x:0,y:0});this.itemsGroup=t.maybeAppendByClassName(ve.itemsGroup,"g").styles(eS({x:n,y:r},s));var c=this;this.itemsGroup.selectAll(ve.items.class).data(["items"]).join(function(t){return t.append(function(){return new m3({style:u})}).attr("className",ve.items.name).each(function(){c.items=pW(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 mn(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=mi(r),c=eT(gV(a?i:0),4),f=c[0],p=c[1],h=c[2],d=c[3],y=eT(gV(o),4),g=y[0],v=y[1],b=y[2],x=y[3],O=eT([d+p,f+h],2),w=O[0],E=O[1],k=eT([x+v,g+b],2),M=k[0],S=k[1];if("l"===u[0])return new mn(l.x,l.y,s.width+l.width+w+M,Math.max(s.height+S,l.height));if("t"===u[0])return new mn(l.x,l.y,Math.max(s.width+M,l.width),s.height+l.height+E+S);var _=eT([e.attributes.width||s.width,e.attributes.height||s.height],2),P=_[0],j=_[1];return new mn(s.x,s.y,P+l.width+w+M,j+l.height+E+S)}(r,i):t.prototype.getBBox.call(this)},e.prototype.render=function(t,e){var n=t.width,r=t.height,i=pW(e);this.renderTitle(i,n,r),this.renderItems(i,this.availableSpace),this.adjustLayout()},e}(pD),vr=function(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)};function vi(t){if(vr(t))return t[t.length-1]}var vo=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 va=t=>{let{labelFormatter:e,layout:n,order:r,orientation:i,position:o,size:a,title:l,cols:s,itemMarker:u}=t,c=vo(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}=mR(t,e,n);return{width:i,height:o}}(r,t,va),h=mC(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:mT(l)}),function(t,e){let{labelFormatter:n=t=>`${t}`}=t,{scales:r,theme:i}=e,o=function(t,e){let n=mI(t,"size");return n instanceof dG?2*n.map(NaN):e}(r,i.legendCategory.itemMarkerSize),a={itemMarker:function(t,e){let{scales:n,library:r,markState:i}=e,[o,a]=function(t,e){let n=mI(t,"shape"),r=mI(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)||vi(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=fN(e,["d","fill","strokeWidth","path","stroke","lineWidth","color"]);let c=f8.get(t)||f8.get("point");return(...t)=>new lI({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 mI(n,"shape")&&!l?(t,e)=>u(c(e),t):"function"==typeof l?(t,e)=>{let n=l(t.id,e);return"string"==typeof n?u(n,t):n}:(t,e)=>u(l||c(e),t)}(Object.assign(Object.assign({},t),{itemMarkerSize:o}),e),itemMarkerSize:o,itemMarkerOpacity:function(t){let e=mI(t,"opacity");if(e){let{range:t}=e.getOptions();return(e,n)=>t[n]}}(r)},l="string"==typeof n?Se(n):n,s=mI(r,"color"),u=r.find(t=>t.getOptions().domain.length>0).getOptions().domain,c=s?t=>s.map(t):()=>e.theme.color;return Object.assign(Object.assign({},a),{data:u.map(t=>({id:t,label:l(t),color:c(t)}))})}(t,e)),{legendCategory:y={}}=i,g=mD(Object.assign({},y,d,c)),v=new mL({style:Object.assign(Object.assign({x:a.x,y:a.y,width:a.width,height:a.height},h),{subOptions:g})});return v.appendChild(new vn({className:"legend-category",style:g})),v}};va.props={defaultPosition:"top",defaultOrder:1,defaultSize:40,defaultCrossPadding:[12,12],defaultPadding:[12,12]};var vl={}.toString,vs=function(t,e){return vl.call(t)==="[object "+e+"]"},vu=function(t){return Array.isArray?Array.isArray(t):vs(t,"Array")},vc=function(t){var e=typeof t;return null!==t&&"object"===e||"function"===e},vf=function(t,e){if(t){if(vu(t))for(var n,r=0,i=t.length;r<i&&!1!==e(t[r],r);r++);else if(vc(t)){for(var o in t)if(t.hasOwnProperty(o)&&!1===e(t[o],o))break}}},vp=function(t){return vs(t,"Function")},vh=Array.prototype;vh.splice,vh.indexOf,Array.prototype.splice,Object.prototype.hasOwnProperty;var vd=Object.values?function(t){return Object.values(t)}:function(t){var e=[];return vf(t,function(n,r){vp(t)&&"prototype"===r||e.push(n)}),e},vy=function(t){if("object"!=typeof t||null===t||!vs(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},vg=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&&vy(a)?(vy(e[o])||(e[o]={}),r<i?t(e[o],a,r+1,i):e[o]=n[o]):vu(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 vm=function(t){return t};function vv(){this.map={}}!function(t,e){if(!vp(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 Sn||(Sn=document.createElement("canvas").getContext("2d")),Sn.font=[o,a,i,n+"px",r].join(" "),Sn.measureText(vs(t,"String")?t:"").width},function(t,e){return void 0===e&&(e={}),eC([t],vd(e)).join("")}),vv.prototype.has=function(t){return void 0!==this.map[t]},vv.prototype.get=function(t,e){var n=this.map[t];return void 0===n?e:n},vv.prototype.set=function(t,e){this.map[t]=e},vv.prototype.clear=function(){this.map={}},vv.prototype.delete=function(t){delete this.map[t]},vv.prototype.size=function(){return Object.keys(this.map).length};class vb{constructor(t){this.options=vg({},this.getDefaultOptions()),this.update(t)}getOptions(){return this.options}update(t={}){this.options=vg({},this.options,t),this.rescale(t)}rescale(t){}}function vx(t,e){return e-t?n=>(n-t)/(e-t):t=>.5}function vO(t,...e){return e.reduce((t,e)=>n=>t(e(n)),t)}function vw(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 vE(t){let e=uH().get(t);if(!e)return null;let{model:n,value:r}=e;return"rgb"===n?r:"hsl"===n?function(t){let e=t[0]/360,n=t[1]/100,r=t[2]/100,i=t[3];if(0===n)return[255*r,255*r,255*r,i];let o=r<.5?r*(1+n):r+n-r*n,a=2*r-o,l=vw(a,o,e+1/3);return[255*l,255*vw(a,o,e),255*vw(a,o,e-1/3),i]}(r):null}let vk=(t,e)=>n=>t*(1-n)+e*n,vM=(t,e)=>{let n=vE(t),r=vE(e);return null===n||null===r?n?()=>t:()=>e:t=>{let e=[,,,,];for(let i=0;i<4;i+=1){let o=n[i],a=r[i];e[i]=o*(1-t)+a*t}let[i,o,a,l]=e;return`rgba(${Math.round(i)}, ${Math.round(o)}, ${Math.round(a)}, ${l})`}},vS=(t,e)=>"number"==typeof t&&"number"==typeof e?vk(t,e):"string"==typeof t&&"string"==typeof e?vM(t,e):()=>t,v_=(t,e)=>{let n=vk(t,e);return t=>Math.round(n(t))};function vP(t){return null!=t&&!Number.isNaN(t)}let vj=Math.sqrt(50),vA=Math.sqrt(10),vT=Math.sqrt(2);function vC(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>=vj?10:o>=vA?5:o>=vT?2:1)*10**i:-(10**-i)/(o>=vj?10:o>=vA?5:o>=vT?2:1)}let vN=(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=vC(l,s,n))>0?r=vC(l=Math.floor(l/r)*r,s=Math.ceil(s/r)*r,n):r<0&&(r=vC(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},vL=(t,e,n)=>{let r,i,[o,a]=t,[l,s]=e;return o<a?(r=vx(o,a),i=n(l,s)):(r=vx(a,o),i=n(s,l)),vO(i,r)},vI=(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]=vx(l[t],l[t+1]),o[t]=n(s[t],s[t+1]);return e=>{let n=function(t,e,n,r,i){let o=1,a=r||t.length,l=t=>t;for(;o<a;){let n=Math.floor((o+a)/2);l(t[n])>e?a=n:o=n+1}return o}(t,e,0,r)-1,a=i[n];return vO(o[n],a)(e)}},vR=(t,e,n,r)=>(Math.min(t.length,e.length)>2?vI:vL)(t,e,r?v_:n);class vD extends vb{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:vk,tickCount:5}}map(t){return vP(t)?this.output(t):this.options.unknown}invert(t){return vP(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 vN}rescale(){this.nice();let[t,e]=this.chooseTransforms();this.composeOutput(t,this.chooseClamp(t)),this.composeInput(t,e,this.chooseClamp(e))}chooseClamp(t){let{clamp:e,range:n}=this.options,r=this.options.domain.map(t),i=Math.min(r.length,n.length);return e?function(t,e){let n=e<t?e:t,r=t>e?t:e;return t=>Math.min(Math.max(n,t),r)}(r[0],r[i-1]):vm}composeOutput(t,e){let{domain:n,range:r,round:i,interpolate:o}=this.options,a=vR(n.map(t),r,o,i);this.output=vO(a,e,t)}composeInput(t,e,n){let{domain:r,range:i}=this.options,o=vR(i,r.map(t),vk);this.input=vO(e,n,o)}}let vF=(t,e,n)=>{let r,i,o=t,a=e;if(o===a&&n>0)return[o];let l=vC(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 vB extends vD{getDefaultOptions(){return{domain:[0,1],range:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolate:vS,tickMethod:vF,tickCount:5}}chooseTransforms(){return[vm,vm]}clone(){return new vB(this.options)}}function vz(t,e){return+t.toPrecision(e)}function vW(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 v$={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},vG=y3({background:"background",labelGroup:"label-group",label:"label"},"indicator"),vH=function(t){function e(e){var n=t.call(this,e,v$)||this;return n.point=[0,0],n.group=n.appendChild(new lT({})),n.isMutationObserved=!0,n}return eM(e,t),e.prototype.renderBackground=function(){if(this.label){var t=this.attributes,e=t.position,n=eT(gV(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 mn(s[0]-a,s[1]-r,u[0]+i-s[0]+a,u[1]+o-s[1]+r),f=this.getPath(e,c),p=gu(this.attributes,"background");this.background=pW(this.group).maybeAppendByClassName(vG.background,"path").styles(eS(eS({},p),{path:f})),this.group.appendChild(this.label.node())}},e.prototype.renderLabel=function(){var t=this.attributes,e=t.formatter,n=t.labelText,r=eT(gf(gu(this.attributes,"label")),2),i=r[0],o=r[1],a=(i.text,e_(i,["text"]));this.label=pW(this.group).maybeAppendByClassName(vG.labelGroup,"g").styles(o),n&&this.label.maybeAppendByClassName(vG.label,function(){return gw(e(n))}).style("text",e(n).toString()).selectAll("text").styles(a)},e.prototype.adjustLayout=function(){var t=eT(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,eN([s+1,1],eT(u),!1)),l[0][0]="M",l},e.prototype.createCorner=function(t,e){void 0===e&&(e=10);var n=g0.apply(void 0,eN([],eT(t),!1)),r=eT(t,2),i=eT(r[0],2),o=i[0],a=i[1],l=eT(r[1],2),s=l[0],u=l[1],c=eT(n?[s-o,[o,s]]:[u-a,[a,u]],2),f=c[0],p=eT(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=eT([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?pM(this):pk(this)},e.prototype.bindEvents=function(){this.label.on(M1.BOUNDS_CHANGED,this.renderBackground)},e.prototype.render=function(){this.renderLabel(),this.renderBackground(),this.adjustLayout(),this.applyVisibility()},e}(pD),vV={fill:"#fff",lineWidth:1,radius:2,size:10,stroke:"#bfbfbf",strokeOpacity:1,zIndex:0},vU={fill:"#000",fillOpacity:.45,fontSize:12,textAlign:"center",textBaseline:"middle",zIndex:1},vq={orientation:"horizontal",showLabel:!0,type:"start"},vY=y3({foreground:"foreground",handle:"handle",selection:"selection",sparkline:"sparkline",sparklineGroup:"sparkline-group",track:"track",brushArea:"brush-area"},"slider"),vX=y3({labelGroup:"label-group",label:"label",iconGroup:"icon-group",icon:"icon",iconRect:"icon-rect",iconLine:"icon-line"},"handle"),vK=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return eM(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=e_(t,["size","radius","orientation"]),l=2.4*r,s=pW(e).maybeAppendByClassName(vX.iconRect,"rect").styles(eS(eS({},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(vX.iconLine,"-1"),"line").styles(eS({x1:u,x2:u,y1:f,y2:p},a)),s.maybeAppendByClassName("".concat(vX.iconLine,"-2"),"line").styles(eS({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}(pD),vZ=function(t){function e(e){return t.call(this,e,vq)||this}return eM(e,t),e.prototype.renderLabel=function(t){var e=this,n=this.attributes.showLabel,r=gu(this.attributes,"label"),i=r.transform,o=eT(gf(e_(r,["transform"]),[]),2),a=o[0],l=o[1],s=pW(t).maybeAppendByClassName(vX.labelGroup,"g").styles(l),u=eS(eS({},vU),a),c=u.text,f=e_(u,["text"]);pF(!!n,s,function(t){e.label=t.maybeAppendByClassName(vX.label,"text").styles(eS(eS({},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=eS(eS({orientation:n},vV),gu(this.attributes,"icon")),o=this.attributes.iconShape,a=void 0===o?function(){return new vK({style:i})}:o;pW(t).maybeAppendByClassName(vX.iconGroup,"g").selectAll(vX.icon.class).data([a]).join(function(t){return t.append("string"==typeof a?a:function(){return a(r)}).attr("className",vX.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}(pD);function vQ(t,e){var n=eT(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 vJ=y3({trackGroup:"background-group",track:"background",selectionGroup:"ribbon-group",selection:"ribbon",clipPath:"clip-path"},"ribbon");function v0(t){var e=t.orientation,n=t.size,r=t.length;return mJ(e,[r,n],[n,r])}function v1(t){var e=t.type,n=eT(v0(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 v2=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 eM(e,t),e.prototype.render=function(t,e){n=pW(e).maybeAppendByClassName(vJ.trackGroup,"g"),r=gu(t,"track"),n.maybeAppendByClassName(vJ.track,"path").styles(eS({path:v1(t)},r));var n,r,i=pW(e).maybeAppendByClassName(vJ.selectionGroup,"g"),o=gu(t,"selection"),a=function(t){var e,n,r,i=t.orientation,o=t.color,a=t.block,l=t.partition,s=(r=pE(o)?Array(20).fill(0).map(function(t,e,n){return o(e/(n.length-1))}):o).length,u=r.map(function(t){return on(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(mJ(i,"0","270"),")")):""}(t),l=i.maybeAppendByClassName(vJ.selection,"path").styles(eS({path:v1(t),fill:a},o)),s=l.maybeAppendByClassName(vJ.clipPath,"path").styles({path:function(t){var e=t.orientation,n=t.range;if(!n)return[];var r=eT(v0(t),2),i=r[0],o=r[1],a=eT(n,2),l=a[0],s=a[1],u=mJ(e,l*i,0),c=mJ(e,0,l*o),f=mJ(e,s*i,i),p=mJ(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}(pD),v5=function(t){function e(e){var n=t.call(this,e,vt)||this;return n.eventToOffsetScale=new vB({}),n.innerRibbonScale=new vB({}),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=vQ(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=eT(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 eM(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 mn(0,0,t.width,t.height)},e.prototype.render=function(t,e){var n=this,r=t.showLabel;this.renderTitle(pW(e));var i=this.availableSpace,o=i.x,a=i.y,l=pW(e).maybeAppendByClassName(ve.contentGroup,"g").styles({x:o,y:a});pF(!!r,l.maybeAppendByClassName(ve.labelGroup,"g").styles({zIndex:1}),function(t){n.renderLabel(t)});var s=l.maybeAppendByClassName(ve.ribbonGroup,"g").styles({zIndex:0});this.handlesGroup=l.maybeAppendByClassName(ve.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,eN([],eT(e.map(function(t){return t.value})),!1)),max:Math.max.apply(Math,eN([],eT(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=eT(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=eT(void 0===r?[e,n]:r,2);return[i[0],i[1]]},enumerable:!1,configurable:!0}),e.prototype.ifHorizontal=function(t,e){return mJ(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=gu(this.attributes,"title"),l=eS(eS({},a),{width:i,height:o,text:r}),s=this;t.selectAll(ve.title.class).data(n?[r]:[]).join(function(t){return t.append(function(){return new ma({style:l})}).attr("className",ve.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 mn(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 mn(0,0,0,0);if(this.cacheLabelBBox)return this.cacheLabelBBox;var t,e=(null==(t=this.label.querySelector(y6.labelGroup.class))?void 0:t.children.slice(-1)[0]).getBBox(),n=e.width,r=e.height;return this.cacheLabelBBox=new mn(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=eT(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=eT(this.ifHorizontal([x,g],[g,x]),2),w=O[0],E=O[1],k=["top","left"].includes(v)?l:0,M=eT(this.ifHorizontal([b/2,k],[k,b/2]),2);return new mn(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=gu(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=pN({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(ve.ribbon,function(){return new v2({style:y})}).update(y)},e.prototype.getHandleClassName=function(t){return"".concat(ve.prefix("".concat(t,"-handle")))},e.prototype.renderHandles=function(){var t=this.attributes,e=t.showHandle,n=t.orientation,r=gu(this.attributes,"handle"),i=eT(this.selection,2),o=i[0],a=i[1],l=eS(eS({},r),{orientation:n}),s=r.shape,u="basic"===(void 0===s?"slider":s)?m8:vZ,c=this;this.handlesGroup.selectAll(ve.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(ve.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=eT(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=eT(this.getElementsByClassName(ve.title.name),1)[0],i=this.handlesGroup.select(".".concat(this.getHandleClassName("start"))).node();if(r&&i&&"top-left"===e&&"horizontal"===n){var o=eT(i.getLocalBounds().min,1)[0],a=eT(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 mn(0,0,0,0);var t=this.startHandle.getBBox(),e=t.width,n=t.height,r=this.endHandle.getBBox(),i=eT([Math.max(e,r.width),Math.max(n,r.height)],2),o=i[0],a=i[1];return this.cacheHandleBBox=new mn(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=eT(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=eT(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=gu(this.attributes,"indicator");this.indicator=t.maybeAppendByClassName(ve.indicator,function(){return new vH({})}).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(eS(eS({},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=eT([n.value,s.value],2),c=u[0],f=u[1],p=(c+f)/2;e.push(eS(eS({},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=eT(["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=gu(this.attributes,"tick"),a=gu(this.attributes,"label"),l=a.align,s=pN(eS({showLine:!1,showGrid:!1,showTick:void 0!==n&&n,type:"linear",startPos:[0,0],endPos:[0,0],tickDirection:"negative",labelTransform:"rotate(0)"},this.labelStyle),gc(o,"tick"),gc(a,"label"),{data:this.labelData}),u=eS(eS(eS({},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(ve.label,function(){return new mu({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=eT([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=eT(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=mX(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}),pk(this.indicator.node())},e.prototype.hideIndicator=function(){pM(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=eT(this.selection,2),k=E[0],M=E[1],S=eT([t,e],2),_=S[0],P=S[1];n&&(_+=k,P+=M);var j=this.range;_=(w=eT((r=[j.min,j.max],i=[_,P],o=this.selection,void 0===a&&(a=4),u=(s=eT(r,2))[0],c=s[1],p=(f=eT(i,2))[0],h=f[1],y=(d=eT(o,2))[0],g=d[1],b=(v=eT([p,h],2))[0],O=(x=v[1])-b,(b>x&&(b=(l=eT([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:[_,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?vz((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?vQ(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=eT(this.ribbon.node().getPosition(),2),a=o[0],l=o[1],s=this.ifHorizontal(a,l),u=this.ifHorizontal.apply(this,eN([],eT(vW(t)),!1));return mX(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 a3("valuechange",{detail:{value:this.selection}});this.dispatchEvent(t)},e.prototype.dispatchIndicated=function(t,e){var n=new a3("indicate",{detail:{value:t,range:e}});this.dispatchEvent(n)},e}(pD),v3=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 v4(t){let{domain:e}=t.getOptions(),[n,r]=[e[0],ci(e)];return[n,r]}let v6=t=>{let{labelFormatter:e,layout:n,order:r,orientation:i,position:o,size:a,title:l,style:s,crossPadding:u,padding:c}=t,f=v3(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=mC(o,n),{legendContinuous:v={}}=a,b=mD(Object.assign({},v,Object.assign(Object.assign({titleText:mT(l),labelAlign:"value",labelFormatter:"string"==typeof e?t=>Se(e)(t.label):e},function(t,e,n,r,i,o){let a=mI(t,"color"),l=function(t,e,n){let{size:r}=e,i=mR(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 yT){let{range:t}=a.getOptions(),[e,n]=v4(a);if(a instanceof yI||a instanceof yN){let r=a.thresholds,i=t=>({value:t/n,label:String(t)});return Object.assign(Object.assign({},l),{color:t,data:[e,...r,n].map(i)})}let r=[-1/0,...a.thresholds,1/0].map((t,e)=>({value:e,label:t}));return Object.assign(Object.assign({},l),{data:r,color:t,labelFilter:(t,e)=>e>0&&e<r.length-1})}return function(t,e,n,r,i,o){let{length:a}=t,l=n||r,s=i.color?o.legendContinuous.ribbonFill||"black":o.color,u=e||function(t,e){let n=t.getOptions(),r=t.clone();return r.update(Object.assign(Object.assign({},n),{range:[on(e).toString()]})),r}(l,s),[c,f]=v4(u),[p,h]=v4([e,n,r].filter(t=>void 0!==t).find(t=>!(t instanceof yz)));return Object.assign(Object.assign({},t),{domain:[p,h],data:u.getTicks().map(t=>({value:t})),color:Array(Math.floor(a)).fill(0).map((t,e)=>{let n=(f-c)/(a-1)*e+c,i=u.map(n)||s,o=r?r.map(n):1;return i.replace(/rgb[a]*\(([\d]{1,3}) *, *([\d]{1,3}) *, *([\d]{1,3})[\S\s]*\)/,(t,e,n,r)=>`rgba(${e}, ${n}, ${r}, ${o})`)})})}(l,a,mI(t,"size"),mI(t,"opacity"),e,o)}(r,u,i,t,v6,a)),s),f)),x=new mN({style:Object.assign(Object.assign({x:p,y:h,width:d,height:y},g),{subOptions:b})});return x.appendChild(new v5({className:"legend-continuous",style:b})),x}};v6.props={defaultPosition:"top",defaultOrientation:"vertical",defaultOrder:1,defaultSize:60,defaultLength:200,defaultLegendSize:60,defaultPadding:[20,10],defaultCrossPadding:[12,12]};let v8=t=>()=>new lT;v8.props={};var v9=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 v7(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 bt=(MD={render(t,e){let{width:n,title:r,subtitle:i,spacing:o=2,align:a="left"}=t,l=v9(t,["width","title","subtitle","spacing","align"]),s=ua(l,"title"),u=ua(l,"subtitle"),c=mA(e,".title","text").attr("className","title").call(ca,Object.assign(Object.assign(Object.assign({},v7(0,0,n,a)),{fontSize:14,textBaseline:"top",text:r}),s)).node().getLocalBounds();mA(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({},v7(0,c.max[1]+o,n,a)),{fontSize:12,textBaseline:"top",text:i}),u))})}},class extends lj{constructor(t){super(t),this.descriptor=MD}connectedCallback(){var t,e;null==(e=(t=this.descriptor).render)||e.call(t,this.attributes,this)}update(t={}){var e,n;this.attr(tG({},this.attributes,t)),null==(n=(e=this.descriptor).render)||n.call(e,this.attributes,this)}}),be=t=>({value:e,theme:n})=>{let{x:r,y:i,width:o,height:a}=e.bbox;return new bt({style:tG({},n.title,Object.assign({x:r,y:i,width:o,height:a},t))})};function bn({map:t,initKey:e},n){let r=e(n);return t.has(r)?t.get(r):n}function br(t){return"object"==typeof t?t.valueOf():t}be.props={defaultPosition:"top",defaultOrder:2,defaultSize:36,defaultCrossPadding:[20,20],defaultPadding:[12,12]};class bi extends Map{constructor(t){if(super(),this.map=new Map,this.initKey=br,null!==t)for(let[e,n]of t)this.set(e,n)}get(t){return super.get(bn({map:this.map,initKey:this.initKey},t))}has(t){return super.has(bn({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 bo=Symbol("defaultUnknown");function ba(t,e,n){for(let r=0;r<e.length;r+=1)t.has(e[r])||t.set(n(e[r]),r)}function bl(t){let{value:e,from:n,to:r,mapper:i,notFoundReturn:o}=t,a=i.get(e);if(void 0===a){if(o!==bo)return o;a=n.push(e)-1,i.set(e,a)}return r[a%r.length]}function bs(t){return t instanceof Date?t=>`${t}`:"object"==typeof t?t=>JSON.stringify(t):t=>t}class bu extends vb{getDefaultOptions(){return{domain:[],range:[],unknown:bo}}constructor(t){super(t)}map(t){return 0===this.domainIndexMap.size&&ba(this.domainIndexMap,this.getDomain(),this.domainKey),bl({value:this.domainKey(t),mapper:this.domainIndexMap,from:this.getDomain(),to:this.getRange(),notFoundReturn:this.options.unknown})}invert(t){return 0===this.rangeIndexMap.size&&ba(this.rangeIndexMap,this.getRange(),this.rangeKey),bl({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=bs(e),this.rangeKey=bs(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 bu(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 bc extends bu{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,paddingInner:0,paddingOuter:0,padding:0,unknown:bo,flex:[]}}constructor(t){super(t)}clone(){return new bc(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{domain:e,range:n,paddingOuter:r,paddingInner:i,flex:o,round:a,align:l}=t,s=e.length,u=function(t,e){let n=e-t.length;return n>0?[...t,...Array(n).fill(1)]:n<0?t.slice(0,e):t}(o,s),[c,f]=n,p=f-c,h=p/(2/s*r+1-1/s*i),d=h*i/s,y=h-s*d,g=function(t){let e=Math.min(...t);return t.map(t=>t/e)}(u),v=y/g.reduce((t,e)=>t+e),b=new bi(e.map((t,e)=>{let n=g[e]*v;return[t,a?Math.floor(n):n]})),x=new bi(e.map((t,e)=>{let n=g[e]*v+d;return[t,a?Math.floor(n):n]})),O=Array.from(x.values()).reduce((t,e)=>t+e),w=c+(p-(O-O/s*i))*l,E=a?Math.round(w):w,k=Array(s);for(let t=0;t<s;t+=1){k[t]=Math.round(1e12*E)/1e12;let n=e[t];E+=x.get(n)}return{valueBandWidth:b,valueStep:x,adjustedRange:k}}(t);let{range:a,paddingOuter:l,paddingInner:s,round:u,align:c}=t,f=a[0],p=a[1]-f;n=p/Math.max(1,2*l+(o-s)),u&&(n=Math.floor(n)),f+=(p-n*(o-s))*c,r=n*(1-s),u&&(f=Math.round(f),r=Math.round(r));let h=Array(o).fill(0).map((t,e)=>f+e*n);return{valueStep:n,valueBandWidth:r,adjustedRange:h}}({align:t,range:n,round:r,flex:i,paddingInner:this.getPaddingInner(),paddingOuter:this.getPaddingOuter(),domain:e});this.valueStep=l,this.valueBandWidth=a,this.adjustedRange=o}}var bf=function(t){if("object"!=typeof t||null===t)return t;if(pT(t)){e=[];for(var e,n=0,r=t.length;n<r;n++)"object"==typeof t[n]&&null!=t[n]?e[n]=bf(t[n]):e[n]=t[n]}else for(var i in e={},t)"object"==typeof t[i]&&null!=t[i]?e[i]=bf(t[i]):e[i]=t[i];return e},bp=function(t){function e(e){var n=this,r=e.style,i=e_(e,["style"]);return(n=t.call(this,y5({},{type:"column"},eS({style:r},i)))||this).columnsGroup=new lT({name:"columns"}),n.appendChild(n.columnsGroup),n.render(),n}return eM(e,t),e.prototype.render=function(){var t=this.attributes.columns;pW(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(pN({},this.attributes,t)),this.render()},e.prototype.clear=function(){this.removeChildren()},e}(lS),bh=function(t){function e(e){var n=this,r=e.style,i=e_(e,["style"]);return(n=t.call(this,y5({},{type:"lines"},eS({style:r},i)))||this).linesGroup=n.appendChild(new lT),n.areasGroup=n.appendChild(new lT),n.render(),n}return eM(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(pN({},this.attributes,t)),this.render()},e.prototype.renderLines=function(t){pW(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){pW(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}(lS),bd=function(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)},by=function(t,e){if(t===e)return!0;if(!t||!e||pU(t)||pU(e))return!1;if(bd(t)||bd(e)){if(t.length!==e.length)return!1;for(var n=!0,r=0;r<t.length&&(n=by(t[r],e[r]));r++);return n}if(p_(t)||p_(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=by(t[i[r]],e[i[r]]));r++);return n}return!1};function bg(t,e){void 0===e&&(e=!1);var n=e?t.length-1:0,r=t.map(function(t,e){return eN([e===n?"M":"L"],eT(t),!1)});return e?r.reverse():r}function bm(t,e){if(void 0===e&&(e=!1),t.length<=2)return bg(t);for(var n=[],r=t.length,i=0;i<r;i+=1){var o=e?t[r-i-1]:t[i];by(o,n.slice(-2))||n.push.apply(n,eN([],eT(o),!1))}var a=function(t,e,n){void 0===e&&(e=!1),void 0===n&&(n=[[0,0],[1,1]]);for(var r,i,o,a=!!e,l=[],s=0,u=t.length;s<u;s+=2)l.push([t[s],t[s+1]]);for(var c=function(t,e,n,r){var i,o,a,l,s,u,c=[],f=!!r,p=[1/0,1/0],h=[-1/0,-1/0];if(f){p=(i=eT(r,2))[0],h=i[1];for(var d=0,y=t.length;d<y;d+=1){var g=t[d];p=gt(p,g),h=ge(h,g)}}for(var d=0,v=t.length;d<v;d+=1){var g=t[d];if(0!==d||n)if(d!==v-1||n){o=t[[d?d-1:v-1,d-1][+!n]];var b=[0,0];b=y8(b=y7(a=t[n?(d+1)%v:d+1],o),.4);var x=gn(g,o),O=gn(g,a),w=x+O;0!==w&&(x/=w,O/=w);var E=y8(b,-x),k=y8(b,O);s=y9(g,E),l=gt(l=y9(g,k),ge(a,g)),E=y8(E=y7(l=ge(l,gt(a,g)),g),-x/O),s=gt(s=y9(g,E),ge(o,g)),s=ge(s,gt(o,g)),k=y8(k=y7(g,s),O/x),l=y9(g,k),f&&(s=gt(s=ge(s,p),h),l=gt(l=ge(l,p),h)),c.push(u),c.push(s),u=l}else s=g,c.push(u),c.push(s);else u=g}return n&&c.push(c.shift()),c}(l,0,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=eT(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(eN(["M"],eT(t[r-1]),!1)):a.unshift(eN(["M"],eT(t[0]),!1)),a}function bv(t,e,n){var r=bf(t);return r.push(["L",e,n],["L",0,n],["Z"]),r}var bb=function(t){if(pT(t))return t.reduce(function(t,e){return Math.min(t,e)},t[0])},bx=function(t,e){if(pT(t)){for(var n,r=1/0,i=0;i<t.length;i++){var o=t[i],a=pE(e)?e(o):o[e];a<r&&(n=o,r=a)}return n}},bO=function(t){if(pT(t))return t.reduce(function(t,e){return Math.max(t,e)},t[0])},bw=function(t,e){if(pT(t)){for(var n,r=-1/0,i=0;i<t.length;i++){var o=t[i],a=pE(e)?e(o):o[e];a>r&&(n=o,r=a)}return n}};function bE(t){return 0===t.length?[0,0]:[bb(bx(t,function(t){return bb(t)||0})),bO(bw(t,function(t){return bO(t)||0}))]}function bk(t){for(var e=bf(t),n=e[0].length,r=eT([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 bM=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 eM(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=bf(t);return gO(e[0])?[e]:e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"data",{get:function(){return this.attributes.isStack?bk(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=eT(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=gu(this.attributes,"area"),a=gu(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=eT((y=p.y).getOptions().range||[0,0],2))[0],(b=g[1])>v&&(b=(h=eT([v,b],2))[0],v=h[1]),s.map(function(t){return t.map(function(t,e){return[d.map(e),mX(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=bm(o),l=void 0;if(0===i)l=bv(a,e,n);else{var s=bm(t[i-1],!0),u=o[0];s[0][0]="L",l=eN(eN(eN([],eT(a),!1),eT(s),!1),[eN(["M"],eT(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=bg(t[i]),a=void 0;if(0===i)a=bv(o,e,n);else{var l=bg(t[i-1],!0);l[0][0]="L",a=eN(eN(eN([],eT(o),!1),eT(l),!1),[["Z"]],!1)}r.push(a)}return r}(c,l,x):c.map(function(t){return bv(i?bm(t):bg(t),l,x)})}return{lines:c.map(function(e,n){return eS({stroke:t.getColor(n),path:i?bm(e):bg(e)},a)}),areas:f.map(function(e,n){return eS({path:e,fill:t.getColor(n)},o)})}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"columnsStyle",{get:function(){var t=this,e=gu(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=bk(l));var s=this.createScales(l),u=s.x,c=s.y,f=eT(bE(l),2),p=f[0],h=new vB({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 eS(eS({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",r="rect",!e.querySelector(n)?pW(e).append(r):pW(e).select(n)).attr("className","container").node();var n,r,i=t.type,o="spark".concat(i),a="line"===i?this.linesStyle:this.columnsStyle;pW(e).selectAll(".spark").data([i]).join(function(t){return t.append(function(t){return"line"===t?new bh({className:o,style:a}):new bp({className:o,style:a})}).attr("className","spark ".concat(o))},function(t){return t.update(a)},function(t){return t.remove()})},e.prototype.getColor=function(t){var e=this.attributes.color;return pT(e)?e[t%e.length]:pE(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=eT(bE(t),2),h=p[0],d=p[1],y=new vB({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 vB({domain:[0,t[0].length-1],range:[0,c]}),y:y}:{type:i,x:new bc({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}(pD),bS=function(t){function e(e){var n=t.call(this,e,eS(eS(eS({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},gc(vq,"handle")),gc(vV,"handleIcon")),gc(vU,"handleLabel")))||this;return n.range=[0,1],n.onDragStart=function(t){return function(e){e.stopPropagation(),n.target=t,n.prevPos=n.getOrientVal(vW(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(vW(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 a3("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 eM(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=gu(this.attributes,"sparkline");return eS(eS({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=eT(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=eT(gV(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(vY.selection.class).each(function(n,r){y2(this,e[r],t)})},e.prototype.updateHandlesPosition=function(t){this.attributes.showHandle&&(this.startHandle&&y2(this.startHandle,this.getHandleStyle("start"),t),this.endHandle&&y2(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=gu(this.attributes,"track");this.trackShape=pW(t).maybeAppendByClassName(vY.track,"rect").styles(eS(eS({},this.shape),e))},e.prototype.renderBrushArea=function(t){var e=this.attributes.brushable;this.brushArea=pW(t).maybeAppendByClassName(vY.brushArea,"rect").styles(eS({fill:"transparent",cursor:e?"crosshair":"default"},this.shape))},e.prototype.renderSparkline=function(t){var e=this;pF("horizontal"===this.attributes.orientation,pW(t).maybeAppendByClassName(vY.sparklineGroup,"g"),function(t){var n=e.sparklineStyle;t.maybeAppendByClassName(vY.sparkline,function(){return new bM({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(vY.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 vZ({style:e.getHandleStyle(n)})}).each(function(t){var e=t.type;this.attr("class","".concat(vY.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=pW(t).maybeAppendByClassName(vY.foreground,"g");var i=gu(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(vY.selection.class).data("value"===n?[]:this.calcSelectionArea().map(function(t,e){return{style:eS({},t),index:e,show:"select"===r?1===e:1!==e}}),function(t){return t.index}).join(function(t){return t.append("rect").attr("className",vY.selection.name).call(o).each(function(t,e){var n=this;1===e?(a.selectionShape=pW(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=eT(this.range,2),i=r[0],o=r[1],a=eT(this.getValues().map(function(t){return vz(t,e)}),2),l=a[0],s=a[1],u=eT(((Array.isArray(t)?t:[l,null!=t?t:s])||[l,s]).map(function(t){return vz(t,e)}),2),c=u[0],f=u[1];if("value"===this.attributes.type)return[0,mX(f,i,o)];c>f&&(c=(n=eT([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=eT(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=eT(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=gu(this.attributes,"handle"),s=gu(l,"label"),u=l.spacing,c=this.getHandleSize(),f=this.clampValues(),p=o("start"===t?f[0]:f[1]),h=new pB({style:eS(eS(eS({},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,S=k.y,_=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-_-j>y?A:-A}else{var T=g+j;x="start"===t?S-c>g?-T:j:E-(S+P)-c>g?T:-j}return{x:b,y:x,text:p}},e.prototype.getHandleLabelStyle=function(t){var e=gu(this.attributes,"handleLabel");return eS(eS(eS({},e),this.calcHandleText(t)),this.inferTextStyle(t))},e.prototype.getHandleIconStyle=function(){var t=this.attributes.handleIconShape,e=gu(this.attributes,"handleIcon"),n=this.getOrientVal(["ew-resize","ns-resize"]),r=this.getHandleSize();return eS({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),eS(eS(eS(eS({},gc(this.getHandleIconStyle(),"icon")),gc(eS(eS({},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=eT(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=eT(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 a3(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}(pD);function b_(t,e){return null==t||null==e?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function bP(t,e){return null==t||null==e?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function bj(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=b_,n=(e,n)=>b_(t(e),n),r=(e,n)=>t(e)-n):(e=t===b_||t===bP?t:bA,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 bA(){return 0}function bT(t){return null===t?NaN:+t}let bC=bj(b_),bN=bC.right,bL=bC.left,bI=bj(bT).center;function bR(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=bF(r[t],r[n]);if(e)return e}})):(n=t.map(n),i.sort((t,e)=>bF(n[t],n[e]))),r=t,Array.from(i,t=>r[t])}return t.sort(bD(n))}function bD(t=b_){if(t===b_)return bF;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 bF(t,e){return(null==t||!(t>=t))-(null==e||!(e>=e))||(t<e?-1:+(t>e))}function bB(t){return!!t.getBandWidth}function bz(t,e,n){var r;if(!bB(t))return t.invert(e);let{adjustedRange:i}=t,{domain:o}=t.getOptions(),a=t.getStep(),l=(r=bL(n?i:i.map(t=>t+a),e)+(n?-1:0),Math.min(o.length-1,Math.max(0,r)));return o[l]}function bW(t,e,n){if(!e)return t.getOptions().domain;if(!bB(t)){let r=bR(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 b$(t,e,n,r,i,o){let{x:a,y:l}=i,s=(t,e)=>{let[n,r]=o.invert(t);return[bz(a,n,e),bz(l,r,e)]},u=s([t,e],!0),c=s([n,r],!1);return[bW(a,[u[0],c[0]]),bW(l,[u[1],c[1]])]}function bG(t,e){let[n,r]=t;return[e.map(n),e.map(r)+(e.getStep?e.getStep():0)]}var bH=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 bV=t=>{let{orientation:e,labelFormatter:n,size:r,style:i={},position:o}=t,a=bH(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?Se(n):n,b="horizontal"===e,x=ey(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 bS({className:"slider",style:Object.assign({},y,Object.assign(Object.assign({x:w,y:E,trackLength:b?h:d,orientation:e,formatter:t=>(v||g)(bz(s,x?1-t:t,!0)),sparklineData:function(t,e){let{markState:n}=e;if(tz(t.sparklineData))return t.sparklineData;var r=["y","series"];let[i]=Array.from(n.entries()).filter(([t])=>"line"===t.type||"area"===t.type).map(([t])=>{let{encode:e,slider:n}=t;if((null==n?void 0:n.x)&&0===Object.keys(n.x).length)return Object.fromEntries(r.map(t=>{let n=e[t];return[t,n?n.value:void 0]}))});return(null==i?void 0:i.series)?Object.values(i.series.reduce((t,e,n)=>(t[e]=t[e]||[],t[e].push(i.y[n]),t),{})):null==i?void 0:i.y}(t,r)},i),a))})}};bV.props={defaultPosition:"bottom",defaultSize:24,defaultOrder:1,defaultCrossPadding:[12,12],defaultPadding:[12,12]};let bU=t=>bV(Object.assign(Object.assign({},t),{orientation:"horizontal"}));bU.props=Object.assign(Object.assign({},bV.props),{defaultPosition:"bottom"});let bq=t=>bV(Object.assign(Object.assign({},t),{orientation:"vertical"}));bq.props=Object.assign(Object.assign({},bV.props),{defaultPosition:"left"});var bY=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 a3("scroll",r)),n.dispatchEvent(new a3("valuechange",r))}},n.onTrackClick=function(t){if(n.attributes.slidable){var e=eT(n.getLocalPosition(),2),r=e[0],i=e[1],o=eT(n.padding,4),a=o[0],l=o[3],s=n.getOrientVal([r+l,i+a]),u=(n.getOrientVal(vW(t))-s)/n.trackLength;n.setValue(u,!0)}},n.onThumbMouseenter=function(t){n.dispatchEvent(new a3("thumbMouseenter",{detail:t.detail}))},n.onTrackMouseenter=function(t){n.dispatchEvent(new a3("trackMouseenter",{detail:t.detail}))},n.onThumbMouseleave=function(t){n.dispatchEvent(new a3("thumbMouseleave",{detail:t.detail}))},n.onTrackMouseleave=function(t){n.dispatchEvent(new a3("trackMouseleave",{detail:t.detail}))},n}return eM(e,t),Object.defineProperty(e.prototype,"padding",{get:function(){return gV(this.attributes.padding)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){var t=this.attributes.value,e=eT(this.range,2);return mX(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=eT(this.padding,4),r=n[0],i=n[1],o=n[2],a=n[3],l=eT(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=eT(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=gu(this.attributes,"track"),l=gu(this.attributes,"thumb"),s=eS(eS({brushable:!1,orientation:n,padding:i,selectionRadius:this.thumbRadius,showHandle:!1,slidable:o,trackLength:this.trackLength,trackRadius:this.trackRadius,trackSize:r,values:this.getValues()},gc(a,"track")),gc(l,"selection"));this.slider=pW(t).maybeAppendByClassName("scrollbar",function(){return new bS({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=eT(this.range,2),i=r[0],o=r[1];this.slider.setValues(this.getValues(mX(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}(pD),bX=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 bK=t=>{let{orientation:e,labelFormatter:n,style:r}=t,i=bX(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 bY({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}))})}};bK.props={defaultPosition:"bottom",defaultSize:24,defaultOrder:1,defaultCrossPadding:[12,12],defaultPadding:[12,12]};let bZ=t=>bK(Object.assign(Object.assign({},t),{orientation:"horizontal"}));bZ.props=Object.assign(Object.assign({},bK.props),{defaultPosition:"bottom"});let bQ=t=>bK(Object.assign(Object.assign({},t),{orientation:"vertical"}));bQ.props=Object.assign(Object.assign({},bK.props),{defaultPosition:"left"});let bJ=(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]=ey(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))}},b0=(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]=ey(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))}},b1=(t,e)=>{let{coordinate:n}=e;return l_({name:"scaleInYRadius",inherits:!1,initialValue:"",interpolable:!0,syntax:MJ.NUMBER}),(e,r,i)=>{let[o]=e;if(eg(n))return(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=cc(n,f,[p,h]),{innerRadius:y,outerRadius:g}=d,v=ed().cornerRadius(a).padAngle(l*Math.PI/180),b=new lI({}),x=n.getCenter(),O=t=>{b.attr({d:v(t),transform:`translate(${x[0]}, ${x[1]})`});let e=oL(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);let{style:a}=o,{transform:l="",fillOpacity:s=1,strokeOpacity:u=1,opacity:c=1}=a,[f,p]=ey(n)?["left top","scale(0.0001, 1)"]:["left bottom","scale(1, 0.0001)"],h=[{transform:`${l} ${p}`.trimStart(),transformOrigin:f,fillOpacity:0,strokeOpacity:0,opacity:0},{transform:`${l} ${p}`.trimStart(),transformOrigin:f,fillOpacity:s,strokeOpacity:u,opacity:c,offset:.01},{transform:`${l} scale(1, 1)`.trimStart(),transformOrigin:f,fillOpacity:s,strokeOpacity:u,opacity:c}];return o.animate(h,Object.assign(Object.assign({},i),t))}},b2=(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]=ey(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))}},b5=(t,e)=>{l_({name:"waveInArcAngle",inherits:!1,initialValue:"",interpolable:!0,syntax:MJ.NUMBER});let{coordinate:n}=e;return(r,i,o)=>{let[a]=r;if(!eg(n))return bJ(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=ed().cornerRadius(c).padAngle(f*Math.PI/180),x=cc(n,y,[g,v]),{startAngle:O,endAngle:w}=x,E=new lI({}),k=t=>{E.attr({d:b(t),transform:`translate(${l[0]}, ${l[1]})`});let e=oL(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}};b5.props={};let b3=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))};b3.props={};let b4=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))};b4.props={};let b6=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))},b8=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))},b9=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 b7(t,e){let n={};for(let r of e){let e=t.style[r];e&&(n[r]=e)}return n}b9.props={};let xt=["fill","stroke","fillOpacity","strokeOpacity","opacity","lineWidth"];function xe(t){let{min:e,max:n}=t.getLocalBounds(),[r,i]=e,[o,a]=n;return[r,i,o-r,a-i]}function xn(t,e){let[n,r,i,o]=xe(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
11
|
M ${e} ${n}
|
|
12
12
|
L ${e+r} ${n}
|
|
13
13
|
L ${e+r} ${n+i}
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
`}([t,o,e,s]))}c-=t,u+=1}return l}function xr(t,e){t.__data__=e.__data__,t.className=e.className,t.markType=e.markType,e.parentNode.replaceChild(t,e)}function xi(t,e){return t.indexOf(e)===t.lastIndexOf(e)}function xo(t){let e=oL(t);if(e&&!(!xi(e,"m")||!xi(e,"M")))return e}function xa(t,e,n,r){let{nodeName:i}=e,{nodeName:o}=n,a=xo(e),l=xo(n),s=void 0===a||void 0===l;if(i===o&&"path"!==i||s)return function(t,e,n){let[r,i,o,a]=xe(t),{transform:l}=t.style,{transform:s}=e.style;xr(e,t);let[u,c,f,p]=xe(e),h=[Object.assign({transform:`${l?l+" ":""}translate(${r-u}, ${i-c}) scale(${o/f}, ${a/p})`},b7(t,xt)),Object.assign({transform:`${s?s+" ":""}translate(0, 0) scale(1, 1)`},b7(e,xt))];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 lI({style:Object.assign(Object.assign({},b7(t,xt)),{d:e})});return xr(r,t),r}(t,a),c=[Object.assign({path:a},b7(e,xt)),Object.assign({path:l},b7(n,xt))],f=u.animate(c,r);return f.onfinish=()=>{u.style.transform="none",ui(u,n)},u.style.transform="none",f}let xl=t=>(e,n,r)=>{let i=function(t="pack"){return"function"==typeof t?t:xn}(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 xa(t,t,r,o)}if(1===a&&l>1){let[t]=e;t.style.visibility="hidden";let r=i(t,n.length);return n.map((e,n)=>xa(e,new lI({style:Object.assign({path:r[n]},b7(t,xt))}),e,o))}if(a>1&&1===l){let[t]=n,r=i(t,e.length),{fillOpacity:a=1,strokeOpacity:l=1,opacity:s=1}=t.style,u=t.animate([{fillOpacity:0,strokeOpacity:0,opacity:0},{fillOpacity:0,strokeOpacity:0,opacity:0,offset:.99},{fillOpacity:a,strokeOpacity:l,opacity:s}],o);return[...e.map((e,n)=>xa(e,e,new lI({style:{path:r[n],fill:t.style.fill}}),o)),u]}return null};xl.props={};let xs=(t,e)=>(n,r,i)=>{let[o]=n,{height:a,width:l}=o.getBoundingClientRect(),s=new lI({style:{path:`M0,0L${l},0L${l},${a}L0,${a}Z`}});return o.appendChild(s),o.style.clipPath=s,bJ(t,e)([s],r,i)};xs.props={};let xu=(t,e)=>(n,r,i)=>{let[o]=n,{height:a,width:l}=o.getBoundingClientRect(),s=new lI({style:{path:`M0,0L${l},0L${l},${a}L0,${a}Z`}});return o.appendChild(s),o.style.clipPath=s,b1(t,e)([s],r,i)};xu.props={};let xc="main-layer",xf="label-layer",xp="element",xh="view",xd="plot",xy="component",xg="label",xm="area",xv="mask",xb={visibility:"visible",opacity:1,fillOpacity:1,strokeOpacity:1};function xx(t,e,n,r){t.style[e]=n,r&&t.children.forEach(t=>xx(t,e,n,r))}function xO(t){xx(t,"visibility","hidden",!0)}function xw(t){xx(t,"visibility","visible",!0)}var xE=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function xk(t){return up(t).selectAll(`.${xp}`).nodes().filter(t=>!t.__removed__)}function xM(t,e){return xS(t,e).flatMap(({container:t})=>xk(t))}function xS(t,e){return e.filter(e=>e!==t&&e.options.parentKey===t.options.key)}function x_(t){return up(t).select(`.${xd}`).node()}function xP(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 xj(t,e){let{offsetX:n,offsetY:r}=e,{min:[i,o],max:[a,l]}=xP(t);return n<i||n>a||r<o||r>l?null:[n-i,r-o]}function xA(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 xT(t){return t=>t.__data__.color}function xC(t){return t=>t.__data__.x}function xN(t){let e=new Map((Array.isArray(t)?t:[t]).flatMap(t=>Array.from(t.markState.keys()).map(e=>[xI(t.key,e.key),e.data])));return t=>{let{index:n,markKey:r,viewKey:i}=t.__data__;return e.get(xI(i,r))[n]}}function xL(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:xb[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 xI(t,e){return`${t},${e}`}function xR(t,e){let n=(Array.isArray(t)?t:[t]).flatMap(t=>t.marks.map(e=>[xI(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!==xI(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 xD(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 xF(t){var{link:e=!1,valueof:n=(t,e)=>t,coordinate:r}=t,i=xE(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=bR(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=ea(),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=cn(i,t=>n(t,s)),{fill:y=s.getAttribute("fill")}=d,g=xE(d,["fill"]),v=new lI({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 xB(t,e,n){let r=e=>{let{transform:n}=t.style;return n?`${n} ${e}`:e};if(eg(n)){let{points:i}=t.__data__,[o,a]=ey(n)?cu(i):i,l=n.getCenter(),s=ud(o,l),u=ud(a,l),c=ug(s)+uv(s,u)/2,f=e*Math.cos(c),p=e*Math.sin(c);return r(`translate(${f}, ${p})`)}return r(ey(n)?`translate(${e}, 0)`:`translate(0, ${-e})`)}function xz(t){var{document:e,background:n,scale:r,coordinate:i,valueof:o}=t,a=xE(t,["document","background","scale","coordinate","valueof"]);let l="element-background";if(!n)return[()=>{},()=>{}];let s=(t,e,n)=>{let r=t.invert(e),i=e+t.getBandWidth(r)/2,o=t.getStep(r)/2,a=o*n;return[i-o+a,i+o-a]},u=(t,e)=>{let{x:n}=r;if(!bB(n))return[0,1];let{__data__:i}=t,{x:o}=i,[a,l]=s(n,o,e);return[a,l]},c=(t,e)=>{let{y:n}=r;if(!bB(n))return[0,1];let{__data__:i}=t,{y:o}=i,[a,l]=s(n,o,e);return[a,l]},f=(t,n)=>{let{padding:r}=n,[o,a]=u(t,r),[l,s]=c(t,r),f=[[o,l],[a,l],[a,s],[o,s]].map(t=>i.map(t)),{__data__:p}=t,{y:h,y1:d}=p;return cy(e,f,{y:h,y1:d},i,n)},p=(t,e)=>{let{transform:n="scale(1.2, 1.2)",transformOrigin:r="center center",stroke:i=""}=e,o=Object.assign({transform:n,transformOrigin:r,stroke:i},xE(e,["transform","transformOrigin","stroke"])),a=t.cloneNode(!0);for(let[t,e]of Object.entries(o))a.style[t]=e;return a},h=()=>{let{x:t,y:e}=r;return[t,e].some(bB)};return[t=>{t.background&&t.background.remove();let e=cn(a,e=>o(e,t)),{fill:n="#CCD6EC",fillOpacity:r=.3,zIndex:i=-2,padding:s=.001,strokeWidth:u=0}=e,c=Object.assign(Object.assign({},xE(e,["fill","fillOpacity","zIndex","padding","strokeWidth"])),{fill:n,fillOpacity:r,zIndex:i,padding:s,strokeWidth:u}),d=(h()?f:p)(t,c);d.className=l,t.parentNode.parentNode.appendChild(d),t.background=d},t=>{var e;null==(e=t.background)||e.remove(),t.background=null},t=>t.className===l]}function xW(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 x$(t,e,n){return t.find(t=>Object.entries(e).every(([e,r])=>n(t)[e]===r))}var xG=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 xH(t){var{delay:e,createGroup:n,background:r=!1,link:i=!1}=t,o=xG(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=s2(h,r),g=xD(h,n),[v,b]=xF(Object.assign({elements:h,valueof:g,link:i,coordinate:s},ua(c.active,"link"))),[x,O,w]=xz(Object.assign({document:t.ownerDocument,scale:l,coordinate:s,background:o,valueof:g},ua(c.active,"background"))),{setState:E,removeState:k,hasState:M}=xL(tG(c,{active:Object.assign({},(null==(f=c.active)?void 0:f.offset)&&{transform:(...t)=>{let e=c.active.offset(...t),[,n]=t;return xB(h[n],e,s)}})}),g),S=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)}})},_=()=>{p&&clearTimeout(p),p=setTimeout(()=>{P(),p=null},a)},P=(t=!0)=>{for(let t of h)k(t,"active","inactive"),O(t),b(t);t&&u.emit("element:unhighlight",{nativeEvent:t})},j=t=>{let{target:e}=t;(!o||w(e))&&(o||d.has(e))&&(a>0?_():P())},A=()=>{P()};t.addEventListener("pointerover",S),t.addEventListener("pointerout",j),t.addEventListener("pointerleave",A);let T=t=>{let{nativeEvent:e}=t;e||P(!1)},C=t=>{let{nativeEvent:e}=t;if(e)return;let{data:r}=t.data,i=x$(h,r,n);i&&S({target:i,nativeEvent:!1})};return u.on("element:highlight",C),u.on("element:unhighlight",T),()=>{for(let e of(t.removeEventListener("pointerover",S),t.removeEventListener("pointerout",j),t.removeEventListener("pointerleave",A),u.off("element:highlight",C),u.off("element:unhighlight",T),h))O(e),b(e)}}(x_(s),Object.assign({elements:xk,datum:xN(u),groupKey:n?n(u):void 0,coordinate:p,scale:f,state:xR(c,[["active",r?{}:{lineWidth:"1",stroke:"#000"}],"inactive"]),background:r,link:i,delay:e,emitter:l},o))}}function xV(t){return xH(Object.assign(Object.assign({},t),{createGroup:xC}))}function xU(t){return xH(Object.assign(Object.assign({},t),{createGroup:xT}))}xH.props={reapplyWhenUpdate:!0},xV.props={reapplyWhenUpdate:!0},xU.props={reapplyWhenUpdate:!0};var xq=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 xY(t){var{createGroup:e,background:n=!1,link:r=!1}=t,i=xq(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=s2(p,r),y=xD(p,n),[g,v]=xF(Object.assign({link:i,elements:p,valueof:y,coordinate:a},ua(c.selected,"link"))),[b,x]=xz(Object.assign({document:t.ownerDocument,background:l,coordinate:a,scale:s,valueof:y},ua(c.selected,"background"))),{setState:O,removeState:w,hasState:E}=xL(tG(c,{selected:Object.assign({},(null==(f=c.selected)?void 0:f.offset)&&{transform:(...t)=>{let e=c.selected.offset(...t),[,n]=t;return xB(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,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)]}}))}},S=(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=>{let{target:e,nativeEvent:n=!0}=t;return h.has(e)?o?M(t,e,n):S(t,e,n):k()};t.addEventListener("click",_);let P=t=>{let{nativeEvent:e,data:r}=t;if(!e)for(let t of o?r.data.slice(0,1):r.data)_({target:x$(p,t,n),nativeEvent:!1})},j=()=>{k(!1)};return u.on("element:select",P),u.on("element:unselect",j),()=>{for(let t of p)v(t);t.removeEventListener("click",_),u.off("element:select",P),u.off("element:unselect",j)}}(x_(l),Object.assign({elements:xk,datum:xN(s),groupKey:e?e(s):void 0,coordinate:c,scale:f,state:xR(u,[["selected",n?{}:{lineWidth:"1",stroke:"#000"}],"unselected"]),background:n,link:r,emitter:a},i))}}function xX(t){return xY(Object.assign(Object.assign({},t),{createGroup:xC}))}function xK(t){return xY(Object.assign(Object.assign({},t),{createGroup:xT}))}xY.props={reapplyWhenUpdate:!0},xX.props={reapplyWhenUpdate:!0},xK.props={reapplyWhenUpdate:!0};var xZ=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 xQ({wait:t=30,leading:e,trailing:n=!1}){return r=>{let{options:i,update:o,setState:a,container:l}=r,s=x_(l),u=xZ(t=>{let e=xj(s,t);if(!e){a("fisheye"),o();return}a("fisheye",t=>{let n=tG({},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 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 x0(t){var{wait:e=20,leading:n,trailing:r=!1,labelFormatter:i=t=>`${t}`}=t,o=xJ(t,["wait","leading","trailing","labelFormatter"]);return t=>{var a,l,s,u,c;let f,{view:p,container:h,update:d,setState:y}=t,{markState:g,scale:v,coordinate:b}=p,x=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}(g,"line",["x","y","series"]);if(!x)return;let{y:O,x:w,series:E=[]}=x,k=O.map((t,e)=>e),M=bR(k.map(t=>w[t])),S=x_(h),_=h.getElementsByClassName(xp),P=s2(h.getElementsByClassName(xg),t=>t.__data__.key.split("-")[0]),j=new lL({style:Object.assign({x1:0,y1:0,x2:0,y2:S.getAttribute("height"),stroke:"black",lineWidth:1},ua(o,"rule"))}),A=new lB({style:Object.assign({x:0,y:S.getAttribute("height"),text:"",fontSize:10},ua(o,"label"))});j.append(A),S.appendChild(j);let T=(t,e,n)=>{let[r]=t.invert(n);return M[bI(M,e.invert(r))]},C=(t,e)=>{j.setAttribute("x1",t[0]),j.setAttribute("x2",t[0]),A.setAttribute("text",i(e))},N=t=>{let{scale:e,coordinate:n}=f,{x:r,y:i}=e,o=T(n,r,t);for(let e of(C(t,o),_)){let{seriesIndex:t,key:r}=e.__data__,a=t[bj(t=>w[+t]).center(t,o)],l=[0,i.map(1)],s=[0,i.map(O[a]/O[t[0]])],[,u]=n.map(l),[,c]=n.map(s),f=u-c;for(let t of(e.setAttribute("transform",`translate(0, ${f})`),P.get(r)||[]))t.setAttribute("dy",f)}},L=xZ(t=>{let e=xj(S,t);e&&N(e)},e,{leading:n,trailing:r});return a=[0,0],l=this,s=void 0,u=void 0,c=function*(){let{x:t}=v,e=T(b,t,a);C(a,e),y("chartIndex",t=>{let n=tG({},t),r=n.marks.find(t=>"line"===t.type),i=dm(s3(k,t=>dm(t,t=>+O[t])/dg(t,t=>+O[t]),t=>E[t]).values());tG(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,n)=>n[t[bj(t=>w[+t]).center(t,e)]],n.marks))t.animate=!1;return n}),f=(yield d("chartIndex")).view},new(u||(u=Promise))(function(t,e){function n(t){try{i(c.next(t))}catch(t){e(t)}}function r(t){try{i(c.throw(t))}catch(t){e(t)}}function i(e){var i;e.done?t(e.value):((i=e.value)instanceof u?i:new u(function(t){t(i)})).then(n,r)}i((c=c.apply(l,s||[])).next())}),S.addEventListener("pointerenter",L),S.addEventListener("pointermove",L),S.addEventListener("pointerleave",L),()=>{j.remove(),S.removeEventListener("pointerenter",L),S.removeEventListener("pointermove",L),S.removeEventListener("pointerleave",L)}}}function x1(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 x2(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 x5(t){var e=document.createElement("div");e.innerHTML=t;var n=e.childNodes[0];return n&&e.contains(n)&&e.removeChild(n),n}function x3(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")}}x0.props={reapplyWhenUpdate:!0};var x4={overflow:"hidden","white-space":"nowrap","text-overflow":"ellipsis"},x6=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=x3(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=x3(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)]=eS({flex:1},x4),r[".".concat(i.VALUE)]=eS({display:"inline-block",float:"right",flex:1,"text-align":"right","min-width":"28px","margin-left":"30px",color:"rgba(0, 0, 0, 0.85)"},x4),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 eM(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=e_(t,["name","color","index"]),s=eS({name:void 0===i?"":i,color:void 0===o?"black":o,index:null!=a?a:e},l);return x5((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=x5(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=x3(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,eN([],eT(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=eT(t,2),n=e[0],r=e[1];eN([u],eT(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=eT(u,2),n=e[0],i=e[1],a=eT(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=eT(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=eT(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=eT([+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 mn(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}(pD);let x8={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 x9(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 x7(t,e){if(e(t))return t;let n=t.parent;for(;n&&!e(n);)n=n.parent;return n}function Ot(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=x7(o,t=>"element"===t.className),s=x7(o,t=>"component"===t.className),u=x7(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:x9(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 Oe(){return(t,e,n)=>{let{container:r,view:i}=t,o=Ot(x8.CLICK,i,n,t=>1===t.detail),a=Ot(x8.DBLCLICK,i,n,t=>2===t.detail),l=Ot(x8.POINTER_TAP,i,n),s=Ot(x8.POINTER_DOWN,i,n),u=Ot(x8.POINTER_UP,i,n),c=Ot(x8.POINTER_OVER,i,n),f=Ot(x8.POINTER_OUT,i,n),p=Ot(x8.POINTER_MOVE,i,n),h=Ot(x8.POINTER_ENTER,i,n),d=Ot(x8.POINTER_LEAVE,i,n),y=Ot(x8.POINTER_UPOUTSIDE,i,n),g=Ot(x8.DRAG_START,i,n),v=Ot(x8.DRAG,i,n),b=Ot(x8.DRAG_END,i,n),x=Ot(x8.DRAG_ENTER,i,n),O=Ot(x8.DRAG_LEAVE,i,n),w=Ot(x8.DRAG_OVER,i,n),E=Ot(x8.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)}}}Oe.props={reapplyWhenUpdate:!0};var On=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 Or(t,e){return e?"string"==typeof e?document.querySelector(e):e:t.ownerDocument.defaultView.getContextService().getDomElement().parentElement}function Oi({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=Or(t,c),h=Or(t),d=a?h:t,y=f||function(t){let{min:[e,n],max:[r,i]}=t.getRenderBounds();return{x:e,y:n,width:r-e,height:i-n}}(t),g=function(t,e){let n=t.getBoundingClientRect(),r=e.getBoundingClientRect();return{x:n.x-r.x,y:n.y-r.y}}(h,p),{tooltipElement:v=function(t,e,n,r,i,o,a,l={}){let s=new x6({className:"tooltip",style:{x:e,y:n,container:a,data:[],bounding:o,position:r,enterable:i,title:"",offset:[10,10],template:{prefixCls:"g2-"},style:tG({".g2-tooltip":{},".g2-tooltip-title":{overflow:"hidden","white-space":"nowrap","text-overflow":"ellipsis"}},l)}});return t.appendChild(s.HTMLTooltipElement),s}(p,n,r,l,s,y,g,u)}=d,{items:b,title:x=""}=e;v.update(Object.assign({x:n,y:r,data:b,title:x,position:l,enterable:s},void 0!==i&&{content:i(o,{items:b,title:x})})),d.tooltipElement=v}function Oo({root:t,single:e,emitter:n,nativeEvent:r=!0,event:i=null}){r&&n.emit("tooltip:hide",{nativeEvent:r});let o=Or(t),{tooltipElement:a}=e?o:t;a&&a.hide(null==i?void 0:i.clientX,null==i?void 0:i.clientY)}function Oa({root:t,single:e}){let n=Or(t),r=e?n:t;if(!r)return;let{tooltipElement:i}=r;i&&(i.destroy(),r.tooltipElement=void 0)}function Ol(t){let{value:e}=t;return Object.assign(Object.assign({},t),{value:void 0===e?"undefined":e})}function Os(t){let e=t.getAttribute("fill"),n=t.getAttribute("stroke"),{__data__:r}=t,{color:i=e&&"transparent"!==e?e:n}=r;return i}function Ou(t,e=t=>t){return Array.from(new Map(t.map(t=>[e(t),t])).values())}function Oc(t,e,n,r=t.map(t=>t.__data__),i={}){let o=t=>t instanceof Date?+t:t,a=Ou(r.map(t=>t.title),o).filter(uo),l=r.flatMap((r,o)=>{let a=t[o],{items:l=[],title:s}=r,u=l.filter(uo),c=void 0!==n?n:l.length<=1;return u.map(t=>{var{color:n=Os(a)||i.color,name:o}=t,l=On(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 dD)&&!(t instanceof yz);if(l(r))return r.clone().invert(a);if(a&&r instanceof dD&&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(Ol);return Object.assign(Object.assign({},a.length>0&&{title:a.join(",")}),{items:Ou(l,t=>`(${o(t.name)}, ${o(t.value)}, ${o(t.color)})`)})}function Of(t){t.ruleY&&(t.ruleY.remove(),t.ruleY=void 0)}function Op(t){t.markers&&(t.markers.forEach(t=>t.remove()),t.markers=[])}function Oh(t,e){return Array.from(t.values()).some(t=>{var n;return null==(n=t.interaction)?void 0:n[e]})}function Od(t,e){return void 0===t?e:t}function Oy(t){let{title:e,items:n}=t;return 0===n.length&&void 0===e}function Og(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:S=!1,style:_={},css:P={}}=e,j=On(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=ey(a),C=eg(a),N=tG(_,j),{innerWidth:L,innerHeight:I,width:R,height:D,insetLeft:F,insetTop:B}=a.getOptions(),z=[],W=[];for(let t of A){let{__data__:e}=t,{seriesX:n,title:r,items:i}=e;n?z.push(t):(r||i)&&W.push(t)}let $=!!(T?o.y:o.x).getBandWidth&&W.length>0;z.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 bR([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(z.map(t=>{let{__data__:e}=t,{seriesX:n}=e;return[t,[bR(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(uo),[o,a]=bR([i[0],i[i.length-1]]);if(!$&&(r<o||r>a)&&o!==a)return null;let l=(0,bj(t=>n[+t]).center)(e,r);return e[l]},X=(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,bj(t=>{let[e,n]=G(t);return(e+n)/2}).center)(e,n);return[e[i]].filter(uo)},K=(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[s7(t.replace("series","")),r]}))},Z=xZ(e=>{let n=xj(t,e);if(!n)return;let f=xP(t),p=f.min[0],h=f.min[1],k=[n[0]-d,n[1]-y];if(!k)return;let S=X(k,W),_=[],j=[];for(let t of z){let[e,n]=H.get(t),r=Y(k,e,n);if(null!==r){_.push(t);let e=K(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))),$=A[x2(A,t=>Math.abs(t-q(k)))],G=j.filter(t=>t[0].x===$),V=[...G.map(t=>t[0]),...S.map(t=>t.__data__)],Z=[..._,...S],J=Oc(Z,o,u,V,E);if(r&&J.items.sort((t,e)=>r(t)-r(e)),i&&(J.items=J.items.filter(i)),0===Z.length||Oy(J))return void Q(e);g&&Oi({root:t,data:J,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},On(n,["plotWidth","plotHeight","mainWidth","mainHeight","startX","startY","transposed","polar","insetLeft","insetTop"])),d=e.map(t=>t[1]),y=e.map(t=>t[0]),g=x1(d),v=x1(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=ug(ud([v,g],[e,n])),i=e+t*Math.cos(r),u=n+t*Math.sin(r);return[e,i,n,u]}return u?[l,l+r,g+s,g+s]:[v+l,v+l,s,s+i]})();if(y.length>0){let e=t.ruleY||(()=>{let e=new lL({style:Object.assign({x1:b,x2:x,y1:O,y2:w},h)});return t.appendChild(e),e})();e.style.x1=b,e.style.x2=x,e.style.y1=O,e.style.y2=w,t.ruleY=e}}(t,G.map(t=>t[1]),Object.assign(Object.assign({},ua(N,"crosshairs")),{plotWidth:L,plotHeight:I,mainWidth:R,mainHeight:D,insetLeft:F,insetTop:B,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 uo(e)&&uo(n)}).map(t=>{let[{color:e,element:i},o]=t,a=e||i.style.fill||i.style.stroke||r.color;return new lP({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:G,style:ua(N,"marker"),theme:E}),c.emit("tooltip:show",Object.assign(Object.assign({},e),{nativeEvent:!0,data:{data:{x:bz(o.x,q(k),!0)}}}))},f,{leading:p,trailing:h}),Q=e=>{Oo({root:t,single:v,emitter:c,event:e}),l&&Of(t),M&&Op(t)},J=()=>{Oa({root:t,single:v}),l&&Of(t),M&&Op(t)},tt=({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();Z({offsetX:s+c,offsetY:u+f})},te=()=>{Oo({root:t,single:v,emitter:c,nativeEvent:!1})},tn=()=>{to(),J()},tr=()=>{ti()},ti=()=>{k||(t.addEventListener("pointerenter",Z),t.addEventListener("pointermove",Z),t.addEventListener("pointerleave",Q))},to=()=>{k||(t.removeEventListener("pointerenter",Z),t.removeEventListener("pointermove",Z),t.removeEventListener("pointerleave",Q))};return ti(),c.on("tooltip:show",tt),c.on("tooltip:hide",te),c.on("tooltip:disable",tn),c.on("tooltip:enable",tr),()=>{to(),c.off("tooltip:show",tt),c.off("tooltip:hide",te),c.off("tooltip:disable",tn),c.off("tooltip:enable",tr),S?Oo({root:t,single:v,emitter:c,nativeEvent:!1}):J()}}function Om(t){let{shared:e,crosshairs:n,series:r,name:i,item:o=()=>({}),facet:a=!1}=t,l=On(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=Oh(p,"seriesTooltip"),g=Oh(p,"crosshairs"),v=x_(u),b=Od(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 Og(v,Object.assign(Object.assign({},l),{theme:d,elements:xk,scale:f,coordinate:h,crosshairs:Od(n,g),item:o,emitter:s}));if(b&&a){let e=i.filter(e=>e!==t&&e.options.parentKey===t.options.key),r=xM(t,i),a=e[0].view.scale,u=v.getBounds(),c=u.min[0],f=u.min[1];return Object.assign(a,{facet:!0}),Og(v.parentNode.parentNode,Object.assign(Object.assign({},l),{theme:d,elements:()=>r,scale:a,coordinate:h,crosshairs:Od(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 S=e(t),_=new Set(S),P=s2(S,f),j=xZ(e=>{let{target:s}=e;if(!_.has(s))return void Oo({root:t,single:p,emitter:l,event:e});let u=f(s),c=P.get(u),y=1!==c.length||O?Oc(c,n,i,void 0,x):function(t){let{__data__:e}=t,{title:n,items:r=[]}=e,i=r.filter(uo).map(e=>{var{color:n=Os(t)}=e;return Object.assign(Object.assign({},On(e,["color"])),{color:n})}).map(Ol);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)),Oy(y))return void Oo({root:t,single:p,emitter:l,event:e});let{offsetX:E,offsetY:k}=e;w&&Oi({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:x9(s,g)}}))},s,{leading:u,trailing:c}),A=e=>{Oo({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=x$(S,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||Oo({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(),Oa({root:t,single:p})}),T(),()=>{C(),l.off("tooltip:show",N),l.off("tooltip:hide",L),k?Oo({root:t,single:p,emitter:l,nativeEvent:!1}):Oa({root:t,single:p})}}(v,Object.assign(Object.assign({},l),{datum:xN(c),elements:xk,scale:f,coordinate:h,groupKey:e?xC(c):void 0,item:o,emitter:s,view:c,theme:d,shared:e}))}}Om.props={reapplyWhenUpdate:!0};var Ov=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 Ob="legend-category";function Ox(t){return t.getElementsByClassName("legend-category-item-marker")[0]}function OO(t){return t.getElementsByClassName("legend-category-item-label")[0]}function Ow(t){return t.getElementsByClassName("items-item")}function OE(t){return t.getElementsByClassName(Ob)}function Ok(t){return t.getElementsByClassName("legend-continuous")}function OM(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 Ov(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}}),tG({},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 O_(t,e){for(let n of t)OS(n,Object.assign(Object.assign({},e),{facet:!0}))}function OP(){return(t,e,n)=>{let{container:r}=t,i=e.filter(e=>e!==t),o=i.length>0,a=t=>OM(t).scales.map(t=>t.name),l=[...OE(r),...Ok(r)],s=l.flatMap(a),u=o?xZ(O_,50,{trailing:!0}):xZ(OS,50,{trailing:!0}),c=l.map(e=>{let{name:l,domain:c}=OM(e).scales[0],f=a(e),p={legend:e,channel:l,channels:f,allChannels:s};return e.className===Ob?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:ua(p,"marker")},d={unselected:ua(p,"label")},{setState:y,removeState:g}=xL(h,void 0),{setState:v,removeState:b}=xL(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=()=>{xW(t,"pointer")},r=()=>{xW(t,t.cursor)},s=t=>Ov(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=>Ov(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=>Ov(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:Ow,marker:Ox,label:OO,datum:t=>{let{__data__:e}=t,{index:n}=e;return c[n]},filter:e=>{let n=Object.assign(Object.assign({},p),{value:e,ordinal:!0});o?u(i,n):u(t,n)},state:e.attributes.state,channel:l,emitter:n}):function(t,{legend:e,filter:n,emitter:r,channel:i}){let o=({detail:{value:t}})=>{n(t),r.emit({nativeEvent:!0,data:{channel:i,values:t}})};return e.addEventListener("valuechange",o),()=>{e.removeEventListener("valuechange",o)}}(0,{legend:e,filter:e=>{let n=Object.assign(Object.assign({},p),{value:e,ordinal:!1});o?u(i,n):u(t,n)},emitter:n,channel:l})});return()=>{c.forEach(t=>t())}}}function Oj(){return(t,e,n)=>{let{container:r,view:i,options:o}=t,a=OE(r),l=xk(r),s=t=>OM(t).scales[0].name,u=t=>{let{scale:{[t]:e}}=i;return e},c=xR(o,["active","inactive"]),f=xD(l,xN(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=Ow(t),o=u(r),a=s2(l,t=>o.invert(t.__data__[r])),{state:h={}}=t.attributes,{inactive:d={}}=h,{setState:y,removeState:g}=xL(c,f),v={inactive:ua(d,"marker")},b={inactive:ua(d,"label")},{setState:x,removeState:O}=xL(v),{setState:w,removeState:E}=xL(b),k=t=>{for(let e of i){let n=Ox(e),r=OO(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}}))},S=new Map;for(let t of i){let e=e=>{M(e,t)};t.addEventListener("pointerover",e),S.set(t,e)}let _=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||_({nativeEvent:!1})};t.addEventListener("pointerleave",_),n.on("legend:highlight",P),n.on("legend:unhighlight",j);let A=()=>{for(let[e,r]of(t.removeEventListener(_),n.off("legend:highlight",P),n.off("legend:unhighlight",j),S))e.removeEventListener(r)};p.push(A)}return()=>p.forEach(t=>t())}}var OA=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 OT(t,e){for(let[n,r]of Object.entries(e))t.style(n,r)}let OC=c6(t=>{let e=t.attributes,{x:n,y:r,width:i,height:o,class:a,renders:l={},handleSize:s=10,document:u}=e,c=OA(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=ua(us(c,"handleNW","handleNE"),"handleN"),{render:d=p}=h,y=OA(h,["render"]),g=ua(c,"handleE"),{render:v=p}=g,b=OA(g,["render"]),x=ua(us(c,"handleSE","handleSW"),"handleS"),{render:O=p}=x,w=OA(x,["render"]),E=ua(c,"handleW"),{render:k=p}=E,M=OA(E,["render"]),S=ua(c,"handleNW"),{render:_=p}=S,P=OA(S,["render"]),j=ua(c,"handleNE"),{render:A=p}=j,T=OA(j,["render"]),C=ua(c,"handleSE"),{render:N=p}=C,L=OA(C,["render"]),I=ua(c,"handleSW"),{render:R=p}=I,D=OA(I,["render"]),F=(t,e)=>{let{id:n}=t,r=t.attributes,{x:i,y:o}=r,a=e(t,Object.assign({x:0,y:0},OA(r,["x","y"])),u);a.id=n,a.style.draggable=!0},B=t=>()=>new(c6(e=>F(e,t)))({}),z=up(t).attr("className",a).style("x",n).style("y",r).style("draggable",!0);z.maybeAppend("selection","rect").style("draggable",!0).style("fill","transparent").call(OT,Object.assign({width:i,height:o},us(c,"handle"))),z.maybeAppend("handle-n",B(d)).style("x",f).style("y",-f).style("width",i-s).style("height",s).style("fill","transparent").call(OT,y),z.maybeAppend("handle-e",B(v)).style("x",i-f).style("y",f).style("width",s).style("height",o-s).style("fill","transparent").call(OT,b),z.maybeAppend("handle-s",B(O)).style("x",f).style("y",o-f).style("width",i-s).style("height",s).style("fill","transparent").call(OT,w),z.maybeAppend("handle-w",B(k)).style("x",-f).style("y",f).style("width",s).style("height",o-s).style("fill","transparent").call(OT,M),z.maybeAppend("handle-nw",B(_)).style("x",-f).style("y",-f).style("width",s).style("height",s).style("fill","transparent").call(OT,P),z.maybeAppend("handle-ne",B(A)).style("x",i-f).style("y",-f).style("width",s).style("height",s).style("fill","transparent").call(OT,T),z.maybeAppend("handle-se",B(N)).style("x",i-f).style("y",o-f).style("width",s).style("height",s).style("fill","transparent").call(OT,L),z.maybeAppend("handle-sw",B(R)).style("x",-f).style("y",o-f).style("width",s).style("height",s).style("fill","transparent").call(OT,D)});function ON(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=OA(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;xW(t,"crosshair"),t.style.draggable=!0;let S=(t,e,n)=>{if(o(n),b&&b.remove(),x&&x.remove(),y=[t,e],u)return _();P()},_=()=>{x=new lI({style:Object.assign(Object.assign({},d),{fill:c,fillOpacity:f,stroke:p,pointerEvents:"none"})}),b=new OC({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 OC({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
17
|
M${w},${E}L${k},${E}L${k},${M}L${w},${M}Z
|
|
18
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=t=>{let e=(t,e,n,r,i)=>t+e<r?r-e:t+n>i?i-n:t,n=t[0]-v[0],r=t[1]-v[1],i=e(n,y[0],g[0],w,k),o=e(r,y[1],g[1],E,M);A([y[0]+i,y[1]+o],[g[0]+i,g[1]+o])},L={"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"}},I=t=>D(t)||R(t),R=t=>{let{id:e}=t;return -1!==h.indexOf(e)&&new Set(Object.keys(L)).has(e)},D=t=>t===b.getElementById("selection"),F=e=>{let{target:n}=e,[r,i]=xA(t,e);if(!b||!I(n)){S(r,i,e),O=!0;return}I(n)&&(v=[r,i])},B=e=>{let{target:n}=e,r=xA(t,e);if(!y)return;if(!v)return A(y,r);if(D(n))return N(r);let[i,o]=[r[0]-v[0],r[1]-v[1]],{id:a}=n;if(L[a]){let[t,e,n,r]=L[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=xA(t,e);let[n,r,o,l]=A(y,g);O=!1,i(n,r,o,l,e)},W=t=>{let{target:e}=t;b&&!I(e)&&j()},$=e=>{let{target:n}=e;b&&I(n)&&!O?D(n)?xW(t,"move"):R(n)&&xW(t,L[n.id].cursor):xW(t,"crosshair")},G=()=>{xW(t,"default")};return t.addEventListener("dragstart",F),t.addEventListener("drag",B),t.addEventListener("dragend",z),t.addEventListener("click",W),t.addEventListener("pointermove",$),t.addEventListener("pointerleave",G),{mask:b,move(t,e,n,r,i=!0){b||S(t,e,{}),y=[t,e],g=[n,r],A([t,e],[n,r],i)},remove(t=!0){b&&j(t)},destroy(){b&&j(!1),xW(t,"default"),t.removeEventListener("dragstart",F),t.removeEventListener("drag",B),t.removeEventListener("dragend",z),t.removeEventListener("click",W),t.removeEventListener("pointermove",$),t.removeEventListener("pointerleave",G)}}}function OL(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 OI(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=OA(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=xD(v,o),w=ua(g,"mask"),{setState:E,removeState:k}=xL(d,O),M=new Map,{width:S,height:_,x:P=0,y:j=0}=h(t),A=()=>{for(let t of[...v,...x])k(t,"active","inactive")},T=(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")},C=()=>{for(let t of v)k(t,"inactive");for(let t of M.values())t.remove();M.clear()},N=(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 lF({style:{x:t+P,y:e+j,width:n-t,height:r-e}}),E(o,"inactive"),E(a,"active")}},L=ON(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?C:A)()},brushed:(t,e,n,r,i)=>{let o=b$(t,e,n,r,u,c);i&&y.emit("brush:highlight",{nativeEvent:!0,data:{selection:o}}),(f?N:T)(t,e,n,r)},brushcreated:(t,e,n,r,i)=>{let o=b$(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=b$(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)}})),I=({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=bG(o,r),s=bG(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);L.move(r,i,o,a,!1)};y.on("brush:highlight",I);let R=({nativeEvent:t}={})=>{t||L.remove(!1)};y.on("brush:remove",R);let D=L.destroy.bind(L);return L.destroy=()=>{y.off("brush:highlight",I),y.off("brush:remove",R),D()},L}function OR(t){var{facet:e,brushKey:n}=t,r=OA(t,["facet","brushKey"]);return(t,i,o)=>{let{container:a,view:l,options:s}=t,u=x_(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 OI(u.parentNode.parentNode,Object.assign(Object.assign({elements:()=>xM(t,i),datum:xN(xS(t,i).map(t=>t.view)),brushRegion:(t,e,n,r)=>[t,e,n,r],extent:[n,a,l,s],state:xR(xS(t,i).map(t=>t.options),f),emitter:o,scale:p,coordinate:h,selectedHandles:void 0},c),r))}let d=OI(u,Object.assign(Object.assign({elements:xk,key:t=>t.__data__.key,siblings:()=>OL(t,i,n).map(t=>x_(t.container)),datum:xN([l,...OL(t,i,n).map(t=>t.view)]),brushRegion:(t,e,n,r)=>[t,e,n,r],extent:void 0,state:xR([s,...OL(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 OD(t,e,n,r,i){let[,o,,a]=i;return[t,o,n,a]}function OF(t){return OR(Object.assign(Object.assign({},t),{brushRegion:OD,selectedHandles:["handle-e","handle-w"]}))}function OB(t,e,n,r,i){let[o,,a]=i;return[o,e,a,r]}function Oz(t){return OR(Object.assign(Object.assign({},t),{brushRegion:OB,selectedHandles:["handle-n","handle-s"]}))}var OW=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 O$="axis-hot-area";function OG(t){return t.getElementsByClassName("axis")}function OH(t){return t.getElementsByClassName("axis-line")[0]}function OV(t){return t.getElementsByClassName("axis-main-group")[0].getLocalBounds()}function OU(t){return(e,n,r)=>{let{container:i,view:o,options:a}=e,{x:l,y:s}=x_(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=OW(e,["axes","elements","points","horizontal","datum","offsetY","offsetX","reverse","state","emitter","coordinate"]);let d=r(t),y=n(t),{setState:g,removeState:v}=xL(c,xD(d,a)),b=new Map,x=ua(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 S=(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})()}})},_=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(bW(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=OW(e,["offsetY","offsetX","cross"]);let a=OV(t),[,l]=OH(t).getLocalBounds().min,[s,u]=a.min,[c,f]=a.max,p=f-u;return{brushRegion:OD,hotZone:new lF({className:O$,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=OW(e,["cross","offsetX","offsetY"]);let a=OV(t),[l]=OH(t).getLocalBounds().min,[s,u]=a.min,[c,f]=a.max,p=(c-s)*2;return{brushRegion:OB,hotZone:new lF({className:O$,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=ON(n,Object.assign(Object.assign({},x),{reverse:u,brushRegion:r,brushended(n){b.delete(e),0===Array.from(b.entries()).length?_(n):S(t,n)},brushed(n,r,o,a,l){b.set(e,i(n,r,o,a)),S(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:xk,axes:OG,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:xN(o),state:xR(a,["active",["inactive",{opacity:.5}]]),coordinate:u,emitter:r},t))}}var Oq=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 OY(t){var{hideX:e=!0,hideY:n=!0}=t,r=Oq(t,["hideX","hideY"]);return(t,i,o)=>{let{container:a,view:l,options:s,update:u,setState:c}=t,f=x_(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=ua(Oq(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=ON(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 b$(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=>tG({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 OX(t){return OY(Object.assign(Object.assign({hideX:!0},t),{brushRegion:OD}))}function OK(t){return OY(Object.assign(Object.assign({hideY:!0},t),{brushRegion:OB}))}var OZ=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 OQ(t){return[t[0],t[t.length-1]]}function OJ({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:S,y:_}=b,P=ey(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||S.getOptions().domain,y:t.y||_.getOptions().domain};for(let t of g){let{orientation:e}=t.attributes,[u,c]=j(e),p=`${n}${md(u)}:filter`,h="x"===u,{ratio:g}=S.getOptions(),{ratio:x}=_.getOptions(),O=t=>{if(t.data){let{selection:e}=t.data,[n=OQ(C.x),r=OQ(C.y)]=e;return h?[bW(S,n,g),bW(_,r,x)]:[bW(_,r,x),bW(S,n,g)]}let{value:n}=t.detail;return[function(t,e,n){let[r,i]=t,o=n?t=>1-t:t=>t,a=bz(e,o(r),!0),l=bz(e,o(i),!1);return bW(e,[a,l])}(n,b[u],P&&"horizontal"===e),C[c]]},N=xZ(e=>OZ(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:[OQ(t),OQ(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 tG({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 a3("valuechange",{data:i,nativeEvent:!1})),r(t,h?bG(a,S):bG(l,_))};f.on(p,L),t.addEventListener("valuechange",N),A.set(t,N),T.add([p,L]);let I=s(t);I&&t.dispatchEvent(new a3("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 O0="g2-scrollbar";function O1(t={}){return(e,n,r)=>{let{view:i,container:o}=e;if(!o.getElementsByClassName(O0).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}),OJ(Object.assign(Object.assign({},t),{initDomain:u,className:O0,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 O2(t){return t.replace(/-(\w)/g,function(t,e){return e.toUpperCase()})}var O5=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 O3={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 O4(t){return"text"===t.nodeName&&!!t.isOverflowing()}function O6(t){var{offsetX:e=8,offsetY:n=8}=t,r=O5(t,["offsetX","offsetY"]);return t=>{let{container:i}=t,[o,a]=i.getBounds().min,l=ua(r,"tip"),s=new Set,u=t=>{var r;let{target:u}=t;if(!O4(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 lC({className:"poptip",style:{innerHTML:(r=Object.assign(Object.assign({},O3),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;if(!O4(e))return void t.stopPropagation();e.tip&&(e.tip.remove(),e.tip=null,s.delete(e.tip))};return i.addEventListener("pointerover",u),i.addEventListener("pointerout",c),()=>{i.removeEventListener("pointerover",u),i.removeEventListener("pointerout",c),s.forEach(t=>t.remove())}}}function O8(t){return s8(t)?0:vr(t)?t.length:Object.keys(t).length}O6.props={reapplyWhenUpdate:!0};var O9=function(t){return tB(t,"String")},O7=function(t,e,n){for(var r=0,i=O9(e)?e.split("."):e;t&&r<i.length;)t=t[i[r++]];return void 0===t||r<i.length?n:t},wt=function(t){return"function"==typeof t},we=Object.keys?function(t){return Object.keys(t)}:function(t){var e=[];return mf(t,function(n,r){wt(t)&&"prototype"===r||e.push(r)}),e},wn=function(t,e){var n=we(e),r=n.length;if(s8(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},wr=function(t,e){if(!tz(t))return null;if(wt(e)&&(n=e),t$(e)&&(n=function(t){return wn(t,e)}),n){for(var n,r=0;r<t.length;r+=1)if(n(t[r]))return t[r]}return null},wi=Object.prototype.hasOwnProperty,wo=function(t,e){if(null===t||!t$(t))return{};var n={};return mf(e,function(e){wi.call(t,e)&&(n[e]=t[e])}),n};function wa(t){return null==t?null:wl(t)}function wl(t){if("function"!=typeof t)throw Error();return t}function ws(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 wu(t,e){t instanceof Map?(t=[void 0,t],void 0===e&&(e=wf)):void 0===e&&(e=wc);for(var n,r,i,o,a,l=new wd(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 wd(i[o])),r.parent=n,r.depth=n.depth+1;return l.eachBefore(wh)}function wc(t){return t.children}function wf(t){return Array.isArray(t)?t[1]:null}function wp(t){void 0!==t.data.value&&(t.value=t.data.value),t.data=t.data.data}function wh(t){var e=0;do t.height=e;while((t=t.parent)&&t.height<++e)}function wd(t){this.data=t,this.depth=this.height=0,this.parent=null}wd.prototype=wu.prototype={constructor:wd,count:function(){return this.eachAfter(ws)},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 wu(this).eachBefore(wp)},[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 wy={depth:-1},wg={},wm={};function wv(t){return t.id}function wb(t){return t.parentId}function wx(){var t,e=wv,n=wb;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,ww(i,o-1)&&!ww(i,o-2)&&(i=i.slice(0,-1)),"/"===i[0]?i:`/${i}`}),n=e.map(wO),i=new Set(e).add("");for(let t of n)i.has(t)||(i.add(t),e.push(t),n.push(wO(t)),p.push(wm));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 wd(o),null!=(c=h(o,a,r))&&(c+="")&&(f=u.id=c,y.set(f,y.has(f)?wg: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===wg)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===wm&&1===l.children.length;)l=l.children[0],--i;for(let t=p.length-1;t>=0&&(u=p[t]).data===wm;--t)u.data=null}if(l.parent=wy,l.eachBefore(function(t){t.depth=t.parent.depth+1,--i}).eachBefore(wh),l.parent=null,i>0)throw Error("cycle");return l}return r.id=function(t){return arguments.length?(e=wa(t),r):e},r.parentId=function(t){return arguments.length?(n=wa(t),r):n},r.path=function(e){return arguments.length?(t=wa(e),r):t},r}function wO(t){let e=t.length;if(e<2)return"";for(;--e>1&&!ww(t,e););return t.slice(0,e)}function ww(t,e){if("/"===t[e]){let n=0;for(;e>0&&"\\"===t[--e];)++n;if((1&n)==0)return!0}return!1}function wE(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 wk(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 wM(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?wM:wk)(t,e,n,r,i)}var w_=(1+Math.sqrt(5))/2;function wP(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?wk(a,n,r,i,E?r+=u*c/E:o):wM(a,n,r,E?n+=s*c/E:i,o),E-=c,x=O}return v}var wj=function t(e){function n(t,n,r,i,o){wP(e,t,n,r,i,o)}return n.ratio=function(e){return t((e*=1)>1?e:1)},n}(w_),wA=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?wk(l,n,r,i,h?r+=(o-r)*l.value/h:o):wM(l,n,r,h?n+=(i-n)*l.value/h:i,o),h-=l.value}else t._squarify=a=wP(e,t,n,r,i,o),a.ratio=e}return n.ratio=function(e){return t((e*=1)>1?e:1)},n}(w_);function wT(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 wC(){return 0}function wN(t){return function(){return t}}function wL(t,e,n){var r;let{value:i}=n,o=function(t,e){let n={treemapBinary:wE,treemapDice:wk,treemapSlice:wM,treemapSliceDice:wS,treemapSquarify:wj,treemapResquarify:wA},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?wx().path(r)(t):wx()(t):wu(t));tz(t)?function t(e){let n=O7(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:cY(i)(t)).sort(e.sort):a.count(),(function(){var t=wj,e=!1,n=1,r=1,i=[0],o=wC,a=wC,l=wC,s=wC,u=wC;function c(t){return t.x0=t.y0=0,t.x1=n,t.y1=r,t.eachBefore(f),i=[0],e&&t.eachBefore(wT),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=wl(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:wN(+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:wN(+t),c):a},c.paddingRight=function(t){return arguments.length?(l="function"==typeof t?t:wN(+t),c):l},c.paddingBottom=function(t){return arguments.length?(s="function"==typeof t?t:wN(+t),c):s},c.paddingLeft=function(t){return arguments.length?(u="function"==typeof t?t:wN(+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 wI=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 wR=t=>t.querySelectorAll(".element"),wD={breadCrumbFill:"rgba(0, 0, 0, 0.85)",breadCrumbFontSize:12,breadCrumbY:12,activeFill:"rgba(0, 0, 0, 0.5)"};function wF(t={}){let{originData:e=[],layout:n}=t,r=tG({},wD,wI(t,["originData","layout"])),i=ua(r,"breadCrumb"),o=ua(r,"active");return t=>{let{update:r,setState:a,container:l,options:s}=t,u=up(l).select(`.${xd}`).node(),{state:c}=s.marks[0],f=new lT;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 lB({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 lB({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===O8(t)-1&&c.remove(),u});s.forEach((t,e)=>{if(e===O8(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(O7(t,["style","path"]),O7(t,["style","depth"]))})})}[...OE(l),...Ok(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=O7(t,["id"]);return e&&(e.match(`${o}/`)||o.match(e))}).map(t=>({value:0===t.height?O7(t,["value"]):void 0,name:O7(t,["id"])})),{paddingLeft:i,paddingBottom:a,paddingRight:l}=n;r=wL(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(vi(t))}),tG({},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"!==O7(n,["markType"]))return;let r=O7(n,["__data__","key"]),i=wr(e,t=>t.id===r);O7(i,"height")&&p(O7(i,"path"),O7(i,"depth"))};u.addEventListener("click",h);let d=we(Object.assign(Object.assign({},c.active),c.inactive)),y=()=>{wR(u).forEach(t=>{let n=O7(t,["style","cursor"]),r=wr(e,e=>e.id===O7(t,["__data__","key"]));if("pointer"!==n&&(null==r?void 0:r.height)){t.style.cursor="pointer";let e=wo(t.attributes,d);t.addEventListener("mouseenter",()=>{t.attr(c.active)}),t.addEventListener("mouseleave",()=>{t.attr(tG(e,c.inactive))})}})};return y(),u.addEventListener("mousemove",y),()=>{f.remove(),u.removeEventListener("click",h),u.removeEventListener("mousemove",y)}}}var wB=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 wz(t){return(e,...n)=>tG({},t(e,...n),e)}function wW(t){return(e,...n)=>tG({},e,t(e,...n))}function w$(t,e){if(!t)return e;if(Array.isArray(t))return t;let{value:n=e}=t;return Object.assign(Object.assign({},wB(t,["value"])),{value:n})}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=()=>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({},wG(t,["data","x","y","width","height"])),{data:w$(e,a),x:null!=l?l:n,y:null!=s?s:r,width:null!=u?u:i,height:null!=c?c:o})})};wH.props={};var wV=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 wU=()=>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=wV(r,["data"]),y=w$(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};wU.props={};class wq{constructor(t){this.$value=t}static of(t){return new wq(t)}call(t,...e){return this.$value=t(this.$value,...e),this}value(){return this.$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=wz(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=s2(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"))}}}),wK=wz(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)?[ce(a)]:[Array.from(new Set(a)),"ordinal"]})();return{encode:{color:e},scale:{color:tG({},n,{domain:s,type:u})},legend:{color:tG({title:l},r)}}}),wZ=wz(()=>({animate:{enterType:"fadeIn"}})),wQ=wW(()=>({frame:!1,encode:{shape:"hollow"},style:{lineWidth:0}})),wJ=wW(()=>({type:"cell"})),w0=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}}]}}}),w1=wW((t,e=w2,n=w3,r=w4,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=cr(t),S=t.map(e),_=t.map(({x:t,y:e})=>[s.invert(t),g.invert(e)]),P=_.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?dm(P,t=>t.length):void 0,A=_.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]=S[t],s=A[t],f=P[t];return T[t].map(g=>{var E,k,{scale:M,key:S,facet:_=!0,axis:P={},legend:A={}}=g,T=wY(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=_?f:0===f.length?[]:h,I={x:w6(N,n)(s,L),y:w6(C,r)(s,L)};return Object.assign(Object.assign({key:`${S}-${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:tG({x:{tickCount:d?5:void 0},y:{tickCount:y?5:void 0}},M,{color:{domain:v}}),axis:tG({},P,I),legend:!1},T),i)})})}}});function w2(t){let{points:e}=t;return ub(e)}function w5(t,e){return e.length?tG({title:!1,tick:null,label:null},t):tG({title:!1,tick:null,label:null,grid:null},t)}function w3(t){return(e,n)=>{let{rowIndex:r,rowValuesLength:i,columnIndex:o,columnValuesLength:a}=e;return r!==i-1?w5(t,n):tG({title:o===a-1&&void 0,grid:n.length?void 0:null},t)}}function w4(t){return(e,n)=>{let{rowIndex:r,columnIndex:i}=e;return 0!==i?w5(t,n):tG({title:0===r&&void 0,grid:n.length?void 0:null},t)}}function w6(t,e){return"function"==typeof t?t:null===t||!1===t?()=>null:e(t)}let w8=()=>t=>[wq.of(t).call(wJ).call(wK).call(wZ).call(wX).call(wQ).call(w0).call(w1).value()];w8.props={};var w9=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 w7=wz(t=>({scale:{x:{guide:null,paddingOuter:0,paddingInner:.1},y:{guide:null,range:[0,1],paddingOuter:0,paddingInner:.1}}})),Et=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=cr(t),v=t.map(({points:t})=>ub(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:S}=g,_=w9(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 w5(x,e)})(y,e),y:("function"==typeof(O=P)?O:null===O?()=>null:(t,e)=>{let{columnIndex:n}=t;if(0!==n)return w5(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:tG({x:{facet:!1},y:{facet:!1}},w),axis:tG({x:{tickCount:5},y:{tickCount:5}},M,j),legend:!1,encode:tG({},k,{x:u,y:d}),interaction:tG({},S,{legendFilter:!1})},_)})})}}}),Ee=wW(t=>{let{encode:e}=t,n=w9(t,["encode"]),{position:r=[],x:i=r,y:o=[...r].reverse()}=e,a=w9(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}})})}),En=()=>t=>[wq.of(t).call(wJ).call(wK).call(Et).call(Ee).call(wZ).call(wQ).call(w7).value()];var Er=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 Ei=wz(t=>({scale:{x:{guide:{type:"axisArc"},paddingOuter:0,paddingInner:.1},y:{guide:null,range:[0,1],paddingOuter:0,paddingInner:.1}}})),Eo=wz(t=>({coordinate:{type:"polar"}})),Ea=t=>{let{encode:e}=t,n=Er(t,["encode"]),{position:r}=e;return Object.assign(Object.assign({},n),{encode:{x:r}})};function El(t){return t=>null}function Es(t){let{points:e}=t,[n,r,i,o]=e,a=uy(n,o),l=ud(n,o),s=uv(l,ud(r,i)),u=1/Math.sin(s/2),c=a/(1+u),f=c*Math.sqrt(2),[p,h]=i,d=um(l)+s/2,y=c*u;return[p+y*Math.sin(d)-f/2,h-y*Math.cos(d)-f/2,f,f]}let Eu=()=>t=>[wq.of(t).call(wJ).call(Ea).call(wK).call(Eo).call(w0).call(w1,Es,El,El,{frame:!1}).call(wZ).call(wQ).call(Ei).value()],Ec=()=>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=tG({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 Ef(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 Ep(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=tY(i,t))?void 0:e[0]]}).filter(([,t])=>uo(t));return Array.from(s2(e,t=>o.map(([,e])=>e[t]).join("-")).values())}function Eh(t){var e,n;return Array.isArray(t)?(e=t,(t,n,r)=>(n,r)=>e.reduce((e,i)=>0!==e?e:b_(t[n][i],t[r][i]),0)):"function"==typeof t?(n=t,(t,e,r)=>Ex(e=>n(t[e]))):"series"===t?Eg:"value"===t?Em:"sum"===t?Ev:"maxIndex"===t?Eb:()=>null}function Ed(t,e){for(let n of t)n.sort(e)}function Ey(t,e){return(null==e?void 0:e.domain)||Array.from(new Set(t))}function Eg(t,e,n){return Ex(t=>n[t])}function Em(t,e,n){return Ex(t=>e[t])}function Ev(t,e,n){let r=new Map(Array.from(s2(cr(t),t=>n[+t]).entries()).map(([t,n])=>[t,n.reduce((t,n)=>t+ +e[n])]));return Ex(t=>r.get(n[t]))}function Eb(t,e,n){let r=new Map(Array.from(s2(cr(t),t=>n[+t]).entries()).map(([t,n])=>[t,Ef(n,t=>e[t])]));return Ex(t=>r.get(n[t]))}function Ex(t){return(e,n)=>b_(t(e),t(n))}Ec.props={};let EO=(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]=tY(u,"y"),[h,d]=tY(u,"y1"),[y]=a?tX(u,"series","color"):tY(u,"color"),g=Ep(e,t,l),v=Eh(n)(s,f,y);v&&Ed(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),S="y"===i?b:x,_="y"===o?b:x;return[t,tG({},l,{encode:{y0:tV(f,p),y:tH(S,p),y1:tH(_,d)},style:Object.assign({first:(t,e)=>k.has(e),last:(t,e)=>M.has(e)},c)})]}};function Ew(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 EE(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}EO.props={};var Ek=Array.prototype,EM=Ek.slice;Ek.map;let ES=Math.sqrt(50),E_=Math.sqrt(10),EP=Math.sqrt(2);function Ej(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>=ES?10:s>=E_?5:s>=EP?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)?Ej(t,e,2*n):[r,i,o]}function EA(t,e,n){return Ej(t*=1,e*=1,n*=1)[2]}function ET(t){return Math.max(1,Math.ceil(Math.log(Ew(t))/Math.LN2)+1)}function EC(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?bF:bD(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));EC(t,e,c,f,i)}let o=t[e],a=n,l=r;for(EN(t,n,e),i(t[r],o)>0&&EN(t,n,r);a<l;){for(EN(t,a,l),++a,--l;0>i(t[a],o);)++a;for(;i(t[l],o)>0;)--l}0===i(t[n],o)?EN(t,n,l):EN(t,++l,r),l<=e&&(n=l+1),e<=l&&(r=l-1)}return t}function EN(t,e,n){let r=t[e];t[e]=t[n],t[n]=r}function EL(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 dg(t);if(e>=1)return dm(t);var r,i=(r-1)*e,o=Math.floor(i),a=dm(EC(t,o).subarray(0,o+1));return a+(dg(t.subarray(o+1))-a)*(i-o)}}function EI(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 ER=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 ED(t){return e=>null===e?t:`${t} of ${e}`}function EF(){return[(t,e)=>x1(t,t=>+e[t]),ED("mean")]}function EB(){return[(t,e)=>EL(t,.5,t=>+e[t]),ED("median")]}function Ez(){return[(t,e)=>dm(t,t=>+e[t]),ED("max")]}function EW(){return[(t,e)=>dg(t,t=>+e[t]),ED("min")]}function E$(){return[(t,e)=>t.length,ED("count")]}function EG(){return[(t,e)=>EI(t,t=>+e[t]),ED("sum")]}function EH(){return[(t,e)=>e[t[0]],ED("first")]}function EV(){return[(t,e)=>e[t[t.length-1]],ED("last")]}let EU=(t={})=>{let{groupBy:e}=t,n=ER(t,["groupBy"]);return(t,r)=>{let{data:i,encode:o}=r,a=e(t,r);if(!a)return[t,r];let l=(t,e)=>{if(t)return t;let{from:n}=e;if(!n)return t;let[,r]=tY(o,n);return r},s=Object.entries(n).map(([t,e])=>{let[n,r]=function(t){if("function"==typeof t)return[t,null];let e={mean:EF,max:Ez,count:E$,first:EH,last:EV,sum:EG,min:EW,median:EB}[t];if(!e)throw Error(`Unknown reducer: ${t}.`);return e()}(e),[s,u]=tY(o,t),c=l(u,e);return[t,Object.assign(Object.assign({},Object.assign(Object.assign({},tH(a.map(t=>n(t,null!=s?s:i)),(null==r?void 0:r(c))||c)),{constant:!1})),{aggregate:!0})]}),u=Object.keys(o).map(t=>{let[e,n]=tY(o,t);return[t,tH(a.map(t=>e[t[0]]),n)]}),c=a.map(t=>i[t[0]]);return[cr(a),tG({},r,{data:c,encode:Object.fromEntries([...u,...s])})]}};EU.props={};var Eq=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 EY="thresholds",EX=(t={})=>{let{groupChannels:e=["color"],binChannels:n=["x","y"]}=t,r=Eq(t,["groupChannels","binChannels"]),i={};return EU(Object.assign(Object.assign(Object.assign({},Object.fromEntries(Object.entries(r).filter(([t])=>!t.startsWith(EY)))),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]=tY(a,t);return e}),s=ua(r,EY),u=t.filter(t=>l.every(e=>uo(e[t]))),c=[...e.map(t=>{let[e]=tY(a,t);return e}).filter(uo).map(t=>e=>t[e]),...n.map((t,e)=>{let n=l[e],r=s[t]||function(t){let[e,n]=ce(t);return Math.min(200,function(t,e,n){let r=Ew(t),i=EE(t);return r&&i?Math.ceil((n-e)*Math.cbrt(r)/(3.49*i)):1}(t,e,n))}(n),o=new Map((function(){var t=s1,e=ce,n=ET;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===ce&&([c,f]=function(t,e,n){let r;for(;;){let i=EA(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?Ej(e,t,n):Ej(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=EA(c,f,n)),p[p.length-1]>=f)if(t>=f&&e===ce){let t=EA(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[bN(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)?EM.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(s2(u,t=>c.map(e=>e(t)).join("-")).values())}}))};EX.props={};let EK=(t={})=>{let{thresholds:e}=t;return EX(Object.assign(Object.assign({},t),{thresholdsX:e,groupChannels:["color"],binChannels:["x"]}))};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{groupBy:e="x",reverse:n=!1,orderBy:r,padding:i}=t;return EZ(t,["groupBy","reverse","orderBy","padding"]),(t,o)=>{let{data:a,encode:l,scale:s}=o,{series:u}=s,[c]=tY(l,"y"),[f]=tX(l,"series","color"),p=Ey(f,u),h=Ep(e,t,o),d=Eh(r)(a,c,f);d&&Ed(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,tG({},o,{scale:{series:{domain:p,paddingInner:i}},encode:{series:tH(y)}})]}};function EJ(t,e,n){if(null===t)return[-.5,.5];let r=new dD({domain:Ey(t,e),range:[0,1],padding:n}).getBandWidth();return[-r/2,r/2]}EQ.props={};let E0=(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]=tY(o,"x"),[c]=tY(o,"y"),f=EJ(u,l,n),p=EJ(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,tG({scale:{x:{padding:.5},y:{padding:.5}}},e,{encode:{dy:tH(h),dx:tH(d)}})]}};E0.props={};let E1=(t={})=>{let{padding:e=0,random:n=Math.random}=t;return(t,r)=>{let{encode:i,scale:o}=r,{x:a}=o,[l]=tY(i,"x"),s=EJ(l,a,e),u=t.map(()=>(function(t,e,n){return e*(1-t)+n*t})(n(),...s));return[t,tG({scale:{x:{padding:.5}}},r,{encode:{dx:tH(u)}})]}};E1.props={};let E2=(t={})=>{let{padding:e=0,random:n=Math.random}=t;return(t,r)=>{let{encode:i,scale:o}=r,{y:a}=o,[l]=tY(i,"y"),s=EJ(l,a,e),u=t.map(()=>(function(t,e,n){return e*(1-t)+n*t})(n(),...s));return[t,tG({scale:{y:{padding:.5}}},r,{encode:{dy:tH(u)}})]}};E2.props={};var E5=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 E3=(t={})=>{let{groupBy:e="x"}=t;return(t,n)=>{let{encode:r}=n,{x:i}=r,o=Object.entries(E5(r,["x"])).filter(([t])=>t.startsWith("y")).map(([t])=>[t,tY(r,t)[0]]),a=o.map(([e])=>[e,Array(t.length)]),l=Ep(e,t,n),s=Array(l.length);for(let t=0;t<l.length;t++){let[e,n]=ce(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,tG({},n,{encode:Object.fromEntries(a.map(([t,e])=>[t,tH(e,tY(r,t)[1])]))})]}};E3.props={};let E4=(t={})=>{let{groupBy:e="x",series:n=!0}=t;return(t,r)=>{let{encode:i}=r,[o]=tY(i,"y"),[a,l]=tY(i,"y1"),[s]=n?tX(i,"series","color"):tY(i,"color"),u=Ep(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,tG({},r,{encode:{y1:tH(c,l)}})]}};E4.props={};let E6=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,tY(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(s2(n,e=>t[e]).values());e.push(...r)}u=e}if(r){let[t]=tY(l,r);t&&u.sort((e,r)=>n(e,t)-n(r,t)),i&&u.reverse()}let c=(o||3e3)/u.length,[f]=o?[tq(t,c)]:tX(l,"enterDuration",tq(t,c)),[p]=tX(l,"enterDelay",tq(t,0)),h=Array(t.length);for(let t=0,e=0;t<u.length;t++){let n=u[t],r=dm(n,t=>+f[t]);for(let t of n)h[t]=+p[t]+e;e+=r}return[t,tG({},a,{encode:{enterDuration:tU(f),enterDelay:tU(h)}})]}};E6.props={};var E8=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 E9=(t={})=>{let{groupBy:e="x",basis:n="max"}=t;return(t,r)=>{let{encode:i,tooltip:o}=r,{x:a}=i,l=Object.entries(E8(i,["x"])).filter(([t])=>t.startsWith("y")).map(([t])=>[t,tY(i,t)[0]]),[,s]=l.find(([t])=>"y"===t),u=l.map(([e])=>[e,Array(t.length)]),c=Ep(e,t,r),f="function"==typeof n?n:({min:(t,e)=>dg(t,t=>e[+t]),max:(t,e)=>dm(t,t=>e[+t]),first:(t,e)=>e[t[0]],last:(t,e)=>e[t[t.length-1]],mean:(t,e)=>x1(t,t=>e[+t]),median:(t,e)=>EL(t,.5,t=>e[+t]),sum:(t,e)=>EI(t,t=>e[+t]),deviation:(t,e)=>EE(t,t=>e[+t])})[n]||dm;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=uf(o)||(null==o?void 0:o.items)&&(null==o?void 0:o.items.length)!==0;return[t,tG({},r,Object.assign({encode:Object.fromEntries(u.map(([t,e])=>[t,tH(e,tY(i,t)[1])]))},!p&&i.y0&&{tooltip:{items:[{channel:"y0"}]}}))]}};function E7(t,e){return[t[0]]}function kt(t,e){let n=t.length-1;return[t[n]]}function ke(t,e){let n=Ef(t,t=>e[t]);return[t[n]]}function kn(t,e){let n=x2(t,t=>e[t]);return[t[n]]}E9.props={};let kr=(t={})=>{let{groupBy:e="series",channel:n,selector:r}=t;return(t,i)=>{let{encode:o}=i,a=Ep(e,t,i),[l]=tY(o,n),s="function"==typeof r?r:({first:E7,last:kt,max:ke,min:kn})[r]||E7;return[a.flatMap(t=>s(t,l)),i]}};kr.props={};var ki=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let ko=(t={})=>{let{selector:e}=t;return kr(Object.assign({channel:"x",selector:e},ki(t,["selector"])))};ko.props={};var ka=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let kl=(t={})=>{let{selector:e}=t;return kr(Object.assign({channel:"y",selector:e},ka(t,["selector"])))};kl.props={};var ks=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 ku=(t={})=>{let{channels:e=["x","y"]}=t;return EU(Object.assign(Object.assign({},ks(t,["channels"])),{groupBy:(t,n)=>Ep(e,t,n)}))};ku.props={};let kc=(t={})=>ku(Object.assign(Object.assign({},t),{channels:["x","color","series"]}));kc.props={};let kf=(t={})=>ku(Object.assign(Object.assign({},t),{channels:["y","color","series"]}));kf.props={};let kp=(t={})=>ku(Object.assign(Object.assign({},t),{channels:["color"]}));kp.props={};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};let kd=(t={})=>{let{reverse:e=!1,slice:n,channel:r,ordinal:i=!0}=t,o=kh(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=kh(n,["reverse","slice","channel"]),{encode:c,scale:f={}}=e,p=null==(r=f[s])?void 0:r.domain,[h]=tY(c,s),d=function(t,e,n){let{by:r=t,reducer:i="max"}=e,[o]=tY(n,r);if("function"==typeof i)return t=>i(t,o);if("max"===i)return t=>dm(t,t=>+o[t]);if("min"===i)return t=>dg(t,t=>+o[t]);if("sum"===i)return t=>EI(t,t=>+o[t]);if("median"===i)return t=>EL(t,.5,t=>+o[t]);if("mean"===i)return t=>x1(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?bR(s3(i,d,o),([t,e],[n,r])=>b_(e,r)||b_(t,n)):bR(s2(i,o),([t,e],[n,r])=>d(e,r)||b_(t,n))).map(([t])=>t));return a&&y.reverse(),[t,tG(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]=tY(o,i),l=bR(t,t=>a[t]);return r&&l.reverse(),[l,e]}(t,a,Object.assign({reverse:e,slice:n,channel:r},o))};kd.props={};let ky=(t={})=>kd(Object.assign(Object.assign({},t),{channel:"x"}));ky.props={};let kg=(t={})=>kd(Object.assign(Object.assign({},t),{channel:"y"}));kg.props={};let km=(t={})=>kd(Object.assign(Object.assign({},t),{channel:"color"}));km.props={};let kv=(t={})=>{let{field:e,channel:n="y",reducer:r="sum"}=t;return(t,i)=>{let{data:o,encode:a}=i,[l]=tY(a,"x"),s=s4(t,function(t,e){if("function"==typeof t)return n=>t(n,e);if("sum"===t)return t=>EI(t,t=>+e[t]);throw Error(`Unknown reducer: ${t}`)}(r,e?"string"==typeof e?o.map(t=>t[e]):o.map(e):tY(a,n)[0]),t=>l[t]).map(t=>t[1]);return[t,tG({},i,{scale:{x:{flex:s}}})]}};kv.props={};let kb=t=>(e,n)=>[e,tG({},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]=ub(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 kx(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])}kb.props={};let kO=(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 kx;let e={first:t=>[t[0]],last:t=>[t[t.length-1]],min:(t,e,n)=>[t[x2(t,t=>n[t])]],max:(t,e,n)=>[t[Ef(t,t=>n[t])]],median:(t,e,n)=>[t[function(t,e,n=bT){if(!isNaN(e*=1)){if(r=Float64Array.from(t,(e,r)=>bT(n(t[r],r,t))),e<=0)return x2(r);if(e>=1)return Ef(r);var r,i=Uint32Array.from(t,(t,e)=>e),o=r.length-1,a=Math.floor(o*e);return EC(i,a,0,o,(t,e)=>bF(r[t],r[e])),(a=function(t,e=b_){let n,r=!1;if(1===e.length){let i;for(let o of t){let t=e(o);(r?b_(t,i)>0:0===b_(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=Ep(r,t,e),[l]=tY(o,"x"),[s]=tY(o,"y");return[a.flatMap(t=>i(t,l,s,n)),e]}};kO.props={};let kw=(t={})=>(e,n)=>{let{encode:r,data:i}=n,o=Object.entries(t).map(([t,e])=>{let[n]=tY(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(uo);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,tG({},n,{encode:Object.fromEntries(s),data:a.map(t=>i[t])})]};kw.props={};var kE={},kk={};function kM(t){return Function("d","return {"+t.map(function(t,e){return JSON.stringify(t)+": d["+e+'] || ""'}).join(",")+"}")}function kS(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 k_(t,e){var n=t+"",r=n.length;return r<e?Array(e-r+1).join(0)+n:n}function kP(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 kj&&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 kj=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours(),kA=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 kk;if(u)return u=!1,kE;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())!==kk;){for(var f=[];r!==kE&&r!==kk;)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?"-"+k_(-l,6):l>9999?"+"+k_(l,6):k_(l,4))+"-"+k_(n.getUTCMonth()+1,2)+"-"+k_(n.getUTCDate(),2)+(a?"T"+k_(r,2)+":"+k_(i,2)+":"+k_(o,2)+"."+k_(a,3)+"Z":o?"T"+k_(r,2)+":"+k_(i,2)+":"+k_(o,2)+"Z":i||r?"T"+k_(r,2)+":"+k_(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=kM(t),function(n,r){return e(o(n),r,t)}):kM(t)});return o.columns=i||[],o},parseRows:r,format:function(e,n){return null==n&&(n=kS(e)),[n.map(a).join(t)].concat(i(e,n)).join("\n")},formatBody:function(t,e){return null==e&&(e=kS(t)),i(t,e).join("\n")},formatRows:function(t){return t.map(o).join("\n")},formatRow:o,formatValue:a}})(r).parse(e,i?kP:ut)}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())})}};kA.props={};let kT=t=>{let{value:e}=t;return()=>e};kT.props={};let kC=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))};kC.props={};let kN=t=>{let{callback:e}=t;return t=>Array.isArray(t)?[...t].sort(e):t};function kL(t){return null!=t&&!Number.isNaN(t)}kN.props={};let kI=t=>{let{callback:e=kL}=t;return t=>t.filter(e)};kI.props={};let kR=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))};kR.props={};let kD=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;kD.props={};let kF=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};kF.props={};let kB=t=>{let{start:e,end:n}=t;return t=>t.slice(e,n)};kB.props={};let kz=t=>{let{callback:e=ut}=t;return t=>e(t)};kz.props={};let kW=t=>{let{callback:e=ut}=t;return t=>Array.isArray(t)?t.map(e):t};function k$(t){return"string"==typeof t?e=>e[t]:t}kW.props={};let kG=t=>{let{join:e,on:n,select:r=[],as:i=r,unknown:o=NaN}=t,[a,l]=n,s=k$(l),u=k$(a),c=s3(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),{}))})};kG.props={};var kH=n(3740),kV=n.n(kH);let kU=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(s2(t,t=>n.map(e=>t[e]).join("-")).values()).map(t=>{let n=kV().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})})};kU.props={};let kq=()=>t=>(console.log("G2 data section:",t),t);function kY(t){let{min:e,max:n}=t;return[[e[0],e[1]],[n[0],n[1]]]}function kX(t,e){let[n,r]=t,[i,o]=e;return n>=i[0]&&n<=o[0]&&r>=i[1]&&r<=o[1]}kq.props={};let kK=t=>{let{priority:e}=t;return t=>{let n=[];return e&&t.sort(e),t.forEach(t=>{xw(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]})(kY(e),kY(t.getLocalBounds())))?xO(t):n.push(t)}),t}};function kZ(){let t=new Map;return[e=>t.get(e),(e,n)=>t.set(e,n)]}let kQ=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]=kZ(),[l,s]=kZ(),[u,c]=kZ(),[f,p]=kZ();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)=>b_(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}},kJ=()=>t=>(t.forEach(t=>{xw(t);let e=t.attr("bounds");(function(t,e){let[n,r]=t;return!(kX(n,e)&&kX(r,e))})(kY(t.getLocalBounds()),e)&&xO(t)}),t);function k0(t){let e=t/255;return e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)}function k1(t,e,n){return .2126*k0(t)+.7152*k0(e)+.0722*k0(n)}function k2(t,e){let{r:n,g:r,b:i}=t,{r:o,g:a,b:l}=e,s=k1(n,r,i),u=k1(o,a,l);return(Math.max(s,u)+.05)/(Math.min(s,u)+.05)}let k5=t=>{let{threshold:e=4.5,palette:n=["#000","#fff"]}=t;return t=>(t.forEach(t=>{let r=t.attr("dependentElement").parsedStyle.fill;k2(t.parsedStyle.fill,r)<e&&t.attr("fill",function(t,e){let n=Ef(e,e=>k2(t,"object"==typeof e?e:on(e)));return e[n]}(r,n))}),t)};function k3(){return{"data.fetch":kA,"data.inline":kT,"data.sortBy":kC,"data.sort":kN,"data.filter":kI,"data.pick":kR,"data.rename":kD,"data.fold":kF,"data.slice":kB,"data.custom":kz,"data.map":kW,"data.join":kG,"data.kde":kU,"data.log":kq,"transform.stackY":EO,"transform.binX":EK,"transform.bin":EX,"transform.dodgeX":EQ,"transform.jitter":E0,"transform.jitterX":E1,"transform.jitterY":E2,"transform.symmetryY":E3,"transform.diffY":E4,"transform.stackEnter":E6,"transform.normalizeY":E9,"transform.select":kr,"transform.selectX":ko,"transform.selectY":kl,"transform.groupX":kc,"transform.groupY":kf,"transform.groupColor":kp,"transform.group":ku,"transform.sortX":ky,"transform.sortY":kg,"transform.sortColor":km,"transform.flexX":kv,"transform.pack":kb,"transform.sample":kO,"transform.filter":kw,"coordinate.cartesian":tE,"coordinate.polar":tM,"coordinate.transpose":tS,"coordinate.theta":tP,"coordinate.parallel":tj,"coordinate.fisheye":tA,"coordinate.radial":tC,"coordinate.radar":tN,"encode.constant":tL,"encode.field":tI,"encode.transform":tR,"encode.column":tD,"mark.interval":cJ,"mark.rect":c1,"mark.line":fC,"mark.point":pw,"mark.text":p4,"mark.cell":p9,"mark.area":hc,"mark.link":hE,"mark.image":h_,"mark.polygon":hN,"mark.box":hB,"mark.vector":hW,"mark.lineX":hU,"mark.lineY":hX,"mark.connector":h0,"mark.range":h3,"mark.rangeX":h8,"mark.rangeY":dt,"mark.path":dl,"mark.shape":df,"mark.density":dy,"mark.heatmap":dk,"palette.category10":dM,"palette.category20":dS,"scale.linear":d_,"scale.ordinal":dN,"scale.band":dF,"scale.identity":dH,"scale.point":dU,"scale.time":yg,"scale.log":yE,"scale.pow":yP,"scale.sqrt":yA,"scale.threshold":yC,"scale.quantile":yL,"scale.quantize":yR,"scale.sequential":yB,"scale.constant":yW,"theme.classic":yV,"theme.classicDark":yY,"theme.academy":yK,"theme.light":yH,"theme.dark":yq,"component.axisX":mV,"component.axisY":mU,"component.legendCategory":va,"component.legendContinuous":v6,"component.legends":v8,"component.title":be,"component.sliderX":bU,"component.sliderY":bq,"component.scrollbarX":bZ,"component.scrollbarY":bQ,"animation.scaleInX":bJ,"animation.scaleOutX":b0,"animation.scaleInY":b1,"animation.scaleOutY":b2,"animation.waveIn":b5,"animation.fadeIn":b3,"animation.fadeOut":b4,"animation.zoomIn":b6,"animation.zoomOut":b8,"animation.pathIn":b9,"animation.morphing":xl,"animation.growInX":xs,"animation.growInY":xu,"interaction.elementHighlight":xH,"interaction.elementHighlightByX":xV,"interaction.elementHighlightByColor":xU,"interaction.elementSelect":xY,"interaction.elementSelectByX":xX,"interaction.elementSelectByColor":xK,"interaction.fisheye":xQ,"interaction.chartIndex":x0,"interaction.tooltip":Om,"interaction.legendFilter":OP,"interaction.legendHighlight":Oj,"interaction.brushHighlight":OR,"interaction.brushXHighlight":OF,"interaction.brushYHighlight":Oz,"interaction.brushAxisHighlight":OU,"interaction.brushFilter":OY,"interaction.brushXFilter":OX,"interaction.brushYFilter":OK,"interaction.sliderFilter":OJ,"interaction.scrollbarFilter":O1,"interaction.poptip":O6,"interaction.treemapDrillDown":wF,"composition.spaceLayer":wH,"composition.spaceFlex":wU,"composition.facetRect":w8,"composition.repeatMatrix":En,"composition.facetCircle":Eu,"composition.timingKeyframe":Ec,"labelTransform.overlapHide":kK,"labelTransform.overlapDodgeY":kQ,"labelTransform.overflowHide":kJ,"labelTransform.contrastReverse":k5}}function k4(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 k6(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i}function k8(t){return t[0]}function k9(t){return t[1]}function k7(t,e,n){var r=new Mt(null==e?k8:e,null==n?k9:n,NaN,NaN,NaN,NaN);return null==t?r:r.addAll(t)}function Mt(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 Me(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}var Mn=k7.prototype=Mt.prototype;function Mr(t){return function(){return t}}function Mi(t){return(t()-.5)*1e-6}Mn.copy=function(){var t,e,n=new Mt(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=Me(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]=Me(e));return n},Mn.add=function(t){let e=+this._x.call(null,t),n=+this._y.call(null,t);return k4(this.cover(e,n),e,n,t)},Mn.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)k4(this,a[n],l[n],t[n]);return this},Mn.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},Mn.data=function(){var t=[];return this.visit(function(e){if(!e.length)do t.push(e.data);while(e=e.next)}),t},Mn.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]]},Mn.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 k6(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 k6(y[3],g,v,a,l),new k6(y[2],i,v,g,l),new k6(y[1],g,o,a,v),new k6(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},Mn.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},Mn.removeAll=function(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this},Mn.root=function(){return this._root},Mn.size=function(){var t=0;return this.visit(function(e){if(!e.length)do++t;while(e=e.next)}),t},Mn.visit=function(t){var e,n,r,i,o,a,l=[],s=this._root;for(s&&l.push(new k6(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 k6(n,u,c,o,a)),(n=s[2])&&l.push(new k6(n,r,c,u,a)),(n=s[1])&&l.push(new k6(n,u,i,o,c)),(n=s[0])&&l.push(new k6(n,r,i,u,c))}return this},Mn.visitAfter=function(t){var e,n=[],r=[];for(this._root&&n.push(new k6(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 k6(o,a,l,c,f)),(o=i[1])&&n.push(new k6(o,c,l,s,f)),(o=i[2])&&n.push(new k6(o,a,f,c,u)),(o=i[3])&&n.push(new k6(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},Mn.x=function(t){return arguments.length?(this._x=t,this):this._x},Mn.y=function(t){return arguments.length?(this._y=t,this):this._y};var Mo={value:()=>{}};function Ma(){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 Ml(r)}function Ml(t){this._=t}function Ms(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=Mo,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}Ml.prototype=Ma.prototype={constructor:Ml,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]=Ms(r[n],t.name,e);else if(null==e)for(n in r)r[n]=Ms(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 Ml(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 Mu,Mc,Mf,Mp,Mh,Md,My,Mg,Mm,Mv,Mb,Mx,MO,Mw,ME,Mk,MM,MS,M_,MP,Mj,MA,MT,MC,MN,ML,MI,MR,MD,MF,MB,Mz,MW,M$,MG,MH,MV,MU,Mq,MY,MX,MK,MZ,MQ,MJ,M0,M1,M2,M5,M3,M4,M6,M8,M9,M7,St,Se,Sn,Sr,Si,So=0,Sa=0,Sl=0,Ss=0,Su=0,Sc=0,Sf="object"==typeof performance&&performance.now?performance:Date,Sp="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Sh(){return Su||(Sp(Sd),Su=Sf.now()+Sc)}function Sd(){Su=0}function Sy(){this._call=this._time=this._next=null}function Sg(t,e,n){var r=new Sy;return r.restart(t,e,n),r}function Sm(){Su=(Ss=Sf.now())+Sc,So=Sa=0;try{Sh(),++So;for(var t,e=Sr;e;)(t=Su-e._time)>=0&&e._call.call(void 0,t),e=e._next;--So}finally{So=0,function(){for(var t,e,n=Sr,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:Sr=e);Si=t,Sb(r)}(),Su=0}}function Sv(){var t=Sf.now(),e=t-Ss;e>1e3&&(Sc-=e,Ss=t)}function Sb(t){!So&&(Sa&&(Sa=clearTimeout(Sa)),t-Su>24?(t<1/0&&(Sa=setTimeout(Sm,t-Sf.now()-Sc)),Sl&&(Sl=clearInterval(Sl))):(Sl||(Ss=Sf.now(),Sl=setInterval(Sv,1e3)),So=1,Sp(Sm)))}function Sx(t){return t.x}function SO(t){return t.y}Sy.prototype=Sg.prototype={constructor:Sy,restart:function(t,e,n){if("function"!=typeof t)throw TypeError("callback is not a function");n=(null==n?Sh():+n)+(null==e?0:+e),this._next||Si===this||(Si?Si._next=this:Sr=this,Si=this),this._call=t,this._time=n,Sb()},stop:function(){this._call&&(this._call=null,this._time=1/0,Sb())}};var Sw=Math.PI*(3-Math.sqrt(5));function SE(t){return t.index}function Sk(t,e){var n=t.get(e);if(!n)throw Error("node not found: "+e);return n}function SM(t,e,n={},r=!1){return uf(t)||Array.isArray(t)&&r?t:tG(n,ua(t,e))}function SS(t,e={}){return uf(t)||Array.isArray(t)||!S_(t)?t:tG(e,t)}function S_(t){if(0===Object.keys(t).length)return!0;let{title:e,items:n}=t;return void 0!==e||void 0!==n}function SP(t,e){return"object"==typeof t?ua(t,e):t}var Sj=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 SA={joint:!0},ST={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}},SC={type:"point",axis:!1,legend:!1,encode:{x:"x",y:"y",size:5,color:"group",shape:"point"},style:{stroke:"#fff"}},SN={text:""},SL=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},Sj(n,["nodeKey","linkKey"])),h=ua(p,"node"),d=ua(p,"link"),{links:y,nodes:g}=cK(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=Mr(-30),a=1,l=1/0,s=.81;function u(n){var i,o=t.length,a=k7(t,Sx,SO).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=Mi(n))*f),0===p&&(d+=(p=Mi(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=Mi(n))*f),0===p&&(d+=(p=Mi(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:Mr(+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=SE,s=function(t){return 1/Math.min(i[t.source.index],i[t.target.index])},u=Mr(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||Mi(a))*p+(h=f.y+f.vy-u.y-u.vy||Mi(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=Sk(f,s.source)),"object"!=typeof s.target&&(s.target=Sk(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:Mr(+t),h(),f):s},f.distance=function(t){return arguments.length?(u="function"==typeof t?t:Mr(+t),d(),f):u},f})(i).id(cY(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=Sg(p),c=Ma("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*Sw;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=Mr(.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=Mr(null==t?0:+t)),o.initialize=function(t){e=t,a()},o.strength=function(t){return arguments.length?(i="function"==typeof t?t:Mr(+t),a(),o):i},o.x=function(e){return arguments.length?(t="function"==typeof e?e:Mr(+e),a(),o):t},o}()).force("y",function(t){var e,n,r,i=Mr(.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=Mr(null==t?0:+t)),o.initialize=function(t){e=t,a()},o.strength=function(t){return arguments.length?(i="function"==typeof t?t:Mr(+t),a(),o):i},o.y=function(e){return arguments.length?(t="function"==typeof e?e:Mr(+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},tG({},SA,o),p),x=SM(u,"link",{items:[t=>({name:"source",value:cY(f)(t.source)}),t=>({name:"target",value:cY(f)(t.target)})]}),O=SM(u,"node",{items:[t=>({name:"key",value:cY(c)(t)})]},!0);return[tG({},ST,{data:b,encode:d,labels:l,style:ua(i,"link"),tooltip:x,animate:SP(s,"link")}),tG({},SC,{data:v,encode:Object.assign({},h),scale:r,style:ua(i,"node"),tooltip:O,labels:[Object.assign(Object.assign({},SN),ua(i,"label")),...a],animate:SP(s,"link")})]};function SI(t,e){return t.parent===e.parent?1:2}function SR(t){var e=t.children;return e?e[0]:t.t}function SD(t){var e=t.children;return e?e[e.length-1]:t.t}function SF(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 SB(){var t=SI,e=1,n=1,r=null;function i(i){var s=function(t){for(var e,n,r,i,o,a=new SF(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 SF(r[i],i)),n.parent=e;return(a.parent=new SF(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=SD(u),l=SR(l),u&&l;)c=SR(c),(s=SD(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&&!SD(s)&&(s.t=u,s.m+=h-p),l&&!SR(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 Sz(t,e){return t.parent===e.parent?1:2}function SW(t,e){return t+e.x}function S$(t,e){return Math.max(t,e.y)}function SG(){var t=Sz,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(SW,0)/n.length,e.y=1+n.reduce(S$,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}SL.props={},SF.prototype=Object.create(wd.prototype);let SH=t=>e=>n=>{let{field:r="value",nodeSize:i,separation:o,sortBy:a,as:l=["x","y"]}=e,[s,u]=l,c=wu(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}},SV=t=>SH(SG)(t);SV.props={};let SU=t=>SH(SB)(t);SU.props={};let Sq={sortBy:(t,e)=>e.value-t.value},SY={axis:!1,legend:!1,type:"point",encode:{x:"x",y:"y",size:2,shape:"point"}},SX={type:"link",encode:{x:"x",y:"y",shape:"smooth"}},SK={text:"",fontSize:10},SZ=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}=SU(Object.assign(Object.assign(Object.assign({},Sq),o),{field:c}))(e),h=SM(u,"node",{title:"name",items:["value"]},!0),d=SM(u,"link",{title:"",items:[t=>({name:"source",value:t.source.name}),t=>({name:"target",value:t.target.name})]});return[tG({},SX,{data:p,encode:ua(n,"link"),scale:ua(r,"link"),labels:l,style:Object.assign({stroke:"#999"},ua(i,"link")),tooltip:d,animate:SP(s,"link")}),tG({},SY,{data:f,scale:ua(r,"node"),encode:ua(n,"node"),labels:[Object.assign(Object.assign({},SK),ua(i,"label")),...a],style:Object.assign({},ua(i,"node")),tooltip:h,animate:SP(s,"node")})]};function SQ(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 SJ(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 S0(t,e){for(var n=0;n<e.length;++n)if(!SJ(t,e[n]))return!1;return!0}function S1(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 S2(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,S=(p*v-h*g)/w,_=k*k+S*S-1,P=2*(o+E*k+M*S),j=E*E+M*M-o*o,A=-(Math.abs(_)>1e-6?(P+Math.sqrt(P*P-4*_*j))/(2*_):j/P);return{x:r+E+k*A,y:i+M+S*A,r:A}}function S5(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 S3(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 S4(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 S6(t){this._=t,this.next=null,this.previous=null}function S8(t){return Math.sqrt(t.value)}function S9(t){return function(e){e.children||(e.r=Math.max(0,+t(e)||0))}}function S7(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;S5(r,n,i=t[2]),n=new S6(n),r=new S6(r),i=new S6(i),n.next=i.previous=r,r.next=n.previous=i,i.next=r.previous=n;e:for(s=3;s<o;++s){S5(n._,r._,i=t[s]),i=new S6(i),u=r.next,c=n.previous,f=r._.r,p=n._.r;do if(f<=p){if(S3(u._,i._)){r=u,n.next=r,r.previous=n,--s;continue e}f+=u._.r,u=u.next}else{if(S3(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=S4(n);(i=i.next)!==r;)(l=S4(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&&SJ(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 S1(t[0],t[1]);case 3:return S2(t[0],t[1],t[2])}}(a=function(t,e){var n,r;if(S0(e,t))return[e];for(n=0;n<t.length;++n)if(SQ(e,t[n])&&S0(S1(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(SQ(S1(t[n],t[r]),e)&&SQ(S1(t[n],e),t[r])&&SQ(S1(t[r],e),t[n])&&S0(S2(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 _t(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)}}SZ.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 _n=(t,e)=>({size:[t,e],padding:0,sort:(t,e)=>e.value-t.value}),_r=(t,e,n)=>({type:"point",axis:!1,legend:!1,scale:{x:{domain:[0,t]},y:{domain:[0,e]},size:{type:"identity"}},encode:{x:"x",y:"y",size:"r",shape:"point"},style:{fill:n.color?void 0:t=>0===t.height?"#ddd":"#fff",stroke:n.color?void 0:t=>0===t.height?"":"#000"}}),_i={text:"",position:"inside",textOverflow:"clip",wordWrap:!0,maxLines:1,wordWrapWidth:t=>2*t.r},_o={title:t=>t.data.name,items:[{field:"value"}]},_a=(t,e,n)=>{let{value:r}=n,i=tz(t)?wx().path(e.path)(t):wu(t);return r?i.sum(t=>cY(r)(t)).sort(e.sort):i.count(),(function(){var t=null,e=1,n=1,r=wC;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(S9(t)).eachAfter(S7(r,.5,a)).eachBefore(_t(1)):i.eachBefore(S9(S8)).eachAfter(S7(wC,1,a)).eachAfter(S7(r,i.r/Math.min(e,n),a)).eachBefore(_t(Math.min(e,n)/(2*i.r))),i}return i.radius=function(e){return arguments.length?(t=wa(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:wN(+t),i):r},i})().size(e.size).padding(e.padding)(i),i.descendants()},_l=(t,e)=>{let{width:n,height:r}=e,{data:i,encode:o={},scale:a={},style:l={},layout:s={},labels:u=[],tooltip:c={}}=t,f=_e(t,["data","encode","scale","style","layout","labels","tooltip"]),p=_r(n,r,o),h=_a(i,tG({},_n(n,r),s),tG({},p.encode,o)),d=ua(l,"label");return tG({},p,Object.assign(Object.assign({data:h,encode:o,scale:a,style:l,labels:[Object.assign(Object.assign({},_i),d),...u]},f),{tooltip:SS(c,_o),axis:!1}))};function _s(t){return t.target.depth}function _u(t,e){return t.sourceLinks.length?t.depth:e-1}function _c(t){return function(){return t}}function _f(t,e){return _h(t.source,e.source)||t.index-e.index}function _p(t,e){return _h(t.target,e.target)||t.index-e.index}function _h(t,e){return t.y0-e.y0}function _d(t){return t.value}function _y(t){return t.index}function _g(t){return t.nodes}function _m(t){return t.links}function _v(t,e){let n=t.get(e);if(!n)throw Error("missing: "+e);return n}function _b({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}}_l.props={};let _x={nodeAlign:"justify",nodeWidth:.008,nodePadding:.03,nodes:t=>t.nodes,links:t=>t.links,nodeSort:void 0,linkSort:void 0,iterations:6},_O={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?dg(t.sourceLinks,_s)-1:0},justify:_u},_w=t=>e=>{let{nodeId:n,nodeSort:r,nodeAlign:i,nodeWidth:o,nodePadding:a,nodeDepth:l,nodes:s,links:u,linkSort:c,iterations:f}=Object.assign({},_x,t),p=(function(){let t,e,n,r=0,i=0,o=1,a=1,l=24,s=8,u,c=_y,f=_u,p=_g,h=_m,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=_v(r,n)),"object"!=typeof i&&(i=t.target=_v(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(EI(e.sourceLinks,_d),EI(e.targetLinks,_d)):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(dm(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(dm(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)/(dm(c,t=>t.length)-1));let p=dg(c,t=>(a-i-(t.length-1)*u)/EI(t,_d));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(_p),e.sort(_f)}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(_h),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(_h),o.length&&g(o,r)}}(c,n,r)}}(v),_b(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(_p);for(let{target:{targetLinks:e}}of t)e.sort(_f)}}return y.update=function(t){return _b(t),t},y.nodeId=function(t){return arguments.length?(c="function"==typeof t?t:_c(t),y):c},y.nodeAlign=function(t){return arguments.length?(f="function"==typeof t?t:_c(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:_c(t),y):p},y.links=function(t){return arguments.length?(h="function"==typeof t?t:_c(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(r).linkSort(c).links(u).nodes(s).nodeWidth(o).nodePadding(a).nodeDepth(l).nodeAlign(function(t){let e=typeof t;return"string"===e?_O[t]||_u:"function"===e?t:_u}(i)).iterations(f).extent([[0,0],[1,1]]);"function"==typeof n&&p.nodeId(n);let{nodes:h,links:d}=p(e);return{nodes:h.map(t=>{let{x0:e,x1:n,y0:r,y1:i}=t;return Object.assign(Object.assign({},t),{x:[e,n,n,e],y:[r,r,i,i]})}),links:d.map(t=>{let{source:e,target:n}=t,r=e.x1,i=n.x0,o=t.width/2;return Object.assign(Object.assign({},t),{x:[r,r,i,i],y:[t.y0+o,t.y0-o,t.y1+o,t.y1-o]})})}};_w.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 _k={nodeId:t=>t.key,nodeWidth:.02,nodePadding:.02},_M={type:"polygon",axis:!1,legend:!1,encode:{shape:"polygon",x:"x",y:"y"},scale:{x:{type:"identity"},y:{type:"identity"}},style:{stroke:"#000"}},_S={type:"polygon",axis:!1,legend:!1,encode:{shape:"ribbon",x:"x",y:"y"},style:{fillOpacity:.5,stroke:void 0}},__={textAlign:t=>t.x[0]<.5?"start":"end",position:t=>t.x[0]<.5?"right":"left",fontSize:10},_P=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}=cK(e,n),p=ua(n,"node"),h=ua(n,"link"),{key:d=t=>t.key,color:y=d}=p,{links:g,nodes:v}=_w(Object.assign(Object.assign(Object.assign({},_k),{nodeId:cY(d)}),o))({links:c,nodes:f}),b=ua(i,"label"),{text:x=d,spacing:O=5}=b,w=_E(b,["text","spacing"]),E=cY(d),k=SM(u,"node",{title:E,items:[{field:"value"}]},!0),M=SM(u,"link",{title:"",items:[t=>({name:"source",value:E(t.source)}),t=>({name:"target",value:E(t.target)})]});return[tG({},_M,{data:v,encode:Object.assign(Object.assign({},p),{color:y}),scale:r,style:ua(i,"node"),labels:[Object.assign(Object.assign(Object.assign({},__),{text:x,dx:t=>t.x[0]<.5?O:-O}),w),...a],tooltip:k,animate:SP(s,"node"),axis:!1}),tG({},_S,{data:g,encode:h,labels:l,style:Object.assign({fill:h.color?void 0:"#aaa",strokeWidth:0},ua(i,"link")),tooltip:M,animate:SP(s,"link")})]};function _j(t,e){return e.value-t.value}function _A(t,e){return e.frequency-t.frequency}function _T(t,e){return`${t.id}`.localeCompare(`${e.id}`)}function _C(t,e){return`${t.name}`.localeCompare(`${e.name}`)}_P.props={};let _N={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},_L=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({},_N),t);return function(t){let f=t.nodes.map(t=>Object.assign({},t)),p=t.edges.map(t=>Object.assign({},t));return function(t,e){e.forEach(t=>{t.source=a(t),t.target=l(t),t.sourceWeight=s(t),t.targetWeight=u(t)});let n=s2(e,t=>t.source),r=s2(e,t=>t.target);t.forEach(t=>{t.id=o(t);let e=n.has(t.id)?n.get(t.id):[],i=r.has(t.id)?r.get(t.id):[];t.frequency=e.length+i.length,t.value=EI(e,t=>t.sourceWeight)+EI(i,t=>t.targetWeight)})}(f,p),function(t,e){let n="function"==typeof c?c:tv[c];n&&t.sort(n)}(f,0),function(t,o){let a=t.length;if(!a)throw ur("Invalid nodes: it's empty!");if(!r){let n=1/a;return t.forEach((t,r)=>{t.x=(r+.5)*n,t.y=e})}let l=i/(2*a),s=t.reduce((t,e)=>t+=e.value,0);t.reduce((t,r)=>{r.weight=r.value/s,r.width=r.weight*(1-i),r.height=n;let o=l+t,a=o+r.width,u=e-n/2,c=u+n;return r.x=[o,a,a,o],r.y=[u,u,c,c],t+r.width+2*l},0)}(f,0),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=s2(n,t=>t.source),s=s2(n,t=>t.target);t.forEach(t=>{let{edges:e,width:n,x:r,y:i,value:a,id:l}=t,u=o.get(l)||[],c=s.get(l)||[],f=0;u.map(t=>{let e=t.sourceWeight/a*n;t.x[0]=r[0]+f,t.x[1]=r[0]+f+e,f+=e}),c.forEach(t=>{let e=t.targetWeight/a*n;t.x[3]=r[0]+f,t.x[2]=r[0]+f+e,f+=e})})}(f,p),{nodes:f,edges:p}}})(t)(e);_L.props={};var _I=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 _R={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},_D={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}},_F={type:"polygon",axis:!1,legend:!1,encode:{shape:"ribbon",x:"x",y:"y"},style:{opacity:.5,lineWidth:1,strokeWidth:1}},_B={position:"outside",fontSize:10},_z=(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}=cK(n,r),h=ua(r,"node"),d=ua(r,"link"),{key:y=t=>t.key,color:g=y}=h,{linkEncodeColor:v=t=>t.source}=d,{nodeWidthRatio:b=_R.thickness,nodePaddingRatio:x=_R.marginRatio}=a,O=_I(a,["nodeWidthRatio","nodePaddingRatio"]),{nodes:w,edges:E}=_L(Object.assign(Object.assign(Object.assign(Object.assign({},_R),{id:cY(y),thickness:b,marginRatio:x}),O),{weight:!0}))({nodes:f,edges:p}),k=ua(o,"label"),{text:M=y}=k,S=_I(k,["text"]),_=SM(c,"node",{title:"",items:[t=>({name:t.key,value:t.value})]},!0),P=SM(c,"link",{title:"",items:[t=>({name:`${t.source} -> ${t.target}`,value:t.value})]}),{height:j,width:A}=e,T=Math.min(j,A);return[tG({},_F,{data:E,encode:Object.assign(Object.assign({},d),{color:v}),labels:s,style:Object.assign({fill:v?void 0:"#aaa"},ua(o,"link")),tooltip:P,animate:SP(u,"link")}),tG({},_D,{data:w,encode:Object.assign(Object.assign({},h),{color:g}),scale:i,style:ua(o,"node"),coordinate:{type:"polar",outerRadius:(T-20)/T,startAngle:-(2*Math.PI),endAngle:0},labels:[Object.assign(Object.assign(Object.assign({},_B),{text:M}),S),...l],tooltip:_,animate:SP(u,"node"),axis:!1})]};_z.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 _$=(t,e)=>({tile:"treemapSquarify",ratio:.5*(1+Math.sqrt(5)),size:[t,e],round:!1,ignoreParentValue:!0,padding:0,paddingInner:0,paddingOuter:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0,sort:(t,e)=>e.value-t.value,layer:0}),_G=(t,e)=>({type:"rect",axis:!1,encode:{x:"x",y:"y",key:"id",color:t=>t.path[1]},scale:{x:{domain:[0,t],range:[0,1]},y:{domain:[0,e],range:[0,1]}},style:{stroke:"#fff"},state:{active:{opacity:.6},inactive:{opacity:1}}}),_H={fontSize:10,text:t=>vi(t.path),position:"inside",fill:"#000",textOverflow:"clip",wordWrap:!0,maxLines:1,wordWrapWidth:t=>t.x1-t.x0},_V={title:t=>{var e,n;return null==(n=null==(e=t.path)?void 0:e.join)?void 0:n.call(e,".")},items:[{field:"value"}]},_U={title:t=>vi(t.path),items:[{field:"value"}]},_q=(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=_W(t,["data","encode","scale","style","layout","labels","tooltip"]),h=O7(i,["interaction","treemapDrillDown"]),d=tG({},_$(n,r),u,{layer:h?t=>1===t.depth:u.layer}),[y,g]=wL(o,d,a),v=ua(s,"label");return tG({},_G(n,r),Object.assign(Object.assign({data:y,scale:l,style:s,labels:[Object.assign(Object.assign({},_H),v),...c]},p),{encode:a,tooltip:SS(f,_V),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=>vi(t.path)},a),tooltip:SS(f,_U)}:{})};function _Y(){return{"data.arc":_L,"data.cluster":SV,"mark.forceGraph":SL,"mark.tree":SZ,"mark.pack":_l,"mark.sankey":_P,"mark.chord":_z,"mark.treemap":_q}}_q.props={};var _X=t=>t;function _K(t,e){t&&_Q.hasOwnProperty(t.type)&&_Q[t.type](t,e)}var _Z={Feature:function(t,e){_K(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)_K(n[r].geometry,e)}},_Q={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){_J(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)_J(n[r],e,0)},Polygon:function(t,e){_0(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)_0(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)_K(n[r],e)}};function _J(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 _0(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)_J(t[n],e,1);e.polygonEnd()}function _1(t,e){t&&_Z.hasOwnProperty(t.type)?_Z[t.type](t,e):_K(t,e)}class _2{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 _5=Math.PI,_3=_5/2,_4=_5/4,_6=2*_5,_8=180/_5,_9=_5/180,_7=Math.abs,Pt=Math.atan,Pe=Math.atan2,Pn=Math.cos,Pr=Math.ceil,Pi=Math.exp,Po=Math.log,Pa=Math.pow,Pl=Math.sin,Ps=Math.sign||function(t){return t>0?1:t<0?-1:0},Pu=Math.sqrt,Pc=Math.tan;function Pf(t){return t>1?0:t<-1?_5:Math.acos(t)}function Pp(t){return t>1?_3:t<-1?-_3:Math.asin(t)}function Ph(){}var Pd,Py,Pg,Pm,Pv=new _2,Pb=new _2,Px={point:Ph,lineStart:Ph,lineEnd:Ph,polygonStart:function(){Px.lineStart=PO,Px.lineEnd=Pk},polygonEnd:function(){Px.lineStart=Px.lineEnd=Px.point=Ph,Pv.add(_7(Pb)),Pb=new _2},result:function(){var t=Pv/2;return Pv=new _2,t}};function PO(){Px.point=Pw}function Pw(t,e){Px.point=PE,Pd=Pg=t,Py=Pm=e}function PE(t,e){Pb.add(Pm*t-Pg*e),Pg=t,Pm=e}function Pk(){PE(Pd,Py)}var PM,PS,P_,PP,Pj=1/0,PA=1/0,PT=-1/0,PC=PT,PN={point:function(t,e){t<Pj&&(Pj=t),t>PT&&(PT=t),e<PA&&(PA=e),e>PC&&(PC=e)},lineStart:Ph,lineEnd:Ph,polygonStart:Ph,polygonEnd:Ph,result:function(){var t=[[Pj,PA],[PT,PC]];return PT=PC=-(PA=Pj=1/0),t}},PL=0,PI=0,PR=0,PD=0,PF=0,PB=0,Pz=0,PW=0,P$=0,PG={point:PH,lineStart:PV,lineEnd:PY,polygonStart:function(){PG.lineStart=PX,PG.lineEnd=PK},polygonEnd:function(){PG.point=PH,PG.lineStart=PV,PG.lineEnd=PY},result:function(){var t=P$?[Pz/P$,PW/P$]:PB?[PD/PB,PF/PB]:PR?[PL/PR,PI/PR]:[NaN,NaN];return PL=PI=PR=PD=PF=PB=Pz=PW=P$=0,t}};function PH(t,e){PL+=t,PI+=e,++PR}function PV(){PG.point=PU}function PU(t,e){PG.point=Pq,PH(P_=t,PP=e)}function Pq(t,e){var n=t-P_,r=e-PP,i=Pu(n*n+r*r);PD+=i*(P_+t)/2,PF+=i*(PP+e)/2,PB+=i,PH(P_=t,PP=e)}function PY(){PG.point=PH}function PX(){PG.point=PZ}function PK(){PQ(PM,PS)}function PZ(t,e){PG.point=PQ,PH(PM=P_=t,PS=PP=e)}function PQ(t,e){var n=t-P_,r=e-PP,i=Pu(n*n+r*r);PD+=i*(P_+t)/2,PF+=i*(PP+e)/2,PB+=i,Pz+=(i=PP*t-P_*e)*(P_+t),PW+=i*(PP+e),P$+=3*i,PH(P_=t,PP=e)}function PJ(t){this._context=t}PJ.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,_6)}},result:Ph};var P0,P1,P2,P5,P3,P4=new _2,P6={point:Ph,lineStart:function(){P6.point=P8},lineEnd:function(){P0&&P9(P1,P2),P6.point=Ph},polygonStart:function(){P0=!0},polygonEnd:function(){P0=null},result:function(){var t=+P4;return P4=new _2,t}};function P8(t,e){P6.point=P9,P1=P5=t,P2=P3=e}function P9(t,e){P5-=t,P3-=e,P4.add(Pu(P5*P5+P3*P3)),P5=t,P3=e}class P7{constructor(t){this._append=null==t?jt:function(t){let e=Math.floor(t);if(!(e>=0))throw RangeError(`invalid digits: ${t}`);if(e>15)return jt;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 jt(t){let e=1;this._+=t[0];for(let n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function je(t,e){let n=3,r=4.5,i,o;function a(t){return t&&("function"==typeof r&&o.pointRadius(+r.apply(this,arguments)),_1(t,i(o))),o.result()}return a.area=function(t){return _1(t,i(Px)),Px.result()},a.measure=function(t){return _1(t,i(P6)),P6.result()},a.bounds=function(t){return _1(t,i(PN)),PN.result()},a.centroid=function(t){return _1(t,i(PG)),PG.result()},a.projection=function(e){return arguments.length?(i=null==e?(t=null,_X):(t=e).stream,a):t},a.context=function(t){return arguments.length?(o=null==t?(e=null,new P7(n)):new PJ(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 P7(n)),a},a.projection(t).digits(n).context(e)}function jn(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 jr(t,e,n){var r=jn(t,e-1e-6,n).concat(e);return function(t){return r.map(function(e){return[t,e]})}}function ji(t,e,n){var r=jn(t,e-1e-6,n).concat(e);return function(t){return r.map(function(e){return[e,t]})}}function jo(){var t,e=[];return{point:function(e,n,r){t.push([e,n,r])},lineStart:function(){e.push(t=[])},lineEnd:Ph,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}function ja(t,e){return 1e-6>_7(t[0]-e[0])&&1e-6>_7(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 js(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(ja(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),ju(l),ju(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 ju(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 jc(t){return[Pe(t[1],t[0]),Pp(t[2])]}function jf(t){var e=t[0],n=t[1],r=Pn(n);return[r*Pn(e),r*Pl(e),Pl(n)]}function jp(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function jh(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function jd(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function jy(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function jg(t){var e=Pu(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}function jm(t){return _7(t[0])<=_5?t[0]:Ps(t[0])*((_7(t[0])+_5)%_6-_5)}function jv(t){return Array.from(function*(t){for(let e of t)yield*e}(t))}function jb(t,e,n,r){return function(i){var o,a,l,s=e(i),u=jo(),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=jm(e),r=e[1],i=Pl(r),o=[Pl(n),-Pn(n),0],a=0,l=0,s=new _2;1===i?r=_3+1e-6:-1===i&&(r=-_3-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=jm(h),y=h[1]/2+_4,g=Pl(y),v=Pn(y),b=0;b<p;++b,d=O,g=E,v=k,h=x){var x=f[b],O=jm(x),w=x[1]/2+_4,E=Pl(w),k=Pn(w),M=O-d,S=M>=0?1:-1,_=S*M,P=_>_5,j=g*E;if(s.add(Pe(j*S*Pl(_),v*k+j*Pn(_))),a+=P?M+S*_6:M,P^d>=n^O>=n){var A=jh(jf(h),jf(x));jg(A);var T=jh(o,A);jg(T);var C=(P^M>=0?-1:1)*Pp(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),js(a,jO,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(jx))}}return p}}function jx(t){return t.length>1}function jO(t,e){return((t=t.x)[0]<0?t[1]-_3-1e-6:_3-t[1])-((e=e.x)[0]<0?e[1]-_3-1e-6:_3-e[1])}var jw=jb(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?_5:-_5,y=_7(o-n);1e-6>_7(y-_5)?(t.point(n,r=(r+a)/2>0?_3:-_3),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(d,r),t.point(o,r),e=0):i!==d&&y>=_5&&(1e-6>_7(n-i)&&(n-=1e-6*i),1e-6>_7(o-d)&&(o-=1e-6*d),l=n,s=r,u=o,c=a,r=_7(h=Pl(l-u))>1e-6?Pt((Pl(s)*(p=Pn(c))*Pl(u)-Pl(c)*(f=Pn(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*_3,r.point(-_5,i),r.point(0,i),r.point(_5,i),r.point(_5,0),r.point(_5,-i),r.point(0,-i),r.point(-_5,-i),r.point(-_5,0),r.point(-_5,i);else if(_7(t[0]-e[0])>1e-6){var o=t[0]<e[0]?_5:-_5;i=n*o/2,r.point(-o,i),r.point(0,i),r.point(o,i)}else r.point(e[0],e[1])},[-_5,-_3]);function jE(t,e){e=jf(e),e[0]-=t,jg(e);var n=Pf(-e[1]);return((0>-e[2]?-n:n)+_6-1e-6)%_6}function jk(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>_7(r[0]-t)?i>0?0:3:1e-6>_7(r[0]-n)?i>0?2:1:1e-6>_7(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=jo(),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&&js(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 jM(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 jS(t,e){return _7(t)>_5&&(t-=Math.round(t/_6)*_6),[t,e]}function j_(t,e,n){return(t%=_6)?e||n?jM(jj(t),jA(e,n)):jj(t):e||n?jA(e,n):jS}function jP(t){return function(e,n){return _7(e+=t)>_5&&(e-=Math.round(e/_6)*_6),[e,n]}}function jj(t){var e=jP(t);return e.invert=jP(-t),e}function jA(t,e){var n=Pn(t),r=Pl(t),i=Pn(e),o=Pl(e);function a(t,e){var a=Pn(e),l=Pn(t)*a,s=Pl(t)*a,u=Pl(e),c=u*n+l*r;return[Pe(s*i-c*o,l*n-u*r),Pp(c*i+s*o)]}return a.invert=function(t,e){var a=Pn(e),l=Pn(t)*a,s=Pl(t)*a,u=Pl(e),c=u*i-s*o;return[Pe(s*i+u*o,l*n+c*r),Pp(c*n-l*r)]},a}function jT(t){return function(e){var n=new jC;for(var r in t)n[r]=t[r];return n.stream=e,n}}function jC(){}function jN(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),_1(n,t.stream(PN)),e(PN.result()),null!=r&&t.clipExtent(r),t}function jL(t,e,n){return jN(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 jI(t,e,n){return jL(t,[[0,0],e],n)}function jR(t,e,n){return jN(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 jD(t,e,n){return jN(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)}jS.invert=jS,jC.prototype={constructor:jC,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 jF=Pn(30*_9);function jB(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=Pu(O*O+w*w+E*E),M=Pp(E/=k),S=1e-6>_7(_7(E)-1)||1e-6>_7(o-f)?(o+f)/2:Pe(w,O),_=t(S,M),P=_[0],j=_[1],A=P-r,T=j-i,C=b*A-v*T;(C*C/x>e||_7((v*A+b*T)/x-.5)>.3||a*p+l*h+s*d<jF)&&(n(r,i,o,a,l,s,P,j,S,O/=k,w/=k,E,y,g),g.point(P,j),n(P,j,S,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,jT({point:function(t,e){t=n(t,e),this.stream.point(t[0],t[1])}}))}var jz=jT({point:function(t,e){this.stream.point(t*_9,e*_9)}});function jW(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=Pn(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 j$(t){return jG(function(){return t})()}function jG(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=jw,M=null,S=_X,_=.5;function P(t){return s(t[0]*_9,t[1]*_9)}function j(t){return(t=s.invert(t[0],t[1]))&&[t[0]*_8,t[1]*_8]}function A(){var t=jW(f,0,0,O,w,x).apply(null,e(d,y)),r=jW(f,p-t[0],h-t[1],O,w,x);return n=j_(g,v,b),l=jM(e,r),s=jM(n,l),a=jB(l,_),T()}function T(){return u=c=null,P}return P.stream=function(t){var e;return u&&c===t?u:u=jz((e=n,jT({point:function(t,n){var r=e(t,n);return this.stream.point(r[0],r[1])}}))(k(a(S(c=t)))))},P.preclip=function(t){return arguments.length?(k=t,E=void 0,T()):k},P.postclip=function(t){return arguments.length?(S=t,M=r=i=o=null,T()):S},P.clipAngle=function(t){return arguments.length?(k=+t?function(t){var e=Pn(t),n=2*_9,r=e>0,i=_7(e)>1e-6;function o(t,n){return Pn(t)*Pn(n)>e}function a(t,n,r){var i=jf(t),o=jf(n),a=[1,0,0],l=jh(i,o),s=jp(l,l),u=l[0],c=s-u*u;if(!c)return!r&&t;var f=jh(a,l),p=jy(a,e*s/c);jd(p,jy(l,-e*u/c));var h=jp(p,f),d=jp(f,f),y=h*h-d*(jp(p,p)-1);if(!(y<0)){var g=Pu(y),v=jy(f,(-h-g)/d);if(jd(v,p),v=jc(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>_7(k-_5);if(!M&&E<w&&(b=w,w=E,E=b),M||k<1e-6?M?w+E>0^v[1]<(1e-6>_7(v[0]-x)?w:E):w<=v[1]&&v[1]<=E:k>_5^(x<=v[0]&&v[0]<=O)){var S=jy(f,(-h+g)/d);return jd(S,p),[v,jc(S)]}}}function l(e,n){var i=r?t:_5-t,o=0;return e<-i?o|=1:e>i&&(o|=2),n<-i?o|=4:n>i&&(o|=8),o}return jb(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?_5:-_5),p):0;!e&&(u=s=g)&&t.lineStart(),g!==s&&(!(d=a(e,y))||ja(e,d)||ja(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&&ja(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=Pn(e),l=Pl(e),s=r*n;null==i?(i=e+r*_6,o=e-s/2):(i=jE(a,i),o=jE(a,o),(r>0?i<o:i>o)&&(i+=r*_6));for(var u,c=i;r>0?c>o:c<o;c-=s)u=jc([a,-l*Pn(c),-l*Pl(c)]),t.point(u[0],u[1])}}(o,t,n,i,e,r)},r?[0,-t]:[-_5,t-_5])}(E=t*_9):(E=null,jw),T()):E*_8},P.clipExtent=function(t){return arguments.length?(S=null==t?(M=r=i=o=null,_X):jk(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*_9,y=t[1]%360*_9,A()):[d*_8,y*_8]},P.rotate=function(t){return arguments.length?(g=t[0]%360*_9,v=t[1]%360*_9,b=t.length>2?t[2]%360*_9:0,A()):[g*_8,v*_8,b*_8]},P.angle=function(t){return arguments.length?(x=t%360*_9,A()):x*_8},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=jB(l,_=t*t),T()):Pu(_)},P.fitExtent=function(t,e){return jL(P,t,e)},P.fitSize=function(t,e){return jI(P,t,e)},P.fitWidth=function(t,e){return jR(P,t,e)},P.fitHeight=function(t,e){return jD(P,t,e)},function(){return e=t.apply(this,arguments),P.invert=e.invert&&j,A()}}var jH=Pu(3)/2;function jV(t,e){var n=Pp(jH*Pl(e)),r=n*n,i=r*r*r;return[t*Pn(n)/(jH*(1.340264+-.24331799999999998*r+i*(.0062510000000000005+.034164*r))),n*(1.340264+-.081106*r+i*(893e-6+.003796*r))]}function jU(){return j$(jV).scale(177.158)}function jq(t){return function(e,n){var r=Pn(e),i=Pn(n),o=t(r*i);return o===1/0?[2,0]:[o*i*Pl(e),o*Pl(n)]}}function jY(t){return function(e,n){var r=Pu(e*e+n*n),i=t(r),o=Pl(i);return[Pe(e*o,r*Pn(i)),Pp(r&&n*o/r)]}}jV.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>_7(n)));++l);return[jH*t*(1.340264+-.24331799999999998*o+a*(.0062510000000000005+.034164*o))/Pn(i),Pp(Pl(i)/jH)]};var jX=jq(function(t){return(t=Pf(t))&&t/Pl(t)});function jK(){return j$(jX).scale(79.4188).clipAngle(179.999)}function jZ(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 jQ(){return j$(jZ).scale(175.295)}function jJ(t,e){return[t,e]}function j0(){return j$(jJ).scale(152.63)}function j1(t){var e=0,n=_5/3,r=jG(t),i=r(e,n);return i.parallels=function(t){return arguments.length?r(e=t[0]*_9,n=t[1]*_9):[e*_8,n*_8]},i}function j2(t,e){return[t,Po(Pc((_3+e)/2))]}function j5(){return j3(j2).scale(961/_6)}function j3(t){var e,n,r,i=j$(t),o=i.center,a=i.scale,l=i.translate,s=i.clipExtent,u=null;function c(){var o=_5*a(),l=i((function(t){function e(e){return e=t(e[0]*_9,e[1]*_9),e[0]*=_8,e[1]*=_8,e}return t=j_(t[0]*_9,t[1]*_9,t.length>2?t[2]*_9:0),e.invert=function(e){return e=t.invert(e[0]*_9,e[1]*_9),e[0]*=_8,e[1]*=_8,e},e})(i.rotate()).invert([0,0]));return s(null==u?[[l[0]-o,l[1]-o],[l[0]+o,l[1]+o]]:t===j2?[[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 j4(t){return Pc((_3+t)/2)}function j6(t,e){var n=Pn(t),r=t===e?Pl(t):Po(n/Pn(e))/Po(j4(e)/j4(t)),i=n*Pa(j4(t),r)/r;if(!r)return j2;function o(t,e){i>0?e<-_3+1e-6&&(e=-_3+1e-6):e>_3-1e-6&&(e=_3-1e-6);var n=i/Pa(j4(e),r);return[n*Pl(r*t),i-n*Pn(r*t)]}return o.invert=function(t,e){var n=i-e,o=Ps(r)*Pu(t*t+n*n),a=Pe(t,_7(n))*Ps(n);return n*r<0&&(a-=_5*Ps(t)*Ps(n)),[a/r,2*Pt(Pa(i/o,1/r))-_3]},o}function j8(){return j1(j6).scale(109.5).parallels([30,30])}function j9(t,e){return[Pn(e)*Pl(t),Pl(e)]}function j7(){return j$(j9).scale(249.5).clipAngle(90.000001)}function At(){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=jT({point:function(t,e){var n=x([t,e]);this.stream.point(n[0],n[1])}}),v=_X;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,_X):jk(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*_9),t=Pn(p),b()):p*_8},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 jL(x,t,e)},x.fitSize=function(t,e){return jI(x,t,e)},x.fitWidth=function(t,e){return jR(x,t,e)},x.fitHeight=function(t,e){return jD(x,t,e)},x}function Ae(t,e){var n=Pn(t),r=t===e?Pl(t):(n-Pn(e))/(e-t),i=n/r+t;if(1e-6>_7(r))return jJ;function o(t,e){var n=i-e,o=r*t;return[n*Pl(o),i-n*Pn(o)]}return o.invert=function(t,e){var n=i-e,o=Pe(t,_7(n))*Ps(n);return n*r<0&&(o-=_5*Ps(t)*Ps(n)),[o/r,i-Ps(r)*Pu(t*t+n*n)]},o}function An(){return j1(Ae).scale(131.154).center([0,13.9389])}jX.invert=jY(function(t){return t}),jZ.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(_7(n)>1e-6&&--i>0);return[t/(.8707+(o=r*r)*(-.131979+o*(-.013791+o*o*o*(.003971-.001529*o)))),r]},jJ.invert=jJ,j2.invert=function(t,e){return[t,2*Pt(Pi(e))-_3]},j9.invert=jY(Pp);var Ar=jq(function(t){return Pu(2/(1+t))});function Ai(){return j$(Ar).scale(124.75).clipAngle(179.999)}function Ao(t,e){return[Po(Pc((_3+e)/2)),-t]}function Aa(){var t=j3(Ao),e=t.center,n=t.rotate;return t.center=function(t){return arguments.length?e([-t[1],t[0]]):[(t=e())[1],-t[0]]},t.rotate=function(t){return arguments.length?n([t[0],t[1],t.length>2?t[2]+90:90]):[(t=n())[0],t[1],t[2]-90]},n([0,0,90]).scale(159.155)}function Al(t,e){var n=Pn(e),r=Pn(t)*n;return[n*Pl(t)/r,Pl(e)/r]}function As(){return j$(Al).scale(144.049).clipAngle(60)}function Au(t,e){var n=Pl(t),r=(n+Pl(e))/2;if(1e-6>_7(r)){var i=Pn(t);function o(t,e){return[t*i,Pl(e)/i]}return o.invert=function(t,e){return[t/i,Pp(e*i)]},o}var a=1+n*(2*r-n),l=Pu(a)/r;function s(t,e){var n=Pu(a-2*r*Pl(e))/r;return[n*Pl(t*=r),l-n*Pn(t)]}return s.invert=function(t,e){var n=l-e,i=Pe(t,_7(n))*Ps(n);return n*r<0&&(i-=_5*Ps(t)*Ps(n)),[i/r,Pp((a-(t*t+n*n)*r*r)/(2*r))]},s}function Ac(){return j1(Au).scale(155.424).center([0,33.6442])}function Af(){return Ac().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function Ap(){var t,e,n,r,i,o,a=Af(),l=Ac().rotate([154,0]).center([-2,58.5]).parallels([55,65]),s=Ac().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 jL(c,t,e)},c.fitSize=function(t,e){return jI(c,t,e)},c.fitWidth=function(t,e){return jR(c,t,e)},c.fitHeight=function(t,e){return jD(c,t,e)},c.scale(1070)}function Ah(t,e){var n=Pn(e),r=1+Pn(t)*n;return[n*Pl(t)/r,Pl(e)/r]}function Ad(){return j$(Ah).scale(250).clipAngle(142)}Ar.invert=jY(function(t){return 2*Pp(t/2)}),Ao.invert=function(t,e){return[-e,2*Pt(Pi(t))-_3]},Al.invert=jY(Pt),Ah.invert=jY(function(t){return 2*Pt(t)});var Ay=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 jn(Pr(r/d)*d,n,d).map(c).concat(jn(Pr(l/y)*y,a,y).map(f)).concat(jn(Pr(e/p)*p,t,p).filter(function(t){return _7(t%d)>1e-6}).map(s)).concat(jn(Pr(o/h)*h,i,h).filter(function(t){return _7(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=jr(o,i,90),u=ji(e,t,g),c=jr(l,a,90),f=ji(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 Am(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=Ay(r,["type"]),a=function(t){if("function"==typeof t)return t;let e=tb[`geo${md(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)=>{let s=a();var u,c=s,f=l,p={x:t,y:n,width:r,height:i},h=o;let{outline:d=(()=>{let t=f.filter(Am);return t.find(t=>t.sphere)?{type:"Sphere"}:{type:"FeatureCollection",features:t.filter(t=>!t.sphere).flatMap(t=>t.data.value).flatMap(t=>(function(t){if(!t||!t.type)return null;let e={Point:"geometry",MultiPoint:"geometry",LineString:"geometry",MultiLineString:"geometry",Polygon:"geometry",MultiPolygon:"geometry",GeometryCollection:"geometry",Feature:"feature",FeatureCollection:"featureCollection"}[t.type];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)}})()}=h,{size:y="fitExtent"}=h;for(let[t,e]of("fitExtent"===y?function(t,e,n){let{x:r,y:i,width:o,height:a}=n;t.fitExtent([[r,i],[o,a]],e)}(c,d,p):"fitWidth"===y&&function(t,e,n){let{width:r,height:i}=n,[[o,a],[l,s]]=je(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)}(c,d,p),Object.entries(o)))null==(u=s[t])||u.call(s,e);e=je(s);let g=new u7({domain:[t,t+r]}),v=new u7({domain:[n,n+i]}),b=t=>{let e=s(t);if(!e)return[null,null];let[n,r]=e;return[g.map(n),v.map(r)]},x=t=>{if(!t)return null;let[e,n]=t,r=[g.invert(e),v.invert(n)];return s.invert(r)};return{transform:t=>b(t),untransform:t=>x(t)}}]]}},children:l.flatMap(t=>Am(t)?function(t){let{style:n,tooltip:r={}}=t;return Object.assign(Object.assign({},t),{type:"path",tooltip:SS(r,{title:"id",items:[{channel:"color"}]}),style:Object.assign(Object.assign({},n),{d:t=>e(t)||[]})})}(t):t)})]};Av.props={};var Ab=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 Ax=()=>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"},Ab(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 AO(){return{"composition.geoView":Av,"composition.geoPath":Ax}}Ax.props={};var Aw=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 AE(t,e){return dg(t,t=>e[t])}function Ak(t,e){return dm(t,t=>e[t])}function AM(t,e){let n=2.5*AS(t,e)-1.5*AP(t,e);return dg(t,t=>e[t]>=n?e[t]:NaN)}function AS(t,e){return EL(t,.25,t=>e[t])}function A_(t,e){return EL(t,.5,t=>e[t])}function AP(t,e){return EL(t,.75,t=>e[t])}function Aj(t,e){let n=2.5*AP(t,e)-1.5*AS(t,e);return dm(t,t=>e[t]<=n?e[t]:NaN)}function AA(){return(t,e)=>{let{encode:n}=e,{y:r,x:i}=n,{value:o}=r,{value:a}=i;return[Array.from(s2(t,t=>a[+t]).values()).flatMap(t=>{let e=AM(t,o),n=Aj(t,o);return t.filter(t=>o[t]<e||o[t]>n)}),e]}}let AT=t=>{let{data:e,encode:n,style:r={},tooltip:i={},transform:o,animate:a}=t,l=Aw(t,["data","encode","style","tooltip","transform","animate"]),{point:s=!0}=r,u=Aw(r,["point"]),{y:c}=n,f={y:c,y1:c,y2:c,y3:c,y4:c},p={y1:AS,y2:A_,y3:AP},h=SM(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=SM(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:AE},p),{y4:Ak})],encode:Object.assign(Object.assign({},n),f),style:u,tooltip:h},l);let y=ua(u,"box"),g=ua(u,"point");return[Object.assign({type:"box",data:e,transform:[Object.assign(Object.assign({type:"groupX",y:AM},p),{y4:Aj})],encode:Object.assign(Object.assign({},n),f),style:y,tooltip:h,animate:SP(a,"box")},l),{type:"point",data:e,transform:[{type:AA}],encode:n,style:Object.assign({},g),tooltip:d,animate:SP(a,"point")}]};AT.props={};var AC=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 AN={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"]}}},AL={style:{shape:(t,e)=>{let{shape:n,radius:r}=t,i=AC(t,["shape","radius"]),o=ua(i,"pointer"),a=ua(i,"pin"),{shape:l}=o,s=AC(o,["shape"]),{shape:u}=a,c=AC(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=tC({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]=ch(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=up(new lT);return uf(l)||("function"==typeof l?M.append(()=>l(v,e,d,p)):M.append("line").call(ca,E).node()),uf(u)||("function"==typeof u?M.append(()=>u(v,e,d,p)):M.append("circle").call(ca,k).node()),M.node()}},lineWidth:4,pointerLineCap:"round",pinR:10,pinFill:"#fff",radius:.6}},AI={type:"text",style:{x:"50%",y:"60%",textAlign:"center",textBaseline:"middle",fontSize:20,fontWeight:800,fill:"#888"}},AR=t=>{var e;let{data:n={},scale:r={},style:i={},animate:o={},transform:a=[]}=t,l=AC(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(ct(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=ua(i,"text"),d=(e=["pointer","pin"],Object.fromEntries(Object.entries(i).filter(([t])=>e.find(e=>t.startsWith(e)))));return[tG({},AN,Object.assign({type:"interval",transform:[{type:"stackY"}],data:u,scale:p,style:ua(i,"arc"),animate:"object"==typeof o?ua(o,"arc"):o},l)),tG({},AN,AL,Object.assign({type:"point",data:s,scale:p,style:d,animate:"object"==typeof o?ua(o,"indicator"):o},l)),tG({},AI,{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?ua(o,"text"):o})]};AR.props={};let AD=Math.PI/180;function AF(t){return t.text}function AB(){return"serif"}function Az(){return"normal"}function AW(t){return t.value}function A$(){return 90*~~(2*Math.random())}function AG(){return 1}function AH(){}function AV(t){let e=t[0]/t[1];return function(t){return[e*(t*=.1)*Math.cos(t),t*Math.sin(t)]}}function AU(t){let e=[],n=-1;for(;++n<t;)e[n]=0;return e}function Aq(t){return"function"==typeof t?t:function(){return t}}let AY={archimedean:AV,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 AX=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 AK={size:[500,500],fontSize:[14,28]};function AZ(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 AQ=t=>e=>{var n,r,i,o;return n=void 0,r=void 0,i=void 0,o=function*(){let n=Object.assign({},AK,t),r=function(){let t=[256,256],e=AF,n=AB,r=AW,i=Az,o=A$,a=AG,l=AV,s=Math.random,u=AH,c=[],f=null,p=1/0,h={};return h.start=function(){let[d,y]=t,g=function(t){t.width=t.height=1;let e=Math.sqrt(t.getContext("2d").getImageData(0,0,1,1).data.length>>2);t.width=2048/e,t.height=2048/e;let n=t.getContext("2d");return n.fillStyle=n.strokeStyle="red",n.textAlign="center",{context:n,ratio:e}}(document.createElement("canvas")),v=h.board?h.board:AU((t[0]>>5)*t[1]),b=c.length,x=[],O=c.map(function(t,l,s){return t.text=e.call(this,t,l,s),t.font=n.call(this,t,l,s),t.style=Az.call(this,t,l,s),t.weight=i.call(this,t,l,s),t.rotate=o.call(this,t,l,s),t.size=~~r.call(this,t,l,s),t.padding=a.call(this,t,l,s),t}).sort(function(t,e){return e.size-t.size}),w=-1,E=h.board?[{x:0,y:0},{x:d,y:y}]:void 0;function k(){let e=Date.now();for(;Date.now()-e<p&&++w<b;){let e=O[w];e.x=d*(s()+.5)>>1,e.y=y*(s()+.5)>>1,function(t,e,n,r){if(e.sprite)return;let i=t.context,o=t.ratio;i.clearRect(0,0,2048/o,2048/o);let a=0,l=0,s=0,u=n.length;for(--r;++r<u;){e=n[r],i.save(),i.font=e.style+" "+e.weight+" "+~~((e.size+1)/o)+"px "+e.font;let t=i.measureText(e.text+"m").width*o,u=e.size<<1;if(e.rotate){let n=Math.sin(e.rotate*AD),r=Math.cos(e.rotate*AD),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*AD),i.fillText(e.text,0,0),e.padding&&(i.lineWidth=2*e.padding,i.strokeText(e.text,0,0)),i.restore(),e.width=t,e.height=u,e.xoff=a,e.yoff=l,e.x1=t>>1,e.y1=u>>1,e.x0=-e.x1,e.y0=-e.y1,e.hasText=!0,a+=t}let c=i.getImageData(0,0,2048/o,2048/o).data,f=[];for(;--r>=0;){if(!(e=n[r]).hasText)continue;let t=e.width,i=t>>5,o=e.y1-e.y0;for(let t=0;t<o*i;t++)f[t]=0;if(null==(a=e.xoff))return;l=e.yoff;let s=0,u=-1;for(let n=0;n<o;n++){for(let e=0;e<t;e++){let t=i*n+(e>>5),r=c[(l+n)*2048+(a+e)<<2]?1<<31-e%32:0;f[t]|=r,s|=r}s?u=n:(e.y0++,o--,n--,l++)}e.y1=e.y0+u,e.sprite=f.slice(0,(e.y1-e.y0)*i)}}(g,e,O,w),e.hasText&&function(e,n,r){let i=n.x,o=n.y,a=Math.sqrt(t[0]*t[0]+t[1]*t[1]),u=l(t),c=.5>s()?1:-1,f,p=-c,h,d;for(;(f=u(p+=c))&&!(Math.min(Math.abs(h=~~f[0]),Math.abs(d=~~f[1]))>=a);){;if((n.x=i+h,n.y=o+d,!(n.x+n.x0<0)&&!(n.y+n.y0<0)&&!(n.x+n.x1>t[0])&&!(n.y+n.y1>t[1]))&&(!r||!function(t,e,n){n>>=5;let r=t.sprite,i=t.width>>5,o=t.x-(i<<4),a=127&o,l=32-a,s=t.y1-t.y0,u=(t.y+t.y0)*n+(o>>5),c;for(let t=0;t<s;t++){c=0;for(let n=0;n<=i;n++)if((c<<l|(n<i?(c=r[t*i+n])>>>a:0))&e[u+n])return!0;u+=n}return!1}(n,e,t[0]))&&(!r||n.x+n.x1>r[0].x&&n.x+n.x0<r[1].x&&n.y+n.y1>r[0].y&&n.y+n.y0<r[1].y)){let r=n.sprite,i=n.width>>5,o=t[0]>>5,a=n.x-(i<<4),l=127&a,s=32-l,u=n.y1-n.y0,c,f=(n.y+n.y0)*o+(a>>5);for(let t=0;t<u;t++){c=0;for(let n=0;n<=i;n++)e[f+n]|=c<<s|(n<i?(c=r[t*i+n])>>>l:0);f+=o}return delete n.sprite,!0}}return!1}(v,e,E)&&(u.call(null,"word",{cloud:h,word:e}),x.push(e),E?h.hasImage||function(t,e){let n=t[0],r=t[1];e.x+e.x0<n.x&&(n.x=e.x+e.x0),e.y+e.y0<n.y&&(n.y=e.y+e.y0),e.x+e.x1>r.x&&(r.x=e.x+e.x1),e.y+e.y1>r.y&&(r.y=e.y+e.y1)}(E,e):E=[{x:e.x+e.x0,y:e.y+e.y0},{x:e.x+e.x1,y:e.y+e.y1}],e.x-=t[0]>>1,e.y-=t[1]>>1)}h._tags=x,h._bounds=E,w>=b&&(h.stop(),u.call(null,"end",{cloud:h,words:x,bounds:E}))}return f&&clearInterval(f),f=setInterval(k,0),k(),h},h.stop=function(){return f&&(clearInterval(f),f=null),h},h.createMask=e=>{let n=document.createElement("canvas"),[r,i]=t;if(!r||!i)return;let o=r>>5,a=AU((r>>5)*i);n.width=r,n.height=i;let l=n.getContext("2d");l.drawImage(e,0,0,e.width,e.height,0,0,r,i);let s=l.getImageData(0,0,r,i).data;for(let t=0;t<i;t++)for(let e=0;e<r;e++){let n=o*t+(e>>5),i=t*r+e<<2,l=s[i]>=250&&s[i+1]>=250&&s[i+2]>=250?1<<31-e%32:0;a[n]|=l}h.board=a,h.hasImage=!0},h.timeInterval=function(t){p=null==t?1/0:t},h.words=function(t){c=t},h.size=function(e=[]){t=[+e[0],+e[1]]},h.text=function(t){e=Aq(t)},h.font=function(t){n=Aq(t)},h.fontWeight=function(t){i=Aq(t)},h.rotate=function(t){o=Aq(t)},h.spiral=function(t){l=AY[t]||t},h.fontSize=function(t){r=Aq(t)},h.padding=function(t){a=Aq(t)},h.random=function(t){s=Aq(t)},h.on=function(t){u=Aq(t)},h}();yield({set(t,e,i){if(void 0===n[t])return this;let o=e?e.call(null,n[t]):n[t];return i?i.call(null,o):"function"==typeof r[t]?r[t](o):r[t]=o,this},setAsync(t,e,i){var o,a,l,s;return o=this,a=void 0,l=void 0,s=function*(){if(void 0===n[t])return this;let o=e?yield e.call(null,n[t]):n[t];return i?i.call(null,o):"function"==typeof r[t]?r[t](o):r[t]=o,this},new(l||(l=Promise))(function(t,e){function n(t){try{i(s.next(t))}catch(t){e(t)}}function r(t){try{i(s.throw(t))}catch(t){e(t)}}function i(e){var i;e.done?t(e.value):((i=e.value)instanceof l?i:new l(function(t){t(i)})).then(n,r)}i((s=s.apply(o,a||[])).next())})}}).set("fontSize",t=>{let n=e.map(t=>t.value);var r=[dg(n),dm(n)];if("function"==typeof t)return t;if(Array.isArray(t)){let[e,n]=t;if(!r)return()=>(n+e)/2;let[i,o]=r;return o===i?()=>(n+e)/2:({value:t})=>(n-e)/(o-i)*(t-i)+e}return()=>t}).set("font").set("fontStyle").set("fontWeight").set("padding").set("rotate").set("size").set("spiral").set("timeInterval").set("random").set("text").set("on").setAsync("imageMask",AZ,r.createMask),r.words([...e]);let i=r.start(),[o,a]=n.size,l=[{x:0,y:0},{x:o,y:a}],{_bounds:s=l,_tags:u,hasImage:c}=i,f=u.map(t=>{var{x:e,y:n}=t;return Object.assign(Object.assign({},AX(t,["x","y"])),{x:e+o/2,y:n+a/2})}),[{x:p,y:h},{x:d,y:y}]=s,g={text:"",value:0,opacity:0,fontSize:0};return f.push(Object.assign(Object.assign({},g),{x:c?0:p,y:c?0:h}),Object.assign(Object.assign({},g),{x:c?o:d,y:c?a:y})),f},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())})};AQ.props={};var AJ=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 A0=(t,e)=>({size:[t,e]}),A1=(t,e)=>({axis:!1,type:"text",encode:{x:"x",y:"y",text:"text",rotate:"rotate",fontSize:"size"},scale:{x:{domain:[0,t],range:[0,1]},y:{domain:[0,e],range:[0,1]},fontSize:{type:"identity"},rotate:{type:"identity"}},style:{textAlign:"center"}}),A2=(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=AJ(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 AQ(Object.assign(Object.assign({},A0(n,r)),s))(c);return tG({},A1(n,r),Object.assign(Object.assign({data:f,encode:o,scale:a,style:l},u),{axis:!1}))},new(i||(i=Promise))(function(t,e){function a(t){try{s(o.next(t))}catch(t){e(t)}}function l(t){try{s(o.throw(t))}catch(t){e(t)}}function s(e){var n;e.done?t(e.value):((n=e.value)instanceof i?n:new i(function(t){t(n)})).then(a,l)}s((o=o.apply(n,r||[])).next())})};A2.props={};let A5={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`
|
|
19
|
+
`,b.style.x=t,b.style.y=e,b.style.width=n-t,b.style.height=r-e},N=t=>{let e=(t,e,n,r,i)=>t+e<r?r-e:t+n>i?i-n:t,n=t[0]-v[0],r=t[1]-v[1],i=e(n,y[0],g[0],w,k),o=e(r,y[1],g[1],E,M);A([y[0]+i,y[1]+o],[g[0]+i,g[1]+o])},L={"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"}},I=t=>D(t)||R(t),R=t=>{let{id:e}=t;return -1!==h.indexOf(e)&&new Set(Object.keys(L)).has(e)},D=t=>t===b.getElementById("selection"),F=e=>{let{target:n}=e,[r,i]=xA(t,e);if(!b||!I(n)){S(r,i,e),O=!0;return}I(n)&&(v=[r,i])},B=e=>{let{target:n}=e,r=xA(t,e);if(!y)return;if(!v)return A(y,r);if(D(n))return N(r);let[i,o]=[r[0]-v[0],r[1]-v[1]],{id:a}=n;if(L[a]){let[t,e,n,r]=L[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=xA(t,e);let[n,r,o,l]=A(y,g);O=!1,i(n,r,o,l,e)},W=t=>{let{target:e}=t;b&&!I(e)&&j()},$=e=>{let{target:n}=e;b&&I(n)&&!O?D(n)?xW(t,"move"):R(n)&&xW(t,L[n.id].cursor):xW(t,"crosshair")},G=()=>{xW(t,"default")};return t.addEventListener("dragstart",F),t.addEventListener("drag",B),t.addEventListener("dragend",z),t.addEventListener("click",W),t.addEventListener("pointermove",$),t.addEventListener("pointerleave",G),{mask:b,move(t,e,n,r,i=!0){b||S(t,e,{}),y=[t,e],g=[n,r],A([t,e],[n,r],i)},remove(t=!0){b&&j(t)},destroy(){b&&j(!1),xW(t,"default"),t.removeEventListener("dragstart",F),t.removeEventListener("drag",B),t.removeEventListener("dragend",z),t.removeEventListener("click",W),t.removeEventListener("pointermove",$),t.removeEventListener("pointerleave",G)}}}function OL(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 OI(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=OA(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=xD(v,o),w=ua(g,"mask"),{setState:E,removeState:k}=xL(d,O),M=new Map,{width:S,height:_,x:P=0,y:j=0}=h(t),A=()=>{for(let t of[...v,...x])k(t,"active","inactive")},T=(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")},C=()=>{for(let t of v)k(t,"inactive");for(let t of M.values())t.remove();M.clear()},N=(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 lF({style:{x:t+P,y:e+j,width:n-t,height:r-e}}),E(o,"inactive"),E(a,"active")}},L=ON(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?C:A)()},brushed:(t,e,n,r,i)=>{let o=b$(t,e,n,r,u,c);i&&y.emit("brush:highlight",{nativeEvent:!0,data:{selection:o}}),(f?N:T)(t,e,n,r)},brushcreated:(t,e,n,r,i)=>{let o=b$(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=b$(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)}})),I=({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=bG(o,r),s=bG(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);L.move(r,i,o,a,!1)};y.on("brush:highlight",I);let R=({nativeEvent:t}={})=>{t||L.remove(!1)};y.on("brush:remove",R);let D=L.destroy.bind(L);return L.destroy=()=>{y.off("brush:highlight",I),y.off("brush:remove",R),D()},L}function OR(t){var{facet:e,brushKey:n}=t,r=OA(t,["facet","brushKey"]);return(t,i,o)=>{let{container:a,view:l,options:s}=t,u=x_(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 OI(u.parentNode.parentNode,Object.assign(Object.assign({elements:()=>xM(t,i),datum:xN(xS(t,i).map(t=>t.view)),brushRegion:(t,e,n,r)=>[t,e,n,r],extent:[n,a,l,s],state:xR(xS(t,i).map(t=>t.options),f),emitter:o,scale:p,coordinate:h,selectedHandles:void 0},c),r))}let d=OI(u,Object.assign(Object.assign({elements:xk,key:t=>t.__data__.key,siblings:()=>OL(t,i,n).map(t=>x_(t.container)),datum:xN([l,...OL(t,i,n).map(t=>t.view)]),brushRegion:(t,e,n,r)=>[t,e,n,r],extent:void 0,state:xR([s,...OL(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 OD(t,e,n,r,i){let[,o,,a]=i;return[t,o,n,a]}function OF(t){return OR(Object.assign(Object.assign({},t),{brushRegion:OD,selectedHandles:["handle-e","handle-w"]}))}function OB(t,e,n,r,i){let[o,,a]=i;return[o,e,a,r]}function Oz(t){return OR(Object.assign(Object.assign({},t),{brushRegion:OB,selectedHandles:["handle-n","handle-s"]}))}var OW=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 O$="axis-hot-area";function OG(t){return t.getElementsByClassName("axis")}function OH(t){return t.getElementsByClassName("axis-line")[0]}function OV(t){return t.getElementsByClassName("axis-main-group")[0].getLocalBounds()}function OU(t){return(e,n,r)=>{let{container:i,view:o,options:a}=e,{x:l,y:s}=x_(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=OW(e,["axes","elements","points","horizontal","datum","offsetY","offsetX","reverse","state","emitter","coordinate"]);let d=r(t),y=n(t),{setState:g,removeState:v}=xL(c,xD(d,a)),b=new Map,x=ua(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 S=(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})()}})},_=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(bW(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=OW(e,["offsetY","offsetX","cross"]);let a=OV(t),[,l]=OH(t).getLocalBounds().min,[s,u]=a.min,[c,f]=a.max,p=f-u;return{brushRegion:OD,hotZone:new lF({className:O$,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=OW(e,["cross","offsetX","offsetY"]);let a=OV(t),[l]=OH(t).getLocalBounds().min,[s,u]=a.min,[c,f]=a.max,p=(c-s)*2;return{brushRegion:OB,hotZone:new lF({className:O$,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=ON(n,Object.assign(Object.assign({},x),{reverse:u,brushRegion:r,brushended(n){b.delete(e),0===Array.from(b.entries()).length?_(n):S(t,n)},brushed(n,r,o,a,l){b.set(e,i(n,r,o,a)),S(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:xk,axes:OG,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:xN(o),state:xR(a,["active",["inactive",{opacity:.5}]]),coordinate:u,emitter:r},t))}}var Oq=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 OY(t){var{hideX:e=!0,hideY:n=!0}=t,r=Oq(t,["hideX","hideY"]);return(t,i,o)=>{let{container:a,view:l,options:s,update:u,setState:c}=t,f=x_(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=ua(Oq(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=ON(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 b$(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=>tG({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 OX(t){return OY(Object.assign(Object.assign({hideX:!0},t),{brushRegion:OD}))}function OK(t){return OY(Object.assign(Object.assign({hideY:!0},t),{brushRegion:OB}))}var OZ=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 OQ(t){return[t[0],t[t.length-1]]}function OJ({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:S,y:_}=b,P=ey(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||S.getOptions().domain,y:t.y||_.getOptions().domain};for(let t of g){let{orientation:e}=t.attributes,[u,c]=j(e),p=`${n}${md(u)}:filter`,h="x"===u,{ratio:g}=S.getOptions(),{ratio:x}=_.getOptions(),O=t=>{if(t.data){let{selection:e}=t.data,[n=OQ(C.x),r=OQ(C.y)]=e;return h?[bW(S,n,g),bW(_,r,x)]:[bW(_,r,x),bW(S,n,g)]}let{value:n}=t.detail;return[function(t,e,n){let[r,i]=t,o=n?t=>1-t:t=>t,a=bz(e,o(r),!0),l=bz(e,o(i),!1);return bW(e,[a,l])}(n,b[u],P&&"horizontal"===e),C[c]]},N=xZ(e=>OZ(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:[OQ(t),OQ(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 tG({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 a3("valuechange",{data:i,nativeEvent:!1})),r(t,h?bG(a,S):bG(l,_))};f.on(p,L),t.addEventListener("valuechange",N),A.set(t,N),T.add([p,L]);let I=s(t);I&&t.dispatchEvent(new a3("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 O0="g2-scrollbar";function O1(t={}){return(e,n,r)=>{let{view:i,container:o}=e;if(!o.getElementsByClassName(O0).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}),OJ(Object.assign(Object.assign({},t),{initDomain:u,className:O0,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 O2(t){return t.replace(/-(\w)/g,function(t,e){return e.toUpperCase()})}var O5=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 O3={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 O4(t){return"text"===t.nodeName&&!!t.isOverflowing()}function O6(t){var{offsetX:e=8,offsetY:n=8}=t,r=O5(t,["offsetX","offsetY"]);return t=>{let{container:i}=t,[o,a]=i.getBounds().min,l=ua(r,"tip"),s=new Set,u=t=>{var r;let{target:u}=t;if(!O4(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 lC({className:"poptip",style:{innerHTML:(r=Object.assign(Object.assign({},O3),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;if(!O4(e))return void t.stopPropagation();e.tip&&(e.tip.remove(),e.tip=null,s.delete(e.tip))};return i.addEventListener("pointerover",u),i.addEventListener("pointerout",c),()=>{i.removeEventListener("pointerover",u),i.removeEventListener("pointerout",c),s.forEach(t=>t.remove())}}}function O8(t){return s8(t)?0:vr(t)?t.length:Object.keys(t).length}O6.props={reapplyWhenUpdate:!0};var O9=function(t){return tB(t,"String")},O7=function(t,e,n){for(var r=0,i=O9(e)?e.split("."):e;t&&r<i.length;)t=t[i[r++]];return void 0===t||r<i.length?n:t},wt=function(t){return"function"==typeof t},we=Object.keys?function(t){return Object.keys(t)}:function(t){var e=[];return mf(t,function(n,r){wt(t)&&"prototype"===r||e.push(r)}),e},wn=function(t,e){var n=we(e),r=n.length;if(s8(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},wr=function(t,e){if(!tz(t))return null;if(wt(e)&&(n=e),t$(e)&&(n=function(t){return wn(t,e)}),n){for(var n,r=0;r<t.length;r+=1)if(n(t[r]))return t[r]}return null},wi=Object.prototype.hasOwnProperty,wo=function(t,e){if(null===t||!t$(t))return{};var n={};return mf(e,function(e){wi.call(t,e)&&(n[e]=t[e])}),n};function wa(t){return null==t?null:wl(t)}function wl(t){if("function"!=typeof t)throw Error();return t}function ws(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 wu(t,e){t instanceof Map?(t=[void 0,t],void 0===e&&(e=wf)):void 0===e&&(e=wc);for(var n,r,i,o,a,l=new wd(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 wd(i[o])),r.parent=n,r.depth=n.depth+1;return l.eachBefore(wh)}function wc(t){return t.children}function wf(t){return Array.isArray(t)?t[1]:null}function wp(t){void 0!==t.data.value&&(t.value=t.data.value),t.data=t.data.data}function wh(t){var e=0;do t.height=e;while((t=t.parent)&&t.height<++e)}function wd(t){this.data=t,this.depth=this.height=0,this.parent=null}wd.prototype=wu.prototype={constructor:wd,count:function(){return this.eachAfter(ws)},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 wu(this).eachBefore(wp)},[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 wy={depth:-1},wg={},wm={};function wv(t){return t.id}function wb(t){return t.parentId}function wx(){var t,e=wv,n=wb;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,ww(i,o-1)&&!ww(i,o-2)&&(i=i.slice(0,-1)),"/"===i[0]?i:`/${i}`}),n=e.map(wO),i=new Set(e).add("");for(let t of n)i.has(t)||(i.add(t),e.push(t),n.push(wO(t)),p.push(wm));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 wd(o),null!=(c=h(o,a,r))&&(c+="")&&(f=u.id=c,y.set(f,y.has(f)?wg: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===wg)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===wm&&1===l.children.length;)l=l.children[0],--i;for(let t=p.length-1;t>=0&&(u=p[t]).data===wm;--t)u.data=null}if(l.parent=wy,l.eachBefore(function(t){t.depth=t.parent.depth+1,--i}).eachBefore(wh),l.parent=null,i>0)throw Error("cycle");return l}return r.id=function(t){return arguments.length?(e=wa(t),r):e},r.parentId=function(t){return arguments.length?(n=wa(t),r):n},r.path=function(e){return arguments.length?(t=wa(e),r):t},r}function wO(t){let e=t.length;if(e<2)return"";for(;--e>1&&!ww(t,e););return t.slice(0,e)}function ww(t,e){if("/"===t[e]){let n=0;for(;e>0&&"\\"===t[--e];)++n;if((1&n)==0)return!0}return!1}function wE(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 wk(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 wM(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?wM:wk)(t,e,n,r,i)}var w_=(1+Math.sqrt(5))/2;function wP(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?wk(a,n,r,i,E?r+=u*c/E:o):wM(a,n,r,E?n+=s*c/E:i,o),E-=c,x=O}return v}var wj=function t(e){function n(t,n,r,i,o){wP(e,t,n,r,i,o)}return n.ratio=function(e){return t((e*=1)>1?e:1)},n}(w_),wA=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?wk(l,n,r,i,h?r+=(o-r)*l.value/h:o):wM(l,n,r,h?n+=(i-n)*l.value/h:i,o),h-=l.value}else t._squarify=a=wP(e,t,n,r,i,o),a.ratio=e}return n.ratio=function(e){return t((e*=1)>1?e:1)},n}(w_);function wT(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 wC(){return 0}function wN(t){return function(){return t}}function wL(t,e,n){var r;let{value:i}=n,o=function(t,e){let n={treemapBinary:wE,treemapDice:wk,treemapSlice:wM,treemapSliceDice:wS,treemapSquarify:wj,treemapResquarify:wA},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?wx().path(r)(t):wx()(t):wu(t));tz(t)?function t(e){let n=O7(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:cY(i)(t)).sort(e.sort):a.count(),(function(){var t=wj,e=!1,n=1,r=1,i=[0],o=wC,a=wC,l=wC,s=wC,u=wC;function c(t){return t.x0=t.y0=0,t.x1=n,t.y1=r,t.eachBefore(f),i=[0],e&&t.eachBefore(wT),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=wl(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:wN(+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:wN(+t),c):a},c.paddingRight=function(t){return arguments.length?(l="function"==typeof t?t:wN(+t),c):l},c.paddingBottom=function(t){return arguments.length?(s="function"==typeof t?t:wN(+t),c):s},c.paddingLeft=function(t){return arguments.length?(u="function"==typeof t?t:wN(+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 wI=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 wR=t=>t.querySelectorAll(".element"),wD={breadCrumbFill:"rgba(0, 0, 0, 0.85)",breadCrumbFontSize:12,breadCrumbY:12,activeFill:"rgba(0, 0, 0, 0.5)"};function wF(t={}){let{originData:e=[],layout:n}=t,r=tG({},wD,wI(t,["originData","layout"])),i=ua(r,"breadCrumb"),o=ua(r,"active");return t=>{let{update:r,setState:a,container:l,options:s}=t,u=up(l).select(`.${xd}`).node(),{state:c}=s.marks[0],f=new lT;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 lB({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 lB({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===O8(t)-1&&c.remove(),u});s.forEach((t,e)=>{if(e===O8(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(O7(t,["style","path"]),O7(t,["style","depth"]))})})}[...OE(l),...Ok(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=O7(t,["id"]);return e&&(e.match(`${o}/`)||o.match(e))}).map(t=>({value:0===t.height?O7(t,["value"]):void 0,name:O7(t,["id"])})),{paddingLeft:i,paddingBottom:a,paddingRight:l}=n;r=wL(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(vi(t))}),tG({},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"!==O7(n,["markType"]))return;let r=O7(n,["__data__","key"]),i=wr(e,t=>t.id===r);O7(i,"height")&&p(O7(i,"path"),O7(i,"depth"))};u.addEventListener("click",h);let d=we(Object.assign(Object.assign({},c.active),c.inactive)),y=()=>{wR(u).forEach(t=>{let n=O7(t,["style","cursor"]),r=wr(e,e=>e.id===O7(t,["__data__","key"]));if("pointer"!==n&&(null==r?void 0:r.height)){t.style.cursor="pointer";let e=wo(t.attributes,d);t.addEventListener("mouseenter",()=>{t.attr(c.active)}),t.addEventListener("mouseleave",()=>{t.attr(tG(e,c.inactive))})}})};return y(),u.addEventListener("mousemove",y),()=>{f.remove(),u.removeEventListener("click",h),u.removeEventListener("mousemove",y)}}}var wB=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 wz(t){return(e,...n)=>tG({},t(e,...n),e)}function wW(t){return(e,...n)=>tG({},e,t(e,...n))}function w$(t,e){if(!t)return e;if(Array.isArray(t))return t;let{value:n=e}=t;return Object.assign(Object.assign({},wB(t,["value"])),{value:n})}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=()=>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({},wG(t,["data","x","y","width","height"])),{data:w$(e,a),x:null!=l?l:n,y:null!=s?s:r,width:null!=u?u:i,height:null!=c?c:o})})};wH.props={};var wV=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 wU=()=>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=wV(r,["data"]),y=w$(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};wU.props={};class wq{constructor(t){this.$value=t}static of(t){return new wq(t)}call(t,...e){return this.$value=t(this.$value,...e),this}value(){return this.$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=wz(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=s2(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"))}}}),wK=wz(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)?[ce(a)]:[Array.from(new Set(a)),"ordinal"]})();return{encode:{color:e},scale:{color:tG({},n,{domain:s,type:u})},legend:{color:tG({title:l},r)}}}),wZ=wz(()=>({animate:{enterType:"fadeIn"}})),wQ=wW(()=>({frame:!1,encode:{shape:"hollow"},style:{lineWidth:0}})),wJ=wW(()=>({type:"cell"})),w0=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}}]}}}),w1=wW((t,e=w2,n=w3,r=w4,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=cr(t),S=t.map(e),_=t.map(({x:t,y:e})=>[s.invert(t),g.invert(e)]),P=_.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?dm(P,t=>t.length):void 0,A=_.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]=S[t],s=A[t],f=P[t];return T[t].map(g=>{var E,k,{scale:M,key:S,facet:_=!0,axis:P={},legend:A={}}=g,T=wY(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=_?f:0===f.length?[]:h,I={x:w6(N,n)(s,L),y:w6(C,r)(s,L)};return Object.assign(Object.assign({key:`${S}-${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:tG({x:{tickCount:d?5:void 0},y:{tickCount:y?5:void 0}},M,{color:{domain:v}}),axis:tG({},P,I),legend:!1},T),i)})})}}});function w2(t){let{points:e}=t;return ub(e)}function w5(t,e){return e.length?tG({title:!1,tick:null,label:null},t):tG({title:!1,tick:null,label:null,grid:null},t)}function w3(t){return(e,n)=>{let{rowIndex:r,rowValuesLength:i,columnIndex:o,columnValuesLength:a}=e;return r!==i-1?w5(t,n):tG({title:o===a-1&&void 0,grid:n.length?void 0:null},t)}}function w4(t){return(e,n)=>{let{rowIndex:r,columnIndex:i}=e;return 0!==i?w5(t,n):tG({title:0===r&&void 0,grid:n.length?void 0:null},t)}}function w6(t,e){return"function"==typeof t?t:null===t||!1===t?()=>null:e(t)}let w8=()=>t=>[wq.of(t).call(wJ).call(wK).call(wZ).call(wX).call(wQ).call(w0).call(w1).value()];w8.props={};var w9=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 w7=wz(t=>({scale:{x:{guide:null,paddingOuter:0,paddingInner:.1},y:{guide:null,range:[0,1],paddingOuter:0,paddingInner:.1}}})),Et=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=cr(t),v=t.map(({points:t})=>ub(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:S}=g,_=w9(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 w5(x,e)})(y,e),y:("function"==typeof(O=P)?O:null===O?()=>null:(t,e)=>{let{columnIndex:n}=t;if(0!==n)return w5(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:tG({x:{facet:!1},y:{facet:!1}},w),axis:tG({x:{tickCount:5},y:{tickCount:5}},M,j),legend:!1,encode:tG({},k,{x:u,y:d}),interaction:tG({},S,{legendFilter:!1})},_)})})}}}),Ee=wW(t=>{let{encode:e}=t,n=w9(t,["encode"]),{position:r=[],x:i=r,y:o=[...r].reverse()}=e,a=w9(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}})})}),En=()=>t=>[wq.of(t).call(wJ).call(wK).call(Et).call(Ee).call(wZ).call(wQ).call(w7).value()];var Er=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 Ei=wz(t=>({scale:{x:{guide:{type:"axisArc"},paddingOuter:0,paddingInner:.1},y:{guide:null,range:[0,1],paddingOuter:0,paddingInner:.1}}})),Eo=wz(t=>({coordinate:{type:"polar"}})),Ea=t=>{let{encode:e}=t,n=Er(t,["encode"]),{position:r}=e;return Object.assign(Object.assign({},n),{encode:{x:r}})};function El(t){return t=>null}function Es(t){let{points:e}=t,[n,r,i,o]=e,a=uy(n,o),l=ud(n,o),s=uv(l,ud(r,i)),u=1/Math.sin(s/2),c=a/(1+u),f=c*Math.sqrt(2),[p,h]=i,d=um(l)+s/2,y=c*u;return[p+y*Math.sin(d)-f/2,h-y*Math.cos(d)-f/2,f,f]}let Eu=()=>t=>[wq.of(t).call(wJ).call(Ea).call(wK).call(Eo).call(w0).call(w1,Es,El,El,{frame:!1}).call(wZ).call(wQ).call(Ei).value()],Ec=()=>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=tG({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 Ef(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 Ep(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=tY(i,t))?void 0:e[0]]}).filter(([,t])=>uo(t));return Array.from(s2(e,t=>o.map(([,e])=>e[t]).join("-")).values())}function Eh(t){var e,n;return Array.isArray(t)?(e=t,(t,n,r)=>(n,r)=>e.reduce((e,i)=>0!==e?e:b_(t[n][i],t[r][i]),0)):"function"==typeof t?(n=t,(t,e,r)=>Ex(e=>n(t[e]))):"series"===t?Eg:"value"===t?Em:"sum"===t?Ev:"maxIndex"===t?Eb:()=>null}function Ed(t,e){for(let n of t)n.sort(e)}function Ey(t,e){return(null==e?void 0:e.domain)||Array.from(new Set(t))}function Eg(t,e,n){return Ex(t=>n[t])}function Em(t,e,n){return Ex(t=>e[t])}function Ev(t,e,n){let r=new Map(Array.from(s2(cr(t),t=>n[+t]).entries()).map(([t,n])=>[t,n.reduce((t,n)=>t+ +e[n])]));return Ex(t=>r.get(n[t]))}function Eb(t,e,n){let r=new Map(Array.from(s2(cr(t),t=>n[+t]).entries()).map(([t,n])=>[t,Ef(n,t=>e[t])]));return Ex(t=>r.get(n[t]))}function Ex(t){return(e,n)=>b_(t(e),t(n))}Ec.props={};let EO=(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]=tY(u,"y"),[h,d]=tY(u,"y1"),[y]=a?tX(u,"series","color"):tY(u,"color"),g=Ep(e,t,l),v=Eh(n)(s,f,y);v&&Ed(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),S="y"===i?b:x,_="y"===o?b:x;return[t,tG({},l,{encode:{y0:tV(f,p),y:tH(S,p),y1:tH(_,d)},style:Object.assign({first:(t,e)=>k.has(e),last:(t,e)=>M.has(e)},c)})]}};function Ew(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 EE(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}EO.props={};var Ek=Array.prototype,EM=Ek.slice;Ek.map;let ES=Math.sqrt(50),E_=Math.sqrt(10),EP=Math.sqrt(2);function Ej(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>=ES?10:s>=E_?5:s>=EP?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)?Ej(t,e,2*n):[r,i,o]}function EA(t,e,n){return Ej(t*=1,e*=1,n*=1)[2]}function ET(t){return Math.max(1,Math.ceil(Math.log(Ew(t))/Math.LN2)+1)}function EC(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?bF:bD(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));EC(t,e,c,f,i)}let o=t[e],a=n,l=r;for(EN(t,n,e),i(t[r],o)>0&&EN(t,n,r);a<l;){for(EN(t,a,l),++a,--l;0>i(t[a],o);)++a;for(;i(t[l],o)>0;)--l}0===i(t[n],o)?EN(t,n,l):EN(t,++l,r),l<=e&&(n=l+1),e<=l&&(r=l-1)}return t}function EN(t,e,n){let r=t[e];t[e]=t[n],t[n]=r}function EL(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 dg(t);if(e>=1)return dm(t);var r,i=(r-1)*e,o=Math.floor(i),a=dm(EC(t,o).subarray(0,o+1));return a+(dg(t.subarray(o+1))-a)*(i-o)}}function EI(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 ER=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 ED(t){return e=>null===e?t:`${t} of ${e}`}function EF(){return[(t,e)=>x1(t,t=>+e[t]),ED("mean")]}function EB(){return[(t,e)=>EL(t,.5,t=>+e[t]),ED("median")]}function Ez(){return[(t,e)=>dm(t,t=>+e[t]),ED("max")]}function EW(){return[(t,e)=>dg(t,t=>+e[t]),ED("min")]}function E$(){return[(t,e)=>t.length,ED("count")]}function EG(){return[(t,e)=>EI(t,t=>+e[t]),ED("sum")]}function EH(){return[(t,e)=>e[t[0]],ED("first")]}function EV(){return[(t,e)=>e[t[t.length-1]],ED("last")]}let EU=(t={})=>{let{groupBy:e}=t,n=ER(t,["groupBy"]);return(t,r)=>{let{data:i,encode:o}=r,a=e(t,r);if(!a)return[t,r];let l=(t,e)=>{if(t)return t;let{from:n}=e;if(!n)return t;let[,r]=tY(o,n);return r},s=Object.entries(n).map(([t,e])=>{let[n,r]=function(t){if("function"==typeof t)return[t,null];let e={mean:EF,max:Ez,count:E$,first:EH,last:EV,sum:EG,min:EW,median:EB}[t];if(!e)throw Error(`Unknown reducer: ${t}.`);return e()}(e),[s,u]=tY(o,t),c=l(u,e);return[t,Object.assign(Object.assign({},Object.assign(Object.assign({},tH(a.map(t=>n(t,null!=s?s:i)),(null==r?void 0:r(c))||c)),{constant:!1})),{aggregate:!0})]}),u=Object.keys(o).map(t=>{let[e,n]=tY(o,t);return[t,tH(a.map(t=>e[t[0]]),n)]}),c=a.map(t=>i[t[0]]);return[cr(a),tG({},r,{data:c,encode:Object.fromEntries([...u,...s])})]}};EU.props={};var Eq=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 EY="thresholds",EX=(t={})=>{let{groupChannels:e=["color"],binChannels:n=["x","y"]}=t,r=Eq(t,["groupChannels","binChannels"]),i={};return EU(Object.assign(Object.assign(Object.assign({},Object.fromEntries(Object.entries(r).filter(([t])=>!t.startsWith(EY)))),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]=tY(a,t);return e}),s=ua(r,EY),u=t.filter(t=>l.every(e=>uo(e[t]))),c=[...e.map(t=>{let[e]=tY(a,t);return e}).filter(uo).map(t=>e=>t[e]),...n.map((t,e)=>{let n=l[e],r=s[t]||function(t){let[e,n]=ce(t);return Math.min(200,function(t,e,n){let r=Ew(t),i=EE(t);return r&&i?Math.ceil((n-e)*Math.cbrt(r)/(3.49*i)):1}(t,e,n))}(n),o=new Map((function(){var t=s1,e=ce,n=ET;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===ce&&([c,f]=function(t,e,n){let r;for(;;){let i=EA(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?Ej(e,t,n):Ej(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=EA(c,f,n)),p[p.length-1]>=f)if(t>=f&&e===ce){let t=EA(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[bN(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)?EM.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(s2(u,t=>c.map(e=>e(t)).join("-")).values())}}))};EX.props={};let EK=(t={})=>{let{thresholds:e}=t;return EX(Object.assign(Object.assign({},t),{thresholdsX:e,groupChannels:["color"],binChannels:["x"]}))};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{groupBy:e="x",reverse:n=!1,orderBy:r,padding:i}=t;return EZ(t,["groupBy","reverse","orderBy","padding"]),(t,o)=>{let{data:a,encode:l,scale:s}=o,{series:u}=s,[c]=tY(l,"y"),[f]=tX(l,"series","color"),p=Ey(f,u),h=Ep(e,t,o),d=Eh(r)(a,c,f);d&&Ed(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,tG({},o,{scale:{series:{domain:p,paddingInner:i}},encode:{series:tH(y)}})]}};function EJ(t,e,n){if(null===t)return[-.5,.5];let r=new dD({domain:Ey(t,e),range:[0,1],padding:n}).getBandWidth();return[-r/2,r/2]}EQ.props={};let E0=(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]=tY(o,"x"),[c]=tY(o,"y"),f=EJ(u,l,n),p=EJ(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,tG({scale:{x:{padding:.5},y:{padding:.5}}},e,{encode:{dy:tH(h),dx:tH(d)}})]}};E0.props={};let E1=(t={})=>{let{padding:e=0,random:n=Math.random}=t;return(t,r)=>{let{encode:i,scale:o}=r,{x:a}=o,[l]=tY(i,"x"),s=EJ(l,a,e),u=t.map(()=>(function(t,e,n){return e*(1-t)+n*t})(n(),...s));return[t,tG({scale:{x:{padding:.5}}},r,{encode:{dx:tH(u)}})]}};E1.props={};let E2=(t={})=>{let{padding:e=0,random:n=Math.random}=t;return(t,r)=>{let{encode:i,scale:o}=r,{y:a}=o,[l]=tY(i,"y"),s=EJ(l,a,e),u=t.map(()=>(function(t,e,n){return e*(1-t)+n*t})(n(),...s));return[t,tG({scale:{y:{padding:.5}}},r,{encode:{dy:tH(u)}})]}};E2.props={};var E5=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 E3=(t={})=>{let{groupBy:e="x"}=t;return(t,n)=>{let{encode:r}=n,{x:i}=r,o=Object.entries(E5(r,["x"])).filter(([t])=>t.startsWith("y")).map(([t])=>[t,tY(r,t)[0]]),a=o.map(([e])=>[e,Array(t.length)]),l=Ep(e,t,n),s=Array(l.length);for(let t=0;t<l.length;t++){let[e,n]=ce(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,tG({},n,{encode:Object.fromEntries(a.map(([t,e])=>[t,tH(e,tY(r,t)[1])]))})]}};E3.props={};let E4=(t={})=>{let{groupBy:e="x",series:n=!0}=t;return(t,r)=>{let{encode:i}=r,[o]=tY(i,"y"),[a,l]=tY(i,"y1"),[s]=n?tX(i,"series","color"):tY(i,"color"),u=Ep(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,tG({},r,{encode:{y1:tH(c,l)}})]}};E4.props={};let E6=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,tY(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(s2(n,e=>t[e]).values());e.push(...r)}u=e}if(r){let[t]=tY(l,r);t&&u.sort((e,r)=>n(e,t)-n(r,t)),i&&u.reverse()}let c=(o||3e3)/u.length,[f]=o?[tq(t,c)]:tX(l,"enterDuration",tq(t,c)),[p]=tX(l,"enterDelay",tq(t,0)),h=Array(t.length);for(let t=0,e=0;t<u.length;t++){let n=u[t],r=dm(n,t=>+f[t]);for(let t of n)h[t]=+p[t]+e;e+=r}return[t,tG({},a,{encode:{enterDuration:tU(f),enterDelay:tU(h)}})]}};E6.props={};var E8=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 E9=(t={})=>{let{groupBy:e="x",basis:n="max"}=t;return(t,r)=>{let{encode:i,tooltip:o}=r,{x:a}=i,l=Object.entries(E8(i,["x"])).filter(([t])=>t.startsWith("y")).map(([t])=>[t,tY(i,t)[0]]),[,s]=l.find(([t])=>"y"===t),u=l.map(([e])=>[e,Array(t.length)]),c=Ep(e,t,r),f="function"==typeof n?n:({min:(t,e)=>dg(t,t=>e[+t]),max:(t,e)=>dm(t,t=>e[+t]),first:(t,e)=>e[t[0]],last:(t,e)=>e[t[t.length-1]],mean:(t,e)=>x1(t,t=>e[+t]),median:(t,e)=>EL(t,.5,t=>e[+t]),sum:(t,e)=>EI(t,t=>e[+t]),deviation:(t,e)=>EE(t,t=>e[+t])})[n]||dm;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=uf(o)||(null==o?void 0:o.items)&&(null==o?void 0:o.items.length)!==0;return[t,tG({},r,Object.assign({encode:Object.fromEntries(u.map(([t,e])=>[t,tH(e,tY(i,t)[1])]))},!p&&i.y0&&{tooltip:{items:[{channel:"y0"}]}}))]}};function E7(t,e){return[t[0]]}function kt(t,e){let n=t.length-1;return[t[n]]}function ke(t,e){let n=Ef(t,t=>e[t]);return[t[n]]}function kn(t,e){let n=x2(t,t=>e[t]);return[t[n]]}E9.props={};let kr=(t={})=>{let{groupBy:e="series",channel:n,selector:r}=t;return(t,i)=>{let{encode:o}=i,a=Ep(e,t,i),[l]=tY(o,n),s="function"==typeof r?r:({first:E7,last:kt,max:ke,min:kn})[r]||E7;return[a.flatMap(t=>s(t,l)),i]}};kr.props={};var ki=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let ko=(t={})=>{let{selector:e}=t;return kr(Object.assign({channel:"x",selector:e},ki(t,["selector"])))};ko.props={};var ka=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let kl=(t={})=>{let{selector:e}=t;return kr(Object.assign({channel:"y",selector:e},ka(t,["selector"])))};kl.props={};var ks=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 ku=(t={})=>{let{channels:e=["x","y"]}=t;return EU(Object.assign(Object.assign({},ks(t,["channels"])),{groupBy:(t,n)=>Ep(e,t,n)}))};ku.props={};let kc=(t={})=>ku(Object.assign(Object.assign({},t),{channels:["x","color","series"]}));kc.props={};let kf=(t={})=>ku(Object.assign(Object.assign({},t),{channels:["y","color","series"]}));kf.props={};let kp=(t={})=>ku(Object.assign(Object.assign({},t),{channels:["color"]}));kp.props={};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};let kd=(t={})=>{let{reverse:e=!1,slice:n,channel:r,ordinal:i=!0}=t,o=kh(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=kh(n,["reverse","slice","channel"]),{encode:c,scale:f={}}=e,p=null==(r=f[s])?void 0:r.domain,[h]=tY(c,s),d=function(t,e,n){let{by:r=t,reducer:i="max"}=e,[o]=tY(n,r);if("function"==typeof i)return t=>i(t,o);if("max"===i)return t=>dm(t,t=>+o[t]);if("min"===i)return t=>dg(t,t=>+o[t]);if("sum"===i)return t=>EI(t,t=>+o[t]);if("median"===i)return t=>EL(t,.5,t=>+o[t]);if("mean"===i)return t=>x1(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?bR(s3(i,d,o),([t,e],[n,r])=>b_(e,r)||b_(t,n)):bR(s2(i,o),([t,e],[n,r])=>d(e,r)||b_(t,n))).map(([t])=>t));return a&&y.reverse(),[t,tG(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]=tY(o,i),l=bR(t,t=>a[t]);return r&&l.reverse(),[l,e]}(t,a,Object.assign({reverse:e,slice:n,channel:r},o))};kd.props={};let ky=(t={})=>kd(Object.assign(Object.assign({},t),{channel:"x"}));ky.props={};let kg=(t={})=>kd(Object.assign(Object.assign({},t),{channel:"y"}));kg.props={};let km=(t={})=>kd(Object.assign(Object.assign({},t),{channel:"color"}));km.props={};let kv=(t={})=>{let{field:e,channel:n="y",reducer:r="sum"}=t;return(t,i)=>{let{data:o,encode:a}=i,[l]=tY(a,"x"),s=s4(t,function(t,e){if("function"==typeof t)return n=>t(n,e);if("sum"===t)return t=>EI(t,t=>+e[t]);throw Error(`Unknown reducer: ${t}`)}(r,e?"string"==typeof e?o.map(t=>t[e]):o.map(e):tY(a,n)[0]),t=>l[t]).map(t=>t[1]);return[t,tG({},i,{scale:{x:{flex:s}}})]}};kv.props={};let kb=t=>(e,n)=>[e,tG({},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]=ub(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 kx(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])}kb.props={};let kO=(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 kx;let e={first:t=>[t[0]],last:t=>[t[t.length-1]],min:(t,e,n)=>[t[x2(t,t=>n[t])]],max:(t,e,n)=>[t[Ef(t,t=>n[t])]],median:(t,e,n)=>[t[function(t,e,n=bT){if(!isNaN(e*=1)){if(r=Float64Array.from(t,(e,r)=>bT(n(t[r],r,t))),e<=0)return x2(r);if(e>=1)return Ef(r);var r,i=Uint32Array.from(t,(t,e)=>e),o=r.length-1,a=Math.floor(o*e);return EC(i,a,0,o,(t,e)=>bF(r[t],r[e])),(a=function(t,e=b_){let n,r=!1;if(1===e.length){let i;for(let o of t){let t=e(o);(r?b_(t,i)>0:0===b_(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=Ep(r,t,e),[l]=tY(o,"x"),[s]=tY(o,"y");return[a.flatMap(t=>i(t,l,s,n)),e]}};kO.props={};let kw=(t={})=>(e,n)=>{let{encode:r,data:i}=n,o=Object.entries(t).map(([t,e])=>{let[n]=tY(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(uo);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,tG({},n,{encode:Object.fromEntries(s),data:a.map(t=>i[t])})]};kw.props={};var kE={},kk={};function kM(t){return Function("d","return {"+t.map(function(t,e){return JSON.stringify(t)+": d["+e+'] || ""'}).join(",")+"}")}function kS(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 k_(t,e){var n=t+"",r=n.length;return r<e?Array(e-r+1).join(0)+n:n}function kP(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 kj&&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 kj=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours(),kA=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 kk;if(u)return u=!1,kE;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())!==kk;){for(var f=[];r!==kE&&r!==kk;)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?"-"+k_(-l,6):l>9999?"+"+k_(l,6):k_(l,4))+"-"+k_(n.getUTCMonth()+1,2)+"-"+k_(n.getUTCDate(),2)+(a?"T"+k_(r,2)+":"+k_(i,2)+":"+k_(o,2)+"."+k_(a,3)+"Z":o?"T"+k_(r,2)+":"+k_(i,2)+":"+k_(o,2)+"Z":i||r?"T"+k_(r,2)+":"+k_(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=kM(t),function(n,r){return e(o(n),r,t)}):kM(t)});return o.columns=i||[],o},parseRows:r,format:function(e,n){return null==n&&(n=kS(e)),[n.map(a).join(t)].concat(i(e,n)).join("\n")},formatBody:function(t,e){return null==e&&(e=kS(t)),i(t,e).join("\n")},formatRows:function(t){return t.map(o).join("\n")},formatRow:o,formatValue:a}})(r).parse(e,i?kP:ut)}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())})}};kA.props={};let kT=t=>{let{value:e}=t;return()=>e};kT.props={};let kC=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))};kC.props={};let kN=t=>{let{callback:e}=t;return t=>Array.isArray(t)?[...t].sort(e):t};function kL(t){return null!=t&&!Number.isNaN(t)}kN.props={};let kI=t=>{let{callback:e=kL}=t;return t=>t.filter(e)};kI.props={};let kR=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))};kR.props={};let kD=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;kD.props={};let kF=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};kF.props={};let kB=t=>{let{start:e,end:n}=t;return t=>t.slice(e,n)};kB.props={};let kz=t=>{let{callback:e=ut}=t;return t=>e(t)};kz.props={};let kW=t=>{let{callback:e=ut}=t;return t=>Array.isArray(t)?t.map(e):t};function k$(t){return"string"==typeof t?e=>e[t]:t}kW.props={};let kG=t=>{let{join:e,on:n,select:r=[],as:i=r,unknown:o=NaN}=t,[a,l]=n,s=k$(l),u=k$(a),c=s3(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),{}))})};kG.props={};var kH=n(3740),kV=n.n(kH);let kU=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(s2(t,t=>n.map(e=>t[e]).join("-")).values()).map(t=>{let n=kV().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})})};kU.props={};let kq=()=>t=>(console.log("G2 data section:",t),t);function kY(t){let{min:e,max:n}=t;return[[e[0],e[1]],[n[0],n[1]]]}function kX(t,e){let[n,r]=t,[i,o]=e;return n>=i[0]&&n<=o[0]&&r>=i[1]&&r<=o[1]}kq.props={};let kK=t=>{let{priority:e}=t;return t=>{let n=[];return e&&t.sort(e),t.forEach(t=>{xw(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]})(kY(e),kY(t.getLocalBounds())))?xO(t):n.push(t)}),t}};function kZ(){let t=new Map;return[e=>t.get(e),(e,n)=>t.set(e,n)]}let kQ=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]=kZ(),[l,s]=kZ(),[u,c]=kZ(),[f,p]=kZ();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)=>b_(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}},kJ=()=>t=>(t.forEach(t=>{xw(t);let e=t.attr("bounds");(function(t,e){let[n,r]=t;return!(kX(n,e)&&kX(r,e))})(kY(t.getLocalBounds()),e)&&xO(t)}),t);function k0(t){let e=t/255;return e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)}function k1(t,e,n){return .2126*k0(t)+.7152*k0(e)+.0722*k0(n)}function k2(t,e){let{r:n,g:r,b:i}=t,{r:o,g:a,b:l}=e,s=k1(n,r,i),u=k1(o,a,l);return(Math.max(s,u)+.05)/(Math.min(s,u)+.05)}let k5=t=>{let{threshold:e=4.5,palette:n=["#000","#fff"]}=t;return t=>(t.forEach(t=>{let r=t.attr("dependentElement").parsedStyle.fill;k2(t.parsedStyle.fill,r)<e&&t.attr("fill",function(t,e){let n=Ef(e,e=>k2(t,"object"==typeof e?e:on(e)));return e[n]}(r,n))}),t)};function k3(){return{"data.fetch":kA,"data.inline":kT,"data.sortBy":kC,"data.sort":kN,"data.filter":kI,"data.pick":kR,"data.rename":kD,"data.fold":kF,"data.slice":kB,"data.custom":kz,"data.map":kW,"data.join":kG,"data.kde":kU,"data.log":kq,"transform.stackY":EO,"transform.binX":EK,"transform.bin":EX,"transform.dodgeX":EQ,"transform.jitter":E0,"transform.jitterX":E1,"transform.jitterY":E2,"transform.symmetryY":E3,"transform.diffY":E4,"transform.stackEnter":E6,"transform.normalizeY":E9,"transform.select":kr,"transform.selectX":ko,"transform.selectY":kl,"transform.groupX":kc,"transform.groupY":kf,"transform.groupColor":kp,"transform.group":ku,"transform.sortX":ky,"transform.sortY":kg,"transform.sortColor":km,"transform.flexX":kv,"transform.pack":kb,"transform.sample":kO,"transform.filter":kw,"coordinate.cartesian":tE,"coordinate.polar":tM,"coordinate.transpose":tS,"coordinate.theta":tP,"coordinate.parallel":tj,"coordinate.fisheye":tA,"coordinate.radial":tC,"coordinate.radar":tN,"encode.constant":tL,"encode.field":tI,"encode.transform":tR,"encode.column":tD,"mark.interval":cJ,"mark.rect":c1,"mark.line":fC,"mark.point":pw,"mark.text":p4,"mark.cell":p9,"mark.area":hc,"mark.link":hE,"mark.image":h_,"mark.polygon":hN,"mark.box":hB,"mark.vector":hW,"mark.lineX":hU,"mark.lineY":hX,"mark.connector":h0,"mark.range":h3,"mark.rangeX":h8,"mark.rangeY":dt,"mark.path":dl,"mark.shape":df,"mark.density":dy,"mark.heatmap":dk,"palette.category10":dM,"palette.category20":dS,"scale.linear":d_,"scale.ordinal":dN,"scale.band":dF,"scale.identity":dH,"scale.point":dU,"scale.time":yg,"scale.log":yE,"scale.pow":yP,"scale.sqrt":yA,"scale.threshold":yC,"scale.quantile":yL,"scale.quantize":yR,"scale.sequential":yB,"scale.constant":yW,"theme.classic":yV,"theme.classicDark":yY,"theme.academy":yK,"theme.light":yH,"theme.dark":yq,"component.axisX":mV,"component.axisY":mU,"component.legendCategory":va,"component.legendContinuous":v6,"component.legends":v8,"component.title":be,"component.sliderX":bU,"component.sliderY":bq,"component.scrollbarX":bZ,"component.scrollbarY":bQ,"animation.scaleInX":bJ,"animation.scaleOutX":b0,"animation.scaleInY":b1,"animation.scaleOutY":b2,"animation.waveIn":b5,"animation.fadeIn":b3,"animation.fadeOut":b4,"animation.zoomIn":b6,"animation.zoomOut":b8,"animation.pathIn":b9,"animation.morphing":xl,"animation.growInX":xs,"animation.growInY":xu,"interaction.elementHighlight":xH,"interaction.elementHighlightByX":xV,"interaction.elementHighlightByColor":xU,"interaction.elementSelect":xY,"interaction.elementSelectByX":xX,"interaction.elementSelectByColor":xK,"interaction.fisheye":xQ,"interaction.chartIndex":x0,"interaction.tooltip":Om,"interaction.legendFilter":OP,"interaction.legendHighlight":Oj,"interaction.brushHighlight":OR,"interaction.brushXHighlight":OF,"interaction.brushYHighlight":Oz,"interaction.brushAxisHighlight":OU,"interaction.brushFilter":OY,"interaction.brushXFilter":OX,"interaction.brushYFilter":OK,"interaction.sliderFilter":OJ,"interaction.scrollbarFilter":O1,"interaction.poptip":O6,"interaction.treemapDrillDown":wF,"composition.spaceLayer":wH,"composition.spaceFlex":wU,"composition.facetRect":w8,"composition.repeatMatrix":En,"composition.facetCircle":Eu,"composition.timingKeyframe":Ec,"labelTransform.overlapHide":kK,"labelTransform.overlapDodgeY":kQ,"labelTransform.overflowHide":kJ,"labelTransform.contrastReverse":k5}}function k4(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 k6(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i}function k8(t){return t[0]}function k9(t){return t[1]}function k7(t,e,n){var r=new Mt(null==e?k8:e,null==n?k9:n,NaN,NaN,NaN,NaN);return null==t?r:r.addAll(t)}function Mt(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 Me(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}var Mn=k7.prototype=Mt.prototype;function Mr(t){return function(){return t}}function Mi(t){return(t()-.5)*1e-6}Mn.copy=function(){var t,e,n=new Mt(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=Me(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]=Me(e));return n},Mn.add=function(t){let e=+this._x.call(null,t),n=+this._y.call(null,t);return k4(this.cover(e,n),e,n,t)},Mn.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)k4(this,a[n],l[n],t[n]);return this},Mn.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},Mn.data=function(){var t=[];return this.visit(function(e){if(!e.length)do t.push(e.data);while(e=e.next)}),t},Mn.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]]},Mn.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 k6(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 k6(y[3],g,v,a,l),new k6(y[2],i,v,g,l),new k6(y[1],g,o,a,v),new k6(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},Mn.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},Mn.removeAll=function(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this},Mn.root=function(){return this._root},Mn.size=function(){var t=0;return this.visit(function(e){if(!e.length)do++t;while(e=e.next)}),t},Mn.visit=function(t){var e,n,r,i,o,a,l=[],s=this._root;for(s&&l.push(new k6(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 k6(n,u,c,o,a)),(n=s[2])&&l.push(new k6(n,r,c,u,a)),(n=s[1])&&l.push(new k6(n,u,i,o,c)),(n=s[0])&&l.push(new k6(n,r,i,u,c))}return this},Mn.visitAfter=function(t){var e,n=[],r=[];for(this._root&&n.push(new k6(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 k6(o,a,l,c,f)),(o=i[1])&&n.push(new k6(o,c,l,s,f)),(o=i[2])&&n.push(new k6(o,a,f,c,u)),(o=i[3])&&n.push(new k6(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},Mn.x=function(t){return arguments.length?(this._x=t,this):this._x},Mn.y=function(t){return arguments.length?(this._y=t,this):this._y};var Mo={value:()=>{}};function Ma(){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 Ml(r)}function Ml(t){this._=t}function Ms(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=Mo,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}Ml.prototype=Ma.prototype={constructor:Ml,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]=Ms(r[n],t.name,e);else if(null==e)for(n in r)r[n]=Ms(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 Ml(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 Mu,Mc,Mf,Mp,Mh,Md,My,Mg,Mm,Mv,Mb,Mx,MO,Mw,ME,Mk,MM,MS,M_,MP,Mj,MA,MT,MC,MN,ML,MI,MR,MD,MF,MB,Mz,MW,M$,MG,MH,MV,MU,Mq,MY,MX,MK,MZ,MQ,MJ,M0,M1,M2,M5,M3,M4,M6,M8,M9,M7,St,Se,Sn,Sr,Si,So=0,Sa=0,Sl=0,Ss=0,Su=0,Sc=0,Sf="object"==typeof performance&&performance.now?performance:Date,Sp="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Sh(){return Su||(Sp(Sd),Su=Sf.now()+Sc)}function Sd(){Su=0}function Sy(){this._call=this._time=this._next=null}function Sg(t,e,n){var r=new Sy;return r.restart(t,e,n),r}function Sm(){Su=(Ss=Sf.now())+Sc,So=Sa=0;try{Sh(),++So;for(var t,e=Sr;e;)(t=Su-e._time)>=0&&e._call.call(void 0,t),e=e._next;--So}finally{So=0,function(){for(var t,e,n=Sr,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:Sr=e);Si=t,Sb(r)}(),Su=0}}function Sv(){var t=Sf.now(),e=t-Ss;e>1e3&&(Sc-=e,Ss=t)}function Sb(t){!So&&(Sa&&(Sa=clearTimeout(Sa)),t-Su>24?(t<1/0&&(Sa=setTimeout(Sm,t-Sf.now()-Sc)),Sl&&(Sl=clearInterval(Sl))):(Sl||(Ss=Sf.now(),Sl=setInterval(Sv,1e3)),So=1,Sp(Sm)))}function Sx(t){return t.x}function SO(t){return t.y}Sy.prototype=Sg.prototype={constructor:Sy,restart:function(t,e,n){if("function"!=typeof t)throw TypeError("callback is not a function");n=(null==n?Sh():+n)+(null==e?0:+e),this._next||Si===this||(Si?Si._next=this:Sr=this,Si=this),this._call=t,this._time=n,Sb()},stop:function(){this._call&&(this._call=null,this._time=1/0,Sb())}};var Sw=Math.PI*(3-Math.sqrt(5));function SE(t){return t.index}function Sk(t,e){var n=t.get(e);if(!n)throw Error("node not found: "+e);return n}function SM(t,e,n={},r=!1){return uf(t)||Array.isArray(t)&&r?t:tG(n,ua(t,e))}function SS(t,e={}){return uf(t)||Array.isArray(t)||!S_(t)?t:tG(e,t)}function S_(t){if(0===Object.keys(t).length)return!0;let{title:e,items:n}=t;return void 0!==e||void 0!==n}function SP(t,e){return"object"==typeof t?ua(t,e):t}var Sj=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 SA={joint:!0},ST={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}},SC={type:"point",axis:!1,legend:!1,encode:{x:"x",y:"y",size:5,color:"group",shape:"point"},style:{stroke:"#fff"}},SN={text:""},SL=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},Sj(n,["nodeKey","linkKey"])),h=ua(p,"node"),d=ua(p,"link"),{links:y,nodes:g}=cK(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=Mr(-30),a=1,l=1/0,s=.81;function u(n){var i,o=t.length,a=k7(t,Sx,SO).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=Mi(n))*f),0===p&&(d+=(p=Mi(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=Mi(n))*f),0===p&&(d+=(p=Mi(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:Mr(+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=SE,s=function(t){return 1/Math.min(i[t.source.index],i[t.target.index])},u=Mr(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||Mi(a))*p+(h=f.y+f.vy-u.y-u.vy||Mi(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=Sk(f,s.source)),"object"!=typeof s.target&&(s.target=Sk(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:Mr(+t),h(),f):s},f.distance=function(t){return arguments.length?(u="function"==typeof t?t:Mr(+t),d(),f):u},f})(i).id(cY(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=Sg(p),c=Ma("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*Sw;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=Mr(.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=Mr(null==t?0:+t)),o.initialize=function(t){e=t,a()},o.strength=function(t){return arguments.length?(i="function"==typeof t?t:Mr(+t),a(),o):i},o.x=function(e){return arguments.length?(t="function"==typeof e?e:Mr(+e),a(),o):t},o}()).force("y",function(t){var e,n,r,i=Mr(.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=Mr(null==t?0:+t)),o.initialize=function(t){e=t,a()},o.strength=function(t){return arguments.length?(i="function"==typeof t?t:Mr(+t),a(),o):i},o.y=function(e){return arguments.length?(t="function"==typeof e?e:Mr(+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},tG({},SA,o),p),x=SM(u,"link",{items:[t=>({name:"source",value:cY(f)(t.source)}),t=>({name:"target",value:cY(f)(t.target)})]}),O=SM(u,"node",{items:[t=>({name:"key",value:cY(c)(t)})]},!0);return[tG({},ST,{data:b,encode:d,labels:l,style:ua(i,"link"),tooltip:x,animate:SP(s,"link")}),tG({},SC,{data:v,encode:Object.assign({},h),scale:r,style:ua(i,"node"),tooltip:O,labels:[Object.assign(Object.assign({},SN),ua(i,"label")),...a],animate:SP(s,"link")})]};function SI(t,e){return t.parent===e.parent?1:2}function SR(t){var e=t.children;return e?e[0]:t.t}function SD(t){var e=t.children;return e?e[e.length-1]:t.t}function SF(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 SB(){var t=SI,e=1,n=1,r=null;function i(i){var s=function(t){for(var e,n,r,i,o,a=new SF(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 SF(r[i],i)),n.parent=e;return(a.parent=new SF(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=SD(u),l=SR(l),u&&l;)c=SR(c),(s=SD(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&&!SD(s)&&(s.t=u,s.m+=h-p),l&&!SR(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 Sz(t,e){return t.parent===e.parent?1:2}function SW(t,e){return t+e.x}function S$(t,e){return Math.max(t,e.y)}function SG(){var t=Sz,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(SW,0)/n.length,e.y=1+n.reduce(S$,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}SL.props={},SF.prototype=Object.create(wd.prototype);let SH=t=>e=>n=>{let{field:r="value",nodeSize:i,separation:o,sortBy:a,as:l=["x","y"]}=e,[s,u]=l,c=wu(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}},SV=t=>SH(SG)(t);SV.props={};let SU=t=>SH(SB)(t);SU.props={};let Sq={sortBy:(t,e)=>e.value-t.value},SY={axis:!1,legend:!1,type:"point",encode:{x:"x",y:"y",size:2,shape:"point"}},SX={type:"link",encode:{x:"x",y:"y",shape:"smooth"}},SK={text:"",fontSize:10},SZ=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}=SU(Object.assign(Object.assign(Object.assign({},Sq),o),{field:c}))(e),h=SM(u,"node",{title:"name",items:["value"]},!0),d=SM(u,"link",{title:"",items:[t=>({name:"source",value:t.source.name}),t=>({name:"target",value:t.target.name})]});return[tG({},SX,{data:p,encode:ua(n,"link"),scale:ua(r,"link"),labels:l,style:Object.assign({stroke:"#999"},ua(i,"link")),tooltip:d,animate:SP(s,"link")}),tG({},SY,{data:f,scale:ua(r,"node"),encode:ua(n,"node"),labels:[Object.assign(Object.assign({},SK),ua(i,"label")),...a],style:Object.assign({},ua(i,"node")),tooltip:h,animate:SP(s,"node")})]};function SQ(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 SJ(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 S0(t,e){for(var n=0;n<e.length;++n)if(!SJ(t,e[n]))return!1;return!0}function S1(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 S2(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,S=(p*v-h*g)/w,_=k*k+S*S-1,P=2*(o+E*k+M*S),j=E*E+M*M-o*o,A=-(Math.abs(_)>1e-6?(P+Math.sqrt(P*P-4*_*j))/(2*_):j/P);return{x:r+E+k*A,y:i+M+S*A,r:A}}function S5(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 S3(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 S4(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 S6(t){this._=t,this.next=null,this.previous=null}function S8(t){return Math.sqrt(t.value)}function S9(t){return function(e){e.children||(e.r=Math.max(0,+t(e)||0))}}function S7(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;S5(r,n,i=t[2]),n=new S6(n),r=new S6(r),i=new S6(i),n.next=i.previous=r,r.next=n.previous=i,i.next=r.previous=n;e:for(s=3;s<o;++s){S5(n._,r._,i=t[s]),i=new S6(i),u=r.next,c=n.previous,f=r._.r,p=n._.r;do if(f<=p){if(S3(u._,i._)){r=u,n.next=r,r.previous=n,--s;continue e}f+=u._.r,u=u.next}else{if(S3(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=S4(n);(i=i.next)!==r;)(l=S4(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&&SJ(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 S1(t[0],t[1]);case 3:return S2(t[0],t[1],t[2])}}(a=function(t,e){var n,r;if(S0(e,t))return[e];for(n=0;n<t.length;++n)if(SQ(e,t[n])&&S0(S1(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(SQ(S1(t[n],t[r]),e)&&SQ(S1(t[n],e),t[r])&&SQ(S1(t[r],e),t[n])&&S0(S2(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 _t(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)}}SZ.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 _n=(t,e)=>({size:[t,e],padding:0,sort:(t,e)=>e.value-t.value}),_r=(t,e,n)=>({type:"point",axis:!1,legend:!1,scale:{x:{domain:[0,t]},y:{domain:[0,e]},size:{type:"identity"}},encode:{x:"x",y:"y",size:"r",shape:"point"},style:{fill:n.color?void 0:t=>0===t.height?"#ddd":"#fff",stroke:n.color?void 0:t=>0===t.height?"":"#000"}}),_i={text:"",position:"inside",textOverflow:"clip",wordWrap:!0,maxLines:1,wordWrapWidth:t=>2*t.r},_o={title:t=>t.data.name,items:[{field:"value"}]},_a=(t,e,n)=>{let{value:r}=n,i=tz(t)?wx().path(e.path)(t):wu(t);return r?i.sum(t=>cY(r)(t)).sort(e.sort):i.count(),(function(){var t=null,e=1,n=1,r=wC;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(S9(t)).eachAfter(S7(r,.5,a)).eachBefore(_t(1)):i.eachBefore(S9(S8)).eachAfter(S7(wC,1,a)).eachAfter(S7(r,i.r/Math.min(e,n),a)).eachBefore(_t(Math.min(e,n)/(2*i.r))),i}return i.radius=function(e){return arguments.length?(t=wa(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:wN(+t),i):r},i})().size(e.size).padding(e.padding)(i),i.descendants()},_l=(t,e)=>{let{width:n,height:r}=e,{data:i,encode:o={},scale:a={},style:l={},layout:s={},labels:u=[],tooltip:c={}}=t,f=_e(t,["data","encode","scale","style","layout","labels","tooltip"]),p=_r(n,r,o),h=_a(i,tG({},_n(n,r),s),tG({},p.encode,o)),d=ua(l,"label");return tG({},p,Object.assign(Object.assign({data:h,encode:o,scale:a,style:l,labels:[Object.assign(Object.assign({},_i),d),...u]},f),{tooltip:SS(c,_o),axis:!1}))};function _s(t){return t.target.depth}function _u(t,e){return t.sourceLinks.length?t.depth:e-1}function _c(t){return function(){return t}}function _f(t,e){return _h(t.source,e.source)||t.index-e.index}function _p(t,e){return _h(t.target,e.target)||t.index-e.index}function _h(t,e){return t.y0-e.y0}function _d(t){return t.value}function _y(t){return t.index}function _g(t){return t.nodes}function _m(t){return t.links}function _v(t,e){let n=t.get(e);if(!n)throw Error("missing: "+e);return n}function _b({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}}_l.props={};let _x={nodeAlign:"justify",nodeWidth:.008,nodePadding:.03,nodes:t=>t.nodes,links:t=>t.links,nodeSort:void 0,linkSort:void 0,iterations:6},_O={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?dg(t.sourceLinks,_s)-1:0},justify:_u},_w=t=>e=>{let{nodeId:n,nodeSort:r,nodeAlign:i,nodeWidth:o,nodePadding:a,nodeDepth:l,nodes:s,links:u,linkSort:c,iterations:f}=Object.assign({},_x,t),p=(function(){let t,e,n,r=0,i=0,o=1,a=1,l=24,s=8,u,c=_y,f=_u,p=_g,h=_m,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=_v(r,n)),"object"!=typeof i&&(i=t.target=_v(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(EI(e.sourceLinks,_d),EI(e.targetLinks,_d)):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(dm(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(dm(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)/(dm(c,t=>t.length)-1));let p=dg(c,t=>(a-i-(t.length-1)*u)/EI(t,_d));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(_p),e.sort(_f)}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(_h),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(_h),o.length&&g(o,r)}}(c,n,r)}}(v),_b(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(_p);for(let{target:{targetLinks:e}}of t)e.sort(_f)}}return y.update=function(t){return _b(t),t},y.nodeId=function(t){return arguments.length?(c="function"==typeof t?t:_c(t),y):c},y.nodeAlign=function(t){return arguments.length?(f="function"==typeof t?t:_c(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:_c(t),y):p},y.links=function(t){return arguments.length?(h="function"==typeof t?t:_c(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(r).linkSort(c).links(u).nodes(s).nodeWidth(o).nodePadding(a).nodeDepth(l).nodeAlign(function(t){let e=typeof t;return"string"===e?_O[t]||_u:"function"===e?t:_u}(i)).iterations(f).extent([[0,0],[1,1]]);"function"==typeof n&&p.nodeId(n);let{nodes:h,links:d}=p(e);return{nodes:h.map(t=>{let{x0:e,x1:n,y0:r,y1:i}=t;return Object.assign(Object.assign({},t),{x:[e,n,n,e],y:[r,r,i,i]})}),links:d.map(t=>{let{source:e,target:n}=t,r=e.x1,i=n.x0,o=t.width/2;return Object.assign(Object.assign({},t),{x:[r,r,i,i],y:[t.y0+o,t.y0-o,t.y1+o,t.y1-o]})})}};_w.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 _k={nodeId:t=>t.key,nodeWidth:.02,nodePadding:.02},_M={type:"polygon",axis:!1,legend:!1,encode:{shape:"polygon",x:"x",y:"y"},scale:{x:{type:"identity"},y:{type:"identity"}},style:{stroke:"#000"}},_S={type:"polygon",axis:!1,legend:!1,encode:{shape:"ribbon",x:"x",y:"y"},style:{fillOpacity:.5,stroke:void 0}},__={textAlign:t=>t.x[0]<.5?"start":"end",position:t=>t.x[0]<.5?"right":"left",fontSize:10},_P=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}=cK(e,n),p=ua(n,"node"),h=ua(n,"link"),{key:d=t=>t.key,color:y=d}=p,{links:g,nodes:v}=_w(Object.assign(Object.assign(Object.assign({},_k),{nodeId:cY(d)}),o))({links:c,nodes:f}),b=ua(i,"label"),{text:x=d,spacing:O=5}=b,w=_E(b,["text","spacing"]),E=cY(d),k=SM(u,"node",{title:E,items:[{field:"value"}]},!0),M=SM(u,"link",{title:"",items:[t=>({name:"source",value:E(t.source)}),t=>({name:"target",value:E(t.target)})]});return[tG({},_M,{data:v,encode:Object.assign(Object.assign({},p),{color:y}),scale:r,style:ua(i,"node"),labels:[Object.assign(Object.assign(Object.assign({},__),{text:x,dx:t=>t.x[0]<.5?O:-O}),w),...a],tooltip:k,animate:SP(s,"node"),axis:!1}),tG({},_S,{data:g,encode:h,labels:l,style:Object.assign({fill:h.color?void 0:"#aaa",strokeWidth:0},ua(i,"link")),tooltip:M,animate:SP(s,"link")})]};function _j(t,e){return e.value-t.value}function _A(t,e){return e.frequency-t.frequency}function _T(t,e){return`${t.id}`.localeCompare(`${e.id}`)}function _C(t,e){return`${t.name}`.localeCompare(`${e.name}`)}_P.props={};let _N={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},_L=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({},_N),t);return function(t){let f=t.nodes.map(t=>Object.assign({},t)),p=t.edges.map(t=>Object.assign({},t));return function(t,e){e.forEach(t=>{t.source=a(t),t.target=l(t),t.sourceWeight=s(t),t.targetWeight=u(t)});let n=s2(e,t=>t.source),r=s2(e,t=>t.target);t.forEach(t=>{t.id=o(t);let e=n.has(t.id)?n.get(t.id):[],i=r.has(t.id)?r.get(t.id):[];t.frequency=e.length+i.length,t.value=EI(e,t=>t.sourceWeight)+EI(i,t=>t.targetWeight)})}(f,p),function(t,e){let n="function"==typeof c?c:tv[c];n&&t.sort(n)}(f,0),function(t,o){let a=t.length;if(!a)throw ur("Invalid nodes: it's empty!");if(!r){let n=1/a;return t.forEach((t,r)=>{t.x=(r+.5)*n,t.y=e})}let l=i/(2*a),s=t.reduce((t,e)=>t+=e.value,0);t.reduce((t,r)=>{r.weight=r.value/s,r.width=r.weight*(1-i),r.height=n;let o=l+t,a=o+r.width,u=e-n/2,c=u+n;return r.x=[o,a,a,o],r.y=[u,u,c,c],t+r.width+2*l},0)}(f,0),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=s2(n,t=>t.source),s=s2(n,t=>t.target);t.forEach(t=>{let{edges:e,width:n,x:r,y:i,value:a,id:l}=t,u=o.get(l)||[],c=s.get(l)||[],f=0;u.map(t=>{let e=t.sourceWeight/a*n;t.x[0]=r[0]+f,t.x[1]=r[0]+f+e,f+=e}),c.forEach(t=>{let e=t.targetWeight/a*n;t.x[3]=r[0]+f,t.x[2]=r[0]+f+e,f+=e})})}(f,p),{nodes:f,edges:p}}})(t)(e);_L.props={};var _I=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 _R={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},_D={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}},_F={type:"polygon",axis:!1,legend:!1,encode:{shape:"ribbon",x:"x",y:"y"},style:{opacity:.5,lineWidth:1,strokeWidth:1}},_B={position:"outside",fontSize:10},_z=(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}=cK(n,r),h=ua(r,"node"),d=ua(r,"link"),{key:y=t=>t.key,color:g=y}=h,{linkEncodeColor:v=t=>t.source}=d,{nodeWidthRatio:b=_R.thickness,nodePaddingRatio:x=_R.marginRatio}=a,O=_I(a,["nodeWidthRatio","nodePaddingRatio"]),{nodes:w,edges:E}=_L(Object.assign(Object.assign(Object.assign(Object.assign({},_R),{id:cY(y),thickness:b,marginRatio:x}),O),{weight:!0}))({nodes:f,edges:p}),k=ua(o,"label"),{text:M=y}=k,S=_I(k,["text"]),_=SM(c,"node",{title:"",items:[t=>({name:t.key,value:t.value})]},!0),P=SM(c,"link",{title:"",items:[t=>({name:`${t.source} -> ${t.target}`,value:t.value})]}),{height:j,width:A}=e,T=Math.min(j,A);return[tG({},_F,{data:E,encode:Object.assign(Object.assign({},d),{color:v}),labels:s,style:Object.assign({fill:v?void 0:"#aaa"},ua(o,"link")),tooltip:P,animate:SP(u,"link")}),tG({},_D,{data:w,encode:Object.assign(Object.assign({},h),{color:g}),scale:i,style:ua(o,"node"),coordinate:{type:"polar",outerRadius:(T-20)/T,startAngle:-(2*Math.PI),endAngle:0},labels:[Object.assign(Object.assign(Object.assign({},_B),{text:M}),S),...l],tooltip:_,animate:SP(u,"node"),axis:!1})]};_z.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 _$=(t,e)=>({tile:"treemapSquarify",ratio:.5*(1+Math.sqrt(5)),size:[t,e],round:!1,ignoreParentValue:!0,padding:0,paddingInner:0,paddingOuter:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0,sort:(t,e)=>e.value-t.value,layer:0}),_G=(t,e)=>({type:"rect",axis:!1,encode:{x:"x",y:"y",key:"id",color:t=>t.path[1]},scale:{x:{domain:[0,t],range:[0,1]},y:{domain:[0,e],range:[0,1]}},style:{stroke:"#fff"},state:{active:{opacity:.6},inactive:{opacity:1}}}),_H={fontSize:10,text:t=>vi(t.path),position:"inside",fill:"#000",textOverflow:"clip",wordWrap:!0,maxLines:1,wordWrapWidth:t=>t.x1-t.x0},_V={title:t=>{var e,n;return null==(n=null==(e=t.path)?void 0:e.join)?void 0:n.call(e,".")},items:[{field:"value"}]},_U={title:t=>vi(t.path),items:[{field:"value"}]},_q=(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=_W(t,["data","encode","scale","style","layout","labels","tooltip"]),h=O7(i,["interaction","treemapDrillDown"]),d=tG({},_$(n,r),u,{layer:h?t=>1===t.depth:u.layer}),[y,g]=wL(o,d,a),v=ua(s,"label");return tG({},_G(n,r),Object.assign(Object.assign({data:y,scale:l,style:s,labels:[Object.assign(Object.assign({},_H),v),...c]},p),{encode:a,tooltip:SS(f,_V),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=>vi(t.path)},a),tooltip:SS(f,_U)}:{})};function _Y(){return{"data.arc":_L,"data.cluster":SV,"mark.forceGraph":SL,"mark.tree":SZ,"mark.pack":_l,"mark.sankey":_P,"mark.chord":_z,"mark.treemap":_q}}_q.props={};var _X=t=>t;function _K(t,e){t&&_Q.hasOwnProperty(t.type)&&_Q[t.type](t,e)}var _Z={Feature:function(t,e){_K(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)_K(n[r].geometry,e)}},_Q={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){_J(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)_J(n[r],e,0)},Polygon:function(t,e){_0(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)_0(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)_K(n[r],e)}};function _J(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 _0(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)_J(t[n],e,1);e.polygonEnd()}function _1(t,e){t&&_Z.hasOwnProperty(t.type)?_Z[t.type](t,e):_K(t,e)}class _2{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 _5=Math.PI,_3=_5/2,_4=_5/4,_6=2*_5,_8=180/_5,_9=_5/180,_7=Math.abs,Pt=Math.atan,Pe=Math.atan2,Pn=Math.cos,Pr=Math.ceil,Pi=Math.exp,Po=Math.log,Pa=Math.pow,Pl=Math.sin,Ps=Math.sign||function(t){return t>0?1:t<0?-1:0},Pu=Math.sqrt,Pc=Math.tan;function Pf(t){return t>1?0:t<-1?_5:Math.acos(t)}function Pp(t){return t>1?_3:t<-1?-_3:Math.asin(t)}function Ph(){}var Pd,Py,Pg,Pm,Pv=new _2,Pb=new _2,Px={point:Ph,lineStart:Ph,lineEnd:Ph,polygonStart:function(){Px.lineStart=PO,Px.lineEnd=Pk},polygonEnd:function(){Px.lineStart=Px.lineEnd=Px.point=Ph,Pv.add(_7(Pb)),Pb=new _2},result:function(){var t=Pv/2;return Pv=new _2,t}};function PO(){Px.point=Pw}function Pw(t,e){Px.point=PE,Pd=Pg=t,Py=Pm=e}function PE(t,e){Pb.add(Pm*t-Pg*e),Pg=t,Pm=e}function Pk(){PE(Pd,Py)}var PM,PS,P_,PP,Pj=1/0,PA=1/0,PT=-1/0,PC=PT,PN={point:function(t,e){t<Pj&&(Pj=t),t>PT&&(PT=t),e<PA&&(PA=e),e>PC&&(PC=e)},lineStart:Ph,lineEnd:Ph,polygonStart:Ph,polygonEnd:Ph,result:function(){var t=[[Pj,PA],[PT,PC]];return PT=PC=-(PA=Pj=1/0),t}},PL=0,PI=0,PR=0,PD=0,PF=0,PB=0,Pz=0,PW=0,P$=0,PG={point:PH,lineStart:PV,lineEnd:PY,polygonStart:function(){PG.lineStart=PX,PG.lineEnd=PK},polygonEnd:function(){PG.point=PH,PG.lineStart=PV,PG.lineEnd=PY},result:function(){var t=P$?[Pz/P$,PW/P$]:PB?[PD/PB,PF/PB]:PR?[PL/PR,PI/PR]:[NaN,NaN];return PL=PI=PR=PD=PF=PB=Pz=PW=P$=0,t}};function PH(t,e){PL+=t,PI+=e,++PR}function PV(){PG.point=PU}function PU(t,e){PG.point=Pq,PH(P_=t,PP=e)}function Pq(t,e){var n=t-P_,r=e-PP,i=Pu(n*n+r*r);PD+=i*(P_+t)/2,PF+=i*(PP+e)/2,PB+=i,PH(P_=t,PP=e)}function PY(){PG.point=PH}function PX(){PG.point=PZ}function PK(){PQ(PM,PS)}function PZ(t,e){PG.point=PQ,PH(PM=P_=t,PS=PP=e)}function PQ(t,e){var n=t-P_,r=e-PP,i=Pu(n*n+r*r);PD+=i*(P_+t)/2,PF+=i*(PP+e)/2,PB+=i,Pz+=(i=PP*t-P_*e)*(P_+t),PW+=i*(PP+e),P$+=3*i,PH(P_=t,PP=e)}function PJ(t){this._context=t}PJ.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,_6)}},result:Ph};var P0,P1,P2,P5,P3,P4=new _2,P6={point:Ph,lineStart:function(){P6.point=P8},lineEnd:function(){P0&&P9(P1,P2),P6.point=Ph},polygonStart:function(){P0=!0},polygonEnd:function(){P0=null},result:function(){var t=+P4;return P4=new _2,t}};function P8(t,e){P6.point=P9,P1=P5=t,P2=P3=e}function P9(t,e){P5-=t,P3-=e,P4.add(Pu(P5*P5+P3*P3)),P5=t,P3=e}class P7{constructor(t){this._append=null==t?jt:function(t){let e=Math.floor(t);if(!(e>=0))throw RangeError(`invalid digits: ${t}`);if(e>15)return jt;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 jt(t){let e=1;this._+=t[0];for(let n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function je(t,e){let n=3,r=4.5,i,o;function a(t){return t&&("function"==typeof r&&o.pointRadius(+r.apply(this,arguments)),_1(t,i(o))),o.result()}return a.area=function(t){return _1(t,i(Px)),Px.result()},a.measure=function(t){return _1(t,i(P6)),P6.result()},a.bounds=function(t){return _1(t,i(PN)),PN.result()},a.centroid=function(t){return _1(t,i(PG)),PG.result()},a.projection=function(e){return arguments.length?(i=null==e?(t=null,_X):(t=e).stream,a):t},a.context=function(t){return arguments.length?(o=null==t?(e=null,new P7(n)):new PJ(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 P7(n)),a},a.projection(t).digits(n).context(e)}function jn(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 jr(t,e,n){var r=jn(t,e-1e-6,n).concat(e);return function(t){return r.map(function(e){return[t,e]})}}function ji(t,e,n){var r=jn(t,e-1e-6,n).concat(e);return function(t){return r.map(function(e){return[e,t]})}}function jo(){var t,e=[];return{point:function(e,n,r){t.push([e,n,r])},lineStart:function(){e.push(t=[])},lineEnd:Ph,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}function ja(t,e){return 1e-6>_7(t[0]-e[0])&&1e-6>_7(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 js(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(ja(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),ju(l),ju(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 ju(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 jc(t){return[Pe(t[1],t[0]),Pp(t[2])]}function jf(t){var e=t[0],n=t[1],r=Pn(n);return[r*Pn(e),r*Pl(e),Pl(n)]}function jp(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function jh(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function jd(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function jy(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function jg(t){var e=Pu(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}function jm(t){return _7(t[0])<=_5?t[0]:Ps(t[0])*((_7(t[0])+_5)%_6-_5)}function jv(t){return Array.from(function*(t){for(let e of t)yield*e}(t))}function jb(t,e,n,r){return function(i){var o,a,l,s=e(i),u=jo(),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=jm(e),r=e[1],i=Pl(r),o=[Pl(n),-Pn(n),0],a=0,l=0,s=new _2;1===i?r=_3+1e-6:-1===i&&(r=-_3-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=jm(h),y=h[1]/2+_4,g=Pl(y),v=Pn(y),b=0;b<p;++b,d=O,g=E,v=k,h=x){var x=f[b],O=jm(x),w=x[1]/2+_4,E=Pl(w),k=Pn(w),M=O-d,S=M>=0?1:-1,_=S*M,P=_>_5,j=g*E;if(s.add(Pe(j*S*Pl(_),v*k+j*Pn(_))),a+=P?M+S*_6:M,P^d>=n^O>=n){var A=jh(jf(h),jf(x));jg(A);var T=jh(o,A);jg(T);var C=(P^M>=0?-1:1)*Pp(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),js(a,jO,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(jx))}}return p}}function jx(t){return t.length>1}function jO(t,e){return((t=t.x)[0]<0?t[1]-_3-1e-6:_3-t[1])-((e=e.x)[0]<0?e[1]-_3-1e-6:_3-e[1])}var jw=jb(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?_5:-_5,y=_7(o-n);1e-6>_7(y-_5)?(t.point(n,r=(r+a)/2>0?_3:-_3),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(d,r),t.point(o,r),e=0):i!==d&&y>=_5&&(1e-6>_7(n-i)&&(n-=1e-6*i),1e-6>_7(o-d)&&(o-=1e-6*d),l=n,s=r,u=o,c=a,r=_7(h=Pl(l-u))>1e-6?Pt((Pl(s)*(p=Pn(c))*Pl(u)-Pl(c)*(f=Pn(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*_3,r.point(-_5,i),r.point(0,i),r.point(_5,i),r.point(_5,0),r.point(_5,-i),r.point(0,-i),r.point(-_5,-i),r.point(-_5,0),r.point(-_5,i);else if(_7(t[0]-e[0])>1e-6){var o=t[0]<e[0]?_5:-_5;i=n*o/2,r.point(-o,i),r.point(0,i),r.point(o,i)}else r.point(e[0],e[1])},[-_5,-_3]);function jE(t,e){e=jf(e),e[0]-=t,jg(e);var n=Pf(-e[1]);return((0>-e[2]?-n:n)+_6-1e-6)%_6}function jk(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>_7(r[0]-t)?i>0?0:3:1e-6>_7(r[0]-n)?i>0?2:1:1e-6>_7(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=jo(),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&&js(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 jM(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 jS(t,e){return _7(t)>_5&&(t-=Math.round(t/_6)*_6),[t,e]}function j_(t,e,n){return(t%=_6)?e||n?jM(jj(t),jA(e,n)):jj(t):e||n?jA(e,n):jS}function jP(t){return function(e,n){return _7(e+=t)>_5&&(e-=Math.round(e/_6)*_6),[e,n]}}function jj(t){var e=jP(t);return e.invert=jP(-t),e}function jA(t,e){var n=Pn(t),r=Pl(t),i=Pn(e),o=Pl(e);function a(t,e){var a=Pn(e),l=Pn(t)*a,s=Pl(t)*a,u=Pl(e),c=u*n+l*r;return[Pe(s*i-c*o,l*n-u*r),Pp(c*i+s*o)]}return a.invert=function(t,e){var a=Pn(e),l=Pn(t)*a,s=Pl(t)*a,u=Pl(e),c=u*i-s*o;return[Pe(s*i+u*o,l*n+c*r),Pp(c*n-l*r)]},a}function jT(t){return function(e){var n=new jC;for(var r in t)n[r]=t[r];return n.stream=e,n}}function jC(){}function jN(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),_1(n,t.stream(PN)),e(PN.result()),null!=r&&t.clipExtent(r),t}function jL(t,e,n){return jN(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 jI(t,e,n){return jL(t,[[0,0],e],n)}function jR(t,e,n){return jN(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 jD(t,e,n){return jN(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)}jS.invert=jS,jC.prototype={constructor:jC,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 jF=Pn(30*_9);function jB(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=Pu(O*O+w*w+E*E),M=Pp(E/=k),S=1e-6>_7(_7(E)-1)||1e-6>_7(o-f)?(o+f)/2:Pe(w,O),_=t(S,M),P=_[0],j=_[1],A=P-r,T=j-i,C=b*A-v*T;(C*C/x>e||_7((v*A+b*T)/x-.5)>.3||a*p+l*h+s*d<jF)&&(n(r,i,o,a,l,s,P,j,S,O/=k,w/=k,E,y,g),g.point(P,j),n(P,j,S,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,jT({point:function(t,e){t=n(t,e),this.stream.point(t[0],t[1])}}))}var jz=jT({point:function(t,e){this.stream.point(t*_9,e*_9)}});function jW(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=Pn(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 j$(t){return jG(function(){return t})()}function jG(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=jw,M=null,S=_X,_=.5;function P(t){return s(t[0]*_9,t[1]*_9)}function j(t){return(t=s.invert(t[0],t[1]))&&[t[0]*_8,t[1]*_8]}function A(){var t=jW(f,0,0,O,w,x).apply(null,e(d,y)),r=jW(f,p-t[0],h-t[1],O,w,x);return n=j_(g,v,b),l=jM(e,r),s=jM(n,l),a=jB(l,_),T()}function T(){return u=c=null,P}return P.stream=function(t){var e;return u&&c===t?u:u=jz((e=n,jT({point:function(t,n){var r=e(t,n);return this.stream.point(r[0],r[1])}}))(k(a(S(c=t)))))},P.preclip=function(t){return arguments.length?(k=t,E=void 0,T()):k},P.postclip=function(t){return arguments.length?(S=t,M=r=i=o=null,T()):S},P.clipAngle=function(t){return arguments.length?(k=+t?function(t){var e=Pn(t),n=2*_9,r=e>0,i=_7(e)>1e-6;function o(t,n){return Pn(t)*Pn(n)>e}function a(t,n,r){var i=jf(t),o=jf(n),a=[1,0,0],l=jh(i,o),s=jp(l,l),u=l[0],c=s-u*u;if(!c)return!r&&t;var f=jh(a,l),p=jy(a,e*s/c);jd(p,jy(l,-e*u/c));var h=jp(p,f),d=jp(f,f),y=h*h-d*(jp(p,p)-1);if(!(y<0)){var g=Pu(y),v=jy(f,(-h-g)/d);if(jd(v,p),v=jc(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>_7(k-_5);if(!M&&E<w&&(b=w,w=E,E=b),M||k<1e-6?M?w+E>0^v[1]<(1e-6>_7(v[0]-x)?w:E):w<=v[1]&&v[1]<=E:k>_5^(x<=v[0]&&v[0]<=O)){var S=jy(f,(-h+g)/d);return jd(S,p),[v,jc(S)]}}}function l(e,n){var i=r?t:_5-t,o=0;return e<-i?o|=1:e>i&&(o|=2),n<-i?o|=4:n>i&&(o|=8),o}return jb(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?_5:-_5),p):0;!e&&(u=s=g)&&t.lineStart(),g!==s&&(!(d=a(e,y))||ja(e,d)||ja(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&&ja(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=Pn(e),l=Pl(e),s=r*n;null==i?(i=e+r*_6,o=e-s/2):(i=jE(a,i),o=jE(a,o),(r>0?i<o:i>o)&&(i+=r*_6));for(var u,c=i;r>0?c>o:c<o;c-=s)u=jc([a,-l*Pn(c),-l*Pl(c)]),t.point(u[0],u[1])}}(o,t,n,i,e,r)},r?[0,-t]:[-_5,t-_5])}(E=t*_9):(E=null,jw),T()):E*_8},P.clipExtent=function(t){return arguments.length?(S=null==t?(M=r=i=o=null,_X):jk(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*_9,y=t[1]%360*_9,A()):[d*_8,y*_8]},P.rotate=function(t){return arguments.length?(g=t[0]%360*_9,v=t[1]%360*_9,b=t.length>2?t[2]%360*_9:0,A()):[g*_8,v*_8,b*_8]},P.angle=function(t){return arguments.length?(x=t%360*_9,A()):x*_8},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=jB(l,_=t*t),T()):Pu(_)},P.fitExtent=function(t,e){return jL(P,t,e)},P.fitSize=function(t,e){return jI(P,t,e)},P.fitWidth=function(t,e){return jR(P,t,e)},P.fitHeight=function(t,e){return jD(P,t,e)},function(){return e=t.apply(this,arguments),P.invert=e.invert&&j,A()}}function jH(t,e){return[t,e]}function jV(){return j$(jH).scale(152.63)}function jU(t){var e=0,n=_5/3,r=jG(t),i=r(e,n);return i.parallels=function(t){return arguments.length?r(e=t[0]*_9,n=t[1]*_9):[e*_8,n*_8]},i}function jq(t,e){return[t,Po(Pc((_3+e)/2))]}function jY(){return jX(jq).scale(961/_6)}function jX(t){var e,n,r,i=j$(t),o=i.center,a=i.scale,l=i.translate,s=i.clipExtent,u=null;function c(){var o=_5*a(),l=i((function(t){function e(e){return e=t(e[0]*_9,e[1]*_9),e[0]*=_8,e[1]*=_8,e}return t=j_(t[0]*_9,t[1]*_9,t.length>2?t[2]*_9:0),e.invert=function(e){return e=t.invert(e[0]*_9,e[1]*_9),e[0]*=_8,e[1]*=_8,e},e})(i.rotate()).invert([0,0]));return s(null==u?[[l[0]-o,l[1]-o],[l[0]+o,l[1]+o]]:t===jq?[[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 jK(t){return Pc((_3+t)/2)}function jZ(t,e){var n=Pn(t),r=t===e?Pl(t):Po(n/Pn(e))/Po(jK(e)/jK(t)),i=n*Pa(jK(t),r)/r;if(!r)return jq;function o(t,e){i>0?e<-_3+1e-6&&(e=-_3+1e-6):e>_3-1e-6&&(e=_3-1e-6);var n=i/Pa(jK(e),r);return[n*Pl(r*t),i-n*Pn(r*t)]}return o.invert=function(t,e){var n=i-e,o=Ps(r)*Pu(t*t+n*n),a=Pe(t,_7(n))*Ps(n);return n*r<0&&(a-=_5*Ps(t)*Ps(n)),[a/r,2*Pt(Pa(i/o,1/r))-_3]},o}function jQ(){return jU(jZ).scale(109.5).parallels([30,30])}function jJ(t){return function(e,n){var r=Pn(e),i=Pn(n),o=t(r*i);return o===1/0?[2,0]:[o*i*Pl(e),o*Pl(n)]}}function j0(t){return function(e,n){var r=Pu(e*e+n*n),i=t(r),o=Pl(i);return[Pe(e*o,r*Pn(i)),Pp(r&&n*o/r)]}}function j1(t,e){return[Pn(e)*Pl(t),Pl(e)]}function j2(){return j$(j1).scale(249.5).clipAngle(90.000001)}function j5(){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=jT({point:function(t,e){var n=x([t,e]);this.stream.point(n[0],n[1])}}),v=_X;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,_X):jk(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*_9),t=Pn(p),b()):p*_8},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 jL(x,t,e)},x.fitSize=function(t,e){return jI(x,t,e)},x.fitWidth=function(t,e){return jR(x,t,e)},x.fitHeight=function(t,e){return jD(x,t,e)},x}function j3(t,e){var n=Pn(t),r=t===e?Pl(t):(n-Pn(e))/(e-t),i=n/r+t;if(1e-6>_7(r))return jH;function o(t,e){var n=i-e,o=r*t;return[n*Pl(o),i-n*Pn(o)]}return o.invert=function(t,e){var n=i-e,o=Pe(t,_7(n))*Ps(n);return n*r<0&&(o-=_5*Ps(t)*Ps(n)),[o/r,i-Ps(r)*Pu(t*t+n*n)]},o}function j4(){return jU(j3).scale(131.154).center([0,13.9389])}function j6(t,e){return[Po(Pc((_3+e)/2)),-t]}function j8(){var t=jX(j6),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)}jH.invert=jH,jq.invert=function(t,e){return[t,2*Pt(Pi(e))-_3]},j1.invert=j0(Pp),j6.invert=function(t,e){return[-e,2*Pt(Pi(t))-_3]};var j9=jJ(function(t){return Pu(2/(1+t))});function j7(){return j$(j9).scale(124.75).clipAngle(179.999)}j9.invert=j0(function(t){return 2*Pp(t/2)});var At=Pu(3)/2;function Ae(t,e){var n=Pp(At*Pl(e)),r=n*n,i=r*r*r;return[t*Pn(n)/(At*(1.340264+-.24331799999999998*r+i*(.0062510000000000005+.034164*r))),n*(1.340264+-.081106*r+i*(893e-6+.003796*r))]}function An(){return j$(Ae).scale(177.158)}Ae.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>_7(n)));++l);return[At*t*(1.340264+-.24331799999999998*o+a*(.0062510000000000005+.034164*o))/Pn(i),Pp(Pl(i)/At)]};var Ar=jJ(function(t){return(t=Pf(t))&&t/Pl(t)});function Ai(){return j$(Ar).scale(79.4188).clipAngle(179.999)}function Ao(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 Aa(){return j$(Ao).scale(175.295)}function Al(t,e){var n=Pn(e),r=Pn(t)*n;return[n*Pl(t)/r,Pl(e)/r]}function As(){return j$(Al).scale(144.049).clipAngle(60)}function Au(t,e){var n=Pl(t),r=(n+Pl(e))/2;if(1e-6>_7(r)){var i=Pn(t);function o(t,e){return[t*i,Pl(e)/i]}return o.invert=function(t,e){return[t/i,Pp(e*i)]},o}var a=1+n*(2*r-n),l=Pu(a)/r;function s(t,e){var n=Pu(a-2*r*Pl(e))/r;return[n*Pl(t*=r),l-n*Pn(t)]}return s.invert=function(t,e){var n=l-e,i=Pe(t,_7(n))*Ps(n);return n*r<0&&(i-=_5*Ps(t)*Ps(n)),[i/r,Pp((a-(t*t+n*n)*r*r)/(2*r))]},s}function Ac(){return jU(Au).scale(155.424).center([0,33.6442])}function Af(){return Ac().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function Ap(){var t,e,n,r,i,o,a=Af(),l=Ac().rotate([154,0]).center([-2,58.5]).parallels([55,65]),s=Ac().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 jL(c,t,e)},c.fitSize=function(t,e){return jI(c,t,e)},c.fitWidth=function(t,e){return jR(c,t,e)},c.fitHeight=function(t,e){return jD(c,t,e)},c.scale(1070)}function Ah(t,e){var n=Pn(e),r=1+Pn(t)*n;return[n*Pl(t)/r,Pl(e)/r]}function Ad(){return j$(Ah).scale(250).clipAngle(142)}Ar.invert=j0(function(t){return t}),Ao.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(_7(n)>1e-6&&--i>0);return[t/(.8707+(o=r*r)*(-.131979+o*(-.013791+o*o*o*(.003971-.001529*o)))),r]},Al.invert=j0(Pt),Ah.invert=j0(function(t){return 2*Pt(t)});var Ay=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 jn(Pr(r/d)*d,n,d).map(c).concat(jn(Pr(l/y)*y,a,y).map(f)).concat(jn(Pr(e/p)*p,t,p).filter(function(t){return _7(t%d)>1e-6}).map(s)).concat(jn(Pr(o/h)*h,i,h).filter(function(t){return _7(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=jr(o,i,90),u=ji(e,t,g),c=jr(l,a,90),f=ji(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 Am(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=Ay(r,["type"]),a=function(t){if("function"==typeof t)return t;let e=tb[`geo${md(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)=>{let s=a();var u,c=s,f=l,p={x:t,y:n,width:r,height:i},h=o;let{outline:d=(()=>{let t=f.filter(Am);return t.find(t=>t.sphere)?{type:"Sphere"}:{type:"FeatureCollection",features:t.filter(t=>!t.sphere).flatMap(t=>t.data.value).flatMap(t=>(function(t){if(!t||!t.type)return null;let e={Point:"geometry",MultiPoint:"geometry",LineString:"geometry",MultiLineString:"geometry",Polygon:"geometry",MultiPolygon:"geometry",GeometryCollection:"geometry",Feature:"feature",FeatureCollection:"featureCollection"}[t.type];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)}})()}=h,{size:y="fitExtent"}=h;for(let[t,e]of("fitExtent"===y?function(t,e,n){let{x:r,y:i,width:o,height:a}=n;t.fitExtent([[r,i],[o,a]],e)}(c,d,p):"fitWidth"===y&&function(t,e,n){let{width:r,height:i}=n,[[o,a],[l,s]]=je(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)}(c,d,p),Object.entries(o)))null==(u=s[t])||u.call(s,e);e=je(s);let g=new u7({domain:[t,t+r]}),v=new u7({domain:[n,n+i]}),b=t=>{let e=s(t);if(!e)return[null,null];let[n,r]=e;return[g.map(n),v.map(r)]},x=t=>{if(!t)return null;let[e,n]=t,r=[g.invert(e),v.invert(n)];return s.invert(r)};return{transform:t=>b(t),untransform:t=>x(t)}}]]}},children:l.flatMap(t=>Am(t)?function(t){let{style:n,tooltip:r={}}=t;return Object.assign(Object.assign({},t),{type:"path",tooltip:SS(r,{title:"id",items:[{channel:"color"}]}),style:Object.assign(Object.assign({},n),{d:t=>e(t)||[]})})}(t):t)})]};Av.props={};var Ab=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 Ax=()=>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"},Ab(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 AO(){return{"composition.geoView":Av,"composition.geoPath":Ax}}Ax.props={};var Aw=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 AE(t,e){return dg(t,t=>e[t])}function Ak(t,e){return dm(t,t=>e[t])}function AM(t,e){let n=2.5*AS(t,e)-1.5*AP(t,e);return dg(t,t=>e[t]>=n?e[t]:NaN)}function AS(t,e){return EL(t,.25,t=>e[t])}function A_(t,e){return EL(t,.5,t=>e[t])}function AP(t,e){return EL(t,.75,t=>e[t])}function Aj(t,e){let n=2.5*AP(t,e)-1.5*AS(t,e);return dm(t,t=>e[t]<=n?e[t]:NaN)}function AA(){return(t,e)=>{let{encode:n}=e,{y:r,x:i}=n,{value:o}=r,{value:a}=i;return[Array.from(s2(t,t=>a[+t]).values()).flatMap(t=>{let e=AM(t,o),n=Aj(t,o);return t.filter(t=>o[t]<e||o[t]>n)}),e]}}let AT=t=>{let{data:e,encode:n,style:r={},tooltip:i={},transform:o,animate:a}=t,l=Aw(t,["data","encode","style","tooltip","transform","animate"]),{point:s=!0}=r,u=Aw(r,["point"]),{y:c}=n,f={y:c,y1:c,y2:c,y3:c,y4:c},p={y1:AS,y2:A_,y3:AP},h=SM(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=SM(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:AE},p),{y4:Ak})],encode:Object.assign(Object.assign({},n),f),style:u,tooltip:h},l);let y=ua(u,"box"),g=ua(u,"point");return[Object.assign({type:"box",data:e,transform:[Object.assign(Object.assign({type:"groupX",y:AM},p),{y4:Aj})],encode:Object.assign(Object.assign({},n),f),style:y,tooltip:h,animate:SP(a,"box")},l),{type:"point",data:e,transform:[{type:AA}],encode:n,style:Object.assign({},g),tooltip:d,animate:SP(a,"point")}]};AT.props={};var AC=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 AN={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"]}}},AL={style:{shape:(t,e)=>{let{shape:n,radius:r}=t,i=AC(t,["shape","radius"]),o=ua(i,"pointer"),a=ua(i,"pin"),{shape:l}=o,s=AC(o,["shape"]),{shape:u}=a,c=AC(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=tC({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]=ch(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=up(new lT);return uf(l)||("function"==typeof l?M.append(()=>l(v,e,d,p)):M.append("line").call(ca,E).node()),uf(u)||("function"==typeof u?M.append(()=>u(v,e,d,p)):M.append("circle").call(ca,k).node()),M.node()}},lineWidth:4,pointerLineCap:"round",pinR:10,pinFill:"#fff",radius:.6}},AI={type:"text",style:{x:"50%",y:"60%",textAlign:"center",textBaseline:"middle",fontSize:20,fontWeight:800,fill:"#888"}},AR=t=>{var e;let{data:n={},scale:r={},style:i={},animate:o={},transform:a=[]}=t,l=AC(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(ct(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=ua(i,"text"),d=(e=["pointer","pin"],Object.fromEntries(Object.entries(i).filter(([t])=>e.find(e=>t.startsWith(e)))));return[tG({},AN,Object.assign({type:"interval",transform:[{type:"stackY"}],data:u,scale:p,style:ua(i,"arc"),animate:"object"==typeof o?ua(o,"arc"):o},l)),tG({},AN,AL,Object.assign({type:"point",data:s,scale:p,style:d,animate:"object"==typeof o?ua(o,"indicator"):o},l)),tG({},AI,{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?ua(o,"text"):o})]};AR.props={};let AD=Math.PI/180;function AF(t){return t.text}function AB(){return"serif"}function Az(){return"normal"}function AW(t){return t.value}function A$(){return 90*~~(2*Math.random())}function AG(){return 1}function AH(){}function AV(t){let e=t[0]/t[1];return function(t){return[e*(t*=.1)*Math.cos(t),t*Math.sin(t)]}}function AU(t){let e=[],n=-1;for(;++n<t;)e[n]=0;return e}function Aq(t){return"function"==typeof t?t:function(){return t}}let AY={archimedean:AV,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 AX=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 AK={size:[500,500],fontSize:[14,28]};function AZ(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 AQ=t=>e=>{var n,r,i,o;return n=void 0,r=void 0,i=void 0,o=function*(){let n=Object.assign({},AK,t),r=function(){let t=[256,256],e=AF,n=AB,r=AW,i=Az,o=A$,a=AG,l=AV,s=Math.random,u=AH,c=[],f=null,p=1/0,h={};return h.start=function(){let[d,y]=t,g=function(t){t.width=t.height=1;let e=Math.sqrt(t.getContext("2d").getImageData(0,0,1,1).data.length>>2);t.width=2048/e,t.height=2048/e;let n=t.getContext("2d");return n.fillStyle=n.strokeStyle="red",n.textAlign="center",{context:n,ratio:e}}(document.createElement("canvas")),v=h.board?h.board:AU((t[0]>>5)*t[1]),b=c.length,x=[],O=c.map(function(t,l,s){return t.text=e.call(this,t,l,s),t.font=n.call(this,t,l,s),t.style=Az.call(this,t,l,s),t.weight=i.call(this,t,l,s),t.rotate=o.call(this,t,l,s),t.size=~~r.call(this,t,l,s),t.padding=a.call(this,t,l,s),t}).sort(function(t,e){return e.size-t.size}),w=-1,E=h.board?[{x:0,y:0},{x:d,y:y}]:void 0;function k(){let e=Date.now();for(;Date.now()-e<p&&++w<b;){let e=O[w];e.x=d*(s()+.5)>>1,e.y=y*(s()+.5)>>1,function(t,e,n,r){if(e.sprite)return;let i=t.context,o=t.ratio;i.clearRect(0,0,2048/o,2048/o);let a=0,l=0,s=0,u=n.length;for(--r;++r<u;){e=n[r],i.save(),i.font=e.style+" "+e.weight+" "+~~((e.size+1)/o)+"px "+e.font;let t=i.measureText(e.text+"m").width*o,u=e.size<<1;if(e.rotate){let n=Math.sin(e.rotate*AD),r=Math.cos(e.rotate*AD),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*AD),i.fillText(e.text,0,0),e.padding&&(i.lineWidth=2*e.padding,i.strokeText(e.text,0,0)),i.restore(),e.width=t,e.height=u,e.xoff=a,e.yoff=l,e.x1=t>>1,e.y1=u>>1,e.x0=-e.x1,e.y0=-e.y1,e.hasText=!0,a+=t}let c=i.getImageData(0,0,2048/o,2048/o).data,f=[];for(;--r>=0;){if(!(e=n[r]).hasText)continue;let t=e.width,i=t>>5,o=e.y1-e.y0;for(let t=0;t<o*i;t++)f[t]=0;if(null==(a=e.xoff))return;l=e.yoff;let s=0,u=-1;for(let n=0;n<o;n++){for(let e=0;e<t;e++){let t=i*n+(e>>5),r=c[(l+n)*2048+(a+e)<<2]?1<<31-e%32:0;f[t]|=r,s|=r}s?u=n:(e.y0++,o--,n--,l++)}e.y1=e.y0+u,e.sprite=f.slice(0,(e.y1-e.y0)*i)}}(g,e,O,w),e.hasText&&function(e,n,r){let i=n.x,o=n.y,a=Math.sqrt(t[0]*t[0]+t[1]*t[1]),u=l(t),c=.5>s()?1:-1,f,p=-c,h,d;for(;(f=u(p+=c))&&!(Math.min(Math.abs(h=~~f[0]),Math.abs(d=~~f[1]))>=a);){;if((n.x=i+h,n.y=o+d,!(n.x+n.x0<0)&&!(n.y+n.y0<0)&&!(n.x+n.x1>t[0])&&!(n.y+n.y1>t[1]))&&(!r||!function(t,e,n){n>>=5;let r=t.sprite,i=t.width>>5,o=t.x-(i<<4),a=127&o,l=32-a,s=t.y1-t.y0,u=(t.y+t.y0)*n+(o>>5),c;for(let t=0;t<s;t++){c=0;for(let n=0;n<=i;n++)if((c<<l|(n<i?(c=r[t*i+n])>>>a:0))&e[u+n])return!0;u+=n}return!1}(n,e,t[0]))&&(!r||n.x+n.x1>r[0].x&&n.x+n.x0<r[1].x&&n.y+n.y1>r[0].y&&n.y+n.y0<r[1].y)){let r=n.sprite,i=n.width>>5,o=t[0]>>5,a=n.x-(i<<4),l=127&a,s=32-l,u=n.y1-n.y0,c,f=(n.y+n.y0)*o+(a>>5);for(let t=0;t<u;t++){c=0;for(let n=0;n<=i;n++)e[f+n]|=c<<s|(n<i?(c=r[t*i+n])>>>l:0);f+=o}return delete n.sprite,!0}}return!1}(v,e,E)&&(u.call(null,"word",{cloud:h,word:e}),x.push(e),E?h.hasImage||function(t,e){let n=t[0],r=t[1];e.x+e.x0<n.x&&(n.x=e.x+e.x0),e.y+e.y0<n.y&&(n.y=e.y+e.y0),e.x+e.x1>r.x&&(r.x=e.x+e.x1),e.y+e.y1>r.y&&(r.y=e.y+e.y1)}(E,e):E=[{x:e.x+e.x0,y:e.y+e.y0},{x:e.x+e.x1,y:e.y+e.y1}],e.x-=t[0]>>1,e.y-=t[1]>>1)}h._tags=x,h._bounds=E,w>=b&&(h.stop(),u.call(null,"end",{cloud:h,words:x,bounds:E}))}return f&&clearInterval(f),f=setInterval(k,0),k(),h},h.stop=function(){return f&&(clearInterval(f),f=null),h},h.createMask=e=>{let n=document.createElement("canvas"),[r,i]=t;if(!r||!i)return;let o=r>>5,a=AU((r>>5)*i);n.width=r,n.height=i;let l=n.getContext("2d");l.drawImage(e,0,0,e.width,e.height,0,0,r,i);let s=l.getImageData(0,0,r,i).data;for(let t=0;t<i;t++)for(let e=0;e<r;e++){let n=o*t+(e>>5),i=t*r+e<<2,l=s[i]>=250&&s[i+1]>=250&&s[i+2]>=250?1<<31-e%32:0;a[n]|=l}h.board=a,h.hasImage=!0},h.timeInterval=function(t){p=null==t?1/0:t},h.words=function(t){c=t},h.size=function(e=[]){t=[+e[0],+e[1]]},h.text=function(t){e=Aq(t)},h.font=function(t){n=Aq(t)},h.fontWeight=function(t){i=Aq(t)},h.rotate=function(t){o=Aq(t)},h.spiral=function(t){l=AY[t]||t},h.fontSize=function(t){r=Aq(t)},h.padding=function(t){a=Aq(t)},h.random=function(t){s=Aq(t)},h.on=function(t){u=Aq(t)},h}();yield({set(t,e,i){if(void 0===n[t])return this;let o=e?e.call(null,n[t]):n[t];return i?i.call(null,o):"function"==typeof r[t]?r[t](o):r[t]=o,this},setAsync(t,e,i){var o,a,l,s;return o=this,a=void 0,l=void 0,s=function*(){if(void 0===n[t])return this;let o=e?yield e.call(null,n[t]):n[t];return i?i.call(null,o):"function"==typeof r[t]?r[t](o):r[t]=o,this},new(l||(l=Promise))(function(t,e){function n(t){try{i(s.next(t))}catch(t){e(t)}}function r(t){try{i(s.throw(t))}catch(t){e(t)}}function i(e){var i;e.done?t(e.value):((i=e.value)instanceof l?i:new l(function(t){t(i)})).then(n,r)}i((s=s.apply(o,a||[])).next())})}}).set("fontSize",t=>{let n=e.map(t=>t.value);var r=[dg(n),dm(n)];if("function"==typeof t)return t;if(Array.isArray(t)){let[e,n]=t;if(!r)return()=>(n+e)/2;let[i,o]=r;return o===i?()=>(n+e)/2:({value:t})=>(n-e)/(o-i)*(t-i)+e}return()=>t}).set("font").set("fontStyle").set("fontWeight").set("padding").set("rotate").set("size").set("spiral").set("timeInterval").set("random").set("text").set("on").setAsync("imageMask",AZ,r.createMask),r.words([...e]);let i=r.start(),[o,a]=n.size,l=[{x:0,y:0},{x:o,y:a}],{_bounds:s=l,_tags:u,hasImage:c}=i,f=u.map(t=>{var{x:e,y:n}=t;return Object.assign(Object.assign({},AX(t,["x","y"])),{x:e+o/2,y:n+a/2})}),[{x:p,y:h},{x:d,y:y}]=s,g={text:"",value:0,opacity:0,fontSize:0};return f.push(Object.assign(Object.assign({},g),{x:c?0:p,y:c?0:h}),Object.assign(Object.assign({},g),{x:c?o:d,y:c?a:y})),f},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())})};AQ.props={};var AJ=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 A0=(t,e)=>({size:[t,e]}),A1=(t,e)=>({axis:!1,type:"text",encode:{x:"x",y:"y",text:"text",rotate:"rotate",fontSize:"size"},scale:{x:{domain:[0,t],range:[0,1]},y:{domain:[0,e],range:[0,1]},fontSize:{type:"identity"},rotate:{type:"identity"}},style:{textAlign:"center"}}),A2=(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=AJ(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 AQ(Object.assign(Object.assign({},A0(n,r)),s))(c);return tG({},A1(n,r),Object.assign(Object.assign({data:f,encode:o,scale:a,style:l},u),{axis:!1}))},new(i||(i=Promise))(function(t,e){function a(t){try{s(o.next(t))}catch(t){e(t)}}function l(t){try{s(o.throw(t))}catch(t){e(t)}}function s(e){var n;e.done?t(e.value):((n=e.value)instanceof i?n:new i(function(t){t(n)})).then(a,l)}s((o=o.apply(n,r||[])).next())})};A2.props={};let A5={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
20
|
M ${c} ${f}
|
|
21
21
|
A ${o} ${o} 0 1 1 ${c+2*u} ${f}
|
|
22
22
|
Q ${t} ${p} ${t} ${e+i/2}
|