ngx-relationship-visualiser 1.0.4 → 1.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/docs/main.js CHANGED
@@ -1 +1 @@
1
- (self.webpackChunkngx_relationship_visualiser=self.webpackChunkngx_relationship_visualiser||[]).push([[792],{1060:(Se,Je,B)=>{Se.exports={graphlib:B(688),layout:B(7772),debug:B(6639),util:{time:B(1178).time,notime:B(1178).notime},version:B(9836)}},9012:(Se,Je,B)=>{"use strict";let le=B(6701),J=B(1178).uniqueId;Se.exports={run:function $(L){("greedy"===L.graph().acyclicer?le(L,function k(x){return A=>x.edge(A).weight}(L)):function q(L){let S=[],k={},x={};return L.nodes().forEach(function A(j){Object.hasOwn(x,j)||(x[j]=!0,k[j]=!0,L.outEdges(j).forEach(V=>{Object.hasOwn(k,V.w)?S.push(V):A(V.w)}),delete k[j])}),S}(L)).forEach(x=>{let A=L.edge(x);L.removeEdge(x),A.forwardName=x.name,A.reversed=!0,L.setEdge(x.w,x.v,A,J("rev"))})},undo:function P(L){L.edges().forEach(S=>{let k=L.edge(S);if(k.reversed){L.removeEdge(S);let x=k.forwardName;delete k.reversed,delete k.forwardName,L.setEdge(S.w,S.v,k,x)}})}}},8097:(Se,Je,B)=>{let le=B(1178);function $(q,P,L,S,k,x){let j=k[P][x-1],V=le.addDummyNode(q,"border",{width:0,height:0,rank:x,borderType:P},L);k[P][x]=V,q.setParent(V,S),j&&q.setEdge(j,V,{weight:1})}Se.exports=function J(q){q.children().forEach(function P(L){let S=q.children(L),k=q.node(L);if(S.length&&S.forEach(P),Object.hasOwn(k,"minRank")){k.borderLeft=[],k.borderRight=[];for(let x=k.minRank,A=k.maxRank+1;x<A;++x)$(q,"borderLeft","_bl",L,k,x),$(q,"borderRight","_br",L,k,x)}})}},6392:Se=>{"use strict";function le(S){S.nodes().forEach(k=>J(S.node(k))),S.edges().forEach(k=>J(S.edge(k)))}function J(S){let k=S.width;S.width=S.height,S.height=k}function q(S){S.y=-S.y}function L(S){let k=S.x;S.x=S.y,S.y=k}Se.exports={adjust:function Je(S){let k=S.graph().rankdir.toLowerCase();("lr"===k||"rl"===k)&&le(S)},undo:function B(S){let k=S.graph().rankdir.toLowerCase();("bt"===k||"rl"===k)&&function $(S){S.nodes().forEach(k=>q(S.node(k))),S.edges().forEach(k=>{let x=S.edge(k);x.points.forEach(q),Object.hasOwn(x,"y")&&q(x)})}(S),("lr"===k||"rl"===k)&&(function P(S){S.nodes().forEach(k=>L(S.node(k))),S.edges().forEach(k=>{let x=S.edge(k);x.points.forEach(L),Object.hasOwn(x,"x")&&L(x)})}(S),le(S))}}},7789:Se=>{function B(J){J._prev._next=J._next,J._next._prev=J._prev,delete J._next,delete J._prev}function le(J,$){if("_next"!==J&&"_prev"!==J)return $}Se.exports=class Je{constructor(){let $={};$._next=$._prev=$,this._sentinel=$}dequeue(){let $=this._sentinel,q=$._prev;if(q!==$)return B(q),q}enqueue($){let q=this._sentinel;$._prev&&$._next&&B($),$._next=q._next,q._next._prev=$,q._next=$,$._prev=q}toString(){let $=[],q=this._sentinel,P=q._prev;for(;P!==q;)$.push(JSON.stringify(P,le)),P=P._prev;return"["+$.join(", ")+"]"}}},6639:(Se,Je,B)=>{let le=B(1178),J=B(688).Graph;Se.exports={debugOrdering:function $(q){let P=le.buildLayerMatrix(q),L=new J({compound:!0,multigraph:!0}).setGraph({});return q.nodes().forEach(S=>{L.setNode(S,{label:S}),L.setParent(S,"layer"+q.node(S).rank)}),q.edges().forEach(S=>L.setEdge(S.v,S.w,{},S.name)),P.forEach((S,k)=>{L.setNode("layer"+k,{rank:"same"}),S.reduce((A,j)=>(L.setEdge(A,j,{style:"invis"}),j))}),L}}},6701:(Se,Je,B)=>{let le=B(688).Graph,J=B(7789);Se.exports=function q(A,j){if(A.nodeCount()<=1)return[];let V=function S(A,j){let V=new le,ge=0,ye=0;A.nodes().forEach(Ee=>{V.setNode(Ee,{v:Ee,in:0,out:0})}),A.edges().forEach(Ee=>{let Pe=V.edge(Ee.v,Ee.w)||0,he=j(Ee);V.setEdge(Ee.v,Ee.w,Pe+he),ye=Math.max(ye,V.node(Ee.v).out+=he),ge=Math.max(ge,V.node(Ee.w).in+=he)});let Ie=function x(A){const j=[];for(let V=0;V<A;V++)j.push(V);return j}(ye+ge+3).map(()=>new J),et=ge+1;return V.nodes().forEach(Ee=>{k(Ie,et,V.node(Ee))}),{graph:V,buckets:Ie,zeroIdx:et}}(A,j||$);return function P(A,j,V){let et,ge=[],ye=j[j.length-1],Ie=j[0];for(;A.nodeCount();){for(;et=Ie.dequeue();)L(A,j,V,et);for(;et=ye.dequeue();)L(A,j,V,et);if(A.nodeCount())for(let Ee=j.length-2;Ee>0;--Ee)if(et=j[Ee].dequeue(),et){ge=ge.concat(L(A,j,V,et,!0));break}}return ge}(V.graph,V.buckets,V.zeroIdx).flatMap(ye=>A.outEdges(ye.v,ye.w))};let $=()=>1;function L(A,j,V,ge,ye){let Ie=ye?[]:void 0;return A.inEdges(ge.v).forEach(et=>{let Ee=A.edge(et),Pe=A.node(et.v);ye&&Ie.push({v:et.v,w:et.w}),Pe.out-=Ee,k(j,V,Pe)}),A.outEdges(ge.v).forEach(et=>{let Ee=A.edge(et),he=A.node(et.w);he.in-=Ee,k(j,V,he)}),A.removeNode(ge.v),Ie}function k(A,j,V){V.out?V.in?A[V.out-V.in+j].enqueue(V):A[A.length-1].enqueue(V):A[0].enqueue(V)}},7772:(Se,Je,B)=>{"use strict";let le=B(9012),J=B(1939),$=B(5779),q=B(1178).normalizeRanks,P=B(930),L=B(1178).removeEmptyRanks,S=B(3259),k=B(8097),x=B(6392),A=B(4507),j=B(3110),V=B(1178),ge=B(688).Graph;Se.exports=function ye(ve,Me){let ae=Me&&Me.debugTiming?V.time:V.notime;ae("layout",()=>{let Xe=ae(" buildLayoutGraph",()=>function se(ve){let Me=new ge({multigraph:!0,compound:!0}),ae=Ei(ve.graph());return Me.setGraph(Object.assign({},Pe,si(ae,Ee),V.pick(ae,he))),ve.nodes().forEach(Xe=>{const ot=si(Ei(ve.node(Xe)),_e);Object.keys(Ne).forEach(en=>{void 0===ot[en]&&(ot[en]=Ne[en])}),Me.setNode(Xe,ot),Me.setParent(Xe,ve.parent(Xe))}),ve.edges().forEach(Xe=>{let It=Ei(ve.edge(Xe));Me.setEdge(Xe,Object.assign({},ze,si(It,$e),V.pick(It,it)))}),Me}(ve));ae(" runLayout",()=>function Ie(ve,Me,ae){Me(" makeSpaceForEdgeLabels",()=>function pe(ve){let Me=ve.graph();Me.ranksep/=2,ve.edges().forEach(ae=>{let Xe=ve.edge(ae);Xe.minlen*=2,"c"!==Xe.labelpos.toLowerCase()&&("TB"===Me.rankdir||"BT"===Me.rankdir?Xe.width+=Xe.labeloffset:Xe.height+=Xe.labeloffset)})}(ve)),Me(" removeSelfEdges",()=>function za(ve){ve.edges().forEach(Me=>{if(Me.v===Me.w){var ae=ve.node(Me.v);ae.selfEdges||(ae.selfEdges=[]),ae.selfEdges.push({e:Me,label:ve.edge(Me)}),ve.removeEdge(Me)}})}(ve)),Me(" acyclic",()=>le.run(ve)),Me(" nestingGraph.run",()=>S.run(ve)),Me(" rank",()=>$(V.asNonCompoundGraph(ve))),Me(" injectEdgeLabelProxies",()=>function De(ve){ve.edges().forEach(Me=>{let ae=ve.edge(Me);if(ae.width&&ae.height){let Xe=ve.node(Me.v),ot={rank:(ve.node(Me.w).rank-Xe.rank)/2+Xe.rank,e:Me};V.addDummyNode(ve,"edge-proxy",ot,"_ep")}})}(ve)),Me(" removeEmptyRanks",()=>L(ve)),Me(" nestingGraph.cleanup",()=>S.cleanup(ve)),Me(" normalizeRanks",()=>q(ve)),Me(" assignRankMinMax",()=>function xe(ve){let Me=0;ve.nodes().forEach(ae=>{let Xe=ve.node(ae);Xe.borderTop&&(Xe.minRank=ve.node(Xe.borderTop).rank,Xe.maxRank=ve.node(Xe.borderBottom).rank,Me=Math.max(Me,Xe.maxRank))}),ve.graph().maxRank=Me}(ve)),Me(" removeEdgeLabelProxies",()=>function Oe(ve){ve.nodes().forEach(Me=>{let ae=ve.node(Me);"edge-proxy"===ae.dummy&&(ve.edge(ae.e).labelRank=ae.rank,ve.removeNode(Me))})}(ve)),Me(" normalize.run",()=>J.run(ve)),Me(" parentDummyChains",()=>P(ve)),Me(" addBorderSegments",()=>k(ve)),Me(" order",()=>A(ve,ae)),Me(" insertSelfEdges",()=>function Di(ve){V.buildLayerMatrix(ve).forEach(ae=>{var Xe=0;ae.forEach((It,ot)=>{var en=ve.node(It);en.order=ot+Xe,(en.selfEdges||[]).forEach(rr=>{V.addDummyNode(ve,"selfedge",{width:rr.label.width,height:rr.label.height,rank:en.rank,order:ot+ ++Xe,e:rr.e,label:rr.label},"_se")}),delete en.selfEdges})})}(ve)),Me(" adjustCoordinateSystem",()=>x.adjust(ve)),Me(" position",()=>j(ve)),Me(" positionSelfEdges",()=>function Ga(ve){ve.nodes().forEach(Me=>{var ae=ve.node(Me);if("selfedge"===ae.dummy){var Xe=ve.node(ae.e.v),It=Xe.x+Xe.width/2,ot=Xe.y,en=ae.x-It,rr=Xe.height/2;ve.setEdge(ae.e,ae.label),ve.removeNode(Me),ae.label.points=[{x:It+2*en/3,y:ot-rr},{x:It+5*en/6,y:ot-rr},{x:It+en,y:ot},{x:It+5*en/6,y:ot+rr},{x:It+2*en/3,y:ot+rr}],ae.label.x=ae.x,ae.label.y=ae.y}})}(ve)),Me(" removeBorderNodes",()=>function Wr(ve){ve.nodes().forEach(Me=>{if(ve.children(Me).length){let ae=ve.node(Me),Xe=ve.node(ae.borderTop),It=ve.node(ae.borderBottom),ot=ve.node(ae.borderLeft[ae.borderLeft.length-1]),en=ve.node(ae.borderRight[ae.borderRight.length-1]);ae.width=Math.abs(en.x-ot.x),ae.height=Math.abs(It.y-Xe.y),ae.x=ot.x+ae.width/2,ae.y=Xe.y+ae.height/2}}),ve.nodes().forEach(Me=>{"border"===ve.node(Me).dummy&&ve.removeNode(Me)})}(ve)),Me(" normalize.undo",()=>J.undo(ve)),Me(" fixupEdgeLabelCoords",()=>function zt(ve){ve.edges().forEach(Me=>{let ae=ve.edge(Me);if(Object.hasOwn(ae,"x"))switch(("l"===ae.labelpos||"r"===ae.labelpos)&&(ae.width-=ae.labeloffset),ae.labelpos){case"l":ae.x-=ae.width/2+ae.labeloffset;break;case"r":ae.x+=ae.width/2+ae.labeloffset}})}(ve)),Me(" undoCoordinateSystem",()=>x.undo(ve)),Me(" translateGraph",()=>function pt(ve){let Me=Number.POSITIVE_INFINITY,ae=0,Xe=Number.POSITIVE_INFINITY,It=0,ot=ve.graph(),en=ot.marginx||0,rr=ot.marginy||0;function ai(wr){let Vn=wr.x,Ci=wr.y,ar=wr.width,ui=wr.height;Me=Math.min(Me,Vn-ar/2),ae=Math.max(ae,Vn+ar/2),Xe=Math.min(Xe,Ci-ui/2),It=Math.max(It,Ci+ui/2)}ve.nodes().forEach(wr=>ai(ve.node(wr))),ve.edges().forEach(wr=>{let Vn=ve.edge(wr);Object.hasOwn(Vn,"x")&&ai(Vn)}),Me-=en,Xe-=rr,ve.nodes().forEach(wr=>{let Vn=ve.node(wr);Vn.x-=Me,Vn.y-=Xe}),ve.edges().forEach(wr=>{let Vn=ve.edge(wr);Vn.points.forEach(Ci=>{Ci.x-=Me,Ci.y-=Xe}),Object.hasOwn(Vn,"x")&&(Vn.x-=Me),Object.hasOwn(Vn,"y")&&(Vn.y-=Xe)}),ot.width=ae-Me+en,ot.height=It-Xe+rr}(ve)),Me(" assignNodeIntersects",()=>function yt(ve){ve.edges().forEach(Me=>{let ot,en,ae=ve.edge(Me),Xe=ve.node(Me.v),It=ve.node(Me.w);ae.points?(ot=ae.points[0],en=ae.points[ae.points.length-1]):(ae.points=[],ot=It,en=Xe),ae.points.unshift(V.intersectRect(Xe,ot)),ae.points.push(V.intersectRect(It,en))})}(ve)),Me(" reversePoints",()=>function Tn(ve){ve.edges().forEach(Me=>{let ae=ve.edge(Me);ae.reversed&&ae.points.reverse()})}(ve)),Me(" acyclic.undo",()=>le.undo(ve))}(Xe,ae,Me)),ae(" updateInputGraph",()=>function et(ve,Me){ve.nodes().forEach(ae=>{let Xe=ve.node(ae),It=Me.node(ae);Xe&&(Xe.x=It.x,Xe.y=It.y,Xe.rank=It.rank,Me.children(ae).length&&(Xe.width=It.width,Xe.height=It.height))}),ve.edges().forEach(ae=>{let Xe=ve.edge(ae),It=Me.edge(ae);Xe.points=It.points,Object.hasOwn(It,"x")&&(Xe.x=It.x,Xe.y=It.y)}),ve.graph().width=Me.graph().width,ve.graph().height=Me.graph().height}(ve,Xe))})};let Ee=["nodesep","edgesep","ranksep","marginx","marginy"],Pe={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},he=["acyclicer","ranker","rankdir","align"],_e=["width","height"],Ne={width:0,height:0},$e=["minlen","weight","width","height","labeloffset"],ze={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},it=["labelpos"];function si(ve,Me){return V.mapValues(V.pick(ve,Me),Number)}function Ei(ve){var Me={};return ve&&Object.entries(ve).forEach(([ae,Xe])=>{"string"==typeof ae&&(ae=ae.toLowerCase()),Me[ae]=Xe}),Me}},3259:(Se,Je,B)=>{let le=B(1178);function $(S,k,x,A,j,V,ge){let ye=S.children(ge);if(!ye.length)return void(ge!==k&&S.setEdge(k,ge,{weight:0,minlen:x}));let Ie=le.addBorderNode(S,"_bt"),et=le.addBorderNode(S,"_bb"),Ee=S.node(ge);S.setParent(Ie,ge),Ee.borderTop=Ie,S.setParent(et,ge),Ee.borderBottom=et,ye.forEach(Pe=>{$(S,k,x,A,j,V,Pe);let he=S.node(Pe),_e=he.borderTop?he.borderTop:Pe,Ne=he.borderBottom?he.borderBottom:Pe,$e=he.borderTop?A:2*A,ze=_e!==Ne?1:j-V[ge]+1;S.setEdge(Ie,_e,{weight:$e,minlen:ze,nestingEdge:!0}),S.setEdge(Ne,et,{weight:$e,minlen:ze,nestingEdge:!0})}),S.parent(ge)||S.setEdge(k,Ie,{weight:0,minlen:j+V[ge]})}Se.exports={run:function J(S){let k=le.addDummyNode(S,"root",{},"_root"),x=function q(S){var k={};function x(A,j){var V=S.children(A);V&&V.length&&V.forEach(ge=>x(ge,j+1)),k[A]=j}return S.children().forEach(A=>x(A,1)),k}(S),A=Object.values(x),j=le.applyWithChunking(Math.max,A)-1,V=2*j+1;S.graph().nestingRoot=k,S.edges().forEach(ye=>S.edge(ye).minlen*=V);let ge=function P(S){return S.edges().reduce((k,x)=>k+S.edge(x).weight,0)}(S)+1;S.children().forEach(ye=>$(S,k,V,ge,j,x,ye)),S.graph().nodeRankFactor=V},cleanup:function L(S){var k=S.graph();S.removeNode(k.nestingRoot),delete k.nestingRoot,S.edges().forEach(x=>{S.edge(x).nestingEdge&&S.removeEdge(x)})}}},1939:(Se,Je,B)=>{"use strict";let le=B(1178);Se.exports={run:function J(P){P.graph().dummyChains=[],P.edges().forEach(L=>function $(P,L){let ye,Ie,et,S=L.v,k=P.node(S).rank,x=L.w,A=P.node(x).rank,j=L.name,V=P.edge(L),ge=V.labelRank;if(A!==k+1){for(P.removeEdge(L),et=0,++k;k<A;++et,++k)V.points=[],Ie={width:0,height:0,edgeLabel:V,edgeObj:L,rank:k},ye=le.addDummyNode(P,"edge",Ie,"_d"),k===ge&&(Ie.width=V.width,Ie.height=V.height,Ie.dummy="edge-label",Ie.labelpos=V.labelpos),P.setEdge(S,ye,{weight:V.weight},j),0===et&&P.graph().dummyChains.push(ye),S=ye;P.setEdge(S,x,{weight:V.weight},j)}}(P,L))},undo:function q(P){P.graph().dummyChains.forEach(L=>{let x,S=P.node(L),k=S.edgeLabel;for(P.setEdge(S.edgeObj,k);S.dummy;)x=P.successors(L)[0],P.removeNode(L),k.points.push({x:S.x,y:S.y}),"edge-label"===S.dummy&&(k.x=S.x,k.y=S.y,k.width=S.width,k.height=S.height),S=P.node(L=x)})}}},3826:Se=>{Se.exports=function Je(B,le,J){let q,$={};J.forEach(P=>{let S,k,L=B.parent(P);for(;L;){if(S=B.parent(L),S?(k=$[S],$[S]=L):(k=q,q=L),k&&k!==L)return void le.setEdge(k,L);L=S}})}},9750:Se=>{Se.exports=function Je(B,le=[]){return le.map(J=>{let $=B.inEdges(J);if($.length){let q=$.reduce((P,L)=>{let S=B.edge(L),k=B.node(L.v);return{sum:P.sum+S.weight*k.order,weight:P.weight+S.weight}},{sum:0,weight:0});return{v:J,barycenter:q.sum/q.weight,weight:q.weight}}return{v:J}})}},5742:(Se,Je,B)=>{let le=B(688).Graph,J=B(1178);Se.exports=function $(P,L,S){let k=function q(P){for(var L;P.hasNode(L=J.uniqueId("_root")););return L}(P),x=new le({compound:!0}).setGraph({root:k}).setDefaultNodeLabel(A=>P.node(A));return P.nodes().forEach(A=>{let j=P.node(A),V=P.parent(A);(j.rank===L||j.minRank<=L&&L<=j.maxRank)&&(x.setNode(A),x.setParent(A,V||k),P[S](A).forEach(ge=>{let ye=ge.v===A?ge.w:ge.v,Ie=x.edge(ye,A),et=void 0!==Ie?Ie.weight:0;x.setEdge(ye,A,{weight:P.edge(ge).weight+et})}),Object.hasOwn(j,"minRank")&&x.setNode(A,{borderLeft:j.borderLeft[L],borderRight:j.borderRight[L]}))}),x}},7217:(Se,Je,B)=>{"use strict";let le=B(1178).zipObject;function $(q,P,L){let S=le(L,L.map((ge,ye)=>ye)),k=P.flatMap(ge=>q.outEdges(ge).map(ye=>({pos:S[ye.w],weight:q.edge(ye).weight})).sort((ye,Ie)=>ye.pos-Ie.pos)),x=1;for(;x<L.length;)x<<=1;let A=2*x-1;x-=1;let j=new Array(A).fill(0),V=0;return k.forEach(ge=>{let ye=ge.pos+x;j[ye]+=ge.weight;let Ie=0;for(;ye>0;)ye%2&&(Ie+=j[ye+1]),ye=ye-1>>1,j[ye]+=ge.weight;V+=ge.weight*Ie}),V}Se.exports=function J(q,P){let L=0;for(let S=1;S<P.length;++S)L+=$(q,P[S-1],P[S]);return L}},4507:(Se,Je,B)=>{"use strict";let le=B(3252),J=B(7217),$=B(8414),q=B(5742),P=B(3826),L=B(688).Graph,S=B(1178);function x(V,ge,ye){return ge.map(function(Ie){return q(V,Ie,ye)})}function A(V,ge){let ye=new L;V.forEach(function(Ie){let et=Ie.graph().root,Ee=$(Ie,et,ye,ge);Ee.vs.forEach((Pe,he)=>Ie.node(Pe).order=he),P(Ie,ye,Ee.vs)})}function j(V,ge){Object.values(ge).forEach(ye=>ye.forEach((Ie,et)=>V.node(Ie).order=et))}Se.exports=function k(V,ge){if(ge&&"function"==typeof ge.customOrder)return void ge.customOrder(V,k);let ye=S.maxRank(V),Ie=x(V,S.range(1,ye+1),"inEdges"),et=x(V,S.range(ye-1,-1,-1),"outEdges"),Ee=le(V);if(j(V,Ee),ge&&ge.disableOptimalOrderHeuristic)return;let he,Pe=Number.POSITIVE_INFINITY;for(let _e=0,Ne=0;Ne<4;++_e,++Ne){A(_e%2?Ie:et,_e%4>=2),Ee=S.buildLayerMatrix(V);let $e=J(V,Ee);$e<Pe&&(Ne=0,he=Object.assign({},Ee),Pe=$e)}j(V,he)}},3252:(Se,Je,B)=>{"use strict";let le=B(1178);Se.exports=function J($){let q={},P=$.nodes().filter(j=>!$.children(j).length),L=P.map(j=>$.node(j).rank),S=le.applyWithChunking(Math.max,L),k=le.range(S+1).map(()=>[]);return P.sort((j,V)=>$.node(j).rank-$.node(V).rank).forEach(function x(j){if(q[j])return;q[j]=!0;let V=$.node(j);k[V.rank].push(j),$.successors(j).forEach(x)}),k}},6753:(Se,Je,B)=>{"use strict";let le=B(1178);Se.exports=function J(P,L){let S={};return P.forEach((x,A)=>{let j=S[x.v]={indegree:0,in:[],out:[],vs:[x.v],i:A};void 0!==x.barycenter&&(j.barycenter=x.barycenter,j.weight=x.weight)}),L.edges().forEach(x=>{let A=S[x.v],j=S[x.w];void 0!==A&&void 0!==j&&(j.indegree++,A.out.push(S[x.w]))}),function $(P){let L=[];function S(x){return A=>{A.merged||(void 0===A.barycenter||void 0===x.barycenter||A.barycenter>=x.barycenter)&&function q(P,L){let S=0,k=0;P.weight&&(S+=P.barycenter*P.weight,k+=P.weight),L.weight&&(S+=L.barycenter*L.weight,k+=L.weight),P.vs=L.vs.concat(P.vs),P.barycenter=S/k,P.weight=k,P.i=Math.min(L.i,P.i),L.merged=!0}(x,A)}}function k(x){return A=>{A.in.push(x),0==--A.indegree&&P.push(A)}}for(;P.length;){let x=P.pop();L.push(x),x.in.reverse().forEach(S(x)),x.out.forEach(k(x))}return L.filter(x=>!x.merged).map(x=>le.pick(x,["vs","i","barycenter","weight"]))}(Object.values(S).filter(x=>!x.indegree))}},8414:(Se,Je,B)=>{let le=B(9750),J=B(6753),$=B(6843);Se.exports=function q(S,k,x,A){let j=S.children(k),V=S.node(k),ge=V?V.borderLeft:void 0,ye=V?V.borderRight:void 0,Ie={};ge&&(j=j.filter(he=>he!==ge&&he!==ye));let et=le(S,j);et.forEach(he=>{if(S.children(he.v).length){let _e=q(S,he.v,x,A);Ie[he.v]=_e,Object.hasOwn(_e,"barycenter")&&function L(S,k){void 0!==S.barycenter?(S.barycenter=(S.barycenter*S.weight+k.barycenter*k.weight)/(S.weight+k.weight),S.weight+=k.weight):(S.barycenter=k.barycenter,S.weight=k.weight)}(he,_e)}});let Ee=J(et,x);!function P(S,k){S.forEach(x=>{x.vs=x.vs.flatMap(A=>k[A]?k[A].vs:A)})}(Ee,Ie);let Pe=$(Ee,A);if(ge&&(Pe.vs=[ge,Pe.vs,ye].flat(!0),S.predecessors(ge).length)){let he=S.node(S.predecessors(ge)[0]),_e=S.node(S.predecessors(ye)[0]);Object.hasOwn(Pe,"barycenter")||(Pe.barycenter=0,Pe.weight=0),Pe.barycenter=(Pe.barycenter*Pe.weight+he.order+_e.order)/(Pe.weight+2),Pe.weight+=2}return Pe}},6843:(Se,Je,B)=>{let le=B(1178);function $(P,L,S){let k;for(;L.length&&(k=L[L.length-1]).i<=S;)L.pop(),P.push(k.vs),S++;return S}Se.exports=function J(P,L){let S=le.partition(P,Ie=>Object.hasOwn(Ie,"barycenter")),k=S.lhs,x=S.rhs.sort((Ie,et)=>et.i-Ie.i),A=[],j=0,V=0,ge=0;k.sort(function q(P){return(L,S)=>L.barycenter<S.barycenter?-1:L.barycenter>S.barycenter?1:P?S.i-L.i:L.i-S.i}(!!L)),ge=$(A,x,ge),k.forEach(Ie=>{ge+=Ie.vs.length,A.push(Ie.vs),j+=Ie.barycenter*Ie.weight,V+=Ie.weight,ge=$(A,x,ge)});let ye={vs:A.flat(!0)};return V&&(ye.barycenter=j/V,ye.weight=V),ye}},930:Se=>{Se.exports=function Je(J){let $=function le(J){let $={},q=0;return J.children().forEach(function P(L){let S=q;J.children(L).forEach(P),$[L]={low:S,lim:q++}}),$}(J);J.graph().dummyChains.forEach(q=>{let P=J.node(q),L=P.edgeObj,S=function B(J,$,q,P){let A,j,L=[],S=[],k=Math.min($[q].low,$[P].low),x=Math.max($[q].lim,$[P].lim);A=q;do{A=J.parent(A),L.push(A)}while(A&&($[A].low>k||x>$[A].lim));for(j=A,A=P;(A=J.parent(A))!==j;)S.push(A);return{path:L.concat(S.reverse()),lca:j}}(J,$,L.v,L.w),k=S.path,x=S.lca,A=0,j=k[A],V=!0;for(;q!==L.w;){if(P=J.node(q),V){for(;(j=k[A])!==x&&J.node(j).maxRank<P.rank;)A++;j===x&&(V=!1)}if(!V){for(;A<k.length-1&&J.node(j=k[A+1]).minRank<=P.rank;)A++;j=k[A]}J.setParent(q,j),q=J.successors(q)[0]}})}},2363:(Se,Je,B)=>{"use strict";let le=B(688).Graph,J=B(1178);function $(Ee,Pe){let he={};return Pe.length&&Pe.reduce(function _e(Ne,$e){let ze=0,it=0,se=Ne.length,pe=$e[$e.length-1];return $e.forEach((De,xe)=>{let Oe=function P(Ee,Pe){if(Ee.node(Pe).dummy)return Ee.predecessors(Pe).find(he=>Ee.node(he).dummy)}(Ee,De),pt=Oe?Ee.node(Oe).order:se;(Oe||De===pe)&&($e.slice(it,xe+1).forEach(yt=>{Ee.predecessors(yt).forEach(zt=>{let Tn=Ee.node(zt),Wr=Tn.order;(Wr<ze||pt<Wr)&&(!Tn.dummy||!Ee.node(yt).dummy)&&L(he,zt,yt)})}),it=xe+1,ze=pt)}),$e}),he}function q(Ee,Pe){let he={};function _e($e,ze,it,se,pe){let De;J.range(ze,it).forEach(xe=>{De=$e[xe],Ee.node(De).dummy&&Ee.predecessors(De).forEach(Oe=>{let pt=Ee.node(Oe);pt.dummy&&(pt.order<se||pt.order>pe)&&L(he,Oe,De)})})}return Pe.length&&Pe.reduce(function Ne($e,ze){let se,it=-1,pe=0;return ze.forEach((De,xe)=>{if("border"===Ee.node(De).dummy){let Oe=Ee.predecessors(De);Oe.length&&(se=Ee.node(Oe[0]).order,_e(ze,pe,xe,it,se),pe=xe,it=se)}_e(ze,pe,ze.length,se,$e.length)}),ze}),he}function L(Ee,Pe,he){if(Pe>he){let Ne=Pe;Pe=he,he=Ne}let _e=Ee[Pe];_e||(Ee[Pe]=_e={}),_e[he]=!0}function S(Ee,Pe,he){if(Pe>he){let _e=Pe;Pe=he,he=_e}return!!Ee[Pe]&&Object.hasOwn(Ee[Pe],he)}function k(Ee,Pe,he,_e){let Ne={},$e={},ze={};return Pe.forEach(it=>{it.forEach((se,pe)=>{Ne[se]=se,$e[se]=se,ze[se]=pe})}),Pe.forEach(it=>{let se=-1;it.forEach(pe=>{let De=_e(pe);if(De.length){De=De.sort((Oe,pt)=>ze[Oe]-ze[pt]);let xe=(De.length-1)/2;for(let Oe=Math.floor(xe),pt=Math.ceil(xe);Oe<=pt;++Oe){let yt=De[Oe];$e[pe]===pe&&se<ze[yt]&&!S(he,pe,yt)&&($e[yt]=pe,$e[pe]=Ne[pe]=Ne[yt],se=ze[yt])}}})}),{root:Ne,align:$e}}function x(Ee,Pe,he,_e,Ne){let $e={},ze=function A(Ee,Pe,he,_e){let Ne=new le,$e=Ee.graph(),ze=function Ie(Ee,Pe,he){return(_e,Ne,$e)=>{let pe,ze=_e.node(Ne),it=_e.node($e),se=0;if(se+=ze.width/2,Object.hasOwn(ze,"labelpos"))switch(ze.labelpos.toLowerCase()){case"l":pe=-ze.width/2;break;case"r":pe=ze.width/2}if(pe&&(se+=he?pe:-pe),pe=0,se+=(ze.dummy?Pe:Ee)/2,se+=(it.dummy?Pe:Ee)/2,se+=it.width/2,Object.hasOwn(it,"labelpos"))switch(it.labelpos.toLowerCase()){case"l":pe=it.width/2;break;case"r":pe=-it.width/2}return pe&&(se+=he?pe:-pe),pe=0,se}}($e.nodesep,$e.edgesep,_e);return Pe.forEach(it=>{let se;it.forEach(pe=>{let De=he[pe];if(Ne.setNode(De),se){var xe=he[se],Oe=Ne.edge(xe,De);Ne.setEdge(xe,De,Math.max(ze(Ee,pe,se),Oe||0))}se=pe})}),Ne}(Ee,Pe,he,Ne),it=Ne?"borderLeft":"borderRight";function se(xe,Oe){let pt=ze.nodes(),yt=pt.pop(),zt={};for(;yt;)zt[yt]?xe(yt):(zt[yt]=!0,pt.push(yt),pt=pt.concat(Oe(yt))),yt=pt.pop()}return se(function pe(xe){$e[xe]=ze.inEdges(xe).reduce((Oe,pt)=>Math.max(Oe,$e[pt.v]+ze.edge(pt)),0)},ze.predecessors.bind(ze)),se(function De(xe){let Oe=ze.outEdges(xe).reduce((yt,zt)=>Math.min(yt,$e[zt.w]-ze.edge(zt)),Number.POSITIVE_INFINITY),pt=Ee.node(xe);Oe!==Number.POSITIVE_INFINITY&&pt.borderType!==it&&($e[xe]=Math.max($e[xe],Oe))},ze.successors.bind(ze)),Object.keys(_e).forEach(xe=>$e[xe]=$e[he[xe]]),$e}function j(Ee,Pe){return Object.values(Pe).reduce((he,_e)=>{let Ne=Number.NEGATIVE_INFINITY,$e=Number.POSITIVE_INFINITY;Object.entries(_e).forEach(([it,se])=>{let pe=function et(Ee,Pe){return Ee.node(Pe).width}(Ee,it)/2;Ne=Math.max(se+pe,Ne),$e=Math.min(se-pe,$e)});const ze=Ne-$e;return ze<he[0]&&(he=[ze,_e]),he},[Number.POSITIVE_INFINITY,null])[1]}function V(Ee,Pe){let he=Object.values(Pe),_e=J.applyWithChunking(Math.min,he),Ne=J.applyWithChunking(Math.max,he);["u","d"].forEach($e=>{["l","r"].forEach(ze=>{let it=$e+ze,se=Ee[it];if(se===Pe)return;let pe=Object.values(se),De=_e-J.applyWithChunking(Math.min,pe);"l"!==ze&&(De=Ne-J.applyWithChunking(Math.max,pe)),De&&(Ee[it]=J.mapValues(se,xe=>xe+De))})})}function ge(Ee,Pe){return J.mapValues(Ee.ul,(he,_e)=>{if(Pe)return Ee[Pe.toLowerCase()][_e];{let Ne=Object.values(Ee).map($e=>$e[_e]).sort(($e,ze)=>$e-ze);return(Ne[1]+Ne[2])/2}})}Se.exports={positionX:function ye(Ee){let Ne,Pe=J.buildLayerMatrix(Ee),he=Object.assign($(Ee,Pe),q(Ee,Pe)),_e={};["u","d"].forEach(ze=>{Ne="u"===ze?Pe:Object.values(Pe).reverse(),["l","r"].forEach(it=>{"r"===it&&(Ne=Ne.map(xe=>Object.values(xe).reverse()));let se=("u"===ze?Ee.predecessors:Ee.successors).bind(Ee),pe=k(0,Ne,he,se),De=x(Ee,Ne,pe.root,pe.align,"r"===it);"r"===it&&(De=J.mapValues(De,xe=>-xe)),_e[ze+it]=De})});let $e=j(Ee,_e);return V(_e,$e),ge(_e,Ee.graph().align)},findType1Conflicts:$,findType2Conflicts:q,addConflict:L,hasConflict:S,verticalAlignment:k,horizontalCompaction:x,alignCoordinates:V,findSmallestWidthAlignment:j,balance:ge}},3110:(Se,Je,B)=>{"use strict";let le=B(1178),J=B(2363).positionX;Se.exports=function $(P){(function q(P){let L=le.buildLayerMatrix(P),S=P.graph().ranksep,k=0;L.forEach(x=>{const A=x.reduce((j,V)=>{const ge=P.node(V).height;return j>ge?j:ge},0);x.forEach(j=>P.node(j).y=k+A/2),k+=A+S})})(P=le.asNonCompoundGraph(P)),Object.entries(J(P)).forEach(([L,S])=>P.node(L).x=S)}},5975:(Se,Je,B)=>{"use strict";var le=B(688).Graph,J=B(1211).slack;function q(S,k){return S.nodes().forEach(function x(A){k.nodeEdges(A).forEach(j=>{var V=j.v,ge=A===V?j.w:V;!S.hasNode(ge)&&!J(k,j)&&(S.setNode(ge,{}),S.setEdge(A,ge,{}),x(ge))})}),S.nodeCount()}function P(S,k){return k.edges().reduce((A,j)=>{let V=Number.POSITIVE_INFINITY;return S.hasNode(j.v)!==S.hasNode(j.w)&&(V=J(k,j)),V<A[0]?[V,j]:A},[Number.POSITIVE_INFINITY,null])[1]}function L(S,k,x){S.nodes().forEach(A=>k.node(A).rank+=x)}Se.exports=function $(S){var j,V,k=new le({directed:!1}),x=S.nodes()[0],A=S.nodeCount();for(k.setNode(x,{});q(k,S)<A;)j=P(k,S),V=k.hasNode(j.v)?J(S,j):-J(S,j),L(k,S,V);return k}},5779:(Se,Je,B)=>{"use strict";var J=B(1211).longestPath,$=B(5975),q=B(9722);Se.exports=function P(x){switch(x.graph().ranker){case"network-simplex":default:!function k(x){q(x)}(x);break;case"tight-tree":!function S(x){J(x),$(x)}(x);break;case"longest-path":L(x)}};var L=J},9722:(Se,Je,B)=>{"use strict";var le=B(5975),J=B(1211).slack,$=B(1211).longestPath,q=B(688).alg.preorder,P=B(688).alg.postorder,L=B(1178).simplify;function S(he){he=L(he),$(he);var Ne,_e=le(he);for(j(_e),k(_e,he);Ne=ge(_e);)Ie(_e,he,Ne,ye(_e,he,Ne))}function k(he,_e){var Ne=P(he,he.nodes());(Ne=Ne.slice(0,Ne.length-1)).forEach($e=>function x(he,_e,Ne){var $e=he.node(Ne);he.edge(Ne,$e.parent).cutvalue=A(he,_e,Ne)}(he,_e,$e))}function A(he,_e,Ne){var ze=he.node(Ne).parent,it=!0,se=_e.edge(Ne,ze),pe=0;return se||(it=!1,se=_e.edge(ze,Ne)),pe=se.weight,_e.nodeEdges(Ne).forEach(De=>{var xe=De.v===Ne,Oe=xe?De.w:De.v;if(Oe!==ze){var pt=xe===it,yt=_e.edge(De).weight;if(pe+=pt?yt:-yt,function Ee(he,_e,Ne){return he.hasEdge(_e,Ne)}(he,Ne,Oe)){var zt=he.edge(Ne,Oe).cutvalue;pe+=pt?-zt:zt}}}),pe}function j(he,_e){arguments.length<2&&(_e=he.nodes()[0]),V(he,{},1,_e)}function V(he,_e,Ne,$e,ze){var it=Ne,se=he.node($e);return _e[$e]=!0,he.neighbors($e).forEach(pe=>{Object.hasOwn(_e,pe)||(Ne=V(he,_e,Ne,pe,$e))}),se.low=it,se.lim=Ne++,ze?se.parent=ze:delete se.parent,Ne}function ge(he){return he.edges().find(_e=>he.edge(_e).cutvalue<0)}function ye(he,_e,Ne){var $e=Ne.v,ze=Ne.w;_e.hasEdge($e,ze)||($e=Ne.w,ze=Ne.v);var it=he.node($e),se=he.node(ze),pe=it,De=!1;return it.lim>se.lim&&(pe=se,De=!0),_e.edges().filter(Oe=>De===Pe(0,he.node(Oe.v),pe)&&De!==Pe(0,he.node(Oe.w),pe)).reduce((Oe,pt)=>J(_e,pt)<J(_e,Oe)?pt:Oe)}function Ie(he,_e,Ne,$e){he.removeEdge(Ne.v,Ne.w),he.setEdge($e.v,$e.w,{}),j(he),k(he,_e),function et(he,_e){var Ne=he.nodes().find(ze=>!_e.node(ze).parent),$e=q(he,Ne);($e=$e.slice(1)).forEach(ze=>{var it=he.node(ze).parent,se=_e.edge(ze,it),pe=!1;se||(se=_e.edge(it,ze),pe=!0),_e.node(ze).rank=_e.node(it).rank+(pe?se.minlen:-se.minlen)})}(he,_e)}function Pe(he,_e,Ne){return Ne.low<=_e.lim&&_e.lim<=Ne.lim}Se.exports=S,S.initLowLimValues=j,S.initCutValues=k,S.calcCutValue=A,S.leaveEdge=ge,S.enterEdge=ye,S.exchangeEdges=Ie},1211:(Se,Je,B)=>{"use strict";const{applyWithChunking:le}=B(1178);Se.exports={longestPath:function J(q){var P={};q.sources().forEach(function L(S){var k=q.node(S);if(Object.hasOwn(P,S))return k.rank;P[S]=!0;let x=q.outEdges(S).map(j=>null==j?Number.POSITIVE_INFINITY:L(j.w)-q.edge(j).minlen);var A=le(Math.min,x);return A===Number.POSITIVE_INFINITY&&(A=0),k.rank=A})},slack:function $(q,P){return q.node(P.w).rank-q.node(P.v).rank-q.edge(P).minlen}}},1178:(Se,Je,B)=>{"use strict";let le=B(688).Graph;function J(se,pe,De,xe){let Oe;do{Oe=_e(xe)}while(se.hasNode(Oe));return De.dummy=pe,se.setNode(Oe,De),Oe}Se.exports={addBorderNode:function j(se,pe,De,xe){let Oe={width:0,height:0};return arguments.length>=4&&(Oe.rank=De,Oe.order=xe),J(se,"border",Oe,pe)},addDummyNode:J,applyWithChunking:ye,asNonCompoundGraph:function q(se){let pe=new le({multigraph:se.isMultigraph()}).setGraph(se.graph());return se.nodes().forEach(De=>{se.children(De).length||pe.setNode(De,se.node(De))}),se.edges().forEach(De=>{pe.setEdge(De,se.edge(De))}),pe},buildLayerMatrix:function k(se){let pe=Ne(Ie(se)+1).map(()=>[]);return se.nodes().forEach(De=>{let xe=se.node(De),Oe=xe.rank;void 0!==Oe&&(pe[Oe][xe.order]=De)}),pe},intersectRect:function S(se,pe){let Tn,Wr,De=se.x,xe=se.y,Oe=pe.x-De,pt=pe.y-xe,yt=se.width/2,zt=se.height/2;if(!Oe&&!pt)throw new Error("Not possible to find intersection inside of the rectangle");return Math.abs(pt)*yt>Math.abs(Oe)*zt?(pt<0&&(zt=-zt),Tn=zt*Oe/pt,Wr=zt):(Oe<0&&(yt=-yt),Tn=yt,Wr=yt*pt/Oe),{x:De+Tn,y:xe+Wr}},mapValues:function ze(se,pe){let De=pe;return"string"==typeof pe&&(De=xe=>xe[pe]),Object.entries(se).reduce((xe,[Oe,pt])=>(xe[Oe]=De(pt,Oe),xe),{})},maxRank:Ie,normalizeRanks:function x(se){let pe=se.nodes().map(xe=>{let Oe=se.node(xe).rank;return void 0===Oe?Number.MAX_VALUE:Oe}),De=ye(Math.min,pe);se.nodes().forEach(xe=>{let Oe=se.node(xe);Object.hasOwn(Oe,"rank")&&(Oe.rank-=De)})},notime:function Pe(se,pe){return pe()},partition:function et(se,pe){let De={lhs:[],rhs:[]};return se.forEach(xe=>{pe(xe)?De.lhs.push(xe):De.rhs.push(xe)}),De},pick:function $e(se,pe){const De={};for(const xe of pe)void 0!==se[xe]&&(De[xe]=se[xe]);return De},predecessorWeights:function L(se){let pe=se.nodes().map(De=>{let xe={};return se.inEdges(De).forEach(Oe=>{xe[Oe.v]=(xe[Oe.v]||0)+se.edge(Oe).weight}),xe});return it(se.nodes(),pe)},range:Ne,removeEmptyRanks:function A(se){let pe=se.nodes().map(yt=>se.node(yt).rank),De=ye(Math.min,pe),xe=[];se.nodes().forEach(yt=>{let zt=se.node(yt).rank-De;xe[zt]||(xe[zt]=[]),xe[zt].push(yt)});let Oe=0,pt=se.graph().nodeRankFactor;Array.from(xe).forEach((yt,zt)=>{void 0===yt&&zt%pt!=0?--Oe:void 0!==yt&&Oe&&yt.forEach(Tn=>se.node(Tn).rank+=Oe)})},simplify:function $(se){let pe=(new le).setGraph(se.graph());return se.nodes().forEach(De=>pe.setNode(De,se.node(De))),se.edges().forEach(De=>{let xe=pe.edge(De.v,De.w)||{weight:0,minlen:1},Oe=se.edge(De);pe.setEdge(De.v,De.w,{weight:xe.weight+Oe.weight,minlen:Math.max(xe.minlen,Oe.minlen)})}),pe},successorWeights:function P(se){let pe=se.nodes().map(De=>{let xe={};return se.outEdges(De).forEach(Oe=>{xe[Oe.w]=(xe[Oe.w]||0)+se.edge(Oe).weight}),xe});return it(se.nodes(),pe)},time:function Ee(se,pe){let De=Date.now();try{return pe()}finally{console.log(se+" time: "+(Date.now()-De)+"ms")}},uniqueId:_e,zipObject:it};const ge=65535;function ye(se,pe){if(pe.length>ge){const De=function V(se,pe=ge){const De=[];for(let xe=0;xe<se.length;xe+=pe){const Oe=se.slice(xe,xe+pe);De.push(Oe)}return De}(pe);return se.apply(null,De.map(xe=>se.apply(null,xe)))}return se.apply(null,pe)}function Ie(se){const De=se.nodes().map(xe=>{let Oe=se.node(xe).rank;return void 0===Oe?Number.MIN_VALUE:Oe});return ye(Math.max,De)}let he=0;function _e(se){var pe=++he;return toString(se)+pe}function Ne(se,pe,De=1){null==pe&&(pe=se,se=0);let xe=pt=>pt<pe;De<0&&(xe=pt=>pe<pt);const Oe=[];for(let pt=se;xe(pt);pt+=De)Oe.push(pt);return Oe}function it(se,pe){return se.reduce((De,xe,Oe)=>(De[xe]=pe[Oe],De),{})}},9836:Se=>{Se.exports="1.1.4"},688:(Se,Je,B)=>{var le=B(3820);Se.exports={Graph:le.Graph,json:B(8388),alg:B(1873),version:le.version}},9:Se=>{Se.exports=function Je(B){var $,le={},J=[];function q(P){Object.hasOwn(le,P)||(le[P]=!0,$.push(P),B.successors(P).forEach(q),B.predecessors(P).forEach(q))}return B.nodes().forEach(function(P){$=[],q(P),$.length&&J.push($)}),J}},7766:Se=>{function B($,q,P,L){for(var S=[[$,!1]];S.length>0;){var k=S.pop();k[1]?L.push(k[0]):Object.hasOwn(P,k[0])||(P[k[0]]=!0,S.push([k[0],!0]),J(q(k[0]),x=>S.push([x,!1])))}}function le($,q,P,L){for(var S=[$];S.length>0;){var k=S.pop();Object.hasOwn(P,k)||(P[k]=!0,L.push(k),J(q(k),x=>S.push(x)))}}function J($,q){for(var P=$.length;P--;)q($[P],P,$);return $}Se.exports=function Je($,q,P){Array.isArray(q)||(q=[q]);var L=$.isDirected()?A=>$.successors(A):A=>$.neighbors(A),S="post"===P?B:le,k=[],x={};return q.forEach(A=>{if(!$.hasNode(A))throw new Error("Graph does not have node: "+A);S(A,L,x,k)}),k}},445:(Se,Je,B)=>{var le=B(7103);Se.exports=function J($,q,P){return $.nodes().reduce(function(L,S){return L[S]=le($,S,q,P),L},{})}},7103:(Se,Je,B)=>{var le=B(859);Se.exports=function $(P,L,S,k){return function q(P,L,S,k){var j,V,x={},A=new le,ge=function(ye){var Ie=ye.v!==j?ye.v:ye.w,et=x[Ie],Ee=S(ye),Pe=V.distance+Ee;if(Ee<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+ye+" Weight: "+Ee);Pe<et.distance&&(et.distance=Pe,et.predecessor=j,A.decrease(Ie,Pe))};for(P.nodes().forEach(function(ye){var Ie=ye===L?0:Number.POSITIVE_INFINITY;x[ye]={distance:Ie},A.add(ye,Ie)});A.size()>0&&(j=A.removeMin(),(V=x[j]).distance!==Number.POSITIVE_INFINITY);)k(j).forEach(ge);return x}(P,String(L),S||J,k||function(x){return P.outEdges(x)})};var J=()=>1},2244:(Se,Je,B)=>{var le=B(8829);Se.exports=function J($){return le($).filter(function(q){return q.length>1||1===q.length&&$.hasEdge(q[0],q[0])})}},9432:Se=>{Se.exports=function B(J,$,q){return function le(J,$,q){var P={},L=J.nodes();return L.forEach(function(S){P[S]={},P[S][S]={distance:0},L.forEach(function(k){S!==k&&(P[S][k]={distance:Number.POSITIVE_INFINITY})}),q(S).forEach(function(k){var x=k.v===S?k.w:k.v,A=$(k);P[S][x]={distance:A,predecessor:S}})}),L.forEach(function(S){var k=P[S];L.forEach(function(x){var A=P[x];L.forEach(function(j){var ge=k[j],ye=A[j],Ie=A[S].distance+ge.distance;Ie<ye.distance&&(ye.distance=Ie,ye.predecessor=ge.predecessor)})})}),P}(J,$||Je,q||function(P){return J.outEdges(P)})};var Je=()=>1},1873:(Se,Je,B)=>{Se.exports={components:B(9),dijkstra:B(7103),dijkstraAll:B(445),findCycles:B(2244),floydWarshall:B(9432),isAcyclic:B(9640),postorder:B(4691),preorder:B(3166),prim:B(937),tarjan:B(8829),topsort:B(8306)}},9640:(Se,Je,B)=>{var le=B(8306);Se.exports=function J($){try{le($)}catch(q){if(q instanceof le.CycleException)return!1;throw q}return!0}},4691:(Se,Je,B)=>{var le=B(7766);Se.exports=function J($,q){return le($,q,"post")}},3166:(Se,Je,B)=>{var le=B(7766);Se.exports=function J($,q){return le($,q,"pre")}},937:(Se,Je,B)=>{var le=B(9744),J=B(859);Se.exports=function $(q,P){var x,L=new le,S={},k=new J;function A(V){var ge=V.v===x?V.w:V.v,ye=k.priority(ge);if(void 0!==ye){var Ie=P(V);Ie<ye&&(S[ge]=x,k.decrease(ge,Ie))}}if(0===q.nodeCount())return L;q.nodes().forEach(function(V){k.add(V,Number.POSITIVE_INFINITY),L.setNode(V)}),k.decrease(q.nodes()[0],0);for(var j=!1;k.size()>0;){if(x=k.removeMin(),Object.hasOwn(S,x))L.setEdge(x,S[x]);else{if(j)throw new Error("Input graph is not connected: "+q);j=!0}q.nodeEdges(x).forEach(A)}return L}},8829:Se=>{Se.exports=function Je(B){var le=0,J=[],$={},q=[];function P(L){var S=$[L]={onStack:!0,lowlink:le,index:le++};if(J.push(L),B.successors(L).forEach(function(A){Object.hasOwn($,A)?$[A].onStack&&(S.lowlink=Math.min(S.lowlink,$[A].index)):(P(A),S.lowlink=Math.min(S.lowlink,$[A].lowlink))}),S.lowlink===S.index){var x,k=[];do{x=J.pop(),$[x].onStack=!1,k.push(x)}while(L!==x);q.push(k)}}return B.nodes().forEach(function(L){Object.hasOwn($,L)||P(L)}),q}},8306:Se=>{function Je(le){var J={},$={},q=[];if(le.sinks().forEach(function P(L){if(Object.hasOwn($,L))throw new B;Object.hasOwn(J,L)||($[L]=!0,J[L]=!0,le.predecessors(L).forEach(P),delete $[L],q.push(L))}),Object.keys(J).length!==le.nodeCount())throw new B;return q}class B extends Error{constructor(){super(...arguments)}}Se.exports=Je,Je.CycleException=B},859:Se=>{Se.exports=class Je{_arr=[];_keyIndices={};size(){return this._arr.length}keys(){return this._arr.map(function(le){return le.key})}has(le){return Object.hasOwn(this._keyIndices,le)}priority(le){var J=this._keyIndices[le];if(void 0!==J)return this._arr[J].priority}min(){if(0===this.size())throw new Error("Queue underflow");return this._arr[0].key}add(le,J){var $=this._keyIndices;if(le=String(le),!Object.hasOwn($,le)){var q=this._arr,P=q.length;return $[le]=P,q.push({key:le,priority:J}),this._decrease(P),!0}return!1}removeMin(){this._swap(0,this._arr.length-1);var le=this._arr.pop();return delete this._keyIndices[le.key],this._heapify(0),le.key}decrease(le,J){var $=this._keyIndices[le];if(J>this._arr[$].priority)throw new Error("New priority is greater than current priority. Key: "+le+" Old: "+this._arr[$].priority+" New: "+J);this._arr[$].priority=J,this._decrease($)}_heapify(le){var J=this._arr,$=2*le,q=$+1,P=le;$<J.length&&(P=J[$].priority<J[P].priority?$:P,q<J.length&&(P=J[q].priority<J[P].priority?q:P),P!==le&&(this._swap(le,P),this._heapify(P)))}_decrease(le){for(var q,J=this._arr,$=J[le].priority;0!==le&&!(J[q=le>>1].priority<$);)this._swap(le,q),le=q}_swap(le,J){var $=this._arr,q=this._keyIndices,P=$[le],L=$[J];$[le]=L,$[J]=P,q[L.key]=le,q[P.key]=J}}},9744:Se=>{"use strict";var Je="\0",B="\0",le="\x01";function $(k,x){k[x]?k[x]++:k[x]=1}function q(k,x){--k[x]||delete k[x]}function P(k,x,A,j){var V=""+x,ge=""+A;if(!k&&V>ge){var ye=V;V=ge,ge=ye}return V+le+ge+le+(void 0===j?Je:j)}function S(k,x){return P(k,x.v,x.w,x.name)}Se.exports=class J{_isDirected=!0;_isMultigraph=!1;_isCompound=!1;_label;_defaultNodeLabelFn=()=>{};_defaultEdgeLabelFn=()=>{};_nodes={};_in={};_preds={};_out={};_sucs={};_edgeObjs={};_edgeLabels={};_nodeCount=0;_edgeCount=0;_parent;_children;constructor(x){x&&(this._isDirected=!Object.hasOwn(x,"directed")||x.directed,this._isMultigraph=!!Object.hasOwn(x,"multigraph")&&x.multigraph,this._isCompound=!!Object.hasOwn(x,"compound")&&x.compound),this._isCompound&&(this._parent={},this._children={},this._children[B]={})}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(x){return this._label=x,this}graph(){return this._label}setDefaultNodeLabel(x){return this._defaultNodeLabelFn=x,"function"!=typeof x&&(this._defaultNodeLabelFn=()=>x),this}nodeCount(){return this._nodeCount}nodes(){return Object.keys(this._nodes)}sources(){var x=this;return this.nodes().filter(A=>0===Object.keys(x._in[A]).length)}sinks(){var x=this;return this.nodes().filter(A=>0===Object.keys(x._out[A]).length)}setNodes(x,A){var j=arguments,V=this;return x.forEach(function(ge){j.length>1?V.setNode(ge,A):V.setNode(ge)}),this}setNode(x,A){return Object.hasOwn(this._nodes,x)?(arguments.length>1&&(this._nodes[x]=A),this):(this._nodes[x]=arguments.length>1?A:this._defaultNodeLabelFn(x),this._isCompound&&(this._parent[x]=B,this._children[x]={},this._children[B][x]=!0),this._in[x]={},this._preds[x]={},this._out[x]={},this._sucs[x]={},++this._nodeCount,this)}node(x){return this._nodes[x]}hasNode(x){return Object.hasOwn(this._nodes,x)}removeNode(x){var A=this;if(Object.hasOwn(this._nodes,x)){var j=V=>A.removeEdge(A._edgeObjs[V]);delete this._nodes[x],this._isCompound&&(this._removeFromParentsChildList(x),delete this._parent[x],this.children(x).forEach(function(V){A.setParent(V)}),delete this._children[x]),Object.keys(this._in[x]).forEach(j),delete this._in[x],delete this._preds[x],Object.keys(this._out[x]).forEach(j),delete this._out[x],delete this._sucs[x],--this._nodeCount}return this}setParent(x,A){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(void 0===A)A=B;else{for(var j=A+="";void 0!==j;j=this.parent(j))if(j===x)throw new Error("Setting "+A+" as parent of "+x+" would create a cycle");this.setNode(A)}return this.setNode(x),this._removeFromParentsChildList(x),this._parent[x]=A,this._children[A][x]=!0,this}_removeFromParentsChildList(x){delete this._children[this._parent[x]][x]}parent(x){if(this._isCompound){var A=this._parent[x];if(A!==B)return A}}children(x=B){if(this._isCompound){var A=this._children[x];if(A)return Object.keys(A)}else{if(x===B)return this.nodes();if(this.hasNode(x))return[]}}predecessors(x){var A=this._preds[x];if(A)return Object.keys(A)}successors(x){var A=this._sucs[x];if(A)return Object.keys(A)}neighbors(x){var A=this.predecessors(x);if(A){const V=new Set(A);for(var j of this.successors(x))V.add(j);return Array.from(V.values())}}isLeaf(x){return 0===(this.isDirected()?this.successors(x):this.neighbors(x)).length}filterNodes(x){var A=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});A.setGraph(this.graph());var j=this;Object.entries(this._nodes).forEach(function([ye,Ie]){x(ye)&&A.setNode(ye,Ie)}),Object.values(this._edgeObjs).forEach(function(ye){A.hasNode(ye.v)&&A.hasNode(ye.w)&&A.setEdge(ye,j.edge(ye))});var V={};function ge(ye){var Ie=j.parent(ye);return void 0===Ie||A.hasNode(Ie)?(V[ye]=Ie,Ie):Ie in V?V[Ie]:ge(Ie)}return this._isCompound&&A.nodes().forEach(ye=>A.setParent(ye,ge(ye))),A}setDefaultEdgeLabel(x){return this._defaultEdgeLabelFn=x,"function"!=typeof x&&(this._defaultEdgeLabelFn=()=>x),this}edgeCount(){return this._edgeCount}edges(){return Object.values(this._edgeObjs)}setPath(x,A){var j=this,V=arguments;return x.reduce(function(ge,ye){return V.length>1?j.setEdge(ge,ye,A):j.setEdge(ge,ye),ye}),this}setEdge(){var x,A,j,V,ge=!1,ye=arguments[0];"object"==typeof ye&&null!==ye&&"v"in ye?(x=ye.v,A=ye.w,j=ye.name,2===arguments.length&&(V=arguments[1],ge=!0)):(x=ye,A=arguments[1],j=arguments[3],arguments.length>2&&(V=arguments[2],ge=!0)),void 0!==j&&(j=""+j);var Ie=P(this._isDirected,x=""+x,A=""+A,j);if(Object.hasOwn(this._edgeLabels,Ie))return ge&&(this._edgeLabels[Ie]=V),this;if(void 0!==j&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(x),this.setNode(A),this._edgeLabels[Ie]=ge?V:this._defaultEdgeLabelFn(x,A,j);var et=function L(k,x,A,j){var V=""+x,ge=""+A;if(!k&&V>ge){var ye=V;V=ge,ge=ye}var Ie={v:V,w:ge};return j&&(Ie.name=j),Ie}(this._isDirected,x,A,j);return x=et.v,A=et.w,Object.freeze(et),this._edgeObjs[Ie]=et,$(this._preds[A],x),$(this._sucs[x],A),this._in[A][Ie]=et,this._out[x][Ie]=et,this._edgeCount++,this}edge(x,A,j){var V=1===arguments.length?S(this._isDirected,arguments[0]):P(this._isDirected,x,A,j);return this._edgeLabels[V]}edgeAsObj(){const x=this.edge(...arguments);return"object"!=typeof x?{label:x}:x}hasEdge(x,A,j){var V=1===arguments.length?S(this._isDirected,arguments[0]):P(this._isDirected,x,A,j);return Object.hasOwn(this._edgeLabels,V)}removeEdge(x,A,j){var V=1===arguments.length?S(this._isDirected,arguments[0]):P(this._isDirected,x,A,j),ge=this._edgeObjs[V];return ge&&(x=ge.v,A=ge.w,delete this._edgeLabels[V],delete this._edgeObjs[V],q(this._preds[A],x),q(this._sucs[x],A),delete this._in[A][V],delete this._out[x][V],this._edgeCount--),this}inEdges(x,A){var j=this._in[x];if(j){var V=Object.values(j);return A?V.filter(ge=>ge.v===A):V}}outEdges(x,A){var j=this._out[x];if(j){var V=Object.values(j);return A?V.filter(ge=>ge.w===A):V}}nodeEdges(x,A){var j=this.inEdges(x,A);if(j)return j.concat(this.outEdges(x,A))}}},3820:(Se,Je,B)=>{Se.exports={Graph:B(9744),version:B(2384)}},8388:(Se,Je,B)=>{var le=B(9744);function $(L){return L.nodes().map(function(S){var k=L.node(S),x=L.parent(S),A={v:S};return void 0!==k&&(A.value=k),void 0!==x&&(A.parent=x),A})}function q(L){return L.edges().map(function(S){var k=L.edge(S),x={v:S.v,w:S.w};return void 0!==S.name&&(x.name=S.name),void 0!==k&&(x.value=k),x})}Se.exports={write:function J(L){var S={options:{directed:L.isDirected(),multigraph:L.isMultigraph(),compound:L.isCompound()},nodes:$(L),edges:q(L)};return void 0!==L.graph()&&(S.value=structuredClone(L.graph())),S},read:function P(L){var S=new le(L.options).setGraph(L.value);return L.nodes.forEach(function(k){S.setNode(k.v,k.value),k.parent&&S.setParent(k.v,k.parent)}),L.edges.forEach(function(k){S.setEdge({v:k.v,w:k.w,name:k.name},k.value)}),S}}},2384:Se=>{Se.exports="2.2.4"},2260:(Se,Je,B)=>{"use strict";var le={};function J(e,t,n,r,i,o,s){try{var a=e[o](s),u=a.value}catch(c){return void n(c)}a.done?t(u):Promise.resolve(u).then(r,i)}function $(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var o=e.apply(t,n);function s(u){J(o,r,i,s,a,"next",u)}function a(u){J(o,r,i,s,a,"throw",u)}s(void 0)})}}B.r(le),B.d(le,{FormatSpecifier:()=>xg,active:()=>gG,arc:()=>EJ,area:()=>OR,areaRadial:()=>LR,ascending:()=>Ds,autoType:()=>Sq,axisBottom:()=>wU,axisLeft:()=>_U,axisRight:()=>bU,axisTop:()=>vU,bisect:()=>ya,bisectLeft:()=>YH,bisectRight:()=>HT,bisector:()=>I1,blob:()=>nW,brush:()=>q2,brushSelection:()=>xG,brushX:()=>MG,brushY:()=>IG,buffer:()=>iW,chord:()=>TG,clientPoint:()=>tg,cluster:()=>vK,color:()=>xs,contourDensity:()=>aq,contours:()=>vN,create:()=>fJ,creator:()=>Yp,cross:()=>QH,csv:()=>aW,csvFormat:()=>yq,csvFormatBody:()=>vq,csvFormatRow:()=>wq,csvFormatRows:()=>bq,csvFormatValue:()=>_q,csvParse:()=>DN,csvParseRows:()=>mq,cubehelix:()=>$i,curveBasis:()=>UJ,curveBasisClosed:()=>$J,curveBasisOpen:()=>zJ,curveBundle:()=>GJ,curveCardinal:()=>qJ,curveCardinalClosed:()=>WJ,curveCardinalOpen:()=>YJ,curveCatmullRom:()=>KJ,curveCatmullRomClosed:()=>QJ,curveCatmullRomOpen:()=>ZJ,curveLinear:()=>Pm,curveLinearClosed:()=>XJ,curveMonotoneX:()=>JJ,curveMonotoneY:()=>eee,curveNatural:()=>tee,curveStep:()=>nee,curveStepAfter:()=>iee,curveStepBefore:()=>ree,customEvent:()=>xf,descending:()=>ZH,deviation:()=>zT,dispatch:()=>uc,drag:()=>dq,dragDisable:()=>Kp,dragEnable:()=>Qp,dsv:()=>sW,dsvFormat:()=>wg,easeBack:()=>AN,easeBackIn:()=>Zq,easeBackInOut:()=>AN,easeBackOut:()=>Xq,easeBounce:()=>Vf,easeBounceIn:()=>Kq,easeBounceInOut:()=>Qq,easeBounceOut:()=>Vf,easeCircle:()=>NN,easeCircleIn:()=>jq,easeCircleInOut:()=>NN,easeCircleOut:()=>Vq,easeCubic:()=>cb,easeCubicIn:()=>lG,easeCubicInOut:()=>cb,easeCubicOut:()=>fG,easeElastic:()=>kN,easeElasticIn:()=>Jq,easeElasticInOut:()=>eW,easeElasticOut:()=>kN,easeExp:()=>TN,easeExpIn:()=>Lq,easeExpInOut:()=>TN,easeExpOut:()=>Bq,easeLinear:()=>Nq,easePoly:()=>xN,easePolyIn:()=>Oq,easePolyInOut:()=>xN,easePolyOut:()=>Rq,easeQuad:()=>CN,easeQuadIn:()=>Aq,easeQuadInOut:()=>CN,easeQuadOut:()=>kq,easeSin:()=>SN,easeSinIn:()=>Pq,easeSinInOut:()=>SN,easeSinOut:()=>Fq,entries:()=>zG,event:()=>Ue,extent:()=>S1,forceCenter:()=>gW,forceCollide:()=>RW,forceLink:()=>FW,forceManyBody:()=>UW,forceRadial:()=>$W,forceSimulation:()=>HW,forceX:()=>zW,forceY:()=>GW,format:()=>Ig,formatDefaultLocale:()=>zN,formatLocale:()=>$N,formatPrefix:()=>Vb,formatSpecifier:()=>Hf,geoAlbers:()=>ok,geoAlbersUsa:()=>QY,geoArea:()=>tY,geoAzimuthalEqualArea:()=>ZY,geoAzimuthalEqualAreaRaw:()=>xw,geoAzimuthalEquidistant:()=>XY,geoAzimuthalEquidistantRaw:()=>Mw,geoBounds:()=>oY,geoCentroid:()=>fY,geoCircle:()=>dY,geoClipAntimeridian:()=>iw,geoClipCircle:()=>IA,geoClipExtent:()=>bY,geoClipRectangle:()=>Zg,geoConicConformal:()=>eK,geoConicConformalRaw:()=>uk,geoConicEqualArea:()=>cm,geoConicEqualAreaRaw:()=>ik,geoConicEquidistant:()=>nK,geoConicEquidistantRaw:()=>ck,geoContains:()=>MY,geoDistance:()=>em,geoEqualEarth:()=>iK,geoEqualEarthRaw:()=>Iw,geoEquirectangular:()=>tK,geoEquirectangularRaw:()=>td,geoGnomonic:()=>oK,geoGnomonicRaw:()=>Sw,geoGraticule:()=>LA,geoGraticule10:()=>IY,geoIdentity:()=>sK,geoInterpolate:()=>SY,geoLength:()=>SA,geoMercator:()=>JY,geoMercatorRaw:()=>ed,geoNaturalEarth1:()=>aK,geoNaturalEarth1Raw:()=>Tw,geoOrthographic:()=>uK,geoOrthographicRaw:()=>Nw,geoPath:()=>VY,geoProjection:()=>ko,geoProjectionMutator:()=>Ew,geoRotation:()=>bA,geoStereographic:()=>cK,geoStereographicRaw:()=>Aw,geoStream:()=>zi,geoTransform:()=>HY,geoTransverseMercator:()=>lK,geoTransverseMercatorRaw:()=>kw,gray:()=>qG,hcl:()=>yg,hierarchy:()=>Ow,histogram:()=>tU,hsl:()=>Xp,html:()=>hW,image:()=>cW,interpolate:()=>Tf,interpolateArray:()=>tz,interpolateBasis:()=>y2,interpolateBasisClosed:()=>v2,interpolateBlues:()=>qX,interpolateBrBG:()=>xX,interpolateBuGn:()=>RX,interpolateBuPu:()=>PX,interpolateCividis:()=>XX,interpolateCool:()=>tJ,interpolateCubehelix:()=>gQ,interpolateCubehelixDefault:()=>JX,interpolateCubehelixLong:()=>ym,interpolateDate:()=>C2,interpolateDiscrete:()=>oQ,interpolateGnBu:()=>FX,interpolateGreens:()=>WX,interpolateGreys:()=>YX,interpolateHcl:()=>hQ,interpolateHclLong:()=>pQ,interpolateHsl:()=>lQ,interpolateHslLong:()=>fQ,interpolateHue:()=>sQ,interpolateInferno:()=>cJ,interpolateLab:()=>dQ,interpolateMagma:()=>uJ,interpolateNumber:()=>mi,interpolateNumberArray:()=>Y1,interpolateObject:()=>x2,interpolateOrRd:()=>LX,interpolateOranges:()=>ZX,interpolatePRGn:()=>MX,interpolatePiYG:()=>IX,interpolatePlasma:()=>lJ,interpolatePuBu:()=>jX,interpolatePuBuGn:()=>BX,interpolatePuOr:()=>SX,interpolatePuRd:()=>VX,interpolatePurples:()=>KX,interpolateRainbow:()=>nJ,interpolateRdBu:()=>TX,interpolateRdGy:()=>NX,interpolateRdPu:()=>HX,interpolateRdYlBu:()=>AX,interpolateRdYlGn:()=>kX,interpolateReds:()=>QX,interpolateRgb:()=>Sf,interpolateRgbBasis:()=>_2,interpolateRgbBasisClosed:()=>ez,interpolateRound:()=>Mk,interpolateSinebow:()=>oJ,interpolateSpectral:()=>OX,interpolateString:()=>Z1,interpolateTransformCss:()=>F2,interpolateTransformSvg:()=>L2,interpolateTurbo:()=>sJ,interpolateViridis:()=>aJ,interpolateWarm:()=>eJ,interpolateYlGn:()=>$X,interpolateYlGnBu:()=>UX,interpolateYlOrBr:()=>zX,interpolateYlOrRd:()=>GX,interpolateZoom:()=>Tk,interrupt:()=>Ea,interval:()=>_ee,isoFormat:()=>yee,isoParse:()=>wee,json:()=>fW,keys:()=>UG,lab:()=>mg,lch:()=>WG,line:()=>l_,lineRadial:()=>FR,linkHorizontal:()=>kJ,linkRadial:()=>RJ,linkVertical:()=>OJ,local:()=>TR,map:()=>Ms,matcher:()=>B1,max:()=>qT,mean:()=>iU,median:()=>oU,merge:()=>R1,min:()=>WT,mouse:()=>_a,namespace:()=>Cf,namespaces:()=>V1,nest:()=>BG,now:()=>mc,pack:()=>$K,packEnclose:()=>fk,packSiblings:()=>VK,pairs:()=>KH,partition:()=>zK,path:()=>xa,permute:()=>sU,pie:()=>MJ,piecewise:()=>mQ,pointRadial:()=>Dd,polygonArea:()=>vQ,polygonCentroid:()=>bQ,polygonContains:()=>EQ,polygonHull:()=>DQ,polygonLength:()=>CQ,precisionFixed:()=>GN,precisionPrefix:()=>qN,precisionRound:()=>WN,quadtree:()=>Eg,quantile:()=>Df,quantize:()=>yQ,radialArea:()=>LR,radialLine:()=>FR,randomBates:()=>IQ,randomExponential:()=>SQ,randomIrwinHall:()=>Pk,randomLogNormal:()=>MQ,randomNormal:()=>Rk,randomUniform:()=>xQ,range:()=>ni,rgb:()=>pc,ribbon:()=>LG,scaleBand:()=>Hw,scaleDiverging:()=>JO,scaleDivergingLog:()=>eR,scaleDivergingPow:()=>o_,scaleDivergingSqrt:()=>pX,scaleDivergingSymlog:()=>tR,scaleIdentity:()=>$k,scaleImplicit:()=>jw,scaleLinear:()=>Uk,scaleLog:()=>Yk,scaleOrdinal:()=>Vw,scalePoint:()=>TQ,scalePow:()=>Ww,scaleQuantile:()=>Jk,scaleQuantize:()=>eO,scaleSequential:()=>KO,scaleSequentialLog:()=>QO,scaleSequentialPow:()=>i_,scaleSequentialQuantile:()=>XO,scaleSequentialSqrt:()=>hX,scaleSequentialSymlog:()=>ZO,scaleSqrt:()=>VQ,scaleSymlog:()=>Zk,scaleThreshold:()=>tO,scaleTime:()=>uX,scaleUtc:()=>dX,scan:()=>aU,schemeAccent:()=>mX,schemeBlues:()=>ER,schemeBrBG:()=>nR,schemeBuGn:()=>fR,schemeBuPu:()=>dR,schemeCategory10:()=>gX,schemeDark2:()=>yX,schemeGnBu:()=>hR,schemeGreens:()=>CR,schemeGreys:()=>xR,schemeOrRd:()=>pR,schemeOranges:()=>SR,schemePRGn:()=>rR,schemePaired:()=>vX,schemePastel1:()=>bX,schemePastel2:()=>wX,schemePiYG:()=>iR,schemePuBu:()=>mR,schemePuBuGn:()=>gR,schemePuOr:()=>oR,schemePuRd:()=>yR,schemePurples:()=>MR,schemeRdBu:()=>sR,schemeRdGy:()=>aR,schemeRdPu:()=>vR,schemeRdYlBu:()=>uR,schemeRdYlGn:()=>cR,schemeReds:()=>IR,schemeSet1:()=>_X,schemeSet2:()=>DX,schemeSet3:()=>EX,schemeSpectral:()=>lR,schemeTableau10:()=>CX,schemeYlGn:()=>wR,schemeYlGnBu:()=>bR,schemeYlOrBr:()=>_R,schemeYlOrRd:()=>DR,select:()=>rn,selectAll:()=>hJ,selection:()=>cc,selector:()=>qp,selectorAll:()=>L1,set:()=>HG,shuffle:()=>uU,stack:()=>see,stackOffsetDiverging:()=>uee,stackOffsetExpand:()=>aee,stackOffsetNone:()=>Pc,stackOffsetSilhouette:()=>cee,stackOffsetWiggle:()=>lee,stackOrderAppearance:()=>sP,stackOrderAscending:()=>aP,stackOrderDescending:()=>dee,stackOrderInsideOut:()=>hee,stackOrderNone:()=>Fc,stackOrderReverse:()=>pee,stratify:()=>YK,style:()=>ba,sum:()=>cU,svg:()=>pW,symbol:()=>HJ,symbolCircle:()=>p_,symbolCross:()=>BR,symbolDiamond:()=>VR,symbolSquare:()=>$R,symbolStar:()=>UR,symbolTriangle:()=>zR,symbolWye:()=>GR,symbols:()=>VJ,text:()=>Dg,thresholdFreedmanDiaconis:()=>nU,thresholdScott:()=>rU,thresholdSturges:()=>O1,tickFormat:()=>Hk,tickIncrement:()=>_f,tickStep:()=>va,ticks:()=>k1,timeDay:()=>Dm,timeDays:()=>KQ,timeFormat:()=>e_,timeFormatDefaultLocale:()=>HO,timeFormatLocale:()=>xO,timeFriday:()=>uO,timeFridays:()=>WQ,timeHour:()=>hO,timeHours:()=>QQ,timeInterval:()=>Zn,timeMillisecond:()=>xm,timeMilliseconds:()=>vO,timeMinute:()=>gO,timeMinutes:()=>ZQ,timeMonday:()=>fd,timeMondays:()=>$Q,timeMonth:()=>rO,timeMonths:()=>UQ,timeParse:()=>VO,timeSaturday:()=>cO,timeSaturdays:()=>YQ,timeSecond:()=>Em,timeSeconds:()=>yO,timeSunday:()=>ld,timeSundays:()=>lO,timeThursday:()=>ja,timeThursdays:()=>qQ,timeTuesday:()=>sO,timeTuesdays:()=>zQ,timeWednesday:()=>aO,timeWednesdays:()=>GQ,timeWeek:()=>ld,timeWeeks:()=>lO,timeYear:()=>Fa,timeYears:()=>HQ,timeout:()=>eb,timer:()=>og,timerFlush:()=>S2,touch:()=>Nf,touches:()=>pJ,transition:()=>ub,transpose:()=>YT,tree:()=>eQ,treemap:()=>tQ,treemapBinary:()=>nQ,treemapDice:()=>ad,treemapResquarify:()=>iQ,treemapSlice:()=>mm,treemapSliceDice:()=>rQ,treemapSquarify:()=>xk,tsv:()=>uW,tsvFormat:()=>Eq,tsvFormatBody:()=>Cq,tsvFormatRow:()=>Mq,tsvFormatRows:()=>xq,tsvFormatValue:()=>Iq,tsvParse:()=>EN,tsvParseRows:()=>Dq,utcDay:()=>Mm,utcDays:()=>iZ,utcFormat:()=>Im,utcFriday:()=>_O,utcFridays:()=>nZ,utcHour:()=>qO,utcHours:()=>lX,utcMillisecond:()=>xm,utcMilliseconds:()=>vO,utcMinute:()=>YO,utcMinutes:()=>fX,utcMonday:()=>hd,utcMondays:()=>XQ,utcMonth:()=>zO,utcMonths:()=>cX,utcParse:()=>t_,utcSaturday:()=>DO,utcSaturdays:()=>rZ,utcSecond:()=>Em,utcSeconds:()=>yO,utcSunday:()=>dd,utcSundays:()=>EO,utcThursday:()=>Ha,utcThursdays:()=>tZ,utcTuesday:()=>bO,utcTuesdays:()=>JQ,utcWednesday:()=>wO,utcWednesdays:()=>eZ,utcWeek:()=>dd,utcWeeks:()=>EO,utcYear:()=>Ua,utcYears:()=>oZ,values:()=>$G,variance:()=>$T,version:()=>qH,voronoi:()=>Vee,window:()=>H1,xml:()=>dW,zip:()=>fU,zoom:()=>bP,zoomIdentity:()=>zm,zoomTransform:()=>M_});let P=null,S=1;const k=Symbol("SIGNAL");function x(e){const t=P;return P=e,t}function et(e){if((!pe(e)||e.dirty)&&(e.dirty||e.lastCleanEpoch!==S)){if(!e.producerMustRecompute(e)&&!$e(e))return e.dirty=!1,void(e.lastCleanEpoch=S);e.producerRecomputeValue(e),e.dirty=!1,e.lastCleanEpoch=S}}function $e(e){De(e);for(let t=0;t<e.producerNode.length;t++){const n=e.producerNode[t],r=e.producerLastReadVersion[t];if(r!==n.version||(et(n),r!==n.version))return!0}return!1}function se(e,t){if(function xe(e){e.liveConsumerNode??=[],e.liveConsumerIndexOfThis??=[]}(e),De(e),1===e.liveConsumerNode.length)for(let r=0;r<e.producerNode.length;r++)se(e.producerNode[r],e.producerIndexOfThis[r]);const n=e.liveConsumerNode.length-1;if(e.liveConsumerNode[t]=e.liveConsumerNode[n],e.liveConsumerIndexOfThis[t]=e.liveConsumerIndexOfThis[n],e.liveConsumerNode.length--,e.liveConsumerIndexOfThis.length--,t<e.liveConsumerNode.length){const r=e.liveConsumerIndexOfThis[t],i=e.liveConsumerNode[t];De(i),i.producerIndexOfThis[r]=t}}function pe(e){return e.consumerIsAlwaysLive||(e?.liveConsumerNode?.length??0)>0}function De(e){e.producerNode??=[],e.producerIndexOfThis??=[],e.producerLastReadVersion??=[]}let za=null;function Vn(e){return"function"==typeof e}let Ci=!1;const ar={Promise:void 0,set useDeprecatedSynchronousErrorHandling(e){if(e){const t=new Error;console.warn("DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n"+t.stack)}else Ci&&console.log("RxJS: Back to a better error behavior. Thank you. <3");Ci=e},get useDeprecatedSynchronousErrorHandling(){return Ci}};function ui(e){setTimeout(()=>{throw e},0)}const _r={closed:!0,next(e){},error(e){if(ar.useDeprecatedSynchronousErrorHandling)throw e;ui(e)},complete(){}},Td=Array.isArray||(e=>e&&"number"==typeof e.length),Yi=(()=>{function e(t){return Error.call(this),this.message=t?`${t.length} errors occurred during unsubscription:\n${t.map((n,r)=>`${r+1}) ${n.toString()}`).join("\n ")}`:"",this.name="UnsubscriptionError",this.errors=t,this}return e.prototype=Object.create(Error.prototype),e})();class ln{constructor(t){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,t&&(this._ctorUnsubscribe=!0,this._unsubscribe=t)}unsubscribe(){let t;if(this.closed)return;let{_parentOrParents:n,_ctorUnsubscribe:r,_unsubscribe:i,_subscriptions:o}=this;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,n instanceof ln)n.remove(this);else if(null!==n)for(let s=0;s<n.length;++s)n[s].remove(this);if(Vn(i)){r&&(this._unsubscribe=void 0);try{i.call(this)}catch(s){t=s instanceof Yi?qa(s.errors):[s]}}if(Td(o)){let s=-1,a=o.length;for(;++s<a;){const u=o[s];if(null!==(e=u)&&"object"==typeof e)try{u.unsubscribe()}catch(c){t=t||[],c instanceof Yi?t=t.concat(qa(c.errors)):t.push(c)}}}var e;if(t)throw new Yi(t)}add(t){let n=t;if(!t)return ln.EMPTY;switch(typeof t){case"function":n=new ln(t);case"object":if(n===this||n.closed||"function"!=typeof n.unsubscribe)return n;if(this.closed)return n.unsubscribe(),n;if(!(n instanceof ln)){const o=n;n=new ln,n._subscriptions=[o]}break;default:throw new Error("unrecognized teardown "+t+" added to Subscription.")}let{_parentOrParents:r}=n;if(null===r)n._parentOrParents=this;else if(r instanceof ln){if(r===this)return n;n._parentOrParents=[r,this]}else{if(-1!==r.indexOf(this))return n;r.push(this)}const i=this._subscriptions;return null===i?this._subscriptions=[n]:i.push(n),n}remove(t){const n=this._subscriptions;if(n){const r=n.indexOf(t);-1!==r&&n.splice(r,1)}}}var e;function qa(e){return e.reduce((t,n)=>t.concat(n instanceof Yi?n.errors:n),[])}ln.EMPTY=((e=new ln).closed=!0,e);const Ki="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random();class ur extends ln{constructor(t,n,r){switch(super(),this.syncErrorValue=null,this.syncErrorThrown=!1,this.syncErrorThrowable=!1,this.isStopped=!1,arguments.length){case 0:this.destination=_r;break;case 1:if(!t){this.destination=_r;break}if("object"==typeof t){t instanceof ur?(this.syncErrorThrowable=t.syncErrorThrowable,this.destination=t,t.add(this)):(this.syncErrorThrowable=!0,this.destination=new Qi(this,t));break}default:this.syncErrorThrowable=!0,this.destination=new Qi(this,t,n,r)}}[Ki](){return this}static create(t,n,r){const i=new ur(t,n,r);return i.syncErrorThrowable=!1,i}next(t){this.isStopped||this._next(t)}error(t){this.isStopped||(this.isStopped=!0,this._error(t))}complete(){this.isStopped||(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe())}_next(t){this.destination.next(t)}_error(t){this.destination.error(t),this.unsubscribe()}_complete(){this.destination.complete(),this.unsubscribe()}_unsubscribeAndRecycle(){const{_parentOrParents:t}=this;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=t,this}}class Qi extends ur{constructor(t,n,r,i){super(),this._parentSubscriber=t;let o,s=this;Vn(n)?o=n:n&&(o=n.next,r=n.error,i=n.complete,n!==_r&&(s=Object.create(n),Vn(s.unsubscribe)&&this.add(s.unsubscribe.bind(s)),s.unsubscribe=this.unsubscribe.bind(this))),this._context=s,this._next=o,this._error=r,this._complete=i}next(t){if(!this.isStopped&&this._next){const{_parentSubscriber:n}=this;ar.useDeprecatedSynchronousErrorHandling&&n.syncErrorThrowable?this.__tryOrSetError(n,this._next,t)&&this.unsubscribe():this.__tryOrUnsub(this._next,t)}}error(t){if(!this.isStopped){const{_parentSubscriber:n}=this,{useDeprecatedSynchronousErrorHandling:r}=ar;if(this._error)r&&n.syncErrorThrowable?(this.__tryOrSetError(n,this._error,t),this.unsubscribe()):(this.__tryOrUnsub(this._error,t),this.unsubscribe());else if(n.syncErrorThrowable)r?(n.syncErrorValue=t,n.syncErrorThrown=!0):ui(t),this.unsubscribe();else{if(this.unsubscribe(),r)throw t;ui(t)}}}complete(){if(!this.isStopped){const{_parentSubscriber:t}=this;if(this._complete){const n=()=>this._complete.call(this._context);ar.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?(this.__tryOrSetError(t,n),this.unsubscribe()):(this.__tryOrUnsub(n),this.unsubscribe())}else this.unsubscribe()}}__tryOrUnsub(t,n){try{t.call(this._context,n)}catch(r){if(this.unsubscribe(),ar.useDeprecatedSynchronousErrorHandling)throw r;ui(r)}}__tryOrSetError(t,n,r){if(!ar.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{n.call(this._context,r)}catch(i){return ar.useDeprecatedSynchronousErrorHandling?(t.syncErrorValue=i,t.syncErrorThrown=!0,!0):(ui(i),!0)}return!1}_unsubscribe(){const{_parentSubscriber:t}=this;this._context=null,this._parentSubscriber=null,t.unsubscribe()}}const Zi="function"==typeof Symbol&&Symbol.observable||"@@observable";function nt(e){return e}let Yr=(()=>{class e{constructor(n){this._isScalar=!1,n&&(this._subscribe=n)}lift(n){const r=new e;return r.source=this,r.operator=n,r}subscribe(n,r,i){const{operator:o}=this,s=function Vc(e,t,n){if(e){if(e instanceof ur)return e;if(e[Ki])return e[Ki]()}return e||t||n?new ur(e,t,n):new ur(_r)}(n,r,i);if(s.add(o?o.call(s,this.source):this.source||ar.useDeprecatedSynchronousErrorHandling&&!s.syncErrorThrowable?this._subscribe(s):this._trySubscribe(s)),ar.useDeprecatedSynchronousErrorHandling&&s.syncErrorThrowable&&(s.syncErrorThrowable=!1,s.syncErrorThrown))throw s.syncErrorValue;return s}_trySubscribe(n){try{return this._subscribe(n)}catch(r){ar.useDeprecatedSynchronousErrorHandling&&(n.syncErrorThrown=!0,n.syncErrorValue=r),function Wa(e){for(;e;){const{closed:t,destination:n,isStopped:r}=e;if(t||r)return!1;e=n&&n instanceof ur?n:null}return!0}(n)?n.error(r):console.warn(r)}}forEach(n,r){return new(r=We(r))((i,o)=>{let s;s=this.subscribe(a=>{try{n(a)}catch(u){o(u),s&&s.unsubscribe()}},o,i)})}_subscribe(n){const{source:r}=this;return r&&r.subscribe(n)}[Zi](){return this}pipe(...n){return 0===n.length?this:function Xi(e){return 0===e.length?nt:1===e.length?e[0]:function(n){return e.reduce((r,i)=>i(r),n)}}(n)(this)}toPromise(n){return new(n=We(n))((r,i)=>{let o;this.subscribe(s=>o=s,s=>i(s),()=>r(o))})}}return e.create=t=>new e(t),e})();function We(e){if(e||(e=ar.Promise||Promise),!e)throw new Error("no Promise impl found");return e}const Ji=(()=>{function e(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return e.prototype=Object.create(Error.prototype),e})();class Ka extends ln{constructor(t,n){super(),this.subject=t,this.subscriber=n,this.closed=!1}unsubscribe(){if(this.closed)return;this.closed=!0;const t=this.subject,n=t.observers;if(this.subject=null,!n||0===n.length||t.isStopped||t.closed)return;const r=n.indexOf(this.subscriber);-1!==r&&n.splice(r,1)}}class kd extends ur{constructor(t){super(t),this.destination=t}}let eo=(()=>{class e extends Yr{constructor(){super(),this.observers=[],this.closed=!1,this.isStopped=!1,this.hasError=!1,this.thrownError=null}[Ki](){return new kd(this)}lift(n){const r=new Od(this,this);return r.operator=n,r}next(n){if(this.closed)throw new Ji;if(!this.isStopped){const{observers:r}=this,i=r.length,o=r.slice();for(let s=0;s<i;s++)o[s].next(n)}}error(n){if(this.closed)throw new Ji;this.hasError=!0,this.thrownError=n,this.isStopped=!0;const{observers:r}=this,i=r.length,o=r.slice();for(let s=0;s<i;s++)o[s].error(n);this.observers.length=0}complete(){if(this.closed)throw new Ji;this.isStopped=!0;const{observers:n}=this,r=n.length,i=n.slice();for(let o=0;o<r;o++)i[o].complete();this.observers.length=0}unsubscribe(){this.isStopped=!0,this.closed=!0,this.observers=null}_trySubscribe(n){if(this.closed)throw new Ji;return super._trySubscribe(n)}_subscribe(n){if(this.closed)throw new Ji;return this.hasError?(n.error(this.thrownError),ln.EMPTY):this.isStopped?(n.complete(),ln.EMPTY):(this.observers.push(n),new Ka(this,n))}asObservable(){const n=new Yr;return n.source=this,n}}return e.create=(t,n)=>new Od(t,n),e})();class Od extends eo{constructor(t,n){super(),this.destination=t,this.source=n}next(t){const{destination:n}=this;n&&n.next&&n.next(t)}error(t){const{destination:n}=this;n&&n.error&&this.destination.error(t)}complete(){const{destination:t}=this;t&&t.complete&&this.destination.complete()}_subscribe(t){const{source:n}=this;return n?this.source.subscribe(t):ln.EMPTY}}class Ym extends eo{constructor(t){super(),this._value=t}get value(){return this.getValue()}_subscribe(t){const n=super._subscribe(t);return n&&!n.closed&&t.next(this._value),n}getValue(){if(this.hasError)throw this.thrownError;if(this.closed)throw new Ji;return this._value}next(t){super.next(this._value=t)}}class os{constructor(t,n){this.project=t,this.thisArg=n}call(t,n){return n.subscribe(new Hc(t,this.project,this.thisArg))}}class Hc extends ur{constructor(t,n,r){super(t),this.project=n,this.count=0,this.thisArg=r||this}_next(t){let n;try{n=this.project.call(this.thisArg,t,this.count++)}catch(r){return void this.destination.error(r)}this.destination.next(n)}}class Ae extends Error{constructor(t,n){super(function ss(e,t){return`NG0${Math.abs(e)}${t?": "+t:""}`}(t,n)),this.code=t}}function cr(e){return{toString:e}.toString()}const Gt=globalThis;function Ot(e){for(let t in e)if(e[t]===Ot)return t;throw Error("Could not find renamed property on target object.")}function mn(e){if("string"==typeof e)return e;if(Array.isArray(e))return"["+e.map(mn).join(", ")+"]";if(null==e)return""+e;if(e.overriddenName)return`${e.overriddenName}`;if(e.name)return`${e.name}`;const t=e.toString();if(null==t)return""+t;const n=t.indexOf("\n");return-1===n?t:t.substring(0,n)}function cs(e,t){return null==e||""===e?null===t?"":t:null==t||""===t?e:e+" "+t}const zc=Ot({__forward_ref__:Ot});function Si(e){return e.__forward_ref__=Si,e.toString=function(){return mn(this())},e}function ft(e){return function Po(e){return"function"==typeof e&&e.hasOwnProperty(zc)&&e.__forward_ref__===Si}(e)?e():e}function At(e){return{token:e.token,providedIn:e.providedIn||null,factory:e.factory,value:void 0}}function Fo(e){return{providers:e.providers||[],imports:e.imports||[]}}function Jn(e){return Us(e,zs)||Us(e,Kr)}function Us(e,t){return e.hasOwnProperty(t)?e[t]:null}function $s(e){return e&&(e.hasOwnProperty(An)||e.hasOwnProperty(Gs))?e[An]:null}const zs=Ot({\u0275prov:Ot}),An=Ot({\u0275inj:Ot}),Kr=Ot({ngInjectableDef:Ot}),Gs=Ot({ngInjectorDef:Ot});class ut{constructor(t,n){this._desc=t,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,"number"==typeof n?this.__NG_ELEMENT_ID__=n:void 0!==n&&(this.\u0275prov=At({token:this,providedIn:n.providedIn||"root",factory:n.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}}function Wc(e){return e&&!!e.\u0275providers}const Ni=Ot({\u0275cmp:Ot}),Yc=Ot({\u0275dir:Ot}),Kc=Ot({\u0275pipe:Ot}),Ws=Ot({\u0275mod:Ot}),Hr=Ot({\u0275fac:Ot}),Lo=Ot({__NG_ELEMENT_ID__:Ot}),Hd=Ot({__NG_ENV_ID__:Ot});function wt(e){return"string"==typeof e?e:null==e?"":String(e)}function ls(e,t){throw new Ae(-201,!1)}var Ft=function(e){return e[e.Default=0]="Default",e[e.Host=1]="Host",e[e.Self=2]="Self",e[e.SkipSelf=4]="SkipSelf",e[e.Optional=8]="Optional",e}(Ft||{});let Xc;function Ys(){return Xc}function er(e){const t=Xc;return Xc=e,t}function iu(e,t,n){const r=Jn(e);return r&&"root"==r.providedIn?void 0===r.value?r.value=r.factory():r.value:n&Ft.Optional?null:void 0!==t?t:void ls()}const kn={},Bo="__NG_DI_FLAG__",ro="ngTempTokenPath",ou=/\n/gm,Jc="__source";let Ai;function fr(e){const t=Ai;return Ai=e,t}function tl(e,t=Ft.Default){if(void 0===Ai)throw new Ae(-203,!1);return null===Ai?iu(e,void 0,t):Ai.get(e,t&Ft.Optional?null:void 0,t)}function Rt(e,t=Ft.Default){return(Ys()||tl)(ft(e),t)}function _t(e,t=Ft.Default){return Rt(e,Qs(t))}function Qs(e){return typeof e>"u"||"number"==typeof e?e:(e.optional&&8)|(e.host&&1)|(e.self&&2)|(e.skipSelf&&4)}function nl(e){const t=[];for(let n=0;n<e.length;n++){const r=ft(e[n]);if(Array.isArray(r)){if(0===r.length)throw new Ae(900,!1);let i,o=Ft.Default;for(let s=0;s<r.length;s++){const a=r[s],u=su(a);"number"==typeof u?-1===u?i=a.token:o|=u:i=a}t.push(Rt(i,o))}else t.push(Rt(r))}return t}function su(e){return e[Bo]}function io(e,t){return e.hasOwnProperty(Hr)?e[Hr]:null}function oo(e,t){e.forEach(n=>Array.isArray(n)?oo(n,t):t(n))}function al(e,t,n){t>=e.length?e.push(n):e.splice(t,0,n)}function Zs(e,t){return t>=e.length-1?e.pop():e.splice(t,1)[0]}function Ht(e,t,n){let r=Gn(e,t);return r>=0?e[1|r]=n:(r=~r,function Xs(e,t,n,r){let i=e.length;if(i==t)e.push(n,r);else if(1===i)e.push(r,e[0]),e[0]=n;else{for(i--,e.push(e[i-1],e[i]);i>t;)e[i]=e[i-2],i--;e[t]=n,e[t+1]=r}}(e,r,t,n)),r}function fs(e,t){const n=Gn(e,t);if(n>=0)return e[1|n]}function Gn(e,t){return function uu(e,t,n){let r=0,i=e.length>>n;for(;i!==r;){const o=r+(i-r>>1),s=e[o<<n];if(t===s)return o<<n;s>t?i=o:r=o+1}return~(i<<n)}(e,t,1)}const Qr={},St=[],ao=new ut(""),Vo=new ut("",-1),li=new ut("");class Js{get(t,n=kn){if(n===kn){const r=new Error(`NullInjectorError: No provider for ${mn(t)}!`);throw r.name="NullInjectorError",r}return n}}var f=function(e){return e[e.OnPush=0]="OnPush",e[e.Default=1]="Default",e}(f||{}),p=function(e){return e[e.Emulated=0]="Emulated",e[e.None=2]="None",e[e.ShadowDom=3]="ShadowDom",e}(p||{}),m=function(e){return e[e.None=0]="None",e[e.SignalBased=1]="SignalBased",e[e.HasDecoratorInputTransform=2]="HasDecoratorInputTransform",e}(m||{});function w(e,t,n){let r=e.length;for(;;){const i=e.indexOf(t,n);if(-1===i)return i;if(0===i||e.charCodeAt(i-1)<=32){const o=t.length;if(i+o===r||e.charCodeAt(i+o)<=32)return i}n=i+1}}function D(e,t,n){let r=0;for(;r<n.length;){const i=n[r];if("number"==typeof i){if(0!==i)break;r++;const o=n[r++],s=n[r++],a=n[r++];e.setAttribute(t,s,a,o)}else{const o=i,s=n[++r];N(o)?e.setProperty(t,o,s):e.setAttribute(t,o,s),r++}}return r}function M(e){return 3===e||4===e||6===e}function N(e){return 64===e.charCodeAt(0)}function O(e,t){if(null!==t&&0!==t.length)if(null===e||0===e.length)e=t.slice();else{let n=-1;for(let r=0;r<t.length;r++){const i=t[r];"number"==typeof i?n=i:0===n||H(e,n,i,null,-1===n||2===n?t[++r]:null)}}return e}function H(e,t,n,r,i){let o=0,s=e.length;if(-1===t)s=-1;else for(;o<e.length;){const a=e[o++];if("number"==typeof a){if(a===t){s=-1;break}if(a>t){s=o-1;break}}}for(;o<e.length;){const a=e[o];if("number"==typeof a)break;if(a===n){if(null===r)return void(null!==i&&(e[o+1]=i));if(r===e[o+1])return void(e[o+2]=i)}o++,null!==r&&o++,null!==i&&o++}-1!==s&&(e.splice(s,0,t),o=s+1),e.splice(o++,0,n),null!==r&&e.splice(o++,0,r),null!==i&&e.splice(o++,0,i)}const W="ng-template";function Q(e,t,n,r){let i=0;if(r){for(;i<t.length&&"string"==typeof t[i];i+=2)if("class"===t[i]&&-1!==w(t[i+1].toLowerCase(),n,0))return!0}else if(F(e))return!1;if(i=t.indexOf(1,i),i>-1){let o;for(;++i<t.length&&"string"==typeof(o=t[i]);)if(o.toLowerCase()===n)return!0}return!1}function F(e){return 4===e.type&&e.value!==W}function ee(e,t,n){return t===(4!==e.type||n?e.value:W)}function U(e,t,n){let r=4;const i=e.attrs,o=null!==i?function ue(e){for(let t=0;t<e.length;t++)if(M(e[t]))return t;return e.length}(i):0;let s=!1;for(let a=0;a<t.length;a++){const u=t[a];if("number"!=typeof u){if(!s)if(4&r){if(r=2|1&r,""!==u&&!ee(e,u,n)||""===u&&1===t.length){if(Y(r))return!1;s=!0}}else if(8&r){if(null===i||!Q(e,i,u,n)){if(Y(r))return!1;s=!0}}else{const c=t[++a],l=Z(u,i,F(e),n);if(-1===l){if(Y(r))return!1;s=!0;continue}if(""!==c){let d;if(d=l>o?"":i[l+1].toLowerCase(),2&r&&c!==d){if(Y(r))return!1;s=!0}}}}else{if(!s&&!Y(r)&&!Y(u))return!1;if(s&&Y(u))continue;s=!1,r=u|1&r}}return Y(r)||s}function Y(e){return!(1&e)}function Z(e,t,n,r){if(null===t)return-1;let i=0;if(r||!n){let o=!1;for(;i<t.length;){const s=t[i];if(s===e)return i;if(3===s||6===s)o=!0;else{if(1===s||2===s){let a=t[++i];for(;"string"==typeof a;)a=t[++i];continue}if(4===s)break;if(0===s){i+=4;continue}}i+=o?1:2}return-1}return function ce(e,t){let n=e.indexOf(4);if(n>-1)for(n++;n<e.length;){const r=e[n];if("number"==typeof r)return-1;if(r===t)return n;n++}return-1}(t,e)}function K(e,t,n=!1){for(let r=0;r<t.length;r++)if(U(e,t[r],n))return!0;return!1}function ke(e,t){return e?":not("+t.trim()+")":t}function Ve(e){let t=e[0],n=1,r=2,i="",o=!1;for(;n<e.length;){let s=e[n];if("string"==typeof s)if(2&r){const a=e[++n];i+="["+s+(a.length>0?'="'+a+'"':"")+"]"}else 8&r?i+="."+s:4&r&&(i+=" "+s);else""!==i&&!Y(s)&&(t+=ke(o,i),i=""),r=s,o=o||!Y(r);n++}return""!==i&&(t+=ke(o,i)),t}function Ge(e){return cr(()=>{const t=uo(e),n={...t,decls:e.decls,vars:e.vars,template:e.template,consts:e.consts||null,ngContentSelectors:e.ngContentSelectors,onPush:e.changeDetection===f.OnPush,directiveDefs:null,pipeDefs:null,dependencies:t.standalone&&e.dependencies||null,getStandaloneInjector:null,signals:e.signals??!1,data:e.data||{},encapsulation:e.encapsulation||p.Emulated,styles:e.styles||St,_:null,schemas:e.schemas||null,tView:null,id:""};cu(n);const r=e.dependencies;return n.directiveDefs=Qd(r,!1),n.pipeDefs=Qd(r,!0),n.id=function IP(e){let t=0;const n=[e.selectors,e.ngContentSelectors,e.hostVars,e.hostAttrs,e.consts,e.vars,e.decls,e.encapsulation,e.standalone,e.signals,e.exportAs,JSON.stringify(e.inputs),JSON.stringify(e.outputs),Object.getOwnPropertyNames(e.type.prototype),!!e.contentQueries,!!e.viewQuery].join("|");for(const i of n)t=Math.imul(31,t)+i.charCodeAt(0)|0;return t+=2147483648,"c"+t}(n),n})}function je(e){return He(e)||Vt(e)}function Ke(e){return null!==e}function gt(e){return cr(()=>({type:e.type,bootstrap:e.bootstrap||St,declarations:e.declarations||St,imports:e.imports||St,exports:e.exports||St,transitiveCompileScopes:null,schemas:e.schemas||null,id:e.id||null}))}function Tt(e,t){if(null==e)return Qr;const n={};for(const r in e)if(e.hasOwnProperty(r)){const i=e[r];let o,s,a=m.None;Array.isArray(i)?(a=i[0],o=i[1],s=i[2]??o):(o=i,s=i),t?(n[o]=a!==m.None?[r,a]:r,t[o]=s):n[o]=r}return n}function dt(e){return cr(()=>{const t=uo(e);return cu(t),t})}function He(e){return e[Ni]||null}function Vt(e){return e[Yc]||null}function qt(e){return e[Kc]||null}function uo(e){const t={};return{type:e.type,providersResolver:null,factory:null,hostBindings:e.hostBindings||null,hostVars:e.hostVars||0,hostAttrs:e.hostAttrs||null,contentQueries:e.contentQueries||null,declaredInputs:t,inputTransforms:null,inputConfig:e.inputs||Qr,exportAs:e.exportAs||null,standalone:!0===e.standalone,signals:!0===e.signals,selectors:e.selectors||St,viewQuery:e.viewQuery||null,features:e.features||null,setInput:null,findHostDirectiveDefs:null,hostDirectives:null,inputs:Tt(e.inputs,t),outputs:Tt(e.outputs),debugInfo:null}}function cu(e){e.features?.forEach(t=>t(e))}function Qd(e,t){if(!e)return null;const n=t?qt:je;return()=>("function"==typeof e?e():e).map(r=>n(r)).filter(Ke)}function SP(...e){return{\u0275providers:n0(0,e),\u0275fromNgModule:!0}}function n0(e,...t){const n=[],r=new Set;let i;const o=s=>{n.push(s)};return oo(t,s=>{const a=s;Xd(a,o,[],r)&&(i||=[],i.push(a))}),void 0!==i&&P_(i,o),n}function P_(e,t){for(let n=0;n<e.length;n++){const{ngModule:r,providers:i}=e[n];r0(i,o=>{t(o,r)})}}function Xd(e,t,n,r){if(!(e=ft(e)))return!1;let i=null,o=$s(e);const s=!o&&He(e);if(o||s){if(s&&!s.standalone)return!1;i=e}else{const u=e.ngModule;if(o=$s(u),!o)return!1;i=u}const a=r.has(i);if(s){if(a)return!1;if(r.add(i),s.dependencies){const u="function"==typeof s.dependencies?s.dependencies():s.dependencies;for(const c of u)Xd(c,t,n,r)}}else{if(!o)return!1;{if(null!=o.imports&&!a){let c;r.add(i);try{oo(o.imports,l=>{Xd(l,t,n,r)&&(c||=[],c.push(l))})}finally{}void 0!==c&&P_(c,t)}if(!a){const c=io(i)||(()=>new i);t({provide:i,useFactory:c,deps:St},i),t({provide:li,useValue:i,multi:!0},i),t({provide:ao,useValue:()=>Rt(i),multi:!0},i)}const u=o.providers;if(null!=u&&!a){const c=e;r0(u,l=>{t(l,c)})}}}return i!==e&&void 0!==e.providers}function r0(e,t){for(let n of e)Wc(n)&&(n=n.\u0275providers),Array.isArray(n)?r0(n,t):t(n)}const TP=Ot({provide:String,useValue:Ot});function o0(e){return null!==e&&"object"==typeof e&&TP in e}function ea(e){return"function"==typeof e}const s0=new ut(""),Jd={},AP={};let a0;function eh(){return void 0===a0&&(a0=new Js),a0}class co{}class lu extends co{get destroyed(){return this._destroyed}constructor(t,n,r,i){super(),this.parent=n,this.source=r,this.scopes=i,this.records=new Map,this._ngOnDestroyHooks=new Set,this._onDestroyHooks=[],this._destroyed=!1,c0(t,s=>this.processProvider(s)),this.records.set(Vo,fu(void 0,this)),i.has("environment")&&this.records.set(co,fu(void 0,this));const o=this.records.get(s0);null!=o&&"string"==typeof o.value&&this.scopes.add(o.value),this.injectorDefTypes=new Set(this.get(li,St,Ft.Self))}destroy(){this.assertNotDestroyed(),this._destroyed=!0;const t=x(null);try{for(const r of this._ngOnDestroyHooks)r.ngOnDestroy();const n=this._onDestroyHooks;this._onDestroyHooks=[];for(const r of n)r()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),x(t)}}onDestroy(t){return this.assertNotDestroyed(),this._onDestroyHooks.push(t),()=>this.removeOnDestroy(t)}runInContext(t){this.assertNotDestroyed();const n=fr(this),r=er(void 0);try{return t()}finally{fr(n),er(r)}}get(t,n=kn,r=Ft.Default){if(this.assertNotDestroyed(),t.hasOwnProperty(Hd))return t[Hd](this);r=Qs(r);const o=fr(this),s=er(void 0);try{if(!(r&Ft.SkipSelf)){let u=this.records.get(t);if(void 0===u){const c=function FP(e){return"function"==typeof e||"object"==typeof e&&e instanceof ut}(t)&&Jn(t);u=c&&this.injectableDefInScope(c)?fu(u0(t),Jd):null,this.records.set(t,u)}if(null!=u)return this.hydrate(t,u)}return(r&Ft.Self?eh():this.parent).get(t,n=r&Ft.Optional&&n===kn?null:n)}catch(a){if("NullInjectorError"===a.name){if((a[ro]=a[ro]||[]).unshift(mn(t)),o)throw a;return function e0(e,t,n,r){const i=e[ro];throw t[Jc]&&i.unshift(t[Jc]),e.message=function rl(e,t,n,r=null){e=e&&"\n"===e.charAt(0)&&"\u0275"==e.charAt(1)?e.slice(2):e;let i=mn(t);if(Array.isArray(t))i=t.map(mn).join(" -> ");else if("object"==typeof t){let o=[];for(let s in t)if(t.hasOwnProperty(s)){let a=t[s];o.push(s+":"+("string"==typeof a?JSON.stringify(a):mn(a)))}i=`{${o.join(", ")}}`}return`${n}${r?"("+r+")":""}[${i}]: ${e.replace(ou,"\n ")}`}("\n"+e.message,i,n,r),e.ngTokenPath=i,e[ro]=null,e}(a,t,"R3InjectorError",this.source)}throw a}finally{er(s),fr(o)}}resolveInjectorInitializers(){const t=x(null),n=fr(this),r=er(void 0);try{const o=this.get(ao,St,Ft.Self);for(const s of o)s()}finally{fr(n),er(r),x(t)}}toString(){const t=[],n=this.records;for(const r of n.keys())t.push(mn(r));return`R3Injector[${t.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new Ae(205,!1)}processProvider(t){let n=ea(t=ft(t))?t:ft(t&&t.provide);const r=function OP(e){return o0(e)?fu(void 0,e.useValue):fu(function B_(e,t,n){let r;if(ea(e)){const i=ft(e);return io(i)||u0(i)}if(o0(e))r=()=>ft(e.useValue);else if(function L_(e){return!(!e||!e.useFactory)}(e))r=()=>e.useFactory(...nl(e.deps||[]));else if(function F_(e){return!(!e||!e.useExisting)}(e))r=()=>Rt(ft(e.useExisting));else{const i=ft(e&&(e.useClass||e.provide));if(!function RP(e){return!!e.deps}(e))return io(i)||u0(i);r=()=>new i(...nl(e.deps))}return r}(e),Jd)}(t);if(!ea(t)&&!0===t.multi){let i=this.records.get(n);i||(i=fu(void 0,Jd,!0),i.factory=()=>nl(i.multi),this.records.set(n,i)),n=t,i.multi.push(t)}this.records.set(n,r)}hydrate(t,n){const r=x(null);try{return n.value===Jd&&(n.value=AP,n.value=n.factory()),"object"==typeof n.value&&n.value&&function PP(e){return null!==e&&"object"==typeof e&&"function"==typeof e.ngOnDestroy}(n.value)&&this._ngOnDestroyHooks.add(n.value),n.value}finally{x(r)}}injectableDefInScope(t){if(!t.providedIn)return!1;const n=ft(t.providedIn);return"string"==typeof n?"any"===n||this.scopes.has(n):this.injectorDefTypes.has(n)}removeOnDestroy(t){const n=this._onDestroyHooks.indexOf(t);-1!==n&&this._onDestroyHooks.splice(n,1)}}function u0(e){const t=Jn(e),n=null!==t?t.factory:io(e);if(null!==n)return n;if(e instanceof ut)throw new Ae(204,!1);if(e instanceof Function)return function kP(e){if(e.length>0)throw new Ae(204,!1);const n=function no(e){return e&&(e[zs]||e[Kr])||null}(e);return null!==n?()=>n.factory(e):()=>new e}(e);throw new Ae(204,!1)}function fu(e,t,n=!1){return{factory:e,value:t,multi:n?[]:void 0}}function c0(e,t){for(const n of e)Array.isArray(n)?c0(n,t):n&&Wc(n)?c0(n.\u0275providers,t):t(n)}const En=0,Fe=1,st=2,Pn=3,ki=4,dr=5,Zr=6,hu=7,vn=8,Hn=9,Oi=10,vt=11,ll=12,U_=13,pu=14,xn=15,fl=16,gu=17,Ho=18,dl=19,$_=20,ds=21,rh=22,ta=23,Et=25,f0=1,lo=7,mu=9,Fn=10;var d0=function(e){return e[e.None=0]="None",e[e.HasTransplantedViews=2]="HasTransplantedViews",e}(d0||{});function hr(e){return Array.isArray(e)&&"object"==typeof e[f0]}function pr(e){return Array.isArray(e)&&!0===e[f0]}function h0(e){return!!(4&e.flags)}function na(e){return e.componentOffset>-1}function oh(e){return!(1&~e.flags)}function Ri(e){return!!e.template}function p0(e){return!!(512&e[st])}class KP{constructor(t,n,r){this.previousValue=t,this.currentValue=n,this.firstChange=r}isFirstChange(){return this.firstChange}}function W_(e,t,n,r){null!==t?t.applyValueToInputSignal(t,r):e[n]=r}function Y_(e){return e.type.prototype.ngOnChanges&&(e.setInput=ZP),QP}function QP(){const e=Q_(this),t=e?.current;if(t){const n=e.previous;if(n===Qr)e.previous=t;else for(let r in t)n[r]=t[r];e.current=null,this.ngOnChanges(t)}}function ZP(e,t,n,r,i){const o=this.declaredInputs[r],s=Q_(e)||function XP(e,t){return e[K_]=t}(e,{previous:Qr,current:null}),a=s.current||(s.current={}),u=s.previous,c=u[o];a[o]=new KP(c&&c.currentValue,n,u===Qr),W_(e,t,i,n)}const K_="__ngSimpleChanges__";function Q_(e){return e[K_]||null}const fo=function(e,t,n){};let J_=!1;function an(e){for(;Array.isArray(e);)e=e[En];return e}function Er(e,t){return an(t[e.index])}function gl(e,t){return e.data[t]}function Xr(e,t){const n=t[e];return hr(n)?n:n[En]}function b0(e){return!(128&~e[st])}function ho(e,t){return null==t?null:e[t]}function eD(e){e[gu]=0}function i3(e){1024&e[st]||(e[st]|=1024,b0(e)&&ml(e))}function w0(e){return!!(9216&e[st]||e[ta]?.dirty)}function _0(e){e[Oi].changeDetectionScheduler?.notify(1),w0(e)?ml(e):64&e[st]&&(function e3(){return J_}()?(e[st]|=1024,ml(e)):e[Oi].changeDetectionScheduler?.notify())}function ml(e){e[Oi].changeDetectionScheduler?.notify();let t=ra(e);for(;null!==t&&!(8192&t[st])&&(t[st]|=8192,b0(t));)t=ra(t)}function ah(e,t){if(!(256&~e[st]))throw new Ae(911,!1);null===e[ds]&&(e[ds]=[]),e[ds].push(t)}function ra(e){const t=e[Pn];return pr(t)?t[Pn]:t}const bt={lFrame:lD(null),bindingsEnabled:!0,skipHydrationRootTNode:null};function rD(){return bt.bindingsEnabled}function me(){return bt.lFrame.lView}function Bt(){return bt.lFrame.tView}function E0(e){return bt.lFrame.contextLView=e,e[vn]}function C0(e){return bt.lFrame.contextLView=null,e}function nn(){let e=iD();for(;null!==e&&64===e.type;)e=e.parent;return e}function iD(){return bt.lFrame.currentTNode}function po(e,t){const n=bt.lFrame;n.currentTNode=e,n.isParent=t}function x0(){return bt.lFrame.isParent}function Pi(){return bt.lFrame.bindingIndex++}function g3(e,t){const n=bt.lFrame;n.bindingIndex=n.bindingRootIndex=e,I0(t)}function I0(e){bt.lFrame.currentDirectiveIndex=e}function T0(){return bt.lFrame.currentQueryIndex}function uh(e){bt.lFrame.currentQueryIndex=e}function y3(e){const t=e[Fe];return 2===t.type?t.declTNode:1===t.type?e[dr]:null}function uD(e,t,n){if(n&Ft.SkipSelf){let i=t,o=e;for(;!(i=i.parent,null!==i||n&Ft.Host||(i=y3(o),null===i||(o=o[pu],10&i.type))););if(null===i)return!1;t=i,e=o}const r=bt.lFrame=cD();return r.currentTNode=t,r.lView=e,!0}function N0(e){const t=cD(),n=e[Fe];bt.lFrame=t,t.currentTNode=n.firstChild,t.lView=e,t.tView=n,t.contextLView=e,t.bindingIndex=n.bindingStartIndex,t.inI18n=!1}function cD(){const e=bt.lFrame,t=null===e?null:e.child;return null===t?lD(e):t}function lD(e){const t={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:e,child:null,inI18n:!1};return null!==e&&(e.child=t),t}function fD(){const e=bt.lFrame;return bt.lFrame=e.parent,e.currentTNode=null,e.lView=null,e}const dD=fD;function A0(){const e=fD();e.isParent=!0,e.tView=null,e.selectedIndex=-1,e.contextLView=null,e.elementDepthCount=0,e.currentDirectiveIndex=-1,e.currentNamespace=null,e.bindingRootIndex=-1,e.bindingIndex=-1,e.currentQueryIndex=0}function gr(){return bt.lFrame.selectedIndex}function ia(e){bt.lFrame.selectedIndex=e}function bn(){const e=bt.lFrame;return gl(e.tView,e.selectedIndex)}let gD=!0;function vl(){return gD}function go(e){gD=e}function ch(e,t){for(let n=t.directiveStart,r=t.directiveEnd;n<r;n++){const o=e.data[n].type.prototype,{ngAfterContentInit:s,ngAfterContentChecked:a,ngAfterViewInit:u,ngAfterViewChecked:c,ngOnDestroy:l}=o;s&&(e.contentHooks??=[]).push(-n,s),a&&((e.contentHooks??=[]).push(n,a),(e.contentCheckHooks??=[]).push(n,a)),u&&(e.viewHooks??=[]).push(-n,u),c&&((e.viewHooks??=[]).push(n,c),(e.viewCheckHooks??=[]).push(n,c)),null!=l&&(e.destroyHooks??=[]).push(n,l)}}function lh(e,t,n){mD(e,t,3,n)}function fh(e,t,n,r){(3&e[st])===n&&mD(e,t,n,r)}function k0(e,t){let n=e[st];(3&n)===t&&(n&=16383,n+=1,e[st]=n)}function mD(e,t,n,r){const o=r??-1,s=t.length-1;let a=0;for(let u=void 0!==r?65535&e[gu]:0;u<s;u++)if("number"==typeof t[u+1]){if(a=t[u],null!=r&&a>=r)break}else t[u]<0&&(e[gu]+=65536),(a<o||-1==o)&&(E3(e,n,t,u),e[gu]=(4294901760&e[gu])+u+2),u++}function yD(e,t){fo(4,e,t);const n=x(null);try{t.call(e)}finally{x(n),fo(5,e,t)}}function E3(e,t,n,r){const i=n[r]<0,o=n[r+1],a=e[i?-n[r]:n[r]];i?e[st]>>14<e[gu]>>16&&(3&e[st])===t&&(e[st]+=16384,yD(a,o)):yD(a,o)}const bu=-1;class bl{constructor(t,n,r){this.factory=t,this.resolving=!1,this.canSeeViewProviders=n,this.injectImpl=r}}function R0(e){return e!==bu}function wl(e){return 32767&e}function _l(e,t){let n=function S3(e){return e>>16}(e),r=t;for(;n>0;)r=r[pu],n--;return r}let P0=!0;function dh(e){const t=P0;return P0=e,t}const vD=255,bD=5;let T3=0;const mo={};function hh(e,t){const n=wD(e,t);if(-1!==n)return n;const r=t[Fe];r.firstCreatePass&&(e.injectorIndex=t.length,F0(r.data,e),F0(t,null),F0(r.blueprint,null));const i=ph(e,t),o=e.injectorIndex;if(R0(i)){const s=wl(i),a=_l(i,t),u=a[Fe].data;for(let c=0;c<8;c++)t[o+c]=a[s+c]|u[s+c]}return t[o+8]=i,o}function F0(e,t){e.push(0,0,0,0,0,0,0,0,t)}function wD(e,t){return-1===e.injectorIndex||e.parent&&e.parent.injectorIndex===e.injectorIndex||null===t[e.injectorIndex+8]?-1:e.injectorIndex}function ph(e,t){if(e.parent&&-1!==e.parent.injectorIndex)return e.parent.injectorIndex;let n=0,r=null,i=t;for(;null!==i;){if(r=ID(i),null===r)return bu;if(n++,i=i[pu],-1!==r.injectorIndex)return r.injectorIndex|n<<16}return bu}function L0(e,t,n){!function N3(e,t,n){let r;"string"==typeof n?r=n.charCodeAt(0)||0:n.hasOwnProperty(Lo)&&(r=n[Lo]),null==r&&(r=n[Lo]=T3++);const i=r&vD;t.data[e+(i>>bD)]|=1<<i}(e,t,n)}function _D(e,t,n){if(n&Ft.Optional||void 0!==e)return e;ls()}function DD(e,t,n,r){if(n&Ft.Optional&&void 0===r&&(r=null),!(n&(Ft.Self|Ft.Host))){const i=e[Hn],o=er(void 0);try{return i?i.get(t,r,n&Ft.Optional):iu(t,r,n&Ft.Optional)}finally{er(o)}}return _D(r,0,n)}function ED(e,t,n,r=Ft.Default,i){if(null!==e){if(2048&t[st]&&!(r&Ft.Self)){const s=function F3(e,t,n,r,i){let o=e,s=t;for(;null!==o&&null!==s&&2048&s[st]&&!(512&s[st]);){const a=CD(o,s,n,r|Ft.Self,mo);if(a!==mo)return a;let u=o.parent;if(!u){const c=s[$_];if(c){const l=c.get(n,mo,r);if(l!==mo)return l}u=ID(s),s=s[pu]}o=u}return i}(e,t,n,r,mo);if(s!==mo)return s}const o=CD(e,t,n,r,mo);if(o!==mo)return o}return DD(t,n,r,i)}function CD(e,t,n,r,i){const o=function O3(e){if("string"==typeof e)return e.charCodeAt(0)||0;const t=e.hasOwnProperty(Lo)?e[Lo]:void 0;return"number"==typeof t?t>=0?t&vD:R3:t}(n);if("function"==typeof o){if(!uD(t,e,r))return r&Ft.Host?_D(i,0,r):DD(t,n,r,i);try{let s;if(s=o(r),null!=s||r&Ft.Optional)return s;ls()}finally{dD()}}else if("number"==typeof o){let s=null,a=wD(e,t),u=bu,c=r&Ft.Host?t[xn][dr]:null;for((-1===a||r&Ft.SkipSelf)&&(u=-1===a?ph(e,t):t[a+8],u!==bu&&MD(r,!1)?(s=t[Fe],a=wl(u),t=_l(u,t)):a=-1);-1!==a;){const l=t[Fe];if(xD(o,a,l.data)){const d=k3(a,t,n,s,r,c);if(d!==mo)return d}u=t[a+8],u!==bu&&MD(r,t[Fe].data[a+8]===c)&&xD(o,a,t)?(s=l,a=wl(u),t=_l(u,t)):a=-1}}return i}function k3(e,t,n,r,i,o){const s=t[Fe],a=s.data[e+8],l=gh(a,s,n,null==r?na(a)&&P0:r!=s&&!!(3&a.type),i&Ft.Host&&o===a);return null!==l?oa(t,s,l,a):mo}function gh(e,t,n,r,i){const o=e.providerIndexes,s=t.data,a=1048575&o,u=e.directiveStart,l=o>>20,h=i?a+l:e.directiveEnd;for(let g=r?a:a+l;g<h;g++){const y=s[g];if(g<u&&n===y||g>=u&&y.type===n)return g}if(i){const g=s[u];if(g&&Ri(g)&&g.type===n)return u}return null}function oa(e,t,n,r){let i=e[n];const o=t.data;if(function C3(e){return e instanceof bl}(i)){const s=i;s.resolving&&function $d(e,t){throw t&&t.join(" > "),new Ae(-200,e)}(function Yt(e){return"function"==typeof e?e.name||e.toString():"object"==typeof e&&null!=e&&"function"==typeof e.type?e.type.name||e.type.toString():wt(e)}(o[n]));const a=dh(s.canSeeViewProviders);s.resolving=!0;const c=s.injectImpl?er(s.injectImpl):null;uD(e,r,Ft.Default);try{i=e[n]=s.factory(void 0,o,e,r),t.firstCreatePass&&n>=r.directiveStart&&function D3(e,t,n){const{ngOnChanges:r,ngOnInit:i,ngDoCheck:o}=t.type.prototype;if(r){const s=Y_(t);(n.preOrderHooks??=[]).push(e,s),(n.preOrderCheckHooks??=[]).push(e,s)}i&&(n.preOrderHooks??=[]).push(0-e,i),o&&((n.preOrderHooks??=[]).push(e,o),(n.preOrderCheckHooks??=[]).push(e,o))}(n,o[n],t)}finally{null!==c&&er(c),dh(a),s.resolving=!1,dD()}}return i}function xD(e,t,n){return!!(n[t+(e>>bD)]&1<<e)}function MD(e,t){return!(e&Ft.Self||e&Ft.Host&&t)}class Wn{constructor(t,n){this._tNode=t,this._lView=n}get(t,n,r){return ED(this._tNode,this._lView,t,Qs(r),n)}}function R3(){return new Wn(nn(),me())}function ID(e){const t=e[Fe],n=t.type;return 2===n?t.declTNode:1===n?e[dr]:null}function kD(e,t=null,n=null,r){const i=OD(e,t,n,r);return i.resolveInjectorInitializers(),i}function OD(e,t=null,n=null,r,i=new Set){const o=[n||St,SP(e)];return r=r||("object"==typeof e?void 0:mn(e)),new lu(o,t||eh(),r||null,i)}let di=(()=>{class e{static{this.THROW_IF_NOT_FOUND=kn}static{this.NULL=new Js}static create(n,r){if(Array.isArray(n))return kD({name:""},r,n,"");{const i=n.name??"";return kD({name:i},n.parent,n.providers,i)}}static{this.\u0275prov=At({token:e,providedIn:"any",factory:()=>Rt(Vo)})}static{this.__NG_ELEMENT_ID__=-1}}return e})();function V0(e){return e.ngOriginalError}class yo{constructor(){this._console=console}handleError(t){const n=this._findOriginalError(t);this._console.error("ERROR",t),n&&this._console.error("ORIGINAL ERROR",n)}_findOriginalError(t){let n=t&&V0(t);for(;n&&V0(n);)n=V0(n);return n||null}}const PD=new ut("",{providedIn:"root",factory:()=>_t(yo).handleError.bind(void 0)});let Du=(()=>{class e{static{this.__NG_ELEMENT_ID__=G3}static{this.__NG_ENV_ID__=n=>n}}return e})();class z3 extends Du{constructor(t){super(),this._lView=t}onDestroy(t){return ah(this._lView,t),()=>function D0(e,t){if(null===e[ds])return;const n=e[ds].indexOf(t);-1!==n&&e[ds].splice(n,1)}(this._lView,t)}}function G3(){return new z3(me())}function q3(){return Eu(nn(),me())}function Eu(e,t){return new Cu(Er(e,t))}let Cu=(()=>{class e{constructor(n){this.nativeElement=n}static{this.__NG_ELEMENT_ID__=q3}}return e})();function LD(e){return e instanceof Cu?e.nativeElement:e}function H0(e){return t=>{setTimeout(e,void 0,t)}}const vo=class W3 extends eo{constructor(t=!1){super(),this.destroyRef=void 0,this.__isAsync=t,function V_(){return void 0!==Ys()||null!=function el(){return Ai}()}()&&(this.destroyRef=_t(Du,{optional:!0})??void 0)}emit(t){const n=x(null);try{super.next(t)}finally{x(n)}}subscribe(t,n,r){let i=t,o=n||(()=>null),s=r;if(t&&"object"==typeof t){const u=t;i=u.next?.bind(u),o=u.error?.bind(u),s=u.complete?.bind(u)}this.__isAsync&&(o=H0(o),i&&(i=H0(i)),s&&(s=H0(s)));const a=super.subscribe({next:i,error:o,complete:s});return t instanceof ln&&t.add(a),a}};function Y3(){return this._results[Symbol.iterator]()}class U0{get changes(){return this._changes??=new vo}constructor(t=!1){this._emitDistinctChangesOnly=t,this.dirty=!0,this._onDirty=void 0,this._results=[],this._changesDetected=!1,this._changes=void 0,this.length=0,this.first=void 0,this.last=void 0;const n=U0.prototype;n[Symbol.iterator]||(n[Symbol.iterator]=Y3)}get(t){return this._results[t]}map(t){return this._results.map(t)}filter(t){return this._results.filter(t)}find(t){return this._results.find(t)}reduce(t,n){return this._results.reduce(t,n)}forEach(t){this._results.forEach(t)}some(t){return this._results.some(t)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(t,n){this.dirty=!1;const r=function ir(e){return e.flat(Number.POSITIVE_INFINITY)}(t);(this._changesDetected=!function t0(e,t,n){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++){let i=e[r],o=t[r];if(n&&(i=n(i),o=n(o)),o!==i)return!1}return!0}(this._results,r,n))&&(this._results=r,this.length=r.length,this.last=r[this.length-1],this.first=r[0])}notifyOnChanges(){void 0!==this._changes&&(this._changesDetected||!this._emitDistinctChangesOnly)&&this._changes.emit(this)}onDirty(t){this._onDirty=t}setDirty(){this.dirty=!0,this._onDirty?.()}destroy(){void 0!==this._changes&&(this._changes.complete(),this._changes.unsubscribe())}}function vh(e){return!(128&~e.flags)}const $0=new Map;let Q3=0;const G0="__ngContext__";function mr(e,t){hr(t)?(e[G0]=t[dl],function X3(e){$0.set(e[dl],e)}(t)):e[G0]=t}function WD(e){return KD(e[ll])}function YD(e){return KD(e[ki])}function KD(e){for(;null!==e&&!pr(e);)e=e[ki];return e}let q0;const _h=new ut("",{providedIn:"root",factory:()=>mF}),mF="ng",rE=new ut(""),xu=new ut("",{providedIn:"platform",factory:()=>"unknown"}),iE=new ut("",{providedIn:"root",factory:()=>function hs(){if(void 0!==q0)return q0;if(typeof document<"u")return document;throw new Ae(210,!1)}().body?.querySelector("[ngCspNonce]")?.getAttribute("ngCspNonce")||null});let oE=()=>null;function ey(e,t,n=!1){return oE(e,t,n)}const lE=new ut("",{providedIn:"root",factory:()=>!1});class gE{constructor(t){this.changingThisBreaksApplicationSecurity=t}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see https://g.co/ng/security#xss)`}}function TE(e){return e.ownerDocument.defaultView}var gs=function(e){return e[e.Important=1]="Important",e[e.DashCase=2]="DashCase",e}(gs||{});let hy;function py(e,t){return hy(e,t)}function Au(e,t,n,r,i){if(null!=r){let o,s=!1;pr(r)?o=r:hr(r)&&(s=!0,r=r[En]);const a=an(r);0===e&&null!==n?null==i?BE(t,n,a):sa(t,n,a,i||null,!0):1===e&&null!==n?sa(t,n,a,i||null,!0):2===e?function Ol(e,t,n){const r=Ph(e,t);r&&function D8(e,t,n,r){e.removeChild(t,n,r)}(e,r,t,n)}(t,a,s):3===e&&t.destroyNode(a),null!=o&&function x8(e,t,n,r,i){const o=n[lo];o!==an(n)&&Au(t,e,r,o,i);for(let a=Fn;a<n.length;a++){const u=n[a];Lh(u[Fe],u,e,t,r,o)}}(t,e,o,n,i)}}function Oh(e,t,n){return e.createElement(t,n)}function PE(e,t){t[Oi].changeDetectionScheduler?.notify(1),Lh(e,t,t[vt],2,null,null)}function FE(e,t){const n=e[mu],r=n.indexOf(t);n.splice(r,1)}function Al(e,t){if(e.length<=Fn)return;const n=Fn+t,r=e[n];if(r){const i=r[fl];null!==i&&i!==e&&FE(i,r),t>0&&(e[n-1][ki]=r[ki]);const o=Zs(e,Fn+t);!function g8(e,t){PE(e,t),t[En]=null,t[dr]=null}(r[Fe],r);const s=o[Ho];null!==s&&s.detachView(o[Fe]),r[Pn]=null,r[ki]=null,r[st]&=-129}return r}function Rh(e,t){if(!(256&t[st])){const n=t[vt];n.destroyNode&&Lh(e,t,n,3,null,null),function y8(e){let t=e[ll];if(!t)return yy(e[Fe],e);for(;t;){let n=null;if(hr(t))n=t[ll];else{const r=t[Fn];r&&(n=r)}if(!n){for(;t&&!t[ki]&&t!==e;)hr(t)&&yy(t[Fe],t),t=t[Pn];null===t&&(t=e),hr(t)&&yy(t[Fe],t),n=t&&t[ki]}t=n}}(t)}}function yy(e,t){if(256&t[st])return;const n=x(null);try{t[st]&=-129,t[st]|=256,t[ta]&&function ze(e){if(De(e),pe(e))for(let t=0;t<e.producerNode.length;t++)se(e.producerNode[t],e.producerIndexOfThis[t]);e.producerNode.length=e.producerLastReadVersion.length=e.producerIndexOfThis.length=0,e.liveConsumerNode&&(e.liveConsumerNode.length=e.liveConsumerIndexOfThis.length=0)}(t[ta]),function _8(e,t){let n;if(null!=e&&null!=(n=e.destroyHooks))for(let r=0;r<n.length;r+=2){const i=t[n[r]];if(!(i instanceof bl)){const o=n[r+1];if(Array.isArray(o))for(let s=0;s<o.length;s+=2){const a=i[o[s]],u=o[s+1];fo(4,a,u);try{u.call(a)}finally{fo(5,a,u)}}else{fo(4,i,o);try{o.call(i)}finally{fo(5,i,o)}}}}}(e,t),function w8(e,t){const n=e.cleanup,r=t[hu];if(null!==n)for(let o=0;o<n.length-1;o+=2)if("string"==typeof n[o]){const s=n[o+3];s>=0?r[s]():r[-s].unsubscribe(),o+=2}else n[o].call(r[n[o+1]]);null!==r&&(t[hu]=null);const i=t[ds];if(null!==i){t[ds]=null;for(let o=0;o<i.length;o++)(0,i[o])()}}(e,t),1===t[Fe].type&&t[vt].destroy();const r=t[fl];if(null!==r&&pr(t[Pn])){r!==t[Pn]&&FE(r,t);const i=t[Ho];null!==i&&i.detachView(e)}!function J3(e){$0.delete(e[dl])}(t)}finally{x(n)}}function vy(e,t,n){return function LE(e,t,n){let r=t;for(;null!==r&&40&r.type;)r=(t=r).parent;if(null===r)return n[En];{const{componentOffset:i}=r;if(i>-1){const{encapsulation:o}=e.data[r.directiveStart+i];if(o===p.None||o===p.Emulated)return null}return Er(r,n)}}(e,t.parent,n)}function sa(e,t,n,r,i){e.insertBefore(t,n,r,i)}function BE(e,t,n){e.appendChild(t,n)}function jE(e,t,n,r,i){null!==r?sa(e,t,n,r,i):BE(e,t,n)}function Ph(e,t){return e.parentNode(t)}let by,UE=function HE(e,t,n){return 40&e.type?Er(e,n):null};function Fh(e,t,n,r){const i=vy(e,r,t),o=t[vt],a=function VE(e,t,n){return UE(e,t,n)}(r.parent||t[dr],r,t);if(null!=i)if(Array.isArray(n))for(let u=0;u<n.length;u++)jE(o,i,n[u],a,!1);else jE(o,i,n,a,!1);void 0!==by&&by(o,r,t,n,i)}function kl(e,t){if(null!==t){const n=t.type;if(3&n)return Er(t,e);if(4&n)return wy(-1,e[t.index]);if(8&n){const r=t.child;if(null!==r)return kl(e,r);{const i=e[t.index];return pr(i)?wy(-1,i):an(i)}}if(32&n)return py(t,e)()||an(e[t.index]);{const r=zE(e,t);return null!==r?Array.isArray(r)?r[0]:kl(ra(e[xn]),r):kl(e,t.next)}}return null}function zE(e,t){return null!==t?e[xn][dr].projection[t.projection]:null}function wy(e,t){const n=Fn+e+1;if(n<t.length){const r=t[n],i=r[Fe].firstChild;if(null!==i)return kl(r,i)}return t[lo]}function _y(e,t,n,r,i,o,s){for(;null!=n;){const a=r[n.index],u=n.type;if(s&&0===t&&(a&&mr(an(a),r),n.flags|=2),32&~n.flags)if(8&u)_y(e,t,n.child,r,i,o,!1),Au(t,e,i,a,o);else if(32&u){const c=py(n,r);let l;for(;l=c();)Au(t,e,i,l,o);Au(t,e,i,a,o)}else 16&u?qE(e,t,r,n,i,o):Au(t,e,i,a,o);n=s?n.projectionNext:n.next}}function Lh(e,t,n,r,i,o){_y(n,r,e.firstChild,t,i,o,!1)}function qE(e,t,n,r,i,o){const s=n[xn],u=s[dr].projection[r.projection];if(Array.isArray(u))for(let c=0;c<u.length;c++)Au(t,e,i,u[c],o);else{let c=u;const l=s[Pn];vh(r)&&(c.flags|=128),_y(e,t,c,l,i,o,!0)}}function WE(e,t,n){""===n?e.removeAttribute(t,"class"):e.setAttribute(t,"class",n)}function YE(e,t,n){const{mergedAttrs:r,classes:i,styles:o}=n;null!==r&&D(e,t,r),null!==i&&WE(e,t,i),null!==o&&function I8(e,t,n){e.setAttribute(t,"style",n)}(e,t,o)}const Mt={};function ku(e=1){KE(Bt(),me(),gr()+e,!1)}function KE(e,t,n,r){if(!r)if(3&~t[st]){const o=e.preOrderHooks;null!==o&&fh(t,o,0,n)}else{const o=e.preOrderCheckHooks;null!==o&&lh(t,o,n)}ia(n)}function kt(e,t=Ft.Default){const n=me();return null===n?Rt(e,t):ED(nn(),n,ft(e),t)}function QE(e,t,n,r,i,o){const s=x(null);try{let a=null;i&m.SignalBased&&(a=t[r][k]),null!==a&&void 0!==a.transformFn&&(o=a.transformFn(o)),i&m.HasDecoratorInputTransform&&(o=e.inputTransforms[r].call(t,o)),null!==e.setInput?e.setInput(t,a,o,n,r):W_(t,a,r,o)}finally{x(s)}}function Bh(e,t,n,r,i,o,s,a,u,c,l){const d=t.blueprint.slice();return d[En]=i,d[st]=204|r,(null!==c||e&&2048&e[st])&&(d[st]|=2048),eD(d),d[Pn]=d[pu]=e,d[vn]=n,d[Oi]=s||e&&e[Oi],d[vt]=a||e&&e[vt],d[Hn]=u||e&&e[Hn]||null,d[dr]=o,d[dl]=function Z3(){return Q3++}(),d[Zr]=l,d[$_]=c,d[xn]=2==t.type?e[xn]:d,d}function Ou(e,t,n,r,i){let o=e.data[t];if(null===o)o=function Dy(e,t,n,r,i){const o=iD(),s=x0(),u=e.data[t]=function F8(e,t,n,r,i,o){let s=t?t.injectorIndex:-1,a=0;return function vu(){return null!==bt.skipHydrationRootTNode}()&&(a|=128),{type:n,index:r,insertBeforeIndex:null,injectorIndex:s,directiveStart:-1,directiveEnd:-1,directiveStylingLast:-1,componentOffset:-1,propertyBindings:null,flags:a,providerIndexes:0,value:i,attrs:o,mergedAttrs:null,localNames:null,initialInputs:void 0,inputs:null,outputs:null,tView:null,next:null,prev:null,projectionNext:null,child:null,parent:t,projection:null,styles:null,stylesWithoutHost:null,residualStyles:void 0,classes:null,classesWithoutHost:null,residualClasses:void 0,classBindings:0,styleBindings:0}}(0,s?o:o&&o.parent,n,t,r,i);return null===e.firstChild&&(e.firstChild=u),null!==o&&(s?null==o.child&&null!==u.parent&&(o.child=u):null===o.next&&(o.next=u,u.prev=o)),u}(e,t,n,r,i),function p3(){return bt.lFrame.inI18n}()&&(o.flags|=32);else if(64&o.type){o.type=n,o.value=r,o.attrs=i;const s=function yl(){const e=bt.lFrame,t=e.currentTNode;return e.isParent?t:t.parent}();o.injectorIndex=null===s?-1:s.injectorIndex}return po(o,!0),o}function Rl(e,t,n,r){if(0===n)return-1;const i=t.length;for(let o=0;o<n;o++)t.push(r),e.blueprint.push(r),e.data.push(null);return i}function ZE(e,t,n,r,i){const o=gr(),s=2&r;try{ia(-1),s&&t.length>Et&&KE(e,t,Et,!1),fo(s?2:0,i),n(r,i)}finally{ia(o),fo(s?3:1,i)}}function Ey(e,t,n){if(h0(t)){const r=x(null);try{const o=t.directiveEnd;for(let s=t.directiveStart;s<o;s++){const a=e.data[s];a.contentQueries&&a.contentQueries(1,n[s],s)}}finally{x(r)}}}function Cy(e,t,n){rD()&&(function $8(e,t,n,r){const i=n.directiveStart,o=n.directiveEnd;na(n)&&function Q8(e,t,n){const r=Er(t,e),i=XE(n);let s=16;n.signals?s=4096:n.onPush&&(s=64);const a=jh(e,Bh(e,i,null,s,r,t,null,e[Oi].rendererFactory.createRenderer(r,n),null,null,null));e[t.index]=a}(t,n,e.data[i+n.componentOffset]),e.firstCreatePass||hh(n,t),mr(r,t);const s=n.initialInputs;for(let a=i;a<o;a++){const u=e.data[a],c=oa(t,e,a,n);mr(c,t),null!==s&&Z8(0,a-i,c,u,0,s),Ri(u)&&(Xr(n.index,t)[vn]=oa(t,e,a,n))}}(e,t,n,Er(n,t)),!(64&~n.flags)&&rC(e,t,n))}function xy(e,t,n=Er){const r=t.localNames;if(null!==r){let i=t.index+1;for(let o=0;o<r.length;o+=2){const s=r[o+1],a=-1===s?n(t,e):e[s];e[i++]=a}}}function XE(e){const t=e.tView;return null===t||t.incompleteFirstPass?e.tView=My(1,null,e.template,e.decls,e.vars,e.directiveDefs,e.pipeDefs,e.viewQuery,e.schemas,e.consts,e.id):t}function My(e,t,n,r,i,o,s,a,u,c,l){const d=Et+r,h=d+i,g=function N8(e,t){const n=[];for(let r=0;r<t;r++)n.push(r<e?null:Mt);return n}(d,h),y="function"==typeof c?c():c;return g[Fe]={type:e,blueprint:g,template:n,queries:null,viewQuery:a,declTNode:t,data:g.slice().fill(null,d),bindingStartIndex:d,expandoStartIndex:h,hostBindingOpCodes:null,firstCreatePass:!0,firstUpdatePass:!0,staticViewQueries:!1,staticContentQueries:!1,preOrderHooks:null,preOrderCheckHooks:null,contentHooks:null,contentCheckHooks:null,viewHooks:null,viewCheckHooks:null,destroyHooks:null,cleanup:null,contentQueries:null,components:null,directiveRegistry:"function"==typeof o?o():o,pipeRegistry:"function"==typeof s?s():s,firstChild:null,schemas:u,consts:y,incompleteFirstPass:!1,ssrId:l}}let JE=()=>null;function eC(e,t,n,r,i){for(let o in t){if(!t.hasOwnProperty(o))continue;const s=t[o];if(void 0===s)continue;r??={};let a,u=m.None;Array.isArray(s)?(a=s[0],u=s[1]):a=s;let c=o;if(null!==i){if(!i.hasOwnProperty(o))continue;c=i[o]}0===e?tC(r,n,c,a,u):tC(r,n,c,a)}return r}function tC(e,t,n,r,i){let o;e.hasOwnProperty(n)?(o=e[n]).push(t,r):o=e[n]=[t,r],void 0!==i&&o.push(i)}function Iy(e,t,n,r){if(rD()){const i=null===r?null:{"":-1},o=function G8(e,t){const n=e.directiveRegistry;let r=null,i=null;if(n)for(let o=0;o<n.length;o++){const s=n[o];if(K(t,s.selectors,!1))if(r||(r=[]),Ri(s))if(null!==s.findHostDirectiveDefs){const a=[];i=i||new Map,s.findHostDirectiveDefs(s,a,i),r.unshift(...a,s),Sy(e,t,a.length)}else r.unshift(s),Sy(e,t,0);else i=i||new Map,s.findHostDirectiveDefs?.(s,r,i),r.push(s)}return null===r?null:[r,i]}(e,n);let s,a;null===o?s=a=null:[s,a]=o,null!==s&&nC(e,t,n,s,i,a),i&&function q8(e,t,n){if(t){const r=e.localNames=[];for(let i=0;i<t.length;i+=2){const o=n[t[i+1]];if(null==o)throw new Ae(-301,!1);r.push(t[i],o)}}}(n,r,i)}n.mergedAttrs=O(n.mergedAttrs,n.attrs)}function nC(e,t,n,r,i,o){for(let c=0;c<r.length;c++)L0(hh(n,t),e,r[c].type);!function Y8(e,t,n){e.flags|=1,e.directiveStart=t,e.directiveEnd=t+n,e.providerIndexes=t}(n,e.data.length,r.length);for(let c=0;c<r.length;c++){const l=r[c];l.providersResolver&&l.providersResolver(l)}let s=!1,a=!1,u=Rl(e,t,r.length,null);for(let c=0;c<r.length;c++){const l=r[c];n.mergedAttrs=O(n.mergedAttrs,l.hostAttrs),K8(e,n,t,u,l),W8(u,l,i),null!==l.contentQueries&&(n.flags|=4),(null!==l.hostBindings||null!==l.hostAttrs||0!==l.hostVars)&&(n.flags|=64);const d=l.type.prototype;!s&&(d.ngOnChanges||d.ngOnInit||d.ngDoCheck)&&((e.preOrderHooks??=[]).push(n.index),s=!0),!a&&(d.ngOnChanges||d.ngDoCheck)&&((e.preOrderCheckHooks??=[]).push(n.index),a=!0),u++}!function L8(e,t,n){const i=t.directiveEnd,o=e.data,s=t.attrs,a=[];let u=null,c=null;for(let l=t.directiveStart;l<i;l++){const d=o[l],h=n?n.get(d):null,y=h?h.outputs:null;u=eC(0,d.inputs,l,u,h?h.inputs:null),c=eC(1,d.outputs,l,c,y);const v=null===u||null===s||F(t)?null:X8(u,l,s);a.push(v)}null!==u&&(u.hasOwnProperty("class")&&(t.flags|=8),u.hasOwnProperty("style")&&(t.flags|=16)),t.initialInputs=a,t.inputs=u,t.outputs=c}(e,n,o)}function rC(e,t,n){const r=n.directiveStart,i=n.directiveEnd,o=n.index,s=function m3(){return bt.lFrame.currentDirectiveIndex}();try{ia(o);for(let a=r;a<i;a++){const u=e.data[a],c=t[a];I0(a),(null!==u.hostBindings||0!==u.hostVars||null!==u.hostAttrs)&&z8(u,c)}}finally{ia(-1),I0(s)}}function z8(e,t){null!==e.hostBindings&&e.hostBindings(1,t)}function Sy(e,t,n){t.componentOffset=n,(e.components??=[]).push(t.index)}function W8(e,t,n){if(n){if(t.exportAs)for(let r=0;r<t.exportAs.length;r++)n[t.exportAs[r]]=e;Ri(t)&&(n[""]=e)}}function K8(e,t,n,r,i){e.data[r]=i;const o=i.factory||(i.factory=io(i.type)),s=new bl(o,Ri(i),kt);e.blueprint[r]=s,n[r]=s,function H8(e,t,n,r,i){const o=i.hostBindings;if(o){let s=e.hostBindingOpCodes;null===s&&(s=e.hostBindingOpCodes=[]);const a=~t.index;(function U8(e){let t=e.length;for(;t>0;){const n=e[--t];if("number"==typeof n&&n<0)return n}return 0})(s)!=a&&s.push(a),s.push(n,r,o)}}(e,t,r,Rl(e,n,i.hostVars,Mt),i)}function bo(e,t,n,r,i,o){const s=Er(e,t);!function Ty(e,t,n,r,i,o,s){if(null==o)e.removeAttribute(t,i,n);else{const a=null==s?wt(o):s(o,r||"",i);e.setAttribute(t,i,a,n)}}(t[vt],s,o,e.value,n,r,i)}function Z8(e,t,n,r,i,o){const s=o[t];if(null!==s)for(let a=0;a<s.length;)QE(r,n,s[a++],s[a++],s[a++],s[a++])}function X8(e,t,n){let r=null,i=0;for(;i<n.length;){const o=n[i];if(0!==o)if(5!==o){if("number"==typeof o)break;if(e.hasOwnProperty(o)){null===r&&(r=[]);const s=e[o];for(let a=0;a<s.length;a+=3)if(s[a]===t){r.push(o,s[a+1],s[a+2],n[i+1]);break}}i+=2}else i+=2;else i+=4}return r}function iC(e,t,n,r){return[e,!0,0,t,null,r,null,n,null,null]}function oC(e,t){const n=e.contentQueries;if(null!==n){const r=x(null);try{for(let i=0;i<n.length;i+=2){const s=n[i+1];if(-1!==s){const a=e.data[s];uh(n[i]),a.contentQueries(2,t[s],s)}}}finally{x(r)}}}function jh(e,t){return e[ll]?e[U_][ki]=t:e[ll]=t,e[U_]=t,t}function Ny(e,t,n){uh(0);const r=x(null);try{t(e,n)}finally{x(r)}}function sC(e){return e[hu]||(e[hu]=[])}function aC(e){return e.cleanup||(e.cleanup=[])}function Vh(e,t){const n=e[Hn],r=n?n.get(yo,null):null;r&&r.handleError(t)}function Ay(e,t,n,r,i){for(let o=0;o<n.length;){const s=n[o++],a=n[o++],u=n[o++];QE(e.data[s],t[s],r,a,u,i)}}function J8(e,t){const n=Xr(t,e),r=n[Fe];!function eL(e,t){for(let n=t.length;n<e.blueprint.length;n++)t.push(e.blueprint[n])}(r,n);const i=n[En];null!==i&&null===n[Zr]&&(n[Zr]=ey(i,n[Hn])),ky(r,n,n[vn])}function ky(e,t,n){N0(t);try{const r=e.viewQuery;null!==r&&Ny(1,r,n);const i=e.template;null!==i&&ZE(e,t,i,1,n),e.firstCreatePass&&(e.firstCreatePass=!1),t[Ho]?.finishViewCreation(e),e.staticContentQueries&&oC(e,t),e.staticViewQueries&&Ny(2,e.viewQuery,n);const o=e.components;null!==o&&function tL(e,t){for(let n=0;n<t.length;n++)J8(e,t[n])}(t,o)}catch(r){throw e.firstCreatePass&&(e.incompleteFirstPass=!0,e.firstCreatePass=!1),r}finally{t[st]&=-5,A0()}}function Ru(e,t){return!t||null===t.firstChild||vh(e)}function Fl(e,t,n,r=!0){const i=t[Fe];if(function v8(e,t,n,r){const i=Fn+r,o=n.length;r>0&&(n[i-1][ki]=t),r<o-Fn?(t[ki]=n[i],al(n,Fn+r,t)):(n.push(t),t[ki]=null),t[Pn]=n;const s=t[fl];null!==s&&n!==s&&function b8(e,t){const n=e[mu];t[xn]!==t[Pn][Pn][xn]&&(e[st]|=d0.HasTransplantedViews),null===n?e[mu]=[t]:n.push(t)}(s,t);const a=t[Ho];null!==a&&a.insertView(e),_0(t),t[st]|=128}(i,t,e,n),r){const s=wy(n,e),a=t[vt],u=Ph(a,e[lo]);null!==u&&function m8(e,t,n,r,i,o){r[En]=i,r[dr]=t,Lh(e,r,n,1,i,o)}(i,e[dr],a,t,u,s)}const o=t[Zr];null!==o&&null!==o.firstChild&&(o.firstChild=null)}function Ll(e,t,n,r,i=!1){for(;null!==n;){const o=t[n.index];null!==o&&r.push(an(o)),pr(o)&&lC(o,r);const s=n.type;if(8&s)Ll(e,t,n.child,r);else if(32&s){const a=py(n,t);let u;for(;u=a();)r.push(u)}else if(16&s){const a=zE(t,n);if(Array.isArray(a))r.push(...a);else{const u=ra(t[xn]);Ll(u[Fe],u,a,r,!0)}}n=i?n.projectionNext:n.next}return r}function lC(e,t){for(let n=Fn;n<e.length;n++){const r=e[n],i=r[Fe].firstChild;null!==i&&Ll(r[Fe],r,i,t)}e[lo]!==e[En]&&t.push(e[lo])}let fC=[];const oL={version:0,lastCleanEpoch:0,dirty:!1,producerNode:void 0,producerLastReadVersion:void 0,producerIndexOfThis:void 0,nextProducerIndex:0,liveConsumerNode:void 0,liveConsumerIndexOfThis:void 0,consumerAllowSignalWrites:!1,consumerIsAlwaysLive:!1,producerMustRecompute:()=>!1,producerRecomputeValue:()=>{},consumerMarkedDirty:()=>{},consumerOnSignalRead:()=>{},consumerIsAlwaysLive:!0,consumerMarkedDirty:e=>{ml(e.lView)},consumerOnSignalRead(){this.lView[ta]=this}},dC=100;function Hh(e,t=!0,n=0){const r=e[Oi],i=r.rendererFactory;i.begin?.();try{!function sL(e,t){Ry(e,t);let n=0;for(;w0(e);){if(n===dC)throw new Ae(103,!1);n++,Ry(e,1)}}(e,n)}catch(s){throw t&&Vh(e,s),s}finally{i.end?.(),r.inlineEffectRunner?.flush()}}function aL(e,t,n,r){const i=t[st];if(!(256&~i))return;t[Oi].inlineEffectRunner?.flush(),N0(t);let s=null,a=null;(function uL(e){return 2!==e.type})(e)&&(a=function nL(e){return e[ta]??function rL(e){const t=fC.pop()??Object.create(oL);return t.lView=e,t}(e)}(t),s=function _e(e){return e&&(e.nextProducerIndex=0),x(e)}(a));try{eD(t),function sD(e){return bt.lFrame.bindingIndex=e}(e.bindingStartIndex),null!==n&&ZE(e,t,n,2,r);const u=!(3&~i);if(u){const d=e.preOrderCheckHooks;null!==d&&lh(t,d,null)}else{const d=e.preOrderHooks;null!==d&&fh(t,d,0,null),k0(t,0)}if(function cL(e){for(let t=WD(e);null!==t;t=YD(t)){if(!(t[st]&d0.HasTransplantedViews))continue;const n=t[mu];for(let r=0;r<n.length;r++){i3(n[r])}}}(t),hC(t,0),null!==e.contentQueries&&oC(e,t),u){const d=e.contentCheckHooks;null!==d&&lh(t,d)}else{const d=e.contentHooks;null!==d&&fh(t,d,1),k0(t,1)}!function T8(e,t){const n=e.hostBindingOpCodes;if(null!==n)try{for(let r=0;r<n.length;r++){const i=n[r];if(i<0)ia(~i);else{const o=i,s=n[++r],a=n[++r];g3(s,o),a(2,t[o])}}}finally{ia(-1)}}(e,t);const c=e.components;null!==c&&gC(t,c,0);const l=e.viewQuery;if(null!==l&&Ny(2,l,r),u){const d=e.viewCheckHooks;null!==d&&lh(t,d)}else{const d=e.viewHooks;null!==d&&fh(t,d,2),k0(t,2)}if(!0===e.firstUpdatePass&&(e.firstUpdatePass=!1),t[rh]){for(const d of t[rh])d();t[rh]=null}t[st]&=-73}catch(u){throw ml(t),u}finally{null!==a&&(function Ne(e,t){if(x(t),e&&void 0!==e.producerNode&&void 0!==e.producerIndexOfThis&&void 0!==e.producerLastReadVersion){if(pe(e))for(let n=e.nextProducerIndex;n<e.producerNode.length;n++)se(e.producerNode[n],e.producerIndexOfThis[n]);for(;e.producerNode.length>e.nextProducerIndex;)e.producerNode.pop(),e.producerLastReadVersion.pop(),e.producerIndexOfThis.pop()}}(a,s),function iL(e){e.lView[ta]!==e&&(e.lView=null,fC.push(e))}(a)),A0()}}function hC(e,t){for(let n=WD(e);null!==n;n=YD(n))for(let r=Fn;r<n.length;r++)pC(n[r],t)}function lL(e,t,n){pC(Xr(t,e),n)}function pC(e,t){b0(e)&&Ry(e,t)}function Ry(e,t){const r=e[Fe],i=e[st],o=e[ta];let s=!!(0===t&&16&i);if(s||=!!(64&i&&0===t),s||=!!(1024&i),s||=!(!o?.dirty||!$e(o)),o&&(o.dirty=!1),e[st]&=-9217,s)aL(r,e,r.template,e[vn]);else if(8192&i){hC(e,1);const a=r.components;null!==a&&gC(e,a,1)}}function gC(e,t,n){for(let r=0;r<t.length;r++)lL(e,t[r],n)}function Bl(e){for(e[Oi].changeDetectionScheduler?.notify();e;){e[st]|=64;const t=ra(e);if(p0(e)&&!t)return e;e=t}return null}class jl{get rootNodes(){const t=this._lView,n=t[Fe];return Ll(n,t,n.firstChild,[])}constructor(t,n,r=!0){this._lView=t,this._cdRefInjectingView=n,this.notifyErrorHandler=r,this._appRef=null,this._attachedToViewContainer=!1}get context(){return this._lView[vn]}set context(t){this._lView[vn]=t}get destroyed(){return!(256&~this._lView[st])}destroy(){if(this._appRef)this._appRef.detachView(this);else if(this._attachedToViewContainer){const t=this._lView[Pn];if(pr(t)){const n=t[8],r=n?n.indexOf(this):-1;r>-1&&(Al(t,r),Zs(n,r))}this._attachedToViewContainer=!1}Rh(this._lView[Fe],this._lView)}onDestroy(t){ah(this._lView,t)}markForCheck(){Bl(this._cdRefInjectingView||this._lView)}detach(){this._lView[st]&=-129}reattach(){_0(this._lView),this._lView[st]|=128}detectChanges(){this._lView[st]|=1024,Hh(this._lView,this.notifyErrorHandler)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new Ae(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null,PE(this._lView[Fe],this._lView)}attachToAppRef(t){if(this._attachedToViewContainer)throw new Ae(902,!1);this._appRef=t,_0(this._lView)}}let qo=(()=>{class e{static{this.__NG_ELEMENT_ID__=hL}}return e})();const fL=qo,dL=class extends fL{constructor(t,n,r){super(),this._declarationLView=t,this._declarationTContainer=n,this.elementRef=r}get ssrId(){return this._declarationTContainer.tView?.ssrId||null}createEmbeddedView(t,n){return this.createEmbeddedViewImpl(t,n)}createEmbeddedViewImpl(t,n,r){const i=function Pl(e,t,n,r){const i=x(null);try{const o=t.tView,u=Bh(e,o,n,4096&e[st]?4096:16,null,t,null,null,r?.injector??null,r?.embeddedViewInjector??null,r?.dehydratedView??null);u[fl]=e[t.index];const l=e[Ho];return null!==l&&(u[Ho]=l.createEmbeddedView(o)),ky(o,u,n),u}finally{x(i)}}(this._declarationLView,this._declarationTContainer,t,{embeddedViewInjector:n,dehydratedView:r});return new jl(i)}};function hL(){return Uh(nn(),me())}function Uh(e,t){return 4&e.type?new dL(t,e,Eu(e,t)):null}class Vy{}class LL{}class DC{}class jL{resolveComponentFactory(t){throw function BL(e){const t=Error(`No component factory found for ${mn(e)}.`);return t.ngComponent=e,t}(t)}}let Wh=(()=>{class e{static{this.NULL=new jL}}return e})();class CC{}let xC=(()=>{class e{constructor(){this.destroyNode=null}static{this.__NG_ELEMENT_ID__=()=>function VL(){const e=me(),n=Xr(nn().index,e);return(hr(n)?n:e)[vt]}()}}return e})(),HL=(()=>{class e{static{this.\u0275prov=At({token:e,providedIn:"root",factory:()=>null})}}return e})();const Hy={};function IC(...e){}class Cn{constructor({enableLongStackTrace:t=!1,shouldCoalesceEventChangeDetection:n=!1,shouldCoalesceRunChangeDetection:r=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new vo(!1),this.onMicrotaskEmpty=new vo(!1),this.onStable=new vo(!1),this.onError=new vo(!1),typeof Zone>"u")throw new Ae(908,!1);Zone.assertZonePatched();const i=this;i._nesting=0,i._outer=i._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(i._inner=i._inner.fork(new Zone.TaskTrackingZoneSpec)),t&&Zone.longStackTraceZoneSpec&&(i._inner=i._inner.fork(Zone.longStackTraceZoneSpec)),i.shouldCoalesceEventChangeDetection=!r&&n,i.shouldCoalesceRunChangeDetection=r,i.lastRequestAnimationFrameId=-1,i.nativeRequestAnimationFrame=function UL(){const e="function"==typeof Gt.requestAnimationFrame;let t=Gt[e?"requestAnimationFrame":"setTimeout"],n=Gt[e?"cancelAnimationFrame":"clearTimeout"];if(typeof Zone<"u"&&t&&n){const r=t[Zone.__symbol__("OriginalDelegate")];r&&(t=r);const i=n[Zone.__symbol__("OriginalDelegate")];i&&(n=i)}return{nativeRequestAnimationFrame:t,nativeCancelAnimationFrame:n}}().nativeRequestAnimationFrame,function GL(e){const t=()=>{!function zL(e){e.isCheckStableRunning||-1!==e.lastRequestAnimationFrameId||(e.lastRequestAnimationFrameId=e.nativeRequestAnimationFrame.call(Gt,()=>{e.fakeTopEventTask||(e.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{e.lastRequestAnimationFrameId=-1,$y(e),e.isCheckStableRunning=!0,Uy(e),e.isCheckStableRunning=!1},void 0,()=>{},()=>{})),e.fakeTopEventTask.invoke()}),$y(e))}(e)};e._inner=e._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(n,r,i,o,s,a)=>{if(function qL(e){return!(!Array.isArray(e)||1!==e.length)&&!0===e[0].data?.__ignore_ng_zone__}(a))return n.invokeTask(i,o,s,a);try{return SC(e),n.invokeTask(i,o,s,a)}finally{(e.shouldCoalesceEventChangeDetection&&"eventTask"===o.type||e.shouldCoalesceRunChangeDetection)&&t(),TC(e)}},onInvoke:(n,r,i,o,s,a,u)=>{try{return SC(e),n.invoke(i,o,s,a,u)}finally{e.shouldCoalesceRunChangeDetection&&t(),TC(e)}},onHasTask:(n,r,i,o)=>{n.hasTask(i,o),r===i&&("microTask"==o.change?(e._hasPendingMicrotasks=o.microTask,$y(e),Uy(e)):"macroTask"==o.change&&(e.hasPendingMacrotasks=o.macroTask))},onHandleError:(n,r,i,o)=>(n.handleError(i,o),e.runOutsideAngular(()=>e.onError.emit(o)),!1)})}(i)}static isInAngularZone(){return typeof Zone<"u"&&!0===Zone.current.get("isAngularZone")}static assertInAngularZone(){if(!Cn.isInAngularZone())throw new Ae(909,!1)}static assertNotInAngularZone(){if(Cn.isInAngularZone())throw new Ae(909,!1)}run(t,n,r){return this._inner.run(t,n,r)}runTask(t,n,r,i){const o=this._inner,s=o.scheduleEventTask("NgZoneEvent: "+i,t,$L,IC,IC);try{return o.runTask(s,n,r)}finally{o.cancelTask(s)}}runGuarded(t,n,r){return this._inner.runGuarded(t,n,r)}runOutsideAngular(t){return this._outer.run(t)}}const $L={};function Uy(e){if(0==e._nesting&&!e.hasPendingMicrotasks&&!e.isStable)try{e._nesting++,e.onMicrotaskEmpty.emit(null)}finally{if(e._nesting--,!e.hasPendingMicrotasks)try{e.runOutsideAngular(()=>e.onStable.emit(null))}finally{e.isStable=!0}}}function $y(e){e.hasPendingMicrotasks=!!(e._hasPendingMicrotasks||(e.shouldCoalesceEventChangeDetection||e.shouldCoalesceRunChangeDetection)&&-1!==e.lastRequestAnimationFrameId)}function SC(e){e._nesting++,e.isStable&&(e.isStable=!1,e.onUnstable.emit(null))}function TC(e){e._nesting--,Uy(e)}class NC{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new vo,this.onMicrotaskEmpty=new vo,this.onStable=new vo,this.onError=new vo}run(t,n,r){return t.apply(n,r)}runGuarded(t,n,r){return t.apply(n,r)}runOutsideAngular(t){return t()}runTask(t,n,r,i){return t.apply(n,r)}}let zl=(()=>{class e{constructor(){this.handler=null,this.internalCallbacks=[]}execute(){this.executeInternalCallbacks(),this.handler?.execute()}executeInternalCallbacks(){const n=[...this.internalCallbacks];this.internalCallbacks.length=0;for(const r of n)r()}ngOnDestroy(){this.handler?.destroy(),this.handler=null,this.internalCallbacks.length=0}static{this.\u0275prov=At({token:e,providedIn:"root",factory:()=>new e})}}return e})();function Kh(e,t,n){let r=n?e.styles:null,i=n?e.classes:null,o=0;if(null!==t)for(let s=0;s<t.length;s++){const a=t[s];"number"==typeof a?o=a:1==o?i=cs(i,a):2==o&&(r=cs(r,a+": "+t[++s]+";"))}n?e.styles=r:e.stylesWithoutHost=r,n?e.classes=i:e.classesWithoutHost=i}class FC extends Wh{constructor(t){super(),this.ngModule=t}resolveComponentFactory(t){const n=He(t);return new Wl(n,this.ngModule)}}function LC(e){const t=[];for(const n in e){if(!e.hasOwnProperty(n))continue;const r=e[n];void 0!==r&&t.push({propName:Array.isArray(r)?r[0]:r,templateName:n})}return t}class Qh{constructor(t,n){this.injector=t,this.parentInjector=n}get(t,n,r){r=Qs(r);const i=this.injector.get(t,Hy,r);return i!==Hy||n===Hy?i:this.parentInjector.get(t,n,r)}}class Wl extends DC{get inputs(){const t=this.componentDef,n=t.inputTransforms,r=LC(t.inputs);if(null!==n)for(const i of r)n.hasOwnProperty(i.propName)&&(i.transform=n[i.propName]);return r}get outputs(){return LC(this.componentDef.outputs)}constructor(t,n){super(),this.componentDef=t,this.ngModule=n,this.componentType=t.type,this.selector=function Re(e){return e.map(Ve).join(",")}(t.selectors),this.ngContentSelectors=t.ngContentSelectors?t.ngContentSelectors:[],this.isBoundToModule=!!n}create(t,n,r,i){const o=x(null);try{let s=(i=i||this.ngModule)instanceof co?i:i?.injector;s&&null!==this.componentDef.getStandaloneInjector&&(s=this.componentDef.getStandaloneInjector(s)||s);const a=s?new Qh(t,s):t,u=a.get(CC,null);if(null===u)throw new Ae(407,!1);const c=a.get(HL,null),h={rendererFactory:u,sanitizer:c,inlineEffectRunner:null,afterRenderEventManager:a.get(zl,null),changeDetectionScheduler:a.get(Vy,null)},g=u.createRenderer(null,this.componentDef),y=this.componentDef.selectors[0][0]||"div",v=r?function A8(e,t,n,r){const o=r.get(lE,!1)||n===p.ShadowDom,s=e.selectRootElement(t,o);return function k8(e){JE(e)}(s),s}(g,r,this.componentDef.encapsulation,a):Oh(g,y,function XL(e){const t=e.toLowerCase();return"svg"===t?"svg":"math"===t?"math":null}(y));let b=512;this.componentDef.signals?b|=4096:this.componentDef.onPush||(b|=16);let _=null;null!==v&&(_=ey(v,a,!0));const E=My(0,null,null,1,0,null,null,null,null,null,null),C=Bh(null,E,null,b,null,null,h,g,a,null,_);let I,R;N0(C);try{const G=this.componentDef;let z,de=null;G.findHostDirectiveDefs?(z=[],de=new Map,G.findHostDirectiveDefs(G,z,de),z.push(G)):z=[G];const oe=function e5(e,t){const n=e[Fe],r=Et;return e[r]=t,Ou(n,r,2,"#host",null)}(C,v),fe=function t5(e,t,n,r,i,o,s){const a=i[Fe];!function n5(e,t,n,r){for(const i of e)t.mergedAttrs=O(t.mergedAttrs,i.hostAttrs);null!==t.mergedAttrs&&(Kh(t,t.mergedAttrs,!0),null!==n&&YE(r,n,t))}(r,e,t,s);let u=null;null!==t&&(u=ey(t,i[Hn]));const c=o.rendererFactory.createRenderer(t,n);let l=16;n.signals?l=4096:n.onPush&&(l=64);const d=Bh(i,XE(n),null,l,i[e.index],e,o,c,null,null,u);return a.firstCreatePass&&Sy(a,e,r.length-1),jh(i,d),i[e.index]=d}(oe,v,G,z,C,h,g);R=gl(E,Et),v&&function i5(e,t,n,r){if(r)D(e,n,["ng-version","17.3.12"]);else{const{attrs:i,classes:o}=function Le(e){const t=[],n=[];let r=1,i=2;for(;r<e.length;){let o=e[r];if("string"==typeof o)2===i?""!==o&&t.push(o,e[++r]):8===i&&n.push(o);else{if(!Y(i))break;i=o}r++}return{attrs:t,classes:n}}(t.selectors[0]);i&&D(e,n,i),o&&o.length>0&&WE(e,n,o.join(" "))}}(g,G,v,r),void 0!==n&&function o5(e,t,n){const r=e.projection=[];for(let i=0;i<t.length;i++){const o=n[i];r.push(null!=o?Array.from(o):null)}}(R,this.ngContentSelectors,n),I=function r5(e,t,n,r,i,o){const s=nn(),a=i[Fe],u=Er(s,i);nC(a,i,s,n,null,r);for(let l=0;l<n.length;l++)mr(oa(i,a,s.directiveStart+l,s),i);rC(a,i,s),u&&mr(u,i);const c=oa(i,a,s.directiveStart+s.componentOffset,s);if(e[vn]=i[vn]=c,null!==o)for(const l of o)l(c,t);return Ey(a,s,i),c}(fe,G,z,de,C,[s5]),ky(E,C,null)}finally{A0()}return new JL(this.componentType,I,Eu(R,C),C,R)}finally{x(o)}}}class JL extends LL{constructor(t,n,r,i,o){super(),this.location=r,this._rootLView=i,this._tNode=o,this.previousInputValues=null,this.instance=n,this.hostView=this.changeDetectorRef=new jl(i,void 0,!1),this.componentType=t}setInput(t,n){const r=this._tNode.inputs;let i;if(null!==r&&(i=r[t])){if(this.previousInputValues??=new Map,this.previousInputValues.has(t)&&Object.is(this.previousInputValues.get(t),n))return;const o=this._rootLView;Ay(o[Fe],o,i,t,n),this.previousInputValues.set(t,n),Bl(Xr(this._tNode.index,o))}}get injector(){return new Wn(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(t){this.hostView.onDestroy(t)}}function s5(){const e=nn();ch(me()[Fe],e)}let _o=(()=>{class e{static{this.__NG_ELEMENT_ID__=a5}}return e})();function a5(){return VC(nn(),me())}const u5=_o,BC=class extends u5{constructor(t,n,r){super(),this._lContainer=t,this._hostTNode=n,this._hostLView=r}get element(){return Eu(this._hostTNode,this._hostLView)}get injector(){return new Wn(this._hostTNode,this._hostLView)}get parentInjector(){const t=ph(this._hostTNode,this._hostLView);if(R0(t)){const n=_l(t,this._hostLView),r=wl(t);return new Wn(n[Fe].data[r+8],n)}return new Wn(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(t){const n=jC(this._lContainer);return null!==n&&n[t]||null}get length(){return this._lContainer.length-Fn}createEmbeddedView(t,n,r){let i,o;"number"==typeof r?i=r:null!=r&&(i=r.index,o=r.injector);const a=t.createEmbeddedViewImpl(n||{},o,null);return this.insertImpl(a,i,Ru(this._hostTNode,null)),a}createComponent(t,n,r,i,o){const s=t&&!function cl(e){return"function"==typeof e}(t);let a;if(s)a=n;else{const y=n||{};a=y.index,r=y.injector,i=y.projectableNodes,o=y.environmentInjector||y.ngModuleRef}const u=s?t:new Wl(He(t)),c=r||this.parentInjector;if(!o&&null==u.ngModule){const v=(s?c:this.parentInjector).get(co,null);v&&(o=v)}He(u.componentType??{});const g=u.create(c,i,null,o);return this.insertImpl(g.hostView,a,Ru(this._hostTNode,null)),g}insert(t,n){return this.insertImpl(t,n,!0)}insertImpl(t,n,r){const i=t._lView;if(function r3(e){return pr(e[Pn])}(i)){const a=this.indexOf(t);if(-1!==a)this.detach(a);else{const u=i[Pn],c=new BC(u,u[dr],u[Pn]);c.detach(c.indexOf(t))}}const o=this._adjustIndex(n),s=this._lContainer;return Fl(s,i,o,r),t.attachToViewContainerRef(),al(Wy(s),o,t),t}move(t,n){return this.insert(t,n)}indexOf(t){const n=jC(this._lContainer);return null!==n?n.indexOf(t):-1}remove(t){const n=this._adjustIndex(t,-1),r=Al(this._lContainer,n);r&&(Zs(Wy(this._lContainer),n),Rh(r[Fe],r))}detach(t){const n=this._adjustIndex(t,-1),r=Al(this._lContainer,n);return r&&null!=Zs(Wy(this._lContainer),n)?new jl(r):null}_adjustIndex(t,n=0){return t??this.length+n}};function jC(e){return e[8]}function Wy(e){return e[8]||(e[8]=[])}function VC(e,t){let n;const r=t[e.index];return pr(r)?n=r:(n=iC(r,t,null,e),t[e.index]=n,jh(t,n)),HC(n,t,e,r),new BC(n,e,t)}let HC=function $C(e,t,n,r){if(e[lo])return;let i;i=8&n.type?an(r):function c5(e,t){const n=e[vt],r=n.createComment(""),i=Er(t,e);return sa(n,Ph(n,i),r,function E8(e,t){return e.nextSibling(t)}(n,i),!1),r}(t,n),e[lo]=i},Yy=()=>!1;class Ky{constructor(t){this.queryList=t,this.matches=null}clone(){return new Ky(this.queryList)}setDirty(){this.queryList.setDirty()}}class Qy{constructor(t=[]){this.queries=t}createEmbeddedView(t){const n=t.queries;if(null!==n){const r=null!==t.contentQueries?t.contentQueries[0]:n.length,i=[];for(let o=0;o<r;o++){const s=n.getByIndex(o);i.push(this.queries[s.indexInDeclarationView].clone())}return new Qy(i)}return null}insertView(t){this.dirtyQueriesWithMatches(t)}detachView(t){this.dirtyQueriesWithMatches(t)}finishViewCreation(t){this.dirtyQueriesWithMatches(t)}dirtyQueriesWithMatches(t){for(let n=0;n<this.queries.length;n++)null!==tv(t,n).matches&&this.queries[n].setDirty()}}class zC{constructor(t,n,r=null){this.flags=n,this.read=r,this.predicate="string"==typeof t?function y5(e){return e.split(",").map(t=>t.trim())}(t):t}}class Zy{constructor(t=[]){this.queries=t}elementStart(t,n){for(let r=0;r<this.queries.length;r++)this.queries[r].elementStart(t,n)}elementEnd(t){for(let n=0;n<this.queries.length;n++)this.queries[n].elementEnd(t)}embeddedTView(t){let n=null;for(let r=0;r<this.length;r++){const i=null!==n?n.length:0,o=this.getByIndex(r).embeddedTView(t,i);o&&(o.indexInDeclarationView=r,null!==n?n.push(o):n=[o])}return null!==n?new Zy(n):null}template(t,n){for(let r=0;r<this.queries.length;r++)this.queries[r].template(t,n)}getByIndex(t){return this.queries[t]}get length(){return this.queries.length}track(t){this.queries.push(t)}}class Xy{constructor(t,n=-1){this.metadata=t,this.matches=null,this.indexInDeclarationView=-1,this.crossesNgTemplate=!1,this._appliesToNextNode=!0,this._declarationNodeIndex=n}elementStart(t,n){this.isApplyingToNode(n)&&this.matchTNode(t,n)}elementEnd(t){this._declarationNodeIndex===t.index&&(this._appliesToNextNode=!1)}template(t,n){this.elementStart(t,n)}embeddedTView(t,n){return this.isApplyingToNode(t)?(this.crossesNgTemplate=!0,this.addMatch(-t.index,n),new Xy(this.metadata)):null}isApplyingToNode(t){if(this._appliesToNextNode&&1&~this.metadata.flags){const n=this._declarationNodeIndex;let r=t.parent;for(;null!==r&&8&r.type&&r.index!==n;)r=r.parent;return n===(null!==r?r.index:-1)}return this._appliesToNextNode}matchTNode(t,n){const r=this.metadata.predicate;if(Array.isArray(r))for(let i=0;i<r.length;i++){const o=r[i];this.matchTNodeWithReadOption(t,n,h5(n,o)),this.matchTNodeWithReadOption(t,n,gh(n,t,o,!1,!1))}else r===qo?4&n.type&&this.matchTNodeWithReadOption(t,n,-1):this.matchTNodeWithReadOption(t,n,gh(n,t,r,!1,!1))}matchTNodeWithReadOption(t,n,r){if(null!==r){const i=this.metadata.read;if(null!==i)if(i===Cu||i===_o||i===qo&&4&n.type)this.addMatch(n.index,-2);else{const o=gh(n,t,i,!1,!1);null!==o&&this.addMatch(n.index,o)}else this.addMatch(n.index,r)}}addMatch(t,n){null===this.matches?this.matches=[t,n]:this.matches.push(t,n)}}function h5(e,t){const n=e.localNames;if(null!==n)for(let r=0;r<n.length;r+=2)if(n[r]===t)return n[r+1];return null}function g5(e,t,n,r){return-1===n?function p5(e,t){return 11&e.type?Eu(e,t):4&e.type?Uh(e,t):null}(t,e):-2===n?function m5(e,t,n){return n===Cu?Eu(t,e):n===qo?Uh(t,e):n===_o?VC(t,e):void 0}(e,t,r):oa(e,e[Fe],n,t)}function GC(e,t,n,r){const i=t[Ho].queries[r];if(null===i.matches){const o=e.data,s=n.matches,a=[];for(let u=0;null!==s&&u<s.length;u+=2){const c=s[u];a.push(c<0?null:g5(t,o[c],s[u+1],n.metadata.read))}i.matches=a}return i.matches}function Jy(e,t,n,r){const i=e.queries.getByIndex(n),o=i.matches;if(null!==o){const s=GC(e,t,i,n);for(let a=0;a<o.length;a+=2){const u=o[a];if(u>0)r.push(s[a/2]);else{const c=o[a+1],l=t[-u];for(let d=Fn;d<l.length;d++){const h=l[d];h[fl]===h[Pn]&&Jy(h[Fe],h,c,r)}if(null!==l[mu]){const d=l[mu];for(let h=0;h<d.length;h++){const g=d[h];Jy(g[Fe],g,c,r)}}}}}return r}function WC(e,t,n){const r=Bt();return r.firstCreatePass&&(function KC(e,t,n){null===e.queries&&(e.queries=new Zy),e.queries.track(new Xy(t,n))}(r,new zC(e,t,n),-1),!(2&~t)&&(r.staticViewQueries=!0)),function qC(e,t,n){const r=new U0(!(4&~n));return function P8(e,t,n,r){const i=sC(t);i.push(n),e.firstCreatePass&&aC(e).push(r,i.length-1)}(e,t,r,r.destroy),(t[Ho]??=new Qy).queries.push(new Ky(r))-1}(r,me(),t)}function tv(e,t){return e.queries.getByIndex(t)}function QC(e,t){const n=e[Fe],r=tv(n,t);return r.crossesNgTemplate?Jy(n,e,t,[]):GC(n,e,r,t)}class ca{}class V5{}class rv extends ca{constructor(t,n,r){super(),this._parent=n,this._bootstrapComponents=[],this.destroyCbs=[],this.componentFactoryResolver=new FC(this);const i=function Kt(e,t){const n=e[Ws]||null;if(!n&&!0===t)throw new Error(`Type ${mn(e)} does not have '\u0275mod' property.`);return n}(t);this._bootstrapComponents=function Jr(e){return e instanceof Function?e():e}(i.bootstrap),this._r3Injector=OD(t,n,[{provide:ca,useValue:this},{provide:Wh,useValue:this.componentFactoryResolver},...r],mn(t),new Set(["environment"])),this._r3Injector.resolveInjectorInitializers(),this.instance=this._r3Injector.get(t)}get injector(){return this._r3Injector}destroy(){const t=this._r3Injector;!t.destroyed&&t.destroy(),this.destroyCbs.forEach(n=>n()),this.destroyCbs=null}onDestroy(t){this.destroyCbs.push(t)}}class iv extends V5{constructor(t){super(),this.moduleType=t}create(t){return new rv(this.moduleType,t,[])}}let Kl=(()=>{class e{constructor(){this.taskId=0,this.pendingTasks=new Set,this.hasPendingTasks=new Ym(!1)}get _hasPendingTasks(){return this.hasPendingTasks.value}add(){this._hasPendingTasks||this.hasPendingTasks.next(!0);const n=this.taskId++;return this.pendingTasks.add(n),n}remove(n){this.pendingTasks.delete(n),0===this.pendingTasks.size&&this._hasPendingTasks&&this.hasPendingTasks.next(!1)}ngOnDestroy(){this.pendingTasks.clear(),this._hasPendingTasks&&this.hasPendingTasks.next(!1)}static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275prov=At({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();function Ln(e,t,n){return!Object.is(e[t],n)&&(e[t]=n,!0)}function Lu(e,t,n,r,i,o,s,a){const u=me(),c=Bt(),l=e+Et,d=c.firstCreatePass?function Y5(e,t,n,r,i,o,s,a,u){const c=t.consts,l=Ou(t,e,4,s||null,ho(c,a));Iy(t,n,l,ho(c,u)),ch(t,l);const d=l.tView=My(2,l,r,i,o,t.directiveRegistry,t.pipeRegistry,null,t.schemas,c,null);return null!==t.queries&&(t.queries.template(t,l),d.queries=t.queries.embeddedTView(l)),l}(l,c,u,t,n,r,i,o,s):c.data[l];po(d,!1);const h=yx(c,u,d,e);vl()&&Fh(c,u,h,d),mr(h,u);const g=iC(h,u,h,d);return u[l]=g,jh(u,g),function UC(e,t,n){return Yy(e,t,n)}(g,d,u),oh(d)&&Cy(c,u,d),null!=s&&xy(u,d,a),Lu}let yx=function vx(e,t,n,r){return go(!0),t[vt].createComment("")};function gv(e,t,n,r){const i=me();return Ln(i,Pi(),t)&&(Bt(),bo(bn(),i,e,t,n,r)),gv}function ap(e,t){return e<<17|t<<2}function vs(e){return e>>17&32767}function mv(e){return 2|e}function da(e){return(131068&e)>>2}function yv(e,t){return-131069&e|t<<2}function vv(e){return 1|e}function Kx(e,t,n,r){const i=e[n+1],o=null===t;let s=r?vs(i):da(i),a=!1;for(;0!==s&&(!1===a||o);){const c=e[s+1];R6(e[s],t)&&(a=!0,e[s+1]=r?vv(c):mv(c)),s=r?vs(c):da(c)}a&&(e[n+1]=r?mv(i):vv(i))}function R6(e,t){return null===e||null==t||(Array.isArray(e)?e[1]:e)===t||!(!Array.isArray(e)||"string"!=typeof t)&&Gn(e,t)>=0}function ec(e,t,n){const r=me();return Ln(r,Pi(),t)&&function $r(e,t,n,r,i,o,s,a){const u=Er(t,n);let l,c=t.inputs;!a&&null!=c&&(l=c[r])?(Ay(e,n,l,r,i),na(t)&&function j8(e,t){const n=Xr(t,e);16&n[st]||(n[st]|=64)}(n,t.index)):3&t.type&&(r=function B8(e){return"class"===e?"className":"for"===e?"htmlFor":"formaction"===e?"formAction":"innerHtml"===e?"innerHTML":"readonly"===e?"readOnly":"tabindex"===e?"tabIndex":e}(r),i=null!=s?s(i,t.value||"",r):i,o.setProperty(u,r,i))}(Bt(),bn(),r,e,t,r[vt],n,!1),ec}function bv(e,t,n,r,i){const s=i?"class":"style";Ay(e,n,t.inputs[s],s,r)}function wv(e,t,n){return function Li(e,t,n,r){const i=me(),o=Bt(),s=function $o(e){const t=bt.lFrame,n=t.bindingIndex;return t.bindingIndex=t.bindingIndex+e,n}(2);o.firstUpdatePass&&function iM(e,t,n,r){const i=e.data;if(null===i[n+1]){const o=i[gr()],s=function rM(e,t){return t>=e.expandoStartIndex}(e,n);(function uM(e,t){return!!(e.flags&(t?8:16))})(o,r)&&null===t&&!s&&(t=!1),t=function $6(e,t,n,r){const i=function S0(e){const t=bt.lFrame.currentDirectiveIndex;return-1===t?null:e[t]}(e);let o=r?t.residualClasses:t.residualStyles;if(null===i)0===(r?t.classBindings:t.styleBindings)&&(n=tf(n=_v(null,e,t,n,r),t.attrs,r),o=null);else{const s=t.directiveStylingLast;if(-1===s||e[s]!==i)if(n=_v(i,e,t,n,r),null===o){let u=function z6(e,t,n){const r=n?t.classBindings:t.styleBindings;if(0!==da(r))return e[vs(r)]}(e,t,r);void 0!==u&&Array.isArray(u)&&(u=_v(null,e,t,u[1],r),u=tf(u,t.attrs,r),function G6(e,t,n,r){e[vs(n?t.classBindings:t.styleBindings)]=r}(e,t,r,u))}else o=function q6(e,t,n){let r;const i=t.directiveEnd;for(let o=1+t.directiveStylingLast;o<i;o++)r=tf(r,e[o].hostAttrs,n);return tf(r,t.attrs,n)}(e,t,r)}return void 0!==o&&(r?t.residualClasses=o:t.residualStyles=o),n}(i,o,t,r),function k6(e,t,n,r,i,o){let s=o?t.classBindings:t.styleBindings,a=vs(s),u=da(s);e[r]=n;let l,c=!1;if(Array.isArray(n)?(l=n[1],(null===l||Gn(n,l)>0)&&(c=!0)):l=n,i)if(0!==u){const h=vs(e[a+1]);e[r+1]=ap(h,a),0!==h&&(e[h+1]=yv(e[h+1],r)),e[a+1]=function N6(e,t){return 131071&e|t<<17}(e[a+1],r)}else e[r+1]=ap(a,0),0!==a&&(e[a+1]=yv(e[a+1],r)),a=r;else e[r+1]=ap(u,0),0===a?a=r:e[u+1]=yv(e[u+1],r),u=r;c&&(e[r+1]=mv(e[r+1])),Kx(e,l,r,!0),Kx(e,l,r,!1),function O6(e,t,n,r,i){const o=i?e.residualClasses:e.residualStyles;null!=o&&"string"==typeof t&&Gn(o,t)>=0&&(n[r+1]=vv(n[r+1]))}(t,l,e,r,o),s=ap(a,u),o?t.classBindings=s:t.styleBindings=s}(i,o,t,n,s,r)}}(o,e,s,r),t!==Mt&&Ln(i,s,t)&&function sM(e,t,n,r,i,o,s,a){if(!(3&t.type))return;const u=e.data,c=u[a+1],l=function A6(e){return!(1&~e)}(c)?aM(u,t,n,i,da(c),s):void 0;up(l)||(up(o)||function T6(e){return!(2&~e)}(c)&&(o=aM(u,null,n,i,a,s)),function M8(e,t,n,r,i){if(t)i?e.addClass(n,r):e.removeClass(n,r);else{let o=-1===r.indexOf("-")?void 0:gs.DashCase;null==i?e.removeStyle(n,r,o):("string"==typeof i&&i.endsWith("!important")&&(i=i.slice(0,-10),o|=gs.Important),e.setStyle(n,r,i,o))}}(r,s,function pl(e,t){return an(t[e])}(gr(),n),i,o))}(o,o.data[gr()],i,i[vt],e,i[s+1]=function Q6(e,t){return null==e||""===e||("string"==typeof t?e+=t:"object"==typeof e&&(e=mn(function ps(e){return e instanceof gE?e.changingThisBreaksApplicationSecurity:e}(e)))),e}(t,n),r,s)}(e,t,n,!1),wv}function _v(e,t,n,r,i){let o=null;const s=n.directiveEnd;let a=n.directiveStylingLast;for(-1===a?a=n.directiveStart:a++;a<s&&(o=t[a],r=tf(r,o.hostAttrs,i),o!==e);)a++;return null!==e&&(n.directiveStylingLast=a),r}function tf(e,t,n){const r=n?1:2;let i=-1;if(null!==t)for(let o=0;o<t.length;o++){const s=t[o];"number"==typeof s?i=s:i===r&&(Array.isArray(e)||(e=void 0===e?[]:["",e]),Ht(e,s,!!n||t[++o]))}return void 0===e?null:e}function aM(e,t,n,r,i,o){const s=null===t;let a;for(;i>0;){const u=e[i],c=Array.isArray(u),l=c?u[1]:u,d=null===l;let h=n[i+1];h===Mt&&(h=d?St:void 0);let g=d?fs(h,r):l===r?h:void 0;if(c&&!up(g)&&(g=fs(u,r)),up(g)&&(a=g,s))return a;const y=e[i+1];i=s?vs(y):da(y)}if(null!==t){let u=o?t.residualClasses:t.residualStyles;null!=u&&(a=fs(u,r))}return a}function up(e){return void 0!==e}function bs(e,t,n,r){const i=me(),o=Bt(),s=Et+e,a=i[vt],u=o.firstCreatePass?function b4(e,t,n,r,i,o){const s=t.consts,u=Ou(t,e,2,r,ho(s,i));return Iy(t,n,u,ho(s,o)),null!==u.attrs&&Kh(u,u.attrs,!1),null!==u.mergedAttrs&&Kh(u,u.mergedAttrs,!0),null!==t.queries&&t.queries.elementStart(t,u),u}(s,o,i,t,n,r):o.data[s],c=dM(o,i,u,a,t,e);i[s]=c;const l=oh(u);return po(u,!0),YE(a,c,u),!function Zl(e){return!(32&~e.flags)}(u)&&vl()&&Fh(o,i,c,u),0===function o3(){return bt.lFrame.elementDepthCount}()&&mr(c,i),function s3(){bt.lFrame.elementDepthCount++}(),l&&(Cy(o,i,u),Ey(o,u,i)),null!==r&&xy(i,u),bs}function ws(){let e=nn();x0()?function M0(){bt.lFrame.isParent=!1}():(e=e.parent,po(e,!1));const t=e;(function u3(e){return bt.skipHydrationRootTNode===e})(t)&&function d3(){bt.skipHydrationRootTNode=null}(),function a3(){bt.lFrame.elementDepthCount--}();const n=Bt();return n.firstCreatePass&&(ch(n,e),h0(e)&&n.queries.elementEnd(e)),null!=t.classesWithoutHost&&function M3(e){return!!(8&e.flags)}(t)&&bv(n,t,me(),t.classesWithoutHost,!0),null!=t.stylesWithoutHost&&function I3(e){return!!(16&e.flags)}(t)&&bv(n,t,me(),t.stylesWithoutHost,!1),ws}function tc(e,t,n,r){return bs(e,t,n,r),ws(),tc}let dM=(e,t,n,r,i,o)=>(go(!0),Oh(r,i,function pD(){return bt.lFrame.currentNamespace}()));const rc="en-US";let wM=rc;function cf(e,t,n,r){const i=me(),o=Bt(),s=nn();return function Nv(e,t,n,r,i,o,s){const a=oh(r),c=e.firstCreatePass&&aC(e),l=t[vn],d=sC(t);let h=!0;if(3&r.type||s){const v=Er(r,t),b=s?s(v):v,_=d.length,E=s?I=>s(an(I[r.index])):r.index;let C=null;if(!s&&a&&(C=function E7(e,t,n,r){const i=e.cleanup;if(null!=i)for(let o=0;o<i.length-1;o+=2){const s=i[o];if(s===n&&i[o+1]===r){const a=t[hu],u=i[o+2];return a.length>u?a[u]:null}"string"==typeof s&&(o+=2)}return null}(e,t,i,r.index)),null!==C)(C.__ngLastListenerFn__||C).__ngNextListenerFn__=o,C.__ngLastListenerFn__=o,h=!1;else{o=YM(r,t,l,o,!1);const I=n.listen(b,i,o);d.push(o,I),c&&c.push(i,E,_,_+1)}}else o=YM(r,t,l,o,!1);const g=r.outputs;let y;if(h&&null!==g&&(y=g[i])){const v=y.length;if(v)for(let b=0;b<v;b+=2){const R=t[y[b]][y[b+1]].subscribe(o),G=d.length;d.push(o,R),c&&c.push(i,r.index,G,-(G+1))}}}(o,i,i[vt],s,e,t,r),cf}function WM(e,t,n,r){const i=x(null);try{return fo(6,t,n),!1!==n(r)}catch(o){return Vh(e,o),!1}finally{fo(7,t,n),x(i)}}function YM(e,t,n,r,i){return function o(s){if(s===Function)return r;Bl(e.componentOffset>-1?Xr(e.index,t):t);let u=WM(t,n,r,s),c=o.__ngNextListenerFn__;for(;c;)u=WM(t,n,c,s)&&u,c=c.__ngNextListenerFn__;return i&&!1===u&&s.preventDefault(),u}}function KM(e=1){return function v3(e){return(bt.lFrame.contextLView=function tD(e,t){for(;e>0;)t=t[pu],e--;return t}(e,bt.lFrame.contextLView))[vn]}(e)}function aI(){return function ev(e,t){return e[Ho].queries[t].queryList}(me(),T0())}let vI=(e,t,n,r,i)=>(go(!0),function gy(e,t){return e.createText(t)}(t[vt],r));function kI(e,t,n,r){return function OI(e,t,n,r,i,o){const s=t+n;return Ln(e,s,i)?function Do(e,t,n){return e[t]=n}(e,s+1,o?r.call(o,i):r(i)):function lf(e,t){const n=e[t];return n===Mt?void 0:n}(e,s+1)}(me(),function Cr(){const e=bt.lFrame;let t=e.bindingRootIndex;return-1===t&&(t=e.bindingRootIndex=e.tView.bindingStartIndex),t}(),e,t,n,r)}const rS=new ut(""),mp=new ut("");let Gv,$v=(()=>{class e{constructor(n,r,i){this._ngZone=n,this.registry=r,this._pendingCount=0,this._isZoneStable=!0,this._callbacks=[],this.taskTrackingZone=null,Gv||(function lB(e){Gv=e}(i),i.addToWindow(r)),this._watchAngularEvents(),n.run(()=>{this.taskTrackingZone=typeof Zone>"u"?null:Zone.current.get("TaskTrackingZone")})}_watchAngularEvents(){this._ngZone.onUnstable.subscribe({next:()=>{this._isZoneStable=!1}}),this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.subscribe({next:()=>{Cn.assertNotInAngularZone(),queueMicrotask(()=>{this._isZoneStable=!0,this._runCallbacksIfReady()})}})})}increasePendingRequestCount(){return this._pendingCount+=1,this._pendingCount}decreasePendingRequestCount(){if(this._pendingCount-=1,this._pendingCount<0)throw new Error("pending async requests below zero");return this._runCallbacksIfReady(),this._pendingCount}isStable(){return this._isZoneStable&&0===this._pendingCount&&!this._ngZone.hasPendingMacrotasks}_runCallbacksIfReady(){if(this.isStable())queueMicrotask(()=>{for(;0!==this._callbacks.length;){let n=this._callbacks.pop();clearTimeout(n.timeoutId),n.doneCb()}});else{let n=this.getPendingTasks();this._callbacks=this._callbacks.filter(r=>!r.updateCb||!r.updateCb(n)||(clearTimeout(r.timeoutId),!1))}}getPendingTasks(){return this.taskTrackingZone?this.taskTrackingZone.macroTasks.map(n=>({source:n.source,creationLocation:n.creationLocation,data:n.data})):[]}addCallback(n,r,i){let o=-1;r&&r>0&&(o=setTimeout(()=>{this._callbacks=this._callbacks.filter(s=>s.timeoutId!==o),n()},r)),this._callbacks.push({doneCb:n,timeoutId:o,updateCb:i})}whenStable(n,r,i){if(i&&!this.taskTrackingZone)throw new Error('Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/plugins/task-tracking" loaded?');this.addCallback(n,r,i),this._runCallbacksIfReady()}getPendingRequestCount(){return this._pendingCount}registerApplication(n){this.registry.registerApplication(n,this)}unregisterApplication(n){this.registry.unregisterApplication(n)}findProviders(n,r,i){return[]}static{this.\u0275fac=function(r){return new(r||e)(Rt(Cn),Rt(zv),Rt(mp))}}static{this.\u0275prov=At({token:e,factory:e.\u0275fac})}}return e})(),zv=(()=>{class e{constructor(){this._applications=new Map}registerApplication(n,r){this._applications.set(n,r)}unregisterApplication(n){this._applications.delete(n)}unregisterAllApplications(){this._applications.clear()}getTestability(n){return this._applications.get(n)||null}getAllTestabilities(){return Array.from(this._applications.values())}getAllRootElements(){return Array.from(this._applications.keys())}findTestabilityInTree(n,r=!0){return Gv?.findTestabilityInTree(this,n,r)??null}static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275prov=At({token:e,factory:e.\u0275fac,providedIn:"platform"})}}return e})();function qv(e){return!!e&&"function"==typeof e.then}function iS(e){return!!e&&"function"==typeof e.subscribe}const fB=new ut("");let Wv=(()=>{class e{constructor(){this.initialized=!1,this.done=!1,this.donePromise=new Promise((n,r)=>{this.resolve=n,this.reject=r}),this.appInits=_t(fB,{optional:!0})??[]}runInitializers(){if(this.initialized)return;const n=[];for(const i of this.appInits){const o=i();if(qv(o))n.push(o);else if(iS(o)){const s=new Promise((a,u)=>{o.subscribe({complete:a,error:u})});n.push(s)}}const r=()=>{this.done=!0,this.resolve()};Promise.all(n).then(()=>{r()}).catch(i=>{this.reject(i)}),0===n.length&&r(),this.initialized=!0}static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275prov=At({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();const oS=new ut("");function uS(e,t){return Array.isArray(t)?t.reduce(uS,e):{...e,...t}}let pa=(()=>{class e{constructor(){this._bootstrapListeners=[],this._runningTick=!1,this._destroyed=!1,this._destroyListeners=[],this._views=[],this.internalErrorHandler=_t(PD),this.afterRenderEffectManager=_t(zl),this.externalTestViews=new Set,this.beforeRender=new eo,this.afterTick=new eo,this.componentTypes=[],this.components=[],this.isStable=_t(Kl).hasPendingTasks.pipe(function is(e,t){return function(r){if("function"!=typeof e)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return r.lift(new os(e,t))}}(n=>!n)),this._injector=_t(co)}get destroyed(){return this._destroyed}get injector(){return this._injector}bootstrap(n,r){const i=n instanceof DC;if(!this._injector.get(Wv).done)throw!i&&function fi(e){const t=He(e)||Vt(e)||qt(e);return null!==t&&t.standalone}(n),new Ae(405,!1);let s;s=i?n:this._injector.get(Wh).resolveComponentFactory(n),this.componentTypes.push(s.componentType);const a=function dB(e){return e.isBoundToModule}(s)?void 0:this._injector.get(ca),c=s.create(di.NULL,[],r||s.selector,a),l=c.location.nativeElement,d=c.injector.get(rS,null);return d?.registerApplication(l),c.onDestroy(()=>{this.detachView(c.hostView),yp(this.components,c),d?.unregisterApplication(l)}),this._loadComponent(c),c}tick(){this._tick(!0)}_tick(n){if(this._runningTick)throw new Ae(101,!1);const r=x(null);try{this._runningTick=!0,this.detectChangesInAttachedViews(n)}catch(i){this.internalErrorHandler(i)}finally{this.afterTick.next(),this._runningTick=!1,x(r)}}detectChangesInAttachedViews(n){let r=0;const i=this.afterRenderEffectManager;for(;;){if(r===dC)throw new Ae(103,!1);if(n){const o=0===r;this.beforeRender.next(o);for(let{_lView:s,notifyErrorHandler:a}of this._views)pB(s,o,a)}if(r++,i.executeInternalCallbacks(),![...this.externalTestViews.keys(),...this._views].some(({_lView:o})=>Yv(o))&&(i.execute(),![...this.externalTestViews.keys(),...this._views].some(({_lView:o})=>Yv(o))))break}}attachView(n){const r=n;this._views.push(r),r.attachToAppRef(this)}detachView(n){const r=n;yp(this._views,r),r.detachFromAppRef()}_loadComponent(n){this.attachView(n.hostView),this.tick(),this.components.push(n);const r=this._injector.get(oS,[]);[...this._bootstrapListeners,...r].forEach(i=>i(n))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(n=>n()),this._views.slice().forEach(n=>n.destroy())}finally{this._destroyed=!0,this._views=[],this._bootstrapListeners=[],this._destroyListeners=[]}}onDestroy(n){return this._destroyListeners.push(n),()=>yp(this._destroyListeners,n)}destroy(){if(this._destroyed)throw new Ae(406,!1);const n=this._injector;n.destroy&&!n.destroyed&&n.destroy()}get viewCount(){return this._views.length}warnIfDestroyed(){}static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275prov=At({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();function yp(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}function pB(e,t,n){!t&&!Yv(e)||function gB(e,t,n){let r;n?(r=0,e[st]|=1024):r=64&e[st]?0:1,Hh(e,t,r)}(e,n,t)}function Yv(e){return w0(e)}let bB=(()=>{class e{constructor(){this.zone=_t(Cn),this.applicationRef=_t(pa)}initialize(){this._onMicrotaskEmptySubscription||(this._onMicrotaskEmptySubscription=this.zone.onMicrotaskEmpty.subscribe({next:()=>{this.zone.run(()=>{this.applicationRef.tick()})}}))}ngOnDestroy(){this._onMicrotaskEmptySubscription?.unsubscribe()}static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275prov=At({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();function wB(){const e=_t(Cn),t=_t(yo);return n=>e.runOutsideAngular(()=>t.handleError(n))}let DB=(()=>{class e{constructor(){this.subscription=new ln,this.initialized=!1,this.zone=_t(Cn),this.pendingTasks=_t(Kl)}initialize(){if(this.initialized)return;this.initialized=!0;let n=null;!this.zone.isStable&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(n=this.pendingTasks.add()),this.zone.runOutsideAngular(()=>{this.subscription.add(this.zone.onStable.subscribe(()=>{Cn.assertNotInAngularZone(),queueMicrotask(()=>{null!==n&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(this.pendingTasks.remove(n),n=null)})}))}),this.subscription.add(this.zone.onUnstable.subscribe(()=>{Cn.assertInAngularZone(),n??=this.pendingTasks.add()}))}ngOnDestroy(){this.subscription.unsubscribe()}static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275prov=At({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();const Wo=new ut("",{providedIn:"root",factory:()=>_t(Wo,Ft.Optional|Ft.SkipSelf)||function EB(){return typeof $localize<"u"&&$localize.locale||rc}()}),Kv=new ut("");let dS=(()=>{class e{constructor(n){this._injector=n,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(n,r){const i=function WL(e="zone.js",t){return"noop"===e?new NC:"zone.js"===e?new Cn(t):e}(r?.ngZone,function fS(e){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:e?.eventCoalescing??!1,shouldCoalesceRunChangeDetection:e?.runCoalescing??!1}}({eventCoalescing:r?.ngZoneEventCoalescing,runCoalescing:r?.ngZoneRunCoalescing}));return i.run(()=>{const o=function U5(e,t,n){return new rv(e,t,n)}(n.moduleType,this.injector,function lS(e){return[{provide:Cn,useFactory:e},{provide:ao,multi:!0,useFactory:()=>{const t=_t(bB,{optional:!0});return()=>t.initialize()}},{provide:ao,multi:!0,useFactory:()=>{const t=_t(DB);return()=>{t.initialize()}}},{provide:PD,useFactory:wB}]}(()=>i)),s=o.injector.get(yo,null);return i.runOutsideAngular(()=>{const a=i.onError.subscribe({next:u=>{s.handleError(u)}});o.onDestroy(()=>{yp(this._modules,o),a.unsubscribe()})}),function aS(e,t,n){try{const r=n();return qv(r)?r.catch(i=>{throw t.runOutsideAngular(()=>e.handleError(i)),i}):r}catch(r){throw t.runOutsideAngular(()=>e.handleError(r)),r}}(s,i,()=>{const a=o.injector.get(Wv);return a.runInitializers(),a.donePromise.then(()=>(function _M(e){"string"==typeof e&&(wM=e.toLowerCase().replace(/_/g,"-"))}(o.injector.get(Wo,rc)||rc),this._moduleDoBootstrap(o),o))})})}bootstrapModule(n,r=[]){const i=uS({},r);return function vB(e,t,n){const r=new iv(n);return Promise.resolve(r)}(0,0,n).then(o=>this.bootstrapModuleFactory(o,i))}_moduleDoBootstrap(n){const r=n.injector.get(pa);if(n._bootstrapComponents.length>0)n._bootstrapComponents.forEach(i=>r.bootstrap(i));else{if(!n.instance.ngDoBootstrap)throw new Ae(-403,!1);n.instance.ngDoBootstrap(r)}this._modules.push(n)}onDestroy(n){this._destroyListeners.push(n)}get injector(){return this._injector}destroy(){if(this._destroyed)throw new Ae(404,!1);this._modules.slice().forEach(r=>r.destroy()),this._destroyListeners.forEach(r=>r());const n=this._injector.get(Kv,null);n&&(n.forEach(r=>r()),n.clear()),this._destroyed=!0}get destroyed(){return this._destroyed}static{this.\u0275fac=function(r){return new(r||e)(Rt(di))}}static{this.\u0275prov=At({token:e,factory:e.\u0275fac,providedIn:"platform"})}}return e})(),_s=null;const hS=new ut("");function pS(e,t,n=[]){const r=`Platform: ${t}`,i=new ut(r);return(o=[])=>{let s=Qv();if(!s||s.injector.get(hS,!1)){const a=[...n,...o,{provide:i,useValue:!0}];e?e(a):function MB(e){if(_s&&!_s.get(hS,!1))throw new Ae(400,!1);(function sS(){!function Ga(e){za=e}(()=>{throw new Ae(600,!1)})})(),_s=e;const t=e.get(dS);(function mS(e){e.get(rE,null)?.forEach(n=>n())})(e)}(function gS(e=[],t){return di.create({name:t,providers:[{provide:s0,useValue:"platform"},{provide:Kv,useValue:new Set([()=>_s=null])},...e]})}(a,r))}return function IB(e){const t=Qv();if(!t)throw new Ae(401,!1);return t}()}}function Qv(){return _s?.get(dS)??null}const UB=pS(null,"core",[]);let $B=(()=>{class e{constructor(n){}static{this.\u0275fac=function(r){return new(r||e)(Rt(pa))}}static{this.\u0275mod=gt({type:e})}static{this.\u0275inj=Fo({})}}return e})(),QS=null;function i1(){return QS}class xj{}const ma=new ut(""),p1=/\s+/,oT=[];let sT=(()=>{class e{constructor(n,r){this._ngEl=n,this._renderer=r,this.initialClasses=oT,this.stateMap=new Map}set klass(n){this.initialClasses=null!=n?n.trim().split(p1):oT}set ngClass(n){this.rawClass="string"==typeof n?n.trim().split(p1):n}ngDoCheck(){for(const r of this.initialClasses)this._updateState(r,!0);const n=this.rawClass;if(Array.isArray(n)||n instanceof Set)for(const r of n)this._updateState(r,!0);else if(null!=n)for(const r of Object.keys(n))this._updateState(r,!!n[r]);this._applyStateDiff()}_updateState(n,r){const i=this.stateMap.get(n);void 0!==i?(i.enabled!==r&&(i.changed=!0,i.enabled=r),i.touched=!0):this.stateMap.set(n,{enabled:r,changed:!0,touched:!0})}_applyStateDiff(){for(const n of this.stateMap){const r=n[0],i=n[1];i.changed?(this._toggleClass(r,i.enabled),i.changed=!1):i.touched||(i.enabled&&this._toggleClass(r,!1),this.stateMap.delete(r)),i.touched=!1}}_toggleClass(n,r){(n=n.trim()).length>0&&n.split(p1).forEach(i=>{r?this._renderer.addClass(this._ngEl.nativeElement,i):this._renderer.removeClass(this._ngEl.nativeElement,i)})}static{this.\u0275fac=function(r){return new(r||e)(kt(Cu),kt(xC))}}static{this.\u0275dir=dt({type:e,selectors:[["","ngClass",""]],inputs:{klass:[m.None,"class","klass"],ngClass:"ngClass"},standalone:!0})}}return e})(),cT=(()=>{class e{constructor(n,r){this._viewContainer=n,this._context=new gV,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=r}set ngIf(n){this._context.$implicit=this._context.ngIf=n,this._updateView()}set ngIfThen(n){lT("ngIfThen",n),this._thenTemplateRef=n,this._thenViewRef=null,this._updateView()}set ngIfElse(n){lT("ngIfElse",n),this._elseTemplateRef=n,this._elseViewRef=null,this._updateView()}_updateView(){this._context.$implicit?this._thenViewRef||(this._viewContainer.clear(),this._elseViewRef=null,this._thenTemplateRef&&(this._thenViewRef=this._viewContainer.createEmbeddedView(this._thenTemplateRef,this._context))):this._elseViewRef||(this._viewContainer.clear(),this._thenViewRef=null,this._elseTemplateRef&&(this._elseViewRef=this._viewContainer.createEmbeddedView(this._elseTemplateRef,this._context)))}static ngTemplateContextGuard(n,r){return!0}static{this.\u0275fac=function(r){return new(r||e)(kt(_o),kt(qo))}}static{this.\u0275dir=dt({type:e,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"},standalone:!0})}}return e})();class gV{constructor(){this.$implicit=null,this.ngIf=null}}function lT(e,t){if(t&&!t.createEmbeddedView)throw new Error(`${e} must be a TemplateRef, but received '${mn(t)}'.`)}let HV=(()=>{class e{static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275mod=gt({type:e})}static{this.\u0275inj=Fo({})}}return e})();function pT(e){return"server"===e}class wH extends xj{constructor(){super(...arguments),this.supportsDOMEvents=!0}}class w1 extends wH{static makeCurrent(){!function Cj(e){QS??=e}(new w1)}onAndCancel(t,n,r){return t.addEventListener(n,r),()=>{t.removeEventListener(n,r)}}dispatchEvent(t,n){t.dispatchEvent(n)}remove(t){t.parentNode&&t.parentNode.removeChild(t)}createElement(t,n){return(n=n||this.getDefaultDocument()).createElement(t)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(t){return t.nodeType===Node.ELEMENT_NODE}isShadowRoot(t){return t instanceof DocumentFragment}getGlobalEventTarget(t,n){return"window"===n?window:"document"===n?t:"body"===n?t.body:null}getBaseHref(t){const n=function _H(){return bf=bf||document.querySelector("base"),bf?bf.getAttribute("href"):null}();return null==n?null:function DH(e){return new URL(e,document.baseURI).pathname}(n)}resetBaseElement(){bf=null}getUserAgent(){return window.navigator.userAgent}getCookie(t){return function fV(e,t){t=encodeURIComponent(t);for(const n of e.split(";")){const r=n.indexOf("="),[i,o]=-1==r?[n,""]:[n.slice(0,r),n.slice(r+1)];if(i.trim()===t)return decodeURIComponent(o)}return null}(document.cookie,t)}}let bf=null,CH=(()=>{class e{build(){return new XMLHttpRequest}static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275prov=At({token:e,factory:e.\u0275fac})}}return e})();const _1=new ut("");let ET=(()=>{class e{constructor(n,r){this._zone=r,this._eventNameToPlugin=new Map,n.forEach(i=>{i.manager=this}),this._plugins=n.slice().reverse()}addEventListener(n,r,i){return this._findPluginFor(r).addEventListener(n,r,i)}getZone(){return this._zone}_findPluginFor(n){let r=this._eventNameToPlugin.get(n);if(r)return r;if(r=this._plugins.find(o=>o.supports(n)),!r)throw new Ae(5101,!1);return this._eventNameToPlugin.set(n,r),r}static{this.\u0275fac=function(r){return new(r||e)(Rt(_1),Rt(Cn))}}static{this.\u0275prov=At({token:e,factory:e.\u0275fac})}}return e})();class CT{constructor(t){this._doc=t}}const D1="ng-app-id";let xT=(()=>{class e{constructor(n,r,i,o={}){this.doc=n,this.appId=r,this.nonce=i,this.platformId=o,this.styleRef=new Map,this.hostNodes=new Set,this.styleNodesInDOM=this.collectServerRenderedStyles(),this.platformIsServer=pT(o),this.resetHostNodes()}addStyles(n){for(const r of n)1===this.changeUsageCount(r,1)&&this.onStyleAdded(r)}removeStyles(n){for(const r of n)this.changeUsageCount(r,-1)<=0&&this.onStyleRemoved(r)}ngOnDestroy(){const n=this.styleNodesInDOM;n&&(n.forEach(r=>r.remove()),n.clear());for(const r of this.getAllStyles())this.onStyleRemoved(r);this.resetHostNodes()}addHost(n){this.hostNodes.add(n);for(const r of this.getAllStyles())this.addStyleToHost(n,r)}removeHost(n){this.hostNodes.delete(n)}getAllStyles(){return this.styleRef.keys()}onStyleAdded(n){for(const r of this.hostNodes)this.addStyleToHost(r,n)}onStyleRemoved(n){const r=this.styleRef;r.get(n)?.elements?.forEach(i=>i.remove()),r.delete(n)}collectServerRenderedStyles(){const n=this.doc.head?.querySelectorAll(`style[${D1}="${this.appId}"]`);if(n?.length){const r=new Map;return n.forEach(i=>{null!=i.textContent&&r.set(i.textContent,i)}),r}return null}changeUsageCount(n,r){const i=this.styleRef;if(i.has(n)){const o=i.get(n);return o.usage+=r,o.usage}return i.set(n,{usage:r,elements:[]}),r}getStyleElement(n,r){const i=this.styleNodesInDOM,o=i?.get(r);if(o?.parentNode===n)return i.delete(r),o.removeAttribute(D1),o;{const s=this.doc.createElement("style");return this.nonce&&s.setAttribute("nonce",this.nonce),s.textContent=r,this.platformIsServer&&s.setAttribute(D1,this.appId),n.appendChild(s),s}}addStyleToHost(n,r){const i=this.getStyleElement(n,r),o=this.styleRef,s=o.get(r)?.elements;s?s.push(i):o.set(r,{elements:[i],usage:1})}resetHostNodes(){const n=this.hostNodes;n.clear(),n.add(this.doc.head)}static{this.\u0275fac=function(r){return new(r||e)(Rt(ma),Rt(_h),Rt(iE,8),Rt(xu))}}static{this.\u0275prov=At({token:e,factory:e.\u0275fac})}}return e})();const E1={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/MathML/"},C1=/%COMP%/g,SH=new ut("",{providedIn:"root",factory:()=>!0});function IT(e,t){return t.map(n=>n.replace(C1,e))}let ST=(()=>{class e{constructor(n,r,i,o,s,a,u,c=null){this.eventManager=n,this.sharedStylesHost=r,this.appId=i,this.removeStylesOnCompDestroy=o,this.doc=s,this.platformId=a,this.ngZone=u,this.nonce=c,this.rendererByCompId=new Map,this.platformIsServer=pT(a),this.defaultRenderer=new x1(n,s,u,this.platformIsServer)}createRenderer(n,r){if(!n||!r)return this.defaultRenderer;this.platformIsServer&&r.encapsulation===p.ShadowDom&&(r={...r,encapsulation:p.Emulated});const i=this.getOrCreateRenderer(n,r);return i instanceof NT?i.applyToHost(n):i instanceof M1&&i.applyStyles(),i}getOrCreateRenderer(n,r){const i=this.rendererByCompId;let o=i.get(r.id);if(!o){const s=this.doc,a=this.ngZone,u=this.eventManager,c=this.sharedStylesHost,l=this.removeStylesOnCompDestroy,d=this.platformIsServer;switch(r.encapsulation){case p.Emulated:o=new NT(u,c,r,this.appId,l,s,a,d);break;case p.ShadowDom:return new kH(u,c,n,r,s,a,this.nonce,d);default:o=new M1(u,c,r,l,s,a,d)}i.set(r.id,o)}return o}ngOnDestroy(){this.rendererByCompId.clear()}static{this.\u0275fac=function(r){return new(r||e)(Rt(ET),Rt(xT),Rt(_h),Rt(SH),Rt(ma),Rt(xu),Rt(Cn),Rt(iE))}}static{this.\u0275prov=At({token:e,factory:e.\u0275fac})}}return e})();class x1{constructor(t,n,r,i){this.eventManager=t,this.doc=n,this.ngZone=r,this.platformIsServer=i,this.data=Object.create(null),this.throwOnSyntheticProps=!0,this.destroyNode=null}destroy(){}createElement(t,n){return n?this.doc.createElementNS(E1[n]||n,t):this.doc.createElement(t)}createComment(t){return this.doc.createComment(t)}createText(t){return this.doc.createTextNode(t)}appendChild(t,n){(TT(t)?t.content:t).appendChild(n)}insertBefore(t,n,r){t&&(TT(t)?t.content:t).insertBefore(n,r)}removeChild(t,n){t&&t.removeChild(n)}selectRootElement(t,n){let r="string"==typeof t?this.doc.querySelector(t):t;if(!r)throw new Ae(-5104,!1);return n||(r.textContent=""),r}parentNode(t){return t.parentNode}nextSibling(t){return t.nextSibling}setAttribute(t,n,r,i){if(i){n=i+":"+n;const o=E1[i];o?t.setAttributeNS(o,n,r):t.setAttribute(n,r)}else t.setAttribute(n,r)}removeAttribute(t,n,r){if(r){const i=E1[r];i?t.removeAttributeNS(i,n):t.removeAttribute(`${r}:${n}`)}else t.removeAttribute(n)}addClass(t,n){t.classList.add(n)}removeClass(t,n){t.classList.remove(n)}setStyle(t,n,r,i){i&(gs.DashCase|gs.Important)?t.style.setProperty(n,r,i&gs.Important?"important":""):t.style[n]=r}removeStyle(t,n,r){r&gs.DashCase?t.style.removeProperty(n):t.style[n]=""}setProperty(t,n,r){null!=t&&(t[n]=r)}setValue(t,n){t.nodeValue=n}listen(t,n,r){if("string"==typeof t&&!(t=i1().getGlobalEventTarget(this.doc,t)))throw new Error(`Unsupported event target ${t} for event ${n}`);return this.eventManager.addEventListener(t,n,this.decoratePreventDefault(r))}decoratePreventDefault(t){return n=>{if("__ngUnwrap__"===n)return t;!1===(this.platformIsServer?this.ngZone.runGuarded(()=>t(n)):t(n))&&n.preventDefault()}}}function TT(e){return"TEMPLATE"===e.tagName&&void 0!==e.content}class kH extends x1{constructor(t,n,r,i,o,s,a,u){super(t,o,s,u),this.sharedStylesHost=n,this.hostEl=r,this.shadowRoot=r.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);const c=IT(i.id,i.styles);for(const l of c){const d=document.createElement("style");a&&d.setAttribute("nonce",a),d.textContent=l,this.shadowRoot.appendChild(d)}}nodeOrShadowRoot(t){return t===this.hostEl?this.shadowRoot:t}appendChild(t,n){return super.appendChild(this.nodeOrShadowRoot(t),n)}insertBefore(t,n,r){return super.insertBefore(this.nodeOrShadowRoot(t),n,r)}removeChild(t,n){return super.removeChild(this.nodeOrShadowRoot(t),n)}parentNode(t){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(t)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}}class M1 extends x1{constructor(t,n,r,i,o,s,a,u){super(t,o,s,a),this.sharedStylesHost=n,this.removeStylesOnCompDestroy=i,this.styles=u?IT(u,r.styles):r.styles}applyStyles(){this.sharedStylesHost.addStyles(this.styles)}destroy(){this.removeStylesOnCompDestroy&&this.sharedStylesHost.removeStyles(this.styles)}}class NT extends M1{constructor(t,n,r,i,o,s,a,u){const c=i+"-"+r.id;super(t,n,r,o,s,a,u,c),this.contentAttr=function TH(e){return"_ngcontent-%COMP%".replace(C1,e)}(c),this.hostAttr=function NH(e){return"_nghost-%COMP%".replace(C1,e)}(c)}applyToHost(t){this.applyStyles(),this.setAttribute(t,this.hostAttr,"")}createElement(t,n){const r=super.createElement(t,n);return super.setAttribute(r,this.contentAttr,""),r}}let OH=(()=>{class e extends CT{constructor(n){super(n)}supports(n){return!0}addEventListener(n,r,i){return n.addEventListener(r,i,!1),()=>this.removeEventListener(n,r,i)}removeEventListener(n,r,i){return n.removeEventListener(r,i)}static{this.\u0275fac=function(r){return new(r||e)(Rt(ma))}}static{this.\u0275prov=At({token:e,factory:e.\u0275fac})}}return e})();const AT=["alt","control","meta","shift"],RH={"\b":"Backspace","\t":"Tab","\x7f":"Delete","\x1b":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},PH={alt:e=>e.altKey,control:e=>e.ctrlKey,meta:e=>e.metaKey,shift:e=>e.shiftKey};let FH=(()=>{class e extends CT{constructor(n){super(n)}supports(n){return null!=e.parseEventName(n)}addEventListener(n,r,i){const o=e.parseEventName(r),s=e.eventCallback(o.fullKey,i,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>i1().onAndCancel(n,o.domEventName,s))}static parseEventName(n){const r=n.toLowerCase().split("."),i=r.shift();if(0===r.length||"keydown"!==i&&"keyup"!==i)return null;const o=e._normalizeKey(r.pop());let s="",a=r.indexOf("code");if(a>-1&&(r.splice(a,1),s="code."),AT.forEach(c=>{const l=r.indexOf(c);l>-1&&(r.splice(l,1),s+=c+".")}),s+=o,0!=r.length||0===o.length)return null;const u={};return u.domEventName=i,u.fullKey=s,u}static matchEventFullKeyCode(n,r){let i=RH[n.key]||n.key,o="";return r.indexOf("code.")>-1&&(i=n.code,o="code."),!(null==i||!i)&&(i=i.toLowerCase()," "===i?i="space":"."===i&&(i="dot"),AT.forEach(s=>{s!==i&&(0,PH[s])(n)&&(o+=s+".")}),o+=i,o===r)}static eventCallback(n,r,i){return o=>{e.matchEventFullKeyCode(o,n)&&i.runGuarded(()=>r(o))}}static _normalizeKey(n){return"esc"===n?"escape":n}static{this.\u0275fac=function(r){return new(r||e)(Rt(ma))}}static{this.\u0275prov=At({token:e,factory:e.\u0275fac})}}return e})();const OT=[{provide:xu,useValue:"browser"},{provide:rE,useValue:function LH(){w1.makeCurrent()},multi:!0},{provide:ma,useFactory:function jH(){return function gF(e){q0=e}(document),document},deps:[]}],VH=pS(UB,"browser",OT),HH=new ut(""),RT=[{provide:mp,useClass:class EH{addToWindow(t){Gt.getAngularTestability=(r,i=!0)=>{const o=t.findTestabilityInTree(r,i);if(null==o)throw new Ae(5103,!1);return o},Gt.getAllAngularTestabilities=()=>t.getAllTestabilities(),Gt.getAllAngularRootElements=()=>t.getAllRootElements(),Gt.frameworkStabilizers||(Gt.frameworkStabilizers=[]),Gt.frameworkStabilizers.push(r=>{const i=Gt.getAllAngularTestabilities();let o=i.length;const s=function(){o--,0==o&&r()};i.forEach(a=>{a.whenStable(s)})})}findTestabilityInTree(t,n,r){return null==n?null:t.getTestability(n)??(r?i1().isShadowRoot(n)?this.findTestabilityInTree(t,n.host,!0):this.findTestabilityInTree(t,n.parentElement,!0):null)}},deps:[]},{provide:rS,useClass:$v,deps:[Cn,zv,mp]},{provide:$v,useClass:$v,deps:[Cn,zv,mp]}],PT=[{provide:s0,useValue:"root"},{provide:yo,useFactory:function BH(){return new yo},deps:[]},{provide:_1,useClass:OH,multi:!0,deps:[ma,Cn,xu]},{provide:_1,useClass:FH,multi:!0,deps:[ma]},ST,xT,ET,{provide:CC,useExisting:ST},{provide:class qV{},useClass:CH,deps:[]},[]];let FT=(()=>{class e{constructor(n){}static withServerTransition(n){return{ngModule:e,providers:[{provide:_h,useValue:n.appId}]}}static{this.\u0275fac=function(r){return new(r||e)(Rt(HH,12))}}static{this.\u0275mod=gt({type:e})}static{this.\u0275inj=Fo({providers:[...PT,...RT],imports:[HV,$B]})}}return e})();const GH={dataId:"1234",nodes:[{id:"123",label:["John Doe","01/01/1970"],imageUrl:"",icon:"\uf007",fx:1e3,fy:400,additionalIcon:"\uf3a5"},{id:"456",label:["Richard Hill","14/05/1982"],imageUrl:"https://randomuser.me/api/portraits/thumb/men/99.jpg",icon:"",fx:332,fy:684,additionalIcon:""},{id:"789",label:["Rick Smith","Software Developer"],imageUrl:"https://randomuser.me/api/portraits/thumb/men/21.jpg",icon:"",fx:55,fy:60,additionalIcon:"\uf2dc"},{id:"4",label:["James Jones","BA"],imageUrl:"https://randomuser.me/api/portraits/thumb/men/9.jpg",icon:"",fx:414,fy:369,additionalIcon:""},{id:"423",label:["Aston Villa","Football Club","Founded 1874"],imageUrl:"https://houseofv.ghost.io/content/images/2024/01/GC72JKwWwAAuyGk.png",icon:"",fx:313,fy:255,additionalIcon:"\uf1e3"}],links:[{source:"123",target:"456",lineStyle:"Dotted",sourceArrow:!1,targetArrow:!0,linkId:"123_456",relationships:[{labelIndex:0,label:"Worked at IBM",source:"123",target:"456",linkIcon:!0},{labelIndex:1,label:"Both in same scrum team",source:"123",target:"456",linkIcon:!0}]},{source:"456",target:"789",lineStyle:"Solid",sourceArrow:!0,targetArrow:!0,linkId:"456_789",relationships:[{labelIndex:2,label:"Play in the same football team",source:"456",target:"789",linkIcon:!1},{labelIndex:3,label:"Daughters in the same class at school",source:"456",target:"789",linkIcon:!0},{labelIndex:4,label:"Went on a family holiday together last year",source:"456",target:"789",linkIcon:!1}]},{source:"789",target:"123",lineStyle:"Dotted",sourceArrow:!0,targetArrow:!0,linkId:"789_123",relationships:[{labelIndex:5,label:"Drink in the same pub",source:"789",target:"123",linkIcon:!0},{labelIndex:6,label:"Drinking friends",source:"789",target:"123",linkIcon:!1}]},{source:"4",target:"123",lineStyle:"Dotted",sourceArrow:!0,targetArrow:!1,linkId:"4_123",relationships:[{labelIndex:7,label:["Same University"],source:"4",target:"123",linkIcon:!0}]}]};var qH="5.16.0";function Ds(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function I1(e){return 1===e.length&&(e=function WH(e){return function(t,n){return Ds(e(t),n)}}(e)),{left:function(t,n,r,i){for(null==r&&(r=0),null==i&&(i=t.length);r<i;){var o=r+i>>>1;e(t[o],n)<0?r=o+1:i=o}return r},right:function(t,n,r,i){for(null==r&&(r=0),null==i&&(i=t.length);r<i;){var o=r+i>>>1;e(t[o],n)>0?i=o:r=o+1}return r}}}var VT=I1(Ds),HT=VT.right,YH=VT.left;const ya=HT;function KH(e,t){null==t&&(t=UT);for(var n=0,r=e.length-1,i=e[0],o=new Array(r<0?0:r);n<r;)o[n]=t(i,i=e[++n]);return o}function UT(e,t){return[e,t]}function QH(e,t,n){var s,a,u,c,r=e.length,i=t.length,o=new Array(r*i);for(null==n&&(n=UT),s=u=0;s<r;++s)for(c=e[s],a=0;a<i;++a,++u)o[u]=n(c,t[a]);return o}function ZH(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function Es(e){return null===e?NaN:+e}function $T(e,t){var s,a,n=e.length,r=0,i=-1,o=0,u=0;if(null==t)for(;++i<n;)isNaN(s=Es(e[i]))||(u+=(a=s-o)*(s-(o+=a/++r)));else for(;++i<n;)isNaN(s=Es(t(e[i],i,e)))||(u+=(a=s-o)*(s-(o+=a/++r)));if(r>1)return u/(r-1)}function zT(e,t){var n=$T(e,t);return n&&Math.sqrt(n)}function S1(e,t){var i,o,s,n=e.length,r=-1;if(null==t){for(;++r<n;)if(null!=(i=e[r])&&i>=i)for(o=s=i;++r<n;)null!=(i=e[r])&&(o>i&&(o=i),s<i&&(s=i))}else for(;++r<n;)if(null!=(i=t(e[r],r,e))&&i>=i)for(o=s=i;++r<n;)null!=(i=t(e[r],r,e))&&(o>i&&(o=i),s<i&&(s=i));return[o,s]}var GT=Array.prototype,XH=GT.slice,JH=GT.map;function Hp(e){return function(){return e}}function eU(e){return e}function ni(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((t-e)/n)),o=new Array(i);++r<i;)o[r]=e+r*n;return o}var T1=Math.sqrt(50),N1=Math.sqrt(10),A1=Math.sqrt(2);function k1(e,t,n){var r,o,s,a,i=-1;if(n=+n,(e=+e)==(t=+t)&&n>0)return[e];if((r=t<e)&&(o=e,e=t,t=o),0===(a=_f(e,t,n))||!isFinite(a))return[];if(a>0)for(e=Math.ceil(e/a),t=Math.floor(t/a),s=new Array(o=Math.ceil(t-e+1));++i<o;)s[i]=(e+i)*a;else for(e=Math.floor(e*a),t=Math.ceil(t*a),s=new Array(o=Math.ceil(e-t+1));++i<o;)s[i]=(e-i)/a;return r&&s.reverse(),s}function _f(e,t,n){var r=(t-e)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),o=r/Math.pow(10,i);return i>=0?(o>=T1?10:o>=N1?5:o>=A1?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=T1?10:o>=N1?5:o>=A1?2:1)}function va(e,t,n){var r=Math.abs(t-e)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),o=r/i;return o>=T1?i*=10:o>=N1?i*=5:o>=A1&&(i*=2),t<e?-i:i}function O1(e){return Math.ceil(Math.log(e.length)/Math.LN2)+1}function tU(){var e=eU,t=S1,n=O1;function r(i){var o,a,s=i.length,u=new Array(s);for(o=0;o<s;++o)u[o]=e(i[o],o,i);var c=t(u),l=c[0],d=c[1],h=n(u,l,d);Array.isArray(h)||(h=va(l,d,h),h=ni(Math.ceil(l/h)*h,d,h));for(var g=h.length;h[0]<=l;)h.shift(),--g;for(;h[g-1]>d;)h.pop(),--g;var v,y=new Array(g+1);for(o=0;o<=g;++o)(v=y[o]=[]).x0=o>0?h[o-1]:l,v.x1=o<g?h[o]:d;for(o=0;o<s;++o)l<=(a=u[o])&&a<=d&&y[ya(h,a,0,g)].push(i[o]);return y}return r.value=function(i){return arguments.length?(e="function"==typeof i?i:Hp(i),r):e},r.domain=function(i){return arguments.length?(t="function"==typeof i?i:Hp([i[0],i[1]]),r):t},r.thresholds=function(i){return arguments.length?(n="function"==typeof i?i:Array.isArray(i)?Hp(XH.call(i)):Hp(i),r):n},r}function Df(e,t,n){if(null==n&&(n=Es),r=e.length){if((t=+t)<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,i=(r-1)*t,o=Math.floor(i),s=+n(e[o],o,e);return s+(+n(e[o+1],o+1,e)-s)*(i-o)}}function nU(e,t,n){return e=JH.call(e,Es).sort(Ds),Math.ceil((n-t)/(2*(Df(e,.75)-Df(e,.25))*Math.pow(e.length,-1/3)))}function rU(e,t,n){return Math.ceil((n-t)/(3.5*zT(e)*Math.pow(e.length,-1/3)))}function qT(e,t){var i,o,n=e.length,r=-1;if(null==t){for(;++r<n;)if(null!=(i=e[r])&&i>=i)for(o=i;++r<n;)null!=(i=e[r])&&i>o&&(o=i)}else for(;++r<n;)if(null!=(i=t(e[r],r,e))&&i>=i)for(o=i;++r<n;)null!=(i=t(e[r],r,e))&&i>o&&(o=i);return o}function iU(e,t){var o,n=e.length,r=n,i=-1,s=0;if(null==t)for(;++i<n;)isNaN(o=Es(e[i]))?--r:s+=o;else for(;++i<n;)isNaN(o=Es(t(e[i],i,e)))?--r:s+=o;if(r)return s/r}function oU(e,t){var i,n=e.length,r=-1,o=[];if(null==t)for(;++r<n;)isNaN(i=Es(e[r]))||o.push(i);else for(;++r<n;)isNaN(i=Es(t(e[r],r,e)))||o.push(i);return Df(o.sort(Ds),.5)}function R1(e){for(var n,o,s,t=e.length,r=-1,i=0;++r<t;)i+=e[r].length;for(o=new Array(i);--t>=0;)for(n=(s=e[t]).length;--n>=0;)o[--i]=s[n];return o}function WT(e,t){var i,o,n=e.length,r=-1;if(null==t){for(;++r<n;)if(null!=(i=e[r])&&i>=i)for(o=i;++r<n;)null!=(i=e[r])&&o>i&&(o=i)}else for(;++r<n;)if(null!=(i=t(e[r],r,e))&&i>=i)for(o=i;++r<n;)null!=(i=t(e[r],r,e))&&o>i&&(o=i);return o}function sU(e,t){for(var n=t.length,r=new Array(n);n--;)r[n]=e[t[n]];return r}function aU(e,t){if(n=e.length){var n,o,r=0,i=0,s=e[i];for(null==t&&(t=Ds);++r<n;)(t(o=e[r],s)<0||0!==t(s,s))&&(s=o,i=r);if(0===t(s,s))return i}}function uU(e,t,n){for(var i,o,r=(n??e.length)-(t=null==t?0:+t);r;)o=Math.random()*r--|0,i=e[r+t],e[r+t]=e[o+t],e[o+t]=i;return e}function cU(e,t){var i,n=e.length,r=-1,o=0;if(null==t)for(;++r<n;)(i=+e[r])&&(o+=i);else for(;++r<n;)(i=+t(e[r],r,e))&&(o+=i);return o}function YT(e){if(!(o=e.length))return[];for(var t=-1,n=WT(e,lU),r=new Array(n);++t<n;)for(var o,i=-1,s=r[t]=new Array(o);++i<o;)s[i]=e[i][t];return r}function lU(e){return e.length}function fU(){return YT(arguments)}var P1=Array.prototype.slice;function dU(e){return e}var Up=1,$p=2,F1=3,Ef=4,KT=1e-6;function hU(e){return"translate("+(e+.5)+",0)"}function pU(e){return"translate(0,"+(e+.5)+")"}function gU(e){return function(t){return+e(t)}}function mU(e){var t=Math.max(0,e.bandwidth()-1)/2;return e.round()&&(t=Math.round(t)),function(n){return+e(n)+t}}function yU(){return!this.__axis}function zp(e,t){var n=[],r=null,i=null,o=6,s=6,a=3,u=e===Up||e===Ef?-1:1,c=e===Ef||e===$p?"x":"y",l=e===Up||e===F1?hU:pU;function d(h){var g=r??(t.ticks?t.ticks.apply(t,n):t.domain()),y=i??(t.tickFormat?t.tickFormat.apply(t,n):dU),v=Math.max(o,0)+a,b=t.range(),_=+b[0]+.5,E=+b[b.length-1]+.5,C=(t.bandwidth?mU:gU)(t.copy()),I=h.selection?h.selection():h,R=I.selectAll(".domain").data([null]),G=I.selectAll(".tick").data(g,t).order(),z=G.exit(),de=G.enter().append("g").attr("class","tick"),oe=G.select("line"),fe=G.select("text");R=R.merge(R.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),G=G.merge(de),oe=oe.merge(de.append("line").attr("stroke","currentColor").attr(c+"2",u*o)),fe=fe.merge(de.append("text").attr("fill","currentColor").attr(c,u*v).attr("dy",e===Up?"0em":e===F1?"0.71em":"0.32em")),h!==I&&(R=R.transition(h),G=G.transition(h),oe=oe.transition(h),fe=fe.transition(h),z=z.transition(h).attr("opacity",KT).attr("transform",function(re){return isFinite(re=C(re))?l(re):this.getAttribute("transform")}),de.attr("opacity",KT).attr("transform",function(re){var T=this.parentNode.__axis;return l(T&&isFinite(T=T(re))?T:C(re))})),z.remove(),R.attr("d",e===Ef||e==$p?s?"M"+u*s+","+_+"H0.5V"+E+"H"+u*s:"M0.5,"+_+"V"+E:s?"M"+_+","+u*s+"V0.5H"+E+"V"+u*s:"M"+_+",0.5H"+E),G.attr("opacity",1).attr("transform",function(re){return l(C(re))}),oe.attr(c+"2",u*o),fe.attr(c,u*v).text(y),I.filter(yU).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",e===$p?"start":e===Ef?"end":"middle"),I.each(function(){this.__axis=C})}return d.scale=function(h){return arguments.length?(t=h,d):t},d.ticks=function(){return n=P1.call(arguments),d},d.tickArguments=function(h){return arguments.length?(n=null==h?[]:P1.call(h),d):n.slice()},d.tickValues=function(h){return arguments.length?(r=null==h?null:P1.call(h),d):r&&r.slice()},d.tickFormat=function(h){return arguments.length?(i=h,d):i},d.tickSize=function(h){return arguments.length?(o=s=+h,d):o},d.tickSizeInner=function(h){return arguments.length?(o=+h,d):o},d.tickSizeOuter=function(h){return arguments.length?(s=+h,d):s},d.tickPadding=function(h){return arguments.length?(a=+h,d):a},d}function vU(e){return zp(Up,e)}function bU(e){return zp($p,e)}function wU(e){return zp(F1,e)}function _U(e){return zp(Ef,e)}var DU={value:function(){}};function QT(){for(var r,e=0,t=arguments.length,n={};e<t;++e){if(!(r=arguments[e]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new Gp(n)}function Gp(e){this._=e}function CU(e,t){for(var i,n=0,r=e.length;n<r;++n)if((i=e[n]).name===t)return i.value}function ZT(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=DU,e=e.slice(0,r).concat(e.slice(r+1));break}return null!=n&&e.push({name:t,value:n}),e}Gp.prototype=QT.prototype={constructor:Gp,on:function(e,t){var i,n=this._,r=function EU(e,t){return e.trim().split(/^|\s+/).map(function(n){var r="",i=n.indexOf(".");if(i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}(e+"",n),o=-1,s=r.length;if(!(arguments.length<2)){if(null!=t&&"function"!=typeof t)throw new Error("invalid callback: "+t);for(;++o<s;)if(i=(e=r[o]).type)n[i]=ZT(n[i],e.name,t);else if(null==t)for(i in n)n[i]=ZT(n[i],e.name,null);return this}for(;++o<s;)if((i=(e=r[o]).type)&&(i=CU(n[i],e.name)))return i},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new Gp(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var i,o,n=new Array(i),r=0;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(r=0,i=(o=this._[e]).length;r<i;++r)o[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],i=0,o=r.length;i<o;++i)r[i].value.apply(t,n)}};const uc=QT;function xU(){}function qp(e){return null==e?xU:function(){return this.querySelector(e)}}function IU(){return[]}function L1(e){return null==e?IU:function(){return this.querySelectorAll(e)}}function B1(e){return function(){return this.matches(e)}}function XT(e){return new Array(e.length)}function Wp(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Wp.prototype={constructor:Wp,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function kU(e,t,n,r,i,o){for(var a,s=0,u=t.length,c=o.length;s<c;++s)(a=t[s])?(a.__data__=o[s],r[s]=a):n[s]=new Wp(e,o[s]);for(;s<u;++s)(a=t[s])&&(i[s]=a)}function OU(e,t,n,r,i,o,s){var a,u,g,c={},l=t.length,d=o.length,h=new Array(l);for(a=0;a<l;++a)(u=t[a])&&(h[a]=g="$"+s.call(u,u.__data__,a,t),g in c?i[a]=u:c[g]=u);for(a=0;a<d;++a)(u=c[g="$"+s.call(e,o[a],a,o)])?(r[a]=u,u.__data__=o[a],c[g]=null):n[a]=new Wp(e,o[a]);for(a=0;a<l;++a)(u=t[a])&&c[h[a]]===u&&(i[a]=u)}function VU(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}var j1="http://www.w3.org/1999/xhtml";const V1={svg:"http://www.w3.org/2000/svg",xhtml:j1,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Cf(e){var t=e+="",n=t.indexOf(":");return n>=0&&"xmlns"!==(t=e.slice(0,n))&&(e=e.slice(n+1)),V1.hasOwnProperty(t)?{space:V1[t],local:e}:e}function WU(e){return function(){this.removeAttribute(e)}}function YU(e){return function(){this.removeAttributeNS(e.space,e.local)}}function KU(e,t){return function(){this.setAttribute(e,t)}}function QU(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function ZU(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttribute(e):this.setAttribute(e,n)}}function XU(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function H1(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function e$(e){return function(){this.style.removeProperty(e)}}function t$(e,t,n){return function(){this.style.setProperty(e,t,n)}}function n$(e,t,n){return function(){var r=t.apply(this,arguments);null==r?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function ba(e,t){return e.style.getPropertyValue(t)||H1(e).getComputedStyle(e,null).getPropertyValue(t)}function i$(e){return function(){delete this[e]}}function o$(e,t){return function(){this[e]=t}}function s$(e,t){return function(){var n=t.apply(this,arguments);null==n?delete this[e]:this[e]=n}}function e2(e){return e.trim().split(/^|\s+/)}function U1(e){return e.classList||new t2(e)}function t2(e){this._node=e,this._names=e2(e.getAttribute("class")||"")}function n2(e,t){for(var n=U1(e),r=-1,i=t.length;++r<i;)n.add(t[r])}function r2(e,t){for(var n=U1(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}function u$(e){return function(){n2(this,e)}}function c$(e){return function(){r2(this,e)}}function l$(e,t){return function(){(t.apply(this,arguments)?n2:r2)(this,e)}}function d$(){this.textContent=""}function h$(e){return function(){this.textContent=e}}function p$(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function m$(){this.innerHTML=""}function y$(e){return function(){this.innerHTML=e}}function v$(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function w$(){this.nextSibling&&this.parentNode.appendChild(this)}function D$(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function C$(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===j1&&t.documentElement.namespaceURI===j1?t.createElement(e):t.createElementNS(n,e)}}function x$(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Yp(e){var t=Cf(e);return(t.local?x$:C$)(t)}function I$(){return null}function T$(){var e=this.parentNode;e&&e.removeChild(this)}function A$(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function k$(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}t2.prototype={add:function(e){this._names.indexOf(e)<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};var i2={},Ue=null;function F$(e,t,n){return e=o2(e,t,n),function(r){var i=r.relatedTarget;(!i||i!==this&&!(8&i.compareDocumentPosition(this)))&&e.call(this,r)}}function o2(e,t,n){return function(r){var i=Ue;Ue=r;try{e.call(this,this.__data__,t,n)}finally{Ue=i}}}function B$(e){return function(){var t=this.__on;if(t){for(var o,n=0,r=-1,i=t.length;n<i;++n)o=t[n],e.type&&o.type!==e.type||o.name!==e.name?t[++r]=o:this.removeEventListener(o.type,o.listener,o.capture);++r?t.length=r:delete this.__on}}}function j$(e,t,n){var r=i2.hasOwnProperty(e.type)?F$:o2;return function(i,o,s){var u,a=this.__on,c=r(t,o,s);if(a)for(var l=0,d=a.length;l<d;++l)if((u=a[l]).type===e.type&&u.name===e.name)return this.removeEventListener(u.type,u.listener,u.capture),this.addEventListener(u.type,u.listener=c,u.capture=n),void(u.value=t);this.addEventListener(e.type,c,n),u={type:e.type,name:e.name,value:t,listener:c,capture:n},a?a.push(u):this.__on=[u]}}function xf(e,t,n,r){var i=Ue;e.sourceEvent=Ue,Ue=e;try{return t.apply(n,r)}finally{Ue=i}}function s2(e,t,n){var r=H1(e),i=r.CustomEvent;"function"==typeof i?i=new i(t,n):(i=r.document.createEvent("Event"),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function H$(e,t){return function(){return s2(this,e,t)}}function U$(e,t){return function(){return s2(this,e,t.apply(this,arguments))}}typeof document<"u"&&("onmouseenter"in document.documentElement||(i2={mouseenter:"mouseover",mouseleave:"mouseout"}));var $1=[null];function Sr(e,t){this._groups=e,this._parents=t}function a2(){return new Sr([[document.documentElement]],$1)}Sr.prototype=a2.prototype={constructor:Sr,select:function MU(e){"function"!=typeof e&&(e=qp(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var u,c,o=t[i],s=o.length,a=r[i]=new Array(s),l=0;l<s;++l)(u=o[l])&&(c=e.call(u,u.__data__,l,o))&&("__data__"in u&&(c.__data__=u.__data__),a[l]=c);return new Sr(r,this._parents)},selectAll:function SU(e){"function"!=typeof e&&(e=L1(e));for(var t=this._groups,n=t.length,r=[],i=[],o=0;o<n;++o)for(var u,s=t[o],a=s.length,c=0;c<a;++c)(u=s[c])&&(r.push(e.call(u,u.__data__,c,s)),i.push(u));return new Sr(r,i)},filter:function TU(e){"function"!=typeof e&&(e=B1(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var u,o=t[i],s=o.length,a=r[i]=[],c=0;c<s;++c)(u=o[c])&&e.call(u,u.__data__,c,o)&&a.push(u);return new Sr(r,this._parents)},data:function RU(e,t){if(!e)return g=new Array(this.size()),c=-1,this.each(function(G){g[++c]=G}),g;var n=t?OU:kU,r=this._parents,i=this._groups;"function"!=typeof e&&(e=function AU(e){return function(){return e}}(e));for(var o=i.length,s=new Array(o),a=new Array(o),u=new Array(o),c=0;c<o;++c){var l=r[c],d=i[c],h=d.length,g=e.call(l,l&&l.__data__,c,r),y=g.length,v=a[c]=new Array(y),b=s[c]=new Array(y);n(l,d,v,b,u[c]=new Array(h),g,t);for(var I,R,E=0,C=0;E<y;++E)if(I=v[E]){for(E>=C&&(C=E+1);!(R=b[C])&&++C<y;);I._next=R||null}}return(s=new Sr(s,r))._enter=a,s._exit=u,s},enter:function NU(){return new Sr(this._enter||this._groups.map(XT),this._parents)},exit:function PU(){return new Sr(this._exit||this._groups.map(XT),this._parents)},join:function FU(e,t,n){var r=this.enter(),i=this,o=this.exit();return r="function"==typeof e?e(r):r.append(e+""),null!=t&&(i=t(i)),null==n?o.remove():n(o),r&&i?r.merge(i).order():i},merge:function LU(e){for(var t=this._groups,n=e._groups,r=t.length,o=Math.min(r,n.length),s=new Array(r),a=0;a<o;++a)for(var h,u=t[a],c=n[a],l=u.length,d=s[a]=new Array(l),g=0;g<l;++g)(h=u[g]||c[g])&&(d[g]=h);for(;a<r;++a)s[a]=t[a];return new Sr(s,this._parents)},order:function BU(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var s,r=e[t],i=r.length-1,o=r[i];--i>=0;)(s=r[i])&&(o&&4^s.compareDocumentPosition(o)&&o.parentNode.insertBefore(s,o),o=s);return this},sort:function jU(e){function t(d,h){return d&&h?e(d.__data__,h.__data__):!d-!h}e||(e=VU);for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var c,s=n[o],a=s.length,u=i[o]=new Array(a),l=0;l<a;++l)(c=s[l])&&(u[l]=c);u.sort(t)}return new Sr(i,this._parents).order()},call:function HU(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this},nodes:function UU(){var e=new Array(this.size()),t=-1;return this.each(function(){e[++t]=this}),e},node:function $U(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,o=r.length;i<o;++i){var s=r[i];if(s)return s}return null},size:function zU(){var e=0;return this.each(function(){++e}),e},empty:function GU(){return!this.node()},each:function qU(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var a,i=t[n],o=0,s=i.length;o<s;++o)(a=i[o])&&e.call(a,a.__data__,o,i);return this},attr:function JU(e,t){var n=Cf(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==t?n.local?YU:WU:"function"==typeof t?n.local?XU:ZU:n.local?QU:KU)(n,t))},style:function r$(e,t,n){return arguments.length>1?this.each((null==t?e$:"function"==typeof t?n$:t$)(e,t,n??"")):ba(this.node(),e)},property:function a$(e,t){return arguments.length>1?this.each((null==t?i$:"function"==typeof t?s$:o$)(e,t)):this.node()[e]},classed:function f$(e,t){var n=e2(e+"");if(arguments.length<2){for(var r=U1(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof t?l$:t?u$:c$)(n,t))},text:function g$(e){return arguments.length?this.each(null==e?d$:("function"==typeof e?p$:h$)(e)):this.node().textContent},html:function b$(e){return arguments.length?this.each(null==e?m$:("function"==typeof e?v$:y$)(e)):this.node().innerHTML},raise:function _$(){return this.each(w$)},lower:function E$(){return this.each(D$)},append:function M$(e){var t="function"==typeof e?e:Yp(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})},insert:function S$(e,t){var n="function"==typeof e?e:Yp(e),r=null==t?I$:"function"==typeof t?t:qp(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})},remove:function N$(){return this.each(T$)},clone:function O$(e){return this.select(e?k$:A$)},datum:function R$(e){return arguments.length?this.property("__data__",e):this.node().__data__},on:function V$(e,t,n){var i,s,r=function L$(e){return e.trim().split(/^|\s+/).map(function(t){var n="",r=t.indexOf(".");return r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),{type:t,name:n}})}(e+""),o=r.length;if(!(arguments.length<2)){for(a=t?j$:B$,null==n&&(n=!1),i=0;i<o;++i)this.each(a(r[i],t,n));return this}var a=this.node().__on;if(a)for(var l,u=0,c=a.length;u<c;++u)for(i=0,l=a[u];i<o;++i)if((s=r[i]).type===l.type&&s.name===l.name)return l.value},dispatch:function $$(e,t){return this.each(("function"==typeof t?U$:H$)(e,t))}};const cc=a2;function rn(e){return"string"==typeof e?new Sr([[document.querySelector(e)]],[document.documentElement]):new Sr([[e]],$1)}function z1(){Ue.stopImmediatePropagation()}function lc(){Ue.preventDefault(),Ue.stopImmediatePropagation()}function Kp(e){var t=e.document.documentElement,n=rn(e).on("dragstart.drag",lc,!0);"onselectstart"in t?n.on("selectstart.drag",lc,!0):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function Qp(e,t){var n=e.document.documentElement,r=rn(e).on("dragstart.drag",null);t&&(r.on("click.drag",lc,!0),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}function fc(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Mf(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Cs(){}var dc=1/.7,hc="\\s*([+-]?\\d+)\\s*",If="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",xo="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",z$=/^#([0-9a-f]{3,8})$/,G$=new RegExp("^rgb\\("+[hc,hc,hc]+"\\)$"),q$=new RegExp("^rgb\\("+[xo,xo,xo]+"\\)$"),W$=new RegExp("^rgba\\("+[hc,hc,hc,If]+"\\)$"),Y$=new RegExp("^rgba\\("+[xo,xo,xo,If]+"\\)$"),K$=new RegExp("^hsl\\("+[If,xo,xo]+"\\)$"),Q$=new RegExp("^hsla\\("+[If,xo,xo,If]+"\\)$"),u2={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function c2(){return this.rgb().formatHex()}function l2(){return this.rgb().formatRgb()}function xs(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=z$.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?f2(t):3===n?new or(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?Zp(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?Zp(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=G$.exec(e))?new or(t[1],t[2],t[3],1):(t=q$.exec(e))?new or(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=W$.exec(e))?Zp(t[1],t[2],t[3],t[4]):(t=Y$.exec(e))?Zp(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=K$.exec(e))?p2(t[1],t[2]/100,t[3]/100,1):(t=Q$.exec(e))?p2(t[1],t[2]/100,t[3]/100,t[4]):u2.hasOwnProperty(e)?f2(u2[e]):"transparent"===e?new or(NaN,NaN,NaN,0):null}function f2(e){return new or(e>>16&255,e>>8&255,255&e,1)}function Zp(e,t,n,r){return r<=0&&(e=t=n=NaN),new or(e,t,n,r)}function G1(e){return e instanceof Cs||(e=xs(e)),e?new or((e=e.rgb()).r,e.g,e.b,e.opacity):new or}function pc(e,t,n,r){return 1===arguments.length?G1(e):new or(e,t,n,r??1)}function or(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function d2(){return"#"+q1(this.r)+q1(this.g)+q1(this.b)}function h2(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"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===e?")":", "+e+")")}function q1(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function p2(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Mo(e,t,n,r)}function g2(e){if(e instanceof Mo)return new Mo(e.h,e.s,e.l,e.opacity);if(e instanceof Cs||(e=xs(e)),!e)return new Mo;if(e instanceof Mo)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),s=NaN,a=o-i,u=(o+i)/2;return a?(s=t===o?(n-r)/a+6*(n<r):n===o?(r-t)/a+2:(t-n)/a+4,a/=u<.5?o+i:2-o-i,s*=60):a=u>0&&u<1?0:s,new Mo(s,a,u,e.opacity)}function Xp(e,t,n,r){return 1===arguments.length?g2(e):new Mo(e,t,n,r??1)}function Mo(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function W1(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}function m2(e,t,n,r,i){var o=e*e,s=o*e;return((1-3*e+3*o-s)*t+(4-6*o+3*s)*n+(1+3*e+3*o-3*s)*r+s*i)/6}function y2(e){var t=e.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,t-1):Math.floor(n*t),i=e[r],o=e[r+1];return m2((n-r/t)*t,r>0?e[r-1]:2*i-o,i,o,r<t-1?e[r+2]:2*o-i)}}function v2(e){var t=e.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*t);return m2((n-r/t)*t,e[(r+t-1)%t],e[r%t],e[(r+1)%t],e[(r+2)%t])}}function Jp(e){return function(){return e}}function b2(e,t){return function(n){return e+n*t}}function eg(e,t){var n=t-e;return n?b2(e,n>180||n<-180?n-360*Math.round(n/360):n):Jp(isNaN(e)?t:e)}function tr(e,t){var n=t-e;return n?b2(e,n):Jp(isNaN(e)?t:e)}fc(Cs,xs,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:c2,formatHex:c2,formatHsl:function Z$(){return g2(this).formatHsl()},formatRgb:l2,toString:l2}),fc(or,pc,Mf(Cs,{brighter:function(e){return e=null==e?dc:Math.pow(dc,e),new or(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new or(this.r*e,this.g*e,this.b*e,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:d2,formatHex:d2,formatRgb:h2,toString:h2})),fc(Mo,Xp,Mf(Cs,{brighter:function(e){return e=null==e?dc:Math.pow(dc,e),new Mo(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new Mo(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new or(W1(e>=240?e-240:e+120,i,r),W1(e,i,r),W1(e<120?e+240:e-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 e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===e?")":", "+e+")")}}));const Sf=function e(t){var n=function J$(e){return 1==(e=+e)?tr:function(t,n){return n-t?function X$(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):Jp(isNaN(t)?n:t)}}(t);function r(i,o){var s=n((i=pc(i)).r,(o=pc(o)).r),a=n(i.g,o.g),u=n(i.b,o.b),c=tr(i.opacity,o.opacity);return function(l){return i.r=s(l),i.g=a(l),i.b=u(l),i.opacity=c(l),i+""}}return r.gamma=e,r}(1);function w2(e){return function(t){var s,a,n=t.length,r=new Array(n),i=new Array(n),o=new Array(n);for(s=0;s<n;++s)a=pc(t[s]),r[s]=a.r||0,i[s]=a.g||0,o[s]=a.b||0;return r=e(r),i=e(i),o=e(o),a.opacity=1,function(u){return a.r=r(u),a.g=i(u),a.b=o(u),a+""}}}var _2=w2(y2),ez=w2(v2);function Y1(e,t){t||(t=[]);var i,n=e?Math.min(t.length,e.length):0,r=t.slice();return function(o){for(i=0;i<n;++i)r[i]=e[i]*(1-o)+t[i]*o;return r}}function D2(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function tz(e,t){return(D2(t)?Y1:E2)(e,t)}function E2(e,t){var s,n=t?t.length:0,r=e?Math.min(n,e.length):0,i=new Array(r),o=new Array(n);for(s=0;s<r;++s)i[s]=Tf(e[s],t[s]);for(;s<n;++s)o[s]=t[s];return function(a){for(s=0;s<r;++s)o[s]=i[s](a);return o}}function C2(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function mi(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function x2(e,t){var i,n={},r={};for(i in(null===e||"object"!=typeof e)&&(e={}),(null===t||"object"!=typeof t)&&(t={}),t)i in e?n[i]=Tf(e[i],t[i]):r[i]=t[i];return function(o){for(i in n)r[i]=n[i](o);return r}}var K1=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Q1=new RegExp(K1.source,"g");function Z1(e,t){var r,i,o,n=K1.lastIndex=Q1.lastIndex=0,s=-1,a=[],u=[];for(e+="",t+="";(r=K1.exec(e))&&(i=Q1.exec(t));)(o=i.index)>n&&(o=t.slice(n,o),a[s]?a[s]+=o:a[++s]=o),(r=r[0])===(i=i[0])?a[s]?a[s]+=i:a[++s]=i:(a[++s]=null,u.push({i:s,x:mi(r,i)})),n=Q1.lastIndex;return n<t.length&&(o=t.slice(n),a[s]?a[s]+=o:a[++s]=o),a.length<2?u[0]?function rz(e){return function(t){return e(t)+""}}(u[0].x):function nz(e){return function(){return e}}(t):(t=u.length,function(c){for(var d,l=0;l<t;++l)a[(d=u[l]).i]=d.x(c);return a.join("")})}function Tf(e,t){var r,n=typeof t;return null==t||"boolean"===n?Jp(t):("number"===n?mi:"string"===n?(r=xs(t))?(t=r,Sf):Z1:t instanceof xs?Sf:t instanceof Date?C2:D2(t)?Y1:Array.isArray(t)?E2:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?x2:mi)(e,t)}function X1(){for(var t,e=Ue;t=e.sourceEvent;)e=t;return e}function tg(e,t){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,[(r=r.matrixTransform(e.getScreenCTM().inverse())).x,r.y]}var i=e.getBoundingClientRect();return[t.clientX-i.left-e.clientLeft,t.clientY-i.top-e.clientTop]}function Nf(e,t,n){arguments.length<3&&(n=t,t=X1().changedTouches);for(var o,r=0,i=t?t.length:0;r<i;++r)if((o=t[r]).identifier===n)return tg(e,o);return null}function _a(e){var t=X1();return t.changedTouches&&(t=t.changedTouches[0]),tg(e,t)}var ng,Of,gc=0,Af=0,kf=0,M2=1e3,rg=0,Da=0,ig=0,Rf="object"==typeof performance&&performance.now?performance:Date,I2="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function mc(){return Da||(I2(iz),Da=Rf.now()+ig)}function iz(){Da=0}function Pf(){this._call=this._time=this._next=null}function og(e,t,n){var r=new Pf;return r.restart(e,t,n),r}function S2(){mc(),++gc;for(var t,e=ng;e;)(t=Da-e._time)>=0&&e._call.call(null,t),e=e._next;--gc}function T2(){Da=(rg=Rf.now())+ig,gc=Af=0;try{S2()}finally{gc=0,function sz(){for(var e,n,t=ng,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:ng=n);Of=e,J1(r)}(),Da=0}}function oz(){var e=Rf.now(),t=e-rg;t>M2&&(ig-=t,rg=e)}function J1(e){gc||(Af&&(Af=clearTimeout(Af)),e-Da>24?(e<1/0&&(Af=setTimeout(T2,e-Rf.now()-ig)),kf&&(kf=clearInterval(kf))):(kf||(rg=Rf.now(),kf=setInterval(oz,M2)),gc=1,I2(T2)))}function eb(e,t,n){var r=new Pf;return r.restart(function(i){r.stop(),e(i+t)},t=null==t?0:+t,n),r}Pf.prototype=og.prototype={constructor:Pf,restart:function(e,t,n){if("function"!=typeof e)throw new TypeError("callback is not a function");n=(null==n?mc():+n)+(null==t?0:+t),!this._next&&Of!==this&&(Of?Of._next=this:ng=this,Of=this),this._call=e,this._time=n,J1()},stop:function(){this._call&&(this._call=null,this._time=1/0,J1())}};var az=uc("start","end","cancel","interrupt"),uz=[],N2=0,tb=1,nb=2,sg=3,rb=5,ag=6;function ug(e,t,n,r,i,o){var s=e.__transition;if(s){if(n in s)return}else e.__transition={};!function cz(e,t,n){var i,r=e.__transition;function s(c){var l,d,h,g;if(n.state!==tb)return u();for(l in r)if((g=r[l]).name===n.name){if(g.state===sg)return eb(s);4===g.state?(g.state=ag,g.timer.stop(),g.on.call("interrupt",e,e.__data__,g.index,g.group),delete r[l]):+l<t&&(g.state=ag,g.timer.stop(),g.on.call("cancel",e,e.__data__,g.index,g.group),delete r[l])}if(eb(function(){n.state===sg&&(n.state=4,n.timer.restart(a,n.delay,n.time),a(c))}),n.state=nb,n.on.call("start",e,e.__data__,n.index,n.group),n.state===nb){for(n.state=sg,i=new Array(h=n.tween.length),l=0,d=-1;l<h;++l)(g=n.tween[l].value.call(e,e.__data__,n.index,n.group))&&(i[++d]=g);i.length=d+1}}function a(c){for(var l=c<n.duration?n.ease.call(null,c/n.duration):(n.timer.restart(u),n.state=rb,1),d=-1,h=i.length;++d<h;)i[d].call(e,l);n.state===rb&&(n.on.call("end",e,e.__data__,n.index,n.group),u())}function u(){for(var c in n.state=ag,n.timer.stop(),delete r[t],r)return;delete e.__transition}r[t]=n,n.timer=og(function o(c){n.state=tb,n.timer.restart(s,n.delay,n.time),n.delay<=c&&s(c-n.delay)},0,n.time)}(e,n,{name:t,index:r,group:i,on:az,tween:uz,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:N2})}function ib(e,t){var n=Hi(e,t);if(n.state>N2)throw new Error("too late; already scheduled");return n}function Qo(e,t){var n=Hi(e,t);if(n.state>sg)throw new Error("too late; already running");return n}function Hi(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function Ea(e,t){var r,i,s,n=e.__transition,o=!0;if(n){for(s in t=null==t?null:t+"",n)(r=n[s]).name===t?(i=r.state>nb&&r.state<rb,r.state=ag,r.timer.stop(),r.on.call(i?"interrupt":"cancel",e,e.__data__,r.index,r.group),delete n[s]):o=!1;o&&delete e.__transition}}var Ff,sb,R2,cg,k2=180/Math.PI,ob={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function O2(e,t,n,r,i,o){var s,a,u;return(s=Math.sqrt(e*e+t*t))&&(e/=s,t/=s),(u=e*n+t*r)&&(n-=e*u,r-=t*u),(a=Math.sqrt(n*n+r*r))&&(n/=a,r/=a,u/=a),e*r<t*n&&(e=-e,t=-t,u=-u,s=-s),{translateX:i,translateY:o,rotate:Math.atan2(t,e)*k2,skewX:Math.atan(u)*k2,scaleX:s,scaleY:a}}function P2(e,t,n,r){function i(c){return c.length?c.pop()+" ":""}return function(c,l){var d=[],h=[];return c=e(c),l=e(l),function o(c,l,d,h,g,y){if(c!==d||l!==h){var v=g.push("translate(",null,t,null,n);y.push({i:v-4,x:mi(c,d)},{i:v-2,x:mi(l,h)})}else(d||h)&&g.push("translate("+d+t+h+n)}(c.translateX,c.translateY,l.translateX,l.translateY,d,h),function s(c,l,d,h){c!==l?(c-l>180?l+=360:l-c>180&&(c+=360),h.push({i:d.push(i(d)+"rotate(",null,r)-2,x:mi(c,l)})):l&&d.push(i(d)+"rotate("+l+r)}(c.rotate,l.rotate,d,h),function a(c,l,d,h){c!==l?h.push({i:d.push(i(d)+"skewX(",null,r)-2,x:mi(c,l)}):l&&d.push(i(d)+"skewX("+l+r)}(c.skewX,l.skewX,d,h),function u(c,l,d,h,g,y){if(c!==d||l!==h){var v=g.push(i(g)+"scale(",null,",",null,")");y.push({i:v-4,x:mi(c,d)},{i:v-2,x:mi(l,h)})}else(1!==d||1!==h)&&g.push(i(g)+"scale("+d+","+h+")")}(c.scaleX,c.scaleY,l.scaleX,l.scaleY,d,h),c=l=null,function(g){for(var b,y=-1,v=h.length;++y<v;)d[(b=h[y]).i]=b.x(g);return d.join("")}}}var F2=P2(function fz(e){return"none"===e?ob:(Ff||(Ff=document.createElement("DIV"),sb=document.documentElement,R2=document.defaultView),Ff.style.transform=e,e=R2.getComputedStyle(sb.appendChild(Ff),null).getPropertyValue("transform"),sb.removeChild(Ff),O2(+(e=e.slice(7,-1).split(","))[0],+e[1],+e[2],+e[3],+e[4],+e[5]))},"px, ","px)","deg)"),L2=P2(function dz(e){return null!=e&&(cg||(cg=document.createElementNS("http://www.w3.org/2000/svg","g")),cg.setAttribute("transform",e),e=cg.transform.baseVal.consolidate())?O2((e=e.matrix).a,e.b,e.c,e.d,e.e,e.f):ob},", ",")",")");function hz(e,t){var n,r;return function(){var i=Qo(this,e),o=i.tween;if(o!==n)for(var s=0,a=(r=n=o).length;s<a;++s)if(r[s].name===t){(r=r.slice()).splice(s,1);break}i.tween=r}}function pz(e,t,n){var r,i;if("function"!=typeof n)throw new Error;return function(){var o=Qo(this,e),s=o.tween;if(s!==r){i=(r=s).slice();for(var a={name:t,value:n},u=0,c=i.length;u<c;++u)if(i[u].name===t){i[u]=a;break}u===c&&i.push(a)}o.tween=i}}function ab(e,t,n){var r=e._id;return e.each(function(){var i=Qo(this,r);(i.value||(i.value={}))[t]=n.apply(this,arguments)}),function(i){return Hi(i,r).value[t]}}function B2(e,t){var n;return("number"==typeof t?mi:t instanceof xs?Sf:(n=xs(t))?(t=n,Sf):Z1)(e,t)}function mz(e){return function(){this.removeAttribute(e)}}function yz(e){return function(){this.removeAttributeNS(e.space,e.local)}}function vz(e,t,n){var r,o,i=n+"";return function(){var s=this.getAttribute(e);return s===i?null:s===r?o:o=t(r=s,n)}}function bz(e,t,n){var r,o,i=n+"";return function(){var s=this.getAttributeNS(e.space,e.local);return s===i?null:s===r?o:o=t(r=s,n)}}function wz(e,t,n){var r,i,o;return function(){var s,u,a=n(this);return null==a?void this.removeAttribute(e):(s=this.getAttribute(e))===(u=a+"")?null:s===r&&u===i?o:(i=u,o=t(r=s,a))}}function _z(e,t,n){var r,i,o;return function(){var s,u,a=n(this);return null==a?void this.removeAttributeNS(e.space,e.local):(s=this.getAttributeNS(e.space,e.local))===(u=a+"")?null:s===r&&u===i?o:(i=u,o=t(r=s,a))}}function xz(e,t){var n,r;function i(){var o=t.apply(this,arguments);return o!==r&&(n=(r=o)&&function Cz(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}(e,o)),n}return i._value=t,i}function Mz(e,t){var n,r;function i(){var o=t.apply(this,arguments);return o!==r&&(n=(r=o)&&function Ez(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}(e,o)),n}return i._value=t,i}function Sz(e,t){return function(){ib(this,e).delay=+t.apply(this,arguments)}}function Tz(e,t){return t=+t,function(){ib(this,e).delay=t}}function Az(e,t){return function(){Qo(this,e).duration=+t.apply(this,arguments)}}function kz(e,t){return t=+t,function(){Qo(this,e).duration=t}}var Gz=cc.prototype.constructor;function j2(e){return function(){this.style.removeProperty(e)}}var cG=0;function Io(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function ub(e){return cc().transition(e)}function V2(){return++cG}var yc=cc.prototype;function lG(e){return e*e*e}function fG(e){return--e*e*e+1}function cb(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}Io.prototype=ub.prototype={constructor:Io,select:function $z(e){var t=this._name,n=this._id;"function"!=typeof e&&(e=qp(e));for(var r=this._groups,i=r.length,o=new Array(i),s=0;s<i;++s)for(var l,d,a=r[s],u=a.length,c=o[s]=new Array(u),h=0;h<u;++h)(l=a[h])&&(d=e.call(l,l.__data__,h,a))&&("__data__"in l&&(d.__data__=l.__data__),c[h]=d,ug(c[h],t,n,h,c,Hi(l,n)));return new Io(o,this._parents,t,n)},selectAll:function zz(e){var t=this._name,n=this._id;"function"!=typeof e&&(e=L1(e));for(var r=this._groups,i=r.length,o=[],s=[],a=0;a<i;++a)for(var l,u=r[a],c=u.length,d=0;d<c;++d)if(l=u[d]){for(var g,h=e.call(l,l.__data__,d,u),y=Hi(l,n),v=0,b=h.length;v<b;++v)(g=h[v])&&ug(g,t,n,v,h,y);o.push(h),s.push(l)}return new Io(o,s,t,n)},filter:function Fz(e){"function"!=typeof e&&(e=B1(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var u,o=t[i],s=o.length,a=r[i]=[],c=0;c<s;++c)(u=o[c])&&e.call(u,u.__data__,c,o)&&a.push(u);return new Io(r,this._parents,this._name,this._id)},merge:function Lz(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,r=t.length,o=Math.min(r,n.length),s=new Array(r),a=0;a<o;++a)for(var h,u=t[a],c=n[a],l=u.length,d=s[a]=new Array(l),g=0;g<l;++g)(h=u[g]||c[g])&&(d[g]=h);for(;a<r;++a)s[a]=t[a];return new Io(s,this._parents,this._name,this._id)},selection:function qz(){return new Gz(this._groups,this._parents)},transition:function aG(){for(var e=this._name,t=this._id,n=V2(),r=this._groups,i=r.length,o=0;o<i;++o)for(var u,s=r[o],a=s.length,c=0;c<a;++c)if(u=s[c]){var l=Hi(u,t);ug(u,e,n,c,s,{time:l.time+l.delay+l.duration,delay:0,duration:l.duration,ease:l.ease})}return new Io(r,this._parents,e,n)},call:yc.call,nodes:yc.nodes,node:yc.node,size:yc.size,empty:yc.empty,each:yc.each,on:function Vz(e,t){var n=this._id;return arguments.length<2?Hi(this.node(),n).on.on(e):this.each(function jz(e,t,n){var r,i,o=function Bz(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||"start"===t})}(t)?ib:Qo;return function(){var s=o(this,e),a=s.on;a!==r&&(i=(r=a).copy()).on(t,n),s.on=i}}(n,e,t))},attr:function Dz(e,t){var n=Cf(e),r="transform"===n?L2:B2;return this.attrTween(e,"function"==typeof t?(n.local?_z:wz)(n,r,ab(this,"attr."+e,t)):null==t?(n.local?yz:mz)(n):(n.local?bz:vz)(n,r,t))},attrTween:function Iz(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==t)return this.tween(n,null);if("function"!=typeof t)throw new Error;var r=Cf(e);return this.tween(n,(r.local?xz:Mz)(r,t))},style:function Zz(e,t,n){var r="transform"==(e+="")?F2:B2;return null==t?this.styleTween(e,function Wz(e,t){var n,r,i;return function(){var o=ba(this,e),s=(this.style.removeProperty(e),ba(this,e));return o===s?null:o===n&&s===r?i:i=t(n=o,r=s)}}(e,r)).on("end.style."+e,j2(e)):"function"==typeof t?this.styleTween(e,function Kz(e,t,n){var r,i,o;return function(){var s=ba(this,e),a=n(this),u=a+"";return null==a&&(this.style.removeProperty(e),u=a=ba(this,e)),s===u?null:s===r&&u===i?o:(i=u,o=t(r=s,a))}}(e,r,ab(this,"style."+e,t))).each(function Qz(e,t){var n,r,i,a,o="style."+t,s="end."+o;return function(){var u=Qo(this,e),c=u.on,l=null==u.value[o]?a||(a=j2(t)):void 0;(c!==n||i!==l)&&(r=(n=c).copy()).on(s,i=l),u.on=r}}(this._id,e)):this.styleTween(e,function Yz(e,t,n){var r,o,i=n+"";return function(){var s=ba(this,e);return s===i?null:s===r?o:o=t(r=s,n)}}(e,r,t),n).on("end.style."+e,null)},styleTween:function eG(e,t,n){var r="style."+(e+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==t)return this.tween(r,null);if("function"!=typeof t)throw new Error;return this.tween(r,function Jz(e,t,n){var r,i;function o(){var s=t.apply(this,arguments);return s!==i&&(r=(i=s)&&function Xz(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}(e,s,n)),r}return o._value=t,o}(e,t,n??""))},text:function rG(e){return this.tween("text","function"==typeof e?function nG(e){return function(){var t=e(this);this.textContent=t??""}}(ab(this,"text",e)):function tG(e){return function(){this.textContent=e}}(null==e?"":e+""))},textTween:function sG(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(null==e)return this.tween(t,null);if("function"!=typeof e)throw new Error;return this.tween(t,function oG(e){var t,n;function r(){var i=e.apply(this,arguments);return i!==n&&(t=(n=i)&&function iG(e){return function(t){this.textContent=e.call(this,t)}}(i)),t}return r._value=e,r}(e))},remove:function Uz(){return this.on("end.remove",function Hz(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}(this._id))},tween:function gz(e,t){var n=this._id;if(e+="",arguments.length<2){for(var s,r=Hi(this.node(),n).tween,i=0,o=r.length;i<o;++i)if((s=r[i]).name===e)return s.value;return null}return this.each((null==t?hz:pz)(n,e,t))},delay:function Nz(e){var t=this._id;return arguments.length?this.each(("function"==typeof e?Sz:Tz)(t,e)):Hi(this.node(),t).delay},duration:function Oz(e){var t=this._id;return arguments.length?this.each(("function"==typeof e?Az:kz)(t,e)):Hi(this.node(),t).duration},ease:function Pz(e){var t=this._id;return arguments.length?this.each(function Rz(e,t){if("function"!=typeof t)throw new Error;return function(){Qo(this,e).ease=t}}(t,e)):Hi(this.node(),t).ease},end:function uG(){var e,t,n=this,r=n._id,i=n.size();return new Promise(function(o,s){var a={value:s},u={value:function(){0==--i&&o()}};n.each(function(){var c=Qo(this,r),l=c.on;l!==e&&((t=(e=l).copy())._.cancel.push(a),t._.interrupt.push(a),t._.end.push(u)),c.on=t})})}};var lb={time:null,delay:0,duration:250,ease:cb};function dG(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))return lb.time=mc(),lb;return n}cc.prototype.interrupt=function lz(e){return this.each(function(){Ea(this,e)})},cc.prototype.transition=function hG(e){var t,n;e instanceof Io?(t=e._id,e=e._name):(t=V2(),(n=lb).time=mc(),e=null==e?null:e+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var u,s=r[o],a=s.length,c=0;c<a;++c)(u=s[c])&&ug(u,e,t,c,s,n||dG(u,t));return new Io(r,this._parents,e,t)};var pG=[null];function gG(e,t){var r,i,n=e.__transition;if(n)for(i in t=null==t?null:t+"",n)if((r=n[i]).state>tb&&r.name===t)return new Io([[e]],pG,t,+i);return null}function fb(e){return function(){return e}}function mG(e,t,n){this.target=e,this.type=t,this.selection=n}function H2(){Ue.stopImmediatePropagation()}function db(){Ue.preventDefault(),Ue.stopImmediatePropagation()}var U2={name:"drag"},hb={name:"space"},vc={name:"handle"},bc={name:"center"};function $2(e){return[+e[0],+e[1]]}function pb(e){return[$2(e[0]),$2(e[1])]}var lg={name:"x",handles:["w","e"].map(Lf),input:function(e,t){return null==e?null:[[+e[0],t[0][1]],[+e[1],t[1][1]]]},output:function(e){return e&&[e[0][0],e[1][0]]}},fg={name:"y",handles:["n","s"].map(Lf),input:function(e,t){return null==e?null:[[t[0][0],+e[0]],[t[1][0],+e[1]]]},output:function(e){return e&&[e[0][1],e[1][1]]}},vG={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(Lf),input:function(e){return null==e?null:pb(e)},output:function(e){return e}},Zo={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},z2={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},G2={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},bG={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},wG={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function Lf(e){return{type:e}}function _G(){return!Ue.ctrlKey&&!Ue.button}function DG(){var e=this.ownerSVGElement||this;return e.hasAttribute("viewBox")?[[(e=e.viewBox.baseVal).x,e.y],[e.x+e.width,e.y+e.height]]:[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]}function EG(){return navigator.maxTouchPoints||"ontouchstart"in this}function gb(e){for(;!e.__brush;)if(!(e=e.parentNode))return;return e.__brush}function xG(e){var t=e.__brush;return t?t.dim.output(t.selection):null}function MG(){return mb(lg)}function IG(){return mb(fg)}function q2(){return mb(vG)}function mb(e){var a,t=DG,n=_G,r=EG,i=!0,o=uc("start","brush","end"),s=6;function u(b){var _=b.property("__brush",v).selectAll(".overlay").data([Lf("overlay")]);_.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",Zo.overlay).merge(_).each(function(){var C=gb(this).extent;rn(this).attr("x",C[0][0]).attr("y",C[0][1]).attr("width",C[1][0]-C[0][0]).attr("height",C[1][1]-C[0][1])}),b.selectAll(".selection").data([Lf("selection")]).enter().append("rect").attr("class","selection").attr("cursor",Zo.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var E=b.selectAll(".handle").data(e.handles,function(C){return C.type});E.exit().remove(),E.enter().append("rect").attr("class",function(C){return"handle handle--"+C.type}).attr("cursor",function(C){return Zo[C.type]}),b.each(c).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",h).filter(r).on("touchstart.brush",h).on("touchmove.brush",g).on("touchend.brush touchcancel.brush",y).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function c(){var b=rn(this),_=gb(this).selection;_?(b.selectAll(".selection").style("display",null).attr("x",_[0][0]).attr("y",_[0][1]).attr("width",_[1][0]-_[0][0]).attr("height",_[1][1]-_[0][1]),b.selectAll(".handle").style("display",null).attr("x",function(E){return"e"===E.type[E.type.length-1]?_[1][0]-s/2:_[0][0]-s/2}).attr("y",function(E){return"s"===E.type[0]?_[1][1]-s/2:_[0][1]-s/2}).attr("width",function(E){return"n"===E.type||"s"===E.type?_[1][0]-_[0][0]+s:s}).attr("height",function(E){return"e"===E.type||"w"===E.type?_[1][1]-_[0][1]+s:s})):b.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function l(b,_,E){var C=b.__brush.emitter;return!C||E&&C.clean?new d(b,_,E):C}function d(b,_,E){this.that=b,this.args=_,this.state=b.__brush,this.active=0,this.clean=E}function h(){if((!a||Ue.touches)&&n.apply(this,arguments)){var oe,fe,T,te,X,we,Be,tt,on,ne,Ze,b=this,_=Ue.target.__data__.type,E="selection"===(i&&Ue.metaKey?_="overlay":_)?U2:i&&Ue.altKey?bc:vc,C=e===fg?null:bG[_],I=e===lg?null:wG[_],R=gb(b),G=R.extent,z=R.selection,de=G[0][0],re=G[0][1],Ce=G[1][0],Ye=G[1][1],Ct=0,Dt=0,Jt=C&&I&&i&&Ue.shiftKey,ht=Ue.touches?function yG(e){return function(t){return Nf(t,Ue.touches,e)}}(Ue.changedTouches[0].identifier):_a,cn=ht(b),tn=cn,qe=l(b,arguments,!0).beforestart();"overlay"===_?(z&&(on=!0),R.selection=z=[[oe=e===fg?de:cn[0],T=e===lg?re:cn[1]],[X=e===fg?Ce:oe,Be=e===lg?Ye:T]]):(oe=z[0][0],T=z[0][1],X=z[1][0],Be=z[1][1]),fe=oe,te=T,we=X,tt=Be;var mt=rn(b).attr("pointer-events","none"),xt=mt.selectAll(".overlay").attr("cursor",Zo[_]);if(Ue.touches)qe.moved=gn,qe.ended=Sn;else{var Te=rn(Ue.view).on("mousemove.brush",gn,!0).on("mouseup.brush",Sn,!0);i&&Te.on("keydown.brush",function Lr(){switch(Ue.keyCode){case 16:Jt=C&&I;break;case 18:E===vc&&(C&&(X=we-Ct*C,oe=fe+Ct*C),I&&(Be=tt-Dt*I,T=te+Dt*I),E=bc,$t());break;case 32:(E===vc||E===bc)&&(C<0?X=we-Ct:C>0&&(oe=fe-Ct),I<0?Be=tt-Dt:I>0&&(T=te-Dt),E=hb,xt.attr("cursor",Zo.selection),$t());break;default:return}db()},!0).on("keyup.brush",function rs(){switch(Ue.keyCode){case 16:Jt&&(ne=Ze=Jt=!1,$t());break;case 18:E===bc&&(C<0?X=we:C>0&&(oe=fe),I<0?Be=tt:I>0&&(T=te),E=vc,$t());break;case 32:E===hb&&(Ue.altKey?(C&&(X=we-Ct*C,oe=fe+Ct*C),I&&(Be=tt-Dt*I,T=te+Dt*I),E=bc):(C<0?X=we:C>0&&(oe=fe),I<0?Be=tt:I>0&&(T=te),E=vc),xt.attr("cursor",Zo[_]),$t());break;default:return}db()},!0),Kp(Ue.view)}H2(),Ea(b),c.call(b),qe.start()}function gn(){var Br=ht(b);Jt&&!ne&&!Ze&&(Math.abs(Br[0]-tn[0])>Math.abs(Br[1]-tn[1])?Ze=!0:ne=!0),tn=Br,on=!0,db(),$t()}function $t(){var Br;switch(Ct=tn[0]-cn[0],Dt=tn[1]-cn[1],E){case hb:case U2:C&&(Ct=Math.max(de-oe,Math.min(Ce-X,Ct)),fe=oe+Ct,we=X+Ct),I&&(Dt=Math.max(re-T,Math.min(Ye-Be,Dt)),te=T+Dt,tt=Be+Dt);break;case vc:C<0?(Ct=Math.max(de-oe,Math.min(Ce-oe,Ct)),fe=oe+Ct,we=X):C>0&&(Ct=Math.max(de-X,Math.min(Ce-X,Ct)),fe=oe,we=X+Ct),I<0?(Dt=Math.max(re-T,Math.min(Ye-T,Dt)),te=T+Dt,tt=Be):I>0&&(Dt=Math.max(re-Be,Math.min(Ye-Be,Dt)),te=T,tt=Be+Dt);break;case bc:C&&(fe=Math.max(de,Math.min(Ce,oe-Ct*C)),we=Math.max(de,Math.min(Ce,X+Ct*C))),I&&(te=Math.max(re,Math.min(Ye,T-Dt*I)),tt=Math.max(re,Math.min(Ye,Be+Dt*I)))}we<fe&&(C*=-1,Br=oe,oe=X,X=Br,Br=fe,fe=we,we=Br,_ in z2&&xt.attr("cursor",Zo[_=z2[_]])),tt<te&&(I*=-1,Br=T,T=Be,Be=Br,Br=te,te=tt,tt=Br,_ in G2&&xt.attr("cursor",Zo[_=G2[_]])),R.selection&&(z=R.selection),ne&&(fe=z[0][0],we=z[1][0]),Ze&&(te=z[0][1],tt=z[1][1]),(z[0][0]!==fe||z[0][1]!==te||z[1][0]!==we||z[1][1]!==tt)&&(R.selection=[[fe,te],[we,tt]],c.call(b),qe.brush())}function Sn(){if(H2(),Ue.touches){if(Ue.touches.length)return;a&&clearTimeout(a),a=setTimeout(function(){a=null},500)}else Qp(Ue.view,on),Te.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);mt.attr("pointer-events","all"),xt.attr("cursor",Zo.overlay),R.selection&&(z=R.selection),function CG(e){return e[0][0]===e[1][0]||e[0][1]===e[1][1]}(z)&&(R.selection=null,c.call(b)),qe.end()}}function g(){l(this,arguments).moved()}function y(){l(this,arguments).ended()}function v(){var b=this.__brush||{selection:null};return b.extent=pb(t.apply(this,arguments)),b.dim=e,b}return u.move=function(b,_){b.selection?b.on("start.brush",function(){l(this,arguments).beforestart().start()}).on("interrupt.brush end.brush",function(){l(this,arguments).end()}).tween("brush",function(){var E=this,C=E.__brush,I=l(E,arguments),R=C.selection,G=e.input("function"==typeof _?_.apply(this,arguments):_,C.extent),z=Tf(R,G);function de(oe){C.selection=1===oe&&null===G?null:z(oe),c.call(E),I.brush()}return null!==R&&null!==G?de:de(1)}):b.each(function(){var E=this,C=arguments,I=E.__brush,R=e.input("function"==typeof _?_.apply(E,C):_,I.extent),G=l(E,C).beforestart();Ea(E),I.selection=null===R?null:R,c.call(E),G.start().brush().end()})},u.clear=function(b){u.move(b,null)},d.prototype={beforestart:function(){return 1==++this.active&&(this.state.emitter=this,this.starting=!0),this},start:function(){return this.starting?(this.starting=!1,this.emit("start")):this.emit("brush"),this},brush:function(){return this.emit("brush"),this},end:function(){return 0==--this.active&&(delete this.state.emitter,this.emit("end")),this},emit:function(b){xf(new mG(u,b,e.output(this.state.selection)),o.apply,o,[b,this.that,this.args])}},u.extent=function(b){return arguments.length?(t="function"==typeof b?b:fb(pb(b)),u):t},u.filter=function(b){return arguments.length?(n="function"==typeof b?b:fb(!!b),u):n},u.touchable=function(b){return arguments.length?(r="function"==typeof b?b:fb(!!b),u):r},u.handleSize=function(b){return arguments.length?(s=+b,u):s},u.keyModifiers=function(b){return arguments.length?(i=!!b,u):i},u.on=function(){var b=o.on.apply(o,arguments);return b===o?u:b},u}var W2=Math.cos,Y2=Math.sin,K2=Math.PI,dg=K2/2,Q2=2*K2,Z2=Math.max;function TG(){var e=0,t=null,n=null,r=null;function i(o){var g,y,v,b,_,E,s=o.length,a=[],u=ni(s),c=[],l=[],d=l.groups=new Array(s),h=new Array(s*s);for(g=0,_=-1;++_<s;){for(y=0,E=-1;++E<s;)y+=o[_][E];a.push(y),c.push(ni(s)),g+=y}for(t&&u.sort(function(fe,re){return t(a[fe],a[re])}),n&&c.forEach(function(fe,re){fe.sort(function(T,te){return n(o[re][T],o[re][te])})}),b=(g=Z2(0,Q2-e*s)/g)?e:Q2/s,y=0,_=-1;++_<s;){for(v=y,E=-1;++E<s;){var C=u[_],I=c[C][E],R=o[C][I],G=y,z=y+=R*g;h[I*s+C]={index:C,subindex:I,startAngle:G,endAngle:z,value:R}}d[C]={index:C,startAngle:v,endAngle:y,value:a[C]},y+=b}for(_=-1;++_<s;)for(E=_-1;++E<s;){var de=h[E*s+_],oe=h[_*s+E];(de.value||oe.value)&&l.push(de.value<oe.value?{source:oe,target:de}:{source:de,target:oe})}return r?l.sort(r):l}return i.padAngle=function(o){return arguments.length?(e=Z2(0,o),i):e},i.sortGroups=function(o){return arguments.length?(t=o,i):t},i.sortSubgroups=function(o){return arguments.length?(n=o,i):n},i.sortChords=function(o){return arguments.length?(null==o?r=null:(r=function SG(e){return function(t,n){return e(t.source.value+t.target.value,n.source.value+n.target.value)}}(o))._=o,i):r&&r._},i}var NG=Array.prototype.slice;function yb(e){return function(){return e}}var vb=Math.PI,bb=2*vb,Ca=1e-6,AG=bb-Ca;function wb(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function X2(){return new wb}wb.prototype=X2.prototype={constructor:wb,moveTo:function(e,t){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(e,t){this._+="L"+(this._x1=+e)+","+(this._y1=+t)},quadraticCurveTo:function(e,t,n,r){this._+="Q"+ +e+","+ +t+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(e,t,n,r,i,o){this._+="C"+ +e+","+ +t+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+o)},arcTo:function(e,t,n,r,i){var o=this._x1,s=this._y1,a=(n=+n)-(e=+e),u=(r=+r)-(t=+t),c=o-e,l=s-t,d=c*c+l*l;if((i=+i)<0)throw new Error("negative radius: "+i);if(null===this._x1)this._+="M"+(this._x1=e)+","+(this._y1=t);else if(d>Ca)if(Math.abs(l*a-u*c)>Ca&&i){var h=n-o,g=r-s,y=a*a+u*u,v=h*h+g*g,b=Math.sqrt(y),_=Math.sqrt(d),E=i*Math.tan((vb-Math.acos((y+d-v)/(2*b*_)))/2),C=E/_,I=E/b;Math.abs(C-1)>Ca&&(this._+="L"+(e+C*c)+","+(t+C*l)),this._+="A"+i+","+i+",0,0,"+ +(l*h>c*g)+","+(this._x1=e+I*a)+","+(this._y1=t+I*u)}else this._+="L"+(this._x1=e)+","+(this._y1=t)},arc:function(e,t,n,r,i,o){e=+e,t=+t,o=!!o;var s=(n=+n)*Math.cos(r),a=n*Math.sin(r),u=e+s,c=t+a,l=1^o,d=o?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+u+","+c:(Math.abs(this._x1-u)>Ca||Math.abs(this._y1-c)>Ca)&&(this._+="L"+u+","+c),n&&(d<0&&(d=d%bb+bb),d>AG?this._+="A"+n+","+n+",0,1,"+l+","+(e-s)+","+(t-a)+"A"+n+","+n+",0,1,"+l+","+(this._x1=u)+","+(this._y1=c):d>Ca&&(this._+="A"+n+","+n+",0,"+ +(d>=vb)+","+l+","+(this._x1=e+n*Math.cos(i))+","+(this._y1=t+n*Math.sin(i))))},rect:function(e,t,n,r){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};const xa=X2;function kG(e){return e.source}function OG(e){return e.target}function RG(e){return e.radius}function PG(e){return e.startAngle}function FG(e){return e.endAngle}function LG(){var e=kG,t=OG,n=RG,r=PG,i=FG,o=null;function s(){var a,u=NG.call(arguments),c=e.apply(this,u),l=t.apply(this,u),d=+n.apply(this,(u[0]=c,u)),h=r.apply(this,u)-dg,g=i.apply(this,u)-dg,y=d*W2(h),v=d*Y2(h),b=+n.apply(this,(u[0]=l,u)),_=r.apply(this,u)-dg,E=i.apply(this,u)-dg;if(o||(o=a=xa()),o.moveTo(y,v),o.arc(0,0,d,h,g),(h!==_||g!==E)&&(o.quadraticCurveTo(0,0,b*W2(_),b*Y2(_)),o.arc(0,0,b,_,E)),o.quadraticCurveTo(0,0,y,v),o.closePath(),a)return o=null,a+""||null}return s.radius=function(a){return arguments.length?(n="function"==typeof a?a:yb(+a),s):n},s.startAngle=function(a){return arguments.length?(r="function"==typeof a?a:yb(+a),s):r},s.endAngle=function(a){return arguments.length?(i="function"==typeof a?a:yb(+a),s):i},s.source=function(a){return arguments.length?(e=a,s):e},s.target=function(a){return arguments.length?(t=a,s):t},s.context=function(a){return arguments.length?(o=a??null,s):o},s}var yi="$";function hg(){}function J2(e,t){var n=new hg;if(e instanceof hg)e.each(function(a,u){n.set(u,a)});else if(Array.isArray(e)){var o,r=-1,i=e.length;if(null==t)for(;++r<i;)n.set(r,e[r]);else for(;++r<i;)n.set(t(o=e[r],r,e),o)}else if(e)for(var s in e)n.set(s,e[s]);return n}hg.prototype=J2.prototype={constructor:hg,has:function(e){return yi+e in this},get:function(e){return this[yi+e]},set:function(e,t){return this[yi+e]=t,this},remove:function(e){var t=yi+e;return t in this&&delete this[t]},clear:function(){for(var e in this)e[0]===yi&&delete this[e]},keys:function(){var e=[];for(var t in this)t[0]===yi&&e.push(t.slice(1));return e},values:function(){var e=[];for(var t in this)t[0]===yi&&e.push(this[t]);return e},entries:function(){var e=[];for(var t in this)t[0]===yi&&e.push({key:t.slice(1),value:this[t]});return e},size:function(){var e=0;for(var t in this)t[0]===yi&&++e;return e},empty:function(){for(var e in this)if(e[0]===yi)return!1;return!0},each:function(e){for(var t in this)t[0]===yi&&e(this[t],t.slice(1),this)}};const Ms=J2;function BG(){var n,r,i,e=[],t=[];function o(a,u,c,l){if(u>=e.length)return null!=n&&a.sort(n),null!=r?r(a):a;for(var y,v,_,d=-1,h=a.length,g=e[u++],b=Ms(),E=c();++d<h;)(_=b.get(y=g(v=a[d])+""))?_.push(v):b.set(y,[v]);return b.each(function(C,I){l(E,I,o(C,u,c,l))}),E}function s(a,u){if(++u>e.length)return a;var c,l=t[u-1];return null!=r&&u>=e.length?c=a.entries():(c=[],a.each(function(d,h){c.push({key:h,values:s(d,u)})})),null!=l?c.sort(function(d,h){return l(d.key,h.key)}):c}return i={object:function(a){return o(a,0,jG,VG)},map:function(a){return o(a,0,eN,tN)},entries:function(a){return s(o(a,0,eN,tN),0)},key:function(a){return e.push(a),i},sortKeys:function(a){return t[e.length-1]=a,i},sortValues:function(a){return n=a,i},rollup:function(a){return r=a,i}}}function jG(){return{}}function VG(e,t,n){e[t]=n}function eN(){return Ms()}function tN(e,t,n){e.set(t,n)}function pg(){}var Ma=Ms.prototype;function nN(e,t){var n=new pg;if(e instanceof pg)e.each(function(o){n.add(o)});else if(e){var r=-1,i=e.length;if(null==t)for(;++r<i;)n.add(e[r]);else for(;++r<i;)n.add(t(e[r],r,e))}return n}pg.prototype=nN.prototype={constructor:pg,has:Ma.has,add:function(e){return this[yi+(e+="")]=e,this},remove:Ma.remove,clear:Ma.clear,values:Ma.keys,size:Ma.size,empty:Ma.empty,each:Ma.each};const HG=nN;function UG(e){var t=[];for(var n in e)t.push(n);return t}function $G(e){var t=[];for(var n in e)t.push(e[n]);return t}function zG(e){var t=[];for(var n in e)t.push({key:n,value:e[n]});return t}var rN=Math.PI/180,iN=180/Math.PI,oN=.96422,sN=1,aN=.82521,uN=4/29,wc=6/29,cN=3*wc*wc,GG=wc*wc*wc;function lN(e){if(e instanceof Ui)return new Ui(e.l,e.a,e.b,e.opacity);if(e instanceof So)return dN(e);e instanceof or||(e=G1(e));var o,s,t=Cb(e.r),n=Cb(e.g),r=Cb(e.b),i=_b((.2225045*t+.7168786*n+.0606169*r)/sN);return t===n&&n===r?o=s=i:(o=_b((.4360747*t+.3850649*n+.1430804*r)/oN),s=_b((.0139322*t+.0971045*n+.7141733*r)/aN)),new Ui(116*i-16,500*(o-i),200*(i-s),e.opacity)}function qG(e,t){return new Ui(e,0,0,t??1)}function mg(e,t,n,r){return 1===arguments.length?lN(e):new Ui(e,t,n,r??1)}function Ui(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function _b(e){return e>GG?Math.pow(e,1/3):e/cN+uN}function Db(e){return e>wc?e*e*e:cN*(e-uN)}function Eb(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function Cb(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function fN(e){if(e instanceof So)return new So(e.h,e.c,e.l,e.opacity);if(e instanceof Ui||(e=lN(e)),0===e.a&&0===e.b)return new So(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*iN;return new So(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function WG(e,t,n,r){return 1===arguments.length?fN(e):new So(n,t,e,r??1)}function yg(e,t,n,r){return 1===arguments.length?fN(e):new So(e,t,n,r??1)}function So(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function dN(e){if(isNaN(e.h))return new Ui(e.l,0,0,e.opacity);var t=e.h*rN;return new Ui(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}fc(Ui,mg,Mf(Cs,{brighter:function(e){return new Ui(this.l+18*(e??1),this.a,this.b,this.opacity)},darker:function(e){return new Ui(this.l-18*(e??1),this.a,this.b,this.opacity)},rgb:function(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return new or(Eb(3.1338561*(t=oN*Db(t))-1.6168667*(e=sN*Db(e))-.4906146*(n=aN*Db(n))),Eb(-.9787684*t+1.9161415*e+.033454*n),Eb(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),fc(So,yg,Mf(Cs,{brighter:function(e){return new So(this.h,this.c,this.l+18*(e??1),this.opacity)},darker:function(e){return new So(this.h,this.c,this.l-18*(e??1),this.opacity)},rgb:function(){return dN(this).rgb()}}));var xb=1.78277,Mb=-.29227,vg=-.90649,Bf=1.97294,pN=Bf*vg,gN=Bf*xb,mN=xb*Mb- -.14861*vg;function $i(e,t,n,r){return 1===arguments.length?function YG(e){if(e instanceof Ia)return new Ia(e.h,e.s,e.l,e.opacity);e instanceof or||(e=G1(e));var n=e.g/255,r=e.b/255,i=(mN*r+pN*(e.r/255)-gN*n)/(mN+pN-gN),o=r-i,s=(Bf*(n-i)-Mb*o)/vg,a=Math.sqrt(s*s+o*o)/(Bf*i*(1-i)),u=a?Math.atan2(s,o)*iN-120:NaN;return new Ia(u<0?u+360:u,a,i,e.opacity)}(e):new Ia(e,t,n,r??1)}function Ia(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}fc(Ia,$i,Mf(Cs,{brighter:function(e){return e=null==e?dc:Math.pow(dc,e),new Ia(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new Ia(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=isNaN(this.h)?0:(this.h+120)*rN,t=+this.l,n=isNaN(this.s)?0:this.s*t*(1-t),r=Math.cos(e),i=Math.sin(e);return new or(255*(t+n*(-.14861*r+xb*i)),255*(t+n*(Mb*r+vg*i)),255*(t+n*(Bf*r)),this.opacity)}}));var yN=Array.prototype.slice;function QG(e,t){return e-t}function Is(e){return function(){return e}}function XG(e,t){for(var i,n=-1,r=t.length;++n<r;)if(i=JG(e,t[n]))return i;return 0}function JG(e,t){for(var n=t[0],r=t[1],i=-1,o=0,s=e.length,a=s-1;o<s;a=o++){var u=e[o],c=u[0],l=u[1],d=e[a],h=d[0],g=d[1];if(eq(u,d,t))return 0;l>r!=g>r&&n<(h-c)*(r-l)/(g-l)+c&&(i=-i)}return i}function eq(e,t,n){var r;return function tq(e,t,n){return(t[0]-e[0])*(n[1]-e[1])==(n[0]-e[0])*(t[1]-e[1])}(e,t,n)&&function nq(e,t,n){return e<=t&&t<=n||n<=t&&t<=e}(e[r=+(e[0]===t[0])],n[r],t[r])}function rq(){}var Xo=[[],[[[1,1.5],[.5,1]]],[[[1.5,1],[1,1.5]]],[[[1.5,1],[.5,1]]],[[[1,.5],[1.5,1]]],[[[1,1.5],[.5,1]],[[1,.5],[1.5,1]]],[[[1,.5],[1,1.5]]],[[[1,.5],[.5,1]]],[[[.5,1],[1,.5]]],[[[1,1.5],[1,.5]]],[[[.5,1],[1,.5]],[[1.5,1],[1,1.5]]],[[[1.5,1],[1,.5]]],[[[.5,1],[1.5,1]]],[[[1,1.5],[1.5,1]]],[[[.5,1],[1,1.5]]],[]];function vN(){var e=1,t=1,n=O1,r=u;function i(c){var l=n(c);if(Array.isArray(l))l=l.slice().sort(QG);else{var d=S1(c),h=d[0],g=d[1];l=va(h,g,l),l=ni(Math.floor(h/l)*l,Math.floor(g/l)*l,l)}return l.map(function(y){return o(c,y)})}function o(c,l){var d=[],h=[];return function s(c,l,d){var y,v,_,E,C,h=new Array,g=new Array;for(y=v=-1,Xo[(_=c[0]>=l)<<1].forEach(I);++y<e-1;)Xo[_|(_=c[y+1]>=l)<<1].forEach(I);for(Xo[0|_].forEach(I);++v<t-1;){for(y=-1,Xo[(_=c[v*e+e]>=l)<<1|(E=c[v*e]>=l)<<2].forEach(I);++y<e-1;)C=E,Xo[_|(_=c[v*e+e+y+1]>=l)<<1|(E=c[v*e+y+1]>=l)<<2|C<<3].forEach(I);Xo[_|E<<3].forEach(I)}for(y=-1,Xo[(E=c[v*e]>=l)<<2].forEach(I);++y<e-1;)C=E,Xo[(E=c[v*e+y+1]>=l)<<2|C<<3].forEach(I);function I(R){var fe,re,G=[R[0][0]+y,R[0][1]+v],z=[R[1][0]+y,R[1][1]+v],de=a(G),oe=a(z);(fe=g[de])?(re=h[oe])?(delete g[fe.end],delete h[re.start],fe===re?(fe.ring.push(z),d(fe.ring)):h[fe.start]=g[re.end]={start:fe.start,end:re.end,ring:fe.ring.concat(re.ring)}):(delete g[fe.end],fe.ring.push(z),g[fe.end=oe]=fe):(fe=h[oe])?(re=g[de])?(delete h[fe.start],delete g[re.end],fe===re?(fe.ring.push(z),d(fe.ring)):h[re.start]=g[fe.end]={start:re.start,end:fe.end,ring:re.ring.concat(fe.ring)}):(delete h[fe.start],fe.ring.unshift(G),h[fe.start=de]=fe):h[de]=g[oe]={start:de,end:oe,ring:[G,z]}}Xo[E<<3].forEach(I)}(c,l,function(g){r(g,c,l),function ZG(e){for(var t=0,n=e.length,r=e[n-1][1]*e[0][0]-e[n-1][0]*e[0][1];++t<n;)r+=e[t-1][1]*e[t][0]-e[t-1][0]*e[t][1];return r}(g)>0?d.push([g]):h.push(g)}),h.forEach(function(g){for(var b,y=0,v=d.length;y<v;++y)if(-1!==XG((b=d[y])[0],g))return void b.push(g)}),{type:"MultiPolygon",value:l,coordinates:d}}function a(c){return 2*c[0]+c[1]*(e+1)*4}function u(c,l,d){c.forEach(function(h){var _,g=h[0],y=h[1],v=0|g,b=0|y,E=l[b*e+v];g>0&&g<e&&v===g&&(h[0]=g+(d-(_=l[b*e+v-1]))/(E-_)-.5),y>0&&y<t&&b===y&&(h[1]=y+(d-(_=l[(b-1)*e+v]))/(E-_)-.5)})}return i.contour=o,i.size=function(c){if(!arguments.length)return[e,t];var l=Math.ceil(c[0]),d=Math.ceil(c[1]);if(!(l>0&&d>0))throw new Error("invalid size");return e=l,t=d,i},i.thresholds=function(c){return arguments.length?(n="function"==typeof c?c:Array.isArray(c)?Is(yN.call(c)):Is(c),i):n},i.smooth=function(c){return arguments.length?(r=c?u:rq,i):r===u},i}function Ib(e,t,n){for(var r=e.width,i=e.height,o=1+(n<<1),s=0;s<i;++s)for(var a=0,u=0;a<r+n;++a)a<r&&(u+=e.data[a+s*r]),a>=n&&(a>=o&&(u-=e.data[a-o+s*r]),t.data[a-n+s*r]=u/Math.min(a+1,r-1+o-a,o))}function Sb(e,t,n){for(var r=e.width,i=e.height,o=1+(n<<1),s=0;s<r;++s)for(var a=0,u=0;a<i+n;++a)a<i&&(u+=e.data[s+a*r]),a>=n&&(a>=o&&(u-=e.data[s+(a-o)*r]),t.data[s+(a-n)*r]=u/Math.min(a+1,i-1+o-a,o))}function iq(e){return e[0]}function oq(e){return e[1]}function sq(){return 1}function aq(){var e=iq,t=oq,n=sq,r=960,i=500,o=20,s=2,a=3*o,u=r+2*a>>s,c=i+2*a>>s,l=Is(20);function d(_){var E=new Float32Array(u*c),C=new Float32Array(u*c);_.forEach(function(G,z,de){var oe=+e(G,z,de)+a>>s,fe=+t(G,z,de)+a>>s,re=+n(G,z,de);oe>=0&&oe<u&&fe>=0&&fe<c&&(E[oe+fe*u]+=re)}),Ib({width:u,height:c,data:E},{width:u,height:c,data:C},o>>s),Sb({width:u,height:c,data:C},{width:u,height:c,data:E},o>>s),Ib({width:u,height:c,data:E},{width:u,height:c,data:C},o>>s),Sb({width:u,height:c,data:C},{width:u,height:c,data:E},o>>s),Ib({width:u,height:c,data:E},{width:u,height:c,data:C},o>>s),Sb({width:u,height:c,data:C},{width:u,height:c,data:E},o>>s);var I=l(E);if(!Array.isArray(I)){var R=qT(E);I=va(0,R,I),(I=ni(0,Math.floor(R/I)*I,I)).shift()}return vN().thresholds(I).size([u,c])(E).map(h)}function h(_){return _.value*=Math.pow(2,-2*s),_.coordinates.forEach(g),_}function g(_){_.forEach(y)}function y(_){_.forEach(v)}function v(_){_[0]=_[0]*Math.pow(2,s)-a,_[1]=_[1]*Math.pow(2,s)-a}function b(){return u=r+2*(a=3*o)>>s,c=i+2*a>>s,d}return d.x=function(_){return arguments.length?(e="function"==typeof _?_:Is(+_),d):e},d.y=function(_){return arguments.length?(t="function"==typeof _?_:Is(+_),d):t},d.weight=function(_){return arguments.length?(n="function"==typeof _?_:Is(+_),d):n},d.size=function(_){if(!arguments.length)return[r,i];var E=Math.ceil(_[0]),C=Math.ceil(_[1]);if(!(E>=0||E>=0))throw new Error("invalid size");return r=E,i=C,b()},d.cellSize=function(_){if(!arguments.length)return 1<<s;if(!((_=+_)>=1))throw new Error("invalid cell size");return s=Math.floor(Math.log(_)/Math.LN2),b()},d.thresholds=function(_){return arguments.length?(l="function"==typeof _?_:Array.isArray(_)?Is(yN.call(_)):Is(_),d):l},d.bandwidth=function(_){if(!arguments.length)return Math.sqrt(o*(o+1));if(!((_=+_)>=0))throw new Error("invalid bandwidth");return o=Math.round((Math.sqrt(4*_*_+1)-1)/2),b()},d}function bg(e){return function(){return e}}function Tb(e,t,n,r,i,o,s,a,u,c){this.target=e,this.type=t,this.subject=n,this.identifier=r,this.active=i,this.x=o,this.y=s,this.dx=a,this.dy=u,this._=c}function uq(){return!Ue.ctrlKey&&!Ue.button}function cq(){return this.parentNode}function lq(e){return e??{x:Ue.x,y:Ue.y}}function fq(){return navigator.maxTouchPoints||"ontouchstart"in this}function dq(){var a,u,c,l,e=uq,t=cq,n=lq,r=fq,i={},o=uc("start","drag","end"),s=0,d=0;function h(I){I.on("mousedown.drag",g).filter(r).on("touchstart.drag",b).on("touchmove.drag",_).on("touchend.drag touchcancel.drag",E).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function g(){if(!l&&e.apply(this,arguments)){var I=C("mouse",t.apply(this,arguments),_a,this,arguments);I&&(rn(Ue.view).on("mousemove.drag",y,!0).on("mouseup.drag",v,!0),Kp(Ue.view),z1(),c=!1,a=Ue.clientX,u=Ue.clientY,I("start"))}}function y(){if(lc(),!c){var I=Ue.clientX-a,R=Ue.clientY-u;c=I*I+R*R>d}i.mouse("drag")}function v(){rn(Ue.view).on("mousemove.drag mouseup.drag",null),Qp(Ue.view,c),lc(),i.mouse("end")}function b(){if(e.apply(this,arguments)){var z,de,I=Ue.changedTouches,R=t.apply(this,arguments),G=I.length;for(z=0;z<G;++z)(de=C(I[z].identifier,R,Nf,this,arguments))&&(z1(),de("start"))}}function _(){var G,z,I=Ue.changedTouches,R=I.length;for(G=0;G<R;++G)(z=i[I[G].identifier])&&(lc(),z("drag"))}function E(){var G,z,I=Ue.changedTouches,R=I.length;for(l&&clearTimeout(l),l=setTimeout(function(){l=null},500),G=0;G<R;++G)(z=i[I[G].identifier])&&(z1(),z("end"))}function C(I,R,G,z,de){var fe,re,T,oe=G(R,I),te=o.copy();if(xf(new Tb(h,"beforestart",fe,I,s,oe[0],oe[1],0,0,te),function(){return null!=(Ue.subject=fe=n.apply(z,de))&&(re=fe.x-oe[0]||0,T=fe.y-oe[1]||0,!0)}))return function Ce(X){var Ye,we=oe;switch(X){case"start":i[I]=Ce,Ye=s++;break;case"end":delete i[I],--s;case"drag":oe=G(R,I),Ye=s}xf(new Tb(h,X,fe,I,Ye,oe[0]+re,oe[1]+T,oe[0]-we[0],oe[1]-we[1],te),te.apply,te,[X,z,de])}}return h.filter=function(I){return arguments.length?(e="function"==typeof I?I:bg(!!I),h):e},h.container=function(I){return arguments.length?(t="function"==typeof I?I:bg(I),h):t},h.subject=function(I){return arguments.length?(n="function"==typeof I?I:bg(I),h):n},h.touchable=function(I){return arguments.length?(r="function"==typeof I?I:bg(!!I),h):r},h.on=function(){var I=o.on.apply(o,arguments);return I===o?h:I},h.clickDistance=function(I){return arguments.length?(d=(I=+I)*I,h):Math.sqrt(d)},h}Tb.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};var bN={},Nb={},Ab=34,jf=10,kb=13;function wN(e){return new Function("d","return {"+e.map(function(t,n){return JSON.stringify(t)+": d["+n+'] || ""'}).join(",")+"}")}function _N(e){var t=Object.create(null),n=[];return e.forEach(function(r){for(var i in r)i in t||n.push(t[i]=i)}),n}function Gr(e,t){var n=e+"",r=n.length;return r<t?new Array(t-r+1).join(0)+n:n}function wg(e){var t=new RegExp('["'+e+"\n\r]"),n=e.charCodeAt(0);function i(d,h){var _,g=[],y=d.length,v=0,b=0,E=y<=0,C=!1;function I(){if(E)return Nb;if(C)return C=!1,bN;var G,de,z=v;if(d.charCodeAt(z)===Ab){for(;v++<y&&d.charCodeAt(v)!==Ab||d.charCodeAt(++v)===Ab;);return(G=v)>=y?E=!0:(de=d.charCodeAt(v++))===jf?C=!0:de===kb&&(C=!0,d.charCodeAt(v)===jf&&++v),d.slice(z+1,G-1).replace(/""/g,'"')}for(;v<y;){if((de=d.charCodeAt(G=v++))===jf)C=!0;else if(de===kb)C=!0,d.charCodeAt(v)===jf&&++v;else if(de!==n)continue;return d.slice(z,G)}return E=!0,d.slice(z,y)}for(d.charCodeAt(y-1)===jf&&--y,d.charCodeAt(y-1)===kb&&--y;(_=I())!==Nb;){for(var R=[];_!==bN&&_!==Nb;)R.push(_),_=I();h&&null==(R=h(R,b++))||g.push(R)}return g}function o(d,h){return d.map(function(g){return h.map(function(y){return l(g[y])}).join(e)})}function c(d){return d.map(l).join(e)}function l(d){return null==d?"":d instanceof Date?function gq(e){var t=e.getUTCHours(),n=e.getUTCMinutes(),r=e.getUTCSeconds(),i=e.getUTCMilliseconds();return isNaN(e)?"Invalid Date":function pq(e){return e<0?"-"+Gr(-e,6):e>9999?"+"+Gr(e,6):Gr(e,4)}(e.getUTCFullYear())+"-"+Gr(e.getUTCMonth()+1,2)+"-"+Gr(e.getUTCDate(),2)+(i?"T"+Gr(t,2)+":"+Gr(n,2)+":"+Gr(r,2)+"."+Gr(i,3)+"Z":r?"T"+Gr(t,2)+":"+Gr(n,2)+":"+Gr(r,2)+"Z":n||t?"T"+Gr(t,2)+":"+Gr(n,2)+"Z":"")}(d):t.test(d+="")?'"'+d.replace(/"/g,'""')+'"':d}return{parse:function r(d,h){var g,y,v=i(d,function(b,_){if(g)return g(b,_-1);y=b,g=h?function hq(e,t){var n=wN(e);return function(r,i){return t(n(r),i,e)}}(b,h):wN(b)});return v.columns=y||[],v},parseRows:i,format:function s(d,h){return null==h&&(h=_N(d)),[h.map(l).join(e)].concat(o(d,h)).join("\n")},formatBody:function a(d,h){return null==h&&(h=_N(d)),o(d,h).join("\n")},formatRows:function u(d){return d.map(c).join("\n")},formatRow:c,formatValue:l}}var Sa=wg(","),DN=Sa.parse,mq=Sa.parseRows,yq=Sa.format,vq=Sa.formatBody,bq=Sa.formatRows,wq=Sa.formatRow,_q=Sa.formatValue,Ta=wg("\t"),EN=Ta.parse,Dq=Ta.parseRows,Eq=Ta.format,Cq=Ta.formatBody,xq=Ta.formatRows,Mq=Ta.formatRow,Iq=Ta.formatValue;function Sq(e){for(var t in e){var r,i,n=e[t].trim();if(n)if("true"===n)n=!0;else if("false"===n)n=!1;else if("NaN"===n)n=NaN;else if(isNaN(r=+n)){if(!(i=n.match(/^([-+]\d{2})?\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|[-+]\d{2}:\d{2})?)?$/)))continue;Tq&&i[4]&&!i[7]&&(n=n.replace(/-/g,"/").replace(/T/," ")),n=new Date(n)}else n=r;else n=null;e[t]=n}return e}var Tq=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours();function Nq(e){return+e}function Aq(e){return e*e}function kq(e){return e*(2-e)}function CN(e){return((e*=2)<=1?e*e:--e*(2-e)+1)/2}var Oq=function e(t){function n(r){return Math.pow(r,t)}return t=+t,n.exponent=e,n}(3),Rq=function e(t){function n(r){return 1-Math.pow(1-r,t)}return t=+t,n.exponent=e,n}(3),xN=function e(t){function n(r){return((r*=2)<=1?Math.pow(r,t):2-Math.pow(2-r,t))/2}return t=+t,n.exponent=e,n}(3),MN=Math.PI,IN=MN/2;function Pq(e){return 1==+e?1:1-Math.cos(e*IN)}function Fq(e){return Math.sin(e*IN)}function SN(e){return(1-Math.cos(MN*e))/2}function Ss(e){return 1.0009775171065494*(Math.pow(2,-10*e)-.0009765625)}function Lq(e){return Ss(1-+e)}function Bq(e){return 1-Ss(e)}function TN(e){return((e*=2)<=1?Ss(1-e):2-Ss(e-1))/2}function jq(e){return 1-Math.sqrt(1-e*e)}function Vq(e){return Math.sqrt(1- --e*e)}function NN(e){return((e*=2)<=1?1-Math.sqrt(1-e*e):Math.sqrt(1-(e-=2)*e)+1)/2}var Rb=4/11,Hq=6/11,Uq=8/11,$q=3/4,zq=9/11,Gq=10/11,qq=15/16,Wq=21/22,Yq=63/64,_g=1/Rb/Rb;function Kq(e){return 1-Vf(1-e)}function Vf(e){return(e=+e)<Rb?_g*e*e:e<Uq?_g*(e-=Hq)*e+$q:e<Gq?_g*(e-=zq)*e+qq:_g*(e-=Wq)*e+Yq}function Qq(e){return((e*=2)<=1?1-Vf(1-e):Vf(e-1)+1)/2}var Pb=1.70158,Zq=function e(t){function n(r){return(r=+r)*r*(t*(r-1)+r)}return t=+t,n.overshoot=e,n}(Pb),Xq=function e(t){function n(r){return--r*r*((r+1)*t+r)+1}return t=+t,n.overshoot=e,n}(Pb),AN=function e(t){function n(r){return((r*=2)<1?r*r*((t+1)*r-t):(r-=2)*r*((t+1)*r+t)+2)/2}return t=+t,n.overshoot=e,n}(Pb),_c=2*Math.PI,Jq=function e(t,n){var r=Math.asin(1/(t=Math.max(1,t)))*(n/=_c);function i(o){return t*Ss(- --o)*Math.sin((r-o)/n)}return i.amplitude=function(o){return e(o,n*_c)},i.period=function(o){return e(t,o)},i}(1,.3),kN=function e(t,n){var r=Math.asin(1/(t=Math.max(1,t)))*(n/=_c);function i(o){return 1-t*Ss(o=+o)*Math.sin((o+r)/n)}return i.amplitude=function(o){return e(o,n*_c)},i.period=function(o){return e(t,o)},i}(1,.3),eW=function e(t,n){var r=Math.asin(1/(t=Math.max(1,t)))*(n/=_c);function i(o){return((o=2*o-1)<0?t*Ss(-o)*Math.sin((r-o)/n):2-t*Ss(o)*Math.sin((r+o)/n))/2}return i.amplitude=function(o){return e(o,n*_c)},i.period=function(o){return e(t,o)},i}(1,.3);function tW(e){if(!e.ok)throw new Error(e.status+" "+e.statusText);return e.blob()}function nW(e,t){return fetch(e,t).then(tW)}function rW(e){if(!e.ok)throw new Error(e.status+" "+e.statusText);return e.arrayBuffer()}function iW(e,t){return fetch(e,t).then(rW)}function oW(e){if(!e.ok)throw new Error(e.status+" "+e.statusText);return e.text()}function Dg(e,t){return fetch(e,t).then(oW)}function ON(e){return function(t,n,r){return 2===arguments.length&&"function"==typeof n&&(r=n,n=void 0),Dg(t,n).then(function(i){return e(i,r)})}}function sW(e,t,n,r){3===arguments.length&&"function"==typeof n&&(r=n,n=void 0);var i=wg(e);return Dg(t,n).then(function(o){return i.parse(o,r)})}var aW=ON(DN),uW=ON(EN);function cW(e,t){return new Promise(function(n,r){var i=new Image;for(var o in t)i[o]=t[o];i.onerror=r,i.onload=function(){n(i)},i.src=e})}function lW(e){if(!e.ok)throw new Error(e.status+" "+e.statusText);if(204!==e.status&&205!==e.status)return e.json()}function fW(e,t){return fetch(e,t).then(lW)}function Bb(e){return function(t,n){return Dg(t,n).then(function(r){return(new DOMParser).parseFromString(r,e)})}}const dW=Bb("application/xml");var hW=Bb("text/html"),pW=Bb("image/svg+xml");function gW(e,t){var n;function r(){var i,s,o=n.length,a=0,u=0;for(i=0;i<o;++i)a+=(s=n[i]).x,u+=s.y;for(a=a/o-e,u=u/o-t,i=0;i<o;++i)(s=n[i]).x-=a,s.y-=u}return null==e&&(e=0),null==t&&(t=0),r.initialize=function(i){n=i},r.x=function(i){return arguments.length?(e=+i,r):e},r.y=function(i){return arguments.length?(t=+i,r):t},r}function Qn(e){return function(){return e}}function Ts(){return 1e-6*(Math.random()-.5)}function RN(e,t,n,r){if(isNaN(t)||isNaN(n))return e;var i,d,h,g,y,v,b,_,E,o=e._root,s={data:r},a=e._x0,u=e._y0,c=e._x1,l=e._y1;if(!o)return e._root=s,e;for(;o.length;)if((v=t>=(d=(a+c)/2))?a=d:c=d,(b=n>=(h=(u+l)/2))?u=h:l=h,i=o,!(o=o[_=b<<1|v]))return i[_]=s,e;if(g=+e._x.call(null,o.data),y=+e._y.call(null,o.data),t===g&&n===y)return s.next=o,i?i[_]=s:e._root=s,e;do{i=i?i[_]=new Array(4):e._root=new Array(4),(v=t>=(d=(a+c)/2))?a=d:c=d,(b=n>=(h=(u+l)/2))?u=h:l=h}while((_=b<<1|v)==(E=(y>=h)<<1|g>=d));return i[E]=o,i[_]=s,e}function Tr(e,t,n,r,i){this.node=e,this.x0=t,this.y0=n,this.x1=r,this.y1=i}function SW(e){return e[0]}function NW(e){return e[1]}function Eg(e,t,n){var r=new jb(t??SW,n??NW,NaN,NaN,NaN,NaN);return null==e?r:r.addAll(e)}function jb(e,t,n,r,i,o){this._x=e,this._y=t,this._x0=n,this._y0=r,this._x1=i,this._y1=o,this._root=void 0}function PN(e){for(var t={data:e.data},n=t;e=e.next;)n=n.next={data:e.data};return t}var Nr=Eg.prototype=jb.prototype;function kW(e){return e.x+e.vx}function OW(e){return e.y+e.vy}function RW(e){var t,n,r=1,i=1;function o(){for(var u,l,d,h,g,y,v,c=t.length,b=0;b<i;++b)for(l=Eg(t,kW,OW).visitAfter(s),u=0;u<c;++u)v=(y=n[(d=t[u]).index])*y,h=d.x+d.vx,g=d.y+d.vy,l.visit(_);function _(E,C,I,R,G){var z=E.data,de=E.r,oe=y+de;if(!z)return C>h+oe||R<h-oe||I>g+oe||G<g-oe;if(z.index>d.index){var fe=h-z.x-z.vx,re=g-z.y-z.vy,T=fe*fe+re*re;T<oe*oe&&(0===fe&&(T+=(fe=Ts())*fe),0===re&&(T+=(re=Ts())*re),T=(oe-(T=Math.sqrt(T)))/T*r,d.vx+=(fe*=T)*(oe=(de*=de)/(v+de)),d.vy+=(re*=T)*oe,z.vx-=fe*(oe=1-oe),z.vy-=re*oe)}}}function s(u){if(u.data)return u.r=n[u.data.index];for(var c=u.r=0;c<4;++c)u[c]&&u[c].r>u.r&&(u.r=u[c].r)}function a(){if(t){var u,l,c=t.length;for(n=new Array(c),u=0;u<c;++u)n[(l=t[u]).index]=+e(l,u,t)}}return"function"!=typeof e&&(e=Qn(null==e?1:+e)),o.initialize=function(u){t=u,a()},o.iterations=function(u){return arguments.length?(i=+u,o):i},o.strength=function(u){return arguments.length?(r=+u,o):r},o.radius=function(u){return arguments.length?(e="function"==typeof u?u:Qn(+u),a(),o):e},o}function PW(e){return e.index}function FN(e,t){var n=e.get(t);if(!n)throw new Error("missing: "+t);return n}function FW(e){var r,o,s,a,u,t=PW,n=function l(v){return 1/Math.min(a[v.source.index],a[v.target.index])},i=Qn(30),c=1;function d(v){for(var b=0,_=e.length;b<c;++b)for(var C,I,R,G,z,de,oe,E=0;E<_;++E)G=(R=(C=e[E]).target).x+R.vx-(I=C.source).x-I.vx||Ts(),z=R.y+R.vy-I.y-I.vy||Ts(),z*=de=((de=Math.sqrt(G*G+z*z))-o[E])/de*v*r[E],R.vx-=(G*=de)*(oe=u[E]),R.vy-=z*oe,I.vx+=G*(oe=1-oe),I.vy+=z*oe}function h(){if(s){var v,C,b=s.length,_=e.length,E=Ms(s,t);for(v=0,a=new Array(b);v<_;++v)(C=e[v]).index=v,"object"!=typeof C.source&&(C.source=FN(E,C.source)),"object"!=typeof C.target&&(C.target=FN(E,C.target)),a[C.source.index]=(a[C.source.index]||0)+1,a[C.target.index]=(a[C.target.index]||0)+1;for(v=0,u=new Array(_);v<_;++v)u[v]=a[(C=e[v]).source.index]/(a[C.source.index]+a[C.target.index]);r=new Array(_),g(),o=new Array(_),y()}}function g(){if(s)for(var v=0,b=e.length;v<b;++v)r[v]=+n(e[v],v,e)}function y(){if(s)for(var v=0,b=e.length;v<b;++v)o[v]=+i(e[v],v,e)}return null==e&&(e=[]),d.initialize=function(v){s=v,h()},d.links=function(v){return arguments.length?(e=v,h(),d):e},d.id=function(v){return arguments.length?(t=v,d):t},d.iterations=function(v){return arguments.length?(c=+v,d):c},d.strength=function(v){return arguments.length?(n="function"==typeof v?v:Qn(+v),g(),d):n},d.distance=function(v){return arguments.length?(i="function"==typeof v?v:Qn(+v),y(),d):i},d}function LW(e){return e.x}function BW(e){return e.y}Nr.copy=function(){var n,r,e=new jb(this._x,this._y,this._x0,this._y0,this._x1,this._y1),t=this._root;if(!t)return e;if(!t.length)return e._root=PN(t),e;for(n=[{source:t,target:e._root=new Array(4)}];t=n.pop();)for(var i=0;i<4;++i)(r=t.source[i])&&(r.length?n.push({source:r,target:t.target[i]=new Array(4)}):t.target[i]=PN(r));return e},Nr.add=function mW(e){var t=+this._x.call(null,e),n=+this._y.call(null,e);return RN(this.cover(t,n),t,n,e)},Nr.addAll=function yW(e){var t,n,i,o,r=e.length,s=new Array(r),a=new Array(r),u=1/0,c=1/0,l=-1/0,d=-1/0;for(n=0;n<r;++n)isNaN(i=+this._x.call(null,t=e[n]))||isNaN(o=+this._y.call(null,t))||(s[n]=i,a[n]=o,i<u&&(u=i),i>l&&(l=i),o<c&&(c=o),o>d&&(d=o));if(u>l||c>d)return this;for(this.cover(u,c).cover(l,d),n=0;n<r;++n)RN(this,s[n],a[n],e[n]);return this},Nr.cover=function vW(e,t){if(isNaN(e=+e)||isNaN(t=+t))return this;var n=this._x0,r=this._y0,i=this._x1,o=this._y1;if(isNaN(n))i=(n=Math.floor(e))+1,o=(r=Math.floor(t))+1;else{for(var u,c,s=i-n,a=this._root;n>e||e>=i||r>t||t>=o;)switch(c=(t<r)<<1|e<n,u=new Array(4),u[c]=a,a=u,s*=2,c){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=a)}return this._x0=n,this._y0=r,this._x1=i,this._y1=o,this},Nr.data=function bW(){var e=[];return this.visit(function(t){if(!t.length)do{e.push(t.data)}while(t=t.next)}),e},Nr.extent=function wW(e){return arguments.length?this.cover(+e[0][0],+e[0][1]).cover(+e[1][0],+e[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},Nr.find=function _W(e,t,n){var r,s,a,u,c,y,v,i=this._x0,o=this._y0,l=this._x1,d=this._y1,h=[],g=this._root;for(g&&h.push(new Tr(g,i,o,l,d)),null==n?n=1/0:(i=e-n,o=t-n,l=e+n,d=t+n,n*=n);y=h.pop();)if(!(!(g=y.node)||(s=y.x0)>l||(a=y.y0)>d||(u=y.x1)<i||(c=y.y1)<o))if(g.length){var b=(s+u)/2,_=(a+c)/2;h.push(new Tr(g[3],b,_,u,c),new Tr(g[2],s,_,b,c),new Tr(g[1],b,a,u,_),new Tr(g[0],s,a,b,_)),(v=(t>=_)<<1|e>=b)&&(y=h[h.length-1],h[h.length-1]=h[h.length-1-v],h[h.length-1-v]=y)}else{var E=e-+this._x.call(null,g.data),C=t-+this._y.call(null,g.data),I=E*E+C*C;if(I<n){var R=Math.sqrt(n=I);i=e-R,o=t-R,l=e+R,d=t+R,r=g.data}}return r},Nr.remove=function DW(e){if(isNaN(l=+this._x.call(null,e))||isNaN(d=+this._y.call(null,e)))return this;var t,r,i,o,l,d,h,g,y,v,b,_,n=this._root,s=this._x0,a=this._y0,u=this._x1,c=this._y1;if(!n)return this;if(n.length)for(;;){if((y=l>=(h=(s+u)/2))?s=h:u=h,(v=d>=(g=(a+c)/2))?a=g:c=g,t=n,!(n=n[b=v<<1|y]))return this;if(!n.length)break;(t[b+1&3]||t[b+2&3]||t[b+3&3])&&(r=t,_=b)}for(;n.data!==e;)if(i=n,!(n=n.next))return this;return(o=n.next)&&delete n.next,i?(o?i.next=o:delete i.next,this):t?(o?t[b]=o:delete t[b],(n=t[0]||t[1]||t[2]||t[3])&&n===(t[3]||t[2]||t[1]||t[0])&&!n.length&&(r?r[_]=n:this._root=n),this):(this._root=o,this)},Nr.removeAll=function EW(e){for(var t=0,n=e.length;t<n;++t)this.remove(e[t]);return this},Nr.root=function CW(){return this._root},Nr.size=function xW(){var e=0;return this.visit(function(t){if(!t.length)do{++e}while(t=t.next)}),e},Nr.visit=function MW(e){var n,i,o,s,a,u,t=[],r=this._root;for(r&&t.push(new Tr(r,this._x0,this._y0,this._x1,this._y1));n=t.pop();)if(!e(r=n.node,o=n.x0,s=n.y0,a=n.x1,u=n.y1)&&r.length){var c=(o+a)/2,l=(s+u)/2;(i=r[3])&&t.push(new Tr(i,c,l,a,u)),(i=r[2])&&t.push(new Tr(i,o,l,c,u)),(i=r[1])&&t.push(new Tr(i,c,s,a,l)),(i=r[0])&&t.push(new Tr(i,o,s,c,l))}return this},Nr.visitAfter=function IW(e){var r,t=[],n=[];for(this._root&&t.push(new Tr(this._root,this._x0,this._y0,this._x1,this._y1));r=t.pop();){var i=r.node;if(i.length){var o,s=r.x0,a=r.y0,u=r.x1,c=r.y1,l=(s+u)/2,d=(a+c)/2;(o=i[0])&&t.push(new Tr(o,s,a,l,d)),(o=i[1])&&t.push(new Tr(o,l,a,u,d)),(o=i[2])&&t.push(new Tr(o,s,d,l,c)),(o=i[3])&&t.push(new Tr(o,l,d,u,c))}n.push(r)}for(;r=n.pop();)e(r.node,r.x0,r.y0,r.x1,r.y1);return this},Nr.x=function TW(e){return arguments.length?(this._x=e,this):this._x},Nr.y=function AW(e){return arguments.length?(this._y=e,this):this._y};var jW=10,VW=Math.PI*(3-Math.sqrt(5));function HW(e){var t,n=1,r=.001,i=1-Math.pow(r,1/300),o=0,s=.6,a=Ms(),u=og(l),c=uc("tick","end");function l(){d(),c.call("tick",t),n<r&&(u.stop(),c.call("end",t))}function d(y){var v,_,b=e.length;void 0===y&&(y=1);for(var E=0;E<y;++E)for(n+=(o-n)*i,a.each(function(C){C(n)}),v=0;v<b;++v)null==(_=e[v]).fx?_.x+=_.vx*=s:(_.x=_.fx,_.vx=0),null==_.fy?_.y+=_.vy*=s:(_.y=_.fy,_.vy=0);return t}function h(){for(var b,y=0,v=e.length;y<v;++y){if((b=e[y]).index=y,null!=b.fx&&(b.x=b.fx),null!=b.fy&&(b.y=b.fy),isNaN(b.x)||isNaN(b.y)){var _=jW*Math.sqrt(y),E=y*VW;b.x=_*Math.cos(E),b.y=_*Math.sin(E)}(isNaN(b.vx)||isNaN(b.vy))&&(b.vx=b.vy=0)}}function g(y){return y.initialize&&y.initialize(e),y}return null==e&&(e=[]),h(),t={tick:d,restart:function(){return u.restart(l),t},stop:function(){return u.stop(),t},nodes:function(y){return arguments.length?(e=y,h(),a.each(g),t):e},alpha:function(y){return arguments.length?(n=+y,t):n},alphaMin:function(y){return arguments.length?(r=+y,t):r},alphaDecay:function(y){return arguments.length?(i=+y,t):+i},alphaTarget:function(y){return arguments.length?(o=+y,t):o},velocityDecay:function(y){return arguments.length?(s=1-y,t):1-s},force:function(y,v){return arguments.length>1?(null==v?a.remove(y):a.set(y,g(v)),t):a.get(y)},find:function(y,v,b){var C,I,R,G,z,_=0,E=e.length;for(null==b?b=1/0:b*=b,_=0;_<E;++_)(R=(C=y-(G=e[_]).x)*C+(I=v-G.y)*I)<b&&(z=G,b=R);return z},on:function(y,v){return arguments.length>1?(c.on(y,v),t):c.on(y)}}}function UW(){var e,t,n,i,r=Qn(-30),o=1,s=1/0,a=.81;function u(h){var g,y=e.length,v=Eg(e,LW,BW).visitAfter(l);for(n=h,g=0;g<y;++g)t=e[g],v.visit(d)}function c(){if(e){var h,y,g=e.length;for(i=new Array(g),h=0;h<g;++h)i[(y=e[h]).index]=+r(y,h,e)}}function l(h){var y,v,_,E,C,g=0,b=0;if(h.length){for(_=E=C=0;C<4;++C)(y=h[C])&&(v=Math.abs(y.value))&&(g+=y.value,b+=v,_+=v*y.x,E+=v*y.y);h.x=_/b,h.y=E/b}else{(y=h).x=y.data.x,y.y=y.data.y;do{g+=i[y.data.index]}while(y=y.next)}h.value=g}function d(h,g,y,v){if(!h.value)return!0;var b=h.x-t.x,_=h.y-t.y,E=v-g,C=b*b+_*_;if(E*E/a<C)return C<s&&(0===b&&(C+=(b=Ts())*b),0===_&&(C+=(_=Ts())*_),C<o&&(C=Math.sqrt(o*C)),t.vx+=b*h.value*n/C,t.vy+=_*h.value*n/C),!0;if(!(h.length||C>=s)){(h.data!==t||h.next)&&(0===b&&(C+=(b=Ts())*b),0===_&&(C+=(_=Ts())*_),C<o&&(C=Math.sqrt(o*C)));do{h.data!==t&&(t.vx+=b*(E=i[h.data.index]*n/C),t.vy+=_*E)}while(h=h.next)}}return u.initialize=function(h){e=h,c()},u.strength=function(h){return arguments.length?(r="function"==typeof h?h:Qn(+h),c(),u):r},u.distanceMin=function(h){return arguments.length?(o=h*h,u):Math.sqrt(o)},u.distanceMax=function(h){return arguments.length?(s=h*h,u):Math.sqrt(s)},u.theta=function(h){return arguments.length?(a=h*h,u):Math.sqrt(a)},u}function $W(e,t,n){var r,o,s,i=Qn(.1);function a(c){for(var l=0,d=r.length;l<d;++l){var h=r[l],g=h.x-t||1e-6,y=h.y-n||1e-6,v=Math.sqrt(g*g+y*y),b=(s[l]-v)*o[l]*c/v;h.vx+=g*b,h.vy+=y*b}}function u(){if(r){var c,l=r.length;for(o=new Array(l),s=new Array(l),c=0;c<l;++c)s[c]=+e(r[c],c,r),o[c]=isNaN(s[c])?0:+i(r[c],c,r)}}return"function"!=typeof e&&(e=Qn(+e)),null==t&&(t=0),null==n&&(n=0),a.initialize=function(c){r=c,u()},a.strength=function(c){return arguments.length?(i="function"==typeof c?c:Qn(+c),u(),a):i},a.radius=function(c){return arguments.length?(e="function"==typeof c?c:Qn(+c),u(),a):e},a.x=function(c){return arguments.length?(t=+c,a):t},a.y=function(c){return arguments.length?(n=+c,a):n},a}function zW(e){var n,r,i,t=Qn(.1);function o(a){for(var l,u=0,c=n.length;u<c;++u)(l=n[u]).vx+=(i[u]-l.x)*r[u]*a}function s(){if(n){var a,u=n.length;for(r=new Array(u),i=new Array(u),a=0;a<u;++a)r[a]=isNaN(i[a]=+e(n[a],a,n))?0:+t(n[a],a,n)}}return"function"!=typeof e&&(e=Qn(null==e?0:+e)),o.initialize=function(a){n=a,s()},o.strength=function(a){return arguments.length?(t="function"==typeof a?a:Qn(+a),s(),o):t},o.x=function(a){return arguments.length?(e="function"==typeof a?a:Qn(+a),s(),o):e},o}function GW(e){var n,r,i,t=Qn(.1);function o(a){for(var l,u=0,c=n.length;u<c;++u)(l=n[u]).vy+=(i[u]-l.y)*r[u]*a}function s(){if(n){var a,u=n.length;for(r=new Array(u),i=new Array(u),a=0;a<u;++a)r[a]=isNaN(i[a]=+e(n[a],a,n))?0:+t(n[a],a,n)}}return"function"!=typeof e&&(e=Qn(null==e?0:+e)),o.initialize=function(a){n=a,s()},o.strength=function(a){return arguments.length?(t="function"==typeof a?a:Qn(+a),s(),o):t},o.y=function(a){return arguments.length?(e="function"==typeof a?a:Qn(+a),s(),o):e},o}function Cg(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function Dc(e){return(e=Cg(Math.abs(e)))?e[1]:NaN}var LN,KW=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Hf(e){if(!(t=KW.exec(e)))throw new Error("invalid format: "+e);var t;return new xg({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function xg(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function BN(e,t){var n=Cg(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}Hf.prototype=xg.prototype,xg.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};const jN={"%":function(e,t){return(100*e).toFixed(t)},b:function(e){return Math.round(e).toString(2)},c:function(e){return e+""},d:function qW(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},g:function(e,t){return e.toPrecision(t)},o:function(e){return Math.round(e).toString(8)},p:function(e,t){return BN(100*e,t)},r:BN,s:function ZW(e,t){var n=Cg(e,t);if(!n)return e+"";var r=n[0],i=n[1],o=i-(LN=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,s=r.length;return o===s?r:o>s?r+new Array(o-s+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+Cg(e,Math.max(0,t+o-1))[0]},X:function(e){return Math.round(e).toString(16).toUpperCase()},x:function(e){return Math.round(e).toString(16)}};function VN(e){return e}var Mg,Ig,Vb,HN=Array.prototype.map,UN=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"];function $N(e){var t=void 0===e.grouping||void 0===e.thousands?VN:function WW(e,t){return function(n,r){for(var i=n.length,o=[],s=0,a=e[0],u=0;i>0&&a>0&&(u+a+1>r&&(a=Math.max(1,r-u)),o.push(n.substring(i-=a,i+a)),!((u+=a+1)>r));)a=e[s=(s+1)%e.length];return o.reverse().join(t)}}(HN.call(e.grouping,Number),e.thousands+""),n=void 0===e.currency?"":e.currency[0]+"",r=void 0===e.currency?"":e.currency[1]+"",i=void 0===e.decimal?".":e.decimal+"",o=void 0===e.numerals?VN:function YW(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}(HN.call(e.numerals,String)),s=void 0===e.percent?"%":e.percent+"",a=void 0===e.minus?"-":e.minus+"",u=void 0===e.nan?"NaN":e.nan+"";function c(d){var h=(d=Hf(d)).fill,g=d.align,y=d.sign,v=d.symbol,b=d.zero,_=d.width,E=d.comma,C=d.precision,I=d.trim,R=d.type;"n"===R?(E=!0,R="g"):jN[R]||(void 0===C&&(C=12),I=!0,R="g"),(b||"0"===h&&"="===g)&&(b=!0,h="0",g="=");var G="$"===v?n:"#"===v&&/[boxX]/.test(R)?"0"+R.toLowerCase():"",z="$"===v?r:/[%p]/.test(R)?s:"",de=jN[R],oe=/[defgprs%]/.test(R);function fe(re){var Ce,X,we,T=G,te=z;if("c"===R)te=de(re)+te,re="";else{var Ye=(re=+re)<0||1/re<0;if(re=isNaN(re)?u:de(Math.abs(re),C),I&&(re=function QW(e){e:for(var i,t=e.length,n=1,r=-1;n<t;++n)switch(e[n]){case".":r=i=n;break;case"0":0===r&&(r=n),i=n;break;default:if(!+e[n])break e;r>0&&(r=0)}return r>0?e.slice(0,r)+e.slice(i+1):e}(re)),Ye&&0==+re&&"+"!==y&&(Ye=!1),T=(Ye?"("===y?y:a:"-"===y||"("===y?"":y)+T,te=("s"===R?UN[8+LN/3]:"")+te+(Ye&&"("===y?")":""),oe)for(Ce=-1,X=re.length;++Ce<X;)if(48>(we=re.charCodeAt(Ce))||we>57){te=(46===we?i+re.slice(Ce+1):re.slice(Ce))+te,re=re.slice(0,Ce);break}}E&&!b&&(re=t(re,1/0));var Be=T.length+re.length+te.length,tt=Be<_?new Array(_-Be+1).join(h):"";switch(E&&b&&(re=t(tt+re,tt.length?_-te.length:1/0),tt=""),g){case"<":re=T+re+te+tt;break;case"=":re=T+tt+re+te;break;case"^":re=tt.slice(0,Be=tt.length>>1)+T+re+te+tt.slice(Be);break;default:re=tt+T+re+te}return o(re)}return C=void 0===C?6:/[gprs]/.test(R)?Math.max(1,Math.min(21,C)):Math.max(0,Math.min(20,C)),fe.toString=function(){return d+""},fe}return{format:c,formatPrefix:function l(d,h){var g=c(((d=Hf(d)).type="f",d)),y=3*Math.max(-8,Math.min(8,Math.floor(Dc(h)/3))),v=Math.pow(10,-y),b=UN[8+y/3];return function(_){return g(v*_)+b}}}}function zN(e){return Mg=$N(e),Ig=Mg.format,Vb=Mg.formatPrefix,Mg}function GN(e){return Math.max(0,-Dc(Math.abs(e)))}function qN(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Dc(t)/3)))-Dc(Math.abs(e)))}function WN(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Dc(t)-Dc(e))+1}function Ns(){return new Sg}function Sg(){this.reset()}zN({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),Sg.prototype={constructor:Sg,reset:function(){this.s=this.t=0},add:function(e){YN(Tg,e,this.t),YN(this,Tg.s,this.s),this.s?this.t+=Tg.t:this.s=Tg.t},valueOf:function(){return this.s}};var Tg=new Sg;function YN(e,t,n){var r=e.s=t+n,i=r-t;e.t=t-(r-i)+(n-i)}var at=1e-6,Ng=1e-12,Pt=Math.PI,On=Pt/2,Ag=Pt/4,Ar=2*Pt,hn=180/Pt,lt=Pt/180,Ut=Math.abs,Ec=Math.atan,kr=Math.atan2,rt=Math.cos,kg=Math.ceil,KN=Math.exp,Og=(Math,Math.log),Hb=Math.pow,Qe=Math.sin,vi=Math.sign||function(e){return e>0?1:e<0?-1:0},zn=Math.sqrt,Ub=Math.tan;function QN(e){return e>1?0:e<-1?Pt:Math.acos(e)}function Or(e){return e>1?On:e<-1?-On:Math.asin(e)}function ZN(e){return(e=Qe(e/2))*e}function Mn(){}function Rg(e,t){e&&JN.hasOwnProperty(e.type)&&JN[e.type](e,t)}var XN={Feature:function(e,t){Rg(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,r=-1,i=n.length;++r<i;)Rg(n[r].geometry,t)}},JN={Sphere:function(e,t){t.sphere()},Point:function(e,t){t.point((e=e.coordinates)[0],e[1],e[2])},MultiPoint:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)t.point((e=n[r])[0],e[1],e[2])},LineString:function(e,t){$b(e.coordinates,t,0)},MultiLineString:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)$b(n[r],t,0)},Polygon:function(e,t){eA(e.coordinates,t)},MultiPolygon:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)eA(n[r],t)},GeometryCollection:function(e,t){for(var n=e.geometries,r=-1,i=n.length;++r<i;)Rg(n[r],t)}};function $b(e,t,n){var o,r=-1,i=e.length-n;for(t.lineStart();++r<i;)t.point((o=e[r])[0],o[1],o[2]);t.lineEnd()}function eA(e,t){var n=-1,r=e.length;for(t.polygonStart();++n<r;)$b(e[n],t,1);t.polygonEnd()}function zi(e,t){e&&XN.hasOwnProperty(e.type)?XN[e.type](e,t):Rg(e,t)}var tA,nA,zb,Gb,qb,Pg=Ns(),Fg=Ns(),To={point:Mn,lineStart:Mn,lineEnd:Mn,polygonStart:function(){Pg.reset(),To.lineStart=XW,To.lineEnd=JW},polygonEnd:function(){var e=+Pg;Fg.add(e<0?Ar+e:e),this.lineStart=this.lineEnd=this.point=Mn},sphere:function(){Fg.add(Ar)}};function XW(){To.point=eY}function JW(){rA(tA,nA)}function eY(e,t){To.point=rA,tA=e,nA=t,zb=e*=lt,Gb=rt(t=(t*=lt)/2+Ag),qb=Qe(t)}function rA(e,t){var n=(e*=lt)-zb,r=n>=0?1:-1,i=r*n,o=rt(t=(t*=lt)/2+Ag),s=Qe(t),a=qb*s,u=Gb*o+a*rt(i),c=a*r*Qe(i);Pg.add(kr(c,u)),zb=e,Gb=o,qb=s}function tY(e){return Fg.reset(),zi(e,To),2*Fg}function Lg(e){return[kr(e[1],e[0]),Or(e[2])]}function Na(e){var t=e[0],n=e[1],r=rt(n);return[r*rt(t),r*Qe(t),Qe(n)]}function Bg(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function Cc(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function Wb(e,t){e[0]+=t[0],e[1]+=t[1],e[2]+=t[2]}function jg(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function Vg(e){var t=zn(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}var In,qr,Rn,ri,Aa,iA,oA,xc,As,Jo,Uf=Ns(),es={point:Yb,lineStart:aA,lineEnd:uA,polygonStart:function(){es.point=cA,es.lineStart=nY,es.lineEnd=rY,Uf.reset(),To.polygonStart()},polygonEnd:function(){To.polygonEnd(),es.point=Yb,es.lineStart=aA,es.lineEnd=uA,Pg<0?(In=-(Rn=180),qr=-(ri=90)):Uf>at?ri=90:Uf<-at&&(qr=-90),Jo[0]=In,Jo[1]=Rn},sphere:function(){In=-(Rn=180),qr=-(ri=90)}};function Yb(e,t){As.push(Jo=[In=e,Rn=e]),t<qr&&(qr=t),t>ri&&(ri=t)}function sA(e,t){var n=Na([e*lt,t*lt]);if(xc){var r=Cc(xc,n),o=Cc([r[1],-r[0],0],r);Vg(o),o=Lg(o);var c,s=e-Aa,a=s>0?1:-1,u=o[0]*hn*a,l=Ut(s)>180;l^(a*Aa<u&&u<a*e)?(c=o[1]*hn)>ri&&(ri=c):l^(a*Aa<(u=(u+360)%360-180)&&u<a*e)?(c=-o[1]*hn)<qr&&(qr=c):(t<qr&&(qr=t),t>ri&&(ri=t)),l?e<Aa?ii(In,e)>ii(In,Rn)&&(Rn=e):ii(e,Rn)>ii(In,Rn)&&(In=e):Rn>=In?(e<In&&(In=e),e>Rn&&(Rn=e)):e>Aa?ii(In,e)>ii(In,Rn)&&(Rn=e):ii(e,Rn)>ii(In,Rn)&&(In=e)}else As.push(Jo=[In=e,Rn=e]);t<qr&&(qr=t),t>ri&&(ri=t),xc=n,Aa=e}function aA(){es.point=sA}function uA(){Jo[0]=In,Jo[1]=Rn,es.point=Yb,xc=null}function cA(e,t){if(xc){var n=e-Aa;Uf.add(Ut(n)>180?n+(n>0?360:-360):n)}else iA=e,oA=t;To.point(e,t),sA(e,t)}function nY(){To.lineStart()}function rY(){cA(iA,oA),To.lineEnd(),Ut(Uf)>at&&(In=-(Rn=180)),Jo[0]=In,Jo[1]=Rn,xc=null}function ii(e,t){return(t-=e)<0?t+360:t}function iY(e,t){return e[0]-t[0]}function lA(e,t){return e[0]<=e[1]?e[0]<=t&&t<=e[1]:t<e[0]||e[1]<t}function oY(e){var t,n,r,i,o,s,a;if(ri=Rn=-(In=qr=1/0),As=[],zi(e,es),n=As.length){for(As.sort(iY),t=1,o=[r=As[0]];t<n;++t)lA(r,(i=As[t])[0])||lA(r,i[1])?(ii(r[0],i[1])>ii(r[0],r[1])&&(r[1]=i[1]),ii(i[0],r[1])>ii(r[0],r[1])&&(r[0]=i[0])):o.push(r=i);for(s=-1/0,t=0,r=o[n=o.length-1];t<=n;r=i,++t)(a=ii(r[1],(i=o[t])[0]))>s&&(s=a,In=i[0],Rn=r[1])}return As=Jo=null,In===1/0||qr===1/0?[[NaN,NaN],[NaN,NaN]]:[[In,qr],[Rn,ri]]}var $f,Hg,Ug,$g,zg,Gg,qg,Wg,Kb,Qb,Zb,fA,dA,Rr,Pr,Fr,Gi={sphere:Mn,point:Xb,lineStart:hA,lineEnd:pA,polygonStart:function(){Gi.lineStart=uY,Gi.lineEnd=cY},polygonEnd:function(){Gi.lineStart=hA,Gi.lineEnd=pA}};function Xb(e,t){e*=lt;var n=rt(t*=lt);zf(n*rt(e),n*Qe(e),Qe(t))}function zf(e,t,n){++$f,Ug+=(e-Ug)/$f,$g+=(t-$g)/$f,zg+=(n-zg)/$f}function hA(){Gi.point=sY}function sY(e,t){e*=lt;var n=rt(t*=lt);Rr=n*rt(e),Pr=n*Qe(e),Fr=Qe(t),Gi.point=aY,zf(Rr,Pr,Fr)}function aY(e,t){e*=lt;var n=rt(t*=lt),r=n*rt(e),i=n*Qe(e),o=Qe(t),s=kr(zn((s=Pr*o-Fr*i)*s+(s=Fr*r-Rr*o)*s+(s=Rr*i-Pr*r)*s),Rr*r+Pr*i+Fr*o);Hg+=s,Gg+=s*(Rr+(Rr=r)),qg+=s*(Pr+(Pr=i)),Wg+=s*(Fr+(Fr=o)),zf(Rr,Pr,Fr)}function pA(){Gi.point=Xb}function uY(){Gi.point=lY}function cY(){gA(fA,dA),Gi.point=Xb}function lY(e,t){fA=e,dA=t,e*=lt,t*=lt,Gi.point=gA;var n=rt(t);Rr=n*rt(e),Pr=n*Qe(e),Fr=Qe(t),zf(Rr,Pr,Fr)}function gA(e,t){e*=lt;var n=rt(t*=lt),r=n*rt(e),i=n*Qe(e),o=Qe(t),s=Pr*o-Fr*i,a=Fr*r-Rr*o,u=Rr*i-Pr*r,c=zn(s*s+a*a+u*u),l=Or(c),d=c&&-l/c;Kb+=d*s,Qb+=d*a,Zb+=d*u,Hg+=l,Gg+=l*(Rr+(Rr=r)),qg+=l*(Pr+(Pr=i)),Wg+=l*(Fr+(Fr=o)),zf(Rr,Pr,Fr)}function fY(e){$f=Hg=Ug=$g=zg=Gg=qg=Wg=Kb=Qb=Zb=0,zi(e,Gi);var t=Kb,n=Qb,r=Zb,i=t*t+n*n+r*r;return i<Ng&&(t=Gg,n=qg,r=Wg,Hg<at&&(t=Ug,n=$g,r=zg),(i=t*t+n*n+r*r)<Ng)?[NaN,NaN]:[kr(n,t)*hn,Or(r/zn(i))*hn]}function Mc(e){return function(){return e}}function Jb(e,t){function n(r,i){return r=e(r,i),t(r[0],r[1])}return e.invert&&t.invert&&(n.invert=function(r,i){return(r=t.invert(r,i))&&e.invert(r[0],r[1])}),n}function ew(e,t){return[Ut(e)>Pt?e+Math.round(-e/Ar)*Ar:e,t]}function tw(e,t,n){return(e%=Ar)?t||n?Jb(yA(e),vA(t,n)):yA(e):t||n?vA(t,n):ew}function mA(e){return function(t,n){return[(t+=e)>Pt?t-Ar:t<-Pt?t+Ar:t,n]}}function yA(e){var t=mA(e);return t.invert=mA(-e),t}function vA(e,t){var n=rt(e),r=Qe(e),i=rt(t),o=Qe(t);function s(a,u){var c=rt(u),l=rt(a)*c,d=Qe(a)*c,h=Qe(u),g=h*n+l*r;return[kr(d*i-g*o,l*n-h*r),Or(g*i+d*o)]}return s.invert=function(a,u){var c=rt(u),l=rt(a)*c,d=Qe(a)*c,h=Qe(u),g=h*i-d*o;return[kr(d*i+h*o,l*n+g*r),Or(g*n-l*r)]},s}function bA(e){function t(n){return(n=e(n[0]*lt,n[1]*lt))[0]*=hn,n[1]*=hn,n}return e=tw(e[0]*lt,e[1]*lt,e.length>2?e[2]*lt:0),t.invert=function(n){return(n=e.invert(n[0]*lt,n[1]*lt))[0]*=hn,n[1]*=hn,n},t}function wA(e,t,n,r,i,o){if(n){var s=rt(t),a=Qe(t),u=r*n;null==i?(i=t+r*Ar,o=t-u/2):(i=_A(s,i),o=_A(s,o),(r>0?i<o:i>o)&&(i+=r*Ar));for(var c,l=i;r>0?l>o:l<o;l-=u)c=Lg([s,-a*rt(l),-a*Qe(l)]),e.point(c[0],c[1])}}function _A(e,t){(t=Na(t))[0]-=e,Vg(t);var n=QN(-t[1]);return((-t[2]<0?-n:n)+Ar-at)%Ar}function dY(){var r,i,e=Mc([0,0]),t=Mc(90),n=Mc(6),o={point:function s(u,c){r.push(u=i(u,c)),u[0]*=hn,u[1]*=hn}};function a(){var u=e.apply(this,arguments),c=t.apply(this,arguments)*lt,l=n.apply(this,arguments)*lt;return r=[],i=tw(-u[0]*lt,-u[1]*lt,0).invert,wA(o,c,l,1),u={type:"Polygon",coordinates:[r]},r=i=null,u}return a.center=function(u){return arguments.length?(e="function"==typeof u?u:Mc([+u[0],+u[1]]),a):e},a.radius=function(u){return arguments.length?(t="function"==typeof u?u:Mc(+u),a):t},a.precision=function(u){return arguments.length?(n="function"==typeof u?u:Mc(+u),a):n},a}function DA(){var t,e=[];return{point:function(n,r,i){t.push([n,r,i])},lineStart:function(){e.push(t=[])},lineEnd:Mn,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}function Yg(e,t){return Ut(e[0]-t[0])<at&&Ut(e[1]-t[1])<at}function Kg(e,t,n,r){this.x=e,this.z=t,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function EA(e,t,n,r,i){var a,u,o=[],s=[];if(e.forEach(function(y){if(!((v=y.length-1)<=0)){var v,E,b=y[0],_=y[v];if(Yg(b,_)){if(!b[2]&&!_[2]){for(i.lineStart(),a=0;a<v;++a)i.point((b=y[a])[0],b[1]);return void i.lineEnd()}_[0]+=2*at}o.push(E=new Kg(b,y,null,!0)),s.push(E.o=new Kg(b,null,E,!1)),o.push(E=new Kg(_,y,null,!1)),s.push(E.o=new Kg(_,null,E,!0))}}),o.length){for(s.sort(t),CA(o),CA(s),a=0,u=s.length;a<u;++a)s[a].e=n=!n;for(var l,d,c=o[0];;){for(var h=c,g=!0;h.v;)if((h=h.n)===c)return;l=h.z,i.lineStart();do{if(h.v=h.o.v=!0,h.e){if(g)for(a=0,u=l.length;a<u;++a)i.point((d=l[a])[0],d[1]);else r(h.x,h.n.x,1,i);h=h.n}else{if(g)for(a=(l=h.p.z).length-1;a>=0;--a)i.point((d=l[a])[0],d[1]);else r(h.x,h.p.x,-1,i);h=h.p}l=(h=h.o).z,g=!g}while(!h.v);i.lineEnd()}}}function CA(e){if(t=e.length){for(var t,i,n=0,r=e[0];++n<t;)r.n=i=e[n],i.p=r,r=i;r.n=i=e[0],i.p=r}}ew.invert=ew;var nw=Ns();function rw(e){return Ut(e[0])<=Pt?e[0]:vi(e[0])*((Ut(e[0])+Pt)%Ar-Pt)}function xA(e,t){var n=rw(t),r=t[1],i=Qe(r),o=[Qe(n),-rt(n),0],s=0,a=0;nw.reset(),1===i?r=On+at:-1===i&&(r=-On-at);for(var u=0,c=e.length;u<c;++u)if(d=(l=e[u]).length)for(var l,d,h=l[d-1],g=rw(h),y=h[1]/2+Ag,v=Qe(y),b=rt(y),_=0;_<d;++_,g=C,v=R,b=G,h=E){var E=l[_],C=rw(E),I=E[1]/2+Ag,R=Qe(I),G=rt(I),z=C-g,de=z>=0?1:-1,oe=de*z,fe=oe>Pt,re=v*R;if(nw.add(kr(re*de*Qe(oe),b*G+re*rt(oe))),s+=fe?z+de*Ar:z,fe^g>=n^C>=n){var T=Cc(Na(h),Na(E));Vg(T);var te=Cc(o,T);Vg(te);var Ce=(fe^z>=0?-1:1)*Or(te[2]);(r>Ce||r===Ce&&(T[0]||T[1]))&&(a+=fe^z>=0?1:-1)}}return(s<-at||s<at&&nw<-at)^1&a}function MA(e,t,n,r){return function(i){var c,l,d,o=t(i),s=DA(),a=t(s),u=!1,h={point:g,lineStart:v,lineEnd:b,polygonStart:function(){h.point=_,h.lineStart=E,h.lineEnd=C,l=[],c=[]},polygonEnd:function(){h.point=g,h.lineStart=v,h.lineEnd=b,l=R1(l);var I=xA(c,r);l.length?(u||(i.polygonStart(),u=!0),EA(l,pY,I,n,i)):I&&(u||(i.polygonStart(),u=!0),i.lineStart(),n(null,null,1,i),i.lineEnd()),u&&(i.polygonEnd(),u=!1),l=c=null},sphere:function(){i.polygonStart(),i.lineStart(),n(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function g(I,R){e(I,R)&&i.point(I,R)}function y(I,R){o.point(I,R)}function v(){h.point=y,o.lineStart()}function b(){h.point=g,o.lineEnd()}function _(I,R){d.push([I,R]),a.point(I,R)}function E(){a.lineStart(),d=[]}function C(){_(d[0][0],d[0][1]),a.lineEnd();var G,de,oe,fe,I=a.clean(),R=s.result(),z=R.length;if(d.pop(),c.push(d),d=null,z){if(1&I){if((de=(oe=R[0]).length-1)>0){for(u||(i.polygonStart(),u=!0),i.lineStart(),G=0;G<de;++G)i.point((fe=oe[G])[0],fe[1]);i.lineEnd()}return}z>1&&2&I&&R.push(R.pop().concat(R.shift())),l.push(R.filter(hY))}}return h}}function hY(e){return e.length>1}function pY(e,t){return((e=e.x)[0]<0?e[1]-On-at:On-e[1])-((t=t.x)[0]<0?t[1]-On-at:On-t[1])}const iw=MA(function(){return!0},function gY(e){var i,t=NaN,n=NaN,r=NaN;return{lineStart:function(){e.lineStart(),i=1},point:function(o,s){var a=o>0?Pt:-Pt,u=Ut(o-t);Ut(u-Pt)<at?(e.point(t,n=(n+s)/2>0?On:-On),e.point(r,n),e.lineEnd(),e.lineStart(),e.point(a,n),e.point(o,n),i=0):r!==a&&u>=Pt&&(Ut(t-r)<at&&(t-=r*at),Ut(o-a)<at&&(o-=a*at),n=function mY(e,t,n,r){var i,o,s=Qe(e-n);return Ut(s)>at?Ec((Qe(t)*(o=rt(r))*Qe(n)-Qe(r)*(i=rt(t))*Qe(e))/(i*o*s)):(t+r)/2}(t,n,o,s),e.point(r,n),e.lineEnd(),e.lineStart(),e.point(a,n),i=0),e.point(t=o,n=s),r=a},lineEnd:function(){e.lineEnd(),t=n=NaN},clean:function(){return 2-i}}},function yY(e,t,n,r){var i;if(null==e)r.point(-Pt,i=n*On),r.point(0,i),r.point(Pt,i),r.point(Pt,0),r.point(Pt,-i),r.point(0,-i),r.point(-Pt,-i),r.point(-Pt,0),r.point(-Pt,i);else if(Ut(e[0]-t[0])>at){var o=e[0]<t[0]?Pt:-Pt;r.point(-o,i=n*o/2),r.point(0,i),r.point(o,i)}else r.point(t[0],t[1])},[-Pt,-On]);function IA(e){var t=rt(e),n=6*lt,r=t>0,i=Ut(t)>at;function s(l,d){return rt(l)*rt(d)>t}function u(l,d,h){var v=[1,0,0],b=Cc(Na(l),Na(d)),_=Bg(b,b),E=b[0],C=_-E*E;if(!C)return!h&&l;var I=t*_/C,R=-t*E/C,G=Cc(v,b),z=jg(v,I);Wb(z,jg(b,R));var oe=G,fe=Bg(z,oe),re=Bg(oe,oe),T=fe*fe-re*(Bg(z,z)-1);if(!(T<0)){var te=zn(T),Ce=jg(oe,(-fe-te)/re);if(Wb(Ce,z),Ce=Lg(Ce),!h)return Ce;var tt,X=l[0],we=d[0],Ye=l[1],Be=d[1];we<X&&(tt=X,X=we,we=tt);var Ct=we-X,Dt=Ut(Ct-Pt)<at;if(!Dt&&Be<Ye&&(tt=Ye,Ye=Be,Be=tt),Dt||Ct<at?Dt?Ye+Be>0^Ce[1]<(Ut(Ce[0]-X)<at?Ye:Be):Ye<=Ce[1]&&Ce[1]<=Be:Ct>Pt^(X<=Ce[0]&&Ce[0]<=we)){var Jt=jg(oe,(-fe+te)/re);return Wb(Jt,z),[Ce,Lg(Jt)]}}}function c(l,d){var h=r?e:Pt-e,g=0;return l<-h?g|=1:l>h&&(g|=2),d<-h?g|=4:d>h&&(g|=8),g}return MA(s,function a(l){var d,h,g,y,v;return{lineStart:function(){y=g=!1,v=1},point:function(b,_){var C,E=[b,_],I=s(b,_),R=r?I?0:c(b,_):I?c(b+(b<0?Pt:-Pt),_):0;if(!d&&(y=g=I)&&l.lineStart(),I!==g&&(!(C=u(d,E))||Yg(d,C)||Yg(E,C))&&(E[2]=1),I!==g)v=0,I?(l.lineStart(),C=u(E,d),l.point(C[0],C[1])):(C=u(d,E),l.point(C[0],C[1],2),l.lineEnd()),d=C;else if(i&&d&&r^I){var G;!(R&h)&&(G=u(E,d,!0))&&(v=0,r?(l.lineStart(),l.point(G[0][0],G[0][1]),l.point(G[1][0],G[1][1]),l.lineEnd()):(l.point(G[1][0],G[1][1]),l.lineEnd(),l.lineStart(),l.point(G[0][0],G[0][1],3)))}I&&(!d||!Yg(d,E))&&l.point(E[0],E[1]),d=E,g=I,h=R},lineEnd:function(){g&&l.lineEnd(),d=null},clean:function(){return v|(y&&g)<<1}}},function o(l,d,h,g){wA(g,e,n,h,l,d)},r?[0,-e]:[-Pt,e-Pt])}var Gf=1e9,Qg=-Gf;function Zg(e,t,n,r){function i(c,l){return e<=c&&c<=n&&t<=l&&l<=r}function o(c,l,d,h){var g=0,y=0;if(null==c||(g=s(c,d))!==(y=s(l,d))||u(c,l)<0^d>0)do{h.point(0===g||3===g?e:n,g>1?r:t)}while((g=(g+d+4)%4)!==y);else h.point(l[0],l[1])}function s(c,l){return Ut(c[0]-e)<at?l>0?0:3:Ut(c[0]-n)<at?l>0?2:1:Ut(c[1]-t)<at?l>0?1:0:l>0?3:2}function a(c,l){return u(c.x,l.x)}function u(c,l){var d=s(c,1),h=s(l,1);return d!==h?d-h:0===d?l[1]-c[1]:1===d?c[0]-l[0]:2===d?c[1]-l[1]:l[0]-c[0]}return function(c){var h,g,y,v,b,_,E,C,I,R,G,l=c,d=DA(),z={point:de,lineStart:function T(){z.point=Ce,g&&g.push(y=[]),R=!0,I=!1,E=C=NaN},lineEnd:function te(){h&&(Ce(v,b),_&&I&&d.rejoin(),h.push(d.result())),z.point=de,I&&l.lineEnd()},polygonStart:function fe(){l=d,h=[],g=[],G=!0},polygonEnd:function re(){var X=function oe(){for(var X=0,we=0,Ye=g.length;we<Ye;++we)for(var on,Jt,Be=g[we],tt=1,Ct=Be.length,Dt=Be[0],ne=Dt[0],Ze=Dt[1];tt<Ct;++tt)on=ne,Jt=Ze,ne=(Dt=Be[tt])[0],Ze=Dt[1],Jt<=r?Ze>r&&(ne-on)*(r-Jt)>(Ze-Jt)*(e-on)&&++X:Ze<=r&&(ne-on)*(r-Jt)<(Ze-Jt)*(e-on)&&--X;return X}(),we=G&&X,Ye=(h=R1(h)).length;(we||Ye)&&(c.polygonStart(),we&&(c.lineStart(),o(null,null,1,c),c.lineEnd()),Ye&&EA(h,a,X,o,c),c.polygonEnd()),l=c,h=g=y=null}};function de(X,we){i(X,we)&&l.point(X,we)}function Ce(X,we){var Ye=i(X,we);if(g&&y.push([X,we]),R)v=X,b=we,_=Ye,R=!1,Ye&&(l.lineStart(),l.point(X,we));else if(Ye&&I)l.point(X,we);else{var Be=[E=Math.max(Qg,Math.min(Gf,E)),C=Math.max(Qg,Math.min(Gf,C))],tt=[X=Math.max(Qg,Math.min(Gf,X)),we=Math.max(Qg,Math.min(Gf,we))];!function vY(e,t,n,r,i,o){var y,s=e[0],a=e[1],l=0,d=1,h=t[0]-s,g=t[1]-a;if(y=n-s,h||!(y>0)){if(y/=h,h<0){if(y<l)return;y<d&&(d=y)}else if(h>0){if(y>d)return;y>l&&(l=y)}if(y=i-s,h||!(y<0)){if(y/=h,h<0){if(y>d)return;y>l&&(l=y)}else if(h>0){if(y<l)return;y<d&&(d=y)}if(y=r-a,g||!(y>0)){if(y/=g,g<0){if(y<l)return;y<d&&(d=y)}else if(g>0){if(y>d)return;y>l&&(l=y)}if(y=o-a,g||!(y<0)){if(y/=g,g<0){if(y>d)return;y>l&&(l=y)}else if(g>0){if(y<l)return;y<d&&(d=y)}return l>0&&(e[0]=s+l*h,e[1]=a+l*g),d<1&&(t[0]=s+d*h,t[1]=a+d*g),!0}}}}}(Be,tt,e,t,n,r)?Ye&&(l.lineStart(),l.point(X,we),G=!1):(I||(l.lineStart(),l.point(Be[0],Be[1])),l.point(tt[0],tt[1]),Ye||l.lineEnd(),G=!1)}E=X,C=we,I=Ye}return z}}function bY(){var i,o,s,e=0,t=0,n=960,r=500;return s={stream:function(a){return i&&o===a?i:i=Zg(e,t,n,r)(o=a)},extent:function(a){return arguments.length?(e=+a[0][0],t=+a[0][1],n=+a[1][0],r=+a[1][1],i=o=null,s):[[e,t],[n,r]]}}}var sw,Xg,Jg,ow=Ns(),Ic={sphere:Mn,point:Mn,lineStart:function wY(){Ic.point=DY,Ic.lineEnd=_Y},lineEnd:Mn,polygonStart:Mn,polygonEnd:Mn};function _Y(){Ic.point=Ic.lineEnd=Mn}function DY(e,t){sw=e*=lt,Xg=Qe(t*=lt),Jg=rt(t),Ic.point=EY}function EY(e,t){e*=lt;var n=Qe(t*=lt),r=rt(t),i=Ut(e-sw),o=rt(i),a=r*Qe(i),u=Jg*n-Xg*r*o,c=Xg*n+Jg*r*o;ow.add(kr(zn(a*a+u*u),c)),sw=e,Xg=n,Jg=r}function SA(e){return ow.reset(),zi(e,Ic),+ow}var aw=[null,null],CY={type:"LineString",coordinates:aw};function em(e,t){return aw[0]=e,aw[1]=t,SA(CY)}var TA={Feature:function(e,t){return tm(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,r=-1,i=n.length;++r<i;)if(tm(n[r].geometry,t))return!0;return!1}},NA={Sphere:function(){return!0},Point:function(e,t){return AA(e.coordinates,t)},MultiPoint:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)if(AA(n[r],t))return!0;return!1},LineString:function(e,t){return kA(e.coordinates,t)},MultiLineString:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)if(kA(n[r],t))return!0;return!1},Polygon:function(e,t){return OA(e.coordinates,t)},MultiPolygon:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)if(OA(n[r],t))return!0;return!1},GeometryCollection:function(e,t){for(var n=e.geometries,r=-1,i=n.length;++r<i;)if(tm(n[r],t))return!0;return!1}};function tm(e,t){return!(!e||!NA.hasOwnProperty(e.type))&&NA[e.type](e,t)}function AA(e,t){return 0===em(e,t)}function kA(e,t){for(var n,r,i,o=0,s=e.length;o<s;o++){if(0===(r=em(e[o],t))||o>0&&(i=em(e[o],e[o-1]))>0&&n<=i&&r<=i&&(n+r-i)*(1-Math.pow((n-r)/i,2))<Ng*i)return!0;n=r}return!1}function OA(e,t){return!!xA(e.map(xY),RA(t))}function xY(e){return(e=e.map(RA)).pop(),e}function RA(e){return[e[0]*lt,e[1]*lt]}function MY(e,t){return(e&&TA.hasOwnProperty(e.type)?TA[e.type]:tm)(e,t)}function PA(e,t,n){var r=ni(e,t-at,n).concat(t);return function(i){return r.map(function(o){return[i,o]})}}function FA(e,t,n){var r=ni(e,t-at,n).concat(t);return function(i){return r.map(function(o){return[o,i]})}}function LA(){var e,t,n,r,i,o,s,a,h,g,y,v,u=10,c=u,l=90,d=360,b=2.5;function _(){return{type:"MultiLineString",coordinates:E()}}function E(){return ni(kg(r/l)*l,n,l).map(y).concat(ni(kg(a/d)*d,s,d).map(v)).concat(ni(kg(t/u)*u,e,u).filter(function(C){return Ut(C%l)>at}).map(h)).concat(ni(kg(o/c)*c,i,c).filter(function(C){return Ut(C%d)>at}).map(g))}return _.lines=function(){return E().map(function(C){return{type:"LineString",coordinates:C}})},_.outline=function(){return{type:"Polygon",coordinates:[y(r).concat(v(s).slice(1),y(n).reverse().slice(1),v(a).reverse().slice(1))]}},_.extent=function(C){return arguments.length?_.extentMajor(C).extentMinor(C):_.extentMinor()},_.extentMajor=function(C){return arguments.length?(a=+C[0][1],s=+C[1][1],(r=+C[0][0])>(n=+C[1][0])&&(C=r,r=n,n=C),a>s&&(C=a,a=s,s=C),_.precision(b)):[[r,a],[n,s]]},_.extentMinor=function(C){return arguments.length?(o=+C[0][1],i=+C[1][1],(t=+C[0][0])>(e=+C[1][0])&&(C=t,t=e,e=C),o>i&&(C=o,o=i,i=C),_.precision(b)):[[t,o],[e,i]]},_.step=function(C){return arguments.length?_.stepMajor(C).stepMinor(C):_.stepMinor()},_.stepMajor=function(C){return arguments.length?(l=+C[0],d=+C[1],_):[l,d]},_.stepMinor=function(C){return arguments.length?(u=+C[0],c=+C[1],_):[u,c]},_.precision=function(C){return arguments.length?(b=+C,h=PA(o,i,90),g=FA(t,e,b),y=PA(a,s,90),v=FA(r,n,b),_):b},_.extentMajor([[-180,-90+at],[180,90-at]]).extentMinor([[-180,-80-at],[180,80+at]])}function IY(){return LA()()}function SY(e,t){var n=e[0]*lt,r=e[1]*lt,i=t[0]*lt,o=t[1]*lt,s=rt(r),a=Qe(r),u=rt(o),c=Qe(o),l=s*rt(n),d=s*Qe(n),h=u*rt(i),g=u*Qe(i),y=2*Or(zn(ZN(o-r)+s*u*ZN(i-n))),v=Qe(y),b=y?function(_){var E=Qe(_*=y)/v,C=Qe(y-_)/v,I=C*l+E*h,R=C*d+E*g,G=C*a+E*c;return[kr(R,I)*hn,kr(G,zn(I*I+R*R))*hn]}:function(){return[n*hn,r*hn]};return b.distance=y,b}function qf(e){return e}var BA,jA,lw,fw,uw=Ns(),cw=Ns(),ks={point:Mn,lineStart:Mn,lineEnd:Mn,polygonStart:function(){ks.lineStart=TY,ks.lineEnd=AY},polygonEnd:function(){ks.lineStart=ks.lineEnd=ks.point=Mn,uw.add(Ut(cw)),cw.reset()},result:function(){var e=uw/2;return uw.reset(),e}};function TY(){ks.point=NY}function NY(e,t){ks.point=VA,BA=lw=e,jA=fw=t}function VA(e,t){cw.add(fw*e-lw*t),lw=e,fw=t}function AY(){VA(BA,jA)}const HA=ks;var Sc=1/0,nm=Sc,Wf=-Sc,rm=Wf,kY={point:function OY(e,t){e<Sc&&(Sc=e),e>Wf&&(Wf=e),t<nm&&(nm=t),t>rm&&(rm=t)},lineStart:Mn,lineEnd:Mn,polygonStart:Mn,polygonEnd:Mn,result:function(){var e=[[Sc,nm],[Wf,rm]];return Wf=rm=-(nm=Sc=1/0),e}};const im=kY;var UA,$A,No,Ao,dw=0,hw=0,Yf=0,om=0,sm=0,Tc=0,pw=0,gw=0,Kf=0,qi={point:ka,lineStart:zA,lineEnd:GA,polygonStart:function(){qi.lineStart=FY,qi.lineEnd=LY},polygonEnd:function(){qi.point=ka,qi.lineStart=zA,qi.lineEnd=GA},result:function(){var e=Kf?[pw/Kf,gw/Kf]:Tc?[om/Tc,sm/Tc]:Yf?[dw/Yf,hw/Yf]:[NaN,NaN];return dw=hw=Yf=om=sm=Tc=pw=gw=Kf=0,e}};function ka(e,t){dw+=e,hw+=t,++Yf}function zA(){qi.point=RY}function RY(e,t){qi.point=PY,ka(No=e,Ao=t)}function PY(e,t){var n=e-No,r=t-Ao,i=zn(n*n+r*r);om+=i*(No+e)/2,sm+=i*(Ao+t)/2,Tc+=i,ka(No=e,Ao=t)}function GA(){qi.point=ka}function FY(){qi.point=BY}function LY(){qA(UA,$A)}function BY(e,t){qi.point=qA,ka(UA=No=e,$A=Ao=t)}function qA(e,t){var n=e-No,r=t-Ao,i=zn(n*n+r*r);om+=i*(No+e)/2,sm+=i*(Ao+t)/2,Tc+=i,pw+=(i=Ao*e-No*t)*(No+e),gw+=i*(Ao+t),Kf+=3*i,ka(No=e,Ao=t)}const WA=qi;function YA(e){this._context=e}YA.prototype={_radius:4.5,pointRadius:function(e){return this._radius=e,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(e,t){switch(this._point){case 0:this._context.moveTo(e,t),this._point=1;break;case 1:this._context.lineTo(e,t);break;default:this._context.moveTo(e+this._radius,t),this._context.arc(e,t,this._radius,0,Ar)}},result:Mn};var yw,KA,QA,Qf,Zf,mw=Ns(),am={point:Mn,lineStart:function(){am.point=jY},lineEnd:function(){yw&&ZA(KA,QA),am.point=Mn},polygonStart:function(){yw=!0},polygonEnd:function(){yw=null},result:function(){var e=+mw;return mw.reset(),e}};function jY(e,t){am.point=ZA,KA=Qf=e,QA=Zf=t}function ZA(e,t){mw.add(zn((Qf-=e)*Qf+(Zf-=t)*Zf)),Qf=e,Zf=t}const XA=am;function JA(){this._string=[]}function ek(e){return"m0,"+e+"a"+e+","+e+" 0 1,1 0,"+-2*e+"a"+e+","+e+" 0 1,1 0,"+2*e+"z"}function VY(e,t){var r,i,n=4.5;function o(s){return s&&("function"==typeof n&&i.pointRadius(+n.apply(this,arguments)),zi(s,r(i))),i.result()}return o.area=function(s){return zi(s,r(HA)),HA.result()},o.measure=function(s){return zi(s,r(XA)),XA.result()},o.bounds=function(s){return zi(s,r(im)),im.result()},o.centroid=function(s){return zi(s,r(WA)),WA.result()},o.projection=function(s){return arguments.length?(r=null==s?(e=null,qf):(e=s).stream,o):e},o.context=function(s){return arguments.length?(i=null==s?(t=null,new JA):new YA(t=s),"function"!=typeof n&&i.pointRadius(n),o):t},o.pointRadius=function(s){return arguments.length?(n="function"==typeof s?s:(i.pointRadius(+s),+s),o):n},o.projection(e).context(t)}function HY(e){return{stream:Xf(e)}}function Xf(e){return function(t){var n=new vw;for(var r in e)n[r]=e[r];return n.stream=t,n}}function vw(){}function bw(e,t,n){var r=e.clipExtent&&e.clipExtent();return e.scale(150).translate([0,0]),null!=r&&e.clipExtent(null),zi(n,e.stream(im)),t(im.result()),null!=r&&e.clipExtent(r),e}function um(e,t,n){return bw(e,function(r){var i=t[1][0]-t[0][0],o=t[1][1]-t[0][1],s=Math.min(i/(r[1][0]-r[0][0]),o/(r[1][1]-r[0][1])),a=+t[0][0]+(i-s*(r[1][0]+r[0][0]))/2,u=+t[0][1]+(o-s*(r[1][1]+r[0][1]))/2;e.scale(150*s).translate([a,u])},n)}function ww(e,t,n){return um(e,[[0,0],t],n)}function _w(e,t,n){return bw(e,function(r){var i=+t,o=i/(r[1][0]-r[0][0]),s=(i-o*(r[1][0]+r[0][0]))/2,a=-o*r[0][1];e.scale(150*o).translate([s,a])},n)}function Dw(e,t,n){return bw(e,function(r){var i=+t,o=i/(r[1][1]-r[0][1]),s=-o*r[0][0],a=(i-o*(r[1][1]+r[0][1]))/2;e.scale(150*o).translate([s,a])},n)}JA.prototype={_radius:4.5,_circle:ek(4.5),pointRadius:function(e){return(e=+e)!==this._radius&&(this._radius=e,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(e,t){switch(this._point){case 0:this._string.push("M",e,",",t),this._point=1;break;case 1:this._string.push("L",e,",",t);break;default:null==this._circle&&(this._circle=ek(this._radius)),this._string.push("M",e,",",t,this._circle)}},result:function(){if(this._string.length){var e=this._string.join("");return this._string=[],e}return null}},vw.prototype={constructor:vw,point:function(e,t){this.stream.point(e,t)},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 tk=16,UY=rt(30*lt);function nk(e,t){return+t?function zY(e,t){function n(r,i,o,s,a,u,c,l,d,h,g,y,v,b){var _=c-r,E=l-i,C=_*_+E*E;if(C>4*t&&v--){var I=s+h,R=a+g,G=u+y,z=zn(I*I+R*R+G*G),de=Or(G/=z),oe=Ut(Ut(G)-1)<at||Ut(o-d)<at?(o+d)/2:kr(R,I),fe=e(oe,de),re=fe[0],T=fe[1],te=re-r,Ce=T-i,X=E*te-_*Ce;(X*X/C>t||Ut((_*te+E*Ce)/C-.5)>.3||s*h+a*g+u*y<UY)&&(n(r,i,o,s,a,u,re,T,oe,I/=z,R/=z,G,v,b),b.point(re,T),n(re,T,oe,I,R,G,c,l,d,h,g,y,v,b))}}return function(r){var i,o,s,a,u,c,l,d,h,g,y,v,b={point:_,lineStart:E,lineEnd:I,polygonStart:function(){r.polygonStart(),b.lineStart=R},polygonEnd:function(){r.polygonEnd(),b.lineStart=E}};function _(de,oe){de=e(de,oe),r.point(de[0],de[1])}function E(){d=NaN,b.point=C,r.lineStart()}function C(de,oe){var fe=Na([de,oe]),re=e(de,oe);n(d,h,l,g,y,v,d=re[0],h=re[1],l=de,g=fe[0],y=fe[1],v=fe[2],tk,r),r.point(d,h)}function I(){b.point=_,r.lineEnd()}function R(){E(),b.point=G,b.lineEnd=z}function G(de,oe){C(i=de,oe),o=d,s=h,a=g,u=y,c=v,b.point=C}function z(){n(d,h,l,g,y,v,o,s,i,a,u,c,tk,r),b.lineEnd=I,I()}return b}}(e,t):function $Y(e){return Xf({point:function(t,n){t=e(t,n),this.stream.point(t[0],t[1])}})}(e)}var GY=Xf({point:function(e,t){this.stream.point(e*lt,t*lt)}});function WY(e,t,n,r,i){function o(s,a){return[t+e*(s*=r),n-e*(a*=i)]}return o.invert=function(s,a){return[(s-t)/e*r,(n-a)/e*i]},o}function rk(e,t,n,r,i,o){var s=rt(o),a=Qe(o),u=s*e,c=a*e,l=s/e,d=a/e,h=(a*n-s*t)/e,g=(a*t+s*n)/e;function y(v,b){return[u*(v*=r)-c*(b*=i)+t,n-c*v-u*b]}return y.invert=function(v,b){return[r*(l*v-d*b+h),i*(g-d*v-l*b)]},y}function ko(e){return Ew(function(){return e})()}function Ew(e){var t,l,_,E,C,G,z,de,oe,fe,n=150,r=480,i=250,o=0,s=0,a=0,u=0,c=0,d=0,h=1,g=1,y=null,v=iw,b=null,I=qf,R=.5;function re(X){return de(X[0]*lt,X[1]*lt)}function T(X){return(X=de.invert(X[0],X[1]))&&[X[0]*hn,X[1]*hn]}function te(){var X=rk(n,0,0,h,g,d).apply(null,t(o,s)),we=(d?rk:WY)(n,r-X[0],i-X[1],h,g,d);return l=tw(a,u,c),z=Jb(t,we),de=Jb(l,z),G=nk(z,R),Ce()}function Ce(){return oe=fe=null,re}return re.stream=function(X){return oe&&fe===X?oe:oe=GY(function qY(e){return Xf({point:function(t,n){var r=e(t,n);return this.stream.point(r[0],r[1])}})}(l)(v(G(I(fe=X)))))},re.preclip=function(X){return arguments.length?(v=X,y=void 0,Ce()):v},re.postclip=function(X){return arguments.length?(I=X,b=_=E=C=null,Ce()):I},re.clipAngle=function(X){return arguments.length?(v=+X?IA(y=X*lt):(y=null,iw),Ce()):y*hn},re.clipExtent=function(X){return arguments.length?(I=null==X?(b=_=E=C=null,qf):Zg(b=+X[0][0],_=+X[0][1],E=+X[1][0],C=+X[1][1]),Ce()):null==b?null:[[b,_],[E,C]]},re.scale=function(X){return arguments.length?(n=+X,te()):n},re.translate=function(X){return arguments.length?(r=+X[0],i=+X[1],te()):[r,i]},re.center=function(X){return arguments.length?(o=X[0]%360*lt,s=X[1]%360*lt,te()):[o*hn,s*hn]},re.rotate=function(X){return arguments.length?(a=X[0]%360*lt,u=X[1]%360*lt,c=X.length>2?X[2]%360*lt:0,te()):[a*hn,u*hn,c*hn]},re.angle=function(X){return arguments.length?(d=X%360*lt,te()):d*hn},re.reflectX=function(X){return arguments.length?(h=X?-1:1,te()):h<0},re.reflectY=function(X){return arguments.length?(g=X?-1:1,te()):g<0},re.precision=function(X){return arguments.length?(G=nk(z,R=X*X),Ce()):zn(R)},re.fitExtent=function(X,we){return um(re,X,we)},re.fitSize=function(X,we){return ww(re,X,we)},re.fitWidth=function(X,we){return _w(re,X,we)},re.fitHeight=function(X,we){return Dw(re,X,we)},function(){return t=e.apply(this,arguments),re.invert=t.invert&&T,te()}}function Cw(e){var t=0,n=Pt/3,r=Ew(e),i=r(t,n);return i.parallels=function(o){return arguments.length?r(t=o[0]*lt,n=o[1]*lt):[t*hn,n*hn]},i}function ik(e,t){var n=Qe(e),r=(n+Qe(t))/2;if(Ut(r)<at)return function YY(e){var t=rt(e);function n(r,i){return[r*t,Qe(i)/t]}return n.invert=function(r,i){return[r/t,Or(i*t)]},n}(e);var i=1+n*(2*r-n),o=zn(i)/r;function s(a,u){var c=zn(i-2*r*Qe(u))/r;return[c*Qe(a*=r),o-c*rt(a)]}return s.invert=function(a,u){var c=o-u,l=kr(a,Ut(c))*vi(c);return c*r<0&&(l-=Pt*vi(a)*vi(c)),[l/r,Or((i-(a*a+c*c)*r*r)/(2*r))]},s}function cm(){return Cw(ik).scale(155.424).center([0,33.6442])}function ok(){return cm().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function QY(){var e,t,r,o,a,u,n=ok(),i=cm().rotate([154,0]).center([-2,58.5]).parallels([55,65]),s=cm().rotate([157,0]).center([-3,19.9]).parallels([8,18]),c={point:function(h,g){u=[h,g]}};function l(h){var g=h[0],y=h[1];return u=null,r.point(g,y),u||(o.point(g,y),u)||(a.point(g,y),u)}function d(){return e=t=null,l}return l.invert=function(h){var g=n.scale(),y=n.translate(),v=(h[0]-y[0])/g,b=(h[1]-y[1])/g;return(b>=.12&&b<.234&&v>=-.425&&v<-.214?i:b>=.166&&b<.234&&v>=-.214&&v<-.115?s:n).invert(h)},l.stream=function(h){return e&&t===h?e:e=function KY(e){var t=e.length;return{point:function(n,r){for(var i=-1;++i<t;)e[i].point(n,r)},sphere:function(){for(var n=-1;++n<t;)e[n].sphere()},lineStart:function(){for(var n=-1;++n<t;)e[n].lineStart()},lineEnd:function(){for(var n=-1;++n<t;)e[n].lineEnd()},polygonStart:function(){for(var n=-1;++n<t;)e[n].polygonStart()},polygonEnd:function(){for(var n=-1;++n<t;)e[n].polygonEnd()}}}([n.stream(t=h),i.stream(h),s.stream(h)])},l.precision=function(h){return arguments.length?(n.precision(h),i.precision(h),s.precision(h),d()):n.precision()},l.scale=function(h){return arguments.length?(n.scale(h),i.scale(.35*h),s.scale(h),l.translate(n.translate())):n.scale()},l.translate=function(h){if(!arguments.length)return n.translate();var g=n.scale(),y=+h[0],v=+h[1];return r=n.translate(h).clipExtent([[y-.455*g,v-.238*g],[y+.455*g,v+.238*g]]).stream(c),o=i.translate([y-.307*g,v+.201*g]).clipExtent([[y-.425*g+at,v+.12*g+at],[y-.214*g-at,v+.234*g-at]]).stream(c),a=s.translate([y-.205*g,v+.212*g]).clipExtent([[y-.214*g+at,v+.166*g+at],[y-.115*g-at,v+.234*g-at]]).stream(c),d()},l.fitExtent=function(h,g){return um(l,h,g)},l.fitSize=function(h,g){return ww(l,h,g)},l.fitWidth=function(h,g){return _w(l,h,g)},l.fitHeight=function(h,g){return Dw(l,h,g)},l.scale(1070)}function sk(e){return function(t,n){var r=rt(t),i=rt(n),o=e(r*i);return[o*i*Qe(t),o*Qe(n)]}}function Jf(e){return function(t,n){var r=zn(t*t+n*n),i=e(r),o=Qe(i),s=rt(i);return[kr(t*o,r*s),Or(r&&n*o/r)]}}var xw=sk(function(e){return zn(2/(1+e))});function ZY(){return ko(xw).scale(124.75).clipAngle(179.999)}xw.invert=Jf(function(e){return 2*Or(e/2)});var Mw=sk(function(e){return(e=QN(e))&&e/Qe(e)});function XY(){return ko(Mw).scale(79.4188).clipAngle(179.999)}function ed(e,t){return[e,Og(Ub((On+t)/2))]}function JY(){return ak(ed).scale(961/Ar)}function ak(e){var a,u,c,t=ko(e),n=t.center,r=t.scale,i=t.translate,o=t.clipExtent,s=null;function l(){var d=Pt*r(),h=t(bA(t.rotate()).invert([0,0]));return o(null==s?[[h[0]-d,h[1]-d],[h[0]+d,h[1]+d]]:e===ed?[[Math.max(h[0]-d,s),a],[Math.min(h[0]+d,u),c]]:[[s,Math.max(h[1]-d,a)],[u,Math.min(h[1]+d,c)]])}return t.scale=function(d){return arguments.length?(r(d),l()):r()},t.translate=function(d){return arguments.length?(i(d),l()):i()},t.center=function(d){return arguments.length?(n(d),l()):n()},t.clipExtent=function(d){return arguments.length?(null==d?s=a=u=c=null:(s=+d[0][0],a=+d[0][1],u=+d[1][0],c=+d[1][1]),l()):null==s?null:[[s,a],[u,c]]},l()}function lm(e){return Ub((On+e)/2)}function uk(e,t){var n=rt(e),r=e===t?Qe(e):Og(n/rt(t))/Og(lm(t)/lm(e)),i=n*Hb(lm(e),r)/r;if(!r)return ed;function o(s,a){i>0?a<-On+at&&(a=-On+at):a>On-at&&(a=On-at);var u=i/Hb(lm(a),r);return[u*Qe(r*s),i-u*rt(r*s)]}return o.invert=function(s,a){var u=i-a,c=vi(r)*zn(s*s+u*u),l=kr(s,Ut(u))*vi(u);return u*r<0&&(l-=Pt*vi(s)*vi(u)),[l/r,2*Ec(Hb(i/c,1/r))-On]},o}function eK(){return Cw(uk).scale(109.5).parallels([30,30])}function td(e,t){return[e,t]}function tK(){return ko(td).scale(152.63)}function ck(e,t){var n=rt(e),r=e===t?Qe(e):(n-rt(t))/(t-e),i=n/r+e;if(Ut(r)<at)return td;function o(s,a){var u=i-a,c=r*s;return[u*Qe(c),i-u*rt(c)]}return o.invert=function(s,a){var u=i-a,c=kr(s,Ut(u))*vi(u);return u*r<0&&(c-=Pt*vi(s)*vi(u)),[c/r,i-vi(r)*zn(s*s+u*u)]},o}function nK(){return Cw(ck).scale(131.154).center([0,13.9389])}Mw.invert=Jf(function(e){return e}),ed.invert=function(e,t){return[e,2*Ec(KN(t))-On]},td.invert=td;var nd=1.340264,rd=-.081106,id=893e-6,od=.003796,fm=zn(3)/2;function Iw(e,t){var n=Or(fm*Qe(t)),r=n*n,i=r*r*r;return[e*rt(n)/(fm*(nd+3*rd*r+i*(7*id+9*od*r))),n*(nd+rd*r+i*(id+od*r))]}function iK(){return ko(Iw).scale(177.158)}function Sw(e,t){var n=rt(t),r=rt(e)*n;return[n*Qe(e)/r,Qe(t)/r]}function oK(){return ko(Sw).scale(144.049).clipAngle(60)}function sK(){var s,a,c,l,d,b,_,e=1,t=0,n=0,r=1,i=1,o=0,u=null,h=1,g=1,y=Xf({point:function(I,R){var G=C([I,R]);this.stream.point(G[0],G[1])}}),v=qf;function E(){return h=e*r,g=e*i,b=_=null,C}function C(I){var R=I[0]*h,G=I[1]*g;if(o){var z=G*s-R*a;R=R*s+G*a,G=z}return[R+t,G+n]}return C.invert=function(I){var R=I[0]-t,G=I[1]-n;if(o){var z=G*s+R*a;R=R*s-G*a,G=z}return[R/h,G/g]},C.stream=function(I){return b&&_===I?b:b=y(v(_=I))},C.postclip=function(I){return arguments.length?(v=I,u=c=l=d=null,E()):v},C.clipExtent=function(I){return arguments.length?(v=null==I?(u=c=l=d=null,qf):Zg(u=+I[0][0],c=+I[0][1],l=+I[1][0],d=+I[1][1]),E()):null==u?null:[[u,c],[l,d]]},C.scale=function(I){return arguments.length?(e=+I,E()):e},C.translate=function(I){return arguments.length?(t=+I[0],n=+I[1],E()):[t,n]},C.angle=function(I){return arguments.length?(a=Qe(o=I%360*lt),s=rt(o),E()):o*hn},C.reflectX=function(I){return arguments.length?(r=I?-1:1,E()):r<0},C.reflectY=function(I){return arguments.length?(i=I?-1:1,E()):i<0},C.fitExtent=function(I,R){return um(C,I,R)},C.fitSize=function(I,R){return ww(C,I,R)},C.fitWidth=function(I,R){return _w(C,I,R)},C.fitHeight=function(I,R){return Dw(C,I,R)},C}function Tw(e,t){var n=t*t,r=n*n;return[e*(.8707-.131979*n+r*(r*(.003971*n-.001529*r)-.013791)),t*(1.007226+n*(.015085+r*(.028874*n-.044475-.005916*r)))]}function aK(){return ko(Tw).scale(175.295)}function Nw(e,t){return[rt(t)*Qe(e),Qe(t)]}function uK(){return ko(Nw).scale(249.5).clipAngle(90+at)}function Aw(e,t){var n=rt(t),r=1+rt(e)*n;return[n*Qe(e)/r,Qe(t)/r]}function cK(){return ko(Aw).scale(250).clipAngle(142)}function kw(e,t){return[Og(Ub((On+t)/2)),-e]}function lK(){var e=ak(kw),t=e.center,n=e.rotate;return e.center=function(r){return arguments.length?t([-r[1],r[0]]):[(r=t())[1],-r[0]]},e.rotate=function(r){return arguments.length?n([r[0],r[1],r.length>2?r[2]+90:90]):[(r=n())[0],r[1],r[2]-90]},n([0,0,90]).scale(159.155)}function fK(e,t){return e.parent===t.parent?1:2}function hK(e,t){return e+t.x}function gK(e,t){return Math.max(e,t.y)}function vK(){var e=fK,t=1,n=1,r=!1;function i(o){var s,a=0;o.eachAfter(function(h){var g=h.children;g?(h.x=function dK(e){return e.reduce(hK,0)/e.length}(g),h.y=function pK(e){return 1+e.reduce(gK,0)}(g)):(h.x=s?a+=e(h,s):0,h.y=0,s=h)});var u=function mK(e){for(var t;t=e.children;)e=t[0];return e}(o),c=function yK(e){for(var t;t=e.children;)e=t[t.length-1];return e}(o),l=u.x-e(u,c)/2,d=c.x+e(c,u)/2;return o.eachAfter(r?function(h){h.x=(h.x-o.x)*t,h.y=(o.y-h.y)*n}:function(h){h.x=(h.x-l)/(d-l)*t,h.y=(1-(o.y?h.y/o.y:1))*n})}return i.separation=function(o){return arguments.length?(e=o,i):e},i.size=function(o){return arguments.length?(r=!1,t=+o[0],n=+o[1],i):r?null:[t,n]},i.nodeSize=function(o){return arguments.length?(r=!0,t=+o[0],n=+o[1],i):r?[t,n]:null},i}function bK(e){var t=0,n=e.children,r=n&&n.length;if(r)for(;--r>=0;)t+=n[r].value;else t=1;e.value=t}function Ow(e,t){var i,s,a,u,c,n=new Nc(e),r=+e.value&&(n.value=e.value),o=[n];for(null==t&&(t=OK);i=o.pop();)if(r&&(i.value=+i.data.value),(a=t(i.data))&&(c=a.length))for(i.children=new Array(c),u=c-1;u>=0;--u)o.push(s=i.children[u]=new Nc(a[u])),s.parent=i,s.depth=i.depth+1;return n.eachBefore(lk)}function OK(e){return e.children}function RK(e){e.data=e.data.data}function lk(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function Nc(e){this.data=e,this.depth=this.height=0,this.parent=null}Iw.invert=function(e,t){for(var s,n=t,r=n*n,i=r*r*r,o=0;o<12&&(i=(r=(n-=s=(n*(nd+rd*r+i*(id+od*r))-t)/(nd+3*rd*r+i*(7*id+9*od*r)))*n)*r*r,!(Ut(s)<Ng));++o);return[fm*e*(nd+3*rd*r+i*(7*id+9*od*r))/rt(n),Or(Qe(n)/fm)]},Sw.invert=Jf(Ec),Tw.invert=function(e,t){var i,n=t,r=25;do{var o=n*n,s=o*o;n-=i=(n*(1.007226+o*(.015085+s*(.028874*o-.044475-.005916*s)))-t)/(1.007226+o*(.045255+s*(.259866*o-.311325-.005916*11*s)))}while(Ut(i)>at&&--r>0);return[e/(.8707+(o=n*n)*(o*(o*o*o*(.003971-.001529*o)-.013791)-.131979)),n]},Nw.invert=Jf(Or),Aw.invert=Jf(function(e){return 2*Ec(e)}),kw.invert=function(e,t){return[-t,2*Ec(KN(e))-On]},Nc.prototype=Ow.prototype={constructor:Nc,count:function wK(){return this.eachAfter(bK)},each:function _K(e){var n,i,o,s,t=this,r=[t];do{for(n=r.reverse(),r=[];t=n.pop();)if(e(t),i=t.children)for(o=0,s=i.length;o<s;++o)r.push(i[o])}while(r.length);return this},eachAfter:function EK(e){for(var i,o,s,t=this,n=[t],r=[];t=n.pop();)if(r.push(t),i=t.children)for(o=0,s=i.length;o<s;++o)n.push(i[o]);for(;t=r.pop();)e(t);return this},eachBefore:function DK(e){for(var r,i,t=this,n=[t];t=n.pop();)if(e(t),r=t.children)for(i=r.length-1;i>=0;--i)n.push(r[i]);return this},sum:function CK(e){return this.eachAfter(function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n})},sort:function xK(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})},path:function MK(e){for(var t=this,n=function IK(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;for(e=n.pop(),t=r.pop();e===t;)i=e,e=n.pop(),t=r.pop();return i}(t,e),r=[t];t!==n;)r.push(t=t.parent);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r},ancestors:function SK(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function TK(){var e=[];return this.each(function(t){e.push(t)}),e},leaves:function NK(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e},links:function AK(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t},copy:function kK(){return Ow(this).eachBefore(RK)}};var PK=Array.prototype.slice;function fk(e){for(var i,o,t=0,n=(e=function FK(e){for(var n,r,t=e.length;t;)r=Math.random()*t--|0,n=e[t],e[t]=e[r],e[r]=n;return e}(PK.call(e))).length,r=[];t<n;)i=e[t],o&&dk(o,i)?++t:(o=BK(r=LK(r,i)),t=0);return o}function LK(e,t){var n,r;if(Rw(t,e))return[t];for(n=0;n<e.length;++n)if(dm(t,e[n])&&Rw(sd(e[n],t),e))return[e[n],t];for(n=0;n<e.length-1;++n)for(r=n+1;r<e.length;++r)if(dm(sd(e[n],e[r]),t)&&dm(sd(e[n],t),e[r])&&dm(sd(e[r],t),e[n])&&Rw(hk(e[n],e[r],t),e))return[e[n],e[r],t];throw new Error}function dm(e,t){var n=e.r-t.r,r=t.x-e.x,i=t.y-e.y;return n<0||n*n<r*r+i*i}function dk(e,t){var n=e.r-t.r+1e-6,r=t.x-e.x,i=t.y-e.y;return n>0&&n*n>r*r+i*i}function Rw(e,t){for(var n=0;n<t.length;++n)if(!dk(e,t[n]))return!1;return!0}function BK(e){switch(e.length){case 1:return function jK(e){return{x:e.x,y:e.y,r:e.r}}(e[0]);case 2:return sd(e[0],e[1]);case 3:return hk(e[0],e[1],e[2])}}function sd(e,t){var n=e.x,r=e.y,i=e.r,o=t.x,s=t.y,a=t.r,u=o-n,c=s-r,l=a-i,d=Math.sqrt(u*u+c*c);return{x:(n+o+u/d*l)/2,y:(r+s+c/d*l)/2,r:(d+i+a)/2}}function hk(e,t,n){var r=e.x,i=e.y,o=e.r,s=t.x,a=t.y,u=t.r,c=n.x,l=n.y,d=n.r,h=r-s,g=r-c,y=i-a,v=i-l,b=u-o,_=d-o,E=r*r+i*i-o*o,C=E-s*s-a*a+u*u,I=E-c*c-l*l+d*d,R=g*y-h*v,G=(y*I-v*C)/(2*R)-r,z=(v*b-y*_)/R,de=(g*C-h*I)/(2*R)-i,oe=(h*_-g*b)/R,fe=z*z+oe*oe-1,re=2*(o+G*z+de*oe),T=G*G+de*de-o*o,te=-(fe?(re+Math.sqrt(re*re-4*fe*T))/(2*fe):T/re);return{x:r+G+z*te,y:i+de+oe*te,r:te}}function pk(e,t,n){var i,o,a,u,r=e.x-t.x,s=e.y-t.y,c=r*r+s*s;c?(o=t.r+n.r,u=e.r+n.r,(o*=o)>(u*=u)?(i=(c+u-o)/(2*c),a=Math.sqrt(Math.max(0,u/c-i*i)),n.x=e.x-i*r-a*s,n.y=e.y-i*s+a*r):(i=(c+o-u)/(2*c),a=Math.sqrt(Math.max(0,o/c-i*i)),n.x=t.x+i*r-a*s,n.y=t.y+i*s+a*r)):(n.x=t.x+n.r,n.y=t.y)}function gk(e,t){var n=e.r+t.r-1e-6,r=t.x-e.x,i=t.y-e.y;return n>0&&n*n>r*r+i*i}function mk(e){var t=e._,n=e.next._,r=t.r+n.r,i=(t.x*n.r+n.x*t.r)/r,o=(t.y*n.r+n.y*t.r)/r;return i*i+o*o}function hm(e){this._=e,this.next=null,this.previous=null}function yk(e){if(!(i=e.length))return 0;var t,n,r,i,o,s,a,u,c,l,d;if((t=e[0]).x=0,t.y=0,!(i>1))return t.r;if(t.x=-(n=e[1]).r,n.x=t.r,n.y=0,!(i>2))return t.r+n.r;pk(n,t,r=e[2]),t=new hm(t),n=new hm(n),r=new hm(r),t.next=r.previous=n,n.next=t.previous=r,r.next=n.previous=t;e:for(a=3;a<i;++a){pk(t._,n._,r=e[a]),r=new hm(r),u=n.next,c=t.previous,l=n._.r,d=t._.r;do{if(l<=d){if(gk(u._,r._)){t.next=n=u,n.previous=t,--a;continue e}l+=u._.r,u=u.next}else{if(gk(c._,r._)){(t=c).next=n,n.previous=t,--a;continue e}d+=c._.r,c=c.previous}}while(u!==c.next);for(r.previous=t,r.next=n,t.next=n.previous=n=r,o=mk(t);(r=r.next)!==n;)(s=mk(r))<o&&(t=r,o=s);n=t.next}for(t=[n._],r=n;(r=r.next)!==n;)t.push(r._);for(r=fk(t),a=0;a<i;++a)(t=e[a]).x-=r.x,t.y-=r.y;return r.r}function VK(e){return yk(e),e}function pm(e){if("function"!=typeof e)throw new Error;return e}function Oa(){return 0}function Ac(e){return function(){return e}}function UK(e){return Math.sqrt(e.value)}function $K(){var e=null,t=1,n=1,r=Oa;function i(o){return o.x=t/2,o.y=n/2,e?o.eachBefore(vk(e)).eachAfter(Pw(r,.5)).eachBefore(bk(1)):o.eachBefore(vk(UK)).eachAfter(Pw(Oa,1)).eachAfter(Pw(r,o.r/Math.min(t,n))).eachBefore(bk(Math.min(t,n)/(2*o.r))),o}return i.radius=function(o){return arguments.length?(e=function HK(e){return null==e?null:pm(e)}(o),i):e},i.size=function(o){return arguments.length?(t=+o[0],n=+o[1],i):[t,n]},i.padding=function(o){return arguments.length?(r="function"==typeof o?o:Ac(+o),i):r},i}function vk(e){return function(t){t.children||(t.r=Math.max(0,+e(t)||0))}}function Pw(e,t){return function(n){if(r=n.children){var r,i,a,o=r.length,s=e(n)*t||0;if(s)for(i=0;i<o;++i)r[i].r+=s;if(a=yk(r),s)for(i=0;i<o;++i)r[i].r-=s;n.r=a+s}}}function bk(e){return function(t){var n=t.parent;t.r*=e,n&&(t.x=n.x+e*t.x,t.y=n.y+e*t.y)}}function wk(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function ad(e,t,n,r,i){for(var s,o=e.children,a=-1,u=o.length,c=e.value&&(r-t)/e.value;++a<u;)(s=o[a]).y0=n,s.y1=i,s.x0=t,s.x1=t+=s.value*c}function zK(){var e=1,t=1,n=0,r=!1;function i(s){var a=s.height+1;return s.x0=s.y0=n,s.x1=e,s.y1=t/a,s.eachBefore(function o(s,a){return function(u){u.children&&ad(u,u.x0,s*(u.depth+1)/a,u.x1,s*(u.depth+2)/a);var c=u.x0,l=u.y0,d=u.x1-n,h=u.y1-n;d<c&&(c=d=(c+d)/2),h<l&&(l=h=(l+h)/2),u.x0=c,u.y0=l,u.x1=d,u.y1=h}}(t,a)),r&&s.eachBefore(wk),s}return i.round=function(s){return arguments.length?(r=!!s,i):r},i.size=function(s){return arguments.length?(e=+s[0],t=+s[1],i):[e,t]},i.padding=function(s){return arguments.length?(n=+s,i):n},i}var _k="$",GK={depth:-1},Dk={};function qK(e){return e.id}function WK(e){return e.parentId}function YK(){var e=qK,t=WK;function n(r){var i,o,a,u,c,d,h,s=r.length,l=new Array(s),g={};for(o=0;o<s;++o)c=l[o]=new Nc(i=r[o]),null!=(d=e(i,o,r))&&(d+="")&&(g[h=_k+(c.id=d)]=h in g?Dk:c);for(o=0;o<s;++o)if(c=l[o],null!=(d=t(r[o],o,r))&&(d+="")){if(!(u=g[_k+d]))throw new Error("missing: "+d);if(u===Dk)throw new Error("ambiguous: "+d);u.children?u.children.push(c):u.children=[c],c.parent=u}else{if(a)throw new Error("multiple roots");a=c}if(!a)throw new Error("no root");if(a.parent=GK,a.eachBefore(function(y){y.depth=y.parent.depth+1,--s}).eachBefore(lk),a.parent=null,s>0)throw new Error("cycle");return a}return n.id=function(r){return arguments.length?(e=pm(r),n):e},n.parentId=function(r){return arguments.length?(t=pm(r),n):t},n}function KK(e,t){return e.parent===t.parent?1:2}function Fw(e){var t=e.children;return t?t[0]:e.t}function Lw(e){var t=e.children;return t?t[t.length-1]:e.t}function QK(e,t,n){var r=n/(t.i-e.i);t.c-=r,t.s+=n,e.c+=r,t.z+=n,t.m+=n}function XK(e,t,n){return e.a.parent===t.parent?e.a:n}function gm(e,t){this._=e,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=t}function eQ(){var e=KK,t=1,n=1,r=null;function i(c){var l=function JK(e){for(var n,i,o,s,a,t=new gm(e,0),r=[t];n=r.pop();)if(o=n._.children)for(n.children=new Array(a=o.length),s=a-1;s>=0;--s)r.push(i=n.children[s]=new gm(o[s],s)),i.parent=n;return(t.parent=new gm(null,0)).children=[t],t}(c);if(l.eachAfter(o),l.parent.m=-l.z,l.eachBefore(s),r)c.eachBefore(u);else{var d=c,h=c,g=c;c.eachBefore(function(E){E.x<d.x&&(d=E),E.x>h.x&&(h=E),E.depth>g.depth&&(g=E)});var y=d===h?1:e(d,h)/2,v=y-d.x,b=t/(h.x+y+v),_=n/(g.depth||1);c.eachBefore(function(E){E.x=(E.x+v)*b,E.y=E.depth*_})}return c}function o(c){var l=c.children,d=c.parent.children,h=c.i?d[c.i-1]:null;if(l){!function ZK(e){for(var o,t=0,n=0,r=e.children,i=r.length;--i>=0;)(o=r[i]).z+=t,o.m+=t,t+=o.s+(n+=o.c)}(c);var g=(l[0].z+l[l.length-1].z)/2;h?(c.z=h.z+e(c._,h._),c.m=c.z-g):c.z=g}else h&&(c.z=h.z+e(c._,h._));c.parent.A=function a(c,l,d){if(l){for(var I,h=c,g=c,y=l,v=h.parent.children[0],b=h.m,_=g.m,E=y.m,C=v.m;y=Lw(y),h=Fw(h),y&&h;)v=Fw(v),(g=Lw(g)).a=c,(I=y.z+E-h.z-b+e(y._,h._))>0&&(QK(XK(y,c,d),c,I),b+=I,_+=I),E+=y.m,b+=h.m,C+=v.m,_+=g.m;y&&!Lw(g)&&(g.t=y,g.m+=E-_),h&&!Fw(v)&&(v.t=h,v.m+=b-C,d=c)}return d}(c,h,c.parent.A||d[0])}function s(c){c._.x=c.z+c.parent.m,c.m+=c.parent.m}function u(c){c.x*=t,c.y=c.depth*n}return i.separation=function(c){return arguments.length?(e=c,i):e},i.size=function(c){return arguments.length?(r=!1,t=+c[0],n=+c[1],i):r?null:[t,n]},i.nodeSize=function(c){return arguments.length?(r=!0,t=+c[0],n=+c[1],i):r?[t,n]:null},i}function mm(e,t,n,r,i){for(var s,o=e.children,a=-1,u=o.length,c=e.value&&(i-n)/e.value;++a<u;)(s=o[a]).x0=t,s.x1=r,s.y0=n,s.y1=n+=s.value*c}gm.prototype=Object.create(Nc.prototype);var Ek=(1+Math.sqrt(5))/2;function Ck(e,t,n,r,i,o){for(var u,c,g,y,b,_,E,C,I,R,G,s=[],a=t.children,l=0,d=0,h=a.length,v=t.value;l<h;){g=i-n,y=o-r;do{b=a[d++].value}while(!b&&d<h);for(_=E=b,G=b*b*(R=Math.max(y/g,g/y)/(v*e)),I=Math.max(E/G,G/_);d<h;++d){if(b+=c=a[d].value,c<_&&(_=c),c>E&&(E=c),G=b*b*R,(C=Math.max(E/G,G/_))>I){b-=c;break}I=C}s.push(u={value:b,dice:g<y,children:a.slice(l,d)}),u.dice?ad(u,n,r,i,v?r+=y*b/v:o):mm(u,n,r,v?n+=g*b/v:i,o),v-=b,l=d}return s}const xk=function e(t){function n(r,i,o,s,a){Ck(t,r,i,o,s,a)}return n.ratio=function(r){return e((r=+r)>1?r:1)},n}(Ek);function tQ(){var e=xk,t=!1,n=1,r=1,i=[0],o=Oa,s=Oa,a=Oa,u=Oa,c=Oa;function l(h){return h.x0=h.y0=0,h.x1=n,h.y1=r,h.eachBefore(d),i=[0],t&&h.eachBefore(wk),h}function d(h){var g=i[h.depth],y=h.x0+g,v=h.y0+g,b=h.x1-g,_=h.y1-g;b<y&&(y=b=(y+b)/2),_<v&&(v=_=(v+_)/2),h.x0=y,h.y0=v,h.x1=b,h.y1=_,h.children&&(g=i[h.depth+1]=o(h)/2,y+=c(h)-g,v+=s(h)-g,(b-=a(h)-g)<y&&(y=b=(y+b)/2),(_-=u(h)-g)<v&&(v=_=(v+_)/2),e(h,y,v,b,_))}return l.round=function(h){return arguments.length?(t=!!h,l):t},l.size=function(h){return arguments.length?(n=+h[0],r=+h[1],l):[n,r]},l.tile=function(h){return arguments.length?(e=pm(h),l):e},l.padding=function(h){return arguments.length?l.paddingInner(h).paddingOuter(h):l.paddingInner()},l.paddingInner=function(h){return arguments.length?(o="function"==typeof h?h:Ac(+h),l):o},l.paddingOuter=function(h){return arguments.length?l.paddingTop(h).paddingRight(h).paddingBottom(h).paddingLeft(h):l.paddingTop()},l.paddingTop=function(h){return arguments.length?(s="function"==typeof h?h:Ac(+h),l):s},l.paddingRight=function(h){return arguments.length?(a="function"==typeof h?h:Ac(+h),l):a},l.paddingBottom=function(h){return arguments.length?(u="function"==typeof h?h:Ac(+h),l):u},l.paddingLeft=function(h){return arguments.length?(c="function"==typeof h?h:Ac(+h),l):c},l}function nQ(e,t,n,r,i){var s,u,o=e.children,a=o.length,c=new Array(a+1);for(c[0]=u=s=0;s<a;++s)c[s+1]=u+=o[s].value;!function l(d,h,g,y,v,b,_){if(d>=h-1){var E=o[d];return E.x0=y,E.y0=v,E.x1=b,void(E.y1=_)}for(var C=c[d],I=g/2+C,R=d+1,G=h-1;R<G;){var z=R+G>>>1;c[z]<I?R=z+1:G=z}I-c[R-1]<c[R]-I&&d+1<R&&--R;var de=c[R]-C,oe=g-de;if(b-y>_-v){var fe=(y*oe+b*de)/g;l(d,R,de,y,v,fe,_),l(R,h,oe,fe,v,b,_)}else{var re=(v*oe+_*de)/g;l(d,R,de,y,v,b,re),l(R,h,oe,y,re,b,_)}}(0,a,e.value,t,n,r,i)}function rQ(e,t,n,r,i){(1&e.depth?mm:ad)(e,t,n,r,i)}const iQ=function e(t){function n(r,i,o,s,a){if((u=r._squarify)&&u.ratio===t)for(var u,c,l,d,g,h=-1,y=u.length,v=r.value;++h<y;){for(l=(c=u[h]).children,d=c.value=0,g=l.length;d<g;++d)c.value+=l[d].value;c.dice?ad(c,i,o,s,o+=(a-o)*c.value/v):mm(c,i,o,i+=(s-i)*c.value/v,a),v-=c.value}else r._squarify=u=Ck(t,r,i,o,s,a),u.ratio=t}return n.ratio=function(r){return e((r=+r)>1?r:1)},n}(Ek);function oQ(e){var t=e.length;return function(n){return e[Math.max(0,Math.min(t-1,Math.floor(n*t)))]}}function sQ(e,t){var n=eg(+e,+t);return function(r){var i=n(r);return i-360*Math.floor(i/360)}}function Mk(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}var ud=Math.SQRT2,Bw=2,Ik=4,aQ=1e-12;function Sk(e){return((e=Math.exp(e))+1/e)/2}function Tk(e,t){var d,h,n=e[0],r=e[1],i=e[2],a=t[2],u=t[0]-n,c=t[1]-r,l=u*u+c*c;if(l<aQ)h=Math.log(a/i)/ud,d=function(E){return[n+E*u,r+E*c,i*Math.exp(ud*E*h)]};else{var g=Math.sqrt(l),y=(a*a-i*i+Ik*l)/(2*i*Bw*g),v=(a*a-i*i-Ik*l)/(2*a*Bw*g),b=Math.log(Math.sqrt(y*y+1)-y),_=Math.log(Math.sqrt(v*v+1)-v);h=(_-b)/ud,d=function(E){var C=E*h,I=Sk(b),R=i/(Bw*g)*(I*function cQ(e){return((e=Math.exp(2*e))-1)/(e+1)}(ud*C+b)-function uQ(e){return((e=Math.exp(e))-1/e)/2}(b));return[n+R*u,r+R*c,i*I/Sk(ud*C+b)]}}return d.duration=1e3*h,d}function Nk(e){return function(t,n){var r=e((t=Xp(t)).h,(n=Xp(n)).h),i=tr(t.s,n.s),o=tr(t.l,n.l),s=tr(t.opacity,n.opacity);return function(a){return t.h=r(a),t.s=i(a),t.l=o(a),t.opacity=s(a),t+""}}}const lQ=Nk(eg);var fQ=Nk(tr);function dQ(e,t){var n=tr((e=mg(e)).l,(t=mg(t)).l),r=tr(e.a,t.a),i=tr(e.b,t.b),o=tr(e.opacity,t.opacity);return function(s){return e.l=n(s),e.a=r(s),e.b=i(s),e.opacity=o(s),e+""}}function Ak(e){return function(t,n){var r=e((t=yg(t)).h,(n=yg(n)).h),i=tr(t.c,n.c),o=tr(t.l,n.l),s=tr(t.opacity,n.opacity);return function(a){return t.h=r(a),t.c=i(a),t.l=o(a),t.opacity=s(a),t+""}}}const hQ=Ak(eg);var pQ=Ak(tr);function kk(e){return function t(n){function r(i,o){var s=e((i=$i(i)).h,(o=$i(o)).h),a=tr(i.s,o.s),u=tr(i.l,o.l),c=tr(i.opacity,o.opacity);return function(l){return i.h=s(l),i.s=a(l),i.l=u(Math.pow(l,n)),i.opacity=c(l),i+""}}return n=+n,r.gamma=t,r}(1)}const gQ=kk(eg);var ym=kk(tr);function mQ(e,t){for(var n=0,r=t.length-1,i=t[0],o=new Array(r<0?0:r);n<r;)o[n]=e(i,i=t[++n]);return function(s){var a=Math.max(0,Math.min(r-1,Math.floor(s*=r)));return o[a](s-a)}}function yQ(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e(r/(t-1));return n}function vQ(e){for(var r,t=-1,n=e.length,i=e[n-1],o=0;++t<n;)o+=(r=i)[1]*(i=e[t])[0]-r[0]*i[1];return o/2}function bQ(e){for(var o,a,t=-1,n=e.length,r=0,i=0,s=e[n-1],u=0;++t<n;)u+=a=(o=s)[0]*(s=e[t])[1]-s[0]*o[1],r+=(o[0]+s[0])*a,i+=(o[1]+s[1])*a;return[r/(u*=3),i/u]}function wQ(e,t,n){return(t[0]-e[0])*(n[1]-e[1])-(t[1]-e[1])*(n[0]-e[0])}function _Q(e,t){return e[0]-t[0]||e[1]-t[1]}function Ok(e){for(var t=e.length,n=[0,1],r=2,i=2;i<t;++i){for(;r>1&&wQ(e[n[r-2]],e[n[r-1]],e[i])<=0;)--r;n[r++]=i}return n.slice(0,r)}function DQ(e){if((n=e.length)<3)return null;var t,n,r=new Array(n),i=new Array(n);for(t=0;t<n;++t)r[t]=[+e[t][0],+e[t][1],t];for(r.sort(_Q),t=0;t<n;++t)i[t]=[r[t][0],-r[t][1]];var o=Ok(r),s=Ok(i),a=s[0]===o[0],u=s[s.length-1]===o[o.length-1],c=[];for(t=o.length-1;t>=0;--t)c.push(e[r[o[t]][2]]);for(t=+a;t<s.length-u;++t)c.push(e[r[s[t]][2]]);return c}function EQ(e,t){for(var u,c,n=e.length,r=e[n-1],i=t[0],o=t[1],s=r[0],a=r[1],l=!1,d=0;d<n;++d)u=(r=e[d])[0],(c=r[1])>o!=a>o&&i<(s-u)*(o-c)/(a-c)+u&&(l=!l),s=u,a=c;return l}function CQ(e){for(var i,o,t=-1,n=e.length,r=e[n-1],s=r[0],a=r[1],u=0;++t<n;)i=s,o=a,i-=s=(r=e[t])[0],o-=a=r[1],u+=Math.sqrt(i*i+o*o);return u}function kc(){return Math.random()}const xQ=function e(t){function n(r,i){return r=null==r?0:+r,i=null==i?1:+i,1===arguments.length?(i=r,r=0):i-=r,function(){return t()*i+r}}return n.source=e,n}(kc),Rk=function e(t){function n(r,i){var o,s;return r=null==r?0:+r,i=null==i?1:+i,function(){var a;if(null!=o)a=o,o=null;else do{o=2*t()-1,a=2*t()-1,s=o*o+a*a}while(!s||s>1);return r+i*a*Math.sqrt(-2*Math.log(s)/s)}}return n.source=e,n}(kc),MQ=function e(t){function n(){var r=Rk.source(t).apply(this,arguments);return function(){return Math.exp(r())}}return n.source=e,n}(kc),Pk=function e(t){function n(r){return function(){for(var i=0,o=0;o<r;++o)i+=t();return i}}return n.source=e,n}(kc),IQ=function e(t){function n(r){var i=Pk.source(t)(r);return function(){return i()/r}}return n.source=e,n}(kc),SQ=function e(t){function n(r){return function(){return-Math.log(1-t())/r}}return n.source=e,n}(kc);function Wi(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}function ts(e,t){switch(arguments.length){case 0:break;case 1:this.interpolator(e);break;default:this.interpolator(t).domain(e)}return this}var Fk=Array.prototype,vm=Fk.map,Ra=Fk.slice,jw={name:"implicit"};function Vw(){var e=Ms(),t=[],n=[],r=jw;function i(o){var s=o+"",a=e.get(s);if(!a){if(r!==jw)return r;e.set(s,a=t.push(o))}return n[(a-1)%n.length]}return i.domain=function(o){if(!arguments.length)return t.slice();t=[],e=Ms();for(var u,c,s=-1,a=o.length;++s<a;)e.has(c=(u=o[s])+"")||e.set(c,t.push(u));return i},i.range=function(o){return arguments.length?(n=Ra.call(o),i):n.slice()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return Vw(t,n).unknown(r)},Wi.apply(i,arguments),i}function Hw(){var i,o,e=Vw().unknown(void 0),t=e.domain,n=e.range,r=[0,1],s=!1,a=0,u=0,c=.5;function l(){var d=t().length,h=r[1]<r[0],g=r[h-0],y=r[1-h];i=(y-g)/Math.max(1,d-a+2*u),s&&(i=Math.floor(i)),g+=(y-g-i*(d-a))*c,o=i*(1-a),s&&(g=Math.round(g),o=Math.round(o));var v=ni(d).map(function(b){return g+i*b});return n(h?v.reverse():v)}return delete e.unknown,e.domain=function(d){return arguments.length?(t(d),l()):t()},e.range=function(d){return arguments.length?(r=[+d[0],+d[1]],l()):r.slice()},e.rangeRound=function(d){return r=[+d[0],+d[1]],s=!0,l()},e.bandwidth=function(){return o},e.step=function(){return i},e.round=function(d){return arguments.length?(s=!!d,l()):s},e.padding=function(d){return arguments.length?(a=Math.min(1,u=+d),l()):a},e.paddingInner=function(d){return arguments.length?(a=Math.min(1,d),l()):a},e.paddingOuter=function(d){return arguments.length?(u=+d,l()):u},e.align=function(d){return arguments.length?(c=Math.max(0,Math.min(1,d)),l()):c},e.copy=function(){return Hw(t(),r).round(s).paddingInner(a).paddingOuter(u).align(c)},Wi.apply(l(),arguments)}function Lk(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return Lk(t())},e}function TQ(){return Lk(Hw.apply(null,arguments).paddingInner(1))}function Uw(e){return+e}var Bk=[0,1];function sr(e){return e}function $w(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:function NQ(e){return function(){return e}}(isNaN(t)?NaN:.5)}function jk(e){var r,t=e[0],n=e[e.length-1];return t>n&&(r=t,t=n,n=r),function(i){return Math.max(t,Math.min(n,i))}}function AQ(e,t,n){var r=e[0],i=e[1],o=t[0],s=t[1];return i<r?(r=$w(i,r),o=n(s,o)):(r=$w(r,i),o=n(o,s)),function(a){return o(r(a))}}function kQ(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),o=new Array(r),s=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++s<r;)i[s]=$w(e[s],e[s+1]),o[s]=n(t[s],t[s+1]);return function(a){var u=ya(e,a,1,r)-1;return o[u](i[u](a))}}function cd(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function bm(){var r,i,o,a,u,c,e=Bk,t=Bk,n=Tf,s=sr;function l(){return a=Math.min(e.length,t.length)>2?kQ:AQ,u=c=null,d}function d(h){return isNaN(h=+h)?o:(u||(u=a(e.map(r),t,n)))(r(s(h)))}return d.invert=function(h){return s(i((c||(c=a(t,e.map(r),mi)))(h)))},d.domain=function(h){return arguments.length?(e=vm.call(h,Uw),s===sr||(s=jk(e)),l()):e.slice()},d.range=function(h){return arguments.length?(t=Ra.call(h),l()):t.slice()},d.rangeRound=function(h){return t=Ra.call(h),n=Mk,l()},d.clamp=function(h){return arguments.length?(s=h?jk(e):sr,d):s!==sr},d.interpolate=function(h){return arguments.length?(n=h,l()):n},d.unknown=function(h){return arguments.length?(o=h,d):o},function(h,g){return r=h,i=g,l()}}function Vk(e,t){return bm()(e,t)}function Hk(e,t,n,r){var o,i=va(e,t,n);switch((r=Hf(r??",f")).type){case"s":var s=Math.max(Math.abs(e),Math.abs(t));return null==r.precision&&!isNaN(o=qN(i,s))&&(r.precision=o),Vb(r,s);case"":case"e":case"g":case"p":case"r":null==r.precision&&!isNaN(o=WN(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=o-("e"===r.type));break;case"f":case"%":null==r.precision&&!isNaN(o=GN(i))&&(r.precision=o-2*("%"===r.type))}return Ig(r)}function Pa(e){var t=e.domain;return e.ticks=function(n){var r=t();return k1(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return Hk(i[0],i[i.length-1],n??10,r)},e.nice=function(n){null==n&&(n=10);var u,r=t(),i=0,o=r.length-1,s=r[i],a=r[o];return a<s&&(u=s,s=a,a=u,u=i,i=o,o=u),(u=_f(s,a,n))>0?u=_f(s=Math.floor(s/u)*u,a=Math.ceil(a/u)*u,n):u<0&&(u=_f(s=Math.ceil(s*u)/u,a=Math.floor(a*u)/u,n)),u>0?(r[i]=Math.floor(s/u)*u,r[o]=Math.ceil(a/u)*u,t(r)):u<0&&(r[i]=Math.ceil(s*u)/u,r[o]=Math.floor(a*u)/u,t(r)),e},e}function Uk(){var e=Vk(sr,sr);return e.copy=function(){return cd(e,Uk())},Wi.apply(e,arguments),Pa(e)}function $k(e){var t;function n(r){return isNaN(r=+r)?t:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(e=vm.call(r,Uw),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return $k(e).unknown(t)},e=arguments.length?vm.call(e,Uw):[0,1],Pa(n)}function zk(e,t){var s,n=0,r=(e=e.slice()).length-1,i=e[n],o=e[r];return o<i&&(s=n,n=r,r=s,s=i,i=o,o=s),e[n]=t.floor(i),e[r]=t.ceil(o),e}function Gk(e){return Math.log(e)}function qk(e){return Math.exp(e)}function OQ(e){return-Math.log(-e)}function RQ(e){return-Math.exp(-e)}function PQ(e){return isFinite(e)?+("1e"+e):e<0?0:e}function Wk(e){return function(t){return-e(-t)}}function zw(e){var i,o,t=e(Gk,qk),n=t.domain,r=10;function s(){return i=function LQ(e){return e===Math.E?Math.log:10===e&&Math.log10||2===e&&Math.log2||(e=Math.log(e),function(t){return Math.log(t)/e})}(r),o=function FQ(e){return 10===e?PQ:e===Math.E?Math.exp:function(t){return Math.pow(e,t)}}(r),n()[0]<0?(i=Wk(i),o=Wk(o),e(OQ,RQ)):e(Gk,qk),t}return t.base=function(a){return arguments.length?(r=+a,s()):r},t.domain=function(a){return arguments.length?(n(a),s()):n()},t.ticks=function(a){var d,u=n(),c=u[0],l=u[u.length-1];(d=l<c)&&(h=c,c=l,l=h);var y,v,b,h=i(c),g=i(l),_=null==a?10:+a,E=[];if(!(r%1)&&g-h<_){if(h=Math.round(h)-1,g=Math.round(g)+1,c>0){for(;h<g;++h)for(v=1,y=o(h);v<r;++v)if(!((b=y*v)<c)){if(b>l)break;E.push(b)}}else for(;h<g;++h)for(v=r-1,y=o(h);v>=1;--v)if(!((b=y*v)<c)){if(b>l)break;E.push(b)}}else E=k1(h,g,Math.min(g-h,_)).map(o);return d?E.reverse():E},t.tickFormat=function(a,u){if(null==u&&(u=10===r?".0e":","),"function"!=typeof u&&(u=Ig(u)),a===1/0)return u;null==a&&(a=10);var c=Math.max(1,r*a/t.ticks().length);return function(l){var d=l/o(Math.round(i(l)));return d*r<r-.5&&(d*=r),d<=c?u(l):""}},t.nice=function(){return n(zk(n(),{floor:function(a){return o(Math.floor(i(a)))},ceil:function(a){return o(Math.ceil(i(a)))}}))},t}function Yk(){var e=zw(bm()).domain([1,10]);return e.copy=function(){return cd(e,Yk()).base(e.base())},Wi.apply(e,arguments),e}function Kk(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function Qk(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function Gw(e){var t=1,n=e(Kk(t),Qk(t));return n.constant=function(r){return arguments.length?e(Kk(t=+r),Qk(t)):t},Pa(n)}function Zk(){var e=Gw(bm());return e.copy=function(){return cd(e,Zk()).constant(e.constant())},Wi.apply(e,arguments)}function Xk(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function BQ(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function jQ(e){return e<0?-e*e:e*e}function qw(e){var t=e(sr,sr),n=1;return t.exponent=function(i){return arguments.length?(n=+i,function r(){return 1===n?e(sr,sr):.5===n?e(BQ,jQ):e(Xk(n),Xk(1/n))}()):n},Pa(t)}function Ww(){var e=qw(bm());return e.copy=function(){return cd(e,Ww()).exponent(e.exponent())},Wi.apply(e,arguments),e}function VQ(){return Ww.apply(null,arguments).exponent(.5)}function Jk(){var r,e=[],t=[],n=[];function i(){var s=0,a=Math.max(1,t.length);for(n=new Array(a-1);++s<a;)n[s-1]=Df(e,s/a);return o}function o(s){return isNaN(s=+s)?r:t[ya(n,s)]}return o.invertExtent=function(s){var a=t.indexOf(s);return a<0?[NaN,NaN]:[a>0?n[a-1]:e[0],a<n.length?n[a]:e[e.length-1]]},o.domain=function(s){if(!arguments.length)return e.slice();e=[];for(var c,a=0,u=s.length;a<u;++a)null!=(c=s[a])&&!isNaN(c=+c)&&e.push(c);return e.sort(Ds),i()},o.range=function(s){return arguments.length?(t=Ra.call(s),i()):t.slice()},o.unknown=function(s){return arguments.length?(r=s,o):r},o.quantiles=function(){return n.slice()},o.copy=function(){return Jk().domain(e).range(t).unknown(r)},Wi.apply(o,arguments)}function eO(){var o,e=0,t=1,n=1,r=[.5],i=[0,1];function s(u){return u<=u?i[ya(r,u,0,n)]:o}function a(){var u=-1;for(r=new Array(n);++u<n;)r[u]=((u+1)*t-(u-n)*e)/(n+1);return s}return s.domain=function(u){return arguments.length?(e=+u[0],t=+u[1],a()):[e,t]},s.range=function(u){return arguments.length?(n=(i=Ra.call(u)).length-1,a()):i.slice()},s.invertExtent=function(u){var c=i.indexOf(u);return c<0?[NaN,NaN]:c<1?[e,r[0]]:c>=n?[r[n-1],t]:[r[c-1],r[c]]},s.unknown=function(u){return arguments.length&&(o=u),s},s.thresholds=function(){return r.slice()},s.copy=function(){return eO().domain([e,t]).range(i).unknown(o)},Wi.apply(Pa(s),arguments)}function tO(){var n,e=[.5],t=[0,1],r=1;function i(o){return o<=o?t[ya(e,o,0,r)]:n}return i.domain=function(o){return arguments.length?(e=Ra.call(o),r=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(o){return arguments.length?(t=Ra.call(o),r=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(o){var s=t.indexOf(o);return[e[s-1],e[s]]},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return tO().domain(e).range(t).unknown(n)},Wi.apply(i,arguments)}var Yw=new Date,Kw=new Date;function Zn(e,t,n,r){function i(o){return e(o=0===arguments.length?new Date:new Date(+o)),o}return i.floor=function(o){return e(o=new Date(+o)),o},i.ceil=function(o){return e(o=new Date(o-1)),t(o,1),e(o),o},i.round=function(o){var s=i(o),a=i.ceil(o);return o-s<a-o?s:a},i.offset=function(o,s){return t(o=new Date(+o),null==s?1:Math.floor(s)),o},i.range=function(o,s,a){var c,u=[];if(o=i.ceil(o),a=null==a?1:Math.floor(a),!(o<s&&a>0))return u;do{u.push(c=new Date(+o)),t(o,a),e(o)}while(c<o&&o<s);return u},i.filter=function(o){return Zn(function(s){if(s>=s)for(;e(s),!o(s);)s.setTime(s-1)},function(s,a){if(s>=s)if(a<0)for(;++a<=0;)for(;t(s,-1),!o(s););else for(;--a>=0;)for(;t(s,1),!o(s););})},n&&(i.count=function(o,s){return Yw.setTime(+o),Kw.setTime(+s),e(Yw),e(Kw),Math.floor(n(Yw,Kw))},i.every=function(o){return o=Math.floor(o),isFinite(o)&&o>0?o>1?i.filter(r?function(s){return r(s)%o==0}:function(s){return i.count(0,s)%o==0}):i:null}),i}var Qw=Zn(function(e){e.setMonth(0,1),e.setHours(0,0,0,0)},function(e,t){e.setFullYear(e.getFullYear()+t)},function(e,t){return t.getFullYear()-e.getFullYear()},function(e){return e.getFullYear()});Qw.every=function(e){return isFinite(e=Math.floor(e))&&e>0?Zn(function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,n){t.setFullYear(t.getFullYear()+n*e)}):null};const Fa=Qw;var HQ=Qw.range,nO=Zn(function(e){e.setDate(1),e.setHours(0,0,0,0)},function(e,t){e.setMonth(e.getMonth()+t)},function(e,t){return t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear())},function(e){return e.getMonth()});const rO=nO;var UQ=nO.range,La=6e4,_m=36e5,oO=6048e5;function Ba(e){return Zn(function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},function(t,n){t.setDate(t.getDate()+7*n)},function(t,n){return(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*La)/oO})}var ld=Ba(0),fd=Ba(1),sO=Ba(2),aO=Ba(3),ja=Ba(4),uO=Ba(5),cO=Ba(6),lO=ld.range,$Q=fd.range,zQ=sO.range,GQ=aO.range,qQ=ja.range,WQ=uO.range,YQ=cO.range,fO=Zn(function(e){e.setHours(0,0,0,0)},function(e,t){e.setDate(e.getDate()+t)},function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*La)/864e5},function(e){return e.getDate()-1});const Dm=fO;var KQ=fO.range,dO=Zn(function(e){e.setTime(e-e.getMilliseconds()-1e3*e.getSeconds()-e.getMinutes()*La)},function(e,t){e.setTime(+e+t*_m)},function(e,t){return(t-e)/_m},function(e){return e.getHours()});const hO=dO;var QQ=dO.range,pO=Zn(function(e){e.setTime(e-e.getMilliseconds()-1e3*e.getSeconds())},function(e,t){e.setTime(+e+t*La)},function(e,t){return(t-e)/La},function(e){return e.getMinutes()});const gO=pO;var ZQ=pO.range,mO=Zn(function(e){e.setTime(e-e.getMilliseconds())},function(e,t){e.setTime(+e+1e3*t)},function(e,t){return(t-e)/1e3},function(e){return e.getUTCSeconds()});const Em=mO;var yO=mO.range,Cm=Zn(function(){},function(e,t){e.setTime(+e+t)},function(e,t){return t-e});Cm.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?Zn(function(t){t.setTime(Math.floor(t/e)*e)},function(t,n){t.setTime(+t+n*e)},function(t,n){return(n-t)/e}):Cm:null};const xm=Cm;var vO=Cm.range;function Va(e){return Zn(function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCDate(t.getUTCDate()+7*n)},function(t,n){return(n-t)/oO})}var dd=Va(0),hd=Va(1),bO=Va(2),wO=Va(3),Ha=Va(4),_O=Va(5),DO=Va(6),EO=dd.range,XQ=hd.range,JQ=bO.range,eZ=wO.range,tZ=Ha.range,nZ=_O.range,rZ=DO.range,CO=Zn(function(e){e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCDate(e.getUTCDate()+t)},function(e,t){return(t-e)/864e5},function(e){return e.getUTCDate()-1});const Mm=CO;var iZ=CO.range,Zw=Zn(function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)},function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()},function(e){return e.getUTCFullYear()});Zw.every=function(e){return isFinite(e=Math.floor(e))&&e>0?Zn(function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n*e)}):null};const Ua=Zw;var oZ=Zw.range;function Xw(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function Jw(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function pd(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function xO(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,o=e.days,s=e.shortDays,a=e.months,u=e.shortMonths,c=gd(i),l=md(i),d=gd(o),h=md(o),g=gd(s),y=md(s),v=gd(a),b=md(a),_=gd(u),E=md(u),C={a:function Ye(qe){return s[qe.getDay()]},A:function Be(qe){return o[qe.getDay()]},b:function tt(qe){return u[qe.getMonth()]},B:function Ct(qe){return a[qe.getMonth()]},c:null,d:AO,e:AO,f:SZ,g:BZ,G:VZ,H:xZ,I:MZ,j:IZ,L:kO,m:TZ,M:NZ,p:function Dt(qe){return i[+(qe.getHours()>=12)]},q:function on(qe){return 1+~~(qe.getMonth()/3)},Q:BO,s:jO,S:AZ,u:kZ,U:OZ,V:RZ,w:PZ,W:FZ,x:null,X:null,y:LZ,Y:jZ,Z:HZ,"%":LO},I={a:function Jt(qe){return s[qe.getUTCDay()]},A:function ne(qe){return o[qe.getUTCDay()]},b:function Ze(qe){return u[qe.getUTCMonth()]},B:function ht(qe){return a[qe.getUTCMonth()]},c:null,d:RO,e:RO,f:GZ,g:tX,G:rX,H:UZ,I:$Z,j:zZ,L:PO,m:qZ,M:WZ,p:function cn(qe){return i[+(qe.getUTCHours()>=12)]},q:function tn(qe){return 1+~~(qe.getUTCMonth()/3)},Q:BO,s:jO,S:YZ,u:KZ,U:QZ,V:ZZ,w:XZ,W:JZ,x:null,X:null,y:eX,Y:nX,Z:iX,"%":LO},R={a:function fe(qe,mt,xt){var Te=g.exec(mt.slice(xt));return Te?(qe.w=y[Te[0].toLowerCase()],xt+Te[0].length):-1},A:function re(qe,mt,xt){var Te=d.exec(mt.slice(xt));return Te?(qe.w=h[Te[0].toLowerCase()],xt+Te[0].length):-1},b:function T(qe,mt,xt){var Te=_.exec(mt.slice(xt));return Te?(qe.m=E[Te[0].toLowerCase()],xt+Te[0].length):-1},B:function te(qe,mt,xt){var Te=v.exec(mt.slice(xt));return Te?(qe.m=b[Te[0].toLowerCase()],xt+Te[0].length):-1},c:function Ce(qe,mt,xt){return de(qe,t,mt,xt)},d:TO,e:TO,f:_Z,g:SO,G:IO,H:NO,I:NO,j:yZ,L:wZ,m:mZ,M:vZ,p:function oe(qe,mt,xt){var Te=c.exec(mt.slice(xt));return Te?(qe.p=l[Te[0].toLowerCase()],xt+Te[0].length):-1},q:gZ,Q:EZ,s:CZ,S:bZ,u:lZ,U:fZ,V:dZ,w:cZ,W:hZ,x:function X(qe,mt,xt){return de(qe,n,mt,xt)},X:function we(qe,mt,xt){return de(qe,r,mt,xt)},y:SO,Y:IO,Z:pZ,"%":DZ};function G(qe,mt){return function(xt){var Lr,rs,Br,Te=[],gn=-1,$t=0,Sn=qe.length;for(xt instanceof Date||(xt=new Date(+xt));++gn<Sn;)37===qe.charCodeAt(gn)&&(Te.push(qe.slice($t,gn)),null!=(rs=MO[Lr=qe.charAt(++gn)])?Lr=qe.charAt(++gn):rs="e"===Lr?" ":"0",(Br=mt[Lr])&&(Lr=Br(xt,rs)),Te.push(Lr),$t=gn+1);return Te.push(qe.slice($t,gn)),Te.join("")}}function z(qe,mt){return function(xt){var $t,Sn,Te=pd(1900,void 0,1);if(de(Te,qe,xt+="",0)!=xt.length)return null;if("Q"in Te)return new Date(Te.Q);if("s"in Te)return new Date(1e3*Te.s+("L"in Te?Te.L:0));if(mt&&!("Z"in Te)&&(Te.Z=0),"p"in Te&&(Te.H=Te.H%12+12*Te.p),void 0===Te.m&&(Te.m="q"in Te?Te.q:0),"V"in Te){if(Te.V<1||Te.V>53)return null;"w"in Te||(Te.w=1),"Z"in Te?(Sn=($t=Jw(pd(Te.y,0,1))).getUTCDay(),$t=Sn>4||0===Sn?hd.ceil($t):hd($t),$t=Mm.offset($t,7*(Te.V-1)),Te.y=$t.getUTCFullYear(),Te.m=$t.getUTCMonth(),Te.d=$t.getUTCDate()+(Te.w+6)%7):(Sn=($t=Xw(pd(Te.y,0,1))).getDay(),$t=Sn>4||0===Sn?fd.ceil($t):fd($t),$t=Dm.offset($t,7*(Te.V-1)),Te.y=$t.getFullYear(),Te.m=$t.getMonth(),Te.d=$t.getDate()+(Te.w+6)%7)}else("W"in Te||"U"in Te)&&("w"in Te||(Te.w="u"in Te?Te.u%7:"W"in Te?1:0),Sn="Z"in Te?Jw(pd(Te.y,0,1)).getUTCDay():Xw(pd(Te.y,0,1)).getDay(),Te.m=0,Te.d="W"in Te?(Te.w+6)%7+7*Te.W-(Sn+5)%7:Te.w+7*Te.U-(Sn+6)%7);return"Z"in Te?(Te.H+=Te.Z/100|0,Te.M+=Te.Z%100,Jw(Te)):Xw(Te)}}function de(qe,mt,xt,Te){for(var Lr,rs,gn=0,$t=mt.length,Sn=xt.length;gn<$t;){if(Te>=Sn)return-1;if(37===(Lr=mt.charCodeAt(gn++))){if(Lr=mt.charAt(gn++),!(rs=R[Lr in MO?mt.charAt(gn++):Lr])||(Te=rs(qe,xt,Te))<0)return-1}else if(Lr!=xt.charCodeAt(Te++))return-1}return Te}return C.x=G(n,C),C.X=G(r,C),C.c=G(t,C),I.x=G(n,I),I.X=G(r,I),I.c=G(t,I),{format:function(qe){var mt=G(qe+="",C);return mt.toString=function(){return qe},mt},parse:function(qe){var mt=z(qe+="",!1);return mt.toString=function(){return qe},mt},utcFormat:function(qe){var mt=G(qe+="",I);return mt.toString=function(){return qe},mt},utcParse:function(qe){var mt=z(qe+="",!0);return mt.toString=function(){return qe},mt}}}var Oc,e_,VO,Im,t_,MO={"-":"",_:" ",0:"0"},nr=/^\s*\d+/,sZ=/^%/,aZ=/[\\^$*+?|[\]().{}]/g;function Qt(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(t)+i:i)}function uZ(e){return e.replace(aZ,"\\$&")}function gd(e){return new RegExp("^(?:"+e.map(uZ).join("|")+")","i")}function md(e){for(var t={},n=-1,r=e.length;++n<r;)t[e[n].toLowerCase()]=n;return t}function cZ(e,t,n){var r=nr.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function lZ(e,t,n){var r=nr.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function fZ(e,t,n){var r=nr.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function dZ(e,t,n){var r=nr.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function hZ(e,t,n){var r=nr.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function IO(e,t,n){var r=nr.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function SO(e,t,n){var r=nr.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function pZ(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function gZ(e,t,n){var r=nr.exec(t.slice(n,n+1));return r?(e.q=3*r[0]-3,n+r[0].length):-1}function mZ(e,t,n){var r=nr.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function TO(e,t,n){var r=nr.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function yZ(e,t,n){var r=nr.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function NO(e,t,n){var r=nr.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function vZ(e,t,n){var r=nr.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function bZ(e,t,n){var r=nr.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function wZ(e,t,n){var r=nr.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function _Z(e,t,n){var r=nr.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function DZ(e,t,n){var r=sZ.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function EZ(e,t,n){var r=nr.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function CZ(e,t,n){var r=nr.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function AO(e,t){return Qt(e.getDate(),t,2)}function xZ(e,t){return Qt(e.getHours(),t,2)}function MZ(e,t){return Qt(e.getHours()%12||12,t,2)}function IZ(e,t){return Qt(1+Dm.count(Fa(e),e),t,3)}function kO(e,t){return Qt(e.getMilliseconds(),t,3)}function SZ(e,t){return kO(e,t)+"000"}function TZ(e,t){return Qt(e.getMonth()+1,t,2)}function NZ(e,t){return Qt(e.getMinutes(),t,2)}function AZ(e,t){return Qt(e.getSeconds(),t,2)}function kZ(e){var t=e.getDay();return 0===t?7:t}function OZ(e,t){return Qt(ld.count(Fa(e)-1,e),t,2)}function OO(e){var t=e.getDay();return t>=4||0===t?ja(e):ja.ceil(e)}function RZ(e,t){return e=OO(e),Qt(ja.count(Fa(e),e)+(4===Fa(e).getDay()),t,2)}function PZ(e){return e.getDay()}function FZ(e,t){return Qt(fd.count(Fa(e)-1,e),t,2)}function LZ(e,t){return Qt(e.getFullYear()%100,t,2)}function BZ(e,t){return Qt((e=OO(e)).getFullYear()%100,t,2)}function jZ(e,t){return Qt(e.getFullYear()%1e4,t,4)}function VZ(e,t){var n=e.getDay();return Qt((e=n>=4||0===n?ja(e):ja.ceil(e)).getFullYear()%1e4,t,4)}function HZ(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Qt(t/60|0,"0",2)+Qt(t%60,"0",2)}function RO(e,t){return Qt(e.getUTCDate(),t,2)}function UZ(e,t){return Qt(e.getUTCHours(),t,2)}function $Z(e,t){return Qt(e.getUTCHours()%12||12,t,2)}function zZ(e,t){return Qt(1+Mm.count(Ua(e),e),t,3)}function PO(e,t){return Qt(e.getUTCMilliseconds(),t,3)}function GZ(e,t){return PO(e,t)+"000"}function qZ(e,t){return Qt(e.getUTCMonth()+1,t,2)}function WZ(e,t){return Qt(e.getUTCMinutes(),t,2)}function YZ(e,t){return Qt(e.getUTCSeconds(),t,2)}function KZ(e){var t=e.getUTCDay();return 0===t?7:t}function QZ(e,t){return Qt(dd.count(Ua(e)-1,e),t,2)}function FO(e){var t=e.getUTCDay();return t>=4||0===t?Ha(e):Ha.ceil(e)}function ZZ(e,t){return e=FO(e),Qt(Ha.count(Ua(e),e)+(4===Ua(e).getUTCDay()),t,2)}function XZ(e){return e.getUTCDay()}function JZ(e,t){return Qt(hd.count(Ua(e)-1,e),t,2)}function eX(e,t){return Qt(e.getUTCFullYear()%100,t,2)}function tX(e,t){return Qt((e=FO(e)).getUTCFullYear()%100,t,2)}function nX(e,t){return Qt(e.getUTCFullYear()%1e4,t,4)}function rX(e,t){var n=e.getUTCDay();return Qt((e=n>=4||0===n?Ha(e):Ha.ceil(e)).getUTCFullYear()%1e4,t,4)}function iX(){return"+0000"}function LO(){return"%"}function BO(e){return+e}function jO(e){return Math.floor(+e/1e3)}function HO(e){return Oc=xO(e),e_=Oc.format,VO=Oc.parse,Im=Oc.utcFormat,t_=Oc.utcParse,Oc}HO({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});var yd=1e3,vd=60*yd,bd=60*vd,wd=24*bd,oX=7*wd,UO=30*wd,n_=365*wd;function sX(e){return new Date(e)}function aX(e){return e instanceof Date?+e:+new Date(+e)}function r_(e,t,n,r,i,o,s,a,u){var c=Vk(sr,sr),l=c.invert,d=c.domain,h=u(".%L"),g=u(":%S"),y=u("%I:%M"),v=u("%I %p"),b=u("%a %d"),_=u("%b %d"),E=u("%B"),C=u("%Y"),I=[[s,1,yd],[s,5,5*yd],[s,15,15*yd],[s,30,30*yd],[o,1,vd],[o,5,5*vd],[o,15,15*vd],[o,30,30*vd],[i,1,bd],[i,3,3*bd],[i,6,6*bd],[i,12,12*bd],[r,1,wd],[r,2,2*wd],[n,1,oX],[t,1,UO],[t,3,3*UO],[e,1,n_]];function R(z){return(s(z)<z?h:o(z)<z?g:i(z)<z?y:r(z)<z?v:t(z)<z?n(z)<z?b:_:e(z)<z?E:C)(z)}function G(z,de,oe,fe){if(null==z&&(z=10),"number"==typeof z){var re=Math.abs(oe-de)/z,T=I1(function(te){return te[2]}).right(I,re);T===I.length?(fe=va(de/n_,oe/n_,z),z=e):T?(fe=(T=I[re/I[T-1][2]<I[T][2]/re?T-1:T])[1],z=T[0]):(fe=Math.max(va(de,oe,z),1),z=a)}return null==fe?z:z.every(fe)}return c.invert=function(z){return new Date(l(z))},c.domain=function(z){return arguments.length?d(vm.call(z,aX)):d().map(sX)},c.ticks=function(z,de){var te,oe=d(),fe=oe[0],re=oe[oe.length-1],T=re<fe;return T&&(te=fe,fe=re,re=te),te=(te=G(z,fe,re,de))?te.range(fe,re+1):[],T?te.reverse():te},c.tickFormat=function(z,de){return null==de?R:u(de)},c.nice=function(z,de){var oe=d();return(z=G(z,oe[0],oe[oe.length-1],de))?d(zk(oe,z)):c},c.copy=function(){return cd(c,r_(e,t,n,r,i,o,s,a,u))},c}function uX(){return Wi.apply(r_(Fa,rO,ld,Dm,hO,gO,Em,xm,e_).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}var $O=Zn(function(e){e.setUTCDate(1),e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCMonth(e.getUTCMonth()+t)},function(e,t){return t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear())},function(e){return e.getUTCMonth()});const zO=$O;var cX=$O.range,GO=Zn(function(e){e.setUTCMinutes(0,0,0)},function(e,t){e.setTime(+e+t*_m)},function(e,t){return(t-e)/_m},function(e){return e.getUTCHours()});const qO=GO;var lX=GO.range,WO=Zn(function(e){e.setUTCSeconds(0,0)},function(e,t){e.setTime(+e+t*La)},function(e,t){return(t-e)/La},function(e){return e.getUTCMinutes()});const YO=WO;var fX=WO.range;function dX(){return Wi.apply(r_(Ua,zO,dd,Mm,qO,YO,Em,xm,Im).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Sm(){var n,r,i,o,u,e=0,t=1,s=sr,a=!1;function c(l){return isNaN(l=+l)?u:s(0===i?.5:(l=(o(l)-n)*i,a?Math.max(0,Math.min(1,l)):l))}return c.domain=function(l){return arguments.length?(n=o(e=+l[0]),r=o(t=+l[1]),i=n===r?0:1/(r-n),c):[e,t]},c.clamp=function(l){return arguments.length?(a=!!l,c):a},c.interpolator=function(l){return arguments.length?(s=l,c):s},c.unknown=function(l){return arguments.length?(u=l,c):u},function(l){return o=l,n=l(e),r=l(t),i=n===r?0:1/(r-n),c}}function Os(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function KO(){var e=Pa(Sm()(sr));return e.copy=function(){return Os(e,KO())},ts.apply(e,arguments)}function QO(){var e=zw(Sm()).domain([1,10]);return e.copy=function(){return Os(e,QO()).base(e.base())},ts.apply(e,arguments)}function ZO(){var e=Gw(Sm());return e.copy=function(){return Os(e,ZO()).constant(e.constant())},ts.apply(e,arguments)}function i_(){var e=qw(Sm());return e.copy=function(){return Os(e,i_()).exponent(e.exponent())},ts.apply(e,arguments)}function hX(){return i_.apply(null,arguments).exponent(.5)}function XO(){var e=[],t=sr;function n(r){if(!isNaN(r=+r))return t((ya(e,r)-1)/(e.length-1))}return n.domain=function(r){if(!arguments.length)return e.slice();e=[];for(var s,i=0,o=r.length;i<o;++i)null!=(s=r[i])&&!isNaN(s=+s)&&e.push(s);return e.sort(Ds),n},n.interpolator=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return XO(t).domain(e)},ts.apply(n,arguments)}function Tm(){var r,i,o,s,a,c,d,e=0,t=.5,n=1,u=sr,l=!1;function h(g){return isNaN(g=+g)?d:(g=.5+((g=+c(g))-i)*(g<i?s:a),u(l?Math.max(0,Math.min(1,g)):g))}return h.domain=function(g){return arguments.length?(r=c(e=+g[0]),i=c(t=+g[1]),o=c(n=+g[2]),s=r===i?0:.5/(i-r),a=i===o?0:.5/(o-i),h):[e,t,n]},h.clamp=function(g){return arguments.length?(l=!!g,h):l},h.interpolator=function(g){return arguments.length?(u=g,h):u},h.unknown=function(g){return arguments.length?(d=g,h):d},function(g){return c=g,r=g(e),i=g(t),o=g(n),s=r===i?0:.5/(i-r),a=i===o?0:.5/(o-i),h}}function JO(){var e=Pa(Tm()(sr));return e.copy=function(){return Os(e,JO())},ts.apply(e,arguments)}function eR(){var e=zw(Tm()).domain([.1,1,10]);return e.copy=function(){return Os(e,eR()).base(e.base())},ts.apply(e,arguments)}function tR(){var e=Gw(Tm());return e.copy=function(){return Os(e,tR()).constant(e.constant())},ts.apply(e,arguments)}function o_(){var e=qw(Tm());return e.copy=function(){return Os(e,o_()).exponent(e.exponent())},ts.apply(e,arguments)}function pX(){return o_.apply(null,arguments).exponent(.5)}function Nt(e){for(var t=e.length/6|0,n=new Array(t),r=0;r<t;)n[r]="#"+e.slice(6*r,6*++r);return n}const gX=Nt("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),mX=Nt("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),yX=Nt("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),vX=Nt("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),bX=Nt("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),wX=Nt("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),_X=Nt("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),DX=Nt("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),EX=Nt("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),CX=Nt("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function pn(e){return _2(e[e.length-1])}var nR=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(Nt);const xX=pn(nR);var rR=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(Nt);const MX=pn(rR);var iR=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(Nt);const IX=pn(iR);var oR=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(Nt);const SX=pn(oR);var sR=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(Nt);const TX=pn(sR);var aR=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(Nt);const NX=pn(aR);var uR=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(Nt);const AX=pn(uR);var cR=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(Nt);const kX=pn(cR);var lR=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(Nt);const OX=pn(lR);var fR=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(Nt);const RX=pn(fR);var dR=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(Nt);const PX=pn(dR);var hR=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(Nt);const FX=pn(hR);var pR=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(Nt);const LX=pn(pR);var gR=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(Nt);const BX=pn(gR);var mR=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(Nt);const jX=pn(mR);var yR=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(Nt);const VX=pn(yR);var vR=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(Nt);const HX=pn(vR);var bR=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(Nt);const UX=pn(bR);var wR=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(Nt);const $X=pn(wR);var _R=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(Nt);const zX=pn(_R);var DR=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(Nt);const GX=pn(DR);var ER=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(Nt);const qX=pn(ER);var CR=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(Nt);const WX=pn(CR);var xR=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(Nt);const YX=pn(xR);var MR=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(Nt);const KX=pn(MR);var IR=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(Nt);const QX=pn(IR);var SR=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(Nt);const ZX=pn(SR);function XX(e){return e=Math.max(0,Math.min(1,e)),"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-e*(35.34-e*(2381.73-e*(6402.7-e*(7024.72-2710.57*e)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+e*(170.73+e*(52.82-e*(131.46-e*(176.58-67.37*e)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+e*(442.36-e*(2482.43-e*(6167.24-e*(6614.94-2475.67*e)))))))+")"}const JX=ym($i(300,.5,0),$i(-240,.5,1));var eJ=ym($i(-100,.75,.35),$i(80,1.5,.8)),tJ=ym($i(260,.75,.35),$i(80,1.5,.8)),Nm=$i();function nJ(e){(e<0||e>1)&&(e-=Math.floor(e));var t=Math.abs(e-.5);return Nm.h=360*e-100,Nm.s=1.5-1.5*t,Nm.l=.8-.9*t,Nm+""}var Am=pc(),rJ=Math.PI/3,iJ=2*Math.PI/3;function oJ(e){var t;return e=(.5-e)*Math.PI,Am.r=255*(t=Math.sin(e))*t,Am.g=255*(t=Math.sin(e+rJ))*t,Am.b=255*(t=Math.sin(e+iJ))*t,Am+""}function sJ(e){return e=Math.max(0,Math.min(1,e)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+e*(1172.33-e*(10793.56-e*(33300.12-e*(38394.49-14825.05*e)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+e*(557.33+e*(1225.33-e*(3574.96-e*(1073.77+707.56*e)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+e*(3211.1-e*(15327.97-e*(27814-e*(22569.18-6838.66*e)))))))+")"}function km(e){var t=e.length;return function(n){return e[Math.max(0,Math.min(t-1,Math.floor(n*t)))]}}const aJ=km(Nt("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));var uJ=km(Nt("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),cJ=km(Nt("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),lJ=km(Nt("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));function fJ(e){return rn(Yp(e).call(document.documentElement))}var dJ=0;function TR(){return new s_}function s_(){this._="@"+(++dJ).toString(36)}function hJ(e){return"string"==typeof e?new Sr([document.querySelectorAll(e)],[document.documentElement]):new Sr([e??[]],$1)}function pJ(e,t){null==t&&(t=X1().touches);for(var n=0,r=t?t.length:0,i=new Array(r);n<r;++n)i[n]=tg(e,t[n]);return i}function Lt(e){return function(){return e}}s_.prototype=TR.prototype={constructor:s_,get:function(e){for(var t=this._;!(t in e);)if(!(e=e.parentNode))return;return e[t]},set:function(e,t){return e[this._]=t},remove:function(e){return this._ in e&&delete e[this._]},toString:function(){return this._}};var NR=Math.abs,yr=Math.atan2,$a=Math.cos,gJ=Math.max,a_=Math.min,Oo=Math.sin,Rc=Math.sqrt,vr=1e-12,Rs=Math.PI,Om=Rs/2,Ps=2*Rs;function AR(e){return e>=1?Om:e<=-1?-Om:Math.asin(e)}function yJ(e){return e.innerRadius}function vJ(e){return e.outerRadius}function bJ(e){return e.startAngle}function wJ(e){return e.endAngle}function _J(e){return e&&e.padAngle}function Rm(e,t,n,r,i,o,s){var a=e-n,u=t-r,c=(s?o:-o)/Rc(a*a+u*u),l=c*u,d=-c*a,h=e+l,g=t+d,y=n+l,v=r+d,b=(h+y)/2,_=(g+v)/2,E=y-h,C=v-g,I=E*E+C*C,R=i-o,G=h*v-y*g,z=(C<0?-1:1)*Rc(gJ(0,R*R*I-G*G)),de=(G*C-E*z)/I,oe=(-G*E-C*z)/I,fe=(G*C+E*z)/I,re=(-G*E+C*z)/I,T=de-b,te=oe-_,Ce=fe-b,X=re-_;return T*T+te*te>Ce*Ce+X*X&&(de=fe,oe=re),{cx:de,cy:oe,x01:-l,y01:-d,x11:de*(i/R-1),y11:oe*(i/R-1)}}function EJ(){var e=yJ,t=vJ,n=Lt(0),r=null,i=bJ,o=wJ,s=_J,a=null;function u(){var c,l,d=+e.apply(this,arguments),h=+t.apply(this,arguments),g=i.apply(this,arguments)-Om,y=o.apply(this,arguments)-Om,v=NR(y-g),b=y>g;if(a||(a=c=xa()),h<d&&(l=h,h=d,d=l),h>vr)if(v>Ps-vr)a.moveTo(h*$a(g),h*Oo(g)),a.arc(0,0,h,g,y,!b),d>vr&&(a.moveTo(d*$a(y),d*Oo(y)),a.arc(0,0,d,y,g,b));else{var T,te,_=g,E=y,C=g,I=y,R=v,G=v,z=s.apply(this,arguments)/2,de=z>vr&&(r?+r.apply(this,arguments):Rc(d*d+h*h)),oe=a_(NR(h-d)/2,+n.apply(this,arguments)),fe=oe,re=oe;if(de>vr){var Ce=AR(de/d*Oo(z)),X=AR(de/h*Oo(z));(R-=2*Ce)>vr?(C+=Ce*=b?1:-1,I-=Ce):(R=0,C=I=(g+y)/2),(G-=2*X)>vr?(_+=X*=b?1:-1,E-=X):(G=0,_=E=(g+y)/2)}var we=h*$a(_),Ye=h*Oo(_),Be=d*$a(I),tt=d*Oo(I);if(oe>vr){var ne,Ct=h*$a(E),Dt=h*Oo(E),on=d*$a(C),Jt=d*Oo(C);if(v<Rs&&(ne=function DJ(e,t,n,r,i,o,s,a){var u=n-e,c=r-t,l=s-i,d=a-o,h=d*u-l*c;if(!(h*h<vr))return[e+(h=(l*(t-o)-d*(e-i))/h)*u,t+h*c]}(we,Ye,on,Jt,Ct,Dt,Be,tt))){var Ze=we-ne[0],ht=Ye-ne[1],cn=Ct-ne[0],tn=Dt-ne[1],qe=1/Oo(function mJ(e){return e>1?0:e<-1?Rs:Math.acos(e)}((Ze*cn+ht*tn)/(Rc(Ze*Ze+ht*ht)*Rc(cn*cn+tn*tn)))/2),mt=Rc(ne[0]*ne[0]+ne[1]*ne[1]);fe=a_(oe,(d-mt)/(qe-1)),re=a_(oe,(h-mt)/(qe+1))}}G>vr?re>vr?(T=Rm(on,Jt,we,Ye,h,re,b),te=Rm(Ct,Dt,Be,tt,h,re,b),a.moveTo(T.cx+T.x01,T.cy+T.y01),re<oe?a.arc(T.cx,T.cy,re,yr(T.y01,T.x01),yr(te.y01,te.x01),!b):(a.arc(T.cx,T.cy,re,yr(T.y01,T.x01),yr(T.y11,T.x11),!b),a.arc(0,0,h,yr(T.cy+T.y11,T.cx+T.x11),yr(te.cy+te.y11,te.cx+te.x11),!b),a.arc(te.cx,te.cy,re,yr(te.y11,te.x11),yr(te.y01,te.x01),!b))):(a.moveTo(we,Ye),a.arc(0,0,h,_,E,!b)):a.moveTo(we,Ye),d>vr&&R>vr?fe>vr?(T=Rm(Be,tt,Ct,Dt,d,-fe,b),te=Rm(we,Ye,on,Jt,d,-fe,b),a.lineTo(T.cx+T.x01,T.cy+T.y01),fe<oe?a.arc(T.cx,T.cy,fe,yr(T.y01,T.x01),yr(te.y01,te.x01),!b):(a.arc(T.cx,T.cy,fe,yr(T.y01,T.x01),yr(T.y11,T.x11),!b),a.arc(0,0,d,yr(T.cy+T.y11,T.cx+T.x11),yr(te.cy+te.y11,te.cx+te.x11),b),a.arc(te.cx,te.cy,fe,yr(te.y11,te.x11),yr(te.y01,te.x01),!b))):a.arc(0,0,d,I,C,b):a.lineTo(Be,tt)}else a.moveTo(0,0);if(a.closePath(),c)return a=null,c+""||null}return u.centroid=function(){var c=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,l=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-Rs/2;return[$a(l)*c,Oo(l)*c]},u.innerRadius=function(c){return arguments.length?(e="function"==typeof c?c:Lt(+c),u):e},u.outerRadius=function(c){return arguments.length?(t="function"==typeof c?c:Lt(+c),u):t},u.cornerRadius=function(c){return arguments.length?(n="function"==typeof c?c:Lt(+c),u):n},u.padRadius=function(c){return arguments.length?(r=null==c?null:"function"==typeof c?c:Lt(+c),u):r},u.startAngle=function(c){return arguments.length?(i="function"==typeof c?c:Lt(+c),u):i},u.endAngle=function(c){return arguments.length?(o="function"==typeof c?c:Lt(+c),u):o},u.padAngle=function(c){return arguments.length?(s="function"==typeof c?c:Lt(+c),u):s},u.context=function(c){return arguments.length?(a=c??null,u):a},u}function kR(e){this._context=e}function Pm(e){return new kR(e)}function u_(e){return e[0]}function c_(e){return e[1]}function l_(){var e=u_,t=c_,n=Lt(!0),r=null,i=Pm,o=null;function s(a){var u,l,h,c=a.length,d=!1;for(null==r&&(o=i(h=xa())),u=0;u<=c;++u)!(u<c&&n(l=a[u],u,a))===d&&((d=!d)?o.lineStart():o.lineEnd()),d&&o.point(+e(l,u,a),+t(l,u,a));if(h)return o=null,h+""||null}return s.x=function(a){return arguments.length?(e="function"==typeof a?a:Lt(+a),s):e},s.y=function(a){return arguments.length?(t="function"==typeof a?a:Lt(+a),s):t},s.defined=function(a){return arguments.length?(n="function"==typeof a?a:Lt(!!a),s):n},s.curve=function(a){return arguments.length?(i=a,null!=r&&(o=i(r)),s):i},s.context=function(a){return arguments.length?(null==a?r=o=null:o=i(r=a),s):r},s}function OR(){var e=u_,t=null,n=Lt(0),r=c_,i=Lt(!0),o=null,s=Pm,a=null;function u(l){var d,h,g,v,_,y=l.length,b=!1,E=new Array(y),C=new Array(y);for(null==o&&(a=s(_=xa())),d=0;d<=y;++d){if(!(d<y&&i(v=l[d],d,l))===b)if(b=!b)h=d,a.areaStart(),a.lineStart();else{for(a.lineEnd(),a.lineStart(),g=d-1;g>=h;--g)a.point(E[g],C[g]);a.lineEnd(),a.areaEnd()}b&&(E[d]=+e(v,d,l),C[d]=+n(v,d,l),a.point(t?+t(v,d,l):E[d],r?+r(v,d,l):C[d]))}if(_)return a=null,_+""||null}function c(){return l_().defined(i).curve(s).context(o)}return u.x=function(l){return arguments.length?(e="function"==typeof l?l:Lt(+l),t=null,u):e},u.x0=function(l){return arguments.length?(e="function"==typeof l?l:Lt(+l),u):e},u.x1=function(l){return arguments.length?(t=null==l?null:"function"==typeof l?l:Lt(+l),u):t},u.y=function(l){return arguments.length?(n="function"==typeof l?l:Lt(+l),r=null,u):n},u.y0=function(l){return arguments.length?(n="function"==typeof l?l:Lt(+l),u):n},u.y1=function(l){return arguments.length?(r=null==l?null:"function"==typeof l?l:Lt(+l),u):r},u.lineX0=u.lineY0=function(){return c().x(e).y(n)},u.lineY1=function(){return c().x(e).y(r)},u.lineX1=function(){return c().x(t).y(n)},u.defined=function(l){return arguments.length?(i="function"==typeof l?l:Lt(!!l),u):i},u.curve=function(l){return arguments.length?(s=l,null!=o&&(a=s(o)),u):s},u.context=function(l){return arguments.length?(null==l?o=a=null:a=s(o=l),u):o},u}function CJ(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function xJ(e){return e}function MJ(){var e=xJ,t=CJ,n=null,r=Lt(0),i=Lt(Ps),o=Lt(0);function s(a){var u,l,d,_,I,c=a.length,h=0,g=new Array(c),y=new Array(c),v=+r.apply(this,arguments),b=Math.min(Ps,Math.max(-Ps,i.apply(this,arguments)-v)),E=Math.min(Math.abs(b)/c,o.apply(this,arguments)),C=E*(b<0?-1:1);for(u=0;u<c;++u)(I=y[g[u]=u]=+e(a[u],u,a))>0&&(h+=I);for(null!=t?g.sort(function(R,G){return t(y[R],y[G])}):null!=n&&g.sort(function(R,G){return n(a[R],a[G])}),u=0,d=h?(b-c*C)/h:0;u<c;++u,v=_)y[l=g[u]]={data:a[l],index:u,value:I=y[l],startAngle:v,endAngle:_=v+(I>0?I*d:0)+C,padAngle:E};return y}return s.value=function(a){return arguments.length?(e="function"==typeof a?a:Lt(+a),s):e},s.sortValues=function(a){return arguments.length?(t=a,n=null,s):t},s.sort=function(a){return arguments.length?(n=a,t=null,s):n},s.startAngle=function(a){return arguments.length?(r="function"==typeof a?a:Lt(+a),s):r},s.endAngle=function(a){return arguments.length?(i="function"==typeof a?a:Lt(+a),s):i},s.padAngle=function(a){return arguments.length?(o="function"==typeof a?a:Lt(+a),s):o},s}kR.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(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t)}}};var RR=f_(Pm);function PR(e){this._curve=e}function f_(e){function t(n){return new PR(e(n))}return t._curve=e,t}function _d(e){var t=e.curve;return e.angle=e.x,delete e.x,e.radius=e.y,delete e.y,e.curve=function(n){return arguments.length?t(f_(n)):t()._curve},e}function FR(){return _d(l_().curve(RR))}function LR(){var e=OR().curve(RR),t=e.curve,n=e.lineX0,r=e.lineX1,i=e.lineY0,o=e.lineY1;return 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 _d(n())},delete e.lineX0,e.lineEndAngle=function(){return _d(r())},delete e.lineX1,e.lineInnerRadius=function(){return _d(i())},delete e.lineY0,e.lineOuterRadius=function(){return _d(o())},delete e.lineY1,e.curve=function(s){return arguments.length?t(f_(s)):t()._curve},e}function Dd(e,t){return[(t=+t)*Math.cos(e-=Math.PI/2),t*Math.sin(e)]}PR.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(e,t){this._curve.point(t*Math.sin(e),t*-Math.cos(e))}};var d_=Array.prototype.slice;function IJ(e){return e.source}function SJ(e){return e.target}function h_(e){var t=IJ,n=SJ,r=u_,i=c_,o=null;function s(){var a,u=d_.call(arguments),c=t.apply(this,u),l=n.apply(this,u);if(o||(o=a=xa()),e(o,+r.apply(this,(u[0]=c,u)),+i.apply(this,u),+r.apply(this,(u[0]=l,u)),+i.apply(this,u)),a)return o=null,a+""||null}return s.source=function(a){return arguments.length?(t=a,s):t},s.target=function(a){return arguments.length?(n=a,s):n},s.x=function(a){return arguments.length?(r="function"==typeof a?a:Lt(+a),s):r},s.y=function(a){return arguments.length?(i="function"==typeof a?a:Lt(+a),s):i},s.context=function(a){return arguments.length?(o=a??null,s):o},s}function TJ(e,t,n,r,i){e.moveTo(t,n),e.bezierCurveTo(t=(t+r)/2,n,t,i,r,i)}function NJ(e,t,n,r,i){e.moveTo(t,n),e.bezierCurveTo(t,n=(n+i)/2,r,n,r,i)}function AJ(e,t,n,r,i){var o=Dd(t,n),s=Dd(t,n=(n+i)/2),a=Dd(r,n),u=Dd(r,i);e.moveTo(o[0],o[1]),e.bezierCurveTo(s[0],s[1],a[0],a[1],u[0],u[1])}function kJ(){return h_(TJ)}function OJ(){return h_(NJ)}function RJ(){var e=h_(AJ);return e.angle=e.x,delete e.x,e.radius=e.y,delete e.y,e}const p_={draw:function(e,t){var n=Math.sqrt(t/Rs);e.moveTo(n,0),e.arc(0,0,n,0,Ps)}},BR={draw:function(e,t){var n=Math.sqrt(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}};var jR=Math.sqrt(1/3),PJ=2*jR;const VR={draw:function(e,t){var n=Math.sqrt(t/PJ),r=n*jR;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}};var HR=Math.sin(Rs/10)/Math.sin(7*Rs/10),LJ=Math.sin(Ps/10)*HR,BJ=-Math.cos(Ps/10)*HR;const UR={draw:function(e,t){var n=Math.sqrt(.8908130915292852*t),r=LJ*n,i=BJ*n;e.moveTo(0,-n),e.lineTo(r,i);for(var o=1;o<5;++o){var s=Ps*o/5,a=Math.cos(s),u=Math.sin(s);e.lineTo(u*n,-a*n),e.lineTo(a*r-u*i,u*r+a*i)}e.closePath()}},$R={draw:function(e,t){var n=Math.sqrt(t),r=-n/2;e.rect(r,r,n,n)}};var g_=Math.sqrt(3);const zR={draw:function(e,t){var n=-Math.sqrt(t/(3*g_));e.moveTo(0,2*n),e.lineTo(-g_*n,-n),e.lineTo(g_*n,-n),e.closePath()}};var bi=-.5,wi=Math.sqrt(3)/2,m_=1/Math.sqrt(12),jJ=3*(m_/2+1);const GR={draw:function(e,t){var n=Math.sqrt(t/jJ),r=n/2,i=n*m_,o=r,s=n*m_+n,a=-o,u=s;e.moveTo(r,i),e.lineTo(o,s),e.lineTo(a,u),e.lineTo(bi*r-wi*i,wi*r+bi*i),e.lineTo(bi*o-wi*s,wi*o+bi*s),e.lineTo(bi*a-wi*u,wi*a+bi*u),e.lineTo(bi*r+wi*i,bi*i-wi*r),e.lineTo(bi*o+wi*s,bi*s-wi*o),e.lineTo(bi*a+wi*u,bi*u-wi*a),e.closePath()}};var VJ=[p_,BR,VR,$R,UR,zR,GR];function HJ(){var e=Lt(p_),t=Lt(64),n=null;function r(){var i;if(n||(n=i=xa()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),i)return n=null,i+""||null}return r.type=function(i){return arguments.length?(e="function"==typeof i?i:Lt(i),r):e},r.size=function(i){return arguments.length?(t="function"==typeof i?i:Lt(+i),r):t},r.context=function(i){return arguments.length?(n=i??null,r):n},r}function Fs(){}function Fm(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function Lm(e){this._context=e}function UJ(e){return new Lm(e)}function qR(e){this._context=e}function $J(e){return new qR(e)}function WR(e){this._context=e}function zJ(e){return new WR(e)}function YR(e,t){this._basis=new Lm(e),this._beta=t}Lm.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Fm(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Fm(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},qR.prototype={areaStart:Fs,areaEnd:Fs,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:Fm(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},WR.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:Fm(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},YR.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,n=e.length-1;if(n>0)for(var u,r=e[0],i=t[0],o=e[n]-r,s=t[n]-i,a=-1;++a<=n;)this._basis.point(this._beta*e[a]+(1-this._beta)*(r+(u=a/n)*o),this._beta*t[a]+(1-this._beta)*(i+u*s));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const GJ=function e(t){function n(r){return 1===t?new Lm(r):new YR(r,t)}return n.beta=function(r){return e(+r)},n}(.85);function Bm(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function y_(e,t){this._context=e,this._k=(1-t)/6}y_.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:Bm(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:Bm(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const qJ=function e(t){function n(r){return new y_(r,t)}return n.tension=function(r){return e(+r)},n}(0);function v_(e,t){this._context=e,this._k=(1-t)/6}v_.prototype={areaStart:Fs,areaEnd:Fs,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(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Bm(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const WJ=function e(t){function n(r){return new v_(r,t)}return n.tension=function(r){return e(+r)},n}(0);function b_(e,t){this._context=e,this._k=(1-t)/6}b_.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(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Bm(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const YJ=function e(t){function n(r){return new b_(r,t)}return n.tension=function(r){return e(+r)},n}(0);function w_(e,t,n){var r=e._x1,i=e._y1,o=e._x2,s=e._y2;if(e._l01_a>vr){var a=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,u=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*a-e._x0*e._l12_2a+e._x2*e._l01_2a)/u,i=(i*a-e._y0*e._l12_2a+e._y2*e._l01_2a)/u}if(e._l23_a>vr){var c=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,l=3*e._l23_a*(e._l23_a+e._l12_a);o=(o*c+e._x1*e._l23_2a-t*e._l12_2a)/l,s=(s*c+e._y1*e._l23_2a-n*e._l12_2a)/l}e._context.bezierCurveTo(r,i,o,s,e._x2,e._y2)}function KR(e,t){this._context=e,this._alpha=t}KR.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(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;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(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:w_(this,e,t)}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=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const KJ=function e(t){function n(r){return t?new KR(r,t):new y_(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function QR(e,t){this._context=e,this._alpha=t}QR.prototype={areaStart:Fs,areaEnd:Fs,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(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;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=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:w_(this,e,t)}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=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const QJ=function e(t){function n(r){return t?new QR(r,t):new v_(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function ZR(e,t){this._context=e,this._alpha=t}ZR.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(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:w_(this,e,t)}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=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const ZJ=function e(t){function n(r){return t?new ZR(r,t):new b_(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function XR(e){this._context=e}function XJ(e){return new XR(e)}function JR(e){return e<0?-1:1}function eP(e,t,n){var r=e._x1-e._x0,i=t-e._x1,o=(e._y1-e._y0)/(r||i<0&&-0),s=(n-e._y1)/(i||r<0&&-0),a=(o*i+s*r)/(r+i);return(JR(o)+JR(s))*Math.min(Math.abs(o),Math.abs(s),.5*Math.abs(a))||0}function tP(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function __(e,t,n){var r=e._x0,o=e._x1,s=e._y1,a=(o-r)/3;e._context.bezierCurveTo(r+a,e._y0+a*t,o-a,s-a*n,o,s)}function jm(e){this._context=e}function nP(e){this._context=new rP(e)}function rP(e){this._context=e}function JJ(e){return new jm(e)}function eee(e){return new nP(e)}function iP(e){this._context=e}function oP(e){var t,r,n=e.length-1,i=new Array(n),o=new Array(n),s=new Array(n);for(i[0]=0,o[0]=2,s[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,o[t]=4,s[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,o[n-1]=7,s[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)o[t]-=r=i[t]/o[t-1],s[t]-=r*s[t-1];for(i[n-1]=s[n-1]/o[n-1],t=n-2;t>=0;--t)i[t]=(s[t]-i[t+1])/o[t];for(o[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)o[t]=2*e[t+1]-i[t+1];return[i,o]}function tee(e){return new iP(e)}function Vm(e,t){this._context=e,this._t=t}function nee(e){return new Vm(e,.5)}function ree(e){return new Vm(e,0)}function iee(e){return new Vm(e,1)}function Pc(e,t){if((s=e.length)>1)for(var r,i,s,n=1,o=e[t[0]],a=o.length;n<s;++n)for(i=o,o=e[t[n]],r=0;r<a;++r)o[r][1]+=o[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function Fc(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function oee(e,t){return e[t]}function see(){var e=Lt([]),t=Fc,n=Pc,r=oee;function i(o){var a,d,s=e.apply(this,arguments),u=o.length,c=s.length,l=new Array(c);for(a=0;a<c;++a){for(var v,h=s[a],g=l[a]=new Array(u),y=0;y<u;++y)g[y]=v=[0,+r(o[y],h,y,o)],v.data=o[y];g.key=h}for(a=0,d=t(l);a<c;++a)l[d[a]].index=a;return n(l,d),l}return i.keys=function(o){return arguments.length?(e="function"==typeof o?o:Lt(d_.call(o)),i):e},i.value=function(o){return arguments.length?(r="function"==typeof o?o:Lt(+o),i):r},i.order=function(o){return arguments.length?(t=null==o?Fc:"function"==typeof o?o:Lt(d_.call(o)),i):t},i.offset=function(o){return arguments.length?(n=o??Pc,i):n},i}function aee(e,t){if((r=e.length)>0){for(var n,r,s,i=0,o=e[0].length;i<o;++i){for(s=n=0;n<r;++n)s+=e[n][i][1]||0;if(s)for(n=0;n<r;++n)e[n][i][1]/=s}Pc(e,t)}}function uee(e,t){if((u=e.length)>0)for(var n,i,o,s,a,u,r=0,c=e[t[0]].length;r<c;++r)for(s=a=0,n=0;n<u;++n)(o=(i=e[t[n]][r])[1]-i[0])>0?(i[0]=s,i[1]=s+=o):o<0?(i[1]=a,i[0]=a+=o):(i[0]=0,i[1]=o)}function cee(e,t){if((i=e.length)>0){for(var i,n=0,r=e[t[0]],o=r.length;n<o;++n){for(var s=0,a=0;s<i;++s)a+=e[s][n][1]||0;r[n][1]+=r[n][0]=-a/2}Pc(e,t)}}function lee(e,t){if((s=e.length)>0&&(o=(i=e[t[0]]).length)>0){for(var i,o,s,n=0,r=1;r<o;++r){for(var a=0,u=0,c=0;a<s;++a){for(var l=e[t[a]],d=l[r][1]||0,g=(d-(l[r-1][1]||0))/2,y=0;y<a;++y){var v=e[t[y]];g+=(v[r][1]||0)-(v[r-1][1]||0)}u+=d,c+=g*d}i[r-1][1]+=i[r-1][0]=n,u&&(n-=c/u)}i[r-1][1]+=i[r-1][0]=n,Pc(e,t)}}function sP(e){var t=e.map(fee);return Fc(e).sort(function(n,r){return t[n]-t[r]})}function fee(e){for(var i,t=-1,n=0,r=e.length,o=-1/0;++t<r;)(i=+e[t][1])>o&&(o=i,n=t);return n}function aP(e){var t=e.map(uP);return Fc(e).sort(function(n,r){return t[n]-t[r]})}function uP(e){for(var i,t=0,n=-1,r=e.length;++n<r;)(i=+e[n][1])&&(t+=i);return t}function dee(e){return aP(e).reverse()}function hee(e){var n,r,t=e.length,i=e.map(uP),o=sP(e),s=0,a=0,u=[],c=[];for(n=0;n<t;++n)r=o[n],s<a?(s+=i[r],u.push(r)):(a+=i[r],c.push(r));return c.reverse().concat(u)}function pee(e){return Fc(e).reverse()}XR.prototype={areaStart:Fs,areaEnd:Fs,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}},jm.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:__(this,this._t0,tP(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(t=+t,(e=+e)!==this._x1||t!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,__(this,tP(this,n=eP(this,e,t)),n);break;default:__(this,this._t0,n=eP(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}},(nP.prototype=Object.create(jm.prototype)).point=function(e,t){jm.prototype.point.call(this,t,e)},rP.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,o){this._context.bezierCurveTo(t,e,r,n,o,i)}},iP.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),2===n)this._context.lineTo(e[1],t[1]);else for(var r=oP(e),i=oP(t),o=0,s=1;s<n;++o,++s)this._context.bezierCurveTo(r[0][o],i[0][o],r[1][o],i[1][o],e[s],t[s]);(this._line||0!==this._line&&1===n)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}},Vm.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(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}}this._x=e,this._y=t}};var cP="%Y-%m-%dT%H:%M:%S.%LZ",mee=Date.prototype.toISOString?function gee(e){return e.toISOString()}:Im(cP);const yee=mee;var bee=+new Date("2000-01-01T00:00:00.000Z")?function vee(e){var t=new Date(e);return isNaN(t)?null:t}:t_(cP);const wee=bee;function _ee(e,t,n){var r=new Pf,i=t;return null==t?(r.restart(e,t,n),r):(t=+t,n=null==n?mc():+n,r.restart(function o(s){s+=i,r.restart(o,i+=t,n),e(s)},t,n),r)}function lP(e){return function(){return e}}function Dee(e){return e[0]}function Eee(e){return e[1]}function D_(){this._=null}function Hm(e){e.U=e.C=e.L=e.R=e.P=e.N=null}function Ed(e,t){var n=t,r=t.R,i=n.U;i?i.L===n?i.L=r:i.R=r:e._=r,r.U=i,n.U=r,n.R=r.L,n.R&&(n.R.U=n),r.L=n}function Cd(e,t){var n=t,r=t.L,i=n.U;i?i.L===n?i.L=r:i.R=r:e._=r,r.U=i,n.U=r,n.L=r.R,n.L&&(n.L.U=n),r.R=n}function fP(e){for(;e.L;)e=e.L;return e}D_.prototype={constructor:D_,insert:function(e,t){var n,r,i;if(e){if(t.P=e,t.N=e.N,e.N&&(e.N.P=t),e.N=t,e.R){for(e=e.R;e.L;)e=e.L;e.L=t}else e.R=t;n=e}else this._?(e=fP(this._),t.P=null,t.N=e,e.P=e.L=t,n=e):(t.P=t.N=null,this._=t,n=null);for(t.L=t.R=null,t.U=n,t.C=!0,e=t;n&&n.C;)n===(r=n.U).L?(i=r.R)&&i.C?(n.C=i.C=!1,r.C=!0,e=r):(e===n.R&&(Ed(this,n),n=(e=n).U),n.C=!1,r.C=!0,Cd(this,r)):(i=r.L)&&i.C?(n.C=i.C=!1,r.C=!0,e=r):(e===n.L&&(Cd(this,n),n=(e=n).U),n.C=!1,r.C=!0,Ed(this,r)),n=e.U;this._.C=!1},remove:function(e){e.N&&(e.N.P=e.P),e.P&&(e.P.N=e.N),e.N=e.P=null;var n,o,s,t=e.U,r=e.L,i=e.R;if(o=r?i?fP(i):r:i,t?t.L===e?t.L=o:t.R=o:this._=o,r&&i?(s=o.C,o.C=e.C,o.L=r,r.U=o,o!==i?(t=o.U,o.U=e.U,t.L=e=o.R,o.R=i,i.U=o):(o.U=t,t=o,e=o.R)):(s=e.C,e=o),e&&(e.U=t),!s){if(e&&e.C)return void(e.C=!1);do{if(e===this._)break;if(e===t.L){if((n=t.R).C&&(n.C=!1,t.C=!0,Ed(this,t),n=t.R),n.L&&n.L.C||n.R&&n.R.C){(!n.R||!n.R.C)&&(n.L.C=!1,n.C=!0,Cd(this,n),n=t.R),n.C=t.C,t.C=n.R.C=!1,Ed(this,t),e=this._;break}}else if((n=t.L).C&&(n.C=!1,t.C=!0,Cd(this,t),n=t.L),n.L&&n.L.C||n.R&&n.R.C){(!n.L||!n.L.C)&&(n.R.C=!1,n.C=!0,Ed(this,n),n=t.L),n.C=t.C,t.C=n.L.C=!1,Cd(this,t),e=this._;break}n.C=!0,e=t,t=t.U}while(!e.C);e&&(e.C=!1)}}};const dP=D_;function xd(e,t,n,r){var i=[null,null],o=br.push(i)-1;return i.left=e,i.right=t,n&&Um(i,e,t,n),r&&Um(i,t,e,r),oi[e.index].halfedges.push(o),oi[t.index].halfedges.push(o),i}function Md(e,t,n){var r=[t,n];return r.left=e,r}function Um(e,t,n,r){e[0]||e[1]?e.left===n?e[1]=r:e[0]=r:(e[0]=r,e.left=t,e.right=n)}function Cee(e,t,n,r,i){var v,o=e[0],s=e[1],a=o[0],u=o[1],d=0,h=1,g=s[0]-a,y=s[1]-u;if(v=t-a,g||!(v>0)){if(v/=g,g<0){if(v<d)return;v<h&&(h=v)}else if(g>0){if(v>h)return;v>d&&(d=v)}if(v=r-a,g||!(v<0)){if(v/=g,g<0){if(v>h)return;v>d&&(d=v)}else if(g>0){if(v<d)return;v<h&&(h=v)}if(v=n-u,y||!(v>0)){if(v/=y,y<0){if(v<d)return;v<h&&(h=v)}else if(y>0){if(v>h)return;v>d&&(d=v)}if(v=i-u,y||!(v<0)){if(v/=y,y<0){if(v>h)return;v>d&&(d=v)}else if(y>0){if(v<d)return;v<h&&(h=v)}return!(d>0)&&!(h<1)||(d>0&&(e[0]=[a+d*g,u+d*y]),h<1&&(e[1]=[a+h*g,u+h*y])),!0}}}}}function xee(e,t,n,r,i){var o=e[1];if(o)return!0;var v,b,s=e[0],a=e.left,u=e.right,c=a[0],l=a[1],d=u[0],h=u[1],g=(c+d)/2;if(h===l){if(g<t||g>=r)return;if(c>d){if(s){if(s[1]>=i)return}else s=[g,n];o=[g,i]}else{if(s){if(s[1]<n)return}else s=[g,i];o=[g,n]}}else if(b=(l+h)/2-(v=(c-d)/(h-l))*g,v<-1||v>1)if(c>d){if(s){if(s[1]>=i)return}else s=[(n-b)/v,n];o=[(i-b)/v,i]}else{if(s){if(s[1]<n)return}else s=[(i-b)/v,i];o=[(n-b)/v,n]}else if(l<h){if(s){if(s[0]>=r)return}else s=[t,v*t+b];o=[r,v*r+b]}else{if(s){if(s[0]<t)return}else s=[r,v*r+b];o=[t,v*t+b]}return e[0]=s,e[1]=o,!0}function See(e,t){var n=e.site,r=t.left,i=t.right;return n===i&&(i=r,r=n),i?Math.atan2(i[1]-r[1],i[0]-r[0]):(n===r?(r=t[1],i=t[0]):(r=t[0],i=t[1]),Math.atan2(r[0]-i[0],i[1]-r[1]))}function hP(e,t){return t[+(t.left!==e.site)]}function Tee(e,t){return t[+(t.left===e.site)]}var E_,pP=[];function kee(){Hm(this),this.x=this.y=this.arc=this.site=this.cy=null}function Lc(e){var t=e.P,n=e.N;if(t&&n){var r=t.site,i=e.site,o=n.site;if(r!==o){var s=i[0],a=i[1],u=r[0]-s,c=r[1]-a,l=o[0]-s,d=o[1]-a,h=2*(u*d-c*l);if(!(h>=-Lee)){var g=u*u+c*c,y=l*l+d*d,v=(d*g-c*y)/h,b=(u*y-l*g)/h,_=pP.pop()||new kee;_.arc=e,_.site=i,_.x=v+s,_.y=(_.cy=b+a)+Math.sqrt(v*v+b*b),e.circle=_;for(var E=null,C=Id._;C;)if(_.y<C.y||_.y===C.y&&_.x<=C.x){if(!C.L){E=C.P;break}C=C.L}else{if(!C.R){E=C;break}C=C.R}Id.insert(E,_),E||(E_=_)}}}}function Bc(e){var t=e.circle;t&&(t.P||(E_=t.N),Id.remove(t),pP.push(t),Hm(t),e.circle=null)}var gP=[];function Oee(){Hm(this),this.edge=this.site=this.circle=null}function mP(e){var t=gP.pop()||new Oee;return t.site=e,t}function C_(e){Bc(e),jc.remove(e),gP.push(e),Hm(e)}function Ree(e){var t=e.circle,n=t.x,r=t.cy,i=[n,r],o=e.P,s=e.N,a=[e];C_(e);for(var u=o;u.circle&&Math.abs(n-u.circle.x)<un&&Math.abs(r-u.circle.cy)<un;)o=u.P,a.unshift(u),C_(u),u=o;a.unshift(u),Bc(u);for(var c=s;c.circle&&Math.abs(n-c.circle.x)<un&&Math.abs(r-c.circle.cy)<un;)s=c.N,a.push(c),C_(c),c=s;a.push(c),Bc(c);var d,l=a.length;for(d=1;d<l;++d)Um((c=a[d]).edge,(u=a[d-1]).site,c.site,i);(c=a[l-1]).edge=xd((u=a[0]).site,c.site,null,i),Lc(u),Lc(c)}function Pee(e){for(var r,i,o,s,t=e[0],n=e[1],a=jc._;a;)if((o=yP(a,n)-t)>un)a=a.L;else{if(!((s=t-Fee(a,n))>un)){o>-un?(r=a.P,i=a):s>-un?(r=a,i=a.N):r=i=a;break}if(!a.R){r=a;break}a=a.R}!function Iee(e){oi[e.index]={site:e,halfedges:[]}}(e);var u=mP(e);if(jc.insert(r,u),r||i){if(r===i)return Bc(r),i=mP(r.site),jc.insert(u,i),u.edge=i.edge=xd(r.site,u.site),Lc(r),void Lc(i);if(!i)return void(u.edge=xd(r.site,u.site));Bc(r),Bc(i);var c=r.site,l=c[0],d=c[1],h=e[0]-l,g=e[1]-d,y=i.site,v=y[0]-l,b=y[1]-d,_=2*(h*b-g*v),E=h*h+g*g,C=v*v+b*b,I=[(b*E-g*C)/_+l,(h*C-v*E)/_+d];Um(i.edge,c,y,I),u.edge=xd(c,e,null,I),i.edge=xd(e,y,null,I),Lc(r),Lc(i)}}function yP(e,t){var n=e.site,r=n[0],i=n[1],o=i-t;if(!o)return r;var s=e.P;if(!s)return-1/0;var a=(n=s.site)[0],u=n[1],c=u-t;if(!c)return a;var l=a-r,d=1/o-1/c,h=l/c;return d?(-h+Math.sqrt(h*h-2*d*(l*l/(-2*c)-u+c/2+i-o/2)))/d+r:(r+a)/2}function Fee(e,t){var n=e.N;if(n)return yP(n,t);var r=e.site;return r[1]===t?r[0]:1/0}var jc,oi,Id,br,un=1e-6,Lee=1e-12;function Bee(e,t,n){return(e[0]-n[0])*(t[1]-e[1])-(e[0]-t[0])*(n[1]-e[1])}function jee(e,t){return t[1]-e[1]||t[0]-e[0]}function x_(e,t){var r,i,o,n=e.sort(jee).pop();for(br=[],oi=new Array(e.length),jc=new dP,Id=new dP;;)if(o=E_,n&&(!o||n[1]<o.y||n[1]===o.y&&n[0]<o.x))(n[0]!==r||n[1]!==i)&&(Pee(n),r=n[0],i=n[1]),n=e.pop();else{if(!o)break;Ree(o.arc)}if(function Nee(){for(var n,r,i,o,e=0,t=oi.length;e<t;++e)if((n=oi[e])&&(o=(r=n.halfedges).length)){var s=new Array(o),a=new Array(o);for(i=0;i<o;++i)s[i]=i,a[i]=See(n,br[r[i]]);for(s.sort(function(u,c){return a[c]-a[u]}),i=0;i<o;++i)a[i]=r[s[i]];for(i=0;i<o;++i)r[i]=a[i]}}(),t){var s=+t[0][0],a=+t[0][1],u=+t[1][0],c=+t[1][1];(function Mee(e,t,n,r){for(var o,i=br.length;i--;)xee(o=br[i],e,t,n,r)&&Cee(o,e,t,n,r)&&(Math.abs(o[0][0]-o[1][0])>un||Math.abs(o[0][1]-o[1][1])>un)||delete br[i]})(s,a,u,c),function Aee(e,t,n,r){var o,s,a,u,c,l,d,h,g,y,v,b,i=oi.length,_=!0;for(o=0;o<i;++o)if(s=oi[o]){for(a=s.site,u=(c=s.halfedges).length;u--;)br[c[u]]||c.splice(u,1);for(u=0,l=c.length;u<l;)v=(y=Tee(s,br[c[u]]))[0],b=y[1],h=(d=hP(s,br[c[++u%l]]))[0],g=d[1],(Math.abs(v-h)>un||Math.abs(b-g)>un)&&(c.splice(u,0,br.push(Md(a,y,Math.abs(v-e)<un&&r-b>un?[e,Math.abs(h-e)<un?g:r]:Math.abs(b-r)<un&&n-v>un?[Math.abs(g-r)<un?h:n,r]:Math.abs(v-n)<un&&b-t>un?[n,Math.abs(h-n)<un?g:t]:Math.abs(b-t)<un&&v-e>un?[Math.abs(g-t)<un?h:e,t]:null))-1),++l);l&&(_=!1)}if(_){var E,C,I,R=1/0;for(o=0,_=null;o<i;++o)(s=oi[o])&&(I=(E=(a=s.site)[0]-e)*E+(C=a[1]-t)*C)<R&&(R=I,_=s);if(_){var G=[e,t],z=[e,r],de=[n,r],oe=[n,t];_.halfedges.push(br.push(Md(a=_.site,G,z))-1,br.push(Md(a,z,de))-1,br.push(Md(a,de,oe))-1,br.push(Md(a,oe,G))-1)}}for(o=0;o<i;++o)(s=oi[o])&&(s.halfedges.length||delete oi[o])}(s,a,u,c)}this.edges=br,this.cells=oi,jc=Id=br=oi=null}function Vee(){var e=Dee,t=Eee,n=null;function r(i){return new x_(i.map(function(o,s){var a=[Math.round(e(o,s,i)/un)*un,Math.round(t(o,s,i)/un)*un];return a.index=s,a.data=o,a}),n)}return r.polygons=function(i){return r(i).polygons()},r.links=function(i){return r(i).links()},r.triangles=function(i){return r(i).triangles()},r.x=function(i){return arguments.length?(e="function"==typeof i?i:lP(+i),r):e},r.y=function(i){return arguments.length?(t="function"==typeof i?i:lP(+i),r):t},r.extent=function(i){return arguments.length?(n=null==i?null:[[+i[0][0],+i[0][1]],[+i[1][0],+i[1][1]]],r):n&&[[n[0][0],n[0][1]],[n[1][0],n[1][1]]]},r.size=function(i){return arguments.length?(n=null==i?null:[[0,0],[+i[0],+i[1]]],r):n&&[n[1][0]-n[0][0],n[1][1]-n[0][1]]},r}function $m(e){return function(){return e}}function Hee(e,t,n){this.target=e,this.type=t,this.transform=n}function ns(e,t,n){this.k=e,this.x=t,this.y=n}x_.prototype={constructor:x_,polygons:function(){var e=this.edges;return this.cells.map(function(t){var n=t.halfedges.map(function(r){return hP(t,e[r])});return n.data=t.site.data,n})},triangles:function(){var e=[],t=this.edges;return this.cells.forEach(function(n,r){if(a=(o=n.halfedges).length)for(var o,a,u,i=n.site,s=-1,c=t[o[a-1]],l=c.left===i?c.right:c.left;++s<a;)u=l,l=(c=t[o[s]]).left===i?c.right:c.left,u&&l&&r<u.index&&r<l.index&&Bee(i,u,l)<0&&e.push([i.data,u.data,l.data])}),e},links:function(){return this.edges.filter(function(e){return e.right}).map(function(e){return{source:e.left.data,target:e.right.data}})},find:function(e,t,n){for(var i,a,r=this,o=r._found||0,s=r.cells.length;!(a=r.cells[o]);)if(++o>=s)return null;var u=e-a.site[0],c=t-a.site[1],l=u*u+c*c;do{a=r.cells[i=o],o=null,a.halfedges.forEach(function(d){var h=r.edges[d],g=h.left;if(g!==a.site&&g||(g=h.right)){var y=e-g[0],v=t-g[1],b=y*y+v*v;b<l&&(l=b,o=g.index)}})}while(null!==o);return r._found=i,null==n||l<=n*n?a.site:null}},ns.prototype={constructor:ns,scale:function(e){return 1===e?this:new ns(this.k*e,this.x,this.y)},translate:function(e,t){return 0===e&0===t?this:new ns(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var zm=new ns(1,0,0);function M_(e){for(;!e.__zoom;)if(!(e=e.parentNode))return zm;return e.__zoom}function I_(){Ue.stopImmediatePropagation()}function Sd(){Ue.preventDefault(),Ue.stopImmediatePropagation()}function Uee(){return!Ue.ctrlKey&&!Ue.button}function $ee(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e).hasAttribute("viewBox")?[[(e=e.viewBox.baseVal).x,e.y],[e.x+e.width,e.y+e.height]]:[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]:[[0,0],[e.clientWidth,e.clientHeight]]}function vP(){return this.__zoom||zm}function zee(){return-Ue.deltaY*(1===Ue.deltaMode?.05:Ue.deltaMode?1:.002)}function Gee(){return navigator.maxTouchPoints||"ontouchstart"in this}function qee(e,t,n){var r=e.invertX(t[0][0])-n[0][0],i=e.invertX(t[1][0])-n[1][0],o=e.invertY(t[0][1])-n[0][1],s=e.invertY(t[1][1])-n[1][1];return e.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),s>o?(o+s)/2:Math.min(0,o)||Math.max(0,s))}function bP(){var l,d,e=Uee,t=$ee,n=qee,r=zee,i=Gee,o=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],a=250,u=Tk,c=uc("start","zoom","end"),h=500,g=150,y=0;function v(T){T.property("__zoom",vP).on("wheel.zoom",G).on("mousedown.zoom",z).on("dblclick.zoom",de).filter(i).on("touchstart.zoom",oe).on("touchmove.zoom",fe).on("touchend.zoom touchcancel.zoom",re).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function b(T,te){return(te=Math.max(o[0],Math.min(o[1],te)))===T.k?T:new ns(te,T.x,T.y)}function _(T,te,Ce){var X=te[0]-Ce[0]*T.k,we=te[1]-Ce[1]*T.k;return X===T.x&&we===T.y?T:new ns(T.k,X,we)}function E(T){return[(+T[0][0]+ +T[1][0])/2,(+T[0][1]+ +T[1][1])/2]}function C(T,te,Ce){T.on("start.zoom",function(){I(this,arguments).start()}).on("interrupt.zoom end.zoom",function(){I(this,arguments).end()}).tween("zoom",function(){var X=this,we=arguments,Ye=I(X,we),Be=t.apply(X,we),tt=null==Ce?E(Be):"function"==typeof Ce?Ce.apply(X,we):Ce,Ct=Math.max(Be[1][0]-Be[0][0],Be[1][1]-Be[0][1]),Dt=X.__zoom,on="function"==typeof te?te.apply(X,we):te,Jt=u(Dt.invert(tt).concat(Ct/Dt.k),on.invert(tt).concat(Ct/on.k));return function(ne){if(1===ne)ne=on;else{var Ze=Jt(ne),ht=Ct/Ze[2];ne=new ns(ht,tt[0]-Ze[0]*ht,tt[1]-Ze[1]*ht)}Ye.zoom(null,ne)}})}function I(T,te,Ce){return!Ce&&T.__zooming||new R(T,te)}function R(T,te){this.that=T,this.args=te,this.active=0,this.extent=t.apply(T,te),this.taps=0}function G(){if(e.apply(this,arguments)){var T=I(this,arguments),te=this.__zoom,Ce=Math.max(o[0],Math.min(o[1],te.k*Math.pow(2,r.apply(this,arguments)))),X=_a(this);if(T.wheel)(T.mouse[0][0]!==X[0]||T.mouse[0][1]!==X[1])&&(T.mouse[1]=te.invert(T.mouse[0]=X)),clearTimeout(T.wheel);else{if(te.k===Ce)return;T.mouse=[X,te.invert(X)],Ea(this),T.start()}Sd(),T.wheel=setTimeout(function we(){T.wheel=null,T.end()},g),T.zoom("mouse",n(_(b(te,Ce),T.mouse[0],T.mouse[1]),T.extent,s))}}function z(){if(!d&&e.apply(this,arguments)){var T=I(this,arguments,!0),te=rn(Ue.view).on("mousemove.zoom",function Ye(){if(Sd(),!T.moved){var tt=Ue.clientX-X,Ct=Ue.clientY-we;T.moved=tt*tt+Ct*Ct>y}T.zoom("mouse",n(_(T.that.__zoom,T.mouse[0]=_a(T.that),T.mouse[1]),T.extent,s))},!0).on("mouseup.zoom",function Be(){te.on("mousemove.zoom mouseup.zoom",null),Qp(Ue.view,T.moved),Sd(),T.end()},!0),Ce=_a(this),X=Ue.clientX,we=Ue.clientY;Kp(Ue.view),I_(),T.mouse=[Ce,this.__zoom.invert(Ce)],Ea(this),T.start()}}function de(){if(e.apply(this,arguments)){var T=this.__zoom,te=_a(this),Ce=T.invert(te),we=n(_(b(T,T.k*(Ue.shiftKey?.5:2)),te,Ce),t.apply(this,arguments),s);Sd(),a>0?rn(this).transition().duration(a).call(C,we,te):rn(this).call(v.transform,we)}}function oe(){if(e.apply(this,arguments)){var X,we,Ye,Be,T=Ue.touches,te=T.length,Ce=I(this,arguments,Ue.changedTouches.length===te);for(I_(),we=0;we<te;++we)Be=[Be=Nf(this,T,(Ye=T[we]).identifier),this.__zoom.invert(Be),Ye.identifier],Ce.touch0?!Ce.touch1&&Ce.touch0[2]!==Be[2]&&(Ce.touch1=Be,Ce.taps=0):(Ce.touch0=Be,X=!0,Ce.taps=1+!!l);l&&(l=clearTimeout(l)),X&&(Ce.taps<2&&(l=setTimeout(function(){l=null},h)),Ea(this),Ce.start())}}function fe(){if(this.__zooming){var X,we,Ye,Be,T=I(this,arguments),te=Ue.changedTouches,Ce=te.length;for(Sd(),l&&(l=clearTimeout(l)),T.taps=0,X=0;X<Ce;++X)Ye=Nf(this,te,(we=te[X]).identifier),T.touch0&&T.touch0[2]===we.identifier?T.touch0[0]=Ye:T.touch1&&T.touch1[2]===we.identifier&&(T.touch1[0]=Ye);if(we=T.that.__zoom,T.touch1){var tt=T.touch0[0],Ct=T.touch0[1],Dt=T.touch1[0],on=T.touch1[1],Jt=(Jt=Dt[0]-tt[0])*Jt+(Jt=Dt[1]-tt[1])*Jt,ne=(ne=on[0]-Ct[0])*ne+(ne=on[1]-Ct[1])*ne;we=b(we,Math.sqrt(Jt/ne)),Ye=[(tt[0]+Dt[0])/2,(tt[1]+Dt[1])/2],Be=[(Ct[0]+on[0])/2,(Ct[1]+on[1])/2]}else{if(!T.touch0)return;Ye=T.touch0[0],Be=T.touch0[1]}T.zoom("touch",n(_(we,Ye,Be),T.extent,s))}}function re(){if(this.__zooming){var X,we,T=I(this,arguments),te=Ue.changedTouches,Ce=te.length;for(I_(),d&&clearTimeout(d),d=setTimeout(function(){d=null},h),X=0;X<Ce;++X)we=te[X],T.touch0&&T.touch0[2]===we.identifier?delete T.touch0:T.touch1&&T.touch1[2]===we.identifier&&delete T.touch1;if(T.touch1&&!T.touch0&&(T.touch0=T.touch1,delete T.touch1),T.touch0)T.touch0[1]=this.__zoom.invert(T.touch0[0]);else if(T.end(),2===T.taps){var Ye=rn(this).on("dblclick.zoom");Ye&&Ye.apply(this,arguments)}}}return v.transform=function(T,te,Ce){var X=T.selection?T.selection():T;X.property("__zoom",vP),T!==X?C(T,te,Ce):X.interrupt().each(function(){I(this,arguments).start().zoom(null,"function"==typeof te?te.apply(this,arguments):te).end()})},v.scaleBy=function(T,te,Ce){v.scaleTo(T,function(){return this.__zoom.k*("function"==typeof te?te.apply(this,arguments):te)},Ce)},v.scaleTo=function(T,te,Ce){v.transform(T,function(){var X=t.apply(this,arguments),we=this.__zoom,Ye=null==Ce?E(X):"function"==typeof Ce?Ce.apply(this,arguments):Ce,Be=we.invert(Ye),tt="function"==typeof te?te.apply(this,arguments):te;return n(_(b(we,tt),Ye,Be),X,s)},Ce)},v.translateBy=function(T,te,Ce){v.transform(T,function(){return n(this.__zoom.translate("function"==typeof te?te.apply(this,arguments):te,"function"==typeof Ce?Ce.apply(this,arguments):Ce),t.apply(this,arguments),s)})},v.translateTo=function(T,te,Ce,X){v.transform(T,function(){var we=t.apply(this,arguments),Ye=this.__zoom,Be=null==X?E(we):"function"==typeof X?X.apply(this,arguments):X;return n(zm.translate(Be[0],Be[1]).scale(Ye.k).translate("function"==typeof te?-te.apply(this,arguments):-te,"function"==typeof Ce?-Ce.apply(this,arguments):-Ce),we,s)},X)},R.prototype={start:function(){return 1==++this.active&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(T,te){return this.mouse&&"mouse"!==T&&(this.mouse[1]=te.invert(this.mouse[0])),this.touch0&&"touch"!==T&&(this.touch0[1]=te.invert(this.touch0[0])),this.touch1&&"touch"!==T&&(this.touch1[1]=te.invert(this.touch1[0])),this.that.__zoom=te,this.emit("zoom"),this},end:function(){return 0==--this.active&&(delete this.that.__zooming,this.emit("end")),this},emit:function(T){xf(new Hee(v,T,this.that.__zoom),c.apply,c,[T,this.that,this.args])}},v.wheelDelta=function(T){return arguments.length?(r="function"==typeof T?T:$m(+T),v):r},v.filter=function(T){return arguments.length?(e="function"==typeof T?T:$m(!!T),v):e},v.touchable=function(T){return arguments.length?(i="function"==typeof T?T:$m(!!T),v):i},v.extent=function(T){return arguments.length?(t="function"==typeof T?T:$m([[+T[0][0],+T[0][1]],[+T[1][0],+T[1][1]]]),v):t},v.scaleExtent=function(T){return arguments.length?(o[0]=+T[0],o[1]=+T[1],v):[o[0],o[1]]},v.translateExtent=function(T){return arguments.length?(s[0][0]=+T[0][0],s[1][0]=+T[1][0],s[0][1]=+T[0][1],s[1][1]=+T[1][1],v):[[s[0][0],s[0][1]],[s[1][0],s[1][1]]]},v.constrain=function(T){return arguments.length?(n=T,v):n},v.duration=function(T){return arguments.length?(a=+T,v):a},v.interpolate=function(T){return arguments.length?(u=T,v):u},v.on=function(){var T=c.on.apply(c,arguments);return T===c?v:T},v.clickDistance=function(T){return arguments.length?(y=(T=+T)*T,v):Math.sqrt(y)},v}M_.prototype=ns.prototype;class Wee extends ln{constructor(t,n){super()}schedule(t,n=0){return this}}class Yee extends Wee{constructor(t,n){super(t,n),this.scheduler=t,this.work=n,this.pending=!1}schedule(t,n=0){if(this.closed)return this;this.state=t;const r=this.id,i=this.scheduler;return null!=r&&(this.id=this.recycleAsyncId(i,r,n)),this.pending=!0,this.delay=n,this.id=this.id||this.requestAsyncId(i,this.id,n),this}requestAsyncId(t,n,r=0){return setInterval(t.flush.bind(t,this),r)}recycleAsyncId(t,n,r=0){if(null!==r&&this.delay===r&&!1===this.pending)return n;clearInterval(n)}execute(t,n){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;const r=this._execute(t,n);if(r)return r;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(t,n){let i,r=!1;try{this.work(t)}catch(o){r=!0,i=!!o&&o||new Error(o)}if(r)return this.unsubscribe(),i}_unsubscribe(){const t=this.id,n=this.scheduler,r=n.actions,i=r.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==i&&r.splice(i,1),null!=t&&(this.id=this.recycleAsyncId(n,t,null)),this.delay=null}}let wP=(()=>{class e{constructor(n,r=e.now){this.SchedulerAction=n,this.now=r}schedule(n,r=0,i){return new this.SchedulerAction(this,n).schedule(i,r)}}return e.now=()=>Date.now(),e})();class Ls extends wP{constructor(t,n=wP.now){super(t,()=>Ls.delegate&&Ls.delegate!==this?Ls.delegate.now():n()),this.actions=[],this.active=!1,this.scheduled=void 0}schedule(t,n=0,r){return Ls.delegate&&Ls.delegate!==this?Ls.delegate.schedule(t,n,r):super.schedule(t,n,r)}flush(t){const{actions:n}=this;if(this.active)return void n.push(t);let r;this.active=!0;do{if(r=t.execute(t.state,t.delay))break}while(t=n.shift());if(this.active=!1,r){for(;t=n.shift();)t.unsubscribe();throw r}}}const Zee=new class Qee extends Ls{}(class Kee extends Yee{constructor(t,n){super(t,n),this.scheduler=t,this.work=n}schedule(t,n=0){return n>0?super.schedule(t,n):(this.delay=n,this.state=t,this.scheduler.flush(this),this)}execute(t,n){return n>0||this.closed?super.execute(t,n):this._execute(t,n)}requestAsyncId(t,n,r=0){return null!==r&&r>0||null===r&&this.delay>0?super.requestAsyncId(t,n,r):t.flush(this)}}),Xee=new Yr(e=>e.complete());function _P(e,t){return new Yr(n=>{const r=new ln;let i=0;return r.add(t.schedule(function(){i!==e.length?(n.next(e[i++]),n.closed||r.add(this.schedule())):n.complete()})),r})}function ste({error:e,subscriber:t}){t.error(e)}class _i{constructor(t,n,r){this.kind=t,this.value=n,this.error=r,this.hasValue="N"===t}observe(t){switch(this.kind){case"N":return t.next&&t.next(this.value);case"E":return t.error&&t.error(this.error);case"C":return t.complete&&t.complete()}}do(t,n,r){switch(this.kind){case"N":return t&&t(this.value);case"E":return n&&n(this.error);case"C":return r&&r()}}accept(t,n,r){return t&&"function"==typeof t.next?this.observe(t):this.do(t,n,r)}toObservable(){switch(this.kind){case"N":return function ite(...e){let t=e[e.length-1];return function tte(e){return e&&"function"==typeof e.schedule}(t)?(e.pop(),_P(e,t)):function rte(e,t){return t?_P(e,t):new Yr((e=>t=>{for(let n=0,r=e.length;n<r&&!t.closed;n++)t.next(e[n]);t.complete()})(e))}(e)}(this.value);case"E":return function ote(e,t){return new Yr(t?n=>t.schedule(ste,0,{error:e,subscriber:n}):n=>n.error(e))}(this.error);case"C":return function Jee(e){return e?function ete(e){return new Yr(t=>e.schedule(()=>t.complete()))}(e):Xee}()}throw new Error("unexpected notification kind value")}static createNext(t){return typeof t<"u"?new _i("N",t):_i.undefinedValueNotification}static createError(t){return new _i("E",void 0,t)}static createComplete(){return _i.completeNotification}}_i.completeNotification=new _i("C"),_i.undefinedValueNotification=new _i("N",void 0);class Gm extends ur{constructor(t,n,r=0){super(t),this.scheduler=n,this.delay=r}static dispatch(t){const{notification:n,destination:r}=t;n.observe(r),this.unsubscribe()}scheduleMessage(t){this.destination.add(this.scheduler.schedule(Gm.dispatch,this.delay,new cte(t,this.destination)))}_next(t){this.scheduleMessage(_i.createNext(t))}_error(t){this.scheduleMessage(_i.createError(t)),this.unsubscribe()}_complete(){this.scheduleMessage(_i.createComplete()),this.unsubscribe()}}class cte{constructor(t,n){this.notification=t,this.destination=n}}class lte extends eo{constructor(t=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY,r){super(),this.scheduler=r,this._events=[],this._infiniteTimeWindow=!1,this._bufferSize=t<1?1:t,this._windowTime=n<1?1:n,n===Number.POSITIVE_INFINITY?(this._infiniteTimeWindow=!0,this.next=this.nextInfiniteTimeWindow):this.next=this.nextTimeWindow}nextInfiniteTimeWindow(t){if(!this.isStopped){const n=this._events;n.push(t),n.length>this._bufferSize&&n.shift()}super.next(t)}nextTimeWindow(t){this.isStopped||(this._events.push(new fte(this._getNow(),t)),this._trimBufferThenGetEvents()),super.next(t)}_subscribe(t){const n=this._infiniteTimeWindow,r=n?this._events:this._trimBufferThenGetEvents(),i=this.scheduler,o=r.length;let s;if(this.closed)throw new Ji;if(this.isStopped||this.hasError?s=ln.EMPTY:(this.observers.push(t),s=new Ka(this,t)),i&&t.add(t=new Gm(t,i)),n)for(let a=0;a<o&&!t.closed;a++)t.next(r[a]);else for(let a=0;a<o&&!t.closed;a++)t.next(r[a].value);return this.hasError?t.error(this.thrownError):this.isStopped&&t.complete(),s}_getNow(){return(this.scheduler||Zee).now()}_trimBufferThenGetEvents(){const t=this._getNow(),n=this._bufferSize,r=this._windowTime,i=this._events,o=i.length;let s=0;for(;s<o&&!(t-i[s].time<r);)s++;return o>n&&(s=Math.max(s,o-n)),s>0&&i.splice(0,s),i}}class fte{constructor(t,n){this.time=t,this.value=n}}var S_=B(5505);const DP=Symbol.for("Dexie"),qm=globalThis[DP]||(globalThis[DP]=S_);if(S_.semVer!==qm.semVer)throw new Error(`Two different versions of Dexie loaded in the same app: ${S_.semVer} and ${qm.semVer}`);const dte=qm;let EP=(()=>{class e extends dte{graphData;constructor(){super("GraphDatabase"),this.version(1).stores({graphData:"dataId"}),this.graphData=this.table("graphData")}saveGraphData(n){var r=this;return $(function*(){yield r.graphData.put(n)})()}getGraphData(n){var r=this;return $(function*(){return yield r.graphData.get(n)})()}deleteGraphData(n){var r=this;return $(function*(){yield r.graphData.delete(n)})()}static \u0275fac=function(r){return new(r||e)};static \u0275prov=At({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),hte=(()=>{class e{dexieService;constructor(n){this.dexieService=n}links=[];nodes=[];gBrush=null;brushMode=!1;brushing=!1;shiftKey;extent=null;zoom=!1;zoomToFit=!1;saveGraphData=new lte;update(n,r,i,o){const s=rn(r);return this.zoom=i,this.zoomToFit=o,this._update(le,s,n)}ticked(n,r,i){n.each(function(o,s,a){let u=o.target.x-o.source.x,c=o.target.y-o.source.y,l=Math.sqrt(u*u+c*c),d=40*u/l,h=40*c/l;rn(a[s]).attr("x1",o.source.x+d).attr("y1",o.source.y+h).attr("x2",o.target.x-d).attr("y2",o.target.y-h)}),r.attr("transform",function(o){return`translate(${o.x}, ${o.y+50})`}),i.attr("d",function(o){return`M ${o.source.x} ${o.source.y} L ${o.target.x} ${o.target.y}`}),i.attr("transform",function(o){if(o.target.x<o.source.x){const s=this.getBBox();return`rotate(180 ${s.x+s.width/2} ${s.y+s.height/2})`}return"rotate(0)"})}initDefinitions(n){const r=n.append("defs");function i(o,s,a){r.append("marker").attr("id",o).attr("viewBox","-0 -5 10 10").attr("refX",s).attr("refY",0).attr("orient","auto").attr("markerWidth",8).attr("markerHeight",8).attr("xoverflow","visible").append("svg:path").attr("d",a).attr("fill","#b4b4b4").style("stroke","none")}return i("arrowheadTarget",0,"M 0,-5 L 10 ,0 L 0,5"),i("arrowheadSource",2,"M 10 -5 L 0 0 L 10 5"),n}forceSimulation(n,{width:r,height:i}){return n.forceSimulation().velocityDecay(.1).force("link",n.forceLink().id(function(o){return o.id}).distance(500).strength(1)).force("charge",n.forceManyBody().strength(.1)).force("center",n.forceCenter(r/2,i/2)).force("collision",n.forceCollide().radius(15))}compareAndMarkNodesNew(n,r){const i=r.reduce((o,s)=>(o[s.id]=s,o),{});return n.forEach(o=>{i[o.id]||(o.newItem=!0,o.fx=null,o.fy=null)}),n}removeNewItem(n){for(const r of n)r.hasOwnProperty("newItem")&&delete r.newItem;return n}randomiseNodePositions(n,r,i){let o=100;const s=r*i;let a=n.length*o*o;if(a>s){for(;a>s&&o>0;)o-=10,a=n.length*o*o;if(a>s)throw new Error("Not enough space to accommodate all nodes without a fixed position.")}return n.forEach(u=>{if(null===u.fx&&null===u.fy){let c=o,l=!1;for(;!l&&c>0;)u.fx=crypto.getRandomValues(new Uint32Array(1))[0]%r,u.fy=crypto.getRandomValues(new Uint32Array(1))[0]%i,l=!n.some(d=>{if(null===d.fx||null===d.fy||d===u)return!1;const h=d.fx-u.fx,g=d.fy-u.fy;return Math.sqrt(h*h+g*g)<c}),l||c--;if(!l)throw new Error("Not enough space to accommodate all nodes without a fixed position.")}}),n}_update(n,r,i){var o=this;return $(function*(){const{nodes:s,links:a}=i;o.nodes=s||[],o.links=a||[],document.getElementById("save_graph").setAttribute("disabled","true");const c=n.select("svg").node().parentNode.clientWidth,l=n.select("svg").node().parentNode.clientHeight,d=yield o.dexieService.getGraphData("nodes"),h=d?d.nodes:[];Array.isArray(h)?(o.nodes=o.compareAndMarkNodesNew(s,h),yield o.dexieService.deleteGraphData("nodes"),yield o.dexieService.saveGraphData({dataId:"nodes",nodes:i.nodes,links:i.links})):yield o.dexieService.saveGraphData({dataId:"nodes",nodes:i.nodes,links:i.links}),o.nodes=o.randomiseNodePositions(o.nodes,c,l);const g=o.links.map(({lineStyle:ne,targetArrow:Ze,sourceArrow:ht,relationships:cn})=>cn.map(tn=>({parentLineStyle:ne,parentSourceArrow:ht,parentTargetArrow:Ze,...tn})));g.map(ne=>{ne.map((Ze,ht)=>{Ze.dy=20+15*ht})}),o.links=g.reduce((ne,Ze)=>ne.concat(Ze),[]),rn("svg").append("g");const y=n.select("svg g");let v=M_(rn("svg").node());const b=()=>{const ht=(v.k-.5)/(C.scaleExtent()[1]-.5)*200,cn=document.getElementById("zoom_level"),tn=`Zoom: ${ht.toFixed(0)}%`,qe=document.getElementById("zoom_in"),mt=document.getElementById("zoom_out"),xt=document.getElementById("zoom_reset");xt&&xt.setAttribute("disabled","true"),cn&&cn.innerHTML!==tn&&(cn.innerHTML=tn,cn.style.opacity="1",setTimeout(()=>{cn&&(cn.style.opacity="0")},2e3)),qe&&(200===ht?qe.setAttribute("disabled","true"):qe.removeAttribute("disabled")),mt&&(0===ht?mt.setAttribute("disabled","true"):mt.removeAttribute("disabled")),xt&&(100===ht?xt.setAttribute("disabled","true"):xt.removeAttribute("disabled"))};let _;const C=bP().scaleExtent([.5,1.5]).on("start",function(){rn(this).style("cursor",this.zoom?null:"grabbing")}).on("zoom",o.zoom?()=>{const ne=Ue.transform;y.attr("transform",`translate(${ne.x}, ${ne.y}) scale(${ne.k})`),v=ne,_=!0,b()}:null).on("end",function(){rn(this).style("cursor","grab")});r.call(C).style("cursor","grab").on(o.zoom?null:"wheel.zoom",null).on("dblclick.zoom",null),C.filter(()=>!Ue.shiftKey),rn("#zoom_in").on("click",function(){C.scaleBy(r.transition().duration(750),1.2),b()}),rn("#zoom_out").on("click",function(){C.scaleBy(r.transition().duration(750),.8),b()}),rn("#zoom_reset").on("click",function(){C.scaleTo(r.transition().duration(750),1),b()});const I=()=>{const ne=y.node().getBBox(),tn=Math.min((c-60)/ne.width,(l-60)/ne.height,1),qe=-ne.x*tn+(c-ne.width*tn)/2,mt=-ne.y*tn+(l-ne.height*tn)/2,Te=y.selectAll(".node-wrapper").nodes().reduce((gn,$t)=>{const Sn=$t.getBBox();return gn.x=Math.min(gn.x,Sn.x),gn.y=Math.min(gn.y,Sn.y),gn.width=Math.max(gn.width,Sn.x+Sn.width),gn.height=Math.max(gn.height,Sn.y+Sn.height),gn},{x:1/0,y:1/0,width:-1/0,height:-1/0});Te.x*tn>=0&&Te.y*tn>=0&&Te.width*tn<=c&&Te.height*tn<=l||(y.transition().duration(750).attr("transform","translate(0, 0) scale(1)"),y.transition().duration(750).attr("transform",`translate(${qe}, ${mt}) scale(${tn})`),_&&(v.x=qe,v.y=mt,v.k=tn),b())};rn("#zoom_to_fit").on("click",I),r.on("wheel",()=>{const ne=v.k,Ze=C.scaleExtent()[1],ht=C.scaleExtent()[0];(ne===Ze||ne===ht)&&Ue.preventDefault()}),o.initDefinitions(r);const R=o.forceSimulation(n,{width:+r.attr("width"),height:+r.attr("height")});let G=r.append("g"),z=q2().on("start",()=>{o.brushing=!0,Be.each(ne=>{ne.previouslySelected=o.shiftKey&&ne.selected}),n.selectAll(".edgelabel").style("font-weight",400).style("fill","#212529")}).on("brush",()=>{o.extent=Ue.selection,Ue.sourceEvent&&o.extent&&o.brushMode&&v&&(Be.classed("selected",ne=>ne.selected=ne.previouslySelected^(Ue.selection[0][0]<=ne.x*v.k+v.x&&ne.x*v.k+v.x<Ue.selection[1][0]&&Ue.selection[0][1]<=ne.y*v.k+v.y&&ne.y*v.k+v.y<Ue.selection[1][1])).select(".nodeText").classed("selected",ne=>ne.selected).style("fill",ne=>ne.selected?"blue":"#999").style("font-weight",ne=>ne.selected?700:400),o.extent=Ue.selection)}).on("end",()=>{!Ue.sourceEvent||!o.extent||!o.gBrush||(o.gBrush.call(z.move,null),o.brushMode||(o.gBrush.remove(),o.gBrush=null),o.brushing=!1,Be.select(".nodeText").filter(function(){return!rn(this.parentNode).classed("selected")}).style("fill","#212529").style("font-weight",400))});rn("body").on("keydown",()=>{z.filter(()=>Ue.shiftKey),z.keyModifiers(!1),16===Ue.keyCode&&(o.shiftKey=!0,o.gBrush||(o.brushMode=!0,o.gBrush=G.append("g").attr("class","brush"),o.gBrush.call(z)))}).on("keyup",()=>{o.shiftKey=!1,o.brushMode=!1,o.gBrush&&!o.brushing&&(o.gBrush.remove(),o.gBrush=null)});const fe=o.links.filter(({source:ne,target:Ze},ht,cn)=>ht===cn.findIndex(tn=>tn.source===ne&&tn.target===Ze)),re=y.selectAll().data(fe,function(ne){return ne.id});y.selectAll("line").data(re).exit().remove();const T=re.join("line").style("stroke",function(ne){return"Solid"===ne.parentLineStyle?"#777":"#b4b4b4"}).style("stroke-opacity",".6").style("stroke-dasharray",function(ne){return"Dotted"===ne.parentLineStyle?"8,5":null}).style("stroke-width","2px").attr("class","link").attr("id",function(ne){return`${ne.source?ne.source:""}_${ne.target?ne.target:""}_line`}).attr("marker-end",function(ne){return!0===ne.parentTargetArrow?"url(#arrowheadTarget)":null}).attr("marker-start",function(ne){return!0===ne.parentSourceArrow?"url(#arrowheadSource)":null});re.append("title").text(function(ne){return ne.label});const te=y.selectAll().data(o.links,function(ne){return ne.id});y.selectAll("path").data(te).exit().remove();const Ce=te.join("svg:path").attr("class","edgepath").attr("fill-opacity",0).attr("stroke-opacity",0).attr("id",function(ne,Ze){return"edgepath"+Ze}),X=y.selectAll().data(o.links,function(ne){return ne.id});y.selectAll("text").data(X).exit().remove();const we=X.enter().append("text").attr("class","edgelabel").attr("id",function(ne){return`${ne.source?ne.source:""}_${ne.target?ne.target:""}_text`}).style("text-anchor","middle").attr("font-size",14).attr("dy",function(ne){return ne.dy});we.append("textPath").attr("xlink:href",function(ne,Ze){return"#edgepath"+Ze}).style("cursor","pointer").attr("dominant-baseline","bottom").attr("startOffset","50%").text(function(ne){return ne.label}),we.selectAll("textPath").filter(function(ne){return ne.linkIcon}).append("tspan").style("fill","#856404").style("font-weight","700").attr("class","fa").text(" \uf0c1"),r.selectAll(".edgelabel").on("click",function(ne){n.event.stopPropagation(),Be.each(function(Ze){Ze.selected=!1,Ze.previouslySelected=!1}),Ye.classed("selected",!1),n.selectAll(".nodeText").style("fill","#212529").style("font-weight",400),n.selectAll(".edgelabel").style("font-weight",400).style("fill","#212529"),n.select(this).style("fill","blue").style("font-weight",700)});const Ye=y.selectAll().data(o.nodes,function(ne){return ne.id});y.selectAll("g").data(Ye).exit().remove();const Be=Ye.join("g").call(n.drag().on("start",function(Ze){document.getElementById("save_graph").removeAttribute("disabled"),n.event.active||R.alphaTarget(.9).restart(),!Ze.selected&&!this.shiftKey&&(Be.classed("selected",function(ht){return ht.selected=ht.previouslySelected=!1}),n.selectAll(".edgelabel").style("fill","#212529").style("font-weight",400),n.selectAll(".nodeText").style("font-weight",400).style("fill","#212529")),n.select(this).classed("selected",function(ht){return Ze.previouslySelected=Ze.selected,Ze.selected=!0}),Be.filter(function(ht){return ht.selected}).each(function(ht){ht.fx=ht.x,ht.fy=ht.y})}).on("drag",function(Ze){Be.filter(function(ht){return ht.selected}).each(function(ht){ht.fx+=n.event.dx,ht.fy+=n.event.dy})}).on("end",function(Ze){n.event.active||R.alphaTarget(.3).restart(),Ze.fx=Ze.x,Ze.fy=Ze.y,tt.saveGraphData.next(i)})).attr("class","node-wrapper").attr("id",function(ne){return ne.id}),tt=o;r.selectAll(".node-wrapper").on("click",function(ne){return n.event.stopPropagation(),ne.selected=!0,r.selectAll(".node-wrapper").classed("selected",!1),rn(this).classed("selected",!0),Be.each(function(Ze){Ze.selected=!1,Ze.previouslySelected=!1}),n.selectAll(".selected").selectAll(".nodeText").style("fill","#212529"),n.selectAll(".edgelabel").style("fill","#212529"),n.selectAll(".nodeText").style("fill","#212529").style("font-weight",400),n.select(this).select(".nodeText").style("fill","blue").style("font-weight",700),null}),n.select("svg").on("click",()=>{Be.each(function(ne){ne.selected=!1,ne.previouslySelected=!1}),Ye.classed("selected",!1),n.selectAll(".selected").selectAll(".nodeText").style("fill","#212529").style("font-weight",400),n.selectAll(".selected").classed("selected",!1),n.selectAll(".edgelabel").style("fill","#212529").style("font-weight",400)}),Be.filter(function(ne){return!(!ne.imageUrl||""===ne.imageUrl)||null}).append("image").attr("xlink:href",function(ne){return ne.imageUrl}).attr("x",-15).attr("y",-60).attr("class",function(ne){return`${ne.id?ne.id:""}_image`}).attr("id",function(ne){return`${ne.id?ne.id:""}`}).attr("width",32).attr("height",32).attr("class","image").style("cursor","pointer"),Be.filter(function(ne){return!(!ne.icon||""===ne.icon)||null}).append("text").text(function(ne){return ne.icon}).attr("x",-18).attr("y",-30).attr("class",function(ne){return`${ne.id?ne.id:""}_icon fa`}).attr("id",function(ne){return`${ne.id?ne.id:""}`}).style("font-size","35px").style("cursor","pointer"),Be.append("text").attr("id","nodeText").attr("class","nodeText").style("text-anchor","middle").style("cursor","pointer").attr("dy",-3).attr("y",-25).attr("testhook",function(ne){return`${ne.id?ne.id:""}_text`}).selectAll("tspan.text").data(ne=>ne.label).enter().append("tspan").attr("class","nodeTextTspan").text(ne=>ne).style("font-size","14px").attr("x",-10).attr("dx",10).attr("dy",15),Be.filter(function(ne){return!!ne.additionalIcon||null}).append("text").attr("id",function(ne){return`${ne.id?ne.id:""}_additionalIcon`}).attr("width",100).attr("height",25).attr("x",30).attr("y",-50).attr("class","fa").style("fill","#856404").text(function(ne){return ne.additionalIcon}),Be.filter(function(ne){return!!ne.newItem||null}).select("text").transition().duration(1e3).attr("fill","blue").attr("font-weight",700).attr("fill-opacity",1).transition().duration(1e3).attr("fill","blue").attr("font-weight",700).attr("fill-opacity",.1).transition().duration(1e3).attr("fill","blue").attr("font-weight",700).attr("fill-opacity",1).transition().duration(1e3).attr("fill","blue").attr("font-weight",700).attr("fill-opacity",.1).transition().duration(1e3).attr("fill","blue").attr("font-weight",700).attr("fill-opacity",1).transition().duration(1e3).attr("fill","#212529").attr("font-weight",400).attr("fill-opacity",1).on("end",function(){return rn(this).call(n.transition)}),Be.filter(function(ne){return!!ne.newItem||null}).select("image").transition().duration(1e3).attr("width",45).attr("height",45).transition().duration(1e3).attr("width",32).attr("height",32).transition().duration(1e3).attr("width",45).attr("height",45).transition().duration(1e3).attr("width",32).attr("height",32).transition().duration(1e3).attr("width",45).attr("height",45).transition().duration(1e3).attr("width",32).attr("height",32).on("end",function(){return rn(this).call(ub)}),o.nodes=o.removeNewItem(o.nodes),Be.append("title").text(function(ne){return ne.label});let on=0,Jt=!1;R.nodes(o.nodes).on("tick",()=>{o.zoomToFit&&on>=30&&!Jt?(R.stop(),I(),Jt=!0):(o.ticked(T,Be,Ce),on++)}),R.force("link").links(o.links),tt.saveGraphData.next(i)})()}resetGraph(n,r,i,o){this.nodes=[],this.links=[],this.update(n,r,i,o)}static \u0275fac=function(r){return new(r||e)(Rt(EP))};static \u0275prov=At({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();var T_=B(1060),CP=function(e){return e.LEFT_TO_RIGHT="LR",e.RIGHT_TO_LEFT="RL",e.TOP_TO_BOTTOM="TB",e.BOTTOM_TO_TOP="BT",e}(CP||{}),xP=function(e){return e.CENTER="C",e.UP_LEFT="UL",e.UP_RIGHT="UR",e.DOWN_LEFT="DL",e.DOWN_RIGHT="DR",e}(xP||{});let pte=(()=>{class e{defaultSettings={orientation:CP.LEFT_TO_RIGHT,marginX:70,marginY:70,edgePadding:200,rankPadding:300,nodePadding:100,curveDistance:20,multigraph:!0,compound:!0,align:xP.UP_RIGHT,acyclicer:void 0,ranker:"network-simplex"};dagreGraph;dagreNodes;dagreEdges;renderLayout(n){this.createDagreGraph(n),T_.layout(this.dagreGraph);for(const r in this.dagreGraph._nodes){const i=this.dagreGraph._nodes[r],o=n.nodes.find(s=>s.id===i.id);null===o.fx&&null===o.fy&&n.links.some(a=>a.source===i.id||a.target===i.id)&&(o.fx=i.x,o.fy=i.y),o.dimension={width:i.width,height:i.height}}return n}initRenderLayout(n){this.createDagreGraph(n),T_.layout(this.dagreGraph);let r=1/0;for(const i in this.dagreGraph._nodes){const o=this.dagreGraph._nodes[i],s=n.nodes.find(u=>u.id===o.id);n.links.some(u=>u.source===o.id||u.target===o.id)?(s.fx=o.x,s.fy=o.y,r=Math.min(r,o.y-this.defaultSettings.marginY)):(s.fx=null,s.fy=null),s.dimension={width:o.width,height:o.height}}if(r!==1/0)for(const i of n.nodes)null!==i.fy&&(i.fy-=r);return n}createDagreGraph(n){const r=Object.assign({},this.defaultSettings);this.dagreGraph=new T_.graphlib.Graph({compound:r.compound,multigraph:r.multigraph}),this.dagreGraph.setGraph({rankdir:r.orientation,marginx:r.marginX,marginy:r.marginY,edgesep:r.edgePadding,ranksep:r.rankPadding,nodesep:r.nodePadding,align:r.align,acyclicer:r.acyclicer,ranker:r.ranker,multigraph:r.multigraph,compound:r.compound}),this.dagreNodes=n.nodes.map(i=>{const o=Object.assign({},i);return o.width=20,o.height=20,o.x=i.fx,o.y=i.fy,o}),this.dagreEdges=n.links.map(i=>Object.assign({},i));for(const i of this.dagreNodes)i.width||(i.width=20),i.height||(i.height=30),this.dagreGraph.setNode(i.id,i);for(const i of this.dagreEdges)r.multigraph?this.dagreGraph.setEdge(i.source,i.target,i,i.linkId):this.dagreGraph.setEdge(i.source,i.target);return this.dagreGraph}static \u0275fac=function(r){return new(r||e)};static \u0275prov=At({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();const gte=["svgId"],mte=e=>({"fade-out":e});function yte(e,t){1&e&&(bs(0,"div",10),tc(1,"span",11),ws())}function vte(e,t){if(1&e&&(bs(0,"div",12)(1,"div",13),function yI(e,t=""){const n=me(),r=Bt(),i=e+Et,o=r.firstCreatePass?Ou(r,i,1,t,null):r.data[i],s=vI(r,n,o,t,e);n[i]=s,vl()&&Fh(r,n,s,o),po(o,!1)}(2," Saved "),tc(3,"i",14),ws()()),2&e){const n=KM();ku(),ec("ngClass",kI(1,mte,!n.showConfirmation))}}let bte=(()=>{class e{visualiserGraphService;dagreNodesOnlyLayout;dexieService;graphElement;saveGraphDataEvent=new vo;saveGraphData;width;savedGraphData;showConfirmation=!1;buttonBarRightPosition;zoom=!0;zoomToFit=!1;constructor(n,r,i){this.visualiserGraphService=n,this.dagreNodesOnlyLayout=r,this.dexieService=i}set data(n){var r=this;n&&n.dataId?(this.savedGraphData=n,setTimeout($(function*(){r.dagreNodesOnlyLayout.renderLayout(n),yield r.dexieService.saveGraphData(n),r.visualiserGraphService.update(n,r.graphElement.nativeElement,r.zoom,r.zoomToFit)}),500)):console.error("Invalid data input")}ngOnInit(){this.updateWidth(),this.buttonBarRightPosition="0",this.savedGraphData||(console.warn("No data provided, using empty data set"),this.data={dataId:"1",nodes:[],links:[]})}onResize(n){this.updateWidth()}updateWidth(){this.width=document.getElementById("pageId").offsetWidth}onConfirmSave(){var n=this;return $(function*(){var r;n.savedGraphData?bootbox.confirm({title:"Save Graph",centerVertical:!0,message:"Are you sure you want to save the graph?",buttons:{confirm:{label:"Yes",className:"btn-success"},cancel:{label:"No",className:"btn-danger"}},callback:(r=$(function*(i){i&&(n.visualiserGraphService.saveGraphData.subscribe(o=>{n.saveGraphData=o}),n.saveGraphDataEvent.emit(n.saveGraphData),n.disableButtons(!0),n.data=n.saveGraphData,n.showConfirmationMessage())}),function(o){return r.apply(this,arguments)})}):console.error("savedGraphData is not set")})()}disableButtons(n){document.querySelectorAll("#save_graph, #reset_graph").forEach(r=>{r.setAttribute("disabled",String(n))})}showConfirmationMessage(){this.showConfirmation=!0,setTimeout(()=>{this.showConfirmation=!1},3e3)}static \u0275fac=function(r){return new(r||e)(kt(hte),kt(pte),kt(EP))};static \u0275cmp=Ge({type:e,selectors:[["visualiser-graph"]],viewQuery:function(r,i){if(1&r&&function oI(e,t,n){WC(e,t,n)}(gte,5),2&r){let o;(function sI(e){const t=me(),n=Bt(),r=T0();uh(r+1);const i=tv(n,r);if(e.dirty&&function n3(e){return!(4&~e[st])}(t)===!(2&~i.metadata.flags)){if(null===i.matches)e.reset([]);else{const o=QC(t,r);e.reset(o,LD),e.notifyOnChanges()}return!0}return!1})(o=aI())&&(i.graphElement=o.first)}},inputs:{zoom:"zoom",zoomToFit:"zoomToFit",data:"data"},outputs:{saveGraphDataEvent:"saveGraphDataEvent"},decls:10,vars:5,consts:[["svgId",""],["id","pageId",1,"page",3,"resize"],[1,"buttonBar"],[1,"d-flex","justify-content-end"],["role","group","aria-label","Controls",1,"btn-group"],["type","button","id","save_graph","data-toggle","tooltip","data-placement","top","title","Save data",1,"m-3","btn","btn-secondary",3,"click"],[1,"bi","bi-save"],["class","zoomIndicator",4,"ngIf"],["class","confirmation-message-container",4,"ngIf"],["height","780"],[1,"zoomIndicator"],["id","zoom_level"],[1,"confirmation-message-container"],["role","alert",1,"alert","alert-success","confirmation-message",3,"ngClass"],[1,"bi","bi-check-circle"]],template:function(r,i){if(1&r){const o=function gM(){return me()}();bs(0,"div",1),cf("resize",function(a){return E0(o),C0(i.onResize(a))},0,TE),bs(1,"div",2)(2,"div",3)(3,"div",4)(4,"button",5),cf("click",function(){return E0(o),C0(i.onConfirmSave())}),tc(5,"i",6),ws()()()(),Lu(6,yte,2,0,"div",7)(7,vte,4,3,"div",8),function hD(){bt.lFrame.currentNamespace="svg"}(),tc(8,"svg",9,0),ws()}2&r&&(ku(),wv("right",i.buttonBarRightPosition),ku(5),ec("ngIf",i.zoom),ku(),ec("ngIf",i.showConfirmation),ku(),gv("width",i.width))},dependencies:[sT,cT],styles:["#zoom_level[_ngcontent-%COMP%]{position:relative;background-color:#000c;color:#fff;padding:5px;border-radius:5px;opacity:0;transition:opacity 1s ease-in-out}.zoomIndicator[_ngcontent-%COMP%]{position:absolute;left:0;padding:10px}.buttonBar[_ngcontent-%COMP%]{position:absolute;padding:10px}.confirmation-message-container[_ngcontent-%COMP%]{position:absolute;left:50%;transform:translate(-50%)}.confirmation-message[_ngcontent-%COMP%]{position:relative;top:60px;opacity:0;animation:_ngcontent-%COMP%_fade-in .5s ease-in-out forwards}@keyframes _ngcontent-%COMP%_fade-in{0%{opacity:0}to{opacity:1}}.fade-out[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_fade-out .5s ease-in-out forwards}@keyframes _ngcontent-%COMP%_fade-out{0%{opacity:1}to{opacity:0}}"]})}return e})(),wte=(()=>{class e{title="ngx-relationship-visualiser";mockedData=GH;saveGraphData(n){console.log("saved Data",n)}static \u0275fac=function(r){return new(r||e)};static \u0275cmp=Ge({type:e,selectors:[["app-root"]],decls:1,vars:3,consts:[[3,"saveGraphDataEvent","data","zoom","zoomToFit"]],template:function(r,i){1&r&&(bs(0,"visualiser-graph",0),cf("saveGraphDataEvent",function(s){return i.saveGraphData(s)}),ws()),2&r&&ec("data",i.mockedData)("zoom",!0)("zoomToFit",!1)},dependencies:[bte],encapsulation:2})}return e})(),_te=(()=>{class e{static \u0275fac=function(r){return new(r||e)};static \u0275mod=gt({type:e});static \u0275inj=Fo({imports:[FT]})}return e})(),Dte=(()=>{class e{static \u0275fac=function(r){return new(r||e)};static \u0275mod=gt({type:e,bootstrap:[wte]});static \u0275inj=Fo({imports:[FT,_te]})}return e})();VH().bootstrapModule(Dte).catch(e=>console.error(e))},5505:function(Se){Se.exports=function(){"use strict";var Je=function(f,p){return(Je=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,w){m.__proto__=w}||function(m,w){for(var D in w)Object.prototype.hasOwnProperty.call(w,D)&&(m[D]=w[D])})(f,p)},B=function(){return(B=Object.assign||function(f){for(var p,m=1,w=arguments.length;m<w;m++)for(var D in p=arguments[m])Object.prototype.hasOwnProperty.call(p,D)&&(f[D]=p[D]);return f}).apply(this,arguments)};function le(f,p,m){if(m||2===arguments.length)for(var w,D=0,M=p.length;D<M;D++)!w&&D in p||((w=w||Array.prototype.slice.call(p,0,D))[D]=p[D]);return f.concat(w||Array.prototype.slice.call(p))}var J=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,$=Object.keys,q=Array.isArray;function P(f,p){return"object"!=typeof p||$(p).forEach(function(m){f[m]=p[m]}),f}typeof Promise>"u"||J.Promise||(J.Promise=Promise);var L=Object.getPrototypeOf,S={}.hasOwnProperty;function k(f,p){return S.call(f,p)}function x(f,p){"function"==typeof p&&(p=p(L(f))),(typeof Reflect>"u"?$:Reflect.ownKeys)(p).forEach(function(m){j(f,m,p[m])})}var A=Object.defineProperty;function j(f,p,m,w){A(f,p,P(m&&k(m,"get")&&"function"==typeof m.get?{get:m.get,set:m.set,configurable:!0}:{value:m,configurable:!0,writable:!0},w))}function V(f){return{from:function(p){return f.prototype=Object.create(p.prototype),j(f.prototype,"constructor",f),{extend:x.bind(null,f.prototype)}}}}var ge=Object.getOwnPropertyDescriptor,ye=[].slice;function Ie(f,p,m){return ye.call(f,p,m)}function et(f,p){return p(f)}function Ee(f){if(!f)throw new Error("Assertion Failed")}function Pe(f){J.setImmediate?setImmediate(f):setTimeout(f,0)}function he(f,p){if("string"==typeof p&&k(f,p))return f[p];if(!p)return f;if("string"!=typeof p){for(var m=[],w=0,D=p.length;w<D;++w){var M=he(f,p[w]);m.push(M)}return m}var N=p.indexOf(".");if(-1!==N){var O=f[p.substr(0,N)];return null==O?void 0:he(O,p.substr(N+1))}}function _e(f,p,m){if(f&&void 0!==p&&(!("isFrozen"in Object)||!Object.isFrozen(f)))if("string"!=typeof p&&"length"in p){Ee("string"!=typeof m&&"length"in m);for(var w=0,D=p.length;w<D;++w)_e(f,p[w],m[w])}else{var M,N,O=p.indexOf(".");-1!==O?(M=p.substr(0,O),""===(N=p.substr(O+1))?void 0===m?q(f)&&!isNaN(parseInt(M))?f.splice(M,1):delete f[M]:f[M]=m:_e(O=(O=f[M])&&k(f,M)?O:f[M]={},N,m)):void 0===m?q(f)&&!isNaN(parseInt(p))?f.splice(p,1):delete f[p]:f[p]=m}}function Ne(f){var p,m={};for(p in f)k(f,p)&&(m[p]=f[p]);return m}var $e=[].concat;function ze(f){return $e.apply([],f)}var to="BigUint64Array,BigInt64Array,Array,Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,FileSystemDirectoryHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(ze([8,16,32,64].map(function(f){return["Int","Uint","Float"].map(function(p){return p+f+"Array"})}))).filter(function(f){return J[f]}),it=new Set(to.map(function(f){return J[f]})),se=null;function pe(f){return se=new WeakMap,f=function p(m){if(!m||"object"!=typeof m)return m;var w=se.get(m);if(w)return w;if(q(m)){se.set(m,w=[]);for(var D=0,M=m.length;D<M;++D)w.push(p(m[D]))}else if(it.has(m.constructor))w=m;else{var N,O=L(m);for(N in w=O===Object.prototype?{}:Object.create(O),se.set(m,w),m)k(m,N)&&(w[N]=p(m[N]))}return w}(f),se=null,f}var De={}.toString;function xe(f){return De.call(f).slice(8,-1)}var Oe=typeof Symbol<"u"?Symbol.iterator:"@@iterator",pt="symbol"==typeof Oe?function(f){var p;return null!=f&&(p=f[Oe])&&p.apply(f)}:function(){return null};function yt(f,p){return 0<=(p=f.indexOf(p))&&f.splice(p,1),0<=p}var zt={};function Tn(f){var p,m,w,D;if(1===arguments.length){if(q(f))return f.slice();if(this===zt&&"string"==typeof f)return[f];if(D=pt(f)){for(m=[];!(w=D.next()).done;)m.push(w.value);return m}if(null==f)return[f];if("number"!=typeof(p=f.length))return[f];for(m=new Array(p);p--;)m[p]=f[p];return m}for(p=arguments.length,m=new Array(p);p--;)m[p]=arguments[p];return m}var Wr=typeof Symbol<"u"?function(f){return"AsyncFunction"===f[Symbol.toStringTag]}:function(){return!1},Gn=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(Yi=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"]),za={VersionChanged:"Database version changed by other database connection",DatabaseClosed:"Database has been closed",Abort:"Transaction aborted",TransactionInactive:"Transaction has already completed or failed",MissingAPI:"IndexedDB API missing. Please visit https://tinyurl.com/y2uuvskb"};function Di(f,p){this.name=f,this.message=p}function Ga(f,p){return f+". Errors: "+Object.keys(p).map(function(m){return p[m].toString()}).filter(function(m,w,D){return D.indexOf(m)===w}).join("\n")}function si(f,p,m,w){this.failures=p,this.failedKeys=w,this.successCount=m,this.message=Ga(f,p)}function Ei(f,p){this.name="BulkError",this.failures=Object.keys(p).map(function(m){return p[m]}),this.failuresByPos=p,this.message=Ga(f,this.failures)}V(Di).from(Error).extend({toString:function(){return this.name+": "+this.message}}),V(si).from(Di),V(Ei).from(Di);var ve=Gn.reduce(function(f,p){return f[p]=p+"Error",f},{}),Me=Di,ae=Gn.reduce(function(f,p){var m=p+"Error";function w(D,M){this.name=m,D?"string"==typeof D?(this.message="".concat(D).concat(M?"\n "+M:""),this.inner=M||null):"object"==typeof D&&(this.message="".concat(D.name," ").concat(D.message),this.inner=D):(this.message=za[p]||m,this.inner=null)}return V(w).from(Me),f[p]=w,f},{});ae.Syntax=SyntaxError,ae.Type=TypeError,ae.Range=RangeError;var Xe=Yi.reduce(function(f,p){return f[p+"Error"]=ae[p],f},{}),It=Gn.reduce(function(f,p){return-1===["Syntax","Type","Range"].indexOf(p)&&(f[p+"Error"]=ae[p]),f},{});function ot(){}function en(f){return f}function rr(f,p){return null==f||f===en?p:function(m){return p(f(m))}}function ai(f,p){return function(){f.apply(this,arguments),p.apply(this,arguments)}}function wr(f,p){return f===ot?p:function(){var m=f.apply(this,arguments);void 0!==m&&(arguments[0]=m);var w=this.onsuccess,D=this.onerror;this.onsuccess=null,this.onerror=null;var M=p.apply(this,arguments);return w&&(this.onsuccess=this.onsuccess?ai(w,this.onsuccess):w),D&&(this.onerror=this.onerror?ai(D,this.onerror):D),void 0!==M?M:m}}function Vn(f,p){return f===ot?p:function(){f.apply(this,arguments);var m=this.onsuccess,w=this.onerror;this.onsuccess=this.onerror=null,p.apply(this,arguments),m&&(this.onsuccess=this.onsuccess?ai(m,this.onsuccess):m),w&&(this.onerror=this.onerror?ai(w,this.onerror):w)}}function Ci(f,p){return f===ot?p:function(m){var w=f.apply(this,arguments);P(m,w);var D=this.onsuccess,M=this.onerror;return this.onsuccess=null,this.onerror=null,m=p.apply(this,arguments),D&&(this.onsuccess=this.onsuccess?ai(D,this.onsuccess):D),M&&(this.onerror=this.onerror?ai(M,this.onerror):M),void 0===w?void 0===m?void 0:m:P(w,m)}}function ar(f,p){return f===ot?p:function(){return!1!==p.apply(this,arguments)&&f.apply(this,arguments)}}function ui(f,p){return f===ot?p:function(){var m=f.apply(this,arguments);if(m&&"function"==typeof m.then){for(var w=this,D=arguments.length,M=new Array(D);D--;)M[D]=arguments[D];return m.then(function(){return p.apply(w,M)})}return p.apply(this,arguments)}}It.ModifyError=si,It.DexieError=Di,It.BulkError=Ei;var _r=typeof location<"u"&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);function Td(f){_r=f}var Yi,Bs={},Wm=100,ln=(Gn=(Gn=(to=typeof Promise>"u"?[]:function(){var f=Promise.resolve();if(typeof crypto>"u"||!crypto.subtle)return[f,L(f),f];var p=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[p,L(p),f]}())[1])&&Gn.then,(Yi=to[0])&&Yi.constructor),qa=!!(to=to[2]),Ki=function(f,p){Ya.push([f,p]),ur&&(queueMicrotask(Ym),ur=!1)},Nd=!0,ur=!0,Qi=[],Wa=[],Vc=en,Zi={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:ot,pgp:!1,env:{},finalize:ot},nt=Zi,Ya=[],Xi=0,Yr=[];function We(f){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");this._listeners=[],this._lib=!1;var p=this._PSD=nt;if("function"!=typeof f){if(f!==Bs)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(!1===this._state&&Ka(this,this._value))}this._state=null,this._value=null,++p.ref,function m(w,D){try{D(function(M){if(null===w._state){if(M===w)throw new TypeError("A promise cannot be resolved with itself.");var N=w._lib&&is();M&&"function"==typeof M.then?m(w,function(O,H){M instanceof We?M._then(O,H):M.then(O,H)}):(w._state=!0,w._value=M,kd(w)),N&&os()}},Ka.bind(null,w))}catch(M){Ka(w,M)}}(this,f)}var Ad={get:function(){var f=nt,p=$c;function m(w,D){var M=this,N=!f.global&&(f!==nt||p!==$c),O=N&&!Dr(),H=new We(function(W,Q){eo(M,new Ji(Km(w,f,N,O),Km(D,f,N,O),W,Q,f))});return this._consoleTask&&(H._consoleTask=this._consoleTask),H}return m.prototype=Bs,m},set:function(f){j(this,"then",f&&f.prototype===Bs?Ad:{get:function(){return f},set:Ad.set})}};function Ji(f,p,m,w,D){this.onFulfilled="function"==typeof f?f:null,this.onRejected="function"==typeof p?p:null,this.resolve=m,this.reject=w,this.psd=D}function Ka(f,p){var m,w;Wa.push(p),null===f._state&&(m=f._lib&&is(),p=Vc(p),f._state=!1,f._value=p,w=f,Qi.some(function(D){return D._value===w._value})||Qi.push(w),kd(f),m&&os())}function kd(f){var p=f._listeners;f._listeners=[];for(var m=0,w=p.length;m<w;++m)eo(f,p[m]);var D=f._PSD;--D.ref||D.finalize(),0===Xi&&(++Xi,Ki(function(){0==--Xi&&Hc()},[]))}function eo(f,p){if(null!==f._state){var m=f._state?p.onFulfilled:p.onRejected;if(null===m)return(f._state?p.resolve:p.reject)(f._value);++p.psd.ref,++Xi,Ki(Od,[m,f,p])}else f._listeners.push(p)}function Od(f,p,m){try{var w,D=p._value;!p._state&&Wa.length&&(Wa=[]),w=_r&&p._consoleTask?p._consoleTask.run(function(){return f(D)}):f(D),p._state||-1!==Wa.indexOf(D)||function(M){for(var N=Qi.length;N;)if(Qi[--N]._value===M._value)return Qi.splice(N,1)}(p),m.resolve(w)}catch(M){m.reject(M)}finally{0==--Xi&&Hc(),--m.psd.ref||m.psd.finalize()}}function Ym(){jr(Zi,function(){is()&&os()})}function is(){var f=Nd;return ur=Nd=!1,f}function os(){var f,p,m;do{for(;0<Ya.length;)for(f=Ya,Ya=[],m=f.length,p=0;p<m;++p){var w=f[p];w[0].apply(null,w[1])}}while(0<Ya.length);ur=Nd=!0}function Hc(){var f=Qi;Qi=[],f.forEach(function(w){w._PSD.onunhandled.call(null,w._value,w)});for(var p=Yr.slice(0),m=p.length;m;)p[--m]()}function Uc(f){return new We(Bs,!1,f)}function fn(f,p){var m=nt;return function(){var w=is(),D=nt;try{return Ii(m,!0),f.apply(this,arguments)}catch(M){p&&p(M)}finally{Ii(D,!1),w&&os()}}}x(We.prototype,{then:Ad,_then:function(f,p){eo(this,new Ji(null,null,f,p,nt))},catch:function(f){if(1===arguments.length)return this.then(null,f);var p=f,m=arguments[1];return this.then(null,"function"==typeof p?function(w){return(w instanceof p?m:Uc)(w)}:function(w){return(w&&w.name===p?m:Uc)(w)})},finally:function(f){return this.then(function(p){return We.resolve(f()).then(function(){return p})},function(p){return We.resolve(f()).then(function(){return Uc(p)})})},timeout:function(f,p){var m=this;return f<1/0?new We(function(w,D){var M=setTimeout(function(){return D(new ae.Timeout(p))},f);m.then(w,D).finally(clearTimeout.bind(null,M))}):this}}),typeof Symbol<"u"&&Symbol.toStringTag&&j(We.prototype,Symbol.toStringTag,"Dexie.Promise"),Zi.env=Qa(),x(We,{all:function(){var f=Tn.apply(null,arguments).map(Mi);return new We(function(p,m){0===f.length&&p([]);var w=f.length;f.forEach(function(D,M){return We.resolve(D).then(function(N){f[M]=N,--w||p(f)},m)})})},resolve:function(f){return f instanceof We?f:f&&"function"==typeof f.then?new We(function(p,m){f.then(p,m)}):new We(Bs,!0,f)},reject:Uc,race:function(){var f=Tn.apply(null,arguments).map(Mi);return new We(function(p,m){f.map(function(w){return We.resolve(w).then(p,m)})})},PSD:{get:function(){return nt},set:function(f){return nt=f}},totalEchoes:{get:function(){return $c}},newPSD:xi,usePSD:jr,scheduler:{get:function(){return Ki},set:function(f){Ki=f}},rejectionMapper:{get:function(){return Vc},set:function(f){Vc=f}},follow:function(f,p){return new We(function(m,w){return xi(function(D,M){var N=nt;N.unhandleds=[],N.onunhandled=M,N.finalize=ai(function(){var O,H=this;O=function(){0===H.unhandleds.length?D():M(H.unhandleds[0])},Yr.push(function W(){O(),Yr.splice(Yr.indexOf(W),1)}),++Xi,Ki(function(){0==--Xi&&Hc()},[])},N.finalize),f()},p,m,w)})}}),ln&&(ln.allSettled&&j(We,"allSettled",function(){var f=Tn.apply(null,arguments).map(Mi);return new We(function(p){0===f.length&&p([]);var m=f.length,w=new Array(m);f.forEach(function(D,M){return We.resolve(D).then(function(N){return w[M]={status:"fulfilled",value:N}},function(N){return w[M]={status:"rejected",reason:N}}).then(function(){return--m||p(w)})})})}),ln.any&&typeof AggregateError<"u"&&j(We,"any",function(){var f=Tn.apply(null,arguments).map(Mi);return new We(function(p,m){0===f.length&&m(new AggregateError([]));var w=f.length,D=new Array(w);f.forEach(function(M,N){return We.resolve(M).then(function(O){return p(O)},function(O){D[N]=O,--w||m(new AggregateError(D))})})})}),ln.withResolvers&&(We.withResolvers=ln.withResolvers));var Ae={awaits:0,echoes:0,id:0},ss=0,Ro=[],js=0,$c=0,N_=0;function xi(f,p,m,w){var D=nt,M=Object.create(D);return M.parent=D,M.ref=0,M.global=!1,M.id=++N_,M.env=qa?{Promise:We,PromiseProp:{value:We,configurable:!0,writable:!0},all:We.all,race:We.race,allSettled:We.allSettled,any:We.any,resolve:We.resolve,reject:We.reject}:{},p&&P(M,p),++D.ref,M.finalize=function(){--this.parent.ref||this.parent.finalize()},w=jr(M,f,m,w),0===M.ref&&M.finalize(),w}function cr(){return Ae.id||(Ae.id=++ss),++Ae.awaits,Ae.echoes+=Wm,Ae.id}function Dr(){return!!Ae.awaits&&(0==--Ae.awaits&&(Ae.id=0),Ae.echoes=Ae.awaits*Wm,!0)}function Mi(f){return Ae.echoes&&f&&f.constructor===ln?(cr(),f.then(function(p){return Dr(),p},function(p){return Dr(),Nn(p)})):f}function as(){var f=Ro[Ro.length-1];Ro.pop(),Ii(f,!1)}function Ii(f,p){var m,w=nt;(p?!Ae.echoes||js++&&f===nt:!js||--js&&f===nt)||queueMicrotask(p?function(D){++$c,Ae.echoes&&0!=--Ae.echoes||(Ae.echoes=Ae.awaits=Ae.id=0),Ro.push(nt),Ii(D,!0)}.bind(null,f):as),f!==nt&&(nt=f,w===Zi&&(Zi.env=Qa()),qa&&(m=Zi.env.Promise,p=f.env,(w.global||f.global)&&(Object.defineProperty(J,"Promise",p.PromiseProp),m.all=p.all,m.race=p.race,m.resolve=p.resolve,m.reject=p.reject,p.allSettled&&(m.allSettled=p.allSettled),p.any&&(m.any=p.any))))}function Qa(){var f=J.Promise;return qa?{Promise:f,PromiseProp:Object.getOwnPropertyDescriptor(J,"Promise"),all:f.all,race:f.race,allSettled:f.allSettled,any:f.any,resolve:f.resolve,reject:f.reject}:{}}function jr(f,p,m,w,D){var M=nt;try{return Ii(f,!0),p(m,w,D)}finally{Ii(M,!1)}}function Km(f,p,m,w){return"function"!=typeof f?f:function(){var D=nt;m&&cr(),Ii(p,!0);try{return f.apply(this,arguments)}finally{Ii(D,!1),w&&queueMicrotask(Dr)}}}function Gt(f){Promise===ln&&0===Ae.echoes?0===js?f():enqueueNativeMicroTask(f):setTimeout(f,0)}-1===(""+Gn).indexOf("[native code]")&&(cr=Dr=ot);var Nn=We.reject,Ot="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",Rd="String expected.",mn=[],cs="__dbnames",Pd="readonly",zc="readwrite";function Si(f,p){return f?p?function(){return f.apply(this,arguments)&&p.apply(this,arguments)}:f:p}var ft={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function Po(f){return"string"!=typeof f||/\./.test(f)?function(p){return p}:function(p){return void 0===p[f]&&f in p&&delete(p=pe(p))[f],p}}function lr(){throw ae.Type()}function jt(f,p){try{var m=Fd(f),w=Fd(p);if(m!==w)return"Array"===m?1:"Array"===w?-1:"binary"===m?1:"binary"===w?-1:"string"===m?1:"string"===w?-1:"Date"===m?1:"Date"!==w?NaN:-1;switch(m){case"number":case"Date":case"string":return p<f?1:f<p?-1:0;case"binary":return function(D,M){for(var N=D.length,O=M.length,H=N<O?N:O,W=0;W<H;++W)if(D[W]!==M[W])return D[W]<M[W]?-1:1;return N===O?0:N<O?-1:1}(Qm(f),Qm(p));case"Array":return function(D,M){for(var N=D.length,O=M.length,H=N<O?N:O,W=0;W<H;++W){var Q=jt(D[W],M[W]);if(0!==Q)return Q}return N===O?0:N<O?-1:1}(f,p)}}catch{}return NaN}function Fd(f){var p=typeof f;return"object"!=p?p:ArrayBuffer.isView(f)||"ArrayBuffer"===(f=xe(f))?"binary":f}function Qm(f){return f instanceof Uint8Array?f:ArrayBuffer.isView(f)?new Uint8Array(f.buffer,f.byteOffset,f.byteLength):new Uint8Array(f)}var Ti=(yn.prototype._trans=function(f,p,m){var w=this._tx||nt.trans,D=this.name,M=_r&&typeof console<"u"&&console.createTask&&console.createTask("Dexie: ".concat("readonly"===f?"read":"write"," ").concat(this.name));function N(W,Q,F){if(!F.schema[D])throw new ae.NotFound("Table "+D+" not part of transaction");return p(F.idbtrans,F)}var O=is();try{var H=w&&w.db._novip===this.db._novip?w===nt.trans?w._promise(f,N,m):xi(function(){return w._promise(f,N,m)},{trans:w,transless:nt.transless||nt}):function W(Q,F,ee,U){if(Q.idbdb&&(Q._state.openComplete||nt.letThrough||Q._vip)){var Y=Q._createTransaction(F,ee,Q._dbSchema);try{Y.create(),Q._state.PR1398_maxLoop=3}catch(Z){return Z.name===ve.InvalidState&&Q.isOpen()&&0<--Q._state.PR1398_maxLoop?(console.warn("Dexie: Need to reopen db"),Q.close({disableAutoOpen:!1}),Q.open().then(function(){return W(Q,F,ee,U)})):Nn(Z)}return Y._promise(F,function(Z,K){return xi(function(){return nt.trans=Y,U(Z,K,Y)})}).then(function(Z){if("readwrite"===F)try{Y.idbtrans.commit()}catch{}return"readonly"===F?Z:Y._completion.then(function(){return Z})})}if(Q._state.openComplete)return Nn(new ae.DatabaseClosed(Q._state.dbOpenError));if(!Q._state.isBeingOpened){if(!Q._state.autoOpen)return Nn(new ae.DatabaseClosed);Q.open().catch(ot)}return Q._state.dbReadyPromise.then(function(){return W(Q,F,ee,U)})}(this.db,f,[this.name],N);return M&&(H._consoleTask=M,H=H.catch(function(W){return console.trace(W),Nn(W)})),H}finally{O&&os()}},yn.prototype.get=function(f,p){var m=this;return f&&f.constructor===Object?this.where(f).first(p):null==f?Nn(new ae.Type("Invalid argument to Table.get()")):this._trans("readonly",function(w){return m.core.get({trans:w,key:f}).then(function(D){return m.hook.reading.fire(D)})}).then(p)},yn.prototype.where=function(f){if("string"==typeof f)return new this.db.WhereClause(this,f);if(q(f))return new this.db.WhereClause(this,"[".concat(f.join("+"),"]"));var p=$(f);if(1===p.length)return this.where(p[0]).equals(f[p[0]]);var m=this.schema.indexes.concat(this.schema.primKey).filter(function(O){if(O.compound&&p.every(function(W){return 0<=O.keyPath.indexOf(W)})){for(var H=0;H<p.length;++H)if(-1===p.indexOf(O.keyPath[H]))return!1;return!0}return!1}).sort(function(O,H){return O.keyPath.length-H.keyPath.length})[0];if(m&&"\uffff"!==this.db._maxKey){var M=m.keyPath.slice(0,p.length);return this.where(M).equals(M.map(function(H){return f[H]}))}!m&&_r&&console.warn("The query ".concat(JSON.stringify(f)," on ").concat(this.name," would benefit from a ")+"compound index [".concat(p.join("+"),"]"));var w=this.schema.idxByName;function D(O,H){return 0===jt(O,H)}M=(N=p.reduce(function(F,H){var W=F[0],Q=F[1],ee=(F=w[H],f[H]);return[W||F,W||!F?Si(Q,F&&F.multi?function(U){return U=he(U,H),q(U)&&U.some(function(Y){return D(ee,Y)})}:function(U){return D(ee,he(U,H))}):Q]},[null,null]))[0];var N=N[1];return M?this.where(M.name).equals(f[M.keyPath]).filter(N):m?this.filter(N):this.where(p).equals("")},yn.prototype.filter=function(f){return this.toCollection().and(f)},yn.prototype.count=function(f){return this.toCollection().count(f)},yn.prototype.offset=function(f){return this.toCollection().offset(f)},yn.prototype.limit=function(f){return this.toCollection().limit(f)},yn.prototype.each=function(f){return this.toCollection().each(f)},yn.prototype.toArray=function(f){return this.toCollection().toArray(f)},yn.prototype.toCollection=function(){return new this.db.Collection(new this.db.WhereClause(this))},yn.prototype.orderBy=function(f){return new this.db.Collection(new this.db.WhereClause(this,q(f)?"[".concat(f.join("+"),"]"):f))},yn.prototype.reverse=function(){return this.toCollection().reverse()},yn.prototype.mapToClass=function(f){var p,m=this.db,w=this.name;function D(){return null!==p&&p.apply(this,arguments)||this}(this.schema.mappedClass=f).prototype instanceof lr&&(function(H,W){if("function"!=typeof W&&null!==W)throw new TypeError("Class extends value "+String(W)+" is not a constructor or null");function Q(){this.constructor=H}Je(H,W),H.prototype=null===W?Object.create(W):(Q.prototype=W.prototype,new Q)}(D,p=f),Object.defineProperty(D.prototype,"db",{get:function(){return m},enumerable:!1,configurable:!0}),D.prototype.table=function(){return w},f=D);for(var M=new Set,N=f.prototype;N;N=L(N))Object.getOwnPropertyNames(N).forEach(function(H){return M.add(H)});function O(H){if(!H)return H;var W,Q=Object.create(f.prototype);for(W in H)if(!M.has(W))try{Q[W]=H[W]}catch{}return Q}return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=O,this.hook("reading",O),f},yn.prototype.defineClass=function(){return this.mapToClass(function(f){P(this,f)})},yn.prototype.add=function(f,p){var m=this,w=this.schema.primKey,M=w.keyPath,N=f;return M&&w.auto&&(N=Po(M)(f)),this._trans("readwrite",function(O){return m.core.mutate({trans:O,type:"add",keys:null!=p?[p]:null,values:[N]})}).then(function(O){return O.numFailures?We.reject(O.failures[0]):O.lastResult}).then(function(O){if(M)try{_e(f,M,O)}catch{}return O})},yn.prototype.update=function(f,p){return"object"!=typeof f||q(f)?this.where(":id").equals(f).modify(p):void 0===(f=he(f,this.schema.primKey.keyPath))?Nn(new ae.InvalidArgument("Given object does not contain its primary key")):this.where(":id").equals(f).modify(p)},yn.prototype.put=function(f,p){var m=this,w=this.schema.primKey,M=w.keyPath,N=f;return M&&w.auto&&(N=Po(M)(f)),this._trans("readwrite",function(O){return m.core.mutate({trans:O,type:"put",values:[N],keys:null!=p?[p]:null})}).then(function(O){return O.numFailures?We.reject(O.failures[0]):O.lastResult}).then(function(O){if(M)try{_e(f,M,O)}catch{}return O})},yn.prototype.delete=function(f){var p=this;return this._trans("readwrite",function(m){return p.core.mutate({trans:m,type:"delete",keys:[f]})}).then(function(m){return m.numFailures?We.reject(m.failures[0]):void 0})},yn.prototype.clear=function(){var f=this;return this._trans("readwrite",function(p){return f.core.mutate({trans:p,type:"deleteRange",range:ft})}).then(function(p){return p.numFailures?We.reject(p.failures[0]):void 0})},yn.prototype.bulkGet=function(f){var p=this;return this._trans("readonly",function(m){return p.core.getMany({keys:f,trans:m}).then(function(w){return w.map(function(D){return p.hook.reading.fire(D)})})})},yn.prototype.bulkAdd=function(f,p,m){var w=this,D=Array.isArray(p)?p:void 0,M=(m=m||(D?void 0:p))?m.allKeys:void 0;return this._trans("readwrite",function(N){var O=(W=w.schema.primKey).auto;if((W=W.keyPath)&&D)throw new ae.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(D&&D.length!==f.length)throw new ae.InvalidArgument("Arguments objects and keys must have the same length");var H=f.length,W=W&&O?f.map(Po(W)):f;return w.core.mutate({trans:N,type:"add",keys:D,values:W,wantResults:M}).then(function(Y){var F=Y.numFailures,ee=Y.results,U=Y.lastResult;if(Y=Y.failures,0===F)return M?ee:U;throw new Ei("".concat(w.name,".bulkAdd(): ").concat(F," of ").concat(H," operations failed"),Y)})})},yn.prototype.bulkPut=function(f,p,m){var w=this,D=Array.isArray(p)?p:void 0,M=(m=m||(D?void 0:p))?m.allKeys:void 0;return this._trans("readwrite",function(N){var O=(W=w.schema.primKey).auto;if((W=W.keyPath)&&D)throw new ae.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(D&&D.length!==f.length)throw new ae.InvalidArgument("Arguments objects and keys must have the same length");var H=f.length,W=W&&O?f.map(Po(W)):f;return w.core.mutate({trans:N,type:"put",keys:D,values:W,wantResults:M}).then(function(Y){var F=Y.numFailures,ee=Y.results,U=Y.lastResult;if(Y=Y.failures,0===F)return M?ee:U;throw new Ei("".concat(w.name,".bulkPut(): ").concat(F," of ").concat(H," operations failed"),Y)})})},yn.prototype.bulkUpdate=function(f){var p=this,m=this.core,w=f.map(function(N){return N.key}),D=f.map(function(N){return N.changes}),M=[];return this._trans("readwrite",function(N){return m.getMany({trans:N,keys:w,cache:"clone"}).then(function(O){var H=[],W=[];f.forEach(function(F,ee){var U=F.key,Y=F.changes,Z=O[ee];if(Z){for(var K=0,ie=Object.keys(Y);K<ie.length;K++){var ue=ie[K],ce=Y[ue];if(ue===p.schema.primKey.keyPath){if(0!==jt(ce,U))throw new ae.Constraint("Cannot update primary key in bulkUpdate()")}else _e(Z,ue,ce)}M.push(ee),H.push(U),W.push(Z)}});var Q=H.length;return m.mutate({trans:N,type:"put",keys:H,values:W,updates:{keys:w,changeSpecs:D}}).then(function(F){var ee=F.numFailures,U=F.failures;if(0===ee)return Q;for(var Y=0,Z=Object.keys(U);Y<Z.length;Y++){var K,ie=Z[Y],ue=M[Number(ie)];null!=ue&&(K=U[ie],delete U[ie],U[ue]=K)}throw new Ei("".concat(p.name,".bulkUpdate(): ").concat(ee," of ").concat(Q," operations failed"),U)})})})},yn.prototype.bulkDelete=function(f){var p=this,m=f.length;return this._trans("readwrite",function(w){return p.core.mutate({trans:w,type:"delete",keys:f})}).then(function(N){var D=N.numFailures,M=N.lastResult;if(N=N.failures,0===D)return M;throw new Ei("".concat(p.name,".bulkDelete(): ").concat(D," of ").concat(m," operations failed"),N)})},yn);function yn(){}function Za(f){function p(N,O){if(O){for(var H=arguments.length,W=new Array(H-1);--H;)W[H-1]=arguments[H];return m[N].subscribe.apply(null,W),f}if("string"==typeof N)return m[N]}var m={};p.addEventType=M;for(var w=1,D=arguments.length;w<D;++w)M(arguments[w]);return p;function M(N,O,H){if("object"!=typeof N){var W;O=O||ar;var Q={subscribers:[],fire:H=H||ot,subscribe:function(F){-1===Q.subscribers.indexOf(F)&&(Q.subscribers.push(F),Q.fire=O(Q.fire,F))},unsubscribe:function(F){Q.subscribers=Q.subscribers.filter(function(ee){return ee!==F}),Q.fire=Q.subscribers.reduce(O,H)}};return m[N]=p[N]=Q}$(W=N).forEach(function(F){var ee=W[F];if(q(ee))M(F,W[F][0],W[F][1]);else{if("asap"!==ee)throw new ae.InvalidArgument("Invalid event config");var U=M(F,en,function(){for(var Y=arguments.length,Z=new Array(Y);Y--;)Z[Y]=arguments[Y];U.subscribers.forEach(function(K){Pe(function(){K.apply(null,Z)})})})}})}}function Xa(f,p){return V(p).from({prototype:f}),p}function Vs(f,p){return!(f.filter||f.algorithm||f.or)&&(p?f.justLimit:!f.replayFilter)}function Gc(f,p){f.filter=Si(f.filter,p)}function Ld(f,p,m){var w=f.replayFilter;f.replayFilter=w?function(){return Si(w(),p())}:p,f.justLimit=m&&!w}function Ja(f,p){if(f.isPrimKey)return p.primaryKey;var m=p.getIndexByKeyPath(f.index);if(!m)throw new ae.Schema("KeyPath "+f.index+" on object store "+p.name+" is not indexed");return m}function Zm(f,p,m){var w=Ja(f,p.schema);return p.openCursor({trans:m,values:!f.keysOnly,reverse:"prev"===f.dir,unique:!!f.unique,query:{index:w,range:f.range}})}function Xn(f,p,m,w){var D=f.replayFilter?Si(f.filter,f.replayFilter()):f.filter;if(f.or){var M={},N=function(O,H,W){var Q,F;D&&!D(H,W,function(ee){return H.stop(ee)},function(ee){return H.fail(ee)})||("[object ArrayBuffer]"==(F=""+(Q=H.primaryKey))&&(F=""+new Uint8Array(Q)),k(M,F)||(M[F]=!0,p(O,H,W)))};return Promise.all([f.or._iterate(N,m),ct(Zm(f,w,m),f.algorithm,N,!f.keysOnly&&f.valueMapper)])}return ct(Zm(f,w,m),Si(f.algorithm,D),p,!f.keysOnly&&f.valueMapper)}function ct(f,p,m,w){var D=fn(w?function(M,N,O){return m(w(M),N,O)}:m);return f.then(function(M){if(M)return M.start(function(){var N=function(){return M.continue()};p&&!p(M,function(O){return N=O},function(O){M.stop(O),N=ot},function(O){M.fail(O),N=ot})||D(M.value,M,function(O){return N=O}),N()})})}to=Symbol();var eu=(Xm.prototype.execute=function(f){if(void 0!==this.add){var p=this.add;if(q(p))return le(le([],q(f)?f:[],!0),p,!0).sort();if("number"==typeof p)return(Number(f)||0)+p;if("bigint"==typeof p)try{return BigInt(f)+p}catch{return BigInt(0)+p}throw new TypeError("Invalid term ".concat(p))}if(void 0!==this.remove){var m=this.remove;if(q(m))return q(f)?f.filter(function(w){return!m.includes(w)}).sort():[];if("number"==typeof m)return Number(f)-m;if("bigint"==typeof m)try{return BigInt(f)-m}catch{return BigInt(0)-m}throw new TypeError("Invalid subtrahend ".concat(m))}return(p=null===(p=this.replacePrefix)||void 0===p?void 0:p[0])&&"string"==typeof f&&f.startsWith(p)?this.replacePrefix[1]+f.substring(p.length):f},Xm);function Xm(f){Object.assign(this,f)}var A_=(Wt.prototype._read=function(f,p){var m=this._ctx;return m.error?m.table._trans(null,Nn.bind(null,m.error)):m.table._trans("readonly",f).then(p)},Wt.prototype._write=function(f){var p=this._ctx;return p.error?p.table._trans(null,Nn.bind(null,p.error)):p.table._trans("readwrite",f,"locked")},Wt.prototype._addAlgorithm=function(f){var p=this._ctx;p.algorithm=Si(p.algorithm,f)},Wt.prototype._iterate=function(f,p){return Xn(this._ctx,f,p,this._ctx.table.core)},Wt.prototype.clone=function(f){var p=Object.create(this.constructor.prototype),m=Object.create(this._ctx);return f&&P(m,f),p._ctx=m,p},Wt.prototype.raw=function(){return this._ctx.valueMapper=null,this},Wt.prototype.each=function(f){var p=this._ctx;return this._read(function(m){return Xn(p,f,m,p.table.core)})},Wt.prototype.count=function(f){var p=this;return this._read(function(m){var w=p._ctx,D=w.table.core;if(Vs(w,!0))return D.count({trans:m,query:{index:Ja(w,D.schema),range:w.range}}).then(function(N){return Math.min(N,w.limit)});var M=0;return Xn(w,function(){return++M,!1},m,D).then(function(){return M})}).then(f)},Wt.prototype.sortBy=function(f,p){var m=f.split(".").reverse(),w=m[0],D=m.length-1;function M(H,W){return W?M(H[m[W]],W-1):H[w]}var N="next"===this._ctx.dir?1:-1;function O(H,W){return jt(M(H,D),M(W,D))*N}return this.toArray(function(H){return H.sort(O)}).then(p)},Wt.prototype.toArray=function(f){var p=this;return this._read(function(m){var w=p._ctx;if("next"===w.dir&&Vs(w,!0)&&0<w.limit){var D=w.valueMapper,M=Ja(w,w.table.core.schema);return w.table.core.query({trans:m,limit:w.limit,values:!0,query:{index:M,range:w.range}}).then(function(O){return O=O.result,D?O.map(D):O})}var N=[];return Xn(w,function(O){return N.push(O)},m,w.table.core).then(function(){return N})},f)},Wt.prototype.offset=function(f){var p=this._ctx;return f<=0||(p.offset+=f,Vs(p)?Ld(p,function(){var m=f;return function(w,D){return 0===m||(1===m?--m:D(function(){w.advance(m),m=0}),!1)}}):Ld(p,function(){var m=f;return function(){return--m<0}})),this},Wt.prototype.limit=function(f){return this._ctx.limit=Math.min(this._ctx.limit,f),Ld(this._ctx,function(){var p=f;return function(m,w,D){return--p<=0&&w(D),0<=p}},!0),this},Wt.prototype.until=function(f,p){return Gc(this._ctx,function(m,w,D){return!f(m.value)||(w(D),p)}),this},Wt.prototype.first=function(f){return this.limit(1).toArray(function(p){return p[0]}).then(f)},Wt.prototype.last=function(f){return this.reverse().first(f)},Wt.prototype.filter=function(f){var p;return Gc(this._ctx,function(m){return f(m.value)}),(p=this._ctx).isMatch=Si(p.isMatch,f),this},Wt.prototype.and=function(f){return this.filter(f)},Wt.prototype.or=function(f){return new this.db.WhereClause(this._ctx.table,f,this)},Wt.prototype.reverse=function(){return this._ctx.dir="prev"===this._ctx.dir?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this},Wt.prototype.desc=function(){return this.reverse()},Wt.prototype.eachKey=function(f){var p=this._ctx;return p.keysOnly=!p.isMatch,this.each(function(m,w){f(w.key,w)})},Wt.prototype.eachUniqueKey=function(f){return this._ctx.unique="unique",this.eachKey(f)},Wt.prototype.eachPrimaryKey=function(f){var p=this._ctx;return p.keysOnly=!p.isMatch,this.each(function(m,w){f(w.primaryKey,w)})},Wt.prototype.keys=function(f){var p=this._ctx;p.keysOnly=!p.isMatch;var m=[];return this.each(function(w,D){m.push(D.key)}).then(function(){return m}).then(f)},Wt.prototype.primaryKeys=function(f){var p=this._ctx;if("next"===p.dir&&Vs(p,!0)&&0<p.limit)return this._read(function(w){var D=Ja(p,p.table.core.schema);return p.table.core.query({trans:w,values:!1,limit:p.limit,query:{index:D,range:p.range}})}).then(function(w){return w.result}).then(f);p.keysOnly=!p.isMatch;var m=[];return this.each(function(w,D){m.push(D.primaryKey)}).then(function(){return m}).then(f)},Wt.prototype.uniqueKeys=function(f){return this._ctx.unique="unique",this.keys(f)},Wt.prototype.firstKey=function(f){return this.limit(1).keys(function(p){return p[0]}).then(f)},Wt.prototype.lastKey=function(f){return this.reverse().firstKey(f)},Wt.prototype.distinct=function(){var f;if(!(f=(f=this._ctx).index&&f.table.schema.idxByName[f.index])||!f.multi)return this;var p={};return Gc(this._ctx,function(D){var w=D.primaryKey.toString();return D=k(p,w),p[w]=!0,!D}),this},Wt.prototype.modify=function(f){var p=this,m=this._ctx;return this._write(function(w){var D,M,N;N="function"==typeof f?f:(D=$(f),M=D.length,function(K){for(var ie=!1,ue=0;ue<M;++ue){var ce=D[ue],be=f[ce],ke=he(K,ce);be instanceof eu?(_e(K,ce,be.execute(ke)),ie=!0):ke!==be&&(_e(K,ce,be),ie=!0)}return ie});var F,O=m.table.core,H=(F=O.schema.primaryKey).outbound,W=F.extractKey,Q=200;function ee(K,ce){var ue=ce.failures;Y+=K-(ce=ce.numFailures);for(var be=0,ke=$(ue);be<ke.length;be++)U.push(ue[ke[be]])}(F=p.db._options.modifyChunkSize)&&(Q="object"==typeof F?F[O.name]||F["*"]||200:F);var U=[],Y=0,Z=[];return p.clone().primaryKeys().then(function(K){var ue=Vs(m)&&m.limit===1/0&&("function"!=typeof f||f===At)&&{index:m.index,range:m.range};return function ie(ce){var be=Math.min(Q,K.length-ce);return O.getMany({trans:w,keys:K.slice(ce,ce+be),cache:"immutable"}).then(function(ke){for(var Ve=[],Re=[],Le=H?[]:null,Ge=[],je=0;je<be;++je){var Ke=ke[je],gt={value:pe(Ke),primKey:K[ce+je]};!1!==N.call(gt,gt.value,gt)&&(null==gt.value?Ge.push(K[ce+je]):H||0===jt(W(Ke),W(gt.value))?(Re.push(gt.value),H&&Le.push(K[ce+je])):(Ge.push(K[ce+je]),Ve.push(gt.value)))}return Promise.resolve(0<Ve.length&&O.mutate({trans:w,type:"add",values:Ve}).then(function(Tt){for(var dt in Tt.failures)Ge.splice(parseInt(dt),1);ee(Ve.length,Tt)})).then(function(){return(0<Re.length||ue&&"object"==typeof f)&&O.mutate({trans:w,type:"put",keys:Le,values:Re,criteria:ue,changeSpec:"function"!=typeof f&&f,isAdditionalChunk:0<ce}).then(function(Tt){return ee(Re.length,Tt)})}).then(function(){return(0<Ge.length||ue&&f===At)&&O.mutate({trans:w,type:"delete",keys:Ge,criteria:ue,isAdditionalChunk:0<ce}).then(function(Tt){return ee(Ge.length,Tt)})}).then(function(){return K.length>ce+be&&ie(ce+Q)})})}(0).then(function(){if(0<U.length)throw new si("Error modifying one or more objects",U,Y,Z);return K.length})})})},Wt.prototype.delete=function(){var f=this._ctx,p=f.range;return Vs(f)&&(f.isPrimKey||3===p.type)?this._write(function(m){var D=p;return f.table.core.count({trans:m,query:{index:f.table.core.schema.primaryKey,range:D}}).then(function(M){return f.table.core.mutate({trans:m,type:"deleteRange",range:D}).then(function(N){var O=N.failures;if(N=N.numFailures)throw new si("Could not delete some values",Object.keys(O).map(function(H){return O[H]}),M-N);return M-N})})}):this.modify(At)},Wt);function Wt(){}var At=function(f,p){return p.value=null};function k_(f,p){return f<p?-1:f===p?0:1}function Fo(f,p){return p<f?-1:f===p?0:1}function Jn(f,p,m){return(f=f instanceof zs?new f.Collection(f):f)._ctx.error=new(m||TypeError)(p),f}function Hs(f){return new f.Collection(f,function(){return $s("")}).limit(0)}function Us(f,p,m,w){var D,M,N,O,H,W,Q,F=m.length;if(!m.every(function(Y){return"string"==typeof Y}))return Jn(f,Rd);function ee(Y){D="next"===Y?function(K){return K.toUpperCase()}:function(K){return K.toLowerCase()},M="next"===Y?function(K){return K.toLowerCase()}:function(K){return K.toUpperCase()},N="next"===Y?k_:Fo;var Z=m.map(function(K){return{lower:M(K),upper:D(K)}}).sort(function(K,ie){return N(K.lower,ie.lower)});O=Z.map(function(K){return K.upper}),H=Z.map(function(K){return K.lower}),Q="next"===(W=Y)?"":w}ee("next"),(f=new f.Collection(f,function(){return no(O[0],H[F-1]+w)}))._ondirectionchange=function(Y){ee(Y)};var U=0;return f._addAlgorithm(function(Y,Z,K){var ie=Y.key;if("string"!=typeof ie)return!1;var ue=M(ie);if(p(ue,H,U))return!0;for(var ce=null,be=U;be<F;++be){var ke=function(Ve,Re,Le,Ge,je,Ke){for(var gt=Math.min(Ve.length,Ge.length),Tt=-1,dt=0;dt<gt;++dt){var sn=Re[dt];if(sn!==Ge[dt])return je(Ve[dt],Le[dt])<0?Ve.substr(0,dt)+Le[dt]+Le.substr(dt+1):je(Ve[dt],Ge[dt])<0?Ve.substr(0,dt)+Ge[dt]+Le.substr(dt+1):0<=Tt?Ve.substr(0,Tt)+Re[Tt]+Le.substr(Tt+1):null;je(Ve[dt],sn)<0&&(Tt=dt)}return gt<Ge.length&&"next"===Ke?Ve+Le.substr(Ve.length):gt<Ve.length&&"prev"===Ke?Ve.substr(0,Le.length):Tt<0?null:Ve.substr(0,Tt)+Ge[Tt]+Le.substr(Tt+1)}(ie,ue,O[be],H[be],N,W);null===ke&&null===ce?U=be+1:(null===ce||0<N(ce,ke))&&(ce=ke)}return Z(null!==ce?function(){Y.continue(ce+Q)}:K),!1}),f}function no(f,p,m,w){return{type:2,lower:f,upper:p,lowerOpen:m,upperOpen:w}}function $s(f){return{type:1,lower:f,upper:f}}var zs=(Object.defineProperty(An.prototype,"Collection",{get:function(){return this._ctx.table.db.Collection},enumerable:!1,configurable:!0}),An.prototype.between=function(f,p,m,w){m=!1!==m,w=!0===w;try{return 0<this._cmp(f,p)||0===this._cmp(f,p)&&(m||w)&&(!m||!w)?Hs(this):new this.Collection(this,function(){return no(f,p,!m,!w)})}catch{return Jn(this,Ot)}},An.prototype.equals=function(f){return null==f?Jn(this,Ot):new this.Collection(this,function(){return $s(f)})},An.prototype.above=function(f){return null==f?Jn(this,Ot):new this.Collection(this,function(){return no(f,void 0,!0)})},An.prototype.aboveOrEqual=function(f){return null==f?Jn(this,Ot):new this.Collection(this,function(){return no(f,void 0,!1)})},An.prototype.below=function(f){return null==f?Jn(this,Ot):new this.Collection(this,function(){return no(void 0,f,!1,!0)})},An.prototype.belowOrEqual=function(f){return null==f?Jn(this,Ot):new this.Collection(this,function(){return no(void 0,f)})},An.prototype.startsWith=function(f){return"string"!=typeof f?Jn(this,Rd):this.between(f,f+"\uffff",!0,!0)},An.prototype.startsWithIgnoreCase=function(f){return""===f?this.startsWith(f):Us(this,function(p,m){return 0===p.indexOf(m[0])},[f],"\uffff")},An.prototype.equalsIgnoreCase=function(f){return Us(this,function(p,m){return p===m[0]},[f],"")},An.prototype.anyOfIgnoreCase=function(){var f=Tn.apply(zt,arguments);return 0===f.length?Hs(this):Us(this,function(p,m){return-1!==m.indexOf(p)},f,"")},An.prototype.startsWithAnyOfIgnoreCase=function(){var f=Tn.apply(zt,arguments);return 0===f.length?Hs(this):Us(this,function(p,m){return m.some(function(w){return 0===p.indexOf(w)})},f,"\uffff")},An.prototype.anyOf=function(){var f=this,p=Tn.apply(zt,arguments),m=this._cmp;try{p.sort(m)}catch{return Jn(this,Ot)}if(0===p.length)return Hs(this);var w=new this.Collection(this,function(){return no(p[0],p[p.length-1])});w._ondirectionchange=function(M){p.sort(m="next"===M?f._ascending:f._descending)};var D=0;return w._addAlgorithm(function(M,N,O){for(var H=M.key;0<m(H,p[D]);)if(++D===p.length)return N(O),!1;return 0===m(H,p[D])||(N(function(){M.continue(p[D])}),!1)}),w},An.prototype.notEqual=function(f){return this.inAnyRange([[-1/0,f],[f,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})},An.prototype.noneOf=function(){var f=Tn.apply(zt,arguments);if(0===f.length)return new this.Collection(this);try{f.sort(this._ascending)}catch{return Jn(this,Ot)}var p=f.reduce(function(m,w){return m?m.concat([[m[m.length-1][1],w]]):[[-1/0,w]]},null);return p.push([f[f.length-1],this.db._maxKey]),this.inAnyRange(p,{includeLowers:!1,includeUppers:!1})},An.prototype.inAnyRange=function(ie,p){var m=this,w=this._cmp,D=this._ascending,M=this._descending,N=this._min,O=this._max;if(0===ie.length)return Hs(this);if(!ie.every(function(ue){return void 0!==ue[0]&&void 0!==ue[1]&&D(ue[0],ue[1])<=0}))return Jn(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",ae.InvalidArgument);var Q,H=!p||!1!==p.includeLowers,W=p&&!0===p.includeUppers,F=D;function ee(ue,ce){return F(ue[0],ce[0])}try{(Q=ie.reduce(function(ue,ce){for(var be=0,ke=ue.length;be<ke;++be){var Ve=ue[be];if(w(ce[0],Ve[1])<0&&0<w(ce[1],Ve[0])){Ve[0]=N(Ve[0],ce[0]),Ve[1]=O(Ve[1],ce[1]);break}}return be===ke&&ue.push(ce),ue},[])).sort(ee)}catch{return Jn(this,Ot)}var U=0,Y=W?function(ue){return 0<D(ue,Q[U][1])}:function(ue){return 0<=D(ue,Q[U][1])},Z=H?function(ue){return 0<M(ue,Q[U][0])}:function(ue){return 0<=M(ue,Q[U][0])},K=Y;return(ie=new this.Collection(this,function(){return no(Q[0][0],Q[Q.length-1][1],!H,!W)}))._ondirectionchange=function(ue){F="next"===ue?(K=Y,D):(K=Z,M),Q.sort(ee)},ie._addAlgorithm(function(ue,ce,be){for(var ke,Ve=ue.key;K(Ve);)if(++U===Q.length)return ce(be),!1;return!Y(ke=Ve)&&!Z(ke)||(0===m._cmp(Ve,Q[U][1])||0===m._cmp(Ve,Q[U][0])||ce(function(){ue.continue(F===D?Q[U][0]:Q[U][1])}),!1)}),ie},An.prototype.startsWithAnyOf=function(){var f=Tn.apply(zt,arguments);return f.every(function(p){return"string"==typeof p})?0===f.length?Hs(this):this.inAnyRange(f.map(function(p){return[p,p+"\uffff"]})):Jn(this,"startsWithAnyOf() only works with strings")},An);function An(){}function Kr(f){return fn(function(p){return Gs(p),f(p.target.error),!1})}function Gs(f){f.stopPropagation&&f.stopPropagation(),f.preventDefault&&f.preventDefault()}var ut="storagemutated",qs="x-storagemutated-1",ci=Za(null,ut),Bd=(Vr.prototype._lock=function(){return Ee(!nt.global),++this._reculock,1!==this._reculock||nt.global||(nt.lockOwnerFor=this),this},Vr.prototype._unlock=function(){if(Ee(!nt.global),0==--this._reculock)for(nt.global||(nt.lockOwnerFor=null);0<this._blockedFuncs.length&&!this._locked();){var f=this._blockedFuncs.shift();try{jr(f[1],f[0])}catch{}}return this},Vr.prototype._locked=function(){return this._reculock&&nt.lockOwnerFor!==this},Vr.prototype.create=function(f){var p=this;if(!this.mode)return this;var m=this.db.idbdb,w=this.db._state.dbOpenError;if(Ee(!this.idbtrans),!f&&!m)switch(w&&w.name){case"DatabaseClosedError":throw new ae.DatabaseClosed(w);case"MissingAPIError":throw new ae.MissingAPI(w.message,w);default:throw new ae.OpenFailed(w)}if(!this.active)throw new ae.TransactionInactive;return Ee(null===this._completion._state),(f=this.idbtrans=f||(this.db.core||m).transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability})).onerror=fn(function(D){Gs(D),p._reject(f.error)}),f.onabort=fn(function(D){Gs(D),p.active&&p._reject(new ae.Abort(f.error)),p.active=!1,p.on("abort").fire(D)}),f.oncomplete=fn(function(){p.active=!1,p._resolve(),"mutatedParts"in f&&ci.storagemutated.fire(f.mutatedParts)}),this},Vr.prototype._promise=function(f,p,m){var w=this;if("readwrite"===f&&"readwrite"!==this.mode)return Nn(new ae.ReadOnly("Transaction is readonly"));if(!this.active)return Nn(new ae.TransactionInactive);if(this._locked())return new We(function(M,N){w._blockedFuncs.push([function(){w._promise(f,p,m).then(M,N)},nt])});if(m)return xi(function(){var M=new We(function(N,O){w._lock();var H=p(N,O,w);H&&H.then&&H.then(N,O)});return M.finally(function(){return w._unlock()}),M._lib=!0,M});var D=new We(function(M,N){var O=p(M,N,w);O&&O.then&&O.then(M,N)});return D._lib=!0,D},Vr.prototype._root=function(){return this.parent?this.parent._root():this},Vr.prototype.waitFor=function(f){var p,m=this._root(),w=We.resolve(f);m._waitingFor?m._waitingFor=m._waitingFor.then(function(){return w}):(m._waitingFor=w,m._waitingQueue=[],p=m.idbtrans.objectStore(m.storeNames[0]),function M(){for(++m._spinCount;m._waitingQueue.length;)m._waitingQueue.shift()();m._waitingFor&&(p.get(-1/0).onsuccess=M)}());var D=m._waitingFor;return new We(function(M,N){w.then(function(O){return m._waitingQueue.push(fn(M.bind(null,O)))},function(O){return m._waitingQueue.push(fn(N.bind(null,O)))}).finally(function(){m._waitingFor===D&&(m._waitingFor=null)})})},Vr.prototype.abort=function(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new ae.Abort))},Vr.prototype.table=function(f){var p=this._memoizedTables||(this._memoizedTables={});if(k(p,f))return p[f];var m=this.schema[f];if(!m)throw new ae.NotFound("Table "+f+" not part of transaction");return(m=new this.db.Table(f,m,this)).core=this.db.core.table(f),p[f]=m},Vr);function Vr(){}function qc(f,p,m,w,D,M,N){return{name:f,keyPath:p,unique:m,multi:w,auto:D,compound:M,src:(m&&!N?"&":"")+(w?"*":"")+(D?"++":"")+tu(p)}}function tu(f){return"string"==typeof f?f:f?"["+[].join.call(f,"+")+"]":""}function jd(f,p,m){return{name:f,primKey:p,indexes:m,mappedClass:null,idxByName:(w=function(D){return[D.name,D]},m.reduce(function(D,M,N){return(N=w(M))&&(D[N[0]]=N[1]),D},{}))};var w}var nu=function(f){try{return f.only([[]]),nu=function(){return[[]]},[[]]}catch{return nu=function(){return"\uffff"},"\uffff"}};function Vd(f){return null==f?function(){}:"string"==typeof f?1===(p=f).split(".").length?function(m){return m[p]}:function(m){return he(m,p)}:function(m){return he(m,f)};var p}function Jm(f){return[].slice.call(f)}var Wc=0;function Ni(f){return null==f?":id":"string"==typeof f?f:"[".concat(f.join("+"),"]")}function Yc(f,p,H){function w(K){if(3===K.type)return null;if(4===K.type)throw new Error("Cannot convert never type to IDBKeyRange");var U=K.lower,Y=K.upper,Z=K.lowerOpen;return K=K.upperOpen,void 0===U?void 0===Y?null:p.upperBound(Y,!!K):void 0===Y?p.lowerBound(U,!!Z):p.bound(U,Y,!!Z,!!K)}var M,N,O,W=(N=H,O=Jm((M=f).objectStoreNames),Q={schema:{name:M.name,tables:O.map(function(ee){return N.objectStore(ee)}).map(function(ee){var U=ee.keyPath,K=ee.autoIncrement,Y=q(U),Z={};return K={name:ee.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:null==U,compound:Y,keyPath:U,autoIncrement:K,unique:!0,extractKey:Vd(U)},indexes:Jm(ee.indexNames).map(function(ie){return ee.index(ie)}).map(function(be){var ce=be.unique,ke=be.multiEntry;return ke={name:be.name,compound:q(be=be.keyPath),keyPath:be,unique:ce,multiEntry:ke,extractKey:Vd(be)},Z[Ni(be)]=ke}),getIndexByKeyPath:function(ie){return Z[Ni(ie)]}},Z[":id"]=K.primaryKey,null!=U&&(Z[Ni(U)]=K.primaryKey),K})},hasGetAll:0<O.length&&"getAll"in N.objectStore(O[0])&&!(typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}).hasGetAll,Q=(H=Q.schema).tables.map(function D(ee){var U,Y=ee.name;return{name:Y,schema:ee,mutate:function(Z){var K=Z.trans,ie=Z.type,ue=Z.keys,ce=Z.values,be=Z.range;return new Promise(function(ke,Ve){ke=fn(ke);var Re=K.objectStore(Y),Le=null==Re.keyPath,Ge="put"===ie||"add"===ie;if(!Ge&&"delete"!==ie&&"deleteRange"!==ie)throw new Error("Invalid operation type: "+ie);var je,Ke=(ue||ce||{length:1}).length;if(ue&&ce&&ue.length!==ce.length)throw new Error("Given keys array must have same length as given values array.");if(0===Ke)return ke({numFailures:0,failures:{},results:[],lastResult:void 0});function gt(Kt){++sn,Gs(Kt)}var Tt=[],dt=[],sn=0;if("deleteRange"===ie){if(4===be.type)return ke({numFailures:sn,failures:dt,results:[],lastResult:void 0});Tt.push(je=3===be.type?Re.clear():Re.delete(w(be)))}else{var He=(Le=Ge?Le?[ce,ue]:[ce,null]:[ue,null])[0],Vt=Le[1];if(Ge)for(var qt=0;qt<Ke;++qt)Tt.push(je=Vt&&void 0!==Vt[qt]?Re[ie](He[qt],Vt[qt]):Re[ie](He[qt])),je.onerror=gt;else for(qt=0;qt<Ke;++qt)Tt.push(je=Re[ie](He[qt])),je.onerror=gt}function fi(Kt){Kt=Kt.target.result,Tt.forEach(function(uo,cu){return null!=uo.error&&(dt[cu]=uo.error)}),ke({numFailures:sn,failures:dt,results:"delete"===ie?ue:Tt.map(function(uo){return uo.result}),lastResult:Kt})}je.onerror=function(Kt){gt(Kt),fi(Kt)},je.onsuccess=fi})},getMany:function(Z){var K=Z.trans,ie=Z.keys;return new Promise(function(ue,ce){ue=fn(ue);for(var be,ke=K.objectStore(Y),Ve=ie.length,Re=new Array(Ve),Le=0,Ge=0,je=function(Tt){Re[(Tt=Tt.target)._pos]=Tt.result,++Ge===Le&&ue(Re)},Ke=Kr(ce),gt=0;gt<Ve;++gt)null!=ie[gt]&&((be=ke.get(ie[gt]))._pos=gt,be.onsuccess=je,be.onerror=Ke,++Le);0===Le&&ue(Re)})},get:function(Z){var K=Z.trans,ie=Z.key;return new Promise(function(ue,ce){ue=fn(ue);var be=K.objectStore(Y).get(ie);be.onsuccess=function(ke){return ue(ke.target.result)},be.onerror=Kr(ce)})},query:(U=W,function(Z){return new Promise(function(K,ie){K=fn(K);var ue,ce,be,ke=Z.values,Ve=Z.limit,Re=Ve===1/0?void 0:Ve,Ge=(je=Z.query).index,je=je.range,Le=(Le=Z.trans).objectStore(Y);if(Ge=Ge.isPrimaryKey?Le:Le.index(Ge.name),je=w(je),0===Ve)return K({result:[]});U?((Re=ke?Ge.getAll(je,Re):Ge.getAllKeys(je,Re)).onsuccess=function(Ke){return K({result:Ke.target.result})},Re.onerror=Kr(ie)):(ue=0,ce=!ke&&"openKeyCursor"in Ge?Ge.openKeyCursor(je):Ge.openCursor(je),be=[],ce.onsuccess=function(Ke){var gt=ce.result;return gt?(be.push(ke?gt.value:gt.primaryKey),++ue===Ve?K({result:be}):void gt.continue()):K({result:be})},ce.onerror=Kr(ie))})}),openCursor:function(Z){var K=Z.trans,ie=Z.values,ue=Z.query,ce=Z.reverse,be=Z.unique;return new Promise(function(ke,Ve){ke=fn(ke);var Ge=ue.index,Re=ue.range,Le=K.objectStore(Y),je=(Le=Ge.isPrimaryKey?Le:Le.index(Ge.name),Ge=ce?be?"prevunique":"prev":be?"nextunique":"next",!ie&&"openKeyCursor"in Le?Le.openKeyCursor(w(Re),Ge):Le.openCursor(w(Re),Ge));je.onerror=Kr(Ve),je.onsuccess=fn(function(Ke){var gt,Tt,dt,sn,He=je.result;He?(He.___id=++Wc,He.done=!1,gt=He.continue.bind(He),Tt=(Tt=He.continuePrimaryKey)&&Tt.bind(He),dt=He.advance.bind(He),sn=function(){throw new Error("Cursor not stopped")},He.trans=K,He.stop=He.continue=He.continuePrimaryKey=He.advance=function(){throw new Error("Cursor not started")},He.fail=fn(Ve),He.next=function(){var Vt=this,qt=1;return this.start(function(){return qt--?Vt.continue():Vt.stop()}).then(function(){return Vt})},He.start=function(Vt){function qt(){if(je.result)try{Vt()}catch(Kt){He.fail(Kt)}else He.done=!0,He.start=function(){throw new Error("Cursor behind last entry")},He.stop()}var fi=new Promise(function(Kt,uo){Kt=fn(Kt),je.onerror=Kr(uo),He.fail=uo,He.stop=function(cu){He.stop=He.continue=He.continuePrimaryKey=He.advance=sn,Kt(cu)}});return je.onsuccess=fn(function(Kt){je.onsuccess=qt,qt()}),He.continue=gt,He.continuePrimaryKey=Tt,He.advance=dt,qt(),fi},ke(He)):ke(null)},Ve)})},count:function(Z){var K=Z.query,ie=Z.trans,ue=K.index,ce=K.range;return new Promise(function(be,ke){var Ve=ie.objectStore(Y),Re=ue.isPrimaryKey?Ve:Ve.index(ue.name);(Re=(Ve=w(ce))?Re.count(Ve):Re.count()).onsuccess=fn(function(Le){return be(Le.target.result)}),Re.onerror=Kr(ke)})}}}),F={};return Q.forEach(function(ee){return F[ee.name]=ee}),{stack:"dbcore",transaction:f.transaction.bind(f),table:function(ee){if(!F[ee])throw new Error("Table '".concat(ee,"' not found"));return F[ee]},MIN_KEY:-1/0,MAX_KEY:nu(p),schema:H}}function Ws(f,w){w=function Kc(f,p,m,w){return{dbcore:(w=Yc(p,m.IDBKeyRange,w),f.dbcore.reduce(function(M,N){return N=N.create,B(B({},M),N(M))},w))}}(f._middlewares,w.db,f._deps,w),f.core=w.dbcore,f.tables.forEach(function(D){var M=D.name;f.core.schema.tables.some(function(N){return N.name===M})&&(D.core=f.core.table(M),f[M]instanceof f.Table&&(f[M].core=D.core))})}function Hr(f,p,m,w){m.forEach(function(D){var M=w[D];p.forEach(function(N){var O=function H(W,Q){return ge(W,Q)||(W=L(W))&&H(W,Q)}(N,D);(!O||"value"in O&&void 0===O.value)&&(N===f.Transaction.prototype||N instanceof f.Transaction?j(N,D,{get:function(){return this.table(D)},set:function(H){A(this,D,{value:H,writable:!0,configurable:!0,enumerable:!0})}}):N[D]=new f.Table(D,M))})})}function Lo(f,p){p.forEach(function(m){for(var w in m)m[w]instanceof f.Table&&delete m[w]})}function Hd(f,p){return f._cfg.version-p._cfg.version}function Ud(f,p){var m,w={del:[],add:[],change:[]};for(m in f)p[m]||w.del.push(m);for(m in p){var D=f[m],M=p[m];if(D){var N={name:m,def:M,recreate:!1,del:[],add:[],change:[]};if(""+(D.primKey.keyPath||"")!=""+(M.primKey.keyPath||"")||D.primKey.auto!==M.primKey.auto)N.recreate=!0,w.change.push(N);else{var O=D.idxByName,H=M.idxByName,W=void 0;for(W in O)H[W]||N.del.push(W);for(W in H){var Q=O[W],F=H[W];Q?Q.src!==F.src&&N.change.push(F):N.add.push(F)}(0<N.del.length||0<N.add.length||0<N.change.length)&&w.change.push(N)}}else w.add.push([m,M])}return w}function Qc(f,p,m,w){var D=f.db.createObjectStore(p,m.keyPath?{keyPath:m.keyPath,autoIncrement:m.auto}:{autoIncrement:m.auto});return w.forEach(function(M){return Zc(D,M)}),D}function $d(f,p){$(f).forEach(function(m){p.db.objectStoreNames.contains(m)||(_r&&console.debug("Dexie: Creating missing table",m),Qc(p,m,f[m].primKey,f[m].indexes))})}function Zc(f,p){f.createIndex(p.name,p.keyPath,{unique:p.unique,multiEntry:p.multi})}function ru(f,p,m){var w={};return Ie(p.objectStoreNames,0).forEach(function(D){for(var M=m.objectStore(D),N=qc(tu(W=M.keyPath),W||"",!0,!1,!!M.autoIncrement,W&&"string"!=typeof W,!0),O=[],H=0;H<M.indexNames.length;++H){var W=(Q=M.index(M.indexNames[H])).keyPath,Q=qc(Q.name,W,!!Q.unique,!!Q.multiEntry,!1,W&&"string"!=typeof W,!1);O.push(Q)}w[D]=jd(D,N,O)}),w}function ls(f,p,m){for(var w=m.db.objectStoreNames,D=0;D<w.length;++D){var M=w[D],N=m.objectStore(M);f._hasGetAll="getAll"in N;for(var O=0;O<N.indexNames.length;++O){var H=N.indexNames[O],W=N.index(H).keyPath,Q="string"==typeof W?W:"["+Ie(W).join("+")+"]";!p[M]||(W=p[M].idxByName[Q])&&(W.name=H,delete p[M].idxByName[Q],p[M].idxByName[H]=W)}}typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&J.WorkerGlobalScope&&J instanceof J.WorkerGlobalScope&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(f._hasGetAll=!1)}function Ft(f){return f.split(",").map(function(p,m){var w=(p=p.trim()).replace(/([&*]|\+\+)/g,""),D=/^\[/.test(w)?w.match(/^\[(.*)\]$/)[1].split("+"):w;return qc(w,D||null,/\&/.test(p),/\*/.test(p),/\+\+/.test(p),q(D),0===m)})}var Xc=(Ys.prototype._parseStoresSpec=function(f,p){$(f).forEach(function(m){if(null!==f[m]){var w=Ft(f[m]),D=w.shift();if(D.unique=!0,D.multi)throw new ae.Schema("Primary key cannot be multi-valued");w.forEach(function(M){if(M.auto)throw new ae.Schema("Only primary key can be marked as autoIncrement (++)");if(!M.keyPath)throw new ae.Schema("Index must have a name and cannot be an empty string")}),p[m]=jd(m,D,w)}})},Ys.prototype.stores=function(m){var p=this.db;this._cfg.storesSource=this._cfg.storesSource?P(this._cfg.storesSource,m):m;var w={},D={};return(m=p._versions).forEach(function(M){P(w,M._cfg.storesSource),D=M._cfg.dbschema={},M._parseStoresSpec(w,D)}),p._dbSchema=D,Lo(p,[p._allTables,p,p.Transaction.prototype]),Hr(p,[p._allTables,p,p.Transaction.prototype,this._cfg.tables],$(D),D),p._storeNames=$(D),this},Ys.prototype.upgrade=function(f){return this._cfg.contentUpgrade=ui(this._cfg.contentUpgrade||ot,f),this},Ys);function Ys(){}function er(f,p){var m=f._dbNamesDB;return m||(m=f._dbNamesDB=new so(cs,{addons:[],indexedDB:f,IDBKeyRange:p})).version(1).stores({dbnames:"name"}),m.table("dbnames")}function iu(f){return f&&"function"==typeof f.databases}function zd(f){return xi(function(){return nt.letThrough=!0,f()})}function Gd(f){return!("from"in f)}var kn=function(f,p){if(!this){var m=new kn;return f&&"d"in f&&P(m,f),m}P(this,arguments.length?{d:1,from:f,to:1<arguments.length?p:f}:{d:0})};function Bo(f,p,m){var w=jt(p,m);if(!isNaN(w)){if(0<w)throw RangeError();if(Gd(f))return P(f,{from:p,to:m,d:1});var D=f.l;if(w=f.r,jt(m,f.from)<0)return D?Bo(D,p,m):f.l={from:p,to:m,d:1,l:null,r:null},Wd(f);if(0<jt(p,f.to))return w?Bo(w,p,m):f.r={from:p,to:m,d:1,l:null,r:null},Wd(f);jt(p,f.from)<0&&(f.from=p,f.l=null,f.d=w?w.d+1:1),0<jt(m,f.to)&&(f.to=m,f.r=null,f.d=f.l?f.l.d+1:1),m=!f.r,D&&!f.l&&ro(f,D),w&&m&&ro(f,w)}}function ro(f,p){Gd(p)||function m(w,H){var M=H.from,N=H.to,O=H.l;H=H.r,Bo(w,M,N),O&&m(w,O),H&&m(w,H)}(f,p)}function qd(f,p){var m=ou(p),w=m.next();if(w.done)return!1;for(var D=w.value,M=ou(f),N=M.next(D.from),O=N.value;!w.done&&!N.done;){if(jt(O.from,D.to)<=0&&0<=jt(O.to,D.from))return!0;jt(D.from,O.from)<0?D=(w=m.next(O.from)).value:O=(N=M.next(D.from)).value}return!1}function ou(f){var p=Gd(f)?null:{s:0,n:f};return{next:function(m){for(var w=0<arguments.length;p;)switch(p.s){case 0:if(p.s=1,w)for(;p.n.l&&jt(m,p.n.from)<0;)p={up:p,n:p.n.l,s:1};else for(;p.n.l;)p={up:p,n:p.n.l,s:1};case 1:if(p.s=2,!w||jt(m,p.n.to)<=0)return{value:p.n,done:!1};case 2:if(p.n.r){p.s=3,p={up:p,n:p.n.r,s:0};continue}case 3:p=p.up}return{done:!0}}}}function Wd(f){var p,m,w=((null===(p=f.r)||void 0===p?void 0:p.d)||0)-((null===(m=f.l)||void 0===m?void 0:m.d)||0),D=1<w?"r":w<-1?"l":"";D&&(p="r"==D?"l":"r",m=B({},f),f.from=(w=f[D]).from,f.to=w.to,f[D]=w[D],m[D]=w[p],(f[p]=m).d=Jc(m)),f.d=Jc(f)}function Jc(m){var p=m.r;return m=m.l,(p?m?Math.max(p.d,m.d):p.d:m?m.d:0)+1}function Ai(f,p){return $(p).forEach(function(m){f[m]?ro(f[m],p[m]):f[m]=function w(D){var M,N,O={};for(M in D)k(D,M)&&(O[M]=!(N=D[M])||"object"!=typeof N||it.has(N.constructor)?N:w(N));return O}(p[m])}),f}function el(f,p){return f.all||p.all||Object.keys(f).some(function(m){return p[m]&&qd(p[m],f[m])})}x(kn.prototype,((Gn={add:function(f){return ro(this,f),this},addKey:function(f){return Bo(this,f,f),this},addKeys:function(f){var p=this;return f.forEach(function(m){return Bo(p,m,m)}),this},hasKey:function(f){var p=ou(this).next(f).value;return p&&jt(p.from,f)<=0&&0<=jt(p.to,f)}})[Oe]=function(){return ou(this)},Gn));var fr={},tl={},Rt=!1;function Ks(f){Ai(tl,f),Rt||(Rt=!0,setTimeout(function(){Rt=!1,_t(tl,!(tl={}))},0))}function _t(f,p){void 0===p&&(p=!1);var m=new Set;if(f.all)for(var w=0,D=Object.values(fr);w<D.length;w++)Qs(N=D[w],f,m,p);else for(var M in f){var N,O=/^idb\:\/\/(.*)\/(.*)\//.exec(M);O&&(M=O[1],O=O[2],(N=fr["idb://".concat(M,"/").concat(O)])&&Qs(N,f,m,p))}m.forEach(function(H){return H()})}function Qs(f,p,m,w){for(var D=[],M=0,N=Object.entries(f.queries.query);M<N.length;M++){for(var O=N[M],H=O[0],W=[],Q=0,F=O[1];Q<F.length;Q++){var ee=F[Q];el(p,ee.obsSet)?ee.subscribers.forEach(function(K){return m.add(K)}):w&&W.push(ee)}w&&D.push([H,W])}if(w)for(var U=0,Y=D;U<Y.length;U++){var Z=Y[U];f.queries.query[H=Z[0]]=W=Z[1]}}function nl(f){var p=f._state,m=f._deps.indexedDB;if(p.isBeingOpened||f.idbdb)return p.dbReadyPromise.then(function(){return p.dbOpenError?Nn(p.dbOpenError):f});p.isBeingOpened=!0,p.dbOpenError=null,p.openComplete=!1;var w=p.openCanceller,D=Math.round(10*f.verno),M=!1;function N(){if(p.openCanceller!==w)throw new ae.DatabaseClosed("db.open() was cancelled")}var H,W=p.dbReadyResolve,Q=null,F=!1;return We.race([w,(typeof navigator>"u"?We.resolve():!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise(function(ee){function U(){return indexedDB.databases().finally(ee)}H=setInterval(U,100),U()}).finally(function(){return clearInterval(H)}):Promise.resolve()).then(function O(){return new We(function(ee,U){if(N(),!m)throw new ae.MissingAPI;var Y=f.name,Z=p.autoSchema||!D?m.open(Y):m.open(Y,D);if(!Z)throw new ae.MissingAPI;Z.onerror=Kr(U),Z.onblocked=fn(f._fireOnBlocked),Z.onupgradeneeded=fn(function(K){var ie;Q=Z.transaction,p.autoSchema&&!f._options.allowEmptyDB?(Z.onerror=Gs,Q.abort(),Z.result.close(),(ie=m.deleteDatabase(Y)).onsuccess=ie.onerror=fn(function(){U(new ae.NoSuchDatabase("Database ".concat(Y," doesnt exist")))})):(Q.onerror=Kr(U),K=K.oldVersion>Math.pow(2,62)?0:K.oldVersion,F=K<1,f.idbdb=Z.result,M&&function Yt(f,p){$d(f._dbSchema,p),p.db.version%10!=0||p.objectStoreNames.contains("$meta")||p.db.createObjectStore("$meta").add(Math.ceil(p.db.version/10-1),"version");var m=ru(0,f.idbdb,p);ls(f,f._dbSchema,p);for(var w=0,D=Ud(m,f._dbSchema).change;w<D.length;w++){var M=function(N){if(N.change.length||N.recreate)return console.warn("Unable to patch indexes of table ".concat(N.name," because it has changes on the type of index or primary key.")),{value:void 0};var O=p.objectStore(N.name);N.add.forEach(function(H){_r&&console.debug("Dexie upgrade patch: Creating missing index ".concat(N.name,".").concat(H.src)),Zc(O,H)})}(D[w]);if("object"==typeof M)return M.value}}(f,Q),function wt(f,p,m,w){var D=f._dbSchema;m.objectStoreNames.contains("$meta")&&!D.$meta&&(D.$meta=jd("$meta",Ft("")[0],[]),f._storeNames.push("$meta"));var M=f._createTransaction("readwrite",f._storeNames,D);M.create(m),M._completion.catch(w);var N=M._reject.bind(M),O=nt.transless||nt;xi(function(){return nt.trans=M,nt.transless=O,0!==p?(Ws(f,m),W=p,((H=M).storeNames.includes("$meta")?H.table("$meta").get("version").then(function(Q){return Q??W}):We.resolve(W)).then(function(Q){return ee=Q,U=M,Z=[],Q=(F=f)._versions,K=F._dbSchema=ru(0,F.idbdb,Y=m),0!==(Q=Q.filter(function(ie){return ie._cfg.version>=ee})).length?(Q.forEach(function(ie){Z.push(function(){var ue=K,ce=ie._cfg.dbschema;ls(F,ue,Y),ls(F,ce,Y),K=F._dbSchema=ce;var be=Ud(ue,ce);be.add.forEach(function(Ge){Qc(Y,Ge[0],Ge[1].primKey,Ge[1].indexes)}),be.change.forEach(function(Ge){if(Ge.recreate)throw new ae.Upgrade("Not yet support for changing primary key");var je=Y.objectStore(Ge.name);Ge.add.forEach(function(Ke){return Zc(je,Ke)}),Ge.change.forEach(function(Ke){je.deleteIndex(Ke.name),Zc(je,Ke)}),Ge.del.forEach(function(Ke){return je.deleteIndex(Ke)})});var ke=ie._cfg.contentUpgrade;if(ke&&ie._cfg.version>ee){Ws(F,Y),U._memoizedTables={};var Ve=Ne(ce);be.del.forEach(function(Ge){Ve[Ge]=ue[Ge]}),Lo(F,[F.Transaction.prototype]),Hr(F,[F.Transaction.prototype],$(Ve),Ve),U.schema=Ve;var Re,Le=Wr(ke);return Le&&cr(),be=We.follow(function(){var Ge;(Re=ke(U))&&Le&&(Ge=Dr.bind(null,null),Re.then(Ge,Ge))}),Re&&"function"==typeof Re.then?We.resolve(Re):be.then(function(){return Re})}}),Z.push(function(ue){var ce,be;ce=ie._cfg.dbschema,[].slice.call((be=ue).db.objectStoreNames).forEach(function(Ve){return null==ce[Ve]&&be.db.deleteObjectStore(Ve)}),Lo(F,[F.Transaction.prototype]),Hr(F,[F.Transaction.prototype],F._storeNames,F._dbSchema),U.schema=F._dbSchema}),Z.push(function(ue){F.idbdb.objectStoreNames.contains("$meta")&&(Math.ceil(F.idbdb.version/10)===ie._cfg.version?(F.idbdb.deleteObjectStore("$meta"),delete F._dbSchema.$meta,F._storeNames=F._storeNames.filter(function(ce){return"$meta"!==ce})):ue.objectStore("$meta").put(ie._cfg.version,"version"))})}),function ie(){return Z.length?We.resolve(Z.shift()(U.idbtrans)).then(ie):We.resolve()}().then(function(){$d(K,Y)})):We.resolve();var F,ee,U,Y,Z,K}).catch(N)):($(D).forEach(function(Q){Qc(m,Q,D[Q].primKey,D[Q].indexes)}),Ws(f,m),void We.follow(function(){return f.on.populate.fire(M)}).catch(N));var H,W})}(f,K/10,Q,U))},U),Z.onsuccess=fn(function(){Q=null;var K,ie,ue,ce,be,ke=f.idbdb=Z.result,Ve=Ie(ke.objectStoreNames);if(0<Ve.length)try{var Re=ke.transaction(1===(ce=Ve).length?ce[0]:ce,"readonly");if(p.autoSchema)ue=Re,(K=f).verno=(ie=ke).version/10,ue=K._dbSchema=ru(0,ie,ue),K._storeNames=Ie(ie.objectStoreNames,0),Hr(K,[K._allTables],$(ue),ue);else if(ls(f,f._dbSchema,Re),((be=Ud(ru(0,(be=f).idbdb,Re),be._dbSchema)).add.length||be.change.some(function(Le){return Le.add.length||Le.change.length}))&&!M)return console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Dexie will add missing parts and increment native version number to workaround this."),ke.close(),D=ke.version+1,M=!0,ee(O());Ws(f,Re)}catch{}mn.push(f),ke.onversionchange=fn(function(Le){p.vcFired=!0,f.on("versionchange").fire(Le)}),ke.onclose=fn(function(Le){f.on("close").fire(Le)}),F&&(Re=Y,ke=(be=f._deps).indexedDB,be=be.IDBKeyRange,iu(ke)||Re===cs||er(ke,be).put({name:Re}).catch(ot)),ee()},U)}).catch(function(ee){switch(ee?.name){case"UnknownError":if(0<p.PR1398_maxLoop)return p.PR1398_maxLoop--,console.warn("Dexie: Workaround for Chrome UnknownError on open()"),O();break;case"VersionError":if(0<D)return D=0,O()}return We.reject(ee)})})]).then(function(){return N(),p.onReadyBeingFired=[],We.resolve(zd(function(){return f.on.ready.fire(f.vip)})).then(function ee(){if(0<p.onReadyBeingFired.length){var U=p.onReadyBeingFired.reduce(ui,ot);return p.onReadyBeingFired=[],We.resolve(zd(function(){return U(f.vip)})).then(ee)}})}).finally(function(){p.openCanceller===w&&(p.onReadyBeingFired=null,p.isBeingOpened=!1)}).catch(function(ee){p.dbOpenError=ee;try{Q&&Q.abort()}catch{}return w===p.openCanceller&&f._close(),Nn(ee)}).finally(function(){p.openComplete=!0,W()}).then(function(){var ee;return F&&(ee={},f.tables.forEach(function(U){U.schema.indexes.forEach(function(Y){Y.name&&(ee["idb://".concat(f.name,"/").concat(U.name,"/").concat(Y.name)]=new kn(-1/0,[[[]]]))}),ee["idb://".concat(f.name,"/").concat(U.name,"/")]=ee["idb://".concat(f.name,"/").concat(U.name,"/:dels")]=new kn(-1/0,[[[]]])}),ci(ut).fire(ee),_t(ee,!0)),f})}function jo(f){function p(M){return f.next(M)}var m=D(p),w=D(function(M){return f.throw(M)});function D(M){return function(H){var O=M(H);return H=O.value,O.done?H:H&&"function"==typeof H.then?H.then(m,w):q(H)?Promise.all(H).then(m,w):m(H)}}return D(p)()}function su(f,p,m){for(var w=q(f)?f.slice():[f],D=0;D<m;++D)w.push(p);return w}var e0={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(f){return B(B({},f),{table:function(p){var m=f.table(p),w=m.schema,D={},M=[];function N(F,ee,U){var Y=Ni(F),Z=D[Y]=D[Y]||[],K=null==F?0:"string"==typeof F?1:F.length,ie=0<ee;return ie=B(B({},U),{name:ie?"".concat(Y,"(virtual-from:").concat(U.name,")"):U.name,lowLevelIndex:U,isVirtual:ie,keyTail:ee,keyLength:K,extractKey:Vd(F),unique:!ie&&U.unique}),Z.push(ie),ie.isPrimaryKey||M.push(ie),1<K&&N(2===K?F[0]:F.slice(0,K-1),ee+1,U),Z.sort(function(ue,ce){return ue.keyTail-ce.keyTail}),ie}p=N(w.primaryKey.keyPath,0,w.primaryKey),D[":id"]=[p];for(var O=0,H=w.indexes;O<H.length;O++){var W=H[O];N(W.keyPath,0,W)}function Q(F){var ee,U=F.query.index;return U.isVirtual?B(B({},F),{query:{index:U.lowLevelIndex,range:(ee=F.query.range,U=U.keyTail,{type:1===ee.type?2:ee.type,lower:su(ee.lower,ee.lowerOpen?f.MAX_KEY:f.MIN_KEY,U),lowerOpen:!0,upper:su(ee.upper,ee.upperOpen?f.MIN_KEY:f.MAX_KEY,U),upperOpen:!0})}}):F}return B(B({},m),{schema:B(B({},w),{primaryKey:p,indexes:M,getIndexByKeyPath:function(F){return(F=D[Ni(F)])&&F[0]}}),count:function(F){return m.count(Q(F))},query:function(F){return m.query(Q(F))},openCursor:function(F){var ee=F.query.index,U=ee.keyTail,Z=ee.keyLength;return ee.isVirtual?m.openCursor(Q(F)).then(function(ie){return ie&&function K(ie){return Object.create(ie,{continue:{value:function(ue){null!=ue?ie.continue(su(ue,F.reverse?f.MAX_KEY:f.MIN_KEY,U)):F.unique?ie.continue(ie.key.slice(0,Z).concat(F.reverse?f.MIN_KEY:f.MAX_KEY,U)):ie.continue()}},continuePrimaryKey:{value:function(ue,ce){ie.continuePrimaryKey(su(ue,f.MAX_KEY,U),ce)}},primaryKey:{get:function(){return ie.primaryKey}},key:{get:function(){var ue=ie.key;return 1===Z?ue[0]:ue.slice(0,Z)}},value:{get:function(){return ie.value}}})}(ie)}):m.openCursor(F)}})}})}};function rl(f,p,m,w){return m=m||{},w=w||"",$(f).forEach(function(D){var M,N,O;k(p,D)?(N=p[D],"object"==typeof(M=f[D])&&"object"==typeof N&&M&&N?(O=xe(M))!==xe(N)?m[w+D]=p[D]:"Object"===O?rl(M,N,m,w+D+"."):M!==N&&(m[w+D]=p[D]):M!==N&&(m[w+D]=p[D])):m[w+D]=void 0}),$(p).forEach(function(D){k(f,D)||(m[w+D]=p[D])}),m}function il(f,p){return"delete"===p.type?p.keys:p.keys||p.values.map(f.extractKey)}var ol={stack:"dbcore",name:"HooksMiddleware",level:2,create:function(f){return B(B({},f),{table:function(p){var m=f.table(p),w=m.schema.primaryKey;return B(B({},m),{mutate:function(D){var M=nt.trans,N=M.table(p).hook,O=N.deleting,H=N.creating,W=N.updating;switch(D.type){case"add":if(H.fire===ot)break;return M._promise("readwrite",function(){return Q(D)},!0);case"put":if(H.fire===ot&&W.fire===ot)break;return M._promise("readwrite",function(){return Q(D)},!0);case"delete":if(O.fire===ot)break;return M._promise("readwrite",function(){return Q(D)},!0);case"deleteRange":if(O.fire===ot)break;return M._promise("readwrite",function(){return function F(ee,U,Y){return m.query({trans:ee,values:!1,query:{index:w,range:U},limit:Y}).then(function(Z){var K=Z.result;return Q({type:"delete",keys:K,trans:ee}).then(function(ie){return 0<ie.numFailures?Promise.reject(ie.failures[0]):K.length<Y?{failures:[],numFailures:0,lastResult:void 0}:F(ee,B(B({},U),{lower:K[K.length-1],lowerOpen:!0}),Y)})})}(D.trans,D.range,1e4)},!0)}return m.mutate(D);function Q(F){var ee,U,Y,Z=nt.trans,K=F.keys||il(w,F);if(!K)throw new Error("Keys missing");return"delete"!==(F="add"===F.type||"put"===F.type?B(B({},F),{keys:K}):B({},F)).type&&(F.values=le([],F.values,!0)),F.keys&&(F.keys=le([],F.keys,!0)),ee=m,Y=K,("add"===(U=F).type?Promise.resolve([]):ee.getMany({trans:U.trans,keys:Y,cache:"immutable"})).then(function(ie){var ue=K.map(function(ce,be){var ke,Ve,Re,Le=ie[be],Ge={onerror:null,onsuccess:null};return"delete"===F.type?O.fire.call(Ge,ce,Le,Z):"add"===F.type||void 0===Le?(ke=H.fire.call(Ge,ce,F.values[be],Z),null==ce&&null!=ke&&(F.keys[be]=ce=ke,w.outbound||_e(F.values[be],w.keyPath,ce))):(ke=rl(Le,F.values[be]),(Ve=W.fire.call(Ge,ke,ce,Le,Z))&&(Re=F.values[be],Object.keys(Ve).forEach(function(je){k(Re,je)?Re[je]=Ve[je]:_e(Re,je,Ve[je])}))),Ge});return m.mutate(F).then(function(ce){for(var be=ce.failures,ke=ce.results,Ve=ce.numFailures,Re=(ce=ce.lastResult,0);Re<K.length;++Re){var Le=(ke||K)[Re],Ge=ue[Re];null==Le?Ge.onerror&&Ge.onerror(be[Re]):Ge.onsuccess&&Ge.onsuccess("put"===F.type&&ie[Re]?F.values[Re]:Le)}return{failures:be,results:ke,numFailures:Ve,lastResult:ce}}).catch(function(ce){return ue.forEach(function(be){return be.onerror&&be.onerror(ce)}),Promise.reject(ce)})})}}})}})}};function Yd(f,p,m){try{if(!p||p.keys.length<f.length)return null;for(var w=[],D=0,M=0;D<p.keys.length&&M<f.length;++D)0===jt(p.keys[D],f[M])&&(w.push(m?pe(p.values[D]):p.values[D]),++M);return w.length===f.length?w:null}catch{return null}}var sl={stack:"dbcore",level:-1,create:function(f){return{table:function(p){var m=f.table(p);return B(B({},m),{getMany:function(w){if(!w.cache)return m.getMany(w);var D=Yd(w.keys,w.trans._cache,"clone"===w.cache);return D?We.resolve(D):m.getMany(w).then(function(M){return w.trans._cache={keys:w.keys,values:"clone"===w.cache?pe(M):M},M})},mutate:function(w){return"add"!==w.type&&(w.trans._cache=null),m.mutate(w)}})}}}};function Kd(f,p){return"readonly"===f.trans.mode&&!!f.subscr&&!f.trans.explicit&&"disabled"!==f.trans.db._options.cache&&!p.schema.primaryKey.outbound}function io(f,p){switch(f){case"query":return p.values&&!p.unique;case"get":case"getMany":case"count":case"openCursor":return!1}}var t0={stack:"dbcore",level:0,name:"Observability",create:function(f){var p=f.schema.name,m=new kn(f.MIN_KEY,f.MAX_KEY);return B(B({},f),{transaction:function(w,D,M){if(nt.subscr&&"readonly"!==D)throw new ae.ReadOnly("Readwrite transaction in liveQuery context. Querier source: ".concat(nt.querier));return f.transaction(w,D,M)},table:function(w){var D=f.table(w),M=D.schema,N=M.primaryKey,F=M.indexes,O=N.extractKey,H=N.outbound,W=N.autoIncrement&&F.filter(function(U){return U.compound&&U.keyPath.includes(N.keyPath)}),Q=B(B({},D),{mutate:function(U){function Y(je){return je="idb://".concat(p,"/").concat(w,"/").concat(je),ce[je]||(ce[je]=new kn)}var Z,K,ie,ue=U.trans,ce=U.mutatedParts||(U.mutatedParts={}),be=Y(""),ke=Y(":dels"),Ve=U.type,Re=(Ge="deleteRange"===U.type?[U.range]:"delete"===U.type?[U.keys]:U.values.length<50?[il(N,U).filter(function(je){return je}),U.values]:[])[0],Le=Ge[1],Ge=U.trans._cache;return q(Re)?(be.addKeys(Re),(Ge="delete"===Ve||Re.length===Le.length?Yd(Re,Ge):null)||ke.addKeys(Re),(Ge||Le)&&(Z=Y,K=Ge,ie=Le,M.indexes.forEach(function(je){var Ke=Z(je.name||"");function gt(dt){return null!=dt?je.extractKey(dt):null}function Tt(dt){return je.multiEntry&&q(dt)?dt.forEach(function(sn){return Ke.addKey(sn)}):Ke.addKey(dt)}(K||ie).forEach(function(dt,Vt){var He=K&&gt(K[Vt]);0!==jt(He,Vt=ie&&gt(ie[Vt]))&&(null!=He&&Tt(He),null!=Vt&&Tt(Vt))})}))):Re?(Le={from:null!==(Le=Re.lower)&&void 0!==Le?Le:f.MIN_KEY,to:null!==(Le=Re.upper)&&void 0!==Le?Le:f.MAX_KEY},ke.add(Le),be.add(Le)):(be.add(m),ke.add(m),M.indexes.forEach(function(je){return Y(je.name).add(m)})),D.mutate(U).then(function(je){return!Re||"add"!==U.type&&"put"!==U.type||(be.addKeys(je.results),W&&W.forEach(function(Ke){for(var gt=U.values.map(function(He){return Ke.extractKey(He)}),Tt=Ke.keyPath.findIndex(function(He){return He===N.keyPath}),dt=0,sn=je.results.length;dt<sn;++dt)gt[dt][Tt]=je.results[dt];Y(Ke.name).addKeys(gt)})),ue.mutatedParts=Ai(ue.mutatedParts||{},ce),je})}}),ee={get:function(U){return[N,new kn(U.key)]},getMany:function(U){return[N,(new kn).addKeys(U.keys)]},count:F=function(Y){var Z;return[Y=(Z=Y.query).index,new kn(null!==(Y=(Z=Z.range).lower)&&void 0!==Y?Y:f.MIN_KEY,null!==(Z=Z.upper)&&void 0!==Z?Z:f.MAX_KEY)]},query:F,openCursor:F};return $(ee).forEach(function(U){Q[U]=function(Y){var K=!!(Z=nt.subscr),ie=Kd(nt,D)&&io(U,Y)?Y.obsSet={}:Z;if(K){var ue=function(Le){return Le="idb://".concat(p,"/").concat(w,"/").concat(Le),ie[Le]||(ie[Le]=new kn)},ce=ue(""),be=ue(":dels"),Z=(K=(Z=ee[U](Y))[0],Z[1]);if(("query"===U&&K.isPrimaryKey&&!Y.values?be:ue(K.name||"")).add(Z),!K.isPrimaryKey){if("count"!==U){var ke="query"===U&&H&&Y.values&&D.query(B(B({},Y),{values:!1}));return D[U].apply(this,arguments).then(function(Le){if("query"===U){if(H&&Y.values)return ke.then(function(gt){return ce.addKeys(gt=gt.result),Le});var Ge=Y.values?Le.result.map(O):Le.result;(Y.values?ce:be).addKeys(Ge)}else if("openCursor"===U){var je=Le,Ke=Y.values;return je&&Object.create(je,{key:{get:function(){return be.addKey(je.primaryKey),je.key}},primaryKey:{get:function(){var gt=je.primaryKey;return be.addKey(gt),gt}},value:{get:function(){return Ke&&ce.addKey(je.primaryKey),je.value}}})}return Le})}be.add(m)}}return D[U].apply(this,arguments)}}),Q}})}};function ir(f,p,m){return 0===m.numFailures?p:"deleteRange"===p.type||m.numFailures===(p.keys?p.keys.length:"values"in p&&p.values?p.values.length:1)?null:(p=B({},p),q(p.keys)&&(p.keys=p.keys.filter(function(D,M){return!(M in m.failures)})),"values"in p&&q(p.values)&&(p.values=p.values.filter(function(D,M){return!(M in m.failures)})),p)}function oo(f,p){return m=f,(void 0===(w=p).lower||(w.lowerOpen?0<jt(m,w.lower):0<=jt(m,w.lower)))&&(void 0===p.upper||(p.upperOpen?jt(f,p.upper)<0:jt(f,p.upper)<=0));var m,w}function al(f,p,ee,w,D,M){if(!ee||0===ee.length)return f;var N=p.query.index,O=N.multiEntry,H=p.query.range,W=w.schema.primaryKey.extractKey,Q=N.extractKey,F=(N.lowLevelIndex||N).extractKey;return(ee=ee.reduce(function(U,Y){var Z=U,K=[];if("add"===Y.type||"put"===Y.type)for(var ie=new kn,ue=Y.values.length-1;0<=ue;--ue){var ce,be=Y.values[ue],ke=W(be);ie.hasKey(ke)||(ce=Q(be),(O&&q(ce)?ce.some(function(je){return oo(je,H)}):oo(ce,H))&&(ie.addKey(ke),K.push(be)))}switch(Y.type){case"add":var Ve=(new kn).addKeys(p.values?U.map(function(Ke){return W(Ke)}):U);Z=U.concat(p.values?K.filter(function(Ke){return Ke=W(Ke),!Ve.hasKey(Ke)&&(Ve.addKey(Ke),!0)}):K.map(function(Ke){return W(Ke)}).filter(function(Ke){return!Ve.hasKey(Ke)&&(Ve.addKey(Ke),!0)}));break;case"put":var Re=(new kn).addKeys(Y.values.map(function(Ke){return W(Ke)}));Z=U.filter(function(Ke){return!Re.hasKey(p.values?W(Ke):Ke)}).concat(p.values?K:K.map(function(Ke){return W(Ke)}));break;case"delete":var Le=(new kn).addKeys(Y.keys);Z=U.filter(function(Ke){return!Le.hasKey(p.values?W(Ke):Ke)});break;case"deleteRange":var Ge=Y.range;Z=U.filter(function(Ke){return!oo(W(Ke),Ge)})}return Z},f))===f?f:(ee.sort(function(U,Y){return jt(F(U),F(Y))||jt(W(U),W(Y))}),p.limit&&p.limit<1/0&&(ee.length>p.limit?ee.length=p.limit:f.length===p.limit&&ee.length<p.limit&&(D.dirty=!0)),M?Object.freeze(ee):ee)}function Zs(f,p){return 0===jt(f.lower,p.lower)&&0===jt(f.upper,p.upper)&&!!f.lowerOpen==!!p.lowerOpen&&!!f.upperOpen==!!p.upperOpen}var O_={stack:"dbcore",level:0,name:"Cache",create:function(f){var p=f.schema.name;return B(B({},f),{transaction:function(m,w,D){var M,N,O=f.transaction(m,w,D);return"readwrite"===w&&(N=(M=new AbortController).signal,O.addEventListener("abort",(D=function(H){return function(){if(M.abort(),"readwrite"===w){for(var W=new Set,Q=0,F=m;Q<F.length;Q++){var ee=F[Q],U=fr["idb://".concat(p,"/").concat(ee)];if(U){var Y=f.table(ee),Z=U.optimisticOps.filter(function(Ke){return Ke.trans===O});if(O._explicit&&H&&O.mutatedParts)for(var K=0,ie=Object.values(U.queries.query);K<ie.length;K++)for(var ue=0,ce=(Ve=ie[K]).slice();ue<ce.length;ue++)el((Re=ce[ue]).obsSet,O.mutatedParts)&&(yt(Ve,Re),Re.subscribers.forEach(function(Ke){return W.add(Ke)}));else if(0<Z.length){U.optimisticOps=U.optimisticOps.filter(function(Ke){return Ke.trans!==O});for(var be=0,ke=Object.values(U.queries.query);be<ke.length;be++)for(var Ve,Re,Le,Ge=0,je=(Ve=ke[be]).slice();Ge<je.length;Ge++)null!=(Re=je[Ge]).res&&O.mutatedParts&&(H&&!Re.dirty?(Le=Object.isFrozen(Re.res),Le=al(Re.res,Re.req,Z,Y,Re,Le),Re.dirty?(yt(Ve,Re),Re.subscribers.forEach(function(Ke){return W.add(Ke)})):Le!==Re.res&&(Re.res=Le,Re.promise=We.resolve({result:Le}))):(Re.dirty&&yt(Ve,Re),Re.subscribers.forEach(function(Ke){return W.add(Ke)})))}}}W.forEach(function(Ke){return Ke()})}}})(!1),{signal:N}),O.addEventListener("error",D(!1),{signal:N}),O.addEventListener("complete",D(!0),{signal:N})),O},table:function(m){var w=f.table(m),D=w.schema.primaryKey;return B(B({},w),{mutate:function(M){var N=nt.trans;if(D.outbound||"disabled"===N.db._options.cache||N.explicit||"readwrite"!==N.idbtrans.mode)return w.mutate(M);var O=fr["idb://".concat(p,"/").concat(m)];return O?(N=w.mutate(M),"add"!==M.type&&"put"!==M.type||!(50<=M.values.length||il(D,M).some(function(H){return null==H}))?(O.optimisticOps.push(M),M.mutatedParts&&Ks(M.mutatedParts),N.then(function(H){0<H.numFailures&&(yt(O.optimisticOps,M),(H=ir(0,M,H))&&O.optimisticOps.push(H),M.mutatedParts&&Ks(M.mutatedParts))}),N.catch(function(){yt(O.optimisticOps,M),M.mutatedParts&&Ks(M.mutatedParts)})):N.then(function(H){var W=ir(0,B(B({},M),{values:M.values.map(function(Q,F){var ee;return H.failures[F]||_e(Q=null!==(ee=D.keyPath)&&void 0!==ee&&ee.includes(".")?pe(Q):B({},Q),D.keyPath,H.results[F]),Q})}),H);O.optimisticOps.push(W),queueMicrotask(function(){return M.mutatedParts&&Ks(M.mutatedParts)})}),N):w.mutate(M)},query:function(M){if(!Kd(nt,w)||!io("query",M))return w.query(M);var N="immutable"===(null===(W=nt.trans)||void 0===W?void 0:W.db._options.cache),O=(F=nt).requery,H=F.signal,W=function(Y,Z,K,ie){var ue=fr["idb://".concat(Y,"/").concat(Z)];if(!ue)return[];if(!(Z=ue.queries[K]))return[null,!1,ue,null];var ce=Z[(ie.query?ie.query.index.name:null)||""];if(!ce)return[null,!1,ue,null];switch(K){case"query":var be=ce.find(function(ke){return ke.req.limit===ie.limit&&ke.req.values===ie.values&&Zs(ke.req.query.range,ie.query.range)});return be?[be,!0,ue,ce]:[ce.find(function(ke){return("limit"in ke.req?ke.req.limit:1/0)>=ie.limit&&(!ie.values||ke.req.values)&&function au(f,p){return function(m,w,D,M){if(void 0===m)return void 0!==w?-1:0;if(void 0===w)return 1;if(0===(w=jt(m,w))){if(D&&M)return 0;if(D)return 1;if(M)return-1}return w}(f.lower,p.lower,f.lowerOpen,p.lowerOpen)<=0&&0<=function(m,w,D,M){if(void 0===m)return void 0!==w?1:0;if(void 0===w)return-1;if(0===(w=jt(m,w))){if(D&&M)return 0;if(D)return-1;if(M)return 1}return w}(f.upper,p.upper,f.upperOpen,p.upperOpen)}(ke.req.query.range,ie.query.range)}),!1,ue,ce];case"count":return[be=ce.find(function(ke){return Zs(ke.req.query.range,ie.query.range)}),!!be,ue,ce]}}(p,m,"query",M),Q=W[0],F=W[1],ee=W[2],U=W[3];return Q&&F?Q.obsSet=M.obsSet:(F=w.query(M).then(function(Y){var Z=Y.result;if(Q&&(Q.res=Z),N){for(var K=0,ie=Z.length;K<ie;++K)Object.freeze(Z[K]);Object.freeze(Z)}else Y.result=pe(Z);return Y}).catch(function(Y){return U&&Q&&yt(U,Q),Promise.reject(Y)}),Q={obsSet:M.obsSet,promise:F,subscribers:new Set,type:"query",req:M,dirty:!1},U?U.push(Q):(U=[Q],(ee=ee||(fr["idb://".concat(p,"/").concat(m)]={queries:{query:{},count:{}},objs:new Map,optimisticOps:[],unsignaledParts:{}})).queries.query[M.query.index.name||""]=U)),function ul(f,p,m,w){f.subscribers.add(m),w.addEventListener("abort",function(){var D,M;f.subscribers.delete(m),0===f.subscribers.size&&(D=f,M=p,setTimeout(function(){0===D.subscribers.size&&yt(M,D)},3e3))})}(Q,U,O,H),Q.promise.then(function(Y){return{result:al(Y.result,M,ee?.optimisticOps,w,Q,N)}})}})}})}};function Xs(f,p){return new Proxy(f,{get:function(m,w,D){return"db"===w?p:Reflect.get(m,w,D)}})}var so=(Ht.prototype.version=function(f){if(isNaN(f)||f<.1)throw new ae.Type("Given version is not a positive number");if(f=Math.round(10*f)/10,this.idbdb||this._state.isBeingOpened)throw new ae.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,f);var p=this._versions,m=p.filter(function(w){return w._cfg.version===f})[0];return m||(m=new this.Version(f),p.push(m),p.sort(Hd),m.stores({}),this._state.autoSchema=!1,m)},Ht.prototype._whenReady=function(f){var p=this;return this.idbdb&&(this._state.openComplete||nt.letThrough||this._vip)?f():new We(function(m,w){if(p._state.openComplete)return w(new ae.DatabaseClosed(p._state.dbOpenError));if(!p._state.isBeingOpened){if(!p._state.autoOpen)return void w(new ae.DatabaseClosed);p.open().catch(ot)}p._state.dbReadyPromise.then(m,w)}).then(f)},Ht.prototype.use=function(f){var p=f.stack,m=f.create,w=f.level,D=f.name;return D&&this.unuse({stack:p,name:D}),(f=this._middlewares[p]||(this._middlewares[p]=[])).push({stack:p,create:m,level:w??10,name:D}),f.sort(function(M,N){return M.level-N.level}),this},Ht.prototype.unuse=function(f){var p=f.stack,m=f.name,w=f.create;return p&&this._middlewares[p]&&(this._middlewares[p]=this._middlewares[p].filter(function(D){return w?D.create!==w:!!m&&D.name!==m})),this},Ht.prototype.open=function(){var f=this;return jr(Zi,function(){return nl(f)})},Ht.prototype._close=function(){var f=this._state,p=mn.indexOf(this);if(0<=p&&mn.splice(p,1),this.idbdb){try{this.idbdb.close()}catch{}this.idbdb=null}f.isBeingOpened||(f.dbReadyPromise=new We(function(m){f.dbReadyResolve=m}),f.openCanceller=new We(function(m,w){f.cancelOpen=w}))},Ht.prototype.close=function(m){var p=(void 0===m?{disableAutoOpen:!0}:m).disableAutoOpen;m=this._state,p?(m.isBeingOpened&&m.cancelOpen(new ae.DatabaseClosed),this._close(),m.autoOpen=!1,m.dbOpenError=new ae.DatabaseClosed):(this._close(),m.autoOpen=this._options.autoOpen||m.isBeingOpened,m.openComplete=!1,m.dbOpenError=null)},Ht.prototype.delete=function(f){var p=this;void 0===f&&(f={disableAutoOpen:!0});var m=0<arguments.length&&"object"!=typeof arguments[0],w=this._state;return new We(function(D,M){function N(){p.close(f);var O=p._deps.indexedDB.deleteDatabase(p.name);O.onsuccess=fn(function(){var H,W,Q;W=p.name,Q=(H=p._deps).indexedDB,H=H.IDBKeyRange,iu(Q)||W===cs||er(Q,H).delete(W).catch(ot),D()}),O.onerror=Kr(M),O.onblocked=p._fireOnBlocked}if(m)throw new ae.InvalidArgument("Invalid closeOptions argument to db.delete()");w.isBeingOpened?w.dbReadyPromise.then(N):N()})},Ht.prototype.backendDB=function(){return this.idbdb},Ht.prototype.isOpen=function(){return null!==this.idbdb},Ht.prototype.hasBeenClosed=function(){var f=this._state.dbOpenError;return f&&"DatabaseClosed"===f.name},Ht.prototype.hasFailed=function(){return null!==this._state.dbOpenError},Ht.prototype.dynamicallyOpened=function(){return this._state.autoSchema},Object.defineProperty(Ht.prototype,"tables",{get:function(){var f=this;return $(this._allTables).map(function(p){return f._allTables[p]})},enumerable:!1,configurable:!0}),Ht.prototype.transaction=function(){var f=function(p,m,w){var D=arguments.length;if(D<2)throw new ae.InvalidArgument("Too few arguments");for(var M=new Array(D-1);--D;)M[D-1]=arguments[D];return w=M.pop(),[p,ze(M),w]}.apply(this,arguments);return this._transaction.apply(this,f)},Ht.prototype._transaction=function(f,p,m){var w=this,D=nt.trans;D&&D.db===this&&-1===f.indexOf("!")||(D=null);var M,N,O=-1!==f.indexOf("?");f=f.replace("!","").replace("?","");try{if(N=p.map(function(W){if("string"!=typeof(W=W instanceof w.Table?W.name:W))throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return W}),"r"==f||f===Pd)M=Pd;else{if("rw"!=f&&f!=zc)throw new ae.InvalidArgument("Invalid transaction mode: "+f);M=zc}if(D){if(D.mode===Pd&&M===zc){if(!O)throw new ae.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");D=null}D&&N.forEach(function(W){if(D&&-1===D.storeNames.indexOf(W)){if(!O)throw new ae.SubTransaction("Table "+W+" not included in parent transaction.");D=null}}),O&&D&&!D.active&&(D=null)}}catch(W){return D?D._promise(null,function(Q,F){F(W)}):Nn(W)}var H=function W(Q,F,ee,U,Y){return We.resolve().then(function(){var Z=nt.transless||nt,K=Q._createTransaction(F,ee,Q._dbSchema,U);if(K.explicit=!0,Z={trans:K,transless:Z},U)K.idbtrans=U.idbtrans;else try{K.create(),K.idbtrans._explicit=!0,Q._state.PR1398_maxLoop=3}catch(ce){return ce.name===ve.InvalidState&&Q.isOpen()&&0<--Q._state.PR1398_maxLoop?(console.warn("Dexie: Need to reopen db"),Q.close({disableAutoOpen:!1}),Q.open().then(function(){return W(Q,F,ee,null,Y)})):Nn(ce)}var ie,ue=Wr(Y);return ue&&cr(),Z=We.follow(function(){var ce;(ie=Y.call(K,K))&&(ue?(ce=Dr.bind(null,null),ie.then(ce,ce)):"function"==typeof ie.next&&"function"==typeof ie.throw&&(ie=jo(ie)))},Z),(ie&&"function"==typeof ie.then?We.resolve(ie).then(function(ce){return K.active?ce:Nn(new ae.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"))}):Z.then(function(){return ie})).then(function(ce){return U&&K._resolve(),K._completion.then(function(){return ce})}).catch(function(ce){return K._reject(ce),Nn(ce)})})}.bind(null,this,M,N,D,m);return D?D._promise(M,H,"lock"):nt.trans?jr(nt.transless,function(){return w._whenReady(H)}):this._whenReady(H)},Ht.prototype.table=function(f){if(!k(this._allTables,f))throw new ae.InvalidTable("Table ".concat(f," does not exist"));return this._allTables[f]},Ht);function Ht(f,p){var m=this;this._middlewares={},this.verno=0;var w=Ht.dependencies;this._options=p=B({addons:Ht.addons,autoOpen:!0,indexedDB:w.indexedDB,IDBKeyRange:w.IDBKeyRange,cache:"cloned"},p),this._deps={indexedDB:p.indexedDB,IDBKeyRange:p.IDBKeyRange},w=p.addons,this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;var D,M,N,O,H,W={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:ot,dbReadyPromise:null,cancelOpen:ot,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3,autoOpen:p.autoOpen};W.dbReadyPromise=new We(function(F){W.dbReadyResolve=F}),W.openCanceller=new We(function(F,ee){W.cancelOpen=ee}),this._state=W,this.name=f,this.on=Za(this,"populate","blocked","versionchange","close",{ready:[ui,ot]}),this.on.ready.subscribe=et(this.on.ready.subscribe,function(F){return function(ee,U){Ht.vip(function(){var Y,Z=m._state;Z.openComplete?(Z.dbOpenError||We.resolve().then(ee),U&&F(ee)):Z.onReadyBeingFired?(Z.onReadyBeingFired.push(ee),U&&F(ee)):(F(ee),Y=m,U||F(function K(){Y.on.ready.unsubscribe(ee),Y.on.ready.unsubscribe(K)}))})}}),this.Collection=(D=this,Xa(A_.prototype,function(ie,K){this.db=D;var U=ft,Y=null;if(K)try{U=K()}catch(ue){Y=ue}var Z=ie._ctx;this._ctx={table:K=Z.table,index:Z.index,isPrimKey:!Z.index||K.schema.primKey.keyPath&&Z.index===K.schema.primKey.name,range:U,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:Y,or:Z.or,valueMapper:(ie=K.hook.reading.fire)!==en?ie:null}})),this.Table=(M=this,Xa(Ti.prototype,function(F,ee,U){this.db=M,this._tx=U,this.name=F,this.schema=ee,this.hook=M._allTables[F]?M._allTables[F].hook:Za(null,{creating:[wr,ot],reading:[rr,en],updating:[Ci,ot],deleting:[Vn,ot]})})),this.Transaction=(N=this,Xa(Bd.prototype,function(F,ee,U,Y,Z){var K=this;this.db=N,this.mode=F,this.storeNames=ee,this.schema=U,this.chromeTransactionDurability=Y,this.idbtrans=null,this.on=Za(this,"complete","error","abort"),this.parent=Z||null,this.active=!0,this._reculock=0,this._blockedFuncs=[],this._resolve=null,this._reject=null,this._waitingFor=null,this._waitingQueue=null,this._spinCount=0,this._completion=new We(function(ie,ue){K._resolve=ie,K._reject=ue}),this._completion.then(function(){K.active=!1,K.on.complete.fire()},function(ie){var ue=K.active;return K.active=!1,K.on.error.fire(ie),K.parent?K.parent._reject(ie):ue&&K.idbtrans&&K.idbtrans.abort(),Nn(ie)})})),this.Version=(O=this,Xa(Xc.prototype,function(F){this.db=O,this._cfg={version:F,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}})),this.WhereClause=(H=this,Xa(zs.prototype,function(F,ee,U){if(this.db=H,this._ctx={table:F,index:":id"===ee?null:ee,or:U},this._cmp=this._ascending=jt,this._descending=function(Y,Z){return jt(Z,Y)},this._max=function(Y,Z){return 0<jt(Y,Z)?Y:Z},this._min=function(Y,Z){return jt(Y,Z)<0?Y:Z},this._IDBKeyRange=H._deps.IDBKeyRange,!this._IDBKeyRange)throw new ae.MissingAPI})),this.on("versionchange",function(F){0<F.newVersion?console.warn("Another connection wants to upgrade database '".concat(m.name,"'. Closing db now to resume the upgrade.")):console.warn("Another connection wants to delete database '".concat(m.name,"'. Closing db now to resume the delete request.")),m.close({disableAutoOpen:!1})}),this.on("blocked",function(F){!F.newVersion||F.newVersion<F.oldVersion?console.warn("Dexie.delete('".concat(m.name,"') was blocked")):console.warn("Upgrade '".concat(m.name,"' blocked by other connection holding version ").concat(F.oldVersion/10))}),this._maxKey=nu(p.IDBKeyRange),this._createTransaction=function(F,ee,U,Y){return new m.Transaction(F,ee,U,m._options.chromeTransactionDurability,Y)},this._fireOnBlocked=function(F){m.on("blocked").fire(F),mn.filter(function(ee){return ee.name===m.name&&ee!==m&&!ee._state.vcFired}).map(function(ee){return ee.on("versionchange").fire(F)})},this.use(sl),this.use(O_),this.use(t0),this.use(e0),this.use(ol);var Q=new Proxy(this,{get:function(F,ee,U){if("_vip"===ee)return!0;if("table"===ee)return function(Z){return Xs(m.table(Z),Q)};var Y=Reflect.get(F,ee,U);return Y instanceof Ti?Xs(Y,Q):"tables"===ee?Y.map(function(Z){return Xs(Z,Q)}):"_createTransaction"===ee?function(){return Xs(Y.apply(this,arguments),Q)}:Y}});this.vip=Q,w.forEach(function(F){return F(m)})}Gn=typeof Symbol<"u"&&"observable"in Symbol?Symbol.observable:"@@observable";var fs,R_=(uu.prototype.subscribe=function(f,p,m){return this._subscribe(f&&"function"!=typeof f?f:{next:f,error:p,complete:m})},uu.prototype[Gn]=function(){return this},uu);function uu(f){this._subscribe=f}try{fs={indexedDB:J.indexedDB||J.mozIndexedDB||J.webkitIndexedDB||J.msIndexedDB,IDBKeyRange:J.IDBKeyRange||J.webkitIDBKeyRange}}catch{fs={indexedDB:null,IDBKeyRange:null}}function Qr(f){var p,m=!1,w=new R_(function(D){var N,M=Wr(f),O=!1,H={},W={},Q={get closed(){return O},unsubscribe:function(){O||(O=!0,N&&N.abort(),F&&ci.storagemutated.unsubscribe(U))}};D.start&&D.start(Q);var F=!1,ee=function(){return Gt(Y)},U=function(Z){Ai(H,Z),el(W,H)&&ee()},Y=function(){var Z,K,ie;!O&&fs.indexedDB&&(H={},Z={},N&&N.abort(),N=new AbortController,ie=function(ue){var ce=is();try{M&&cr();var be=xi(f,ue);return be=M?be.finally(Dr):be}finally{ce&&os()}}(K={subscr:Z,signal:N.signal,requery:ee,querier:f,trans:null}),Promise.resolve(ie).then(function(ue){m=!0,p=ue,O||K.signal.aborted||(H={},function(ce){for(var be in ce)if(k(ce,be))return;return 1}(W=Z)||F||(ci(ut,U),F=!0),Gt(function(){return!O&&D.next&&D.next(ue)}))},function(ue){m=!1,["DatabaseClosedError","AbortError"].includes(ue?.name)||O||Gt(function(){O||D.error&&D.error(ue)})}))};return setTimeout(ee,0),Q});return w.hasValue=function(){return m},w.getValue=function(){return p},w}var St=so;function ao(f){var p=li;try{li=!0,ci.storagemutated.fire(f),_t(f,!0)}finally{li=p}}x(St,B(B({},It),{delete:function(f){return new St(f,{addons:[]}).delete()},exists:function(f){return new St(f,{addons:[]}).open().then(function(p){return p.close(),!0}).catch("NoSuchDatabaseError",function(){return!1})},getDatabaseNames:function(f){try{return m=(p=St.dependencies).indexedDB,p=p.IDBKeyRange,(iu(m)?Promise.resolve(m.databases()).then(function(w){return w.map(function(D){return D.name}).filter(function(D){return D!==cs})}):er(m,p).toCollection().primaryKeys()).then(f)}catch{return Nn(new ae.MissingAPI)}var p,m},defineClass:function(){return function(f){P(this,f)}},ignoreTransaction:function(f){return nt.trans?jr(nt.transless,f):f()},vip:zd,async:function(f){return function(){try{var p=jo(f.apply(this,arguments));return p&&"function"==typeof p.then?p:We.resolve(p)}catch(m){return Nn(m)}}},spawn:function(f,p,m){try{var w=jo(f.apply(m,p||[]));return w&&"function"==typeof w.then?w:We.resolve(w)}catch(D){return Nn(D)}},currentTransaction:{get:function(){return nt.trans||null}},waitFor:function(f,p){return p=We.resolve("function"==typeof f?St.ignoreTransaction(f):f).timeout(p||6e4),nt.trans?nt.trans.waitFor(p):p},Promise:We,debug:{get:function(){return _r},set:function(f){Td(f)}},derive:V,extend:P,props:x,override:et,Events:Za,on:ci,liveQuery:Qr,extendObservabilitySet:Ai,getByKeyPath:he,setByKeyPath:_e,delByKeyPath:function(f,p){"string"==typeof p?_e(f,p,void 0):"length"in p&&[].map.call(p,function(m){_e(f,m,void 0)})},shallowClone:Ne,deepClone:pe,getObjectDiff:rl,cmp:jt,asap:Pe,minKey:-1/0,addons:[],connections:mn,errnames:ve,dependencies:fs,cache:fr,semVer:"4.0.10",version:"4.0.10".split(".").map(function(f){return parseInt(f)}).reduce(function(f,p,m){return f+p/Math.pow(10,2*m)})})),St.maxKey=nu(St.dependencies.IDBKeyRange),typeof dispatchEvent<"u"&&typeof addEventListener<"u"&&(ci(ut,function(f){li||(f=new CustomEvent(qs,{detail:f}),li=!0,dispatchEvent(f),li=!1)}),addEventListener(qs,function(f){f=f.detail,li||ao(f)}));var Vo,li=!1,Js=function(){};return typeof BroadcastChannel<"u"&&((Js=function(){(Vo=new BroadcastChannel(qs)).onmessage=function(f){return f.data&&ao(f.data)}})(),"function"==typeof Vo.unref&&Vo.unref(),ci(ut,function(f){li||Vo.postMessage(f)})),typeof addEventListener<"u"&&(addEventListener("pagehide",function(f){if(!so.disableBfCache&&f.persisted){_r&&console.debug("Dexie: handling persisted pagehide"),Vo?.close();for(var p=0,m=mn;p<m.length;p++)m[p].close({disableAutoOpen:!1})}}),addEventListener("pageshow",function(f){!so.disableBfCache&&f.persisted&&(_r&&console.debug("Dexie: handling persisted pageshow"),Js(),ao({all:new kn(-1/0,[[]])}))})),We.rejectionMapper=function(f,p){return!f||f instanceof Di||f instanceof TypeError||f instanceof SyntaxError||!f.name||!Xe[f.name]?f:(p=new Xe[f.name](p||f.message,f),"stack"in f&&j(p,"stack",{get:function(){return this.inner.stack}}),p)},Td(_r),B(so,Object.freeze({__proto__:null,Dexie:so,liveQuery:Qr,Entity:lr,cmp:jt,PropModSymbol:to,PropModification:eu,replacePrefix:function(f,p){return new eu({replacePrefix:[f,p]})},add:function(f){return new eu({add:f})},remove:function(f){return new eu({remove:f})},default:so,RangeSet:kn,mergeRanges:ro,rangesOverlap:qd}),{default:so}),so}()}},Se=>{Se(Se.s=2260)}]);
1
+ (self.webpackChunkngx_relationship_visualiser=self.webpackChunkngx_relationship_visualiser||[]).push([[792],{1060:(Se,Je,B)=>{Se.exports={graphlib:B(688),layout:B(7772),debug:B(6639),util:{time:B(1178).time,notime:B(1178).notime},version:B(9836)}},9012:(Se,Je,B)=>{"use strict";let le=B(6701),J=B(1178).uniqueId;Se.exports={run:function $(L){("greedy"===L.graph().acyclicer?le(L,function k(x){return A=>x.edge(A).weight}(L)):function q(L){let S=[],k={},x={};return L.nodes().forEach(function A(j){Object.hasOwn(x,j)||(x[j]=!0,k[j]=!0,L.outEdges(j).forEach(V=>{Object.hasOwn(k,V.w)?S.push(V):A(V.w)}),delete k[j])}),S}(L)).forEach(x=>{let A=L.edge(x);L.removeEdge(x),A.forwardName=x.name,A.reversed=!0,L.setEdge(x.w,x.v,A,J("rev"))})},undo:function P(L){L.edges().forEach(S=>{let k=L.edge(S);if(k.reversed){L.removeEdge(S);let x=k.forwardName;delete k.reversed,delete k.forwardName,L.setEdge(S.w,S.v,k,x)}})}}},8097:(Se,Je,B)=>{let le=B(1178);function $(q,P,L,S,k,x){let j=k[P][x-1],V=le.addDummyNode(q,"border",{width:0,height:0,rank:x,borderType:P},L);k[P][x]=V,q.setParent(V,S),j&&q.setEdge(j,V,{weight:1})}Se.exports=function J(q){q.children().forEach(function P(L){let S=q.children(L),k=q.node(L);if(S.length&&S.forEach(P),Object.hasOwn(k,"minRank")){k.borderLeft=[],k.borderRight=[];for(let x=k.minRank,A=k.maxRank+1;x<A;++x)$(q,"borderLeft","_bl",L,k,x),$(q,"borderRight","_br",L,k,x)}})}},6392:Se=>{"use strict";function le(S){S.nodes().forEach(k=>J(S.node(k))),S.edges().forEach(k=>J(S.edge(k)))}function J(S){let k=S.width;S.width=S.height,S.height=k}function q(S){S.y=-S.y}function L(S){let k=S.x;S.x=S.y,S.y=k}Se.exports={adjust:function Je(S){let k=S.graph().rankdir.toLowerCase();("lr"===k||"rl"===k)&&le(S)},undo:function B(S){let k=S.graph().rankdir.toLowerCase();("bt"===k||"rl"===k)&&function $(S){S.nodes().forEach(k=>q(S.node(k))),S.edges().forEach(k=>{let x=S.edge(k);x.points.forEach(q),Object.hasOwn(x,"y")&&q(x)})}(S),("lr"===k||"rl"===k)&&(function P(S){S.nodes().forEach(k=>L(S.node(k))),S.edges().forEach(k=>{let x=S.edge(k);x.points.forEach(L),Object.hasOwn(x,"x")&&L(x)})}(S),le(S))}}},7789:Se=>{function B(J){J._prev._next=J._next,J._next._prev=J._prev,delete J._next,delete J._prev}function le(J,$){if("_next"!==J&&"_prev"!==J)return $}Se.exports=class Je{constructor(){let $={};$._next=$._prev=$,this._sentinel=$}dequeue(){let $=this._sentinel,q=$._prev;if(q!==$)return B(q),q}enqueue($){let q=this._sentinel;$._prev&&$._next&&B($),$._next=q._next,q._next._prev=$,q._next=$,$._prev=q}toString(){let $=[],q=this._sentinel,P=q._prev;for(;P!==q;)$.push(JSON.stringify(P,le)),P=P._prev;return"["+$.join(", ")+"]"}}},6639:(Se,Je,B)=>{let le=B(1178),J=B(688).Graph;Se.exports={debugOrdering:function $(q){let P=le.buildLayerMatrix(q),L=new J({compound:!0,multigraph:!0}).setGraph({});return q.nodes().forEach(S=>{L.setNode(S,{label:S}),L.setParent(S,"layer"+q.node(S).rank)}),q.edges().forEach(S=>L.setEdge(S.v,S.w,{},S.name)),P.forEach((S,k)=>{L.setNode("layer"+k,{rank:"same"}),S.reduce((A,j)=>(L.setEdge(A,j,{style:"invis"}),j))}),L}}},6701:(Se,Je,B)=>{let le=B(688).Graph,J=B(7789);Se.exports=function q(A,j){if(A.nodeCount()<=1)return[];let V=function S(A,j){let V=new le,ge=0,ye=0;A.nodes().forEach(Ee=>{V.setNode(Ee,{v:Ee,in:0,out:0})}),A.edges().forEach(Ee=>{let Pe=V.edge(Ee.v,Ee.w)||0,he=j(Ee);V.setEdge(Ee.v,Ee.w,Pe+he),ye=Math.max(ye,V.node(Ee.v).out+=he),ge=Math.max(ge,V.node(Ee.w).in+=he)});let Ie=function x(A){const j=[];for(let V=0;V<A;V++)j.push(V);return j}(ye+ge+3).map(()=>new J),et=ge+1;return V.nodes().forEach(Ee=>{k(Ie,et,V.node(Ee))}),{graph:V,buckets:Ie,zeroIdx:et}}(A,j||$);return function P(A,j,V){let et,ge=[],ye=j[j.length-1],Ie=j[0];for(;A.nodeCount();){for(;et=Ie.dequeue();)L(A,j,V,et);for(;et=ye.dequeue();)L(A,j,V,et);if(A.nodeCount())for(let Ee=j.length-2;Ee>0;--Ee)if(et=j[Ee].dequeue(),et){ge=ge.concat(L(A,j,V,et,!0));break}}return ge}(V.graph,V.buckets,V.zeroIdx).flatMap(ye=>A.outEdges(ye.v,ye.w))};let $=()=>1;function L(A,j,V,ge,ye){let Ie=ye?[]:void 0;return A.inEdges(ge.v).forEach(et=>{let Ee=A.edge(et),Pe=A.node(et.v);ye&&Ie.push({v:et.v,w:et.w}),Pe.out-=Ee,k(j,V,Pe)}),A.outEdges(ge.v).forEach(et=>{let Ee=A.edge(et),he=A.node(et.w);he.in-=Ee,k(j,V,he)}),A.removeNode(ge.v),Ie}function k(A,j,V){V.out?V.in?A[V.out-V.in+j].enqueue(V):A[A.length-1].enqueue(V):A[0].enqueue(V)}},7772:(Se,Je,B)=>{"use strict";let le=B(9012),J=B(1939),$=B(5779),q=B(1178).normalizeRanks,P=B(930),L=B(1178).removeEmptyRanks,S=B(3259),k=B(8097),x=B(6392),A=B(4507),j=B(3110),V=B(1178),ge=B(688).Graph;Se.exports=function ye(ve,Me){let ae=Me&&Me.debugTiming?V.time:V.notime;ae("layout",()=>{let Xe=ae(" buildLayoutGraph",()=>function se(ve){let Me=new ge({multigraph:!0,compound:!0}),ae=Ei(ve.graph());return Me.setGraph(Object.assign({},Pe,si(ae,Ee),V.pick(ae,he))),ve.nodes().forEach(Xe=>{const ot=si(Ei(ve.node(Xe)),_e);Object.keys(Ne).forEach(en=>{void 0===ot[en]&&(ot[en]=Ne[en])}),Me.setNode(Xe,ot),Me.setParent(Xe,ve.parent(Xe))}),ve.edges().forEach(Xe=>{let It=Ei(ve.edge(Xe));Me.setEdge(Xe,Object.assign({},ze,si(It,$e),V.pick(It,it)))}),Me}(ve));ae(" runLayout",()=>function Ie(ve,Me,ae){Me(" makeSpaceForEdgeLabels",()=>function pe(ve){let Me=ve.graph();Me.ranksep/=2,ve.edges().forEach(ae=>{let Xe=ve.edge(ae);Xe.minlen*=2,"c"!==Xe.labelpos.toLowerCase()&&("TB"===Me.rankdir||"BT"===Me.rankdir?Xe.width+=Xe.labeloffset:Xe.height+=Xe.labeloffset)})}(ve)),Me(" removeSelfEdges",()=>function za(ve){ve.edges().forEach(Me=>{if(Me.v===Me.w){var ae=ve.node(Me.v);ae.selfEdges||(ae.selfEdges=[]),ae.selfEdges.push({e:Me,label:ve.edge(Me)}),ve.removeEdge(Me)}})}(ve)),Me(" acyclic",()=>le.run(ve)),Me(" nestingGraph.run",()=>S.run(ve)),Me(" rank",()=>$(V.asNonCompoundGraph(ve))),Me(" injectEdgeLabelProxies",()=>function De(ve){ve.edges().forEach(Me=>{let ae=ve.edge(Me);if(ae.width&&ae.height){let Xe=ve.node(Me.v),ot={rank:(ve.node(Me.w).rank-Xe.rank)/2+Xe.rank,e:Me};V.addDummyNode(ve,"edge-proxy",ot,"_ep")}})}(ve)),Me(" removeEmptyRanks",()=>L(ve)),Me(" nestingGraph.cleanup",()=>S.cleanup(ve)),Me(" normalizeRanks",()=>q(ve)),Me(" assignRankMinMax",()=>function xe(ve){let Me=0;ve.nodes().forEach(ae=>{let Xe=ve.node(ae);Xe.borderTop&&(Xe.minRank=ve.node(Xe.borderTop).rank,Xe.maxRank=ve.node(Xe.borderBottom).rank,Me=Math.max(Me,Xe.maxRank))}),ve.graph().maxRank=Me}(ve)),Me(" removeEdgeLabelProxies",()=>function Oe(ve){ve.nodes().forEach(Me=>{let ae=ve.node(Me);"edge-proxy"===ae.dummy&&(ve.edge(ae.e).labelRank=ae.rank,ve.removeNode(Me))})}(ve)),Me(" normalize.run",()=>J.run(ve)),Me(" parentDummyChains",()=>P(ve)),Me(" addBorderSegments",()=>k(ve)),Me(" order",()=>A(ve,ae)),Me(" insertSelfEdges",()=>function Di(ve){V.buildLayerMatrix(ve).forEach(ae=>{var Xe=0;ae.forEach((It,ot)=>{var en=ve.node(It);en.order=ot+Xe,(en.selfEdges||[]).forEach(rr=>{V.addDummyNode(ve,"selfedge",{width:rr.label.width,height:rr.label.height,rank:en.rank,order:ot+ ++Xe,e:rr.e,label:rr.label},"_se")}),delete en.selfEdges})})}(ve)),Me(" adjustCoordinateSystem",()=>x.adjust(ve)),Me(" position",()=>j(ve)),Me(" positionSelfEdges",()=>function Ga(ve){ve.nodes().forEach(Me=>{var ae=ve.node(Me);if("selfedge"===ae.dummy){var Xe=ve.node(ae.e.v),It=Xe.x+Xe.width/2,ot=Xe.y,en=ae.x-It,rr=Xe.height/2;ve.setEdge(ae.e,ae.label),ve.removeNode(Me),ae.label.points=[{x:It+2*en/3,y:ot-rr},{x:It+5*en/6,y:ot-rr},{x:It+en,y:ot},{x:It+5*en/6,y:ot+rr},{x:It+2*en/3,y:ot+rr}],ae.label.x=ae.x,ae.label.y=ae.y}})}(ve)),Me(" removeBorderNodes",()=>function Wr(ve){ve.nodes().forEach(Me=>{if(ve.children(Me).length){let ae=ve.node(Me),Xe=ve.node(ae.borderTop),It=ve.node(ae.borderBottom),ot=ve.node(ae.borderLeft[ae.borderLeft.length-1]),en=ve.node(ae.borderRight[ae.borderRight.length-1]);ae.width=Math.abs(en.x-ot.x),ae.height=Math.abs(It.y-Xe.y),ae.x=ot.x+ae.width/2,ae.y=Xe.y+ae.height/2}}),ve.nodes().forEach(Me=>{"border"===ve.node(Me).dummy&&ve.removeNode(Me)})}(ve)),Me(" normalize.undo",()=>J.undo(ve)),Me(" fixupEdgeLabelCoords",()=>function zt(ve){ve.edges().forEach(Me=>{let ae=ve.edge(Me);if(Object.hasOwn(ae,"x"))switch(("l"===ae.labelpos||"r"===ae.labelpos)&&(ae.width-=ae.labeloffset),ae.labelpos){case"l":ae.x-=ae.width/2+ae.labeloffset;break;case"r":ae.x+=ae.width/2+ae.labeloffset}})}(ve)),Me(" undoCoordinateSystem",()=>x.undo(ve)),Me(" translateGraph",()=>function pt(ve){let Me=Number.POSITIVE_INFINITY,ae=0,Xe=Number.POSITIVE_INFINITY,It=0,ot=ve.graph(),en=ot.marginx||0,rr=ot.marginy||0;function ai(wr){let Vn=wr.x,Ci=wr.y,ar=wr.width,ui=wr.height;Me=Math.min(Me,Vn-ar/2),ae=Math.max(ae,Vn+ar/2),Xe=Math.min(Xe,Ci-ui/2),It=Math.max(It,Ci+ui/2)}ve.nodes().forEach(wr=>ai(ve.node(wr))),ve.edges().forEach(wr=>{let Vn=ve.edge(wr);Object.hasOwn(Vn,"x")&&ai(Vn)}),Me-=en,Xe-=rr,ve.nodes().forEach(wr=>{let Vn=ve.node(wr);Vn.x-=Me,Vn.y-=Xe}),ve.edges().forEach(wr=>{let Vn=ve.edge(wr);Vn.points.forEach(Ci=>{Ci.x-=Me,Ci.y-=Xe}),Object.hasOwn(Vn,"x")&&(Vn.x-=Me),Object.hasOwn(Vn,"y")&&(Vn.y-=Xe)}),ot.width=ae-Me+en,ot.height=It-Xe+rr}(ve)),Me(" assignNodeIntersects",()=>function yt(ve){ve.edges().forEach(Me=>{let ot,en,ae=ve.edge(Me),Xe=ve.node(Me.v),It=ve.node(Me.w);ae.points?(ot=ae.points[0],en=ae.points[ae.points.length-1]):(ae.points=[],ot=It,en=Xe),ae.points.unshift(V.intersectRect(Xe,ot)),ae.points.push(V.intersectRect(It,en))})}(ve)),Me(" reversePoints",()=>function Tn(ve){ve.edges().forEach(Me=>{let ae=ve.edge(Me);ae.reversed&&ae.points.reverse()})}(ve)),Me(" acyclic.undo",()=>le.undo(ve))}(Xe,ae,Me)),ae(" updateInputGraph",()=>function et(ve,Me){ve.nodes().forEach(ae=>{let Xe=ve.node(ae),It=Me.node(ae);Xe&&(Xe.x=It.x,Xe.y=It.y,Xe.rank=It.rank,Me.children(ae).length&&(Xe.width=It.width,Xe.height=It.height))}),ve.edges().forEach(ae=>{let Xe=ve.edge(ae),It=Me.edge(ae);Xe.points=It.points,Object.hasOwn(It,"x")&&(Xe.x=It.x,Xe.y=It.y)}),ve.graph().width=Me.graph().width,ve.graph().height=Me.graph().height}(ve,Xe))})};let Ee=["nodesep","edgesep","ranksep","marginx","marginy"],Pe={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},he=["acyclicer","ranker","rankdir","align"],_e=["width","height"],Ne={width:0,height:0},$e=["minlen","weight","width","height","labeloffset"],ze={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},it=["labelpos"];function si(ve,Me){return V.mapValues(V.pick(ve,Me),Number)}function Ei(ve){var Me={};return ve&&Object.entries(ve).forEach(([ae,Xe])=>{"string"==typeof ae&&(ae=ae.toLowerCase()),Me[ae]=Xe}),Me}},3259:(Se,Je,B)=>{let le=B(1178);function $(S,k,x,A,j,V,ge){let ye=S.children(ge);if(!ye.length)return void(ge!==k&&S.setEdge(k,ge,{weight:0,minlen:x}));let Ie=le.addBorderNode(S,"_bt"),et=le.addBorderNode(S,"_bb"),Ee=S.node(ge);S.setParent(Ie,ge),Ee.borderTop=Ie,S.setParent(et,ge),Ee.borderBottom=et,ye.forEach(Pe=>{$(S,k,x,A,j,V,Pe);let he=S.node(Pe),_e=he.borderTop?he.borderTop:Pe,Ne=he.borderBottom?he.borderBottom:Pe,$e=he.borderTop?A:2*A,ze=_e!==Ne?1:j-V[ge]+1;S.setEdge(Ie,_e,{weight:$e,minlen:ze,nestingEdge:!0}),S.setEdge(Ne,et,{weight:$e,minlen:ze,nestingEdge:!0})}),S.parent(ge)||S.setEdge(k,Ie,{weight:0,minlen:j+V[ge]})}Se.exports={run:function J(S){let k=le.addDummyNode(S,"root",{},"_root"),x=function q(S){var k={};function x(A,j){var V=S.children(A);V&&V.length&&V.forEach(ge=>x(ge,j+1)),k[A]=j}return S.children().forEach(A=>x(A,1)),k}(S),A=Object.values(x),j=le.applyWithChunking(Math.max,A)-1,V=2*j+1;S.graph().nestingRoot=k,S.edges().forEach(ye=>S.edge(ye).minlen*=V);let ge=function P(S){return S.edges().reduce((k,x)=>k+S.edge(x).weight,0)}(S)+1;S.children().forEach(ye=>$(S,k,V,ge,j,x,ye)),S.graph().nodeRankFactor=V},cleanup:function L(S){var k=S.graph();S.removeNode(k.nestingRoot),delete k.nestingRoot,S.edges().forEach(x=>{S.edge(x).nestingEdge&&S.removeEdge(x)})}}},1939:(Se,Je,B)=>{"use strict";let le=B(1178);Se.exports={run:function J(P){P.graph().dummyChains=[],P.edges().forEach(L=>function $(P,L){let ye,Ie,et,S=L.v,k=P.node(S).rank,x=L.w,A=P.node(x).rank,j=L.name,V=P.edge(L),ge=V.labelRank;if(A!==k+1){for(P.removeEdge(L),et=0,++k;k<A;++et,++k)V.points=[],Ie={width:0,height:0,edgeLabel:V,edgeObj:L,rank:k},ye=le.addDummyNode(P,"edge",Ie,"_d"),k===ge&&(Ie.width=V.width,Ie.height=V.height,Ie.dummy="edge-label",Ie.labelpos=V.labelpos),P.setEdge(S,ye,{weight:V.weight},j),0===et&&P.graph().dummyChains.push(ye),S=ye;P.setEdge(S,x,{weight:V.weight},j)}}(P,L))},undo:function q(P){P.graph().dummyChains.forEach(L=>{let x,S=P.node(L),k=S.edgeLabel;for(P.setEdge(S.edgeObj,k);S.dummy;)x=P.successors(L)[0],P.removeNode(L),k.points.push({x:S.x,y:S.y}),"edge-label"===S.dummy&&(k.x=S.x,k.y=S.y,k.width=S.width,k.height=S.height),S=P.node(L=x)})}}},3826:Se=>{Se.exports=function Je(B,le,J){let q,$={};J.forEach(P=>{let S,k,L=B.parent(P);for(;L;){if(S=B.parent(L),S?(k=$[S],$[S]=L):(k=q,q=L),k&&k!==L)return void le.setEdge(k,L);L=S}})}},9750:Se=>{Se.exports=function Je(B,le=[]){return le.map(J=>{let $=B.inEdges(J);if($.length){let q=$.reduce((P,L)=>{let S=B.edge(L),k=B.node(L.v);return{sum:P.sum+S.weight*k.order,weight:P.weight+S.weight}},{sum:0,weight:0});return{v:J,barycenter:q.sum/q.weight,weight:q.weight}}return{v:J}})}},5742:(Se,Je,B)=>{let le=B(688).Graph,J=B(1178);Se.exports=function $(P,L,S){let k=function q(P){for(var L;P.hasNode(L=J.uniqueId("_root")););return L}(P),x=new le({compound:!0}).setGraph({root:k}).setDefaultNodeLabel(A=>P.node(A));return P.nodes().forEach(A=>{let j=P.node(A),V=P.parent(A);(j.rank===L||j.minRank<=L&&L<=j.maxRank)&&(x.setNode(A),x.setParent(A,V||k),P[S](A).forEach(ge=>{let ye=ge.v===A?ge.w:ge.v,Ie=x.edge(ye,A),et=void 0!==Ie?Ie.weight:0;x.setEdge(ye,A,{weight:P.edge(ge).weight+et})}),Object.hasOwn(j,"minRank")&&x.setNode(A,{borderLeft:j.borderLeft[L],borderRight:j.borderRight[L]}))}),x}},7217:(Se,Je,B)=>{"use strict";let le=B(1178).zipObject;function $(q,P,L){let S=le(L,L.map((ge,ye)=>ye)),k=P.flatMap(ge=>q.outEdges(ge).map(ye=>({pos:S[ye.w],weight:q.edge(ye).weight})).sort((ye,Ie)=>ye.pos-Ie.pos)),x=1;for(;x<L.length;)x<<=1;let A=2*x-1;x-=1;let j=new Array(A).fill(0),V=0;return k.forEach(ge=>{let ye=ge.pos+x;j[ye]+=ge.weight;let Ie=0;for(;ye>0;)ye%2&&(Ie+=j[ye+1]),ye=ye-1>>1,j[ye]+=ge.weight;V+=ge.weight*Ie}),V}Se.exports=function J(q,P){let L=0;for(let S=1;S<P.length;++S)L+=$(q,P[S-1],P[S]);return L}},4507:(Se,Je,B)=>{"use strict";let le=B(3252),J=B(7217),$=B(8414),q=B(5742),P=B(3826),L=B(688).Graph,S=B(1178);function x(V,ge,ye){return ge.map(function(Ie){return q(V,Ie,ye)})}function A(V,ge){let ye=new L;V.forEach(function(Ie){let et=Ie.graph().root,Ee=$(Ie,et,ye,ge);Ee.vs.forEach((Pe,he)=>Ie.node(Pe).order=he),P(Ie,ye,Ee.vs)})}function j(V,ge){Object.values(ge).forEach(ye=>ye.forEach((Ie,et)=>V.node(Ie).order=et))}Se.exports=function k(V,ge){if(ge&&"function"==typeof ge.customOrder)return void ge.customOrder(V,k);let ye=S.maxRank(V),Ie=x(V,S.range(1,ye+1),"inEdges"),et=x(V,S.range(ye-1,-1,-1),"outEdges"),Ee=le(V);if(j(V,Ee),ge&&ge.disableOptimalOrderHeuristic)return;let he,Pe=Number.POSITIVE_INFINITY;for(let _e=0,Ne=0;Ne<4;++_e,++Ne){A(_e%2?Ie:et,_e%4>=2),Ee=S.buildLayerMatrix(V);let $e=J(V,Ee);$e<Pe&&(Ne=0,he=Object.assign({},Ee),Pe=$e)}j(V,he)}},3252:(Se,Je,B)=>{"use strict";let le=B(1178);Se.exports=function J($){let q={},P=$.nodes().filter(j=>!$.children(j).length),L=P.map(j=>$.node(j).rank),S=le.applyWithChunking(Math.max,L),k=le.range(S+1).map(()=>[]);return P.sort((j,V)=>$.node(j).rank-$.node(V).rank).forEach(function x(j){if(q[j])return;q[j]=!0;let V=$.node(j);k[V.rank].push(j),$.successors(j).forEach(x)}),k}},6753:(Se,Je,B)=>{"use strict";let le=B(1178);Se.exports=function J(P,L){let S={};return P.forEach((x,A)=>{let j=S[x.v]={indegree:0,in:[],out:[],vs:[x.v],i:A};void 0!==x.barycenter&&(j.barycenter=x.barycenter,j.weight=x.weight)}),L.edges().forEach(x=>{let A=S[x.v],j=S[x.w];void 0!==A&&void 0!==j&&(j.indegree++,A.out.push(S[x.w]))}),function $(P){let L=[];function S(x){return A=>{A.merged||(void 0===A.barycenter||void 0===x.barycenter||A.barycenter>=x.barycenter)&&function q(P,L){let S=0,k=0;P.weight&&(S+=P.barycenter*P.weight,k+=P.weight),L.weight&&(S+=L.barycenter*L.weight,k+=L.weight),P.vs=L.vs.concat(P.vs),P.barycenter=S/k,P.weight=k,P.i=Math.min(L.i,P.i),L.merged=!0}(x,A)}}function k(x){return A=>{A.in.push(x),0==--A.indegree&&P.push(A)}}for(;P.length;){let x=P.pop();L.push(x),x.in.reverse().forEach(S(x)),x.out.forEach(k(x))}return L.filter(x=>!x.merged).map(x=>le.pick(x,["vs","i","barycenter","weight"]))}(Object.values(S).filter(x=>!x.indegree))}},8414:(Se,Je,B)=>{let le=B(9750),J=B(6753),$=B(6843);Se.exports=function q(S,k,x,A){let j=S.children(k),V=S.node(k),ge=V?V.borderLeft:void 0,ye=V?V.borderRight:void 0,Ie={};ge&&(j=j.filter(he=>he!==ge&&he!==ye));let et=le(S,j);et.forEach(he=>{if(S.children(he.v).length){let _e=q(S,he.v,x,A);Ie[he.v]=_e,Object.hasOwn(_e,"barycenter")&&function L(S,k){void 0!==S.barycenter?(S.barycenter=(S.barycenter*S.weight+k.barycenter*k.weight)/(S.weight+k.weight),S.weight+=k.weight):(S.barycenter=k.barycenter,S.weight=k.weight)}(he,_e)}});let Ee=J(et,x);!function P(S,k){S.forEach(x=>{x.vs=x.vs.flatMap(A=>k[A]?k[A].vs:A)})}(Ee,Ie);let Pe=$(Ee,A);if(ge&&(Pe.vs=[ge,Pe.vs,ye].flat(!0),S.predecessors(ge).length)){let he=S.node(S.predecessors(ge)[0]),_e=S.node(S.predecessors(ye)[0]);Object.hasOwn(Pe,"barycenter")||(Pe.barycenter=0,Pe.weight=0),Pe.barycenter=(Pe.barycenter*Pe.weight+he.order+_e.order)/(Pe.weight+2),Pe.weight+=2}return Pe}},6843:(Se,Je,B)=>{let le=B(1178);function $(P,L,S){let k;for(;L.length&&(k=L[L.length-1]).i<=S;)L.pop(),P.push(k.vs),S++;return S}Se.exports=function J(P,L){let S=le.partition(P,Ie=>Object.hasOwn(Ie,"barycenter")),k=S.lhs,x=S.rhs.sort((Ie,et)=>et.i-Ie.i),A=[],j=0,V=0,ge=0;k.sort(function q(P){return(L,S)=>L.barycenter<S.barycenter?-1:L.barycenter>S.barycenter?1:P?S.i-L.i:L.i-S.i}(!!L)),ge=$(A,x,ge),k.forEach(Ie=>{ge+=Ie.vs.length,A.push(Ie.vs),j+=Ie.barycenter*Ie.weight,V+=Ie.weight,ge=$(A,x,ge)});let ye={vs:A.flat(!0)};return V&&(ye.barycenter=j/V,ye.weight=V),ye}},930:Se=>{Se.exports=function Je(J){let $=function le(J){let $={},q=0;return J.children().forEach(function P(L){let S=q;J.children(L).forEach(P),$[L]={low:S,lim:q++}}),$}(J);J.graph().dummyChains.forEach(q=>{let P=J.node(q),L=P.edgeObj,S=function B(J,$,q,P){let A,j,L=[],S=[],k=Math.min($[q].low,$[P].low),x=Math.max($[q].lim,$[P].lim);A=q;do{A=J.parent(A),L.push(A)}while(A&&($[A].low>k||x>$[A].lim));for(j=A,A=P;(A=J.parent(A))!==j;)S.push(A);return{path:L.concat(S.reverse()),lca:j}}(J,$,L.v,L.w),k=S.path,x=S.lca,A=0,j=k[A],V=!0;for(;q!==L.w;){if(P=J.node(q),V){for(;(j=k[A])!==x&&J.node(j).maxRank<P.rank;)A++;j===x&&(V=!1)}if(!V){for(;A<k.length-1&&J.node(j=k[A+1]).minRank<=P.rank;)A++;j=k[A]}J.setParent(q,j),q=J.successors(q)[0]}})}},2363:(Se,Je,B)=>{"use strict";let le=B(688).Graph,J=B(1178);function $(Ee,Pe){let he={};return Pe.length&&Pe.reduce(function _e(Ne,$e){let ze=0,it=0,se=Ne.length,pe=$e[$e.length-1];return $e.forEach((De,xe)=>{let Oe=function P(Ee,Pe){if(Ee.node(Pe).dummy)return Ee.predecessors(Pe).find(he=>Ee.node(he).dummy)}(Ee,De),pt=Oe?Ee.node(Oe).order:se;(Oe||De===pe)&&($e.slice(it,xe+1).forEach(yt=>{Ee.predecessors(yt).forEach(zt=>{let Tn=Ee.node(zt),Wr=Tn.order;(Wr<ze||pt<Wr)&&(!Tn.dummy||!Ee.node(yt).dummy)&&L(he,zt,yt)})}),it=xe+1,ze=pt)}),$e}),he}function q(Ee,Pe){let he={};function _e($e,ze,it,se,pe){let De;J.range(ze,it).forEach(xe=>{De=$e[xe],Ee.node(De).dummy&&Ee.predecessors(De).forEach(Oe=>{let pt=Ee.node(Oe);pt.dummy&&(pt.order<se||pt.order>pe)&&L(he,Oe,De)})})}return Pe.length&&Pe.reduce(function Ne($e,ze){let se,it=-1,pe=0;return ze.forEach((De,xe)=>{if("border"===Ee.node(De).dummy){let Oe=Ee.predecessors(De);Oe.length&&(se=Ee.node(Oe[0]).order,_e(ze,pe,xe,it,se),pe=xe,it=se)}_e(ze,pe,ze.length,se,$e.length)}),ze}),he}function L(Ee,Pe,he){if(Pe>he){let Ne=Pe;Pe=he,he=Ne}let _e=Ee[Pe];_e||(Ee[Pe]=_e={}),_e[he]=!0}function S(Ee,Pe,he){if(Pe>he){let _e=Pe;Pe=he,he=_e}return!!Ee[Pe]&&Object.hasOwn(Ee[Pe],he)}function k(Ee,Pe,he,_e){let Ne={},$e={},ze={};return Pe.forEach(it=>{it.forEach((se,pe)=>{Ne[se]=se,$e[se]=se,ze[se]=pe})}),Pe.forEach(it=>{let se=-1;it.forEach(pe=>{let De=_e(pe);if(De.length){De=De.sort((Oe,pt)=>ze[Oe]-ze[pt]);let xe=(De.length-1)/2;for(let Oe=Math.floor(xe),pt=Math.ceil(xe);Oe<=pt;++Oe){let yt=De[Oe];$e[pe]===pe&&se<ze[yt]&&!S(he,pe,yt)&&($e[yt]=pe,$e[pe]=Ne[pe]=Ne[yt],se=ze[yt])}}})}),{root:Ne,align:$e}}function x(Ee,Pe,he,_e,Ne){let $e={},ze=function A(Ee,Pe,he,_e){let Ne=new le,$e=Ee.graph(),ze=function Ie(Ee,Pe,he){return(_e,Ne,$e)=>{let pe,ze=_e.node(Ne),it=_e.node($e),se=0;if(se+=ze.width/2,Object.hasOwn(ze,"labelpos"))switch(ze.labelpos.toLowerCase()){case"l":pe=-ze.width/2;break;case"r":pe=ze.width/2}if(pe&&(se+=he?pe:-pe),pe=0,se+=(ze.dummy?Pe:Ee)/2,se+=(it.dummy?Pe:Ee)/2,se+=it.width/2,Object.hasOwn(it,"labelpos"))switch(it.labelpos.toLowerCase()){case"l":pe=it.width/2;break;case"r":pe=-it.width/2}return pe&&(se+=he?pe:-pe),pe=0,se}}($e.nodesep,$e.edgesep,_e);return Pe.forEach(it=>{let se;it.forEach(pe=>{let De=he[pe];if(Ne.setNode(De),se){var xe=he[se],Oe=Ne.edge(xe,De);Ne.setEdge(xe,De,Math.max(ze(Ee,pe,se),Oe||0))}se=pe})}),Ne}(Ee,Pe,he,Ne),it=Ne?"borderLeft":"borderRight";function se(xe,Oe){let pt=ze.nodes(),yt=pt.pop(),zt={};for(;yt;)zt[yt]?xe(yt):(zt[yt]=!0,pt.push(yt),pt=pt.concat(Oe(yt))),yt=pt.pop()}return se(function pe(xe){$e[xe]=ze.inEdges(xe).reduce((Oe,pt)=>Math.max(Oe,$e[pt.v]+ze.edge(pt)),0)},ze.predecessors.bind(ze)),se(function De(xe){let Oe=ze.outEdges(xe).reduce((yt,zt)=>Math.min(yt,$e[zt.w]-ze.edge(zt)),Number.POSITIVE_INFINITY),pt=Ee.node(xe);Oe!==Number.POSITIVE_INFINITY&&pt.borderType!==it&&($e[xe]=Math.max($e[xe],Oe))},ze.successors.bind(ze)),Object.keys(_e).forEach(xe=>$e[xe]=$e[he[xe]]),$e}function j(Ee,Pe){return Object.values(Pe).reduce((he,_e)=>{let Ne=Number.NEGATIVE_INFINITY,$e=Number.POSITIVE_INFINITY;Object.entries(_e).forEach(([it,se])=>{let pe=function et(Ee,Pe){return Ee.node(Pe).width}(Ee,it)/2;Ne=Math.max(se+pe,Ne),$e=Math.min(se-pe,$e)});const ze=Ne-$e;return ze<he[0]&&(he=[ze,_e]),he},[Number.POSITIVE_INFINITY,null])[1]}function V(Ee,Pe){let he=Object.values(Pe),_e=J.applyWithChunking(Math.min,he),Ne=J.applyWithChunking(Math.max,he);["u","d"].forEach($e=>{["l","r"].forEach(ze=>{let it=$e+ze,se=Ee[it];if(se===Pe)return;let pe=Object.values(se),De=_e-J.applyWithChunking(Math.min,pe);"l"!==ze&&(De=Ne-J.applyWithChunking(Math.max,pe)),De&&(Ee[it]=J.mapValues(se,xe=>xe+De))})})}function ge(Ee,Pe){return J.mapValues(Ee.ul,(he,_e)=>{if(Pe)return Ee[Pe.toLowerCase()][_e];{let Ne=Object.values(Ee).map($e=>$e[_e]).sort(($e,ze)=>$e-ze);return(Ne[1]+Ne[2])/2}})}Se.exports={positionX:function ye(Ee){let Ne,Pe=J.buildLayerMatrix(Ee),he=Object.assign($(Ee,Pe),q(Ee,Pe)),_e={};["u","d"].forEach(ze=>{Ne="u"===ze?Pe:Object.values(Pe).reverse(),["l","r"].forEach(it=>{"r"===it&&(Ne=Ne.map(xe=>Object.values(xe).reverse()));let se=("u"===ze?Ee.predecessors:Ee.successors).bind(Ee),pe=k(0,Ne,he,se),De=x(Ee,Ne,pe.root,pe.align,"r"===it);"r"===it&&(De=J.mapValues(De,xe=>-xe)),_e[ze+it]=De})});let $e=j(Ee,_e);return V(_e,$e),ge(_e,Ee.graph().align)},findType1Conflicts:$,findType2Conflicts:q,addConflict:L,hasConflict:S,verticalAlignment:k,horizontalCompaction:x,alignCoordinates:V,findSmallestWidthAlignment:j,balance:ge}},3110:(Se,Je,B)=>{"use strict";let le=B(1178),J=B(2363).positionX;Se.exports=function $(P){(function q(P){let L=le.buildLayerMatrix(P),S=P.graph().ranksep,k=0;L.forEach(x=>{const A=x.reduce((j,V)=>{const ge=P.node(V).height;return j>ge?j:ge},0);x.forEach(j=>P.node(j).y=k+A/2),k+=A+S})})(P=le.asNonCompoundGraph(P)),Object.entries(J(P)).forEach(([L,S])=>P.node(L).x=S)}},5975:(Se,Je,B)=>{"use strict";var le=B(688).Graph,J=B(1211).slack;function q(S,k){return S.nodes().forEach(function x(A){k.nodeEdges(A).forEach(j=>{var V=j.v,ge=A===V?j.w:V;!S.hasNode(ge)&&!J(k,j)&&(S.setNode(ge,{}),S.setEdge(A,ge,{}),x(ge))})}),S.nodeCount()}function P(S,k){return k.edges().reduce((A,j)=>{let V=Number.POSITIVE_INFINITY;return S.hasNode(j.v)!==S.hasNode(j.w)&&(V=J(k,j)),V<A[0]?[V,j]:A},[Number.POSITIVE_INFINITY,null])[1]}function L(S,k,x){S.nodes().forEach(A=>k.node(A).rank+=x)}Se.exports=function $(S){var j,V,k=new le({directed:!1}),x=S.nodes()[0],A=S.nodeCount();for(k.setNode(x,{});q(k,S)<A;)j=P(k,S),V=k.hasNode(j.v)?J(S,j):-J(S,j),L(k,S,V);return k}},5779:(Se,Je,B)=>{"use strict";var J=B(1211).longestPath,$=B(5975),q=B(9722);Se.exports=function P(x){switch(x.graph().ranker){case"network-simplex":default:!function k(x){q(x)}(x);break;case"tight-tree":!function S(x){J(x),$(x)}(x);break;case"longest-path":L(x)}};var L=J},9722:(Se,Je,B)=>{"use strict";var le=B(5975),J=B(1211).slack,$=B(1211).longestPath,q=B(688).alg.preorder,P=B(688).alg.postorder,L=B(1178).simplify;function S(he){he=L(he),$(he);var Ne,_e=le(he);for(j(_e),k(_e,he);Ne=ge(_e);)Ie(_e,he,Ne,ye(_e,he,Ne))}function k(he,_e){var Ne=P(he,he.nodes());(Ne=Ne.slice(0,Ne.length-1)).forEach($e=>function x(he,_e,Ne){var $e=he.node(Ne);he.edge(Ne,$e.parent).cutvalue=A(he,_e,Ne)}(he,_e,$e))}function A(he,_e,Ne){var ze=he.node(Ne).parent,it=!0,se=_e.edge(Ne,ze),pe=0;return se||(it=!1,se=_e.edge(ze,Ne)),pe=se.weight,_e.nodeEdges(Ne).forEach(De=>{var xe=De.v===Ne,Oe=xe?De.w:De.v;if(Oe!==ze){var pt=xe===it,yt=_e.edge(De).weight;if(pe+=pt?yt:-yt,function Ee(he,_e,Ne){return he.hasEdge(_e,Ne)}(he,Ne,Oe)){var zt=he.edge(Ne,Oe).cutvalue;pe+=pt?-zt:zt}}}),pe}function j(he,_e){arguments.length<2&&(_e=he.nodes()[0]),V(he,{},1,_e)}function V(he,_e,Ne,$e,ze){var it=Ne,se=he.node($e);return _e[$e]=!0,he.neighbors($e).forEach(pe=>{Object.hasOwn(_e,pe)||(Ne=V(he,_e,Ne,pe,$e))}),se.low=it,se.lim=Ne++,ze?se.parent=ze:delete se.parent,Ne}function ge(he){return he.edges().find(_e=>he.edge(_e).cutvalue<0)}function ye(he,_e,Ne){var $e=Ne.v,ze=Ne.w;_e.hasEdge($e,ze)||($e=Ne.w,ze=Ne.v);var it=he.node($e),se=he.node(ze),pe=it,De=!1;return it.lim>se.lim&&(pe=se,De=!0),_e.edges().filter(Oe=>De===Pe(0,he.node(Oe.v),pe)&&De!==Pe(0,he.node(Oe.w),pe)).reduce((Oe,pt)=>J(_e,pt)<J(_e,Oe)?pt:Oe)}function Ie(he,_e,Ne,$e){he.removeEdge(Ne.v,Ne.w),he.setEdge($e.v,$e.w,{}),j(he),k(he,_e),function et(he,_e){var Ne=he.nodes().find(ze=>!_e.node(ze).parent),$e=q(he,Ne);($e=$e.slice(1)).forEach(ze=>{var it=he.node(ze).parent,se=_e.edge(ze,it),pe=!1;se||(se=_e.edge(it,ze),pe=!0),_e.node(ze).rank=_e.node(it).rank+(pe?se.minlen:-se.minlen)})}(he,_e)}function Pe(he,_e,Ne){return Ne.low<=_e.lim&&_e.lim<=Ne.lim}Se.exports=S,S.initLowLimValues=j,S.initCutValues=k,S.calcCutValue=A,S.leaveEdge=ge,S.enterEdge=ye,S.exchangeEdges=Ie},1211:(Se,Je,B)=>{"use strict";const{applyWithChunking:le}=B(1178);Se.exports={longestPath:function J(q){var P={};q.sources().forEach(function L(S){var k=q.node(S);if(Object.hasOwn(P,S))return k.rank;P[S]=!0;let x=q.outEdges(S).map(j=>null==j?Number.POSITIVE_INFINITY:L(j.w)-q.edge(j).minlen);var A=le(Math.min,x);return A===Number.POSITIVE_INFINITY&&(A=0),k.rank=A})},slack:function $(q,P){return q.node(P.w).rank-q.node(P.v).rank-q.edge(P).minlen}}},1178:(Se,Je,B)=>{"use strict";let le=B(688).Graph;function J(se,pe,De,xe){let Oe;do{Oe=_e(xe)}while(se.hasNode(Oe));return De.dummy=pe,se.setNode(Oe,De),Oe}Se.exports={addBorderNode:function j(se,pe,De,xe){let Oe={width:0,height:0};return arguments.length>=4&&(Oe.rank=De,Oe.order=xe),J(se,"border",Oe,pe)},addDummyNode:J,applyWithChunking:ye,asNonCompoundGraph:function q(se){let pe=new le({multigraph:se.isMultigraph()}).setGraph(se.graph());return se.nodes().forEach(De=>{se.children(De).length||pe.setNode(De,se.node(De))}),se.edges().forEach(De=>{pe.setEdge(De,se.edge(De))}),pe},buildLayerMatrix:function k(se){let pe=Ne(Ie(se)+1).map(()=>[]);return se.nodes().forEach(De=>{let xe=se.node(De),Oe=xe.rank;void 0!==Oe&&(pe[Oe][xe.order]=De)}),pe},intersectRect:function S(se,pe){let Tn,Wr,De=se.x,xe=se.y,Oe=pe.x-De,pt=pe.y-xe,yt=se.width/2,zt=se.height/2;if(!Oe&&!pt)throw new Error("Not possible to find intersection inside of the rectangle");return Math.abs(pt)*yt>Math.abs(Oe)*zt?(pt<0&&(zt=-zt),Tn=zt*Oe/pt,Wr=zt):(Oe<0&&(yt=-yt),Tn=yt,Wr=yt*pt/Oe),{x:De+Tn,y:xe+Wr}},mapValues:function ze(se,pe){let De=pe;return"string"==typeof pe&&(De=xe=>xe[pe]),Object.entries(se).reduce((xe,[Oe,pt])=>(xe[Oe]=De(pt,Oe),xe),{})},maxRank:Ie,normalizeRanks:function x(se){let pe=se.nodes().map(xe=>{let Oe=se.node(xe).rank;return void 0===Oe?Number.MAX_VALUE:Oe}),De=ye(Math.min,pe);se.nodes().forEach(xe=>{let Oe=se.node(xe);Object.hasOwn(Oe,"rank")&&(Oe.rank-=De)})},notime:function Pe(se,pe){return pe()},partition:function et(se,pe){let De={lhs:[],rhs:[]};return se.forEach(xe=>{pe(xe)?De.lhs.push(xe):De.rhs.push(xe)}),De},pick:function $e(se,pe){const De={};for(const xe of pe)void 0!==se[xe]&&(De[xe]=se[xe]);return De},predecessorWeights:function L(se){let pe=se.nodes().map(De=>{let xe={};return se.inEdges(De).forEach(Oe=>{xe[Oe.v]=(xe[Oe.v]||0)+se.edge(Oe).weight}),xe});return it(se.nodes(),pe)},range:Ne,removeEmptyRanks:function A(se){let pe=se.nodes().map(yt=>se.node(yt).rank),De=ye(Math.min,pe),xe=[];se.nodes().forEach(yt=>{let zt=se.node(yt).rank-De;xe[zt]||(xe[zt]=[]),xe[zt].push(yt)});let Oe=0,pt=se.graph().nodeRankFactor;Array.from(xe).forEach((yt,zt)=>{void 0===yt&&zt%pt!=0?--Oe:void 0!==yt&&Oe&&yt.forEach(Tn=>se.node(Tn).rank+=Oe)})},simplify:function $(se){let pe=(new le).setGraph(se.graph());return se.nodes().forEach(De=>pe.setNode(De,se.node(De))),se.edges().forEach(De=>{let xe=pe.edge(De.v,De.w)||{weight:0,minlen:1},Oe=se.edge(De);pe.setEdge(De.v,De.w,{weight:xe.weight+Oe.weight,minlen:Math.max(xe.minlen,Oe.minlen)})}),pe},successorWeights:function P(se){let pe=se.nodes().map(De=>{let xe={};return se.outEdges(De).forEach(Oe=>{xe[Oe.w]=(xe[Oe.w]||0)+se.edge(Oe).weight}),xe});return it(se.nodes(),pe)},time:function Ee(se,pe){let De=Date.now();try{return pe()}finally{console.log(se+" time: "+(Date.now()-De)+"ms")}},uniqueId:_e,zipObject:it};const ge=65535;function ye(se,pe){if(pe.length>ge){const De=function V(se,pe=ge){const De=[];for(let xe=0;xe<se.length;xe+=pe){const Oe=se.slice(xe,xe+pe);De.push(Oe)}return De}(pe);return se.apply(null,De.map(xe=>se.apply(null,xe)))}return se.apply(null,pe)}function Ie(se){const De=se.nodes().map(xe=>{let Oe=se.node(xe).rank;return void 0===Oe?Number.MIN_VALUE:Oe});return ye(Math.max,De)}let he=0;function _e(se){var pe=++he;return toString(se)+pe}function Ne(se,pe,De=1){null==pe&&(pe=se,se=0);let xe=pt=>pt<pe;De<0&&(xe=pt=>pe<pt);const Oe=[];for(let pt=se;xe(pt);pt+=De)Oe.push(pt);return Oe}function it(se,pe){return se.reduce((De,xe,Oe)=>(De[xe]=pe[Oe],De),{})}},9836:Se=>{Se.exports="1.1.4"},688:(Se,Je,B)=>{var le=B(3820);Se.exports={Graph:le.Graph,json:B(8388),alg:B(1873),version:le.version}},9:Se=>{Se.exports=function Je(B){var $,le={},J=[];function q(P){Object.hasOwn(le,P)||(le[P]=!0,$.push(P),B.successors(P).forEach(q),B.predecessors(P).forEach(q))}return B.nodes().forEach(function(P){$=[],q(P),$.length&&J.push($)}),J}},7766:Se=>{function B($,q,P,L){for(var S=[[$,!1]];S.length>0;){var k=S.pop();k[1]?L.push(k[0]):Object.hasOwn(P,k[0])||(P[k[0]]=!0,S.push([k[0],!0]),J(q(k[0]),x=>S.push([x,!1])))}}function le($,q,P,L){for(var S=[$];S.length>0;){var k=S.pop();Object.hasOwn(P,k)||(P[k]=!0,L.push(k),J(q(k),x=>S.push(x)))}}function J($,q){for(var P=$.length;P--;)q($[P],P,$);return $}Se.exports=function Je($,q,P){Array.isArray(q)||(q=[q]);var L=$.isDirected()?A=>$.successors(A):A=>$.neighbors(A),S="post"===P?B:le,k=[],x={};return q.forEach(A=>{if(!$.hasNode(A))throw new Error("Graph does not have node: "+A);S(A,L,x,k)}),k}},445:(Se,Je,B)=>{var le=B(7103);Se.exports=function J($,q,P){return $.nodes().reduce(function(L,S){return L[S]=le($,S,q,P),L},{})}},7103:(Se,Je,B)=>{var le=B(859);Se.exports=function $(P,L,S,k){return function q(P,L,S,k){var j,V,x={},A=new le,ge=function(ye){var Ie=ye.v!==j?ye.v:ye.w,et=x[Ie],Ee=S(ye),Pe=V.distance+Ee;if(Ee<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+ye+" Weight: "+Ee);Pe<et.distance&&(et.distance=Pe,et.predecessor=j,A.decrease(Ie,Pe))};for(P.nodes().forEach(function(ye){var Ie=ye===L?0:Number.POSITIVE_INFINITY;x[ye]={distance:Ie},A.add(ye,Ie)});A.size()>0&&(j=A.removeMin(),(V=x[j]).distance!==Number.POSITIVE_INFINITY);)k(j).forEach(ge);return x}(P,String(L),S||J,k||function(x){return P.outEdges(x)})};var J=()=>1},2244:(Se,Je,B)=>{var le=B(8829);Se.exports=function J($){return le($).filter(function(q){return q.length>1||1===q.length&&$.hasEdge(q[0],q[0])})}},9432:Se=>{Se.exports=function B(J,$,q){return function le(J,$,q){var P={},L=J.nodes();return L.forEach(function(S){P[S]={},P[S][S]={distance:0},L.forEach(function(k){S!==k&&(P[S][k]={distance:Number.POSITIVE_INFINITY})}),q(S).forEach(function(k){var x=k.v===S?k.w:k.v,A=$(k);P[S][x]={distance:A,predecessor:S}})}),L.forEach(function(S){var k=P[S];L.forEach(function(x){var A=P[x];L.forEach(function(j){var ge=k[j],ye=A[j],Ie=A[S].distance+ge.distance;Ie<ye.distance&&(ye.distance=Ie,ye.predecessor=ge.predecessor)})})}),P}(J,$||Je,q||function(P){return J.outEdges(P)})};var Je=()=>1},1873:(Se,Je,B)=>{Se.exports={components:B(9),dijkstra:B(7103),dijkstraAll:B(445),findCycles:B(2244),floydWarshall:B(9432),isAcyclic:B(9640),postorder:B(4691),preorder:B(3166),prim:B(937),tarjan:B(8829),topsort:B(8306)}},9640:(Se,Je,B)=>{var le=B(8306);Se.exports=function J($){try{le($)}catch(q){if(q instanceof le.CycleException)return!1;throw q}return!0}},4691:(Se,Je,B)=>{var le=B(7766);Se.exports=function J($,q){return le($,q,"post")}},3166:(Se,Je,B)=>{var le=B(7766);Se.exports=function J($,q){return le($,q,"pre")}},937:(Se,Je,B)=>{var le=B(9744),J=B(859);Se.exports=function $(q,P){var x,L=new le,S={},k=new J;function A(V){var ge=V.v===x?V.w:V.v,ye=k.priority(ge);if(void 0!==ye){var Ie=P(V);Ie<ye&&(S[ge]=x,k.decrease(ge,Ie))}}if(0===q.nodeCount())return L;q.nodes().forEach(function(V){k.add(V,Number.POSITIVE_INFINITY),L.setNode(V)}),k.decrease(q.nodes()[0],0);for(var j=!1;k.size()>0;){if(x=k.removeMin(),Object.hasOwn(S,x))L.setEdge(x,S[x]);else{if(j)throw new Error("Input graph is not connected: "+q);j=!0}q.nodeEdges(x).forEach(A)}return L}},8829:Se=>{Se.exports=function Je(B){var le=0,J=[],$={},q=[];function P(L){var S=$[L]={onStack:!0,lowlink:le,index:le++};if(J.push(L),B.successors(L).forEach(function(A){Object.hasOwn($,A)?$[A].onStack&&(S.lowlink=Math.min(S.lowlink,$[A].index)):(P(A),S.lowlink=Math.min(S.lowlink,$[A].lowlink))}),S.lowlink===S.index){var x,k=[];do{x=J.pop(),$[x].onStack=!1,k.push(x)}while(L!==x);q.push(k)}}return B.nodes().forEach(function(L){Object.hasOwn($,L)||P(L)}),q}},8306:Se=>{function Je(le){var J={},$={},q=[];if(le.sinks().forEach(function P(L){if(Object.hasOwn($,L))throw new B;Object.hasOwn(J,L)||($[L]=!0,J[L]=!0,le.predecessors(L).forEach(P),delete $[L],q.push(L))}),Object.keys(J).length!==le.nodeCount())throw new B;return q}class B extends Error{constructor(){super(...arguments)}}Se.exports=Je,Je.CycleException=B},859:Se=>{Se.exports=class Je{_arr=[];_keyIndices={};size(){return this._arr.length}keys(){return this._arr.map(function(le){return le.key})}has(le){return Object.hasOwn(this._keyIndices,le)}priority(le){var J=this._keyIndices[le];if(void 0!==J)return this._arr[J].priority}min(){if(0===this.size())throw new Error("Queue underflow");return this._arr[0].key}add(le,J){var $=this._keyIndices;if(le=String(le),!Object.hasOwn($,le)){var q=this._arr,P=q.length;return $[le]=P,q.push({key:le,priority:J}),this._decrease(P),!0}return!1}removeMin(){this._swap(0,this._arr.length-1);var le=this._arr.pop();return delete this._keyIndices[le.key],this._heapify(0),le.key}decrease(le,J){var $=this._keyIndices[le];if(J>this._arr[$].priority)throw new Error("New priority is greater than current priority. Key: "+le+" Old: "+this._arr[$].priority+" New: "+J);this._arr[$].priority=J,this._decrease($)}_heapify(le){var J=this._arr,$=2*le,q=$+1,P=le;$<J.length&&(P=J[$].priority<J[P].priority?$:P,q<J.length&&(P=J[q].priority<J[P].priority?q:P),P!==le&&(this._swap(le,P),this._heapify(P)))}_decrease(le){for(var q,J=this._arr,$=J[le].priority;0!==le&&!(J[q=le>>1].priority<$);)this._swap(le,q),le=q}_swap(le,J){var $=this._arr,q=this._keyIndices,P=$[le],L=$[J];$[le]=L,$[J]=P,q[L.key]=le,q[P.key]=J}}},9744:Se=>{"use strict";var Je="\0",B="\0",le="\x01";function $(k,x){k[x]?k[x]++:k[x]=1}function q(k,x){--k[x]||delete k[x]}function P(k,x,A,j){var V=""+x,ge=""+A;if(!k&&V>ge){var ye=V;V=ge,ge=ye}return V+le+ge+le+(void 0===j?Je:j)}function S(k,x){return P(k,x.v,x.w,x.name)}Se.exports=class J{_isDirected=!0;_isMultigraph=!1;_isCompound=!1;_label;_defaultNodeLabelFn=()=>{};_defaultEdgeLabelFn=()=>{};_nodes={};_in={};_preds={};_out={};_sucs={};_edgeObjs={};_edgeLabels={};_nodeCount=0;_edgeCount=0;_parent;_children;constructor(x){x&&(this._isDirected=!Object.hasOwn(x,"directed")||x.directed,this._isMultigraph=!!Object.hasOwn(x,"multigraph")&&x.multigraph,this._isCompound=!!Object.hasOwn(x,"compound")&&x.compound),this._isCompound&&(this._parent={},this._children={},this._children[B]={})}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(x){return this._label=x,this}graph(){return this._label}setDefaultNodeLabel(x){return this._defaultNodeLabelFn=x,"function"!=typeof x&&(this._defaultNodeLabelFn=()=>x),this}nodeCount(){return this._nodeCount}nodes(){return Object.keys(this._nodes)}sources(){var x=this;return this.nodes().filter(A=>0===Object.keys(x._in[A]).length)}sinks(){var x=this;return this.nodes().filter(A=>0===Object.keys(x._out[A]).length)}setNodes(x,A){var j=arguments,V=this;return x.forEach(function(ge){j.length>1?V.setNode(ge,A):V.setNode(ge)}),this}setNode(x,A){return Object.hasOwn(this._nodes,x)?(arguments.length>1&&(this._nodes[x]=A),this):(this._nodes[x]=arguments.length>1?A:this._defaultNodeLabelFn(x),this._isCompound&&(this._parent[x]=B,this._children[x]={},this._children[B][x]=!0),this._in[x]={},this._preds[x]={},this._out[x]={},this._sucs[x]={},++this._nodeCount,this)}node(x){return this._nodes[x]}hasNode(x){return Object.hasOwn(this._nodes,x)}removeNode(x){var A=this;if(Object.hasOwn(this._nodes,x)){var j=V=>A.removeEdge(A._edgeObjs[V]);delete this._nodes[x],this._isCompound&&(this._removeFromParentsChildList(x),delete this._parent[x],this.children(x).forEach(function(V){A.setParent(V)}),delete this._children[x]),Object.keys(this._in[x]).forEach(j),delete this._in[x],delete this._preds[x],Object.keys(this._out[x]).forEach(j),delete this._out[x],delete this._sucs[x],--this._nodeCount}return this}setParent(x,A){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(void 0===A)A=B;else{for(var j=A+="";void 0!==j;j=this.parent(j))if(j===x)throw new Error("Setting "+A+" as parent of "+x+" would create a cycle");this.setNode(A)}return this.setNode(x),this._removeFromParentsChildList(x),this._parent[x]=A,this._children[A][x]=!0,this}_removeFromParentsChildList(x){delete this._children[this._parent[x]][x]}parent(x){if(this._isCompound){var A=this._parent[x];if(A!==B)return A}}children(x=B){if(this._isCompound){var A=this._children[x];if(A)return Object.keys(A)}else{if(x===B)return this.nodes();if(this.hasNode(x))return[]}}predecessors(x){var A=this._preds[x];if(A)return Object.keys(A)}successors(x){var A=this._sucs[x];if(A)return Object.keys(A)}neighbors(x){var A=this.predecessors(x);if(A){const V=new Set(A);for(var j of this.successors(x))V.add(j);return Array.from(V.values())}}isLeaf(x){return 0===(this.isDirected()?this.successors(x):this.neighbors(x)).length}filterNodes(x){var A=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});A.setGraph(this.graph());var j=this;Object.entries(this._nodes).forEach(function([ye,Ie]){x(ye)&&A.setNode(ye,Ie)}),Object.values(this._edgeObjs).forEach(function(ye){A.hasNode(ye.v)&&A.hasNode(ye.w)&&A.setEdge(ye,j.edge(ye))});var V={};function ge(ye){var Ie=j.parent(ye);return void 0===Ie||A.hasNode(Ie)?(V[ye]=Ie,Ie):Ie in V?V[Ie]:ge(Ie)}return this._isCompound&&A.nodes().forEach(ye=>A.setParent(ye,ge(ye))),A}setDefaultEdgeLabel(x){return this._defaultEdgeLabelFn=x,"function"!=typeof x&&(this._defaultEdgeLabelFn=()=>x),this}edgeCount(){return this._edgeCount}edges(){return Object.values(this._edgeObjs)}setPath(x,A){var j=this,V=arguments;return x.reduce(function(ge,ye){return V.length>1?j.setEdge(ge,ye,A):j.setEdge(ge,ye),ye}),this}setEdge(){var x,A,j,V,ge=!1,ye=arguments[0];"object"==typeof ye&&null!==ye&&"v"in ye?(x=ye.v,A=ye.w,j=ye.name,2===arguments.length&&(V=arguments[1],ge=!0)):(x=ye,A=arguments[1],j=arguments[3],arguments.length>2&&(V=arguments[2],ge=!0)),void 0!==j&&(j=""+j);var Ie=P(this._isDirected,x=""+x,A=""+A,j);if(Object.hasOwn(this._edgeLabels,Ie))return ge&&(this._edgeLabels[Ie]=V),this;if(void 0!==j&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(x),this.setNode(A),this._edgeLabels[Ie]=ge?V:this._defaultEdgeLabelFn(x,A,j);var et=function L(k,x,A,j){var V=""+x,ge=""+A;if(!k&&V>ge){var ye=V;V=ge,ge=ye}var Ie={v:V,w:ge};return j&&(Ie.name=j),Ie}(this._isDirected,x,A,j);return x=et.v,A=et.w,Object.freeze(et),this._edgeObjs[Ie]=et,$(this._preds[A],x),$(this._sucs[x],A),this._in[A][Ie]=et,this._out[x][Ie]=et,this._edgeCount++,this}edge(x,A,j){var V=1===arguments.length?S(this._isDirected,arguments[0]):P(this._isDirected,x,A,j);return this._edgeLabels[V]}edgeAsObj(){const x=this.edge(...arguments);return"object"!=typeof x?{label:x}:x}hasEdge(x,A,j){var V=1===arguments.length?S(this._isDirected,arguments[0]):P(this._isDirected,x,A,j);return Object.hasOwn(this._edgeLabels,V)}removeEdge(x,A,j){var V=1===arguments.length?S(this._isDirected,arguments[0]):P(this._isDirected,x,A,j),ge=this._edgeObjs[V];return ge&&(x=ge.v,A=ge.w,delete this._edgeLabels[V],delete this._edgeObjs[V],q(this._preds[A],x),q(this._sucs[x],A),delete this._in[A][V],delete this._out[x][V],this._edgeCount--),this}inEdges(x,A){var j=this._in[x];if(j){var V=Object.values(j);return A?V.filter(ge=>ge.v===A):V}}outEdges(x,A){var j=this._out[x];if(j){var V=Object.values(j);return A?V.filter(ge=>ge.w===A):V}}nodeEdges(x,A){var j=this.inEdges(x,A);if(j)return j.concat(this.outEdges(x,A))}}},3820:(Se,Je,B)=>{Se.exports={Graph:B(9744),version:B(2384)}},8388:(Se,Je,B)=>{var le=B(9744);function $(L){return L.nodes().map(function(S){var k=L.node(S),x=L.parent(S),A={v:S};return void 0!==k&&(A.value=k),void 0!==x&&(A.parent=x),A})}function q(L){return L.edges().map(function(S){var k=L.edge(S),x={v:S.v,w:S.w};return void 0!==S.name&&(x.name=S.name),void 0!==k&&(x.value=k),x})}Se.exports={write:function J(L){var S={options:{directed:L.isDirected(),multigraph:L.isMultigraph(),compound:L.isCompound()},nodes:$(L),edges:q(L)};return void 0!==L.graph()&&(S.value=structuredClone(L.graph())),S},read:function P(L){var S=new le(L.options).setGraph(L.value);return L.nodes.forEach(function(k){S.setNode(k.v,k.value),k.parent&&S.setParent(k.v,k.parent)}),L.edges.forEach(function(k){S.setEdge({v:k.v,w:k.w,name:k.name},k.value)}),S}}},2384:Se=>{Se.exports="2.2.4"},2260:(Se,Je,B)=>{"use strict";var le={};function J(e,t,n,r,i,o,s){try{var a=e[o](s),u=a.value}catch(c){return void n(c)}a.done?t(u):Promise.resolve(u).then(r,i)}function $(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var o=e.apply(t,n);function s(u){J(o,r,i,s,a,"next",u)}function a(u){J(o,r,i,s,a,"throw",u)}s(void 0)})}}B.r(le),B.d(le,{FormatSpecifier:()=>xg,active:()=>mG,arc:()=>EJ,area:()=>RR,areaRadial:()=>BR,ascending:()=>Ds,autoType:()=>Tq,axisBottom:()=>_U,axisLeft:()=>DU,axisRight:()=>wU,axisTop:()=>bU,bisect:()=>ya,bisectLeft:()=>KH,bisectRight:()=>HT,bisector:()=>I1,blob:()=>rW,brush:()=>q2,brushSelection:()=>MG,brushX:()=>IG,brushY:()=>SG,buffer:()=>oW,chord:()=>NG,clientPoint:()=>tg,cluster:()=>bK,color:()=>xs,contourDensity:()=>uq,contours:()=>vN,create:()=>dJ,creator:()=>Yp,cross:()=>ZH,csv:()=>uW,csvFormat:()=>vq,csvFormatBody:()=>bq,csvFormatRow:()=>_q,csvFormatRows:()=>wq,csvFormatValue:()=>Dq,csvParse:()=>DN,csvParseRows:()=>yq,cubehelix:()=>$i,curveBasis:()=>UJ,curveBasisClosed:()=>$J,curveBasisOpen:()=>zJ,curveBundle:()=>GJ,curveCardinal:()=>qJ,curveCardinalClosed:()=>WJ,curveCardinalOpen:()=>YJ,curveCatmullRom:()=>KJ,curveCatmullRomClosed:()=>QJ,curveCatmullRomOpen:()=>ZJ,curveLinear:()=>Pm,curveLinearClosed:()=>XJ,curveMonotoneX:()=>JJ,curveMonotoneY:()=>eee,curveNatural:()=>tee,curveStep:()=>nee,curveStepAfter:()=>iee,curveStepBefore:()=>ree,customEvent:()=>xf,descending:()=>XH,deviation:()=>zT,dispatch:()=>uc,drag:()=>hq,dragDisable:()=>Kp,dragEnable:()=>Qp,dsv:()=>aW,dsvFormat:()=>wg,easeBack:()=>AN,easeBackIn:()=>Xq,easeBackInOut:()=>AN,easeBackOut:()=>Jq,easeBounce:()=>Vf,easeBounceIn:()=>Qq,easeBounceInOut:()=>Zq,easeBounceOut:()=>Vf,easeCircle:()=>NN,easeCircleIn:()=>Vq,easeCircleInOut:()=>NN,easeCircleOut:()=>Hq,easeCubic:()=>cb,easeCubicIn:()=>fG,easeCubicInOut:()=>cb,easeCubicOut:()=>dG,easeElastic:()=>kN,easeElasticIn:()=>eW,easeElasticInOut:()=>tW,easeElasticOut:()=>kN,easeExp:()=>TN,easeExpIn:()=>Bq,easeExpInOut:()=>TN,easeExpOut:()=>jq,easeLinear:()=>Aq,easePoly:()=>xN,easePolyIn:()=>Rq,easePolyInOut:()=>xN,easePolyOut:()=>Pq,easeQuad:()=>CN,easeQuadIn:()=>kq,easeQuadInOut:()=>CN,easeQuadOut:()=>Oq,easeSin:()=>SN,easeSinIn:()=>Fq,easeSinInOut:()=>SN,easeSinOut:()=>Lq,entries:()=>GG,event:()=>Ue,extent:()=>S1,forceCenter:()=>mW,forceCollide:()=>PW,forceLink:()=>LW,forceManyBody:()=>$W,forceRadial:()=>zW,forceSimulation:()=>UW,forceX:()=>GW,forceY:()=>qW,format:()=>Ig,formatDefaultLocale:()=>zN,formatLocale:()=>$N,formatPrefix:()=>Vb,formatSpecifier:()=>Hf,geoAlbers:()=>ok,geoAlbersUsa:()=>ZY,geoArea:()=>nY,geoAzimuthalEqualArea:()=>XY,geoAzimuthalEqualAreaRaw:()=>xw,geoAzimuthalEquidistant:()=>JY,geoAzimuthalEquidistantRaw:()=>Mw,geoBounds:()=>sY,geoCentroid:()=>dY,geoCircle:()=>hY,geoClipAntimeridian:()=>iw,geoClipCircle:()=>IA,geoClipExtent:()=>wY,geoClipRectangle:()=>Zg,geoConicConformal:()=>tK,geoConicConformalRaw:()=>uk,geoConicEqualArea:()=>cm,geoConicEqualAreaRaw:()=>ik,geoConicEquidistant:()=>rK,geoConicEquidistantRaw:()=>ck,geoContains:()=>IY,geoDistance:()=>em,geoEqualEarth:()=>oK,geoEqualEarthRaw:()=>Iw,geoEquirectangular:()=>nK,geoEquirectangularRaw:()=>td,geoGnomonic:()=>sK,geoGnomonicRaw:()=>Sw,geoGraticule:()=>LA,geoGraticule10:()=>SY,geoIdentity:()=>aK,geoInterpolate:()=>TY,geoLength:()=>SA,geoMercator:()=>eK,geoMercatorRaw:()=>ed,geoNaturalEarth1:()=>uK,geoNaturalEarth1Raw:()=>Tw,geoOrthographic:()=>cK,geoOrthographicRaw:()=>Nw,geoPath:()=>HY,geoProjection:()=>ko,geoProjectionMutator:()=>Ew,geoRotation:()=>bA,geoStereographic:()=>lK,geoStereographicRaw:()=>Aw,geoStream:()=>zi,geoTransform:()=>UY,geoTransverseMercator:()=>fK,geoTransverseMercatorRaw:()=>kw,gray:()=>WG,hcl:()=>yg,hierarchy:()=>Ow,histogram:()=>nU,hsl:()=>Xp,html:()=>pW,image:()=>lW,interpolate:()=>Tf,interpolateArray:()=>nz,interpolateBasis:()=>y2,interpolateBasisClosed:()=>v2,interpolateBlues:()=>WX,interpolateBrBG:()=>MX,interpolateBuGn:()=>PX,interpolateBuPu:()=>FX,interpolateCividis:()=>JX,interpolateCool:()=>nJ,interpolateCubehelix:()=>mQ,interpolateCubehelixDefault:()=>eJ,interpolateCubehelixLong:()=>ym,interpolateDate:()=>C2,interpolateDiscrete:()=>sQ,interpolateGnBu:()=>LX,interpolateGreens:()=>YX,interpolateGreys:()=>KX,interpolateHcl:()=>pQ,interpolateHclLong:()=>gQ,interpolateHsl:()=>fQ,interpolateHslLong:()=>dQ,interpolateHue:()=>aQ,interpolateInferno:()=>lJ,interpolateLab:()=>hQ,interpolateMagma:()=>cJ,interpolateNumber:()=>mi,interpolateNumberArray:()=>Y1,interpolateObject:()=>x2,interpolateOrRd:()=>BX,interpolateOranges:()=>XX,interpolatePRGn:()=>IX,interpolatePiYG:()=>SX,interpolatePlasma:()=>fJ,interpolatePuBu:()=>VX,interpolatePuBuGn:()=>jX,interpolatePuOr:()=>TX,interpolatePuRd:()=>HX,interpolatePurples:()=>QX,interpolateRainbow:()=>rJ,interpolateRdBu:()=>NX,interpolateRdGy:()=>AX,interpolateRdPu:()=>UX,interpolateRdYlBu:()=>kX,interpolateRdYlGn:()=>OX,interpolateReds:()=>ZX,interpolateRgb:()=>Sf,interpolateRgbBasis:()=>_2,interpolateRgbBasisClosed:()=>tz,interpolateRound:()=>Mk,interpolateSinebow:()=>sJ,interpolateSpectral:()=>RX,interpolateString:()=>Z1,interpolateTransformCss:()=>F2,interpolateTransformSvg:()=>L2,interpolateTurbo:()=>aJ,interpolateViridis:()=>uJ,interpolateWarm:()=>tJ,interpolateYlGn:()=>zX,interpolateYlGnBu:()=>$X,interpolateYlOrBr:()=>GX,interpolateYlOrRd:()=>qX,interpolateZoom:()=>Tk,interrupt:()=>Ea,interval:()=>_ee,isoFormat:()=>yee,isoParse:()=>wee,json:()=>dW,keys:()=>$G,lab:()=>mg,lch:()=>YG,line:()=>l_,lineRadial:()=>LR,linkHorizontal:()=>kJ,linkRadial:()=>RJ,linkVertical:()=>OJ,local:()=>TR,map:()=>Ms,matcher:()=>B1,max:()=>qT,mean:()=>oU,median:()=>sU,merge:()=>R1,min:()=>WT,mouse:()=>_a,namespace:()=>Cf,namespaces:()=>V1,nest:()=>jG,now:()=>mc,pack:()=>zK,packEnclose:()=>fk,packSiblings:()=>HK,pairs:()=>QH,partition:()=>GK,path:()=>xa,permute:()=>aU,pie:()=>MJ,piecewise:()=>yQ,pointRadial:()=>Dd,polygonArea:()=>bQ,polygonCentroid:()=>wQ,polygonContains:()=>CQ,polygonHull:()=>EQ,polygonLength:()=>xQ,precisionFixed:()=>GN,precisionPrefix:()=>qN,precisionRound:()=>WN,quadtree:()=>Eg,quantile:()=>Df,quantize:()=>vQ,radialArea:()=>BR,radialLine:()=>LR,randomBates:()=>SQ,randomExponential:()=>TQ,randomIrwinHall:()=>Pk,randomLogNormal:()=>IQ,randomNormal:()=>Rk,randomUniform:()=>MQ,range:()=>ni,rgb:()=>pc,ribbon:()=>BG,scaleBand:()=>Hw,scaleDiverging:()=>JO,scaleDivergingLog:()=>eR,scaleDivergingPow:()=>o_,scaleDivergingSqrt:()=>gX,scaleDivergingSymlog:()=>tR,scaleIdentity:()=>$k,scaleImplicit:()=>jw,scaleLinear:()=>Uk,scaleLog:()=>Yk,scaleOrdinal:()=>Vw,scalePoint:()=>NQ,scalePow:()=>Ww,scaleQuantile:()=>Jk,scaleQuantize:()=>eO,scaleSequential:()=>KO,scaleSequentialLog:()=>QO,scaleSequentialPow:()=>i_,scaleSequentialQuantile:()=>XO,scaleSequentialSqrt:()=>pX,scaleSequentialSymlog:()=>ZO,scaleSqrt:()=>HQ,scaleSymlog:()=>Zk,scaleThreshold:()=>tO,scaleTime:()=>cX,scaleUtc:()=>hX,scan:()=>uU,schemeAccent:()=>yX,schemeBlues:()=>ER,schemeBrBG:()=>nR,schemeBuGn:()=>fR,schemeBuPu:()=>dR,schemeCategory10:()=>mX,schemeDark2:()=>vX,schemeGnBu:()=>hR,schemeGreens:()=>CR,schemeGreys:()=>xR,schemeOrRd:()=>pR,schemeOranges:()=>SR,schemePRGn:()=>rR,schemePaired:()=>bX,schemePastel1:()=>wX,schemePastel2:()=>_X,schemePiYG:()=>iR,schemePuBu:()=>mR,schemePuBuGn:()=>gR,schemePuOr:()=>oR,schemePuRd:()=>yR,schemePurples:()=>MR,schemeRdBu:()=>sR,schemeRdGy:()=>aR,schemeRdPu:()=>vR,schemeRdYlBu:()=>uR,schemeRdYlGn:()=>cR,schemeReds:()=>IR,schemeSet1:()=>DX,schemeSet2:()=>EX,schemeSet3:()=>CX,schemeSpectral:()=>lR,schemeTableau10:()=>xX,schemeYlGn:()=>wR,schemeYlGnBu:()=>bR,schemeYlOrBr:()=>_R,schemeYlOrRd:()=>DR,select:()=>rn,selectAll:()=>NR,selection:()=>cc,selector:()=>qp,selectorAll:()=>L1,set:()=>UG,shuffle:()=>cU,stack:()=>see,stackOffsetDiverging:()=>uee,stackOffsetExpand:()=>aee,stackOffsetNone:()=>Pc,stackOffsetSilhouette:()=>cee,stackOffsetWiggle:()=>lee,stackOrderAppearance:()=>aP,stackOrderAscending:()=>uP,stackOrderDescending:()=>dee,stackOrderInsideOut:()=>hee,stackOrderNone:()=>Fc,stackOrderReverse:()=>pee,stratify:()=>KK,style:()=>ba,sum:()=>lU,svg:()=>gW,symbol:()=>HJ,symbolCircle:()=>p_,symbolCross:()=>jR,symbolDiamond:()=>HR,symbolSquare:()=>zR,symbolStar:()=>$R,symbolTriangle:()=>GR,symbolWye:()=>qR,symbols:()=>VJ,text:()=>Dg,thresholdFreedmanDiaconis:()=>rU,thresholdScott:()=>iU,thresholdSturges:()=>O1,tickFormat:()=>Hk,tickIncrement:()=>_f,tickStep:()=>va,ticks:()=>k1,timeDay:()=>Dm,timeDays:()=>QQ,timeFormat:()=>e_,timeFormatDefaultLocale:()=>HO,timeFormatLocale:()=>xO,timeFriday:()=>uO,timeFridays:()=>YQ,timeHour:()=>hO,timeHours:()=>ZQ,timeInterval:()=>Zn,timeMillisecond:()=>xm,timeMilliseconds:()=>vO,timeMinute:()=>gO,timeMinutes:()=>XQ,timeMonday:()=>fd,timeMondays:()=>zQ,timeMonth:()=>rO,timeMonths:()=>$Q,timeParse:()=>VO,timeSaturday:()=>cO,timeSaturdays:()=>KQ,timeSecond:()=>Em,timeSeconds:()=>yO,timeSunday:()=>ld,timeSundays:()=>lO,timeThursday:()=>ja,timeThursdays:()=>WQ,timeTuesday:()=>sO,timeTuesdays:()=>GQ,timeWednesday:()=>aO,timeWednesdays:()=>qQ,timeWeek:()=>ld,timeWeeks:()=>lO,timeYear:()=>Fa,timeYears:()=>UQ,timeout:()=>eb,timer:()=>og,timerFlush:()=>S2,touch:()=>Nf,touches:()=>pJ,transition:()=>ub,transpose:()=>YT,tree:()=>tQ,treemap:()=>nQ,treemapBinary:()=>rQ,treemapDice:()=>ad,treemapResquarify:()=>oQ,treemapSlice:()=>mm,treemapSliceDice:()=>iQ,treemapSquarify:()=>xk,tsv:()=>cW,tsvFormat:()=>Cq,tsvFormatBody:()=>xq,tsvFormatRow:()=>Iq,tsvFormatRows:()=>Mq,tsvFormatValue:()=>Sq,tsvParse:()=>EN,tsvParseRows:()=>Eq,utcDay:()=>Mm,utcDays:()=>oZ,utcFormat:()=>Im,utcFriday:()=>_O,utcFridays:()=>rZ,utcHour:()=>qO,utcHours:()=>fX,utcMillisecond:()=>xm,utcMilliseconds:()=>vO,utcMinute:()=>YO,utcMinutes:()=>dX,utcMonday:()=>hd,utcMondays:()=>JQ,utcMonth:()=>zO,utcMonths:()=>lX,utcParse:()=>t_,utcSaturday:()=>DO,utcSaturdays:()=>iZ,utcSecond:()=>Em,utcSeconds:()=>yO,utcSunday:()=>dd,utcSundays:()=>EO,utcThursday:()=>Ha,utcThursdays:()=>nZ,utcTuesday:()=>bO,utcTuesdays:()=>eZ,utcWednesday:()=>wO,utcWednesdays:()=>tZ,utcWeek:()=>dd,utcWeeks:()=>EO,utcYear:()=>Ua,utcYears:()=>sZ,values:()=>zG,variance:()=>$T,version:()=>WH,voronoi:()=>Vee,window:()=>H1,xml:()=>hW,zip:()=>dU,zoom:()=>wP,zoomIdentity:()=>zm,zoomTransform:()=>M_});let P=null,S=1;const k=Symbol("SIGNAL");function x(e){const t=P;return P=e,t}function et(e){if((!pe(e)||e.dirty)&&(e.dirty||e.lastCleanEpoch!==S)){if(!e.producerMustRecompute(e)&&!$e(e))return e.dirty=!1,void(e.lastCleanEpoch=S);e.producerRecomputeValue(e),e.dirty=!1,e.lastCleanEpoch=S}}function $e(e){De(e);for(let t=0;t<e.producerNode.length;t++){const n=e.producerNode[t],r=e.producerLastReadVersion[t];if(r!==n.version||(et(n),r!==n.version))return!0}return!1}function se(e,t){if(function xe(e){e.liveConsumerNode??=[],e.liveConsumerIndexOfThis??=[]}(e),De(e),1===e.liveConsumerNode.length)for(let r=0;r<e.producerNode.length;r++)se(e.producerNode[r],e.producerIndexOfThis[r]);const n=e.liveConsumerNode.length-1;if(e.liveConsumerNode[t]=e.liveConsumerNode[n],e.liveConsumerIndexOfThis[t]=e.liveConsumerIndexOfThis[n],e.liveConsumerNode.length--,e.liveConsumerIndexOfThis.length--,t<e.liveConsumerNode.length){const r=e.liveConsumerIndexOfThis[t],i=e.liveConsumerNode[t];De(i),i.producerIndexOfThis[r]=t}}function pe(e){return e.consumerIsAlwaysLive||(e?.liveConsumerNode?.length??0)>0}function De(e){e.producerNode??=[],e.producerIndexOfThis??=[],e.producerLastReadVersion??=[]}let za=null;function Vn(e){return"function"==typeof e}let Ci=!1;const ar={Promise:void 0,set useDeprecatedSynchronousErrorHandling(e){if(e){const t=new Error;console.warn("DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n"+t.stack)}else Ci&&console.log("RxJS: Back to a better error behavior. Thank you. <3");Ci=e},get useDeprecatedSynchronousErrorHandling(){return Ci}};function ui(e){setTimeout(()=>{throw e},0)}const _r={closed:!0,next(e){},error(e){if(ar.useDeprecatedSynchronousErrorHandling)throw e;ui(e)},complete(){}},Td=Array.isArray||(e=>e&&"number"==typeof e.length),Yi=(()=>{function e(t){return Error.call(this),this.message=t?`${t.length} errors occurred during unsubscription:\n${t.map((n,r)=>`${r+1}) ${n.toString()}`).join("\n ")}`:"",this.name="UnsubscriptionError",this.errors=t,this}return e.prototype=Object.create(Error.prototype),e})();class ln{constructor(t){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,t&&(this._ctorUnsubscribe=!0,this._unsubscribe=t)}unsubscribe(){let t;if(this.closed)return;let{_parentOrParents:n,_ctorUnsubscribe:r,_unsubscribe:i,_subscriptions:o}=this;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,n instanceof ln)n.remove(this);else if(null!==n)for(let s=0;s<n.length;++s)n[s].remove(this);if(Vn(i)){r&&(this._unsubscribe=void 0);try{i.call(this)}catch(s){t=s instanceof Yi?qa(s.errors):[s]}}if(Td(o)){let s=-1,a=o.length;for(;++s<a;){const u=o[s];if(null!==(e=u)&&"object"==typeof e)try{u.unsubscribe()}catch(c){t=t||[],c instanceof Yi?t=t.concat(qa(c.errors)):t.push(c)}}}var e;if(t)throw new Yi(t)}add(t){let n=t;if(!t)return ln.EMPTY;switch(typeof t){case"function":n=new ln(t);case"object":if(n===this||n.closed||"function"!=typeof n.unsubscribe)return n;if(this.closed)return n.unsubscribe(),n;if(!(n instanceof ln)){const o=n;n=new ln,n._subscriptions=[o]}break;default:throw new Error("unrecognized teardown "+t+" added to Subscription.")}let{_parentOrParents:r}=n;if(null===r)n._parentOrParents=this;else if(r instanceof ln){if(r===this)return n;n._parentOrParents=[r,this]}else{if(-1!==r.indexOf(this))return n;r.push(this)}const i=this._subscriptions;return null===i?this._subscriptions=[n]:i.push(n),n}remove(t){const n=this._subscriptions;if(n){const r=n.indexOf(t);-1!==r&&n.splice(r,1)}}}var e;function qa(e){return e.reduce((t,n)=>t.concat(n instanceof Yi?n.errors:n),[])}ln.EMPTY=((e=new ln).closed=!0,e);const Ki="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random();class ur extends ln{constructor(t,n,r){switch(super(),this.syncErrorValue=null,this.syncErrorThrown=!1,this.syncErrorThrowable=!1,this.isStopped=!1,arguments.length){case 0:this.destination=_r;break;case 1:if(!t){this.destination=_r;break}if("object"==typeof t){t instanceof ur?(this.syncErrorThrowable=t.syncErrorThrowable,this.destination=t,t.add(this)):(this.syncErrorThrowable=!0,this.destination=new Qi(this,t));break}default:this.syncErrorThrowable=!0,this.destination=new Qi(this,t,n,r)}}[Ki](){return this}static create(t,n,r){const i=new ur(t,n,r);return i.syncErrorThrowable=!1,i}next(t){this.isStopped||this._next(t)}error(t){this.isStopped||(this.isStopped=!0,this._error(t))}complete(){this.isStopped||(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe())}_next(t){this.destination.next(t)}_error(t){this.destination.error(t),this.unsubscribe()}_complete(){this.destination.complete(),this.unsubscribe()}_unsubscribeAndRecycle(){const{_parentOrParents:t}=this;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=t,this}}class Qi extends ur{constructor(t,n,r,i){super(),this._parentSubscriber=t;let o,s=this;Vn(n)?o=n:n&&(o=n.next,r=n.error,i=n.complete,n!==_r&&(s=Object.create(n),Vn(s.unsubscribe)&&this.add(s.unsubscribe.bind(s)),s.unsubscribe=this.unsubscribe.bind(this))),this._context=s,this._next=o,this._error=r,this._complete=i}next(t){if(!this.isStopped&&this._next){const{_parentSubscriber:n}=this;ar.useDeprecatedSynchronousErrorHandling&&n.syncErrorThrowable?this.__tryOrSetError(n,this._next,t)&&this.unsubscribe():this.__tryOrUnsub(this._next,t)}}error(t){if(!this.isStopped){const{_parentSubscriber:n}=this,{useDeprecatedSynchronousErrorHandling:r}=ar;if(this._error)r&&n.syncErrorThrowable?(this.__tryOrSetError(n,this._error,t),this.unsubscribe()):(this.__tryOrUnsub(this._error,t),this.unsubscribe());else if(n.syncErrorThrowable)r?(n.syncErrorValue=t,n.syncErrorThrown=!0):ui(t),this.unsubscribe();else{if(this.unsubscribe(),r)throw t;ui(t)}}}complete(){if(!this.isStopped){const{_parentSubscriber:t}=this;if(this._complete){const n=()=>this._complete.call(this._context);ar.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?(this.__tryOrSetError(t,n),this.unsubscribe()):(this.__tryOrUnsub(n),this.unsubscribe())}else this.unsubscribe()}}__tryOrUnsub(t,n){try{t.call(this._context,n)}catch(r){if(this.unsubscribe(),ar.useDeprecatedSynchronousErrorHandling)throw r;ui(r)}}__tryOrSetError(t,n,r){if(!ar.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{n.call(this._context,r)}catch(i){return ar.useDeprecatedSynchronousErrorHandling?(t.syncErrorValue=i,t.syncErrorThrown=!0,!0):(ui(i),!0)}return!1}_unsubscribe(){const{_parentSubscriber:t}=this;this._context=null,this._parentSubscriber=null,t.unsubscribe()}}const Zi="function"==typeof Symbol&&Symbol.observable||"@@observable";function nt(e){return e}let Yr=(()=>{class e{constructor(n){this._isScalar=!1,n&&(this._subscribe=n)}lift(n){const r=new e;return r.source=this,r.operator=n,r}subscribe(n,r,i){const{operator:o}=this,s=function Vc(e,t,n){if(e){if(e instanceof ur)return e;if(e[Ki])return e[Ki]()}return e||t||n?new ur(e,t,n):new ur(_r)}(n,r,i);if(s.add(o?o.call(s,this.source):this.source||ar.useDeprecatedSynchronousErrorHandling&&!s.syncErrorThrowable?this._subscribe(s):this._trySubscribe(s)),ar.useDeprecatedSynchronousErrorHandling&&s.syncErrorThrowable&&(s.syncErrorThrowable=!1,s.syncErrorThrown))throw s.syncErrorValue;return s}_trySubscribe(n){try{return this._subscribe(n)}catch(r){ar.useDeprecatedSynchronousErrorHandling&&(n.syncErrorThrown=!0,n.syncErrorValue=r),function Wa(e){for(;e;){const{closed:t,destination:n,isStopped:r}=e;if(t||r)return!1;e=n&&n instanceof ur?n:null}return!0}(n)?n.error(r):console.warn(r)}}forEach(n,r){return new(r=We(r))((i,o)=>{let s;s=this.subscribe(a=>{try{n(a)}catch(u){o(u),s&&s.unsubscribe()}},o,i)})}_subscribe(n){const{source:r}=this;return r&&r.subscribe(n)}[Zi](){return this}pipe(...n){return 0===n.length?this:function Xi(e){return 0===e.length?nt:1===e.length?e[0]:function(n){return e.reduce((r,i)=>i(r),n)}}(n)(this)}toPromise(n){return new(n=We(n))((r,i)=>{let o;this.subscribe(s=>o=s,s=>i(s),()=>r(o))})}}return e.create=t=>new e(t),e})();function We(e){if(e||(e=ar.Promise||Promise),!e)throw new Error("no Promise impl found");return e}const Ji=(()=>{function e(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return e.prototype=Object.create(Error.prototype),e})();class Ka extends ln{constructor(t,n){super(),this.subject=t,this.subscriber=n,this.closed=!1}unsubscribe(){if(this.closed)return;this.closed=!0;const t=this.subject,n=t.observers;if(this.subject=null,!n||0===n.length||t.isStopped||t.closed)return;const r=n.indexOf(this.subscriber);-1!==r&&n.splice(r,1)}}class kd extends ur{constructor(t){super(t),this.destination=t}}let eo=(()=>{class e extends Yr{constructor(){super(),this.observers=[],this.closed=!1,this.isStopped=!1,this.hasError=!1,this.thrownError=null}[Ki](){return new kd(this)}lift(n){const r=new Od(this,this);return r.operator=n,r}next(n){if(this.closed)throw new Ji;if(!this.isStopped){const{observers:r}=this,i=r.length,o=r.slice();for(let s=0;s<i;s++)o[s].next(n)}}error(n){if(this.closed)throw new Ji;this.hasError=!0,this.thrownError=n,this.isStopped=!0;const{observers:r}=this,i=r.length,o=r.slice();for(let s=0;s<i;s++)o[s].error(n);this.observers.length=0}complete(){if(this.closed)throw new Ji;this.isStopped=!0;const{observers:n}=this,r=n.length,i=n.slice();for(let o=0;o<r;o++)i[o].complete();this.observers.length=0}unsubscribe(){this.isStopped=!0,this.closed=!0,this.observers=null}_trySubscribe(n){if(this.closed)throw new Ji;return super._trySubscribe(n)}_subscribe(n){if(this.closed)throw new Ji;return this.hasError?(n.error(this.thrownError),ln.EMPTY):this.isStopped?(n.complete(),ln.EMPTY):(this.observers.push(n),new Ka(this,n))}asObservable(){const n=new Yr;return n.source=this,n}}return e.create=(t,n)=>new Od(t,n),e})();class Od extends eo{constructor(t,n){super(),this.destination=t,this.source=n}next(t){const{destination:n}=this;n&&n.next&&n.next(t)}error(t){const{destination:n}=this;n&&n.error&&this.destination.error(t)}complete(){const{destination:t}=this;t&&t.complete&&this.destination.complete()}_subscribe(t){const{source:n}=this;return n?this.source.subscribe(t):ln.EMPTY}}class Ym extends eo{constructor(t){super(),this._value=t}get value(){return this.getValue()}_subscribe(t){const n=super._subscribe(t);return n&&!n.closed&&t.next(this._value),n}getValue(){if(this.hasError)throw this.thrownError;if(this.closed)throw new Ji;return this._value}next(t){super.next(this._value=t)}}class os{constructor(t,n){this.project=t,this.thisArg=n}call(t,n){return n.subscribe(new Hc(t,this.project,this.thisArg))}}class Hc extends ur{constructor(t,n,r){super(t),this.project=n,this.count=0,this.thisArg=r||this}_next(t){let n;try{n=this.project.call(this.thisArg,t,this.count++)}catch(r){return void this.destination.error(r)}this.destination.next(n)}}class Ae extends Error{constructor(t,n){super(function ss(e,t){return`NG0${Math.abs(e)}${t?": "+t:""}`}(t,n)),this.code=t}}function cr(e){return{toString:e}.toString()}const Gt=globalThis;function Ot(e){for(let t in e)if(e[t]===Ot)return t;throw Error("Could not find renamed property on target object.")}function mn(e){if("string"==typeof e)return e;if(Array.isArray(e))return"["+e.map(mn).join(", ")+"]";if(null==e)return""+e;if(e.overriddenName)return`${e.overriddenName}`;if(e.name)return`${e.name}`;const t=e.toString();if(null==t)return""+t;const n=t.indexOf("\n");return-1===n?t:t.substring(0,n)}function cs(e,t){return null==e||""===e?null===t?"":t:null==t||""===t?e:e+" "+t}const zc=Ot({__forward_ref__:Ot});function Si(e){return e.__forward_ref__=Si,e.toString=function(){return mn(this())},e}function ft(e){return function Po(e){return"function"==typeof e&&e.hasOwnProperty(zc)&&e.__forward_ref__===Si}(e)?e():e}function At(e){return{token:e.token,providedIn:e.providedIn||null,factory:e.factory,value:void 0}}function Fo(e){return{providers:e.providers||[],imports:e.imports||[]}}function Jn(e){return Us(e,zs)||Us(e,Kr)}function Us(e,t){return e.hasOwnProperty(t)?e[t]:null}function $s(e){return e&&(e.hasOwnProperty(An)||e.hasOwnProperty(Gs))?e[An]:null}const zs=Ot({\u0275prov:Ot}),An=Ot({\u0275inj:Ot}),Kr=Ot({ngInjectableDef:Ot}),Gs=Ot({ngInjectorDef:Ot});class ut{constructor(t,n){this._desc=t,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,"number"==typeof n?this.__NG_ELEMENT_ID__=n:void 0!==n&&(this.\u0275prov=At({token:this,providedIn:n.providedIn||"root",factory:n.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}}function Wc(e){return e&&!!e.\u0275providers}const Ni=Ot({\u0275cmp:Ot}),Yc=Ot({\u0275dir:Ot}),Kc=Ot({\u0275pipe:Ot}),Ws=Ot({\u0275mod:Ot}),Hr=Ot({\u0275fac:Ot}),Lo=Ot({__NG_ELEMENT_ID__:Ot}),Hd=Ot({__NG_ENV_ID__:Ot});function wt(e){return"string"==typeof e?e:null==e?"":String(e)}function ls(e,t){throw new Ae(-201,!1)}var Ft=function(e){return e[e.Default=0]="Default",e[e.Host=1]="Host",e[e.Self=2]="Self",e[e.SkipSelf=4]="SkipSelf",e[e.Optional=8]="Optional",e}(Ft||{});let Xc;function Ys(){return Xc}function er(e){const t=Xc;return Xc=e,t}function iu(e,t,n){const r=Jn(e);return r&&"root"==r.providedIn?void 0===r.value?r.value=r.factory():r.value:n&Ft.Optional?null:void 0!==t?t:void ls()}const kn={},Bo="__NG_DI_FLAG__",ro="ngTempTokenPath",ou=/\n/gm,Jc="__source";let Ai;function fr(e){const t=Ai;return Ai=e,t}function tl(e,t=Ft.Default){if(void 0===Ai)throw new Ae(-203,!1);return null===Ai?iu(e,void 0,t):Ai.get(e,t&Ft.Optional?null:void 0,t)}function Rt(e,t=Ft.Default){return(Ys()||tl)(ft(e),t)}function _t(e,t=Ft.Default){return Rt(e,Qs(t))}function Qs(e){return typeof e>"u"||"number"==typeof e?e:(e.optional&&8)|(e.host&&1)|(e.self&&2)|(e.skipSelf&&4)}function nl(e){const t=[];for(let n=0;n<e.length;n++){const r=ft(e[n]);if(Array.isArray(r)){if(0===r.length)throw new Ae(900,!1);let i,o=Ft.Default;for(let s=0;s<r.length;s++){const a=r[s],u=su(a);"number"==typeof u?-1===u?i=a.token:o|=u:i=a}t.push(Rt(i,o))}else t.push(Rt(r))}return t}function su(e){return e[Bo]}function io(e,t){return e.hasOwnProperty(Hr)?e[Hr]:null}function oo(e,t){e.forEach(n=>Array.isArray(n)?oo(n,t):t(n))}function al(e,t,n){t>=e.length?e.push(n):e.splice(t,0,n)}function Zs(e,t){return t>=e.length-1?e.pop():e.splice(t,1)[0]}function Ht(e,t,n){let r=Gn(e,t);return r>=0?e[1|r]=n:(r=~r,function Xs(e,t,n,r){let i=e.length;if(i==t)e.push(n,r);else if(1===i)e.push(r,e[0]),e[0]=n;else{for(i--,e.push(e[i-1],e[i]);i>t;)e[i]=e[i-2],i--;e[t]=n,e[t+1]=r}}(e,r,t,n)),r}function fs(e,t){const n=Gn(e,t);if(n>=0)return e[1|n]}function Gn(e,t){return function uu(e,t,n){let r=0,i=e.length>>n;for(;i!==r;){const o=r+(i-r>>1),s=e[o<<n];if(t===s)return o<<n;s>t?i=o:r=o+1}return~(i<<n)}(e,t,1)}const Qr={},St=[],ao=new ut(""),Vo=new ut("",-1),li=new ut("");class Js{get(t,n=kn){if(n===kn){const r=new Error(`NullInjectorError: No provider for ${mn(t)}!`);throw r.name="NullInjectorError",r}return n}}var f=function(e){return e[e.OnPush=0]="OnPush",e[e.Default=1]="Default",e}(f||{}),p=function(e){return e[e.Emulated=0]="Emulated",e[e.None=2]="None",e[e.ShadowDom=3]="ShadowDom",e}(p||{}),m=function(e){return e[e.None=0]="None",e[e.SignalBased=1]="SignalBased",e[e.HasDecoratorInputTransform=2]="HasDecoratorInputTransform",e}(m||{});function w(e,t,n){let r=e.length;for(;;){const i=e.indexOf(t,n);if(-1===i)return i;if(0===i||e.charCodeAt(i-1)<=32){const o=t.length;if(i+o===r||e.charCodeAt(i+o)<=32)return i}n=i+1}}function D(e,t,n){let r=0;for(;r<n.length;){const i=n[r];if("number"==typeof i){if(0!==i)break;r++;const o=n[r++],s=n[r++],a=n[r++];e.setAttribute(t,s,a,o)}else{const o=i,s=n[++r];N(o)?e.setProperty(t,o,s):e.setAttribute(t,o,s),r++}}return r}function M(e){return 3===e||4===e||6===e}function N(e){return 64===e.charCodeAt(0)}function O(e,t){if(null!==t&&0!==t.length)if(null===e||0===e.length)e=t.slice();else{let n=-1;for(let r=0;r<t.length;r++){const i=t[r];"number"==typeof i?n=i:0===n||H(e,n,i,null,-1===n||2===n?t[++r]:null)}}return e}function H(e,t,n,r,i){let o=0,s=e.length;if(-1===t)s=-1;else for(;o<e.length;){const a=e[o++];if("number"==typeof a){if(a===t){s=-1;break}if(a>t){s=o-1;break}}}for(;o<e.length;){const a=e[o];if("number"==typeof a)break;if(a===n){if(null===r)return void(null!==i&&(e[o+1]=i));if(r===e[o+1])return void(e[o+2]=i)}o++,null!==r&&o++,null!==i&&o++}-1!==s&&(e.splice(s,0,t),o=s+1),e.splice(o++,0,n),null!==r&&e.splice(o++,0,r),null!==i&&e.splice(o++,0,i)}const W="ng-template";function Q(e,t,n,r){let i=0;if(r){for(;i<t.length&&"string"==typeof t[i];i+=2)if("class"===t[i]&&-1!==w(t[i+1].toLowerCase(),n,0))return!0}else if(F(e))return!1;if(i=t.indexOf(1,i),i>-1){let o;for(;++i<t.length&&"string"==typeof(o=t[i]);)if(o.toLowerCase()===n)return!0}return!1}function F(e){return 4===e.type&&e.value!==W}function ee(e,t,n){return t===(4!==e.type||n?e.value:W)}function U(e,t,n){let r=4;const i=e.attrs,o=null!==i?function ue(e){for(let t=0;t<e.length;t++)if(M(e[t]))return t;return e.length}(i):0;let s=!1;for(let a=0;a<t.length;a++){const u=t[a];if("number"!=typeof u){if(!s)if(4&r){if(r=2|1&r,""!==u&&!ee(e,u,n)||""===u&&1===t.length){if(Y(r))return!1;s=!0}}else if(8&r){if(null===i||!Q(e,i,u,n)){if(Y(r))return!1;s=!0}}else{const c=t[++a],l=Z(u,i,F(e),n);if(-1===l){if(Y(r))return!1;s=!0;continue}if(""!==c){let d;if(d=l>o?"":i[l+1].toLowerCase(),2&r&&c!==d){if(Y(r))return!1;s=!0}}}}else{if(!s&&!Y(r)&&!Y(u))return!1;if(s&&Y(u))continue;s=!1,r=u|1&r}}return Y(r)||s}function Y(e){return!(1&e)}function Z(e,t,n,r){if(null===t)return-1;let i=0;if(r||!n){let o=!1;for(;i<t.length;){const s=t[i];if(s===e)return i;if(3===s||6===s)o=!0;else{if(1===s||2===s){let a=t[++i];for(;"string"==typeof a;)a=t[++i];continue}if(4===s)break;if(0===s){i+=4;continue}}i+=o?1:2}return-1}return function ce(e,t){let n=e.indexOf(4);if(n>-1)for(n++;n<e.length;){const r=e[n];if("number"==typeof r)return-1;if(r===t)return n;n++}return-1}(t,e)}function K(e,t,n=!1){for(let r=0;r<t.length;r++)if(U(e,t[r],n))return!0;return!1}function ke(e,t){return e?":not("+t.trim()+")":t}function Ve(e){let t=e[0],n=1,r=2,i="",o=!1;for(;n<e.length;){let s=e[n];if("string"==typeof s)if(2&r){const a=e[++n];i+="["+s+(a.length>0?'="'+a+'"':"")+"]"}else 8&r?i+="."+s:4&r&&(i+=" "+s);else""!==i&&!Y(s)&&(t+=ke(o,i),i=""),r=s,o=o||!Y(r);n++}return""!==i&&(t+=ke(o,i)),t}function Ge(e){return cr(()=>{const t=uo(e),n={...t,decls:e.decls,vars:e.vars,template:e.template,consts:e.consts||null,ngContentSelectors:e.ngContentSelectors,onPush:e.changeDetection===f.OnPush,directiveDefs:null,pipeDefs:null,dependencies:t.standalone&&e.dependencies||null,getStandaloneInjector:null,signals:e.signals??!1,data:e.data||{},encapsulation:e.encapsulation||p.Emulated,styles:e.styles||St,_:null,schemas:e.schemas||null,tView:null,id:""};cu(n);const r=e.dependencies;return n.directiveDefs=Qd(r,!1),n.pipeDefs=Qd(r,!0),n.id=function SP(e){let t=0;const n=[e.selectors,e.ngContentSelectors,e.hostVars,e.hostAttrs,e.consts,e.vars,e.decls,e.encapsulation,e.standalone,e.signals,e.exportAs,JSON.stringify(e.inputs),JSON.stringify(e.outputs),Object.getOwnPropertyNames(e.type.prototype),!!e.contentQueries,!!e.viewQuery].join("|");for(const i of n)t=Math.imul(31,t)+i.charCodeAt(0)|0;return t+=2147483648,"c"+t}(n),n})}function je(e){return He(e)||Vt(e)}function Ke(e){return null!==e}function gt(e){return cr(()=>({type:e.type,bootstrap:e.bootstrap||St,declarations:e.declarations||St,imports:e.imports||St,exports:e.exports||St,transitiveCompileScopes:null,schemas:e.schemas||null,id:e.id||null}))}function Tt(e,t){if(null==e)return Qr;const n={};for(const r in e)if(e.hasOwnProperty(r)){const i=e[r];let o,s,a=m.None;Array.isArray(i)?(a=i[0],o=i[1],s=i[2]??o):(o=i,s=i),t?(n[o]=a!==m.None?[r,a]:r,t[o]=s):n[o]=r}return n}function dt(e){return cr(()=>{const t=uo(e);return cu(t),t})}function He(e){return e[Ni]||null}function Vt(e){return e[Yc]||null}function qt(e){return e[Kc]||null}function uo(e){const t={};return{type:e.type,providersResolver:null,factory:null,hostBindings:e.hostBindings||null,hostVars:e.hostVars||0,hostAttrs:e.hostAttrs||null,contentQueries:e.contentQueries||null,declaredInputs:t,inputTransforms:null,inputConfig:e.inputs||Qr,exportAs:e.exportAs||null,standalone:!0===e.standalone,signals:!0===e.signals,selectors:e.selectors||St,viewQuery:e.viewQuery||null,features:e.features||null,setInput:null,findHostDirectiveDefs:null,hostDirectives:null,inputs:Tt(e.inputs,t),outputs:Tt(e.outputs),debugInfo:null}}function cu(e){e.features?.forEach(t=>t(e))}function Qd(e,t){if(!e)return null;const n=t?qt:je;return()=>("function"==typeof e?e():e).map(r=>n(r)).filter(Ke)}function TP(...e){return{\u0275providers:n0(0,e),\u0275fromNgModule:!0}}function n0(e,...t){const n=[],r=new Set;let i;const o=s=>{n.push(s)};return oo(t,s=>{const a=s;Xd(a,o,[],r)&&(i||=[],i.push(a))}),void 0!==i&&P_(i,o),n}function P_(e,t){for(let n=0;n<e.length;n++){const{ngModule:r,providers:i}=e[n];r0(i,o=>{t(o,r)})}}function Xd(e,t,n,r){if(!(e=ft(e)))return!1;let i=null,o=$s(e);const s=!o&&He(e);if(o||s){if(s&&!s.standalone)return!1;i=e}else{const u=e.ngModule;if(o=$s(u),!o)return!1;i=u}const a=r.has(i);if(s){if(a)return!1;if(r.add(i),s.dependencies){const u="function"==typeof s.dependencies?s.dependencies():s.dependencies;for(const c of u)Xd(c,t,n,r)}}else{if(!o)return!1;{if(null!=o.imports&&!a){let c;r.add(i);try{oo(o.imports,l=>{Xd(l,t,n,r)&&(c||=[],c.push(l))})}finally{}void 0!==c&&P_(c,t)}if(!a){const c=io(i)||(()=>new i);t({provide:i,useFactory:c,deps:St},i),t({provide:li,useValue:i,multi:!0},i),t({provide:ao,useValue:()=>Rt(i),multi:!0},i)}const u=o.providers;if(null!=u&&!a){const c=e;r0(u,l=>{t(l,c)})}}}return i!==e&&void 0!==e.providers}function r0(e,t){for(let n of e)Wc(n)&&(n=n.\u0275providers),Array.isArray(n)?r0(n,t):t(n)}const NP=Ot({provide:String,useValue:Ot});function o0(e){return null!==e&&"object"==typeof e&&NP in e}function ea(e){return"function"==typeof e}const s0=new ut(""),Jd={},kP={};let a0;function eh(){return void 0===a0&&(a0=new Js),a0}class co{}class lu extends co{get destroyed(){return this._destroyed}constructor(t,n,r,i){super(),this.parent=n,this.source=r,this.scopes=i,this.records=new Map,this._ngOnDestroyHooks=new Set,this._onDestroyHooks=[],this._destroyed=!1,c0(t,s=>this.processProvider(s)),this.records.set(Vo,fu(void 0,this)),i.has("environment")&&this.records.set(co,fu(void 0,this));const o=this.records.get(s0);null!=o&&"string"==typeof o.value&&this.scopes.add(o.value),this.injectorDefTypes=new Set(this.get(li,St,Ft.Self))}destroy(){this.assertNotDestroyed(),this._destroyed=!0;const t=x(null);try{for(const r of this._ngOnDestroyHooks)r.ngOnDestroy();const n=this._onDestroyHooks;this._onDestroyHooks=[];for(const r of n)r()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),x(t)}}onDestroy(t){return this.assertNotDestroyed(),this._onDestroyHooks.push(t),()=>this.removeOnDestroy(t)}runInContext(t){this.assertNotDestroyed();const n=fr(this),r=er(void 0);try{return t()}finally{fr(n),er(r)}}get(t,n=kn,r=Ft.Default){if(this.assertNotDestroyed(),t.hasOwnProperty(Hd))return t[Hd](this);r=Qs(r);const o=fr(this),s=er(void 0);try{if(!(r&Ft.SkipSelf)){let u=this.records.get(t);if(void 0===u){const c=function LP(e){return"function"==typeof e||"object"==typeof e&&e instanceof ut}(t)&&Jn(t);u=c&&this.injectableDefInScope(c)?fu(u0(t),Jd):null,this.records.set(t,u)}if(null!=u)return this.hydrate(t,u)}return(r&Ft.Self?eh():this.parent).get(t,n=r&Ft.Optional&&n===kn?null:n)}catch(a){if("NullInjectorError"===a.name){if((a[ro]=a[ro]||[]).unshift(mn(t)),o)throw a;return function e0(e,t,n,r){const i=e[ro];throw t[Jc]&&i.unshift(t[Jc]),e.message=function rl(e,t,n,r=null){e=e&&"\n"===e.charAt(0)&&"\u0275"==e.charAt(1)?e.slice(2):e;let i=mn(t);if(Array.isArray(t))i=t.map(mn).join(" -> ");else if("object"==typeof t){let o=[];for(let s in t)if(t.hasOwnProperty(s)){let a=t[s];o.push(s+":"+("string"==typeof a?JSON.stringify(a):mn(a)))}i=`{${o.join(", ")}}`}return`${n}${r?"("+r+")":""}[${i}]: ${e.replace(ou,"\n ")}`}("\n"+e.message,i,n,r),e.ngTokenPath=i,e[ro]=null,e}(a,t,"R3InjectorError",this.source)}throw a}finally{er(s),fr(o)}}resolveInjectorInitializers(){const t=x(null),n=fr(this),r=er(void 0);try{const o=this.get(ao,St,Ft.Self);for(const s of o)s()}finally{fr(n),er(r),x(t)}}toString(){const t=[],n=this.records;for(const r of n.keys())t.push(mn(r));return`R3Injector[${t.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new Ae(205,!1)}processProvider(t){let n=ea(t=ft(t))?t:ft(t&&t.provide);const r=function RP(e){return o0(e)?fu(void 0,e.useValue):fu(function B_(e,t,n){let r;if(ea(e)){const i=ft(e);return io(i)||u0(i)}if(o0(e))r=()=>ft(e.useValue);else if(function L_(e){return!(!e||!e.useFactory)}(e))r=()=>e.useFactory(...nl(e.deps||[]));else if(function F_(e){return!(!e||!e.useExisting)}(e))r=()=>Rt(ft(e.useExisting));else{const i=ft(e&&(e.useClass||e.provide));if(!function PP(e){return!!e.deps}(e))return io(i)||u0(i);r=()=>new i(...nl(e.deps))}return r}(e),Jd)}(t);if(!ea(t)&&!0===t.multi){let i=this.records.get(n);i||(i=fu(void 0,Jd,!0),i.factory=()=>nl(i.multi),this.records.set(n,i)),n=t,i.multi.push(t)}this.records.set(n,r)}hydrate(t,n){const r=x(null);try{return n.value===Jd&&(n.value=kP,n.value=n.factory()),"object"==typeof n.value&&n.value&&function FP(e){return null!==e&&"object"==typeof e&&"function"==typeof e.ngOnDestroy}(n.value)&&this._ngOnDestroyHooks.add(n.value),n.value}finally{x(r)}}injectableDefInScope(t){if(!t.providedIn)return!1;const n=ft(t.providedIn);return"string"==typeof n?"any"===n||this.scopes.has(n):this.injectorDefTypes.has(n)}removeOnDestroy(t){const n=this._onDestroyHooks.indexOf(t);-1!==n&&this._onDestroyHooks.splice(n,1)}}function u0(e){const t=Jn(e),n=null!==t?t.factory:io(e);if(null!==n)return n;if(e instanceof ut)throw new Ae(204,!1);if(e instanceof Function)return function OP(e){if(e.length>0)throw new Ae(204,!1);const n=function no(e){return e&&(e[zs]||e[Kr])||null}(e);return null!==n?()=>n.factory(e):()=>new e}(e);throw new Ae(204,!1)}function fu(e,t,n=!1){return{factory:e,value:t,multi:n?[]:void 0}}function c0(e,t){for(const n of e)Array.isArray(n)?c0(n,t):n&&Wc(n)?c0(n.\u0275providers,t):t(n)}const En=0,Fe=1,st=2,Pn=3,ki=4,dr=5,Zr=6,hu=7,vn=8,Hn=9,Oi=10,vt=11,ll=12,U_=13,pu=14,xn=15,fl=16,gu=17,Ho=18,dl=19,$_=20,ds=21,rh=22,ta=23,Et=25,f0=1,lo=7,mu=9,Fn=10;var d0=function(e){return e[e.None=0]="None",e[e.HasTransplantedViews=2]="HasTransplantedViews",e}(d0||{});function hr(e){return Array.isArray(e)&&"object"==typeof e[f0]}function pr(e){return Array.isArray(e)&&!0===e[f0]}function h0(e){return!!(4&e.flags)}function na(e){return e.componentOffset>-1}function oh(e){return!(1&~e.flags)}function Ri(e){return!!e.template}function p0(e){return!!(512&e[st])}class QP{constructor(t,n,r){this.previousValue=t,this.currentValue=n,this.firstChange=r}isFirstChange(){return this.firstChange}}function W_(e,t,n,r){null!==t?t.applyValueToInputSignal(t,r):e[n]=r}function Y_(e){return e.type.prototype.ngOnChanges&&(e.setInput=XP),ZP}function ZP(){const e=Q_(this),t=e?.current;if(t){const n=e.previous;if(n===Qr)e.previous=t;else for(let r in t)n[r]=t[r];e.current=null,this.ngOnChanges(t)}}function XP(e,t,n,r,i){const o=this.declaredInputs[r],s=Q_(e)||function JP(e,t){return e[K_]=t}(e,{previous:Qr,current:null}),a=s.current||(s.current={}),u=s.previous,c=u[o];a[o]=new QP(c&&c.currentValue,n,u===Qr),W_(e,t,i,n)}const K_="__ngSimpleChanges__";function Q_(e){return e[K_]||null}const fo=function(e,t,n){};let J_=!1;function an(e){for(;Array.isArray(e);)e=e[En];return e}function Er(e,t){return an(t[e.index])}function gl(e,t){return e.data[t]}function Xr(e,t){const n=t[e];return hr(n)?n:n[En]}function b0(e){return!(128&~e[st])}function ho(e,t){return null==t?null:e[t]}function eD(e){e[gu]=0}function o3(e){1024&e[st]||(e[st]|=1024,b0(e)&&ml(e))}function w0(e){return!!(9216&e[st]||e[ta]?.dirty)}function _0(e){e[Oi].changeDetectionScheduler?.notify(1),w0(e)?ml(e):64&e[st]&&(function t3(){return J_}()?(e[st]|=1024,ml(e)):e[Oi].changeDetectionScheduler?.notify())}function ml(e){e[Oi].changeDetectionScheduler?.notify();let t=ra(e);for(;null!==t&&!(8192&t[st])&&(t[st]|=8192,b0(t));)t=ra(t)}function ah(e,t){if(!(256&~e[st]))throw new Ae(911,!1);null===e[ds]&&(e[ds]=[]),e[ds].push(t)}function ra(e){const t=e[Pn];return pr(t)?t[Pn]:t}const bt={lFrame:lD(null),bindingsEnabled:!0,skipHydrationRootTNode:null};function rD(){return bt.bindingsEnabled}function me(){return bt.lFrame.lView}function Bt(){return bt.lFrame.tView}function E0(e){return bt.lFrame.contextLView=e,e[vn]}function C0(e){return bt.lFrame.contextLView=null,e}function nn(){let e=iD();for(;null!==e&&64===e.type;)e=e.parent;return e}function iD(){return bt.lFrame.currentTNode}function po(e,t){const n=bt.lFrame;n.currentTNode=e,n.isParent=t}function x0(){return bt.lFrame.isParent}function Pi(){return bt.lFrame.bindingIndex++}function m3(e,t){const n=bt.lFrame;n.bindingIndex=n.bindingRootIndex=e,I0(t)}function I0(e){bt.lFrame.currentDirectiveIndex=e}function T0(){return bt.lFrame.currentQueryIndex}function uh(e){bt.lFrame.currentQueryIndex=e}function v3(e){const t=e[Fe];return 2===t.type?t.declTNode:1===t.type?e[dr]:null}function uD(e,t,n){if(n&Ft.SkipSelf){let i=t,o=e;for(;!(i=i.parent,null!==i||n&Ft.Host||(i=v3(o),null===i||(o=o[pu],10&i.type))););if(null===i)return!1;t=i,e=o}const r=bt.lFrame=cD();return r.currentTNode=t,r.lView=e,!0}function N0(e){const t=cD(),n=e[Fe];bt.lFrame=t,t.currentTNode=n.firstChild,t.lView=e,t.tView=n,t.contextLView=e,t.bindingIndex=n.bindingStartIndex,t.inI18n=!1}function cD(){const e=bt.lFrame,t=null===e?null:e.child;return null===t?lD(e):t}function lD(e){const t={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:e,child:null,inI18n:!1};return null!==e&&(e.child=t),t}function fD(){const e=bt.lFrame;return bt.lFrame=e.parent,e.currentTNode=null,e.lView=null,e}const dD=fD;function A0(){const e=fD();e.isParent=!0,e.tView=null,e.selectedIndex=-1,e.contextLView=null,e.elementDepthCount=0,e.currentDirectiveIndex=-1,e.currentNamespace=null,e.bindingRootIndex=-1,e.bindingIndex=-1,e.currentQueryIndex=0}function gr(){return bt.lFrame.selectedIndex}function ia(e){bt.lFrame.selectedIndex=e}function bn(){const e=bt.lFrame;return gl(e.tView,e.selectedIndex)}let gD=!0;function vl(){return gD}function go(e){gD=e}function ch(e,t){for(let n=t.directiveStart,r=t.directiveEnd;n<r;n++){const o=e.data[n].type.prototype,{ngAfterContentInit:s,ngAfterContentChecked:a,ngAfterViewInit:u,ngAfterViewChecked:c,ngOnDestroy:l}=o;s&&(e.contentHooks??=[]).push(-n,s),a&&((e.contentHooks??=[]).push(n,a),(e.contentCheckHooks??=[]).push(n,a)),u&&(e.viewHooks??=[]).push(-n,u),c&&((e.viewHooks??=[]).push(n,c),(e.viewCheckHooks??=[]).push(n,c)),null!=l&&(e.destroyHooks??=[]).push(n,l)}}function lh(e,t,n){mD(e,t,3,n)}function fh(e,t,n,r){(3&e[st])===n&&mD(e,t,n,r)}function k0(e,t){let n=e[st];(3&n)===t&&(n&=16383,n+=1,e[st]=n)}function mD(e,t,n,r){const o=r??-1,s=t.length-1;let a=0;for(let u=void 0!==r?65535&e[gu]:0;u<s;u++)if("number"==typeof t[u+1]){if(a=t[u],null!=r&&a>=r)break}else t[u]<0&&(e[gu]+=65536),(a<o||-1==o)&&(C3(e,n,t,u),e[gu]=(4294901760&e[gu])+u+2),u++}function yD(e,t){fo(4,e,t);const n=x(null);try{t.call(e)}finally{x(n),fo(5,e,t)}}function C3(e,t,n,r){const i=n[r]<0,o=n[r+1],a=e[i?-n[r]:n[r]];i?e[st]>>14<e[gu]>>16&&(3&e[st])===t&&(e[st]+=16384,yD(a,o)):yD(a,o)}const bu=-1;class bl{constructor(t,n,r){this.factory=t,this.resolving=!1,this.canSeeViewProviders=n,this.injectImpl=r}}function R0(e){return e!==bu}function wl(e){return 32767&e}function _l(e,t){let n=function T3(e){return e>>16}(e),r=t;for(;n>0;)r=r[pu],n--;return r}let P0=!0;function dh(e){const t=P0;return P0=e,t}const vD=255,bD=5;let N3=0;const mo={};function hh(e,t){const n=wD(e,t);if(-1!==n)return n;const r=t[Fe];r.firstCreatePass&&(e.injectorIndex=t.length,F0(r.data,e),F0(t,null),F0(r.blueprint,null));const i=ph(e,t),o=e.injectorIndex;if(R0(i)){const s=wl(i),a=_l(i,t),u=a[Fe].data;for(let c=0;c<8;c++)t[o+c]=a[s+c]|u[s+c]}return t[o+8]=i,o}function F0(e,t){e.push(0,0,0,0,0,0,0,0,t)}function wD(e,t){return-1===e.injectorIndex||e.parent&&e.parent.injectorIndex===e.injectorIndex||null===t[e.injectorIndex+8]?-1:e.injectorIndex}function ph(e,t){if(e.parent&&-1!==e.parent.injectorIndex)return e.parent.injectorIndex;let n=0,r=null,i=t;for(;null!==i;){if(r=ID(i),null===r)return bu;if(n++,i=i[pu],-1!==r.injectorIndex)return r.injectorIndex|n<<16}return bu}function L0(e,t,n){!function A3(e,t,n){let r;"string"==typeof n?r=n.charCodeAt(0)||0:n.hasOwnProperty(Lo)&&(r=n[Lo]),null==r&&(r=n[Lo]=N3++);const i=r&vD;t.data[e+(i>>bD)]|=1<<i}(e,t,n)}function _D(e,t,n){if(n&Ft.Optional||void 0!==e)return e;ls()}function DD(e,t,n,r){if(n&Ft.Optional&&void 0===r&&(r=null),!(n&(Ft.Self|Ft.Host))){const i=e[Hn],o=er(void 0);try{return i?i.get(t,r,n&Ft.Optional):iu(t,r,n&Ft.Optional)}finally{er(o)}}return _D(r,0,n)}function ED(e,t,n,r=Ft.Default,i){if(null!==e){if(2048&t[st]&&!(r&Ft.Self)){const s=function L3(e,t,n,r,i){let o=e,s=t;for(;null!==o&&null!==s&&2048&s[st]&&!(512&s[st]);){const a=CD(o,s,n,r|Ft.Self,mo);if(a!==mo)return a;let u=o.parent;if(!u){const c=s[$_];if(c){const l=c.get(n,mo,r);if(l!==mo)return l}u=ID(s),s=s[pu]}o=u}return i}(e,t,n,r,mo);if(s!==mo)return s}const o=CD(e,t,n,r,mo);if(o!==mo)return o}return DD(t,n,r,i)}function CD(e,t,n,r,i){const o=function R3(e){if("string"==typeof e)return e.charCodeAt(0)||0;const t=e.hasOwnProperty(Lo)?e[Lo]:void 0;return"number"==typeof t?t>=0?t&vD:P3:t}(n);if("function"==typeof o){if(!uD(t,e,r))return r&Ft.Host?_D(i,0,r):DD(t,n,r,i);try{let s;if(s=o(r),null!=s||r&Ft.Optional)return s;ls()}finally{dD()}}else if("number"==typeof o){let s=null,a=wD(e,t),u=bu,c=r&Ft.Host?t[xn][dr]:null;for((-1===a||r&Ft.SkipSelf)&&(u=-1===a?ph(e,t):t[a+8],u!==bu&&MD(r,!1)?(s=t[Fe],a=wl(u),t=_l(u,t)):a=-1);-1!==a;){const l=t[Fe];if(xD(o,a,l.data)){const d=O3(a,t,n,s,r,c);if(d!==mo)return d}u=t[a+8],u!==bu&&MD(r,t[Fe].data[a+8]===c)&&xD(o,a,t)?(s=l,a=wl(u),t=_l(u,t)):a=-1}}return i}function O3(e,t,n,r,i,o){const s=t[Fe],a=s.data[e+8],l=gh(a,s,n,null==r?na(a)&&P0:r!=s&&!!(3&a.type),i&Ft.Host&&o===a);return null!==l?oa(t,s,l,a):mo}function gh(e,t,n,r,i){const o=e.providerIndexes,s=t.data,a=1048575&o,u=e.directiveStart,l=o>>20,h=i?a+l:e.directiveEnd;for(let g=r?a:a+l;g<h;g++){const y=s[g];if(g<u&&n===y||g>=u&&y.type===n)return g}if(i){const g=s[u];if(g&&Ri(g)&&g.type===n)return u}return null}function oa(e,t,n,r){let i=e[n];const o=t.data;if(function x3(e){return e instanceof bl}(i)){const s=i;s.resolving&&function $d(e,t){throw t&&t.join(" > "),new Ae(-200,e)}(function Yt(e){return"function"==typeof e?e.name||e.toString():"object"==typeof e&&null!=e&&"function"==typeof e.type?e.type.name||e.type.toString():wt(e)}(o[n]));const a=dh(s.canSeeViewProviders);s.resolving=!0;const c=s.injectImpl?er(s.injectImpl):null;uD(e,r,Ft.Default);try{i=e[n]=s.factory(void 0,o,e,r),t.firstCreatePass&&n>=r.directiveStart&&function E3(e,t,n){const{ngOnChanges:r,ngOnInit:i,ngDoCheck:o}=t.type.prototype;if(r){const s=Y_(t);(n.preOrderHooks??=[]).push(e,s),(n.preOrderCheckHooks??=[]).push(e,s)}i&&(n.preOrderHooks??=[]).push(0-e,i),o&&((n.preOrderHooks??=[]).push(e,o),(n.preOrderCheckHooks??=[]).push(e,o))}(n,o[n],t)}finally{null!==c&&er(c),dh(a),s.resolving=!1,dD()}}return i}function xD(e,t,n){return!!(n[t+(e>>bD)]&1<<e)}function MD(e,t){return!(e&Ft.Self||e&Ft.Host&&t)}class Wn{constructor(t,n){this._tNode=t,this._lView=n}get(t,n,r){return ED(this._tNode,this._lView,t,Qs(r),n)}}function P3(){return new Wn(nn(),me())}function ID(e){const t=e[Fe],n=t.type;return 2===n?t.declTNode:1===n?e[dr]:null}function kD(e,t=null,n=null,r){const i=OD(e,t,n,r);return i.resolveInjectorInitializers(),i}function OD(e,t=null,n=null,r,i=new Set){const o=[n||St,TP(e)];return r=r||("object"==typeof e?void 0:mn(e)),new lu(o,t||eh(),r||null,i)}let di=(()=>{class e{static{this.THROW_IF_NOT_FOUND=kn}static{this.NULL=new Js}static create(n,r){if(Array.isArray(n))return kD({name:""},r,n,"");{const i=n.name??"";return kD({name:i},n.parent,n.providers,i)}}static{this.\u0275prov=At({token:e,providedIn:"any",factory:()=>Rt(Vo)})}static{this.__NG_ELEMENT_ID__=-1}}return e})();function V0(e){return e.ngOriginalError}class yo{constructor(){this._console=console}handleError(t){const n=this._findOriginalError(t);this._console.error("ERROR",t),n&&this._console.error("ORIGINAL ERROR",n)}_findOriginalError(t){let n=t&&V0(t);for(;n&&V0(n);)n=V0(n);return n||null}}const PD=new ut("",{providedIn:"root",factory:()=>_t(yo).handleError.bind(void 0)});let Du=(()=>{class e{static{this.__NG_ELEMENT_ID__=q3}static{this.__NG_ENV_ID__=n=>n}}return e})();class G3 extends Du{constructor(t){super(),this._lView=t}onDestroy(t){return ah(this._lView,t),()=>function D0(e,t){if(null===e[ds])return;const n=e[ds].indexOf(t);-1!==n&&e[ds].splice(n,1)}(this._lView,t)}}function q3(){return new G3(me())}function W3(){return Eu(nn(),me())}function Eu(e,t){return new Cu(Er(e,t))}let Cu=(()=>{class e{constructor(n){this.nativeElement=n}static{this.__NG_ELEMENT_ID__=W3}}return e})();function LD(e){return e instanceof Cu?e.nativeElement:e}function H0(e){return t=>{setTimeout(e,void 0,t)}}const vo=class Y3 extends eo{constructor(t=!1){super(),this.destroyRef=void 0,this.__isAsync=t,function V_(){return void 0!==Ys()||null!=function el(){return Ai}()}()&&(this.destroyRef=_t(Du,{optional:!0})??void 0)}emit(t){const n=x(null);try{super.next(t)}finally{x(n)}}subscribe(t,n,r){let i=t,o=n||(()=>null),s=r;if(t&&"object"==typeof t){const u=t;i=u.next?.bind(u),o=u.error?.bind(u),s=u.complete?.bind(u)}this.__isAsync&&(o=H0(o),i&&(i=H0(i)),s&&(s=H0(s)));const a=super.subscribe({next:i,error:o,complete:s});return t instanceof ln&&t.add(a),a}};function K3(){return this._results[Symbol.iterator]()}class U0{get changes(){return this._changes??=new vo}constructor(t=!1){this._emitDistinctChangesOnly=t,this.dirty=!0,this._onDirty=void 0,this._results=[],this._changesDetected=!1,this._changes=void 0,this.length=0,this.first=void 0,this.last=void 0;const n=U0.prototype;n[Symbol.iterator]||(n[Symbol.iterator]=K3)}get(t){return this._results[t]}map(t){return this._results.map(t)}filter(t){return this._results.filter(t)}find(t){return this._results.find(t)}reduce(t,n){return this._results.reduce(t,n)}forEach(t){this._results.forEach(t)}some(t){return this._results.some(t)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(t,n){this.dirty=!1;const r=function ir(e){return e.flat(Number.POSITIVE_INFINITY)}(t);(this._changesDetected=!function t0(e,t,n){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++){let i=e[r],o=t[r];if(n&&(i=n(i),o=n(o)),o!==i)return!1}return!0}(this._results,r,n))&&(this._results=r,this.length=r.length,this.last=r[this.length-1],this.first=r[0])}notifyOnChanges(){void 0!==this._changes&&(this._changesDetected||!this._emitDistinctChangesOnly)&&this._changes.emit(this)}onDirty(t){this._onDirty=t}setDirty(){this.dirty=!0,this._onDirty?.()}destroy(){void 0!==this._changes&&(this._changes.complete(),this._changes.unsubscribe())}}function vh(e){return!(128&~e.flags)}const $0=new Map;let Z3=0;const G0="__ngContext__";function mr(e,t){hr(t)?(e[G0]=t[dl],function J3(e){$0.set(e[dl],e)}(t)):e[G0]=t}function WD(e){return KD(e[ll])}function YD(e){return KD(e[ki])}function KD(e){for(;null!==e&&!pr(e);)e=e[ki];return e}let q0;const _h=new ut("",{providedIn:"root",factory:()=>yF}),yF="ng",rE=new ut(""),xu=new ut("",{providedIn:"platform",factory:()=>"unknown"}),iE=new ut("",{providedIn:"root",factory:()=>function hs(){if(void 0!==q0)return q0;if(typeof document<"u")return document;throw new Ae(210,!1)}().body?.querySelector("[ngCspNonce]")?.getAttribute("ngCspNonce")||null});let oE=()=>null;function ey(e,t,n=!1){return oE(e,t,n)}const lE=new ut("",{providedIn:"root",factory:()=>!1});class gE{constructor(t){this.changingThisBreaksApplicationSecurity=t}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see https://g.co/ng/security#xss)`}}function TE(e){return e.ownerDocument.defaultView}var gs=function(e){return e[e.Important=1]="Important",e[e.DashCase=2]="DashCase",e}(gs||{});let hy;function py(e,t){return hy(e,t)}function Au(e,t,n,r,i){if(null!=r){let o,s=!1;pr(r)?o=r:hr(r)&&(s=!0,r=r[En]);const a=an(r);0===e&&null!==n?null==i?BE(t,n,a):sa(t,n,a,i||null,!0):1===e&&null!==n?sa(t,n,a,i||null,!0):2===e?function Ol(e,t,n){const r=Ph(e,t);r&&function E8(e,t,n,r){e.removeChild(t,n,r)}(e,r,t,n)}(t,a,s):3===e&&t.destroyNode(a),null!=o&&function M8(e,t,n,r,i){const o=n[lo];o!==an(n)&&Au(t,e,r,o,i);for(let a=Fn;a<n.length;a++){const u=n[a];Lh(u[Fe],u,e,t,r,o)}}(t,e,o,n,i)}}function Oh(e,t,n){return e.createElement(t,n)}function PE(e,t){t[Oi].changeDetectionScheduler?.notify(1),Lh(e,t,t[vt],2,null,null)}function FE(e,t){const n=e[mu],r=n.indexOf(t);n.splice(r,1)}function Al(e,t){if(e.length<=Fn)return;const n=Fn+t,r=e[n];if(r){const i=r[fl];null!==i&&i!==e&&FE(i,r),t>0&&(e[n-1][ki]=r[ki]);const o=Zs(e,Fn+t);!function m8(e,t){PE(e,t),t[En]=null,t[dr]=null}(r[Fe],r);const s=o[Ho];null!==s&&s.detachView(o[Fe]),r[Pn]=null,r[ki]=null,r[st]&=-129}return r}function Rh(e,t){if(!(256&t[st])){const n=t[vt];n.destroyNode&&Lh(e,t,n,3,null,null),function v8(e){let t=e[ll];if(!t)return yy(e[Fe],e);for(;t;){let n=null;if(hr(t))n=t[ll];else{const r=t[Fn];r&&(n=r)}if(!n){for(;t&&!t[ki]&&t!==e;)hr(t)&&yy(t[Fe],t),t=t[Pn];null===t&&(t=e),hr(t)&&yy(t[Fe],t),n=t&&t[ki]}t=n}}(t)}}function yy(e,t){if(256&t[st])return;const n=x(null);try{t[st]&=-129,t[st]|=256,t[ta]&&function ze(e){if(De(e),pe(e))for(let t=0;t<e.producerNode.length;t++)se(e.producerNode[t],e.producerIndexOfThis[t]);e.producerNode.length=e.producerLastReadVersion.length=e.producerIndexOfThis.length=0,e.liveConsumerNode&&(e.liveConsumerNode.length=e.liveConsumerIndexOfThis.length=0)}(t[ta]),function D8(e,t){let n;if(null!=e&&null!=(n=e.destroyHooks))for(let r=0;r<n.length;r+=2){const i=t[n[r]];if(!(i instanceof bl)){const o=n[r+1];if(Array.isArray(o))for(let s=0;s<o.length;s+=2){const a=i[o[s]],u=o[s+1];fo(4,a,u);try{u.call(a)}finally{fo(5,a,u)}}else{fo(4,i,o);try{o.call(i)}finally{fo(5,i,o)}}}}}(e,t),function _8(e,t){const n=e.cleanup,r=t[hu];if(null!==n)for(let o=0;o<n.length-1;o+=2)if("string"==typeof n[o]){const s=n[o+3];s>=0?r[s]():r[-s].unsubscribe(),o+=2}else n[o].call(r[n[o+1]]);null!==r&&(t[hu]=null);const i=t[ds];if(null!==i){t[ds]=null;for(let o=0;o<i.length;o++)(0,i[o])()}}(e,t),1===t[Fe].type&&t[vt].destroy();const r=t[fl];if(null!==r&&pr(t[Pn])){r!==t[Pn]&&FE(r,t);const i=t[Ho];null!==i&&i.detachView(e)}!function eF(e){$0.delete(e[dl])}(t)}finally{x(n)}}function vy(e,t,n){return function LE(e,t,n){let r=t;for(;null!==r&&40&r.type;)r=(t=r).parent;if(null===r)return n[En];{const{componentOffset:i}=r;if(i>-1){const{encapsulation:o}=e.data[r.directiveStart+i];if(o===p.None||o===p.Emulated)return null}return Er(r,n)}}(e,t.parent,n)}function sa(e,t,n,r,i){e.insertBefore(t,n,r,i)}function BE(e,t,n){e.appendChild(t,n)}function jE(e,t,n,r,i){null!==r?sa(e,t,n,r,i):BE(e,t,n)}function Ph(e,t){return e.parentNode(t)}let by,UE=function HE(e,t,n){return 40&e.type?Er(e,n):null};function Fh(e,t,n,r){const i=vy(e,r,t),o=t[vt],a=function VE(e,t,n){return UE(e,t,n)}(r.parent||t[dr],r,t);if(null!=i)if(Array.isArray(n))for(let u=0;u<n.length;u++)jE(o,i,n[u],a,!1);else jE(o,i,n,a,!1);void 0!==by&&by(o,r,t,n,i)}function kl(e,t){if(null!==t){const n=t.type;if(3&n)return Er(t,e);if(4&n)return wy(-1,e[t.index]);if(8&n){const r=t.child;if(null!==r)return kl(e,r);{const i=e[t.index];return pr(i)?wy(-1,i):an(i)}}if(32&n)return py(t,e)()||an(e[t.index]);{const r=zE(e,t);return null!==r?Array.isArray(r)?r[0]:kl(ra(e[xn]),r):kl(e,t.next)}}return null}function zE(e,t){return null!==t?e[xn][dr].projection[t.projection]:null}function wy(e,t){const n=Fn+e+1;if(n<t.length){const r=t[n],i=r[Fe].firstChild;if(null!==i)return kl(r,i)}return t[lo]}function _y(e,t,n,r,i,o,s){for(;null!=n;){const a=r[n.index],u=n.type;if(s&&0===t&&(a&&mr(an(a),r),n.flags|=2),32&~n.flags)if(8&u)_y(e,t,n.child,r,i,o,!1),Au(t,e,i,a,o);else if(32&u){const c=py(n,r);let l;for(;l=c();)Au(t,e,i,l,o);Au(t,e,i,a,o)}else 16&u?qE(e,t,r,n,i,o):Au(t,e,i,a,o);n=s?n.projectionNext:n.next}}function Lh(e,t,n,r,i,o){_y(n,r,e.firstChild,t,i,o,!1)}function qE(e,t,n,r,i,o){const s=n[xn],u=s[dr].projection[r.projection];if(Array.isArray(u))for(let c=0;c<u.length;c++)Au(t,e,i,u[c],o);else{let c=u;const l=s[Pn];vh(r)&&(c.flags|=128),_y(e,t,c,l,i,o,!0)}}function WE(e,t,n){""===n?e.removeAttribute(t,"class"):e.setAttribute(t,"class",n)}function YE(e,t,n){const{mergedAttrs:r,classes:i,styles:o}=n;null!==r&&D(e,t,r),null!==i&&WE(e,t,i),null!==o&&function S8(e,t,n){e.setAttribute(t,"style",n)}(e,t,o)}const Mt={};function ku(e=1){KE(Bt(),me(),gr()+e,!1)}function KE(e,t,n,r){if(!r)if(3&~t[st]){const o=e.preOrderHooks;null!==o&&fh(t,o,0,n)}else{const o=e.preOrderCheckHooks;null!==o&&lh(t,o,n)}ia(n)}function kt(e,t=Ft.Default){const n=me();return null===n?Rt(e,t):ED(nn(),n,ft(e),t)}function QE(e,t,n,r,i,o){const s=x(null);try{let a=null;i&m.SignalBased&&(a=t[r][k]),null!==a&&void 0!==a.transformFn&&(o=a.transformFn(o)),i&m.HasDecoratorInputTransform&&(o=e.inputTransforms[r].call(t,o)),null!==e.setInput?e.setInput(t,a,o,n,r):W_(t,a,r,o)}finally{x(s)}}function Bh(e,t,n,r,i,o,s,a,u,c,l){const d=t.blueprint.slice();return d[En]=i,d[st]=204|r,(null!==c||e&&2048&e[st])&&(d[st]|=2048),eD(d),d[Pn]=d[pu]=e,d[vn]=n,d[Oi]=s||e&&e[Oi],d[vt]=a||e&&e[vt],d[Hn]=u||e&&e[Hn]||null,d[dr]=o,d[dl]=function X3(){return Z3++}(),d[Zr]=l,d[$_]=c,d[xn]=2==t.type?e[xn]:d,d}function Ou(e,t,n,r,i){let o=e.data[t];if(null===o)o=function Dy(e,t,n,r,i){const o=iD(),s=x0(),u=e.data[t]=function L8(e,t,n,r,i,o){let s=t?t.injectorIndex:-1,a=0;return function vu(){return null!==bt.skipHydrationRootTNode}()&&(a|=128),{type:n,index:r,insertBeforeIndex:null,injectorIndex:s,directiveStart:-1,directiveEnd:-1,directiveStylingLast:-1,componentOffset:-1,propertyBindings:null,flags:a,providerIndexes:0,value:i,attrs:o,mergedAttrs:null,localNames:null,initialInputs:void 0,inputs:null,outputs:null,tView:null,next:null,prev:null,projectionNext:null,child:null,parent:t,projection:null,styles:null,stylesWithoutHost:null,residualStyles:void 0,classes:null,classesWithoutHost:null,residualClasses:void 0,classBindings:0,styleBindings:0}}(0,s?o:o&&o.parent,n,t,r,i);return null===e.firstChild&&(e.firstChild=u),null!==o&&(s?null==o.child&&null!==u.parent&&(o.child=u):null===o.next&&(o.next=u,u.prev=o)),u}(e,t,n,r,i),function g3(){return bt.lFrame.inI18n}()&&(o.flags|=32);else if(64&o.type){o.type=n,o.value=r,o.attrs=i;const s=function yl(){const e=bt.lFrame,t=e.currentTNode;return e.isParent?t:t.parent}();o.injectorIndex=null===s?-1:s.injectorIndex}return po(o,!0),o}function Rl(e,t,n,r){if(0===n)return-1;const i=t.length;for(let o=0;o<n;o++)t.push(r),e.blueprint.push(r),e.data.push(null);return i}function ZE(e,t,n,r,i){const o=gr(),s=2&r;try{ia(-1),s&&t.length>Et&&KE(e,t,Et,!1),fo(s?2:0,i),n(r,i)}finally{ia(o),fo(s?3:1,i)}}function Ey(e,t,n){if(h0(t)){const r=x(null);try{const o=t.directiveEnd;for(let s=t.directiveStart;s<o;s++){const a=e.data[s];a.contentQueries&&a.contentQueries(1,n[s],s)}}finally{x(r)}}}function Cy(e,t,n){rD()&&(function z8(e,t,n,r){const i=n.directiveStart,o=n.directiveEnd;na(n)&&function Z8(e,t,n){const r=Er(t,e),i=XE(n);let s=16;n.signals?s=4096:n.onPush&&(s=64);const a=jh(e,Bh(e,i,null,s,r,t,null,e[Oi].rendererFactory.createRenderer(r,n),null,null,null));e[t.index]=a}(t,n,e.data[i+n.componentOffset]),e.firstCreatePass||hh(n,t),mr(r,t);const s=n.initialInputs;for(let a=i;a<o;a++){const u=e.data[a],c=oa(t,e,a,n);mr(c,t),null!==s&&X8(0,a-i,c,u,0,s),Ri(u)&&(Xr(n.index,t)[vn]=oa(t,e,a,n))}}(e,t,n,Er(n,t)),!(64&~n.flags)&&rC(e,t,n))}function xy(e,t,n=Er){const r=t.localNames;if(null!==r){let i=t.index+1;for(let o=0;o<r.length;o+=2){const s=r[o+1],a=-1===s?n(t,e):e[s];e[i++]=a}}}function XE(e){const t=e.tView;return null===t||t.incompleteFirstPass?e.tView=My(1,null,e.template,e.decls,e.vars,e.directiveDefs,e.pipeDefs,e.viewQuery,e.schemas,e.consts,e.id):t}function My(e,t,n,r,i,o,s,a,u,c,l){const d=Et+r,h=d+i,g=function A8(e,t){const n=[];for(let r=0;r<t;r++)n.push(r<e?null:Mt);return n}(d,h),y="function"==typeof c?c():c;return g[Fe]={type:e,blueprint:g,template:n,queries:null,viewQuery:a,declTNode:t,data:g.slice().fill(null,d),bindingStartIndex:d,expandoStartIndex:h,hostBindingOpCodes:null,firstCreatePass:!0,firstUpdatePass:!0,staticViewQueries:!1,staticContentQueries:!1,preOrderHooks:null,preOrderCheckHooks:null,contentHooks:null,contentCheckHooks:null,viewHooks:null,viewCheckHooks:null,destroyHooks:null,cleanup:null,contentQueries:null,components:null,directiveRegistry:"function"==typeof o?o():o,pipeRegistry:"function"==typeof s?s():s,firstChild:null,schemas:u,consts:y,incompleteFirstPass:!1,ssrId:l}}let JE=()=>null;function eC(e,t,n,r,i){for(let o in t){if(!t.hasOwnProperty(o))continue;const s=t[o];if(void 0===s)continue;r??={};let a,u=m.None;Array.isArray(s)?(a=s[0],u=s[1]):a=s;let c=o;if(null!==i){if(!i.hasOwnProperty(o))continue;c=i[o]}0===e?tC(r,n,c,a,u):tC(r,n,c,a)}return r}function tC(e,t,n,r,i){let o;e.hasOwnProperty(n)?(o=e[n]).push(t,r):o=e[n]=[t,r],void 0!==i&&o.push(i)}function Iy(e,t,n,r){if(rD()){const i=null===r?null:{"":-1},o=function q8(e,t){const n=e.directiveRegistry;let r=null,i=null;if(n)for(let o=0;o<n.length;o++){const s=n[o];if(K(t,s.selectors,!1))if(r||(r=[]),Ri(s))if(null!==s.findHostDirectiveDefs){const a=[];i=i||new Map,s.findHostDirectiveDefs(s,a,i),r.unshift(...a,s),Sy(e,t,a.length)}else r.unshift(s),Sy(e,t,0);else i=i||new Map,s.findHostDirectiveDefs?.(s,r,i),r.push(s)}return null===r?null:[r,i]}(e,n);let s,a;null===o?s=a=null:[s,a]=o,null!==s&&nC(e,t,n,s,i,a),i&&function W8(e,t,n){if(t){const r=e.localNames=[];for(let i=0;i<t.length;i+=2){const o=n[t[i+1]];if(null==o)throw new Ae(-301,!1);r.push(t[i],o)}}}(n,r,i)}n.mergedAttrs=O(n.mergedAttrs,n.attrs)}function nC(e,t,n,r,i,o){for(let c=0;c<r.length;c++)L0(hh(n,t),e,r[c].type);!function K8(e,t,n){e.flags|=1,e.directiveStart=t,e.directiveEnd=t+n,e.providerIndexes=t}(n,e.data.length,r.length);for(let c=0;c<r.length;c++){const l=r[c];l.providersResolver&&l.providersResolver(l)}let s=!1,a=!1,u=Rl(e,t,r.length,null);for(let c=0;c<r.length;c++){const l=r[c];n.mergedAttrs=O(n.mergedAttrs,l.hostAttrs),Q8(e,n,t,u,l),Y8(u,l,i),null!==l.contentQueries&&(n.flags|=4),(null!==l.hostBindings||null!==l.hostAttrs||0!==l.hostVars)&&(n.flags|=64);const d=l.type.prototype;!s&&(d.ngOnChanges||d.ngOnInit||d.ngDoCheck)&&((e.preOrderHooks??=[]).push(n.index),s=!0),!a&&(d.ngOnChanges||d.ngDoCheck)&&((e.preOrderCheckHooks??=[]).push(n.index),a=!0),u++}!function B8(e,t,n){const i=t.directiveEnd,o=e.data,s=t.attrs,a=[];let u=null,c=null;for(let l=t.directiveStart;l<i;l++){const d=o[l],h=n?n.get(d):null,y=h?h.outputs:null;u=eC(0,d.inputs,l,u,h?h.inputs:null),c=eC(1,d.outputs,l,c,y);const v=null===u||null===s||F(t)?null:J8(u,l,s);a.push(v)}null!==u&&(u.hasOwnProperty("class")&&(t.flags|=8),u.hasOwnProperty("style")&&(t.flags|=16)),t.initialInputs=a,t.inputs=u,t.outputs=c}(e,n,o)}function rC(e,t,n){const r=n.directiveStart,i=n.directiveEnd,o=n.index,s=function y3(){return bt.lFrame.currentDirectiveIndex}();try{ia(o);for(let a=r;a<i;a++){const u=e.data[a],c=t[a];I0(a),(null!==u.hostBindings||0!==u.hostVars||null!==u.hostAttrs)&&G8(u,c)}}finally{ia(-1),I0(s)}}function G8(e,t){null!==e.hostBindings&&e.hostBindings(1,t)}function Sy(e,t,n){t.componentOffset=n,(e.components??=[]).push(t.index)}function Y8(e,t,n){if(n){if(t.exportAs)for(let r=0;r<t.exportAs.length;r++)n[t.exportAs[r]]=e;Ri(t)&&(n[""]=e)}}function Q8(e,t,n,r,i){e.data[r]=i;const o=i.factory||(i.factory=io(i.type)),s=new bl(o,Ri(i),kt);e.blueprint[r]=s,n[r]=s,function U8(e,t,n,r,i){const o=i.hostBindings;if(o){let s=e.hostBindingOpCodes;null===s&&(s=e.hostBindingOpCodes=[]);const a=~t.index;(function $8(e){let t=e.length;for(;t>0;){const n=e[--t];if("number"==typeof n&&n<0)return n}return 0})(s)!=a&&s.push(a),s.push(n,r,o)}}(e,t,r,Rl(e,n,i.hostVars,Mt),i)}function bo(e,t,n,r,i,o){const s=Er(e,t);!function Ty(e,t,n,r,i,o,s){if(null==o)e.removeAttribute(t,i,n);else{const a=null==s?wt(o):s(o,r||"",i);e.setAttribute(t,i,a,n)}}(t[vt],s,o,e.value,n,r,i)}function X8(e,t,n,r,i,o){const s=o[t];if(null!==s)for(let a=0;a<s.length;)QE(r,n,s[a++],s[a++],s[a++],s[a++])}function J8(e,t,n){let r=null,i=0;for(;i<n.length;){const o=n[i];if(0!==o)if(5!==o){if("number"==typeof o)break;if(e.hasOwnProperty(o)){null===r&&(r=[]);const s=e[o];for(let a=0;a<s.length;a+=3)if(s[a]===t){r.push(o,s[a+1],s[a+2],n[i+1]);break}}i+=2}else i+=2;else i+=4}return r}function iC(e,t,n,r){return[e,!0,0,t,null,r,null,n,null,null]}function oC(e,t){const n=e.contentQueries;if(null!==n){const r=x(null);try{for(let i=0;i<n.length;i+=2){const s=n[i+1];if(-1!==s){const a=e.data[s];uh(n[i]),a.contentQueries(2,t[s],s)}}}finally{x(r)}}}function jh(e,t){return e[ll]?e[U_][ki]=t:e[ll]=t,e[U_]=t,t}function Ny(e,t,n){uh(0);const r=x(null);try{t(e,n)}finally{x(r)}}function sC(e){return e[hu]||(e[hu]=[])}function aC(e){return e.cleanup||(e.cleanup=[])}function Vh(e,t){const n=e[Hn],r=n?n.get(yo,null):null;r&&r.handleError(t)}function Ay(e,t,n,r,i){for(let o=0;o<n.length;){const s=n[o++],a=n[o++],u=n[o++];QE(e.data[s],t[s],r,a,u,i)}}function eL(e,t){const n=Xr(t,e),r=n[Fe];!function tL(e,t){for(let n=t.length;n<e.blueprint.length;n++)t.push(e.blueprint[n])}(r,n);const i=n[En];null!==i&&null===n[Zr]&&(n[Zr]=ey(i,n[Hn])),ky(r,n,n[vn])}function ky(e,t,n){N0(t);try{const r=e.viewQuery;null!==r&&Ny(1,r,n);const i=e.template;null!==i&&ZE(e,t,i,1,n),e.firstCreatePass&&(e.firstCreatePass=!1),t[Ho]?.finishViewCreation(e),e.staticContentQueries&&oC(e,t),e.staticViewQueries&&Ny(2,e.viewQuery,n);const o=e.components;null!==o&&function nL(e,t){for(let n=0;n<t.length;n++)eL(e,t[n])}(t,o)}catch(r){throw e.firstCreatePass&&(e.incompleteFirstPass=!0,e.firstCreatePass=!1),r}finally{t[st]&=-5,A0()}}function Ru(e,t){return!t||null===t.firstChild||vh(e)}function Fl(e,t,n,r=!0){const i=t[Fe];if(function b8(e,t,n,r){const i=Fn+r,o=n.length;r>0&&(n[i-1][ki]=t),r<o-Fn?(t[ki]=n[i],al(n,Fn+r,t)):(n.push(t),t[ki]=null),t[Pn]=n;const s=t[fl];null!==s&&n!==s&&function w8(e,t){const n=e[mu];t[xn]!==t[Pn][Pn][xn]&&(e[st]|=d0.HasTransplantedViews),null===n?e[mu]=[t]:n.push(t)}(s,t);const a=t[Ho];null!==a&&a.insertView(e),_0(t),t[st]|=128}(i,t,e,n),r){const s=wy(n,e),a=t[vt],u=Ph(a,e[lo]);null!==u&&function y8(e,t,n,r,i,o){r[En]=i,r[dr]=t,Lh(e,r,n,1,i,o)}(i,e[dr],a,t,u,s)}const o=t[Zr];null!==o&&null!==o.firstChild&&(o.firstChild=null)}function Ll(e,t,n,r,i=!1){for(;null!==n;){const o=t[n.index];null!==o&&r.push(an(o)),pr(o)&&lC(o,r);const s=n.type;if(8&s)Ll(e,t,n.child,r);else if(32&s){const a=py(n,t);let u;for(;u=a();)r.push(u)}else if(16&s){const a=zE(t,n);if(Array.isArray(a))r.push(...a);else{const u=ra(t[xn]);Ll(u[Fe],u,a,r,!0)}}n=i?n.projectionNext:n.next}return r}function lC(e,t){for(let n=Fn;n<e.length;n++){const r=e[n],i=r[Fe].firstChild;null!==i&&Ll(r[Fe],r,i,t)}e[lo]!==e[En]&&t.push(e[lo])}let fC=[];const sL={version:0,lastCleanEpoch:0,dirty:!1,producerNode:void 0,producerLastReadVersion:void 0,producerIndexOfThis:void 0,nextProducerIndex:0,liveConsumerNode:void 0,liveConsumerIndexOfThis:void 0,consumerAllowSignalWrites:!1,consumerIsAlwaysLive:!1,producerMustRecompute:()=>!1,producerRecomputeValue:()=>{},consumerMarkedDirty:()=>{},consumerOnSignalRead:()=>{},consumerIsAlwaysLive:!0,consumerMarkedDirty:e=>{ml(e.lView)},consumerOnSignalRead(){this.lView[ta]=this}},dC=100;function Hh(e,t=!0,n=0){const r=e[Oi],i=r.rendererFactory;i.begin?.();try{!function aL(e,t){Ry(e,t);let n=0;for(;w0(e);){if(n===dC)throw new Ae(103,!1);n++,Ry(e,1)}}(e,n)}catch(s){throw t&&Vh(e,s),s}finally{i.end?.(),r.inlineEffectRunner?.flush()}}function uL(e,t,n,r){const i=t[st];if(!(256&~i))return;t[Oi].inlineEffectRunner?.flush(),N0(t);let s=null,a=null;(function cL(e){return 2!==e.type})(e)&&(a=function rL(e){return e[ta]??function iL(e){const t=fC.pop()??Object.create(sL);return t.lView=e,t}(e)}(t),s=function _e(e){return e&&(e.nextProducerIndex=0),x(e)}(a));try{eD(t),function sD(e){return bt.lFrame.bindingIndex=e}(e.bindingStartIndex),null!==n&&ZE(e,t,n,2,r);const u=!(3&~i);if(u){const d=e.preOrderCheckHooks;null!==d&&lh(t,d,null)}else{const d=e.preOrderHooks;null!==d&&fh(t,d,0,null),k0(t,0)}if(function lL(e){for(let t=WD(e);null!==t;t=YD(t)){if(!(t[st]&d0.HasTransplantedViews))continue;const n=t[mu];for(let r=0;r<n.length;r++){o3(n[r])}}}(t),hC(t,0),null!==e.contentQueries&&oC(e,t),u){const d=e.contentCheckHooks;null!==d&&lh(t,d)}else{const d=e.contentHooks;null!==d&&fh(t,d,1),k0(t,1)}!function N8(e,t){const n=e.hostBindingOpCodes;if(null!==n)try{for(let r=0;r<n.length;r++){const i=n[r];if(i<0)ia(~i);else{const o=i,s=n[++r],a=n[++r];m3(s,o),a(2,t[o])}}}finally{ia(-1)}}(e,t);const c=e.components;null!==c&&gC(t,c,0);const l=e.viewQuery;if(null!==l&&Ny(2,l,r),u){const d=e.viewCheckHooks;null!==d&&lh(t,d)}else{const d=e.viewHooks;null!==d&&fh(t,d,2),k0(t,2)}if(!0===e.firstUpdatePass&&(e.firstUpdatePass=!1),t[rh]){for(const d of t[rh])d();t[rh]=null}t[st]&=-73}catch(u){throw ml(t),u}finally{null!==a&&(function Ne(e,t){if(x(t),e&&void 0!==e.producerNode&&void 0!==e.producerIndexOfThis&&void 0!==e.producerLastReadVersion){if(pe(e))for(let n=e.nextProducerIndex;n<e.producerNode.length;n++)se(e.producerNode[n],e.producerIndexOfThis[n]);for(;e.producerNode.length>e.nextProducerIndex;)e.producerNode.pop(),e.producerLastReadVersion.pop(),e.producerIndexOfThis.pop()}}(a,s),function oL(e){e.lView[ta]!==e&&(e.lView=null,fC.push(e))}(a)),A0()}}function hC(e,t){for(let n=WD(e);null!==n;n=YD(n))for(let r=Fn;r<n.length;r++)pC(n[r],t)}function fL(e,t,n){pC(Xr(t,e),n)}function pC(e,t){b0(e)&&Ry(e,t)}function Ry(e,t){const r=e[Fe],i=e[st],o=e[ta];let s=!!(0===t&&16&i);if(s||=!!(64&i&&0===t),s||=!!(1024&i),s||=!(!o?.dirty||!$e(o)),o&&(o.dirty=!1),e[st]&=-9217,s)uL(r,e,r.template,e[vn]);else if(8192&i){hC(e,1);const a=r.components;null!==a&&gC(e,a,1)}}function gC(e,t,n){for(let r=0;r<t.length;r++)fL(e,t[r],n)}function Bl(e){for(e[Oi].changeDetectionScheduler?.notify();e;){e[st]|=64;const t=ra(e);if(p0(e)&&!t)return e;e=t}return null}class jl{get rootNodes(){const t=this._lView,n=t[Fe];return Ll(n,t,n.firstChild,[])}constructor(t,n,r=!0){this._lView=t,this._cdRefInjectingView=n,this.notifyErrorHandler=r,this._appRef=null,this._attachedToViewContainer=!1}get context(){return this._lView[vn]}set context(t){this._lView[vn]=t}get destroyed(){return!(256&~this._lView[st])}destroy(){if(this._appRef)this._appRef.detachView(this);else if(this._attachedToViewContainer){const t=this._lView[Pn];if(pr(t)){const n=t[8],r=n?n.indexOf(this):-1;r>-1&&(Al(t,r),Zs(n,r))}this._attachedToViewContainer=!1}Rh(this._lView[Fe],this._lView)}onDestroy(t){ah(this._lView,t)}markForCheck(){Bl(this._cdRefInjectingView||this._lView)}detach(){this._lView[st]&=-129}reattach(){_0(this._lView),this._lView[st]|=128}detectChanges(){this._lView[st]|=1024,Hh(this._lView,this.notifyErrorHandler)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new Ae(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null,PE(this._lView[Fe],this._lView)}attachToAppRef(t){if(this._attachedToViewContainer)throw new Ae(902,!1);this._appRef=t,_0(this._lView)}}let qo=(()=>{class e{static{this.__NG_ELEMENT_ID__=pL}}return e})();const dL=qo,hL=class extends dL{constructor(t,n,r){super(),this._declarationLView=t,this._declarationTContainer=n,this.elementRef=r}get ssrId(){return this._declarationTContainer.tView?.ssrId||null}createEmbeddedView(t,n){return this.createEmbeddedViewImpl(t,n)}createEmbeddedViewImpl(t,n,r){const i=function Pl(e,t,n,r){const i=x(null);try{const o=t.tView,u=Bh(e,o,n,4096&e[st]?4096:16,null,t,null,null,r?.injector??null,r?.embeddedViewInjector??null,r?.dehydratedView??null);u[fl]=e[t.index];const l=e[Ho];return null!==l&&(u[Ho]=l.createEmbeddedView(o)),ky(o,u,n),u}finally{x(i)}}(this._declarationLView,this._declarationTContainer,t,{embeddedViewInjector:n,dehydratedView:r});return new jl(i)}};function pL(){return Uh(nn(),me())}function Uh(e,t){return 4&e.type?new hL(t,e,Eu(e,t)):null}class Vy{}class BL{}class DC{}class VL{resolveComponentFactory(t){throw function jL(e){const t=Error(`No component factory found for ${mn(e)}.`);return t.ngComponent=e,t}(t)}}let Wh=(()=>{class e{static{this.NULL=new VL}}return e})();class CC{}let xC=(()=>{class e{constructor(){this.destroyNode=null}static{this.__NG_ELEMENT_ID__=()=>function HL(){const e=me(),n=Xr(nn().index,e);return(hr(n)?n:e)[vt]}()}}return e})(),UL=(()=>{class e{static{this.\u0275prov=At({token:e,providedIn:"root",factory:()=>null})}}return e})();const Hy={};function IC(...e){}class Cn{constructor({enableLongStackTrace:t=!1,shouldCoalesceEventChangeDetection:n=!1,shouldCoalesceRunChangeDetection:r=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new vo(!1),this.onMicrotaskEmpty=new vo(!1),this.onStable=new vo(!1),this.onError=new vo(!1),typeof Zone>"u")throw new Ae(908,!1);Zone.assertZonePatched();const i=this;i._nesting=0,i._outer=i._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(i._inner=i._inner.fork(new Zone.TaskTrackingZoneSpec)),t&&Zone.longStackTraceZoneSpec&&(i._inner=i._inner.fork(Zone.longStackTraceZoneSpec)),i.shouldCoalesceEventChangeDetection=!r&&n,i.shouldCoalesceRunChangeDetection=r,i.lastRequestAnimationFrameId=-1,i.nativeRequestAnimationFrame=function $L(){const e="function"==typeof Gt.requestAnimationFrame;let t=Gt[e?"requestAnimationFrame":"setTimeout"],n=Gt[e?"cancelAnimationFrame":"clearTimeout"];if(typeof Zone<"u"&&t&&n){const r=t[Zone.__symbol__("OriginalDelegate")];r&&(t=r);const i=n[Zone.__symbol__("OriginalDelegate")];i&&(n=i)}return{nativeRequestAnimationFrame:t,nativeCancelAnimationFrame:n}}().nativeRequestAnimationFrame,function qL(e){const t=()=>{!function GL(e){e.isCheckStableRunning||-1!==e.lastRequestAnimationFrameId||(e.lastRequestAnimationFrameId=e.nativeRequestAnimationFrame.call(Gt,()=>{e.fakeTopEventTask||(e.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{e.lastRequestAnimationFrameId=-1,$y(e),e.isCheckStableRunning=!0,Uy(e),e.isCheckStableRunning=!1},void 0,()=>{},()=>{})),e.fakeTopEventTask.invoke()}),$y(e))}(e)};e._inner=e._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(n,r,i,o,s,a)=>{if(function WL(e){return!(!Array.isArray(e)||1!==e.length)&&!0===e[0].data?.__ignore_ng_zone__}(a))return n.invokeTask(i,o,s,a);try{return SC(e),n.invokeTask(i,o,s,a)}finally{(e.shouldCoalesceEventChangeDetection&&"eventTask"===o.type||e.shouldCoalesceRunChangeDetection)&&t(),TC(e)}},onInvoke:(n,r,i,o,s,a,u)=>{try{return SC(e),n.invoke(i,o,s,a,u)}finally{e.shouldCoalesceRunChangeDetection&&t(),TC(e)}},onHasTask:(n,r,i,o)=>{n.hasTask(i,o),r===i&&("microTask"==o.change?(e._hasPendingMicrotasks=o.microTask,$y(e),Uy(e)):"macroTask"==o.change&&(e.hasPendingMacrotasks=o.macroTask))},onHandleError:(n,r,i,o)=>(n.handleError(i,o),e.runOutsideAngular(()=>e.onError.emit(o)),!1)})}(i)}static isInAngularZone(){return typeof Zone<"u"&&!0===Zone.current.get("isAngularZone")}static assertInAngularZone(){if(!Cn.isInAngularZone())throw new Ae(909,!1)}static assertNotInAngularZone(){if(Cn.isInAngularZone())throw new Ae(909,!1)}run(t,n,r){return this._inner.run(t,n,r)}runTask(t,n,r,i){const o=this._inner,s=o.scheduleEventTask("NgZoneEvent: "+i,t,zL,IC,IC);try{return o.runTask(s,n,r)}finally{o.cancelTask(s)}}runGuarded(t,n,r){return this._inner.runGuarded(t,n,r)}runOutsideAngular(t){return this._outer.run(t)}}const zL={};function Uy(e){if(0==e._nesting&&!e.hasPendingMicrotasks&&!e.isStable)try{e._nesting++,e.onMicrotaskEmpty.emit(null)}finally{if(e._nesting--,!e.hasPendingMicrotasks)try{e.runOutsideAngular(()=>e.onStable.emit(null))}finally{e.isStable=!0}}}function $y(e){e.hasPendingMicrotasks=!!(e._hasPendingMicrotasks||(e.shouldCoalesceEventChangeDetection||e.shouldCoalesceRunChangeDetection)&&-1!==e.lastRequestAnimationFrameId)}function SC(e){e._nesting++,e.isStable&&(e.isStable=!1,e.onUnstable.emit(null))}function TC(e){e._nesting--,Uy(e)}class NC{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new vo,this.onMicrotaskEmpty=new vo,this.onStable=new vo,this.onError=new vo}run(t,n,r){return t.apply(n,r)}runGuarded(t,n,r){return t.apply(n,r)}runOutsideAngular(t){return t()}runTask(t,n,r,i){return t.apply(n,r)}}let zl=(()=>{class e{constructor(){this.handler=null,this.internalCallbacks=[]}execute(){this.executeInternalCallbacks(),this.handler?.execute()}executeInternalCallbacks(){const n=[...this.internalCallbacks];this.internalCallbacks.length=0;for(const r of n)r()}ngOnDestroy(){this.handler?.destroy(),this.handler=null,this.internalCallbacks.length=0}static{this.\u0275prov=At({token:e,providedIn:"root",factory:()=>new e})}}return e})();function Kh(e,t,n){let r=n?e.styles:null,i=n?e.classes:null,o=0;if(null!==t)for(let s=0;s<t.length;s++){const a=t[s];"number"==typeof a?o=a:1==o?i=cs(i,a):2==o&&(r=cs(r,a+": "+t[++s]+";"))}n?e.styles=r:e.stylesWithoutHost=r,n?e.classes=i:e.classesWithoutHost=i}class FC extends Wh{constructor(t){super(),this.ngModule=t}resolveComponentFactory(t){const n=He(t);return new Wl(n,this.ngModule)}}function LC(e){const t=[];for(const n in e){if(!e.hasOwnProperty(n))continue;const r=e[n];void 0!==r&&t.push({propName:Array.isArray(r)?r[0]:r,templateName:n})}return t}class Qh{constructor(t,n){this.injector=t,this.parentInjector=n}get(t,n,r){r=Qs(r);const i=this.injector.get(t,Hy,r);return i!==Hy||n===Hy?i:this.parentInjector.get(t,n,r)}}class Wl extends DC{get inputs(){const t=this.componentDef,n=t.inputTransforms,r=LC(t.inputs);if(null!==n)for(const i of r)n.hasOwnProperty(i.propName)&&(i.transform=n[i.propName]);return r}get outputs(){return LC(this.componentDef.outputs)}constructor(t,n){super(),this.componentDef=t,this.ngModule=n,this.componentType=t.type,this.selector=function Re(e){return e.map(Ve).join(",")}(t.selectors),this.ngContentSelectors=t.ngContentSelectors?t.ngContentSelectors:[],this.isBoundToModule=!!n}create(t,n,r,i){const o=x(null);try{let s=(i=i||this.ngModule)instanceof co?i:i?.injector;s&&null!==this.componentDef.getStandaloneInjector&&(s=this.componentDef.getStandaloneInjector(s)||s);const a=s?new Qh(t,s):t,u=a.get(CC,null);if(null===u)throw new Ae(407,!1);const c=a.get(UL,null),h={rendererFactory:u,sanitizer:c,inlineEffectRunner:null,afterRenderEventManager:a.get(zl,null),changeDetectionScheduler:a.get(Vy,null)},g=u.createRenderer(null,this.componentDef),y=this.componentDef.selectors[0][0]||"div",v=r?function k8(e,t,n,r){const o=r.get(lE,!1)||n===p.ShadowDom,s=e.selectRootElement(t,o);return function O8(e){JE(e)}(s),s}(g,r,this.componentDef.encapsulation,a):Oh(g,y,function JL(e){const t=e.toLowerCase();return"svg"===t?"svg":"math"===t?"math":null}(y));let b=512;this.componentDef.signals?b|=4096:this.componentDef.onPush||(b|=16);let _=null;null!==v&&(_=ey(v,a,!0));const E=My(0,null,null,1,0,null,null,null,null,null,null),C=Bh(null,E,null,b,null,null,h,g,a,null,_);let I,R;N0(C);try{const G=this.componentDef;let z,de=null;G.findHostDirectiveDefs?(z=[],de=new Map,G.findHostDirectiveDefs(G,z,de),z.push(G)):z=[G];const oe=function t5(e,t){const n=e[Fe],r=Et;return e[r]=t,Ou(n,r,2,"#host",null)}(C,v),fe=function n5(e,t,n,r,i,o,s){const a=i[Fe];!function r5(e,t,n,r){for(const i of e)t.mergedAttrs=O(t.mergedAttrs,i.hostAttrs);null!==t.mergedAttrs&&(Kh(t,t.mergedAttrs,!0),null!==n&&YE(r,n,t))}(r,e,t,s);let u=null;null!==t&&(u=ey(t,i[Hn]));const c=o.rendererFactory.createRenderer(t,n);let l=16;n.signals?l=4096:n.onPush&&(l=64);const d=Bh(i,XE(n),null,l,i[e.index],e,o,c,null,null,u);return a.firstCreatePass&&Sy(a,e,r.length-1),jh(i,d),i[e.index]=d}(oe,v,G,z,C,h,g);R=gl(E,Et),v&&function o5(e,t,n,r){if(r)D(e,n,["ng-version","17.3.12"]);else{const{attrs:i,classes:o}=function Le(e){const t=[],n=[];let r=1,i=2;for(;r<e.length;){let o=e[r];if("string"==typeof o)2===i?""!==o&&t.push(o,e[++r]):8===i&&n.push(o);else{if(!Y(i))break;i=o}r++}return{attrs:t,classes:n}}(t.selectors[0]);i&&D(e,n,i),o&&o.length>0&&WE(e,n,o.join(" "))}}(g,G,v,r),void 0!==n&&function s5(e,t,n){const r=e.projection=[];for(let i=0;i<t.length;i++){const o=n[i];r.push(null!=o?Array.from(o):null)}}(R,this.ngContentSelectors,n),I=function i5(e,t,n,r,i,o){const s=nn(),a=i[Fe],u=Er(s,i);nC(a,i,s,n,null,r);for(let l=0;l<n.length;l++)mr(oa(i,a,s.directiveStart+l,s),i);rC(a,i,s),u&&mr(u,i);const c=oa(i,a,s.directiveStart+s.componentOffset,s);if(e[vn]=i[vn]=c,null!==o)for(const l of o)l(c,t);return Ey(a,s,i),c}(fe,G,z,de,C,[a5]),ky(E,C,null)}finally{A0()}return new e5(this.componentType,I,Eu(R,C),C,R)}finally{x(o)}}}class e5 extends BL{constructor(t,n,r,i,o){super(),this.location=r,this._rootLView=i,this._tNode=o,this.previousInputValues=null,this.instance=n,this.hostView=this.changeDetectorRef=new jl(i,void 0,!1),this.componentType=t}setInput(t,n){const r=this._tNode.inputs;let i;if(null!==r&&(i=r[t])){if(this.previousInputValues??=new Map,this.previousInputValues.has(t)&&Object.is(this.previousInputValues.get(t),n))return;const o=this._rootLView;Ay(o[Fe],o,i,t,n),this.previousInputValues.set(t,n),Bl(Xr(this._tNode.index,o))}}get injector(){return new Wn(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(t){this.hostView.onDestroy(t)}}function a5(){const e=nn();ch(me()[Fe],e)}let _o=(()=>{class e{static{this.__NG_ELEMENT_ID__=u5}}return e})();function u5(){return VC(nn(),me())}const c5=_o,BC=class extends c5{constructor(t,n,r){super(),this._lContainer=t,this._hostTNode=n,this._hostLView=r}get element(){return Eu(this._hostTNode,this._hostLView)}get injector(){return new Wn(this._hostTNode,this._hostLView)}get parentInjector(){const t=ph(this._hostTNode,this._hostLView);if(R0(t)){const n=_l(t,this._hostLView),r=wl(t);return new Wn(n[Fe].data[r+8],n)}return new Wn(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(t){const n=jC(this._lContainer);return null!==n&&n[t]||null}get length(){return this._lContainer.length-Fn}createEmbeddedView(t,n,r){let i,o;"number"==typeof r?i=r:null!=r&&(i=r.index,o=r.injector);const a=t.createEmbeddedViewImpl(n||{},o,null);return this.insertImpl(a,i,Ru(this._hostTNode,null)),a}createComponent(t,n,r,i,o){const s=t&&!function cl(e){return"function"==typeof e}(t);let a;if(s)a=n;else{const y=n||{};a=y.index,r=y.injector,i=y.projectableNodes,o=y.environmentInjector||y.ngModuleRef}const u=s?t:new Wl(He(t)),c=r||this.parentInjector;if(!o&&null==u.ngModule){const v=(s?c:this.parentInjector).get(co,null);v&&(o=v)}He(u.componentType??{});const g=u.create(c,i,null,o);return this.insertImpl(g.hostView,a,Ru(this._hostTNode,null)),g}insert(t,n){return this.insertImpl(t,n,!0)}insertImpl(t,n,r){const i=t._lView;if(function i3(e){return pr(e[Pn])}(i)){const a=this.indexOf(t);if(-1!==a)this.detach(a);else{const u=i[Pn],c=new BC(u,u[dr],u[Pn]);c.detach(c.indexOf(t))}}const o=this._adjustIndex(n),s=this._lContainer;return Fl(s,i,o,r),t.attachToViewContainerRef(),al(Wy(s),o,t),t}move(t,n){return this.insert(t,n)}indexOf(t){const n=jC(this._lContainer);return null!==n?n.indexOf(t):-1}remove(t){const n=this._adjustIndex(t,-1),r=Al(this._lContainer,n);r&&(Zs(Wy(this._lContainer),n),Rh(r[Fe],r))}detach(t){const n=this._adjustIndex(t,-1),r=Al(this._lContainer,n);return r&&null!=Zs(Wy(this._lContainer),n)?new jl(r):null}_adjustIndex(t,n=0){return t??this.length+n}};function jC(e){return e[8]}function Wy(e){return e[8]||(e[8]=[])}function VC(e,t){let n;const r=t[e.index];return pr(r)?n=r:(n=iC(r,t,null,e),t[e.index]=n,jh(t,n)),HC(n,t,e,r),new BC(n,e,t)}let HC=function $C(e,t,n,r){if(e[lo])return;let i;i=8&n.type?an(r):function l5(e,t){const n=e[vt],r=n.createComment(""),i=Er(t,e);return sa(n,Ph(n,i),r,function C8(e,t){return e.nextSibling(t)}(n,i),!1),r}(t,n),e[lo]=i},Yy=()=>!1;class Ky{constructor(t){this.queryList=t,this.matches=null}clone(){return new Ky(this.queryList)}setDirty(){this.queryList.setDirty()}}class Qy{constructor(t=[]){this.queries=t}createEmbeddedView(t){const n=t.queries;if(null!==n){const r=null!==t.contentQueries?t.contentQueries[0]:n.length,i=[];for(let o=0;o<r;o++){const s=n.getByIndex(o);i.push(this.queries[s.indexInDeclarationView].clone())}return new Qy(i)}return null}insertView(t){this.dirtyQueriesWithMatches(t)}detachView(t){this.dirtyQueriesWithMatches(t)}finishViewCreation(t){this.dirtyQueriesWithMatches(t)}dirtyQueriesWithMatches(t){for(let n=0;n<this.queries.length;n++)null!==tv(t,n).matches&&this.queries[n].setDirty()}}class zC{constructor(t,n,r=null){this.flags=n,this.read=r,this.predicate="string"==typeof t?function v5(e){return e.split(",").map(t=>t.trim())}(t):t}}class Zy{constructor(t=[]){this.queries=t}elementStart(t,n){for(let r=0;r<this.queries.length;r++)this.queries[r].elementStart(t,n)}elementEnd(t){for(let n=0;n<this.queries.length;n++)this.queries[n].elementEnd(t)}embeddedTView(t){let n=null;for(let r=0;r<this.length;r++){const i=null!==n?n.length:0,o=this.getByIndex(r).embeddedTView(t,i);o&&(o.indexInDeclarationView=r,null!==n?n.push(o):n=[o])}return null!==n?new Zy(n):null}template(t,n){for(let r=0;r<this.queries.length;r++)this.queries[r].template(t,n)}getByIndex(t){return this.queries[t]}get length(){return this.queries.length}track(t){this.queries.push(t)}}class Xy{constructor(t,n=-1){this.metadata=t,this.matches=null,this.indexInDeclarationView=-1,this.crossesNgTemplate=!1,this._appliesToNextNode=!0,this._declarationNodeIndex=n}elementStart(t,n){this.isApplyingToNode(n)&&this.matchTNode(t,n)}elementEnd(t){this._declarationNodeIndex===t.index&&(this._appliesToNextNode=!1)}template(t,n){this.elementStart(t,n)}embeddedTView(t,n){return this.isApplyingToNode(t)?(this.crossesNgTemplate=!0,this.addMatch(-t.index,n),new Xy(this.metadata)):null}isApplyingToNode(t){if(this._appliesToNextNode&&1&~this.metadata.flags){const n=this._declarationNodeIndex;let r=t.parent;for(;null!==r&&8&r.type&&r.index!==n;)r=r.parent;return n===(null!==r?r.index:-1)}return this._appliesToNextNode}matchTNode(t,n){const r=this.metadata.predicate;if(Array.isArray(r))for(let i=0;i<r.length;i++){const o=r[i];this.matchTNodeWithReadOption(t,n,p5(n,o)),this.matchTNodeWithReadOption(t,n,gh(n,t,o,!1,!1))}else r===qo?4&n.type&&this.matchTNodeWithReadOption(t,n,-1):this.matchTNodeWithReadOption(t,n,gh(n,t,r,!1,!1))}matchTNodeWithReadOption(t,n,r){if(null!==r){const i=this.metadata.read;if(null!==i)if(i===Cu||i===_o||i===qo&&4&n.type)this.addMatch(n.index,-2);else{const o=gh(n,t,i,!1,!1);null!==o&&this.addMatch(n.index,o)}else this.addMatch(n.index,r)}}addMatch(t,n){null===this.matches?this.matches=[t,n]:this.matches.push(t,n)}}function p5(e,t){const n=e.localNames;if(null!==n)for(let r=0;r<n.length;r+=2)if(n[r]===t)return n[r+1];return null}function m5(e,t,n,r){return-1===n?function g5(e,t){return 11&e.type?Eu(e,t):4&e.type?Uh(e,t):null}(t,e):-2===n?function y5(e,t,n){return n===Cu?Eu(t,e):n===qo?Uh(t,e):n===_o?VC(t,e):void 0}(e,t,r):oa(e,e[Fe],n,t)}function GC(e,t,n,r){const i=t[Ho].queries[r];if(null===i.matches){const o=e.data,s=n.matches,a=[];for(let u=0;null!==s&&u<s.length;u+=2){const c=s[u];a.push(c<0?null:m5(t,o[c],s[u+1],n.metadata.read))}i.matches=a}return i.matches}function Jy(e,t,n,r){const i=e.queries.getByIndex(n),o=i.matches;if(null!==o){const s=GC(e,t,i,n);for(let a=0;a<o.length;a+=2){const u=o[a];if(u>0)r.push(s[a/2]);else{const c=o[a+1],l=t[-u];for(let d=Fn;d<l.length;d++){const h=l[d];h[fl]===h[Pn]&&Jy(h[Fe],h,c,r)}if(null!==l[mu]){const d=l[mu];for(let h=0;h<d.length;h++){const g=d[h];Jy(g[Fe],g,c,r)}}}}}return r}function WC(e,t,n){const r=Bt();return r.firstCreatePass&&(function KC(e,t,n){null===e.queries&&(e.queries=new Zy),e.queries.track(new Xy(t,n))}(r,new zC(e,t,n),-1),!(2&~t)&&(r.staticViewQueries=!0)),function qC(e,t,n){const r=new U0(!(4&~n));return function F8(e,t,n,r){const i=sC(t);i.push(n),e.firstCreatePass&&aC(e).push(r,i.length-1)}(e,t,r,r.destroy),(t[Ho]??=new Qy).queries.push(new Ky(r))-1}(r,me(),t)}function tv(e,t){return e.queries.getByIndex(t)}function QC(e,t){const n=e[Fe],r=tv(n,t);return r.crossesNgTemplate?Jy(n,e,t,[]):GC(n,e,r,t)}class ca{}class H5{}class rv extends ca{constructor(t,n,r){super(),this._parent=n,this._bootstrapComponents=[],this.destroyCbs=[],this.componentFactoryResolver=new FC(this);const i=function Kt(e,t){const n=e[Ws]||null;if(!n&&!0===t)throw new Error(`Type ${mn(e)} does not have '\u0275mod' property.`);return n}(t);this._bootstrapComponents=function Jr(e){return e instanceof Function?e():e}(i.bootstrap),this._r3Injector=OD(t,n,[{provide:ca,useValue:this},{provide:Wh,useValue:this.componentFactoryResolver},...r],mn(t),new Set(["environment"])),this._r3Injector.resolveInjectorInitializers(),this.instance=this._r3Injector.get(t)}get injector(){return this._r3Injector}destroy(){const t=this._r3Injector;!t.destroyed&&t.destroy(),this.destroyCbs.forEach(n=>n()),this.destroyCbs=null}onDestroy(t){this.destroyCbs.push(t)}}class iv extends H5{constructor(t){super(),this.moduleType=t}create(t){return new rv(this.moduleType,t,[])}}let Kl=(()=>{class e{constructor(){this.taskId=0,this.pendingTasks=new Set,this.hasPendingTasks=new Ym(!1)}get _hasPendingTasks(){return this.hasPendingTasks.value}add(){this._hasPendingTasks||this.hasPendingTasks.next(!0);const n=this.taskId++;return this.pendingTasks.add(n),n}remove(n){this.pendingTasks.delete(n),0===this.pendingTasks.size&&this._hasPendingTasks&&this.hasPendingTasks.next(!1)}ngOnDestroy(){this.pendingTasks.clear(),this._hasPendingTasks&&this.hasPendingTasks.next(!1)}static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275prov=At({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();function Ln(e,t,n){return!Object.is(e[t],n)&&(e[t]=n,!0)}function Lu(e,t,n,r,i,o,s,a){const u=me(),c=Bt(),l=e+Et,d=c.firstCreatePass?function K5(e,t,n,r,i,o,s,a,u){const c=t.consts,l=Ou(t,e,4,s||null,ho(c,a));Iy(t,n,l,ho(c,u)),ch(t,l);const d=l.tView=My(2,l,r,i,o,t.directiveRegistry,t.pipeRegistry,null,t.schemas,c,null);return null!==t.queries&&(t.queries.template(t,l),d.queries=t.queries.embeddedTView(l)),l}(l,c,u,t,n,r,i,o,s):c.data[l];po(d,!1);const h=yx(c,u,d,e);vl()&&Fh(c,u,h,d),mr(h,u);const g=iC(h,u,h,d);return u[l]=g,jh(u,g),function UC(e,t,n){return Yy(e,t,n)}(g,d,u),oh(d)&&Cy(c,u,d),null!=s&&xy(u,d,a),Lu}let yx=function vx(e,t,n,r){return go(!0),t[vt].createComment("")};function gv(e,t,n,r){const i=me();return Ln(i,Pi(),t)&&(Bt(),bo(bn(),i,e,t,n,r)),gv}function ap(e,t){return e<<17|t<<2}function vs(e){return e>>17&32767}function mv(e){return 2|e}function da(e){return(131068&e)>>2}function yv(e,t){return-131069&e|t<<2}function vv(e){return 1|e}function Kx(e,t,n,r){const i=e[n+1],o=null===t;let s=r?vs(i):da(i),a=!1;for(;0!==s&&(!1===a||o);){const c=e[s+1];P6(e[s],t)&&(a=!0,e[s+1]=r?vv(c):mv(c)),s=r?vs(c):da(c)}a&&(e[n+1]=r?mv(i):vv(i))}function P6(e,t){return null===e||null==t||(Array.isArray(e)?e[1]:e)===t||!(!Array.isArray(e)||"string"!=typeof t)&&Gn(e,t)>=0}function ec(e,t,n){const r=me();return Ln(r,Pi(),t)&&function $r(e,t,n,r,i,o,s,a){const u=Er(t,n);let l,c=t.inputs;!a&&null!=c&&(l=c[r])?(Ay(e,n,l,r,i),na(t)&&function V8(e,t){const n=Xr(t,e);16&n[st]||(n[st]|=64)}(n,t.index)):3&t.type&&(r=function j8(e){return"class"===e?"className":"for"===e?"htmlFor":"formaction"===e?"formAction":"innerHtml"===e?"innerHTML":"readonly"===e?"readOnly":"tabindex"===e?"tabIndex":e}(r),i=null!=s?s(i,t.value||"",r):i,o.setProperty(u,r,i))}(Bt(),bn(),r,e,t,r[vt],n,!1),ec}function bv(e,t,n,r,i){const s=i?"class":"style";Ay(e,n,t.inputs[s],s,r)}function wv(e,t,n){return function Li(e,t,n,r){const i=me(),o=Bt(),s=function $o(e){const t=bt.lFrame,n=t.bindingIndex;return t.bindingIndex=t.bindingIndex+e,n}(2);o.firstUpdatePass&&function iM(e,t,n,r){const i=e.data;if(null===i[n+1]){const o=i[gr()],s=function rM(e,t){return t>=e.expandoStartIndex}(e,n);(function uM(e,t){return!!(e.flags&(t?8:16))})(o,r)&&null===t&&!s&&(t=!1),t=function z6(e,t,n,r){const i=function S0(e){const t=bt.lFrame.currentDirectiveIndex;return-1===t?null:e[t]}(e);let o=r?t.residualClasses:t.residualStyles;if(null===i)0===(r?t.classBindings:t.styleBindings)&&(n=tf(n=_v(null,e,t,n,r),t.attrs,r),o=null);else{const s=t.directiveStylingLast;if(-1===s||e[s]!==i)if(n=_v(i,e,t,n,r),null===o){let u=function G6(e,t,n){const r=n?t.classBindings:t.styleBindings;if(0!==da(r))return e[vs(r)]}(e,t,r);void 0!==u&&Array.isArray(u)&&(u=_v(null,e,t,u[1],r),u=tf(u,t.attrs,r),function q6(e,t,n,r){e[vs(n?t.classBindings:t.styleBindings)]=r}(e,t,r,u))}else o=function W6(e,t,n){let r;const i=t.directiveEnd;for(let o=1+t.directiveStylingLast;o<i;o++)r=tf(r,e[o].hostAttrs,n);return tf(r,t.attrs,n)}(e,t,r)}return void 0!==o&&(r?t.residualClasses=o:t.residualStyles=o),n}(i,o,t,r),function O6(e,t,n,r,i,o){let s=o?t.classBindings:t.styleBindings,a=vs(s),u=da(s);e[r]=n;let l,c=!1;if(Array.isArray(n)?(l=n[1],(null===l||Gn(n,l)>0)&&(c=!0)):l=n,i)if(0!==u){const h=vs(e[a+1]);e[r+1]=ap(h,a),0!==h&&(e[h+1]=yv(e[h+1],r)),e[a+1]=function A6(e,t){return 131071&e|t<<17}(e[a+1],r)}else e[r+1]=ap(a,0),0!==a&&(e[a+1]=yv(e[a+1],r)),a=r;else e[r+1]=ap(u,0),0===a?a=r:e[u+1]=yv(e[u+1],r),u=r;c&&(e[r+1]=mv(e[r+1])),Kx(e,l,r,!0),Kx(e,l,r,!1),function R6(e,t,n,r,i){const o=i?e.residualClasses:e.residualStyles;null!=o&&"string"==typeof t&&Gn(o,t)>=0&&(n[r+1]=vv(n[r+1]))}(t,l,e,r,o),s=ap(a,u),o?t.classBindings=s:t.styleBindings=s}(i,o,t,n,s,r)}}(o,e,s,r),t!==Mt&&Ln(i,s,t)&&function sM(e,t,n,r,i,o,s,a){if(!(3&t.type))return;const u=e.data,c=u[a+1],l=function k6(e){return!(1&~e)}(c)?aM(u,t,n,i,da(c),s):void 0;up(l)||(up(o)||function N6(e){return!(2&~e)}(c)&&(o=aM(u,null,n,i,a,s)),function I8(e,t,n,r,i){if(t)i?e.addClass(n,r):e.removeClass(n,r);else{let o=-1===r.indexOf("-")?void 0:gs.DashCase;null==i?e.removeStyle(n,r,o):("string"==typeof i&&i.endsWith("!important")&&(i=i.slice(0,-10),o|=gs.Important),e.setStyle(n,r,i,o))}}(r,s,function pl(e,t){return an(t[e])}(gr(),n),i,o))}(o,o.data[gr()],i,i[vt],e,i[s+1]=function Z6(e,t){return null==e||""===e||("string"==typeof t?e+=t:"object"==typeof e&&(e=mn(function ps(e){return e instanceof gE?e.changingThisBreaksApplicationSecurity:e}(e)))),e}(t,n),r,s)}(e,t,n,!1),wv}function _v(e,t,n,r,i){let o=null;const s=n.directiveEnd;let a=n.directiveStylingLast;for(-1===a?a=n.directiveStart:a++;a<s&&(o=t[a],r=tf(r,o.hostAttrs,i),o!==e);)a++;return null!==e&&(n.directiveStylingLast=a),r}function tf(e,t,n){const r=n?1:2;let i=-1;if(null!==t)for(let o=0;o<t.length;o++){const s=t[o];"number"==typeof s?i=s:i===r&&(Array.isArray(e)||(e=void 0===e?[]:["",e]),Ht(e,s,!!n||t[++o]))}return void 0===e?null:e}function aM(e,t,n,r,i,o){const s=null===t;let a;for(;i>0;){const u=e[i],c=Array.isArray(u),l=c?u[1]:u,d=null===l;let h=n[i+1];h===Mt&&(h=d?St:void 0);let g=d?fs(h,r):l===r?h:void 0;if(c&&!up(g)&&(g=fs(u,r)),up(g)&&(a=g,s))return a;const y=e[i+1];i=s?vs(y):da(y)}if(null!==t){let u=o?t.residualClasses:t.residualStyles;null!=u&&(a=fs(u,r))}return a}function up(e){return void 0!==e}function bs(e,t,n,r){const i=me(),o=Bt(),s=Et+e,a=i[vt],u=o.firstCreatePass?function w4(e,t,n,r,i,o){const s=t.consts,u=Ou(t,e,2,r,ho(s,i));return Iy(t,n,u,ho(s,o)),null!==u.attrs&&Kh(u,u.attrs,!1),null!==u.mergedAttrs&&Kh(u,u.mergedAttrs,!0),null!==t.queries&&t.queries.elementStart(t,u),u}(s,o,i,t,n,r):o.data[s],c=dM(o,i,u,a,t,e);i[s]=c;const l=oh(u);return po(u,!0),YE(a,c,u),!function Zl(e){return!(32&~e.flags)}(u)&&vl()&&Fh(o,i,c,u),0===function s3(){return bt.lFrame.elementDepthCount}()&&mr(c,i),function a3(){bt.lFrame.elementDepthCount++}(),l&&(Cy(o,i,u),Ey(o,u,i)),null!==r&&xy(i,u),bs}function ws(){let e=nn();x0()?function M0(){bt.lFrame.isParent=!1}():(e=e.parent,po(e,!1));const t=e;(function c3(e){return bt.skipHydrationRootTNode===e})(t)&&function h3(){bt.skipHydrationRootTNode=null}(),function u3(){bt.lFrame.elementDepthCount--}();const n=Bt();return n.firstCreatePass&&(ch(n,e),h0(e)&&n.queries.elementEnd(e)),null!=t.classesWithoutHost&&function I3(e){return!!(8&e.flags)}(t)&&bv(n,t,me(),t.classesWithoutHost,!0),null!=t.stylesWithoutHost&&function S3(e){return!!(16&e.flags)}(t)&&bv(n,t,me(),t.stylesWithoutHost,!1),ws}function tc(e,t,n,r){return bs(e,t,n,r),ws(),tc}let dM=(e,t,n,r,i,o)=>(go(!0),Oh(r,i,function pD(){return bt.lFrame.currentNamespace}()));const rc="en-US";let wM=rc;function cf(e,t,n,r){const i=me(),o=Bt(),s=nn();return function Nv(e,t,n,r,i,o,s){const a=oh(r),c=e.firstCreatePass&&aC(e),l=t[vn],d=sC(t);let h=!0;if(3&r.type||s){const v=Er(r,t),b=s?s(v):v,_=d.length,E=s?I=>s(an(I[r.index])):r.index;let C=null;if(!s&&a&&(C=function C7(e,t,n,r){const i=e.cleanup;if(null!=i)for(let o=0;o<i.length-1;o+=2){const s=i[o];if(s===n&&i[o+1]===r){const a=t[hu],u=i[o+2];return a.length>u?a[u]:null}"string"==typeof s&&(o+=2)}return null}(e,t,i,r.index)),null!==C)(C.__ngLastListenerFn__||C).__ngNextListenerFn__=o,C.__ngLastListenerFn__=o,h=!1;else{o=YM(r,t,l,o,!1);const I=n.listen(b,i,o);d.push(o,I),c&&c.push(i,E,_,_+1)}}else o=YM(r,t,l,o,!1);const g=r.outputs;let y;if(h&&null!==g&&(y=g[i])){const v=y.length;if(v)for(let b=0;b<v;b+=2){const R=t[y[b]][y[b+1]].subscribe(o),G=d.length;d.push(o,R),c&&c.push(i,r.index,G,-(G+1))}}}(o,i,i[vt],s,e,t,r),cf}function WM(e,t,n,r){const i=x(null);try{return fo(6,t,n),!1!==n(r)}catch(o){return Vh(e,o),!1}finally{fo(7,t,n),x(i)}}function YM(e,t,n,r,i){return function o(s){if(s===Function)return r;Bl(e.componentOffset>-1?Xr(e.index,t):t);let u=WM(t,n,r,s),c=o.__ngNextListenerFn__;for(;c;)u=WM(t,n,c,s)&&u,c=c.__ngNextListenerFn__;return i&&!1===u&&s.preventDefault(),u}}function KM(e=1){return function b3(e){return(bt.lFrame.contextLView=function tD(e,t){for(;e>0;)t=t[pu],e--;return t}(e,bt.lFrame.contextLView))[vn]}(e)}function aI(){return function ev(e,t){return e[Ho].queries[t].queryList}(me(),T0())}let vI=(e,t,n,r,i)=>(go(!0),function gy(e,t){return e.createText(t)}(t[vt],r));function kI(e,t,n,r){return function OI(e,t,n,r,i,o){const s=t+n;return Ln(e,s,i)?function Do(e,t,n){return e[t]=n}(e,s+1,o?r.call(o,i):r(i)):function lf(e,t){const n=e[t];return n===Mt?void 0:n}(e,s+1)}(me(),function Cr(){const e=bt.lFrame;let t=e.bindingRootIndex;return-1===t&&(t=e.bindingRootIndex=e.tView.bindingStartIndex),t}(),e,t,n,r)}const rS=new ut(""),mp=new ut("");let Gv,$v=(()=>{class e{constructor(n,r,i){this._ngZone=n,this.registry=r,this._pendingCount=0,this._isZoneStable=!0,this._callbacks=[],this.taskTrackingZone=null,Gv||(function fB(e){Gv=e}(i),i.addToWindow(r)),this._watchAngularEvents(),n.run(()=>{this.taskTrackingZone=typeof Zone>"u"?null:Zone.current.get("TaskTrackingZone")})}_watchAngularEvents(){this._ngZone.onUnstable.subscribe({next:()=>{this._isZoneStable=!1}}),this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.subscribe({next:()=>{Cn.assertNotInAngularZone(),queueMicrotask(()=>{this._isZoneStable=!0,this._runCallbacksIfReady()})}})})}increasePendingRequestCount(){return this._pendingCount+=1,this._pendingCount}decreasePendingRequestCount(){if(this._pendingCount-=1,this._pendingCount<0)throw new Error("pending async requests below zero");return this._runCallbacksIfReady(),this._pendingCount}isStable(){return this._isZoneStable&&0===this._pendingCount&&!this._ngZone.hasPendingMacrotasks}_runCallbacksIfReady(){if(this.isStable())queueMicrotask(()=>{for(;0!==this._callbacks.length;){let n=this._callbacks.pop();clearTimeout(n.timeoutId),n.doneCb()}});else{let n=this.getPendingTasks();this._callbacks=this._callbacks.filter(r=>!r.updateCb||!r.updateCb(n)||(clearTimeout(r.timeoutId),!1))}}getPendingTasks(){return this.taskTrackingZone?this.taskTrackingZone.macroTasks.map(n=>({source:n.source,creationLocation:n.creationLocation,data:n.data})):[]}addCallback(n,r,i){let o=-1;r&&r>0&&(o=setTimeout(()=>{this._callbacks=this._callbacks.filter(s=>s.timeoutId!==o),n()},r)),this._callbacks.push({doneCb:n,timeoutId:o,updateCb:i})}whenStable(n,r,i){if(i&&!this.taskTrackingZone)throw new Error('Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/plugins/task-tracking" loaded?');this.addCallback(n,r,i),this._runCallbacksIfReady()}getPendingRequestCount(){return this._pendingCount}registerApplication(n){this.registry.registerApplication(n,this)}unregisterApplication(n){this.registry.unregisterApplication(n)}findProviders(n,r,i){return[]}static{this.\u0275fac=function(r){return new(r||e)(Rt(Cn),Rt(zv),Rt(mp))}}static{this.\u0275prov=At({token:e,factory:e.\u0275fac})}}return e})(),zv=(()=>{class e{constructor(){this._applications=new Map}registerApplication(n,r){this._applications.set(n,r)}unregisterApplication(n){this._applications.delete(n)}unregisterAllApplications(){this._applications.clear()}getTestability(n){return this._applications.get(n)||null}getAllTestabilities(){return Array.from(this._applications.values())}getAllRootElements(){return Array.from(this._applications.keys())}findTestabilityInTree(n,r=!0){return Gv?.findTestabilityInTree(this,n,r)??null}static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275prov=At({token:e,factory:e.\u0275fac,providedIn:"platform"})}}return e})();function qv(e){return!!e&&"function"==typeof e.then}function iS(e){return!!e&&"function"==typeof e.subscribe}const dB=new ut("");let Wv=(()=>{class e{constructor(){this.initialized=!1,this.done=!1,this.donePromise=new Promise((n,r)=>{this.resolve=n,this.reject=r}),this.appInits=_t(dB,{optional:!0})??[]}runInitializers(){if(this.initialized)return;const n=[];for(const i of this.appInits){const o=i();if(qv(o))n.push(o);else if(iS(o)){const s=new Promise((a,u)=>{o.subscribe({complete:a,error:u})});n.push(s)}}const r=()=>{this.done=!0,this.resolve()};Promise.all(n).then(()=>{r()}).catch(i=>{this.reject(i)}),0===n.length&&r(),this.initialized=!0}static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275prov=At({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();const oS=new ut("");function uS(e,t){return Array.isArray(t)?t.reduce(uS,e):{...e,...t}}let pa=(()=>{class e{constructor(){this._bootstrapListeners=[],this._runningTick=!1,this._destroyed=!1,this._destroyListeners=[],this._views=[],this.internalErrorHandler=_t(PD),this.afterRenderEffectManager=_t(zl),this.externalTestViews=new Set,this.beforeRender=new eo,this.afterTick=new eo,this.componentTypes=[],this.components=[],this.isStable=_t(Kl).hasPendingTasks.pipe(function is(e,t){return function(r){if("function"!=typeof e)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return r.lift(new os(e,t))}}(n=>!n)),this._injector=_t(co)}get destroyed(){return this._destroyed}get injector(){return this._injector}bootstrap(n,r){const i=n instanceof DC;if(!this._injector.get(Wv).done)throw!i&&function fi(e){const t=He(e)||Vt(e)||qt(e);return null!==t&&t.standalone}(n),new Ae(405,!1);let s;s=i?n:this._injector.get(Wh).resolveComponentFactory(n),this.componentTypes.push(s.componentType);const a=function hB(e){return e.isBoundToModule}(s)?void 0:this._injector.get(ca),c=s.create(di.NULL,[],r||s.selector,a),l=c.location.nativeElement,d=c.injector.get(rS,null);return d?.registerApplication(l),c.onDestroy(()=>{this.detachView(c.hostView),yp(this.components,c),d?.unregisterApplication(l)}),this._loadComponent(c),c}tick(){this._tick(!0)}_tick(n){if(this._runningTick)throw new Ae(101,!1);const r=x(null);try{this._runningTick=!0,this.detectChangesInAttachedViews(n)}catch(i){this.internalErrorHandler(i)}finally{this.afterTick.next(),this._runningTick=!1,x(r)}}detectChangesInAttachedViews(n){let r=0;const i=this.afterRenderEffectManager;for(;;){if(r===dC)throw new Ae(103,!1);if(n){const o=0===r;this.beforeRender.next(o);for(let{_lView:s,notifyErrorHandler:a}of this._views)gB(s,o,a)}if(r++,i.executeInternalCallbacks(),![...this.externalTestViews.keys(),...this._views].some(({_lView:o})=>Yv(o))&&(i.execute(),![...this.externalTestViews.keys(),...this._views].some(({_lView:o})=>Yv(o))))break}}attachView(n){const r=n;this._views.push(r),r.attachToAppRef(this)}detachView(n){const r=n;yp(this._views,r),r.detachFromAppRef()}_loadComponent(n){this.attachView(n.hostView),this.tick(),this.components.push(n);const r=this._injector.get(oS,[]);[...this._bootstrapListeners,...r].forEach(i=>i(n))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(n=>n()),this._views.slice().forEach(n=>n.destroy())}finally{this._destroyed=!0,this._views=[],this._bootstrapListeners=[],this._destroyListeners=[]}}onDestroy(n){return this._destroyListeners.push(n),()=>yp(this._destroyListeners,n)}destroy(){if(this._destroyed)throw new Ae(406,!1);const n=this._injector;n.destroy&&!n.destroyed&&n.destroy()}get viewCount(){return this._views.length}warnIfDestroyed(){}static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275prov=At({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();function yp(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}function gB(e,t,n){!t&&!Yv(e)||function mB(e,t,n){let r;n?(r=0,e[st]|=1024):r=64&e[st]?0:1,Hh(e,t,r)}(e,n,t)}function Yv(e){return w0(e)}let wB=(()=>{class e{constructor(){this.zone=_t(Cn),this.applicationRef=_t(pa)}initialize(){this._onMicrotaskEmptySubscription||(this._onMicrotaskEmptySubscription=this.zone.onMicrotaskEmpty.subscribe({next:()=>{this.zone.run(()=>{this.applicationRef.tick()})}}))}ngOnDestroy(){this._onMicrotaskEmptySubscription?.unsubscribe()}static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275prov=At({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();function _B(){const e=_t(Cn),t=_t(yo);return n=>e.runOutsideAngular(()=>t.handleError(n))}let EB=(()=>{class e{constructor(){this.subscription=new ln,this.initialized=!1,this.zone=_t(Cn),this.pendingTasks=_t(Kl)}initialize(){if(this.initialized)return;this.initialized=!0;let n=null;!this.zone.isStable&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(n=this.pendingTasks.add()),this.zone.runOutsideAngular(()=>{this.subscription.add(this.zone.onStable.subscribe(()=>{Cn.assertNotInAngularZone(),queueMicrotask(()=>{null!==n&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(this.pendingTasks.remove(n),n=null)})}))}),this.subscription.add(this.zone.onUnstable.subscribe(()=>{Cn.assertInAngularZone(),n??=this.pendingTasks.add()}))}ngOnDestroy(){this.subscription.unsubscribe()}static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275prov=At({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();const Wo=new ut("",{providedIn:"root",factory:()=>_t(Wo,Ft.Optional|Ft.SkipSelf)||function CB(){return typeof $localize<"u"&&$localize.locale||rc}()}),Kv=new ut("");let dS=(()=>{class e{constructor(n){this._injector=n,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(n,r){const i=function YL(e="zone.js",t){return"noop"===e?new NC:"zone.js"===e?new Cn(t):e}(r?.ngZone,function fS(e){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:e?.eventCoalescing??!1,shouldCoalesceRunChangeDetection:e?.runCoalescing??!1}}({eventCoalescing:r?.ngZoneEventCoalescing,runCoalescing:r?.ngZoneRunCoalescing}));return i.run(()=>{const o=function $5(e,t,n){return new rv(e,t,n)}(n.moduleType,this.injector,function lS(e){return[{provide:Cn,useFactory:e},{provide:ao,multi:!0,useFactory:()=>{const t=_t(wB,{optional:!0});return()=>t.initialize()}},{provide:ao,multi:!0,useFactory:()=>{const t=_t(EB);return()=>{t.initialize()}}},{provide:PD,useFactory:_B}]}(()=>i)),s=o.injector.get(yo,null);return i.runOutsideAngular(()=>{const a=i.onError.subscribe({next:u=>{s.handleError(u)}});o.onDestroy(()=>{yp(this._modules,o),a.unsubscribe()})}),function aS(e,t,n){try{const r=n();return qv(r)?r.catch(i=>{throw t.runOutsideAngular(()=>e.handleError(i)),i}):r}catch(r){throw t.runOutsideAngular(()=>e.handleError(r)),r}}(s,i,()=>{const a=o.injector.get(Wv);return a.runInitializers(),a.donePromise.then(()=>(function _M(e){"string"==typeof e&&(wM=e.toLowerCase().replace(/_/g,"-"))}(o.injector.get(Wo,rc)||rc),this._moduleDoBootstrap(o),o))})})}bootstrapModule(n,r=[]){const i=uS({},r);return function bB(e,t,n){const r=new iv(n);return Promise.resolve(r)}(0,0,n).then(o=>this.bootstrapModuleFactory(o,i))}_moduleDoBootstrap(n){const r=n.injector.get(pa);if(n._bootstrapComponents.length>0)n._bootstrapComponents.forEach(i=>r.bootstrap(i));else{if(!n.instance.ngDoBootstrap)throw new Ae(-403,!1);n.instance.ngDoBootstrap(r)}this._modules.push(n)}onDestroy(n){this._destroyListeners.push(n)}get injector(){return this._injector}destroy(){if(this._destroyed)throw new Ae(404,!1);this._modules.slice().forEach(r=>r.destroy()),this._destroyListeners.forEach(r=>r());const n=this._injector.get(Kv,null);n&&(n.forEach(r=>r()),n.clear()),this._destroyed=!0}get destroyed(){return this._destroyed}static{this.\u0275fac=function(r){return new(r||e)(Rt(di))}}static{this.\u0275prov=At({token:e,factory:e.\u0275fac,providedIn:"platform"})}}return e})(),_s=null;const hS=new ut("");function pS(e,t,n=[]){const r=`Platform: ${t}`,i=new ut(r);return(o=[])=>{let s=Qv();if(!s||s.injector.get(hS,!1)){const a=[...n,...o,{provide:i,useValue:!0}];e?e(a):function IB(e){if(_s&&!_s.get(hS,!1))throw new Ae(400,!1);(function sS(){!function Ga(e){za=e}(()=>{throw new Ae(600,!1)})})(),_s=e;const t=e.get(dS);(function mS(e){e.get(rE,null)?.forEach(n=>n())})(e)}(function gS(e=[],t){return di.create({name:t,providers:[{provide:s0,useValue:"platform"},{provide:Kv,useValue:new Set([()=>_s=null])},...e]})}(a,r))}return function SB(e){const t=Qv();if(!t)throw new Ae(401,!1);return t}()}}function Qv(){return _s?.get(dS)??null}const $B=pS(null,"core",[]);let zB=(()=>{class e{constructor(n){}static{this.\u0275fac=function(r){return new(r||e)(Rt(pa))}}static{this.\u0275mod=gt({type:e})}static{this.\u0275inj=Fo({})}}return e})(),QS=null;function i1(){return QS}class Mj{}const ma=new ut(""),p1=/\s+/,oT=[];let sT=(()=>{class e{constructor(n,r){this._ngEl=n,this._renderer=r,this.initialClasses=oT,this.stateMap=new Map}set klass(n){this.initialClasses=null!=n?n.trim().split(p1):oT}set ngClass(n){this.rawClass="string"==typeof n?n.trim().split(p1):n}ngDoCheck(){for(const r of this.initialClasses)this._updateState(r,!0);const n=this.rawClass;if(Array.isArray(n)||n instanceof Set)for(const r of n)this._updateState(r,!0);else if(null!=n)for(const r of Object.keys(n))this._updateState(r,!!n[r]);this._applyStateDiff()}_updateState(n,r){const i=this.stateMap.get(n);void 0!==i?(i.enabled!==r&&(i.changed=!0,i.enabled=r),i.touched=!0):this.stateMap.set(n,{enabled:r,changed:!0,touched:!0})}_applyStateDiff(){for(const n of this.stateMap){const r=n[0],i=n[1];i.changed?(this._toggleClass(r,i.enabled),i.changed=!1):i.touched||(i.enabled&&this._toggleClass(r,!1),this.stateMap.delete(r)),i.touched=!1}}_toggleClass(n,r){(n=n.trim()).length>0&&n.split(p1).forEach(i=>{r?this._renderer.addClass(this._ngEl.nativeElement,i):this._renderer.removeClass(this._ngEl.nativeElement,i)})}static{this.\u0275fac=function(r){return new(r||e)(kt(Cu),kt(xC))}}static{this.\u0275dir=dt({type:e,selectors:[["","ngClass",""]],inputs:{klass:[m.None,"class","klass"],ngClass:"ngClass"},standalone:!0})}}return e})(),cT=(()=>{class e{constructor(n,r){this._viewContainer=n,this._context=new mV,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=r}set ngIf(n){this._context.$implicit=this._context.ngIf=n,this._updateView()}set ngIfThen(n){lT("ngIfThen",n),this._thenTemplateRef=n,this._thenViewRef=null,this._updateView()}set ngIfElse(n){lT("ngIfElse",n),this._elseTemplateRef=n,this._elseViewRef=null,this._updateView()}_updateView(){this._context.$implicit?this._thenViewRef||(this._viewContainer.clear(),this._elseViewRef=null,this._thenTemplateRef&&(this._thenViewRef=this._viewContainer.createEmbeddedView(this._thenTemplateRef,this._context))):this._elseViewRef||(this._viewContainer.clear(),this._thenViewRef=null,this._elseTemplateRef&&(this._elseViewRef=this._viewContainer.createEmbeddedView(this._elseTemplateRef,this._context)))}static ngTemplateContextGuard(n,r){return!0}static{this.\u0275fac=function(r){return new(r||e)(kt(_o),kt(qo))}}static{this.\u0275dir=dt({type:e,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"},standalone:!0})}}return e})();class mV{constructor(){this.$implicit=null,this.ngIf=null}}function lT(e,t){if(t&&!t.createEmbeddedView)throw new Error(`${e} must be a TemplateRef, but received '${mn(t)}'.`)}let UV=(()=>{class e{static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275mod=gt({type:e})}static{this.\u0275inj=Fo({})}}return e})();function pT(e){return"server"===e}class _H extends Mj{constructor(){super(...arguments),this.supportsDOMEvents=!0}}class w1 extends _H{static makeCurrent(){!function xj(e){QS??=e}(new w1)}onAndCancel(t,n,r){return t.addEventListener(n,r),()=>{t.removeEventListener(n,r)}}dispatchEvent(t,n){t.dispatchEvent(n)}remove(t){t.parentNode&&t.parentNode.removeChild(t)}createElement(t,n){return(n=n||this.getDefaultDocument()).createElement(t)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(t){return t.nodeType===Node.ELEMENT_NODE}isShadowRoot(t){return t instanceof DocumentFragment}getGlobalEventTarget(t,n){return"window"===n?window:"document"===n?t:"body"===n?t.body:null}getBaseHref(t){const n=function DH(){return bf=bf||document.querySelector("base"),bf?bf.getAttribute("href"):null}();return null==n?null:function EH(e){return new URL(e,document.baseURI).pathname}(n)}resetBaseElement(){bf=null}getUserAgent(){return window.navigator.userAgent}getCookie(t){return function dV(e,t){t=encodeURIComponent(t);for(const n of e.split(";")){const r=n.indexOf("="),[i,o]=-1==r?[n,""]:[n.slice(0,r),n.slice(r+1)];if(i.trim()===t)return decodeURIComponent(o)}return null}(document.cookie,t)}}let bf=null,xH=(()=>{class e{build(){return new XMLHttpRequest}static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275prov=At({token:e,factory:e.\u0275fac})}}return e})();const _1=new ut("");let ET=(()=>{class e{constructor(n,r){this._zone=r,this._eventNameToPlugin=new Map,n.forEach(i=>{i.manager=this}),this._plugins=n.slice().reverse()}addEventListener(n,r,i){return this._findPluginFor(r).addEventListener(n,r,i)}getZone(){return this._zone}_findPluginFor(n){let r=this._eventNameToPlugin.get(n);if(r)return r;if(r=this._plugins.find(o=>o.supports(n)),!r)throw new Ae(5101,!1);return this._eventNameToPlugin.set(n,r),r}static{this.\u0275fac=function(r){return new(r||e)(Rt(_1),Rt(Cn))}}static{this.\u0275prov=At({token:e,factory:e.\u0275fac})}}return e})();class CT{constructor(t){this._doc=t}}const D1="ng-app-id";let xT=(()=>{class e{constructor(n,r,i,o={}){this.doc=n,this.appId=r,this.nonce=i,this.platformId=o,this.styleRef=new Map,this.hostNodes=new Set,this.styleNodesInDOM=this.collectServerRenderedStyles(),this.platformIsServer=pT(o),this.resetHostNodes()}addStyles(n){for(const r of n)1===this.changeUsageCount(r,1)&&this.onStyleAdded(r)}removeStyles(n){for(const r of n)this.changeUsageCount(r,-1)<=0&&this.onStyleRemoved(r)}ngOnDestroy(){const n=this.styleNodesInDOM;n&&(n.forEach(r=>r.remove()),n.clear());for(const r of this.getAllStyles())this.onStyleRemoved(r);this.resetHostNodes()}addHost(n){this.hostNodes.add(n);for(const r of this.getAllStyles())this.addStyleToHost(n,r)}removeHost(n){this.hostNodes.delete(n)}getAllStyles(){return this.styleRef.keys()}onStyleAdded(n){for(const r of this.hostNodes)this.addStyleToHost(r,n)}onStyleRemoved(n){const r=this.styleRef;r.get(n)?.elements?.forEach(i=>i.remove()),r.delete(n)}collectServerRenderedStyles(){const n=this.doc.head?.querySelectorAll(`style[${D1}="${this.appId}"]`);if(n?.length){const r=new Map;return n.forEach(i=>{null!=i.textContent&&r.set(i.textContent,i)}),r}return null}changeUsageCount(n,r){const i=this.styleRef;if(i.has(n)){const o=i.get(n);return o.usage+=r,o.usage}return i.set(n,{usage:r,elements:[]}),r}getStyleElement(n,r){const i=this.styleNodesInDOM,o=i?.get(r);if(o?.parentNode===n)return i.delete(r),o.removeAttribute(D1),o;{const s=this.doc.createElement("style");return this.nonce&&s.setAttribute("nonce",this.nonce),s.textContent=r,this.platformIsServer&&s.setAttribute(D1,this.appId),n.appendChild(s),s}}addStyleToHost(n,r){const i=this.getStyleElement(n,r),o=this.styleRef,s=o.get(r)?.elements;s?s.push(i):o.set(r,{elements:[i],usage:1})}resetHostNodes(){const n=this.hostNodes;n.clear(),n.add(this.doc.head)}static{this.\u0275fac=function(r){return new(r||e)(Rt(ma),Rt(_h),Rt(iE,8),Rt(xu))}}static{this.\u0275prov=At({token:e,factory:e.\u0275fac})}}return e})();const E1={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/MathML/"},C1=/%COMP%/g,TH=new ut("",{providedIn:"root",factory:()=>!0});function IT(e,t){return t.map(n=>n.replace(C1,e))}let ST=(()=>{class e{constructor(n,r,i,o,s,a,u,c=null){this.eventManager=n,this.sharedStylesHost=r,this.appId=i,this.removeStylesOnCompDestroy=o,this.doc=s,this.platformId=a,this.ngZone=u,this.nonce=c,this.rendererByCompId=new Map,this.platformIsServer=pT(a),this.defaultRenderer=new x1(n,s,u,this.platformIsServer)}createRenderer(n,r){if(!n||!r)return this.defaultRenderer;this.platformIsServer&&r.encapsulation===p.ShadowDom&&(r={...r,encapsulation:p.Emulated});const i=this.getOrCreateRenderer(n,r);return i instanceof NT?i.applyToHost(n):i instanceof M1&&i.applyStyles(),i}getOrCreateRenderer(n,r){const i=this.rendererByCompId;let o=i.get(r.id);if(!o){const s=this.doc,a=this.ngZone,u=this.eventManager,c=this.sharedStylesHost,l=this.removeStylesOnCompDestroy,d=this.platformIsServer;switch(r.encapsulation){case p.Emulated:o=new NT(u,c,r,this.appId,l,s,a,d);break;case p.ShadowDom:return new OH(u,c,n,r,s,a,this.nonce,d);default:o=new M1(u,c,r,l,s,a,d)}i.set(r.id,o)}return o}ngOnDestroy(){this.rendererByCompId.clear()}static{this.\u0275fac=function(r){return new(r||e)(Rt(ET),Rt(xT),Rt(_h),Rt(TH),Rt(ma),Rt(xu),Rt(Cn),Rt(iE))}}static{this.\u0275prov=At({token:e,factory:e.\u0275fac})}}return e})();class x1{constructor(t,n,r,i){this.eventManager=t,this.doc=n,this.ngZone=r,this.platformIsServer=i,this.data=Object.create(null),this.throwOnSyntheticProps=!0,this.destroyNode=null}destroy(){}createElement(t,n){return n?this.doc.createElementNS(E1[n]||n,t):this.doc.createElement(t)}createComment(t){return this.doc.createComment(t)}createText(t){return this.doc.createTextNode(t)}appendChild(t,n){(TT(t)?t.content:t).appendChild(n)}insertBefore(t,n,r){t&&(TT(t)?t.content:t).insertBefore(n,r)}removeChild(t,n){t&&t.removeChild(n)}selectRootElement(t,n){let r="string"==typeof t?this.doc.querySelector(t):t;if(!r)throw new Ae(-5104,!1);return n||(r.textContent=""),r}parentNode(t){return t.parentNode}nextSibling(t){return t.nextSibling}setAttribute(t,n,r,i){if(i){n=i+":"+n;const o=E1[i];o?t.setAttributeNS(o,n,r):t.setAttribute(n,r)}else t.setAttribute(n,r)}removeAttribute(t,n,r){if(r){const i=E1[r];i?t.removeAttributeNS(i,n):t.removeAttribute(`${r}:${n}`)}else t.removeAttribute(n)}addClass(t,n){t.classList.add(n)}removeClass(t,n){t.classList.remove(n)}setStyle(t,n,r,i){i&(gs.DashCase|gs.Important)?t.style.setProperty(n,r,i&gs.Important?"important":""):t.style[n]=r}removeStyle(t,n,r){r&gs.DashCase?t.style.removeProperty(n):t.style[n]=""}setProperty(t,n,r){null!=t&&(t[n]=r)}setValue(t,n){t.nodeValue=n}listen(t,n,r){if("string"==typeof t&&!(t=i1().getGlobalEventTarget(this.doc,t)))throw new Error(`Unsupported event target ${t} for event ${n}`);return this.eventManager.addEventListener(t,n,this.decoratePreventDefault(r))}decoratePreventDefault(t){return n=>{if("__ngUnwrap__"===n)return t;!1===(this.platformIsServer?this.ngZone.runGuarded(()=>t(n)):t(n))&&n.preventDefault()}}}function TT(e){return"TEMPLATE"===e.tagName&&void 0!==e.content}class OH extends x1{constructor(t,n,r,i,o,s,a,u){super(t,o,s,u),this.sharedStylesHost=n,this.hostEl=r,this.shadowRoot=r.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);const c=IT(i.id,i.styles);for(const l of c){const d=document.createElement("style");a&&d.setAttribute("nonce",a),d.textContent=l,this.shadowRoot.appendChild(d)}}nodeOrShadowRoot(t){return t===this.hostEl?this.shadowRoot:t}appendChild(t,n){return super.appendChild(this.nodeOrShadowRoot(t),n)}insertBefore(t,n,r){return super.insertBefore(this.nodeOrShadowRoot(t),n,r)}removeChild(t,n){return super.removeChild(this.nodeOrShadowRoot(t),n)}parentNode(t){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(t)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}}class M1 extends x1{constructor(t,n,r,i,o,s,a,u){super(t,o,s,a),this.sharedStylesHost=n,this.removeStylesOnCompDestroy=i,this.styles=u?IT(u,r.styles):r.styles}applyStyles(){this.sharedStylesHost.addStyles(this.styles)}destroy(){this.removeStylesOnCompDestroy&&this.sharedStylesHost.removeStyles(this.styles)}}class NT extends M1{constructor(t,n,r,i,o,s,a,u){const c=i+"-"+r.id;super(t,n,r,o,s,a,u,c),this.contentAttr=function NH(e){return"_ngcontent-%COMP%".replace(C1,e)}(c),this.hostAttr=function AH(e){return"_nghost-%COMP%".replace(C1,e)}(c)}applyToHost(t){this.applyStyles(),this.setAttribute(t,this.hostAttr,"")}createElement(t,n){const r=super.createElement(t,n);return super.setAttribute(r,this.contentAttr,""),r}}let RH=(()=>{class e extends CT{constructor(n){super(n)}supports(n){return!0}addEventListener(n,r,i){return n.addEventListener(r,i,!1),()=>this.removeEventListener(n,r,i)}removeEventListener(n,r,i){return n.removeEventListener(r,i)}static{this.\u0275fac=function(r){return new(r||e)(Rt(ma))}}static{this.\u0275prov=At({token:e,factory:e.\u0275fac})}}return e})();const AT=["alt","control","meta","shift"],PH={"\b":"Backspace","\t":"Tab","\x7f":"Delete","\x1b":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},FH={alt:e=>e.altKey,control:e=>e.ctrlKey,meta:e=>e.metaKey,shift:e=>e.shiftKey};let LH=(()=>{class e extends CT{constructor(n){super(n)}supports(n){return null!=e.parseEventName(n)}addEventListener(n,r,i){const o=e.parseEventName(r),s=e.eventCallback(o.fullKey,i,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>i1().onAndCancel(n,o.domEventName,s))}static parseEventName(n){const r=n.toLowerCase().split("."),i=r.shift();if(0===r.length||"keydown"!==i&&"keyup"!==i)return null;const o=e._normalizeKey(r.pop());let s="",a=r.indexOf("code");if(a>-1&&(r.splice(a,1),s="code."),AT.forEach(c=>{const l=r.indexOf(c);l>-1&&(r.splice(l,1),s+=c+".")}),s+=o,0!=r.length||0===o.length)return null;const u={};return u.domEventName=i,u.fullKey=s,u}static matchEventFullKeyCode(n,r){let i=PH[n.key]||n.key,o="";return r.indexOf("code.")>-1&&(i=n.code,o="code."),!(null==i||!i)&&(i=i.toLowerCase()," "===i?i="space":"."===i&&(i="dot"),AT.forEach(s=>{s!==i&&(0,FH[s])(n)&&(o+=s+".")}),o+=i,o===r)}static eventCallback(n,r,i){return o=>{e.matchEventFullKeyCode(o,n)&&i.runGuarded(()=>r(o))}}static _normalizeKey(n){return"esc"===n?"escape":n}static{this.\u0275fac=function(r){return new(r||e)(Rt(ma))}}static{this.\u0275prov=At({token:e,factory:e.\u0275fac})}}return e})();const OT=[{provide:xu,useValue:"browser"},{provide:rE,useValue:function BH(){w1.makeCurrent()},multi:!0},{provide:ma,useFactory:function VH(){return function mF(e){q0=e}(document),document},deps:[]}],HH=pS($B,"browser",OT),UH=new ut(""),RT=[{provide:mp,useClass:class CH{addToWindow(t){Gt.getAngularTestability=(r,i=!0)=>{const o=t.findTestabilityInTree(r,i);if(null==o)throw new Ae(5103,!1);return o},Gt.getAllAngularTestabilities=()=>t.getAllTestabilities(),Gt.getAllAngularRootElements=()=>t.getAllRootElements(),Gt.frameworkStabilizers||(Gt.frameworkStabilizers=[]),Gt.frameworkStabilizers.push(r=>{const i=Gt.getAllAngularTestabilities();let o=i.length;const s=function(){o--,0==o&&r()};i.forEach(a=>{a.whenStable(s)})})}findTestabilityInTree(t,n,r){return null==n?null:t.getTestability(n)??(r?i1().isShadowRoot(n)?this.findTestabilityInTree(t,n.host,!0):this.findTestabilityInTree(t,n.parentElement,!0):null)}},deps:[]},{provide:rS,useClass:$v,deps:[Cn,zv,mp]},{provide:$v,useClass:$v,deps:[Cn,zv,mp]}],PT=[{provide:s0,useValue:"root"},{provide:yo,useFactory:function jH(){return new yo},deps:[]},{provide:_1,useClass:RH,multi:!0,deps:[ma,Cn,xu]},{provide:_1,useClass:LH,multi:!0,deps:[ma]},ST,xT,ET,{provide:CC,useExisting:ST},{provide:class WV{},useClass:xH,deps:[]},[]];let FT=(()=>{class e{constructor(n){}static withServerTransition(n){return{ngModule:e,providers:[{provide:_h,useValue:n.appId}]}}static{this.\u0275fac=function(r){return new(r||e)(Rt(UH,12))}}static{this.\u0275mod=gt({type:e})}static{this.\u0275inj=Fo({providers:[...PT,...RT],imports:[UV,zB]})}}return e})();const qH={dataId:"1234",nodes:[{id:"123",label:["John Doe","01/01/1970"],imageUrl:"",icon:"\uf007",fx:1e3,fy:400,additionalIcon:"\uf3a5"},{id:"456",label:["Richard Hill","14/05/1982"],imageUrl:"https://randomuser.me/api/portraits/thumb/men/99.jpg",icon:"",fx:332,fy:684,additionalIcon:""},{id:"789",label:["Rick Smith","Software Developer"],imageUrl:"https://randomuser.me/api/portraits/thumb/men/21.jpg",icon:"",fx:55,fy:60,additionalIcon:"\uf2dc"},{id:"4",label:["James Jones","BA"],imageUrl:"https://randomuser.me/api/portraits/thumb/men/9.jpg",icon:"",fx:414,fy:369,additionalIcon:""},{id:"423",label:["Aston Villa","Football Club","Founded 1874"],imageUrl:"https://houseofv.ghost.io/content/images/2024/01/GC72JKwWwAAuyGk.png",icon:"",fx:313,fy:255,additionalIcon:"\uf1e3"}],links:[{source:"123",target:"456",lineStyle:"Dotted",sourceArrow:!1,targetArrow:!0,linkId:"123_456",relationships:[{labelIndex:0,label:"Worked at IBM",source:"123",target:"456",linkIcon:!0},{labelIndex:1,label:"Both in same scrum team",source:"123",target:"456",linkIcon:!0}]},{source:"456",target:"789",lineStyle:"Solid",sourceArrow:!0,targetArrow:!0,linkId:"456_789",relationships:[{labelIndex:2,label:"Play in the same football team",source:"456",target:"789",linkIcon:!1},{labelIndex:3,label:"Daughters in the same class at school",source:"456",target:"789",linkIcon:!0},{labelIndex:4,label:"Went on a family holiday together last year",source:"456",target:"789",linkIcon:!1}]},{source:"789",target:"123",lineStyle:"Dotted",sourceArrow:!0,targetArrow:!0,linkId:"789_123",relationships:[{labelIndex:5,label:"Drink in the same pub",source:"789",target:"123",linkIcon:!0},{labelIndex:6,label:"Drinking friends",source:"789",target:"123",linkIcon:!1}]},{source:"4",target:"123",lineStyle:"Dotted",sourceArrow:!0,targetArrow:!1,linkId:"4_123",relationships:[{labelIndex:7,label:["Same University"],source:"4",target:"123",linkIcon:!0}]}]};var WH="5.16.0";function Ds(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function I1(e){return 1===e.length&&(e=function YH(e){return function(t,n){return Ds(e(t),n)}}(e)),{left:function(t,n,r,i){for(null==r&&(r=0),null==i&&(i=t.length);r<i;){var o=r+i>>>1;e(t[o],n)<0?r=o+1:i=o}return r},right:function(t,n,r,i){for(null==r&&(r=0),null==i&&(i=t.length);r<i;){var o=r+i>>>1;e(t[o],n)>0?i=o:r=o+1}return r}}}var VT=I1(Ds),HT=VT.right,KH=VT.left;const ya=HT;function QH(e,t){null==t&&(t=UT);for(var n=0,r=e.length-1,i=e[0],o=new Array(r<0?0:r);n<r;)o[n]=t(i,i=e[++n]);return o}function UT(e,t){return[e,t]}function ZH(e,t,n){var s,a,u,c,r=e.length,i=t.length,o=new Array(r*i);for(null==n&&(n=UT),s=u=0;s<r;++s)for(c=e[s],a=0;a<i;++a,++u)o[u]=n(c,t[a]);return o}function XH(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function Es(e){return null===e?NaN:+e}function $T(e,t){var s,a,n=e.length,r=0,i=-1,o=0,u=0;if(null==t)for(;++i<n;)isNaN(s=Es(e[i]))||(u+=(a=s-o)*(s-(o+=a/++r)));else for(;++i<n;)isNaN(s=Es(t(e[i],i,e)))||(u+=(a=s-o)*(s-(o+=a/++r)));if(r>1)return u/(r-1)}function zT(e,t){var n=$T(e,t);return n&&Math.sqrt(n)}function S1(e,t){var i,o,s,n=e.length,r=-1;if(null==t){for(;++r<n;)if(null!=(i=e[r])&&i>=i)for(o=s=i;++r<n;)null!=(i=e[r])&&(o>i&&(o=i),s<i&&(s=i))}else for(;++r<n;)if(null!=(i=t(e[r],r,e))&&i>=i)for(o=s=i;++r<n;)null!=(i=t(e[r],r,e))&&(o>i&&(o=i),s<i&&(s=i));return[o,s]}var GT=Array.prototype,JH=GT.slice,eU=GT.map;function Hp(e){return function(){return e}}function tU(e){return e}function ni(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((t-e)/n)),o=new Array(i);++r<i;)o[r]=e+r*n;return o}var T1=Math.sqrt(50),N1=Math.sqrt(10),A1=Math.sqrt(2);function k1(e,t,n){var r,o,s,a,i=-1;if(n=+n,(e=+e)==(t=+t)&&n>0)return[e];if((r=t<e)&&(o=e,e=t,t=o),0===(a=_f(e,t,n))||!isFinite(a))return[];if(a>0)for(e=Math.ceil(e/a),t=Math.floor(t/a),s=new Array(o=Math.ceil(t-e+1));++i<o;)s[i]=(e+i)*a;else for(e=Math.floor(e*a),t=Math.ceil(t*a),s=new Array(o=Math.ceil(e-t+1));++i<o;)s[i]=(e-i)/a;return r&&s.reverse(),s}function _f(e,t,n){var r=(t-e)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),o=r/Math.pow(10,i);return i>=0?(o>=T1?10:o>=N1?5:o>=A1?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=T1?10:o>=N1?5:o>=A1?2:1)}function va(e,t,n){var r=Math.abs(t-e)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),o=r/i;return o>=T1?i*=10:o>=N1?i*=5:o>=A1&&(i*=2),t<e?-i:i}function O1(e){return Math.ceil(Math.log(e.length)/Math.LN2)+1}function nU(){var e=tU,t=S1,n=O1;function r(i){var o,a,s=i.length,u=new Array(s);for(o=0;o<s;++o)u[o]=e(i[o],o,i);var c=t(u),l=c[0],d=c[1],h=n(u,l,d);Array.isArray(h)||(h=va(l,d,h),h=ni(Math.ceil(l/h)*h,d,h));for(var g=h.length;h[0]<=l;)h.shift(),--g;for(;h[g-1]>d;)h.pop(),--g;var v,y=new Array(g+1);for(o=0;o<=g;++o)(v=y[o]=[]).x0=o>0?h[o-1]:l,v.x1=o<g?h[o]:d;for(o=0;o<s;++o)l<=(a=u[o])&&a<=d&&y[ya(h,a,0,g)].push(i[o]);return y}return r.value=function(i){return arguments.length?(e="function"==typeof i?i:Hp(i),r):e},r.domain=function(i){return arguments.length?(t="function"==typeof i?i:Hp([i[0],i[1]]),r):t},r.thresholds=function(i){return arguments.length?(n="function"==typeof i?i:Array.isArray(i)?Hp(JH.call(i)):Hp(i),r):n},r}function Df(e,t,n){if(null==n&&(n=Es),r=e.length){if((t=+t)<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,i=(r-1)*t,o=Math.floor(i),s=+n(e[o],o,e);return s+(+n(e[o+1],o+1,e)-s)*(i-o)}}function rU(e,t,n){return e=eU.call(e,Es).sort(Ds),Math.ceil((n-t)/(2*(Df(e,.75)-Df(e,.25))*Math.pow(e.length,-1/3)))}function iU(e,t,n){return Math.ceil((n-t)/(3.5*zT(e)*Math.pow(e.length,-1/3)))}function qT(e,t){var i,o,n=e.length,r=-1;if(null==t){for(;++r<n;)if(null!=(i=e[r])&&i>=i)for(o=i;++r<n;)null!=(i=e[r])&&i>o&&(o=i)}else for(;++r<n;)if(null!=(i=t(e[r],r,e))&&i>=i)for(o=i;++r<n;)null!=(i=t(e[r],r,e))&&i>o&&(o=i);return o}function oU(e,t){var o,n=e.length,r=n,i=-1,s=0;if(null==t)for(;++i<n;)isNaN(o=Es(e[i]))?--r:s+=o;else for(;++i<n;)isNaN(o=Es(t(e[i],i,e)))?--r:s+=o;if(r)return s/r}function sU(e,t){var i,n=e.length,r=-1,o=[];if(null==t)for(;++r<n;)isNaN(i=Es(e[r]))||o.push(i);else for(;++r<n;)isNaN(i=Es(t(e[r],r,e)))||o.push(i);return Df(o.sort(Ds),.5)}function R1(e){for(var n,o,s,t=e.length,r=-1,i=0;++r<t;)i+=e[r].length;for(o=new Array(i);--t>=0;)for(n=(s=e[t]).length;--n>=0;)o[--i]=s[n];return o}function WT(e,t){var i,o,n=e.length,r=-1;if(null==t){for(;++r<n;)if(null!=(i=e[r])&&i>=i)for(o=i;++r<n;)null!=(i=e[r])&&o>i&&(o=i)}else for(;++r<n;)if(null!=(i=t(e[r],r,e))&&i>=i)for(o=i;++r<n;)null!=(i=t(e[r],r,e))&&o>i&&(o=i);return o}function aU(e,t){for(var n=t.length,r=new Array(n);n--;)r[n]=e[t[n]];return r}function uU(e,t){if(n=e.length){var n,o,r=0,i=0,s=e[i];for(null==t&&(t=Ds);++r<n;)(t(o=e[r],s)<0||0!==t(s,s))&&(s=o,i=r);if(0===t(s,s))return i}}function cU(e,t,n){for(var i,o,r=(n??e.length)-(t=null==t?0:+t);r;)o=Math.random()*r--|0,i=e[r+t],e[r+t]=e[o+t],e[o+t]=i;return e}function lU(e,t){var i,n=e.length,r=-1,o=0;if(null==t)for(;++r<n;)(i=+e[r])&&(o+=i);else for(;++r<n;)(i=+t(e[r],r,e))&&(o+=i);return o}function YT(e){if(!(o=e.length))return[];for(var t=-1,n=WT(e,fU),r=new Array(n);++t<n;)for(var o,i=-1,s=r[t]=new Array(o);++i<o;)s[i]=e[i][t];return r}function fU(e){return e.length}function dU(){return YT(arguments)}var P1=Array.prototype.slice;function hU(e){return e}var Up=1,$p=2,F1=3,Ef=4,KT=1e-6;function pU(e){return"translate("+(e+.5)+",0)"}function gU(e){return"translate(0,"+(e+.5)+")"}function mU(e){return function(t){return+e(t)}}function yU(e){var t=Math.max(0,e.bandwidth()-1)/2;return e.round()&&(t=Math.round(t)),function(n){return+e(n)+t}}function vU(){return!this.__axis}function zp(e,t){var n=[],r=null,i=null,o=6,s=6,a=3,u=e===Up||e===Ef?-1:1,c=e===Ef||e===$p?"x":"y",l=e===Up||e===F1?pU:gU;function d(h){var g=r??(t.ticks?t.ticks.apply(t,n):t.domain()),y=i??(t.tickFormat?t.tickFormat.apply(t,n):hU),v=Math.max(o,0)+a,b=t.range(),_=+b[0]+.5,E=+b[b.length-1]+.5,C=(t.bandwidth?yU:mU)(t.copy()),I=h.selection?h.selection():h,R=I.selectAll(".domain").data([null]),G=I.selectAll(".tick").data(g,t).order(),z=G.exit(),de=G.enter().append("g").attr("class","tick"),oe=G.select("line"),fe=G.select("text");R=R.merge(R.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),G=G.merge(de),oe=oe.merge(de.append("line").attr("stroke","currentColor").attr(c+"2",u*o)),fe=fe.merge(de.append("text").attr("fill","currentColor").attr(c,u*v).attr("dy",e===Up?"0em":e===F1?"0.71em":"0.32em")),h!==I&&(R=R.transition(h),G=G.transition(h),oe=oe.transition(h),fe=fe.transition(h),z=z.transition(h).attr("opacity",KT).attr("transform",function(re){return isFinite(re=C(re))?l(re):this.getAttribute("transform")}),de.attr("opacity",KT).attr("transform",function(re){var T=this.parentNode.__axis;return l(T&&isFinite(T=T(re))?T:C(re))})),z.remove(),R.attr("d",e===Ef||e==$p?s?"M"+u*s+","+_+"H0.5V"+E+"H"+u*s:"M0.5,"+_+"V"+E:s?"M"+_+","+u*s+"V0.5H"+E+"V"+u*s:"M"+_+",0.5H"+E),G.attr("opacity",1).attr("transform",function(re){return l(C(re))}),oe.attr(c+"2",u*o),fe.attr(c,u*v).text(y),I.filter(vU).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",e===$p?"start":e===Ef?"end":"middle"),I.each(function(){this.__axis=C})}return d.scale=function(h){return arguments.length?(t=h,d):t},d.ticks=function(){return n=P1.call(arguments),d},d.tickArguments=function(h){return arguments.length?(n=null==h?[]:P1.call(h),d):n.slice()},d.tickValues=function(h){return arguments.length?(r=null==h?null:P1.call(h),d):r&&r.slice()},d.tickFormat=function(h){return arguments.length?(i=h,d):i},d.tickSize=function(h){return arguments.length?(o=s=+h,d):o},d.tickSizeInner=function(h){return arguments.length?(o=+h,d):o},d.tickSizeOuter=function(h){return arguments.length?(s=+h,d):s},d.tickPadding=function(h){return arguments.length?(a=+h,d):a},d}function bU(e){return zp(Up,e)}function wU(e){return zp($p,e)}function _U(e){return zp(F1,e)}function DU(e){return zp(Ef,e)}var EU={value:function(){}};function QT(){for(var r,e=0,t=arguments.length,n={};e<t;++e){if(!(r=arguments[e]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new Gp(n)}function Gp(e){this._=e}function xU(e,t){for(var i,n=0,r=e.length;n<r;++n)if((i=e[n]).name===t)return i.value}function ZT(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=EU,e=e.slice(0,r).concat(e.slice(r+1));break}return null!=n&&e.push({name:t,value:n}),e}Gp.prototype=QT.prototype={constructor:Gp,on:function(e,t){var i,n=this._,r=function CU(e,t){return e.trim().split(/^|\s+/).map(function(n){var r="",i=n.indexOf(".");if(i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}(e+"",n),o=-1,s=r.length;if(!(arguments.length<2)){if(null!=t&&"function"!=typeof t)throw new Error("invalid callback: "+t);for(;++o<s;)if(i=(e=r[o]).type)n[i]=ZT(n[i],e.name,t);else if(null==t)for(i in n)n[i]=ZT(n[i],e.name,null);return this}for(;++o<s;)if((i=(e=r[o]).type)&&(i=xU(n[i],e.name)))return i},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new Gp(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var i,o,n=new Array(i),r=0;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(r=0,i=(o=this._[e]).length;r<i;++r)o[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],i=0,o=r.length;i<o;++i)r[i].value.apply(t,n)}};const uc=QT;function MU(){}function qp(e){return null==e?MU:function(){return this.querySelector(e)}}function SU(){return[]}function L1(e){return null==e?SU:function(){return this.querySelectorAll(e)}}function B1(e){return function(){return this.matches(e)}}function XT(e){return new Array(e.length)}function Wp(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Wp.prototype={constructor:Wp,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function OU(e,t,n,r,i,o){for(var a,s=0,u=t.length,c=o.length;s<c;++s)(a=t[s])?(a.__data__=o[s],r[s]=a):n[s]=new Wp(e,o[s]);for(;s<u;++s)(a=t[s])&&(i[s]=a)}function RU(e,t,n,r,i,o,s){var a,u,g,c={},l=t.length,d=o.length,h=new Array(l);for(a=0;a<l;++a)(u=t[a])&&(h[a]=g="$"+s.call(u,u.__data__,a,t),g in c?i[a]=u:c[g]=u);for(a=0;a<d;++a)(u=c[g="$"+s.call(e,o[a],a,o)])?(r[a]=u,u.__data__=o[a],c[g]=null):n[a]=new Wp(e,o[a]);for(a=0;a<l;++a)(u=t[a])&&c[h[a]]===u&&(i[a]=u)}function HU(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}var j1="http://www.w3.org/1999/xhtml";const V1={svg:"http://www.w3.org/2000/svg",xhtml:j1,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Cf(e){var t=e+="",n=t.indexOf(":");return n>=0&&"xmlns"!==(t=e.slice(0,n))&&(e=e.slice(n+1)),V1.hasOwnProperty(t)?{space:V1[t],local:e}:e}function YU(e){return function(){this.removeAttribute(e)}}function KU(e){return function(){this.removeAttributeNS(e.space,e.local)}}function QU(e,t){return function(){this.setAttribute(e,t)}}function ZU(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function XU(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttribute(e):this.setAttribute(e,n)}}function JU(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function H1(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function t$(e){return function(){this.style.removeProperty(e)}}function n$(e,t,n){return function(){this.style.setProperty(e,t,n)}}function r$(e,t,n){return function(){var r=t.apply(this,arguments);null==r?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function ba(e,t){return e.style.getPropertyValue(t)||H1(e).getComputedStyle(e,null).getPropertyValue(t)}function o$(e){return function(){delete this[e]}}function s$(e,t){return function(){this[e]=t}}function a$(e,t){return function(){var n=t.apply(this,arguments);null==n?delete this[e]:this[e]=n}}function e2(e){return e.trim().split(/^|\s+/)}function U1(e){return e.classList||new t2(e)}function t2(e){this._node=e,this._names=e2(e.getAttribute("class")||"")}function n2(e,t){for(var n=U1(e),r=-1,i=t.length;++r<i;)n.add(t[r])}function r2(e,t){for(var n=U1(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}function c$(e){return function(){n2(this,e)}}function l$(e){return function(){r2(this,e)}}function f$(e,t){return function(){(t.apply(this,arguments)?n2:r2)(this,e)}}function h$(){this.textContent=""}function p$(e){return function(){this.textContent=e}}function g$(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function y$(){this.innerHTML=""}function v$(e){return function(){this.innerHTML=e}}function b$(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function _$(){this.nextSibling&&this.parentNode.appendChild(this)}function E$(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function x$(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===j1&&t.documentElement.namespaceURI===j1?t.createElement(e):t.createElementNS(n,e)}}function M$(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Yp(e){var t=Cf(e);return(t.local?M$:x$)(t)}function S$(){return null}function N$(){var e=this.parentNode;e&&e.removeChild(this)}function k$(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function O$(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}t2.prototype={add:function(e){this._names.indexOf(e)<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};var i2={},Ue=null;function L$(e,t,n){return e=o2(e,t,n),function(r){var i=r.relatedTarget;(!i||i!==this&&!(8&i.compareDocumentPosition(this)))&&e.call(this,r)}}function o2(e,t,n){return function(r){var i=Ue;Ue=r;try{e.call(this,this.__data__,t,n)}finally{Ue=i}}}function j$(e){return function(){var t=this.__on;if(t){for(var o,n=0,r=-1,i=t.length;n<i;++n)o=t[n],e.type&&o.type!==e.type||o.name!==e.name?t[++r]=o:this.removeEventListener(o.type,o.listener,o.capture);++r?t.length=r:delete this.__on}}}function V$(e,t,n){var r=i2.hasOwnProperty(e.type)?L$:o2;return function(i,o,s){var u,a=this.__on,c=r(t,o,s);if(a)for(var l=0,d=a.length;l<d;++l)if((u=a[l]).type===e.type&&u.name===e.name)return this.removeEventListener(u.type,u.listener,u.capture),this.addEventListener(u.type,u.listener=c,u.capture=n),void(u.value=t);this.addEventListener(e.type,c,n),u={type:e.type,name:e.name,value:t,listener:c,capture:n},a?a.push(u):this.__on=[u]}}function xf(e,t,n,r){var i=Ue;e.sourceEvent=Ue,Ue=e;try{return t.apply(n,r)}finally{Ue=i}}function s2(e,t,n){var r=H1(e),i=r.CustomEvent;"function"==typeof i?i=new i(t,n):(i=r.document.createEvent("Event"),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function U$(e,t){return function(){return s2(this,e,t)}}function $$(e,t){return function(){return s2(this,e,t.apply(this,arguments))}}typeof document<"u"&&("onmouseenter"in document.documentElement||(i2={mouseenter:"mouseover",mouseleave:"mouseout"}));var $1=[null];function Sr(e,t){this._groups=e,this._parents=t}function a2(){return new Sr([[document.documentElement]],$1)}Sr.prototype=a2.prototype={constructor:Sr,select:function IU(e){"function"!=typeof e&&(e=qp(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var u,c,o=t[i],s=o.length,a=r[i]=new Array(s),l=0;l<s;++l)(u=o[l])&&(c=e.call(u,u.__data__,l,o))&&("__data__"in u&&(c.__data__=u.__data__),a[l]=c);return new Sr(r,this._parents)},selectAll:function TU(e){"function"!=typeof e&&(e=L1(e));for(var t=this._groups,n=t.length,r=[],i=[],o=0;o<n;++o)for(var u,s=t[o],a=s.length,c=0;c<a;++c)(u=s[c])&&(r.push(e.call(u,u.__data__,c,s)),i.push(u));return new Sr(r,i)},filter:function NU(e){"function"!=typeof e&&(e=B1(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var u,o=t[i],s=o.length,a=r[i]=[],c=0;c<s;++c)(u=o[c])&&e.call(u,u.__data__,c,o)&&a.push(u);return new Sr(r,this._parents)},data:function PU(e,t){if(!e)return g=new Array(this.size()),c=-1,this.each(function(G){g[++c]=G}),g;var n=t?RU:OU,r=this._parents,i=this._groups;"function"!=typeof e&&(e=function kU(e){return function(){return e}}(e));for(var o=i.length,s=new Array(o),a=new Array(o),u=new Array(o),c=0;c<o;++c){var l=r[c],d=i[c],h=d.length,g=e.call(l,l&&l.__data__,c,r),y=g.length,v=a[c]=new Array(y),b=s[c]=new Array(y);n(l,d,v,b,u[c]=new Array(h),g,t);for(var I,R,E=0,C=0;E<y;++E)if(I=v[E]){for(E>=C&&(C=E+1);!(R=b[C])&&++C<y;);I._next=R||null}}return(s=new Sr(s,r))._enter=a,s._exit=u,s},enter:function AU(){return new Sr(this._enter||this._groups.map(XT),this._parents)},exit:function FU(){return new Sr(this._exit||this._groups.map(XT),this._parents)},join:function LU(e,t,n){var r=this.enter(),i=this,o=this.exit();return r="function"==typeof e?e(r):r.append(e+""),null!=t&&(i=t(i)),null==n?o.remove():n(o),r&&i?r.merge(i).order():i},merge:function BU(e){for(var t=this._groups,n=e._groups,r=t.length,o=Math.min(r,n.length),s=new Array(r),a=0;a<o;++a)for(var h,u=t[a],c=n[a],l=u.length,d=s[a]=new Array(l),g=0;g<l;++g)(h=u[g]||c[g])&&(d[g]=h);for(;a<r;++a)s[a]=t[a];return new Sr(s,this._parents)},order:function jU(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var s,r=e[t],i=r.length-1,o=r[i];--i>=0;)(s=r[i])&&(o&&4^s.compareDocumentPosition(o)&&o.parentNode.insertBefore(s,o),o=s);return this},sort:function VU(e){function t(d,h){return d&&h?e(d.__data__,h.__data__):!d-!h}e||(e=HU);for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var c,s=n[o],a=s.length,u=i[o]=new Array(a),l=0;l<a;++l)(c=s[l])&&(u[l]=c);u.sort(t)}return new Sr(i,this._parents).order()},call:function UU(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this},nodes:function $U(){var e=new Array(this.size()),t=-1;return this.each(function(){e[++t]=this}),e},node:function zU(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,o=r.length;i<o;++i){var s=r[i];if(s)return s}return null},size:function GU(){var e=0;return this.each(function(){++e}),e},empty:function qU(){return!this.node()},each:function WU(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var a,i=t[n],o=0,s=i.length;o<s;++o)(a=i[o])&&e.call(a,a.__data__,o,i);return this},attr:function e$(e,t){var n=Cf(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==t?n.local?KU:YU:"function"==typeof t?n.local?JU:XU:n.local?ZU:QU)(n,t))},style:function i$(e,t,n){return arguments.length>1?this.each((null==t?t$:"function"==typeof t?r$:n$)(e,t,n??"")):ba(this.node(),e)},property:function u$(e,t){return arguments.length>1?this.each((null==t?o$:"function"==typeof t?a$:s$)(e,t)):this.node()[e]},classed:function d$(e,t){var n=e2(e+"");if(arguments.length<2){for(var r=U1(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof t?f$:t?c$:l$)(n,t))},text:function m$(e){return arguments.length?this.each(null==e?h$:("function"==typeof e?g$:p$)(e)):this.node().textContent},html:function w$(e){return arguments.length?this.each(null==e?y$:("function"==typeof e?b$:v$)(e)):this.node().innerHTML},raise:function D$(){return this.each(_$)},lower:function C$(){return this.each(E$)},append:function I$(e){var t="function"==typeof e?e:Yp(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})},insert:function T$(e,t){var n="function"==typeof e?e:Yp(e),r=null==t?S$:"function"==typeof t?t:qp(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})},remove:function A$(){return this.each(N$)},clone:function R$(e){return this.select(e?O$:k$)},datum:function P$(e){return arguments.length?this.property("__data__",e):this.node().__data__},on:function H$(e,t,n){var i,s,r=function B$(e){return e.trim().split(/^|\s+/).map(function(t){var n="",r=t.indexOf(".");return r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),{type:t,name:n}})}(e+""),o=r.length;if(!(arguments.length<2)){for(a=t?V$:j$,null==n&&(n=!1),i=0;i<o;++i)this.each(a(r[i],t,n));return this}var a=this.node().__on;if(a)for(var l,u=0,c=a.length;u<c;++u)for(i=0,l=a[u];i<o;++i)if((s=r[i]).type===l.type&&s.name===l.name)return l.value},dispatch:function z$(e,t){return this.each(("function"==typeof t?$$:U$)(e,t))}};const cc=a2;function rn(e){return"string"==typeof e?new Sr([[document.querySelector(e)]],[document.documentElement]):new Sr([[e]],$1)}function z1(){Ue.stopImmediatePropagation()}function lc(){Ue.preventDefault(),Ue.stopImmediatePropagation()}function Kp(e){var t=e.document.documentElement,n=rn(e).on("dragstart.drag",lc,!0);"onselectstart"in t?n.on("selectstart.drag",lc,!0):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function Qp(e,t){var n=e.document.documentElement,r=rn(e).on("dragstart.drag",null);t&&(r.on("click.drag",lc,!0),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}function fc(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Mf(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Cs(){}var dc=1/.7,hc="\\s*([+-]?\\d+)\\s*",If="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",xo="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",G$=/^#([0-9a-f]{3,8})$/,q$=new RegExp("^rgb\\("+[hc,hc,hc]+"\\)$"),W$=new RegExp("^rgb\\("+[xo,xo,xo]+"\\)$"),Y$=new RegExp("^rgba\\("+[hc,hc,hc,If]+"\\)$"),K$=new RegExp("^rgba\\("+[xo,xo,xo,If]+"\\)$"),Q$=new RegExp("^hsl\\("+[If,xo,xo]+"\\)$"),Z$=new RegExp("^hsla\\("+[If,xo,xo,If]+"\\)$"),u2={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function c2(){return this.rgb().formatHex()}function l2(){return this.rgb().formatRgb()}function xs(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=G$.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?f2(t):3===n?new or(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?Zp(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?Zp(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=q$.exec(e))?new or(t[1],t[2],t[3],1):(t=W$.exec(e))?new or(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Y$.exec(e))?Zp(t[1],t[2],t[3],t[4]):(t=K$.exec(e))?Zp(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Q$.exec(e))?p2(t[1],t[2]/100,t[3]/100,1):(t=Z$.exec(e))?p2(t[1],t[2]/100,t[3]/100,t[4]):u2.hasOwnProperty(e)?f2(u2[e]):"transparent"===e?new or(NaN,NaN,NaN,0):null}function f2(e){return new or(e>>16&255,e>>8&255,255&e,1)}function Zp(e,t,n,r){return r<=0&&(e=t=n=NaN),new or(e,t,n,r)}function G1(e){return e instanceof Cs||(e=xs(e)),e?new or((e=e.rgb()).r,e.g,e.b,e.opacity):new or}function pc(e,t,n,r){return 1===arguments.length?G1(e):new or(e,t,n,r??1)}function or(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function d2(){return"#"+q1(this.r)+q1(this.g)+q1(this.b)}function h2(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"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===e?")":", "+e+")")}function q1(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function p2(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Mo(e,t,n,r)}function g2(e){if(e instanceof Mo)return new Mo(e.h,e.s,e.l,e.opacity);if(e instanceof Cs||(e=xs(e)),!e)return new Mo;if(e instanceof Mo)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),s=NaN,a=o-i,u=(o+i)/2;return a?(s=t===o?(n-r)/a+6*(n<r):n===o?(r-t)/a+2:(t-n)/a+4,a/=u<.5?o+i:2-o-i,s*=60):a=u>0&&u<1?0:s,new Mo(s,a,u,e.opacity)}function Xp(e,t,n,r){return 1===arguments.length?g2(e):new Mo(e,t,n,r??1)}function Mo(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function W1(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}function m2(e,t,n,r,i){var o=e*e,s=o*e;return((1-3*e+3*o-s)*t+(4-6*o+3*s)*n+(1+3*e+3*o-3*s)*r+s*i)/6}function y2(e){var t=e.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,t-1):Math.floor(n*t),i=e[r],o=e[r+1];return m2((n-r/t)*t,r>0?e[r-1]:2*i-o,i,o,r<t-1?e[r+2]:2*o-i)}}function v2(e){var t=e.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*t);return m2((n-r/t)*t,e[(r+t-1)%t],e[r%t],e[(r+1)%t],e[(r+2)%t])}}function Jp(e){return function(){return e}}function b2(e,t){return function(n){return e+n*t}}function eg(e,t){var n=t-e;return n?b2(e,n>180||n<-180?n-360*Math.round(n/360):n):Jp(isNaN(e)?t:e)}function tr(e,t){var n=t-e;return n?b2(e,n):Jp(isNaN(e)?t:e)}fc(Cs,xs,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:c2,formatHex:c2,formatHsl:function X$(){return g2(this).formatHsl()},formatRgb:l2,toString:l2}),fc(or,pc,Mf(Cs,{brighter:function(e){return e=null==e?dc:Math.pow(dc,e),new or(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new or(this.r*e,this.g*e,this.b*e,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:d2,formatHex:d2,formatRgb:h2,toString:h2})),fc(Mo,Xp,Mf(Cs,{brighter:function(e){return e=null==e?dc:Math.pow(dc,e),new Mo(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new Mo(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new or(W1(e>=240?e-240:e+120,i,r),W1(e,i,r),W1(e<120?e+240:e-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 e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===e?")":", "+e+")")}}));const Sf=function e(t){var n=function ez(e){return 1==(e=+e)?tr:function(t,n){return n-t?function J$(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):Jp(isNaN(t)?n:t)}}(t);function r(i,o){var s=n((i=pc(i)).r,(o=pc(o)).r),a=n(i.g,o.g),u=n(i.b,o.b),c=tr(i.opacity,o.opacity);return function(l){return i.r=s(l),i.g=a(l),i.b=u(l),i.opacity=c(l),i+""}}return r.gamma=e,r}(1);function w2(e){return function(t){var s,a,n=t.length,r=new Array(n),i=new Array(n),o=new Array(n);for(s=0;s<n;++s)a=pc(t[s]),r[s]=a.r||0,i[s]=a.g||0,o[s]=a.b||0;return r=e(r),i=e(i),o=e(o),a.opacity=1,function(u){return a.r=r(u),a.g=i(u),a.b=o(u),a+""}}}var _2=w2(y2),tz=w2(v2);function Y1(e,t){t||(t=[]);var i,n=e?Math.min(t.length,e.length):0,r=t.slice();return function(o){for(i=0;i<n;++i)r[i]=e[i]*(1-o)+t[i]*o;return r}}function D2(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function nz(e,t){return(D2(t)?Y1:E2)(e,t)}function E2(e,t){var s,n=t?t.length:0,r=e?Math.min(n,e.length):0,i=new Array(r),o=new Array(n);for(s=0;s<r;++s)i[s]=Tf(e[s],t[s]);for(;s<n;++s)o[s]=t[s];return function(a){for(s=0;s<r;++s)o[s]=i[s](a);return o}}function C2(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function mi(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function x2(e,t){var i,n={},r={};for(i in(null===e||"object"!=typeof e)&&(e={}),(null===t||"object"!=typeof t)&&(t={}),t)i in e?n[i]=Tf(e[i],t[i]):r[i]=t[i];return function(o){for(i in n)r[i]=n[i](o);return r}}var K1=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Q1=new RegExp(K1.source,"g");function Z1(e,t){var r,i,o,n=K1.lastIndex=Q1.lastIndex=0,s=-1,a=[],u=[];for(e+="",t+="";(r=K1.exec(e))&&(i=Q1.exec(t));)(o=i.index)>n&&(o=t.slice(n,o),a[s]?a[s]+=o:a[++s]=o),(r=r[0])===(i=i[0])?a[s]?a[s]+=i:a[++s]=i:(a[++s]=null,u.push({i:s,x:mi(r,i)})),n=Q1.lastIndex;return n<t.length&&(o=t.slice(n),a[s]?a[s]+=o:a[++s]=o),a.length<2?u[0]?function iz(e){return function(t){return e(t)+""}}(u[0].x):function rz(e){return function(){return e}}(t):(t=u.length,function(c){for(var d,l=0;l<t;++l)a[(d=u[l]).i]=d.x(c);return a.join("")})}function Tf(e,t){var r,n=typeof t;return null==t||"boolean"===n?Jp(t):("number"===n?mi:"string"===n?(r=xs(t))?(t=r,Sf):Z1:t instanceof xs?Sf:t instanceof Date?C2:D2(t)?Y1:Array.isArray(t)?E2:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?x2:mi)(e,t)}function X1(){for(var t,e=Ue;t=e.sourceEvent;)e=t;return e}function tg(e,t){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,[(r=r.matrixTransform(e.getScreenCTM().inverse())).x,r.y]}var i=e.getBoundingClientRect();return[t.clientX-i.left-e.clientLeft,t.clientY-i.top-e.clientTop]}function Nf(e,t,n){arguments.length<3&&(n=t,t=X1().changedTouches);for(var o,r=0,i=t?t.length:0;r<i;++r)if((o=t[r]).identifier===n)return tg(e,o);return null}function _a(e){var t=X1();return t.changedTouches&&(t=t.changedTouches[0]),tg(e,t)}var ng,Of,gc=0,Af=0,kf=0,M2=1e3,rg=0,Da=0,ig=0,Rf="object"==typeof performance&&performance.now?performance:Date,I2="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function mc(){return Da||(I2(oz),Da=Rf.now()+ig)}function oz(){Da=0}function Pf(){this._call=this._time=this._next=null}function og(e,t,n){var r=new Pf;return r.restart(e,t,n),r}function S2(){mc(),++gc;for(var t,e=ng;e;)(t=Da-e._time)>=0&&e._call.call(null,t),e=e._next;--gc}function T2(){Da=(rg=Rf.now())+ig,gc=Af=0;try{S2()}finally{gc=0,function az(){for(var e,n,t=ng,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:ng=n);Of=e,J1(r)}(),Da=0}}function sz(){var e=Rf.now(),t=e-rg;t>M2&&(ig-=t,rg=e)}function J1(e){gc||(Af&&(Af=clearTimeout(Af)),e-Da>24?(e<1/0&&(Af=setTimeout(T2,e-Rf.now()-ig)),kf&&(kf=clearInterval(kf))):(kf||(rg=Rf.now(),kf=setInterval(sz,M2)),gc=1,I2(T2)))}function eb(e,t,n){var r=new Pf;return r.restart(function(i){r.stop(),e(i+t)},t=null==t?0:+t,n),r}Pf.prototype=og.prototype={constructor:Pf,restart:function(e,t,n){if("function"!=typeof e)throw new TypeError("callback is not a function");n=(null==n?mc():+n)+(null==t?0:+t),!this._next&&Of!==this&&(Of?Of._next=this:ng=this,Of=this),this._call=e,this._time=n,J1()},stop:function(){this._call&&(this._call=null,this._time=1/0,J1())}};var uz=uc("start","end","cancel","interrupt"),cz=[],N2=0,tb=1,nb=2,sg=3,rb=5,ag=6;function ug(e,t,n,r,i,o){var s=e.__transition;if(s){if(n in s)return}else e.__transition={};!function lz(e,t,n){var i,r=e.__transition;function s(c){var l,d,h,g;if(n.state!==tb)return u();for(l in r)if((g=r[l]).name===n.name){if(g.state===sg)return eb(s);4===g.state?(g.state=ag,g.timer.stop(),g.on.call("interrupt",e,e.__data__,g.index,g.group),delete r[l]):+l<t&&(g.state=ag,g.timer.stop(),g.on.call("cancel",e,e.__data__,g.index,g.group),delete r[l])}if(eb(function(){n.state===sg&&(n.state=4,n.timer.restart(a,n.delay,n.time),a(c))}),n.state=nb,n.on.call("start",e,e.__data__,n.index,n.group),n.state===nb){for(n.state=sg,i=new Array(h=n.tween.length),l=0,d=-1;l<h;++l)(g=n.tween[l].value.call(e,e.__data__,n.index,n.group))&&(i[++d]=g);i.length=d+1}}function a(c){for(var l=c<n.duration?n.ease.call(null,c/n.duration):(n.timer.restart(u),n.state=rb,1),d=-1,h=i.length;++d<h;)i[d].call(e,l);n.state===rb&&(n.on.call("end",e,e.__data__,n.index,n.group),u())}function u(){for(var c in n.state=ag,n.timer.stop(),delete r[t],r)return;delete e.__transition}r[t]=n,n.timer=og(function o(c){n.state=tb,n.timer.restart(s,n.delay,n.time),n.delay<=c&&s(c-n.delay)},0,n.time)}(e,n,{name:t,index:r,group:i,on:uz,tween:cz,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:N2})}function ib(e,t){var n=Hi(e,t);if(n.state>N2)throw new Error("too late; already scheduled");return n}function Qo(e,t){var n=Hi(e,t);if(n.state>sg)throw new Error("too late; already running");return n}function Hi(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function Ea(e,t){var r,i,s,n=e.__transition,o=!0;if(n){for(s in t=null==t?null:t+"",n)(r=n[s]).name===t?(i=r.state>nb&&r.state<rb,r.state=ag,r.timer.stop(),r.on.call(i?"interrupt":"cancel",e,e.__data__,r.index,r.group),delete n[s]):o=!1;o&&delete e.__transition}}var Ff,sb,R2,cg,k2=180/Math.PI,ob={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function O2(e,t,n,r,i,o){var s,a,u;return(s=Math.sqrt(e*e+t*t))&&(e/=s,t/=s),(u=e*n+t*r)&&(n-=e*u,r-=t*u),(a=Math.sqrt(n*n+r*r))&&(n/=a,r/=a,u/=a),e*r<t*n&&(e=-e,t=-t,u=-u,s=-s),{translateX:i,translateY:o,rotate:Math.atan2(t,e)*k2,skewX:Math.atan(u)*k2,scaleX:s,scaleY:a}}function P2(e,t,n,r){function i(c){return c.length?c.pop()+" ":""}return function(c,l){var d=[],h=[];return c=e(c),l=e(l),function o(c,l,d,h,g,y){if(c!==d||l!==h){var v=g.push("translate(",null,t,null,n);y.push({i:v-4,x:mi(c,d)},{i:v-2,x:mi(l,h)})}else(d||h)&&g.push("translate("+d+t+h+n)}(c.translateX,c.translateY,l.translateX,l.translateY,d,h),function s(c,l,d,h){c!==l?(c-l>180?l+=360:l-c>180&&(c+=360),h.push({i:d.push(i(d)+"rotate(",null,r)-2,x:mi(c,l)})):l&&d.push(i(d)+"rotate("+l+r)}(c.rotate,l.rotate,d,h),function a(c,l,d,h){c!==l?h.push({i:d.push(i(d)+"skewX(",null,r)-2,x:mi(c,l)}):l&&d.push(i(d)+"skewX("+l+r)}(c.skewX,l.skewX,d,h),function u(c,l,d,h,g,y){if(c!==d||l!==h){var v=g.push(i(g)+"scale(",null,",",null,")");y.push({i:v-4,x:mi(c,d)},{i:v-2,x:mi(l,h)})}else(1!==d||1!==h)&&g.push(i(g)+"scale("+d+","+h+")")}(c.scaleX,c.scaleY,l.scaleX,l.scaleY,d,h),c=l=null,function(g){for(var b,y=-1,v=h.length;++y<v;)d[(b=h[y]).i]=b.x(g);return d.join("")}}}var F2=P2(function dz(e){return"none"===e?ob:(Ff||(Ff=document.createElement("DIV"),sb=document.documentElement,R2=document.defaultView),Ff.style.transform=e,e=R2.getComputedStyle(sb.appendChild(Ff),null).getPropertyValue("transform"),sb.removeChild(Ff),O2(+(e=e.slice(7,-1).split(","))[0],+e[1],+e[2],+e[3],+e[4],+e[5]))},"px, ","px)","deg)"),L2=P2(function hz(e){return null!=e&&(cg||(cg=document.createElementNS("http://www.w3.org/2000/svg","g")),cg.setAttribute("transform",e),e=cg.transform.baseVal.consolidate())?O2((e=e.matrix).a,e.b,e.c,e.d,e.e,e.f):ob},", ",")",")");function pz(e,t){var n,r;return function(){var i=Qo(this,e),o=i.tween;if(o!==n)for(var s=0,a=(r=n=o).length;s<a;++s)if(r[s].name===t){(r=r.slice()).splice(s,1);break}i.tween=r}}function gz(e,t,n){var r,i;if("function"!=typeof n)throw new Error;return function(){var o=Qo(this,e),s=o.tween;if(s!==r){i=(r=s).slice();for(var a={name:t,value:n},u=0,c=i.length;u<c;++u)if(i[u].name===t){i[u]=a;break}u===c&&i.push(a)}o.tween=i}}function ab(e,t,n){var r=e._id;return e.each(function(){var i=Qo(this,r);(i.value||(i.value={}))[t]=n.apply(this,arguments)}),function(i){return Hi(i,r).value[t]}}function B2(e,t){var n;return("number"==typeof t?mi:t instanceof xs?Sf:(n=xs(t))?(t=n,Sf):Z1)(e,t)}function yz(e){return function(){this.removeAttribute(e)}}function vz(e){return function(){this.removeAttributeNS(e.space,e.local)}}function bz(e,t,n){var r,o,i=n+"";return function(){var s=this.getAttribute(e);return s===i?null:s===r?o:o=t(r=s,n)}}function wz(e,t,n){var r,o,i=n+"";return function(){var s=this.getAttributeNS(e.space,e.local);return s===i?null:s===r?o:o=t(r=s,n)}}function _z(e,t,n){var r,i,o;return function(){var s,u,a=n(this);return null==a?void this.removeAttribute(e):(s=this.getAttribute(e))===(u=a+"")?null:s===r&&u===i?o:(i=u,o=t(r=s,a))}}function Dz(e,t,n){var r,i,o;return function(){var s,u,a=n(this);return null==a?void this.removeAttributeNS(e.space,e.local):(s=this.getAttributeNS(e.space,e.local))===(u=a+"")?null:s===r&&u===i?o:(i=u,o=t(r=s,a))}}function Mz(e,t){var n,r;function i(){var o=t.apply(this,arguments);return o!==r&&(n=(r=o)&&function xz(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}(e,o)),n}return i._value=t,i}function Iz(e,t){var n,r;function i(){var o=t.apply(this,arguments);return o!==r&&(n=(r=o)&&function Cz(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}(e,o)),n}return i._value=t,i}function Tz(e,t){return function(){ib(this,e).delay=+t.apply(this,arguments)}}function Nz(e,t){return t=+t,function(){ib(this,e).delay=t}}function kz(e,t){return function(){Qo(this,e).duration=+t.apply(this,arguments)}}function Oz(e,t){return t=+t,function(){Qo(this,e).duration=t}}var qz=cc.prototype.constructor;function j2(e){return function(){this.style.removeProperty(e)}}var lG=0;function Io(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function ub(e){return cc().transition(e)}function V2(){return++lG}var yc=cc.prototype;function fG(e){return e*e*e}function dG(e){return--e*e*e+1}function cb(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}Io.prototype=ub.prototype={constructor:Io,select:function zz(e){var t=this._name,n=this._id;"function"!=typeof e&&(e=qp(e));for(var r=this._groups,i=r.length,o=new Array(i),s=0;s<i;++s)for(var l,d,a=r[s],u=a.length,c=o[s]=new Array(u),h=0;h<u;++h)(l=a[h])&&(d=e.call(l,l.__data__,h,a))&&("__data__"in l&&(d.__data__=l.__data__),c[h]=d,ug(c[h],t,n,h,c,Hi(l,n)));return new Io(o,this._parents,t,n)},selectAll:function Gz(e){var t=this._name,n=this._id;"function"!=typeof e&&(e=L1(e));for(var r=this._groups,i=r.length,o=[],s=[],a=0;a<i;++a)for(var l,u=r[a],c=u.length,d=0;d<c;++d)if(l=u[d]){for(var g,h=e.call(l,l.__data__,d,u),y=Hi(l,n),v=0,b=h.length;v<b;++v)(g=h[v])&&ug(g,t,n,v,h,y);o.push(h),s.push(l)}return new Io(o,s,t,n)},filter:function Lz(e){"function"!=typeof e&&(e=B1(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var u,o=t[i],s=o.length,a=r[i]=[],c=0;c<s;++c)(u=o[c])&&e.call(u,u.__data__,c,o)&&a.push(u);return new Io(r,this._parents,this._name,this._id)},merge:function Bz(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,r=t.length,o=Math.min(r,n.length),s=new Array(r),a=0;a<o;++a)for(var h,u=t[a],c=n[a],l=u.length,d=s[a]=new Array(l),g=0;g<l;++g)(h=u[g]||c[g])&&(d[g]=h);for(;a<r;++a)s[a]=t[a];return new Io(s,this._parents,this._name,this._id)},selection:function Wz(){return new qz(this._groups,this._parents)},transition:function uG(){for(var e=this._name,t=this._id,n=V2(),r=this._groups,i=r.length,o=0;o<i;++o)for(var u,s=r[o],a=s.length,c=0;c<a;++c)if(u=s[c]){var l=Hi(u,t);ug(u,e,n,c,s,{time:l.time+l.delay+l.duration,delay:0,duration:l.duration,ease:l.ease})}return new Io(r,this._parents,e,n)},call:yc.call,nodes:yc.nodes,node:yc.node,size:yc.size,empty:yc.empty,each:yc.each,on:function Hz(e,t){var n=this._id;return arguments.length<2?Hi(this.node(),n).on.on(e):this.each(function Vz(e,t,n){var r,i,o=function jz(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||"start"===t})}(t)?ib:Qo;return function(){var s=o(this,e),a=s.on;a!==r&&(i=(r=a).copy()).on(t,n),s.on=i}}(n,e,t))},attr:function Ez(e,t){var n=Cf(e),r="transform"===n?L2:B2;return this.attrTween(e,"function"==typeof t?(n.local?Dz:_z)(n,r,ab(this,"attr."+e,t)):null==t?(n.local?vz:yz)(n):(n.local?wz:bz)(n,r,t))},attrTween:function Sz(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==t)return this.tween(n,null);if("function"!=typeof t)throw new Error;var r=Cf(e);return this.tween(n,(r.local?Mz:Iz)(r,t))},style:function Xz(e,t,n){var r="transform"==(e+="")?F2:B2;return null==t?this.styleTween(e,function Yz(e,t){var n,r,i;return function(){var o=ba(this,e),s=(this.style.removeProperty(e),ba(this,e));return o===s?null:o===n&&s===r?i:i=t(n=o,r=s)}}(e,r)).on("end.style."+e,j2(e)):"function"==typeof t?this.styleTween(e,function Qz(e,t,n){var r,i,o;return function(){var s=ba(this,e),a=n(this),u=a+"";return null==a&&(this.style.removeProperty(e),u=a=ba(this,e)),s===u?null:s===r&&u===i?o:(i=u,o=t(r=s,a))}}(e,r,ab(this,"style."+e,t))).each(function Zz(e,t){var n,r,i,a,o="style."+t,s="end."+o;return function(){var u=Qo(this,e),c=u.on,l=null==u.value[o]?a||(a=j2(t)):void 0;(c!==n||i!==l)&&(r=(n=c).copy()).on(s,i=l),u.on=r}}(this._id,e)):this.styleTween(e,function Kz(e,t,n){var r,o,i=n+"";return function(){var s=ba(this,e);return s===i?null:s===r?o:o=t(r=s,n)}}(e,r,t),n).on("end.style."+e,null)},styleTween:function tG(e,t,n){var r="style."+(e+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==t)return this.tween(r,null);if("function"!=typeof t)throw new Error;return this.tween(r,function eG(e,t,n){var r,i;function o(){var s=t.apply(this,arguments);return s!==i&&(r=(i=s)&&function Jz(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}(e,s,n)),r}return o._value=t,o}(e,t,n??""))},text:function iG(e){return this.tween("text","function"==typeof e?function rG(e){return function(){var t=e(this);this.textContent=t??""}}(ab(this,"text",e)):function nG(e){return function(){this.textContent=e}}(null==e?"":e+""))},textTween:function aG(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(null==e)return this.tween(t,null);if("function"!=typeof e)throw new Error;return this.tween(t,function sG(e){var t,n;function r(){var i=e.apply(this,arguments);return i!==n&&(t=(n=i)&&function oG(e){return function(t){this.textContent=e.call(this,t)}}(i)),t}return r._value=e,r}(e))},remove:function $z(){return this.on("end.remove",function Uz(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}(this._id))},tween:function mz(e,t){var n=this._id;if(e+="",arguments.length<2){for(var s,r=Hi(this.node(),n).tween,i=0,o=r.length;i<o;++i)if((s=r[i]).name===e)return s.value;return null}return this.each((null==t?pz:gz)(n,e,t))},delay:function Az(e){var t=this._id;return arguments.length?this.each(("function"==typeof e?Tz:Nz)(t,e)):Hi(this.node(),t).delay},duration:function Rz(e){var t=this._id;return arguments.length?this.each(("function"==typeof e?kz:Oz)(t,e)):Hi(this.node(),t).duration},ease:function Fz(e){var t=this._id;return arguments.length?this.each(function Pz(e,t){if("function"!=typeof t)throw new Error;return function(){Qo(this,e).ease=t}}(t,e)):Hi(this.node(),t).ease},end:function cG(){var e,t,n=this,r=n._id,i=n.size();return new Promise(function(o,s){var a={value:s},u={value:function(){0==--i&&o()}};n.each(function(){var c=Qo(this,r),l=c.on;l!==e&&((t=(e=l).copy())._.cancel.push(a),t._.interrupt.push(a),t._.end.push(u)),c.on=t})})}};var lb={time:null,delay:0,duration:250,ease:cb};function hG(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))return lb.time=mc(),lb;return n}cc.prototype.interrupt=function fz(e){return this.each(function(){Ea(this,e)})},cc.prototype.transition=function pG(e){var t,n;e instanceof Io?(t=e._id,e=e._name):(t=V2(),(n=lb).time=mc(),e=null==e?null:e+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var u,s=r[o],a=s.length,c=0;c<a;++c)(u=s[c])&&ug(u,e,t,c,s,n||hG(u,t));return new Io(r,this._parents,e,t)};var gG=[null];function mG(e,t){var r,i,n=e.__transition;if(n)for(i in t=null==t?null:t+"",n)if((r=n[i]).state>tb&&r.name===t)return new Io([[e]],gG,t,+i);return null}function fb(e){return function(){return e}}function yG(e,t,n){this.target=e,this.type=t,this.selection=n}function H2(){Ue.stopImmediatePropagation()}function db(){Ue.preventDefault(),Ue.stopImmediatePropagation()}var U2={name:"drag"},hb={name:"space"},vc={name:"handle"},bc={name:"center"};function $2(e){return[+e[0],+e[1]]}function pb(e){return[$2(e[0]),$2(e[1])]}var lg={name:"x",handles:["w","e"].map(Lf),input:function(e,t){return null==e?null:[[+e[0],t[0][1]],[+e[1],t[1][1]]]},output:function(e){return e&&[e[0][0],e[1][0]]}},fg={name:"y",handles:["n","s"].map(Lf),input:function(e,t){return null==e?null:[[t[0][0],+e[0]],[t[1][0],+e[1]]]},output:function(e){return e&&[e[0][1],e[1][1]]}},bG={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(Lf),input:function(e){return null==e?null:pb(e)},output:function(e){return e}},Zo={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},z2={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},G2={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},wG={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},_G={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function Lf(e){return{type:e}}function DG(){return!Ue.ctrlKey&&!Ue.button}function EG(){var e=this.ownerSVGElement||this;return e.hasAttribute("viewBox")?[[(e=e.viewBox.baseVal).x,e.y],[e.x+e.width,e.y+e.height]]:[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]}function CG(){return navigator.maxTouchPoints||"ontouchstart"in this}function gb(e){for(;!e.__brush;)if(!(e=e.parentNode))return;return e.__brush}function MG(e){var t=e.__brush;return t?t.dim.output(t.selection):null}function IG(){return mb(lg)}function SG(){return mb(fg)}function q2(){return mb(bG)}function mb(e){var a,t=EG,n=DG,r=CG,i=!0,o=uc("start","brush","end"),s=6;function u(b){var _=b.property("__brush",v).selectAll(".overlay").data([Lf("overlay")]);_.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",Zo.overlay).merge(_).each(function(){var C=gb(this).extent;rn(this).attr("x",C[0][0]).attr("y",C[0][1]).attr("width",C[1][0]-C[0][0]).attr("height",C[1][1]-C[0][1])}),b.selectAll(".selection").data([Lf("selection")]).enter().append("rect").attr("class","selection").attr("cursor",Zo.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var E=b.selectAll(".handle").data(e.handles,function(C){return C.type});E.exit().remove(),E.enter().append("rect").attr("class",function(C){return"handle handle--"+C.type}).attr("cursor",function(C){return Zo[C.type]}),b.each(c).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",h).filter(r).on("touchstart.brush",h).on("touchmove.brush",g).on("touchend.brush touchcancel.brush",y).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function c(){var b=rn(this),_=gb(this).selection;_?(b.selectAll(".selection").style("display",null).attr("x",_[0][0]).attr("y",_[0][1]).attr("width",_[1][0]-_[0][0]).attr("height",_[1][1]-_[0][1]),b.selectAll(".handle").style("display",null).attr("x",function(E){return"e"===E.type[E.type.length-1]?_[1][0]-s/2:_[0][0]-s/2}).attr("y",function(E){return"s"===E.type[0]?_[1][1]-s/2:_[0][1]-s/2}).attr("width",function(E){return"n"===E.type||"s"===E.type?_[1][0]-_[0][0]+s:s}).attr("height",function(E){return"e"===E.type||"w"===E.type?_[1][1]-_[0][1]+s:s})):b.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function l(b,_,E){var C=b.__brush.emitter;return!C||E&&C.clean?new d(b,_,E):C}function d(b,_,E){this.that=b,this.args=_,this.state=b.__brush,this.active=0,this.clean=E}function h(){if((!a||Ue.touches)&&n.apply(this,arguments)){var oe,fe,T,te,X,we,Be,tt,on,ne,Ze,b=this,_=Ue.target.__data__.type,E="selection"===(i&&Ue.metaKey?_="overlay":_)?U2:i&&Ue.altKey?bc:vc,C=e===fg?null:wG[_],I=e===lg?null:_G[_],R=gb(b),G=R.extent,z=R.selection,de=G[0][0],re=G[0][1],Ce=G[1][0],Ye=G[1][1],Ct=0,Dt=0,Jt=C&&I&&i&&Ue.shiftKey,ht=Ue.touches?function vG(e){return function(t){return Nf(t,Ue.touches,e)}}(Ue.changedTouches[0].identifier):_a,cn=ht(b),tn=cn,qe=l(b,arguments,!0).beforestart();"overlay"===_?(z&&(on=!0),R.selection=z=[[oe=e===fg?de:cn[0],T=e===lg?re:cn[1]],[X=e===fg?Ce:oe,Be=e===lg?Ye:T]]):(oe=z[0][0],T=z[0][1],X=z[1][0],Be=z[1][1]),fe=oe,te=T,we=X,tt=Be;var mt=rn(b).attr("pointer-events","none"),xt=mt.selectAll(".overlay").attr("cursor",Zo[_]);if(Ue.touches)qe.moved=gn,qe.ended=Sn;else{var Te=rn(Ue.view).on("mousemove.brush",gn,!0).on("mouseup.brush",Sn,!0);i&&Te.on("keydown.brush",function Lr(){switch(Ue.keyCode){case 16:Jt=C&&I;break;case 18:E===vc&&(C&&(X=we-Ct*C,oe=fe+Ct*C),I&&(Be=tt-Dt*I,T=te+Dt*I),E=bc,$t());break;case 32:(E===vc||E===bc)&&(C<0?X=we-Ct:C>0&&(oe=fe-Ct),I<0?Be=tt-Dt:I>0&&(T=te-Dt),E=hb,xt.attr("cursor",Zo.selection),$t());break;default:return}db()},!0).on("keyup.brush",function rs(){switch(Ue.keyCode){case 16:Jt&&(ne=Ze=Jt=!1,$t());break;case 18:E===bc&&(C<0?X=we:C>0&&(oe=fe),I<0?Be=tt:I>0&&(T=te),E=vc,$t());break;case 32:E===hb&&(Ue.altKey?(C&&(X=we-Ct*C,oe=fe+Ct*C),I&&(Be=tt-Dt*I,T=te+Dt*I),E=bc):(C<0?X=we:C>0&&(oe=fe),I<0?Be=tt:I>0&&(T=te),E=vc),xt.attr("cursor",Zo[_]),$t());break;default:return}db()},!0),Kp(Ue.view)}H2(),Ea(b),c.call(b),qe.start()}function gn(){var Br=ht(b);Jt&&!ne&&!Ze&&(Math.abs(Br[0]-tn[0])>Math.abs(Br[1]-tn[1])?Ze=!0:ne=!0),tn=Br,on=!0,db(),$t()}function $t(){var Br;switch(Ct=tn[0]-cn[0],Dt=tn[1]-cn[1],E){case hb:case U2:C&&(Ct=Math.max(de-oe,Math.min(Ce-X,Ct)),fe=oe+Ct,we=X+Ct),I&&(Dt=Math.max(re-T,Math.min(Ye-Be,Dt)),te=T+Dt,tt=Be+Dt);break;case vc:C<0?(Ct=Math.max(de-oe,Math.min(Ce-oe,Ct)),fe=oe+Ct,we=X):C>0&&(Ct=Math.max(de-X,Math.min(Ce-X,Ct)),fe=oe,we=X+Ct),I<0?(Dt=Math.max(re-T,Math.min(Ye-T,Dt)),te=T+Dt,tt=Be):I>0&&(Dt=Math.max(re-Be,Math.min(Ye-Be,Dt)),te=T,tt=Be+Dt);break;case bc:C&&(fe=Math.max(de,Math.min(Ce,oe-Ct*C)),we=Math.max(de,Math.min(Ce,X+Ct*C))),I&&(te=Math.max(re,Math.min(Ye,T-Dt*I)),tt=Math.max(re,Math.min(Ye,Be+Dt*I)))}we<fe&&(C*=-1,Br=oe,oe=X,X=Br,Br=fe,fe=we,we=Br,_ in z2&&xt.attr("cursor",Zo[_=z2[_]])),tt<te&&(I*=-1,Br=T,T=Be,Be=Br,Br=te,te=tt,tt=Br,_ in G2&&xt.attr("cursor",Zo[_=G2[_]])),R.selection&&(z=R.selection),ne&&(fe=z[0][0],we=z[1][0]),Ze&&(te=z[0][1],tt=z[1][1]),(z[0][0]!==fe||z[0][1]!==te||z[1][0]!==we||z[1][1]!==tt)&&(R.selection=[[fe,te],[we,tt]],c.call(b),qe.brush())}function Sn(){if(H2(),Ue.touches){if(Ue.touches.length)return;a&&clearTimeout(a),a=setTimeout(function(){a=null},500)}else Qp(Ue.view,on),Te.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);mt.attr("pointer-events","all"),xt.attr("cursor",Zo.overlay),R.selection&&(z=R.selection),function xG(e){return e[0][0]===e[1][0]||e[0][1]===e[1][1]}(z)&&(R.selection=null,c.call(b)),qe.end()}}function g(){l(this,arguments).moved()}function y(){l(this,arguments).ended()}function v(){var b=this.__brush||{selection:null};return b.extent=pb(t.apply(this,arguments)),b.dim=e,b}return u.move=function(b,_){b.selection?b.on("start.brush",function(){l(this,arguments).beforestart().start()}).on("interrupt.brush end.brush",function(){l(this,arguments).end()}).tween("brush",function(){var E=this,C=E.__brush,I=l(E,arguments),R=C.selection,G=e.input("function"==typeof _?_.apply(this,arguments):_,C.extent),z=Tf(R,G);function de(oe){C.selection=1===oe&&null===G?null:z(oe),c.call(E),I.brush()}return null!==R&&null!==G?de:de(1)}):b.each(function(){var E=this,C=arguments,I=E.__brush,R=e.input("function"==typeof _?_.apply(E,C):_,I.extent),G=l(E,C).beforestart();Ea(E),I.selection=null===R?null:R,c.call(E),G.start().brush().end()})},u.clear=function(b){u.move(b,null)},d.prototype={beforestart:function(){return 1==++this.active&&(this.state.emitter=this,this.starting=!0),this},start:function(){return this.starting?(this.starting=!1,this.emit("start")):this.emit("brush"),this},brush:function(){return this.emit("brush"),this},end:function(){return 0==--this.active&&(delete this.state.emitter,this.emit("end")),this},emit:function(b){xf(new yG(u,b,e.output(this.state.selection)),o.apply,o,[b,this.that,this.args])}},u.extent=function(b){return arguments.length?(t="function"==typeof b?b:fb(pb(b)),u):t},u.filter=function(b){return arguments.length?(n="function"==typeof b?b:fb(!!b),u):n},u.touchable=function(b){return arguments.length?(r="function"==typeof b?b:fb(!!b),u):r},u.handleSize=function(b){return arguments.length?(s=+b,u):s},u.keyModifiers=function(b){return arguments.length?(i=!!b,u):i},u.on=function(){var b=o.on.apply(o,arguments);return b===o?u:b},u}var W2=Math.cos,Y2=Math.sin,K2=Math.PI,dg=K2/2,Q2=2*K2,Z2=Math.max;function NG(){var e=0,t=null,n=null,r=null;function i(o){var g,y,v,b,_,E,s=o.length,a=[],u=ni(s),c=[],l=[],d=l.groups=new Array(s),h=new Array(s*s);for(g=0,_=-1;++_<s;){for(y=0,E=-1;++E<s;)y+=o[_][E];a.push(y),c.push(ni(s)),g+=y}for(t&&u.sort(function(fe,re){return t(a[fe],a[re])}),n&&c.forEach(function(fe,re){fe.sort(function(T,te){return n(o[re][T],o[re][te])})}),b=(g=Z2(0,Q2-e*s)/g)?e:Q2/s,y=0,_=-1;++_<s;){for(v=y,E=-1;++E<s;){var C=u[_],I=c[C][E],R=o[C][I],G=y,z=y+=R*g;h[I*s+C]={index:C,subindex:I,startAngle:G,endAngle:z,value:R}}d[C]={index:C,startAngle:v,endAngle:y,value:a[C]},y+=b}for(_=-1;++_<s;)for(E=_-1;++E<s;){var de=h[E*s+_],oe=h[_*s+E];(de.value||oe.value)&&l.push(de.value<oe.value?{source:oe,target:de}:{source:de,target:oe})}return r?l.sort(r):l}return i.padAngle=function(o){return arguments.length?(e=Z2(0,o),i):e},i.sortGroups=function(o){return arguments.length?(t=o,i):t},i.sortSubgroups=function(o){return arguments.length?(n=o,i):n},i.sortChords=function(o){return arguments.length?(null==o?r=null:(r=function TG(e){return function(t,n){return e(t.source.value+t.target.value,n.source.value+n.target.value)}}(o))._=o,i):r&&r._},i}var AG=Array.prototype.slice;function yb(e){return function(){return e}}var vb=Math.PI,bb=2*vb,Ca=1e-6,kG=bb-Ca;function wb(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function X2(){return new wb}wb.prototype=X2.prototype={constructor:wb,moveTo:function(e,t){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(e,t){this._+="L"+(this._x1=+e)+","+(this._y1=+t)},quadraticCurveTo:function(e,t,n,r){this._+="Q"+ +e+","+ +t+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(e,t,n,r,i,o){this._+="C"+ +e+","+ +t+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+o)},arcTo:function(e,t,n,r,i){var o=this._x1,s=this._y1,a=(n=+n)-(e=+e),u=(r=+r)-(t=+t),c=o-e,l=s-t,d=c*c+l*l;if((i=+i)<0)throw new Error("negative radius: "+i);if(null===this._x1)this._+="M"+(this._x1=e)+","+(this._y1=t);else if(d>Ca)if(Math.abs(l*a-u*c)>Ca&&i){var h=n-o,g=r-s,y=a*a+u*u,v=h*h+g*g,b=Math.sqrt(y),_=Math.sqrt(d),E=i*Math.tan((vb-Math.acos((y+d-v)/(2*b*_)))/2),C=E/_,I=E/b;Math.abs(C-1)>Ca&&(this._+="L"+(e+C*c)+","+(t+C*l)),this._+="A"+i+","+i+",0,0,"+ +(l*h>c*g)+","+(this._x1=e+I*a)+","+(this._y1=t+I*u)}else this._+="L"+(this._x1=e)+","+(this._y1=t)},arc:function(e,t,n,r,i,o){e=+e,t=+t,o=!!o;var s=(n=+n)*Math.cos(r),a=n*Math.sin(r),u=e+s,c=t+a,l=1^o,d=o?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+u+","+c:(Math.abs(this._x1-u)>Ca||Math.abs(this._y1-c)>Ca)&&(this._+="L"+u+","+c),n&&(d<0&&(d=d%bb+bb),d>kG?this._+="A"+n+","+n+",0,1,"+l+","+(e-s)+","+(t-a)+"A"+n+","+n+",0,1,"+l+","+(this._x1=u)+","+(this._y1=c):d>Ca&&(this._+="A"+n+","+n+",0,"+ +(d>=vb)+","+l+","+(this._x1=e+n*Math.cos(i))+","+(this._y1=t+n*Math.sin(i))))},rect:function(e,t,n,r){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};const xa=X2;function OG(e){return e.source}function RG(e){return e.target}function PG(e){return e.radius}function FG(e){return e.startAngle}function LG(e){return e.endAngle}function BG(){var e=OG,t=RG,n=PG,r=FG,i=LG,o=null;function s(){var a,u=AG.call(arguments),c=e.apply(this,u),l=t.apply(this,u),d=+n.apply(this,(u[0]=c,u)),h=r.apply(this,u)-dg,g=i.apply(this,u)-dg,y=d*W2(h),v=d*Y2(h),b=+n.apply(this,(u[0]=l,u)),_=r.apply(this,u)-dg,E=i.apply(this,u)-dg;if(o||(o=a=xa()),o.moveTo(y,v),o.arc(0,0,d,h,g),(h!==_||g!==E)&&(o.quadraticCurveTo(0,0,b*W2(_),b*Y2(_)),o.arc(0,0,b,_,E)),o.quadraticCurveTo(0,0,y,v),o.closePath(),a)return o=null,a+""||null}return s.radius=function(a){return arguments.length?(n="function"==typeof a?a:yb(+a),s):n},s.startAngle=function(a){return arguments.length?(r="function"==typeof a?a:yb(+a),s):r},s.endAngle=function(a){return arguments.length?(i="function"==typeof a?a:yb(+a),s):i},s.source=function(a){return arguments.length?(e=a,s):e},s.target=function(a){return arguments.length?(t=a,s):t},s.context=function(a){return arguments.length?(o=a??null,s):o},s}var yi="$";function hg(){}function J2(e,t){var n=new hg;if(e instanceof hg)e.each(function(a,u){n.set(u,a)});else if(Array.isArray(e)){var o,r=-1,i=e.length;if(null==t)for(;++r<i;)n.set(r,e[r]);else for(;++r<i;)n.set(t(o=e[r],r,e),o)}else if(e)for(var s in e)n.set(s,e[s]);return n}hg.prototype=J2.prototype={constructor:hg,has:function(e){return yi+e in this},get:function(e){return this[yi+e]},set:function(e,t){return this[yi+e]=t,this},remove:function(e){var t=yi+e;return t in this&&delete this[t]},clear:function(){for(var e in this)e[0]===yi&&delete this[e]},keys:function(){var e=[];for(var t in this)t[0]===yi&&e.push(t.slice(1));return e},values:function(){var e=[];for(var t in this)t[0]===yi&&e.push(this[t]);return e},entries:function(){var e=[];for(var t in this)t[0]===yi&&e.push({key:t.slice(1),value:this[t]});return e},size:function(){var e=0;for(var t in this)t[0]===yi&&++e;return e},empty:function(){for(var e in this)if(e[0]===yi)return!1;return!0},each:function(e){for(var t in this)t[0]===yi&&e(this[t],t.slice(1),this)}};const Ms=J2;function jG(){var n,r,i,e=[],t=[];function o(a,u,c,l){if(u>=e.length)return null!=n&&a.sort(n),null!=r?r(a):a;for(var y,v,_,d=-1,h=a.length,g=e[u++],b=Ms(),E=c();++d<h;)(_=b.get(y=g(v=a[d])+""))?_.push(v):b.set(y,[v]);return b.each(function(C,I){l(E,I,o(C,u,c,l))}),E}function s(a,u){if(++u>e.length)return a;var c,l=t[u-1];return null!=r&&u>=e.length?c=a.entries():(c=[],a.each(function(d,h){c.push({key:h,values:s(d,u)})})),null!=l?c.sort(function(d,h){return l(d.key,h.key)}):c}return i={object:function(a){return o(a,0,VG,HG)},map:function(a){return o(a,0,eN,tN)},entries:function(a){return s(o(a,0,eN,tN),0)},key:function(a){return e.push(a),i},sortKeys:function(a){return t[e.length-1]=a,i},sortValues:function(a){return n=a,i},rollup:function(a){return r=a,i}}}function VG(){return{}}function HG(e,t,n){e[t]=n}function eN(){return Ms()}function tN(e,t,n){e.set(t,n)}function pg(){}var Ma=Ms.prototype;function nN(e,t){var n=new pg;if(e instanceof pg)e.each(function(o){n.add(o)});else if(e){var r=-1,i=e.length;if(null==t)for(;++r<i;)n.add(e[r]);else for(;++r<i;)n.add(t(e[r],r,e))}return n}pg.prototype=nN.prototype={constructor:pg,has:Ma.has,add:function(e){return this[yi+(e+="")]=e,this},remove:Ma.remove,clear:Ma.clear,values:Ma.keys,size:Ma.size,empty:Ma.empty,each:Ma.each};const UG=nN;function $G(e){var t=[];for(var n in e)t.push(n);return t}function zG(e){var t=[];for(var n in e)t.push(e[n]);return t}function GG(e){var t=[];for(var n in e)t.push({key:n,value:e[n]});return t}var rN=Math.PI/180,iN=180/Math.PI,oN=.96422,sN=1,aN=.82521,uN=4/29,wc=6/29,cN=3*wc*wc,qG=wc*wc*wc;function lN(e){if(e instanceof Ui)return new Ui(e.l,e.a,e.b,e.opacity);if(e instanceof So)return dN(e);e instanceof or||(e=G1(e));var o,s,t=Cb(e.r),n=Cb(e.g),r=Cb(e.b),i=_b((.2225045*t+.7168786*n+.0606169*r)/sN);return t===n&&n===r?o=s=i:(o=_b((.4360747*t+.3850649*n+.1430804*r)/oN),s=_b((.0139322*t+.0971045*n+.7141733*r)/aN)),new Ui(116*i-16,500*(o-i),200*(i-s),e.opacity)}function WG(e,t){return new Ui(e,0,0,t??1)}function mg(e,t,n,r){return 1===arguments.length?lN(e):new Ui(e,t,n,r??1)}function Ui(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function _b(e){return e>qG?Math.pow(e,1/3):e/cN+uN}function Db(e){return e>wc?e*e*e:cN*(e-uN)}function Eb(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function Cb(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function fN(e){if(e instanceof So)return new So(e.h,e.c,e.l,e.opacity);if(e instanceof Ui||(e=lN(e)),0===e.a&&0===e.b)return new So(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*iN;return new So(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function YG(e,t,n,r){return 1===arguments.length?fN(e):new So(n,t,e,r??1)}function yg(e,t,n,r){return 1===arguments.length?fN(e):new So(e,t,n,r??1)}function So(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function dN(e){if(isNaN(e.h))return new Ui(e.l,0,0,e.opacity);var t=e.h*rN;return new Ui(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}fc(Ui,mg,Mf(Cs,{brighter:function(e){return new Ui(this.l+18*(e??1),this.a,this.b,this.opacity)},darker:function(e){return new Ui(this.l-18*(e??1),this.a,this.b,this.opacity)},rgb:function(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return new or(Eb(3.1338561*(t=oN*Db(t))-1.6168667*(e=sN*Db(e))-.4906146*(n=aN*Db(n))),Eb(-.9787684*t+1.9161415*e+.033454*n),Eb(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),fc(So,yg,Mf(Cs,{brighter:function(e){return new So(this.h,this.c,this.l+18*(e??1),this.opacity)},darker:function(e){return new So(this.h,this.c,this.l-18*(e??1),this.opacity)},rgb:function(){return dN(this).rgb()}}));var xb=1.78277,Mb=-.29227,vg=-.90649,Bf=1.97294,pN=Bf*vg,gN=Bf*xb,mN=xb*Mb- -.14861*vg;function $i(e,t,n,r){return 1===arguments.length?function KG(e){if(e instanceof Ia)return new Ia(e.h,e.s,e.l,e.opacity);e instanceof or||(e=G1(e));var n=e.g/255,r=e.b/255,i=(mN*r+pN*(e.r/255)-gN*n)/(mN+pN-gN),o=r-i,s=(Bf*(n-i)-Mb*o)/vg,a=Math.sqrt(s*s+o*o)/(Bf*i*(1-i)),u=a?Math.atan2(s,o)*iN-120:NaN;return new Ia(u<0?u+360:u,a,i,e.opacity)}(e):new Ia(e,t,n,r??1)}function Ia(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}fc(Ia,$i,Mf(Cs,{brighter:function(e){return e=null==e?dc:Math.pow(dc,e),new Ia(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new Ia(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=isNaN(this.h)?0:(this.h+120)*rN,t=+this.l,n=isNaN(this.s)?0:this.s*t*(1-t),r=Math.cos(e),i=Math.sin(e);return new or(255*(t+n*(-.14861*r+xb*i)),255*(t+n*(Mb*r+vg*i)),255*(t+n*(Bf*r)),this.opacity)}}));var yN=Array.prototype.slice;function ZG(e,t){return e-t}function Is(e){return function(){return e}}function JG(e,t){for(var i,n=-1,r=t.length;++n<r;)if(i=eq(e,t[n]))return i;return 0}function eq(e,t){for(var n=t[0],r=t[1],i=-1,o=0,s=e.length,a=s-1;o<s;a=o++){var u=e[o],c=u[0],l=u[1],d=e[a],h=d[0],g=d[1];if(tq(u,d,t))return 0;l>r!=g>r&&n<(h-c)*(r-l)/(g-l)+c&&(i=-i)}return i}function tq(e,t,n){var r;return function nq(e,t,n){return(t[0]-e[0])*(n[1]-e[1])==(n[0]-e[0])*(t[1]-e[1])}(e,t,n)&&function rq(e,t,n){return e<=t&&t<=n||n<=t&&t<=e}(e[r=+(e[0]===t[0])],n[r],t[r])}function iq(){}var Xo=[[],[[[1,1.5],[.5,1]]],[[[1.5,1],[1,1.5]]],[[[1.5,1],[.5,1]]],[[[1,.5],[1.5,1]]],[[[1,1.5],[.5,1]],[[1,.5],[1.5,1]]],[[[1,.5],[1,1.5]]],[[[1,.5],[.5,1]]],[[[.5,1],[1,.5]]],[[[1,1.5],[1,.5]]],[[[.5,1],[1,.5]],[[1.5,1],[1,1.5]]],[[[1.5,1],[1,.5]]],[[[.5,1],[1.5,1]]],[[[1,1.5],[1.5,1]]],[[[.5,1],[1,1.5]]],[]];function vN(){var e=1,t=1,n=O1,r=u;function i(c){var l=n(c);if(Array.isArray(l))l=l.slice().sort(ZG);else{var d=S1(c),h=d[0],g=d[1];l=va(h,g,l),l=ni(Math.floor(h/l)*l,Math.floor(g/l)*l,l)}return l.map(function(y){return o(c,y)})}function o(c,l){var d=[],h=[];return function s(c,l,d){var y,v,_,E,C,h=new Array,g=new Array;for(y=v=-1,Xo[(_=c[0]>=l)<<1].forEach(I);++y<e-1;)Xo[_|(_=c[y+1]>=l)<<1].forEach(I);for(Xo[0|_].forEach(I);++v<t-1;){for(y=-1,Xo[(_=c[v*e+e]>=l)<<1|(E=c[v*e]>=l)<<2].forEach(I);++y<e-1;)C=E,Xo[_|(_=c[v*e+e+y+1]>=l)<<1|(E=c[v*e+y+1]>=l)<<2|C<<3].forEach(I);Xo[_|E<<3].forEach(I)}for(y=-1,Xo[(E=c[v*e]>=l)<<2].forEach(I);++y<e-1;)C=E,Xo[(E=c[v*e+y+1]>=l)<<2|C<<3].forEach(I);function I(R){var fe,re,G=[R[0][0]+y,R[0][1]+v],z=[R[1][0]+y,R[1][1]+v],de=a(G),oe=a(z);(fe=g[de])?(re=h[oe])?(delete g[fe.end],delete h[re.start],fe===re?(fe.ring.push(z),d(fe.ring)):h[fe.start]=g[re.end]={start:fe.start,end:re.end,ring:fe.ring.concat(re.ring)}):(delete g[fe.end],fe.ring.push(z),g[fe.end=oe]=fe):(fe=h[oe])?(re=g[de])?(delete h[fe.start],delete g[re.end],fe===re?(fe.ring.push(z),d(fe.ring)):h[re.start]=g[fe.end]={start:re.start,end:fe.end,ring:re.ring.concat(fe.ring)}):(delete h[fe.start],fe.ring.unshift(G),h[fe.start=de]=fe):h[de]=g[oe]={start:de,end:oe,ring:[G,z]}}Xo[E<<3].forEach(I)}(c,l,function(g){r(g,c,l),function XG(e){for(var t=0,n=e.length,r=e[n-1][1]*e[0][0]-e[n-1][0]*e[0][1];++t<n;)r+=e[t-1][1]*e[t][0]-e[t-1][0]*e[t][1];return r}(g)>0?d.push([g]):h.push(g)}),h.forEach(function(g){for(var b,y=0,v=d.length;y<v;++y)if(-1!==JG((b=d[y])[0],g))return void b.push(g)}),{type:"MultiPolygon",value:l,coordinates:d}}function a(c){return 2*c[0]+c[1]*(e+1)*4}function u(c,l,d){c.forEach(function(h){var _,g=h[0],y=h[1],v=0|g,b=0|y,E=l[b*e+v];g>0&&g<e&&v===g&&(h[0]=g+(d-(_=l[b*e+v-1]))/(E-_)-.5),y>0&&y<t&&b===y&&(h[1]=y+(d-(_=l[(b-1)*e+v]))/(E-_)-.5)})}return i.contour=o,i.size=function(c){if(!arguments.length)return[e,t];var l=Math.ceil(c[0]),d=Math.ceil(c[1]);if(!(l>0&&d>0))throw new Error("invalid size");return e=l,t=d,i},i.thresholds=function(c){return arguments.length?(n="function"==typeof c?c:Array.isArray(c)?Is(yN.call(c)):Is(c),i):n},i.smooth=function(c){return arguments.length?(r=c?u:iq,i):r===u},i}function Ib(e,t,n){for(var r=e.width,i=e.height,o=1+(n<<1),s=0;s<i;++s)for(var a=0,u=0;a<r+n;++a)a<r&&(u+=e.data[a+s*r]),a>=n&&(a>=o&&(u-=e.data[a-o+s*r]),t.data[a-n+s*r]=u/Math.min(a+1,r-1+o-a,o))}function Sb(e,t,n){for(var r=e.width,i=e.height,o=1+(n<<1),s=0;s<r;++s)for(var a=0,u=0;a<i+n;++a)a<i&&(u+=e.data[s+a*r]),a>=n&&(a>=o&&(u-=e.data[s+(a-o)*r]),t.data[s+(a-n)*r]=u/Math.min(a+1,i-1+o-a,o))}function oq(e){return e[0]}function sq(e){return e[1]}function aq(){return 1}function uq(){var e=oq,t=sq,n=aq,r=960,i=500,o=20,s=2,a=3*o,u=r+2*a>>s,c=i+2*a>>s,l=Is(20);function d(_){var E=new Float32Array(u*c),C=new Float32Array(u*c);_.forEach(function(G,z,de){var oe=+e(G,z,de)+a>>s,fe=+t(G,z,de)+a>>s,re=+n(G,z,de);oe>=0&&oe<u&&fe>=0&&fe<c&&(E[oe+fe*u]+=re)}),Ib({width:u,height:c,data:E},{width:u,height:c,data:C},o>>s),Sb({width:u,height:c,data:C},{width:u,height:c,data:E},o>>s),Ib({width:u,height:c,data:E},{width:u,height:c,data:C},o>>s),Sb({width:u,height:c,data:C},{width:u,height:c,data:E},o>>s),Ib({width:u,height:c,data:E},{width:u,height:c,data:C},o>>s),Sb({width:u,height:c,data:C},{width:u,height:c,data:E},o>>s);var I=l(E);if(!Array.isArray(I)){var R=qT(E);I=va(0,R,I),(I=ni(0,Math.floor(R/I)*I,I)).shift()}return vN().thresholds(I).size([u,c])(E).map(h)}function h(_){return _.value*=Math.pow(2,-2*s),_.coordinates.forEach(g),_}function g(_){_.forEach(y)}function y(_){_.forEach(v)}function v(_){_[0]=_[0]*Math.pow(2,s)-a,_[1]=_[1]*Math.pow(2,s)-a}function b(){return u=r+2*(a=3*o)>>s,c=i+2*a>>s,d}return d.x=function(_){return arguments.length?(e="function"==typeof _?_:Is(+_),d):e},d.y=function(_){return arguments.length?(t="function"==typeof _?_:Is(+_),d):t},d.weight=function(_){return arguments.length?(n="function"==typeof _?_:Is(+_),d):n},d.size=function(_){if(!arguments.length)return[r,i];var E=Math.ceil(_[0]),C=Math.ceil(_[1]);if(!(E>=0||E>=0))throw new Error("invalid size");return r=E,i=C,b()},d.cellSize=function(_){if(!arguments.length)return 1<<s;if(!((_=+_)>=1))throw new Error("invalid cell size");return s=Math.floor(Math.log(_)/Math.LN2),b()},d.thresholds=function(_){return arguments.length?(l="function"==typeof _?_:Array.isArray(_)?Is(yN.call(_)):Is(_),d):l},d.bandwidth=function(_){if(!arguments.length)return Math.sqrt(o*(o+1));if(!((_=+_)>=0))throw new Error("invalid bandwidth");return o=Math.round((Math.sqrt(4*_*_+1)-1)/2),b()},d}function bg(e){return function(){return e}}function Tb(e,t,n,r,i,o,s,a,u,c){this.target=e,this.type=t,this.subject=n,this.identifier=r,this.active=i,this.x=o,this.y=s,this.dx=a,this.dy=u,this._=c}function cq(){return!Ue.ctrlKey&&!Ue.button}function lq(){return this.parentNode}function fq(e){return e??{x:Ue.x,y:Ue.y}}function dq(){return navigator.maxTouchPoints||"ontouchstart"in this}function hq(){var a,u,c,l,e=cq,t=lq,n=fq,r=dq,i={},o=uc("start","drag","end"),s=0,d=0;function h(I){I.on("mousedown.drag",g).filter(r).on("touchstart.drag",b).on("touchmove.drag",_).on("touchend.drag touchcancel.drag",E).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function g(){if(!l&&e.apply(this,arguments)){var I=C("mouse",t.apply(this,arguments),_a,this,arguments);I&&(rn(Ue.view).on("mousemove.drag",y,!0).on("mouseup.drag",v,!0),Kp(Ue.view),z1(),c=!1,a=Ue.clientX,u=Ue.clientY,I("start"))}}function y(){if(lc(),!c){var I=Ue.clientX-a,R=Ue.clientY-u;c=I*I+R*R>d}i.mouse("drag")}function v(){rn(Ue.view).on("mousemove.drag mouseup.drag",null),Qp(Ue.view,c),lc(),i.mouse("end")}function b(){if(e.apply(this,arguments)){var z,de,I=Ue.changedTouches,R=t.apply(this,arguments),G=I.length;for(z=0;z<G;++z)(de=C(I[z].identifier,R,Nf,this,arguments))&&(z1(),de("start"))}}function _(){var G,z,I=Ue.changedTouches,R=I.length;for(G=0;G<R;++G)(z=i[I[G].identifier])&&(lc(),z("drag"))}function E(){var G,z,I=Ue.changedTouches,R=I.length;for(l&&clearTimeout(l),l=setTimeout(function(){l=null},500),G=0;G<R;++G)(z=i[I[G].identifier])&&(z1(),z("end"))}function C(I,R,G,z,de){var fe,re,T,oe=G(R,I),te=o.copy();if(xf(new Tb(h,"beforestart",fe,I,s,oe[0],oe[1],0,0,te),function(){return null!=(Ue.subject=fe=n.apply(z,de))&&(re=fe.x-oe[0]||0,T=fe.y-oe[1]||0,!0)}))return function Ce(X){var Ye,we=oe;switch(X){case"start":i[I]=Ce,Ye=s++;break;case"end":delete i[I],--s;case"drag":oe=G(R,I),Ye=s}xf(new Tb(h,X,fe,I,Ye,oe[0]+re,oe[1]+T,oe[0]-we[0],oe[1]-we[1],te),te.apply,te,[X,z,de])}}return h.filter=function(I){return arguments.length?(e="function"==typeof I?I:bg(!!I),h):e},h.container=function(I){return arguments.length?(t="function"==typeof I?I:bg(I),h):t},h.subject=function(I){return arguments.length?(n="function"==typeof I?I:bg(I),h):n},h.touchable=function(I){return arguments.length?(r="function"==typeof I?I:bg(!!I),h):r},h.on=function(){var I=o.on.apply(o,arguments);return I===o?h:I},h.clickDistance=function(I){return arguments.length?(d=(I=+I)*I,h):Math.sqrt(d)},h}Tb.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};var bN={},Nb={},Ab=34,jf=10,kb=13;function wN(e){return new Function("d","return {"+e.map(function(t,n){return JSON.stringify(t)+": d["+n+'] || ""'}).join(",")+"}")}function _N(e){var t=Object.create(null),n=[];return e.forEach(function(r){for(var i in r)i in t||n.push(t[i]=i)}),n}function Gr(e,t){var n=e+"",r=n.length;return r<t?new Array(t-r+1).join(0)+n:n}function wg(e){var t=new RegExp('["'+e+"\n\r]"),n=e.charCodeAt(0);function i(d,h){var _,g=[],y=d.length,v=0,b=0,E=y<=0,C=!1;function I(){if(E)return Nb;if(C)return C=!1,bN;var G,de,z=v;if(d.charCodeAt(z)===Ab){for(;v++<y&&d.charCodeAt(v)!==Ab||d.charCodeAt(++v)===Ab;);return(G=v)>=y?E=!0:(de=d.charCodeAt(v++))===jf?C=!0:de===kb&&(C=!0,d.charCodeAt(v)===jf&&++v),d.slice(z+1,G-1).replace(/""/g,'"')}for(;v<y;){if((de=d.charCodeAt(G=v++))===jf)C=!0;else if(de===kb)C=!0,d.charCodeAt(v)===jf&&++v;else if(de!==n)continue;return d.slice(z,G)}return E=!0,d.slice(z,y)}for(d.charCodeAt(y-1)===jf&&--y,d.charCodeAt(y-1)===kb&&--y;(_=I())!==Nb;){for(var R=[];_!==bN&&_!==Nb;)R.push(_),_=I();h&&null==(R=h(R,b++))||g.push(R)}return g}function o(d,h){return d.map(function(g){return h.map(function(y){return l(g[y])}).join(e)})}function c(d){return d.map(l).join(e)}function l(d){return null==d?"":d instanceof Date?function mq(e){var t=e.getUTCHours(),n=e.getUTCMinutes(),r=e.getUTCSeconds(),i=e.getUTCMilliseconds();return isNaN(e)?"Invalid Date":function gq(e){return e<0?"-"+Gr(-e,6):e>9999?"+"+Gr(e,6):Gr(e,4)}(e.getUTCFullYear())+"-"+Gr(e.getUTCMonth()+1,2)+"-"+Gr(e.getUTCDate(),2)+(i?"T"+Gr(t,2)+":"+Gr(n,2)+":"+Gr(r,2)+"."+Gr(i,3)+"Z":r?"T"+Gr(t,2)+":"+Gr(n,2)+":"+Gr(r,2)+"Z":n||t?"T"+Gr(t,2)+":"+Gr(n,2)+"Z":"")}(d):t.test(d+="")?'"'+d.replace(/"/g,'""')+'"':d}return{parse:function r(d,h){var g,y,v=i(d,function(b,_){if(g)return g(b,_-1);y=b,g=h?function pq(e,t){var n=wN(e);return function(r,i){return t(n(r),i,e)}}(b,h):wN(b)});return v.columns=y||[],v},parseRows:i,format:function s(d,h){return null==h&&(h=_N(d)),[h.map(l).join(e)].concat(o(d,h)).join("\n")},formatBody:function a(d,h){return null==h&&(h=_N(d)),o(d,h).join("\n")},formatRows:function u(d){return d.map(c).join("\n")},formatRow:c,formatValue:l}}var Sa=wg(","),DN=Sa.parse,yq=Sa.parseRows,vq=Sa.format,bq=Sa.formatBody,wq=Sa.formatRows,_q=Sa.formatRow,Dq=Sa.formatValue,Ta=wg("\t"),EN=Ta.parse,Eq=Ta.parseRows,Cq=Ta.format,xq=Ta.formatBody,Mq=Ta.formatRows,Iq=Ta.formatRow,Sq=Ta.formatValue;function Tq(e){for(var t in e){var r,i,n=e[t].trim();if(n)if("true"===n)n=!0;else if("false"===n)n=!1;else if("NaN"===n)n=NaN;else if(isNaN(r=+n)){if(!(i=n.match(/^([-+]\d{2})?\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|[-+]\d{2}:\d{2})?)?$/)))continue;Nq&&i[4]&&!i[7]&&(n=n.replace(/-/g,"/").replace(/T/," ")),n=new Date(n)}else n=r;else n=null;e[t]=n}return e}var Nq=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours();function Aq(e){return+e}function kq(e){return e*e}function Oq(e){return e*(2-e)}function CN(e){return((e*=2)<=1?e*e:--e*(2-e)+1)/2}var Rq=function e(t){function n(r){return Math.pow(r,t)}return t=+t,n.exponent=e,n}(3),Pq=function e(t){function n(r){return 1-Math.pow(1-r,t)}return t=+t,n.exponent=e,n}(3),xN=function e(t){function n(r){return((r*=2)<=1?Math.pow(r,t):2-Math.pow(2-r,t))/2}return t=+t,n.exponent=e,n}(3),MN=Math.PI,IN=MN/2;function Fq(e){return 1==+e?1:1-Math.cos(e*IN)}function Lq(e){return Math.sin(e*IN)}function SN(e){return(1-Math.cos(MN*e))/2}function Ss(e){return 1.0009775171065494*(Math.pow(2,-10*e)-.0009765625)}function Bq(e){return Ss(1-+e)}function jq(e){return 1-Ss(e)}function TN(e){return((e*=2)<=1?Ss(1-e):2-Ss(e-1))/2}function Vq(e){return 1-Math.sqrt(1-e*e)}function Hq(e){return Math.sqrt(1- --e*e)}function NN(e){return((e*=2)<=1?1-Math.sqrt(1-e*e):Math.sqrt(1-(e-=2)*e)+1)/2}var Rb=4/11,Uq=6/11,$q=8/11,zq=3/4,Gq=9/11,qq=10/11,Wq=15/16,Yq=21/22,Kq=63/64,_g=1/Rb/Rb;function Qq(e){return 1-Vf(1-e)}function Vf(e){return(e=+e)<Rb?_g*e*e:e<$q?_g*(e-=Uq)*e+zq:e<qq?_g*(e-=Gq)*e+Wq:_g*(e-=Yq)*e+Kq}function Zq(e){return((e*=2)<=1?1-Vf(1-e):Vf(e-1)+1)/2}var Pb=1.70158,Xq=function e(t){function n(r){return(r=+r)*r*(t*(r-1)+r)}return t=+t,n.overshoot=e,n}(Pb),Jq=function e(t){function n(r){return--r*r*((r+1)*t+r)+1}return t=+t,n.overshoot=e,n}(Pb),AN=function e(t){function n(r){return((r*=2)<1?r*r*((t+1)*r-t):(r-=2)*r*((t+1)*r+t)+2)/2}return t=+t,n.overshoot=e,n}(Pb),_c=2*Math.PI,eW=function e(t,n){var r=Math.asin(1/(t=Math.max(1,t)))*(n/=_c);function i(o){return t*Ss(- --o)*Math.sin((r-o)/n)}return i.amplitude=function(o){return e(o,n*_c)},i.period=function(o){return e(t,o)},i}(1,.3),kN=function e(t,n){var r=Math.asin(1/(t=Math.max(1,t)))*(n/=_c);function i(o){return 1-t*Ss(o=+o)*Math.sin((o+r)/n)}return i.amplitude=function(o){return e(o,n*_c)},i.period=function(o){return e(t,o)},i}(1,.3),tW=function e(t,n){var r=Math.asin(1/(t=Math.max(1,t)))*(n/=_c);function i(o){return((o=2*o-1)<0?t*Ss(-o)*Math.sin((r-o)/n):2-t*Ss(o)*Math.sin((r+o)/n))/2}return i.amplitude=function(o){return e(o,n*_c)},i.period=function(o){return e(t,o)},i}(1,.3);function nW(e){if(!e.ok)throw new Error(e.status+" "+e.statusText);return e.blob()}function rW(e,t){return fetch(e,t).then(nW)}function iW(e){if(!e.ok)throw new Error(e.status+" "+e.statusText);return e.arrayBuffer()}function oW(e,t){return fetch(e,t).then(iW)}function sW(e){if(!e.ok)throw new Error(e.status+" "+e.statusText);return e.text()}function Dg(e,t){return fetch(e,t).then(sW)}function ON(e){return function(t,n,r){return 2===arguments.length&&"function"==typeof n&&(r=n,n=void 0),Dg(t,n).then(function(i){return e(i,r)})}}function aW(e,t,n,r){3===arguments.length&&"function"==typeof n&&(r=n,n=void 0);var i=wg(e);return Dg(t,n).then(function(o){return i.parse(o,r)})}var uW=ON(DN),cW=ON(EN);function lW(e,t){return new Promise(function(n,r){var i=new Image;for(var o in t)i[o]=t[o];i.onerror=r,i.onload=function(){n(i)},i.src=e})}function fW(e){if(!e.ok)throw new Error(e.status+" "+e.statusText);if(204!==e.status&&205!==e.status)return e.json()}function dW(e,t){return fetch(e,t).then(fW)}function Bb(e){return function(t,n){return Dg(t,n).then(function(r){return(new DOMParser).parseFromString(r,e)})}}const hW=Bb("application/xml");var pW=Bb("text/html"),gW=Bb("image/svg+xml");function mW(e,t){var n;function r(){var i,s,o=n.length,a=0,u=0;for(i=0;i<o;++i)a+=(s=n[i]).x,u+=s.y;for(a=a/o-e,u=u/o-t,i=0;i<o;++i)(s=n[i]).x-=a,s.y-=u}return null==e&&(e=0),null==t&&(t=0),r.initialize=function(i){n=i},r.x=function(i){return arguments.length?(e=+i,r):e},r.y=function(i){return arguments.length?(t=+i,r):t},r}function Qn(e){return function(){return e}}function Ts(){return 1e-6*(Math.random()-.5)}function RN(e,t,n,r){if(isNaN(t)||isNaN(n))return e;var i,d,h,g,y,v,b,_,E,o=e._root,s={data:r},a=e._x0,u=e._y0,c=e._x1,l=e._y1;if(!o)return e._root=s,e;for(;o.length;)if((v=t>=(d=(a+c)/2))?a=d:c=d,(b=n>=(h=(u+l)/2))?u=h:l=h,i=o,!(o=o[_=b<<1|v]))return i[_]=s,e;if(g=+e._x.call(null,o.data),y=+e._y.call(null,o.data),t===g&&n===y)return s.next=o,i?i[_]=s:e._root=s,e;do{i=i?i[_]=new Array(4):e._root=new Array(4),(v=t>=(d=(a+c)/2))?a=d:c=d,(b=n>=(h=(u+l)/2))?u=h:l=h}while((_=b<<1|v)==(E=(y>=h)<<1|g>=d));return i[E]=o,i[_]=s,e}function Tr(e,t,n,r,i){this.node=e,this.x0=t,this.y0=n,this.x1=r,this.y1=i}function TW(e){return e[0]}function AW(e){return e[1]}function Eg(e,t,n){var r=new jb(t??TW,n??AW,NaN,NaN,NaN,NaN);return null==e?r:r.addAll(e)}function jb(e,t,n,r,i,o){this._x=e,this._y=t,this._x0=n,this._y0=r,this._x1=i,this._y1=o,this._root=void 0}function PN(e){for(var t={data:e.data},n=t;e=e.next;)n=n.next={data:e.data};return t}var Nr=Eg.prototype=jb.prototype;function OW(e){return e.x+e.vx}function RW(e){return e.y+e.vy}function PW(e){var t,n,r=1,i=1;function o(){for(var u,l,d,h,g,y,v,c=t.length,b=0;b<i;++b)for(l=Eg(t,OW,RW).visitAfter(s),u=0;u<c;++u)v=(y=n[(d=t[u]).index])*y,h=d.x+d.vx,g=d.y+d.vy,l.visit(_);function _(E,C,I,R,G){var z=E.data,de=E.r,oe=y+de;if(!z)return C>h+oe||R<h-oe||I>g+oe||G<g-oe;if(z.index>d.index){var fe=h-z.x-z.vx,re=g-z.y-z.vy,T=fe*fe+re*re;T<oe*oe&&(0===fe&&(T+=(fe=Ts())*fe),0===re&&(T+=(re=Ts())*re),T=(oe-(T=Math.sqrt(T)))/T*r,d.vx+=(fe*=T)*(oe=(de*=de)/(v+de)),d.vy+=(re*=T)*oe,z.vx-=fe*(oe=1-oe),z.vy-=re*oe)}}}function s(u){if(u.data)return u.r=n[u.data.index];for(var c=u.r=0;c<4;++c)u[c]&&u[c].r>u.r&&(u.r=u[c].r)}function a(){if(t){var u,l,c=t.length;for(n=new Array(c),u=0;u<c;++u)n[(l=t[u]).index]=+e(l,u,t)}}return"function"!=typeof e&&(e=Qn(null==e?1:+e)),o.initialize=function(u){t=u,a()},o.iterations=function(u){return arguments.length?(i=+u,o):i},o.strength=function(u){return arguments.length?(r=+u,o):r},o.radius=function(u){return arguments.length?(e="function"==typeof u?u:Qn(+u),a(),o):e},o}function FW(e){return e.index}function FN(e,t){var n=e.get(t);if(!n)throw new Error("missing: "+t);return n}function LW(e){var r,o,s,a,u,t=FW,n=function l(v){return 1/Math.min(a[v.source.index],a[v.target.index])},i=Qn(30),c=1;function d(v){for(var b=0,_=e.length;b<c;++b)for(var C,I,R,G,z,de,oe,E=0;E<_;++E)G=(R=(C=e[E]).target).x+R.vx-(I=C.source).x-I.vx||Ts(),z=R.y+R.vy-I.y-I.vy||Ts(),z*=de=((de=Math.sqrt(G*G+z*z))-o[E])/de*v*r[E],R.vx-=(G*=de)*(oe=u[E]),R.vy-=z*oe,I.vx+=G*(oe=1-oe),I.vy+=z*oe}function h(){if(s){var v,C,b=s.length,_=e.length,E=Ms(s,t);for(v=0,a=new Array(b);v<_;++v)(C=e[v]).index=v,"object"!=typeof C.source&&(C.source=FN(E,C.source)),"object"!=typeof C.target&&(C.target=FN(E,C.target)),a[C.source.index]=(a[C.source.index]||0)+1,a[C.target.index]=(a[C.target.index]||0)+1;for(v=0,u=new Array(_);v<_;++v)u[v]=a[(C=e[v]).source.index]/(a[C.source.index]+a[C.target.index]);r=new Array(_),g(),o=new Array(_),y()}}function g(){if(s)for(var v=0,b=e.length;v<b;++v)r[v]=+n(e[v],v,e)}function y(){if(s)for(var v=0,b=e.length;v<b;++v)o[v]=+i(e[v],v,e)}return null==e&&(e=[]),d.initialize=function(v){s=v,h()},d.links=function(v){return arguments.length?(e=v,h(),d):e},d.id=function(v){return arguments.length?(t=v,d):t},d.iterations=function(v){return arguments.length?(c=+v,d):c},d.strength=function(v){return arguments.length?(n="function"==typeof v?v:Qn(+v),g(),d):n},d.distance=function(v){return arguments.length?(i="function"==typeof v?v:Qn(+v),y(),d):i},d}function BW(e){return e.x}function jW(e){return e.y}Nr.copy=function(){var n,r,e=new jb(this._x,this._y,this._x0,this._y0,this._x1,this._y1),t=this._root;if(!t)return e;if(!t.length)return e._root=PN(t),e;for(n=[{source:t,target:e._root=new Array(4)}];t=n.pop();)for(var i=0;i<4;++i)(r=t.source[i])&&(r.length?n.push({source:r,target:t.target[i]=new Array(4)}):t.target[i]=PN(r));return e},Nr.add=function yW(e){var t=+this._x.call(null,e),n=+this._y.call(null,e);return RN(this.cover(t,n),t,n,e)},Nr.addAll=function vW(e){var t,n,i,o,r=e.length,s=new Array(r),a=new Array(r),u=1/0,c=1/0,l=-1/0,d=-1/0;for(n=0;n<r;++n)isNaN(i=+this._x.call(null,t=e[n]))||isNaN(o=+this._y.call(null,t))||(s[n]=i,a[n]=o,i<u&&(u=i),i>l&&(l=i),o<c&&(c=o),o>d&&(d=o));if(u>l||c>d)return this;for(this.cover(u,c).cover(l,d),n=0;n<r;++n)RN(this,s[n],a[n],e[n]);return this},Nr.cover=function bW(e,t){if(isNaN(e=+e)||isNaN(t=+t))return this;var n=this._x0,r=this._y0,i=this._x1,o=this._y1;if(isNaN(n))i=(n=Math.floor(e))+1,o=(r=Math.floor(t))+1;else{for(var u,c,s=i-n,a=this._root;n>e||e>=i||r>t||t>=o;)switch(c=(t<r)<<1|e<n,u=new Array(4),u[c]=a,a=u,s*=2,c){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=a)}return this._x0=n,this._y0=r,this._x1=i,this._y1=o,this},Nr.data=function wW(){var e=[];return this.visit(function(t){if(!t.length)do{e.push(t.data)}while(t=t.next)}),e},Nr.extent=function _W(e){return arguments.length?this.cover(+e[0][0],+e[0][1]).cover(+e[1][0],+e[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},Nr.find=function DW(e,t,n){var r,s,a,u,c,y,v,i=this._x0,o=this._y0,l=this._x1,d=this._y1,h=[],g=this._root;for(g&&h.push(new Tr(g,i,o,l,d)),null==n?n=1/0:(i=e-n,o=t-n,l=e+n,d=t+n,n*=n);y=h.pop();)if(!(!(g=y.node)||(s=y.x0)>l||(a=y.y0)>d||(u=y.x1)<i||(c=y.y1)<o))if(g.length){var b=(s+u)/2,_=(a+c)/2;h.push(new Tr(g[3],b,_,u,c),new Tr(g[2],s,_,b,c),new Tr(g[1],b,a,u,_),new Tr(g[0],s,a,b,_)),(v=(t>=_)<<1|e>=b)&&(y=h[h.length-1],h[h.length-1]=h[h.length-1-v],h[h.length-1-v]=y)}else{var E=e-+this._x.call(null,g.data),C=t-+this._y.call(null,g.data),I=E*E+C*C;if(I<n){var R=Math.sqrt(n=I);i=e-R,o=t-R,l=e+R,d=t+R,r=g.data}}return r},Nr.remove=function EW(e){if(isNaN(l=+this._x.call(null,e))||isNaN(d=+this._y.call(null,e)))return this;var t,r,i,o,l,d,h,g,y,v,b,_,n=this._root,s=this._x0,a=this._y0,u=this._x1,c=this._y1;if(!n)return this;if(n.length)for(;;){if((y=l>=(h=(s+u)/2))?s=h:u=h,(v=d>=(g=(a+c)/2))?a=g:c=g,t=n,!(n=n[b=v<<1|y]))return this;if(!n.length)break;(t[b+1&3]||t[b+2&3]||t[b+3&3])&&(r=t,_=b)}for(;n.data!==e;)if(i=n,!(n=n.next))return this;return(o=n.next)&&delete n.next,i?(o?i.next=o:delete i.next,this):t?(o?t[b]=o:delete t[b],(n=t[0]||t[1]||t[2]||t[3])&&n===(t[3]||t[2]||t[1]||t[0])&&!n.length&&(r?r[_]=n:this._root=n),this):(this._root=o,this)},Nr.removeAll=function CW(e){for(var t=0,n=e.length;t<n;++t)this.remove(e[t]);return this},Nr.root=function xW(){return this._root},Nr.size=function MW(){var e=0;return this.visit(function(t){if(!t.length)do{++e}while(t=t.next)}),e},Nr.visit=function IW(e){var n,i,o,s,a,u,t=[],r=this._root;for(r&&t.push(new Tr(r,this._x0,this._y0,this._x1,this._y1));n=t.pop();)if(!e(r=n.node,o=n.x0,s=n.y0,a=n.x1,u=n.y1)&&r.length){var c=(o+a)/2,l=(s+u)/2;(i=r[3])&&t.push(new Tr(i,c,l,a,u)),(i=r[2])&&t.push(new Tr(i,o,l,c,u)),(i=r[1])&&t.push(new Tr(i,c,s,a,l)),(i=r[0])&&t.push(new Tr(i,o,s,c,l))}return this},Nr.visitAfter=function SW(e){var r,t=[],n=[];for(this._root&&t.push(new Tr(this._root,this._x0,this._y0,this._x1,this._y1));r=t.pop();){var i=r.node;if(i.length){var o,s=r.x0,a=r.y0,u=r.x1,c=r.y1,l=(s+u)/2,d=(a+c)/2;(o=i[0])&&t.push(new Tr(o,s,a,l,d)),(o=i[1])&&t.push(new Tr(o,l,a,u,d)),(o=i[2])&&t.push(new Tr(o,s,d,l,c)),(o=i[3])&&t.push(new Tr(o,l,d,u,c))}n.push(r)}for(;r=n.pop();)e(r.node,r.x0,r.y0,r.x1,r.y1);return this},Nr.x=function NW(e){return arguments.length?(this._x=e,this):this._x},Nr.y=function kW(e){return arguments.length?(this._y=e,this):this._y};var VW=10,HW=Math.PI*(3-Math.sqrt(5));function UW(e){var t,n=1,r=.001,i=1-Math.pow(r,1/300),o=0,s=.6,a=Ms(),u=og(l),c=uc("tick","end");function l(){d(),c.call("tick",t),n<r&&(u.stop(),c.call("end",t))}function d(y){var v,_,b=e.length;void 0===y&&(y=1);for(var E=0;E<y;++E)for(n+=(o-n)*i,a.each(function(C){C(n)}),v=0;v<b;++v)null==(_=e[v]).fx?_.x+=_.vx*=s:(_.x=_.fx,_.vx=0),null==_.fy?_.y+=_.vy*=s:(_.y=_.fy,_.vy=0);return t}function h(){for(var b,y=0,v=e.length;y<v;++y){if((b=e[y]).index=y,null!=b.fx&&(b.x=b.fx),null!=b.fy&&(b.y=b.fy),isNaN(b.x)||isNaN(b.y)){var _=VW*Math.sqrt(y),E=y*HW;b.x=_*Math.cos(E),b.y=_*Math.sin(E)}(isNaN(b.vx)||isNaN(b.vy))&&(b.vx=b.vy=0)}}function g(y){return y.initialize&&y.initialize(e),y}return null==e&&(e=[]),h(),t={tick:d,restart:function(){return u.restart(l),t},stop:function(){return u.stop(),t},nodes:function(y){return arguments.length?(e=y,h(),a.each(g),t):e},alpha:function(y){return arguments.length?(n=+y,t):n},alphaMin:function(y){return arguments.length?(r=+y,t):r},alphaDecay:function(y){return arguments.length?(i=+y,t):+i},alphaTarget:function(y){return arguments.length?(o=+y,t):o},velocityDecay:function(y){return arguments.length?(s=1-y,t):1-s},force:function(y,v){return arguments.length>1?(null==v?a.remove(y):a.set(y,g(v)),t):a.get(y)},find:function(y,v,b){var C,I,R,G,z,_=0,E=e.length;for(null==b?b=1/0:b*=b,_=0;_<E;++_)(R=(C=y-(G=e[_]).x)*C+(I=v-G.y)*I)<b&&(z=G,b=R);return z},on:function(y,v){return arguments.length>1?(c.on(y,v),t):c.on(y)}}}function $W(){var e,t,n,i,r=Qn(-30),o=1,s=1/0,a=.81;function u(h){var g,y=e.length,v=Eg(e,BW,jW).visitAfter(l);for(n=h,g=0;g<y;++g)t=e[g],v.visit(d)}function c(){if(e){var h,y,g=e.length;for(i=new Array(g),h=0;h<g;++h)i[(y=e[h]).index]=+r(y,h,e)}}function l(h){var y,v,_,E,C,g=0,b=0;if(h.length){for(_=E=C=0;C<4;++C)(y=h[C])&&(v=Math.abs(y.value))&&(g+=y.value,b+=v,_+=v*y.x,E+=v*y.y);h.x=_/b,h.y=E/b}else{(y=h).x=y.data.x,y.y=y.data.y;do{g+=i[y.data.index]}while(y=y.next)}h.value=g}function d(h,g,y,v){if(!h.value)return!0;var b=h.x-t.x,_=h.y-t.y,E=v-g,C=b*b+_*_;if(E*E/a<C)return C<s&&(0===b&&(C+=(b=Ts())*b),0===_&&(C+=(_=Ts())*_),C<o&&(C=Math.sqrt(o*C)),t.vx+=b*h.value*n/C,t.vy+=_*h.value*n/C),!0;if(!(h.length||C>=s)){(h.data!==t||h.next)&&(0===b&&(C+=(b=Ts())*b),0===_&&(C+=(_=Ts())*_),C<o&&(C=Math.sqrt(o*C)));do{h.data!==t&&(t.vx+=b*(E=i[h.data.index]*n/C),t.vy+=_*E)}while(h=h.next)}}return u.initialize=function(h){e=h,c()},u.strength=function(h){return arguments.length?(r="function"==typeof h?h:Qn(+h),c(),u):r},u.distanceMin=function(h){return arguments.length?(o=h*h,u):Math.sqrt(o)},u.distanceMax=function(h){return arguments.length?(s=h*h,u):Math.sqrt(s)},u.theta=function(h){return arguments.length?(a=h*h,u):Math.sqrt(a)},u}function zW(e,t,n){var r,o,s,i=Qn(.1);function a(c){for(var l=0,d=r.length;l<d;++l){var h=r[l],g=h.x-t||1e-6,y=h.y-n||1e-6,v=Math.sqrt(g*g+y*y),b=(s[l]-v)*o[l]*c/v;h.vx+=g*b,h.vy+=y*b}}function u(){if(r){var c,l=r.length;for(o=new Array(l),s=new Array(l),c=0;c<l;++c)s[c]=+e(r[c],c,r),o[c]=isNaN(s[c])?0:+i(r[c],c,r)}}return"function"!=typeof e&&(e=Qn(+e)),null==t&&(t=0),null==n&&(n=0),a.initialize=function(c){r=c,u()},a.strength=function(c){return arguments.length?(i="function"==typeof c?c:Qn(+c),u(),a):i},a.radius=function(c){return arguments.length?(e="function"==typeof c?c:Qn(+c),u(),a):e},a.x=function(c){return arguments.length?(t=+c,a):t},a.y=function(c){return arguments.length?(n=+c,a):n},a}function GW(e){var n,r,i,t=Qn(.1);function o(a){for(var l,u=0,c=n.length;u<c;++u)(l=n[u]).vx+=(i[u]-l.x)*r[u]*a}function s(){if(n){var a,u=n.length;for(r=new Array(u),i=new Array(u),a=0;a<u;++a)r[a]=isNaN(i[a]=+e(n[a],a,n))?0:+t(n[a],a,n)}}return"function"!=typeof e&&(e=Qn(null==e?0:+e)),o.initialize=function(a){n=a,s()},o.strength=function(a){return arguments.length?(t="function"==typeof a?a:Qn(+a),s(),o):t},o.x=function(a){return arguments.length?(e="function"==typeof a?a:Qn(+a),s(),o):e},o}function qW(e){var n,r,i,t=Qn(.1);function o(a){for(var l,u=0,c=n.length;u<c;++u)(l=n[u]).vy+=(i[u]-l.y)*r[u]*a}function s(){if(n){var a,u=n.length;for(r=new Array(u),i=new Array(u),a=0;a<u;++a)r[a]=isNaN(i[a]=+e(n[a],a,n))?0:+t(n[a],a,n)}}return"function"!=typeof e&&(e=Qn(null==e?0:+e)),o.initialize=function(a){n=a,s()},o.strength=function(a){return arguments.length?(t="function"==typeof a?a:Qn(+a),s(),o):t},o.y=function(a){return arguments.length?(e="function"==typeof a?a:Qn(+a),s(),o):e},o}function Cg(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function Dc(e){return(e=Cg(Math.abs(e)))?e[1]:NaN}var LN,QW=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Hf(e){if(!(t=QW.exec(e)))throw new Error("invalid format: "+e);var t;return new xg({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function xg(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function BN(e,t){var n=Cg(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}Hf.prototype=xg.prototype,xg.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};const jN={"%":function(e,t){return(100*e).toFixed(t)},b:function(e){return Math.round(e).toString(2)},c:function(e){return e+""},d:function WW(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},g:function(e,t){return e.toPrecision(t)},o:function(e){return Math.round(e).toString(8)},p:function(e,t){return BN(100*e,t)},r:BN,s:function XW(e,t){var n=Cg(e,t);if(!n)return e+"";var r=n[0],i=n[1],o=i-(LN=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,s=r.length;return o===s?r:o>s?r+new Array(o-s+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+Cg(e,Math.max(0,t+o-1))[0]},X:function(e){return Math.round(e).toString(16).toUpperCase()},x:function(e){return Math.round(e).toString(16)}};function VN(e){return e}var Mg,Ig,Vb,HN=Array.prototype.map,UN=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"];function $N(e){var t=void 0===e.grouping||void 0===e.thousands?VN:function YW(e,t){return function(n,r){for(var i=n.length,o=[],s=0,a=e[0],u=0;i>0&&a>0&&(u+a+1>r&&(a=Math.max(1,r-u)),o.push(n.substring(i-=a,i+a)),!((u+=a+1)>r));)a=e[s=(s+1)%e.length];return o.reverse().join(t)}}(HN.call(e.grouping,Number),e.thousands+""),n=void 0===e.currency?"":e.currency[0]+"",r=void 0===e.currency?"":e.currency[1]+"",i=void 0===e.decimal?".":e.decimal+"",o=void 0===e.numerals?VN:function KW(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}(HN.call(e.numerals,String)),s=void 0===e.percent?"%":e.percent+"",a=void 0===e.minus?"-":e.minus+"",u=void 0===e.nan?"NaN":e.nan+"";function c(d){var h=(d=Hf(d)).fill,g=d.align,y=d.sign,v=d.symbol,b=d.zero,_=d.width,E=d.comma,C=d.precision,I=d.trim,R=d.type;"n"===R?(E=!0,R="g"):jN[R]||(void 0===C&&(C=12),I=!0,R="g"),(b||"0"===h&&"="===g)&&(b=!0,h="0",g="=");var G="$"===v?n:"#"===v&&/[boxX]/.test(R)?"0"+R.toLowerCase():"",z="$"===v?r:/[%p]/.test(R)?s:"",de=jN[R],oe=/[defgprs%]/.test(R);function fe(re){var Ce,X,we,T=G,te=z;if("c"===R)te=de(re)+te,re="";else{var Ye=(re=+re)<0||1/re<0;if(re=isNaN(re)?u:de(Math.abs(re),C),I&&(re=function ZW(e){e:for(var i,t=e.length,n=1,r=-1;n<t;++n)switch(e[n]){case".":r=i=n;break;case"0":0===r&&(r=n),i=n;break;default:if(!+e[n])break e;r>0&&(r=0)}return r>0?e.slice(0,r)+e.slice(i+1):e}(re)),Ye&&0==+re&&"+"!==y&&(Ye=!1),T=(Ye?"("===y?y:a:"-"===y||"("===y?"":y)+T,te=("s"===R?UN[8+LN/3]:"")+te+(Ye&&"("===y?")":""),oe)for(Ce=-1,X=re.length;++Ce<X;)if(48>(we=re.charCodeAt(Ce))||we>57){te=(46===we?i+re.slice(Ce+1):re.slice(Ce))+te,re=re.slice(0,Ce);break}}E&&!b&&(re=t(re,1/0));var Be=T.length+re.length+te.length,tt=Be<_?new Array(_-Be+1).join(h):"";switch(E&&b&&(re=t(tt+re,tt.length?_-te.length:1/0),tt=""),g){case"<":re=T+re+te+tt;break;case"=":re=T+tt+re+te;break;case"^":re=tt.slice(0,Be=tt.length>>1)+T+re+te+tt.slice(Be);break;default:re=tt+T+re+te}return o(re)}return C=void 0===C?6:/[gprs]/.test(R)?Math.max(1,Math.min(21,C)):Math.max(0,Math.min(20,C)),fe.toString=function(){return d+""},fe}return{format:c,formatPrefix:function l(d,h){var g=c(((d=Hf(d)).type="f",d)),y=3*Math.max(-8,Math.min(8,Math.floor(Dc(h)/3))),v=Math.pow(10,-y),b=UN[8+y/3];return function(_){return g(v*_)+b}}}}function zN(e){return Mg=$N(e),Ig=Mg.format,Vb=Mg.formatPrefix,Mg}function GN(e){return Math.max(0,-Dc(Math.abs(e)))}function qN(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Dc(t)/3)))-Dc(Math.abs(e)))}function WN(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Dc(t)-Dc(e))+1}function Ns(){return new Sg}function Sg(){this.reset()}zN({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),Sg.prototype={constructor:Sg,reset:function(){this.s=this.t=0},add:function(e){YN(Tg,e,this.t),YN(this,Tg.s,this.s),this.s?this.t+=Tg.t:this.s=Tg.t},valueOf:function(){return this.s}};var Tg=new Sg;function YN(e,t,n){var r=e.s=t+n,i=r-t;e.t=t-(r-i)+(n-i)}var at=1e-6,Ng=1e-12,Pt=Math.PI,On=Pt/2,Ag=Pt/4,Ar=2*Pt,hn=180/Pt,lt=Pt/180,Ut=Math.abs,Ec=Math.atan,kr=Math.atan2,rt=Math.cos,kg=Math.ceil,KN=Math.exp,Og=(Math,Math.log),Hb=Math.pow,Qe=Math.sin,vi=Math.sign||function(e){return e>0?1:e<0?-1:0},zn=Math.sqrt,Ub=Math.tan;function QN(e){return e>1?0:e<-1?Pt:Math.acos(e)}function Or(e){return e>1?On:e<-1?-On:Math.asin(e)}function ZN(e){return(e=Qe(e/2))*e}function Mn(){}function Rg(e,t){e&&JN.hasOwnProperty(e.type)&&JN[e.type](e,t)}var XN={Feature:function(e,t){Rg(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,r=-1,i=n.length;++r<i;)Rg(n[r].geometry,t)}},JN={Sphere:function(e,t){t.sphere()},Point:function(e,t){t.point((e=e.coordinates)[0],e[1],e[2])},MultiPoint:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)t.point((e=n[r])[0],e[1],e[2])},LineString:function(e,t){$b(e.coordinates,t,0)},MultiLineString:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)$b(n[r],t,0)},Polygon:function(e,t){eA(e.coordinates,t)},MultiPolygon:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)eA(n[r],t)},GeometryCollection:function(e,t){for(var n=e.geometries,r=-1,i=n.length;++r<i;)Rg(n[r],t)}};function $b(e,t,n){var o,r=-1,i=e.length-n;for(t.lineStart();++r<i;)t.point((o=e[r])[0],o[1],o[2]);t.lineEnd()}function eA(e,t){var n=-1,r=e.length;for(t.polygonStart();++n<r;)$b(e[n],t,1);t.polygonEnd()}function zi(e,t){e&&XN.hasOwnProperty(e.type)?XN[e.type](e,t):Rg(e,t)}var tA,nA,zb,Gb,qb,Pg=Ns(),Fg=Ns(),To={point:Mn,lineStart:Mn,lineEnd:Mn,polygonStart:function(){Pg.reset(),To.lineStart=JW,To.lineEnd=eY},polygonEnd:function(){var e=+Pg;Fg.add(e<0?Ar+e:e),this.lineStart=this.lineEnd=this.point=Mn},sphere:function(){Fg.add(Ar)}};function JW(){To.point=tY}function eY(){rA(tA,nA)}function tY(e,t){To.point=rA,tA=e,nA=t,zb=e*=lt,Gb=rt(t=(t*=lt)/2+Ag),qb=Qe(t)}function rA(e,t){var n=(e*=lt)-zb,r=n>=0?1:-1,i=r*n,o=rt(t=(t*=lt)/2+Ag),s=Qe(t),a=qb*s,u=Gb*o+a*rt(i),c=a*r*Qe(i);Pg.add(kr(c,u)),zb=e,Gb=o,qb=s}function nY(e){return Fg.reset(),zi(e,To),2*Fg}function Lg(e){return[kr(e[1],e[0]),Or(e[2])]}function Na(e){var t=e[0],n=e[1],r=rt(n);return[r*rt(t),r*Qe(t),Qe(n)]}function Bg(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function Cc(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function Wb(e,t){e[0]+=t[0],e[1]+=t[1],e[2]+=t[2]}function jg(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function Vg(e){var t=zn(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}var In,qr,Rn,ri,Aa,iA,oA,xc,As,Jo,Uf=Ns(),es={point:Yb,lineStart:aA,lineEnd:uA,polygonStart:function(){es.point=cA,es.lineStart=rY,es.lineEnd=iY,Uf.reset(),To.polygonStart()},polygonEnd:function(){To.polygonEnd(),es.point=Yb,es.lineStart=aA,es.lineEnd=uA,Pg<0?(In=-(Rn=180),qr=-(ri=90)):Uf>at?ri=90:Uf<-at&&(qr=-90),Jo[0]=In,Jo[1]=Rn},sphere:function(){In=-(Rn=180),qr=-(ri=90)}};function Yb(e,t){As.push(Jo=[In=e,Rn=e]),t<qr&&(qr=t),t>ri&&(ri=t)}function sA(e,t){var n=Na([e*lt,t*lt]);if(xc){var r=Cc(xc,n),o=Cc([r[1],-r[0],0],r);Vg(o),o=Lg(o);var c,s=e-Aa,a=s>0?1:-1,u=o[0]*hn*a,l=Ut(s)>180;l^(a*Aa<u&&u<a*e)?(c=o[1]*hn)>ri&&(ri=c):l^(a*Aa<(u=(u+360)%360-180)&&u<a*e)?(c=-o[1]*hn)<qr&&(qr=c):(t<qr&&(qr=t),t>ri&&(ri=t)),l?e<Aa?ii(In,e)>ii(In,Rn)&&(Rn=e):ii(e,Rn)>ii(In,Rn)&&(In=e):Rn>=In?(e<In&&(In=e),e>Rn&&(Rn=e)):e>Aa?ii(In,e)>ii(In,Rn)&&(Rn=e):ii(e,Rn)>ii(In,Rn)&&(In=e)}else As.push(Jo=[In=e,Rn=e]);t<qr&&(qr=t),t>ri&&(ri=t),xc=n,Aa=e}function aA(){es.point=sA}function uA(){Jo[0]=In,Jo[1]=Rn,es.point=Yb,xc=null}function cA(e,t){if(xc){var n=e-Aa;Uf.add(Ut(n)>180?n+(n>0?360:-360):n)}else iA=e,oA=t;To.point(e,t),sA(e,t)}function rY(){To.lineStart()}function iY(){cA(iA,oA),To.lineEnd(),Ut(Uf)>at&&(In=-(Rn=180)),Jo[0]=In,Jo[1]=Rn,xc=null}function ii(e,t){return(t-=e)<0?t+360:t}function oY(e,t){return e[0]-t[0]}function lA(e,t){return e[0]<=e[1]?e[0]<=t&&t<=e[1]:t<e[0]||e[1]<t}function sY(e){var t,n,r,i,o,s,a;if(ri=Rn=-(In=qr=1/0),As=[],zi(e,es),n=As.length){for(As.sort(oY),t=1,o=[r=As[0]];t<n;++t)lA(r,(i=As[t])[0])||lA(r,i[1])?(ii(r[0],i[1])>ii(r[0],r[1])&&(r[1]=i[1]),ii(i[0],r[1])>ii(r[0],r[1])&&(r[0]=i[0])):o.push(r=i);for(s=-1/0,t=0,r=o[n=o.length-1];t<=n;r=i,++t)(a=ii(r[1],(i=o[t])[0]))>s&&(s=a,In=i[0],Rn=r[1])}return As=Jo=null,In===1/0||qr===1/0?[[NaN,NaN],[NaN,NaN]]:[[In,qr],[Rn,ri]]}var $f,Hg,Ug,$g,zg,Gg,qg,Wg,Kb,Qb,Zb,fA,dA,Rr,Pr,Fr,Gi={sphere:Mn,point:Xb,lineStart:hA,lineEnd:pA,polygonStart:function(){Gi.lineStart=cY,Gi.lineEnd=lY},polygonEnd:function(){Gi.lineStart=hA,Gi.lineEnd=pA}};function Xb(e,t){e*=lt;var n=rt(t*=lt);zf(n*rt(e),n*Qe(e),Qe(t))}function zf(e,t,n){++$f,Ug+=(e-Ug)/$f,$g+=(t-$g)/$f,zg+=(n-zg)/$f}function hA(){Gi.point=aY}function aY(e,t){e*=lt;var n=rt(t*=lt);Rr=n*rt(e),Pr=n*Qe(e),Fr=Qe(t),Gi.point=uY,zf(Rr,Pr,Fr)}function uY(e,t){e*=lt;var n=rt(t*=lt),r=n*rt(e),i=n*Qe(e),o=Qe(t),s=kr(zn((s=Pr*o-Fr*i)*s+(s=Fr*r-Rr*o)*s+(s=Rr*i-Pr*r)*s),Rr*r+Pr*i+Fr*o);Hg+=s,Gg+=s*(Rr+(Rr=r)),qg+=s*(Pr+(Pr=i)),Wg+=s*(Fr+(Fr=o)),zf(Rr,Pr,Fr)}function pA(){Gi.point=Xb}function cY(){Gi.point=fY}function lY(){gA(fA,dA),Gi.point=Xb}function fY(e,t){fA=e,dA=t,e*=lt,t*=lt,Gi.point=gA;var n=rt(t);Rr=n*rt(e),Pr=n*Qe(e),Fr=Qe(t),zf(Rr,Pr,Fr)}function gA(e,t){e*=lt;var n=rt(t*=lt),r=n*rt(e),i=n*Qe(e),o=Qe(t),s=Pr*o-Fr*i,a=Fr*r-Rr*o,u=Rr*i-Pr*r,c=zn(s*s+a*a+u*u),l=Or(c),d=c&&-l/c;Kb+=d*s,Qb+=d*a,Zb+=d*u,Hg+=l,Gg+=l*(Rr+(Rr=r)),qg+=l*(Pr+(Pr=i)),Wg+=l*(Fr+(Fr=o)),zf(Rr,Pr,Fr)}function dY(e){$f=Hg=Ug=$g=zg=Gg=qg=Wg=Kb=Qb=Zb=0,zi(e,Gi);var t=Kb,n=Qb,r=Zb,i=t*t+n*n+r*r;return i<Ng&&(t=Gg,n=qg,r=Wg,Hg<at&&(t=Ug,n=$g,r=zg),(i=t*t+n*n+r*r)<Ng)?[NaN,NaN]:[kr(n,t)*hn,Or(r/zn(i))*hn]}function Mc(e){return function(){return e}}function Jb(e,t){function n(r,i){return r=e(r,i),t(r[0],r[1])}return e.invert&&t.invert&&(n.invert=function(r,i){return(r=t.invert(r,i))&&e.invert(r[0],r[1])}),n}function ew(e,t){return[Ut(e)>Pt?e+Math.round(-e/Ar)*Ar:e,t]}function tw(e,t,n){return(e%=Ar)?t||n?Jb(yA(e),vA(t,n)):yA(e):t||n?vA(t,n):ew}function mA(e){return function(t,n){return[(t+=e)>Pt?t-Ar:t<-Pt?t+Ar:t,n]}}function yA(e){var t=mA(e);return t.invert=mA(-e),t}function vA(e,t){var n=rt(e),r=Qe(e),i=rt(t),o=Qe(t);function s(a,u){var c=rt(u),l=rt(a)*c,d=Qe(a)*c,h=Qe(u),g=h*n+l*r;return[kr(d*i-g*o,l*n-h*r),Or(g*i+d*o)]}return s.invert=function(a,u){var c=rt(u),l=rt(a)*c,d=Qe(a)*c,h=Qe(u),g=h*i-d*o;return[kr(d*i+h*o,l*n+g*r),Or(g*n-l*r)]},s}function bA(e){function t(n){return(n=e(n[0]*lt,n[1]*lt))[0]*=hn,n[1]*=hn,n}return e=tw(e[0]*lt,e[1]*lt,e.length>2?e[2]*lt:0),t.invert=function(n){return(n=e.invert(n[0]*lt,n[1]*lt))[0]*=hn,n[1]*=hn,n},t}function wA(e,t,n,r,i,o){if(n){var s=rt(t),a=Qe(t),u=r*n;null==i?(i=t+r*Ar,o=t-u/2):(i=_A(s,i),o=_A(s,o),(r>0?i<o:i>o)&&(i+=r*Ar));for(var c,l=i;r>0?l>o:l<o;l-=u)c=Lg([s,-a*rt(l),-a*Qe(l)]),e.point(c[0],c[1])}}function _A(e,t){(t=Na(t))[0]-=e,Vg(t);var n=QN(-t[1]);return((-t[2]<0?-n:n)+Ar-at)%Ar}function hY(){var r,i,e=Mc([0,0]),t=Mc(90),n=Mc(6),o={point:function s(u,c){r.push(u=i(u,c)),u[0]*=hn,u[1]*=hn}};function a(){var u=e.apply(this,arguments),c=t.apply(this,arguments)*lt,l=n.apply(this,arguments)*lt;return r=[],i=tw(-u[0]*lt,-u[1]*lt,0).invert,wA(o,c,l,1),u={type:"Polygon",coordinates:[r]},r=i=null,u}return a.center=function(u){return arguments.length?(e="function"==typeof u?u:Mc([+u[0],+u[1]]),a):e},a.radius=function(u){return arguments.length?(t="function"==typeof u?u:Mc(+u),a):t},a.precision=function(u){return arguments.length?(n="function"==typeof u?u:Mc(+u),a):n},a}function DA(){var t,e=[];return{point:function(n,r,i){t.push([n,r,i])},lineStart:function(){e.push(t=[])},lineEnd:Mn,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}function Yg(e,t){return Ut(e[0]-t[0])<at&&Ut(e[1]-t[1])<at}function Kg(e,t,n,r){this.x=e,this.z=t,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function EA(e,t,n,r,i){var a,u,o=[],s=[];if(e.forEach(function(y){if(!((v=y.length-1)<=0)){var v,E,b=y[0],_=y[v];if(Yg(b,_)){if(!b[2]&&!_[2]){for(i.lineStart(),a=0;a<v;++a)i.point((b=y[a])[0],b[1]);return void i.lineEnd()}_[0]+=2*at}o.push(E=new Kg(b,y,null,!0)),s.push(E.o=new Kg(b,null,E,!1)),o.push(E=new Kg(_,y,null,!1)),s.push(E.o=new Kg(_,null,E,!0))}}),o.length){for(s.sort(t),CA(o),CA(s),a=0,u=s.length;a<u;++a)s[a].e=n=!n;for(var l,d,c=o[0];;){for(var h=c,g=!0;h.v;)if((h=h.n)===c)return;l=h.z,i.lineStart();do{if(h.v=h.o.v=!0,h.e){if(g)for(a=0,u=l.length;a<u;++a)i.point((d=l[a])[0],d[1]);else r(h.x,h.n.x,1,i);h=h.n}else{if(g)for(a=(l=h.p.z).length-1;a>=0;--a)i.point((d=l[a])[0],d[1]);else r(h.x,h.p.x,-1,i);h=h.p}l=(h=h.o).z,g=!g}while(!h.v);i.lineEnd()}}}function CA(e){if(t=e.length){for(var t,i,n=0,r=e[0];++n<t;)r.n=i=e[n],i.p=r,r=i;r.n=i=e[0],i.p=r}}ew.invert=ew;var nw=Ns();function rw(e){return Ut(e[0])<=Pt?e[0]:vi(e[0])*((Ut(e[0])+Pt)%Ar-Pt)}function xA(e,t){var n=rw(t),r=t[1],i=Qe(r),o=[Qe(n),-rt(n),0],s=0,a=0;nw.reset(),1===i?r=On+at:-1===i&&(r=-On-at);for(var u=0,c=e.length;u<c;++u)if(d=(l=e[u]).length)for(var l,d,h=l[d-1],g=rw(h),y=h[1]/2+Ag,v=Qe(y),b=rt(y),_=0;_<d;++_,g=C,v=R,b=G,h=E){var E=l[_],C=rw(E),I=E[1]/2+Ag,R=Qe(I),G=rt(I),z=C-g,de=z>=0?1:-1,oe=de*z,fe=oe>Pt,re=v*R;if(nw.add(kr(re*de*Qe(oe),b*G+re*rt(oe))),s+=fe?z+de*Ar:z,fe^g>=n^C>=n){var T=Cc(Na(h),Na(E));Vg(T);var te=Cc(o,T);Vg(te);var Ce=(fe^z>=0?-1:1)*Or(te[2]);(r>Ce||r===Ce&&(T[0]||T[1]))&&(a+=fe^z>=0?1:-1)}}return(s<-at||s<at&&nw<-at)^1&a}function MA(e,t,n,r){return function(i){var c,l,d,o=t(i),s=DA(),a=t(s),u=!1,h={point:g,lineStart:v,lineEnd:b,polygonStart:function(){h.point=_,h.lineStart=E,h.lineEnd=C,l=[],c=[]},polygonEnd:function(){h.point=g,h.lineStart=v,h.lineEnd=b,l=R1(l);var I=xA(c,r);l.length?(u||(i.polygonStart(),u=!0),EA(l,gY,I,n,i)):I&&(u||(i.polygonStart(),u=!0),i.lineStart(),n(null,null,1,i),i.lineEnd()),u&&(i.polygonEnd(),u=!1),l=c=null},sphere:function(){i.polygonStart(),i.lineStart(),n(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function g(I,R){e(I,R)&&i.point(I,R)}function y(I,R){o.point(I,R)}function v(){h.point=y,o.lineStart()}function b(){h.point=g,o.lineEnd()}function _(I,R){d.push([I,R]),a.point(I,R)}function E(){a.lineStart(),d=[]}function C(){_(d[0][0],d[0][1]),a.lineEnd();var G,de,oe,fe,I=a.clean(),R=s.result(),z=R.length;if(d.pop(),c.push(d),d=null,z){if(1&I){if((de=(oe=R[0]).length-1)>0){for(u||(i.polygonStart(),u=!0),i.lineStart(),G=0;G<de;++G)i.point((fe=oe[G])[0],fe[1]);i.lineEnd()}return}z>1&&2&I&&R.push(R.pop().concat(R.shift())),l.push(R.filter(pY))}}return h}}function pY(e){return e.length>1}function gY(e,t){return((e=e.x)[0]<0?e[1]-On-at:On-e[1])-((t=t.x)[0]<0?t[1]-On-at:On-t[1])}const iw=MA(function(){return!0},function mY(e){var i,t=NaN,n=NaN,r=NaN;return{lineStart:function(){e.lineStart(),i=1},point:function(o,s){var a=o>0?Pt:-Pt,u=Ut(o-t);Ut(u-Pt)<at?(e.point(t,n=(n+s)/2>0?On:-On),e.point(r,n),e.lineEnd(),e.lineStart(),e.point(a,n),e.point(o,n),i=0):r!==a&&u>=Pt&&(Ut(t-r)<at&&(t-=r*at),Ut(o-a)<at&&(o-=a*at),n=function yY(e,t,n,r){var i,o,s=Qe(e-n);return Ut(s)>at?Ec((Qe(t)*(o=rt(r))*Qe(n)-Qe(r)*(i=rt(t))*Qe(e))/(i*o*s)):(t+r)/2}(t,n,o,s),e.point(r,n),e.lineEnd(),e.lineStart(),e.point(a,n),i=0),e.point(t=o,n=s),r=a},lineEnd:function(){e.lineEnd(),t=n=NaN},clean:function(){return 2-i}}},function vY(e,t,n,r){var i;if(null==e)r.point(-Pt,i=n*On),r.point(0,i),r.point(Pt,i),r.point(Pt,0),r.point(Pt,-i),r.point(0,-i),r.point(-Pt,-i),r.point(-Pt,0),r.point(-Pt,i);else if(Ut(e[0]-t[0])>at){var o=e[0]<t[0]?Pt:-Pt;r.point(-o,i=n*o/2),r.point(0,i),r.point(o,i)}else r.point(t[0],t[1])},[-Pt,-On]);function IA(e){var t=rt(e),n=6*lt,r=t>0,i=Ut(t)>at;function s(l,d){return rt(l)*rt(d)>t}function u(l,d,h){var v=[1,0,0],b=Cc(Na(l),Na(d)),_=Bg(b,b),E=b[0],C=_-E*E;if(!C)return!h&&l;var I=t*_/C,R=-t*E/C,G=Cc(v,b),z=jg(v,I);Wb(z,jg(b,R));var oe=G,fe=Bg(z,oe),re=Bg(oe,oe),T=fe*fe-re*(Bg(z,z)-1);if(!(T<0)){var te=zn(T),Ce=jg(oe,(-fe-te)/re);if(Wb(Ce,z),Ce=Lg(Ce),!h)return Ce;var tt,X=l[0],we=d[0],Ye=l[1],Be=d[1];we<X&&(tt=X,X=we,we=tt);var Ct=we-X,Dt=Ut(Ct-Pt)<at;if(!Dt&&Be<Ye&&(tt=Ye,Ye=Be,Be=tt),Dt||Ct<at?Dt?Ye+Be>0^Ce[1]<(Ut(Ce[0]-X)<at?Ye:Be):Ye<=Ce[1]&&Ce[1]<=Be:Ct>Pt^(X<=Ce[0]&&Ce[0]<=we)){var Jt=jg(oe,(-fe+te)/re);return Wb(Jt,z),[Ce,Lg(Jt)]}}}function c(l,d){var h=r?e:Pt-e,g=0;return l<-h?g|=1:l>h&&(g|=2),d<-h?g|=4:d>h&&(g|=8),g}return MA(s,function a(l){var d,h,g,y,v;return{lineStart:function(){y=g=!1,v=1},point:function(b,_){var C,E=[b,_],I=s(b,_),R=r?I?0:c(b,_):I?c(b+(b<0?Pt:-Pt),_):0;if(!d&&(y=g=I)&&l.lineStart(),I!==g&&(!(C=u(d,E))||Yg(d,C)||Yg(E,C))&&(E[2]=1),I!==g)v=0,I?(l.lineStart(),C=u(E,d),l.point(C[0],C[1])):(C=u(d,E),l.point(C[0],C[1],2),l.lineEnd()),d=C;else if(i&&d&&r^I){var G;!(R&h)&&(G=u(E,d,!0))&&(v=0,r?(l.lineStart(),l.point(G[0][0],G[0][1]),l.point(G[1][0],G[1][1]),l.lineEnd()):(l.point(G[1][0],G[1][1]),l.lineEnd(),l.lineStart(),l.point(G[0][0],G[0][1],3)))}I&&(!d||!Yg(d,E))&&l.point(E[0],E[1]),d=E,g=I,h=R},lineEnd:function(){g&&l.lineEnd(),d=null},clean:function(){return v|(y&&g)<<1}}},function o(l,d,h,g){wA(g,e,n,h,l,d)},r?[0,-e]:[-Pt,e-Pt])}var Gf=1e9,Qg=-Gf;function Zg(e,t,n,r){function i(c,l){return e<=c&&c<=n&&t<=l&&l<=r}function o(c,l,d,h){var g=0,y=0;if(null==c||(g=s(c,d))!==(y=s(l,d))||u(c,l)<0^d>0)do{h.point(0===g||3===g?e:n,g>1?r:t)}while((g=(g+d+4)%4)!==y);else h.point(l[0],l[1])}function s(c,l){return Ut(c[0]-e)<at?l>0?0:3:Ut(c[0]-n)<at?l>0?2:1:Ut(c[1]-t)<at?l>0?1:0:l>0?3:2}function a(c,l){return u(c.x,l.x)}function u(c,l){var d=s(c,1),h=s(l,1);return d!==h?d-h:0===d?l[1]-c[1]:1===d?c[0]-l[0]:2===d?c[1]-l[1]:l[0]-c[0]}return function(c){var h,g,y,v,b,_,E,C,I,R,G,l=c,d=DA(),z={point:de,lineStart:function T(){z.point=Ce,g&&g.push(y=[]),R=!0,I=!1,E=C=NaN},lineEnd:function te(){h&&(Ce(v,b),_&&I&&d.rejoin(),h.push(d.result())),z.point=de,I&&l.lineEnd()},polygonStart:function fe(){l=d,h=[],g=[],G=!0},polygonEnd:function re(){var X=function oe(){for(var X=0,we=0,Ye=g.length;we<Ye;++we)for(var on,Jt,Be=g[we],tt=1,Ct=Be.length,Dt=Be[0],ne=Dt[0],Ze=Dt[1];tt<Ct;++tt)on=ne,Jt=Ze,ne=(Dt=Be[tt])[0],Ze=Dt[1],Jt<=r?Ze>r&&(ne-on)*(r-Jt)>(Ze-Jt)*(e-on)&&++X:Ze<=r&&(ne-on)*(r-Jt)<(Ze-Jt)*(e-on)&&--X;return X}(),we=G&&X,Ye=(h=R1(h)).length;(we||Ye)&&(c.polygonStart(),we&&(c.lineStart(),o(null,null,1,c),c.lineEnd()),Ye&&EA(h,a,X,o,c),c.polygonEnd()),l=c,h=g=y=null}};function de(X,we){i(X,we)&&l.point(X,we)}function Ce(X,we){var Ye=i(X,we);if(g&&y.push([X,we]),R)v=X,b=we,_=Ye,R=!1,Ye&&(l.lineStart(),l.point(X,we));else if(Ye&&I)l.point(X,we);else{var Be=[E=Math.max(Qg,Math.min(Gf,E)),C=Math.max(Qg,Math.min(Gf,C))],tt=[X=Math.max(Qg,Math.min(Gf,X)),we=Math.max(Qg,Math.min(Gf,we))];!function bY(e,t,n,r,i,o){var y,s=e[0],a=e[1],l=0,d=1,h=t[0]-s,g=t[1]-a;if(y=n-s,h||!(y>0)){if(y/=h,h<0){if(y<l)return;y<d&&(d=y)}else if(h>0){if(y>d)return;y>l&&(l=y)}if(y=i-s,h||!(y<0)){if(y/=h,h<0){if(y>d)return;y>l&&(l=y)}else if(h>0){if(y<l)return;y<d&&(d=y)}if(y=r-a,g||!(y>0)){if(y/=g,g<0){if(y<l)return;y<d&&(d=y)}else if(g>0){if(y>d)return;y>l&&(l=y)}if(y=o-a,g||!(y<0)){if(y/=g,g<0){if(y>d)return;y>l&&(l=y)}else if(g>0){if(y<l)return;y<d&&(d=y)}return l>0&&(e[0]=s+l*h,e[1]=a+l*g),d<1&&(t[0]=s+d*h,t[1]=a+d*g),!0}}}}}(Be,tt,e,t,n,r)?Ye&&(l.lineStart(),l.point(X,we),G=!1):(I||(l.lineStart(),l.point(Be[0],Be[1])),l.point(tt[0],tt[1]),Ye||l.lineEnd(),G=!1)}E=X,C=we,I=Ye}return z}}function wY(){var i,o,s,e=0,t=0,n=960,r=500;return s={stream:function(a){return i&&o===a?i:i=Zg(e,t,n,r)(o=a)},extent:function(a){return arguments.length?(e=+a[0][0],t=+a[0][1],n=+a[1][0],r=+a[1][1],i=o=null,s):[[e,t],[n,r]]}}}var sw,Xg,Jg,ow=Ns(),Ic={sphere:Mn,point:Mn,lineStart:function _Y(){Ic.point=EY,Ic.lineEnd=DY},lineEnd:Mn,polygonStart:Mn,polygonEnd:Mn};function DY(){Ic.point=Ic.lineEnd=Mn}function EY(e,t){sw=e*=lt,Xg=Qe(t*=lt),Jg=rt(t),Ic.point=CY}function CY(e,t){e*=lt;var n=Qe(t*=lt),r=rt(t),i=Ut(e-sw),o=rt(i),a=r*Qe(i),u=Jg*n-Xg*r*o,c=Xg*n+Jg*r*o;ow.add(kr(zn(a*a+u*u),c)),sw=e,Xg=n,Jg=r}function SA(e){return ow.reset(),zi(e,Ic),+ow}var aw=[null,null],xY={type:"LineString",coordinates:aw};function em(e,t){return aw[0]=e,aw[1]=t,SA(xY)}var TA={Feature:function(e,t){return tm(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,r=-1,i=n.length;++r<i;)if(tm(n[r].geometry,t))return!0;return!1}},NA={Sphere:function(){return!0},Point:function(e,t){return AA(e.coordinates,t)},MultiPoint:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)if(AA(n[r],t))return!0;return!1},LineString:function(e,t){return kA(e.coordinates,t)},MultiLineString:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)if(kA(n[r],t))return!0;return!1},Polygon:function(e,t){return OA(e.coordinates,t)},MultiPolygon:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)if(OA(n[r],t))return!0;return!1},GeometryCollection:function(e,t){for(var n=e.geometries,r=-1,i=n.length;++r<i;)if(tm(n[r],t))return!0;return!1}};function tm(e,t){return!(!e||!NA.hasOwnProperty(e.type))&&NA[e.type](e,t)}function AA(e,t){return 0===em(e,t)}function kA(e,t){for(var n,r,i,o=0,s=e.length;o<s;o++){if(0===(r=em(e[o],t))||o>0&&(i=em(e[o],e[o-1]))>0&&n<=i&&r<=i&&(n+r-i)*(1-Math.pow((n-r)/i,2))<Ng*i)return!0;n=r}return!1}function OA(e,t){return!!xA(e.map(MY),RA(t))}function MY(e){return(e=e.map(RA)).pop(),e}function RA(e){return[e[0]*lt,e[1]*lt]}function IY(e,t){return(e&&TA.hasOwnProperty(e.type)?TA[e.type]:tm)(e,t)}function PA(e,t,n){var r=ni(e,t-at,n).concat(t);return function(i){return r.map(function(o){return[i,o]})}}function FA(e,t,n){var r=ni(e,t-at,n).concat(t);return function(i){return r.map(function(o){return[o,i]})}}function LA(){var e,t,n,r,i,o,s,a,h,g,y,v,u=10,c=u,l=90,d=360,b=2.5;function _(){return{type:"MultiLineString",coordinates:E()}}function E(){return ni(kg(r/l)*l,n,l).map(y).concat(ni(kg(a/d)*d,s,d).map(v)).concat(ni(kg(t/u)*u,e,u).filter(function(C){return Ut(C%l)>at}).map(h)).concat(ni(kg(o/c)*c,i,c).filter(function(C){return Ut(C%d)>at}).map(g))}return _.lines=function(){return E().map(function(C){return{type:"LineString",coordinates:C}})},_.outline=function(){return{type:"Polygon",coordinates:[y(r).concat(v(s).slice(1),y(n).reverse().slice(1),v(a).reverse().slice(1))]}},_.extent=function(C){return arguments.length?_.extentMajor(C).extentMinor(C):_.extentMinor()},_.extentMajor=function(C){return arguments.length?(a=+C[0][1],s=+C[1][1],(r=+C[0][0])>(n=+C[1][0])&&(C=r,r=n,n=C),a>s&&(C=a,a=s,s=C),_.precision(b)):[[r,a],[n,s]]},_.extentMinor=function(C){return arguments.length?(o=+C[0][1],i=+C[1][1],(t=+C[0][0])>(e=+C[1][0])&&(C=t,t=e,e=C),o>i&&(C=o,o=i,i=C),_.precision(b)):[[t,o],[e,i]]},_.step=function(C){return arguments.length?_.stepMajor(C).stepMinor(C):_.stepMinor()},_.stepMajor=function(C){return arguments.length?(l=+C[0],d=+C[1],_):[l,d]},_.stepMinor=function(C){return arguments.length?(u=+C[0],c=+C[1],_):[u,c]},_.precision=function(C){return arguments.length?(b=+C,h=PA(o,i,90),g=FA(t,e,b),y=PA(a,s,90),v=FA(r,n,b),_):b},_.extentMajor([[-180,-90+at],[180,90-at]]).extentMinor([[-180,-80-at],[180,80+at]])}function SY(){return LA()()}function TY(e,t){var n=e[0]*lt,r=e[1]*lt,i=t[0]*lt,o=t[1]*lt,s=rt(r),a=Qe(r),u=rt(o),c=Qe(o),l=s*rt(n),d=s*Qe(n),h=u*rt(i),g=u*Qe(i),y=2*Or(zn(ZN(o-r)+s*u*ZN(i-n))),v=Qe(y),b=y?function(_){var E=Qe(_*=y)/v,C=Qe(y-_)/v,I=C*l+E*h,R=C*d+E*g,G=C*a+E*c;return[kr(R,I)*hn,kr(G,zn(I*I+R*R))*hn]}:function(){return[n*hn,r*hn]};return b.distance=y,b}function qf(e){return e}var BA,jA,lw,fw,uw=Ns(),cw=Ns(),ks={point:Mn,lineStart:Mn,lineEnd:Mn,polygonStart:function(){ks.lineStart=NY,ks.lineEnd=kY},polygonEnd:function(){ks.lineStart=ks.lineEnd=ks.point=Mn,uw.add(Ut(cw)),cw.reset()},result:function(){var e=uw/2;return uw.reset(),e}};function NY(){ks.point=AY}function AY(e,t){ks.point=VA,BA=lw=e,jA=fw=t}function VA(e,t){cw.add(fw*e-lw*t),lw=e,fw=t}function kY(){VA(BA,jA)}const HA=ks;var Sc=1/0,nm=Sc,Wf=-Sc,rm=Wf,OY={point:function RY(e,t){e<Sc&&(Sc=e),e>Wf&&(Wf=e),t<nm&&(nm=t),t>rm&&(rm=t)},lineStart:Mn,lineEnd:Mn,polygonStart:Mn,polygonEnd:Mn,result:function(){var e=[[Sc,nm],[Wf,rm]];return Wf=rm=-(nm=Sc=1/0),e}};const im=OY;var UA,$A,No,Ao,dw=0,hw=0,Yf=0,om=0,sm=0,Tc=0,pw=0,gw=0,Kf=0,qi={point:ka,lineStart:zA,lineEnd:GA,polygonStart:function(){qi.lineStart=LY,qi.lineEnd=BY},polygonEnd:function(){qi.point=ka,qi.lineStart=zA,qi.lineEnd=GA},result:function(){var e=Kf?[pw/Kf,gw/Kf]:Tc?[om/Tc,sm/Tc]:Yf?[dw/Yf,hw/Yf]:[NaN,NaN];return dw=hw=Yf=om=sm=Tc=pw=gw=Kf=0,e}};function ka(e,t){dw+=e,hw+=t,++Yf}function zA(){qi.point=PY}function PY(e,t){qi.point=FY,ka(No=e,Ao=t)}function FY(e,t){var n=e-No,r=t-Ao,i=zn(n*n+r*r);om+=i*(No+e)/2,sm+=i*(Ao+t)/2,Tc+=i,ka(No=e,Ao=t)}function GA(){qi.point=ka}function LY(){qi.point=jY}function BY(){qA(UA,$A)}function jY(e,t){qi.point=qA,ka(UA=No=e,$A=Ao=t)}function qA(e,t){var n=e-No,r=t-Ao,i=zn(n*n+r*r);om+=i*(No+e)/2,sm+=i*(Ao+t)/2,Tc+=i,pw+=(i=Ao*e-No*t)*(No+e),gw+=i*(Ao+t),Kf+=3*i,ka(No=e,Ao=t)}const WA=qi;function YA(e){this._context=e}YA.prototype={_radius:4.5,pointRadius:function(e){return this._radius=e,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(e,t){switch(this._point){case 0:this._context.moveTo(e,t),this._point=1;break;case 1:this._context.lineTo(e,t);break;default:this._context.moveTo(e+this._radius,t),this._context.arc(e,t,this._radius,0,Ar)}},result:Mn};var yw,KA,QA,Qf,Zf,mw=Ns(),am={point:Mn,lineStart:function(){am.point=VY},lineEnd:function(){yw&&ZA(KA,QA),am.point=Mn},polygonStart:function(){yw=!0},polygonEnd:function(){yw=null},result:function(){var e=+mw;return mw.reset(),e}};function VY(e,t){am.point=ZA,KA=Qf=e,QA=Zf=t}function ZA(e,t){mw.add(zn((Qf-=e)*Qf+(Zf-=t)*Zf)),Qf=e,Zf=t}const XA=am;function JA(){this._string=[]}function ek(e){return"m0,"+e+"a"+e+","+e+" 0 1,1 0,"+-2*e+"a"+e+","+e+" 0 1,1 0,"+2*e+"z"}function HY(e,t){var r,i,n=4.5;function o(s){return s&&("function"==typeof n&&i.pointRadius(+n.apply(this,arguments)),zi(s,r(i))),i.result()}return o.area=function(s){return zi(s,r(HA)),HA.result()},o.measure=function(s){return zi(s,r(XA)),XA.result()},o.bounds=function(s){return zi(s,r(im)),im.result()},o.centroid=function(s){return zi(s,r(WA)),WA.result()},o.projection=function(s){return arguments.length?(r=null==s?(e=null,qf):(e=s).stream,o):e},o.context=function(s){return arguments.length?(i=null==s?(t=null,new JA):new YA(t=s),"function"!=typeof n&&i.pointRadius(n),o):t},o.pointRadius=function(s){return arguments.length?(n="function"==typeof s?s:(i.pointRadius(+s),+s),o):n},o.projection(e).context(t)}function UY(e){return{stream:Xf(e)}}function Xf(e){return function(t){var n=new vw;for(var r in e)n[r]=e[r];return n.stream=t,n}}function vw(){}function bw(e,t,n){var r=e.clipExtent&&e.clipExtent();return e.scale(150).translate([0,0]),null!=r&&e.clipExtent(null),zi(n,e.stream(im)),t(im.result()),null!=r&&e.clipExtent(r),e}function um(e,t,n){return bw(e,function(r){var i=t[1][0]-t[0][0],o=t[1][1]-t[0][1],s=Math.min(i/(r[1][0]-r[0][0]),o/(r[1][1]-r[0][1])),a=+t[0][0]+(i-s*(r[1][0]+r[0][0]))/2,u=+t[0][1]+(o-s*(r[1][1]+r[0][1]))/2;e.scale(150*s).translate([a,u])},n)}function ww(e,t,n){return um(e,[[0,0],t],n)}function _w(e,t,n){return bw(e,function(r){var i=+t,o=i/(r[1][0]-r[0][0]),s=(i-o*(r[1][0]+r[0][0]))/2,a=-o*r[0][1];e.scale(150*o).translate([s,a])},n)}function Dw(e,t,n){return bw(e,function(r){var i=+t,o=i/(r[1][1]-r[0][1]),s=-o*r[0][0],a=(i-o*(r[1][1]+r[0][1]))/2;e.scale(150*o).translate([s,a])},n)}JA.prototype={_radius:4.5,_circle:ek(4.5),pointRadius:function(e){return(e=+e)!==this._radius&&(this._radius=e,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(e,t){switch(this._point){case 0:this._string.push("M",e,",",t),this._point=1;break;case 1:this._string.push("L",e,",",t);break;default:null==this._circle&&(this._circle=ek(this._radius)),this._string.push("M",e,",",t,this._circle)}},result:function(){if(this._string.length){var e=this._string.join("");return this._string=[],e}return null}},vw.prototype={constructor:vw,point:function(e,t){this.stream.point(e,t)},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 tk=16,$Y=rt(30*lt);function nk(e,t){return+t?function GY(e,t){function n(r,i,o,s,a,u,c,l,d,h,g,y,v,b){var _=c-r,E=l-i,C=_*_+E*E;if(C>4*t&&v--){var I=s+h,R=a+g,G=u+y,z=zn(I*I+R*R+G*G),de=Or(G/=z),oe=Ut(Ut(G)-1)<at||Ut(o-d)<at?(o+d)/2:kr(R,I),fe=e(oe,de),re=fe[0],T=fe[1],te=re-r,Ce=T-i,X=E*te-_*Ce;(X*X/C>t||Ut((_*te+E*Ce)/C-.5)>.3||s*h+a*g+u*y<$Y)&&(n(r,i,o,s,a,u,re,T,oe,I/=z,R/=z,G,v,b),b.point(re,T),n(re,T,oe,I,R,G,c,l,d,h,g,y,v,b))}}return function(r){var i,o,s,a,u,c,l,d,h,g,y,v,b={point:_,lineStart:E,lineEnd:I,polygonStart:function(){r.polygonStart(),b.lineStart=R},polygonEnd:function(){r.polygonEnd(),b.lineStart=E}};function _(de,oe){de=e(de,oe),r.point(de[0],de[1])}function E(){d=NaN,b.point=C,r.lineStart()}function C(de,oe){var fe=Na([de,oe]),re=e(de,oe);n(d,h,l,g,y,v,d=re[0],h=re[1],l=de,g=fe[0],y=fe[1],v=fe[2],tk,r),r.point(d,h)}function I(){b.point=_,r.lineEnd()}function R(){E(),b.point=G,b.lineEnd=z}function G(de,oe){C(i=de,oe),o=d,s=h,a=g,u=y,c=v,b.point=C}function z(){n(d,h,l,g,y,v,o,s,i,a,u,c,tk,r),b.lineEnd=I,I()}return b}}(e,t):function zY(e){return Xf({point:function(t,n){t=e(t,n),this.stream.point(t[0],t[1])}})}(e)}var qY=Xf({point:function(e,t){this.stream.point(e*lt,t*lt)}});function YY(e,t,n,r,i){function o(s,a){return[t+e*(s*=r),n-e*(a*=i)]}return o.invert=function(s,a){return[(s-t)/e*r,(n-a)/e*i]},o}function rk(e,t,n,r,i,o){var s=rt(o),a=Qe(o),u=s*e,c=a*e,l=s/e,d=a/e,h=(a*n-s*t)/e,g=(a*t+s*n)/e;function y(v,b){return[u*(v*=r)-c*(b*=i)+t,n-c*v-u*b]}return y.invert=function(v,b){return[r*(l*v-d*b+h),i*(g-d*v-l*b)]},y}function ko(e){return Ew(function(){return e})()}function Ew(e){var t,l,_,E,C,G,z,de,oe,fe,n=150,r=480,i=250,o=0,s=0,a=0,u=0,c=0,d=0,h=1,g=1,y=null,v=iw,b=null,I=qf,R=.5;function re(X){return de(X[0]*lt,X[1]*lt)}function T(X){return(X=de.invert(X[0],X[1]))&&[X[0]*hn,X[1]*hn]}function te(){var X=rk(n,0,0,h,g,d).apply(null,t(o,s)),we=(d?rk:YY)(n,r-X[0],i-X[1],h,g,d);return l=tw(a,u,c),z=Jb(t,we),de=Jb(l,z),G=nk(z,R),Ce()}function Ce(){return oe=fe=null,re}return re.stream=function(X){return oe&&fe===X?oe:oe=qY(function WY(e){return Xf({point:function(t,n){var r=e(t,n);return this.stream.point(r[0],r[1])}})}(l)(v(G(I(fe=X)))))},re.preclip=function(X){return arguments.length?(v=X,y=void 0,Ce()):v},re.postclip=function(X){return arguments.length?(I=X,b=_=E=C=null,Ce()):I},re.clipAngle=function(X){return arguments.length?(v=+X?IA(y=X*lt):(y=null,iw),Ce()):y*hn},re.clipExtent=function(X){return arguments.length?(I=null==X?(b=_=E=C=null,qf):Zg(b=+X[0][0],_=+X[0][1],E=+X[1][0],C=+X[1][1]),Ce()):null==b?null:[[b,_],[E,C]]},re.scale=function(X){return arguments.length?(n=+X,te()):n},re.translate=function(X){return arguments.length?(r=+X[0],i=+X[1],te()):[r,i]},re.center=function(X){return arguments.length?(o=X[0]%360*lt,s=X[1]%360*lt,te()):[o*hn,s*hn]},re.rotate=function(X){return arguments.length?(a=X[0]%360*lt,u=X[1]%360*lt,c=X.length>2?X[2]%360*lt:0,te()):[a*hn,u*hn,c*hn]},re.angle=function(X){return arguments.length?(d=X%360*lt,te()):d*hn},re.reflectX=function(X){return arguments.length?(h=X?-1:1,te()):h<0},re.reflectY=function(X){return arguments.length?(g=X?-1:1,te()):g<0},re.precision=function(X){return arguments.length?(G=nk(z,R=X*X),Ce()):zn(R)},re.fitExtent=function(X,we){return um(re,X,we)},re.fitSize=function(X,we){return ww(re,X,we)},re.fitWidth=function(X,we){return _w(re,X,we)},re.fitHeight=function(X,we){return Dw(re,X,we)},function(){return t=e.apply(this,arguments),re.invert=t.invert&&T,te()}}function Cw(e){var t=0,n=Pt/3,r=Ew(e),i=r(t,n);return i.parallels=function(o){return arguments.length?r(t=o[0]*lt,n=o[1]*lt):[t*hn,n*hn]},i}function ik(e,t){var n=Qe(e),r=(n+Qe(t))/2;if(Ut(r)<at)return function KY(e){var t=rt(e);function n(r,i){return[r*t,Qe(i)/t]}return n.invert=function(r,i){return[r/t,Or(i*t)]},n}(e);var i=1+n*(2*r-n),o=zn(i)/r;function s(a,u){var c=zn(i-2*r*Qe(u))/r;return[c*Qe(a*=r),o-c*rt(a)]}return s.invert=function(a,u){var c=o-u,l=kr(a,Ut(c))*vi(c);return c*r<0&&(l-=Pt*vi(a)*vi(c)),[l/r,Or((i-(a*a+c*c)*r*r)/(2*r))]},s}function cm(){return Cw(ik).scale(155.424).center([0,33.6442])}function ok(){return cm().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function ZY(){var e,t,r,o,a,u,n=ok(),i=cm().rotate([154,0]).center([-2,58.5]).parallels([55,65]),s=cm().rotate([157,0]).center([-3,19.9]).parallels([8,18]),c={point:function(h,g){u=[h,g]}};function l(h){var g=h[0],y=h[1];return u=null,r.point(g,y),u||(o.point(g,y),u)||(a.point(g,y),u)}function d(){return e=t=null,l}return l.invert=function(h){var g=n.scale(),y=n.translate(),v=(h[0]-y[0])/g,b=(h[1]-y[1])/g;return(b>=.12&&b<.234&&v>=-.425&&v<-.214?i:b>=.166&&b<.234&&v>=-.214&&v<-.115?s:n).invert(h)},l.stream=function(h){return e&&t===h?e:e=function QY(e){var t=e.length;return{point:function(n,r){for(var i=-1;++i<t;)e[i].point(n,r)},sphere:function(){for(var n=-1;++n<t;)e[n].sphere()},lineStart:function(){for(var n=-1;++n<t;)e[n].lineStart()},lineEnd:function(){for(var n=-1;++n<t;)e[n].lineEnd()},polygonStart:function(){for(var n=-1;++n<t;)e[n].polygonStart()},polygonEnd:function(){for(var n=-1;++n<t;)e[n].polygonEnd()}}}([n.stream(t=h),i.stream(h),s.stream(h)])},l.precision=function(h){return arguments.length?(n.precision(h),i.precision(h),s.precision(h),d()):n.precision()},l.scale=function(h){return arguments.length?(n.scale(h),i.scale(.35*h),s.scale(h),l.translate(n.translate())):n.scale()},l.translate=function(h){if(!arguments.length)return n.translate();var g=n.scale(),y=+h[0],v=+h[1];return r=n.translate(h).clipExtent([[y-.455*g,v-.238*g],[y+.455*g,v+.238*g]]).stream(c),o=i.translate([y-.307*g,v+.201*g]).clipExtent([[y-.425*g+at,v+.12*g+at],[y-.214*g-at,v+.234*g-at]]).stream(c),a=s.translate([y-.205*g,v+.212*g]).clipExtent([[y-.214*g+at,v+.166*g+at],[y-.115*g-at,v+.234*g-at]]).stream(c),d()},l.fitExtent=function(h,g){return um(l,h,g)},l.fitSize=function(h,g){return ww(l,h,g)},l.fitWidth=function(h,g){return _w(l,h,g)},l.fitHeight=function(h,g){return Dw(l,h,g)},l.scale(1070)}function sk(e){return function(t,n){var r=rt(t),i=rt(n),o=e(r*i);return[o*i*Qe(t),o*Qe(n)]}}function Jf(e){return function(t,n){var r=zn(t*t+n*n),i=e(r),o=Qe(i),s=rt(i);return[kr(t*o,r*s),Or(r&&n*o/r)]}}var xw=sk(function(e){return zn(2/(1+e))});function XY(){return ko(xw).scale(124.75).clipAngle(179.999)}xw.invert=Jf(function(e){return 2*Or(e/2)});var Mw=sk(function(e){return(e=QN(e))&&e/Qe(e)});function JY(){return ko(Mw).scale(79.4188).clipAngle(179.999)}function ed(e,t){return[e,Og(Ub((On+t)/2))]}function eK(){return ak(ed).scale(961/Ar)}function ak(e){var a,u,c,t=ko(e),n=t.center,r=t.scale,i=t.translate,o=t.clipExtent,s=null;function l(){var d=Pt*r(),h=t(bA(t.rotate()).invert([0,0]));return o(null==s?[[h[0]-d,h[1]-d],[h[0]+d,h[1]+d]]:e===ed?[[Math.max(h[0]-d,s),a],[Math.min(h[0]+d,u),c]]:[[s,Math.max(h[1]-d,a)],[u,Math.min(h[1]+d,c)]])}return t.scale=function(d){return arguments.length?(r(d),l()):r()},t.translate=function(d){return arguments.length?(i(d),l()):i()},t.center=function(d){return arguments.length?(n(d),l()):n()},t.clipExtent=function(d){return arguments.length?(null==d?s=a=u=c=null:(s=+d[0][0],a=+d[0][1],u=+d[1][0],c=+d[1][1]),l()):null==s?null:[[s,a],[u,c]]},l()}function lm(e){return Ub((On+e)/2)}function uk(e,t){var n=rt(e),r=e===t?Qe(e):Og(n/rt(t))/Og(lm(t)/lm(e)),i=n*Hb(lm(e),r)/r;if(!r)return ed;function o(s,a){i>0?a<-On+at&&(a=-On+at):a>On-at&&(a=On-at);var u=i/Hb(lm(a),r);return[u*Qe(r*s),i-u*rt(r*s)]}return o.invert=function(s,a){var u=i-a,c=vi(r)*zn(s*s+u*u),l=kr(s,Ut(u))*vi(u);return u*r<0&&(l-=Pt*vi(s)*vi(u)),[l/r,2*Ec(Hb(i/c,1/r))-On]},o}function tK(){return Cw(uk).scale(109.5).parallels([30,30])}function td(e,t){return[e,t]}function nK(){return ko(td).scale(152.63)}function ck(e,t){var n=rt(e),r=e===t?Qe(e):(n-rt(t))/(t-e),i=n/r+e;if(Ut(r)<at)return td;function o(s,a){var u=i-a,c=r*s;return[u*Qe(c),i-u*rt(c)]}return o.invert=function(s,a){var u=i-a,c=kr(s,Ut(u))*vi(u);return u*r<0&&(c-=Pt*vi(s)*vi(u)),[c/r,i-vi(r)*zn(s*s+u*u)]},o}function rK(){return Cw(ck).scale(131.154).center([0,13.9389])}Mw.invert=Jf(function(e){return e}),ed.invert=function(e,t){return[e,2*Ec(KN(t))-On]},td.invert=td;var nd=1.340264,rd=-.081106,id=893e-6,od=.003796,fm=zn(3)/2;function Iw(e,t){var n=Or(fm*Qe(t)),r=n*n,i=r*r*r;return[e*rt(n)/(fm*(nd+3*rd*r+i*(7*id+9*od*r))),n*(nd+rd*r+i*(id+od*r))]}function oK(){return ko(Iw).scale(177.158)}function Sw(e,t){var n=rt(t),r=rt(e)*n;return[n*Qe(e)/r,Qe(t)/r]}function sK(){return ko(Sw).scale(144.049).clipAngle(60)}function aK(){var s,a,c,l,d,b,_,e=1,t=0,n=0,r=1,i=1,o=0,u=null,h=1,g=1,y=Xf({point:function(I,R){var G=C([I,R]);this.stream.point(G[0],G[1])}}),v=qf;function E(){return h=e*r,g=e*i,b=_=null,C}function C(I){var R=I[0]*h,G=I[1]*g;if(o){var z=G*s-R*a;R=R*s+G*a,G=z}return[R+t,G+n]}return C.invert=function(I){var R=I[0]-t,G=I[1]-n;if(o){var z=G*s+R*a;R=R*s-G*a,G=z}return[R/h,G/g]},C.stream=function(I){return b&&_===I?b:b=y(v(_=I))},C.postclip=function(I){return arguments.length?(v=I,u=c=l=d=null,E()):v},C.clipExtent=function(I){return arguments.length?(v=null==I?(u=c=l=d=null,qf):Zg(u=+I[0][0],c=+I[0][1],l=+I[1][0],d=+I[1][1]),E()):null==u?null:[[u,c],[l,d]]},C.scale=function(I){return arguments.length?(e=+I,E()):e},C.translate=function(I){return arguments.length?(t=+I[0],n=+I[1],E()):[t,n]},C.angle=function(I){return arguments.length?(a=Qe(o=I%360*lt),s=rt(o),E()):o*hn},C.reflectX=function(I){return arguments.length?(r=I?-1:1,E()):r<0},C.reflectY=function(I){return arguments.length?(i=I?-1:1,E()):i<0},C.fitExtent=function(I,R){return um(C,I,R)},C.fitSize=function(I,R){return ww(C,I,R)},C.fitWidth=function(I,R){return _w(C,I,R)},C.fitHeight=function(I,R){return Dw(C,I,R)},C}function Tw(e,t){var n=t*t,r=n*n;return[e*(.8707-.131979*n+r*(r*(.003971*n-.001529*r)-.013791)),t*(1.007226+n*(.015085+r*(.028874*n-.044475-.005916*r)))]}function uK(){return ko(Tw).scale(175.295)}function Nw(e,t){return[rt(t)*Qe(e),Qe(t)]}function cK(){return ko(Nw).scale(249.5).clipAngle(90+at)}function Aw(e,t){var n=rt(t),r=1+rt(e)*n;return[n*Qe(e)/r,Qe(t)/r]}function lK(){return ko(Aw).scale(250).clipAngle(142)}function kw(e,t){return[Og(Ub((On+t)/2)),-e]}function fK(){var e=ak(kw),t=e.center,n=e.rotate;return e.center=function(r){return arguments.length?t([-r[1],r[0]]):[(r=t())[1],-r[0]]},e.rotate=function(r){return arguments.length?n([r[0],r[1],r.length>2?r[2]+90:90]):[(r=n())[0],r[1],r[2]-90]},n([0,0,90]).scale(159.155)}function dK(e,t){return e.parent===t.parent?1:2}function pK(e,t){return e+t.x}function mK(e,t){return Math.max(e,t.y)}function bK(){var e=dK,t=1,n=1,r=!1;function i(o){var s,a=0;o.eachAfter(function(h){var g=h.children;g?(h.x=function hK(e){return e.reduce(pK,0)/e.length}(g),h.y=function gK(e){return 1+e.reduce(mK,0)}(g)):(h.x=s?a+=e(h,s):0,h.y=0,s=h)});var u=function yK(e){for(var t;t=e.children;)e=t[0];return e}(o),c=function vK(e){for(var t;t=e.children;)e=t[t.length-1];return e}(o),l=u.x-e(u,c)/2,d=c.x+e(c,u)/2;return o.eachAfter(r?function(h){h.x=(h.x-o.x)*t,h.y=(o.y-h.y)*n}:function(h){h.x=(h.x-l)/(d-l)*t,h.y=(1-(o.y?h.y/o.y:1))*n})}return i.separation=function(o){return arguments.length?(e=o,i):e},i.size=function(o){return arguments.length?(r=!1,t=+o[0],n=+o[1],i):r?null:[t,n]},i.nodeSize=function(o){return arguments.length?(r=!0,t=+o[0],n=+o[1],i):r?[t,n]:null},i}function wK(e){var t=0,n=e.children,r=n&&n.length;if(r)for(;--r>=0;)t+=n[r].value;else t=1;e.value=t}function Ow(e,t){var i,s,a,u,c,n=new Nc(e),r=+e.value&&(n.value=e.value),o=[n];for(null==t&&(t=RK);i=o.pop();)if(r&&(i.value=+i.data.value),(a=t(i.data))&&(c=a.length))for(i.children=new Array(c),u=c-1;u>=0;--u)o.push(s=i.children[u]=new Nc(a[u])),s.parent=i,s.depth=i.depth+1;return n.eachBefore(lk)}function RK(e){return e.children}function PK(e){e.data=e.data.data}function lk(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function Nc(e){this.data=e,this.depth=this.height=0,this.parent=null}Iw.invert=function(e,t){for(var s,n=t,r=n*n,i=r*r*r,o=0;o<12&&(i=(r=(n-=s=(n*(nd+rd*r+i*(id+od*r))-t)/(nd+3*rd*r+i*(7*id+9*od*r)))*n)*r*r,!(Ut(s)<Ng));++o);return[fm*e*(nd+3*rd*r+i*(7*id+9*od*r))/rt(n),Or(Qe(n)/fm)]},Sw.invert=Jf(Ec),Tw.invert=function(e,t){var i,n=t,r=25;do{var o=n*n,s=o*o;n-=i=(n*(1.007226+o*(.015085+s*(.028874*o-.044475-.005916*s)))-t)/(1.007226+o*(.045255+s*(.259866*o-.311325-.005916*11*s)))}while(Ut(i)>at&&--r>0);return[e/(.8707+(o=n*n)*(o*(o*o*o*(.003971-.001529*o)-.013791)-.131979)),n]},Nw.invert=Jf(Or),Aw.invert=Jf(function(e){return 2*Ec(e)}),kw.invert=function(e,t){return[-t,2*Ec(KN(e))-On]},Nc.prototype=Ow.prototype={constructor:Nc,count:function _K(){return this.eachAfter(wK)},each:function DK(e){var n,i,o,s,t=this,r=[t];do{for(n=r.reverse(),r=[];t=n.pop();)if(e(t),i=t.children)for(o=0,s=i.length;o<s;++o)r.push(i[o])}while(r.length);return this},eachAfter:function CK(e){for(var i,o,s,t=this,n=[t],r=[];t=n.pop();)if(r.push(t),i=t.children)for(o=0,s=i.length;o<s;++o)n.push(i[o]);for(;t=r.pop();)e(t);return this},eachBefore:function EK(e){for(var r,i,t=this,n=[t];t=n.pop();)if(e(t),r=t.children)for(i=r.length-1;i>=0;--i)n.push(r[i]);return this},sum:function xK(e){return this.eachAfter(function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n})},sort:function MK(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})},path:function IK(e){for(var t=this,n=function SK(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;for(e=n.pop(),t=r.pop();e===t;)i=e,e=n.pop(),t=r.pop();return i}(t,e),r=[t];t!==n;)r.push(t=t.parent);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r},ancestors:function TK(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function NK(){var e=[];return this.each(function(t){e.push(t)}),e},leaves:function AK(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e},links:function kK(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t},copy:function OK(){return Ow(this).eachBefore(PK)}};var FK=Array.prototype.slice;function fk(e){for(var i,o,t=0,n=(e=function LK(e){for(var n,r,t=e.length;t;)r=Math.random()*t--|0,n=e[t],e[t]=e[r],e[r]=n;return e}(FK.call(e))).length,r=[];t<n;)i=e[t],o&&dk(o,i)?++t:(o=jK(r=BK(r,i)),t=0);return o}function BK(e,t){var n,r;if(Rw(t,e))return[t];for(n=0;n<e.length;++n)if(dm(t,e[n])&&Rw(sd(e[n],t),e))return[e[n],t];for(n=0;n<e.length-1;++n)for(r=n+1;r<e.length;++r)if(dm(sd(e[n],e[r]),t)&&dm(sd(e[n],t),e[r])&&dm(sd(e[r],t),e[n])&&Rw(hk(e[n],e[r],t),e))return[e[n],e[r],t];throw new Error}function dm(e,t){var n=e.r-t.r,r=t.x-e.x,i=t.y-e.y;return n<0||n*n<r*r+i*i}function dk(e,t){var n=e.r-t.r+1e-6,r=t.x-e.x,i=t.y-e.y;return n>0&&n*n>r*r+i*i}function Rw(e,t){for(var n=0;n<t.length;++n)if(!dk(e,t[n]))return!1;return!0}function jK(e){switch(e.length){case 1:return function VK(e){return{x:e.x,y:e.y,r:e.r}}(e[0]);case 2:return sd(e[0],e[1]);case 3:return hk(e[0],e[1],e[2])}}function sd(e,t){var n=e.x,r=e.y,i=e.r,o=t.x,s=t.y,a=t.r,u=o-n,c=s-r,l=a-i,d=Math.sqrt(u*u+c*c);return{x:(n+o+u/d*l)/2,y:(r+s+c/d*l)/2,r:(d+i+a)/2}}function hk(e,t,n){var r=e.x,i=e.y,o=e.r,s=t.x,a=t.y,u=t.r,c=n.x,l=n.y,d=n.r,h=r-s,g=r-c,y=i-a,v=i-l,b=u-o,_=d-o,E=r*r+i*i-o*o,C=E-s*s-a*a+u*u,I=E-c*c-l*l+d*d,R=g*y-h*v,G=(y*I-v*C)/(2*R)-r,z=(v*b-y*_)/R,de=(g*C-h*I)/(2*R)-i,oe=(h*_-g*b)/R,fe=z*z+oe*oe-1,re=2*(o+G*z+de*oe),T=G*G+de*de-o*o,te=-(fe?(re+Math.sqrt(re*re-4*fe*T))/(2*fe):T/re);return{x:r+G+z*te,y:i+de+oe*te,r:te}}function pk(e,t,n){var i,o,a,u,r=e.x-t.x,s=e.y-t.y,c=r*r+s*s;c?(o=t.r+n.r,u=e.r+n.r,(o*=o)>(u*=u)?(i=(c+u-o)/(2*c),a=Math.sqrt(Math.max(0,u/c-i*i)),n.x=e.x-i*r-a*s,n.y=e.y-i*s+a*r):(i=(c+o-u)/(2*c),a=Math.sqrt(Math.max(0,o/c-i*i)),n.x=t.x+i*r-a*s,n.y=t.y+i*s+a*r)):(n.x=t.x+n.r,n.y=t.y)}function gk(e,t){var n=e.r+t.r-1e-6,r=t.x-e.x,i=t.y-e.y;return n>0&&n*n>r*r+i*i}function mk(e){var t=e._,n=e.next._,r=t.r+n.r,i=(t.x*n.r+n.x*t.r)/r,o=(t.y*n.r+n.y*t.r)/r;return i*i+o*o}function hm(e){this._=e,this.next=null,this.previous=null}function yk(e){if(!(i=e.length))return 0;var t,n,r,i,o,s,a,u,c,l,d;if((t=e[0]).x=0,t.y=0,!(i>1))return t.r;if(t.x=-(n=e[1]).r,n.x=t.r,n.y=0,!(i>2))return t.r+n.r;pk(n,t,r=e[2]),t=new hm(t),n=new hm(n),r=new hm(r),t.next=r.previous=n,n.next=t.previous=r,r.next=n.previous=t;e:for(a=3;a<i;++a){pk(t._,n._,r=e[a]),r=new hm(r),u=n.next,c=t.previous,l=n._.r,d=t._.r;do{if(l<=d){if(gk(u._,r._)){t.next=n=u,n.previous=t,--a;continue e}l+=u._.r,u=u.next}else{if(gk(c._,r._)){(t=c).next=n,n.previous=t,--a;continue e}d+=c._.r,c=c.previous}}while(u!==c.next);for(r.previous=t,r.next=n,t.next=n.previous=n=r,o=mk(t);(r=r.next)!==n;)(s=mk(r))<o&&(t=r,o=s);n=t.next}for(t=[n._],r=n;(r=r.next)!==n;)t.push(r._);for(r=fk(t),a=0;a<i;++a)(t=e[a]).x-=r.x,t.y-=r.y;return r.r}function HK(e){return yk(e),e}function pm(e){if("function"!=typeof e)throw new Error;return e}function Oa(){return 0}function Ac(e){return function(){return e}}function $K(e){return Math.sqrt(e.value)}function zK(){var e=null,t=1,n=1,r=Oa;function i(o){return o.x=t/2,o.y=n/2,e?o.eachBefore(vk(e)).eachAfter(Pw(r,.5)).eachBefore(bk(1)):o.eachBefore(vk($K)).eachAfter(Pw(Oa,1)).eachAfter(Pw(r,o.r/Math.min(t,n))).eachBefore(bk(Math.min(t,n)/(2*o.r))),o}return i.radius=function(o){return arguments.length?(e=function UK(e){return null==e?null:pm(e)}(o),i):e},i.size=function(o){return arguments.length?(t=+o[0],n=+o[1],i):[t,n]},i.padding=function(o){return arguments.length?(r="function"==typeof o?o:Ac(+o),i):r},i}function vk(e){return function(t){t.children||(t.r=Math.max(0,+e(t)||0))}}function Pw(e,t){return function(n){if(r=n.children){var r,i,a,o=r.length,s=e(n)*t||0;if(s)for(i=0;i<o;++i)r[i].r+=s;if(a=yk(r),s)for(i=0;i<o;++i)r[i].r-=s;n.r=a+s}}}function bk(e){return function(t){var n=t.parent;t.r*=e,n&&(t.x=n.x+e*t.x,t.y=n.y+e*t.y)}}function wk(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function ad(e,t,n,r,i){for(var s,o=e.children,a=-1,u=o.length,c=e.value&&(r-t)/e.value;++a<u;)(s=o[a]).y0=n,s.y1=i,s.x0=t,s.x1=t+=s.value*c}function GK(){var e=1,t=1,n=0,r=!1;function i(s){var a=s.height+1;return s.x0=s.y0=n,s.x1=e,s.y1=t/a,s.eachBefore(function o(s,a){return function(u){u.children&&ad(u,u.x0,s*(u.depth+1)/a,u.x1,s*(u.depth+2)/a);var c=u.x0,l=u.y0,d=u.x1-n,h=u.y1-n;d<c&&(c=d=(c+d)/2),h<l&&(l=h=(l+h)/2),u.x0=c,u.y0=l,u.x1=d,u.y1=h}}(t,a)),r&&s.eachBefore(wk),s}return i.round=function(s){return arguments.length?(r=!!s,i):r},i.size=function(s){return arguments.length?(e=+s[0],t=+s[1],i):[e,t]},i.padding=function(s){return arguments.length?(n=+s,i):n},i}var _k="$",qK={depth:-1},Dk={};function WK(e){return e.id}function YK(e){return e.parentId}function KK(){var e=WK,t=YK;function n(r){var i,o,a,u,c,d,h,s=r.length,l=new Array(s),g={};for(o=0;o<s;++o)c=l[o]=new Nc(i=r[o]),null!=(d=e(i,o,r))&&(d+="")&&(g[h=_k+(c.id=d)]=h in g?Dk:c);for(o=0;o<s;++o)if(c=l[o],null!=(d=t(r[o],o,r))&&(d+="")){if(!(u=g[_k+d]))throw new Error("missing: "+d);if(u===Dk)throw new Error("ambiguous: "+d);u.children?u.children.push(c):u.children=[c],c.parent=u}else{if(a)throw new Error("multiple roots");a=c}if(!a)throw new Error("no root");if(a.parent=qK,a.eachBefore(function(y){y.depth=y.parent.depth+1,--s}).eachBefore(lk),a.parent=null,s>0)throw new Error("cycle");return a}return n.id=function(r){return arguments.length?(e=pm(r),n):e},n.parentId=function(r){return arguments.length?(t=pm(r),n):t},n}function QK(e,t){return e.parent===t.parent?1:2}function Fw(e){var t=e.children;return t?t[0]:e.t}function Lw(e){var t=e.children;return t?t[t.length-1]:e.t}function ZK(e,t,n){var r=n/(t.i-e.i);t.c-=r,t.s+=n,e.c+=r,t.z+=n,t.m+=n}function JK(e,t,n){return e.a.parent===t.parent?e.a:n}function gm(e,t){this._=e,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=t}function tQ(){var e=QK,t=1,n=1,r=null;function i(c){var l=function eQ(e){for(var n,i,o,s,a,t=new gm(e,0),r=[t];n=r.pop();)if(o=n._.children)for(n.children=new Array(a=o.length),s=a-1;s>=0;--s)r.push(i=n.children[s]=new gm(o[s],s)),i.parent=n;return(t.parent=new gm(null,0)).children=[t],t}(c);if(l.eachAfter(o),l.parent.m=-l.z,l.eachBefore(s),r)c.eachBefore(u);else{var d=c,h=c,g=c;c.eachBefore(function(E){E.x<d.x&&(d=E),E.x>h.x&&(h=E),E.depth>g.depth&&(g=E)});var y=d===h?1:e(d,h)/2,v=y-d.x,b=t/(h.x+y+v),_=n/(g.depth||1);c.eachBefore(function(E){E.x=(E.x+v)*b,E.y=E.depth*_})}return c}function o(c){var l=c.children,d=c.parent.children,h=c.i?d[c.i-1]:null;if(l){!function XK(e){for(var o,t=0,n=0,r=e.children,i=r.length;--i>=0;)(o=r[i]).z+=t,o.m+=t,t+=o.s+(n+=o.c)}(c);var g=(l[0].z+l[l.length-1].z)/2;h?(c.z=h.z+e(c._,h._),c.m=c.z-g):c.z=g}else h&&(c.z=h.z+e(c._,h._));c.parent.A=function a(c,l,d){if(l){for(var I,h=c,g=c,y=l,v=h.parent.children[0],b=h.m,_=g.m,E=y.m,C=v.m;y=Lw(y),h=Fw(h),y&&h;)v=Fw(v),(g=Lw(g)).a=c,(I=y.z+E-h.z-b+e(y._,h._))>0&&(ZK(JK(y,c,d),c,I),b+=I,_+=I),E+=y.m,b+=h.m,C+=v.m,_+=g.m;y&&!Lw(g)&&(g.t=y,g.m+=E-_),h&&!Fw(v)&&(v.t=h,v.m+=b-C,d=c)}return d}(c,h,c.parent.A||d[0])}function s(c){c._.x=c.z+c.parent.m,c.m+=c.parent.m}function u(c){c.x*=t,c.y=c.depth*n}return i.separation=function(c){return arguments.length?(e=c,i):e},i.size=function(c){return arguments.length?(r=!1,t=+c[0],n=+c[1],i):r?null:[t,n]},i.nodeSize=function(c){return arguments.length?(r=!0,t=+c[0],n=+c[1],i):r?[t,n]:null},i}function mm(e,t,n,r,i){for(var s,o=e.children,a=-1,u=o.length,c=e.value&&(i-n)/e.value;++a<u;)(s=o[a]).x0=t,s.x1=r,s.y0=n,s.y1=n+=s.value*c}gm.prototype=Object.create(Nc.prototype);var Ek=(1+Math.sqrt(5))/2;function Ck(e,t,n,r,i,o){for(var u,c,g,y,b,_,E,C,I,R,G,s=[],a=t.children,l=0,d=0,h=a.length,v=t.value;l<h;){g=i-n,y=o-r;do{b=a[d++].value}while(!b&&d<h);for(_=E=b,G=b*b*(R=Math.max(y/g,g/y)/(v*e)),I=Math.max(E/G,G/_);d<h;++d){if(b+=c=a[d].value,c<_&&(_=c),c>E&&(E=c),G=b*b*R,(C=Math.max(E/G,G/_))>I){b-=c;break}I=C}s.push(u={value:b,dice:g<y,children:a.slice(l,d)}),u.dice?ad(u,n,r,i,v?r+=y*b/v:o):mm(u,n,r,v?n+=g*b/v:i,o),v-=b,l=d}return s}const xk=function e(t){function n(r,i,o,s,a){Ck(t,r,i,o,s,a)}return n.ratio=function(r){return e((r=+r)>1?r:1)},n}(Ek);function nQ(){var e=xk,t=!1,n=1,r=1,i=[0],o=Oa,s=Oa,a=Oa,u=Oa,c=Oa;function l(h){return h.x0=h.y0=0,h.x1=n,h.y1=r,h.eachBefore(d),i=[0],t&&h.eachBefore(wk),h}function d(h){var g=i[h.depth],y=h.x0+g,v=h.y0+g,b=h.x1-g,_=h.y1-g;b<y&&(y=b=(y+b)/2),_<v&&(v=_=(v+_)/2),h.x0=y,h.y0=v,h.x1=b,h.y1=_,h.children&&(g=i[h.depth+1]=o(h)/2,y+=c(h)-g,v+=s(h)-g,(b-=a(h)-g)<y&&(y=b=(y+b)/2),(_-=u(h)-g)<v&&(v=_=(v+_)/2),e(h,y,v,b,_))}return l.round=function(h){return arguments.length?(t=!!h,l):t},l.size=function(h){return arguments.length?(n=+h[0],r=+h[1],l):[n,r]},l.tile=function(h){return arguments.length?(e=pm(h),l):e},l.padding=function(h){return arguments.length?l.paddingInner(h).paddingOuter(h):l.paddingInner()},l.paddingInner=function(h){return arguments.length?(o="function"==typeof h?h:Ac(+h),l):o},l.paddingOuter=function(h){return arguments.length?l.paddingTop(h).paddingRight(h).paddingBottom(h).paddingLeft(h):l.paddingTop()},l.paddingTop=function(h){return arguments.length?(s="function"==typeof h?h:Ac(+h),l):s},l.paddingRight=function(h){return arguments.length?(a="function"==typeof h?h:Ac(+h),l):a},l.paddingBottom=function(h){return arguments.length?(u="function"==typeof h?h:Ac(+h),l):u},l.paddingLeft=function(h){return arguments.length?(c="function"==typeof h?h:Ac(+h),l):c},l}function rQ(e,t,n,r,i){var s,u,o=e.children,a=o.length,c=new Array(a+1);for(c[0]=u=s=0;s<a;++s)c[s+1]=u+=o[s].value;!function l(d,h,g,y,v,b,_){if(d>=h-1){var E=o[d];return E.x0=y,E.y0=v,E.x1=b,void(E.y1=_)}for(var C=c[d],I=g/2+C,R=d+1,G=h-1;R<G;){var z=R+G>>>1;c[z]<I?R=z+1:G=z}I-c[R-1]<c[R]-I&&d+1<R&&--R;var de=c[R]-C,oe=g-de;if(b-y>_-v){var fe=(y*oe+b*de)/g;l(d,R,de,y,v,fe,_),l(R,h,oe,fe,v,b,_)}else{var re=(v*oe+_*de)/g;l(d,R,de,y,v,b,re),l(R,h,oe,y,re,b,_)}}(0,a,e.value,t,n,r,i)}function iQ(e,t,n,r,i){(1&e.depth?mm:ad)(e,t,n,r,i)}const oQ=function e(t){function n(r,i,o,s,a){if((u=r._squarify)&&u.ratio===t)for(var u,c,l,d,g,h=-1,y=u.length,v=r.value;++h<y;){for(l=(c=u[h]).children,d=c.value=0,g=l.length;d<g;++d)c.value+=l[d].value;c.dice?ad(c,i,o,s,o+=(a-o)*c.value/v):mm(c,i,o,i+=(s-i)*c.value/v,a),v-=c.value}else r._squarify=u=Ck(t,r,i,o,s,a),u.ratio=t}return n.ratio=function(r){return e((r=+r)>1?r:1)},n}(Ek);function sQ(e){var t=e.length;return function(n){return e[Math.max(0,Math.min(t-1,Math.floor(n*t)))]}}function aQ(e,t){var n=eg(+e,+t);return function(r){var i=n(r);return i-360*Math.floor(i/360)}}function Mk(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}var ud=Math.SQRT2,Bw=2,Ik=4,uQ=1e-12;function Sk(e){return((e=Math.exp(e))+1/e)/2}function Tk(e,t){var d,h,n=e[0],r=e[1],i=e[2],a=t[2],u=t[0]-n,c=t[1]-r,l=u*u+c*c;if(l<uQ)h=Math.log(a/i)/ud,d=function(E){return[n+E*u,r+E*c,i*Math.exp(ud*E*h)]};else{var g=Math.sqrt(l),y=(a*a-i*i+Ik*l)/(2*i*Bw*g),v=(a*a-i*i-Ik*l)/(2*a*Bw*g),b=Math.log(Math.sqrt(y*y+1)-y),_=Math.log(Math.sqrt(v*v+1)-v);h=(_-b)/ud,d=function(E){var C=E*h,I=Sk(b),R=i/(Bw*g)*(I*function lQ(e){return((e=Math.exp(2*e))-1)/(e+1)}(ud*C+b)-function cQ(e){return((e=Math.exp(e))-1/e)/2}(b));return[n+R*u,r+R*c,i*I/Sk(ud*C+b)]}}return d.duration=1e3*h,d}function Nk(e){return function(t,n){var r=e((t=Xp(t)).h,(n=Xp(n)).h),i=tr(t.s,n.s),o=tr(t.l,n.l),s=tr(t.opacity,n.opacity);return function(a){return t.h=r(a),t.s=i(a),t.l=o(a),t.opacity=s(a),t+""}}}const fQ=Nk(eg);var dQ=Nk(tr);function hQ(e,t){var n=tr((e=mg(e)).l,(t=mg(t)).l),r=tr(e.a,t.a),i=tr(e.b,t.b),o=tr(e.opacity,t.opacity);return function(s){return e.l=n(s),e.a=r(s),e.b=i(s),e.opacity=o(s),e+""}}function Ak(e){return function(t,n){var r=e((t=yg(t)).h,(n=yg(n)).h),i=tr(t.c,n.c),o=tr(t.l,n.l),s=tr(t.opacity,n.opacity);return function(a){return t.h=r(a),t.c=i(a),t.l=o(a),t.opacity=s(a),t+""}}}const pQ=Ak(eg);var gQ=Ak(tr);function kk(e){return function t(n){function r(i,o){var s=e((i=$i(i)).h,(o=$i(o)).h),a=tr(i.s,o.s),u=tr(i.l,o.l),c=tr(i.opacity,o.opacity);return function(l){return i.h=s(l),i.s=a(l),i.l=u(Math.pow(l,n)),i.opacity=c(l),i+""}}return n=+n,r.gamma=t,r}(1)}const mQ=kk(eg);var ym=kk(tr);function yQ(e,t){for(var n=0,r=t.length-1,i=t[0],o=new Array(r<0?0:r);n<r;)o[n]=e(i,i=t[++n]);return function(s){var a=Math.max(0,Math.min(r-1,Math.floor(s*=r)));return o[a](s-a)}}function vQ(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e(r/(t-1));return n}function bQ(e){for(var r,t=-1,n=e.length,i=e[n-1],o=0;++t<n;)o+=(r=i)[1]*(i=e[t])[0]-r[0]*i[1];return o/2}function wQ(e){for(var o,a,t=-1,n=e.length,r=0,i=0,s=e[n-1],u=0;++t<n;)u+=a=(o=s)[0]*(s=e[t])[1]-s[0]*o[1],r+=(o[0]+s[0])*a,i+=(o[1]+s[1])*a;return[r/(u*=3),i/u]}function _Q(e,t,n){return(t[0]-e[0])*(n[1]-e[1])-(t[1]-e[1])*(n[0]-e[0])}function DQ(e,t){return e[0]-t[0]||e[1]-t[1]}function Ok(e){for(var t=e.length,n=[0,1],r=2,i=2;i<t;++i){for(;r>1&&_Q(e[n[r-2]],e[n[r-1]],e[i])<=0;)--r;n[r++]=i}return n.slice(0,r)}function EQ(e){if((n=e.length)<3)return null;var t,n,r=new Array(n),i=new Array(n);for(t=0;t<n;++t)r[t]=[+e[t][0],+e[t][1],t];for(r.sort(DQ),t=0;t<n;++t)i[t]=[r[t][0],-r[t][1]];var o=Ok(r),s=Ok(i),a=s[0]===o[0],u=s[s.length-1]===o[o.length-1],c=[];for(t=o.length-1;t>=0;--t)c.push(e[r[o[t]][2]]);for(t=+a;t<s.length-u;++t)c.push(e[r[s[t]][2]]);return c}function CQ(e,t){for(var u,c,n=e.length,r=e[n-1],i=t[0],o=t[1],s=r[0],a=r[1],l=!1,d=0;d<n;++d)u=(r=e[d])[0],(c=r[1])>o!=a>o&&i<(s-u)*(o-c)/(a-c)+u&&(l=!l),s=u,a=c;return l}function xQ(e){for(var i,o,t=-1,n=e.length,r=e[n-1],s=r[0],a=r[1],u=0;++t<n;)i=s,o=a,i-=s=(r=e[t])[0],o-=a=r[1],u+=Math.sqrt(i*i+o*o);return u}function kc(){return Math.random()}const MQ=function e(t){function n(r,i){return r=null==r?0:+r,i=null==i?1:+i,1===arguments.length?(i=r,r=0):i-=r,function(){return t()*i+r}}return n.source=e,n}(kc),Rk=function e(t){function n(r,i){var o,s;return r=null==r?0:+r,i=null==i?1:+i,function(){var a;if(null!=o)a=o,o=null;else do{o=2*t()-1,a=2*t()-1,s=o*o+a*a}while(!s||s>1);return r+i*a*Math.sqrt(-2*Math.log(s)/s)}}return n.source=e,n}(kc),IQ=function e(t){function n(){var r=Rk.source(t).apply(this,arguments);return function(){return Math.exp(r())}}return n.source=e,n}(kc),Pk=function e(t){function n(r){return function(){for(var i=0,o=0;o<r;++o)i+=t();return i}}return n.source=e,n}(kc),SQ=function e(t){function n(r){var i=Pk.source(t)(r);return function(){return i()/r}}return n.source=e,n}(kc),TQ=function e(t){function n(r){return function(){return-Math.log(1-t())/r}}return n.source=e,n}(kc);function Wi(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}function ts(e,t){switch(arguments.length){case 0:break;case 1:this.interpolator(e);break;default:this.interpolator(t).domain(e)}return this}var Fk=Array.prototype,vm=Fk.map,Ra=Fk.slice,jw={name:"implicit"};function Vw(){var e=Ms(),t=[],n=[],r=jw;function i(o){var s=o+"",a=e.get(s);if(!a){if(r!==jw)return r;e.set(s,a=t.push(o))}return n[(a-1)%n.length]}return i.domain=function(o){if(!arguments.length)return t.slice();t=[],e=Ms();for(var u,c,s=-1,a=o.length;++s<a;)e.has(c=(u=o[s])+"")||e.set(c,t.push(u));return i},i.range=function(o){return arguments.length?(n=Ra.call(o),i):n.slice()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return Vw(t,n).unknown(r)},Wi.apply(i,arguments),i}function Hw(){var i,o,e=Vw().unknown(void 0),t=e.domain,n=e.range,r=[0,1],s=!1,a=0,u=0,c=.5;function l(){var d=t().length,h=r[1]<r[0],g=r[h-0],y=r[1-h];i=(y-g)/Math.max(1,d-a+2*u),s&&(i=Math.floor(i)),g+=(y-g-i*(d-a))*c,o=i*(1-a),s&&(g=Math.round(g),o=Math.round(o));var v=ni(d).map(function(b){return g+i*b});return n(h?v.reverse():v)}return delete e.unknown,e.domain=function(d){return arguments.length?(t(d),l()):t()},e.range=function(d){return arguments.length?(r=[+d[0],+d[1]],l()):r.slice()},e.rangeRound=function(d){return r=[+d[0],+d[1]],s=!0,l()},e.bandwidth=function(){return o},e.step=function(){return i},e.round=function(d){return arguments.length?(s=!!d,l()):s},e.padding=function(d){return arguments.length?(a=Math.min(1,u=+d),l()):a},e.paddingInner=function(d){return arguments.length?(a=Math.min(1,d),l()):a},e.paddingOuter=function(d){return arguments.length?(u=+d,l()):u},e.align=function(d){return arguments.length?(c=Math.max(0,Math.min(1,d)),l()):c},e.copy=function(){return Hw(t(),r).round(s).paddingInner(a).paddingOuter(u).align(c)},Wi.apply(l(),arguments)}function Lk(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return Lk(t())},e}function NQ(){return Lk(Hw.apply(null,arguments).paddingInner(1))}function Uw(e){return+e}var Bk=[0,1];function sr(e){return e}function $w(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:function AQ(e){return function(){return e}}(isNaN(t)?NaN:.5)}function jk(e){var r,t=e[0],n=e[e.length-1];return t>n&&(r=t,t=n,n=r),function(i){return Math.max(t,Math.min(n,i))}}function kQ(e,t,n){var r=e[0],i=e[1],o=t[0],s=t[1];return i<r?(r=$w(i,r),o=n(s,o)):(r=$w(r,i),o=n(o,s)),function(a){return o(r(a))}}function OQ(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),o=new Array(r),s=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++s<r;)i[s]=$w(e[s],e[s+1]),o[s]=n(t[s],t[s+1]);return function(a){var u=ya(e,a,1,r)-1;return o[u](i[u](a))}}function cd(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function bm(){var r,i,o,a,u,c,e=Bk,t=Bk,n=Tf,s=sr;function l(){return a=Math.min(e.length,t.length)>2?OQ:kQ,u=c=null,d}function d(h){return isNaN(h=+h)?o:(u||(u=a(e.map(r),t,n)))(r(s(h)))}return d.invert=function(h){return s(i((c||(c=a(t,e.map(r),mi)))(h)))},d.domain=function(h){return arguments.length?(e=vm.call(h,Uw),s===sr||(s=jk(e)),l()):e.slice()},d.range=function(h){return arguments.length?(t=Ra.call(h),l()):t.slice()},d.rangeRound=function(h){return t=Ra.call(h),n=Mk,l()},d.clamp=function(h){return arguments.length?(s=h?jk(e):sr,d):s!==sr},d.interpolate=function(h){return arguments.length?(n=h,l()):n},d.unknown=function(h){return arguments.length?(o=h,d):o},function(h,g){return r=h,i=g,l()}}function Vk(e,t){return bm()(e,t)}function Hk(e,t,n,r){var o,i=va(e,t,n);switch((r=Hf(r??",f")).type){case"s":var s=Math.max(Math.abs(e),Math.abs(t));return null==r.precision&&!isNaN(o=qN(i,s))&&(r.precision=o),Vb(r,s);case"":case"e":case"g":case"p":case"r":null==r.precision&&!isNaN(o=WN(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=o-("e"===r.type));break;case"f":case"%":null==r.precision&&!isNaN(o=GN(i))&&(r.precision=o-2*("%"===r.type))}return Ig(r)}function Pa(e){var t=e.domain;return e.ticks=function(n){var r=t();return k1(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return Hk(i[0],i[i.length-1],n??10,r)},e.nice=function(n){null==n&&(n=10);var u,r=t(),i=0,o=r.length-1,s=r[i],a=r[o];return a<s&&(u=s,s=a,a=u,u=i,i=o,o=u),(u=_f(s,a,n))>0?u=_f(s=Math.floor(s/u)*u,a=Math.ceil(a/u)*u,n):u<0&&(u=_f(s=Math.ceil(s*u)/u,a=Math.floor(a*u)/u,n)),u>0?(r[i]=Math.floor(s/u)*u,r[o]=Math.ceil(a/u)*u,t(r)):u<0&&(r[i]=Math.ceil(s*u)/u,r[o]=Math.floor(a*u)/u,t(r)),e},e}function Uk(){var e=Vk(sr,sr);return e.copy=function(){return cd(e,Uk())},Wi.apply(e,arguments),Pa(e)}function $k(e){var t;function n(r){return isNaN(r=+r)?t:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(e=vm.call(r,Uw),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return $k(e).unknown(t)},e=arguments.length?vm.call(e,Uw):[0,1],Pa(n)}function zk(e,t){var s,n=0,r=(e=e.slice()).length-1,i=e[n],o=e[r];return o<i&&(s=n,n=r,r=s,s=i,i=o,o=s),e[n]=t.floor(i),e[r]=t.ceil(o),e}function Gk(e){return Math.log(e)}function qk(e){return Math.exp(e)}function RQ(e){return-Math.log(-e)}function PQ(e){return-Math.exp(-e)}function FQ(e){return isFinite(e)?+("1e"+e):e<0?0:e}function Wk(e){return function(t){return-e(-t)}}function zw(e){var i,o,t=e(Gk,qk),n=t.domain,r=10;function s(){return i=function BQ(e){return e===Math.E?Math.log:10===e&&Math.log10||2===e&&Math.log2||(e=Math.log(e),function(t){return Math.log(t)/e})}(r),o=function LQ(e){return 10===e?FQ:e===Math.E?Math.exp:function(t){return Math.pow(e,t)}}(r),n()[0]<0?(i=Wk(i),o=Wk(o),e(RQ,PQ)):e(Gk,qk),t}return t.base=function(a){return arguments.length?(r=+a,s()):r},t.domain=function(a){return arguments.length?(n(a),s()):n()},t.ticks=function(a){var d,u=n(),c=u[0],l=u[u.length-1];(d=l<c)&&(h=c,c=l,l=h);var y,v,b,h=i(c),g=i(l),_=null==a?10:+a,E=[];if(!(r%1)&&g-h<_){if(h=Math.round(h)-1,g=Math.round(g)+1,c>0){for(;h<g;++h)for(v=1,y=o(h);v<r;++v)if(!((b=y*v)<c)){if(b>l)break;E.push(b)}}else for(;h<g;++h)for(v=r-1,y=o(h);v>=1;--v)if(!((b=y*v)<c)){if(b>l)break;E.push(b)}}else E=k1(h,g,Math.min(g-h,_)).map(o);return d?E.reverse():E},t.tickFormat=function(a,u){if(null==u&&(u=10===r?".0e":","),"function"!=typeof u&&(u=Ig(u)),a===1/0)return u;null==a&&(a=10);var c=Math.max(1,r*a/t.ticks().length);return function(l){var d=l/o(Math.round(i(l)));return d*r<r-.5&&(d*=r),d<=c?u(l):""}},t.nice=function(){return n(zk(n(),{floor:function(a){return o(Math.floor(i(a)))},ceil:function(a){return o(Math.ceil(i(a)))}}))},t}function Yk(){var e=zw(bm()).domain([1,10]);return e.copy=function(){return cd(e,Yk()).base(e.base())},Wi.apply(e,arguments),e}function Kk(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function Qk(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function Gw(e){var t=1,n=e(Kk(t),Qk(t));return n.constant=function(r){return arguments.length?e(Kk(t=+r),Qk(t)):t},Pa(n)}function Zk(){var e=Gw(bm());return e.copy=function(){return cd(e,Zk()).constant(e.constant())},Wi.apply(e,arguments)}function Xk(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function jQ(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function VQ(e){return e<0?-e*e:e*e}function qw(e){var t=e(sr,sr),n=1;return t.exponent=function(i){return arguments.length?(n=+i,function r(){return 1===n?e(sr,sr):.5===n?e(jQ,VQ):e(Xk(n),Xk(1/n))}()):n},Pa(t)}function Ww(){var e=qw(bm());return e.copy=function(){return cd(e,Ww()).exponent(e.exponent())},Wi.apply(e,arguments),e}function HQ(){return Ww.apply(null,arguments).exponent(.5)}function Jk(){var r,e=[],t=[],n=[];function i(){var s=0,a=Math.max(1,t.length);for(n=new Array(a-1);++s<a;)n[s-1]=Df(e,s/a);return o}function o(s){return isNaN(s=+s)?r:t[ya(n,s)]}return o.invertExtent=function(s){var a=t.indexOf(s);return a<0?[NaN,NaN]:[a>0?n[a-1]:e[0],a<n.length?n[a]:e[e.length-1]]},o.domain=function(s){if(!arguments.length)return e.slice();e=[];for(var c,a=0,u=s.length;a<u;++a)null!=(c=s[a])&&!isNaN(c=+c)&&e.push(c);return e.sort(Ds),i()},o.range=function(s){return arguments.length?(t=Ra.call(s),i()):t.slice()},o.unknown=function(s){return arguments.length?(r=s,o):r},o.quantiles=function(){return n.slice()},o.copy=function(){return Jk().domain(e).range(t).unknown(r)},Wi.apply(o,arguments)}function eO(){var o,e=0,t=1,n=1,r=[.5],i=[0,1];function s(u){return u<=u?i[ya(r,u,0,n)]:o}function a(){var u=-1;for(r=new Array(n);++u<n;)r[u]=((u+1)*t-(u-n)*e)/(n+1);return s}return s.domain=function(u){return arguments.length?(e=+u[0],t=+u[1],a()):[e,t]},s.range=function(u){return arguments.length?(n=(i=Ra.call(u)).length-1,a()):i.slice()},s.invertExtent=function(u){var c=i.indexOf(u);return c<0?[NaN,NaN]:c<1?[e,r[0]]:c>=n?[r[n-1],t]:[r[c-1],r[c]]},s.unknown=function(u){return arguments.length&&(o=u),s},s.thresholds=function(){return r.slice()},s.copy=function(){return eO().domain([e,t]).range(i).unknown(o)},Wi.apply(Pa(s),arguments)}function tO(){var n,e=[.5],t=[0,1],r=1;function i(o){return o<=o?t[ya(e,o,0,r)]:n}return i.domain=function(o){return arguments.length?(e=Ra.call(o),r=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(o){return arguments.length?(t=Ra.call(o),r=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(o){var s=t.indexOf(o);return[e[s-1],e[s]]},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return tO().domain(e).range(t).unknown(n)},Wi.apply(i,arguments)}var Yw=new Date,Kw=new Date;function Zn(e,t,n,r){function i(o){return e(o=0===arguments.length?new Date:new Date(+o)),o}return i.floor=function(o){return e(o=new Date(+o)),o},i.ceil=function(o){return e(o=new Date(o-1)),t(o,1),e(o),o},i.round=function(o){var s=i(o),a=i.ceil(o);return o-s<a-o?s:a},i.offset=function(o,s){return t(o=new Date(+o),null==s?1:Math.floor(s)),o},i.range=function(o,s,a){var c,u=[];if(o=i.ceil(o),a=null==a?1:Math.floor(a),!(o<s&&a>0))return u;do{u.push(c=new Date(+o)),t(o,a),e(o)}while(c<o&&o<s);return u},i.filter=function(o){return Zn(function(s){if(s>=s)for(;e(s),!o(s);)s.setTime(s-1)},function(s,a){if(s>=s)if(a<0)for(;++a<=0;)for(;t(s,-1),!o(s););else for(;--a>=0;)for(;t(s,1),!o(s););})},n&&(i.count=function(o,s){return Yw.setTime(+o),Kw.setTime(+s),e(Yw),e(Kw),Math.floor(n(Yw,Kw))},i.every=function(o){return o=Math.floor(o),isFinite(o)&&o>0?o>1?i.filter(r?function(s){return r(s)%o==0}:function(s){return i.count(0,s)%o==0}):i:null}),i}var Qw=Zn(function(e){e.setMonth(0,1),e.setHours(0,0,0,0)},function(e,t){e.setFullYear(e.getFullYear()+t)},function(e,t){return t.getFullYear()-e.getFullYear()},function(e){return e.getFullYear()});Qw.every=function(e){return isFinite(e=Math.floor(e))&&e>0?Zn(function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,n){t.setFullYear(t.getFullYear()+n*e)}):null};const Fa=Qw;var UQ=Qw.range,nO=Zn(function(e){e.setDate(1),e.setHours(0,0,0,0)},function(e,t){e.setMonth(e.getMonth()+t)},function(e,t){return t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear())},function(e){return e.getMonth()});const rO=nO;var $Q=nO.range,La=6e4,_m=36e5,oO=6048e5;function Ba(e){return Zn(function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},function(t,n){t.setDate(t.getDate()+7*n)},function(t,n){return(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*La)/oO})}var ld=Ba(0),fd=Ba(1),sO=Ba(2),aO=Ba(3),ja=Ba(4),uO=Ba(5),cO=Ba(6),lO=ld.range,zQ=fd.range,GQ=sO.range,qQ=aO.range,WQ=ja.range,YQ=uO.range,KQ=cO.range,fO=Zn(function(e){e.setHours(0,0,0,0)},function(e,t){e.setDate(e.getDate()+t)},function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*La)/864e5},function(e){return e.getDate()-1});const Dm=fO;var QQ=fO.range,dO=Zn(function(e){e.setTime(e-e.getMilliseconds()-1e3*e.getSeconds()-e.getMinutes()*La)},function(e,t){e.setTime(+e+t*_m)},function(e,t){return(t-e)/_m},function(e){return e.getHours()});const hO=dO;var ZQ=dO.range,pO=Zn(function(e){e.setTime(e-e.getMilliseconds()-1e3*e.getSeconds())},function(e,t){e.setTime(+e+t*La)},function(e,t){return(t-e)/La},function(e){return e.getMinutes()});const gO=pO;var XQ=pO.range,mO=Zn(function(e){e.setTime(e-e.getMilliseconds())},function(e,t){e.setTime(+e+1e3*t)},function(e,t){return(t-e)/1e3},function(e){return e.getUTCSeconds()});const Em=mO;var yO=mO.range,Cm=Zn(function(){},function(e,t){e.setTime(+e+t)},function(e,t){return t-e});Cm.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?Zn(function(t){t.setTime(Math.floor(t/e)*e)},function(t,n){t.setTime(+t+n*e)},function(t,n){return(n-t)/e}):Cm:null};const xm=Cm;var vO=Cm.range;function Va(e){return Zn(function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCDate(t.getUTCDate()+7*n)},function(t,n){return(n-t)/oO})}var dd=Va(0),hd=Va(1),bO=Va(2),wO=Va(3),Ha=Va(4),_O=Va(5),DO=Va(6),EO=dd.range,JQ=hd.range,eZ=bO.range,tZ=wO.range,nZ=Ha.range,rZ=_O.range,iZ=DO.range,CO=Zn(function(e){e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCDate(e.getUTCDate()+t)},function(e,t){return(t-e)/864e5},function(e){return e.getUTCDate()-1});const Mm=CO;var oZ=CO.range,Zw=Zn(function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)},function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()},function(e){return e.getUTCFullYear()});Zw.every=function(e){return isFinite(e=Math.floor(e))&&e>0?Zn(function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n*e)}):null};const Ua=Zw;var sZ=Zw.range;function Xw(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function Jw(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function pd(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function xO(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,o=e.days,s=e.shortDays,a=e.months,u=e.shortMonths,c=gd(i),l=md(i),d=gd(o),h=md(o),g=gd(s),y=md(s),v=gd(a),b=md(a),_=gd(u),E=md(u),C={a:function Ye(qe){return s[qe.getDay()]},A:function Be(qe){return o[qe.getDay()]},b:function tt(qe){return u[qe.getMonth()]},B:function Ct(qe){return a[qe.getMonth()]},c:null,d:AO,e:AO,f:TZ,g:jZ,G:HZ,H:MZ,I:IZ,j:SZ,L:kO,m:NZ,M:AZ,p:function Dt(qe){return i[+(qe.getHours()>=12)]},q:function on(qe){return 1+~~(qe.getMonth()/3)},Q:BO,s:jO,S:kZ,u:OZ,U:RZ,V:PZ,w:FZ,W:LZ,x:null,X:null,y:BZ,Y:VZ,Z:UZ,"%":LO},I={a:function Jt(qe){return s[qe.getUTCDay()]},A:function ne(qe){return o[qe.getUTCDay()]},b:function Ze(qe){return u[qe.getUTCMonth()]},B:function ht(qe){return a[qe.getUTCMonth()]},c:null,d:RO,e:RO,f:qZ,g:nX,G:iX,H:$Z,I:zZ,j:GZ,L:PO,m:WZ,M:YZ,p:function cn(qe){return i[+(qe.getUTCHours()>=12)]},q:function tn(qe){return 1+~~(qe.getUTCMonth()/3)},Q:BO,s:jO,S:KZ,u:QZ,U:ZZ,V:XZ,w:JZ,W:eX,x:null,X:null,y:tX,Y:rX,Z:oX,"%":LO},R={a:function fe(qe,mt,xt){var Te=g.exec(mt.slice(xt));return Te?(qe.w=y[Te[0].toLowerCase()],xt+Te[0].length):-1},A:function re(qe,mt,xt){var Te=d.exec(mt.slice(xt));return Te?(qe.w=h[Te[0].toLowerCase()],xt+Te[0].length):-1},b:function T(qe,mt,xt){var Te=_.exec(mt.slice(xt));return Te?(qe.m=E[Te[0].toLowerCase()],xt+Te[0].length):-1},B:function te(qe,mt,xt){var Te=v.exec(mt.slice(xt));return Te?(qe.m=b[Te[0].toLowerCase()],xt+Te[0].length):-1},c:function Ce(qe,mt,xt){return de(qe,t,mt,xt)},d:TO,e:TO,f:DZ,g:SO,G:IO,H:NO,I:NO,j:vZ,L:_Z,m:yZ,M:bZ,p:function oe(qe,mt,xt){var Te=c.exec(mt.slice(xt));return Te?(qe.p=l[Te[0].toLowerCase()],xt+Te[0].length):-1},q:mZ,Q:CZ,s:xZ,S:wZ,u:fZ,U:dZ,V:hZ,w:lZ,W:pZ,x:function X(qe,mt,xt){return de(qe,n,mt,xt)},X:function we(qe,mt,xt){return de(qe,r,mt,xt)},y:SO,Y:IO,Z:gZ,"%":EZ};function G(qe,mt){return function(xt){var Lr,rs,Br,Te=[],gn=-1,$t=0,Sn=qe.length;for(xt instanceof Date||(xt=new Date(+xt));++gn<Sn;)37===qe.charCodeAt(gn)&&(Te.push(qe.slice($t,gn)),null!=(rs=MO[Lr=qe.charAt(++gn)])?Lr=qe.charAt(++gn):rs="e"===Lr?" ":"0",(Br=mt[Lr])&&(Lr=Br(xt,rs)),Te.push(Lr),$t=gn+1);return Te.push(qe.slice($t,gn)),Te.join("")}}function z(qe,mt){return function(xt){var $t,Sn,Te=pd(1900,void 0,1);if(de(Te,qe,xt+="",0)!=xt.length)return null;if("Q"in Te)return new Date(Te.Q);if("s"in Te)return new Date(1e3*Te.s+("L"in Te?Te.L:0));if(mt&&!("Z"in Te)&&(Te.Z=0),"p"in Te&&(Te.H=Te.H%12+12*Te.p),void 0===Te.m&&(Te.m="q"in Te?Te.q:0),"V"in Te){if(Te.V<1||Te.V>53)return null;"w"in Te||(Te.w=1),"Z"in Te?(Sn=($t=Jw(pd(Te.y,0,1))).getUTCDay(),$t=Sn>4||0===Sn?hd.ceil($t):hd($t),$t=Mm.offset($t,7*(Te.V-1)),Te.y=$t.getUTCFullYear(),Te.m=$t.getUTCMonth(),Te.d=$t.getUTCDate()+(Te.w+6)%7):(Sn=($t=Xw(pd(Te.y,0,1))).getDay(),$t=Sn>4||0===Sn?fd.ceil($t):fd($t),$t=Dm.offset($t,7*(Te.V-1)),Te.y=$t.getFullYear(),Te.m=$t.getMonth(),Te.d=$t.getDate()+(Te.w+6)%7)}else("W"in Te||"U"in Te)&&("w"in Te||(Te.w="u"in Te?Te.u%7:"W"in Te?1:0),Sn="Z"in Te?Jw(pd(Te.y,0,1)).getUTCDay():Xw(pd(Te.y,0,1)).getDay(),Te.m=0,Te.d="W"in Te?(Te.w+6)%7+7*Te.W-(Sn+5)%7:Te.w+7*Te.U-(Sn+6)%7);return"Z"in Te?(Te.H+=Te.Z/100|0,Te.M+=Te.Z%100,Jw(Te)):Xw(Te)}}function de(qe,mt,xt,Te){for(var Lr,rs,gn=0,$t=mt.length,Sn=xt.length;gn<$t;){if(Te>=Sn)return-1;if(37===(Lr=mt.charCodeAt(gn++))){if(Lr=mt.charAt(gn++),!(rs=R[Lr in MO?mt.charAt(gn++):Lr])||(Te=rs(qe,xt,Te))<0)return-1}else if(Lr!=xt.charCodeAt(Te++))return-1}return Te}return C.x=G(n,C),C.X=G(r,C),C.c=G(t,C),I.x=G(n,I),I.X=G(r,I),I.c=G(t,I),{format:function(qe){var mt=G(qe+="",C);return mt.toString=function(){return qe},mt},parse:function(qe){var mt=z(qe+="",!1);return mt.toString=function(){return qe},mt},utcFormat:function(qe){var mt=G(qe+="",I);return mt.toString=function(){return qe},mt},utcParse:function(qe){var mt=z(qe+="",!0);return mt.toString=function(){return qe},mt}}}var Oc,e_,VO,Im,t_,MO={"-":"",_:" ",0:"0"},nr=/^\s*\d+/,aZ=/^%/,uZ=/[\\^$*+?|[\]().{}]/g;function Qt(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(t)+i:i)}function cZ(e){return e.replace(uZ,"\\$&")}function gd(e){return new RegExp("^(?:"+e.map(cZ).join("|")+")","i")}function md(e){for(var t={},n=-1,r=e.length;++n<r;)t[e[n].toLowerCase()]=n;return t}function lZ(e,t,n){var r=nr.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function fZ(e,t,n){var r=nr.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function dZ(e,t,n){var r=nr.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function hZ(e,t,n){var r=nr.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function pZ(e,t,n){var r=nr.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function IO(e,t,n){var r=nr.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function SO(e,t,n){var r=nr.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function gZ(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function mZ(e,t,n){var r=nr.exec(t.slice(n,n+1));return r?(e.q=3*r[0]-3,n+r[0].length):-1}function yZ(e,t,n){var r=nr.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function TO(e,t,n){var r=nr.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function vZ(e,t,n){var r=nr.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function NO(e,t,n){var r=nr.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function bZ(e,t,n){var r=nr.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function wZ(e,t,n){var r=nr.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function _Z(e,t,n){var r=nr.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function DZ(e,t,n){var r=nr.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function EZ(e,t,n){var r=aZ.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function CZ(e,t,n){var r=nr.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function xZ(e,t,n){var r=nr.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function AO(e,t){return Qt(e.getDate(),t,2)}function MZ(e,t){return Qt(e.getHours(),t,2)}function IZ(e,t){return Qt(e.getHours()%12||12,t,2)}function SZ(e,t){return Qt(1+Dm.count(Fa(e),e),t,3)}function kO(e,t){return Qt(e.getMilliseconds(),t,3)}function TZ(e,t){return kO(e,t)+"000"}function NZ(e,t){return Qt(e.getMonth()+1,t,2)}function AZ(e,t){return Qt(e.getMinutes(),t,2)}function kZ(e,t){return Qt(e.getSeconds(),t,2)}function OZ(e){var t=e.getDay();return 0===t?7:t}function RZ(e,t){return Qt(ld.count(Fa(e)-1,e),t,2)}function OO(e){var t=e.getDay();return t>=4||0===t?ja(e):ja.ceil(e)}function PZ(e,t){return e=OO(e),Qt(ja.count(Fa(e),e)+(4===Fa(e).getDay()),t,2)}function FZ(e){return e.getDay()}function LZ(e,t){return Qt(fd.count(Fa(e)-1,e),t,2)}function BZ(e,t){return Qt(e.getFullYear()%100,t,2)}function jZ(e,t){return Qt((e=OO(e)).getFullYear()%100,t,2)}function VZ(e,t){return Qt(e.getFullYear()%1e4,t,4)}function HZ(e,t){var n=e.getDay();return Qt((e=n>=4||0===n?ja(e):ja.ceil(e)).getFullYear()%1e4,t,4)}function UZ(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Qt(t/60|0,"0",2)+Qt(t%60,"0",2)}function RO(e,t){return Qt(e.getUTCDate(),t,2)}function $Z(e,t){return Qt(e.getUTCHours(),t,2)}function zZ(e,t){return Qt(e.getUTCHours()%12||12,t,2)}function GZ(e,t){return Qt(1+Mm.count(Ua(e),e),t,3)}function PO(e,t){return Qt(e.getUTCMilliseconds(),t,3)}function qZ(e,t){return PO(e,t)+"000"}function WZ(e,t){return Qt(e.getUTCMonth()+1,t,2)}function YZ(e,t){return Qt(e.getUTCMinutes(),t,2)}function KZ(e,t){return Qt(e.getUTCSeconds(),t,2)}function QZ(e){var t=e.getUTCDay();return 0===t?7:t}function ZZ(e,t){return Qt(dd.count(Ua(e)-1,e),t,2)}function FO(e){var t=e.getUTCDay();return t>=4||0===t?Ha(e):Ha.ceil(e)}function XZ(e,t){return e=FO(e),Qt(Ha.count(Ua(e),e)+(4===Ua(e).getUTCDay()),t,2)}function JZ(e){return e.getUTCDay()}function eX(e,t){return Qt(hd.count(Ua(e)-1,e),t,2)}function tX(e,t){return Qt(e.getUTCFullYear()%100,t,2)}function nX(e,t){return Qt((e=FO(e)).getUTCFullYear()%100,t,2)}function rX(e,t){return Qt(e.getUTCFullYear()%1e4,t,4)}function iX(e,t){var n=e.getUTCDay();return Qt((e=n>=4||0===n?Ha(e):Ha.ceil(e)).getUTCFullYear()%1e4,t,4)}function oX(){return"+0000"}function LO(){return"%"}function BO(e){return+e}function jO(e){return Math.floor(+e/1e3)}function HO(e){return Oc=xO(e),e_=Oc.format,VO=Oc.parse,Im=Oc.utcFormat,t_=Oc.utcParse,Oc}HO({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});var yd=1e3,vd=60*yd,bd=60*vd,wd=24*bd,sX=7*wd,UO=30*wd,n_=365*wd;function aX(e){return new Date(e)}function uX(e){return e instanceof Date?+e:+new Date(+e)}function r_(e,t,n,r,i,o,s,a,u){var c=Vk(sr,sr),l=c.invert,d=c.domain,h=u(".%L"),g=u(":%S"),y=u("%I:%M"),v=u("%I %p"),b=u("%a %d"),_=u("%b %d"),E=u("%B"),C=u("%Y"),I=[[s,1,yd],[s,5,5*yd],[s,15,15*yd],[s,30,30*yd],[o,1,vd],[o,5,5*vd],[o,15,15*vd],[o,30,30*vd],[i,1,bd],[i,3,3*bd],[i,6,6*bd],[i,12,12*bd],[r,1,wd],[r,2,2*wd],[n,1,sX],[t,1,UO],[t,3,3*UO],[e,1,n_]];function R(z){return(s(z)<z?h:o(z)<z?g:i(z)<z?y:r(z)<z?v:t(z)<z?n(z)<z?b:_:e(z)<z?E:C)(z)}function G(z,de,oe,fe){if(null==z&&(z=10),"number"==typeof z){var re=Math.abs(oe-de)/z,T=I1(function(te){return te[2]}).right(I,re);T===I.length?(fe=va(de/n_,oe/n_,z),z=e):T?(fe=(T=I[re/I[T-1][2]<I[T][2]/re?T-1:T])[1],z=T[0]):(fe=Math.max(va(de,oe,z),1),z=a)}return null==fe?z:z.every(fe)}return c.invert=function(z){return new Date(l(z))},c.domain=function(z){return arguments.length?d(vm.call(z,uX)):d().map(aX)},c.ticks=function(z,de){var te,oe=d(),fe=oe[0],re=oe[oe.length-1],T=re<fe;return T&&(te=fe,fe=re,re=te),te=(te=G(z,fe,re,de))?te.range(fe,re+1):[],T?te.reverse():te},c.tickFormat=function(z,de){return null==de?R:u(de)},c.nice=function(z,de){var oe=d();return(z=G(z,oe[0],oe[oe.length-1],de))?d(zk(oe,z)):c},c.copy=function(){return cd(c,r_(e,t,n,r,i,o,s,a,u))},c}function cX(){return Wi.apply(r_(Fa,rO,ld,Dm,hO,gO,Em,xm,e_).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}var $O=Zn(function(e){e.setUTCDate(1),e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCMonth(e.getUTCMonth()+t)},function(e,t){return t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear())},function(e){return e.getUTCMonth()});const zO=$O;var lX=$O.range,GO=Zn(function(e){e.setUTCMinutes(0,0,0)},function(e,t){e.setTime(+e+t*_m)},function(e,t){return(t-e)/_m},function(e){return e.getUTCHours()});const qO=GO;var fX=GO.range,WO=Zn(function(e){e.setUTCSeconds(0,0)},function(e,t){e.setTime(+e+t*La)},function(e,t){return(t-e)/La},function(e){return e.getUTCMinutes()});const YO=WO;var dX=WO.range;function hX(){return Wi.apply(r_(Ua,zO,dd,Mm,qO,YO,Em,xm,Im).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Sm(){var n,r,i,o,u,e=0,t=1,s=sr,a=!1;function c(l){return isNaN(l=+l)?u:s(0===i?.5:(l=(o(l)-n)*i,a?Math.max(0,Math.min(1,l)):l))}return c.domain=function(l){return arguments.length?(n=o(e=+l[0]),r=o(t=+l[1]),i=n===r?0:1/(r-n),c):[e,t]},c.clamp=function(l){return arguments.length?(a=!!l,c):a},c.interpolator=function(l){return arguments.length?(s=l,c):s},c.unknown=function(l){return arguments.length?(u=l,c):u},function(l){return o=l,n=l(e),r=l(t),i=n===r?0:1/(r-n),c}}function Os(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function KO(){var e=Pa(Sm()(sr));return e.copy=function(){return Os(e,KO())},ts.apply(e,arguments)}function QO(){var e=zw(Sm()).domain([1,10]);return e.copy=function(){return Os(e,QO()).base(e.base())},ts.apply(e,arguments)}function ZO(){var e=Gw(Sm());return e.copy=function(){return Os(e,ZO()).constant(e.constant())},ts.apply(e,arguments)}function i_(){var e=qw(Sm());return e.copy=function(){return Os(e,i_()).exponent(e.exponent())},ts.apply(e,arguments)}function pX(){return i_.apply(null,arguments).exponent(.5)}function XO(){var e=[],t=sr;function n(r){if(!isNaN(r=+r))return t((ya(e,r)-1)/(e.length-1))}return n.domain=function(r){if(!arguments.length)return e.slice();e=[];for(var s,i=0,o=r.length;i<o;++i)null!=(s=r[i])&&!isNaN(s=+s)&&e.push(s);return e.sort(Ds),n},n.interpolator=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return XO(t).domain(e)},ts.apply(n,arguments)}function Tm(){var r,i,o,s,a,c,d,e=0,t=.5,n=1,u=sr,l=!1;function h(g){return isNaN(g=+g)?d:(g=.5+((g=+c(g))-i)*(g<i?s:a),u(l?Math.max(0,Math.min(1,g)):g))}return h.domain=function(g){return arguments.length?(r=c(e=+g[0]),i=c(t=+g[1]),o=c(n=+g[2]),s=r===i?0:.5/(i-r),a=i===o?0:.5/(o-i),h):[e,t,n]},h.clamp=function(g){return arguments.length?(l=!!g,h):l},h.interpolator=function(g){return arguments.length?(u=g,h):u},h.unknown=function(g){return arguments.length?(d=g,h):d},function(g){return c=g,r=g(e),i=g(t),o=g(n),s=r===i?0:.5/(i-r),a=i===o?0:.5/(o-i),h}}function JO(){var e=Pa(Tm()(sr));return e.copy=function(){return Os(e,JO())},ts.apply(e,arguments)}function eR(){var e=zw(Tm()).domain([.1,1,10]);return e.copy=function(){return Os(e,eR()).base(e.base())},ts.apply(e,arguments)}function tR(){var e=Gw(Tm());return e.copy=function(){return Os(e,tR()).constant(e.constant())},ts.apply(e,arguments)}function o_(){var e=qw(Tm());return e.copy=function(){return Os(e,o_()).exponent(e.exponent())},ts.apply(e,arguments)}function gX(){return o_.apply(null,arguments).exponent(.5)}function Nt(e){for(var t=e.length/6|0,n=new Array(t),r=0;r<t;)n[r]="#"+e.slice(6*r,6*++r);return n}const mX=Nt("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),yX=Nt("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),vX=Nt("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),bX=Nt("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),wX=Nt("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),_X=Nt("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),DX=Nt("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),EX=Nt("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),CX=Nt("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),xX=Nt("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function pn(e){return _2(e[e.length-1])}var nR=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(Nt);const MX=pn(nR);var rR=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(Nt);const IX=pn(rR);var iR=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(Nt);const SX=pn(iR);var oR=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(Nt);const TX=pn(oR);var sR=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(Nt);const NX=pn(sR);var aR=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(Nt);const AX=pn(aR);var uR=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(Nt);const kX=pn(uR);var cR=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(Nt);const OX=pn(cR);var lR=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(Nt);const RX=pn(lR);var fR=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(Nt);const PX=pn(fR);var dR=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(Nt);const FX=pn(dR);var hR=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(Nt);const LX=pn(hR);var pR=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(Nt);const BX=pn(pR);var gR=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(Nt);const jX=pn(gR);var mR=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(Nt);const VX=pn(mR);var yR=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(Nt);const HX=pn(yR);var vR=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(Nt);const UX=pn(vR);var bR=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(Nt);const $X=pn(bR);var wR=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(Nt);const zX=pn(wR);var _R=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(Nt);const GX=pn(_R);var DR=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(Nt);const qX=pn(DR);var ER=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(Nt);const WX=pn(ER);var CR=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(Nt);const YX=pn(CR);var xR=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(Nt);const KX=pn(xR);var MR=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(Nt);const QX=pn(MR);var IR=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(Nt);const ZX=pn(IR);var SR=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(Nt);const XX=pn(SR);function JX(e){return e=Math.max(0,Math.min(1,e)),"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-e*(35.34-e*(2381.73-e*(6402.7-e*(7024.72-2710.57*e)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+e*(170.73+e*(52.82-e*(131.46-e*(176.58-67.37*e)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+e*(442.36-e*(2482.43-e*(6167.24-e*(6614.94-2475.67*e)))))))+")"}const eJ=ym($i(300,.5,0),$i(-240,.5,1));var tJ=ym($i(-100,.75,.35),$i(80,1.5,.8)),nJ=ym($i(260,.75,.35),$i(80,1.5,.8)),Nm=$i();function rJ(e){(e<0||e>1)&&(e-=Math.floor(e));var t=Math.abs(e-.5);return Nm.h=360*e-100,Nm.s=1.5-1.5*t,Nm.l=.8-.9*t,Nm+""}var Am=pc(),iJ=Math.PI/3,oJ=2*Math.PI/3;function sJ(e){var t;return e=(.5-e)*Math.PI,Am.r=255*(t=Math.sin(e))*t,Am.g=255*(t=Math.sin(e+iJ))*t,Am.b=255*(t=Math.sin(e+oJ))*t,Am+""}function aJ(e){return e=Math.max(0,Math.min(1,e)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+e*(1172.33-e*(10793.56-e*(33300.12-e*(38394.49-14825.05*e)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+e*(557.33+e*(1225.33-e*(3574.96-e*(1073.77+707.56*e)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+e*(3211.1-e*(15327.97-e*(27814-e*(22569.18-6838.66*e)))))))+")"}function km(e){var t=e.length;return function(n){return e[Math.max(0,Math.min(t-1,Math.floor(n*t)))]}}const uJ=km(Nt("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));var cJ=km(Nt("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),lJ=km(Nt("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),fJ=km(Nt("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));function dJ(e){return rn(Yp(e).call(document.documentElement))}var hJ=0;function TR(){return new s_}function s_(){this._="@"+(++hJ).toString(36)}function NR(e){return"string"==typeof e?new Sr([document.querySelectorAll(e)],[document.documentElement]):new Sr([e??[]],$1)}function pJ(e,t){null==t&&(t=X1().touches);for(var n=0,r=t?t.length:0,i=new Array(r);n<r;++n)i[n]=tg(e,t[n]);return i}function Lt(e){return function(){return e}}s_.prototype=TR.prototype={constructor:s_,get:function(e){for(var t=this._;!(t in e);)if(!(e=e.parentNode))return;return e[t]},set:function(e,t){return e[this._]=t},remove:function(e){return this._ in e&&delete e[this._]},toString:function(){return this._}};var AR=Math.abs,yr=Math.atan2,$a=Math.cos,gJ=Math.max,a_=Math.min,Oo=Math.sin,Rc=Math.sqrt,vr=1e-12,Rs=Math.PI,Om=Rs/2,Ps=2*Rs;function kR(e){return e>=1?Om:e<=-1?-Om:Math.asin(e)}function yJ(e){return e.innerRadius}function vJ(e){return e.outerRadius}function bJ(e){return e.startAngle}function wJ(e){return e.endAngle}function _J(e){return e&&e.padAngle}function Rm(e,t,n,r,i,o,s){var a=e-n,u=t-r,c=(s?o:-o)/Rc(a*a+u*u),l=c*u,d=-c*a,h=e+l,g=t+d,y=n+l,v=r+d,b=(h+y)/2,_=(g+v)/2,E=y-h,C=v-g,I=E*E+C*C,R=i-o,G=h*v-y*g,z=(C<0?-1:1)*Rc(gJ(0,R*R*I-G*G)),de=(G*C-E*z)/I,oe=(-G*E-C*z)/I,fe=(G*C+E*z)/I,re=(-G*E+C*z)/I,T=de-b,te=oe-_,Ce=fe-b,X=re-_;return T*T+te*te>Ce*Ce+X*X&&(de=fe,oe=re),{cx:de,cy:oe,x01:-l,y01:-d,x11:de*(i/R-1),y11:oe*(i/R-1)}}function EJ(){var e=yJ,t=vJ,n=Lt(0),r=null,i=bJ,o=wJ,s=_J,a=null;function u(){var c,l,d=+e.apply(this,arguments),h=+t.apply(this,arguments),g=i.apply(this,arguments)-Om,y=o.apply(this,arguments)-Om,v=AR(y-g),b=y>g;if(a||(a=c=xa()),h<d&&(l=h,h=d,d=l),h>vr)if(v>Ps-vr)a.moveTo(h*$a(g),h*Oo(g)),a.arc(0,0,h,g,y,!b),d>vr&&(a.moveTo(d*$a(y),d*Oo(y)),a.arc(0,0,d,y,g,b));else{var T,te,_=g,E=y,C=g,I=y,R=v,G=v,z=s.apply(this,arguments)/2,de=z>vr&&(r?+r.apply(this,arguments):Rc(d*d+h*h)),oe=a_(AR(h-d)/2,+n.apply(this,arguments)),fe=oe,re=oe;if(de>vr){var Ce=kR(de/d*Oo(z)),X=kR(de/h*Oo(z));(R-=2*Ce)>vr?(C+=Ce*=b?1:-1,I-=Ce):(R=0,C=I=(g+y)/2),(G-=2*X)>vr?(_+=X*=b?1:-1,E-=X):(G=0,_=E=(g+y)/2)}var we=h*$a(_),Ye=h*Oo(_),Be=d*$a(I),tt=d*Oo(I);if(oe>vr){var ne,Ct=h*$a(E),Dt=h*Oo(E),on=d*$a(C),Jt=d*Oo(C);if(v<Rs&&(ne=function DJ(e,t,n,r,i,o,s,a){var u=n-e,c=r-t,l=s-i,d=a-o,h=d*u-l*c;if(!(h*h<vr))return[e+(h=(l*(t-o)-d*(e-i))/h)*u,t+h*c]}(we,Ye,on,Jt,Ct,Dt,Be,tt))){var Ze=we-ne[0],ht=Ye-ne[1],cn=Ct-ne[0],tn=Dt-ne[1],qe=1/Oo(function mJ(e){return e>1?0:e<-1?Rs:Math.acos(e)}((Ze*cn+ht*tn)/(Rc(Ze*Ze+ht*ht)*Rc(cn*cn+tn*tn)))/2),mt=Rc(ne[0]*ne[0]+ne[1]*ne[1]);fe=a_(oe,(d-mt)/(qe-1)),re=a_(oe,(h-mt)/(qe+1))}}G>vr?re>vr?(T=Rm(on,Jt,we,Ye,h,re,b),te=Rm(Ct,Dt,Be,tt,h,re,b),a.moveTo(T.cx+T.x01,T.cy+T.y01),re<oe?a.arc(T.cx,T.cy,re,yr(T.y01,T.x01),yr(te.y01,te.x01),!b):(a.arc(T.cx,T.cy,re,yr(T.y01,T.x01),yr(T.y11,T.x11),!b),a.arc(0,0,h,yr(T.cy+T.y11,T.cx+T.x11),yr(te.cy+te.y11,te.cx+te.x11),!b),a.arc(te.cx,te.cy,re,yr(te.y11,te.x11),yr(te.y01,te.x01),!b))):(a.moveTo(we,Ye),a.arc(0,0,h,_,E,!b)):a.moveTo(we,Ye),d>vr&&R>vr?fe>vr?(T=Rm(Be,tt,Ct,Dt,d,-fe,b),te=Rm(we,Ye,on,Jt,d,-fe,b),a.lineTo(T.cx+T.x01,T.cy+T.y01),fe<oe?a.arc(T.cx,T.cy,fe,yr(T.y01,T.x01),yr(te.y01,te.x01),!b):(a.arc(T.cx,T.cy,fe,yr(T.y01,T.x01),yr(T.y11,T.x11),!b),a.arc(0,0,d,yr(T.cy+T.y11,T.cx+T.x11),yr(te.cy+te.y11,te.cx+te.x11),b),a.arc(te.cx,te.cy,fe,yr(te.y11,te.x11),yr(te.y01,te.x01),!b))):a.arc(0,0,d,I,C,b):a.lineTo(Be,tt)}else a.moveTo(0,0);if(a.closePath(),c)return a=null,c+""||null}return u.centroid=function(){var c=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,l=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-Rs/2;return[$a(l)*c,Oo(l)*c]},u.innerRadius=function(c){return arguments.length?(e="function"==typeof c?c:Lt(+c),u):e},u.outerRadius=function(c){return arguments.length?(t="function"==typeof c?c:Lt(+c),u):t},u.cornerRadius=function(c){return arguments.length?(n="function"==typeof c?c:Lt(+c),u):n},u.padRadius=function(c){return arguments.length?(r=null==c?null:"function"==typeof c?c:Lt(+c),u):r},u.startAngle=function(c){return arguments.length?(i="function"==typeof c?c:Lt(+c),u):i},u.endAngle=function(c){return arguments.length?(o="function"==typeof c?c:Lt(+c),u):o},u.padAngle=function(c){return arguments.length?(s="function"==typeof c?c:Lt(+c),u):s},u.context=function(c){return arguments.length?(a=c??null,u):a},u}function OR(e){this._context=e}function Pm(e){return new OR(e)}function u_(e){return e[0]}function c_(e){return e[1]}function l_(){var e=u_,t=c_,n=Lt(!0),r=null,i=Pm,o=null;function s(a){var u,l,h,c=a.length,d=!1;for(null==r&&(o=i(h=xa())),u=0;u<=c;++u)!(u<c&&n(l=a[u],u,a))===d&&((d=!d)?o.lineStart():o.lineEnd()),d&&o.point(+e(l,u,a),+t(l,u,a));if(h)return o=null,h+""||null}return s.x=function(a){return arguments.length?(e="function"==typeof a?a:Lt(+a),s):e},s.y=function(a){return arguments.length?(t="function"==typeof a?a:Lt(+a),s):t},s.defined=function(a){return arguments.length?(n="function"==typeof a?a:Lt(!!a),s):n},s.curve=function(a){return arguments.length?(i=a,null!=r&&(o=i(r)),s):i},s.context=function(a){return arguments.length?(null==a?r=o=null:o=i(r=a),s):r},s}function RR(){var e=u_,t=null,n=Lt(0),r=c_,i=Lt(!0),o=null,s=Pm,a=null;function u(l){var d,h,g,v,_,y=l.length,b=!1,E=new Array(y),C=new Array(y);for(null==o&&(a=s(_=xa())),d=0;d<=y;++d){if(!(d<y&&i(v=l[d],d,l))===b)if(b=!b)h=d,a.areaStart(),a.lineStart();else{for(a.lineEnd(),a.lineStart(),g=d-1;g>=h;--g)a.point(E[g],C[g]);a.lineEnd(),a.areaEnd()}b&&(E[d]=+e(v,d,l),C[d]=+n(v,d,l),a.point(t?+t(v,d,l):E[d],r?+r(v,d,l):C[d]))}if(_)return a=null,_+""||null}function c(){return l_().defined(i).curve(s).context(o)}return u.x=function(l){return arguments.length?(e="function"==typeof l?l:Lt(+l),t=null,u):e},u.x0=function(l){return arguments.length?(e="function"==typeof l?l:Lt(+l),u):e},u.x1=function(l){return arguments.length?(t=null==l?null:"function"==typeof l?l:Lt(+l),u):t},u.y=function(l){return arguments.length?(n="function"==typeof l?l:Lt(+l),r=null,u):n},u.y0=function(l){return arguments.length?(n="function"==typeof l?l:Lt(+l),u):n},u.y1=function(l){return arguments.length?(r=null==l?null:"function"==typeof l?l:Lt(+l),u):r},u.lineX0=u.lineY0=function(){return c().x(e).y(n)},u.lineY1=function(){return c().x(e).y(r)},u.lineX1=function(){return c().x(t).y(n)},u.defined=function(l){return arguments.length?(i="function"==typeof l?l:Lt(!!l),u):i},u.curve=function(l){return arguments.length?(s=l,null!=o&&(a=s(o)),u):s},u.context=function(l){return arguments.length?(null==l?o=a=null:a=s(o=l),u):o},u}function CJ(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function xJ(e){return e}function MJ(){var e=xJ,t=CJ,n=null,r=Lt(0),i=Lt(Ps),o=Lt(0);function s(a){var u,l,d,_,I,c=a.length,h=0,g=new Array(c),y=new Array(c),v=+r.apply(this,arguments),b=Math.min(Ps,Math.max(-Ps,i.apply(this,arguments)-v)),E=Math.min(Math.abs(b)/c,o.apply(this,arguments)),C=E*(b<0?-1:1);for(u=0;u<c;++u)(I=y[g[u]=u]=+e(a[u],u,a))>0&&(h+=I);for(null!=t?g.sort(function(R,G){return t(y[R],y[G])}):null!=n&&g.sort(function(R,G){return n(a[R],a[G])}),u=0,d=h?(b-c*C)/h:0;u<c;++u,v=_)y[l=g[u]]={data:a[l],index:u,value:I=y[l],startAngle:v,endAngle:_=v+(I>0?I*d:0)+C,padAngle:E};return y}return s.value=function(a){return arguments.length?(e="function"==typeof a?a:Lt(+a),s):e},s.sortValues=function(a){return arguments.length?(t=a,n=null,s):t},s.sort=function(a){return arguments.length?(n=a,t=null,s):n},s.startAngle=function(a){return arguments.length?(r="function"==typeof a?a:Lt(+a),s):r},s.endAngle=function(a){return arguments.length?(i="function"==typeof a?a:Lt(+a),s):i},s.padAngle=function(a){return arguments.length?(o="function"==typeof a?a:Lt(+a),s):o},s}OR.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(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t)}}};var PR=f_(Pm);function FR(e){this._curve=e}function f_(e){function t(n){return new FR(e(n))}return t._curve=e,t}function _d(e){var t=e.curve;return e.angle=e.x,delete e.x,e.radius=e.y,delete e.y,e.curve=function(n){return arguments.length?t(f_(n)):t()._curve},e}function LR(){return _d(l_().curve(PR))}function BR(){var e=RR().curve(PR),t=e.curve,n=e.lineX0,r=e.lineX1,i=e.lineY0,o=e.lineY1;return 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 _d(n())},delete e.lineX0,e.lineEndAngle=function(){return _d(r())},delete e.lineX1,e.lineInnerRadius=function(){return _d(i())},delete e.lineY0,e.lineOuterRadius=function(){return _d(o())},delete e.lineY1,e.curve=function(s){return arguments.length?t(f_(s)):t()._curve},e}function Dd(e,t){return[(t=+t)*Math.cos(e-=Math.PI/2),t*Math.sin(e)]}FR.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(e,t){this._curve.point(t*Math.sin(e),t*-Math.cos(e))}};var d_=Array.prototype.slice;function IJ(e){return e.source}function SJ(e){return e.target}function h_(e){var t=IJ,n=SJ,r=u_,i=c_,o=null;function s(){var a,u=d_.call(arguments),c=t.apply(this,u),l=n.apply(this,u);if(o||(o=a=xa()),e(o,+r.apply(this,(u[0]=c,u)),+i.apply(this,u),+r.apply(this,(u[0]=l,u)),+i.apply(this,u)),a)return o=null,a+""||null}return s.source=function(a){return arguments.length?(t=a,s):t},s.target=function(a){return arguments.length?(n=a,s):n},s.x=function(a){return arguments.length?(r="function"==typeof a?a:Lt(+a),s):r},s.y=function(a){return arguments.length?(i="function"==typeof a?a:Lt(+a),s):i},s.context=function(a){return arguments.length?(o=a??null,s):o},s}function TJ(e,t,n,r,i){e.moveTo(t,n),e.bezierCurveTo(t=(t+r)/2,n,t,i,r,i)}function NJ(e,t,n,r,i){e.moveTo(t,n),e.bezierCurveTo(t,n=(n+i)/2,r,n,r,i)}function AJ(e,t,n,r,i){var o=Dd(t,n),s=Dd(t,n=(n+i)/2),a=Dd(r,n),u=Dd(r,i);e.moveTo(o[0],o[1]),e.bezierCurveTo(s[0],s[1],a[0],a[1],u[0],u[1])}function kJ(){return h_(TJ)}function OJ(){return h_(NJ)}function RJ(){var e=h_(AJ);return e.angle=e.x,delete e.x,e.radius=e.y,delete e.y,e}const p_={draw:function(e,t){var n=Math.sqrt(t/Rs);e.moveTo(n,0),e.arc(0,0,n,0,Ps)}},jR={draw:function(e,t){var n=Math.sqrt(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}};var VR=Math.sqrt(1/3),PJ=2*VR;const HR={draw:function(e,t){var n=Math.sqrt(t/PJ),r=n*VR;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}};var UR=Math.sin(Rs/10)/Math.sin(7*Rs/10),LJ=Math.sin(Ps/10)*UR,BJ=-Math.cos(Ps/10)*UR;const $R={draw:function(e,t){var n=Math.sqrt(.8908130915292852*t),r=LJ*n,i=BJ*n;e.moveTo(0,-n),e.lineTo(r,i);for(var o=1;o<5;++o){var s=Ps*o/5,a=Math.cos(s),u=Math.sin(s);e.lineTo(u*n,-a*n),e.lineTo(a*r-u*i,u*r+a*i)}e.closePath()}},zR={draw:function(e,t){var n=Math.sqrt(t),r=-n/2;e.rect(r,r,n,n)}};var g_=Math.sqrt(3);const GR={draw:function(e,t){var n=-Math.sqrt(t/(3*g_));e.moveTo(0,2*n),e.lineTo(-g_*n,-n),e.lineTo(g_*n,-n),e.closePath()}};var bi=-.5,wi=Math.sqrt(3)/2,m_=1/Math.sqrt(12),jJ=3*(m_/2+1);const qR={draw:function(e,t){var n=Math.sqrt(t/jJ),r=n/2,i=n*m_,o=r,s=n*m_+n,a=-o,u=s;e.moveTo(r,i),e.lineTo(o,s),e.lineTo(a,u),e.lineTo(bi*r-wi*i,wi*r+bi*i),e.lineTo(bi*o-wi*s,wi*o+bi*s),e.lineTo(bi*a-wi*u,wi*a+bi*u),e.lineTo(bi*r+wi*i,bi*i-wi*r),e.lineTo(bi*o+wi*s,bi*s-wi*o),e.lineTo(bi*a+wi*u,bi*u-wi*a),e.closePath()}};var VJ=[p_,jR,HR,zR,$R,GR,qR];function HJ(){var e=Lt(p_),t=Lt(64),n=null;function r(){var i;if(n||(n=i=xa()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),i)return n=null,i+""||null}return r.type=function(i){return arguments.length?(e="function"==typeof i?i:Lt(i),r):e},r.size=function(i){return arguments.length?(t="function"==typeof i?i:Lt(+i),r):t},r.context=function(i){return arguments.length?(n=i??null,r):n},r}function Fs(){}function Fm(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function Lm(e){this._context=e}function UJ(e){return new Lm(e)}function WR(e){this._context=e}function $J(e){return new WR(e)}function YR(e){this._context=e}function zJ(e){return new YR(e)}function KR(e,t){this._basis=new Lm(e),this._beta=t}Lm.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Fm(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Fm(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},WR.prototype={areaStart:Fs,areaEnd:Fs,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:Fm(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},YR.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:Fm(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},KR.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,n=e.length-1;if(n>0)for(var u,r=e[0],i=t[0],o=e[n]-r,s=t[n]-i,a=-1;++a<=n;)this._basis.point(this._beta*e[a]+(1-this._beta)*(r+(u=a/n)*o),this._beta*t[a]+(1-this._beta)*(i+u*s));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const GJ=function e(t){function n(r){return 1===t?new Lm(r):new KR(r,t)}return n.beta=function(r){return e(+r)},n}(.85);function Bm(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function y_(e,t){this._context=e,this._k=(1-t)/6}y_.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:Bm(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:Bm(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const qJ=function e(t){function n(r){return new y_(r,t)}return n.tension=function(r){return e(+r)},n}(0);function v_(e,t){this._context=e,this._k=(1-t)/6}v_.prototype={areaStart:Fs,areaEnd:Fs,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(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Bm(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const WJ=function e(t){function n(r){return new v_(r,t)}return n.tension=function(r){return e(+r)},n}(0);function b_(e,t){this._context=e,this._k=(1-t)/6}b_.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(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Bm(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const YJ=function e(t){function n(r){return new b_(r,t)}return n.tension=function(r){return e(+r)},n}(0);function w_(e,t,n){var r=e._x1,i=e._y1,o=e._x2,s=e._y2;if(e._l01_a>vr){var a=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,u=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*a-e._x0*e._l12_2a+e._x2*e._l01_2a)/u,i=(i*a-e._y0*e._l12_2a+e._y2*e._l01_2a)/u}if(e._l23_a>vr){var c=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,l=3*e._l23_a*(e._l23_a+e._l12_a);o=(o*c+e._x1*e._l23_2a-t*e._l12_2a)/l,s=(s*c+e._y1*e._l23_2a-n*e._l12_2a)/l}e._context.bezierCurveTo(r,i,o,s,e._x2,e._y2)}function QR(e,t){this._context=e,this._alpha=t}QR.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(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;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(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:w_(this,e,t)}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=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const KJ=function e(t){function n(r){return t?new QR(r,t):new y_(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function ZR(e,t){this._context=e,this._alpha=t}ZR.prototype={areaStart:Fs,areaEnd:Fs,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(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;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=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:w_(this,e,t)}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=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const QJ=function e(t){function n(r){return t?new ZR(r,t):new v_(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function XR(e,t){this._context=e,this._alpha=t}XR.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(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:w_(this,e,t)}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=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const ZJ=function e(t){function n(r){return t?new XR(r,t):new b_(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function JR(e){this._context=e}function XJ(e){return new JR(e)}function eP(e){return e<0?-1:1}function tP(e,t,n){var r=e._x1-e._x0,i=t-e._x1,o=(e._y1-e._y0)/(r||i<0&&-0),s=(n-e._y1)/(i||r<0&&-0),a=(o*i+s*r)/(r+i);return(eP(o)+eP(s))*Math.min(Math.abs(o),Math.abs(s),.5*Math.abs(a))||0}function nP(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function __(e,t,n){var r=e._x0,o=e._x1,s=e._y1,a=(o-r)/3;e._context.bezierCurveTo(r+a,e._y0+a*t,o-a,s-a*n,o,s)}function jm(e){this._context=e}function rP(e){this._context=new iP(e)}function iP(e){this._context=e}function JJ(e){return new jm(e)}function eee(e){return new rP(e)}function oP(e){this._context=e}function sP(e){var t,r,n=e.length-1,i=new Array(n),o=new Array(n),s=new Array(n);for(i[0]=0,o[0]=2,s[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,o[t]=4,s[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,o[n-1]=7,s[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)o[t]-=r=i[t]/o[t-1],s[t]-=r*s[t-1];for(i[n-1]=s[n-1]/o[n-1],t=n-2;t>=0;--t)i[t]=(s[t]-i[t+1])/o[t];for(o[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)o[t]=2*e[t+1]-i[t+1];return[i,o]}function tee(e){return new oP(e)}function Vm(e,t){this._context=e,this._t=t}function nee(e){return new Vm(e,.5)}function ree(e){return new Vm(e,0)}function iee(e){return new Vm(e,1)}function Pc(e,t){if((s=e.length)>1)for(var r,i,s,n=1,o=e[t[0]],a=o.length;n<s;++n)for(i=o,o=e[t[n]],r=0;r<a;++r)o[r][1]+=o[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function Fc(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function oee(e,t){return e[t]}function see(){var e=Lt([]),t=Fc,n=Pc,r=oee;function i(o){var a,d,s=e.apply(this,arguments),u=o.length,c=s.length,l=new Array(c);for(a=0;a<c;++a){for(var v,h=s[a],g=l[a]=new Array(u),y=0;y<u;++y)g[y]=v=[0,+r(o[y],h,y,o)],v.data=o[y];g.key=h}for(a=0,d=t(l);a<c;++a)l[d[a]].index=a;return n(l,d),l}return i.keys=function(o){return arguments.length?(e="function"==typeof o?o:Lt(d_.call(o)),i):e},i.value=function(o){return arguments.length?(r="function"==typeof o?o:Lt(+o),i):r},i.order=function(o){return arguments.length?(t=null==o?Fc:"function"==typeof o?o:Lt(d_.call(o)),i):t},i.offset=function(o){return arguments.length?(n=o??Pc,i):n},i}function aee(e,t){if((r=e.length)>0){for(var n,r,s,i=0,o=e[0].length;i<o;++i){for(s=n=0;n<r;++n)s+=e[n][i][1]||0;if(s)for(n=0;n<r;++n)e[n][i][1]/=s}Pc(e,t)}}function uee(e,t){if((u=e.length)>0)for(var n,i,o,s,a,u,r=0,c=e[t[0]].length;r<c;++r)for(s=a=0,n=0;n<u;++n)(o=(i=e[t[n]][r])[1]-i[0])>0?(i[0]=s,i[1]=s+=o):o<0?(i[1]=a,i[0]=a+=o):(i[0]=0,i[1]=o)}function cee(e,t){if((i=e.length)>0){for(var i,n=0,r=e[t[0]],o=r.length;n<o;++n){for(var s=0,a=0;s<i;++s)a+=e[s][n][1]||0;r[n][1]+=r[n][0]=-a/2}Pc(e,t)}}function lee(e,t){if((s=e.length)>0&&(o=(i=e[t[0]]).length)>0){for(var i,o,s,n=0,r=1;r<o;++r){for(var a=0,u=0,c=0;a<s;++a){for(var l=e[t[a]],d=l[r][1]||0,g=(d-(l[r-1][1]||0))/2,y=0;y<a;++y){var v=e[t[y]];g+=(v[r][1]||0)-(v[r-1][1]||0)}u+=d,c+=g*d}i[r-1][1]+=i[r-1][0]=n,u&&(n-=c/u)}i[r-1][1]+=i[r-1][0]=n,Pc(e,t)}}function aP(e){var t=e.map(fee);return Fc(e).sort(function(n,r){return t[n]-t[r]})}function fee(e){for(var i,t=-1,n=0,r=e.length,o=-1/0;++t<r;)(i=+e[t][1])>o&&(o=i,n=t);return n}function uP(e){var t=e.map(cP);return Fc(e).sort(function(n,r){return t[n]-t[r]})}function cP(e){for(var i,t=0,n=-1,r=e.length;++n<r;)(i=+e[n][1])&&(t+=i);return t}function dee(e){return uP(e).reverse()}function hee(e){var n,r,t=e.length,i=e.map(cP),o=aP(e),s=0,a=0,u=[],c=[];for(n=0;n<t;++n)r=o[n],s<a?(s+=i[r],u.push(r)):(a+=i[r],c.push(r));return c.reverse().concat(u)}function pee(e){return Fc(e).reverse()}JR.prototype={areaStart:Fs,areaEnd:Fs,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}},jm.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:__(this,this._t0,nP(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(t=+t,(e=+e)!==this._x1||t!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,__(this,nP(this,n=tP(this,e,t)),n);break;default:__(this,this._t0,n=tP(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}},(rP.prototype=Object.create(jm.prototype)).point=function(e,t){jm.prototype.point.call(this,t,e)},iP.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,o){this._context.bezierCurveTo(t,e,r,n,o,i)}},oP.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),2===n)this._context.lineTo(e[1],t[1]);else for(var r=sP(e),i=sP(t),o=0,s=1;s<n;++o,++s)this._context.bezierCurveTo(r[0][o],i[0][o],r[1][o],i[1][o],e[s],t[s]);(this._line||0!==this._line&&1===n)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}},Vm.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(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}}this._x=e,this._y=t}};var lP="%Y-%m-%dT%H:%M:%S.%LZ",mee=Date.prototype.toISOString?function gee(e){return e.toISOString()}:Im(lP);const yee=mee;var bee=+new Date("2000-01-01T00:00:00.000Z")?function vee(e){var t=new Date(e);return isNaN(t)?null:t}:t_(lP);const wee=bee;function _ee(e,t,n){var r=new Pf,i=t;return null==t?(r.restart(e,t,n),r):(t=+t,n=null==n?mc():+n,r.restart(function o(s){s+=i,r.restart(o,i+=t,n),e(s)},t,n),r)}function fP(e){return function(){return e}}function Dee(e){return e[0]}function Eee(e){return e[1]}function D_(){this._=null}function Hm(e){e.U=e.C=e.L=e.R=e.P=e.N=null}function Ed(e,t){var n=t,r=t.R,i=n.U;i?i.L===n?i.L=r:i.R=r:e._=r,r.U=i,n.U=r,n.R=r.L,n.R&&(n.R.U=n),r.L=n}function Cd(e,t){var n=t,r=t.L,i=n.U;i?i.L===n?i.L=r:i.R=r:e._=r,r.U=i,n.U=r,n.L=r.R,n.L&&(n.L.U=n),r.R=n}function dP(e){for(;e.L;)e=e.L;return e}D_.prototype={constructor:D_,insert:function(e,t){var n,r,i;if(e){if(t.P=e,t.N=e.N,e.N&&(e.N.P=t),e.N=t,e.R){for(e=e.R;e.L;)e=e.L;e.L=t}else e.R=t;n=e}else this._?(e=dP(this._),t.P=null,t.N=e,e.P=e.L=t,n=e):(t.P=t.N=null,this._=t,n=null);for(t.L=t.R=null,t.U=n,t.C=!0,e=t;n&&n.C;)n===(r=n.U).L?(i=r.R)&&i.C?(n.C=i.C=!1,r.C=!0,e=r):(e===n.R&&(Ed(this,n),n=(e=n).U),n.C=!1,r.C=!0,Cd(this,r)):(i=r.L)&&i.C?(n.C=i.C=!1,r.C=!0,e=r):(e===n.L&&(Cd(this,n),n=(e=n).U),n.C=!1,r.C=!0,Ed(this,r)),n=e.U;this._.C=!1},remove:function(e){e.N&&(e.N.P=e.P),e.P&&(e.P.N=e.N),e.N=e.P=null;var n,o,s,t=e.U,r=e.L,i=e.R;if(o=r?i?dP(i):r:i,t?t.L===e?t.L=o:t.R=o:this._=o,r&&i?(s=o.C,o.C=e.C,o.L=r,r.U=o,o!==i?(t=o.U,o.U=e.U,t.L=e=o.R,o.R=i,i.U=o):(o.U=t,t=o,e=o.R)):(s=e.C,e=o),e&&(e.U=t),!s){if(e&&e.C)return void(e.C=!1);do{if(e===this._)break;if(e===t.L){if((n=t.R).C&&(n.C=!1,t.C=!0,Ed(this,t),n=t.R),n.L&&n.L.C||n.R&&n.R.C){(!n.R||!n.R.C)&&(n.L.C=!1,n.C=!0,Cd(this,n),n=t.R),n.C=t.C,t.C=n.R.C=!1,Ed(this,t),e=this._;break}}else if((n=t.L).C&&(n.C=!1,t.C=!0,Cd(this,t),n=t.L),n.L&&n.L.C||n.R&&n.R.C){(!n.L||!n.L.C)&&(n.R.C=!1,n.C=!0,Ed(this,n),n=t.L),n.C=t.C,t.C=n.L.C=!1,Cd(this,t),e=this._;break}n.C=!0,e=t,t=t.U}while(!e.C);e&&(e.C=!1)}}};const hP=D_;function xd(e,t,n,r){var i=[null,null],o=br.push(i)-1;return i.left=e,i.right=t,n&&Um(i,e,t,n),r&&Um(i,t,e,r),oi[e.index].halfedges.push(o),oi[t.index].halfedges.push(o),i}function Md(e,t,n){var r=[t,n];return r.left=e,r}function Um(e,t,n,r){e[0]||e[1]?e.left===n?e[1]=r:e[0]=r:(e[0]=r,e.left=t,e.right=n)}function Cee(e,t,n,r,i){var v,o=e[0],s=e[1],a=o[0],u=o[1],d=0,h=1,g=s[0]-a,y=s[1]-u;if(v=t-a,g||!(v>0)){if(v/=g,g<0){if(v<d)return;v<h&&(h=v)}else if(g>0){if(v>h)return;v>d&&(d=v)}if(v=r-a,g||!(v<0)){if(v/=g,g<0){if(v>h)return;v>d&&(d=v)}else if(g>0){if(v<d)return;v<h&&(h=v)}if(v=n-u,y||!(v>0)){if(v/=y,y<0){if(v<d)return;v<h&&(h=v)}else if(y>0){if(v>h)return;v>d&&(d=v)}if(v=i-u,y||!(v<0)){if(v/=y,y<0){if(v>h)return;v>d&&(d=v)}else if(y>0){if(v<d)return;v<h&&(h=v)}return!(d>0)&&!(h<1)||(d>0&&(e[0]=[a+d*g,u+d*y]),h<1&&(e[1]=[a+h*g,u+h*y])),!0}}}}}function xee(e,t,n,r,i){var o=e[1];if(o)return!0;var v,b,s=e[0],a=e.left,u=e.right,c=a[0],l=a[1],d=u[0],h=u[1],g=(c+d)/2;if(h===l){if(g<t||g>=r)return;if(c>d){if(s){if(s[1]>=i)return}else s=[g,n];o=[g,i]}else{if(s){if(s[1]<n)return}else s=[g,i];o=[g,n]}}else if(b=(l+h)/2-(v=(c-d)/(h-l))*g,v<-1||v>1)if(c>d){if(s){if(s[1]>=i)return}else s=[(n-b)/v,n];o=[(i-b)/v,i]}else{if(s){if(s[1]<n)return}else s=[(i-b)/v,i];o=[(n-b)/v,n]}else if(l<h){if(s){if(s[0]>=r)return}else s=[t,v*t+b];o=[r,v*r+b]}else{if(s){if(s[0]<t)return}else s=[r,v*r+b];o=[t,v*t+b]}return e[0]=s,e[1]=o,!0}function See(e,t){var n=e.site,r=t.left,i=t.right;return n===i&&(i=r,r=n),i?Math.atan2(i[1]-r[1],i[0]-r[0]):(n===r?(r=t[1],i=t[0]):(r=t[0],i=t[1]),Math.atan2(r[0]-i[0],i[1]-r[1]))}function pP(e,t){return t[+(t.left!==e.site)]}function Tee(e,t){return t[+(t.left===e.site)]}var E_,gP=[];function kee(){Hm(this),this.x=this.y=this.arc=this.site=this.cy=null}function Lc(e){var t=e.P,n=e.N;if(t&&n){var r=t.site,i=e.site,o=n.site;if(r!==o){var s=i[0],a=i[1],u=r[0]-s,c=r[1]-a,l=o[0]-s,d=o[1]-a,h=2*(u*d-c*l);if(!(h>=-Lee)){var g=u*u+c*c,y=l*l+d*d,v=(d*g-c*y)/h,b=(u*y-l*g)/h,_=gP.pop()||new kee;_.arc=e,_.site=i,_.x=v+s,_.y=(_.cy=b+a)+Math.sqrt(v*v+b*b),e.circle=_;for(var E=null,C=Id._;C;)if(_.y<C.y||_.y===C.y&&_.x<=C.x){if(!C.L){E=C.P;break}C=C.L}else{if(!C.R){E=C;break}C=C.R}Id.insert(E,_),E||(E_=_)}}}}function Bc(e){var t=e.circle;t&&(t.P||(E_=t.N),Id.remove(t),gP.push(t),Hm(t),e.circle=null)}var mP=[];function Oee(){Hm(this),this.edge=this.site=this.circle=null}function yP(e){var t=mP.pop()||new Oee;return t.site=e,t}function C_(e){Bc(e),jc.remove(e),mP.push(e),Hm(e)}function Ree(e){var t=e.circle,n=t.x,r=t.cy,i=[n,r],o=e.P,s=e.N,a=[e];C_(e);for(var u=o;u.circle&&Math.abs(n-u.circle.x)<un&&Math.abs(r-u.circle.cy)<un;)o=u.P,a.unshift(u),C_(u),u=o;a.unshift(u),Bc(u);for(var c=s;c.circle&&Math.abs(n-c.circle.x)<un&&Math.abs(r-c.circle.cy)<un;)s=c.N,a.push(c),C_(c),c=s;a.push(c),Bc(c);var d,l=a.length;for(d=1;d<l;++d)Um((c=a[d]).edge,(u=a[d-1]).site,c.site,i);(c=a[l-1]).edge=xd((u=a[0]).site,c.site,null,i),Lc(u),Lc(c)}function Pee(e){for(var r,i,o,s,t=e[0],n=e[1],a=jc._;a;)if((o=vP(a,n)-t)>un)a=a.L;else{if(!((s=t-Fee(a,n))>un)){o>-un?(r=a.P,i=a):s>-un?(r=a,i=a.N):r=i=a;break}if(!a.R){r=a;break}a=a.R}!function Iee(e){oi[e.index]={site:e,halfedges:[]}}(e);var u=yP(e);if(jc.insert(r,u),r||i){if(r===i)return Bc(r),i=yP(r.site),jc.insert(u,i),u.edge=i.edge=xd(r.site,u.site),Lc(r),void Lc(i);if(!i)return void(u.edge=xd(r.site,u.site));Bc(r),Bc(i);var c=r.site,l=c[0],d=c[1],h=e[0]-l,g=e[1]-d,y=i.site,v=y[0]-l,b=y[1]-d,_=2*(h*b-g*v),E=h*h+g*g,C=v*v+b*b,I=[(b*E-g*C)/_+l,(h*C-v*E)/_+d];Um(i.edge,c,y,I),u.edge=xd(c,e,null,I),i.edge=xd(e,y,null,I),Lc(r),Lc(i)}}function vP(e,t){var n=e.site,r=n[0],i=n[1],o=i-t;if(!o)return r;var s=e.P;if(!s)return-1/0;var a=(n=s.site)[0],u=n[1],c=u-t;if(!c)return a;var l=a-r,d=1/o-1/c,h=l/c;return d?(-h+Math.sqrt(h*h-2*d*(l*l/(-2*c)-u+c/2+i-o/2)))/d+r:(r+a)/2}function Fee(e,t){var n=e.N;if(n)return vP(n,t);var r=e.site;return r[1]===t?r[0]:1/0}var jc,oi,Id,br,un=1e-6,Lee=1e-12;function Bee(e,t,n){return(e[0]-n[0])*(t[1]-e[1])-(e[0]-t[0])*(n[1]-e[1])}function jee(e,t){return t[1]-e[1]||t[0]-e[0]}function x_(e,t){var r,i,o,n=e.sort(jee).pop();for(br=[],oi=new Array(e.length),jc=new hP,Id=new hP;;)if(o=E_,n&&(!o||n[1]<o.y||n[1]===o.y&&n[0]<o.x))(n[0]!==r||n[1]!==i)&&(Pee(n),r=n[0],i=n[1]),n=e.pop();else{if(!o)break;Ree(o.arc)}if(function Nee(){for(var n,r,i,o,e=0,t=oi.length;e<t;++e)if((n=oi[e])&&(o=(r=n.halfedges).length)){var s=new Array(o),a=new Array(o);for(i=0;i<o;++i)s[i]=i,a[i]=See(n,br[r[i]]);for(s.sort(function(u,c){return a[c]-a[u]}),i=0;i<o;++i)a[i]=r[s[i]];for(i=0;i<o;++i)r[i]=a[i]}}(),t){var s=+t[0][0],a=+t[0][1],u=+t[1][0],c=+t[1][1];(function Mee(e,t,n,r){for(var o,i=br.length;i--;)xee(o=br[i],e,t,n,r)&&Cee(o,e,t,n,r)&&(Math.abs(o[0][0]-o[1][0])>un||Math.abs(o[0][1]-o[1][1])>un)||delete br[i]})(s,a,u,c),function Aee(e,t,n,r){var o,s,a,u,c,l,d,h,g,y,v,b,i=oi.length,_=!0;for(o=0;o<i;++o)if(s=oi[o]){for(a=s.site,u=(c=s.halfedges).length;u--;)br[c[u]]||c.splice(u,1);for(u=0,l=c.length;u<l;)v=(y=Tee(s,br[c[u]]))[0],b=y[1],h=(d=pP(s,br[c[++u%l]]))[0],g=d[1],(Math.abs(v-h)>un||Math.abs(b-g)>un)&&(c.splice(u,0,br.push(Md(a,y,Math.abs(v-e)<un&&r-b>un?[e,Math.abs(h-e)<un?g:r]:Math.abs(b-r)<un&&n-v>un?[Math.abs(g-r)<un?h:n,r]:Math.abs(v-n)<un&&b-t>un?[n,Math.abs(h-n)<un?g:t]:Math.abs(b-t)<un&&v-e>un?[Math.abs(g-t)<un?h:e,t]:null))-1),++l);l&&(_=!1)}if(_){var E,C,I,R=1/0;for(o=0,_=null;o<i;++o)(s=oi[o])&&(I=(E=(a=s.site)[0]-e)*E+(C=a[1]-t)*C)<R&&(R=I,_=s);if(_){var G=[e,t],z=[e,r],de=[n,r],oe=[n,t];_.halfedges.push(br.push(Md(a=_.site,G,z))-1,br.push(Md(a,z,de))-1,br.push(Md(a,de,oe))-1,br.push(Md(a,oe,G))-1)}}for(o=0;o<i;++o)(s=oi[o])&&(s.halfedges.length||delete oi[o])}(s,a,u,c)}this.edges=br,this.cells=oi,jc=Id=br=oi=null}function Vee(){var e=Dee,t=Eee,n=null;function r(i){return new x_(i.map(function(o,s){var a=[Math.round(e(o,s,i)/un)*un,Math.round(t(o,s,i)/un)*un];return a.index=s,a.data=o,a}),n)}return r.polygons=function(i){return r(i).polygons()},r.links=function(i){return r(i).links()},r.triangles=function(i){return r(i).triangles()},r.x=function(i){return arguments.length?(e="function"==typeof i?i:fP(+i),r):e},r.y=function(i){return arguments.length?(t="function"==typeof i?i:fP(+i),r):t},r.extent=function(i){return arguments.length?(n=null==i?null:[[+i[0][0],+i[0][1]],[+i[1][0],+i[1][1]]],r):n&&[[n[0][0],n[0][1]],[n[1][0],n[1][1]]]},r.size=function(i){return arguments.length?(n=null==i?null:[[0,0],[+i[0],+i[1]]],r):n&&[n[1][0]-n[0][0],n[1][1]-n[0][1]]},r}function $m(e){return function(){return e}}function Hee(e,t,n){this.target=e,this.type=t,this.transform=n}function ns(e,t,n){this.k=e,this.x=t,this.y=n}x_.prototype={constructor:x_,polygons:function(){var e=this.edges;return this.cells.map(function(t){var n=t.halfedges.map(function(r){return pP(t,e[r])});return n.data=t.site.data,n})},triangles:function(){var e=[],t=this.edges;return this.cells.forEach(function(n,r){if(a=(o=n.halfedges).length)for(var o,a,u,i=n.site,s=-1,c=t[o[a-1]],l=c.left===i?c.right:c.left;++s<a;)u=l,l=(c=t[o[s]]).left===i?c.right:c.left,u&&l&&r<u.index&&r<l.index&&Bee(i,u,l)<0&&e.push([i.data,u.data,l.data])}),e},links:function(){return this.edges.filter(function(e){return e.right}).map(function(e){return{source:e.left.data,target:e.right.data}})},find:function(e,t,n){for(var i,a,r=this,o=r._found||0,s=r.cells.length;!(a=r.cells[o]);)if(++o>=s)return null;var u=e-a.site[0],c=t-a.site[1],l=u*u+c*c;do{a=r.cells[i=o],o=null,a.halfedges.forEach(function(d){var h=r.edges[d],g=h.left;if(g!==a.site&&g||(g=h.right)){var y=e-g[0],v=t-g[1],b=y*y+v*v;b<l&&(l=b,o=g.index)}})}while(null!==o);return r._found=i,null==n||l<=n*n?a.site:null}},ns.prototype={constructor:ns,scale:function(e){return 1===e?this:new ns(this.k*e,this.x,this.y)},translate:function(e,t){return 0===e&0===t?this:new ns(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var zm=new ns(1,0,0);function M_(e){for(;!e.__zoom;)if(!(e=e.parentNode))return zm;return e.__zoom}function I_(){Ue.stopImmediatePropagation()}function Sd(){Ue.preventDefault(),Ue.stopImmediatePropagation()}function Uee(){return!Ue.ctrlKey&&!Ue.button}function $ee(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e).hasAttribute("viewBox")?[[(e=e.viewBox.baseVal).x,e.y],[e.x+e.width,e.y+e.height]]:[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]:[[0,0],[e.clientWidth,e.clientHeight]]}function bP(){return this.__zoom||zm}function zee(){return-Ue.deltaY*(1===Ue.deltaMode?.05:Ue.deltaMode?1:.002)}function Gee(){return navigator.maxTouchPoints||"ontouchstart"in this}function qee(e,t,n){var r=e.invertX(t[0][0])-n[0][0],i=e.invertX(t[1][0])-n[1][0],o=e.invertY(t[0][1])-n[0][1],s=e.invertY(t[1][1])-n[1][1];return e.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),s>o?(o+s)/2:Math.min(0,o)||Math.max(0,s))}function wP(){var l,d,e=Uee,t=$ee,n=qee,r=zee,i=Gee,o=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],a=250,u=Tk,c=uc("start","zoom","end"),h=500,g=150,y=0;function v(T){T.property("__zoom",bP).on("wheel.zoom",G).on("mousedown.zoom",z).on("dblclick.zoom",de).filter(i).on("touchstart.zoom",oe).on("touchmove.zoom",fe).on("touchend.zoom touchcancel.zoom",re).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function b(T,te){return(te=Math.max(o[0],Math.min(o[1],te)))===T.k?T:new ns(te,T.x,T.y)}function _(T,te,Ce){var X=te[0]-Ce[0]*T.k,we=te[1]-Ce[1]*T.k;return X===T.x&&we===T.y?T:new ns(T.k,X,we)}function E(T){return[(+T[0][0]+ +T[1][0])/2,(+T[0][1]+ +T[1][1])/2]}function C(T,te,Ce){T.on("start.zoom",function(){I(this,arguments).start()}).on("interrupt.zoom end.zoom",function(){I(this,arguments).end()}).tween("zoom",function(){var X=this,we=arguments,Ye=I(X,we),Be=t.apply(X,we),tt=null==Ce?E(Be):"function"==typeof Ce?Ce.apply(X,we):Ce,Ct=Math.max(Be[1][0]-Be[0][0],Be[1][1]-Be[0][1]),Dt=X.__zoom,on="function"==typeof te?te.apply(X,we):te,Jt=u(Dt.invert(tt).concat(Ct/Dt.k),on.invert(tt).concat(Ct/on.k));return function(ne){if(1===ne)ne=on;else{var Ze=Jt(ne),ht=Ct/Ze[2];ne=new ns(ht,tt[0]-Ze[0]*ht,tt[1]-Ze[1]*ht)}Ye.zoom(null,ne)}})}function I(T,te,Ce){return!Ce&&T.__zooming||new R(T,te)}function R(T,te){this.that=T,this.args=te,this.active=0,this.extent=t.apply(T,te),this.taps=0}function G(){if(e.apply(this,arguments)){var T=I(this,arguments),te=this.__zoom,Ce=Math.max(o[0],Math.min(o[1],te.k*Math.pow(2,r.apply(this,arguments)))),X=_a(this);if(T.wheel)(T.mouse[0][0]!==X[0]||T.mouse[0][1]!==X[1])&&(T.mouse[1]=te.invert(T.mouse[0]=X)),clearTimeout(T.wheel);else{if(te.k===Ce)return;T.mouse=[X,te.invert(X)],Ea(this),T.start()}Sd(),T.wheel=setTimeout(function we(){T.wheel=null,T.end()},g),T.zoom("mouse",n(_(b(te,Ce),T.mouse[0],T.mouse[1]),T.extent,s))}}function z(){if(!d&&e.apply(this,arguments)){var T=I(this,arguments,!0),te=rn(Ue.view).on("mousemove.zoom",function Ye(){if(Sd(),!T.moved){var tt=Ue.clientX-X,Ct=Ue.clientY-we;T.moved=tt*tt+Ct*Ct>y}T.zoom("mouse",n(_(T.that.__zoom,T.mouse[0]=_a(T.that),T.mouse[1]),T.extent,s))},!0).on("mouseup.zoom",function Be(){te.on("mousemove.zoom mouseup.zoom",null),Qp(Ue.view,T.moved),Sd(),T.end()},!0),Ce=_a(this),X=Ue.clientX,we=Ue.clientY;Kp(Ue.view),I_(),T.mouse=[Ce,this.__zoom.invert(Ce)],Ea(this),T.start()}}function de(){if(e.apply(this,arguments)){var T=this.__zoom,te=_a(this),Ce=T.invert(te),we=n(_(b(T,T.k*(Ue.shiftKey?.5:2)),te,Ce),t.apply(this,arguments),s);Sd(),a>0?rn(this).transition().duration(a).call(C,we,te):rn(this).call(v.transform,we)}}function oe(){if(e.apply(this,arguments)){var X,we,Ye,Be,T=Ue.touches,te=T.length,Ce=I(this,arguments,Ue.changedTouches.length===te);for(I_(),we=0;we<te;++we)Be=[Be=Nf(this,T,(Ye=T[we]).identifier),this.__zoom.invert(Be),Ye.identifier],Ce.touch0?!Ce.touch1&&Ce.touch0[2]!==Be[2]&&(Ce.touch1=Be,Ce.taps=0):(Ce.touch0=Be,X=!0,Ce.taps=1+!!l);l&&(l=clearTimeout(l)),X&&(Ce.taps<2&&(l=setTimeout(function(){l=null},h)),Ea(this),Ce.start())}}function fe(){if(this.__zooming){var X,we,Ye,Be,T=I(this,arguments),te=Ue.changedTouches,Ce=te.length;for(Sd(),l&&(l=clearTimeout(l)),T.taps=0,X=0;X<Ce;++X)Ye=Nf(this,te,(we=te[X]).identifier),T.touch0&&T.touch0[2]===we.identifier?T.touch0[0]=Ye:T.touch1&&T.touch1[2]===we.identifier&&(T.touch1[0]=Ye);if(we=T.that.__zoom,T.touch1){var tt=T.touch0[0],Ct=T.touch0[1],Dt=T.touch1[0],on=T.touch1[1],Jt=(Jt=Dt[0]-tt[0])*Jt+(Jt=Dt[1]-tt[1])*Jt,ne=(ne=on[0]-Ct[0])*ne+(ne=on[1]-Ct[1])*ne;we=b(we,Math.sqrt(Jt/ne)),Ye=[(tt[0]+Dt[0])/2,(tt[1]+Dt[1])/2],Be=[(Ct[0]+on[0])/2,(Ct[1]+on[1])/2]}else{if(!T.touch0)return;Ye=T.touch0[0],Be=T.touch0[1]}T.zoom("touch",n(_(we,Ye,Be),T.extent,s))}}function re(){if(this.__zooming){var X,we,T=I(this,arguments),te=Ue.changedTouches,Ce=te.length;for(I_(),d&&clearTimeout(d),d=setTimeout(function(){d=null},h),X=0;X<Ce;++X)we=te[X],T.touch0&&T.touch0[2]===we.identifier?delete T.touch0:T.touch1&&T.touch1[2]===we.identifier&&delete T.touch1;if(T.touch1&&!T.touch0&&(T.touch0=T.touch1,delete T.touch1),T.touch0)T.touch0[1]=this.__zoom.invert(T.touch0[0]);else if(T.end(),2===T.taps){var Ye=rn(this).on("dblclick.zoom");Ye&&Ye.apply(this,arguments)}}}return v.transform=function(T,te,Ce){var X=T.selection?T.selection():T;X.property("__zoom",bP),T!==X?C(T,te,Ce):X.interrupt().each(function(){I(this,arguments).start().zoom(null,"function"==typeof te?te.apply(this,arguments):te).end()})},v.scaleBy=function(T,te,Ce){v.scaleTo(T,function(){return this.__zoom.k*("function"==typeof te?te.apply(this,arguments):te)},Ce)},v.scaleTo=function(T,te,Ce){v.transform(T,function(){var X=t.apply(this,arguments),we=this.__zoom,Ye=null==Ce?E(X):"function"==typeof Ce?Ce.apply(this,arguments):Ce,Be=we.invert(Ye),tt="function"==typeof te?te.apply(this,arguments):te;return n(_(b(we,tt),Ye,Be),X,s)},Ce)},v.translateBy=function(T,te,Ce){v.transform(T,function(){return n(this.__zoom.translate("function"==typeof te?te.apply(this,arguments):te,"function"==typeof Ce?Ce.apply(this,arguments):Ce),t.apply(this,arguments),s)})},v.translateTo=function(T,te,Ce,X){v.transform(T,function(){var we=t.apply(this,arguments),Ye=this.__zoom,Be=null==X?E(we):"function"==typeof X?X.apply(this,arguments):X;return n(zm.translate(Be[0],Be[1]).scale(Ye.k).translate("function"==typeof te?-te.apply(this,arguments):-te,"function"==typeof Ce?-Ce.apply(this,arguments):-Ce),we,s)},X)},R.prototype={start:function(){return 1==++this.active&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(T,te){return this.mouse&&"mouse"!==T&&(this.mouse[1]=te.invert(this.mouse[0])),this.touch0&&"touch"!==T&&(this.touch0[1]=te.invert(this.touch0[0])),this.touch1&&"touch"!==T&&(this.touch1[1]=te.invert(this.touch1[0])),this.that.__zoom=te,this.emit("zoom"),this},end:function(){return 0==--this.active&&(delete this.that.__zooming,this.emit("end")),this},emit:function(T){xf(new Hee(v,T,this.that.__zoom),c.apply,c,[T,this.that,this.args])}},v.wheelDelta=function(T){return arguments.length?(r="function"==typeof T?T:$m(+T),v):r},v.filter=function(T){return arguments.length?(e="function"==typeof T?T:$m(!!T),v):e},v.touchable=function(T){return arguments.length?(i="function"==typeof T?T:$m(!!T),v):i},v.extent=function(T){return arguments.length?(t="function"==typeof T?T:$m([[+T[0][0],+T[0][1]],[+T[1][0],+T[1][1]]]),v):t},v.scaleExtent=function(T){return arguments.length?(o[0]=+T[0],o[1]=+T[1],v):[o[0],o[1]]},v.translateExtent=function(T){return arguments.length?(s[0][0]=+T[0][0],s[1][0]=+T[1][0],s[0][1]=+T[0][1],s[1][1]=+T[1][1],v):[[s[0][0],s[0][1]],[s[1][0],s[1][1]]]},v.constrain=function(T){return arguments.length?(n=T,v):n},v.duration=function(T){return arguments.length?(a=+T,v):a},v.interpolate=function(T){return arguments.length?(u=T,v):u},v.on=function(){var T=c.on.apply(c,arguments);return T===c?v:T},v.clickDistance=function(T){return arguments.length?(y=(T=+T)*T,v):Math.sqrt(y)},v}M_.prototype=ns.prototype;class Wee extends ln{constructor(t,n){super()}schedule(t,n=0){return this}}class Yee extends Wee{constructor(t,n){super(t,n),this.scheduler=t,this.work=n,this.pending=!1}schedule(t,n=0){if(this.closed)return this;this.state=t;const r=this.id,i=this.scheduler;return null!=r&&(this.id=this.recycleAsyncId(i,r,n)),this.pending=!0,this.delay=n,this.id=this.id||this.requestAsyncId(i,this.id,n),this}requestAsyncId(t,n,r=0){return setInterval(t.flush.bind(t,this),r)}recycleAsyncId(t,n,r=0){if(null!==r&&this.delay===r&&!1===this.pending)return n;clearInterval(n)}execute(t,n){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;const r=this._execute(t,n);if(r)return r;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(t,n){let i,r=!1;try{this.work(t)}catch(o){r=!0,i=!!o&&o||new Error(o)}if(r)return this.unsubscribe(),i}_unsubscribe(){const t=this.id,n=this.scheduler,r=n.actions,i=r.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==i&&r.splice(i,1),null!=t&&(this.id=this.recycleAsyncId(n,t,null)),this.delay=null}}let _P=(()=>{class e{constructor(n,r=e.now){this.SchedulerAction=n,this.now=r}schedule(n,r=0,i){return new this.SchedulerAction(this,n).schedule(i,r)}}return e.now=()=>Date.now(),e})();class Ls extends _P{constructor(t,n=_P.now){super(t,()=>Ls.delegate&&Ls.delegate!==this?Ls.delegate.now():n()),this.actions=[],this.active=!1,this.scheduled=void 0}schedule(t,n=0,r){return Ls.delegate&&Ls.delegate!==this?Ls.delegate.schedule(t,n,r):super.schedule(t,n,r)}flush(t){const{actions:n}=this;if(this.active)return void n.push(t);let r;this.active=!0;do{if(r=t.execute(t.state,t.delay))break}while(t=n.shift());if(this.active=!1,r){for(;t=n.shift();)t.unsubscribe();throw r}}}const Zee=new class Qee extends Ls{}(class Kee extends Yee{constructor(t,n){super(t,n),this.scheduler=t,this.work=n}schedule(t,n=0){return n>0?super.schedule(t,n):(this.delay=n,this.state=t,this.scheduler.flush(this),this)}execute(t,n){return n>0||this.closed?super.execute(t,n):this._execute(t,n)}requestAsyncId(t,n,r=0){return null!==r&&r>0||null===r&&this.delay>0?super.requestAsyncId(t,n,r):t.flush(this)}}),Xee=new Yr(e=>e.complete());function DP(e,t){return new Yr(n=>{const r=new ln;let i=0;return r.add(t.schedule(function(){i!==e.length?(n.next(e[i++]),n.closed||r.add(this.schedule())):n.complete()})),r})}function ste({error:e,subscriber:t}){t.error(e)}class _i{constructor(t,n,r){this.kind=t,this.value=n,this.error=r,this.hasValue="N"===t}observe(t){switch(this.kind){case"N":return t.next&&t.next(this.value);case"E":return t.error&&t.error(this.error);case"C":return t.complete&&t.complete()}}do(t,n,r){switch(this.kind){case"N":return t&&t(this.value);case"E":return n&&n(this.error);case"C":return r&&r()}}accept(t,n,r){return t&&"function"==typeof t.next?this.observe(t):this.do(t,n,r)}toObservable(){switch(this.kind){case"N":return function ite(...e){let t=e[e.length-1];return function tte(e){return e&&"function"==typeof e.schedule}(t)?(e.pop(),DP(e,t)):function rte(e,t){return t?DP(e,t):new Yr((e=>t=>{for(let n=0,r=e.length;n<r&&!t.closed;n++)t.next(e[n]);t.complete()})(e))}(e)}(this.value);case"E":return function ote(e,t){return new Yr(t?n=>t.schedule(ste,0,{error:e,subscriber:n}):n=>n.error(e))}(this.error);case"C":return function Jee(e){return e?function ete(e){return new Yr(t=>e.schedule(()=>t.complete()))}(e):Xee}()}throw new Error("unexpected notification kind value")}static createNext(t){return typeof t<"u"?new _i("N",t):_i.undefinedValueNotification}static createError(t){return new _i("E",void 0,t)}static createComplete(){return _i.completeNotification}}_i.completeNotification=new _i("C"),_i.undefinedValueNotification=new _i("N",void 0);class Gm extends ur{constructor(t,n,r=0){super(t),this.scheduler=n,this.delay=r}static dispatch(t){const{notification:n,destination:r}=t;n.observe(r),this.unsubscribe()}scheduleMessage(t){this.destination.add(this.scheduler.schedule(Gm.dispatch,this.delay,new cte(t,this.destination)))}_next(t){this.scheduleMessage(_i.createNext(t))}_error(t){this.scheduleMessage(_i.createError(t)),this.unsubscribe()}_complete(){this.scheduleMessage(_i.createComplete()),this.unsubscribe()}}class cte{constructor(t,n){this.notification=t,this.destination=n}}class lte extends eo{constructor(t=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY,r){super(),this.scheduler=r,this._events=[],this._infiniteTimeWindow=!1,this._bufferSize=t<1?1:t,this._windowTime=n<1?1:n,n===Number.POSITIVE_INFINITY?(this._infiniteTimeWindow=!0,this.next=this.nextInfiniteTimeWindow):this.next=this.nextTimeWindow}nextInfiniteTimeWindow(t){if(!this.isStopped){const n=this._events;n.push(t),n.length>this._bufferSize&&n.shift()}super.next(t)}nextTimeWindow(t){this.isStopped||(this._events.push(new fte(this._getNow(),t)),this._trimBufferThenGetEvents()),super.next(t)}_subscribe(t){const n=this._infiniteTimeWindow,r=n?this._events:this._trimBufferThenGetEvents(),i=this.scheduler,o=r.length;let s;if(this.closed)throw new Ji;if(this.isStopped||this.hasError?s=ln.EMPTY:(this.observers.push(t),s=new Ka(this,t)),i&&t.add(t=new Gm(t,i)),n)for(let a=0;a<o&&!t.closed;a++)t.next(r[a]);else for(let a=0;a<o&&!t.closed;a++)t.next(r[a].value);return this.hasError?t.error(this.thrownError):this.isStopped&&t.complete(),s}_getNow(){return(this.scheduler||Zee).now()}_trimBufferThenGetEvents(){const t=this._getNow(),n=this._bufferSize,r=this._windowTime,i=this._events,o=i.length;let s=0;for(;s<o&&!(t-i[s].time<r);)s++;return o>n&&(s=Math.max(s,o-n)),s>0&&i.splice(0,s),i}}class fte{constructor(t,n){this.time=t,this.value=n}}var S_=B(5505);const EP=Symbol.for("Dexie"),qm=globalThis[EP]||(globalThis[EP]=S_);if(S_.semVer!==qm.semVer)throw new Error(`Two different versions of Dexie loaded in the same app: ${S_.semVer} and ${qm.semVer}`);const dte=qm;let CP=(()=>{class e extends dte{graphData;constructor(){super("GraphDatabase"),this.version(1).stores({graphData:"dataId"}),this.graphData=this.table("graphData")}saveGraphData(n){var r=this;return $(function*(){yield r.graphData.put(n)})()}getGraphData(n){var r=this;return $(function*(){return yield r.graphData.get(n)})()}deleteGraphData(n){var r=this;return $(function*(){yield r.graphData.delete(n)})()}static \u0275fac=function(r){return new(r||e)};static \u0275prov=At({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),hte=(()=>{class e{dexieService;constructor(n){this.dexieService=n}links=[];nodes=[];gBrush=null;brushMode=!1;brushing=!1;shiftKey;extent=null;zoom=!1;zoomToFit=!1;saveGraphData=new lte;update(n,r,i,o){const s=rn(r);return this.zoom=i,this.zoomToFit=o,this._update(le,s,n)}ticked(n,r,i){n.each(function(o,s,a){let u=o.target.x-o.source.x,c=o.target.y-o.source.y,l=Math.sqrt(u*u+c*c),d=40*u/l,h=40*c/l;rn(a[s]).attr("x1",o.source.x+d).attr("y1",o.source.y+h).attr("x2",o.target.x-d).attr("y2",o.target.y-h)}),r.attr("transform",function(o){return`translate(${o.x}, ${o.y+50})`}),i.attr("d",function(o){return`M ${o.source.x} ${o.source.y} L ${o.target.x} ${o.target.y}`}),i.attr("transform",function(o){if(o.target.x<o.source.x){const s=this.getBBox();return`rotate(180 ${s.x+s.width/2} ${s.y+s.height/2})`}return"rotate(0)"})}initDefinitions(n){const r=n.append("defs");function i(o,s,a){r.append("marker").attr("id",o).attr("viewBox","-0 -5 10 10").attr("refX",s).attr("refY",0).attr("orient","auto").attr("markerWidth",8).attr("markerHeight",8).attr("xoverflow","visible").append("svg:path").attr("d",a).attr("fill","#b4b4b4").style("stroke","none")}return i("arrowheadTarget",0,"M 0,-5 L 10 ,0 L 0,5"),i("arrowheadSource",2,"M 10 -5 L 0 0 L 10 5"),n}forceSimulation(n,{width:r,height:i}){return n.forceSimulation().velocityDecay(.1).force("link",n.forceLink().id(function(o){return o.id}).distance(500).strength(1)).force("charge",n.forceManyBody().strength(.1)).force("center",n.forceCenter(r/2,i/2)).force("collision",n.forceCollide().radius(15))}compareAndMarkNodesNew(n,r){const i=r.reduce((o,s)=>(o[s.id]=s,o),{});return n.forEach(o=>{i[o.id]||(o.newItem=!0,o.fx=null,o.fy=null)}),n}removeNewItem(n){for(const r of n)r.hasOwnProperty("newItem")&&delete r.newItem;return n}randomiseNodePositions(n,r,i){let o=100;const s=r*i;let a=n.length*o*o;if(a>s){for(;a>s&&o>0;)o-=10,a=n.length*o*o;if(a>s)throw new Error("Not enough space to accommodate all nodes without a fixed position.")}return n.forEach(u=>{if(null===u.fx&&null===u.fy){let c=o,l=!1;for(;!l&&c>0;)u.fx=crypto.getRandomValues(new Uint32Array(1))[0]%r,u.fy=crypto.getRandomValues(new Uint32Array(1))[0]%i,l=!n.some(d=>{if(null===d.fx||null===d.fy||d===u)return!1;const h=d.fx-u.fx,g=d.fy-u.fy;return Math.sqrt(h*h+g*g)<c}),l||c--;if(!l)throw new Error("Not enough space to accommodate all nodes without a fixed position.")}}),n}_update(n,r,i){var o=this;return $(function*(){const{nodes:s,links:a}=i;o.nodes=s||[],o.links=a||[],document.getElementById("save_graph").setAttribute("disabled","true");const c=n.select("svg").node().parentNode.clientWidth,l=n.select("svg").node().parentNode.clientHeight,d=yield o.dexieService.getGraphData("nodes"),h=d?d.nodes:[];Array.isArray(h)?(o.nodes=o.compareAndMarkNodesNew(s,h),yield o.dexieService.deleteGraphData("nodes"),yield o.dexieService.saveGraphData({dataId:"nodes",nodes:i.nodes,links:i.links})):yield o.dexieService.saveGraphData({dataId:"nodes",nodes:i.nodes,links:i.links}),o.nodes=o.randomiseNodePositions(o.nodes,c,l);const g=o.links.map(({lineStyle:ne,targetArrow:Ze,sourceArrow:ht,relationships:cn})=>cn.map(tn=>({parentLineStyle:ne,parentSourceArrow:ht,parentTargetArrow:Ze,...tn})));g.map(ne=>{ne.map((Ze,ht)=>{Ze.dy=20+15*ht})}),o.links=g.reduce((ne,Ze)=>ne.concat(Ze),[]),rn("svg").append("g");const y=n.select("svg g");let v=M_(rn("svg").node());const b=()=>{const ht=(v.k-.5)/(C.scaleExtent()[1]-.5)*200,cn=document.getElementById("zoom_level"),tn=`Zoom: ${ht.toFixed(0)}%`,qe=document.getElementById("zoom_in"),mt=document.getElementById("zoom_out"),xt=document.getElementById("zoom_reset");xt&&xt.setAttribute("disabled","true"),cn&&cn.innerHTML!==tn&&(cn.innerHTML=tn,cn.style.opacity="1",setTimeout(()=>{cn&&(cn.style.opacity="0")},2e3)),qe&&(200===ht?qe.setAttribute("disabled","true"):qe.removeAttribute("disabled")),mt&&(0===ht?mt.setAttribute("disabled","true"):mt.removeAttribute("disabled")),xt&&(100===ht?xt.setAttribute("disabled","true"):xt.removeAttribute("disabled"))};let _;const C=wP().scaleExtent([.5,1.5]).on("start",function(){rn(this).style("cursor",this.zoom?null:"grabbing")}).on("zoom",o.zoom?()=>{const ne=Ue.transform;y.attr("transform",`translate(${ne.x}, ${ne.y}) scale(${ne.k})`),v=ne,_=!0,b()}:null).on("end",function(){rn(this).style("cursor","grab")});r.call(C).style("cursor","grab").on(o.zoom?null:"wheel.zoom",null).on("dblclick.zoom",null),C.filter(()=>!Ue.shiftKey),rn("#zoom_in").on("click",function(){C.scaleBy(r.transition().duration(750),1.2),b()}),rn("#zoom_out").on("click",function(){C.scaleBy(r.transition().duration(750),.8),b()}),rn("#zoom_reset").on("click",function(){C.scaleTo(r.transition().duration(750),1),b()});const I=()=>{const ne=y.node().getBBox(),tn=Math.min((c-60)/ne.width,(l-60)/ne.height,1),qe=-ne.x*tn+(c-ne.width*tn)/2,mt=-ne.y*tn+(l-ne.height*tn)/2,Te=y.selectAll(".node-wrapper").nodes().reduce((gn,$t)=>{const Sn=$t.getBBox();return gn.x=Math.min(gn.x,Sn.x),gn.y=Math.min(gn.y,Sn.y),gn.width=Math.max(gn.width,Sn.x+Sn.width),gn.height=Math.max(gn.height,Sn.y+Sn.height),gn},{x:1/0,y:1/0,width:-1/0,height:-1/0});Te.x*tn>=0&&Te.y*tn>=0&&Te.width*tn<=c&&Te.height*tn<=l||(y.transition().duration(750).attr("transform","translate(0, 0) scale(1)"),y.transition().duration(750).attr("transform",`translate(${qe}, ${mt}) scale(${tn})`),_&&(v.x=qe,v.y=mt,v.k=tn),b())};rn("#zoom_to_fit").on("click",I),r.on("wheel",()=>{const ne=v.k,Ze=C.scaleExtent()[1],ht=C.scaleExtent()[0];(ne===Ze||ne===ht)&&Ue.preventDefault()}),o.initDefinitions(r);const R=o.forceSimulation(n,{width:+r.attr("width"),height:+r.attr("height")});let G=r.append("g"),z=q2().on("start",()=>{o.brushing=!0,Be.each(ne=>{ne.previouslySelected=o.shiftKey&&ne.selected}),n.selectAll(".edgelabel").style("font-weight",400).style("fill","#212529"),NR("rect.selection").style("stroke","none").style("fill","steelblue").style("fill-opacity",.4)}).on("brush",()=>{o.extent=Ue.selection,Ue.sourceEvent&&o.extent&&o.brushMode&&v&&(Be.classed("selected",ne=>ne.selected=ne.previouslySelected^(Ue.selection[0][0]<=ne.x*v.k+v.x&&ne.x*v.k+v.x<Ue.selection[1][0]&&Ue.selection[0][1]<=ne.y*v.k+v.y&&ne.y*v.k+v.y<Ue.selection[1][1])).select(".nodeText").classed("selected",ne=>ne.selected).style("fill",ne=>ne.selected?"blue":"#999").style("font-weight",ne=>ne.selected?700:400),o.extent=Ue.selection)}).on("end",()=>{!Ue.sourceEvent||!o.extent||!o.gBrush||(o.gBrush.call(z.move,null),o.brushMode||(o.gBrush.remove(),o.gBrush=null),o.brushing=!1,Be.select(".nodeText").filter(function(){return!rn(this.parentNode).classed("selected")}).style("fill","#212529").style("font-weight",400))});rn("body").on("keydown",()=>{z.filter(()=>Ue.shiftKey),z.keyModifiers(!1),16===Ue.keyCode&&(o.shiftKey=!0,o.gBrush||(o.brushMode=!0,o.gBrush=G.append("g").attr("class","brush"),o.gBrush.call(z)))}).on("keyup",()=>{o.shiftKey=!1,o.brushMode=!1,o.gBrush&&!o.brushing&&(o.gBrush.remove(),o.gBrush=null)});const fe=o.links.filter(({source:ne,target:Ze},ht,cn)=>ht===cn.findIndex(tn=>tn.source===ne&&tn.target===Ze)),re=y.selectAll().data(fe,function(ne){return ne.id});y.selectAll("line").data(re).exit().remove();const T=re.join("line").style("stroke",function(ne){return"Solid"===ne.parentLineStyle?"#777":"#b4b4b4"}).style("stroke-opacity",".6").style("stroke-dasharray",function(ne){return"Dotted"===ne.parentLineStyle?"8,5":null}).style("stroke-width","2px").attr("class","link").attr("id",function(ne){return`${ne.source?ne.source:""}_${ne.target?ne.target:""}_line`}).attr("marker-end",function(ne){return!0===ne.parentTargetArrow?"url(#arrowheadTarget)":null}).attr("marker-start",function(ne){return!0===ne.parentSourceArrow?"url(#arrowheadSource)":null});re.append("title").text(function(ne){return ne.label});const te=y.selectAll().data(o.links,function(ne){return ne.id});y.selectAll("path").data(te).exit().remove();const Ce=te.join("svg:path").attr("class","edgepath").attr("fill-opacity",0).attr("stroke-opacity",0).attr("id",function(ne,Ze){return"edgepath"+Ze}),X=y.selectAll().data(o.links,function(ne){return ne.id});y.selectAll("text").data(X).exit().remove();const we=X.enter().append("text").attr("class","edgelabel").attr("id",function(ne){return`${ne.source?ne.source:""}_${ne.target?ne.target:""}_text`}).style("text-anchor","middle").attr("font-size",14).attr("dy",function(ne){return ne.dy});we.append("textPath").attr("xlink:href",function(ne,Ze){return"#edgepath"+Ze}).style("cursor","pointer").attr("dominant-baseline","bottom").attr("startOffset","50%").text(function(ne){return ne.label}),we.selectAll("textPath").filter(function(ne){return ne.linkIcon}).append("tspan").style("fill","#856404").style("font-weight","700").attr("class","fa").text(" \uf0c1"),r.selectAll(".edgelabel").on("click",function(ne){n.event.stopPropagation(),Be.each(function(Ze){Ze.selected=!1,Ze.previouslySelected=!1}),Ye.classed("selected",!1),n.selectAll(".nodeText").style("fill","#212529").style("font-weight",400),n.selectAll(".edgelabel").style("font-weight",400).style("fill","#212529"),n.select(this).style("fill","blue").style("font-weight",700)});const Ye=y.selectAll().data(o.nodes,function(ne){return ne.id});y.selectAll("g").data(Ye).exit().remove();const Be=Ye.join("g").call(n.drag().on("start",function(Ze){document.getElementById("save_graph").removeAttribute("disabled"),n.event.active||R.alphaTarget(.9).restart(),!Ze.selected&&!this.shiftKey&&(Be.classed("selected",function(ht){return ht.selected=ht.previouslySelected=!1}),n.selectAll(".edgelabel").style("fill","#212529").style("font-weight",400),n.selectAll(".nodeText").style("font-weight",400).style("fill","#212529")),n.select(this).classed("selected",function(ht){return Ze.previouslySelected=Ze.selected,Ze.selected=!0}),Be.filter(function(ht){return ht.selected}).each(function(ht){ht.fx=ht.x,ht.fy=ht.y})}).on("drag",function(Ze){Be.filter(function(ht){return ht.selected}).each(function(ht){ht.fx+=n.event.dx,ht.fy+=n.event.dy})}).on("end",function(Ze){n.event.active||R.alphaTarget(.3).restart(),Ze.fx=Ze.x,Ze.fy=Ze.y,tt.saveGraphData.next(i)})).attr("class","node-wrapper").attr("id",function(ne){return ne.id}),tt=o;r.selectAll(".node-wrapper").on("click",function(ne){return n.event.stopPropagation(),ne.selected=!0,r.selectAll(".node-wrapper").classed("selected",!1),rn(this).classed("selected",!0),Be.each(function(Ze){Ze.selected=!1,Ze.previouslySelected=!1}),n.selectAll(".selected").selectAll(".nodeText").style("fill","#212529"),n.selectAll(".edgelabel").style("fill","#212529"),n.selectAll(".nodeText").style("fill","#212529").style("font-weight",400),n.select(this).select(".nodeText").style("fill","blue").style("font-weight",700),null}),n.select("svg").on("click",()=>{Be.each(function(ne){ne.selected=!1,ne.previouslySelected=!1}),Ye.classed("selected",!1),n.selectAll(".selected").selectAll(".nodeText").style("fill","#212529").style("font-weight",400),n.selectAll(".selected").classed("selected",!1),n.selectAll(".edgelabel").style("fill","#212529").style("font-weight",400)}),Be.filter(function(ne){return!(!ne.imageUrl||""===ne.imageUrl)||null}).append("image").attr("xlink:href",function(ne){return ne.imageUrl}).attr("x",-15).attr("y",-60).attr("class",function(ne){return`${ne.id?ne.id:""}_image`}).attr("id",function(ne){return`${ne.id?ne.id:""}`}).attr("width",32).attr("height",32).attr("class","image").style("cursor","pointer"),Be.filter(function(ne){return!(!ne.icon||""===ne.icon)||null}).append("text").text(function(ne){return ne.icon}).attr("x",-18).attr("y",-30).attr("class",function(ne){return`${ne.id?ne.id:""}_icon fa`}).attr("id",function(ne){return`${ne.id?ne.id:""}`}).style("font-size","35px").style("cursor","pointer"),Be.append("text").attr("id","nodeText").attr("class","nodeText").style("text-anchor","middle").style("cursor","pointer").attr("dy",-3).attr("y",-25).attr("testhook",function(ne){return`${ne.id?ne.id:""}_text`}).selectAll("tspan.text").data(ne=>ne.label).enter().append("tspan").attr("class","nodeTextTspan").text(ne=>ne).style("font-size","14px").attr("x",-10).attr("dx",10).attr("dy",15),Be.filter(function(ne){return!!ne.additionalIcon||null}).append("text").attr("id",function(ne){return`${ne.id?ne.id:""}_additionalIcon`}).attr("width",100).attr("height",25).attr("x",30).attr("y",-50).attr("class","fa").style("fill","#856404").text(function(ne){return ne.additionalIcon}),Be.filter(function(ne){return!!ne.newItem||null}).select("text").transition().duration(1e3).attr("fill","blue").attr("font-weight",700).attr("fill-opacity",1).transition().duration(1e3).attr("fill","blue").attr("font-weight",700).attr("fill-opacity",.1).transition().duration(1e3).attr("fill","blue").attr("font-weight",700).attr("fill-opacity",1).transition().duration(1e3).attr("fill","blue").attr("font-weight",700).attr("fill-opacity",.1).transition().duration(1e3).attr("fill","blue").attr("font-weight",700).attr("fill-opacity",1).transition().duration(1e3).attr("fill","#212529").attr("font-weight",400).attr("fill-opacity",1).on("end",function(){return rn(this).call(n.transition)}),Be.filter(function(ne){return!!ne.newItem||null}).select("image").transition().duration(1e3).attr("width",45).attr("height",45).transition().duration(1e3).attr("width",32).attr("height",32).transition().duration(1e3).attr("width",45).attr("height",45).transition().duration(1e3).attr("width",32).attr("height",32).transition().duration(1e3).attr("width",45).attr("height",45).transition().duration(1e3).attr("width",32).attr("height",32).on("end",function(){return rn(this).call(ub)}),o.nodes=o.removeNewItem(o.nodes),Be.append("title").text(function(ne){return ne.label});let on=0,Jt=!1;R.nodes(o.nodes).on("tick",()=>{o.zoomToFit&&on>=30&&!Jt?(R.stop(),I(),Jt=!0):(o.ticked(T,Be,Ce),on++)}),R.force("link").links(o.links),tt.saveGraphData.next(i)})()}resetGraph(n,r,i,o){this.nodes=[],this.links=[],this.update(n,r,i,o)}static \u0275fac=function(r){return new(r||e)(Rt(CP))};static \u0275prov=At({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();var T_=B(1060),xP=function(e){return e.LEFT_TO_RIGHT="LR",e.RIGHT_TO_LEFT="RL",e.TOP_TO_BOTTOM="TB",e.BOTTOM_TO_TOP="BT",e}(xP||{}),MP=function(e){return e.CENTER="C",e.UP_LEFT="UL",e.UP_RIGHT="UR",e.DOWN_LEFT="DL",e.DOWN_RIGHT="DR",e}(MP||{});let pte=(()=>{class e{defaultSettings={orientation:xP.LEFT_TO_RIGHT,marginX:70,marginY:70,edgePadding:200,rankPadding:300,nodePadding:100,curveDistance:20,multigraph:!0,compound:!0,align:MP.UP_RIGHT,acyclicer:void 0,ranker:"network-simplex"};dagreGraph;dagreNodes;dagreEdges;renderLayout(n){this.createDagreGraph(n),T_.layout(this.dagreGraph);for(const r in this.dagreGraph._nodes){const i=this.dagreGraph._nodes[r],o=n.nodes.find(s=>s.id===i.id);null===o.fx&&null===o.fy&&n.links.some(a=>a.source===i.id||a.target===i.id)&&(o.fx=i.x,o.fy=i.y),o.dimension={width:i.width,height:i.height}}return n}initRenderLayout(n){this.createDagreGraph(n),T_.layout(this.dagreGraph);let r=1/0;for(const i in this.dagreGraph._nodes){const o=this.dagreGraph._nodes[i],s=n.nodes.find(u=>u.id===o.id);n.links.some(u=>u.source===o.id||u.target===o.id)?(s.fx=o.x,s.fy=o.y,r=Math.min(r,o.y-this.defaultSettings.marginY)):(s.fx=null,s.fy=null),s.dimension={width:o.width,height:o.height}}if(r!==1/0)for(const i of n.nodes)null!==i.fy&&(i.fy-=r);return n}createDagreGraph(n){const r=Object.assign({},this.defaultSettings);this.dagreGraph=new T_.graphlib.Graph({compound:r.compound,multigraph:r.multigraph}),this.dagreGraph.setGraph({rankdir:r.orientation,marginx:r.marginX,marginy:r.marginY,edgesep:r.edgePadding,ranksep:r.rankPadding,nodesep:r.nodePadding,align:r.align,acyclicer:r.acyclicer,ranker:r.ranker,multigraph:r.multigraph,compound:r.compound}),this.dagreNodes=n.nodes.map(i=>{const o=Object.assign({},i);return o.width=20,o.height=20,o.x=i.fx,o.y=i.fy,o}),this.dagreEdges=n.links.map(i=>Object.assign({},i));for(const i of this.dagreNodes)i.width||(i.width=20),i.height||(i.height=30),this.dagreGraph.setNode(i.id,i);for(const i of this.dagreEdges)r.multigraph?this.dagreGraph.setEdge(i.source,i.target,i,i.linkId):this.dagreGraph.setEdge(i.source,i.target);return this.dagreGraph}static \u0275fac=function(r){return new(r||e)};static \u0275prov=At({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();const gte=["svgId"],mte=e=>({"fade-out":e});function yte(e,t){1&e&&(bs(0,"div",10),tc(1,"span",11),ws())}function vte(e,t){if(1&e&&(bs(0,"div",12)(1,"div",13),function yI(e,t=""){const n=me(),r=Bt(),i=e+Et,o=r.firstCreatePass?Ou(r,i,1,t,null):r.data[i],s=vI(r,n,o,t,e);n[i]=s,vl()&&Fh(r,n,s,o),po(o,!1)}(2," Saved "),tc(3,"i",14),ws()()),2&e){const n=KM();ku(),ec("ngClass",kI(1,mte,!n.showConfirmation))}}let bte=(()=>{class e{visualiserGraphService;dagreNodesOnlyLayout;dexieService;graphElement;saveGraphDataEvent=new vo;saveGraphData;width;savedGraphData;showConfirmation=!1;buttonBarRightPosition;zoom=!0;zoomToFit=!1;constructor(n,r,i){this.visualiserGraphService=n,this.dagreNodesOnlyLayout=r,this.dexieService=i}set data(n){var r=this;n&&n.dataId?(this.savedGraphData=n,setTimeout($(function*(){r.dagreNodesOnlyLayout.renderLayout(n),yield r.dexieService.saveGraphData(n),r.visualiserGraphService.update(n,r.graphElement.nativeElement,r.zoom,r.zoomToFit)}),500)):console.error("Invalid data input")}ngOnInit(){this.updateWidth(),this.buttonBarRightPosition="0",this.savedGraphData||(console.warn("No data provided, using empty data set"),this.data={dataId:"1",nodes:[],links:[]})}onResize(n){this.updateWidth()}updateWidth(){this.width=document.getElementById("pageId").offsetWidth}onConfirmSave(){var n=this;return $(function*(){var r;n.savedGraphData?bootbox.confirm({title:"Save Graph",centerVertical:!0,message:"Are you sure you want to save the graph?",buttons:{confirm:{label:"Yes",className:"btn-success"},cancel:{label:"No",className:"btn-danger"}},callback:(r=$(function*(i){i&&(n.visualiserGraphService.saveGraphData.subscribe(o=>{n.saveGraphData=o}),n.saveGraphDataEvent.emit(n.saveGraphData),n.disableButtons(!0),n.data=n.saveGraphData,n.showConfirmationMessage())}),function(o){return r.apply(this,arguments)})}):console.error("savedGraphData is not set")})()}disableButtons(n){document.querySelectorAll("#save_graph, #reset_graph").forEach(r=>{r.setAttribute("disabled",String(n))})}showConfirmationMessage(){this.showConfirmation=!0,setTimeout(()=>{this.showConfirmation=!1},3e3)}static \u0275fac=function(r){return new(r||e)(kt(hte),kt(pte),kt(CP))};static \u0275cmp=Ge({type:e,selectors:[["visualiser-graph"]],viewQuery:function(r,i){if(1&r&&function oI(e,t,n){WC(e,t,n)}(gte,5),2&r){let o;(function sI(e){const t=me(),n=Bt(),r=T0();uh(r+1);const i=tv(n,r);if(e.dirty&&function r3(e){return!(4&~e[st])}(t)===!(2&~i.metadata.flags)){if(null===i.matches)e.reset([]);else{const o=QC(t,r);e.reset(o,LD),e.notifyOnChanges()}return!0}return!1})(o=aI())&&(i.graphElement=o.first)}},inputs:{zoom:"zoom",zoomToFit:"zoomToFit",data:"data"},outputs:{saveGraphDataEvent:"saveGraphDataEvent"},decls:10,vars:5,consts:[["svgId",""],["id","pageId",1,"page",3,"resize"],[1,"buttonBar"],[1,"d-flex","justify-content-end"],["role","group","aria-label","Controls",1,"btn-group"],["type","button","id","save_graph","data-toggle","tooltip","data-placement","top","title","Save data",1,"m-3","btn","btn-secondary",3,"click"],[1,"bi","bi-save"],["class","zoomIndicator",4,"ngIf"],["class","confirmation-message-container",4,"ngIf"],["height","780"],[1,"zoomIndicator"],["id","zoom_level"],[1,"confirmation-message-container"],["role","alert",1,"alert","alert-success","confirmation-message",3,"ngClass"],[1,"bi","bi-check-circle"]],template:function(r,i){if(1&r){const o=function gM(){return me()}();bs(0,"div",1),cf("resize",function(a){return E0(o),C0(i.onResize(a))},0,TE),bs(1,"div",2)(2,"div",3)(3,"div",4)(4,"button",5),cf("click",function(){return E0(o),C0(i.onConfirmSave())}),tc(5,"i",6),ws()()()(),Lu(6,yte,2,0,"div",7)(7,vte,4,3,"div",8),function hD(){bt.lFrame.currentNamespace="svg"}(),tc(8,"svg",9,0),ws()}2&r&&(ku(),wv("right",i.buttonBarRightPosition),ku(5),ec("ngIf",i.zoom),ku(),ec("ngIf",i.showConfirmation),ku(),gv("width",i.width))},dependencies:[sT,cT],styles:['@import"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css";@import"https://cdnjs.cloudflare.com/ajax/libs/bootstrap/4.6.2/css/bootstrap.min.css";#zoom_level[_ngcontent-%COMP%]{position:relative;background-color:#000c;color:#fff;padding:5px;border-radius:5px;opacity:0;transition:opacity 1s ease-in-out}.zoomIndicator[_ngcontent-%COMP%]{position:absolute;left:0;padding:10px}.buttonBar[_ngcontent-%COMP%]{position:absolute;padding:10px}.confirmation-message-container[_ngcontent-%COMP%]{position:absolute;left:50%;transform:translate(-50%)}.confirmation-message[_ngcontent-%COMP%]{position:relative;top:60px;opacity:0;animation:_ngcontent-%COMP%_fade-in .5s ease-in-out forwards}@keyframes _ngcontent-%COMP%_fade-in{0%{opacity:0}to{opacity:1}}.fade-out[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_fade-out .5s ease-in-out forwards}@keyframes _ngcontent-%COMP%_fade-out{0%{opacity:1}to{opacity:0}}']})}return e})(),wte=(()=>{class e{title="ngx-relationship-visualiser";mockedData=qH;saveGraphData(n){console.log("saved Data",n)}static \u0275fac=function(r){return new(r||e)};static \u0275cmp=Ge({type:e,selectors:[["app-root"]],decls:1,vars:3,consts:[[3,"saveGraphDataEvent","data","zoom","zoomToFit"]],template:function(r,i){1&r&&(bs(0,"visualiser-graph",0),cf("saveGraphDataEvent",function(s){return i.saveGraphData(s)}),ws()),2&r&&ec("data",i.mockedData)("zoom",!0)("zoomToFit",!1)},dependencies:[bte],encapsulation:2})}return e})(),_te=(()=>{class e{static \u0275fac=function(r){return new(r||e)};static \u0275mod=gt({type:e});static \u0275inj=Fo({imports:[FT]})}return e})(),Dte=(()=>{class e{static \u0275fac=function(r){return new(r||e)};static \u0275mod=gt({type:e,bootstrap:[wte]});static \u0275inj=Fo({imports:[FT,_te]})}return e})();HH().bootstrapModule(Dte).catch(e=>console.error(e))},5505:function(Se){Se.exports=function(){"use strict";var Je=function(f,p){return(Je=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,w){m.__proto__=w}||function(m,w){for(var D in w)Object.prototype.hasOwnProperty.call(w,D)&&(m[D]=w[D])})(f,p)},B=function(){return(B=Object.assign||function(f){for(var p,m=1,w=arguments.length;m<w;m++)for(var D in p=arguments[m])Object.prototype.hasOwnProperty.call(p,D)&&(f[D]=p[D]);return f}).apply(this,arguments)};function le(f,p,m){if(m||2===arguments.length)for(var w,D=0,M=p.length;D<M;D++)!w&&D in p||((w=w||Array.prototype.slice.call(p,0,D))[D]=p[D]);return f.concat(w||Array.prototype.slice.call(p))}var J=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,$=Object.keys,q=Array.isArray;function P(f,p){return"object"!=typeof p||$(p).forEach(function(m){f[m]=p[m]}),f}typeof Promise>"u"||J.Promise||(J.Promise=Promise);var L=Object.getPrototypeOf,S={}.hasOwnProperty;function k(f,p){return S.call(f,p)}function x(f,p){"function"==typeof p&&(p=p(L(f))),(typeof Reflect>"u"?$:Reflect.ownKeys)(p).forEach(function(m){j(f,m,p[m])})}var A=Object.defineProperty;function j(f,p,m,w){A(f,p,P(m&&k(m,"get")&&"function"==typeof m.get?{get:m.get,set:m.set,configurable:!0}:{value:m,configurable:!0,writable:!0},w))}function V(f){return{from:function(p){return f.prototype=Object.create(p.prototype),j(f.prototype,"constructor",f),{extend:x.bind(null,f.prototype)}}}}var ge=Object.getOwnPropertyDescriptor,ye=[].slice;function Ie(f,p,m){return ye.call(f,p,m)}function et(f,p){return p(f)}function Ee(f){if(!f)throw new Error("Assertion Failed")}function Pe(f){J.setImmediate?setImmediate(f):setTimeout(f,0)}function he(f,p){if("string"==typeof p&&k(f,p))return f[p];if(!p)return f;if("string"!=typeof p){for(var m=[],w=0,D=p.length;w<D;++w){var M=he(f,p[w]);m.push(M)}return m}var N=p.indexOf(".");if(-1!==N){var O=f[p.substr(0,N)];return null==O?void 0:he(O,p.substr(N+1))}}function _e(f,p,m){if(f&&void 0!==p&&(!("isFrozen"in Object)||!Object.isFrozen(f)))if("string"!=typeof p&&"length"in p){Ee("string"!=typeof m&&"length"in m);for(var w=0,D=p.length;w<D;++w)_e(f,p[w],m[w])}else{var M,N,O=p.indexOf(".");-1!==O?(M=p.substr(0,O),""===(N=p.substr(O+1))?void 0===m?q(f)&&!isNaN(parseInt(M))?f.splice(M,1):delete f[M]:f[M]=m:_e(O=(O=f[M])&&k(f,M)?O:f[M]={},N,m)):void 0===m?q(f)&&!isNaN(parseInt(p))?f.splice(p,1):delete f[p]:f[p]=m}}function Ne(f){var p,m={};for(p in f)k(f,p)&&(m[p]=f[p]);return m}var $e=[].concat;function ze(f){return $e.apply([],f)}var to="BigUint64Array,BigInt64Array,Array,Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,FileSystemDirectoryHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(ze([8,16,32,64].map(function(f){return["Int","Uint","Float"].map(function(p){return p+f+"Array"})}))).filter(function(f){return J[f]}),it=new Set(to.map(function(f){return J[f]})),se=null;function pe(f){return se=new WeakMap,f=function p(m){if(!m||"object"!=typeof m)return m;var w=se.get(m);if(w)return w;if(q(m)){se.set(m,w=[]);for(var D=0,M=m.length;D<M;++D)w.push(p(m[D]))}else if(it.has(m.constructor))w=m;else{var N,O=L(m);for(N in w=O===Object.prototype?{}:Object.create(O),se.set(m,w),m)k(m,N)&&(w[N]=p(m[N]))}return w}(f),se=null,f}var De={}.toString;function xe(f){return De.call(f).slice(8,-1)}var Oe=typeof Symbol<"u"?Symbol.iterator:"@@iterator",pt="symbol"==typeof Oe?function(f){var p;return null!=f&&(p=f[Oe])&&p.apply(f)}:function(){return null};function yt(f,p){return 0<=(p=f.indexOf(p))&&f.splice(p,1),0<=p}var zt={};function Tn(f){var p,m,w,D;if(1===arguments.length){if(q(f))return f.slice();if(this===zt&&"string"==typeof f)return[f];if(D=pt(f)){for(m=[];!(w=D.next()).done;)m.push(w.value);return m}if(null==f)return[f];if("number"!=typeof(p=f.length))return[f];for(m=new Array(p);p--;)m[p]=f[p];return m}for(p=arguments.length,m=new Array(p);p--;)m[p]=arguments[p];return m}var Wr=typeof Symbol<"u"?function(f){return"AsyncFunction"===f[Symbol.toStringTag]}:function(){return!1},Gn=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(Yi=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"]),za={VersionChanged:"Database version changed by other database connection",DatabaseClosed:"Database has been closed",Abort:"Transaction aborted",TransactionInactive:"Transaction has already completed or failed",MissingAPI:"IndexedDB API missing. Please visit https://tinyurl.com/y2uuvskb"};function Di(f,p){this.name=f,this.message=p}function Ga(f,p){return f+". Errors: "+Object.keys(p).map(function(m){return p[m].toString()}).filter(function(m,w,D){return D.indexOf(m)===w}).join("\n")}function si(f,p,m,w){this.failures=p,this.failedKeys=w,this.successCount=m,this.message=Ga(f,p)}function Ei(f,p){this.name="BulkError",this.failures=Object.keys(p).map(function(m){return p[m]}),this.failuresByPos=p,this.message=Ga(f,this.failures)}V(Di).from(Error).extend({toString:function(){return this.name+": "+this.message}}),V(si).from(Di),V(Ei).from(Di);var ve=Gn.reduce(function(f,p){return f[p]=p+"Error",f},{}),Me=Di,ae=Gn.reduce(function(f,p){var m=p+"Error";function w(D,M){this.name=m,D?"string"==typeof D?(this.message="".concat(D).concat(M?"\n "+M:""),this.inner=M||null):"object"==typeof D&&(this.message="".concat(D.name," ").concat(D.message),this.inner=D):(this.message=za[p]||m,this.inner=null)}return V(w).from(Me),f[p]=w,f},{});ae.Syntax=SyntaxError,ae.Type=TypeError,ae.Range=RangeError;var Xe=Yi.reduce(function(f,p){return f[p+"Error"]=ae[p],f},{}),It=Gn.reduce(function(f,p){return-1===["Syntax","Type","Range"].indexOf(p)&&(f[p+"Error"]=ae[p]),f},{});function ot(){}function en(f){return f}function rr(f,p){return null==f||f===en?p:function(m){return p(f(m))}}function ai(f,p){return function(){f.apply(this,arguments),p.apply(this,arguments)}}function wr(f,p){return f===ot?p:function(){var m=f.apply(this,arguments);void 0!==m&&(arguments[0]=m);var w=this.onsuccess,D=this.onerror;this.onsuccess=null,this.onerror=null;var M=p.apply(this,arguments);return w&&(this.onsuccess=this.onsuccess?ai(w,this.onsuccess):w),D&&(this.onerror=this.onerror?ai(D,this.onerror):D),void 0!==M?M:m}}function Vn(f,p){return f===ot?p:function(){f.apply(this,arguments);var m=this.onsuccess,w=this.onerror;this.onsuccess=this.onerror=null,p.apply(this,arguments),m&&(this.onsuccess=this.onsuccess?ai(m,this.onsuccess):m),w&&(this.onerror=this.onerror?ai(w,this.onerror):w)}}function Ci(f,p){return f===ot?p:function(m){var w=f.apply(this,arguments);P(m,w);var D=this.onsuccess,M=this.onerror;return this.onsuccess=null,this.onerror=null,m=p.apply(this,arguments),D&&(this.onsuccess=this.onsuccess?ai(D,this.onsuccess):D),M&&(this.onerror=this.onerror?ai(M,this.onerror):M),void 0===w?void 0===m?void 0:m:P(w,m)}}function ar(f,p){return f===ot?p:function(){return!1!==p.apply(this,arguments)&&f.apply(this,arguments)}}function ui(f,p){return f===ot?p:function(){var m=f.apply(this,arguments);if(m&&"function"==typeof m.then){for(var w=this,D=arguments.length,M=new Array(D);D--;)M[D]=arguments[D];return m.then(function(){return p.apply(w,M)})}return p.apply(this,arguments)}}It.ModifyError=si,It.DexieError=Di,It.BulkError=Ei;var _r=typeof location<"u"&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);function Td(f){_r=f}var Yi,Bs={},Wm=100,ln=(Gn=(Gn=(to=typeof Promise>"u"?[]:function(){var f=Promise.resolve();if(typeof crypto>"u"||!crypto.subtle)return[f,L(f),f];var p=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[p,L(p),f]}())[1])&&Gn.then,(Yi=to[0])&&Yi.constructor),qa=!!(to=to[2]),Ki=function(f,p){Ya.push([f,p]),ur&&(queueMicrotask(Ym),ur=!1)},Nd=!0,ur=!0,Qi=[],Wa=[],Vc=en,Zi={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:ot,pgp:!1,env:{},finalize:ot},nt=Zi,Ya=[],Xi=0,Yr=[];function We(f){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");this._listeners=[],this._lib=!1;var p=this._PSD=nt;if("function"!=typeof f){if(f!==Bs)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(!1===this._state&&Ka(this,this._value))}this._state=null,this._value=null,++p.ref,function m(w,D){try{D(function(M){if(null===w._state){if(M===w)throw new TypeError("A promise cannot be resolved with itself.");var N=w._lib&&is();M&&"function"==typeof M.then?m(w,function(O,H){M instanceof We?M._then(O,H):M.then(O,H)}):(w._state=!0,w._value=M,kd(w)),N&&os()}},Ka.bind(null,w))}catch(M){Ka(w,M)}}(this,f)}var Ad={get:function(){var f=nt,p=$c;function m(w,D){var M=this,N=!f.global&&(f!==nt||p!==$c),O=N&&!Dr(),H=new We(function(W,Q){eo(M,new Ji(Km(w,f,N,O),Km(D,f,N,O),W,Q,f))});return this._consoleTask&&(H._consoleTask=this._consoleTask),H}return m.prototype=Bs,m},set:function(f){j(this,"then",f&&f.prototype===Bs?Ad:{get:function(){return f},set:Ad.set})}};function Ji(f,p,m,w,D){this.onFulfilled="function"==typeof f?f:null,this.onRejected="function"==typeof p?p:null,this.resolve=m,this.reject=w,this.psd=D}function Ka(f,p){var m,w;Wa.push(p),null===f._state&&(m=f._lib&&is(),p=Vc(p),f._state=!1,f._value=p,w=f,Qi.some(function(D){return D._value===w._value})||Qi.push(w),kd(f),m&&os())}function kd(f){var p=f._listeners;f._listeners=[];for(var m=0,w=p.length;m<w;++m)eo(f,p[m]);var D=f._PSD;--D.ref||D.finalize(),0===Xi&&(++Xi,Ki(function(){0==--Xi&&Hc()},[]))}function eo(f,p){if(null!==f._state){var m=f._state?p.onFulfilled:p.onRejected;if(null===m)return(f._state?p.resolve:p.reject)(f._value);++p.psd.ref,++Xi,Ki(Od,[m,f,p])}else f._listeners.push(p)}function Od(f,p,m){try{var w,D=p._value;!p._state&&Wa.length&&(Wa=[]),w=_r&&p._consoleTask?p._consoleTask.run(function(){return f(D)}):f(D),p._state||-1!==Wa.indexOf(D)||function(M){for(var N=Qi.length;N;)if(Qi[--N]._value===M._value)return Qi.splice(N,1)}(p),m.resolve(w)}catch(M){m.reject(M)}finally{0==--Xi&&Hc(),--m.psd.ref||m.psd.finalize()}}function Ym(){jr(Zi,function(){is()&&os()})}function is(){var f=Nd;return ur=Nd=!1,f}function os(){var f,p,m;do{for(;0<Ya.length;)for(f=Ya,Ya=[],m=f.length,p=0;p<m;++p){var w=f[p];w[0].apply(null,w[1])}}while(0<Ya.length);ur=Nd=!0}function Hc(){var f=Qi;Qi=[],f.forEach(function(w){w._PSD.onunhandled.call(null,w._value,w)});for(var p=Yr.slice(0),m=p.length;m;)p[--m]()}function Uc(f){return new We(Bs,!1,f)}function fn(f,p){var m=nt;return function(){var w=is(),D=nt;try{return Ii(m,!0),f.apply(this,arguments)}catch(M){p&&p(M)}finally{Ii(D,!1),w&&os()}}}x(We.prototype,{then:Ad,_then:function(f,p){eo(this,new Ji(null,null,f,p,nt))},catch:function(f){if(1===arguments.length)return this.then(null,f);var p=f,m=arguments[1];return this.then(null,"function"==typeof p?function(w){return(w instanceof p?m:Uc)(w)}:function(w){return(w&&w.name===p?m:Uc)(w)})},finally:function(f){return this.then(function(p){return We.resolve(f()).then(function(){return p})},function(p){return We.resolve(f()).then(function(){return Uc(p)})})},timeout:function(f,p){var m=this;return f<1/0?new We(function(w,D){var M=setTimeout(function(){return D(new ae.Timeout(p))},f);m.then(w,D).finally(clearTimeout.bind(null,M))}):this}}),typeof Symbol<"u"&&Symbol.toStringTag&&j(We.prototype,Symbol.toStringTag,"Dexie.Promise"),Zi.env=Qa(),x(We,{all:function(){var f=Tn.apply(null,arguments).map(Mi);return new We(function(p,m){0===f.length&&p([]);var w=f.length;f.forEach(function(D,M){return We.resolve(D).then(function(N){f[M]=N,--w||p(f)},m)})})},resolve:function(f){return f instanceof We?f:f&&"function"==typeof f.then?new We(function(p,m){f.then(p,m)}):new We(Bs,!0,f)},reject:Uc,race:function(){var f=Tn.apply(null,arguments).map(Mi);return new We(function(p,m){f.map(function(w){return We.resolve(w).then(p,m)})})},PSD:{get:function(){return nt},set:function(f){return nt=f}},totalEchoes:{get:function(){return $c}},newPSD:xi,usePSD:jr,scheduler:{get:function(){return Ki},set:function(f){Ki=f}},rejectionMapper:{get:function(){return Vc},set:function(f){Vc=f}},follow:function(f,p){return new We(function(m,w){return xi(function(D,M){var N=nt;N.unhandleds=[],N.onunhandled=M,N.finalize=ai(function(){var O,H=this;O=function(){0===H.unhandleds.length?D():M(H.unhandleds[0])},Yr.push(function W(){O(),Yr.splice(Yr.indexOf(W),1)}),++Xi,Ki(function(){0==--Xi&&Hc()},[])},N.finalize),f()},p,m,w)})}}),ln&&(ln.allSettled&&j(We,"allSettled",function(){var f=Tn.apply(null,arguments).map(Mi);return new We(function(p){0===f.length&&p([]);var m=f.length,w=new Array(m);f.forEach(function(D,M){return We.resolve(D).then(function(N){return w[M]={status:"fulfilled",value:N}},function(N){return w[M]={status:"rejected",reason:N}}).then(function(){return--m||p(w)})})})}),ln.any&&typeof AggregateError<"u"&&j(We,"any",function(){var f=Tn.apply(null,arguments).map(Mi);return new We(function(p,m){0===f.length&&m(new AggregateError([]));var w=f.length,D=new Array(w);f.forEach(function(M,N){return We.resolve(M).then(function(O){return p(O)},function(O){D[N]=O,--w||m(new AggregateError(D))})})})}),ln.withResolvers&&(We.withResolvers=ln.withResolvers));var Ae={awaits:0,echoes:0,id:0},ss=0,Ro=[],js=0,$c=0,N_=0;function xi(f,p,m,w){var D=nt,M=Object.create(D);return M.parent=D,M.ref=0,M.global=!1,M.id=++N_,M.env=qa?{Promise:We,PromiseProp:{value:We,configurable:!0,writable:!0},all:We.all,race:We.race,allSettled:We.allSettled,any:We.any,resolve:We.resolve,reject:We.reject}:{},p&&P(M,p),++D.ref,M.finalize=function(){--this.parent.ref||this.parent.finalize()},w=jr(M,f,m,w),0===M.ref&&M.finalize(),w}function cr(){return Ae.id||(Ae.id=++ss),++Ae.awaits,Ae.echoes+=Wm,Ae.id}function Dr(){return!!Ae.awaits&&(0==--Ae.awaits&&(Ae.id=0),Ae.echoes=Ae.awaits*Wm,!0)}function Mi(f){return Ae.echoes&&f&&f.constructor===ln?(cr(),f.then(function(p){return Dr(),p},function(p){return Dr(),Nn(p)})):f}function as(){var f=Ro[Ro.length-1];Ro.pop(),Ii(f,!1)}function Ii(f,p){var m,w=nt;(p?!Ae.echoes||js++&&f===nt:!js||--js&&f===nt)||queueMicrotask(p?function(D){++$c,Ae.echoes&&0!=--Ae.echoes||(Ae.echoes=Ae.awaits=Ae.id=0),Ro.push(nt),Ii(D,!0)}.bind(null,f):as),f!==nt&&(nt=f,w===Zi&&(Zi.env=Qa()),qa&&(m=Zi.env.Promise,p=f.env,(w.global||f.global)&&(Object.defineProperty(J,"Promise",p.PromiseProp),m.all=p.all,m.race=p.race,m.resolve=p.resolve,m.reject=p.reject,p.allSettled&&(m.allSettled=p.allSettled),p.any&&(m.any=p.any))))}function Qa(){var f=J.Promise;return qa?{Promise:f,PromiseProp:Object.getOwnPropertyDescriptor(J,"Promise"),all:f.all,race:f.race,allSettled:f.allSettled,any:f.any,resolve:f.resolve,reject:f.reject}:{}}function jr(f,p,m,w,D){var M=nt;try{return Ii(f,!0),p(m,w,D)}finally{Ii(M,!1)}}function Km(f,p,m,w){return"function"!=typeof f?f:function(){var D=nt;m&&cr(),Ii(p,!0);try{return f.apply(this,arguments)}finally{Ii(D,!1),w&&queueMicrotask(Dr)}}}function Gt(f){Promise===ln&&0===Ae.echoes?0===js?f():enqueueNativeMicroTask(f):setTimeout(f,0)}-1===(""+Gn).indexOf("[native code]")&&(cr=Dr=ot);var Nn=We.reject,Ot="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",Rd="String expected.",mn=[],cs="__dbnames",Pd="readonly",zc="readwrite";function Si(f,p){return f?p?function(){return f.apply(this,arguments)&&p.apply(this,arguments)}:f:p}var ft={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function Po(f){return"string"!=typeof f||/\./.test(f)?function(p){return p}:function(p){return void 0===p[f]&&f in p&&delete(p=pe(p))[f],p}}function lr(){throw ae.Type()}function jt(f,p){try{var m=Fd(f),w=Fd(p);if(m!==w)return"Array"===m?1:"Array"===w?-1:"binary"===m?1:"binary"===w?-1:"string"===m?1:"string"===w?-1:"Date"===m?1:"Date"!==w?NaN:-1;switch(m){case"number":case"Date":case"string":return p<f?1:f<p?-1:0;case"binary":return function(D,M){for(var N=D.length,O=M.length,H=N<O?N:O,W=0;W<H;++W)if(D[W]!==M[W])return D[W]<M[W]?-1:1;return N===O?0:N<O?-1:1}(Qm(f),Qm(p));case"Array":return function(D,M){for(var N=D.length,O=M.length,H=N<O?N:O,W=0;W<H;++W){var Q=jt(D[W],M[W]);if(0!==Q)return Q}return N===O?0:N<O?-1:1}(f,p)}}catch{}return NaN}function Fd(f){var p=typeof f;return"object"!=p?p:ArrayBuffer.isView(f)||"ArrayBuffer"===(f=xe(f))?"binary":f}function Qm(f){return f instanceof Uint8Array?f:ArrayBuffer.isView(f)?new Uint8Array(f.buffer,f.byteOffset,f.byteLength):new Uint8Array(f)}var Ti=(yn.prototype._trans=function(f,p,m){var w=this._tx||nt.trans,D=this.name,M=_r&&typeof console<"u"&&console.createTask&&console.createTask("Dexie: ".concat("readonly"===f?"read":"write"," ").concat(this.name));function N(W,Q,F){if(!F.schema[D])throw new ae.NotFound("Table "+D+" not part of transaction");return p(F.idbtrans,F)}var O=is();try{var H=w&&w.db._novip===this.db._novip?w===nt.trans?w._promise(f,N,m):xi(function(){return w._promise(f,N,m)},{trans:w,transless:nt.transless||nt}):function W(Q,F,ee,U){if(Q.idbdb&&(Q._state.openComplete||nt.letThrough||Q._vip)){var Y=Q._createTransaction(F,ee,Q._dbSchema);try{Y.create(),Q._state.PR1398_maxLoop=3}catch(Z){return Z.name===ve.InvalidState&&Q.isOpen()&&0<--Q._state.PR1398_maxLoop?(console.warn("Dexie: Need to reopen db"),Q.close({disableAutoOpen:!1}),Q.open().then(function(){return W(Q,F,ee,U)})):Nn(Z)}return Y._promise(F,function(Z,K){return xi(function(){return nt.trans=Y,U(Z,K,Y)})}).then(function(Z){if("readwrite"===F)try{Y.idbtrans.commit()}catch{}return"readonly"===F?Z:Y._completion.then(function(){return Z})})}if(Q._state.openComplete)return Nn(new ae.DatabaseClosed(Q._state.dbOpenError));if(!Q._state.isBeingOpened){if(!Q._state.autoOpen)return Nn(new ae.DatabaseClosed);Q.open().catch(ot)}return Q._state.dbReadyPromise.then(function(){return W(Q,F,ee,U)})}(this.db,f,[this.name],N);return M&&(H._consoleTask=M,H=H.catch(function(W){return console.trace(W),Nn(W)})),H}finally{O&&os()}},yn.prototype.get=function(f,p){var m=this;return f&&f.constructor===Object?this.where(f).first(p):null==f?Nn(new ae.Type("Invalid argument to Table.get()")):this._trans("readonly",function(w){return m.core.get({trans:w,key:f}).then(function(D){return m.hook.reading.fire(D)})}).then(p)},yn.prototype.where=function(f){if("string"==typeof f)return new this.db.WhereClause(this,f);if(q(f))return new this.db.WhereClause(this,"[".concat(f.join("+"),"]"));var p=$(f);if(1===p.length)return this.where(p[0]).equals(f[p[0]]);var m=this.schema.indexes.concat(this.schema.primKey).filter(function(O){if(O.compound&&p.every(function(W){return 0<=O.keyPath.indexOf(W)})){for(var H=0;H<p.length;++H)if(-1===p.indexOf(O.keyPath[H]))return!1;return!0}return!1}).sort(function(O,H){return O.keyPath.length-H.keyPath.length})[0];if(m&&"\uffff"!==this.db._maxKey){var M=m.keyPath.slice(0,p.length);return this.where(M).equals(M.map(function(H){return f[H]}))}!m&&_r&&console.warn("The query ".concat(JSON.stringify(f)," on ").concat(this.name," would benefit from a ")+"compound index [".concat(p.join("+"),"]"));var w=this.schema.idxByName;function D(O,H){return 0===jt(O,H)}M=(N=p.reduce(function(F,H){var W=F[0],Q=F[1],ee=(F=w[H],f[H]);return[W||F,W||!F?Si(Q,F&&F.multi?function(U){return U=he(U,H),q(U)&&U.some(function(Y){return D(ee,Y)})}:function(U){return D(ee,he(U,H))}):Q]},[null,null]))[0];var N=N[1];return M?this.where(M.name).equals(f[M.keyPath]).filter(N):m?this.filter(N):this.where(p).equals("")},yn.prototype.filter=function(f){return this.toCollection().and(f)},yn.prototype.count=function(f){return this.toCollection().count(f)},yn.prototype.offset=function(f){return this.toCollection().offset(f)},yn.prototype.limit=function(f){return this.toCollection().limit(f)},yn.prototype.each=function(f){return this.toCollection().each(f)},yn.prototype.toArray=function(f){return this.toCollection().toArray(f)},yn.prototype.toCollection=function(){return new this.db.Collection(new this.db.WhereClause(this))},yn.prototype.orderBy=function(f){return new this.db.Collection(new this.db.WhereClause(this,q(f)?"[".concat(f.join("+"),"]"):f))},yn.prototype.reverse=function(){return this.toCollection().reverse()},yn.prototype.mapToClass=function(f){var p,m=this.db,w=this.name;function D(){return null!==p&&p.apply(this,arguments)||this}(this.schema.mappedClass=f).prototype instanceof lr&&(function(H,W){if("function"!=typeof W&&null!==W)throw new TypeError("Class extends value "+String(W)+" is not a constructor or null");function Q(){this.constructor=H}Je(H,W),H.prototype=null===W?Object.create(W):(Q.prototype=W.prototype,new Q)}(D,p=f),Object.defineProperty(D.prototype,"db",{get:function(){return m},enumerable:!1,configurable:!0}),D.prototype.table=function(){return w},f=D);for(var M=new Set,N=f.prototype;N;N=L(N))Object.getOwnPropertyNames(N).forEach(function(H){return M.add(H)});function O(H){if(!H)return H;var W,Q=Object.create(f.prototype);for(W in H)if(!M.has(W))try{Q[W]=H[W]}catch{}return Q}return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=O,this.hook("reading",O),f},yn.prototype.defineClass=function(){return this.mapToClass(function(f){P(this,f)})},yn.prototype.add=function(f,p){var m=this,w=this.schema.primKey,M=w.keyPath,N=f;return M&&w.auto&&(N=Po(M)(f)),this._trans("readwrite",function(O){return m.core.mutate({trans:O,type:"add",keys:null!=p?[p]:null,values:[N]})}).then(function(O){return O.numFailures?We.reject(O.failures[0]):O.lastResult}).then(function(O){if(M)try{_e(f,M,O)}catch{}return O})},yn.prototype.update=function(f,p){return"object"!=typeof f||q(f)?this.where(":id").equals(f).modify(p):void 0===(f=he(f,this.schema.primKey.keyPath))?Nn(new ae.InvalidArgument("Given object does not contain its primary key")):this.where(":id").equals(f).modify(p)},yn.prototype.put=function(f,p){var m=this,w=this.schema.primKey,M=w.keyPath,N=f;return M&&w.auto&&(N=Po(M)(f)),this._trans("readwrite",function(O){return m.core.mutate({trans:O,type:"put",values:[N],keys:null!=p?[p]:null})}).then(function(O){return O.numFailures?We.reject(O.failures[0]):O.lastResult}).then(function(O){if(M)try{_e(f,M,O)}catch{}return O})},yn.prototype.delete=function(f){var p=this;return this._trans("readwrite",function(m){return p.core.mutate({trans:m,type:"delete",keys:[f]})}).then(function(m){return m.numFailures?We.reject(m.failures[0]):void 0})},yn.prototype.clear=function(){var f=this;return this._trans("readwrite",function(p){return f.core.mutate({trans:p,type:"deleteRange",range:ft})}).then(function(p){return p.numFailures?We.reject(p.failures[0]):void 0})},yn.prototype.bulkGet=function(f){var p=this;return this._trans("readonly",function(m){return p.core.getMany({keys:f,trans:m}).then(function(w){return w.map(function(D){return p.hook.reading.fire(D)})})})},yn.prototype.bulkAdd=function(f,p,m){var w=this,D=Array.isArray(p)?p:void 0,M=(m=m||(D?void 0:p))?m.allKeys:void 0;return this._trans("readwrite",function(N){var O=(W=w.schema.primKey).auto;if((W=W.keyPath)&&D)throw new ae.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(D&&D.length!==f.length)throw new ae.InvalidArgument("Arguments objects and keys must have the same length");var H=f.length,W=W&&O?f.map(Po(W)):f;return w.core.mutate({trans:N,type:"add",keys:D,values:W,wantResults:M}).then(function(Y){var F=Y.numFailures,ee=Y.results,U=Y.lastResult;if(Y=Y.failures,0===F)return M?ee:U;throw new Ei("".concat(w.name,".bulkAdd(): ").concat(F," of ").concat(H," operations failed"),Y)})})},yn.prototype.bulkPut=function(f,p,m){var w=this,D=Array.isArray(p)?p:void 0,M=(m=m||(D?void 0:p))?m.allKeys:void 0;return this._trans("readwrite",function(N){var O=(W=w.schema.primKey).auto;if((W=W.keyPath)&&D)throw new ae.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(D&&D.length!==f.length)throw new ae.InvalidArgument("Arguments objects and keys must have the same length");var H=f.length,W=W&&O?f.map(Po(W)):f;return w.core.mutate({trans:N,type:"put",keys:D,values:W,wantResults:M}).then(function(Y){var F=Y.numFailures,ee=Y.results,U=Y.lastResult;if(Y=Y.failures,0===F)return M?ee:U;throw new Ei("".concat(w.name,".bulkPut(): ").concat(F," of ").concat(H," operations failed"),Y)})})},yn.prototype.bulkUpdate=function(f){var p=this,m=this.core,w=f.map(function(N){return N.key}),D=f.map(function(N){return N.changes}),M=[];return this._trans("readwrite",function(N){return m.getMany({trans:N,keys:w,cache:"clone"}).then(function(O){var H=[],W=[];f.forEach(function(F,ee){var U=F.key,Y=F.changes,Z=O[ee];if(Z){for(var K=0,ie=Object.keys(Y);K<ie.length;K++){var ue=ie[K],ce=Y[ue];if(ue===p.schema.primKey.keyPath){if(0!==jt(ce,U))throw new ae.Constraint("Cannot update primary key in bulkUpdate()")}else _e(Z,ue,ce)}M.push(ee),H.push(U),W.push(Z)}});var Q=H.length;return m.mutate({trans:N,type:"put",keys:H,values:W,updates:{keys:w,changeSpecs:D}}).then(function(F){var ee=F.numFailures,U=F.failures;if(0===ee)return Q;for(var Y=0,Z=Object.keys(U);Y<Z.length;Y++){var K,ie=Z[Y],ue=M[Number(ie)];null!=ue&&(K=U[ie],delete U[ie],U[ue]=K)}throw new Ei("".concat(p.name,".bulkUpdate(): ").concat(ee," of ").concat(Q," operations failed"),U)})})})},yn.prototype.bulkDelete=function(f){var p=this,m=f.length;return this._trans("readwrite",function(w){return p.core.mutate({trans:w,type:"delete",keys:f})}).then(function(N){var D=N.numFailures,M=N.lastResult;if(N=N.failures,0===D)return M;throw new Ei("".concat(p.name,".bulkDelete(): ").concat(D," of ").concat(m," operations failed"),N)})},yn);function yn(){}function Za(f){function p(N,O){if(O){for(var H=arguments.length,W=new Array(H-1);--H;)W[H-1]=arguments[H];return m[N].subscribe.apply(null,W),f}if("string"==typeof N)return m[N]}var m={};p.addEventType=M;for(var w=1,D=arguments.length;w<D;++w)M(arguments[w]);return p;function M(N,O,H){if("object"!=typeof N){var W;O=O||ar;var Q={subscribers:[],fire:H=H||ot,subscribe:function(F){-1===Q.subscribers.indexOf(F)&&(Q.subscribers.push(F),Q.fire=O(Q.fire,F))},unsubscribe:function(F){Q.subscribers=Q.subscribers.filter(function(ee){return ee!==F}),Q.fire=Q.subscribers.reduce(O,H)}};return m[N]=p[N]=Q}$(W=N).forEach(function(F){var ee=W[F];if(q(ee))M(F,W[F][0],W[F][1]);else{if("asap"!==ee)throw new ae.InvalidArgument("Invalid event config");var U=M(F,en,function(){for(var Y=arguments.length,Z=new Array(Y);Y--;)Z[Y]=arguments[Y];U.subscribers.forEach(function(K){Pe(function(){K.apply(null,Z)})})})}})}}function Xa(f,p){return V(p).from({prototype:f}),p}function Vs(f,p){return!(f.filter||f.algorithm||f.or)&&(p?f.justLimit:!f.replayFilter)}function Gc(f,p){f.filter=Si(f.filter,p)}function Ld(f,p,m){var w=f.replayFilter;f.replayFilter=w?function(){return Si(w(),p())}:p,f.justLimit=m&&!w}function Ja(f,p){if(f.isPrimKey)return p.primaryKey;var m=p.getIndexByKeyPath(f.index);if(!m)throw new ae.Schema("KeyPath "+f.index+" on object store "+p.name+" is not indexed");return m}function Zm(f,p,m){var w=Ja(f,p.schema);return p.openCursor({trans:m,values:!f.keysOnly,reverse:"prev"===f.dir,unique:!!f.unique,query:{index:w,range:f.range}})}function Xn(f,p,m,w){var D=f.replayFilter?Si(f.filter,f.replayFilter()):f.filter;if(f.or){var M={},N=function(O,H,W){var Q,F;D&&!D(H,W,function(ee){return H.stop(ee)},function(ee){return H.fail(ee)})||("[object ArrayBuffer]"==(F=""+(Q=H.primaryKey))&&(F=""+new Uint8Array(Q)),k(M,F)||(M[F]=!0,p(O,H,W)))};return Promise.all([f.or._iterate(N,m),ct(Zm(f,w,m),f.algorithm,N,!f.keysOnly&&f.valueMapper)])}return ct(Zm(f,w,m),Si(f.algorithm,D),p,!f.keysOnly&&f.valueMapper)}function ct(f,p,m,w){var D=fn(w?function(M,N,O){return m(w(M),N,O)}:m);return f.then(function(M){if(M)return M.start(function(){var N=function(){return M.continue()};p&&!p(M,function(O){return N=O},function(O){M.stop(O),N=ot},function(O){M.fail(O),N=ot})||D(M.value,M,function(O){return N=O}),N()})})}to=Symbol();var eu=(Xm.prototype.execute=function(f){if(void 0!==this.add){var p=this.add;if(q(p))return le(le([],q(f)?f:[],!0),p,!0).sort();if("number"==typeof p)return(Number(f)||0)+p;if("bigint"==typeof p)try{return BigInt(f)+p}catch{return BigInt(0)+p}throw new TypeError("Invalid term ".concat(p))}if(void 0!==this.remove){var m=this.remove;if(q(m))return q(f)?f.filter(function(w){return!m.includes(w)}).sort():[];if("number"==typeof m)return Number(f)-m;if("bigint"==typeof m)try{return BigInt(f)-m}catch{return BigInt(0)-m}throw new TypeError("Invalid subtrahend ".concat(m))}return(p=null===(p=this.replacePrefix)||void 0===p?void 0:p[0])&&"string"==typeof f&&f.startsWith(p)?this.replacePrefix[1]+f.substring(p.length):f},Xm);function Xm(f){Object.assign(this,f)}var A_=(Wt.prototype._read=function(f,p){var m=this._ctx;return m.error?m.table._trans(null,Nn.bind(null,m.error)):m.table._trans("readonly",f).then(p)},Wt.prototype._write=function(f){var p=this._ctx;return p.error?p.table._trans(null,Nn.bind(null,p.error)):p.table._trans("readwrite",f,"locked")},Wt.prototype._addAlgorithm=function(f){var p=this._ctx;p.algorithm=Si(p.algorithm,f)},Wt.prototype._iterate=function(f,p){return Xn(this._ctx,f,p,this._ctx.table.core)},Wt.prototype.clone=function(f){var p=Object.create(this.constructor.prototype),m=Object.create(this._ctx);return f&&P(m,f),p._ctx=m,p},Wt.prototype.raw=function(){return this._ctx.valueMapper=null,this},Wt.prototype.each=function(f){var p=this._ctx;return this._read(function(m){return Xn(p,f,m,p.table.core)})},Wt.prototype.count=function(f){var p=this;return this._read(function(m){var w=p._ctx,D=w.table.core;if(Vs(w,!0))return D.count({trans:m,query:{index:Ja(w,D.schema),range:w.range}}).then(function(N){return Math.min(N,w.limit)});var M=0;return Xn(w,function(){return++M,!1},m,D).then(function(){return M})}).then(f)},Wt.prototype.sortBy=function(f,p){var m=f.split(".").reverse(),w=m[0],D=m.length-1;function M(H,W){return W?M(H[m[W]],W-1):H[w]}var N="next"===this._ctx.dir?1:-1;function O(H,W){return jt(M(H,D),M(W,D))*N}return this.toArray(function(H){return H.sort(O)}).then(p)},Wt.prototype.toArray=function(f){var p=this;return this._read(function(m){var w=p._ctx;if("next"===w.dir&&Vs(w,!0)&&0<w.limit){var D=w.valueMapper,M=Ja(w,w.table.core.schema);return w.table.core.query({trans:m,limit:w.limit,values:!0,query:{index:M,range:w.range}}).then(function(O){return O=O.result,D?O.map(D):O})}var N=[];return Xn(w,function(O){return N.push(O)},m,w.table.core).then(function(){return N})},f)},Wt.prototype.offset=function(f){var p=this._ctx;return f<=0||(p.offset+=f,Vs(p)?Ld(p,function(){var m=f;return function(w,D){return 0===m||(1===m?--m:D(function(){w.advance(m),m=0}),!1)}}):Ld(p,function(){var m=f;return function(){return--m<0}})),this},Wt.prototype.limit=function(f){return this._ctx.limit=Math.min(this._ctx.limit,f),Ld(this._ctx,function(){var p=f;return function(m,w,D){return--p<=0&&w(D),0<=p}},!0),this},Wt.prototype.until=function(f,p){return Gc(this._ctx,function(m,w,D){return!f(m.value)||(w(D),p)}),this},Wt.prototype.first=function(f){return this.limit(1).toArray(function(p){return p[0]}).then(f)},Wt.prototype.last=function(f){return this.reverse().first(f)},Wt.prototype.filter=function(f){var p;return Gc(this._ctx,function(m){return f(m.value)}),(p=this._ctx).isMatch=Si(p.isMatch,f),this},Wt.prototype.and=function(f){return this.filter(f)},Wt.prototype.or=function(f){return new this.db.WhereClause(this._ctx.table,f,this)},Wt.prototype.reverse=function(){return this._ctx.dir="prev"===this._ctx.dir?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this},Wt.prototype.desc=function(){return this.reverse()},Wt.prototype.eachKey=function(f){var p=this._ctx;return p.keysOnly=!p.isMatch,this.each(function(m,w){f(w.key,w)})},Wt.prototype.eachUniqueKey=function(f){return this._ctx.unique="unique",this.eachKey(f)},Wt.prototype.eachPrimaryKey=function(f){var p=this._ctx;return p.keysOnly=!p.isMatch,this.each(function(m,w){f(w.primaryKey,w)})},Wt.prototype.keys=function(f){var p=this._ctx;p.keysOnly=!p.isMatch;var m=[];return this.each(function(w,D){m.push(D.key)}).then(function(){return m}).then(f)},Wt.prototype.primaryKeys=function(f){var p=this._ctx;if("next"===p.dir&&Vs(p,!0)&&0<p.limit)return this._read(function(w){var D=Ja(p,p.table.core.schema);return p.table.core.query({trans:w,values:!1,limit:p.limit,query:{index:D,range:p.range}})}).then(function(w){return w.result}).then(f);p.keysOnly=!p.isMatch;var m=[];return this.each(function(w,D){m.push(D.primaryKey)}).then(function(){return m}).then(f)},Wt.prototype.uniqueKeys=function(f){return this._ctx.unique="unique",this.keys(f)},Wt.prototype.firstKey=function(f){return this.limit(1).keys(function(p){return p[0]}).then(f)},Wt.prototype.lastKey=function(f){return this.reverse().firstKey(f)},Wt.prototype.distinct=function(){var f;if(!(f=(f=this._ctx).index&&f.table.schema.idxByName[f.index])||!f.multi)return this;var p={};return Gc(this._ctx,function(D){var w=D.primaryKey.toString();return D=k(p,w),p[w]=!0,!D}),this},Wt.prototype.modify=function(f){var p=this,m=this._ctx;return this._write(function(w){var D,M,N;N="function"==typeof f?f:(D=$(f),M=D.length,function(K){for(var ie=!1,ue=0;ue<M;++ue){var ce=D[ue],be=f[ce],ke=he(K,ce);be instanceof eu?(_e(K,ce,be.execute(ke)),ie=!0):ke!==be&&(_e(K,ce,be),ie=!0)}return ie});var F,O=m.table.core,H=(F=O.schema.primaryKey).outbound,W=F.extractKey,Q=200;function ee(K,ce){var ue=ce.failures;Y+=K-(ce=ce.numFailures);for(var be=0,ke=$(ue);be<ke.length;be++)U.push(ue[ke[be]])}(F=p.db._options.modifyChunkSize)&&(Q="object"==typeof F?F[O.name]||F["*"]||200:F);var U=[],Y=0,Z=[];return p.clone().primaryKeys().then(function(K){var ue=Vs(m)&&m.limit===1/0&&("function"!=typeof f||f===At)&&{index:m.index,range:m.range};return function ie(ce){var be=Math.min(Q,K.length-ce);return O.getMany({trans:w,keys:K.slice(ce,ce+be),cache:"immutable"}).then(function(ke){for(var Ve=[],Re=[],Le=H?[]:null,Ge=[],je=0;je<be;++je){var Ke=ke[je],gt={value:pe(Ke),primKey:K[ce+je]};!1!==N.call(gt,gt.value,gt)&&(null==gt.value?Ge.push(K[ce+je]):H||0===jt(W(Ke),W(gt.value))?(Re.push(gt.value),H&&Le.push(K[ce+je])):(Ge.push(K[ce+je]),Ve.push(gt.value)))}return Promise.resolve(0<Ve.length&&O.mutate({trans:w,type:"add",values:Ve}).then(function(Tt){for(var dt in Tt.failures)Ge.splice(parseInt(dt),1);ee(Ve.length,Tt)})).then(function(){return(0<Re.length||ue&&"object"==typeof f)&&O.mutate({trans:w,type:"put",keys:Le,values:Re,criteria:ue,changeSpec:"function"!=typeof f&&f,isAdditionalChunk:0<ce}).then(function(Tt){return ee(Re.length,Tt)})}).then(function(){return(0<Ge.length||ue&&f===At)&&O.mutate({trans:w,type:"delete",keys:Ge,criteria:ue,isAdditionalChunk:0<ce}).then(function(Tt){return ee(Ge.length,Tt)})}).then(function(){return K.length>ce+be&&ie(ce+Q)})})}(0).then(function(){if(0<U.length)throw new si("Error modifying one or more objects",U,Y,Z);return K.length})})})},Wt.prototype.delete=function(){var f=this._ctx,p=f.range;return Vs(f)&&(f.isPrimKey||3===p.type)?this._write(function(m){var D=p;return f.table.core.count({trans:m,query:{index:f.table.core.schema.primaryKey,range:D}}).then(function(M){return f.table.core.mutate({trans:m,type:"deleteRange",range:D}).then(function(N){var O=N.failures;if(N=N.numFailures)throw new si("Could not delete some values",Object.keys(O).map(function(H){return O[H]}),M-N);return M-N})})}):this.modify(At)},Wt);function Wt(){}var At=function(f,p){return p.value=null};function k_(f,p){return f<p?-1:f===p?0:1}function Fo(f,p){return p<f?-1:f===p?0:1}function Jn(f,p,m){return(f=f instanceof zs?new f.Collection(f):f)._ctx.error=new(m||TypeError)(p),f}function Hs(f){return new f.Collection(f,function(){return $s("")}).limit(0)}function Us(f,p,m,w){var D,M,N,O,H,W,Q,F=m.length;if(!m.every(function(Y){return"string"==typeof Y}))return Jn(f,Rd);function ee(Y){D="next"===Y?function(K){return K.toUpperCase()}:function(K){return K.toLowerCase()},M="next"===Y?function(K){return K.toLowerCase()}:function(K){return K.toUpperCase()},N="next"===Y?k_:Fo;var Z=m.map(function(K){return{lower:M(K),upper:D(K)}}).sort(function(K,ie){return N(K.lower,ie.lower)});O=Z.map(function(K){return K.upper}),H=Z.map(function(K){return K.lower}),Q="next"===(W=Y)?"":w}ee("next"),(f=new f.Collection(f,function(){return no(O[0],H[F-1]+w)}))._ondirectionchange=function(Y){ee(Y)};var U=0;return f._addAlgorithm(function(Y,Z,K){var ie=Y.key;if("string"!=typeof ie)return!1;var ue=M(ie);if(p(ue,H,U))return!0;for(var ce=null,be=U;be<F;++be){var ke=function(Ve,Re,Le,Ge,je,Ke){for(var gt=Math.min(Ve.length,Ge.length),Tt=-1,dt=0;dt<gt;++dt){var sn=Re[dt];if(sn!==Ge[dt])return je(Ve[dt],Le[dt])<0?Ve.substr(0,dt)+Le[dt]+Le.substr(dt+1):je(Ve[dt],Ge[dt])<0?Ve.substr(0,dt)+Ge[dt]+Le.substr(dt+1):0<=Tt?Ve.substr(0,Tt)+Re[Tt]+Le.substr(Tt+1):null;je(Ve[dt],sn)<0&&(Tt=dt)}return gt<Ge.length&&"next"===Ke?Ve+Le.substr(Ve.length):gt<Ve.length&&"prev"===Ke?Ve.substr(0,Le.length):Tt<0?null:Ve.substr(0,Tt)+Ge[Tt]+Le.substr(Tt+1)}(ie,ue,O[be],H[be],N,W);null===ke&&null===ce?U=be+1:(null===ce||0<N(ce,ke))&&(ce=ke)}return Z(null!==ce?function(){Y.continue(ce+Q)}:K),!1}),f}function no(f,p,m,w){return{type:2,lower:f,upper:p,lowerOpen:m,upperOpen:w}}function $s(f){return{type:1,lower:f,upper:f}}var zs=(Object.defineProperty(An.prototype,"Collection",{get:function(){return this._ctx.table.db.Collection},enumerable:!1,configurable:!0}),An.prototype.between=function(f,p,m,w){m=!1!==m,w=!0===w;try{return 0<this._cmp(f,p)||0===this._cmp(f,p)&&(m||w)&&(!m||!w)?Hs(this):new this.Collection(this,function(){return no(f,p,!m,!w)})}catch{return Jn(this,Ot)}},An.prototype.equals=function(f){return null==f?Jn(this,Ot):new this.Collection(this,function(){return $s(f)})},An.prototype.above=function(f){return null==f?Jn(this,Ot):new this.Collection(this,function(){return no(f,void 0,!0)})},An.prototype.aboveOrEqual=function(f){return null==f?Jn(this,Ot):new this.Collection(this,function(){return no(f,void 0,!1)})},An.prototype.below=function(f){return null==f?Jn(this,Ot):new this.Collection(this,function(){return no(void 0,f,!1,!0)})},An.prototype.belowOrEqual=function(f){return null==f?Jn(this,Ot):new this.Collection(this,function(){return no(void 0,f)})},An.prototype.startsWith=function(f){return"string"!=typeof f?Jn(this,Rd):this.between(f,f+"\uffff",!0,!0)},An.prototype.startsWithIgnoreCase=function(f){return""===f?this.startsWith(f):Us(this,function(p,m){return 0===p.indexOf(m[0])},[f],"\uffff")},An.prototype.equalsIgnoreCase=function(f){return Us(this,function(p,m){return p===m[0]},[f],"")},An.prototype.anyOfIgnoreCase=function(){var f=Tn.apply(zt,arguments);return 0===f.length?Hs(this):Us(this,function(p,m){return-1!==m.indexOf(p)},f,"")},An.prototype.startsWithAnyOfIgnoreCase=function(){var f=Tn.apply(zt,arguments);return 0===f.length?Hs(this):Us(this,function(p,m){return m.some(function(w){return 0===p.indexOf(w)})},f,"\uffff")},An.prototype.anyOf=function(){var f=this,p=Tn.apply(zt,arguments),m=this._cmp;try{p.sort(m)}catch{return Jn(this,Ot)}if(0===p.length)return Hs(this);var w=new this.Collection(this,function(){return no(p[0],p[p.length-1])});w._ondirectionchange=function(M){p.sort(m="next"===M?f._ascending:f._descending)};var D=0;return w._addAlgorithm(function(M,N,O){for(var H=M.key;0<m(H,p[D]);)if(++D===p.length)return N(O),!1;return 0===m(H,p[D])||(N(function(){M.continue(p[D])}),!1)}),w},An.prototype.notEqual=function(f){return this.inAnyRange([[-1/0,f],[f,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})},An.prototype.noneOf=function(){var f=Tn.apply(zt,arguments);if(0===f.length)return new this.Collection(this);try{f.sort(this._ascending)}catch{return Jn(this,Ot)}var p=f.reduce(function(m,w){return m?m.concat([[m[m.length-1][1],w]]):[[-1/0,w]]},null);return p.push([f[f.length-1],this.db._maxKey]),this.inAnyRange(p,{includeLowers:!1,includeUppers:!1})},An.prototype.inAnyRange=function(ie,p){var m=this,w=this._cmp,D=this._ascending,M=this._descending,N=this._min,O=this._max;if(0===ie.length)return Hs(this);if(!ie.every(function(ue){return void 0!==ue[0]&&void 0!==ue[1]&&D(ue[0],ue[1])<=0}))return Jn(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",ae.InvalidArgument);var Q,H=!p||!1!==p.includeLowers,W=p&&!0===p.includeUppers,F=D;function ee(ue,ce){return F(ue[0],ce[0])}try{(Q=ie.reduce(function(ue,ce){for(var be=0,ke=ue.length;be<ke;++be){var Ve=ue[be];if(w(ce[0],Ve[1])<0&&0<w(ce[1],Ve[0])){Ve[0]=N(Ve[0],ce[0]),Ve[1]=O(Ve[1],ce[1]);break}}return be===ke&&ue.push(ce),ue},[])).sort(ee)}catch{return Jn(this,Ot)}var U=0,Y=W?function(ue){return 0<D(ue,Q[U][1])}:function(ue){return 0<=D(ue,Q[U][1])},Z=H?function(ue){return 0<M(ue,Q[U][0])}:function(ue){return 0<=M(ue,Q[U][0])},K=Y;return(ie=new this.Collection(this,function(){return no(Q[0][0],Q[Q.length-1][1],!H,!W)}))._ondirectionchange=function(ue){F="next"===ue?(K=Y,D):(K=Z,M),Q.sort(ee)},ie._addAlgorithm(function(ue,ce,be){for(var ke,Ve=ue.key;K(Ve);)if(++U===Q.length)return ce(be),!1;return!Y(ke=Ve)&&!Z(ke)||(0===m._cmp(Ve,Q[U][1])||0===m._cmp(Ve,Q[U][0])||ce(function(){ue.continue(F===D?Q[U][0]:Q[U][1])}),!1)}),ie},An.prototype.startsWithAnyOf=function(){var f=Tn.apply(zt,arguments);return f.every(function(p){return"string"==typeof p})?0===f.length?Hs(this):this.inAnyRange(f.map(function(p){return[p,p+"\uffff"]})):Jn(this,"startsWithAnyOf() only works with strings")},An);function An(){}function Kr(f){return fn(function(p){return Gs(p),f(p.target.error),!1})}function Gs(f){f.stopPropagation&&f.stopPropagation(),f.preventDefault&&f.preventDefault()}var ut="storagemutated",qs="x-storagemutated-1",ci=Za(null,ut),Bd=(Vr.prototype._lock=function(){return Ee(!nt.global),++this._reculock,1!==this._reculock||nt.global||(nt.lockOwnerFor=this),this},Vr.prototype._unlock=function(){if(Ee(!nt.global),0==--this._reculock)for(nt.global||(nt.lockOwnerFor=null);0<this._blockedFuncs.length&&!this._locked();){var f=this._blockedFuncs.shift();try{jr(f[1],f[0])}catch{}}return this},Vr.prototype._locked=function(){return this._reculock&&nt.lockOwnerFor!==this},Vr.prototype.create=function(f){var p=this;if(!this.mode)return this;var m=this.db.idbdb,w=this.db._state.dbOpenError;if(Ee(!this.idbtrans),!f&&!m)switch(w&&w.name){case"DatabaseClosedError":throw new ae.DatabaseClosed(w);case"MissingAPIError":throw new ae.MissingAPI(w.message,w);default:throw new ae.OpenFailed(w)}if(!this.active)throw new ae.TransactionInactive;return Ee(null===this._completion._state),(f=this.idbtrans=f||(this.db.core||m).transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability})).onerror=fn(function(D){Gs(D),p._reject(f.error)}),f.onabort=fn(function(D){Gs(D),p.active&&p._reject(new ae.Abort(f.error)),p.active=!1,p.on("abort").fire(D)}),f.oncomplete=fn(function(){p.active=!1,p._resolve(),"mutatedParts"in f&&ci.storagemutated.fire(f.mutatedParts)}),this},Vr.prototype._promise=function(f,p,m){var w=this;if("readwrite"===f&&"readwrite"!==this.mode)return Nn(new ae.ReadOnly("Transaction is readonly"));if(!this.active)return Nn(new ae.TransactionInactive);if(this._locked())return new We(function(M,N){w._blockedFuncs.push([function(){w._promise(f,p,m).then(M,N)},nt])});if(m)return xi(function(){var M=new We(function(N,O){w._lock();var H=p(N,O,w);H&&H.then&&H.then(N,O)});return M.finally(function(){return w._unlock()}),M._lib=!0,M});var D=new We(function(M,N){var O=p(M,N,w);O&&O.then&&O.then(M,N)});return D._lib=!0,D},Vr.prototype._root=function(){return this.parent?this.parent._root():this},Vr.prototype.waitFor=function(f){var p,m=this._root(),w=We.resolve(f);m._waitingFor?m._waitingFor=m._waitingFor.then(function(){return w}):(m._waitingFor=w,m._waitingQueue=[],p=m.idbtrans.objectStore(m.storeNames[0]),function M(){for(++m._spinCount;m._waitingQueue.length;)m._waitingQueue.shift()();m._waitingFor&&(p.get(-1/0).onsuccess=M)}());var D=m._waitingFor;return new We(function(M,N){w.then(function(O){return m._waitingQueue.push(fn(M.bind(null,O)))},function(O){return m._waitingQueue.push(fn(N.bind(null,O)))}).finally(function(){m._waitingFor===D&&(m._waitingFor=null)})})},Vr.prototype.abort=function(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new ae.Abort))},Vr.prototype.table=function(f){var p=this._memoizedTables||(this._memoizedTables={});if(k(p,f))return p[f];var m=this.schema[f];if(!m)throw new ae.NotFound("Table "+f+" not part of transaction");return(m=new this.db.Table(f,m,this)).core=this.db.core.table(f),p[f]=m},Vr);function Vr(){}function qc(f,p,m,w,D,M,N){return{name:f,keyPath:p,unique:m,multi:w,auto:D,compound:M,src:(m&&!N?"&":"")+(w?"*":"")+(D?"++":"")+tu(p)}}function tu(f){return"string"==typeof f?f:f?"["+[].join.call(f,"+")+"]":""}function jd(f,p,m){return{name:f,primKey:p,indexes:m,mappedClass:null,idxByName:(w=function(D){return[D.name,D]},m.reduce(function(D,M,N){return(N=w(M))&&(D[N[0]]=N[1]),D},{}))};var w}var nu=function(f){try{return f.only([[]]),nu=function(){return[[]]},[[]]}catch{return nu=function(){return"\uffff"},"\uffff"}};function Vd(f){return null==f?function(){}:"string"==typeof f?1===(p=f).split(".").length?function(m){return m[p]}:function(m){return he(m,p)}:function(m){return he(m,f)};var p}function Jm(f){return[].slice.call(f)}var Wc=0;function Ni(f){return null==f?":id":"string"==typeof f?f:"[".concat(f.join("+"),"]")}function Yc(f,p,H){function w(K){if(3===K.type)return null;if(4===K.type)throw new Error("Cannot convert never type to IDBKeyRange");var U=K.lower,Y=K.upper,Z=K.lowerOpen;return K=K.upperOpen,void 0===U?void 0===Y?null:p.upperBound(Y,!!K):void 0===Y?p.lowerBound(U,!!Z):p.bound(U,Y,!!Z,!!K)}var M,N,O,W=(N=H,O=Jm((M=f).objectStoreNames),Q={schema:{name:M.name,tables:O.map(function(ee){return N.objectStore(ee)}).map(function(ee){var U=ee.keyPath,K=ee.autoIncrement,Y=q(U),Z={};return K={name:ee.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:null==U,compound:Y,keyPath:U,autoIncrement:K,unique:!0,extractKey:Vd(U)},indexes:Jm(ee.indexNames).map(function(ie){return ee.index(ie)}).map(function(be){var ce=be.unique,ke=be.multiEntry;return ke={name:be.name,compound:q(be=be.keyPath),keyPath:be,unique:ce,multiEntry:ke,extractKey:Vd(be)},Z[Ni(be)]=ke}),getIndexByKeyPath:function(ie){return Z[Ni(ie)]}},Z[":id"]=K.primaryKey,null!=U&&(Z[Ni(U)]=K.primaryKey),K})},hasGetAll:0<O.length&&"getAll"in N.objectStore(O[0])&&!(typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}).hasGetAll,Q=(H=Q.schema).tables.map(function D(ee){var U,Y=ee.name;return{name:Y,schema:ee,mutate:function(Z){var K=Z.trans,ie=Z.type,ue=Z.keys,ce=Z.values,be=Z.range;return new Promise(function(ke,Ve){ke=fn(ke);var Re=K.objectStore(Y),Le=null==Re.keyPath,Ge="put"===ie||"add"===ie;if(!Ge&&"delete"!==ie&&"deleteRange"!==ie)throw new Error("Invalid operation type: "+ie);var je,Ke=(ue||ce||{length:1}).length;if(ue&&ce&&ue.length!==ce.length)throw new Error("Given keys array must have same length as given values array.");if(0===Ke)return ke({numFailures:0,failures:{},results:[],lastResult:void 0});function gt(Kt){++sn,Gs(Kt)}var Tt=[],dt=[],sn=0;if("deleteRange"===ie){if(4===be.type)return ke({numFailures:sn,failures:dt,results:[],lastResult:void 0});Tt.push(je=3===be.type?Re.clear():Re.delete(w(be)))}else{var He=(Le=Ge?Le?[ce,ue]:[ce,null]:[ue,null])[0],Vt=Le[1];if(Ge)for(var qt=0;qt<Ke;++qt)Tt.push(je=Vt&&void 0!==Vt[qt]?Re[ie](He[qt],Vt[qt]):Re[ie](He[qt])),je.onerror=gt;else for(qt=0;qt<Ke;++qt)Tt.push(je=Re[ie](He[qt])),je.onerror=gt}function fi(Kt){Kt=Kt.target.result,Tt.forEach(function(uo,cu){return null!=uo.error&&(dt[cu]=uo.error)}),ke({numFailures:sn,failures:dt,results:"delete"===ie?ue:Tt.map(function(uo){return uo.result}),lastResult:Kt})}je.onerror=function(Kt){gt(Kt),fi(Kt)},je.onsuccess=fi})},getMany:function(Z){var K=Z.trans,ie=Z.keys;return new Promise(function(ue,ce){ue=fn(ue);for(var be,ke=K.objectStore(Y),Ve=ie.length,Re=new Array(Ve),Le=0,Ge=0,je=function(Tt){Re[(Tt=Tt.target)._pos]=Tt.result,++Ge===Le&&ue(Re)},Ke=Kr(ce),gt=0;gt<Ve;++gt)null!=ie[gt]&&((be=ke.get(ie[gt]))._pos=gt,be.onsuccess=je,be.onerror=Ke,++Le);0===Le&&ue(Re)})},get:function(Z){var K=Z.trans,ie=Z.key;return new Promise(function(ue,ce){ue=fn(ue);var be=K.objectStore(Y).get(ie);be.onsuccess=function(ke){return ue(ke.target.result)},be.onerror=Kr(ce)})},query:(U=W,function(Z){return new Promise(function(K,ie){K=fn(K);var ue,ce,be,ke=Z.values,Ve=Z.limit,Re=Ve===1/0?void 0:Ve,Ge=(je=Z.query).index,je=je.range,Le=(Le=Z.trans).objectStore(Y);if(Ge=Ge.isPrimaryKey?Le:Le.index(Ge.name),je=w(je),0===Ve)return K({result:[]});U?((Re=ke?Ge.getAll(je,Re):Ge.getAllKeys(je,Re)).onsuccess=function(Ke){return K({result:Ke.target.result})},Re.onerror=Kr(ie)):(ue=0,ce=!ke&&"openKeyCursor"in Ge?Ge.openKeyCursor(je):Ge.openCursor(je),be=[],ce.onsuccess=function(Ke){var gt=ce.result;return gt?(be.push(ke?gt.value:gt.primaryKey),++ue===Ve?K({result:be}):void gt.continue()):K({result:be})},ce.onerror=Kr(ie))})}),openCursor:function(Z){var K=Z.trans,ie=Z.values,ue=Z.query,ce=Z.reverse,be=Z.unique;return new Promise(function(ke,Ve){ke=fn(ke);var Ge=ue.index,Re=ue.range,Le=K.objectStore(Y),je=(Le=Ge.isPrimaryKey?Le:Le.index(Ge.name),Ge=ce?be?"prevunique":"prev":be?"nextunique":"next",!ie&&"openKeyCursor"in Le?Le.openKeyCursor(w(Re),Ge):Le.openCursor(w(Re),Ge));je.onerror=Kr(Ve),je.onsuccess=fn(function(Ke){var gt,Tt,dt,sn,He=je.result;He?(He.___id=++Wc,He.done=!1,gt=He.continue.bind(He),Tt=(Tt=He.continuePrimaryKey)&&Tt.bind(He),dt=He.advance.bind(He),sn=function(){throw new Error("Cursor not stopped")},He.trans=K,He.stop=He.continue=He.continuePrimaryKey=He.advance=function(){throw new Error("Cursor not started")},He.fail=fn(Ve),He.next=function(){var Vt=this,qt=1;return this.start(function(){return qt--?Vt.continue():Vt.stop()}).then(function(){return Vt})},He.start=function(Vt){function qt(){if(je.result)try{Vt()}catch(Kt){He.fail(Kt)}else He.done=!0,He.start=function(){throw new Error("Cursor behind last entry")},He.stop()}var fi=new Promise(function(Kt,uo){Kt=fn(Kt),je.onerror=Kr(uo),He.fail=uo,He.stop=function(cu){He.stop=He.continue=He.continuePrimaryKey=He.advance=sn,Kt(cu)}});return je.onsuccess=fn(function(Kt){je.onsuccess=qt,qt()}),He.continue=gt,He.continuePrimaryKey=Tt,He.advance=dt,qt(),fi},ke(He)):ke(null)},Ve)})},count:function(Z){var K=Z.query,ie=Z.trans,ue=K.index,ce=K.range;return new Promise(function(be,ke){var Ve=ie.objectStore(Y),Re=ue.isPrimaryKey?Ve:Ve.index(ue.name);(Re=(Ve=w(ce))?Re.count(Ve):Re.count()).onsuccess=fn(function(Le){return be(Le.target.result)}),Re.onerror=Kr(ke)})}}}),F={};return Q.forEach(function(ee){return F[ee.name]=ee}),{stack:"dbcore",transaction:f.transaction.bind(f),table:function(ee){if(!F[ee])throw new Error("Table '".concat(ee,"' not found"));return F[ee]},MIN_KEY:-1/0,MAX_KEY:nu(p),schema:H}}function Ws(f,w){w=function Kc(f,p,m,w){return{dbcore:(w=Yc(p,m.IDBKeyRange,w),f.dbcore.reduce(function(M,N){return N=N.create,B(B({},M),N(M))},w))}}(f._middlewares,w.db,f._deps,w),f.core=w.dbcore,f.tables.forEach(function(D){var M=D.name;f.core.schema.tables.some(function(N){return N.name===M})&&(D.core=f.core.table(M),f[M]instanceof f.Table&&(f[M].core=D.core))})}function Hr(f,p,m,w){m.forEach(function(D){var M=w[D];p.forEach(function(N){var O=function H(W,Q){return ge(W,Q)||(W=L(W))&&H(W,Q)}(N,D);(!O||"value"in O&&void 0===O.value)&&(N===f.Transaction.prototype||N instanceof f.Transaction?j(N,D,{get:function(){return this.table(D)},set:function(H){A(this,D,{value:H,writable:!0,configurable:!0,enumerable:!0})}}):N[D]=new f.Table(D,M))})})}function Lo(f,p){p.forEach(function(m){for(var w in m)m[w]instanceof f.Table&&delete m[w]})}function Hd(f,p){return f._cfg.version-p._cfg.version}function Ud(f,p){var m,w={del:[],add:[],change:[]};for(m in f)p[m]||w.del.push(m);for(m in p){var D=f[m],M=p[m];if(D){var N={name:m,def:M,recreate:!1,del:[],add:[],change:[]};if(""+(D.primKey.keyPath||"")!=""+(M.primKey.keyPath||"")||D.primKey.auto!==M.primKey.auto)N.recreate=!0,w.change.push(N);else{var O=D.idxByName,H=M.idxByName,W=void 0;for(W in O)H[W]||N.del.push(W);for(W in H){var Q=O[W],F=H[W];Q?Q.src!==F.src&&N.change.push(F):N.add.push(F)}(0<N.del.length||0<N.add.length||0<N.change.length)&&w.change.push(N)}}else w.add.push([m,M])}return w}function Qc(f,p,m,w){var D=f.db.createObjectStore(p,m.keyPath?{keyPath:m.keyPath,autoIncrement:m.auto}:{autoIncrement:m.auto});return w.forEach(function(M){return Zc(D,M)}),D}function $d(f,p){$(f).forEach(function(m){p.db.objectStoreNames.contains(m)||(_r&&console.debug("Dexie: Creating missing table",m),Qc(p,m,f[m].primKey,f[m].indexes))})}function Zc(f,p){f.createIndex(p.name,p.keyPath,{unique:p.unique,multiEntry:p.multi})}function ru(f,p,m){var w={};return Ie(p.objectStoreNames,0).forEach(function(D){for(var M=m.objectStore(D),N=qc(tu(W=M.keyPath),W||"",!0,!1,!!M.autoIncrement,W&&"string"!=typeof W,!0),O=[],H=0;H<M.indexNames.length;++H){var W=(Q=M.index(M.indexNames[H])).keyPath,Q=qc(Q.name,W,!!Q.unique,!!Q.multiEntry,!1,W&&"string"!=typeof W,!1);O.push(Q)}w[D]=jd(D,N,O)}),w}function ls(f,p,m){for(var w=m.db.objectStoreNames,D=0;D<w.length;++D){var M=w[D],N=m.objectStore(M);f._hasGetAll="getAll"in N;for(var O=0;O<N.indexNames.length;++O){var H=N.indexNames[O],W=N.index(H).keyPath,Q="string"==typeof W?W:"["+Ie(W).join("+")+"]";!p[M]||(W=p[M].idxByName[Q])&&(W.name=H,delete p[M].idxByName[Q],p[M].idxByName[H]=W)}}typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&J.WorkerGlobalScope&&J instanceof J.WorkerGlobalScope&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(f._hasGetAll=!1)}function Ft(f){return f.split(",").map(function(p,m){var w=(p=p.trim()).replace(/([&*]|\+\+)/g,""),D=/^\[/.test(w)?w.match(/^\[(.*)\]$/)[1].split("+"):w;return qc(w,D||null,/\&/.test(p),/\*/.test(p),/\+\+/.test(p),q(D),0===m)})}var Xc=(Ys.prototype._parseStoresSpec=function(f,p){$(f).forEach(function(m){if(null!==f[m]){var w=Ft(f[m]),D=w.shift();if(D.unique=!0,D.multi)throw new ae.Schema("Primary key cannot be multi-valued");w.forEach(function(M){if(M.auto)throw new ae.Schema("Only primary key can be marked as autoIncrement (++)");if(!M.keyPath)throw new ae.Schema("Index must have a name and cannot be an empty string")}),p[m]=jd(m,D,w)}})},Ys.prototype.stores=function(m){var p=this.db;this._cfg.storesSource=this._cfg.storesSource?P(this._cfg.storesSource,m):m;var w={},D={};return(m=p._versions).forEach(function(M){P(w,M._cfg.storesSource),D=M._cfg.dbschema={},M._parseStoresSpec(w,D)}),p._dbSchema=D,Lo(p,[p._allTables,p,p.Transaction.prototype]),Hr(p,[p._allTables,p,p.Transaction.prototype,this._cfg.tables],$(D),D),p._storeNames=$(D),this},Ys.prototype.upgrade=function(f){return this._cfg.contentUpgrade=ui(this._cfg.contentUpgrade||ot,f),this},Ys);function Ys(){}function er(f,p){var m=f._dbNamesDB;return m||(m=f._dbNamesDB=new so(cs,{addons:[],indexedDB:f,IDBKeyRange:p})).version(1).stores({dbnames:"name"}),m.table("dbnames")}function iu(f){return f&&"function"==typeof f.databases}function zd(f){return xi(function(){return nt.letThrough=!0,f()})}function Gd(f){return!("from"in f)}var kn=function(f,p){if(!this){var m=new kn;return f&&"d"in f&&P(m,f),m}P(this,arguments.length?{d:1,from:f,to:1<arguments.length?p:f}:{d:0})};function Bo(f,p,m){var w=jt(p,m);if(!isNaN(w)){if(0<w)throw RangeError();if(Gd(f))return P(f,{from:p,to:m,d:1});var D=f.l;if(w=f.r,jt(m,f.from)<0)return D?Bo(D,p,m):f.l={from:p,to:m,d:1,l:null,r:null},Wd(f);if(0<jt(p,f.to))return w?Bo(w,p,m):f.r={from:p,to:m,d:1,l:null,r:null},Wd(f);jt(p,f.from)<0&&(f.from=p,f.l=null,f.d=w?w.d+1:1),0<jt(m,f.to)&&(f.to=m,f.r=null,f.d=f.l?f.l.d+1:1),m=!f.r,D&&!f.l&&ro(f,D),w&&m&&ro(f,w)}}function ro(f,p){Gd(p)||function m(w,H){var M=H.from,N=H.to,O=H.l;H=H.r,Bo(w,M,N),O&&m(w,O),H&&m(w,H)}(f,p)}function qd(f,p){var m=ou(p),w=m.next();if(w.done)return!1;for(var D=w.value,M=ou(f),N=M.next(D.from),O=N.value;!w.done&&!N.done;){if(jt(O.from,D.to)<=0&&0<=jt(O.to,D.from))return!0;jt(D.from,O.from)<0?D=(w=m.next(O.from)).value:O=(N=M.next(D.from)).value}return!1}function ou(f){var p=Gd(f)?null:{s:0,n:f};return{next:function(m){for(var w=0<arguments.length;p;)switch(p.s){case 0:if(p.s=1,w)for(;p.n.l&&jt(m,p.n.from)<0;)p={up:p,n:p.n.l,s:1};else for(;p.n.l;)p={up:p,n:p.n.l,s:1};case 1:if(p.s=2,!w||jt(m,p.n.to)<=0)return{value:p.n,done:!1};case 2:if(p.n.r){p.s=3,p={up:p,n:p.n.r,s:0};continue}case 3:p=p.up}return{done:!0}}}}function Wd(f){var p,m,w=((null===(p=f.r)||void 0===p?void 0:p.d)||0)-((null===(m=f.l)||void 0===m?void 0:m.d)||0),D=1<w?"r":w<-1?"l":"";D&&(p="r"==D?"l":"r",m=B({},f),f.from=(w=f[D]).from,f.to=w.to,f[D]=w[D],m[D]=w[p],(f[p]=m).d=Jc(m)),f.d=Jc(f)}function Jc(m){var p=m.r;return m=m.l,(p?m?Math.max(p.d,m.d):p.d:m?m.d:0)+1}function Ai(f,p){return $(p).forEach(function(m){f[m]?ro(f[m],p[m]):f[m]=function w(D){var M,N,O={};for(M in D)k(D,M)&&(O[M]=!(N=D[M])||"object"!=typeof N||it.has(N.constructor)?N:w(N));return O}(p[m])}),f}function el(f,p){return f.all||p.all||Object.keys(f).some(function(m){return p[m]&&qd(p[m],f[m])})}x(kn.prototype,((Gn={add:function(f){return ro(this,f),this},addKey:function(f){return Bo(this,f,f),this},addKeys:function(f){var p=this;return f.forEach(function(m){return Bo(p,m,m)}),this},hasKey:function(f){var p=ou(this).next(f).value;return p&&jt(p.from,f)<=0&&0<=jt(p.to,f)}})[Oe]=function(){return ou(this)},Gn));var fr={},tl={},Rt=!1;function Ks(f){Ai(tl,f),Rt||(Rt=!0,setTimeout(function(){Rt=!1,_t(tl,!(tl={}))},0))}function _t(f,p){void 0===p&&(p=!1);var m=new Set;if(f.all)for(var w=0,D=Object.values(fr);w<D.length;w++)Qs(N=D[w],f,m,p);else for(var M in f){var N,O=/^idb\:\/\/(.*)\/(.*)\//.exec(M);O&&(M=O[1],O=O[2],(N=fr["idb://".concat(M,"/").concat(O)])&&Qs(N,f,m,p))}m.forEach(function(H){return H()})}function Qs(f,p,m,w){for(var D=[],M=0,N=Object.entries(f.queries.query);M<N.length;M++){for(var O=N[M],H=O[0],W=[],Q=0,F=O[1];Q<F.length;Q++){var ee=F[Q];el(p,ee.obsSet)?ee.subscribers.forEach(function(K){return m.add(K)}):w&&W.push(ee)}w&&D.push([H,W])}if(w)for(var U=0,Y=D;U<Y.length;U++){var Z=Y[U];f.queries.query[H=Z[0]]=W=Z[1]}}function nl(f){var p=f._state,m=f._deps.indexedDB;if(p.isBeingOpened||f.idbdb)return p.dbReadyPromise.then(function(){return p.dbOpenError?Nn(p.dbOpenError):f});p.isBeingOpened=!0,p.dbOpenError=null,p.openComplete=!1;var w=p.openCanceller,D=Math.round(10*f.verno),M=!1;function N(){if(p.openCanceller!==w)throw new ae.DatabaseClosed("db.open() was cancelled")}var H,W=p.dbReadyResolve,Q=null,F=!1;return We.race([w,(typeof navigator>"u"?We.resolve():!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise(function(ee){function U(){return indexedDB.databases().finally(ee)}H=setInterval(U,100),U()}).finally(function(){return clearInterval(H)}):Promise.resolve()).then(function O(){return new We(function(ee,U){if(N(),!m)throw new ae.MissingAPI;var Y=f.name,Z=p.autoSchema||!D?m.open(Y):m.open(Y,D);if(!Z)throw new ae.MissingAPI;Z.onerror=Kr(U),Z.onblocked=fn(f._fireOnBlocked),Z.onupgradeneeded=fn(function(K){var ie;Q=Z.transaction,p.autoSchema&&!f._options.allowEmptyDB?(Z.onerror=Gs,Q.abort(),Z.result.close(),(ie=m.deleteDatabase(Y)).onsuccess=ie.onerror=fn(function(){U(new ae.NoSuchDatabase("Database ".concat(Y," doesnt exist")))})):(Q.onerror=Kr(U),K=K.oldVersion>Math.pow(2,62)?0:K.oldVersion,F=K<1,f.idbdb=Z.result,M&&function Yt(f,p){$d(f._dbSchema,p),p.db.version%10!=0||p.objectStoreNames.contains("$meta")||p.db.createObjectStore("$meta").add(Math.ceil(p.db.version/10-1),"version");var m=ru(0,f.idbdb,p);ls(f,f._dbSchema,p);for(var w=0,D=Ud(m,f._dbSchema).change;w<D.length;w++){var M=function(N){if(N.change.length||N.recreate)return console.warn("Unable to patch indexes of table ".concat(N.name," because it has changes on the type of index or primary key.")),{value:void 0};var O=p.objectStore(N.name);N.add.forEach(function(H){_r&&console.debug("Dexie upgrade patch: Creating missing index ".concat(N.name,".").concat(H.src)),Zc(O,H)})}(D[w]);if("object"==typeof M)return M.value}}(f,Q),function wt(f,p,m,w){var D=f._dbSchema;m.objectStoreNames.contains("$meta")&&!D.$meta&&(D.$meta=jd("$meta",Ft("")[0],[]),f._storeNames.push("$meta"));var M=f._createTransaction("readwrite",f._storeNames,D);M.create(m),M._completion.catch(w);var N=M._reject.bind(M),O=nt.transless||nt;xi(function(){return nt.trans=M,nt.transless=O,0!==p?(Ws(f,m),W=p,((H=M).storeNames.includes("$meta")?H.table("$meta").get("version").then(function(Q){return Q??W}):We.resolve(W)).then(function(Q){return ee=Q,U=M,Z=[],Q=(F=f)._versions,K=F._dbSchema=ru(0,F.idbdb,Y=m),0!==(Q=Q.filter(function(ie){return ie._cfg.version>=ee})).length?(Q.forEach(function(ie){Z.push(function(){var ue=K,ce=ie._cfg.dbschema;ls(F,ue,Y),ls(F,ce,Y),K=F._dbSchema=ce;var be=Ud(ue,ce);be.add.forEach(function(Ge){Qc(Y,Ge[0],Ge[1].primKey,Ge[1].indexes)}),be.change.forEach(function(Ge){if(Ge.recreate)throw new ae.Upgrade("Not yet support for changing primary key");var je=Y.objectStore(Ge.name);Ge.add.forEach(function(Ke){return Zc(je,Ke)}),Ge.change.forEach(function(Ke){je.deleteIndex(Ke.name),Zc(je,Ke)}),Ge.del.forEach(function(Ke){return je.deleteIndex(Ke)})});var ke=ie._cfg.contentUpgrade;if(ke&&ie._cfg.version>ee){Ws(F,Y),U._memoizedTables={};var Ve=Ne(ce);be.del.forEach(function(Ge){Ve[Ge]=ue[Ge]}),Lo(F,[F.Transaction.prototype]),Hr(F,[F.Transaction.prototype],$(Ve),Ve),U.schema=Ve;var Re,Le=Wr(ke);return Le&&cr(),be=We.follow(function(){var Ge;(Re=ke(U))&&Le&&(Ge=Dr.bind(null,null),Re.then(Ge,Ge))}),Re&&"function"==typeof Re.then?We.resolve(Re):be.then(function(){return Re})}}),Z.push(function(ue){var ce,be;ce=ie._cfg.dbschema,[].slice.call((be=ue).db.objectStoreNames).forEach(function(Ve){return null==ce[Ve]&&be.db.deleteObjectStore(Ve)}),Lo(F,[F.Transaction.prototype]),Hr(F,[F.Transaction.prototype],F._storeNames,F._dbSchema),U.schema=F._dbSchema}),Z.push(function(ue){F.idbdb.objectStoreNames.contains("$meta")&&(Math.ceil(F.idbdb.version/10)===ie._cfg.version?(F.idbdb.deleteObjectStore("$meta"),delete F._dbSchema.$meta,F._storeNames=F._storeNames.filter(function(ce){return"$meta"!==ce})):ue.objectStore("$meta").put(ie._cfg.version,"version"))})}),function ie(){return Z.length?We.resolve(Z.shift()(U.idbtrans)).then(ie):We.resolve()}().then(function(){$d(K,Y)})):We.resolve();var F,ee,U,Y,Z,K}).catch(N)):($(D).forEach(function(Q){Qc(m,Q,D[Q].primKey,D[Q].indexes)}),Ws(f,m),void We.follow(function(){return f.on.populate.fire(M)}).catch(N));var H,W})}(f,K/10,Q,U))},U),Z.onsuccess=fn(function(){Q=null;var K,ie,ue,ce,be,ke=f.idbdb=Z.result,Ve=Ie(ke.objectStoreNames);if(0<Ve.length)try{var Re=ke.transaction(1===(ce=Ve).length?ce[0]:ce,"readonly");if(p.autoSchema)ue=Re,(K=f).verno=(ie=ke).version/10,ue=K._dbSchema=ru(0,ie,ue),K._storeNames=Ie(ie.objectStoreNames,0),Hr(K,[K._allTables],$(ue),ue);else if(ls(f,f._dbSchema,Re),((be=Ud(ru(0,(be=f).idbdb,Re),be._dbSchema)).add.length||be.change.some(function(Le){return Le.add.length||Le.change.length}))&&!M)return console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Dexie will add missing parts and increment native version number to workaround this."),ke.close(),D=ke.version+1,M=!0,ee(O());Ws(f,Re)}catch{}mn.push(f),ke.onversionchange=fn(function(Le){p.vcFired=!0,f.on("versionchange").fire(Le)}),ke.onclose=fn(function(Le){f.on("close").fire(Le)}),F&&(Re=Y,ke=(be=f._deps).indexedDB,be=be.IDBKeyRange,iu(ke)||Re===cs||er(ke,be).put({name:Re}).catch(ot)),ee()},U)}).catch(function(ee){switch(ee?.name){case"UnknownError":if(0<p.PR1398_maxLoop)return p.PR1398_maxLoop--,console.warn("Dexie: Workaround for Chrome UnknownError on open()"),O();break;case"VersionError":if(0<D)return D=0,O()}return We.reject(ee)})})]).then(function(){return N(),p.onReadyBeingFired=[],We.resolve(zd(function(){return f.on.ready.fire(f.vip)})).then(function ee(){if(0<p.onReadyBeingFired.length){var U=p.onReadyBeingFired.reduce(ui,ot);return p.onReadyBeingFired=[],We.resolve(zd(function(){return U(f.vip)})).then(ee)}})}).finally(function(){p.openCanceller===w&&(p.onReadyBeingFired=null,p.isBeingOpened=!1)}).catch(function(ee){p.dbOpenError=ee;try{Q&&Q.abort()}catch{}return w===p.openCanceller&&f._close(),Nn(ee)}).finally(function(){p.openComplete=!0,W()}).then(function(){var ee;return F&&(ee={},f.tables.forEach(function(U){U.schema.indexes.forEach(function(Y){Y.name&&(ee["idb://".concat(f.name,"/").concat(U.name,"/").concat(Y.name)]=new kn(-1/0,[[[]]]))}),ee["idb://".concat(f.name,"/").concat(U.name,"/")]=ee["idb://".concat(f.name,"/").concat(U.name,"/:dels")]=new kn(-1/0,[[[]]])}),ci(ut).fire(ee),_t(ee,!0)),f})}function jo(f){function p(M){return f.next(M)}var m=D(p),w=D(function(M){return f.throw(M)});function D(M){return function(H){var O=M(H);return H=O.value,O.done?H:H&&"function"==typeof H.then?H.then(m,w):q(H)?Promise.all(H).then(m,w):m(H)}}return D(p)()}function su(f,p,m){for(var w=q(f)?f.slice():[f],D=0;D<m;++D)w.push(p);return w}var e0={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(f){return B(B({},f),{table:function(p){var m=f.table(p),w=m.schema,D={},M=[];function N(F,ee,U){var Y=Ni(F),Z=D[Y]=D[Y]||[],K=null==F?0:"string"==typeof F?1:F.length,ie=0<ee;return ie=B(B({},U),{name:ie?"".concat(Y,"(virtual-from:").concat(U.name,")"):U.name,lowLevelIndex:U,isVirtual:ie,keyTail:ee,keyLength:K,extractKey:Vd(F),unique:!ie&&U.unique}),Z.push(ie),ie.isPrimaryKey||M.push(ie),1<K&&N(2===K?F[0]:F.slice(0,K-1),ee+1,U),Z.sort(function(ue,ce){return ue.keyTail-ce.keyTail}),ie}p=N(w.primaryKey.keyPath,0,w.primaryKey),D[":id"]=[p];for(var O=0,H=w.indexes;O<H.length;O++){var W=H[O];N(W.keyPath,0,W)}function Q(F){var ee,U=F.query.index;return U.isVirtual?B(B({},F),{query:{index:U.lowLevelIndex,range:(ee=F.query.range,U=U.keyTail,{type:1===ee.type?2:ee.type,lower:su(ee.lower,ee.lowerOpen?f.MAX_KEY:f.MIN_KEY,U),lowerOpen:!0,upper:su(ee.upper,ee.upperOpen?f.MIN_KEY:f.MAX_KEY,U),upperOpen:!0})}}):F}return B(B({},m),{schema:B(B({},w),{primaryKey:p,indexes:M,getIndexByKeyPath:function(F){return(F=D[Ni(F)])&&F[0]}}),count:function(F){return m.count(Q(F))},query:function(F){return m.query(Q(F))},openCursor:function(F){var ee=F.query.index,U=ee.keyTail,Z=ee.keyLength;return ee.isVirtual?m.openCursor(Q(F)).then(function(ie){return ie&&function K(ie){return Object.create(ie,{continue:{value:function(ue){null!=ue?ie.continue(su(ue,F.reverse?f.MAX_KEY:f.MIN_KEY,U)):F.unique?ie.continue(ie.key.slice(0,Z).concat(F.reverse?f.MIN_KEY:f.MAX_KEY,U)):ie.continue()}},continuePrimaryKey:{value:function(ue,ce){ie.continuePrimaryKey(su(ue,f.MAX_KEY,U),ce)}},primaryKey:{get:function(){return ie.primaryKey}},key:{get:function(){var ue=ie.key;return 1===Z?ue[0]:ue.slice(0,Z)}},value:{get:function(){return ie.value}}})}(ie)}):m.openCursor(F)}})}})}};function rl(f,p,m,w){return m=m||{},w=w||"",$(f).forEach(function(D){var M,N,O;k(p,D)?(N=p[D],"object"==typeof(M=f[D])&&"object"==typeof N&&M&&N?(O=xe(M))!==xe(N)?m[w+D]=p[D]:"Object"===O?rl(M,N,m,w+D+"."):M!==N&&(m[w+D]=p[D]):M!==N&&(m[w+D]=p[D])):m[w+D]=void 0}),$(p).forEach(function(D){k(f,D)||(m[w+D]=p[D])}),m}function il(f,p){return"delete"===p.type?p.keys:p.keys||p.values.map(f.extractKey)}var ol={stack:"dbcore",name:"HooksMiddleware",level:2,create:function(f){return B(B({},f),{table:function(p){var m=f.table(p),w=m.schema.primaryKey;return B(B({},m),{mutate:function(D){var M=nt.trans,N=M.table(p).hook,O=N.deleting,H=N.creating,W=N.updating;switch(D.type){case"add":if(H.fire===ot)break;return M._promise("readwrite",function(){return Q(D)},!0);case"put":if(H.fire===ot&&W.fire===ot)break;return M._promise("readwrite",function(){return Q(D)},!0);case"delete":if(O.fire===ot)break;return M._promise("readwrite",function(){return Q(D)},!0);case"deleteRange":if(O.fire===ot)break;return M._promise("readwrite",function(){return function F(ee,U,Y){return m.query({trans:ee,values:!1,query:{index:w,range:U},limit:Y}).then(function(Z){var K=Z.result;return Q({type:"delete",keys:K,trans:ee}).then(function(ie){return 0<ie.numFailures?Promise.reject(ie.failures[0]):K.length<Y?{failures:[],numFailures:0,lastResult:void 0}:F(ee,B(B({},U),{lower:K[K.length-1],lowerOpen:!0}),Y)})})}(D.trans,D.range,1e4)},!0)}return m.mutate(D);function Q(F){var ee,U,Y,Z=nt.trans,K=F.keys||il(w,F);if(!K)throw new Error("Keys missing");return"delete"!==(F="add"===F.type||"put"===F.type?B(B({},F),{keys:K}):B({},F)).type&&(F.values=le([],F.values,!0)),F.keys&&(F.keys=le([],F.keys,!0)),ee=m,Y=K,("add"===(U=F).type?Promise.resolve([]):ee.getMany({trans:U.trans,keys:Y,cache:"immutable"})).then(function(ie){var ue=K.map(function(ce,be){var ke,Ve,Re,Le=ie[be],Ge={onerror:null,onsuccess:null};return"delete"===F.type?O.fire.call(Ge,ce,Le,Z):"add"===F.type||void 0===Le?(ke=H.fire.call(Ge,ce,F.values[be],Z),null==ce&&null!=ke&&(F.keys[be]=ce=ke,w.outbound||_e(F.values[be],w.keyPath,ce))):(ke=rl(Le,F.values[be]),(Ve=W.fire.call(Ge,ke,ce,Le,Z))&&(Re=F.values[be],Object.keys(Ve).forEach(function(je){k(Re,je)?Re[je]=Ve[je]:_e(Re,je,Ve[je])}))),Ge});return m.mutate(F).then(function(ce){for(var be=ce.failures,ke=ce.results,Ve=ce.numFailures,Re=(ce=ce.lastResult,0);Re<K.length;++Re){var Le=(ke||K)[Re],Ge=ue[Re];null==Le?Ge.onerror&&Ge.onerror(be[Re]):Ge.onsuccess&&Ge.onsuccess("put"===F.type&&ie[Re]?F.values[Re]:Le)}return{failures:be,results:ke,numFailures:Ve,lastResult:ce}}).catch(function(ce){return ue.forEach(function(be){return be.onerror&&be.onerror(ce)}),Promise.reject(ce)})})}}})}})}};function Yd(f,p,m){try{if(!p||p.keys.length<f.length)return null;for(var w=[],D=0,M=0;D<p.keys.length&&M<f.length;++D)0===jt(p.keys[D],f[M])&&(w.push(m?pe(p.values[D]):p.values[D]),++M);return w.length===f.length?w:null}catch{return null}}var sl={stack:"dbcore",level:-1,create:function(f){return{table:function(p){var m=f.table(p);return B(B({},m),{getMany:function(w){if(!w.cache)return m.getMany(w);var D=Yd(w.keys,w.trans._cache,"clone"===w.cache);return D?We.resolve(D):m.getMany(w).then(function(M){return w.trans._cache={keys:w.keys,values:"clone"===w.cache?pe(M):M},M})},mutate:function(w){return"add"!==w.type&&(w.trans._cache=null),m.mutate(w)}})}}}};function Kd(f,p){return"readonly"===f.trans.mode&&!!f.subscr&&!f.trans.explicit&&"disabled"!==f.trans.db._options.cache&&!p.schema.primaryKey.outbound}function io(f,p){switch(f){case"query":return p.values&&!p.unique;case"get":case"getMany":case"count":case"openCursor":return!1}}var t0={stack:"dbcore",level:0,name:"Observability",create:function(f){var p=f.schema.name,m=new kn(f.MIN_KEY,f.MAX_KEY);return B(B({},f),{transaction:function(w,D,M){if(nt.subscr&&"readonly"!==D)throw new ae.ReadOnly("Readwrite transaction in liveQuery context. Querier source: ".concat(nt.querier));return f.transaction(w,D,M)},table:function(w){var D=f.table(w),M=D.schema,N=M.primaryKey,F=M.indexes,O=N.extractKey,H=N.outbound,W=N.autoIncrement&&F.filter(function(U){return U.compound&&U.keyPath.includes(N.keyPath)}),Q=B(B({},D),{mutate:function(U){function Y(je){return je="idb://".concat(p,"/").concat(w,"/").concat(je),ce[je]||(ce[je]=new kn)}var Z,K,ie,ue=U.trans,ce=U.mutatedParts||(U.mutatedParts={}),be=Y(""),ke=Y(":dels"),Ve=U.type,Re=(Ge="deleteRange"===U.type?[U.range]:"delete"===U.type?[U.keys]:U.values.length<50?[il(N,U).filter(function(je){return je}),U.values]:[])[0],Le=Ge[1],Ge=U.trans._cache;return q(Re)?(be.addKeys(Re),(Ge="delete"===Ve||Re.length===Le.length?Yd(Re,Ge):null)||ke.addKeys(Re),(Ge||Le)&&(Z=Y,K=Ge,ie=Le,M.indexes.forEach(function(je){var Ke=Z(je.name||"");function gt(dt){return null!=dt?je.extractKey(dt):null}function Tt(dt){return je.multiEntry&&q(dt)?dt.forEach(function(sn){return Ke.addKey(sn)}):Ke.addKey(dt)}(K||ie).forEach(function(dt,Vt){var He=K&&gt(K[Vt]);0!==jt(He,Vt=ie&&gt(ie[Vt]))&&(null!=He&&Tt(He),null!=Vt&&Tt(Vt))})}))):Re?(Le={from:null!==(Le=Re.lower)&&void 0!==Le?Le:f.MIN_KEY,to:null!==(Le=Re.upper)&&void 0!==Le?Le:f.MAX_KEY},ke.add(Le),be.add(Le)):(be.add(m),ke.add(m),M.indexes.forEach(function(je){return Y(je.name).add(m)})),D.mutate(U).then(function(je){return!Re||"add"!==U.type&&"put"!==U.type||(be.addKeys(je.results),W&&W.forEach(function(Ke){for(var gt=U.values.map(function(He){return Ke.extractKey(He)}),Tt=Ke.keyPath.findIndex(function(He){return He===N.keyPath}),dt=0,sn=je.results.length;dt<sn;++dt)gt[dt][Tt]=je.results[dt];Y(Ke.name).addKeys(gt)})),ue.mutatedParts=Ai(ue.mutatedParts||{},ce),je})}}),ee={get:function(U){return[N,new kn(U.key)]},getMany:function(U){return[N,(new kn).addKeys(U.keys)]},count:F=function(Y){var Z;return[Y=(Z=Y.query).index,new kn(null!==(Y=(Z=Z.range).lower)&&void 0!==Y?Y:f.MIN_KEY,null!==(Z=Z.upper)&&void 0!==Z?Z:f.MAX_KEY)]},query:F,openCursor:F};return $(ee).forEach(function(U){Q[U]=function(Y){var K=!!(Z=nt.subscr),ie=Kd(nt,D)&&io(U,Y)?Y.obsSet={}:Z;if(K){var ue=function(Le){return Le="idb://".concat(p,"/").concat(w,"/").concat(Le),ie[Le]||(ie[Le]=new kn)},ce=ue(""),be=ue(":dels"),Z=(K=(Z=ee[U](Y))[0],Z[1]);if(("query"===U&&K.isPrimaryKey&&!Y.values?be:ue(K.name||"")).add(Z),!K.isPrimaryKey){if("count"!==U){var ke="query"===U&&H&&Y.values&&D.query(B(B({},Y),{values:!1}));return D[U].apply(this,arguments).then(function(Le){if("query"===U){if(H&&Y.values)return ke.then(function(gt){return ce.addKeys(gt=gt.result),Le});var Ge=Y.values?Le.result.map(O):Le.result;(Y.values?ce:be).addKeys(Ge)}else if("openCursor"===U){var je=Le,Ke=Y.values;return je&&Object.create(je,{key:{get:function(){return be.addKey(je.primaryKey),je.key}},primaryKey:{get:function(){var gt=je.primaryKey;return be.addKey(gt),gt}},value:{get:function(){return Ke&&ce.addKey(je.primaryKey),je.value}}})}return Le})}be.add(m)}}return D[U].apply(this,arguments)}}),Q}})}};function ir(f,p,m){return 0===m.numFailures?p:"deleteRange"===p.type||m.numFailures===(p.keys?p.keys.length:"values"in p&&p.values?p.values.length:1)?null:(p=B({},p),q(p.keys)&&(p.keys=p.keys.filter(function(D,M){return!(M in m.failures)})),"values"in p&&q(p.values)&&(p.values=p.values.filter(function(D,M){return!(M in m.failures)})),p)}function oo(f,p){return m=f,(void 0===(w=p).lower||(w.lowerOpen?0<jt(m,w.lower):0<=jt(m,w.lower)))&&(void 0===p.upper||(p.upperOpen?jt(f,p.upper)<0:jt(f,p.upper)<=0));var m,w}function al(f,p,ee,w,D,M){if(!ee||0===ee.length)return f;var N=p.query.index,O=N.multiEntry,H=p.query.range,W=w.schema.primaryKey.extractKey,Q=N.extractKey,F=(N.lowLevelIndex||N).extractKey;return(ee=ee.reduce(function(U,Y){var Z=U,K=[];if("add"===Y.type||"put"===Y.type)for(var ie=new kn,ue=Y.values.length-1;0<=ue;--ue){var ce,be=Y.values[ue],ke=W(be);ie.hasKey(ke)||(ce=Q(be),(O&&q(ce)?ce.some(function(je){return oo(je,H)}):oo(ce,H))&&(ie.addKey(ke),K.push(be)))}switch(Y.type){case"add":var Ve=(new kn).addKeys(p.values?U.map(function(Ke){return W(Ke)}):U);Z=U.concat(p.values?K.filter(function(Ke){return Ke=W(Ke),!Ve.hasKey(Ke)&&(Ve.addKey(Ke),!0)}):K.map(function(Ke){return W(Ke)}).filter(function(Ke){return!Ve.hasKey(Ke)&&(Ve.addKey(Ke),!0)}));break;case"put":var Re=(new kn).addKeys(Y.values.map(function(Ke){return W(Ke)}));Z=U.filter(function(Ke){return!Re.hasKey(p.values?W(Ke):Ke)}).concat(p.values?K:K.map(function(Ke){return W(Ke)}));break;case"delete":var Le=(new kn).addKeys(Y.keys);Z=U.filter(function(Ke){return!Le.hasKey(p.values?W(Ke):Ke)});break;case"deleteRange":var Ge=Y.range;Z=U.filter(function(Ke){return!oo(W(Ke),Ge)})}return Z},f))===f?f:(ee.sort(function(U,Y){return jt(F(U),F(Y))||jt(W(U),W(Y))}),p.limit&&p.limit<1/0&&(ee.length>p.limit?ee.length=p.limit:f.length===p.limit&&ee.length<p.limit&&(D.dirty=!0)),M?Object.freeze(ee):ee)}function Zs(f,p){return 0===jt(f.lower,p.lower)&&0===jt(f.upper,p.upper)&&!!f.lowerOpen==!!p.lowerOpen&&!!f.upperOpen==!!p.upperOpen}var O_={stack:"dbcore",level:0,name:"Cache",create:function(f){var p=f.schema.name;return B(B({},f),{transaction:function(m,w,D){var M,N,O=f.transaction(m,w,D);return"readwrite"===w&&(N=(M=new AbortController).signal,O.addEventListener("abort",(D=function(H){return function(){if(M.abort(),"readwrite"===w){for(var W=new Set,Q=0,F=m;Q<F.length;Q++){var ee=F[Q],U=fr["idb://".concat(p,"/").concat(ee)];if(U){var Y=f.table(ee),Z=U.optimisticOps.filter(function(Ke){return Ke.trans===O});if(O._explicit&&H&&O.mutatedParts)for(var K=0,ie=Object.values(U.queries.query);K<ie.length;K++)for(var ue=0,ce=(Ve=ie[K]).slice();ue<ce.length;ue++)el((Re=ce[ue]).obsSet,O.mutatedParts)&&(yt(Ve,Re),Re.subscribers.forEach(function(Ke){return W.add(Ke)}));else if(0<Z.length){U.optimisticOps=U.optimisticOps.filter(function(Ke){return Ke.trans!==O});for(var be=0,ke=Object.values(U.queries.query);be<ke.length;be++)for(var Ve,Re,Le,Ge=0,je=(Ve=ke[be]).slice();Ge<je.length;Ge++)null!=(Re=je[Ge]).res&&O.mutatedParts&&(H&&!Re.dirty?(Le=Object.isFrozen(Re.res),Le=al(Re.res,Re.req,Z,Y,Re,Le),Re.dirty?(yt(Ve,Re),Re.subscribers.forEach(function(Ke){return W.add(Ke)})):Le!==Re.res&&(Re.res=Le,Re.promise=We.resolve({result:Le}))):(Re.dirty&&yt(Ve,Re),Re.subscribers.forEach(function(Ke){return W.add(Ke)})))}}}W.forEach(function(Ke){return Ke()})}}})(!1),{signal:N}),O.addEventListener("error",D(!1),{signal:N}),O.addEventListener("complete",D(!0),{signal:N})),O},table:function(m){var w=f.table(m),D=w.schema.primaryKey;return B(B({},w),{mutate:function(M){var N=nt.trans;if(D.outbound||"disabled"===N.db._options.cache||N.explicit||"readwrite"!==N.idbtrans.mode)return w.mutate(M);var O=fr["idb://".concat(p,"/").concat(m)];return O?(N=w.mutate(M),"add"!==M.type&&"put"!==M.type||!(50<=M.values.length||il(D,M).some(function(H){return null==H}))?(O.optimisticOps.push(M),M.mutatedParts&&Ks(M.mutatedParts),N.then(function(H){0<H.numFailures&&(yt(O.optimisticOps,M),(H=ir(0,M,H))&&O.optimisticOps.push(H),M.mutatedParts&&Ks(M.mutatedParts))}),N.catch(function(){yt(O.optimisticOps,M),M.mutatedParts&&Ks(M.mutatedParts)})):N.then(function(H){var W=ir(0,B(B({},M),{values:M.values.map(function(Q,F){var ee;return H.failures[F]||_e(Q=null!==(ee=D.keyPath)&&void 0!==ee&&ee.includes(".")?pe(Q):B({},Q),D.keyPath,H.results[F]),Q})}),H);O.optimisticOps.push(W),queueMicrotask(function(){return M.mutatedParts&&Ks(M.mutatedParts)})}),N):w.mutate(M)},query:function(M){if(!Kd(nt,w)||!io("query",M))return w.query(M);var N="immutable"===(null===(W=nt.trans)||void 0===W?void 0:W.db._options.cache),O=(F=nt).requery,H=F.signal,W=function(Y,Z,K,ie){var ue=fr["idb://".concat(Y,"/").concat(Z)];if(!ue)return[];if(!(Z=ue.queries[K]))return[null,!1,ue,null];var ce=Z[(ie.query?ie.query.index.name:null)||""];if(!ce)return[null,!1,ue,null];switch(K){case"query":var be=ce.find(function(ke){return ke.req.limit===ie.limit&&ke.req.values===ie.values&&Zs(ke.req.query.range,ie.query.range)});return be?[be,!0,ue,ce]:[ce.find(function(ke){return("limit"in ke.req?ke.req.limit:1/0)>=ie.limit&&(!ie.values||ke.req.values)&&function au(f,p){return function(m,w,D,M){if(void 0===m)return void 0!==w?-1:0;if(void 0===w)return 1;if(0===(w=jt(m,w))){if(D&&M)return 0;if(D)return 1;if(M)return-1}return w}(f.lower,p.lower,f.lowerOpen,p.lowerOpen)<=0&&0<=function(m,w,D,M){if(void 0===m)return void 0!==w?1:0;if(void 0===w)return-1;if(0===(w=jt(m,w))){if(D&&M)return 0;if(D)return-1;if(M)return 1}return w}(f.upper,p.upper,f.upperOpen,p.upperOpen)}(ke.req.query.range,ie.query.range)}),!1,ue,ce];case"count":return[be=ce.find(function(ke){return Zs(ke.req.query.range,ie.query.range)}),!!be,ue,ce]}}(p,m,"query",M),Q=W[0],F=W[1],ee=W[2],U=W[3];return Q&&F?Q.obsSet=M.obsSet:(F=w.query(M).then(function(Y){var Z=Y.result;if(Q&&(Q.res=Z),N){for(var K=0,ie=Z.length;K<ie;++K)Object.freeze(Z[K]);Object.freeze(Z)}else Y.result=pe(Z);return Y}).catch(function(Y){return U&&Q&&yt(U,Q),Promise.reject(Y)}),Q={obsSet:M.obsSet,promise:F,subscribers:new Set,type:"query",req:M,dirty:!1},U?U.push(Q):(U=[Q],(ee=ee||(fr["idb://".concat(p,"/").concat(m)]={queries:{query:{},count:{}},objs:new Map,optimisticOps:[],unsignaledParts:{}})).queries.query[M.query.index.name||""]=U)),function ul(f,p,m,w){f.subscribers.add(m),w.addEventListener("abort",function(){var D,M;f.subscribers.delete(m),0===f.subscribers.size&&(D=f,M=p,setTimeout(function(){0===D.subscribers.size&&yt(M,D)},3e3))})}(Q,U,O,H),Q.promise.then(function(Y){return{result:al(Y.result,M,ee?.optimisticOps,w,Q,N)}})}})}})}};function Xs(f,p){return new Proxy(f,{get:function(m,w,D){return"db"===w?p:Reflect.get(m,w,D)}})}var so=(Ht.prototype.version=function(f){if(isNaN(f)||f<.1)throw new ae.Type("Given version is not a positive number");if(f=Math.round(10*f)/10,this.idbdb||this._state.isBeingOpened)throw new ae.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,f);var p=this._versions,m=p.filter(function(w){return w._cfg.version===f})[0];return m||(m=new this.Version(f),p.push(m),p.sort(Hd),m.stores({}),this._state.autoSchema=!1,m)},Ht.prototype._whenReady=function(f){var p=this;return this.idbdb&&(this._state.openComplete||nt.letThrough||this._vip)?f():new We(function(m,w){if(p._state.openComplete)return w(new ae.DatabaseClosed(p._state.dbOpenError));if(!p._state.isBeingOpened){if(!p._state.autoOpen)return void w(new ae.DatabaseClosed);p.open().catch(ot)}p._state.dbReadyPromise.then(m,w)}).then(f)},Ht.prototype.use=function(f){var p=f.stack,m=f.create,w=f.level,D=f.name;return D&&this.unuse({stack:p,name:D}),(f=this._middlewares[p]||(this._middlewares[p]=[])).push({stack:p,create:m,level:w??10,name:D}),f.sort(function(M,N){return M.level-N.level}),this},Ht.prototype.unuse=function(f){var p=f.stack,m=f.name,w=f.create;return p&&this._middlewares[p]&&(this._middlewares[p]=this._middlewares[p].filter(function(D){return w?D.create!==w:!!m&&D.name!==m})),this},Ht.prototype.open=function(){var f=this;return jr(Zi,function(){return nl(f)})},Ht.prototype._close=function(){var f=this._state,p=mn.indexOf(this);if(0<=p&&mn.splice(p,1),this.idbdb){try{this.idbdb.close()}catch{}this.idbdb=null}f.isBeingOpened||(f.dbReadyPromise=new We(function(m){f.dbReadyResolve=m}),f.openCanceller=new We(function(m,w){f.cancelOpen=w}))},Ht.prototype.close=function(m){var p=(void 0===m?{disableAutoOpen:!0}:m).disableAutoOpen;m=this._state,p?(m.isBeingOpened&&m.cancelOpen(new ae.DatabaseClosed),this._close(),m.autoOpen=!1,m.dbOpenError=new ae.DatabaseClosed):(this._close(),m.autoOpen=this._options.autoOpen||m.isBeingOpened,m.openComplete=!1,m.dbOpenError=null)},Ht.prototype.delete=function(f){var p=this;void 0===f&&(f={disableAutoOpen:!0});var m=0<arguments.length&&"object"!=typeof arguments[0],w=this._state;return new We(function(D,M){function N(){p.close(f);var O=p._deps.indexedDB.deleteDatabase(p.name);O.onsuccess=fn(function(){var H,W,Q;W=p.name,Q=(H=p._deps).indexedDB,H=H.IDBKeyRange,iu(Q)||W===cs||er(Q,H).delete(W).catch(ot),D()}),O.onerror=Kr(M),O.onblocked=p._fireOnBlocked}if(m)throw new ae.InvalidArgument("Invalid closeOptions argument to db.delete()");w.isBeingOpened?w.dbReadyPromise.then(N):N()})},Ht.prototype.backendDB=function(){return this.idbdb},Ht.prototype.isOpen=function(){return null!==this.idbdb},Ht.prototype.hasBeenClosed=function(){var f=this._state.dbOpenError;return f&&"DatabaseClosed"===f.name},Ht.prototype.hasFailed=function(){return null!==this._state.dbOpenError},Ht.prototype.dynamicallyOpened=function(){return this._state.autoSchema},Object.defineProperty(Ht.prototype,"tables",{get:function(){var f=this;return $(this._allTables).map(function(p){return f._allTables[p]})},enumerable:!1,configurable:!0}),Ht.prototype.transaction=function(){var f=function(p,m,w){var D=arguments.length;if(D<2)throw new ae.InvalidArgument("Too few arguments");for(var M=new Array(D-1);--D;)M[D-1]=arguments[D];return w=M.pop(),[p,ze(M),w]}.apply(this,arguments);return this._transaction.apply(this,f)},Ht.prototype._transaction=function(f,p,m){var w=this,D=nt.trans;D&&D.db===this&&-1===f.indexOf("!")||(D=null);var M,N,O=-1!==f.indexOf("?");f=f.replace("!","").replace("?","");try{if(N=p.map(function(W){if("string"!=typeof(W=W instanceof w.Table?W.name:W))throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return W}),"r"==f||f===Pd)M=Pd;else{if("rw"!=f&&f!=zc)throw new ae.InvalidArgument("Invalid transaction mode: "+f);M=zc}if(D){if(D.mode===Pd&&M===zc){if(!O)throw new ae.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");D=null}D&&N.forEach(function(W){if(D&&-1===D.storeNames.indexOf(W)){if(!O)throw new ae.SubTransaction("Table "+W+" not included in parent transaction.");D=null}}),O&&D&&!D.active&&(D=null)}}catch(W){return D?D._promise(null,function(Q,F){F(W)}):Nn(W)}var H=function W(Q,F,ee,U,Y){return We.resolve().then(function(){var Z=nt.transless||nt,K=Q._createTransaction(F,ee,Q._dbSchema,U);if(K.explicit=!0,Z={trans:K,transless:Z},U)K.idbtrans=U.idbtrans;else try{K.create(),K.idbtrans._explicit=!0,Q._state.PR1398_maxLoop=3}catch(ce){return ce.name===ve.InvalidState&&Q.isOpen()&&0<--Q._state.PR1398_maxLoop?(console.warn("Dexie: Need to reopen db"),Q.close({disableAutoOpen:!1}),Q.open().then(function(){return W(Q,F,ee,null,Y)})):Nn(ce)}var ie,ue=Wr(Y);return ue&&cr(),Z=We.follow(function(){var ce;(ie=Y.call(K,K))&&(ue?(ce=Dr.bind(null,null),ie.then(ce,ce)):"function"==typeof ie.next&&"function"==typeof ie.throw&&(ie=jo(ie)))},Z),(ie&&"function"==typeof ie.then?We.resolve(ie).then(function(ce){return K.active?ce:Nn(new ae.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"))}):Z.then(function(){return ie})).then(function(ce){return U&&K._resolve(),K._completion.then(function(){return ce})}).catch(function(ce){return K._reject(ce),Nn(ce)})})}.bind(null,this,M,N,D,m);return D?D._promise(M,H,"lock"):nt.trans?jr(nt.transless,function(){return w._whenReady(H)}):this._whenReady(H)},Ht.prototype.table=function(f){if(!k(this._allTables,f))throw new ae.InvalidTable("Table ".concat(f," does not exist"));return this._allTables[f]},Ht);function Ht(f,p){var m=this;this._middlewares={},this.verno=0;var w=Ht.dependencies;this._options=p=B({addons:Ht.addons,autoOpen:!0,indexedDB:w.indexedDB,IDBKeyRange:w.IDBKeyRange,cache:"cloned"},p),this._deps={indexedDB:p.indexedDB,IDBKeyRange:p.IDBKeyRange},w=p.addons,this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;var D,M,N,O,H,W={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:ot,dbReadyPromise:null,cancelOpen:ot,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3,autoOpen:p.autoOpen};W.dbReadyPromise=new We(function(F){W.dbReadyResolve=F}),W.openCanceller=new We(function(F,ee){W.cancelOpen=ee}),this._state=W,this.name=f,this.on=Za(this,"populate","blocked","versionchange","close",{ready:[ui,ot]}),this.on.ready.subscribe=et(this.on.ready.subscribe,function(F){return function(ee,U){Ht.vip(function(){var Y,Z=m._state;Z.openComplete?(Z.dbOpenError||We.resolve().then(ee),U&&F(ee)):Z.onReadyBeingFired?(Z.onReadyBeingFired.push(ee),U&&F(ee)):(F(ee),Y=m,U||F(function K(){Y.on.ready.unsubscribe(ee),Y.on.ready.unsubscribe(K)}))})}}),this.Collection=(D=this,Xa(A_.prototype,function(ie,K){this.db=D;var U=ft,Y=null;if(K)try{U=K()}catch(ue){Y=ue}var Z=ie._ctx;this._ctx={table:K=Z.table,index:Z.index,isPrimKey:!Z.index||K.schema.primKey.keyPath&&Z.index===K.schema.primKey.name,range:U,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:Y,or:Z.or,valueMapper:(ie=K.hook.reading.fire)!==en?ie:null}})),this.Table=(M=this,Xa(Ti.prototype,function(F,ee,U){this.db=M,this._tx=U,this.name=F,this.schema=ee,this.hook=M._allTables[F]?M._allTables[F].hook:Za(null,{creating:[wr,ot],reading:[rr,en],updating:[Ci,ot],deleting:[Vn,ot]})})),this.Transaction=(N=this,Xa(Bd.prototype,function(F,ee,U,Y,Z){var K=this;this.db=N,this.mode=F,this.storeNames=ee,this.schema=U,this.chromeTransactionDurability=Y,this.idbtrans=null,this.on=Za(this,"complete","error","abort"),this.parent=Z||null,this.active=!0,this._reculock=0,this._blockedFuncs=[],this._resolve=null,this._reject=null,this._waitingFor=null,this._waitingQueue=null,this._spinCount=0,this._completion=new We(function(ie,ue){K._resolve=ie,K._reject=ue}),this._completion.then(function(){K.active=!1,K.on.complete.fire()},function(ie){var ue=K.active;return K.active=!1,K.on.error.fire(ie),K.parent?K.parent._reject(ie):ue&&K.idbtrans&&K.idbtrans.abort(),Nn(ie)})})),this.Version=(O=this,Xa(Xc.prototype,function(F){this.db=O,this._cfg={version:F,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}})),this.WhereClause=(H=this,Xa(zs.prototype,function(F,ee,U){if(this.db=H,this._ctx={table:F,index:":id"===ee?null:ee,or:U},this._cmp=this._ascending=jt,this._descending=function(Y,Z){return jt(Z,Y)},this._max=function(Y,Z){return 0<jt(Y,Z)?Y:Z},this._min=function(Y,Z){return jt(Y,Z)<0?Y:Z},this._IDBKeyRange=H._deps.IDBKeyRange,!this._IDBKeyRange)throw new ae.MissingAPI})),this.on("versionchange",function(F){0<F.newVersion?console.warn("Another connection wants to upgrade database '".concat(m.name,"'. Closing db now to resume the upgrade.")):console.warn("Another connection wants to delete database '".concat(m.name,"'. Closing db now to resume the delete request.")),m.close({disableAutoOpen:!1})}),this.on("blocked",function(F){!F.newVersion||F.newVersion<F.oldVersion?console.warn("Dexie.delete('".concat(m.name,"') was blocked")):console.warn("Upgrade '".concat(m.name,"' blocked by other connection holding version ").concat(F.oldVersion/10))}),this._maxKey=nu(p.IDBKeyRange),this._createTransaction=function(F,ee,U,Y){return new m.Transaction(F,ee,U,m._options.chromeTransactionDurability,Y)},this._fireOnBlocked=function(F){m.on("blocked").fire(F),mn.filter(function(ee){return ee.name===m.name&&ee!==m&&!ee._state.vcFired}).map(function(ee){return ee.on("versionchange").fire(F)})},this.use(sl),this.use(O_),this.use(t0),this.use(e0),this.use(ol);var Q=new Proxy(this,{get:function(F,ee,U){if("_vip"===ee)return!0;if("table"===ee)return function(Z){return Xs(m.table(Z),Q)};var Y=Reflect.get(F,ee,U);return Y instanceof Ti?Xs(Y,Q):"tables"===ee?Y.map(function(Z){return Xs(Z,Q)}):"_createTransaction"===ee?function(){return Xs(Y.apply(this,arguments),Q)}:Y}});this.vip=Q,w.forEach(function(F){return F(m)})}Gn=typeof Symbol<"u"&&"observable"in Symbol?Symbol.observable:"@@observable";var fs,R_=(uu.prototype.subscribe=function(f,p,m){return this._subscribe(f&&"function"!=typeof f?f:{next:f,error:p,complete:m})},uu.prototype[Gn]=function(){return this},uu);function uu(f){this._subscribe=f}try{fs={indexedDB:J.indexedDB||J.mozIndexedDB||J.webkitIndexedDB||J.msIndexedDB,IDBKeyRange:J.IDBKeyRange||J.webkitIDBKeyRange}}catch{fs={indexedDB:null,IDBKeyRange:null}}function Qr(f){var p,m=!1,w=new R_(function(D){var N,M=Wr(f),O=!1,H={},W={},Q={get closed(){return O},unsubscribe:function(){O||(O=!0,N&&N.abort(),F&&ci.storagemutated.unsubscribe(U))}};D.start&&D.start(Q);var F=!1,ee=function(){return Gt(Y)},U=function(Z){Ai(H,Z),el(W,H)&&ee()},Y=function(){var Z,K,ie;!O&&fs.indexedDB&&(H={},Z={},N&&N.abort(),N=new AbortController,ie=function(ue){var ce=is();try{M&&cr();var be=xi(f,ue);return be=M?be.finally(Dr):be}finally{ce&&os()}}(K={subscr:Z,signal:N.signal,requery:ee,querier:f,trans:null}),Promise.resolve(ie).then(function(ue){m=!0,p=ue,O||K.signal.aborted||(H={},function(ce){for(var be in ce)if(k(ce,be))return;return 1}(W=Z)||F||(ci(ut,U),F=!0),Gt(function(){return!O&&D.next&&D.next(ue)}))},function(ue){m=!1,["DatabaseClosedError","AbortError"].includes(ue?.name)||O||Gt(function(){O||D.error&&D.error(ue)})}))};return setTimeout(ee,0),Q});return w.hasValue=function(){return m},w.getValue=function(){return p},w}var St=so;function ao(f){var p=li;try{li=!0,ci.storagemutated.fire(f),_t(f,!0)}finally{li=p}}x(St,B(B({},It),{delete:function(f){return new St(f,{addons:[]}).delete()},exists:function(f){return new St(f,{addons:[]}).open().then(function(p){return p.close(),!0}).catch("NoSuchDatabaseError",function(){return!1})},getDatabaseNames:function(f){try{return m=(p=St.dependencies).indexedDB,p=p.IDBKeyRange,(iu(m)?Promise.resolve(m.databases()).then(function(w){return w.map(function(D){return D.name}).filter(function(D){return D!==cs})}):er(m,p).toCollection().primaryKeys()).then(f)}catch{return Nn(new ae.MissingAPI)}var p,m},defineClass:function(){return function(f){P(this,f)}},ignoreTransaction:function(f){return nt.trans?jr(nt.transless,f):f()},vip:zd,async:function(f){return function(){try{var p=jo(f.apply(this,arguments));return p&&"function"==typeof p.then?p:We.resolve(p)}catch(m){return Nn(m)}}},spawn:function(f,p,m){try{var w=jo(f.apply(m,p||[]));return w&&"function"==typeof w.then?w:We.resolve(w)}catch(D){return Nn(D)}},currentTransaction:{get:function(){return nt.trans||null}},waitFor:function(f,p){return p=We.resolve("function"==typeof f?St.ignoreTransaction(f):f).timeout(p||6e4),nt.trans?nt.trans.waitFor(p):p},Promise:We,debug:{get:function(){return _r},set:function(f){Td(f)}},derive:V,extend:P,props:x,override:et,Events:Za,on:ci,liveQuery:Qr,extendObservabilitySet:Ai,getByKeyPath:he,setByKeyPath:_e,delByKeyPath:function(f,p){"string"==typeof p?_e(f,p,void 0):"length"in p&&[].map.call(p,function(m){_e(f,m,void 0)})},shallowClone:Ne,deepClone:pe,getObjectDiff:rl,cmp:jt,asap:Pe,minKey:-1/0,addons:[],connections:mn,errnames:ve,dependencies:fs,cache:fr,semVer:"4.0.10",version:"4.0.10".split(".").map(function(f){return parseInt(f)}).reduce(function(f,p,m){return f+p/Math.pow(10,2*m)})})),St.maxKey=nu(St.dependencies.IDBKeyRange),typeof dispatchEvent<"u"&&typeof addEventListener<"u"&&(ci(ut,function(f){li||(f=new CustomEvent(qs,{detail:f}),li=!0,dispatchEvent(f),li=!1)}),addEventListener(qs,function(f){f=f.detail,li||ao(f)}));var Vo,li=!1,Js=function(){};return typeof BroadcastChannel<"u"&&((Js=function(){(Vo=new BroadcastChannel(qs)).onmessage=function(f){return f.data&&ao(f.data)}})(),"function"==typeof Vo.unref&&Vo.unref(),ci(ut,function(f){li||Vo.postMessage(f)})),typeof addEventListener<"u"&&(addEventListener("pagehide",function(f){if(!so.disableBfCache&&f.persisted){_r&&console.debug("Dexie: handling persisted pagehide"),Vo?.close();for(var p=0,m=mn;p<m.length;p++)m[p].close({disableAutoOpen:!1})}}),addEventListener("pageshow",function(f){!so.disableBfCache&&f.persisted&&(_r&&console.debug("Dexie: handling persisted pageshow"),Js(),ao({all:new kn(-1/0,[[]])}))})),We.rejectionMapper=function(f,p){return!f||f instanceof Di||f instanceof TypeError||f instanceof SyntaxError||!f.name||!Xe[f.name]?f:(p=new Xe[f.name](p||f.message,f),"stack"in f&&j(p,"stack",{get:function(){return this.inner.stack}}),p)},Td(_r),B(so,Object.freeze({__proto__:null,Dexie:so,liveQuery:Qr,Entity:lr,cmp:jt,PropModSymbol:to,PropModification:eu,replacePrefix:function(f,p){return new eu({replacePrefix:[f,p]})},add:function(f){return new eu({add:f})},remove:function(f){return new eu({remove:f})},default:so,RangeSet:kn,mergeRanges:ro,rangesOverlap:qd}),{default:so}),so}()}},Se=>{Se(Se.s=2260)}]);