Graph-Native Infrastructure for Context and Accountable AI Systems
Python agent-memoryaiai-governanceai-infrastructureartificial-intelligencecontext-engineeringcontext-graphsdata-engineeringdecision-intelligencedeveloper-toolsexplainable-aigenerative-aigraph-ragknowledge-graphllmontologyprovenancepythonreasoningsemantic-search
chore: untrack remaining generated Vite bundles from git
KaifAhmad1f4db4469ba11
diff --git a/semantica/static/assets/GraphInspectorPanel-MLghMyni.js b/semantica/static/assets/GraphInspectorPanel-MLghMyni.jsdeleted file mode 100644index b65905c4..00000000--- a/semantica/static/assets/GraphInspectorPanel-MLghMyni.js+++ /dev/null@@ -1 +0,0 @@-import{a as e}from"./query-vendor-Cbp9LWgA.js";import{r as t}from"./index-DDOaKEbH.js";import{f as n,t as r}from"./graphTheme-aSRma4TX.js";var ee=t(),i=e(),a=[`source`,`source_url`,`pmid`,`pmids`,`evidence`,`provenance`,`confidence`];function te(e){return a.filter(t=>t in e).map(t=>({key:t,value:e[t]}))}function o(e){let t=(0,ee.c)(108),{nodeId:r,predictions:a,predictionType:o,onPredictionTypeChange:s,onRunPredictions:c,pathTargetId:u,onPathTargetChange:d,onTracePath:f,pathResult:p,onDownloadProvenance:m}=e;if(!r){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,i.jsx)(`div`,{style:{padding:32,textAlign:`center`},children:(0,i.jsx)(`p`,{style:{color:`#8b949e`,fontSize:14,margin:0},children:`Search for a node or click one in the canvas to inspect its properties.`})}),t[0]=e):e=t[0],e}let h,g,_,v,y,b,x,S,C,w,T;if(t[1]!==r||t[2]!==m||t[3]!==d||t[4]!==s||t[5]!==c||t[6]!==f||t[7]!==p||t[8]!==u||t[9]!==o||t[10]!==a){let e=n.getNodeAttributes(r),ee=e?.properties??{},E=te(ee),D=e?.color||`#58a6ff`,O=Object.entries(ee).filter(ae),k,A;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(x={padding:24,display:`flex`,flexDirection:`column`,gap:18},k={borderBottom:`1px solid rgba(88, 166, 255, 0.2)`,paddingBottom:16},A={display:`flex`,alignItems:`center`,gap:10,marginBottom:8},t[22]=k,t[23]=A,t[24]=x):(k=t[22],A=t[23],x=t[24]);let pe=(0,i.jsxs)(`div`,{style:A,children:[(0,i.jsx)(`span`,{style:{background:D,boxShadow:`0 0 10px ${D}`,width:8,height:8,borderRadius:`50%`}}),(0,i.jsx)(`span`,{style:{color:D,fontSize:12,fontWeight:700},children:e?.nodeType||`Entity`})]}),me;t[25]===Symbol.for(`react.memo_cache_sentinel`)?(me={margin:0,color:`#fff`,fontSize:20,fontWeight:700,wordBreak:`break-word`},t[25]=me):me=t[25];let he=String(e?.label??r),j;t[26]===he?j=t[27]:(j=(0,i.jsx)(`h3`,{style:me,children:he}),t[26]=he,t[27]=j);let M;t[28]===Symbol.for(`react.memo_cache_sentinel`)?(M={color:`#8b949e`,fontSize:12,marginTop:6},t[28]=M):M=t[28];let N;t[29]===r?N=t[30]:(N=(0,i.jsx)(`div`,{style:M,children:r}),t[29]=r,t[30]=N);let P;t[31]===Symbol.for(`react.memo_cache_sentinel`)?(P={display:`flex`,gap:8,flexWrap:`wrap`,marginTop:12},t[31]=P):P=t[31];let ge=e?.valid_from||e?.valid_until?(0,i.jsx)(`span`,{style:ue,children:`temporal`}):null,_e=E.length?(0,i.jsxs)(`span`,{style:ue,children:[E.length,` source fields`]}):null,F;t[32]===a.length?F=t[33]:(F=a.length?(0,i.jsxs)(`span`,{style:ue,children:[a.length,` candidate links`]}):null,t[32]=a.length,t[33]=F);let I;t[34]!==ge||t[35]!==_e||t[36]!==F?(I=(0,i.jsxs)(`div`,{style:P,children:[ge,_e,F]}),t[34]=ge,t[35]=_e,t[36]=F,t[37]=I):I=t[37],t[38]!==pe||t[39]!==j||t[40]!==N||t[41]!==I?(S=(0,i.jsxs)(`div`,{style:k,children:[pe,j,N,I]}),t[38]=pe,t[39]=j,t[40]=N,t[41]=I,t[42]=S):S=t[42],C=(e?.valid_from||e?.valid_until)&&(0,i.jsxs)(`div`,{style:{padding:`10px 12px`,background:`rgba(88, 166, 255, 0.08)`,border:`1px solid rgba(88, 166, 255, 0.2)`,borderRadius:8,fontSize:12,color:`#79c0ff`,fontFamily:`monospace`},children:[e?.valid_from?(0,i.jsxs)(`div`,{children:[`from: `,e.valid_from]}):null,e?.valid_until?(0,i.jsxs)(`div`,{children:[`until: `,e.valid_until]}):null]});let L,R,z;t[43]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,i.jsx)(`div`,{style:fe,children:`Actions`}),R={display:`flex`,flexDirection:`column`,gap:10},z={...se,width:`100%`,justifyContent:`center`},t[43]=L,t[44]=R,t[45]=z):(L=t[43],R=t[44],z=t[45]);let B;t[46]===c?B=t[47]:(B=(0,i.jsx)(`button`,{style:z,onClick:c,children:`Run Link Prediction`}),t[46]=c,t[47]=B);let V;t[48]===Symbol.for(`react.memo_cache_sentinel`)?(V={display:`flex`,gap:8,flexWrap:`wrap`},t[48]=V):V=t[48];let H;t[49]===m?H=t[50]:(H=(0,i.jsx)(`button`,{style:ce,onClick:()=>m(`json`),children:`Provenance JSON`}),t[49]=m,t[50]=H);let U;t[51]===m?U=t[52]:(U=(0,i.jsx)(`button`,{style:ce,onClick:()=>m(`markdown`),children:`Provenance MD`}),t[51]=m,t[52]=U);let W;t[53]!==H||t[54]!==U?(W=(0,i.jsxs)(`div`,{style:V,children:[H,U]}),t[53]=H,t[54]=U,t[55]=W):W=t[55];let G;t[56]!==B||t[57]!==W?(G=(0,i.jsxs)(`div`,{style:R,children:[B,W]}),t[56]=B,t[57]=W,t[58]=G):G=t[58];let K;t[59]===s?K=t[60]:(K=e=>s(e.target.value),t[59]=s,t[60]=K);let q;t[61]!==o||t[62]!==K?(q=(0,i.jsx)(`input`,{value:o,onChange:K,placeholder:`Optional candidate type filter, e.g. disease`,style:oe}),t[61]=o,t[62]=K,t[63]=q):q=t[63],t[64]!==G||t[65]!==q?(w=(0,i.jsxs)(`section`,{style:de,children:[L,G,q]}),t[64]=G,t[65]=q,t[66]=w):w=t[66];let J;t[67]===Symbol.for(`react.memo_cache_sentinel`)?(J=(0,i.jsx)(`div`,{style:fe,children:`Trace Path`}),t[67]=J):J=t[67];let Y;t[68]===d?Y=t[69]:(Y=e=>d(e.target.value),t[68]=d,t[69]=Y);let X;t[70]!==u||t[71]!==Y?(X=(0,i.jsx)(`input`,{value:u,onChange:Y,placeholder:`Target node ID`,style:oe}),t[70]=u,t[71]=Y,t[72]=X):X=t[72];let Z;t[73]===f?Z=t[74]:(Z=(0,i.jsx)(`button`,{style:se,onClick:f,children:`Trace Causal Path`}),t[73]=f,t[74]=Z);let Q;t[75]===p?Q=t[76]:(Q=p?.path?.length?(0,i.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:6,marginTop:10},children:[p.path.map(ie),(0,i.jsxs)(`div`,{style:{color:`#79c0ff`,fontSize:12,marginTop:4},children:[`total weight: `,p.total_weight.toFixed(3)]})]}):(0,i.jsx)(`div`,{style:l,children:`Choose a target or click a candidate prediction to prepare a path trace.`}),t[75]=p,t[76]=Q),t[77]!==X||t[78]!==Z||t[79]!==Q?(T=(0,i.jsxs)(`section`,{style:de,children:[J,X,Z,Q]}),t[77]=X,t[78]=Z,t[79]=Q,t[80]=T):T=t[80];let ve=a.length>0,ye;t[81]===Symbol.for(`react.memo_cache_sentinel`)?(ye=(0,i.jsx)(`summary`,{className:`node-panel-summary`,children:`Candidate Links`}),t[81]=ye):ye=t[81];let $;t[82]!==d||t[83]!==a?($=(0,i.jsx)(`div`,{className:`node-panel-body`,children:a.length>0?(0,i.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:8},children:a.map(e=>(0,i.jsxs)(`button`,{style:le,onClick:()=>d(e.target),children:[(0,i.jsx)(`div`,{style:{color:`#fff`,fontWeight:600},children:e.label||e.target}),(0,i.jsx)(`div`,{style:{color:`#8b949e`,fontSize:12},children:e.type}),(0,i.jsxs)(`div`,{style:{color:`#58a6ff`,fontSize:12,marginTop:4},children:[`confidence `,e.score.toFixed(3)]})]},`${e.target}-${e.type}`))}):(0,i.jsx)(`div`,{style:l,children:`Run link prediction to surface likely next-hop relationships.`})}),t[82]=d,t[83]=a,t[84]=$):$=t[84],t[85]!==ve||t[86]!==$?(g=(0,i.jsxs)(`details`,{className:`node-panel-collapse`,open:ve,children:[ye,$]}),t[85]=ve,t[86]=$,t[87]=g):g=t[87];let be;t[88]===Symbol.for(`react.memo_cache_sentinel`)?(be=(0,i.jsx)(`summary`,{className:`node-panel-summary`,children:`Source Attribution`}),t[88]=be):be=t[88];let xe=E.length?(0,i.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:8},children:E.map(re)}):(0,i.jsx)(`div`,{style:l,children:`No explicit attribution metadata was found on this node.`});t[89]===xe?_=t[90]:(_=(0,i.jsxs)(`details`,{className:`node-panel-collapse`,children:[be,(0,i.jsx)(`div`,{className:`node-panel-body`,children:xe})]}),t[89]=xe,t[90]=_),y=`node-panel-collapse`,t[91]===Symbol.for(`react.memo_cache_sentinel`)?(b=(0,i.jsx)(`summary`,{className:`node-panel-summary`,children:`Properties`}),t[91]=b):b=t[91],h=`node-panel-body`,v=O.length?(0,i.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:8},children:O.map(ne)}):(0,i.jsx)(`div`,{style:l,children:`No additional properties are attached to this node.`}),t[1]=r,t[2]=m,t[3]=d,t[4]=s,t[5]=c,t[6]=f,t[7]=p,t[8]=u,t[9]=o,t[10]=a,t[11]=h,t[12]=g,t[13]=_,t[14]=v,t[15]=y,t[16]=b,t[17]=x,t[18]=S,t[19]=C,t[20]=w,t[21]=T}else h=t[11],g=t[12],_=t[13],v=t[14],y=t[15],b=t[16],x=t[17],S=t[18],C=t[19],w=t[20],T=t[21];let E;t[92]!==h||t[93]!==v?(E=(0,i.jsx)(`div`,{className:h,children:v}),t[92]=h,t[93]=v,t[94]=E):E=t[94];let D;t[95]!==E||t[96]!==y||t[97]!==b?(D=(0,i.jsxs)(`details`,{className:y,children:[b,E]}),t[95]=E,t[96]=y,t[97]=b,t[98]=D):D=t[98];let O;return t[99]!==g||t[100]!==_||t[101]!==D||t[102]!==x||t[103]!==S||t[104]!==C||t[105]!==w||t[106]!==T?(O=(0,i.jsxs)(`aside`,{style:x,children:[S,C,w,T,g,_,D]}),t[99]=g,t[100]=_,t[101]=D,t[102]=x,t[103]=S,t[104]=C,t[105]=w,t[106]=T,t[107]=O):O=t[107],O}function ne(e){let[t,n]=e;return(0,i.jsxs)(`div`,{style:c,children:[(0,i.jsx)(`div`,{style:{color:`rgba(88, 166, 255, 0.7)`,fontSize:11,marginBottom:4},children:t}),(0,i.jsx)(`div`,{style:{color:`#e6edf3`,fontSize:13,wordBreak:`break-word`},children:typeof n==`object`?JSON.stringify(n):String(n)})]},t)}function re(e){let{key:t,value:n}=e;return(0,i.jsxs)(`div`,{style:c,children:[(0,i.jsx)(`div`,{style:{color:`rgba(88, 166, 255, 0.7)`,fontSize:11,marginBottom:4},children:t}),(0,i.jsx)(`div`,{style:{color:`#e6edf3`,fontSize:13,wordBreak:`break-word`},children:typeof n==`object`?JSON.stringify(n):String(n)})]},t)}function ie(e,t){return(0,i.jsxs)(`div`,{style:s,children:[t+1,`. `,e]},`${e}-${t}`)}function ae(e){let[t]=e;return![`x`,`y`,`valid_from`,`valid_until`,`content`,`source`,`source_url`,`pmid`,`pmids`,`evidence`,`provenance`,`confidence`].includes(t)}var oe={width:`100%`,background:`rgba(4, 10, 18, 0.5)`,border:`1px solid ${r.palette.background.shellBorder}`,color:`#edf5ff`,borderRadius:12,padding:`11px 13px`,fontSize:13,boxShadow:`inset 0 1px 0 rgba(255,255,255,0.03)`},se={background:`linear-gradient(135deg, rgba(24, 63, 133, 0.42), rgba(35, 85, 176, 0.28))`,color:`#fff`,border:`1px solid ${r.palette.background.shellBorder}`,borderRadius:12,padding:`9px 12px`,cursor:`pointer`,fontWeight:700,fontSize:12,display:`inline-flex`,alignItems:`center`,justifyContent:`center`,boxShadow:`0 8px 22px ${r.palette.background.shellGlow}`},ce={...se,background:`rgba(255, 255, 255, 0.03)`,border:`1px solid rgba(255, 255, 255, 0.08)`,color:`#c6d4e3`,fontWeight:600},le={textAlign:`left`,padding:12,background:`rgba(88, 166, 255, 0.08)`,border:`1px solid rgba(88, 166, 255, 0.12)`,borderRadius:10,cursor:`pointer`},s={color:`#e6edf3`,fontSize:13,padding:`8px 10px`,background:`rgba(255, 255, 255, 0.03)`,borderRadius:8},c={background:`rgba(0, 0, 0, 0.2)`,padding:`10px 12px`,borderRadius:10,border:`1px solid rgba(255, 255, 255, 0.05)`},l={color:`#8b949e`,fontSize:12,lineHeight:1.5},ue={background:`rgba(255, 255, 255, 0.04)`,color:`#9fb6d2`,padding:`4px 8px`,borderRadius:999,fontSize:11,border:`1px solid rgba(255, 255, 255, 0.06)`},de={display:`flex`,flexDirection:`column`,gap:10,padding:14,background:`linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.015))`,border:`1px solid rgba(255, 255, 255, 0.06)`,borderRadius:14},fe={color:`#8b949e`,fontSize:11,fontWeight:700,textTransform:`uppercase`,letterSpacing:`0.08em`};export{o as GraphInspectorPanel};\ No newline at end of filediff --git a/semantica/static/assets/GraphWorkspace-Bqx0S-ru.js b/semantica/static/assets/GraphWorkspace-Bqx0S-ru.jsdeleted file mode 100644index 5bdd5fd9..00000000--- a/semantica/static/assets/GraphWorkspace-Bqx0S-ru.js+++ /dev/null@@ -1,698 +0,0 @@-const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/TimelinePanel-DZ8Z1JsZ.js","assets/rolldown-runtime-B1FJdls4.js","assets/index-DDOaKEbH.js","assets/query-vendor-Cbp9LWgA.js","assets/index-Bw-pAf6p.css","assets/timeline-vendor-DxuOyw5t.js","assets/timeline-vendor-5-TIXSrZ.css","assets/GraphInspectorPanel-MLghMyni.js","assets/graphTheme-aSRma4TX.js","assets/graph-vendor-pbzH-eyf.js","assets/explorationEffectsPluginPhaseC-D23Zx1hX.js","assets/explorationEffectsPluginPhaseC-D5jYu8XU.js","assets/neighborhoodPanelPlugin-DtCzBl4D.js","assets/neighborhoodPanelPlugin-qsLfEPn1.js","assets/temporalOverlayPlugin-tGkpBW1s.js","assets/temporalOverlayPlugin-l3pE8rf_.js"])))=>i.map(i=>d[i]);-import{i as e,t}from"./rolldown-runtime-B1FJdls4.js";import{T as n,a as r,i,n as a}from"./query-vendor-Cbp9LWgA.js";import{r as o,t as s}from"./index-DDOaKEbH.js";import{a as c,c as l,d as u,i as d,l as f,n as p,o as m,r as h,s as g,t as _,u as v}from"./graph-vendor-pbzH-eyf.js";import{a as y,c as b,d as x,f as S,i as C,l as w,m as T,n as E,o as D,p as O,r as k,s as A,t as j,u as M}from"./graphTheme-aSRma4TX.js";import"./explorationEffectsPluginPhaseC-D5jYu8XU.js";import"./neighborhoodPanelPlugin-qsLfEPn1.js";import"./temporalOverlayPlugin-l3pE8rf_.js";var N=e(n(),1),P=o(),F=r();function I(...e){return e.filter(Boolean).join(` `)}function L(e){let t=(0,P.c)(10),{children:n,tone:r,padding:i,className:a,style:o}=e,s=r===void 0?`default`:r,c=i===void 0?`default`:i,l=s!==`default`&&`sem-surface--${s}`,u;t[0]!==a||t[1]!==l?(u=I(`sem-surface`,l,a),t[0]=a,t[1]=l,t[2]=u):u=t[2];let d;t[3]!==n||t[4]!==c?(d=c===`none`?n:(0,F.jsx)(`div`,{className:I(`sem-surface-body`,c===`tight`&&`sem-surface-body--tight`),children:n}),t[3]=n,t[4]=c,t[5]=d):d=t[5];let f;return t[6]!==o||t[7]!==u||t[8]!==d?(f=(0,F.jsx)(`div`,{className:u,style:o,children:d}),t[6]=o,t[7]=u,t[8]=d,t[9]=f):f=t[9],f}function R(e){let t=(0,P.c)(5),{children:n,tone:r}=e,i=r===void 0?`default`:r,a=i!==`default`&&`sem-chip--${i}`,o;t[0]===a?o=t[1]:(o=I(`sem-chip`,a),t[0]=a,t[1]=o);let s;return t[2]!==n||t[3]!==o?(s=(0,F.jsx)(`span`,{className:o,children:n}),t[2]=n,t[3]=o,t[4]=s):s=t[4],s}function z(e){let t=(0,P.c)(8),{children:n,open:r,className:i}=e,a=r===void 0?!0:r,o;t[0]===i?o=t[1]:(o=I(`sem-inspector`,i),t[0]=i,t[1]=o);let s=a?`block`:`none`,c;t[2]===s?c=t[3]:(c={display:s},t[2]=s,t[3]=c);let l;return t[4]!==n||t[5]!==o||t[6]!==c?(l=(0,F.jsx)(L,{className:o,padding:`none`,style:c,children:n}),t[4]=n,t[5]=o,t[6]=c,t[7]=l):l=t[7],l}var ee=e(_(),1),te={id:`hover-activation`,attach:()=>{},detach:()=>{},onNodeEnter:(e,t)=>{e.setHoveredNodeId(t)},onNodeLeave:(e,t)=>{e.getInteractionState().hoveredNodeId===t&&e.setHoveredNodeId(null)}},B={id:`click-selection`,attach:()=>{},detach:()=>{},onNodeClick:(e,t)=>{e.setHoveredNodeId(t),e.onEdgeSelectionChange(``),e.onNodeSelectionChange(t)},onEdgeClick:(e,t)=>{e.setHoveredNodeId(null),e.onEdgeSelectionChange(t)},onStageClick:e=>{e.setHoveredNodeId(null),e.onEdgeSelectionChange(``),e.onNodeSelectionChange(``)}},ne={id:`focus-camera`,attach:()=>{},detach:()=>{},performAction:(e,t)=>t.type===`focusNode`?(e.focusNodeInView(t.nodeId),!0):!1};function re(){let e=``;return{id:`search-focus`,attach:()=>{},detach:()=>{e=``},onStateChange:(t,n)=>{let r=n.focusedNodeId;if(!r||r===e){e=r;return}e=r,t.dispatchAction({type:`focusNode`,nodeId:r})}}}function V(){let e=``;return{id:`path-highlight`,attach:()=>{},detach:()=>{e=``},onStateChange:(t,n)=>{let r=n.activePath.join(`::`);r!==e&&(e=r,t.sigma.refresh())}}}var ie={id:`fit-view`,attach:()=>{},detach:()=>{},performAction:(e,t)=>t.type===`fitView`?(e.fitCurrentView(),!0):!1};function ae(){let e=null;return{id:`view-mode-switch`,attach:()=>{},detach:()=>{e=null},onStateChange:(t,n)=>{if(n.viewMode!==e){if(e=n.viewMode,n.focusedNodeId){t.dispatchAction({type:`focusNode`,nodeId:n.focusedNodeId});return}t.dispatchAction({type:`fitView`})}}}}var H=j.focus.maxNeighbors,U=j.focus.ringCapacity,oe=j.focus.ringGap,W=j.focus.primaryLabels;function se(e){return k(0,Math.log2(Math.max(e,1))/1.85,1)}function ce(e,t,n,r){e.forEachDirectedEdge(t,n,(e,t)=>{r(String(e),t)})}function G(e,t,n){let r=[];return ce(e,t,n,e=>{r.push(e)}),r}function K(e,t,n=[]){if(n.length>0)return new Set(n.filter(t=>e.hasEdge(t)));let r=new Set;for(let n=0;n<t.length-1;n+=1)G(e,t[n],t[n+1]).forEach(e=>r.add(e));return r}function q(e,...t){let n=new Set;return t.forEach(t=>{if(!t||!e.hasEdge(t))return;let[r,i]=e.extremities(t);n.add(r),n.add(i)}),n}function J(e,t){let n=new Set,r=Array.from(t);for(let t=0;t<r.length;t+=1){let i=r[t];for(let t=0;t<r.length;t+=1){let a=r[t];i!==a&&G(e,i,a).forEach(e=>n.add(e))}}return n}function Y(e,t){if(!t)return new Set;let n=new Set(t.activePath),r=t.hoveredNodeId||t.selectedNodeId;return r&&e.hasNode(r)&&de(r).forEach(e=>n.add(e)),q(e,t.selectedEdgeId).forEach(e=>n.add(e)),n}function X(e,t){if(!t)return new Set;let n=new Set(K(e,t.activePath,t.activePathEdgeIds)),r=t.hoveredNodeId||t.selectedNodeId;return r&&e.hasNode(r)&&J(e,de(r)).forEach(e=>n.add(e)),t.selectedEdgeId&&n.add(t.selectedEdgeId),n}function Z(e,t){return Array.from(t).filter(t=>e.hasEdge(t))}function le(e,t,n){let r=new Set,i=new Set;return Y(e,t).forEach(e=>r.add(e)),Y(e,n).forEach(e=>r.add(e)),X(e,t).forEach(e=>i.add(e)),X(e,n).forEach(e=>i.add(e)),{nodes:Array.from(r).filter(t=>e.hasNode(t)),edges:Z(e,i)}}function ue(e,t){let n=0;return ce(S,e,t,(e,t)=>{n=Math.max(n,Number(t?.weight??0))}),ce(S,t,e,(e,t)=>{n=Math.max(n,Number(t?.weight??0))}),n}function Q(e){return S.neighbors(e).map(t=>({id:t,weight:ue(e,t),degree:S.degree(t)})).sort((e,t)=>t.weight===e.weight?t.degree===e.degree?e.id.localeCompare(t.id):t.degree-e.degree:t.weight-e.weight).map(e=>e.id)}function de(e){let t=Q(e).slice(0,H);return new Set([e,...t])}function fe(e,t,n,r,i,a){if(K(e,t.activePath,t.activePathEdgeIds).has(n)||t.selectedEdgeId===n)return!0;let o=t.selectedNodeId;if(o&&e.hasNode(o)){if(r===o||i===o)return!0;let e=de(o);return e.has(r)&&e.has(i)}return t.zoomTier===`inspection`?Number(a.visualPriority??0)>=j.zoomTiers[t.zoomTier].edgePriorityThreshold:!1}function pe(e,t,n,r,i,a){let o=String(r.baseColor||a||e.palette.semantic[0]),s=n===`neighbor`?e.palette.overview.nodeTintMix+.09:e.palette.overview.nodeTintMix,c=E(e.palette.overview.nodeCore,o,Math.min(.74,e.palette.overview.nodeCoreMix+s));switch(e.nodes.states[n].color){case`selected`:return e.palette.accent.selected;case`hovered`:return e.palette.accent.hovered;case`path`:return e.palette.accent.path;case`muted`:return t===`overview`?A(e.palette.overview.nodeMuted,.42):String(r.mutedColor||A(o,e.nodes.mutedAlpha));default:if(t===`overview`){let t=se(i);return A(E(c,o,.3+.26*t),Math.min(.98,e.palette.overview.nodeCoreAlpha+t*.18))}return o}}function me(e,t,n,r,i,a){let o=String(r.baseColor||a||e.palette.semantic[0]),s=se(i),c=E(e.palette.overview.nodeBase,o,(n===`neighbor`?.02:.012)+s*.024);return t===`overview`?n===`selected`?A(E(e.palette.overview.nodeBase,e.palette.accent.selected,.05),.98):n===`hovered`?A(E(e.palette.overview.nodeBase,e.palette.accent.hovered,.06),.98):n===`path`?A(E(e.palette.overview.nodeBase,e.palette.accent.path,.06),.97):n===`muted`||n===`inactive`?A(e.palette.overview.nodeMuted,.22):A(c,e.palette.overview.nodeShellAlpha):A(E(e.palette.overview.nodeBase,o,.26),.95)}function he(e,t,n){let r=se(n);if(e===`overview`)switch(t){case`selected`:return .34+r*.08;case`hovered`:return .32+r*.08;case`path`:return .28+r*.07;case`neighbor`:return .2+r*.06;case`muted`:case`inactive`:return .08+r*.03;default:return .16+r*.08}switch(t){case`selected`:return .52;case`hovered`:return .48;case`path`:return .44;case`neighbor`:return .3;case`muted`:case`inactive`:return .1;default:return e===`structure`?.22:.28}}function ge(e,t,n,r,i){let a=t===`overview`?e.palette.overview.edgeInspection:e.palette.muted.edgeInspection,o=String(r.baseColor||i||a);switch(e.edges.states[n].color){case`hover`:return e.palette.accent.hovered;case`path`:return e.palette.accent.path;case`backbone`:return t===`overview`?e.palette.overview.edgeBackbone:e.palette.muted.edgeFocus;case`focus`:return e.palette.muted.edgeFocus;case`overview`:return e.palette.muted.edgeOverview;case`structure`:return t===`overview`?e.palette.overview.edgeStructure:e.palette.muted.edgeStructure;case`inspection`:return t===`overview`?e.palette.overview.edgeInspection:e.palette.muted.edgeInspection;case`muted`:return t===`overview`?e.palette.overview.edgeStructure:String(r.mutedColor||e.palette.muted.edgeOverview);default:return o}}function _e(e,t,n){if(t===`selected`)return n.ringColor||e.nodes.selectedRing.color;if(t===`hovered`)return e.palette.accent.hovered;if(t===`path`)return e.palette.accent.path}function ve(e,t,n){return t===`selected`&&b(n,e.nodes.selectedRing.visibleFrom)?e.nodes.selectedRing.nativeSize:t===`hovered`?Math.max(1.45,e.nodes.selectedRing.nativeSize-.35):t===`path`?Math.max(1.2,e.nodes.selectedRing.nativeSize-.55):0}function ye(e,t,n,r,i,a,o,s){return n&&e===n?`hovered`:r&&e===r?`selected`:s.has(e)?`path`:a.has(e)||o.has(e)?`neighbor`:n||r||i||s.size>0?t===`overview`?`default`:`muted`:`default`}function be(e,t,n,r,i,a,o,s,c,l){let u=i||a;return c.has(e)?`path`:o&&e===o?`selected`:u&&(t===u||n===u)?i?`hovered`:`selected`:r!==`overview`&&s.has(t)&&s.has(n)?`neighbor`:r===`overview`&&l.has(e)?`backbone`:i||a||o||c.size>0?`muted`:r===`overview`?`inactive`:`default`}function xe(e,t){return e===`selected`?`selected`:t.nodeShapeVariant||t.nodeVariant||`default`}function Se(e,t){return e===`path`?`pathSignal`:(t.parallelCount??1)>1?`parallelCurve`:t.edgeVariant?t.edgeVariant:t.isBidirectional?`bidirectionalCurve`:t.arrowVisibilityPolicy===`contextual`?`directional`:`line`}function $(e,t,n,r,i){let a=e.zoomTiers[t],o=e.labels.forceVisibleStates.includes(n),s=r.labelVisibilityPolicy||`priority`;if(o||e.nodes.states[n].forceLabel)return!0;switch(s){case`always`:return!0;case`local`:return t!==`overview`&&n!==`default`&&n!==`muted`&&n!==`inactive`;case`priority`:return i>=a.labelThreshold;default:return!1}}function Ce(e,t,n,r,i,a){return n===`selected`||r===`selected`?i.ringColor||e.nodes.selectedRing.color:n===`hovered`?e.palette.accent.hovered:n===`path`?e.palette.accent.path:n===`muted`||n===`inactive`?A(i.strokeColor||i.borderColor||e.palette.overview.nodeBorder||e.palette.background.nodeBorder,t===`overview`?.26:.7):r===`temporal`?e.palette.accent.temporal:r===`provenance`?e.palette.accent.provenance:r===`inferred`?e.palette.accent.inferred:t===`overview`?A(E(e.palette.overview.nodeBorder,a,n===`neighbor`?.08:.03),n===`neighbor`?.24:.06):i.strokeColor||i.borderColor||e.palette.background.nodeBorder||a}function we(e,t,n,r,i,a=1){let o=e.zoomTiers[t],s=e.nodes.states[n],c=xe(n,r),l=e.nodes.variants[c],u=Number(r.baseSize||r.size||4),d=Number(r.labelPriority??0),f=pe(e,t,n,r,a,r.color),p=me(e,t,n,r,a,r.color),m=(n===`default`?o.nodeScale:s.sizeMultiplier)*l.sizeMultiplier,h=t===`overview`?1+se(a)*1.2:1,g=$(e,t,n,r,d),_=r.badgeKind||l.badgeKind,v=e.labels.forceVisibleStates.includes(n),y=!!(_&&(v||o.showBadges&&b(t,l.badgeVisibleFrom))&&n!==`muted`&&n!==`inactive`),x=ve(e,n,t),S=_e(e,n,r),C=x>0,w=n===`hovered`||n===`selected`||n===`path`,T=n===`muted`||n===`inactive`?e.nodes.strokeHierarchy[t].muted:v?e.nodes.strokeHierarchy[t].emphasis:e.nodes.strokeHierarchy[t].base;return{color:f,shellColor:p,coreScale:he(t,n,a),size:Math.max(u*m*h,s.minSize),forceLabel:g,label:g?i:``,zIndex:g&&s.zIndex===0?1:s.zIndex,hidden:!1,borderColor:Ce(e,t,n,c,r,f),borderSize:Math.max(.4,Number(r.borderSize??.85)+T+s.borderBoost+l.borderBoost-.8),nodeVariant:c,badgeKind:_,badgeCount:r.badgeCount,showBadge:y,showRing:C,ringColor:S,ringSize:x,showHalo:w,haloColor:r.haloColor||r.glowColor||A(f,e.overlays.hoverGlowAlpha+l.haloBoost)}}function Te(e,t,n,r,i){let a=e.edges.variants[r];return e.edges.states[n].forceArrow||a.arrowPolicy===`always`||a.arrowPolicy===`contextual`&&e.zoomTiers[t].showContextualArrows?`arrow`:n===`default`?Number(i.visualPriority??0)>=e.zoomTiers[t].arrowPriorityThreshold&&e.zoomTiers[t].showContextualArrows?`arrow`:`line`:i.type||a.baseType}function Ee(e,t,n,r,i,a){let o=e.edges.variants[n],s=n===`line`&&t===`selected`?Math.max(o.curveStrength,.14):o.curveStrength;if(s===0)return 0;if(typeof r.parallelCount==`number`&&r.parallelCount>1&&typeof r.parallelIndex==`number`){let e=(r.parallelCount-1)/2;return(r.parallelIndex-e)*s}return(n===`bidirectionalCurve`||n===`parallelCurve`||r.isBidirectional)&&i&&a?i.localeCompare(a)<=0?s:-s:s}function De(e,t,n,r,i,a){let o=e.zoomTiers[t],s=e.edges.states[n],c=Se(n,r),l=e.edges.variants[c],u=Number(r.baseSize||r.size||.9),d=Number(r.visualPriority??0),f=n===`default`&&d<o.edgePriorityThreshold&&c===`line`;if(s.hide||f)return{hidden:!0,zIndex:0,edgeVariant:c,arrowVisibilityPolicy:l.arrowPolicy,curveStrength:l.curveStrength,curvature:0};let p=(n===`default`?o.edgeSizeScale:s.sizeMultiplier)*l.sizeMultiplier,m=Te(e,t,n,c,r),h=o.showCurves&&t!==`overview`&&(c===`pathSignal`||n===`selected`||(n===`neighbor`||n===`hovered`)&&(c===`bidirectionalCurve`||c===`parallelCurve`)),g=h?Ee(e,n,c,r,i,a):0;return{hidden:!1,type:h?m===`arrow`?`curvedArrow`:`curve`:m,color:ge(e,t,n,r,r.color),size:Math.max(u*p,s.minSize),zIndex:s.zIndex,edgeVariant:c,arrowVisibilityPolicy:l.arrowPolicy,curveStrength:l.curveStrength,curvature:g}}function Oe(e,t,n=[]){let r=new u({type:`directed`,multi:!0,allowSelfLoops:!1}),i=Q(e).slice(0,H),a=new Set([e,...i]),o=new Set(i.slice(0,W)),s=new Set(t),c=K(S,t,n),l=(e,t)=>{r.hasNode(e)||r.addNode(e,t)},d=S.getNodeAttributes(e),f=we(j,`inspection`,`selected`,d,d.label);l(e,{...d,x:0,y:0,color:f.color,size:Math.max(f.size,22),baseColor:f.color,baseSize:Math.max(f.size,22),label:f.label}),i.forEach((e,t)=>{let n=S.getNodeAttributes(e),r=Math.floor(t/U),a=t%U,c=Math.min(U,i.length-r*U),u=oe*(r+1),d=Math.PI*2*a/c-Math.PI/2,f=we(j,`inspection`,s.has(e)?`path`:o.has(e)?`neighbor`:`default`,{...n,labelPriority:o.has(e)||s.has(e)?Math.max(Number(n.labelPriority??0),1):0},n.label);l(e,{...n,x:Math.cos(d)*u,y:Math.sin(d)*u,color:f.color,size:Math.max(f.size,8.5),baseColor:f.color,baseSize:Math.max(f.size,8.5),label:f.label})});for(let t of a)for(let n of a)t!==n&&ce(S,t,n,(i,a)=>{let o=De(j,`inspection`,c.has(i)?`path`:t===e||n===e?`selected`:`neighbor`,a,t,n);r.mergeDirectedEdgeWithKey(i,t,n,{...a,type:o.type,size:o.size,color:o.color,baseSize:o.size,baseColor:o.color,curvature:o.curvature})});return r}function ke(e,t,n,r){return r===`focused`&&e&&S.hasNode(e)&&e?Oe(e,t,n):S}function Ae(e,t,n,r,i,a,o,s){return{hoveredNodeId:e,selectedNodeId:t,selectedEdgeId:n,focusedNodeId:t,activePath:r,activePathEdgeIds:i,viewMode:a,zoomTier:o,isLayoutRunning:s}}var je=t(((e,t)=>{function n(e){return!e||typeof e!=`object`||typeof e==`function`||Array.isArray(e)||e instanceof Set||e instanceof Map||e instanceof RegExp||e instanceof Date}function r(e,t){e||={};var i={};for(var a in t){var o=e[a],s=t[a];if(!n(s)){i[a]=r(o,s);continue}o===void 0?i[a]=s:i[a]=o}return i}t.exports=r})),Me=t(((e,t)=>{var n=m();t.exports=function(e){if(!n(e))throw Error(`graphology-utils/infer-type: expecting a valid graphology instance.`);var t=e.type;return t===`mixed`?e.directedSize===0&&e.undirectedSize===0||e.directedSize>0&&e.undirectedSize>0?`mixed`:e.directedSize>0?`directed`:`undirected`:t}})),Ne=t(((e,t)=>{function n(e){if(typeof e!=`function`)throw Error(`obliterator/iterator: expecting a function!`);this.next=e}typeof Symbol<`u`&&(n.prototype[Symbol.iterator]=function(){return this}),n.of=function(){var e=arguments,t=e.length,r=0;return new n(function(){return r>=t?{done:!0}:{done:!1,value:e[r++]}})},n.empty=function(){return new n(function(){return{done:!0}})},n.fromSequence=function(e){var t=0,r=e.length;return new n(function(){return t>=r?{done:!0}:{done:!1,value:e[t++]}})},n.is=function(e){return e instanceof n?!0:typeof e==`object`&&!!e&&typeof e.next==`function`},t.exports=n})),Pe=t((e=>{var t=2**8-1,n=2**16-1,r=2**32-1,i=2**7-1,a=2**15-1,o=2**31-1;e.getPointerArray=function(e){var i=e-1;if(i<=t)return Uint8Array;if(i<=n)return Uint16Array;if(i<=r)return Uint32Array;throw Error(`mnemonist: Pointer Array of size > 4294967295 is not supported.`)},e.getSignedPointerArray=function(e){var t=e-1;return t<=i?Int8Array:t<=a?Int16Array:t<=o?Int32Array:Float64Array},e.getNumberType=function(e){return e===(e|0)?Math.sign(e)===-1?e<=127&&e>=-128?Int8Array:e<=32767&&e>=-32768?Int16Array:Int32Array:e<=255?Uint8Array:e<=65535?Uint16Array:Uint32Array:Float64Array};var s={Uint8Array:1,Int8Array:2,Uint16Array:3,Int16Array:4,Uint32Array:5,Int32Array:6,Float32Array:7,Float64Array:8};e.getMinimalRepresentation=function(t,n){var r=null,i=0,a,o,c,l,u;for(l=0,u=t.length;l<u;l++)c=n?n(t[l]):t[l],o=e.getNumberType(c),a=s[o.name],a>i&&(i=a,r=o);return r},e.isTypedArray=function(e){return typeof ArrayBuffer<`u`&&ArrayBuffer.isView(e)},e.concat=function(){var e=0,t,n,r;for(t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var i=new arguments[0].constructor(e);for(t=0,n=0;t<r;t++)i.set(arguments[t],n),n+=arguments[t].length;return i},e.indices=function(t){for(var n=new(e.getPointerArray(t))(t),r=0;r<t;r++)n[r]=r;return n}})),Fe=t(((e,t)=>{var n=Ne(),r=Pe().getPointerArray;function i(e,t){arguments.length<2&&(t=e,e=Array);var n=r(t);this.size=0,this.length=t,this.dense=new n(t),this.sparse=new n(t),this.vals=new e(t)}i.prototype.clear=function(){this.size=0},i.prototype.has=function(e){var t=this.sparse[e];return t<this.size&&this.dense[t]===e},i.prototype.get=function(e){var t=this.sparse[e];if(t<this.size&&this.dense[t]===e)return this.vals[t]},i.prototype.set=function(e,t){var n=this.sparse[e];return n<this.size&&this.dense[n]===e?(this.vals[n]=t,this):(this.dense[this.size]=e,this.sparse[e]=this.size,this.vals[this.size]=t,this.size++,this)},i.prototype.delete=function(e){var t=this.sparse[e];return t>=this.size||this.dense[t]!==e?!1:(t=this.dense[this.size-1],this.dense[this.sparse[e]]=t,this.sparse[t]=this.sparse[e],this.size--,!0)},i.prototype.forEach=function(e,t){t=arguments.length>1?t:this;for(var n=0;n<this.size;n++)e.call(t,this.vals[n],this.dense[n])},i.prototype.keys=function(){var e=this.size,t=this.dense,r=0;return new n(function(){if(r<e){var n=t[r];return r++,{value:n}}return{done:!0}})},i.prototype.values=function(){var e=this.size,t=this.vals,r=0;return new n(function(){if(r<e){var n=t[r];return r++,{value:n}}return{done:!0}})},i.prototype.entries=function(){var e=this.size,t=this.dense,r=this.vals,i=0;return new n(function(){if(i<e){var n=[t[i],r[i]];return i++,{value:n}}return{done:!0}})},typeof Symbol<`u`&&(i.prototype[Symbol.iterator]=i.prototype.entries),i.prototype.inspect=function(){for(var e=new Map,t=0;t<this.size;t++)e.set(this.dense[t],this.vals[t]);return Object.defineProperty(e,`constructor`,{value:i,enumerable:!1}),e.length=this.length,this.vals.constructor!==Array&&(e.type=this.vals.constructor.name),e},typeof Symbol<`u`&&(i.prototype[Symbol.for(`nodejs.util.inspect.custom`)]=i.prototype.inspect),t.exports=i})),Ie=t(((e,t)=>{var n=Ne(),r=Pe().getPointerArray;function i(e){var t=r(e);this.start=0,this.size=0,this.capacity=e,this.dense=new t(e),this.sparse=new t(e)}i.prototype.clear=function(){this.start=0,this.size=0},i.prototype.has=function(e){if(this.size===0)return!1;var t=this.sparse[e];return(t<this.capacity&&t>=this.start&&t<this.start+this.size||t<(this.start+this.size)%this.capacity)&&this.dense[t]===e},i.prototype.enqueue=function(e){var t=this.sparse[e];return this.size!==0&&(t<this.capacity&&t>=this.start&&t<this.start+this.size||t<(this.start+this.size)%this.capacity)&&this.dense[t]===e?this:(t=(this.start+this.size)%this.capacity,this.dense[t]=e,this.sparse[e]=t,this.size++,this)},i.prototype.dequeue=function(){if(this.size!==0){var e=this.start;this.size--,this.start++,this.start===this.capacity&&(this.start=0);var t=this.dense[e];return this.sparse[t]=this.capacity,t}},i.prototype.forEach=function(e,t){t=arguments.length>1?t:this;for(var n=this.capacity,r=this.size,i=this.start,a=0;a<r;)e.call(t,this.dense[i],a,this),i++,a++,i===n&&(i=0)},i.prototype.values=function(){var e=this.dense,t=this.capacity,r=this.size,i=this.start,a=0;return new n(function(){if(a>=r)return{done:!0};var n=e[i];return i++,a++,i===t&&(i=0),{value:n,done:!1}})},typeof Symbol<`u`&&(i.prototype[Symbol.iterator]=i.prototype.values),i.prototype.inspect=function(){var e=[];return this.forEach(function(t){e.push(t)}),Object.defineProperty(e,`constructor`,{value:i,enumerable:!1}),e.capacity=this.capacity,e},typeof Symbol<`u`&&(i.prototype[Symbol.for(`nodejs.util.inspect.custom`)]=i.prototype.inspect),t.exports=i})),Le=t(((e,t)=>{function n(e){return function(t){return typeof t!=`number`&&(t=t.length),Math.floor(e()*t)}}var r=n(Math.random);r.createRandomIndex=n,t.exports=r})),Re=t((e=>{var t=Pe(),n=je(),r=p().createEdgeWeightGetter,i=Symbol.for(`nodejs.util.inspect.custom`),a={getEdgeWeight:`weight`,keepDendrogram:!1,resolution:1};function o(e,i){i=n(i,a);var o=i.resolution,s=r(i.getEdgeWeight).fromEntry,c=(e.size-e.selfLoopCount)*2,l=t.getPointerArray(c),u=t.getPointerArray(e.order+1),d=i.getEdgeWeight?Float64Array:t.getPointerArray(e.size*2);this.C=e.order,this.M=0,this.E=c,this.U=0,this.resolution=o,this.level=0,this.graph=e,this.nodes=Array(e.order),this.keepDendrogram=i.keepDendrogram,this.neighborhood=new u(c),this.weights=new d(c),this.loops=new d(e.order),this.starts=new l(e.order+1),this.belongings=new u(e.order),this.dendrogram=[],this.mapping=null,this.counts=new u(e.order),this.unused=new u(e.order),this.totalWeights=new d(e.order);var f={},p,m=0,h=0,g=this;e.forEachNode(function(t){g.nodes[m]=t,f[t]=m,h+=e.undirectedDegreeWithoutSelfLoops(t),g.starts[m]=h,g.belongings[m]=m,g.counts[m]=1,m++}),e.forEachEdge(function(e,t,n,r,i,a,o){if(p=s(e,t,n,r,i,a,o),n=f[n],r=f[r],g.M+=p,n===r)g.totalWeights[n]+=p*2,g.loops[n]=p*2;else{g.totalWeights[n]+=p,g.totalWeights[r]+=p;var c=--g.starts[n],l=--g.starts[r];g.neighborhood[c]=r,g.neighborhood[l]=n,g.weights[c]=p,g.weights[l]=p}}),this.starts[m]=this.E,this.keepDendrogram?this.dendrogram.push(this.belongings.slice()):this.mapping=this.belongings.slice()}o.prototype.isolate=function(e,t){var n=this.belongings[e];if(this.counts[n]===1)return n;var r=this.unused[--this.U],i=this.loops[e];return this.totalWeights[n]-=t+i,this.totalWeights[r]+=t+i,this.belongings[e]=r,this.counts[n]--,this.counts[r]++,r},o.prototype.move=function(e,t,n){var r=this.belongings[e],i=this.loops[e];this.totalWeights[r]-=t+i,this.totalWeights[n]+=t+i,this.belongings[e]=n;var a=this.counts[r]--===1;this.counts[n]++,a&&(this.unused[this.U++]=r)},o.prototype.computeNodeDegree=function(e){var t,n,r,i=0;for(t=this.starts[e],n=this.starts[e+1];t<n;t++)r=this.weights[t],i+=r;return i},o.prototype.expensiveIsolate=function(e){var t=this.computeNodeDegree(e);return this.isolate(e,t)},o.prototype.expensiveMove=function(e,t){var n=this.computeNodeDegree(e);this.move(e,n,t)},o.prototype.zoomOut=function(){var e=Array(this.C-this.U),n={},r=this.nodes.length,i=0,a=0,o,s,c,l,u,d,f,p,m;for(o=0,c=this.C;o<c;o++)d=this.belongings[o],d in n||(n[d]=i,e[i]={adj:{},totalWeights:this.totalWeights[d],internalWeights:0},i++),this.belongings[o]=n[d];var h,g;if(this.keepDendrogram){for(h=this.dendrogram[this.level],g=new(t.getPointerArray(i))(r),o=0;o<r;o++)g[o]=this.belongings[h[o]];this.dendrogram.push(g)}else for(o=0;o<r;o++)this.mapping[o]=this.belongings[this.mapping[o]];for(o=0,c=this.C;o<c;o++)for(d=this.belongings[o],p=e[d],m=p.adj,p.internalWeights+=this.loops[o],s=this.starts[o],l=this.starts[o+1];s<l;s++){if(u=this.neighborhood[s],f=this.belongings[u],d===f){p.internalWeights+=this.weights[s];continue}f in m||(m[f]=0),m[f]+=this.weights[s]}for(this.C=i,u=0,d=0;d<i;d++)for(f in p=e[d],m=p.adj,d=+d,this.totalWeights[d]=p.totalWeights,this.loops[d]=p.internalWeights,this.counts[d]=1,this.starts[d]=u,this.belongings[d]=d,m)this.neighborhood[u]=+f,this.weights[u]=m[f],a++,u++;return this.starts[i]=a,this.E=a,this.U=0,this.level++,n},o.prototype.modularity=function(){var e,t,n,r,i,a=0,o=this.M*2,s=new Float64Array(this.C);for(n=0;n<this.C;n++)for(e=this.belongings[n],s[e]+=this.loops[n],r=this.starts[n],i=this.starts[n+1];r<i;r++)t=this.belongings[this.neighborhood[r]],e===t&&(s[e]+=this.weights[r]);for(n=0;n<this.C;n++)a+=s[n]/o-(this.totalWeights[n]/o)**2*this.resolution;return a},o.prototype.delta=function(e,t,n,r){var i=this.M,a=this.totalWeights[r];return t+=this.loops[e],n/i-a*t*this.resolution/(2*i*i)},o.prototype.deltaWithOwnCommunity=function(e,t,n,r){var i=this.M,a=this.totalWeights[r];return t+=this.loops[e],n/i-(a-t)*t*this.resolution/(2*i*i)},o.prototype.fastDelta=function(e,t,n,r){var i=this.M,a=this.totalWeights[r];return t+=this.loops[e],n-t*a*this.resolution/(2*i)},o.prototype.fastDeltaWithOwnCommunity=function(e,t,n,r){var i=this.M,a=this.totalWeights[r];return t+=this.loops[e],n-t*(a-t)*this.resolution/(2*i)},o.prototype.bounds=function(e){return[this.starts[e],this.starts[e+1]]},o.prototype.project=function(){var e=this,t={};return e.nodes.slice(0,this.C).forEach(function(n,r){t[n]=Array.from(e.neighborhood.slice(e.starts[r],e.starts[r+1])).map(function(t){return e.nodes[t]})}),t},o.prototype.collect=function(e){arguments.length<1&&(e=this.level);var t={},n=this.keepDendrogram?this.dendrogram[e]:this.mapping,r,i;for(r=0,i=n.length;r<i;r++)t[this.nodes[r]]=n[r];return t},o.prototype.assign=function(e,t){arguments.length<2&&(t=this.level);var n=this.keepDendrogram?this.dendrogram[t]:this.mapping,r,i;for(r=0,i=n.length;r<i;r++)this.graph.setNodeAttribute(this.nodes[r],e,n[r])},o.prototype[i]=function(){var e={};Object.defineProperty(e,`constructor`,{value:o,enumerable:!1}),e.C=this.C,e.M=this.M,e.E=this.E,e.U=this.U,e.resolution=this.resolution,e.level=this.level,e.nodes=this.nodes,e.starts=this.starts.slice(0,e.C+1);var t=[`neighborhood`,`weights`],n=[`counts`,`loops`,`belongings`,`totalWeights`],r=this;return t.forEach(function(t){e[t]=r[t].slice(0,e.E)}),n.forEach(function(t){e[t]=r[t].slice(0,e.C)}),e.unused=this.unused.slice(0,this.U),this.keepDendrogram?e.dendrogram=this.dendrogram:e.mapping=this.mapping,e};function s(e,i){i=n(i,a);var o=i.resolution,s=r(i.getEdgeWeight).fromEntry,c=(e.size-e.selfLoopCount)*2,l=t.getPointerArray(c),u=t.getPointerArray(e.order+1),d=i.getEdgeWeight?Float64Array:t.getPointerArray(e.size*2);this.C=e.order,this.M=0,this.E=c,this.U=0,this.resolution=o,this.level=0,this.graph=e,this.nodes=Array(e.order),this.keepDendrogram=i.keepDendrogram,this.neighborhood=new u(c),this.weights=new d(c),this.loops=new d(e.order),this.starts=new l(e.order+1),this.offsets=new l(e.order),this.belongings=new u(e.order),this.dendrogram=[],this.counts=new u(e.order),this.unused=new u(e.order),this.totalInWeights=new d(e.order),this.totalOutWeights=new d(e.order);var f={},p,m=0,h=0,g=this;e.forEachNode(function(t){g.nodes[m]=t,f[t]=m,h+=e.outDegreeWithoutSelfLoops(t),g.starts[m]=h,h+=e.inDegreeWithoutSelfLoops(t),g.offsets[m]=h,g.belongings[m]=m,g.counts[m]=1,m++}),e.forEachEdge(function(e,t,n,r,i,a,o){if(p=s(e,t,n,r,i,a,o),n=f[n],r=f[r],g.M+=p,n===r)g.loops[n]+=p,g.totalInWeights[n]+=p,g.totalOutWeights[n]+=p;else{g.totalOutWeights[n]+=p,g.totalInWeights[r]+=p;var c=--g.starts[n],l=--g.offsets[r];g.neighborhood[c]=r,g.neighborhood[l]=n,g.weights[c]=p,g.weights[l]=p}}),this.starts[m]=this.E,this.keepDendrogram?this.dendrogram.push(this.belongings.slice()):this.mapping=this.belongings.slice()}s.prototype.bounds=o.prototype.bounds,s.prototype.inBounds=function(e){return[this.offsets[e],this.starts[e+1]]},s.prototype.outBounds=function(e){return[this.starts[e],this.offsets[e]]},s.prototype.project=o.prototype.project,s.prototype.projectIn=function(){var e=this,t={};return e.nodes.slice(0,this.C).forEach(function(n,r){t[n]=Array.from(e.neighborhood.slice(e.offsets[r],e.starts[r+1])).map(function(t){return e.nodes[t]})}),t},s.prototype.projectOut=function(){var e=this,t={};return e.nodes.slice(0,this.C).forEach(function(n,r){t[n]=Array.from(e.neighborhood.slice(e.starts[r],e.offsets[r])).map(function(t){return e.nodes[t]})}),t},s.prototype.isolate=function(e,t,n){var r=this.belongings[e];if(this.counts[r]===1)return r;var i=this.unused[--this.U],a=this.loops[e];return this.totalInWeights[r]-=t+a,this.totalInWeights[i]+=t+a,this.totalOutWeights[r]-=n+a,this.totalOutWeights[i]+=n+a,this.belongings[e]=i,this.counts[r]--,this.counts[i]++,i},s.prototype.move=function(e,t,n,r){var i=this.belongings[e],a=this.loops[e];this.totalInWeights[i]-=t+a,this.totalInWeights[r]+=t+a,this.totalOutWeights[i]-=n+a,this.totalOutWeights[r]+=n+a,this.belongings[e]=r;var o=this.counts[i]--===1;this.counts[r]++,o&&(this.unused[this.U++]=i)},s.prototype.computeNodeInDegree=function(e){var t,n,r,i=0;for(t=this.offsets[e],n=this.starts[e+1];t<n;t++)r=this.weights[t],i+=r;return i},s.prototype.computeNodeOutDegree=function(e){var t,n,r,i=0;for(t=this.starts[e],n=this.offsets[e];t<n;t++)r=this.weights[t],i+=r;return i},s.prototype.expensiveMove=function(e,t){var n=this.computeNodeInDegree(e),r=this.computeNodeOutDegree(e);this.move(e,n,r,t)},s.prototype.zoomOut=function(){var e=Array(this.C-this.U),n={},r=this.nodes.length,i=0,a=0,o,s,c,l,u,d,f,p,m,h,g,_,v;for(o=0,c=this.C;o<c;o++)d=this.belongings[o],d in n||(n[d]=i,e[i]={inAdj:{},outAdj:{},totalInWeights:this.totalInWeights[d],totalOutWeights:this.totalOutWeights[d],internalWeights:0},i++),this.belongings[o]=n[d];var y,b;if(this.keepDendrogram){for(y=this.dendrogram[this.level],b=new(t.getPointerArray(i))(r),o=0;o<r;o++)b[o]=this.belongings[y[o]];this.dendrogram.push(b)}else for(o=0;o<r;o++)this.mapping[o]=this.belongings[this.mapping[o]];for(o=0,c=this.C;o<c;o++)for(d=this.belongings[o],m=this.offsets[o],p=e[d],_=p.inAdj,v=p.outAdj,p.internalWeights+=this.loops[o],s=this.starts[o],l=this.starts[o+1];s<l;s++){if(u=this.neighborhood[s],f=this.belongings[u],h=s<m,g=h?v:_,d===f){h&&(p.internalWeights+=this.weights[s]);continue}f in g||(g[f]=0),g[f]+=this.weights[s]}for(this.C=i,u=0,d=0;d<i;d++){for(f in p=e[d],_=p.inAdj,v=p.outAdj,d=+d,this.totalInWeights[d]=p.totalInWeights,this.totalOutWeights[d]=p.totalOutWeights,this.loops[d]=p.internalWeights,this.counts[d]=1,this.starts[d]=u,this.belongings[d]=d,v)this.neighborhood[u]=+f,this.weights[u]=v[f],a++,u++;for(f in this.offsets[d]=u,_)this.neighborhood[u]=+f,this.weights[u]=_[f],a++,u++}return this.starts[i]=a,this.E=a,this.U=0,this.level++,n},s.prototype.modularity=function(){var e,t,n,r,i,a=0,o=this.M,s=new Float64Array(this.C);for(n=0;n<this.C;n++)for(e=this.belongings[n],s[e]+=this.loops[n],r=this.starts[n],i=this.offsets[n];r<i;r++)t=this.belongings[this.neighborhood[r]],e===t&&(s[e]+=this.weights[r]);for(n=0;n<this.C;n++)a+=s[n]/o-this.totalInWeights[n]*this.totalOutWeights[n]/o**2*this.resolution;return a},s.prototype.delta=function(e,t,n,r,i){var a=this.M,o=this.totalInWeights[i],s=this.totalOutWeights[i],c=this.loops[e];return t+=c,n+=c,r/a-(n*o+t*s)*this.resolution/(a*a)},s.prototype.deltaWithOwnCommunity=function(e,t,n,r,i){var a=this.M,o=this.totalInWeights[i],s=this.totalOutWeights[i],c=this.loops[e];return t+=c,n+=c,r/a-(n*(o-t)+t*(s-n))*this.resolution/(a*a)},s.prototype.collect=o.prototype.collect,s.prototype.assign=o.prototype.assign,s.prototype[i]=function(){var e={};Object.defineProperty(e,`constructor`,{value:s,enumerable:!1}),e.C=this.C,e.M=this.M,e.E=this.E,e.U=this.U,e.resolution=this.resolution,e.level=this.level,e.nodes=this.nodes,e.starts=this.starts.slice(0,e.C+1);var t=[`neighborhood`,`weights`],n=[`counts`,`offsets`,`loops`,`belongings`,`totalInWeights`,`totalOutWeights`],r=this;return t.forEach(function(t){e[t]=r[t].slice(0,e.E)}),n.forEach(function(t){e[t]=r[t].slice(0,e.C)}),e.unused=this.unused.slice(0,this.U),this.keepDendrogram?e.dendrogram=this.dendrogram:e.mapping=this.mapping,e},e.UndirectedLouvainIndex=o,e.DirectedLouvainIndex=s})),ze=t(((e,t)=>{var n=je(),r=m(),i=Me(),a=Fe(),o=Ie(),s=Le().createRandomIndex,c=Re(),l=c.UndirectedLouvainIndex,u=c.DirectedLouvainIndex,d={nodeCommunityAttribute:`community`,getEdgeWeight:`weight`,fastLocalMoves:!0,randomWalk:!0,resolution:1,rng:Math.random};function f(e,t,n){var r=e.get(t);r===void 0&&(r=0),r+=n,e.set(t,r)}var p=1e-10;function h(e,t,n,r,i){return Math.abs(r-i)<p?e===t?!1:n>e:r>i}function g(e,t,n){var r=new l(t,{getEdgeWeight:n.getEdgeWeight,keepDendrogram:e,resolution:n.resolution}),i=s(n.rng),c=!0,u=!0,d,p,m=new a(Float64Array,r.C),g,_,v,y,b,x,S,C,w,T,E,D,O,k,A,j,M=0,N=0,P=[],F,I;for(n.fastLocalMoves&&(g=new o(r.C));c;){if(T=r.C,c=!1,u=!0,n.fastLocalMoves){for(I=0,x=n.randomWalk?i(T):0,S=0;S<T;S++,x++)C=x%T,g.enqueue(C);for(;g.size!==0;){for(C=g.dequeue(),N++,E=0,m.clear(),d=r.belongings[C],_=r.starts[C],v=r.starts[C+1];_<v;_++)w=r.neighborhood[_],y=r.weights[_],p=r.belongings[w],E+=y,f(m,p,y);for(k=r.fastDeltaWithOwnCommunity(C,E,m.get(d)||0,d),O=d,b=0;b<m.size;b++)p=m.dense[b],p!==d&&(D=m.vals[b],M++,j=r.fastDelta(C,E,D,p),A=h(O,d,p,j,k),A&&(k=j,O=p));if(k<0){if(O=r.isolate(C,E),O===d)continue}else if(O===d)continue;else r.move(C,E,O);for(c=!0,I++,_=r.starts[C],v=r.starts[C+1];_<v;_++)w=r.neighborhood[_],p=r.belongings[w],p!==O&&g.enqueue(w)}P.push(I)}else for(F=[],P.push(F);u;){for(u=!1,I=0,x=n.randomWalk?i(T):0,S=0;S<T;S++,x++){for(C=x%T,N++,E=0,m.clear(),d=r.belongings[C],_=r.starts[C],v=r.starts[C+1];_<v;_++)w=r.neighborhood[_],y=r.weights[_],p=r.belongings[w],E+=y,f(m,p,y);for(k=r.fastDeltaWithOwnCommunity(C,E,m.get(d)||0,d),O=d,b=0;b<m.size;b++)p=m.dense[b],p!==d&&(D=m.vals[b],M++,j=r.fastDelta(C,E,D,p),A=h(O,d,p,j,k),A&&(k=j,O=p));if(k<0){if(O=r.isolate(C,E),O===d)continue}else if(O===d)continue;else r.move(C,E,O);u=!0,I++}F.push(I),c=u||c}c&&r.zoomOut()}return{index:r,deltaComputations:M,nodesVisited:N,moves:P}}function _(e,t,n){var r=new u(t,{getEdgeWeight:n.getEdgeWeight,keepDendrogram:e,resolution:n.resolution}),i=s(n.rng),c=!0,l=!0,d,p,m=new a(Float64Array,r.C),g,_,v,y,b,x,S,C,w,T,E,D,O,k,A,j,M,N,P,F=0,I=0,L=[],R,z;for(n.fastLocalMoves&&(g=new o(r.C));c;){if(D=r.C,c=!1,l=!0,n.fastLocalMoves){for(z=0,C=n.randomWalk?i(D):0,w=0;w<D;w++,C++)T=C%D,g.enqueue(T);for(;g.size!==0;){for(T=g.dequeue(),I++,O=0,k=0,m.clear(),d=r.belongings[T],_=r.starts[T],v=r.starts[T+1],y=r.offsets[T];_<v;_++)b=_<y,E=r.neighborhood[_],x=r.weights[_],p=r.belongings[E],b?k+=x:O+=x,f(m,p,x);for(M=r.deltaWithOwnCommunity(T,O,k,m.get(d)||0,d),j=d,S=0;S<m.size;S++)p=m.dense[S],p!==d&&(A=m.vals[S],F++,P=r.delta(T,O,k,A,p),N=h(j,d,p,P,M),N&&(M=P,j=p));if(M<0){if(j=r.isolate(T,O,k),j===d)continue}else if(j===d)continue;else r.move(T,O,k,j);for(c=!0,z++,_=r.starts[T],v=r.starts[T+1];_<v;_++)E=r.neighborhood[_],p=r.belongings[E],p!==j&&g.enqueue(E)}L.push(z)}else for(R=[],L.push(R);l;){for(l=!1,z=0,C=n.randomWalk?i(D):0,w=0;w<D;w++,C++){for(T=C%D,I++,O=0,k=0,m.clear(),d=r.belongings[T],_=r.starts[T],v=r.starts[T+1],y=r.offsets[T];_<v;_++)b=_<y,E=r.neighborhood[_],x=r.weights[_],p=r.belongings[E],b?k+=x:O+=x,f(m,p,x);for(M=r.deltaWithOwnCommunity(T,O,k,m.get(d)||0,d),j=d,S=0;S<m.size;S++)p=m.dense[S],p!==d&&(A=m.vals[S],F++,P=r.delta(T,O,k,A,p),N=h(j,d,p,P,M),N&&(M=P,j=p));if(M<0){if(j=r.isolate(T,O,k),j===d)continue}else if(j===d)continue;else r.move(T,O,k,j);l=!0,z++}R.push(z),c=l||c}c&&r.zoomOut()}return{index:r,deltaComputations:F,nodesVisited:I,moves:L}}function v(e,t,a,o){if(!r(a))throw Error(`graphology-communities-louvain: the given graph is not a valid graphology instance.`);var s=i(a);if(s===`mixed`)throw Error(`graphology-communities-louvain: cannot run the algorithm on a true mixed graph.`);o=n(o,d);var c=0;if(a.size===0){if(e){a.forEachNode(function(e){a.setNodeAttribute(e,o.nodeCommunityAttribute,c++)});return}var l={};return a.forEachNode(function(e){l[e]=c++}),t?{communities:l,count:a.order,deltaComputations:0,dendrogram:null,level:0,modularity:NaN,moves:null,nodesVisited:0,resolution:o.resolution}:l}var u=(s===`undirected`?g:_)(t,a,o),f=u.index;if(!t){if(e){f.assign(o.nodeCommunityAttribute);return}return f.collect()}var p={count:f.C,deltaComputations:u.deltaComputations,dendrogram:f.dendrogram,level:f.level,modularity:f.modularity(),moves:u.moves,nodesVisited:u.nodesVisited,resolution:o.resolution};return e?(f.assign(o.nodeCommunityAttribute),p):(p.communities=f.collect(),p)}var y=v.bind(null,!1,!1);y.assign=v.bind(null,!0,!1),y.detailed=v.bind(null,!1,!0),y.defaults=d,t.exports=y})),Be=t((e=>{e.ARRAY_BUFFER_SUPPORT=typeof ArrayBuffer<`u`,e.SYMBOL_SUPPORT=typeof Symbol<`u`})),Ve=t(((e,t)=>{var n=Be(),r=n.ARRAY_BUFFER_SUPPORT,i=n.SYMBOL_SUPPORT;t.exports=function(e,t){var n,a,o,s,c;if(!e)throw Error(`obliterator/forEach: invalid iterable.`);if(typeof t!=`function`)throw Error(`obliterator/forEach: expecting a callback.`);if(Array.isArray(e)||r&&ArrayBuffer.isView(e)||typeof e==`string`||e.toString()===`[object Arguments]`){for(o=0,s=e.length;o<s;o++)t(e[o],o);return}if(typeof e.forEach==`function`){e.forEach(t);return}if(i&&Symbol.iterator in e&&typeof e.next!=`function`&&(e=e[Symbol.iterator]()),typeof e.next==`function`){for(n=e,o=0;c=n.next(),c.done!==!0;)t(c.value,o),o++;return}for(a in e)e.hasOwnProperty(a)&&t(e[a],a)}})),He=t(((e,t)=>{var n=Ne(),r=Ve();function i(){this.clear()}i.prototype.clear=function(){this.items=[],this.offset=0,this.size=0},i.prototype.enqueue=function(e){return this.items.push(e),++this.size},i.prototype.dequeue=function(){if(this.size){var e=this.items[this.offset];return++this.offset*2>=this.items.length&&(this.items=this.items.slice(this.offset),this.offset=0),this.size--,e}},i.prototype.peek=function(){if(this.size)return this.items[this.offset]},i.prototype.forEach=function(e,t){t=arguments.length>1?t:this;for(var n=this.offset,r=0,i=this.items.length;n<i;n++,r++)e.call(t,this.items[n],r,this)},i.prototype.toArray=function(){return this.items.slice(this.offset)},i.prototype.values=function(){var e=this.items,t=this.offset;return new n(function(){if(t>=e.length)return{done:!0};var n=e[t];return t++,{value:n,done:!1}})},i.prototype.entries=function(){var e=this.items,t=this.offset,r=0;return new n(function(){if(t>=e.length)return{done:!0};var n=e[t];return t++,{value:[r++,n],done:!1}})},typeof Symbol<`u`&&(i.prototype[Symbol.iterator]=i.prototype.values),i.prototype.toString=function(){return this.toArray().join(`,`)},i.prototype.toJSON=function(){return this.toArray()},i.prototype.inspect=function(){var e=this.toArray();return Object.defineProperty(e,`constructor`,{value:i,enumerable:!1}),e},typeof Symbol<`u`&&(i.prototype[Symbol.for(`nodejs.util.inspect.custom`)]=i.prototype.inspect),i.from=function(e){var t=new i;return r(e,function(e){t.enqueue(e)}),t},i.of=function(){return i.from(arguments)},t.exports=i})),Ue=t(((e,t)=>{t.exports=function(e,t){var n=t.length;if(n!==0){var r=e.length;e.length+=n;for(var i=0;i<n;i++)e[r+i]=t[i]}}})),We=t((e=>{var t=m(),n=He(),r=Ue();function i(e,n,r){if(!t(e))throw Error(`graphology-shortest-path: invalid graphology instance.`);if(arguments.length<3)throw Error(`graphology-shortest-path: invalid number of arguments. Expecting at least 3.`);if(!e.hasNode(n))throw Error(`graphology-shortest-path: the "`+n+`" source node does not exist in the given graph.`);if(!e.hasNode(r))throw Error(`graphology-shortest-path: the "`+r+`" target node does not exist in the given graph.`);if(n=``+n,r=``+r,n===r)return[n];var i=e.inboundNeighbors.bind(e),a=e.outboundNeighbors.bind(e),o={},s={};o[n]=null,s[r]=null;var c=[n],l=[r],u,d,f,p,m,h,g,_,v=!1;outer:for(;c.length&&l.length;)if(c.length<=l.length){for(u=c,c=[],m=0,g=u.length;m<g;m++)for(d=u[m],f=a(d),h=0,_=f.length;h<_;h++)if(p=f[h],p in o||(c.push(p),o[p]=d),p in s){v=!0;break outer}}else for(u=l,l=[],m=0,g=u.length;m<g;m++)for(d=u[m],f=i(d),h=0,_=f.length;h<_;h++)if(p=f[h],p in s||(l.push(p),s[p]=d),p in o){v=!0;break outer}if(!v)return null;for(var y=[];p;)y.unshift(p),p=o[p];for(p=s[y[y.length-1]];p;)y.push(p),p=s[p];return y.length?y:null}function a(e,n){if(!t(e))throw Error(`graphology-shortest-path: invalid graphology instance.`);if(arguments.length<2)throw Error(`graphology-shortest-path: invalid number of arguments. Expecting at least 2.`);if(!e.hasNode(n))throw Error(`graphology-shortest-path: the "`+n+`" source node does not exist in the given graph.`);n=``+n;var r={},i={},a,o,s,c,l,u;for(r[n]=!0,i[n]=[n];Object.keys(r).length;)for(s in a=r,r={},a)for(o=e.outboundNeighbors(s),l=0,u=o.length;l<u;l++)c=o[l],i[c]||(i[c]=i[s].concat(c),r[c]=!0);return i}function o(e,n,i){if(!t(n))throw Error(`graphology-shortest-path: invalid graphology instance.`);if(!n.hasNode(i))throw Error(`graphology-shortest-path: the "`+i+`" source node does not exist in the given graph.`);i=``+i;var a=new Set,o={},s=0;o[i]=0;for(var c=[i],l,u,d;c.length!==0;){var f=[];for(l=0,u=c.length;l<u;l++)d=c[l],!a.has(d)&&(a.add(d),r(f,n[e](d)),o[d]=s);s++,c=f}return o}var s=o.bind(null,`outboundNeighbors`),c=o.bind(null,`neighbors`);function l(e,t){t=``+t;var r=[],i={},a={},o=e.nodes(),s,c,l,u,d,f,p,m,h;for(f=0,m=o.length;f<m;f++)u=o[f],i[u]=[],a[u]=0;var g={};a[t]=1,g[t]=0;for(var _=n.of(t);_.size;)for(u=_.dequeue(),r.push(u),s=g[u],c=a[u],l=e.outboundNeighbors(u),p=0,h=l.length;p<h;p++)d=l[p],d in g||(_.enqueue(d),g[d]=s+1),g[d]===s+1&&(a[d]+=c,i[d].push(u));return[r,i,a]}e.bidirectional=i,e.singleSource=a,e.singleSourceLength=s,e.undirectedSingleSourceLength=c,e.brandes=l})),Ge=t((e=>{var t=function(){return!0};e.edgePathFromNodePath=function(e,n){var r=n.length,i,a,o,s;if(r<2)return a=n[0],s=e.multi?e.findEdge(a,a,t):e.edge(a,a),s?[s]:[];r--;var c=Array(r);for(i=0;i<r;i++){if(a=n[i],o=n[i+1],s=e.multi?e.findOutboundEdge(a,o,t):e.edge(a,o),s===void 0)throw Error(`graphology-shortest-path: given path is impossible in given graph.`);c[i]=s}return c}})),Ke=t((e=>{var t=function(e,t){return e<t?-1:e>t?1:0},n=function(e,t){return e<t?1:e>t?-1:0};function r(e){return function(t,n){return e(n,t)}}function i(e){return e===2?function(e,t){return e[0]<t[0]?-1:e[0]>t[0]?1:e[1]<t[1]?-1:e[1]>t[1]?1:0}:function(t,n){for(var r=0;r<e;){if(t[r]<n[r])return-1;if(t[r]>n[r])return 1;r++}return 0}}e.DEFAULT_COMPARATOR=t,e.DEFAULT_REVERSE_COMPARATOR=n,e.reverseComparator=r,e.createTupleComparator=i})),qe=t((e=>{var t=Ve(),n=Pe();function r(e){return Array.isArray(e)||n.isTypedArray(e)}function i(e){if(typeof e.length==`number`)return e.length;if(typeof e.size==`number`)return e.size}function a(e){var n=i(e),r=typeof n==`number`?Array(n):[],a=0;return t(e,function(e){r[a++]=e}),r}function o(e){var r=i(e),a=typeof r==`number`?n.getPointerArray(r):Array,o=typeof r==`number`?Array(r):[],s=typeof r==`number`?new a(r):[],c=0;return t(e,function(e){o[c]=e,s[c]=c++}),[o,s]}e.isArrayLike=r,e.guessLength=i,e.toArray=a,e.toArrayWithIndices=o})),Je=t(((e,t)=>{var n=Ve(),r=Ke(),i=qe(),a=r.DEFAULT_COMPARATOR,o=r.reverseComparator;function s(e,t,n,r){for(var i=t[r],a,o;r>n;){if(a=r-1>>1,o=t[a],e(i,o)<0){t[r]=o,r=a;continue}break}t[r]=i}function c(e,t,n){for(var r=t.length,i=n,a=t[n],o=2*n+1,c;o<r;)c=o+1,c<r&&e(t[o],t[c])>=0&&(o=c),t[n]=t[o],n=o,o=2*n+1;t[n]=a,s(e,t,i,n)}function l(e,t,n){t.push(n),s(e,t,0,t.length-1)}function u(e,t){var n=t.pop();if(t.length!==0){var r=t[0];return t[0]=n,c(e,t,0),r}return n}function d(e,t,n){if(t.length===0)throw Error(`mnemonist/heap.replace: cannot pop an empty heap.`);var r=t[0];return t[0]=n,c(e,t,0),r}function f(e,t,n){var r;return t.length!==0&&e(t[0],n)<0&&(r=t[0],t[0]=n,n=r,c(e,t,0)),n}function p(e,t){for(var n=t.length>>1;--n>=0;)c(e,t,n)}function m(e,t){for(var n=t.length,r=0,i=Array(n);r<n;)i[r++]=u(e,t);return i}function h(e,t,r){arguments.length===2&&(r=t,t=e,e=a);var s=o(e),c,l,u,f=1/0,m;if(t===1){if(i.isArrayLike(r)){for(c=0,l=r.length;c<l;c++)u=r[c],(f===1/0||e(u,f)<0)&&(f=u);return m=new r.constructor(1),m[0]=f,m}return n(r,function(t){(f===1/0||e(t,f)<0)&&(f=t)}),[f]}if(i.isArrayLike(r)){if(t>=r.length)return r.slice().sort(e);for(m=r.slice(0,t),p(s,m),c=t,l=r.length;c<l;c++)s(r[c],m[0])>0&&d(s,m,r[c]);return m.sort(e)}var h=i.guessLength(r);return h!==null&&h<t&&(t=h),m=Array(t),c=0,n(r,function(e){c<t?m[c]=e:(c===t&&p(s,m),s(e,m[0])>0&&d(s,m,e)),c++}),m.length>c&&(m.length=c),m.sort(e)}function g(e,t,r){arguments.length===2&&(r=t,t=e,e=a);var s=o(e),c,l,u,f=-1/0,m;if(t===1){if(i.isArrayLike(r)){for(c=0,l=r.length;c<l;c++)u=r[c],(f===-1/0||e(u,f)>0)&&(f=u);return m=new r.constructor(1),m[0]=f,m}return n(r,function(t){(f===-1/0||e(t,f)>0)&&(f=t)}),[f]}if(i.isArrayLike(r)){if(t>=r.length)return r.slice().sort(s);for(m=r.slice(0,t),p(e,m),c=t,l=r.length;c<l;c++)e(r[c],m[0])>0&&d(e,m,r[c]);return m.sort(s)}var h=i.guessLength(r);return h!==null&&h<t&&(t=h),m=Array(t),c=0,n(r,function(n){c<t?m[c]=n:(c===t&&p(e,m),e(n,m[0])>0&&d(e,m,n)),c++}),m.length>c&&(m.length=c),m.sort(s)}function _(e){if(this.clear(),this.comparator=e||a,typeof this.comparator!=`function`)throw Error(`mnemonist/Heap.constructor: given comparator should be a function.`)}_.prototype.clear=function(){this.items=[],this.size=0},_.prototype.push=function(e){return l(this.comparator,this.items,e),++this.size},_.prototype.peek=function(){return this.items[0]},_.prototype.pop=function(){return this.size!==0&&this.size--,u(this.comparator,this.items)},_.prototype.replace=function(e){return d(this.comparator,this.items,e)},_.prototype.pushpop=function(e){return f(this.comparator,this.items,e)},_.prototype.consume=function(){return this.size=0,m(this.comparator,this.items)},_.prototype.toArray=function(){return m(this.comparator,this.items.slice())},_.prototype.inspect=function(){var e=this.toArray();return Object.defineProperty(e,`constructor`,{value:_,enumerable:!1}),e},typeof Symbol<`u`&&(_.prototype[Symbol.for(`nodejs.util.inspect.custom`)]=_.prototype.inspect);function v(e){if(this.clear(),this.comparator=e||a,typeof this.comparator!=`function`)throw Error(`mnemonist/MaxHeap.constructor: given comparator should be a function.`);this.comparator=o(this.comparator)}v.prototype=_.prototype,_.from=function(e,t){var n=new _(t),r=i.isArrayLike(e)?e.slice():i.toArray(e);return p(n.comparator,r),n.items=r,n.size=r.length,n},v.from=function(e,t){var n=new v(t),r=i.isArrayLike(e)?e.slice():i.toArray(e);return p(n.comparator,r),n.items=r,n.size=r.length,n},_.siftUp=c,_.siftDown=s,_.push=l,_.pop=u,_.replace=d,_.pushpop=f,_.heapify=p,_.consume=m,_.nsmallest=h,_.nlargest=g,_.MinHeap=_,_.MaxHeap=v,t.exports=_})),Ye=t((e=>{var t=m(),n=p().createEdgeWeightGetter,r=Je(),i=`weight`;function a(e,t){return e[0]>t[0]?1:e[0]<t[0]?-1:e[1]>t[1]?1:e[1]<t[1]?-1:e[2]>t[2]?1:e[2]<t[2]?-1:0}function o(e,t){return e[0]>t[0]?1:e[0]<t[0]?-1:e[1]>t[1]?1:e[1]<t[1]?-1:e[2]>t[2]?1:e[2]<t[2]?-1:e[3]>t[3]?1:e[3]<t[3]?-1:0}function s(e,o,s,c){if(o=``+o,s=``+s,!t(e))throw Error(`graphology-shortest-path/dijkstra: invalid graphology instance.`);if(o&&!e.hasNode(o))throw Error(`graphology-shortest-path/dijkstra: the "`+o+`" source node does not exist in the given graph.`);if(s&&!e.hasNode(s))throw Error(`graphology-shortest-path/dijkstra: the "`+s+`" target node does not exist in the given graph.`);if(c=n(c||i).fromMinimalEntry,o===s)return[0,[o]];var l=[{},{}],u=[{},{}],d=[new r(a),new r(a)],f=[{},{}];u[0][o]=[o],u[1][s]=[s],f[0][o]=0,f[1][s]=0;var p=[],m=1/0,h=0,g=1,_,v,y,b,x,S,C,w,T;for(d[0].push([0,h++,o]),d[1].push([0,h++,s]);d[0].size&&d[1].size;)if(g=1-g,_=d[g].pop(),b=_[0],x=_[2],!(x in l[g])){if(l[g][x]=b,x in l[1-g])return[m,p];for(v=g===1?e.inboundEdges(x):e.outboundEdges(x),w=0,T=v.length;w<T;w++){if(C=v[w],S=e.opposite(x,C),y=l[g][x]+c(C,e.getEdgeAttributes(C)),S in l[g]&&y<l[g][S])throw Error(`graphology-shortest-path/dijkstra: contradictory paths found. Do some of your edges have a negative weight?`);(!(S in f[g])||y<f[g][S])&&(f[g][S]=y,d[g].push([y,h++,S]),u[g][S]=u[g][x].concat(S),S in f[0]&&S in f[1]&&(b=f[0][S]+f[1][S],(p.length===0||m>b)&&(m=b,p=u[0][S].concat(u[1][S].slice(0,-1).reverse()))))}}return[1/0,null]}function c(e,o,s,c,l,u){if(!t(e))throw Error(`graphology-shortest-path/dijkstra: invalid graphology instance.`);if(l&&!e.hasNode(l))throw Error(`graphology-shortest-path/dijkstra: the "`+l+`" target node does not exist in the given graph.`);s=n(s||i).fromMinimalEntry;var d={},f={},p=new r(a),m=0,h,g,_,v,y,b,x,S,C,w,T;for(S=0,w=o.length;S<w;S++)v=o[S],f[v]=0,p.push([0,m++,v]),u&&(u[v]=[v]);for(;p.size;)if(g=p.pop(),x=g[0],v=g[2],!(v in d)){if(d[v]=x,v===l)break;for(h=e.outboundEdges(v),C=0,T=h.length;C<T;C++)if(b=h[C],y=e.opposite(v,b),_=s(b,e.getEdgeAttributes(b))+d[v],!(c&&_>c)){if(y in d&&_<d[y])throw Error(`graphology-shortest-path/dijkstra: contradictory paths found. Do some of your edges have a negative weight?`);(!(y in f)||_<f[y])&&(f[y]=_,p.push([_,m++,y]),u&&(u[y]=u[v].concat(y)))}}return d}function l(e,t,n){var r={};return c(e,[t],n,0,null,r),r}function u(e,t,n,r){return s(e,t,n,r)[1]}function d(e,t,a){t=``+t,a=n(a||i).fromMinimalEntry;var s=[],c={},l={},u=e.nodes(),d,f,p,m,h,g,_,v,y,b;for(y=0,b=u.length;y<b;y++)g=u[y],c[g]=[],l[g]=0;var x={};l[t]=1;var S={};S[t]=0;var C=0,w=new r(o);for(w.push([0,C++,t,t]);w.size;)if(f=w.pop(),m=f[0],p=f[2],g=f[3],!(g in x))for(l[g]+=l[p],s.push(g),x[g]=m,d=e.outboundEdges(g),y=0,b=d.length;y<b;y++)v=d[y],_=e.opposite(g,v),h=m+a(v,e.getEdgeAttributes(v)),!(_ in x)&&(!(_ in S)||h<S[_])?(S[_]=h,w.push([h,C++,g,_]),l[_]=0,c[_]=[g]):h===S[_]&&(l[_]+=l[g],c[_].push(g));return[s,c,l]}e.bidirectional=u,e.singleSource=l,e.brandes=d})),Xe=t((e=>{var t=m(),n=p().createEdgeWeightGetter,r=Je(),i=`weight`;function a(e,t){return e[0]>t[0]?1:e[0]<t[0]?-1:e[1]>t[1]?1:e[1]<t[1]?-1:0}function o(e,o,s,c,l,u){if(!t(e))throw Error(`graphology-shortest-path/astar: invalid graphology instance.`);if(o&&!e.hasNode(o))throw Error(`graphology-shortest-path/astar: the "`+o+`" source node does not exist in the given graph.`);if(s&&!e.hasNode(s))throw Error(`graphology-shortest-path/astar: the "`+s+`" target node does not exist in the given graph.`);if(c=n(c||i).fromMinimalEntry,o===s)return[o];l||=function(){return 0},u||={};var d=0,f=new r(a);f.push([0,d++,o,0,null]);var p={},m={},h,g,_,v,y,b,x,S,C,w,T,E;function D(e,t,n,r){if(E=g===n?r:n,w=c(e,t),w!==null){if(T=v+w,p.hasOwnProperty(E)){if(_=p[E],S=_[0],C=_[1],S<=T)return}else C=l(E,s);u.cutoff&&T+C>u.cutoff||(p[E]=[T,C],f.push([T+C,d++,E,T,g]))}}for(;f.size!==0;){if(h=f.pop(),g=h[2],v=h[3],y=h[4],g===s){for(b=[g],x=y;x!==null;)b.push(x),x=m[x];return b.reverse(),b}m.hasOwnProperty(g)&&(m[g]===null||(S=p[g][0],S<v))||(m[g]=y,e.forEachOutboundEdge(g,D))}return null}e.bidirectional=o})),Ze=t((e=>{var t=We(),n=Ge();e.dijkstra=Ye(),e.astar=Xe(),e.bidirectional=t.bidirectional,e.singleSource=t.singleSource,e.singleSourceLength=t.singleSourceLength,e.undirectedSingleSourceLength=t.undirectedSingleSourceLength,e.brandes=t.brandes,e.edgePathFromNodePath=n.edgePathFromNodePath})),Qe=t(((e,t)=>{var n=qe(),r=Ne();function i(e,t){if(arguments.length<2)throw Error(`mnemonist/fixed-deque: expecting an Array class and a capacity.`);if(typeof t!=`number`||t<=0)throw Error("mnemonist/fixed-deque: `capacity` should be a positive number.");this.ArrayClass=e,this.capacity=t,this.items=new e(this.capacity),this.clear()}i.prototype.clear=function(){this.start=0,this.size=0},i.prototype.push=function(e){if(this.size===this.capacity)throw Error(`mnemonist/fixed-deque.push: deque capacity (`+this.capacity+`) exceeded!`);var t=this.start+this.size;return t>=this.capacity&&(t-=this.capacity),this.items[t]=e,++this.size},i.prototype.unshift=function(e){if(this.size===this.capacity)throw Error(`mnemonist/fixed-deque.unshift: deque capacity (`+this.capacity+`) exceeded!`);var t=this.start-1;return this.start===0&&(t=this.capacity-1),this.items[t]=e,this.start=t,++this.size},i.prototype.pop=function(){if(this.size!==0){this.size--;var e=this.start+this.size;return e>=this.capacity&&(e-=this.capacity),this.items[e]}},i.prototype.shift=function(){if(this.size!==0){var e=this.start;return this.size--,this.start++,this.start===this.capacity&&(this.start=0),this.items[e]}},i.prototype.peekFirst=function(){if(this.size!==0)return this.items[this.start]},i.prototype.peekLast=function(){if(this.size!==0){var e=this.start+this.size-1;return e>=this.capacity&&(e-=this.capacity),this.items[e]}},i.prototype.get=function(e){if(!(this.size===0||e>=this.capacity))return e=this.start+e,e>=this.capacity&&(e-=this.capacity),this.items[e]},i.prototype.forEach=function(e,t){t=arguments.length>1?t:this;for(var n=this.capacity,r=this.size,i=this.start,a=0;a<r;)e.call(t,this.items[i],a,this),i++,a++,i===n&&(i=0)},i.prototype.toArray=function(){var e=this.start+this.size;if(e<this.capacity)return this.items.slice(this.start,e);for(var t=new this.ArrayClass(this.size),n=this.capacity,r=this.size,i=this.start,a=0;a<r;)t[a]=this.items[i],i++,a++,i===n&&(i=0);return t},i.prototype.values=function(){var e=this.items,t=this.capacity,n=this.size,i=this.start,a=0;return new r(function(){if(a>=n)return{done:!0};var r=e[i];return i++,a++,i===t&&(i=0),{value:r,done:!1}})},i.prototype.entries=function(){var e=this.items,t=this.capacity,n=this.size,i=this.start,a=0;return new r(function(){if(a>=n)return{done:!0};var r=e[i];return i++,i===t&&(i=0),{value:[a++,r],done:!1}})},typeof Symbol<`u`&&(i.prototype[Symbol.iterator]=i.prototype.values),i.prototype.inspect=function(){var e=this.toArray();return e.type=this.ArrayClass.name,e.capacity=this.capacity,Object.defineProperty(e,`constructor`,{value:i,enumerable:!1}),e},typeof Symbol<`u`&&(i.prototype[Symbol.for(`nodejs.util.inspect.custom`)]=i.prototype.inspect),i.from=function(e,t,r){if(arguments.length<3&&(r=n.guessLength(e),typeof r!=`number`))throw Error(`mnemonist/fixed-deque.from: could not guess iterable length. Please provide desired capacity as last argument.`);var a=new i(t,r);if(n.isArrayLike(e)){var o,s;for(o=0,s=e.length;o<s;o++)a.items[o]=e[o];return a.size=s,a}return n.forEach(e,function(e){a.push(e)}),a},t.exports=i})),$e=t(((e,t)=>{var n=Ne(),r=qe();function i(e,t){if(arguments.length<2)throw Error(`mnemonist/fixed-stack: expecting an Array class and a capacity.`);if(typeof t!=`number`||t<=0)throw Error("mnemonist/fixed-stack: `capacity` should be a positive number.");this.capacity=t,this.ArrayClass=e,this.items=new this.ArrayClass(this.capacity),this.clear()}i.prototype.clear=function(){this.size=0},i.prototype.push=function(e){if(this.size===this.capacity)throw Error(`mnemonist/fixed-stack.push: stack capacity (`+this.capacity+`) exceeded!`);return this.items[this.size++]=e,this.size},i.prototype.pop=function(){if(this.size!==0)return this.items[--this.size]},i.prototype.peek=function(){return this.items[this.size-1]},i.prototype.forEach=function(e,t){t=arguments.length>1?t:this;for(var n=0,r=this.items.length;n<r;n++)e.call(t,this.items[r-n-1],n,this)},i.prototype.toArray=function(){for(var e=new this.ArrayClass(this.size),t=this.size-1,n=this.size;n--;)e[n]=this.items[t-n];return e},i.prototype.values=function(){var e=this.items,t=this.size,r=0;return new n(function(){if(r>=t)return{done:!0};var n=e[t-r-1];return r++,{value:n,done:!1}})},i.prototype.entries=function(){var e=this.items,t=this.size,r=0;return new n(function(){if(r>=t)return{done:!0};var n=e[t-r-1];return{value:[r++,n],done:!1}})},typeof Symbol<`u`&&(i.prototype[Symbol.iterator]=i.prototype.values),i.prototype.toString=function(){return this.toArray().join(`,`)},i.prototype.toJSON=function(){return this.toArray()},i.prototype.inspect=function(){var e=this.toArray();return e.type=this.ArrayClass.name,e.capacity=this.capacity,Object.defineProperty(e,`constructor`,{value:i,enumerable:!1}),e},typeof Symbol<`u`&&(i.prototype[Symbol.for(`nodejs.util.inspect.custom`)]=i.prototype.inspect),i.from=function(e,t,n){if(arguments.length<3&&(n=r.guessLength(e),typeof n!=`number`))throw Error(`mnemonist/fixed-stack.from: could not guess iterable length. Please provide desired capacity as last argument.`);var a=new i(t,n);if(r.isArrayLike(e)){var o,s;for(o=0,s=e.length;o<s;o++)a.items[o]=e[o];return a.size=s,a}return r.forEach(e,function(e){a.push(e)}),a},t.exports=i})),et=t((e=>{var t=Pe(),n=p().createEdgeWeightGetter;function r(e,t){return e===`outbound`||e===`inbound`?t.directedSize+t.undirectedSize*2:e===`in`||e===`out`||e===`directed`?t.directedSize:t.undirectedSize*2}function i(e,n){n||=`outbound`;var i=e[n+`Neighbors`].bind(e),a=r(n,e),o=t.getPointerArray(a),s=t.getPointerArray(e.order);this.graph=e,this.neighborhood=new s(a),this.starts=new o(e.order+1),this.nodes=e.nodes();var c={},l,u,d,f,p,m,h=0;for(l=0,u=e.order;l<u;l++)c[this.nodes[l]]=l;for(l=0,u=e.order;l<u;l++)for(p=this.nodes[l],m=i(p),this.starts[l]=h,d=0,f=m.length;d<f;d++)this.neighborhood[h++]=c[m[d]];this.starts[l]=a}i.prototype.bounds=function(e){return[this.starts[e],this.starts[e+1]]},i.prototype.project=function(){var e=this,t={};return e.nodes.forEach(function(n,r){t[n]=Array.from(e.neighborhood.slice(e.starts[r],e.starts[r+1])).map(function(t){return e.nodes[t]})}),t},i.prototype.collect=function(e){var t,n,r={};for(t=0,n=e.length;t<n;t++)r[this.nodes[t]]=e[t];return r},i.prototype.assign=function(e,t){var n=0;this.graph.updateEachNodeAttributes(function(r,i){return i[e]=t[n++],i},{attributes:[e]})},e.NeighborhoodIndex=i;function a(e,i,a){a||=`outbound`;var o=e[a+`Edges`].bind(e),s=r(a,e),c=t.getPointerArray(s),l=t.getPointerArray(e.order),u=n(i).fromMinimalEntry;this.graph=e,this.neighborhood=new l(s),this.weights=new Float64Array(s),this.outDegrees=new Float64Array(e.order),this.starts=new c(e.order+1),this.nodes=e.nodes();var d={},f,p,m,h,g,_,v,y,b,x=0;for(f=0,p=e.order;f<p;f++)d[this.nodes[f]]=f;for(f=0,p=e.order;f<p;f++)for(g=this.nodes[f],v=o(g),this.starts[f]=x,m=0,h=v.length;m<h;m++)y=v[m],_=e.opposite(g,y),b=u(y,e.getEdgeAttributes(y)),this.neighborhood[x]=d[_],this.weights[x++]=b,this.outDegrees[f]+=b;this.starts[f]=s}a.prototype.bounds=i.prototype.bounds,a.prototype.project=i.prototype.project,a.prototype.collect=i.prototype.collect,a.prototype.assign=i.prototype.assign,e.WeightedNeighborhoodIndex=a})),tt=t((e=>{var t=Qe(),n=$e(),r=Je(),i=Pe(),a=et(),o=a.NeighborhoodIndex,s=a.WeightedNeighborhoodIndex;e.createUnweightedIndexedBrandes=function(e){var r=new o(e),a=r.neighborhood,s=r.starts,c=e.order,l=new n(i.getPointerArray(c),c),u=new Uint32Array(c),d=Array(c),f=new Int32Array(c),p=new t(Uint32Array,c),m=function(e){var t,n,r,i,o,m,h;for(m=0;m<c;m++)d[m]=[],u[m]=0,f[m]=-1;for(u[e]=1,f[e]=0,p.push(e);p.size!==0;)for(m=p.shift(),l.push(m),t=f[m],n=u[m],r=s[m],i=s[m+1],o=r;o<i;o++)h=a[o],f[h]===-1&&(p.push(h),f[h]=t+1),f[h]===t+1&&(u[h]+=n,d[h].push(m));return[l,d,u]};return m.index=r,m};function c(e,t){return e[0]>t[0]?1:e[0]<t[0]?-1:e[1]>t[1]?1:e[1]<t[1]?-1:e[2]>t[2]?1:e[2]<t[2]?-1:e[3]>t[3]?1:e[3]<t[3]?-1:0}e.createDijkstraIndexedBrandes=function(e,t){var a=new s(e,t||`weight`),o=a.neighborhood,l=a.weights,u=a.starts,d=e.order,f=new n(i.getPointerArray(d),d),p=new Uint32Array(d),m=Array(d),h=new Float64Array(d),g=new Float64Array(d),_=new r(c),v=function(e){var t,n,r,i,a,s,c,v,y,b=0;for(v=0;v<d;v++)m[v]=[],p[v]=0,h[v]=-1,g[v]=-1;for(p[e]=1,g[e]=0,_.push([0,b++,e,e]);_.size!==0;)if(r=_.pop(),i=r[0],a=r[2],v=r[3],h[v]===-1)for(f.push(v),h[v]=i,p[v]+=p[a],t=u[v],n=u[v+1],c=t;c<n;c++)y=o[c],s=i+l[c],h[y]===-1&&(g[y]===-1||s<g[y])?(g[y]=s,_.push([s,b++,v,y]),p[y]=0,m[y]=[v]):s===g[y]&&(p[y]+=p[v],m[y].push(v));return[f,m,p]};return v.index=a,v}})),nt=t(((e,t)=>{var n=m(),r=tt(),i=je(),a=r.createUnweightedIndexedBrandes,o=r.createDijkstraIndexedBrandes,s={nodeCentralityAttribute:`betweennessCentrality`,getEdgeWeight:`weight`,normalized:!0};function c(e,t,r){if(!n(t))throw Error(`graphology-centrality/beetweenness-centrality: the given graph is not a valid graphology instance.`);r=i(r,s);var c=r.nodeCentralityAttribute,l=r.normalized,u=r.getEdgeWeight?o(t,r.getEdgeWeight):a(t),d=t.order,f,p,m,h,g,_,v,y,b,x,S=new Float64Array(d),C=new Float64Array(d);for(_=0;_<d;_++){for(f=u(_),p=f[0],m=f[1],h=f[2],v=p.size;v--;)S[p.items[p.size-v]]=0;for(;p.size!==0;){for(x=p.pop(),g=(1+S[x])/h[x],v=0,y=m[x].length;v<y;v++)b=m[x][v],S[b]+=h[b]*g;x!==_&&(C[x]+=S[x])}}var w=null;if(w=l?d<=2?null:1/((d-1)*(d-2)):t.type===`undirected`?.5:null,w!==null)for(_=0;_<d;_++)C[_]*=w;return e?u.index.assign(c,C):u.index.collect(C)}var l=c.bind(null,!1);l.assign=c.bind(null,!0),t.exports=l})),rt=t((e=>{var t=m();function n(e,n,r,i){var a=n+`Centrality`;if(!t(r))throw Error(`graphology-centrality/`+a+`: the given graph is not a valid graphology instance.`);if(n!==`degree`&&r.type===`undirected`)throw Error(`graphology-centrality/`+a+`: cannot compute `+n+` centrality on an undirected graph.`);i||={};var o=i.nodeCentralityAttribute||a,s=r.order-1,c=r[n].bind(r);if(e){r.updateEachNodeAttributes(function(e,t){return t[o]=c(e)/s,t},{attributes:[o]});return}var l={};return r.forEachNode(function(e){l[e]=c(e)/s}),l}var r=n.bind(null,!1,`degree`),i=n.bind(null,!1,`inDegree`),a=n.bind(null,!1,`outDegree`);r.assign=n.bind(null,!0,`degree`),i.assign=n.bind(null,!0,`inDegree`),a.assign=n.bind(null,!0,`outDegree`),e.degreeCentrality=r,e.inDegreeCentrality=i,e.outDegreeCentrality=a})),it=e(ze(),1),at=Ze(),ot=e(nt(),1),st=rt(),ct=1400,lt=6,ut=6,dt=6,ft=4,pt=2,mt=4;function ht(e,t){let n=e.getNodeAttributes(t);return String(n.label||n.content||t)}function gt(e,t){let n=e.getNodeAttributes(t);return String(n.baseColor||n.color||`#63E6FF`)}function _t(e,t){let n=e.getNodeAttributes(t);return String(n.semanticGroup||n.nodeType||`entity`)}function vt(e,t){if(!t)return new Set(e.nodes());let n=new Set;for(let r of t)e.hasNode(r)&&n.add(r);return n.size?n:new Set(e.nodes())}function yt(e,t){let n=(0,st.degreeCentrality)(e),r=(0,st.inDegreeCentrality)(e),i=(0,st.outDegreeCentrality)(e),a=t?(0,ot.default)(e,{normalized:!0,getEdgeWeight:`weight`}):{},o=new Map;return e.forEachNode(e=>{let t=Number(n[e]??0),s=Number(a[e]??0),c=Number(r[e]??0),l=Number(i[e]??0);o.set(e,{degree:t,inDegree:c,outDegree:l,betweenness:s,score:t*.7+s*.3})}),{centralityByNode:o,topNodeIds:e.nodes().sort((e,t)=>{let n=o.get(e)?.score??0,r=o.get(t)?.score??0;return r===n?e.localeCompare(t):r-n}),betweennessReady:t}}function bt(e,t){let n=t?.computeCommunities??!0,r=t?.computeCentrality??!0,i=new Map,a=0,o=null;if(n&&e.order>1&&e.size>0)try{let t=it.default.detailed(e,{getEdgeWeight:`weight`});o=Number(t.modularity??0),a=Number(t.count??0),Object.entries(t.communities).forEach(([e,t])=>{i.set(e,Number(t))})}catch(e){console.error(`[GraphAnalytics] community detection failed`,e)}if(!r||e.order===0)return{communitiesByNode:i,communityCount:a,modularity:o,centralityByNode:new Map,topNodeIds:[],betweennessReady:!1};let s=yt(e,e.order<=ct);return{communitiesByNode:i,communityCount:a,modularity:o,...s}}function xt(e,t,n){let r=new Map;return e.forEachNode(i=>{let a=n.communitiesByNode.get(i);if(a===void 0)return;let o=r.get(a)??{nodeCount:0,visibleNodeCount:0,semanticCounts:new Map,anchorNodeId:null,prominence:0,color:gt(e,i)};o.nodeCount+=1,t.has(i)&&(o.visibleNodeCount+=1);let s=_t(e,i);o.semanticCounts.set(s,(o.semanticCounts.get(s)??0)+1);let c=n.centralityByNode.get(i)?.score??0;(!o.anchorNodeId||c>(n.centralityByNode.get(o.anchorNodeId)?.score??-1))&&(o.anchorNodeId=i,o.color=gt(e,i)),o.prominence+=t.has(i)?1+c:c*.15,r.set(a,o)}),[...r.entries()].map(([t,n])=>{let r=[...n.semanticCounts.entries()].sort((e,t)=>t[1]-e[1])[0]?.[0]??`entity`;return{communityId:String(t),nodeCount:n.nodeCount,visibleNodeCount:n.visibleNodeCount,dominantSemanticGroup:r,color:n.color,anchorNodeId:n.anchorNodeId,anchorLabel:n.anchorNodeId?ht(e,n.anchorNodeId):`Community anchor`,prominence:n.prominence}}).filter(e=>e.visibleNodeCount>0).sort((e,t)=>t.prominence-e.prominence).slice(0,lt)}function St(e,t,n){let r=new Map;return e.forEachNode(i=>{let a=_t(e,i),o=r.get(a)??{nodeCount:0,visibleNodeCount:0,communityCounts:new Map,anchorNodeId:null,prominence:0,color:gt(e,i)};o.nodeCount+=1,t.has(i)&&(o.visibleNodeCount+=1);let s=n.communitiesByNode.get(i);if(s!==void 0){let e=String(s);o.communityCounts.set(e,(o.communityCounts.get(e)??0)+1)}let c=n.centralityByNode.get(i)?.score??0;(!o.anchorNodeId||c>(n.centralityByNode.get(o.anchorNodeId)?.score??-1))&&(o.anchorNodeId=i,o.color=gt(e,i)),o.prominence+=t.has(i)?1+c:c*.1,r.set(a,o)}),[...r.entries()].map(([t,n])=>({semanticGroup:t,nodeCount:n.nodeCount,visibleNodeCount:n.visibleNodeCount,color:n.color,anchorNodeId:n.anchorNodeId,anchorLabel:n.anchorNodeId?ht(e,n.anchorNodeId):t,dominantCommunityId:[...n.communityCounts.entries()].sort((e,t)=>t[1]-e[1])[0]?.[0]??null,prominence:n.prominence})).filter(e=>e.visibleNodeCount>0).sort((e,t)=>t.prominence-e.prominence).slice(0,ut)}function Ct(e,t,n){let r=n.topNodeIds.filter(e=>t.has(e));return(r.length?r:n.topNodeIds).slice(0,dt).map(t=>{let r=n.centralityByNode.get(t)??{degree:0,betweenness:0,score:0};return{id:t,label:ht(e,t),semanticGroup:_t(e,t),color:gt(e,t),degree:Number(r.degree??0),betweenness:Number(r.betweenness??0),score:Number(r.score??0)}})}function wt(e,t,n){let r=[];return e.forEachOutEdge(t,(e,t,i,a)=>{n.has(a)&&r.push({edgeId:String(e),source:i,target:a,attrs:t})}),e.forEachInEdge(t,(e,t,i,a)=>{n.has(i)&&r.push({edgeId:String(e),source:i,target:a,attrs:t})}),r}function Tt(e,t,n,r){let i=r.centralityByNode.get(t)?.score??0,a=r.centralityByNode.get(n)?.score??0,o=Number(e.weight??0),s=Number(e.visualPriority??0),c=Number(e.parallelCount??1)>1?.14:0,l=e.isBidirectional?.18:0;return o*1.4+(i+a)*2.4+s*.6+c+l}function Et(e,t,n,r,i){if(t.size===0)return{ready:!1,reason:`No visible nodes are available for overview backbone selection.`,edgeIds:[]};let a=new Set,o=new Map;t.forEach(t=>{o.set(t,_t(e,t))});let s=new Set(r.slice(0,3).map(e=>e.semanticGroup)),c=new Set(i.slice(0,ft*2).map(e=>e.id).filter(e=>t.has(e))),l=i.slice(0,ft).map(e=>e.id).filter(e=>t.has(e)),u=new Map;l.forEach(r=>{wt(e,r,t).filter(e=>{let t=e.source===r?e.target:e.source;if(!c.has(t))return!1;let n=o.get(e.source),i=o.get(e.target);return!!(n&&i&&(s.has(n)||s.has(i)))}).forEach(e=>{let t=[e.source,e.target].sort().join(`::`),r=o.get(e.source),i=o.get(e.target),a=r&&i&&r!==i?.28:0,s=Tt(e.attrs,e.source,e.target,n)+a,c=u.get(t);(!c||s>c.score||s===c.score&&e.edgeId.localeCompare(c.edgeId)<0)&&u.set(t,{edgeId:e.edgeId,score:s})})});let d=new Map;e.forEachEdge((e,r,i,a)=>{if(!t.has(i)||!t.has(a))return;let c=o.get(i),l=o.get(a);if(!c||!l||c===l||!s.has(c)&&!s.has(l))return;let u=[c,l].sort().join(`::`),f=Tt(r,i,a,n)+.36,p=d.get(u);(!p||f>p.score||f===p.score&&String(e).localeCompare(p.edgeId)<0)&&d.set(u,{edgeId:String(e),score:f})}),[...d.values()].sort((e,t)=>t.score===e.score?e.edgeId.localeCompare(t.edgeId):t.score-e.score).slice(0,mt).forEach(e=>a.add(e.edgeId)),[...u.values()].sort((e,t)=>t.score===e.score?e.edgeId.localeCompare(t.edgeId):t.score-e.score).slice(0,pt).forEach(e=>a.add(e.edgeId));let f=[...a].filter(t=>e.hasEdge(t)).sort((e,t)=>e.localeCompare(t));return{ready:f.length>0,reason:f.length>0?`Ready`:`No overview backbone edges met the current visibility thresholds.`,edgeIds:f}}function Dt(e,t){if(t.activePath.length<2)return{ready:!1,reason:`Trace a path to compare it against local strict directed shortest pathfinding.`,sourceId:t.selectedNodeId||null,targetId:null,path:[],length:null,verifiedAgainstActivePath:!1};let n=t.activePath[0]??null,r=t.activePath[t.activePath.length-1]??null;if(!n||!r||!e.hasNode(n)||!e.hasNode(r))return{ready:!1,reason:`Active path endpoints are not available in the current graph view.`,sourceId:n,targetId:r,path:[],length:null,verifiedAgainstActivePath:!1};try{let i=at.dijkstra.bidirectional(e,n,r,`weight`)??[];return{ready:i.length>1,reason:i.length>1?`Ready`:`No strict directed shortest path found in the current graph view.`,sourceId:n,targetId:r,path:i,length:i.length>1?i.length-1:null,verifiedAgainstActivePath:i.join(`::`)===t.activePath.join(`::`)}}catch(e){return console.error(`[GraphAnalytics] directed pathfinding failed`,e),{ready:!1,reason:`Directed pathfinding failed for the current graph snapshot.`,sourceId:n,targetId:r,path:[],length:null,verifiedAgainstActivePath:!1}}}function Ot(e){let{graphRef:t,interactionState:n,base:r}=e,i=vt(t,e.visibleNodeIds),a=Dt(t,n),o=r.communitiesByNode.size?xt(t,i,r):[],s=St(t,i,r),c=Ct(t,i,r),l=Et(t,i,r,s,c);return{generatedAt:Date.now(),directedPath:a,communities:{ready:o.length>0,reason:o.length>0?`Ready`:r.communitiesByNode.size>0?`No visible communities in the current graph context.`:`Community detection has not produced summaries yet.`,count:r.communityCount,modularity:r.modularity,summaries:o},centrality:{ready:c.length>0,reason:c.length>0?r.betweennessReady?`Ready`:`Ready (degree-biased while betweenness is bounded for large graphs).`:`Centrality ranking is waiting for graph data.`,topNodes:c},semanticRegions:{ready:s.length>0,reason:s.length>0?`Ready`:`No semantic regions are visible in the current graph context.`,summaries:s},overviewBackbone:l}}function kt(e,t,n,r=96){return e.x>=-r&&e.y>=-r&&e.x<=t+r&&e.y<=n+r}function At(e,t,n,r,i){let a=e.createRadialGradient(t,n,0,t,n,r);a.addColorStop(0,i),a.addColorStop(1,`rgba(0,0,0,0)`),e.fillStyle=a,e.beginPath(),e.arc(t,n,r,0,Math.PI*2),e.fill()}function jt(e,t){let n=document.createElement(`canvas`);return n.width=e,n.height=t,n}function Mt(e){if(e.startsWith(`#`)){let t=e.slice(1),n=t.length===3?t.split(``).map(e=>`${e}${e}`).join(``):t;if(n.length===6)return{r:Number.parseInt(n.slice(0,2),16),g:Number.parseInt(n.slice(2,4),16),b:Number.parseInt(n.slice(4,6),16)}}let t=e.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)/i);return t?{r:Number.parseInt(t[1],10),g:Number.parseInt(t[2],10),b:Number.parseInt(t[3],10)}:{r:130,g:145,b:165}}function Nt(e,t,n,r){let i=new Uint8Array(t*n),a=0,o=0,s=0,c=0;for(let l=0;l<n;l+=1)for(let n=0;n<t;n+=1){let u=l*t+n,d=e[u];d<r||(i[u]=1,a+=1,o+=n*d,s+=l*d,c+=d)}let l=c>0?{x:o/c,y:s/c}:{x:t/2,y:n/2};return{mask:i,count:a,centroid:l}}function Pt(e,t,n,r){if(r<=0)return e;let i=e;for(let e=0;e<r;e+=1){let e=new Uint8ClampedArray(t*n);for(let r=0;r<n;r+=1)for(let a=0;a<t;a+=1){let o=0,s=0;for(let e=-1;e<=1;e+=1){let c=r+e;if(!(c<0||c>=n))for(let e=-1;e<=1;e+=1){let n=a+e;n<0||n>=t||(o+=i[c*t+n],s+=1)}}e[r*t+a]=Math.round(o/Math.max(s,1))}i=e}return i}function Ft(e,t,n,r){let i=new Uint8Array(e.length),a=new Int32Array(e.length),o=[],s=0;for(let r=0;r<e.length;r+=1){if(!e[r]||i[r])continue;let c=0,l=0,u=[];for(i[r]=1,a[l++]=r;c<l;){let r=a[c++];u.push(r);let o=r%t,s=Math.floor(r/t),d=[r-1,r+1,r-t,r+t];for(let r=0;r<d.length;r+=1){let c=d[r];c<0||c>=e.length||i[c]||!e[c]||r===0&&o===0||r===1&&o===t-1||r===2&&s===0||r===3&&s===n-1||(i[c]=1,a[l++]=c)}}s+=u.length,u.length>o.length&&(o=u)}let c=new Uint8Array(e.length),l=0,u=0,d=0;return o.forEach(e=>{c[e]=1;let n=r[e],i=e%t,a=Math.floor(e/t);l+=i*n,u+=a*n,d+=n}),{mask:c,count:o.length,centroid:d>0?{x:l/d,y:u/d}:{x:t/2,y:n/2},occupancyRatio:o.length/Math.max(t*n,1),dominantMassRatio:o.length/Math.max(s,1)}}function It(e,t,n){let r=j.effects.semanticRegions.fogResolutionScale,i=Math.max(72,Math.round(t*r)),a=Math.max(72,Math.round(n*r)),o=jt(i,a),s=o.getContext(`2d`);if(!s)return null;s.clearRect(0,0,i,a),s.globalCompositeOperation=`source-over`,e.forEach(e=>{let t=e.point.x*r,n=e.point.y*r,i=Math.max(2.5,(j.effects.semanticRegions.splatRadius+e.size*.9)*r),a=s.createRadialGradient(t,n,0,t,n,i);a.addColorStop(0,`rgba(255,255,255,0.22)`),a.addColorStop(.58,`rgba(255,255,255,0.08)`),a.addColorStop(1,`rgba(255,255,255,0)`),s.fillStyle=a,s.beginPath(),s.arc(t,n,i,0,Math.PI*2),s.fill()});let c=s.getImageData(0,0,i,a),l=new Uint8ClampedArray(i*a),u=0;for(let e=0;e<l.length;e+=1){let t=c.data[e*4+3];l[e]=t,t>u&&(u=t)}if(u<=0)return null;let d=Pt(l,i,a,j.effects.semanticRegions.blurPasses),f=d.reduce((e,t)=>Math.max(e,t),0);return f<=0?null:{canvas:o,gridWidth:i,gridHeight:a,alphaValues:d,maxAlpha:f,scale:r}}function Lt(e,t,n,r){if(!t)return;let{gridWidth:i,gridHeight:a,alphaValues:o}=t,s=jt(i,a),c=s.getContext(`2d`);if(!c)return;let l=c.createImageData(i,a),u=Mt(n);for(let e=0;e<o.length;e+=1){let t=o[e]/255;if(t<=0)continue;let n=e*4;l.data[n]=u.r,l.data[n+1]=u.g,l.data[n+2]=u.b,l.data[n+3]=Math.round(255*t**1.7*r)}c.putImageData(l,0,0),e.save(),e.imageSmoothingEnabled=!0,e.globalCompositeOperation=`lighter`,e.drawImage(s,0,0,e.canvas.width,e.canvas.height),e.restore()}function Rt(e,t,n,r,i,a){let o=jt(n,r),s=o.getContext(`2d`);if(!s)return;let c=s.createImageData(n,r),l=Mt(i);for(let e=1;e<r-1;e+=1)for(let r=1;r<n-1;r+=1){let i=e*n+r;if(!t[i]||!(!t[i-1]||!t[i+1]||!t[i-n]||!t[i+n]))continue;let o=i*4;c.data[o]=l.r,c.data[o+1]=l.g,c.data[o+2]=l.b,c.data[o+3]=Math.round(255*a)}s.putImageData(c,0,0),e.save(),e.imageSmoothingEnabled=!0,e.drawImage(o,0,0,e.canvas.width,e.canvas.height),e.restore()}function zt(e){return{fogColor:E(`#0E1927`,e,.46),innerContourColor:E(`#1C2C3F`,e,.78),outerContourColor:E(`#132131`,e,.6),labelBorderColor:E(`#2B3F57`,e,.78)}}function Bt(e,t,n,r){let i=[];return t.forEachNode((t,a)=>{let o=e.getNodeDisplayData(t);if(!o)return;let s=e.graphToViewport({x:o.x,y:o.y});kt(s,n,r,84)&&i.push({nodeId:t,point:s,size:o.size,attrs:a})}),i}function Vt(e,t,n,r,i){let a=r.length>22?`${r.slice(0,21)}…`:r;e.save(),e.font=`600 11px "IBM Plex Sans", Inter, system-ui, sans-serif`,e.textBaseline=`middle`;let o=e.measureText(a).width+14,s=t-o/2,c=n-22/2;e.fillStyle=`rgba(8, 14, 24, 0.84)`,e.strokeStyle=A(i,.24),e.lineWidth=1,e.beginPath(),e.roundRect(s,c,o,22,999),e.fill(),e.stroke(),e.fillStyle=`rgba(235, 244, 255, 0.88)`,e.fillText(a,s+7,n),e.restore()}function Ht(e,t,n,r,i){if(!i.semanticRegionsEnabled||!t?.semanticRegions.ready||!b(r.zoomTier,j.effects.semanticRegions.minZoomTier))return;let a=new Map;n.forEach(e=>{let t=String(e.attrs.semanticGroup||e.attrs.nodeType||`entity`),n=a.get(t);n?n.push(e):a.set(t,[e])});let o=t.semanticRegions.summaries.slice(0,j.effects.semanticRegions.maxRegions),s=o.reduce((e,t)=>Math.max(e,t.prominence),1),c=j.effects.semanticRegions;o.forEach(t=>{let n=a.get(t.semanticGroup);if(!n||n.length<c.minVisibleSamples)return;let r=It(n,e.canvas.width,e.canvas.height);if(!r)return;let i=.52+t.prominence/s*.48,o=Math.max(18,r.maxAlpha*c.densityThreshold),l=Math.max(28,r.maxAlpha*c.contourThreshold),u=Math.max(18,l*.72),d=Ft(Nt(r.alphaValues,r.gridWidth,r.gridHeight,o).mask,r.gridWidth,r.gridHeight,r.alphaValues);if(d.count<c.minMaskPixels||d.occupancyRatio<c.minOccupancyRatio||d.dominantMassRatio<c.dominantMassRatio)return;let f=Nt(r.alphaValues,r.gridWidth,r.gridHeight,l),p=Nt(r.alphaValues,r.gridWidth,r.gridHeight,u),m=Ft(f.mask,r.gridWidth,r.gridHeight,r.alphaValues),h=Ft(p.mask,r.gridWidth,r.gridHeight,r.alphaValues),g=zt(t.color);Lt(e,r,g.fogColor,c.fogAlpha*i),h.count>=c.outerContourMinMaskPixels&&h.dominantMassRatio>=c.dominantMassRatio&&Rt(e,h.mask,r.gridWidth,r.gridHeight,g.outerContourColor,c.outerContourAlpha*i),Rt(e,m.mask,r.gridWidth,r.gridHeight,g.innerContourColor,c.innerContourAlpha*i),t.visibleNodeCount>=18&&Vt(e,d.centroid.x/r.scale,d.centroid.y/r.scale-18,t.semanticGroup,g.labelBorderColor)})}function Ut(e,t,n,r,i){if(!i.contoursEnabled||!t?.centrality.ready||!b(r.zoomTier,j.effects.contours.minZoomTier))return;let a=new Map(n.map(e=>[e.nodeId,e]));t.centrality.topNodes.slice(0,j.effects.contours.maxContours).forEach(t=>{let n=a.get(t.id);n&&At(e,n.point.x,n.point.y,j.effects.contours.baseRadius+n.size*3.2,A(t.color,j.effects.contours.glowAlpha))})}function Wt(e,t){if(!t||!e.valid_from&&!e.valid_until)return!1;let n=t.getTime(),r=e.valid_from?new Date(e.valid_from).getTime():-1/0,i=e.valid_until?new Date(e.valid_until).getTime():1/0;return n>=r&&n<=i}function Gt(e,t,n,r,i){!i.temporalEmphasisEnabled||!n?.currentTime||b(r.zoomTier,j.effects.temporalEmphasis.minZoomTier)&&t.filter(e=>Wt(e.attrs,n.currentTime)).slice(0,j.effects.temporalEmphasis.maxHighlights).forEach(t=>{At(e,t.point.x,t.point.y,Math.max(t.size*j.effects.temporalEmphasis.radiusMultiplier,14),A(j.palette.accent.temporal,j.effects.temporalEmphasis.glowAlpha))})}function Kt(e,t,n,r){let i=t.getNodeDisplayData(n);if(!i)return;let a=t.graphToViewport({x:i.x,y:i.y});At(e,a.x,a.y,j.effects.lens.radius,A(j.palette.accent.hovered,j.effects.lens.glowAlpha)),r.forEach(r=>{if(r===n||!S.hasNode(r)||!S.hasDirectedEdge(n,r)&&!S.hasDirectedEdge(r,n))return;let i=t.getNodeDisplayData(r);if(!i)return;let o=t.graphToViewport({x:i.x,y:i.y});e.strokeStyle=A(j.palette.accent.hovered,j.effects.lens.edgeAlpha*.38),e.lineWidth=j.effects.lens.edgeLineWidth+3.2,e.lineCap=`round`,e.beginPath(),e.moveTo(a.x,a.y),e.lineTo(o.x,o.y),e.stroke(),e.strokeStyle=A(j.palette.accent.hovered,j.effects.lens.edgeAlpha),e.lineWidth=j.effects.lens.edgeLineWidth,e.beginPath(),e.moveTo(a.x,a.y),e.lineTo(o.x,o.y),e.stroke()})}function qt(e,t,n,r,i){n.pathFlowEnabled&&r.pathFlow.available&&t.forEach((t,n)=>{let r=(i*j.effects.pathFlow.speed+n*j.effects.pathFlow.spacing)%1,a=t.source.x+(t.target.x-t.source.x)*r,o=t.source.y+(t.target.y-t.source.y)*r,s=Math.max(0,r-.08),c=t.source.x+(t.target.x-t.source.x)*s,l=t.source.y+(t.target.y-t.source.y)*s;e.strokeStyle=A(t.color,.28),e.lineWidth=Math.max(t.size+3.6,4.6),e.lineCap=`round`,e.beginPath(),e.moveTo(c,l),e.lineTo(a,o),e.stroke(),e.strokeStyle=A(j.palette.accent.selected,j.effects.pathFlow.opacity),e.lineWidth=Math.max(t.size+1.3,2.4),e.beginPath(),e.moveTo(c,l),e.lineTo(a,o),e.stroke()}),n.pathPulseEnabled&&r.pathPulse.available&&t.forEach((t,n)=>{let r=(i*j.effects.pathPulse.speed+n*.17)%1,a=t.source.x+(t.target.x-t.source.x)*r,o=t.source.y+(t.target.y-t.source.y)*r,s=e.createRadialGradient(a,o,0,a,o,j.effects.pathPulse.radius);s.addColorStop(0,A(j.palette.accent.path,j.effects.pathPulse.glowAlpha)),s.addColorStop(1,`rgba(0,0,0,0)`),e.fillStyle=s,e.beginPath(),e.arc(a,o,j.effects.pathPulse.radius,0,Math.PI*2),e.fill()})}function Jt(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Yt(e){var t=Jt(e,`string`);return typeof t==`symbol`?t:t+``}function Xt(e,t,n){return(t=Yt(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Qt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Zt(Object(n),!0).forEach(function(t){Xt(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Zt(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function $t(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function en(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,Yt(r.key),r)}}function tn(e,t,n){return t&&en(e.prototype,t),n&&en(e,n),Object.defineProperty(e,`prototype`,{writable:!1}),e}function nn(e){return nn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},nn(e)}function rn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(rn=function(){return!!e})()}function an(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function on(e,t){if(t&&(typeof t==`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return an(e)}function sn(e,t,n){return t=nn(t),on(e,rn()?Reflect.construct(t,n||[],nn(e).constructor):t.apply(e,n))}function cn(e,t){return cn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},cn(e,t)}function ln(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,`prototype`,{writable:!1}),t&&cn(e,t)}function un(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function dn(e){if(Array.isArray(e))return un(e)}function fn(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function pn(e,t){if(e){if(typeof e==`string`)return un(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?un(e,t):void 0}}function mn(){throw TypeError(`Invalid attempt to spread non-iterable instance.-In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function hn(e){return dn(e)||fn(e)||pn(e)||mn()}function gn(e,t,n,r){return{x:(1-e)**2*t.x+2*(1-e)*e*n.x+e**2*r.x,y:(1-e)**2*t.y+2*(1-e)*e*n.y+e**2*r.y}}function _n(e,t,n){for(var r=20,i=0,a=e,o=0;o<r;o++){var s=gn((o+1)/r,e,t,n);i+=Math.sqrt((a.x-s.x)**2+(a.y-s.y)**2),a=s}return i}function vn(e){var t=e.curvatureAttribute,n=e.defaultCurvature,r=e.keepLabelUpright,i=r===void 0?!0:r;return function(e,r,a,o,s){var c=s.edgeLabelSize,l=r[t]||n,u=s.edgeLabelFont,d=s.edgeLabelWeight,f=s.edgeLabelColor.attribute?r[s.edgeLabelColor.attribute]||s.edgeLabelColor.color||`#000`:s.edgeLabelColor.color,p=r.label;if(p){e.fillStyle=f,e.font=`${d} ${c}px ${u}`;var m=!i||a.x<o.x,h=m?a.x:o.x,g=m?a.y:o.y,_=m?o.x:a.x,v=m?o.y:a.y,y=(h+_)/2,b=(g+v)/2,x=_-h,S=v-g,C=Math.sqrt(x**2+S**2),w=m?1:-1,T=y+S*l*w,E=b-x*l*w,D=r.size*.7+5,O={x:E-g,y:-(T-h)},k=Math.sqrt(O.x**2+O.y**2),A={x:v-E,y:-(_-T)},j=Math.sqrt(A.x**2+A.y**2);h+=D*O.x/k,g+=D*O.y/k,_+=D*A.x/j,v+=D*A.y/j,T+=D*S/C,E-=D*x/C;var M={x:T,y:E},N={x:h,y:g},P={x:_,y:v},F=_n(N,M,P);if(!(F<a.size+o.size)){var I=e.measureText(p).width,L=F-a.size-o.size;if(I>L){var R=`…`;for(p+=R,I=e.measureText(p).width;I>L&&p.length>1;)p=p.slice(0,-2)+R,I=e.measureText(p).width;if(p.length<4)return}for(var z={},ee=0,te=p.length;ee<te;ee++){var B=p[ee];z[B]||(z[B]=e.measureText(B).width*(1+l*.35))}for(var ne=.5-I/F/2,re=0,V=p.length;re<V;re++){var ie=p[re],ae=gn(ne,N,M,P),H=2*(1-ne)*(T-h)+2*ne*(_-T),U=2*(1-ne)*(E-g)+2*ne*(v-E),oe=Math.atan2(U,H);e.save(),e.translate(ae.x,ae.y),e.rotate(oe),e.fillText(ie,0,0),e.restore(),ne+=z[ie]/F}}}}}function yn(e){var t=e.arrowHead,n=t?.extremity===`target`||t?.extremity===`both`,r=t?.extremity===`source`||t?.extremity===`both`;return`-precision highp float;--varying vec4 v_color;-varying float v_thickness;-varying float v_feather;-varying vec2 v_cpA;-varying vec2 v_cpB;-varying vec2 v_cpC;-${n?`-varying float v_targetSize;-varying vec2 v_targetPoint;`:``}-${r?`-varying float v_sourceSize;-varying vec2 v_sourcePoint;`:``}-${t?`-uniform float u_lengthToThicknessRatio;-uniform float u_widenessToThicknessRatio;`:``}--float det(vec2 a, vec2 b) {- return a.x * b.y - b.x * a.y;-}--vec2 getDistanceVector(vec2 b0, vec2 b1, vec2 b2) {- float a = det(b0, b2), b = 2.0 * det(b1, b0), d = 2.0 * det(b2, b1);- float f = b * d - a * a;- vec2 d21 = b2 - b1, d10 = b1 - b0, d20 = b2 - b0;- vec2 gf = 2.0 * (b * d21 + d * d10 + a * d20);- gf = vec2(gf.y, -gf.x);- vec2 pp = -f * gf / dot(gf, gf);- vec2 d0p = b0 - pp;- float ap = det(d0p, d20), bp = 2.0 * det(d10, d0p);- float t = clamp((ap + bp) / (2.0 * a + b + d), 0.0, 1.0);- return mix(mix(b0, b1, t), mix(b1, b2, t), t);-}--float distToQuadraticBezierCurve(vec2 p, vec2 b0, vec2 b1, vec2 b2) {- return length(getDistanceVector(b0 - p, b1 - p, b2 - p));-}--const vec4 transparent = vec4(0.0, 0.0, 0.0, 0.0);--void main(void) {- float dist = distToQuadraticBezierCurve(gl_FragCoord.xy, v_cpA, v_cpB, v_cpC);- float thickness = v_thickness;-${n?`- float distToTarget = length(gl_FragCoord.xy - v_targetPoint);- float targetArrowLength = v_targetSize + thickness * u_lengthToThicknessRatio;- if (distToTarget < targetArrowLength) {- thickness = (distToTarget - v_targetSize) / (targetArrowLength - v_targetSize) * u_widenessToThicknessRatio * thickness;- }`:``}-${r?`- float distToSource = length(gl_FragCoord.xy - v_sourcePoint);- float sourceArrowLength = v_sourceSize + thickness * u_lengthToThicknessRatio;- if (distToSource < sourceArrowLength) {- thickness = (distToSource - v_sourceSize) / (sourceArrowLength - v_sourceSize) * u_widenessToThicknessRatio * thickness;- }`:``}-- float halfThickness = thickness / 2.0;- if (dist < halfThickness) {- #ifdef PICKING_MODE- gl_FragColor = v_color;- #else- float t = smoothstep(- halfThickness - v_feather,- halfThickness,- dist- );-- gl_FragColor = mix(v_color, transparent, t);- #endif- } else {- gl_FragColor = transparent;- }-}-`}function bn(e){var t=e.arrowHead,n=t?.extremity===`target`||t?.extremity===`both`,r=t?.extremity===`source`||t?.extremity===`both`;return`-attribute vec4 a_id;-attribute vec4 a_color;-attribute float a_direction;-attribute float a_thickness;-attribute vec2 a_source;-attribute vec2 a_target;-attribute float a_current;-attribute float a_curvature;-${n?`attribute float a_targetSize;-`:``}-${r?`attribute float a_sourceSize;-`:``}--uniform mat3 u_matrix;-uniform float u_sizeRatio;-uniform float u_pixelRatio;-uniform vec2 u_dimensions;-uniform float u_minEdgeThickness;-uniform float u_feather;--varying vec4 v_color;-varying float v_thickness;-varying float v_feather;-varying vec2 v_cpA;-varying vec2 v_cpB;-varying vec2 v_cpC;-${n?`-varying float v_targetSize;-varying vec2 v_targetPoint;`:``}-${r?`-varying float v_sourceSize;-varying vec2 v_sourcePoint;`:``}-${t?`-uniform float u_widenessToThicknessRatio;`:``}--const float bias = 255.0 / 254.0;-const float epsilon = 0.7;--vec2 clipspaceToViewport(vec2 pos, vec2 dimensions) {- return vec2(- (pos.x + 1.0) * dimensions.x / 2.0,- (pos.y + 1.0) * dimensions.y / 2.0- );-}--vec2 viewportToClipspace(vec2 pos, vec2 dimensions) {- return vec2(- pos.x / dimensions.x * 2.0 - 1.0,- pos.y / dimensions.y * 2.0 - 1.0- );-}--void main() {- float minThickness = u_minEdgeThickness;-- // Selecting the correct position- // Branchless "position = a_source if a_current == 1.0 else a_target"- vec2 position = a_source * max(0.0, a_current) + a_target * max(0.0, 1.0 - a_current);- position = (u_matrix * vec3(position, 1)).xy;-- vec2 source = (u_matrix * vec3(a_source, 1)).xy;- vec2 target = (u_matrix * vec3(a_target, 1)).xy;-- vec2 viewportPosition = clipspaceToViewport(position, u_dimensions);- vec2 viewportSource = clipspaceToViewport(source, u_dimensions);- vec2 viewportTarget = clipspaceToViewport(target, u_dimensions);-- vec2 delta = viewportTarget.xy - viewportSource.xy;- float len = length(delta);- vec2 normal = vec2(-delta.y, delta.x) * a_direction;- vec2 unitNormal = normal / len;- float boundingBoxThickness = len * a_curvature;-- float curveThickness = max(minThickness, a_thickness / u_sizeRatio);- v_thickness = curveThickness * u_pixelRatio;- v_feather = u_feather;-- v_cpA = viewportSource;- v_cpB = 0.5 * (viewportSource + viewportTarget) + unitNormal * a_direction * boundingBoxThickness;- v_cpC = viewportTarget;-- vec2 viewportOffsetPosition = (- viewportPosition +- unitNormal * (boundingBoxThickness / 2.0 + sign(boundingBoxThickness) * (${t?`curveThickness * u_widenessToThicknessRatio`:`curveThickness`} + epsilon)) *- max(0.0, a_direction) // NOTE: cutting the bounding box in half to avoid overdraw- );-- position = viewportToClipspace(viewportOffsetPosition, u_dimensions);- gl_Position = vec4(position, 0, 1);--${n?`- v_targetSize = a_targetSize * u_pixelRatio / u_sizeRatio;- v_targetPoint = viewportTarget;-`:``}-${r?`- v_sourceSize = a_sourceSize * u_pixelRatio / u_sizeRatio;- v_sourcePoint = viewportSource;-`:``}-- #ifdef PICKING_MODE- // For picking mode, we use the ID as the color:- v_color = a_id;- #else- // For normal mode, we use the color:- v_color = a_color;- #endif-- v_color.a *= bias;-}-`}var xn=.25,Sn={arrowHead:null,curvatureAttribute:`curvature`,defaultCurvature:xn},Cn=WebGLRenderingContext,wn=Cn.UNSIGNED_BYTE,Tn=Cn.FLOAT;function En(e){var t=Qt(Qt({},Sn),e||{}),n=t,r=n.arrowHead,i=n.curvatureAttribute,a=n.drawLabel,o=r?.extremity===`target`||r?.extremity===`both`,s=r?.extremity===`source`||r?.extremity===`both`,c=[`u_matrix`,`u_sizeRatio`,`u_dimensions`,`u_pixelRatio`,`u_feather`,`u_minEdgeThickness`].concat(hn(r?[`u_lengthToThicknessRatio`,`u_widenessToThicknessRatio`]:[]));return function(e){ln(n,e);function n(){var e;$t(this,n);var r=[...arguments];return e=sn(this,n,[].concat(r)),Xt(an(e),`drawLabel`,a||vn(t)),e}return tn(n,[{key:`getDefinition`,value:function(){return{VERTICES:6,VERTEX_SHADER_SOURCE:bn(t),FRAGMENT_SHADER_SOURCE:yn(t),METHOD:WebGLRenderingContext.TRIANGLES,UNIFORMS:c,ATTRIBUTES:[{name:`a_source`,size:2,type:Tn},{name:`a_target`,size:2,type:Tn}].concat(hn(o?[{name:`a_targetSize`,size:1,type:Tn}]:[]),hn(s?[{name:`a_sourceSize`,size:1,type:Tn}]:[]),[{name:`a_thickness`,size:1,type:Tn},{name:`a_curvature`,size:1,type:Tn},{name:`a_color`,size:4,type:wn,normalized:!0},{name:`a_id`,size:4,type:wn,normalized:!0}]),CONSTANT_ATTRIBUTES:[{name:`a_current`,size:1,type:Tn},{name:`a_direction`,size:1,type:Tn}],CONSTANT_DATA:[[0,1],[0,-1],[1,1],[0,-1],[1,1],[1,-1]]}}},{key:`processVisibleItem`,value:function(e,t,n,r,a){var c=a.size||1,l=n.x,u=n.y,d=r.x,f=r.y,p=v(a.color),m=a[i]??xn,h=this.array;h[t++]=l,h[t++]=u,h[t++]=d,h[t++]=f,o&&(h[t++]=r.size),s&&(h[t++]=n.size),h[t++]=c,h[t++]=m,h[t++]=p,h[t++]=e}},{key:`setUniforms`,value:function(e,t){var n=t.gl,i=t.uniformLocations,a=i.u_matrix,o=i.u_pixelRatio,s=i.u_feather,c=i.u_sizeRatio,l=i.u_dimensions,u=i.u_minEdgeThickness;if(n.uniformMatrix3fv(a,!1,e.matrix),n.uniform1f(o,e.pixelRatio),n.uniform1f(c,e.sizeRatio),n.uniform1f(s,e.antiAliasingFeather),n.uniform2f(l,e.width*e.pixelRatio,e.height*e.pixelRatio),n.uniform1f(u,e.minEdgeThickness),r){var d=i.u_lengthToThicknessRatio,f=i.u_widenessToThicknessRatio;n.uniform1f(d,r.lengthToThicknessRatio),n.uniform1f(f,r.widenessToThicknessRatio)}}}]),n}(l)}var Dn=En(),On=En({arrowHead:g});En({arrowHead:Qt(Qt({},g),{},{extremity:`both`})});var kn=[`u_sizeRatio`,`u_correctionRatio`,`u_matrix`],An=`-precision highp float;--varying vec4 v_coreColor;-varying vec4 v_shellColor;-varying vec4 v_ringColor;-varying vec4 v_color;-varying vec2 v_diffVector;-varying float v_radius;-varying float v_ringSize;-varying float v_coreScale;--uniform float u_correctionRatio;--const float bias = 255.0 / 254.0;-const vec4 transparent = vec4(0.0, 0.0, 0.0, 0.0);--float discMetric(vec2 point) {- return length(point);-}--void main(void) {- vec2 unit = v_diffVector / max(v_radius, 0.0001);- float metric = discMetric(unit);- float aa = (2.4 * u_correctionRatio) / max(v_radius, 1.0);- float alpha = 1.0 - smoothstep(1.0 - aa, 1.0 + aa, metric);-- #ifdef PICKING_MODE- if (alpha <= 0.0) {- gl_FragColor = transparent;- } else {- gl_FragColor = v_color;- gl_FragColor.a *= bias;- }- #else- if (alpha <= 0.0) {- gl_FragColor = transparent;- return;- }-- float ringNorm = clamp(v_ringSize / max(v_radius, 1.0), 0.0, 0.45);- float ringStart = max(0.0, 1.0 - ringNorm);- float coreEdge = clamp(v_coreScale, 0.06, 0.78);- float coreBlend = 1.0 - smoothstep(max(coreEdge - 0.14, 0.0), coreEdge, metric);- float bodyLight = 1.0 - smoothstep(0.0, 0.82, metric);- vec4 color = mix(v_shellColor, v_coreColor, coreBlend);- color.rgb += vec3(0.022) * pow(bodyLight, 1.45);-- if (ringNorm > 0.0 && metric >= ringStart) {- color = v_ringColor;- }- color.a *= alpha;- gl_FragColor = color;- #endif-}-`,jn=`-attribute vec4 a_id;-attribute vec2 a_position;-attribute float a_size;-attribute float a_angle;-attribute vec4 a_coreColor;-attribute vec4 a_shellColor;-attribute vec4 a_ringColor;-attribute float a_ringSize;-attribute float a_coreScale;--uniform mat3 u_matrix;-uniform float u_sizeRatio;-uniform float u_correctionRatio;--varying vec4 v_coreColor;-varying vec4 v_shellColor;-varying vec4 v_ringColor;-varying vec4 v_color;-varying vec2 v_diffVector;-varying float v_radius;-varying float v_ringSize;-varying float v_coreScale;--const float bias = 255.0 / 254.0;--void main() {- float size = a_size * u_correctionRatio / u_sizeRatio * 4.0;- vec2 diffVector = size * vec2(cos(a_angle), sin(a_angle));- vec2 position = a_position + diffVector;-- gl_Position = vec4(- (u_matrix * vec3(position, 1)).xy,- 0,- 1- );-- v_diffVector = diffVector;- v_radius = size / 2.0;- v_ringSize = a_ringSize;- v_coreScale = a_coreScale;-- #ifdef PICKING_MODE- v_color = a_id;- #else- v_coreColor = a_coreColor;- v_shellColor = a_shellColor;- v_ringColor = a_ringColor;- #endif-- v_color.a *= bias;-}-`,Mn=class e extends f{static ANGLE_1=0;static ANGLE_2=2*Math.PI/3;static ANGLE_3=4*Math.PI/3;drawLabel=Fn;drawHover=In;getDefinition(){return{VERTICES:3,VERTEX_SHADER_SOURCE:jn,FRAGMENT_SHADER_SOURCE:An,METHOD:WebGLRenderingContext.TRIANGLES,UNIFORMS:kn,ATTRIBUTES:[{name:`a_position`,size:2,type:WebGLRenderingContext.FLOAT},{name:`a_size`,size:1,type:WebGLRenderingContext.FLOAT},{name:`a_coreColor`,size:4,type:WebGLRenderingContext.UNSIGNED_BYTE,normalized:!0},{name:`a_shellColor`,size:4,type:WebGLRenderingContext.UNSIGNED_BYTE,normalized:!0},{name:`a_ringColor`,size:4,type:WebGLRenderingContext.UNSIGNED_BYTE,normalized:!0},{name:`a_ringSize`,size:1,type:WebGLRenderingContext.FLOAT},{name:`a_coreScale`,size:1,type:WebGLRenderingContext.FLOAT},{name:`a_id`,size:4,type:WebGLRenderingContext.UNSIGNED_BYTE,normalized:!0}],CONSTANT_ATTRIBUTES:[{name:`a_angle`,size:1,type:WebGLRenderingContext.FLOAT}],CONSTANT_DATA:[[e.ANGLE_1],[e.ANGLE_2],[e.ANGLE_3]]}}processVisibleItem(e,t,n){let r=this.array,i=Nn(n.ringSize,n.ringColor,n.borderColor,j.nodes.selectedRing.color);r[t++]=n.x,r[t++]=n.y,r[t++]=n.size,r[t++]=v(n.color||j.palette.overview.nodeCore),r[t++]=v(n.shellColor||A(j.palette.overview.nodeBase,j.palette.overview.nodeShellAlpha)),r[t++]=v(i),r[t++]=n.ringSize||0,r[t++]=n.coreScale??.22,r[t++]=e}setUniforms(e,{gl:t,uniformLocations:n}){t.uniform1f(n.u_correctionRatio,e.correctionRatio),t.uniform1f(n.u_sizeRatio,e.sizeRatio),t.uniformMatrix3fv(n.u_matrix,!1,e.matrix)}};function Nn(e,t,n,r){return typeof e==`number`&&e>0&&t?t:n||r}function Pn(e,t,n,r,i,a){let o=Math.max(0,Math.min(a,Math.min(r,i)/2));e.beginPath(),e.moveTo(t+o,n),e.lineTo(t+r-o,n),e.quadraticCurveTo(t+r,n,t+r,n+o),e.lineTo(t+r,n+i-o),e.quadraticCurveTo(t+r,n+i,t+r-o,n+i),e.lineTo(t+o,n+i),e.quadraticCurveTo(t,n+i,t,n+i-o),e.lineTo(t,n+o),e.quadraticCurveTo(t,n,t+o,n),e.closePath()}var Fn=(e,t)=>{let n=t;if(!n.label)return;let r=j.labels.chip,i=Math.max(r.fontSize,Math.min(r.maxFontSize,n.size*r.sizeScale)),a=`${r.fontWeight} ${i}px ${r.fontFamily}`,o=r.paddingX,s=r.paddingY,c=Nn(n.ringSize,n.ringColor,n.borderColor,r.borderColor);e.save(),e.font=a,e.textBaseline=`middle`;let l=e.measureText(n.label).width+o*2,u=i+s*2,d=n.x+Math.max(n.size*.7,r.offsetX),f=n.y-Math.max(n.size*.9,r.offsetY)-u;e.shadowColor=A(r.shadowColor,r.shadowAlpha),e.shadowBlur=r.shadowBlur,e.fillStyle=r.background,Pn(e,d,f,l,u,r.radius),e.fill(),e.shadowBlur=0,e.strokeStyle=A(c,r.borderAlpha),e.lineWidth=1,Pn(e,d,f,l,u,r.radius),e.stroke(),e.fillStyle=r.textColor,e.fillText(n.label,d+o,f+u/2),e.restore()},In=(e,t)=>{let n=t;if(!n.label)return;let r=j.labels.hoverCard,i=Nn(n.ringSize,n.ringColor,n.borderColor,r.borderColor),a=typeof n.nodeType==`string`&&n.nodeType.trim().length>0?n.nodeType.replaceAll(`_`,` `).toUpperCase():`NODE`;e.save(),e.textBaseline=`top`;let o=`${r.titleWeight} ${r.titleSize}px ${r.fontFamily}`,s=`${r.metaWeight} ${r.metaSize}px ${r.fontFamily}`;e.font=o;let c=e.measureText(n.label).width;e.font=s;let l=e.measureText(a).width,u=Math.max(c,l)+r.paddingX*2,d=r.paddingY*2+r.titleSize+r.metaGap+r.metaSize,f=n.x+Math.max(n.size*.9,r.offsetX),p=n.y-Math.max(n.size*1.1,r.offsetY)-d;e.shadowColor=A(r.shadowColor,r.shadowAlpha),e.shadowBlur=r.shadowBlur,e.fillStyle=r.background,Pn(e,f,p,u,d,r.radius),e.fill(),e.shadowBlur=0,e.strokeStyle=A(i,r.borderAlpha),e.lineWidth=1.2,Pn(e,f,p,u,d,r.radius),e.stroke(),e.fillStyle=r.textColor,e.font=o,e.fillText(n.label,f+r.paddingX,p+r.paddingY),e.fillStyle=r.metaColor,e.font=s,e.fillText(a,f+r.paddingX,p+r.paddingY+r.titleSize+r.metaGap),e.restore()},Ln={...c,circle:Mn},Rn={...d,curve:Dn,curvedArrow:On},zn={iterations:50,settings:{barnesHutOptimize:!0,barnesHutTheta:.5,adjustSizes:!1,gravity:.16,scalingRatio:7.5,edgeWeightInfluence:.3,linLogMode:!0,strongGravityMode:!1,slowDown:18}},Bn={allowInvalidContainer:!0,labelRenderedSizeThreshold:4,defaultNodeType:`circle`,defaultEdgeType:`line`,hideLabelsOnMove:!0,hideEdgesOnMove:!0,enableEdgeEvents:!0,renderEdgeLabels:!1,labelDensity:.86,labelGridCellSize:100,zIndex:!0,webGLTarget:`webgl2`,nodeProgramClasses:Ln,edgeProgramClasses:Rn,defaultDrawNodeLabel:Fn,defaultDrawNodeHover:In};function Vn(e,t,n,r=96){return e.x>=-r&&e.y>=-r&&e.x<=t+r&&e.y<=n+r}function Hn(e,t,n,r,i,a){let o=[];for(let s=0;s<t.length-1;s+=1){let c=t[s],l=t[s+1],u=e.getNodeDisplayData(c),d=e.getNodeDisplayData(l);if(!u||!d)continue;let f=e.graphToViewport({x:u.x,y:u.y}),p=e.graphToViewport({x:d.x,y:d.y});if(!Vn(f,i,a)&&!Vn(p,i,a))continue;let m=De(j,r,`path`,n[s]&&S.hasEdge(n[s])?S.getEdgeAttributes(n[s]):{baseColor:j.palette.accent.path,baseSize:1.2,edgeVariant:`pathSignal`,arrowVisibilityPolicy:`always`},c,l);!m.color||!m.size||o.push({sourceId:c,targetId:l,source:f,target:p,color:m.color,size:m.size})}return o}function Un(e,t,n,r,i,a,o){let s=i?Hn(i,e.activePath,e.activePathEdgeIds,e.zoomTier,a,o).length:0,c=e.activePath.length>1,l=b(e.zoomTier,j.effects.pathPulse.minZoomTier),u=b(e.zoomTier,j.effects.pathFlow.minZoomTier),d=b(e.zoomTier,j.effects.lens.minZoomTier),f=b(e.zoomTier,j.effects.temporalEmphasis.minZoomTier),p=b(e.zoomTier,j.effects.semanticRegions.minZoomTier),m=b(e.zoomTier,j.effects.contours.minZoomTier),h=!!(e.hoveredNodeId||e.selectedNodeId);return{pathPulse:t.pathPulseEnabled?c?l?s===0?{enabled:!0,available:!1,reason:`Path is off-screen`}:s>j.effects.pathPulse.maxSegments?{enabled:!0,available:!1,reason:`Disabled by path size cap`,detail:`${s} visible segments`,visibleSegments:s,segmentCap:j.effects.pathPulse.maxSegments}:{enabled:!0,available:!0,reason:`Ready`,visibleSegments:s,segmentCap:j.effects.pathPulse.maxSegments}:{enabled:!0,available:!1,reason:`Disabled by zoom tier`,detail:`Requires ${j.effects.pathPulse.minZoomTier}`}:{enabled:!0,available:!1,reason:`No active path`}:{enabled:!1,available:!1,reason:`Disabled by toggle`},pathFlow:t.pathFlowEnabled?c?u?s===0?{enabled:!0,available:!1,reason:`Path is off-screen`}:s>j.effects.pathFlow.maxSegments?{enabled:!0,available:!1,reason:`Disabled by path size cap`,detail:`${s} visible segments`,visibleSegments:s,segmentCap:j.effects.pathFlow.maxSegments}:{enabled:!0,available:!0,reason:`Ready`,visibleSegments:s,segmentCap:j.effects.pathFlow.maxSegments}:{enabled:!0,available:!1,reason:`Disabled by zoom tier`,detail:`Requires ${j.effects.pathFlow.minZoomTier}`}:{enabled:!0,available:!1,reason:`No active path`}:{enabled:!1,available:!1,reason:`Disabled by toggle`},lens:t.lensEnabled?h?d?{enabled:!0,available:!0,reason:`Ready`}:{enabled:!0,available:!1,reason:`Disabled by zoom tier`,detail:`Requires ${j.effects.lens.minZoomTier}`}:{enabled:!0,available:!1,reason:`No focal node`}:{enabled:!1,available:!1,reason:`Disabled by toggle`},temporalEmphasis:t.temporalEmphasisEnabled?n?.currentTime?f?{enabled:!0,available:!0,reason:`Ready`}:{enabled:!0,available:!1,reason:`Disabled by zoom tier`,detail:`Requires ${j.effects.temporalEmphasis.minZoomTier}`}:{enabled:!0,available:!1,reason:`No temporal focus time`}:{enabled:!1,available:!1,reason:`Disabled by toggle`},semanticRegions:t.semanticRegionsEnabled?p?r?.semanticRegions.ready?{enabled:!0,available:!0,reason:r.semanticRegions.reason}:{enabled:!0,available:!1,reason:r?.semanticRegions.reason??`Waiting for semantic region summaries`}:{enabled:!0,available:!1,reason:`Disabled by zoom tier`,detail:`Requires ${j.effects.semanticRegions.minZoomTier}`}:{enabled:!1,available:!1,reason:`Disabled by toggle`},contours:t.contoursEnabled?m?r?.centrality.ready?{enabled:!0,available:!0,reason:r.centrality.reason}:{enabled:!0,available:!1,reason:r?.centrality.reason??`Waiting for centrality ranking`}:{enabled:!0,available:!1,reason:`Disabled by zoom tier`,detail:`Requires ${j.effects.contours.minZoomTier}`}:{enabled:!1,available:!1,reason:`Disabled by toggle`},pathfinding:t.pathfindingEnabled?r?.directedPath.ready?{enabled:!0,available:!0,reason:r.directedPath.verifiedAgainstActivePath?`Ready · local path matches traced path`:`Ready · local directed path differs from traced path`}:{enabled:!0,available:!1,reason:r?.directedPath.reason??`Waiting for a traced path`}:{enabled:!1,available:!1,reason:`Disabled by toggle`},communities:t.communitiesEnabled?r?.communities.ready?{enabled:!0,available:!0,reason:r.communities.modularity===null?r.communities.reason:`Ready · modularity ${r.communities.modularity.toFixed(3)}`}:{enabled:!0,available:!1,reason:r?.communities.reason??`Waiting for community summaries`}:{enabled:!1,available:!1,reason:`Disabled by toggle`},centrality:t.centralityEnabled?r?.centrality.ready?{enabled:!0,available:!0,reason:r.centrality.reason}:{enabled:!0,available:!1,reason:r?.centrality.reason??`Waiting for centrality ranking`}:{enabled:!1,available:!1,reason:`Disabled by toggle`},legend:t.legendEnabled?{enabled:!0,available:!0,reason:`Panel enabled`}:{enabled:!1,available:!1,reason:`Disabled by toggle`},diagnostics:j.effects.diagnostics.enabledInDev?t.diagnosticsEnabled?{enabled:!0,available:!0,reason:`Ready`}:{enabled:!1,available:!1,reason:`Disabled by toggle`}:{enabled:!1,available:!1,reason:`Disabled in production`}}}function Wn(e,t,n,r,i){let a=e.createRadialGradient(t,n,0,t,n,r);a.addColorStop(0,i),a.addColorStop(1,`rgba(0,0,0,0)`),e.fillStyle=a,e.beginPath(),e.arc(t,n,r,0,Math.PI*2),e.fill()}function Gn(e,t,n,r,i,a){let o=j.nodes.badges[i],s=j.nodes.badge.radius,c=j.nodes.badge.offset,l=t+Math.max(r*.62,s+c),u=n-Math.max(r*.62,s+c);Wn(e,l,u,j.overlays.badgeGlowRadius,A(o.color,j.nodes.badge.glowAlpha)),e.fillStyle=o.color,e.beginPath(),e.arc(l,u,s,0,Math.PI*2),e.fill(),e.strokeStyle=j.nodes.badge.stroke,e.lineWidth=1,e.beginPath(),e.arc(l,u,s,0,Math.PI*2),e.stroke(),e.fillStyle=j.nodes.badge.textColor,e.font=`700 ${j.nodes.badge.fontSize}px Inter, system-ui, sans-serif`,e.textAlign=`center`,e.textBaseline=`middle`;let d=i===`provenance`&&a&&a>1?String(Math.min(9,a)):o.label;e.fillText(d,l,u+.5)}function Kn(e,t,n,r,i){let{zoomTier:a,hoveredNodeId:o,selectedNodeId:s,selectedEdgeId:c,activePath:l}=n,u=o||s,d=u&&S.hasNode(u)?de(u):new Set,f=q(t,c),p=new Set(l),m=K(t,l,n.activePathEdgeIds),h=new Set(r?.overviewBackbone.edgeIds??[]),g=e.getCamera().getState().ratio;if(e.setSetting(`nodeReducer`,(e,t)=>{let n=t,r=we(j,a,ye(e,a,o,s,c,d,f,p),n,t.label,g);return{...t,color:r.color,shellColor:r.shellColor,coreScale:r.coreScale,size:r.size,forceLabel:r.forceLabel,label:r.label,zIndex:r.zIndex,hidden:r.hidden,borderColor:r.borderColor,borderSize:r.borderSize,ringColor:r.showRing?r.ringColor:r.borderColor,ringSize:r.ringSize}}),e.setSetting(`edgeReducer`,(e,n)=>{let r=n,[i,l]=t.extremities(e),u=De(j,a,be(String(e),i,l,a,o,s,c,d,m,h),r,i,l);return{...n,hidden:u.hidden,type:u.type,color:u.color,size:u.size,zIndex:u.zIndex,curvature:u.curvature}}),(i?.nodes?.length??0)>0||(i?.edges?.length??0)>0){e.scheduleRefresh({partialGraph:{nodes:i?.nodes,edges:i?.edges}});return}e.scheduleRefresh()}function qn(e,t,n){for(let r of e)if(r.performAction?.(t,n))return}var Jn=(0,N.forwardRef)(function({onNodeClick:e,onEdgeClick:t,selectedNodeId:n,selectedEdgeId:r,activePath:i=[],activePathEdgeIds:a=[],effectsState:o,temporalState:s,isLayoutRunning:c,viewMode:l,className:u,showFitViewButton:d=!0,pluginOverlays:f=[],onSceneRuntimeChange:p,onInteractionStateChange:m,onCameraStateChange:g,onDiagnosticsChange:_,onAnalyticsChange:v},b){let x=(0,N.useRef)(null),C=(0,N.useRef)(null),w=(0,N.useRef)(null),T=(0,N.useRef)(null),E=(0,N.useRef)(null),[D,O]=(0,N.useState)(null),[k,M]=(0,N.useState)(`overview`),[P,I]=(0,N.useState)(null),L=(0,N.useMemo)(()=>[te,B,ne,re(),V(),ie,ae()],[]),R=l===`focused`&&!!n&&S.hasNode(n),z=(0,N.useMemo)(()=>ke(n,i,a,l),[i,a,n,l]),H=(0,N.useMemo)(()=>Ae(D,n,r,i,a,l,k,c),[i,a,D,c,r,n,l,k]),U=(0,N.useRef)(H);U.current=H;let oe=(0,N.useRef)(null),W=o.communitiesEnabled||o.semanticRegionsEnabled,se=o.centralityEnabled||o.semanticRegionsEnabled||o.contoursEnabled,ce=(0,N.useMemo)(()=>bt(z,{computeCommunities:W,computeCentrality:se}),[z,se,W]),G=(0,N.useCallback)(e=>{let t=w.current;if(!t)return;if(R){t.getCamera().animatedReset({duration:j.motion.cameraMs}),t.refresh();return}let n=t.getNodeDisplayData(e);if(!n){t.getCamera().animatedReset({duration:j.motion.cameraMs});return}t.getCamera().animate({x:n.x,y:n.y,ratio:.3},{duration:j.motion.cameraMs,easing:`quadraticOut`})},[R]),K=(0,N.useCallback)(()=>{let e=w.current;if(e){if(n){G(n);return}e.getCamera().animatedReset({duration:j.motion.cameraMs})}},[G,n]),J=(0,N.useCallback)(e=>{let t=E.current;t&&qn(L,t,e)},[L]),Y=(0,N.useCallback)(n=>{let r=n??w.current;if(!r)return null;let i={sigma:r,graph:S,displayGraph:z,getInteractionState:()=>U.current,setHoveredNodeId:O,onNodeSelectionChange:e,onEdgeSelectionChange:t??(()=>{}),focusNodeInView:G,fitCurrentView:K,dispatchAction:J};return E.current=i,i},[z,J,K,G,t,e]),X=(0,N.useCallback)((e,...t)=>{let n=Y();if(n)for(let r of L){let i=r[e];typeof i==`function`&&i(n,...t)}},[L,Y]);(0,N.useImperativeHandle)(b,()=>({fitView:()=>J({type:`fitView`}),focusNode:e=>J({type:`focusNode`,nodeId:e}),requestRender:()=>w.current?.scheduleRefresh(),getCameraState:()=>{let e=w.current;if(!e)return null;let t=e.getCamera().getState();return{x:t.x,y:t.y,ratio:t.ratio}}}),[J]),(0,N.useEffect)(()=>{if(!x.current)return;let e=new h(z,x.current,Bn);w.current=e;let t=e.getCamera();p?.({renderer:`sigma`,scene:e,graph:S,displayGraph:z,requestRender:()=>e.scheduleRefresh(),getCameraState:()=>{let e=t.getState();return{x:e.x,y:e.y,ratio:e.ratio}}});let n=Y(e);if(n)for(let e of L)e.attach(n);let r=()=>{let e={x:t.getState().x,y:t.getState().y,ratio:t.getState().ratio},n=y(e.ratio);M(e=>e===n?e:n),g?.(e),X(`onCameraChange`,e)},i=new ResizeObserver(()=>{x.current&&x.current.offsetWidth>0&&e.scheduleRefresh()});return i.observe(x.current),t.on(`updated`,r),e.on(`clickNode`,({node:e})=>X(`onNodeClick`,e)),e.on(`clickEdge`,({edge:e})=>{let[t,n]=z.extremities(e),r=String(e),i=z.getEdgeAttributes(e);fe(z,U.current,r,t,n,i)&&X(`onEdgeClick`,r)}),e.on(`clickStage`,()=>X(`onStageClick`)),e.on(`enterNode`,({node:e})=>X(`onNodeEnter`,e)),e.on(`leaveNode`,({node:e})=>X(`onNodeLeave`,e)),e.on(`enterEdge`,({edge:e})=>{let t=x.current;if(!t)return;let[n,r]=z.extremities(e),i=String(e),a=z.getEdgeAttributes(e);t.style.cursor=fe(z,U.current,i,n,r,a)?`pointer`:``}),e.on(`leaveEdge`,()=>{x.current&&(x.current.style.cursor=``)}),requestAnimationFrame(()=>{r(),J({type:`fitView`})}),()=>{if(n)for(let e of L)e.detach(n);t.off(`updated`,r),i.disconnect(),x.current&&(x.current.style.cursor=``),e.kill(),E.current=null,w.current=null,p?.(null)}},[L,J,X,z,Y,g,p]),(0,N.useEffect)(()=>{let e=Y();if(e){for(let t of L)t.onStateChange?.(e,H);for(let t of L)t.apply?.(e,H);m?.(H)}},[L,Y,H,m]),(0,N.useEffect)(()=>{let e=w.current,t=x.current;if(!e||!t){I(null),v?.(null);return}let n=Ot({graphRef:z,interactionState:H,base:ce,visibleNodeIds:Bt(e,z,t.clientWidth,t.clientHeight).map(e=>e.nodeId)});I(n),v?.(n)},[ce,z,H,v]),(0,N.useEffect)(()=>{if(!_)return;let e=w.current,t=x.current;_(Un(H,o,s,P,e,t?.clientWidth??0,t?.clientHeight??0))},[P,o,H,_,s]),(0,N.useEffect)(()=>{oe.current=null},[z]),(0,N.useEffect)(()=>{let e=w.current;if(!e)return;let t=oe.current;Kn(e,z,H,P,t?le(z,t,H):void 0),oe.current=H},[P,z,H]),(0,N.useEffect)(()=>{let e=w.current,t=C.current,n=x.current;if(!e||!t||!n)return;let r=0,i=()=>{let a=n.getBoundingClientRect(),c=window.devicePixelRatio||1;(t.width!==Math.floor(a.width*c)||t.height!==Math.floor(a.height*c))&&(t.width=Math.floor(a.width*c),t.height=Math.floor(a.height*c),t.style.width=`${a.width}px`,t.style.height=`${a.height}px`);let l=t.getContext(`2d`);if(!l){r=window.requestAnimationFrame(i);return}l.setTransform(c,0,0,c,0,0),l.clearRect(0,0,a.width,a.height);let u=H.hoveredNodeId||H.selectedNodeId,d=u&&S.hasNode(u)?de(u):new Set,f=q(z,H.selectedEdgeId),p=new Set(H.activePath),m=Hn(e,H.activePath,H.activePathEdgeIds,H.zoomTier,a.width,a.height),h=Bt(e,z,a.width,a.height),g=Un(H,o,s,P,e,a.width,a.height),_=e.getCamera().getState().ratio,v=new Set([...d,...f,...p,...u?[u]:[]]),y=performance.now()/1e3;Ut(l,P,h,H,o),Ht(l,P,h,H,o),Gt(l,h,s,H,o),v.forEach(t=>{let n=e.getNodeDisplayData(t);if(!n)return;let r=S.getNodeAttributes(t),i=ye(t,H.zoomTier,H.hoveredNodeId,H.selectedNodeId,H.selectedEdgeId,d,f,p),a=we(j,H.zoomTier,i,r,r.label,_),o=e.graphToViewport({x:n.x,y:n.y});if(a.showHalo){let e=Math.max(n.size*j.overlays.glowRadiusMultiplier*(a.nodeVariant===`selected`?1.08:1),j.overlays.minGlowRadius);Wn(l,o.x,o.y,e,A(a.haloColor,t===u?j.overlays.hoverGlowAlpha:j.overlays.pathGlowAlpha))}a.showBadge&&a.badgeKind&&Gn(l,o.x,o.y,n.size,a.badgeKind,a.badgeCount)}),u&&g.lens.available&&Kt(l,e,u,d),qt(l,m,o,g,y),r=window.requestAnimationFrame(i)};return i(),()=>{window.cancelAnimationFrame(r)}},[P,z,o,H,s]),(0,N.useEffect)(()=>{if(n||R){T.current?.stop();return}return c?(T.current||=new ee.default(S,zn),T.current.start()):T.current?.stop(),()=>{T.current?.stop()}},[R,c,n]),(0,N.useEffect)(()=>()=>{T.current?.kill(),T.current=null},[]);let Z=(0,N.useCallback)(()=>{K()},[K]);return(0,F.jsxs)(`div`,{style:{position:`relative`,width:`100%`,height:`100%`},children:[(0,F.jsx)(`div`,{ref:x,className:u,style:{width:`100%`,height:`100%`,background:`transparent`}}),(0,F.jsx)(`canvas`,{ref:C,style:{position:`absolute`,inset:0,width:`100%`,height:`100%`,pointerEvents:`none`,zIndex:4}}),f.length?(0,F.jsx)(`div`,{style:{position:`absolute`,inset:0,pointerEvents:`none`,zIndex:6},children:f.map((e,t)=>(0,F.jsx)(`div`,{style:{position:`absolute`,inset:0},children:e},`graph-plugin-overlay-${t}`))}):null,d?(0,F.jsx)(`button`,{id:`graph-fit-view-btn`,onClick:Z,style:{position:`absolute`,bottom:24,left:24,padding:`8px 16px`,background:`linear-gradient(135deg, rgba(27, 79, 170, 0.9), rgba(53, 123, 255, 0.84))`,color:`#fff`,border:`1px solid ${j.palette.background.shellBorder}`,borderRadius:10,cursor:`pointer`,fontWeight:700,zIndex:10,backdropFilter:`blur(10px)`,boxShadow:`0 10px 28px ${j.palette.background.shellGlow}`,fontSize:12,letterSpacing:`0.01em`},children:`Fit View`}):null]})}),Yn=(0,N.forwardRef)(function(e,t){let n=(0,P.c)(25),r,i,a,o,s,c,l,u,d;n[0]===e?(r=n[1],i=n[2],a=n[3],o=n[4],s=n[5],c=n[6],l=n[7],u=n[8],d=n[9]):({onNodeSelect:l,onEdgeSelect:o,onInteractionStateChange:s,onCameraStateChange:i,onDiagnosticsChange:a,onAnalyticsChange:r,onRuntimeChange:u,onLayoutRunningChange:c,...d}=e,n[0]=e,n[1]=r,n[2]=i,n[3]=a,n[4]=o,n[5]=s,n[6]=c,n[7]=l,n[8]=u,n[9]=d);let f=(0,N.useRef)(null),p=(0,N.useRef)(null),m,h;n[10]===c?(m=n[11],h=n[12]):(m=()=>({fitView:()=>f.current?.fitView(),focusNode:e=>f.current?.focusNode(e),getRuntime:()=>p.current,setLayoutRunning:c?e=>{c(e)}:void 0}),h=[c],n[10]=c,n[11]=m,n[12]=h),(0,N.useImperativeHandle)(t,m,h);let g=l??Xn,_;n[13]===u?_=n[14]:(_=e=>{p.current=e,u?.(e)},n[13]=u,n[14]=_);let v;return n[15]!==r||n[16]!==i||n[17]!==a||n[18]!==o||n[19]!==s||n[20]!==c||n[21]!==d||n[22]!==g||n[23]!==_?(v=(0,F.jsx)(Jn,{ref:f,onNodeClick:g,onEdgeClick:o,onInteractionStateChange:s,onCameraStateChange:i,onDiagnosticsChange:a,onAnalyticsChange:r,onSceneRuntimeChange:_,onLayoutRunningChange:c,...d}),n[15]=r,n[16]=i,n[17]=a,n[18]=o,n[19]=s,n[20]=c,n[21]=d,n[22]=g,n[23]=_,n[24]=v):v=n[24],v});function Xn(){}var Zn=[`bootstrapping`,`fetching_nodes`,`fetching_edges`,`computing_styling`,`hydrating_scene`,`stabilizing_layout`];function Qn(e){switch(e){case`bootstrapping`:return`Preparing graph session`;case`fetching_nodes`:return`Loading nodes`;case`fetching_edges`:return`Loading relationships`;case`computing_styling`:return`Computing node styling`;case`hydrating_scene`:return`Hydrating graph scene`;case`stabilizing_layout`:return`Stabilizing layout`;default:return`Graph ready`}}function $n(e){switch(e){case`bootstrapping`:return`Prepare`;case`fetching_nodes`:return`Nodes`;case`fetching_edges`:return`Relations`;case`computing_styling`:return`Styling`;case`hydrating_scene`:return`Scene`;case`stabilizing_layout`:return`Layout`;default:return`Stage`}}function er(e){let t=Zn.indexOf(e.phase);return{phase:e.phase,title:Qn(e.phase),message:e.message,progressKind:e.progressKind,loaded:e.loaded??null,total:e.total??null,nodesLoaded:e.nodesLoaded??0,nodesTotal:e.nodesTotal??null,edgesLoaded:e.edgesLoaded??0,edgesTotal:e.edgesTotal??null,showGraphBehind:e.showGraphBehind??!1,stageIndex:t>=0?t+1:Zn.length,stageCount:Zn.length,layoutSource:e.layoutSource,layoutState:e.layoutState}}var tr=[`community`,`cluster`,`module`,`group`,`category`,`domain`,`layer`,`source`,`nodeType`],nr=[`source`,`source_url`,`pmid`,`pmids`,`evidence`,`provenance`,`confidence`];function rr(e,t){if(t===`nodeType`){let t=e.nodeType;return typeof t==`string`&&t.trim()?t:null}let n=e.properties?.[t];return typeof n==`string`&&n.trim()?n:null}function ir(e,t){if(e.length<=1||t<=0)return 0;let n=0;for(let r of e){let e=r/t;n-=e*Math.log(e)}return n/Math.log(e.length)}function ar(e){let t=null,n=0;for(let r of tr){let i=new Map,a=0;for(let t of e){let e=rr(t.attributes,r);e&&(a+=1,i.set(e,(i.get(e)??0)+1))}let o=i.size;if(a===0||o<=1)continue;let s=[...i.values()],c=a/e.length,l=Math.max(...s)/a,u=ir(s,a),d=Math.min(o,j.palette.semantic.length)/j.palette.semantic.length,f=u*.65+d*.2+c*.15;c>=.45&&u>=.45&&l<=.88&&f>n&&(t=r,n=f)}return t?(e,n)=>rr(n,t)??or(e,n):(e,t)=>or(e,t)}function or(e,t){let n=D(e)%j.palette.semantic.length;return`${t.nodeType||`entity`}:${n}`}function sr(e){let t=Number(e);return Number.isFinite(t)?t:null}function cr(e){return D(e)%1e4/1e4}function lr(e){let t=new Map;e.forEach(e=>{let n=t.get(e.semanticGroup);n?n.push({id:e.id,priority:e.priority}):t.set(e.semanticGroup,[{id:e.id,priority:e.priority}])});let n=[...t.entries()].sort((e,t)=>{let n=t[1].length-e[1].length;return n===0?e[0].localeCompare(t[0]):n}),r=new Map;n.forEach(([e,t],n)=>{let i=n*2.399963229728653,a=170+Math.sqrt(n+1)*195,o=72+Math.sqrt(t.length)*16;r.set(e,{x:Math.cos(i)*a*1.14,y:Math.sin(i)*a*.84,spread:o})});let i=new Map;return n.forEach(([e,t])=>{let n=r.get(e);n&&t.sort((e,t)=>t.priority===e.priority?e.id.localeCompare(t.id):t.priority-e.priority).forEach((r,a)=>{let o=a*2.399963229728653+cr(`${e}:${r.id}:angle`)*.72,s=Math.sqrt((a+.5)/Math.max(t.length,1))*n.spread,c=(cr(`${r.id}:jx`)-.5)*n.spread*.22,l=(cr(`${r.id}:jy`)-.5)*n.spread*.18;i.set(r.id,{x:n.x+Math.cos(o)*s+c,y:n.y+Math.sin(o)*s*.86+l})})}),i}function ur(e){return nr.reduce((t,n)=>e[n]!==void 0&&e[n]!==null?t+1:t,0)}function dr(e,t,n,r){let i=`default`,a,o;n?(i=`temporal`,a=`temporal`):r>0&&(i=`provenance`,a=`provenance`,o=r);let s=`none`;return t>=.86?s=`always`:a?s=`local`:t>=.56&&(s=`priority`),{nodeVariant:i,nodeShapeVariant:i,badgeKind:a,badgeCount:o,ringColor:j.nodes.selectedRing.color,haloColor:A(e,.38),labelVisibilityPolicy:s}}function fr(e,t,n,r){let i=k(.12,.18+Math.log(Math.max(Number(e.weight)||1,1))/Math.log(12),1),a=`line`;return r?a=`bidirectionalCurve`:Math.max(t,n,i)>=.58&&(a=`directional`),{edgeVariant:a,arrowVisibilityPolicy:a===`line`?`hidden`:`contextual`,relationshipStrength:i,isParallelPair:!1,parallelIndex:0,parallelCount:1}}var pr=1e3;async function mr(e,t){let n=null,r=[],i=null;for(;;){let a=new URL(`/api/graph/nodes`,window.location.origin);a.searchParams.set(`limit`,String(pr)),n&&a.searchParams.set(`cursor`,n);let o=await fetch(a.toString(),{signal:e});if(!o.ok)throw Error(`Fetch failed: ${o.status}`);let s=await o.json();if(!s.nodes?.length||(i=s.total??i,r.push(...s.nodes),t?.(er({phase:`fetching_nodes`,progressKind:i?`determinate`:`indeterminate`,loaded:r.length,total:i,nodesLoaded:r.length,nodesTotal:i,edgesLoaded:0,edgesTotal:null,message:i?`Loading nodes ${r.length.toLocaleString()} of ${i.toLocaleString()}`:`Loading nodes ${r.length.toLocaleString()}`})),!s.next_cursor))break;n=s.next_cursor,await gr()}return r}async function hr(e,t,n,r){let i=null,a=[],o=new Set,s=null,c=!1;for(;;){let l=new URL(`/api/graph/edges`,window.location.origin);l.searchParams.set(`limit`,String(pr)),i&&l.searchParams.set(`cursor`,i);let u=await fetch(l.toString(),{signal:e});if(!u.ok)throw Error(`Fetch failed: ${u.status}`);let d=await u.json();if(!d.edges?.length)break;s=d.total??s;let f=d.edges.filter(e=>!t.has(e.source)||!t.has(e.target)||o.has(e.id)?!1:(o.add(e.id),!0));a.push(...f);let p=s?Math.min(o.size,s):o.size;if(!c&&s!==null&&o.size>s&&(c=!0,console.warn(`[graph-load] edge pagination returned more unique edge ids than total`,{uniqueEdgesLoaded:o.size,total:s})),r?.(er({phase:`fetching_edges`,progressKind:s?`determinate`:`indeterminate`,loaded:p,total:s,nodesLoaded:n.loaded,nodesTotal:n.total,edgesLoaded:p,edgesTotal:s,message:s?`Loading edges ${p.toLocaleString()} of ${s.toLocaleString()}`:`Loading edges ${p.toLocaleString()}`})),!d.next_cursor)break;i=d.next_cursor,await gr()}return a}function gr(){return`scheduler`in window&&typeof window.scheduler?.yield==`function`?window.scheduler.yield():new Promise(e=>setTimeout(e,0))}function _r(e){let t=(0,P.c)(9),n;t[0]===e?n=t[1]:(n=e===void 0?{}:e,t[0]=e,t[1]=n);let{enabled:r,onGraphReady:i,onProgress:o}=n,s=r===void 0?!0:r,c;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(c=[`graph`,`full-load`],t[2]=c):c=t[2];let l;t[3]!==i||t[4]!==o?(l=async e=>{let{signal:t}=e,n=performance.now();o?.(er({phase:`bootstrapping`,progressKind:`indeterminate`,nodesLoaded:0,nodesTotal:null,edgesLoaded:0,edgesTotal:null,message:`Preparing graph session`}));let r=await mr(t,o),a=new Set(r.map(xr)),s=await hr(t,a,{loaded:r.length,total:r.length},o),c=new Map;for(let e of a)c.set(e,0);for(let e of s)c.set(e.source,(c.get(e.source)??0)+1),c.set(e.target,(c.get(e.target)??0)+1);let l=Math.max(...c.values(),1),u=r.map(br);o?.(er({phase:`computing_styling`,progressKind:`indeterminate`,nodesLoaded:r.length,nodesTotal:r.length,edgesLoaded:s.length,edgesTotal:s.length,message:`Applying semantic color, sizing, and structural styling`}));let d=ar(u),f=new Map;for(let e of a){let t=c.get(e)??0,n=Math.log(t+1)/Math.log(l+1);f.set(e,n)}let p=new Map;u.forEach(e=>{let{id:t,attributes:n}=e;p.set(t,d(t,n))});let m=r.reduce(yr,0),h=(r.length>0?m/r.length:0)>=.92,g=h?null:lr(u.map(e=>{let{id:t,attributes:n}=e;return{id:t,semanticGroup:p.get(t)??or(t,n),priority:f.get(t)??0}})),_=u.map(e=>{let{id:t,attributes:n}=e,r=p.get(t)??d(t,n),i=D(r)%j.palette.semantic.length,a=j.palette.semantic[i],o=f.get(t)??0,s=k(1.8,1.8+8.8*o,11.8),c=!!(n.valid_from||n.valid_until),l=ur(n.properties??{}),u=n.properties,m=sr(u?.x),_=sr(u?.y),v=g?.get(t),y=h?m??0:m??v?.x??0,b=h?_??0:_??v?.y??0;return{id:t,attributes:{...n,x:y,y:b,semanticGroup:r,color:a,baseColor:a,mutedColor:A(a,j.nodes.mutedAlpha),glowColor:A(a,.24),size:s,baseSize:s,visualPriority:o,labelPriority:o,strokeColor:C(a,112),borderColor:C(a,112),borderSize:.72,...dr(a,o,c,l)}}}),v=new Set(s.map(vr)),y=new Map,b=new Map;s.forEach(e=>{let t=T(e.source,e.target);y.set(t,(y.get(t)??0)+1),b.set(e.familyId,(b.get(e.familyId)??0)+1)});let S=new Map,E=s.map(e=>{let t=f.get(e.source)??0,n=f.get(e.target)??0,r=v.has(T(e.target,e.source)),i=T(e.source,e.target),a=S.get(i)??0;S.set(i,a+1);let o=y.get(i)??1;return{id:e.id,familyId:e.familyId,source:e.source,target:e.target,attributes:{edgeId:e.id,familyId:e.familyId,sourceId:e.source,targetId:e.target,weight:e.weight,edgeType:e.type,properties:e.properties,size:k(.18,.22+Math.sqrt(Math.max(Number(e.weight)||1,1))*.2,.88),baseSize:k(.18,.22+Math.sqrt(Math.max(Number(e.weight)||1,1))*.2,.88),color:j.palette.muted.edgeStructure,baseColor:j.palette.muted.edgeStructure,mutedColor:j.palette.muted.edgeOverview,visualPriority:Math.max(t,n),isBidirectional:r,edgeFamily:r?`bidirectional`:`line`,curveGroup:O(e.source,e.target),type:`line`,isParallelPair:o>1,parallelIndex:a,parallelCount:o,familySize:b.get(e.familyId)??1,...fr(e,t,n,r)}}});o?.(er({phase:`hydrating_scene`,progressKind:`indeterminate`,nodesLoaded:_.length,nodesTotal:_.length,edgesLoaded:E.length,edgesTotal:E.length,message:`Preparing renderer and hydrating graph scene`}));try{x()}catch(e){let t=e;throw console.error(`[graph-load] clearGraph failed`,t),t}try{M(_)}catch(e){let t=e;throw console.error(`[graph-load] batchMergeNodes failed`,t),t}try{w(E)}catch(e){let t=e;throw console.error(`[graph-load] batchMergeEdges failed`,t),t}let N={nodeCount:_.length,edgeCount:E.length,loadTimeMs:Math.round(performance.now()-n),hasCoordinates:h,layoutSource:h?`provided`:`runtime`,layoutReady:h};return o?.(er({phase:N.layoutReady?`ready`:`stabilizing_layout`,progressKind:`indeterminate`,nodesLoaded:N.nodeCount,nodesTotal:N.nodeCount,edgesLoaded:N.edgeCount,edgesTotal:N.edgeCount,message:N.layoutReady?`Graph ready`:`Settling runtime layout`,showGraphBehind:!N.layoutReady,layoutSource:N.layoutSource,layoutState:N.layoutReady?`interactive`:`bootstrapping`})),i?.(N),N},t[3]=i,t[4]=o,t[5]=l):l=t[5];let u;return t[6]!==s||t[7]!==l?(u={queryKey:c,enabled:s,staleTime:1/0,retry:0,queryFn:l},t[6]=s,t[7]=l,t[8]=u):u=t[8],a(u)}function vr(e){return T(e.source,e.target)}function yr(e,t){let n=t.properties;return sr(n?.x)!==null&&sr(n?.y)!==null?e+1:e}function br(e){return{id:e.id,attributes:{label:e.content||e.id,x:0,y:0,nodeType:e.type,content:e.content,valid_from:e.valid_from,valid_until:e.valid_until,properties:e.properties}}}function xr(e){return e.id}function Sr(){let e=(0,P.c)(2),t=i(),n;return e[0]===t?n=e[1]:(n=()=>t.invalidateQueries({queryKey:[`graph`,`full-load`]}),e[0]=t,e[1]=n),n}var Cr=`- .graph-stage-loader {- position: absolute;- inset: 0;- z-index: 9;- display: flex;- align-items: center;- justify-content: center;- pointer-events: none;- opacity: 1;- transition: opacity 220ms ease, transform 220ms ease;- }- .graph-stage-loader[data-exiting="true"] {- opacity: 0;- transform: scale(0.985);- }- .graph-stage-loader-card {- width: min(540px, calc(100% - 48px));- border-radius: 24px;- padding: 20px 20px 18px;- border: 1px solid rgba(127, 208, 255, 0.18);- background:- radial-gradient(circle at top right, rgba(242, 182, 109, 0.12), transparent 28%),- radial-gradient(circle at top left, rgba(127, 208, 255, 0.14), transparent 30%),- linear-gradient(145deg, rgba(7, 17, 31, 0.94), rgba(12, 25, 43, 0.82));- box-shadow: 0 26px 90px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255,255,255,0.05);- backdrop-filter: blur(18px) saturate(1.08);- -webkit-backdrop-filter: blur(18px) saturate(1.08);- }- .graph-stage-loader-card[data-live="true"] {- width: min(500px, calc(100% - 56px));- background:- radial-gradient(circle at top right, rgba(242, 182, 109, 0.08), transparent 26%),- radial-gradient(circle at top left, rgba(127, 208, 255, 0.12), transparent 28%),- linear-gradient(145deg, rgba(7, 17, 31, 0.84), rgba(11, 24, 40, 0.72));- box-shadow: 0 18px 54px rgba(0, 0, 0, 0.26), inset 0 1px 0 rgba(255,255,255,0.04);- }- .graph-stage-loader-beacon {- position: relative;- width: 12px;- height: 12px;- border-radius: 999px;- background: linear-gradient(135deg, rgba(127, 208, 255, 0.98), rgba(242, 182, 109, 0.94));- box-shadow: 0 0 18px rgba(127, 208, 255, 0.4);- }- .graph-stage-loader-beacon::after {- content: "";- position: absolute;- inset: -7px;- border-radius: inherit;- border: 1px solid rgba(127, 208, 255, 0.18);- animation: graph-loader-beacon 1.9s ease-out infinite;- }- .graph-stage-loader-track {- display: grid;- grid-template-columns: repeat(6, minmax(0, 1fr));- gap: 8px;- }- .graph-stage-loader-step {- border-radius: 999px;- padding: 7px 0;- text-align: center;- font-size: 10px;- font-weight: 700;- letter-spacing: 0.08em;- text-transform: uppercase;- border: 1px solid rgba(127, 208, 255, 0.08);- color: rgba(143, 168, 198, 0.72);- background: rgba(255, 255, 255, 0.02);- }- .graph-stage-loader-step[data-state="done"] {- color: rgba(214, 232, 250, 0.92);- border-color: rgba(127, 208, 255, 0.18);- background: rgba(89, 155, 220, 0.14);- }- .graph-stage-loader-step[data-state="active"] {- color: #eff7ff;- border-color: rgba(242, 182, 109, 0.24);- background: linear-gradient(135deg, rgba(49, 108, 172, 0.28), rgba(242, 182, 109, 0.16));- box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);- }- .graph-stage-loader-bar {- position: relative;- width: 100%;- height: 12px;- overflow: hidden;- border-radius: 999px;- border: 1px solid rgba(127, 208, 255, 0.1);- background: rgba(255, 255, 255, 0.05);- }- .graph-stage-loader-bar-fill {- display: block;- height: 100%;- border-radius: inherit;- background: linear-gradient(90deg, rgba(74, 163, 255, 0.9), rgba(127, 208, 255, 0.96), rgba(242, 182, 109, 0.92));- box-shadow: 0 0 30px rgba(74, 163, 255, 0.28);- transition: width 220ms ease;- }- .graph-stage-loader-bar-indeterminate::before {- content: "";- position: absolute;- top: 1px;- bottom: 1px;- width: 34%;- border-radius: 999px;- background: linear-gradient(90deg, rgba(74, 163, 255, 0), rgba(127, 208, 255, 0.94), rgba(242, 182, 109, 0.82), rgba(74, 163, 255, 0));- box-shadow: 0 0 26px rgba(127, 208, 255, 0.18);- animation: graph-loader-sweep 1.5s cubic-bezier(0.22, 1, 0.36, 1) infinite;- }- @keyframes graph-loader-beacon {- 0% { transform: scale(0.72); opacity: 0.6; }- 100% { transform: scale(1.44); opacity: 0; }- }- @keyframes graph-loader-sweep {- 0% { transform: translateX(-120%); }- 100% { transform: translateX(360%); }- }-`;function wr(e){switch(e){case`provided`:return`Persisted layout`;case`carried`:return`Preserved layout`;case`runtime`:return`Runtime layout`;default:return null}}function Tr(e){switch(e){case`bootstrapping`:return`Bootstrapping`;case`running`:return`Settling`;case`interactive`:return`Interactive`;case`stabilized`:return`Stable`;case`failed`:return`Fallback`;default:return null}}var Er={display:`inline-flex`,alignItems:`center`,gap:6,padding:`7px 10px`,borderRadius:999,border:`1px solid rgba(127, 208, 255, 0.12)`,background:`rgba(255, 255, 255, 0.03)`,color:`#b8cade`,fontSize:11,fontWeight:600};function Dr(e){let t=(0,P.c)(97),{progress:n,visible:r,showGraphBehind:i}=e,[a,o]=(0,N.useState)(r),[s,c]=(0,N.useState)(!1),l;t[0]===n?l=t[1]:(l=n??er({phase:`bootstrapping`,message:`Preparing graph session`,progressKind:`indeterminate`}),t[0]=n,t[1]=l);let[u,d]=(0,N.useState)(l),f=(0,N.useRef)(null),p,m;t[2]===n?(p=t[3],m=t[4]):(p=()=>{n&&d(n)},m=[n],t[2]=n,t[3]=p,t[4]=m),(0,N.useEffect)(p,m);let h,g;if(t[5]!==a||t[6]!==r?(h=()=>{if(r){f.current!==null&&(window.clearTimeout(f.current),f.current=null),o(!0),c(!1);return}if(a)return c(!0),f.current=window.setTimeout(()=>{o(!1),c(!1),f.current=null},220),()=>{f.current!==null&&(window.clearTimeout(f.current),f.current=null)}},g=[a,r],t[5]=a,t[6]=r,t[7]=h,t[8]=g):(h=t[7],g=t[8]),(0,N.useEffect)(h,g),!a)return null;let _=n??u,v=_.phase===`stabilizing_layout`||_.showGraphBehind||i,y=v?`linear-gradient(180deg, rgba(1,4,9,0.04), rgba(1,4,9,0.18))`:`linear-gradient(180deg, rgba(1,4,9,0.22), rgba(1,4,9,0.5))`,b=_.progressKind===`determinate`&&_.total?Math.max(.05,Math.min(_.loaded??0,_.total)/Math.max(_.total,1)):null,x;t[9]===_.layoutSource?x=t[10]:(x=wr(_.layoutSource),t[9]=_.layoutSource,t[10]=x);let S=x,C;t[11]===_.layoutState?C=t[12]:(C=Tr(_.layoutState),t[11]=_.layoutState,t[12]=C);let w=C,T;t[13]===y?T=t[14]:(T={background:y},t[13]=y,t[14]=T);let E;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(E=(0,F.jsx)(`style`,{children:Cr}),t[15]=E):E=t[15];let D,O,k;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(D={display:`flex`,alignItems:`flex-start`,justifyContent:`space-between`,gap:14,marginBottom:14},O={minWidth:0},k={color:`#ffffff`,fontSize:20,fontWeight:700,letterSpacing:`-0.03em`,marginBottom:6},t[16]=D,t[17]=O,t[18]=k):(D=t[16],O=t[17],k=t[18]);let M;t[19]===_.title?M=t[20]:(M=(0,F.jsx)(`div`,{style:k,children:_.title}),t[19]=_.title,t[20]=M);let I;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(I={color:`#8fa8c6`,fontSize:13,lineHeight:1.5},t[21]=I):I=t[21];let L;t[22]===_.message?L=t[23]:(L=(0,F.jsx)(`div`,{style:I,children:_.message}),t[22]=_.message,t[23]=L);let R;t[24]!==M||t[25]!==L?(R=(0,F.jsxs)(`div`,{style:O,children:[M,L]}),t[24]=M,t[25]=L,t[26]=R):R=t[26];let z,ee,te;t[27]===Symbol.for(`react.memo_cache_sentinel`)?(z={display:`inline-flex`,alignItems:`center`,gap:10,flexShrink:0},ee=(0,F.jsx)(`div`,{className:`graph-stage-loader-beacon`,"aria-hidden":`true`}),te={color:`#d7e9fb`,fontSize:11,fontWeight:700,letterSpacing:`0.08em`,textTransform:`uppercase`},t[27]=z,t[28]=ee,t[29]=te):(z=t[27],ee=t[28],te=t[29]);let B=_.stageIndex??1,ne=_.stageCount??Zn.length,re;t[30]!==B||t[31]!==ne?(re=(0,F.jsxs)(`div`,{style:z,children:[ee,(0,F.jsxs)(`div`,{style:te,children:[`Stage `,B,`/`,ne]})]}),t[30]=B,t[31]=ne,t[32]=re):re=t[32];let V;t[33]!==R||t[34]!==re?(V=(0,F.jsxs)(`div`,{style:D,children:[R,re]}),t[33]=R,t[34]=re,t[35]=V):V=t[35];let ie;t[36]===Symbol.for(`react.memo_cache_sentinel`)?(ie={marginBottom:14},t[36]=ie):ie=t[36];let ae;t[37]===_.stageIndex?ae=t[38]:(ae=Zn.map((e,t)=>{let n=_.stageIndex??1,r=t+1<n?`done`:t+1===n?`active`:`upcoming`;return(0,F.jsx)(`div`,{className:`graph-stage-loader-step`,"data-state":r,children:$n(e)},e)}),t[37]=_.stageIndex,t[38]=ae);let H;t[39]===ae?H=t[40]:(H=(0,F.jsx)(`div`,{className:`graph-stage-loader-track`,style:ie,children:ae}),t[39]=ae,t[40]=H);let U,oe;t[41]===Symbol.for(`react.memo_cache_sentinel`)?(U={display:`flex`,justifyContent:`space-between`,gap:12,alignItems:`baseline`,marginBottom:8},oe={color:`#dce9f6`,fontSize:12,fontWeight:600},t[41]=U,t[42]=oe):(U=t[41],oe=t[42]);let W;t[43]!==_.loaded||t[44]!==_.progressKind||t[45]!==_.total?(W=_.progressKind===`determinate`&&_.total?`${(_.loaded??0).toLocaleString()} / ${_.total.toLocaleString()} in current stage`:`Working through this stage`,t[43]=_.loaded,t[44]=_.progressKind,t[45]=_.total,t[46]=W):W=t[46];let se;t[47]===W?se=t[48]:(se=(0,F.jsx)(`div`,{style:oe,children:W}),t[47]=W,t[48]=se);let ce;t[49]===Symbol.for(`react.memo_cache_sentinel`)?(ce={color:`#90a8c5`,fontSize:11,fontWeight:700,letterSpacing:`0.06em`,textTransform:`uppercase`},t[49]=ce):ce=t[49];let G;t[50]!==_.progressKind||t[51]!==b?(G=_.progressKind===`determinate`&&b!==null?`${Math.round(b*100)}%`:`Live`,t[50]=_.progressKind,t[51]=b,t[52]=G):G=t[52];let K;t[53]===G?K=t[54]:(K=(0,F.jsx)(`div`,{style:ce,children:G}),t[53]=G,t[54]=K);let q;t[55]!==se||t[56]!==K?(q=(0,F.jsxs)(`div`,{style:U,children:[se,K]}),t[55]=se,t[56]=K,t[57]=q):q=t[57];let J=`graph-stage-loader-bar ${_.progressKind===`indeterminate`?`graph-stage-loader-bar-indeterminate`:``}`,Y;t[58]!==_.progressKind||t[59]!==b?(Y=_.progressKind===`determinate`&&b!==null?(0,F.jsx)(`span`,{className:`graph-stage-loader-bar-fill`,style:{width:`${Math.round(b*100)}%`}}):null,t[58]=_.progressKind,t[59]=b,t[60]=Y):Y=t[60];let X;t[61]!==J||t[62]!==Y?(X=(0,F.jsx)(`div`,{className:J,children:Y}),t[61]=J,t[62]=Y,t[63]=X):X=t[63];let Z;t[64]===Symbol.for(`react.memo_cache_sentinel`)?(Z={display:`flex`,gap:10,flexWrap:`wrap`,marginTop:14},t[64]=Z):Z=t[64];let le;t[65]===_.nodesLoaded?le=t[66]:(le=_.nodesLoaded.toLocaleString(),t[65]=_.nodesLoaded,t[66]=le);let ue;t[67]===_.nodesTotal?ue=t[68]:(ue=_.nodesTotal?` / ${_.nodesTotal.toLocaleString()}`:``,t[67]=_.nodesTotal,t[68]=ue);let Q;t[69]!==le||t[70]!==ue?(Q=(0,F.jsxs)(`span`,{style:Er,children:[le,ue,` nodes`]}),t[69]=le,t[70]=ue,t[71]=Q):Q=t[71];let de;t[72]===_.edgesLoaded?de=t[73]:(de=_.edgesLoaded.toLocaleString(),t[72]=_.edgesLoaded,t[73]=de);let fe;t[74]===_.edgesTotal?fe=t[75]:(fe=_.edgesTotal?` / ${_.edgesTotal.toLocaleString()}`:``,t[74]=_.edgesTotal,t[75]=fe);let pe;t[76]!==de||t[77]!==fe?(pe=(0,F.jsxs)(`span`,{style:Er,children:[de,fe,` relationships`]}),t[76]=de,t[77]=fe,t[78]=pe):pe=t[78];let me;t[79]!==S||t[80]!==w?(me=S?(0,F.jsxs)(`span`,{style:{...Er,color:`#a9ddff`,borderColor:A(j.palette.accent.hovered,.22)},children:[S,w?` · ${w}`:``]}):null,t[79]=S,t[80]=w,t[81]=me):me=t[81];let he;t[82]!==Q||t[83]!==pe||t[84]!==me?(he=(0,F.jsxs)(`div`,{style:Z,children:[Q,pe,me]}),t[82]=Q,t[83]=pe,t[84]=me,t[85]=he):he=t[85];let ge;t[86]!==v||t[87]!==V||t[88]!==H||t[89]!==q||t[90]!==X||t[91]!==he?(ge=(0,F.jsxs)(`div`,{className:`graph-stage-loader-card`,"data-live":v,children:[V,H,q,X,he]}),t[86]=v,t[87]=V,t[88]=H,t[89]=q,t[90]=X,t[91]=he,t[92]=ge):ge=t[92];let _e;return t[93]!==s||t[94]!==ge||t[95]!==T?(_e=(0,F.jsxs)(`div`,{className:`graph-stage-loader`,"data-exiting":s,style:T,children:[E,ge]}),t[93]=s,t[94]=ge,t[95]=T,t[96]=_e):_e=t[96],_e}var Or=[`source`,`source_url`,`pmid`,`pmids`,`evidence`,`provenance`,`confidence`],kr={pathPulseEnabled:!1,pathFlowEnabled:!1,lensEnabled:!1,temporalEmphasisEnabled:!1,semanticRegionsEnabled:!0,contoursEnabled:!1,pathfindingEnabled:!1,communitiesEnabled:!1,centralityEnabled:!1,legendEnabled:!1,diagnosticsEnabled:!1,lensMode:`neighborhood`,effectQuality:`bounded`},Ar=(0,N.lazy)(()=>s(()=>import(`./TimelinePanel-DZ8Z1JsZ.js`).then(e=>({default:e.TimelinePanel})),__vite__mapDeps([0,1,2,3,4,5,6]))),jr=(0,N.lazy)(()=>s(()=>import(`./GraphInspectorPanel-MLghMyni.js`).then(e=>({default:e.GraphInspectorPanel})),__vite__mapDeps([7,2,1,3,4,8,9]))),Mr=()=>s(()=>import(`./explorationEffectsPluginPhaseC-D23Zx1hX.js`).then(e=>e.explorationEffectsPluginPhaseC),__vite__mapDeps([10,11,2,1,3,4])),Nr=()=>s(()=>import(`./neighborhoodPanelPlugin-DtCzBl4D.js`).then(e=>e.neighborhoodPanelPlugin),__vite__mapDeps([12,13,3,1])),Pr=()=>s(()=>import(`./temporalOverlayPlugin-tGkpBW1s.js`).then(e=>e.temporalOverlayPlugin),__vite__mapDeps([14,15,3,1]));function Fr(e,t){let n=(0,P.c)(4),[r,i]=(0,N.useState)(e),a,o;return n[0]!==t||n[1]!==e?(a=()=>{let n=setTimeout(()=>i(e),t);return()=>clearTimeout(n)},o=[t,e],n[0]=t,n[1]=e,n[2]=a,n[3]=o):(a=n[2],o=n[3]),(0,N.useEffect)(a,o),r}var Ir=`- .palantir-bg {- background:- radial-gradient(circle at top, rgba(77, 157, 255, 0.08), transparent 22%),- linear-gradient(180deg, #060b17 0%, #02060d 100%);- }- .palantir-grid {- position: absolute;- inset: 0;- background-image:- linear-gradient(rgba(88, 166, 255, 0.038) 1px, transparent 1px),- linear-gradient(90deg, rgba(88, 166, 255, 0.038) 1px, transparent 1px);- background-size: 42px 42px;- pointer-events: none;- z-index: 1;- }- .palantir-vignette {- position: absolute;- inset: 0;- background: radial-gradient(ellipse at center, transparent 34%, rgba(1, 4, 10, 0.78) 100%);- pointer-events: none;- z-index: 2;- }- .glass-header {- background: linear-gradient(180deg, rgba(7, 14, 25, 0.88) 0%, rgba(10, 18, 31, 0.62) 100%);- border-bottom: 1px solid rgba(112, 196, 255, 0.1);- backdrop-filter: blur(12px);- -webkit-backdrop-filter: blur(12px);- }- .glass-hud {- background: linear-gradient(135deg, rgba(8, 15, 27, 0.76), rgba(10, 19, 32, 0.58));- backdrop-filter: blur(14px) saturate(1.08);- -webkit-backdrop-filter: blur(14px) saturate(1.08);- border-left: 1px solid rgba(112, 196, 255, 0.14);- box-shadow: -10px 0 28px rgba(0, 0, 0, 0.34), inset 1px 0 0 rgba(255, 255, 255, 0.04);- }- .hud-scrollbar::-webkit-scrollbar { width: 6px; }- .hud-scrollbar::-webkit-scrollbar-track { background: transparent; }- .hud-scrollbar::-webkit-scrollbar-thumb { background: rgba(88, 166, 255, 0.25); border-radius: 6px; }- .node-panel-collapse {- border: 1px solid rgba(255, 255, 255, 0.05);- border-radius: 12px;- background: rgba(0, 0, 0, 0.14);- overflow: hidden;- }- .node-panel-collapse + .node-panel-collapse {- margin-top: 12px;- }- .node-panel-summary {- list-style: none;- cursor: pointer;- display: flex;- align-items: center;- justify-content: space-between;- gap: 12px;- padding: 12px 14px;- color: #c6d4e3;- font-size: 12px;- font-weight: 700;- letter-spacing: 0.04em;- text-transform: uppercase;- }- .node-panel-summary::-webkit-details-marker {- display: none;- }- .node-panel-summary::after {- content: "+";- color: rgba(127, 208, 255, 0.8);- font-size: 16px;- line-height: 1;- }- .node-panel-collapse[open] .node-panel-summary::after {- content: "−";- }- .node-panel-body {- padding: 0 14px 14px;- }- .graph-loading-overlay {- position: absolute;- inset: 0;- z-index: 9;- display: flex;- align-items: center;- justify-content: center;- pointer-events: none;- }- .graph-loading-card {- width: min(460px, calc(100% - 48px));- border-radius: 20px;- padding: 22px 22px 18px;- background: linear-gradient(135deg, rgba(7, 17, 31, 0.9), rgba(14, 28, 48, 0.78));- border: 1px solid rgba(127, 208, 255, 0.16);- box-shadow: 0 24px 80px rgba(0, 0, 0, 0.38), inset 0 1px 0 rgba(255,255,255,0.04);- backdrop-filter: blur(18px);- -webkit-backdrop-filter: blur(18px);- }- .graph-loading-dots {- display: inline-flex;- gap: 8px;- align-items: center;- }- .graph-loading-dot {- width: 10px;- height: 10px;- border-radius: 999px;- background: linear-gradient(135deg, rgba(127, 208, 255, 0.96), rgba(242, 182, 109, 0.96));- box-shadow: 0 0 18px rgba(127, 208, 255, 0.35);- animation: sem-loader-pulse 1.2s ease-in-out infinite;- }- .graph-loading-dot:nth-child(2) {- animation-delay: 0.14s;- }- .graph-loading-dot:nth-child(3) {- animation-delay: 0.28s;- }- @keyframes sem-loader-pulse {- 0%, 100% {- transform: translateY(0) scale(0.92);- opacity: 0.55;- }- 50% {- transform: translateY(-4px) scale(1.08);- opacity: 1;- }- }- .graph-loading-bar {- width: 100%;- height: 10px;- border-radius: 999px;- overflow: hidden;- background: rgba(255, 255, 255, 0.06);- border: 1px solid rgba(127, 208, 255, 0.1);- }- .graph-loading-bar > span {- display: block;- height: 100%;- border-radius: 999px;- background: linear-gradient(90deg, rgba(74, 163, 255, 0.9), rgba(127, 208, 255, 0.95), rgba(242, 182, 109, 0.92));- box-shadow: 0 0 28px rgba(74, 163, 255, 0.3);- transition: width 180ms ease;- }- .explore-shell {- position: relative;- width: 100%;- height: 100%;- overflow: hidden;- padding: 12px;- display: flex;- flex-direction: column;- gap: 10px;- }- .explore-command-deck {- position: relative;- z-index: 3;- }- .explore-command-grid {- display: grid;- grid-template-columns: minmax(260px, 0.9fr) minmax(0, 1.4fr);- gap: 16px;- }- .explore-main-grid {- position: relative;- z-index: 3;- min-height: 0;- flex: 1;- display: grid;- grid-template-columns: minmax(0, 1fr) minmax(340px, 380px);- gap: 12px;- }- .explore-scene-stack {- min-height: 0;- display: flex;- flex-direction: column;- gap: 14px;- }- .explore-scene-card {- min-height: 0;- flex: 1;- display: flex;- flex-direction: column;- overflow: hidden;- }- .explore-scene-shell {- position: relative;- min-height: 0;- flex: 1;- overflow: hidden;- border-radius: 20px 20px 0 0;- }- .explore-scene-stage {- position: relative;- z-index: 3;- width: 100%;- height: 100%;- }- .explore-scene-footer {- position: relative;- z-index: 3;- border-top: 1px solid rgba(112, 196, 255, 0.1);- background: linear-gradient(180deg, rgba(5, 11, 20, 0.94), rgba(5, 11, 20, 0.82));- }- .explore-plugin-dock {- position: relative;- z-index: 3;- }- .explore-plugin-dock-tabs {- display: flex;- align-items: center;- gap: 6px;- flex-wrap: wrap;- }- .explore-plugin-dock-tab {- border: 1px solid rgba(127, 208, 255, 0.14);- background: rgba(255, 255, 255, 0.03);- color: #a9bfd7;- border-radius: 999px;- padding: 6px 10px;- font-size: 11px;- font-weight: 600;- cursor: pointer;- }- .explore-plugin-dock-tab[data-active="true"] {- color: #eef6ff;- background: rgba(74, 163, 255, 0.16);- border-color: rgba(127, 208, 255, 0.28);- }- .explore-toolbar {- display: flex;- align-items: center;- justify-content: space-between;- gap: 10px;- flex-wrap: wrap;- }- .explore-toolbar-groups {- display: flex;- align-items: center;- gap: 8px;- flex-wrap: wrap;- flex: 1;- justify-content: flex-end;- }- .explore-toolbar-group {- display: inline-flex;- align-items: center;- gap: 8px;- padding: 3px;- border-radius: 14px;- border: 1px solid rgba(127, 208, 255, 0.08);- background: rgba(255, 255, 255, 0.02);- }- .explore-search-results {- display: flex;- flex-direction: column;- gap: 8px;- max-height: 260px;- overflow-y: auto;- padding-right: 4px;- }- .explore-inspector-shell {- min-height: 0;- display: flex;- flex-direction: column;- }- .explore-inspector-card {- min-height: 0;- flex: 1;- overflow: hidden;- }- .explore-inspector-scroll {- height: 100%;- overflow-y: auto;- }- @media (max-width: 1260px) {- .explore-main-grid {- grid-template-columns: 1fr;- }- }- @media (max-width: 980px) {- .explore-shell {- padding: 10px;- gap: 10px;- }- .explore-command-grid {- grid-template-columns: 1fr;- }- }-`;function Lr(e){return Or.reduce((t,n)=>e[n]!==void 0&&e[n]!==null?t+1:t,0)}function Rr(e){let t=e.properties||{},n=String(t.content||e.id),r=j.palette.accent.path,i=!!(t.valid_from||t.valid_until),a=Lr(t);return{label:n,x:Number(t.x??Math.random()*1e3-500),y:Number(t.y??Math.random()*1e3-500),nodeType:e.type||`inferred`,content:n,valid_from:t.valid_from??null,valid_until:t.valid_until??null,properties:t,size:8,baseSize:8,semanticGroup:e.type||`inferred`,color:r,baseColor:r,mutedColor:A(r,j.nodes.mutedAlpha),glowColor:A(r,.36),visualPriority:.82,labelPriority:.82,strokeColor:j.palette.background.nodeBorder,borderColor:j.palette.background.nodeBorder,borderSize:.85,nodeVariant:`inferred`,nodeShapeVariant:`inferred`,badgeKind:i?`temporal`:a>0?`provenance`:`inferred`,badgeCount:a||void 0,ringColor:j.nodes.selectedRing.color,haloColor:A(r,.42),labelVisibilityPolicy:`local`}}function zr(e){let t=e.properties||{},n=!!t.inferred,r=S.hasDirectedEdge(e.target_id,e.source_id),i=n?j.palette.accent.path:j.palette.muted.edgeStructure;return{edgeId:e.id,familyId:e.familyId||e.id,sourceId:e.source_id,targetId:e.target_id,weight:Number(e.weight??1),edgeType:e.type||`related_to`,properties:t,size:1,baseSize:1,color:i,baseColor:i,mutedColor:j.palette.muted.edgeOverview,visualPriority:n?.95:.5,isBidirectional:r,edgeFamily:n?`path`:r?`bidirectional`:`line`,curveGroup:r?O(e.source_id,e.target_id):null,type:`line`,edgeVariant:n?`pathSignal`:r?`bidirectionalCurve`:`directional`,arrowVisibilityPolicy:n?`always`:`contextual`,relationshipStrength:n?.95:.52,isParallelPair:!1,parallelIndex:0,parallelCount:1,familySize:1}}function Br(e){if(!e||!S.hasNode(e))return null;let t=S.getNodeAttributes(e);return{id:e,label:String(t.label??e),content:String(t.content??t.label??e),nodeType:String(t.nodeType??`Entity`),color:typeof t.color==`string`?t.color:void 0,valid_from:t.valid_from??null,valid_until:t.valid_until??null,properties:t.properties??{},neighborCount:S.neighbors(e).length}}function Vr(e){if(!e||!S.hasEdge(e))return null;let[t,n]=S.extremities(e),r=S.getEdgeAttributes(e),i=S.getNodeAttributes(t),a=S.getNodeAttributes(n),o=r.properties??{},s=String(r.familyId||e),c=0,l=0;return S.forEachEdge((e,r)=>{let i=r,[a,o]=S.extremities(e);String(i.familyId||e)===s&&(c+=1),a===t&&o===n&&(l+=1)}),{id:e,familyId:s,sourceId:t,sourceLabel:String(i.label??i.content??t),targetId:n,targetLabel:String(a.label??a.content??n),edgeType:String(r.edgeType??`related_to`),weight:Number(r.weight??1),properties:o,provenanceCount:Lr(o),familySize:c,siblingCount:l}}function Hr(e,t){let n=[];for(let r of e)try{let e=r.renderPanel?.(t);if(!e)continue;Array.isArray(e)?n.push(...e):n.push(e)}catch(e){console.error(`[GraphPlugin:${r.id}] panel render failed`,e)}return n.sort((e,t)=>(e.order??0)-(t.order??0))}function Ur(e,t){let n=[];for(let r of e)try{let e=r.renderOverlay?.(t);if(!e)continue;Array.isArray(e)?n.push(...e):n.push(e)}catch(e){console.error(`[GraphPlugin:${r.id}] overlay render failed`,e)}return n.sort((e,t)=>(e.layer??0)===(t.layer??0)?(e.order??0)-(t.order??0):(e.layer??0)-(t.layer??0))}function Wr(){let[e,t]=(0,N.useState)(``),[n,r]=(0,N.useState)(``),[i,a]=(0,N.useState)(!1),[o,s]=(0,N.useState)(`focused`),[c,l]=(0,N.useState)(``),[u,d]=(0,N.useState)([]),[f,p]=(0,N.useState)(``),[m,h]=(0,N.useState)(``),[g,_]=(0,N.useState)([]),[v,y]=(0,N.useState)(``),[b,x]=(0,N.useState)(null),[C,T]=(0,N.useState)(null),[E,D]=(0,N.useState)(null),[O,k]=(0,N.useState)(null),[A,P]=(0,N.useState)(null),[I,ee]=(0,N.useState)({"effects-panel":!1,"neighborhood-panel":!1,"temporal-panel":!1}),[te,B]=(0,N.useState)(null),[ne,re]=(0,N.useState)(0),[V,ie]=(0,N.useState)(kr),[ae,H]=(0,N.useState)(null),[U,oe]=(0,N.useState)(null),[W,se]=(0,N.useState)({}),ce=Fr(O,150),G=(0,N.useRef)(new Set),K=(0,N.useRef)(null),q=(0,N.useRef)(null),J=(0,N.useRef)(null),Y=(0,N.useRef)({hoveredNodeId:null,selectedNodeId:``,selectedEdgeId:``,focusedNodeId:``,activePath:[],activePathEdgeIds:[],viewMode:`focused`,zoomTier:`overview`,isLayoutRunning:!1}),X=Sr(),{data:Z,isLoading:le,isFetching:ue}=_r({enabled:!0,onGraphReady:e=>{if(a(!e.layoutReady),J.current!==null&&(window.clearTimeout(J.current),J.current=null),e.layoutReady){P(null);return}P(er({phase:`stabilizing_layout`,progressKind:`indeterminate`,nodesLoaded:e.nodeCount,nodesTotal:e.nodeCount,edgesLoaded:e.edgeCount,edgesTotal:e.edgeCount,message:`Settling runtime layout`,showGraphBehind:!0,layoutSource:e.layoutSource,layoutState:`bootstrapping`})),J.current=window.setTimeout(()=>{P(e=>e?.phase===`stabilizing_layout`?null:e),J.current=null},900)},onProgress:P});(0,N.useEffect)(()=>()=>{J.current!==null&&window.clearTimeout(J.current)},[]),(0,N.useEffect)(()=>{let e=!1;return(async()=>{try{let t=await fetch(`/api/temporal/bounds`);if(!t.ok||e)return;let n=await t.json();e||D(n)}catch{e||D(null)}})(),()=>{e=!0}},[Z?.nodeCount,Z?.edgeCount]),(0,N.useEffect)(()=>{if(!ce||le)return;let e=!1;return(async()=>{try{let t=ce.toISOString(),n=await fetch(`/api/temporal/snapshot?at=${encodeURIComponent(t)}`);if(!n.ok||e)return;let r=await n.json();if(e)return;let i=new Set(r.active_node_ids);requestAnimationFrame(()=>{e||(G.current.forEach(e=>{!i.has(e)&&S.hasNode(e)&&S.setNodeAttribute(e,`hidden`,!0)}),i.forEach(e=>{S.hasNode(e)&&S.setNodeAttribute(e,`hidden`,!1)}),G.current=i,T(r.active_node_count),K.current?.getRuntime()?.requestRender())})}catch(t){e||console.error(`[Temporal] Snapshot fetch failed`,t)}})(),()=>{e=!0}},[ce,le]);let Q=(0,N.useCallback)(e=>{t(e),r(``),x(null),d([]),p(``),e&&a(!1)},[]),de=(0,N.useCallback)(e=>{r(e)},[]),fe=(0,N.useCallback)(async()=>{if(!c.trim()){d([]);return}p(``);try{let e=await fetch(`/api/graph/search`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({query:c,limit:8})});if(!e.ok)throw Error(`Search failed with status ${e.status}`);d((await e.json()).results||[])}catch(e){p(e instanceof Error?e.message:`Search failed`)}},[c]),pe=(0,N.useCallback)(async()=>{if(e)try{let t=await fetch(`/api/enrich/links`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({node_id:e,top_n:6,candidate_type:m||void 0,min_score:0})});if(!t.ok)throw Error(`Link prediction failed with status ${t.status}`);_((await t.json()).predictions||[])}catch(e){console.error(`[GraphWorkspace] prediction failed`,e),_([])}},[m,e]),me=(0,N.useCallback)(async()=>{if(!(!e||!v.trim()))try{let t=await fetch(`/api/graph/node/${encodeURIComponent(e)}/path?target=${encodeURIComponent(v.trim())}&algorithm=dijkstra`);if(!t.ok)throw Error(`Path lookup failed with status ${t.status}`);let n=await t.json();if(x(n),n.path?.length){let e=n.path[n.path.length-1];S.hasNode(e)&&K.current?.focusNode(e)}}catch(e){console.error(`[GraphWorkspace] path trace failed`,e),x(null)}},[v,e]),he=(0,N.useCallback)(async t=>{if(!e)return;let n=await fetch(`/api/provenance/report?node_id=${encodeURIComponent(e)}&format=${t===`markdown`?`markdown`:`json`}`);if(!n.ok)throw Error(`Provenance report failed with status ${n.status}`);let r=await n.blob(),i=window.URL.createObjectURL(r),a=document.createElement(`a`);a.href=i,a.download=`${e}_provenance.${t===`markdown`?`md`:`json`}`,document.body.appendChild(a),a.click(),window.URL.revokeObjectURL(i),document.body.removeChild(a)},[e]);(0,N.useEffect)(()=>{let e=window.location.protocol===`https:`?`wss:`:`ws:`,t=new WebSocket(`${e}//${window.location.host}/ws/graph-updates`);return t.onmessage=e=>{try{let t=JSON.parse(e.data);if(t.event===`connection_ack`||t.event!==`graph_mutation`)return;let n=t.data?.event_type,r=t.data?.payload;n===`ADD_NODE`&&r?.id&&(M([{id:r.id,attributes:Rr(r)}]),K.current?.getRuntime()?.requestRender()),n===`ADD_EDGE`&&(w([{id:String(r.id),familyId:r.familyId?String(r.familyId):String(r.id),source:r.source_id,target:r.target_id,attributes:zr(r)}]),K.current?.getRuntime()?.requestRender())}catch(e){console.error(`[GraphWorkspace] websocket update failed`,e)}},()=>{t.close()}},[]);let ge=(0,N.useMemo)(()=>{if(!e||!S.hasNode(e))return null;let t=S.neighbors(e).length;return o===`focused`?`${Math.min(t,16)+1} nodes in focused view`:`${t} direct neighbors highlighted`},[e,o]),_e=le||ue||A?.phase===`stabilizing_layout`,ve=!!Z?.nodeCount,ye=b?.path??[],be=b?.edge_ids??[],xe=Z,Se=(0,N.useMemo)(()=>Br(e),[e,Z?.nodeCount,Z?.edgeCount]),$=(0,N.useMemo)(()=>Vr(n),[n,Z?.nodeCount,Z?.edgeCount]),Ce=(0,N.useMemo)(()=>({currentTime:O,activeNodeCount:C,minDate:E?.min??void 0,maxDate:E?.max??void 0}),[C,O,E?.max,E?.min]),we=(0,N.useMemo)(()=>[{id:`exploration-effects`,panelId:`effects-panel`,label:`Effects`,title:`Open exploration effects controls`,order:18,load:Mr,shouldLoad:({panelState:e})=>!!e[`effects-panel`]},{id:`neighborhood-panel`,panelId:`neighborhood-panel`,label:`Neighbors`,title:`Toggle neighborhood panel`,order:30,load:Nr,shouldLoad:({panelState:e})=>!!e[`neighborhood-panel`]},{id:`temporal-overlay`,panelId:`temporal-panel`,label:`Temporal`,title:`Toggle temporal context panel`,order:40,load:Pr,shouldLoad:({panelState:e,temporalState:t})=>!!(e[`temporal-panel`]||t?.currentTime)}],[]),Te=(0,N.useMemo)(()=>we.map(e=>W[e.id]).filter(e=>!!e),[W,we]);(0,N.useEffect)(()=>{let e=!1;return we.forEach(t=>{W[t.id]||t.shouldLoad({panelState:I,temporalState:Ce})&&t.load().then(n=>{e||se(e=>e[t.id]?e:{...e,[t.id]:n})}).catch(e=>{console.error(`[GraphPlugin:${t.id}] lazy load failed`,e)})}),()=>{e=!0}},[W,I,we,Ce]);let Ee=(0,N.useCallback)((e,t)=>{ie(n=>{let r=typeof t==`function`?t(n[e]):t;return e===`diagnosticsEnabled`&&!j.effects.diagnostics.enabledInDev||n[e]===r?n:{...n,[e]:r}})},[]),De=(0,N.useCallback)(e=>{switch(e.type){case`fitView`:K.current?.fitView();return;case`focusNode`:K.current?.focusNode(e.nodeId);return;case`selectNode`:Q(e.nodeId);return;case`setViewMode`:s(e.viewMode);return;case`toggleEffect`:Ee(e.effect,e=>!e);return;case`setEffect`:Ee(e.effect,e.enabled);return;case`togglePanel`:ee(t=>{let n=!t[e.panelId];return B(t=>n?e.panelId:t===e.panelId?null:t),{...t,[e.panelId]:n}});return;case`openPanel`:B(e.panelId),ee(t=>({...t,[e.panelId]:!0}));return;case`closePanel`:ee(t=>({...t,[e.panelId]:!1})),B(t=>t===e.panelId?null:t);return}},[Q,Ee]),Oe=(0,N.useMemo)(()=>!j.effects.diagnostics.enabledInDev||!ae?null:{interactionState:Y.current,activePluginIds:Te.map(e=>e.id),openPanelIds:Object.entries(I).filter(([,e])=>e).map(([e])=>e),effectsState:V,effectAvailability:ae},[Te,V,ae,I]),ke=(0,N.useMemo)(()=>({get scene(){return q.current},get graph(){return S},get displayGraph(){return q.current?.displayGraph??S},theme:j,getInteractionState:()=>Y.current,getSelectedNodeState:()=>Se,getInspectorState:()=>({selectedNodeId:e||null,ownsSelectionDetails:!0}),getGraphSummary:()=>xe,getTemporalState:()=>Ce,getEffectsState:()=>V,getDiagnosticsSnapshot:()=>Oe,getAnalyticsSnapshot:()=>U,isPanelOpen:e=>!!I[e],dispatchAction:De}),[U,Oe,V,xe,De,I,e,Se,Ce]),Ae=(0,N.useCallback)(e=>{q.current=e,e||oe(null),re(e=>e+1)},[]),je=(0,N.useCallback)(e=>{Y.current=e;for(let t of Te)try{t.onStateChange(ke,e)}catch(e){console.error(`[GraphPlugin:${t.id}] state update failed`,e)}},[Te,ke]),Me=(0,N.useCallback)(e=>{j.effects.diagnostics.enabledInDev&&H(e)},[]),Ne=(0,N.useCallback)(e=>{oe(e)},[]);(0,N.useEffect)(()=>{if(!q.current)return;let e=[];for(let t of Te)try{t.mount(ke),e.push(t)}catch(e){console.error(`[GraphPlugin:${t.id}] mount failed`,e)}return()=>{for(let t of e.reverse())try{t.unmount(ke)}catch(e){console.error(`[GraphPlugin:${t.id}] unmount failed`,e)}}},[Te,ke,ne]);let Pe=(0,N.useMemo)(()=>we.map(e=>({id:`${e.id}-toggle`,label:e.label,title:e.title,active:ke.isPanelOpen(e.panelId),order:e.order,onClick:()=>ke.dispatchAction({type:`togglePanel`,panelId:e.panelId})})),[ke,we]),Fe=(0,N.useMemo)(()=>Hr(Te,ke),[Te,ke]),Ie=(0,N.useMemo)(()=>Ur(Te,ke),[Te,ke]),Le=(0,N.useMemo)(()=>we.filter(e=>I[e.panelId]&&!W[e.id]).map(e=>({id:e.panelId,title:e.label,placement:`bottom`,order:e.order,content:(0,F.jsxs)(`div`,{style:ei,children:[`Loading `,e.label.toLowerCase(),`…`]})})),[W,I,we]),Re=[...Fe,...Le].filter(e=>e.placement===`bottom`||e.placement===`side`).sort((e,t)=>(e.order??0)-(t.order??0)).filter(e=>I[e.id]),ze=Re.find(e=>e.id===te)??Re[0]??null,Be={showInspector:!!e,showPluginDock:Re.length>0};(0,N.useEffect)(()=>{if(!Re.length){B(null);return}(!te||!Re.some(e=>e.id===te))&&B(Re[0].id)},[te,Re]);let Ve=(0,N.useMemo)(()=>{let t=[];return e&&t.push({id:`view-mode`,items:[{id:`view-focused`,label:`Focused`,title:`Inspect the selected node in a focused local graph`,active:o===`focused`,onClick:()=>s(`focused`)},{id:`view-full`,label:`Full Graph`,title:`Return to the full graph context`,active:o===`full`,onClick:()=>s(`full`)}]}),t.push({id:`graph-actions`,items:[{id:`search-submit`,label:`Search`,title:`Search for the current query`,tone:`primary`,disabled:_e||!c.trim(),onClick:()=>void fe()},{id:`fit-view`,label:`Fit View`,title:`Reset the camera to the current view`,onClick:()=>K.current?.fitView()},{id:`layout-toggle`,label:i?`Pause Layout`:`Run Layout`,title:`Toggle the layout worker`,active:i,disabled:_e,onClick:()=>a(e=>!e)},{id:`reload`,label:`Reload`,title:`Reload the graph data`,disabled:_e,onClick:X}]}),Pe.length&&t.push({id:`plugin-tools`,items:Pe.map(e=>({id:e.id,label:e.label,title:e.title,active:e.active,onClick:e.onClick}))}),t},[i,Pe,X,c,e,_e,o]),He={onNodeSelect:Q,onEdgeSelect:de,selectedNodeId:e,selectedEdgeId:n,activePath:ye,activePathEdgeIds:be,effectsState:V,temporalState:Ce,isLayoutRunning:i,viewMode:o,showFitViewButton:!1,pluginOverlays:Ie.map(e=>e.element),onRuntimeChange:Ae,onInteractionStateChange:je,onDiagnosticsChange:Me,onAnalyticsChange:Ne};return(0,F.jsxs)(`div`,{className:`palantir-bg`,style:{position:`relative`,width:`100%`,height:`100%`,overflow:`hidden`},children:[(0,F.jsx)(`style`,{children:Ir}),(0,F.jsx)(`div`,{className:`palantir-grid`}),(0,F.jsx)(`div`,{className:`palantir-vignette`}),(0,F.jsxs)(`div`,{className:`explore-shell`,children:[(0,F.jsx)(`section`,{className:`explore-command-deck`,children:(0,F.jsx)(L,{tone:`subtle`,children:(0,F.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:12},children:[(0,F.jsxs)(`div`,{className:`explore-toolbar`,children:[(0,F.jsxs)(`div`,{style:{display:`flex`,gap:8,flexWrap:`wrap`,alignItems:`center`},children:[_e&&A?(0,F.jsx)(R,{children:Qn(A.phase)}):null,Z?(0,F.jsxs)(R,{children:[Z.nodeCount.toLocaleString(),` nodes · `,Z.edgeCount.toLocaleString(),` edges`]}):null,C===null?null:(0,F.jsxs)(R,{tone:`success`,children:[C.toLocaleString(),` active`]}),ge?(0,F.jsx)(R,{tone:`warm`,children:ge}):null]}),(0,F.jsxs)(`div`,{className:`explore-toolbar-groups`,children:[(0,F.jsx)(`div`,{style:{minWidth:280,flex:`1 1 320px`},children:(0,F.jsx)(`input`,{value:c,onChange:e=>l(e.target.value),onKeyDown:e=>{e.key===`Enter`&&fe()},placeholder:`Search a node, e.g. Metformin`,style:{...Gr,margin:0,minHeight:38}})}),Ve.map(e=>(0,F.jsx)(`div`,{className:`explore-toolbar-group`,children:e.items.map(e=>{let t=e.tone===`primary`?Kr:qr;return(0,F.jsx)(`button`,{onClick:e.onClick,title:e.title,disabled:e.disabled,style:{...t,minHeight:36,padding:`8px 12px`,background:e.active?`rgba(31, 111, 235, 0.28)`:t.background,border:e.active?`1px solid rgba(127, 208, 255, 0.35)`:t.border,color:e.active?`#e6f2ff`:t.color,boxShadow:e.active?`0 0 0 1px rgba(127, 208, 255, 0.12)`:t.boxShadow},children:e.label},e.id)})},e.id))]})]}),f?(0,F.jsx)(`div`,{style:{color:`#ff7b72`,fontSize:12},children:f}):null,u.length?(0,F.jsx)(`div`,{className:`explore-search-results hud-scrollbar`,style:ti,children:u.map(e=>(0,F.jsx)(`button`,{style:Jr,onClick:()=>Q(e.node.id),children:(0,F.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,gap:12},children:[(0,F.jsxs)(`div`,{style:{minWidth:0},children:[(0,F.jsx)(`div`,{style:{color:`#fff`,fontWeight:600},children:e.node.content||e.node.id}),(0,F.jsx)(`div`,{style:{color:`#8b949e`,fontSize:12},children:e.node.type})]}),(0,F.jsx)(`div`,{style:{color:`#58a6ff`,fontSize:12,whiteSpace:`nowrap`},children:e.score.toFixed(3)})]})},e.node.id))}):null,$?(0,F.jsxs)(`div`,{style:Yr,children:[(0,F.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,gap:12,alignItems:`flex-start`},children:[(0,F.jsxs)(`div`,{style:{minWidth:0},children:[(0,F.jsx)(`div`,{style:{color:`rgba(127, 208, 255, 0.76)`,fontSize:11,fontWeight:700,letterSpacing:`0.08em`,textTransform:`uppercase`},children:`Relationship`}),(0,F.jsx)(`div`,{style:{color:`#f4f8ff`,fontSize:15,fontWeight:700,marginTop:6},children:$.edgeType})]}),(0,F.jsx)(`button`,{onClick:()=>r(``),style:{...qr,minHeight:30,padding:`6px 10px`},children:`Close`})]}),(0,F.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10,flexWrap:`wrap`},children:[(0,F.jsx)(`button`,{style:Xr,onClick:()=>Q($.sourceId),children:$.sourceLabel}),(0,F.jsx)(`span`,{style:{color:`#7fa7ce`,fontSize:12},children:`→`}),(0,F.jsx)(`button`,{style:Xr,onClick:()=>Q($.targetId),children:$.targetLabel})]}),(0,F.jsxs)(`div`,{style:{display:`flex`,gap:8,flexWrap:`wrap`},children:[(0,F.jsxs)(R,{tone:`warm`,children:[`weight `,$.weight.toFixed(2)]}),(0,F.jsxs)(R,{children:[$.siblingCount,` parallel lane`,$.siblingCount===1?``:`s`]}),(0,F.jsxs)(R,{children:[$.familySize,` family member`,$.familySize===1?``:`s`]}),$.provenanceCount>0?(0,F.jsxs)(R,{children:[$.provenanceCount,` provenance fields`]}):null]}),Object.keys($.properties).length?(0,F.jsx)(`div`,{style:Zr,children:Object.entries($.properties).slice(0,4).map(([e,t])=>(0,F.jsxs)(`div`,{style:Qr,children:[(0,F.jsx)(`div`,{style:{color:`rgba(127, 208, 255, 0.68)`,fontSize:10,letterSpacing:`0.06em`,textTransform:`uppercase`},children:e}),(0,F.jsx)(`div`,{style:{color:`#dce7f4`,fontSize:12,marginTop:4,wordBreak:`break-word`},children:typeof t==`object`?JSON.stringify(t):String(t)})]},e))}):null]}):null]})})}),(0,F.jsxs)(`div`,{className:`explore-main-grid`,style:{gridTemplateColumns:Be.showInspector?`minmax(0, 1fr) minmax(320px, 360px)`:`minmax(0, 1fr)`},children:[(0,F.jsx)(`div`,{className:`explore-scene-stack`,children:(0,F.jsxs)(L,{padding:`none`,className:`explore-scene-card`,children:[(0,F.jsxs)(`div`,{className:`explore-scene-shell`,children:[(0,F.jsx)(`div`,{className:`palantir-grid`}),(0,F.jsx)(`div`,{className:`palantir-vignette`}),(0,F.jsxs)(`div`,{className:`explore-scene-stage`,children:[(0,F.jsx)(Yn,{ref:K,...He}),(0,F.jsx)(Dr,{progress:A,visible:_e,showGraphBehind:ve||!!A?.showGraphBehind})]})]}),Be.showPluginDock?(0,F.jsx)(`div`,{className:`explore-plugin-dock`,children:(0,F.jsx)(L,{tone:`subtle`,style:{borderRadius:0,borderLeft:`none`,borderRight:`none`,borderBottom:`none`},children:(0,F.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:10},children:[(0,F.jsx)(`div`,{style:{display:`flex`,justifyContent:`space-between`,gap:12,alignItems:`center`},children:(0,F.jsxs)(`div`,{className:`explore-plugin-dock-tabs`,children:[Re.map(e=>(0,F.jsx)(`button`,{className:`explore-plugin-dock-tab`,"data-active":ze?.id===e.id,onClick:()=>B(e.id),children:e.title},e.id)),ze?(0,F.jsx)(`button`,{className:`explore-plugin-dock-tab`,onClick:()=>De({type:`closePanel`,panelId:ze.id}),children:`×`}):null]})}),ze?(0,F.jsx)(`div`,{style:$r,children:ze.content}):null]})})}):null,(0,F.jsx)(`div`,{className:`explore-scene-footer`,children:(0,F.jsx)(N.Suspense,{fallback:(0,F.jsx)(`div`,{style:ri,children:`Loading timeline…`}),children:(0,F.jsx)(Ar,{onTimeChange:k,minDate:E?.min??void 0,maxDate:E?.max??void 0})})})]})}),Be.showInspector?(0,F.jsx)(`div`,{className:`explore-inspector-shell`,children:(0,F.jsx)(z,{open:Be.showInspector,className:`explore-inspector-card`,children:(0,F.jsx)(`div`,{className:`explore-inspector-scroll hud-scrollbar`,children:(0,F.jsx)(N.Suspense,{fallback:(0,F.jsx)(`div`,{style:ni,children:`Loading inspector…`}),children:(0,F.jsx)(jr,{nodeId:e,predictions:g,predictionType:m,onPredictionTypeChange:h,onRunPredictions:()=>void pe(),pathTargetId:v,onPathTargetChange:y,onTracePath:()=>void me(),pathResult:b,onDownloadProvenance:e=>void he(e)})})})})}):null]})]})]})}var Gr={width:`100%`,background:`rgba(4, 10, 18, 0.5)`,border:`1px solid ${j.palette.background.shellBorder}`,color:`#edf5ff`,borderRadius:12,padding:`11px 13px`,fontSize:13,boxShadow:`inset 0 1px 0 rgba(255,255,255,0.03)`},Kr={background:`linear-gradient(135deg, rgba(24, 63, 133, 0.42), rgba(35, 85, 176, 0.28))`,color:`#fff`,border:`1px solid ${j.palette.background.shellBorder}`,borderRadius:12,padding:`9px 12px`,cursor:`pointer`,fontWeight:700,fontSize:12,display:`inline-flex`,alignItems:`center`,justifyContent:`center`,boxShadow:`0 8px 22px ${j.palette.background.shellGlow}`},qr={...Kr,background:`rgba(255, 255, 255, 0.03)`,border:`1px solid rgba(255, 255, 255, 0.08)`,color:`#c6d4e3`,fontWeight:600},Jr={textAlign:`left`,padding:12,background:`rgba(88, 166, 255, 0.08)`,border:`1px solid rgba(88, 166, 255, 0.12)`,borderRadius:10,cursor:`pointer`},Yr={display:`flex`,flexDirection:`column`,gap:12,padding:14,background:`linear-gradient(135deg, rgba(88, 166, 255, 0.1), rgba(88, 166, 255, 0.04))`,border:`1px solid rgba(127, 208, 255, 0.16)`,borderRadius:14,boxShadow:`inset 0 1px 0 rgba(255,255,255,0.03)`},Xr={...qr,minHeight:32,padding:`7px 12px`,whiteSpace:`nowrap`},Zr={display:`grid`,gridTemplateColumns:`repeat(auto-fit, minmax(160px, 1fr))`,gap:8},Qr={borderRadius:10,padding:10,background:`rgba(255, 255, 255, 0.03)`,border:`1px solid rgba(255, 255, 255, 0.06)`},$r={borderRadius:16,border:`1px solid rgba(255, 255, 255, 0.06)`,background:`rgba(255, 255, 255, 0.02)`,padding:14},ei={color:`#8ea4be`,fontSize:12,padding:10},ti={display:`grid`,gridTemplateColumns:`repeat(auto-fit, minmax(220px, 1fr))`,gap:10,maxHeight:186,overflowY:`auto`},ni={padding:24,color:`#8ea4be`,fontSize:12},ri={height:`90px`,display:`flex`,alignItems:`center`,padding:`0 18px`,color:`#8ea4be`,fontSize:12,borderTop:`1px solid rgba(88, 166, 255, 0.2)`,background:`rgba(1, 4, 9, 0.88)`};export{Wr as GraphWorkspace};\ No newline at end of filediff --git a/semantica/static/assets/LineageDiagram-BcIhRlOg.js b/semantica/static/assets/LineageDiagram-BcIhRlOg.jsdeleted file mode 100644index 7c813955..00000000--- a/semantica/static/assets/LineageDiagram-BcIhRlOg.js+++ /dev/null@@ -1,23 +0,0 @@-import{i as e,t}from"./rolldown-runtime-B1FJdls4.js";import{T as n,a as r}from"./query-vendor-Cbp9LWgA.js";import{i}from"./index-DDOaKEbH.js";import{t as a}from"./shim-CnYKr5zR.js";var o=e(n(),1),s=r();function c(e){if(typeof e==`string`||typeof e==`number`)return``+e;let t=``;if(Array.isArray(e))for(let n=0,r;n<e.length;n++)(r=c(e[n]))!==``&&(t+=(t&&` `)+r);else for(let n in e)e[n]&&(t+=(t&&` `)+n);return t}var l={value:()=>{}};function u(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+``)||r in n||/[\s.]/.test(r))throw Error(`illegal type: `+r);n[r]=[]}return new d(n)}function d(e){this._=e}function f(e,t){return e.trim().split(/^|\s+/).map(function(e){var n=``,r=e.indexOf(`.`);if(r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),e&&!t.hasOwnProperty(e))throw Error(`unknown type: `+e);return{type:e,name:n}})}d.prototype=u.prototype={constructor:d,on:function(e,t){var n=this._,r=f(e+``,n),i,a=-1,o=r.length;if(arguments.length<2){for(;++a<o;)if((i=(e=r[a]).type)&&(i=p(n[i],e.name)))return i;return}if(t!=null&&typeof t!=`function`)throw Error(`invalid callback: `+t);for(;++a<o;)if(i=(e=r[a]).type)n[i]=m(n[i],e.name,t);else if(t==null)for(i in n)n[i]=m(n[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new d(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var n=Array(i),r=0,i,a;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw Error(`unknown type: `+e);for(a=this._[e],r=0,i=a.length;r<i;++r)a[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw Error(`unknown type: `+e);for(var r=this._[e],i=0,a=r.length;i<a;++i)r[i].value.apply(t,n)}};function p(e,t){for(var n=0,r=e.length,i;n<r;++n)if((i=e[n]).name===t)return i.value}function m(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=l,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var h={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/`};function g(e){var t=e+=``,n=t.indexOf(`:`);return n>=0&&(t=e.slice(0,n))!==`xmlns`&&(e=e.slice(n+1)),h.hasOwnProperty(t)?{space:h[t],local:e}:e}function _(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===`http://www.w3.org/1999/xhtml`&&t.documentElement.namespaceURI===`http://www.w3.org/1999/xhtml`?t.createElement(e):t.createElementNS(n,e)}}function v(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function y(e){var t=g(e);return(t.local?v:_)(t)}function b(){}function x(e){return e==null?b:function(){return this.querySelector(e)}}function S(e){typeof e!=`function`&&(e=x(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,s=r[i]=Array(o),c,l,u=0;u<o;++u)(c=a[u])&&(l=e.call(c,c.__data__,u,a))&&(`__data__`in c&&(l.__data__=c.__data__),s[u]=l);return new K(r,this._parents)}function C(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function w(){return[]}function T(e){return e==null?w:function(){return this.querySelectorAll(e)}}function E(e){return function(){return C(e.apply(this,arguments))}}function D(e){e=typeof e==`function`?E(e):T(e);for(var t=this._groups,n=t.length,r=[],i=[],a=0;a<n;++a)for(var o=t[a],s=o.length,c,l=0;l<s;++l)(c=o[l])&&(r.push(e.call(c,c.__data__,l,o)),i.push(c));return new K(r,i)}function O(e){return function(){return this.matches(e)}}function k(e){return function(t){return t.matches(e)}}var A=Array.prototype.find;function j(e){return function(){return A.call(this.children,e)}}function M(){return this.firstElementChild}function N(e){return this.select(e==null?M:j(typeof e==`function`?e:k(e)))}var P=Array.prototype.filter;function F(){return Array.from(this.children)}function I(e){return function(){return P.call(this.children,e)}}function L(e){return this.selectAll(e==null?F:I(typeof e==`function`?e:k(e)))}function R(e){typeof e!=`function`&&(e=O(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,s=r[i]=[],c,l=0;l<o;++l)(c=a[l])&&e.call(c,c.__data__,l,a)&&s.push(c);return new K(r,this._parents)}function z(e){return Array(e.length)}function B(){return new K(this._enter||this._groups.map(z),this._parents)}function V(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}V.prototype={constructor:V,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 H(e){return function(){return e}}function U(e,t,n,r,i,a){for(var o=0,s,c=t.length,l=a.length;o<l;++o)(s=t[o])?(s.__data__=a[o],r[o]=s):n[o]=new V(e,a[o]);for(;o<c;++o)(s=t[o])&&(i[o]=s)}function W(e,t,n,r,i,a,o){var s,c,l=new Map,u=t.length,d=a.length,f=Array(u),p;for(s=0;s<u;++s)(c=t[s])&&(f[s]=p=o.call(c,c.__data__,s,t)+``,l.has(p)?i[s]=c:l.set(p,c));for(s=0;s<d;++s)p=o.call(e,a[s],s,a)+``,(c=l.get(p))?(r[s]=c,c.__data__=a[s],l.delete(p)):n[s]=new V(e,a[s]);for(s=0;s<u;++s)(c=t[s])&&l.get(f[s])===c&&(i[s]=c)}function G(e){return e.__data__}function ee(e,t){if(!arguments.length)return Array.from(this,G);var n=t?W:U,r=this._parents,i=this._groups;typeof e!=`function`&&(e=H(e));for(var a=i.length,o=Array(a),s=Array(a),c=Array(a),l=0;l<a;++l){var u=r[l],d=i[l],f=d.length,p=te(e.call(u,u&&u.__data__,l,r)),m=p.length,h=s[l]=Array(m),g=o[l]=Array(m);n(u,d,h,g,c[l]=Array(f),p,t);for(var _=0,v=0,y,b;_<m;++_)if(y=h[_]){for(_>=v&&(v=_+1);!(b=g[v])&&++v<m;);y._next=b||null}}return o=new K(o,r),o._enter=s,o._exit=c,o}function te(e){return typeof e==`object`&&`length`in e?e:Array.from(e)}function ne(){return new K(this._exit||this._groups.map(z),this._parents)}function re(e,t,n){var r=this.enter(),i=this,a=this.exit();return typeof e==`function`?(r=e(r),r&&=r.selection()):r=r.append(e+``),t!=null&&(i=t(i),i&&=i.selection()),n==null?a.remove():n(a),r&&i?r.merge(i).order():i}function ie(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,i=n.length,a=r.length,o=Math.min(i,a),s=Array(i),c=0;c<o;++c)for(var l=n[c],u=r[c],d=l.length,f=s[c]=Array(d),p,m=0;m<d;++m)(p=l[m]||u[m])&&(f[m]=p);for(;c<i;++c)s[c]=n[c];return new K(s,this._parents)}function ae(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],i=r.length-1,a=r[i],o;--i>=0;)(o=r[i])&&(a&&o.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(o,a),a=o);return this}function oe(e){e||=se;function t(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}for(var n=this._groups,r=n.length,i=Array(r),a=0;a<r;++a){for(var o=n[a],s=o.length,c=i[a]=Array(s),l,u=0;u<s;++u)(l=o[u])&&(c[u]=l);c.sort(t)}return new K(i,this._parents).order()}function se(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function ce(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function le(){return Array.from(this)}function ue(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,a=r.length;i<a;++i){var o=r[i];if(o)return o}return null}function de(){let e=0;for(let t of this)++e;return e}function fe(){return!this.node()}function pe(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var i=t[n],a=0,o=i.length,s;a<o;++a)(s=i[a])&&e.call(s,s.__data__,a,i);return this}function me(e){return function(){this.removeAttribute(e)}}function he(e){return function(){this.removeAttributeNS(e.space,e.local)}}function ge(e,t){return function(){this.setAttribute(e,t)}}function _e(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function ve(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function ye(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function be(e,t){var n=g(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((t==null?n.local?he:me:typeof t==`function`?n.local?ye:ve:n.local?_e:ge)(n,t))}function xe(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Se(e){return function(){this.style.removeProperty(e)}}function Ce(e,t,n){return function(){this.style.setProperty(e,t,n)}}function we(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function Te(e,t,n){return arguments.length>1?this.each((t==null?Se:typeof t==`function`?we:Ce)(e,t,n??``)):Ee(this.node(),e)}function Ee(e,t){return e.style.getPropertyValue(t)||xe(e).getComputedStyle(e,null).getPropertyValue(t)}function De(e){return function(){delete this[e]}}function Oe(e,t){return function(){this[e]=t}}function ke(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function Ae(e,t){return arguments.length>1?this.each((t==null?De:typeof t==`function`?ke:Oe)(e,t)):this.node()[e]}function je(e){return e.trim().split(/^|\s+/)}function Me(e){return e.classList||new Ne(e)}function Ne(e){this._node=e,this._names=je(e.getAttribute(`class`)||``)}Ne.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}};function Pe(e,t){for(var n=Me(e),r=-1,i=t.length;++r<i;)n.add(t[r])}function Fe(e,t){for(var n=Me(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}function Ie(e){return function(){Pe(this,e)}}function Le(e){return function(){Fe(this,e)}}function Re(e,t){return function(){(t.apply(this,arguments)?Pe:Fe)(this,e)}}function ze(e,t){var n=je(e+``);if(arguments.length<2){for(var r=Me(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof t==`function`?Re:t?Ie:Le)(n,t))}function Be(){this.textContent=``}function Ve(e){return function(){this.textContent=e}}function He(e){return function(){this.textContent=e.apply(this,arguments)??``}}function Ue(e){return arguments.length?this.each(e==null?Be:(typeof e==`function`?He:Ve)(e)):this.node().textContent}function We(){this.innerHTML=``}function Ge(e){return function(){this.innerHTML=e}}function Ke(e){return function(){this.innerHTML=e.apply(this,arguments)??``}}function qe(e){return arguments.length?this.each(e==null?We:(typeof e==`function`?Ke:Ge)(e)):this.node().innerHTML}function Je(){this.nextSibling&&this.parentNode.appendChild(this)}function Ye(){return this.each(Je)}function Xe(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Ze(){return this.each(Xe)}function Qe(e){var t=typeof e==`function`?e:y(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function $e(){return null}function et(e,t){var n=typeof e==`function`?e:y(e),r=t==null?$e:typeof t==`function`?t:x(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function tt(){var e=this.parentNode;e&&e.removeChild(this)}function nt(){return this.each(tt)}function rt(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function it(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function at(e){return this.select(e?it:rt)}function ot(e){return arguments.length?this.property(`__data__`,e):this.node().__data__}function st(e){return function(t){e.call(this,t,this.__data__)}}function ct(e){return e.trim().split(/^|\s+/).map(function(e){var t=``,n=e.indexOf(`.`);return n>=0&&(t=e.slice(n+1),e=e.slice(0,n)),{type:e,name:t}})}function lt(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,i=t.length,a;n<i;++n)a=t[n],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):t[++r]=a;++r?t.length=r:delete this.__on}}}function ut(e,t,n){return function(){var r=this.__on,i,a=st(t);if(r){for(var o=0,s=r.length;o<s;++o)if((i=r[o]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=a,i.options=n),i.value=t;return}}this.addEventListener(e.type,a,n),i={type:e.type,name:e.name,value:t,listener:a,options:n},r?r.push(i):this.__on=[i]}}function dt(e,t,n){var r=ct(e+``),i,a=r.length,o;if(arguments.length<2){var s=this.node().__on;if(s){for(var c=0,l=s.length,u;c<l;++c)for(i=0,u=s[c];i<a;++i)if((o=r[i]).type===u.type&&o.name===u.name)return u.value}return}for(s=t?ut:lt,i=0;i<a;++i)this.each(s(r[i],t,n));return this}function ft(e,t,n){var r=xe(e),i=r.CustomEvent;typeof i==`function`?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 pt(e,t){return function(){return ft(this,e,t)}}function mt(e,t){return function(){return ft(this,e,t.apply(this,arguments))}}function ht(e,t){return this.each((typeof t==`function`?mt:pt)(e,t))}function*gt(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,a=r.length,o;i<a;++i)(o=r[i])&&(yield o)}var _t=[null];function K(e,t){this._groups=e,this._parents=t}function vt(){return new K([[document.documentElement]],_t)}function yt(){return this}K.prototype=vt.prototype={constructor:K,select:S,selectAll:D,selectChild:N,selectChildren:L,filter:R,data:ee,enter:B,exit:ne,join:re,merge:ie,selection:yt,order:ae,sort:oe,call:ce,nodes:le,node:ue,size:de,empty:fe,each:pe,attr:be,style:Te,property:Ae,classed:ze,text:Ue,html:qe,raise:Ye,lower:Ze,append:Qe,insert:et,remove:nt,clone:at,datum:ot,on:dt,dispatch:ht,[Symbol.iterator]:gt};function q(e){return typeof e==`string`?new K([[document.querySelector(e)]],[document.documentElement]):new K([[e]],_t)}function bt(e){let t;for(;t=e.sourceEvent;)e=t;return e}function J(e,t){if(e=bt(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}if(t.getBoundingClientRect){var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}}return[e.pageX,e.pageY]}var xt={passive:!1},St={capture:!0,passive:!1};function Ct(e){e.stopImmediatePropagation()}function wt(e){e.preventDefault(),e.stopImmediatePropagation()}function Tt(e){var t=e.document.documentElement,n=q(e).on(`dragstart.drag`,wt,St);`onselectstart`in t?n.on(`selectstart.drag`,wt,St):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect=`none`)}function Et(e,t){var n=e.document.documentElement,r=q(e).on(`dragstart.drag`,null);t&&(r.on(`click.drag`,wt,St),setTimeout(function(){r.on(`click.drag`,null)},0)),`onselectstart`in n?r.on(`selectstart.drag`,null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}var Dt=e=>()=>e;function Ot(e,{sourceEvent:t,subject:n,target:r,identifier:i,active:a,x:o,y:s,dx:c,dy:l,dispatch:u}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:a,enumerable:!0,configurable:!0},x:{value:o,enumerable:!0,configurable:!0},y:{value:s,enumerable:!0,configurable:!0},dx:{value:c,enumerable:!0,configurable:!0},dy:{value:l,enumerable:!0,configurable:!0},_:{value:u}})}Ot.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function kt(e){return!e.ctrlKey&&!e.button}function At(){return this.parentNode}function jt(e,t){return t??{x:e.x,y:e.y}}function Mt(){return navigator.maxTouchPoints||`ontouchstart`in this}function Nt(){var e=kt,t=At,n=jt,r=Mt,i={},a=u(`start`,`drag`,`end`),o=0,s,c,l,d,f=0;function p(e){e.on(`mousedown.drag`,m).filter(r).on(`touchstart.drag`,_).on(`touchmove.drag`,v,xt).on(`touchend.drag touchcancel.drag`,y).style(`touch-action`,`none`).style(`-webkit-tap-highlight-color`,`rgba(0,0,0,0)`)}function m(n,r){if(!(d||!e.call(this,n,r))){var i=b(this,t.call(this,n,r),n,r,`mouse`);i&&(q(n.view).on(`mousemove.drag`,h,St).on(`mouseup.drag`,g,St),Tt(n.view),Ct(n),l=!1,s=n.clientX,c=n.clientY,i(`start`,n))}}function h(e){if(wt(e),!l){var t=e.clientX-s,n=e.clientY-c;l=t*t+n*n>f}i.mouse(`drag`,e)}function g(e){q(e.view).on(`mousemove.drag mouseup.drag`,null),Et(e.view,l),wt(e),i.mouse(`end`,e)}function _(n,r){if(e.call(this,n,r)){var i=n.changedTouches,a=t.call(this,n,r),o=i.length,s,c;for(s=0;s<o;++s)(c=b(this,a,n,r,i[s].identifier,i[s]))&&(Ct(n),c(`start`,n,i[s]))}}function v(e){var t=e.changedTouches,n=t.length,r,a;for(r=0;r<n;++r)(a=i[t[r].identifier])&&(wt(e),a(`drag`,e,t[r]))}function y(e){var t=e.changedTouches,n=t.length,r,a;for(d&&clearTimeout(d),d=setTimeout(function(){d=null},500),r=0;r<n;++r)(a=i[t[r].identifier])&&(Ct(e),a(`end`,e,t[r]))}function b(e,t,r,s,c,l){var u=a.copy(),d=J(l||r,t),f,m,h;if((h=n.call(e,new Ot(`beforestart`,{sourceEvent:r,target:p,identifier:c,active:o,x:d[0],y:d[1],dx:0,dy:0,dispatch:u}),s))!=null)return f=h.x-d[0]||0,m=h.y-d[1]||0,function n(r,a,l){var g=d,_;switch(r){case`start`:i[c]=n,_=o++;break;case`end`:delete i[c],--o;case`drag`:d=J(l||a,t),_=o;break}u.call(r,e,new Ot(r,{sourceEvent:a,subject:h,target:p,identifier:c,active:_,x:d[0]+f,y:d[1]+m,dx:d[0]-g[0],dy:d[1]-g[1],dispatch:u}),s)}}return p.filter=function(t){return arguments.length?(e=typeof t==`function`?t:Dt(!!t),p):e},p.container=function(e){return arguments.length?(t=typeof e==`function`?e:Dt(e),p):t},p.subject=function(e){return arguments.length?(n=typeof e==`function`?e:Dt(e),p):n},p.touchable=function(e){return arguments.length?(r=typeof e==`function`?e:Dt(!!e),p):r},p.on=function(){var e=a.on.apply(a,arguments);return e===a?p:e},p.clickDistance=function(e){return arguments.length?(f=(e=+e)*e,p):Math.sqrt(f)},p}function Pt(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Ft(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function It(){}var Lt=.7,Rt=1/Lt,zt=`\\s*([+-]?\\d+)\\s*`,Bt=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*`,Vt=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*`,Ht=/^#([0-9a-f]{3,8})$/,Ut=RegExp(`^rgb\\(${zt},${zt},${zt}\\)$`),Wt=RegExp(`^rgb\\(${Vt},${Vt},${Vt}\\)$`),Gt=RegExp(`^rgba\\(${zt},${zt},${zt},${Bt}\\)$`),Kt=RegExp(`^rgba\\(${Vt},${Vt},${Vt},${Bt}\\)$`),qt=RegExp(`^hsl\\(${Bt},${Vt},${Vt}\\)$`),Jt=RegExp(`^hsla\\(${Bt},${Vt},${Vt},${Bt}\\)$`),Yt={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};Pt(It,en,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Xt,formatHex:Xt,formatHex8:Zt,formatHsl:Qt,formatRgb:$t,toString:$t});function Xt(){return this.rgb().formatHex()}function Zt(){return this.rgb().formatHex8()}function Qt(){return pn(this).formatHsl()}function $t(){return this.rgb().formatRgb()}function en(e){var t,n;return e=(e+``).trim().toLowerCase(),(t=Ht.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?tn(t):n===3?new Y(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?nn(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?nn(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=Ut.exec(e))?new Y(t[1],t[2],t[3],1):(t=Wt.exec(e))?new Y(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Gt.exec(e))?nn(t[1],t[2],t[3],t[4]):(t=Kt.exec(e))?nn(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=qt.exec(e))?fn(t[1],t[2]/100,t[3]/100,1):(t=Jt.exec(e))?fn(t[1],t[2]/100,t[3]/100,t[4]):Yt.hasOwnProperty(e)?tn(Yt[e]):e===`transparent`?new Y(NaN,NaN,NaN,0):null}function tn(e){return new Y(e>>16&255,e>>8&255,e&255,1)}function nn(e,t,n,r){return r<=0&&(e=t=n=NaN),new Y(e,t,n,r)}function rn(e){return e instanceof It||(e=en(e)),e?(e=e.rgb(),new Y(e.r,e.g,e.b,e.opacity)):new Y}function an(e,t,n,r){return arguments.length===1?rn(e):new Y(e,t,n,r??1)}function Y(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}Pt(Y,an,Ft(It,{brighter(e){return e=e==null?Rt:Rt**+e,new Y(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Lt:Lt**+e,new Y(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Y(un(this.r),un(this.g),un(this.b),ln(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:on,formatHex:on,formatHex8:sn,formatRgb:cn,toString:cn}));function on(){return`#${dn(this.r)}${dn(this.g)}${dn(this.b)}`}function sn(){return`#${dn(this.r)}${dn(this.g)}${dn(this.b)}${dn((isNaN(this.opacity)?1:this.opacity)*255)}`}function cn(){let e=ln(this.opacity);return`${e===1?`rgb(`:`rgba(`}${un(this.r)}, ${un(this.g)}, ${un(this.b)}${e===1?`)`:`, ${e})`}`}function ln(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function un(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function dn(e){return e=un(e),(e<16?`0`:``)+e.toString(16)}function fn(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new hn(e,t,n,r)}function pn(e){if(e instanceof hn)return new hn(e.h,e.s,e.l,e.opacity);if(e instanceof It||(e=en(e)),!e)return new hn;if(e instanceof hn)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=NaN,s=a-i,c=(a+i)/2;return s?(o=t===a?(n-r)/s+(n<r)*6:n===a?(r-t)/s+2:(t-n)/s+4,s/=c<.5?a+i:2-a-i,o*=60):s=c>0&&c<1?0:o,new hn(o,s,c,e.opacity)}function mn(e,t,n,r){return arguments.length===1?pn(e):new hn(e,t,n,r??1)}function hn(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Pt(hn,mn,Ft(It,{brighter(e){return e=e==null?Rt:Rt**+e,new hn(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Lt:Lt**+e,new hn(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,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 Y(vn(e>=240?e-240:e+120,i,r),vn(e,i,r),vn(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new hn(gn(this.h),_n(this.s),_n(this.l),ln(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let e=ln(this.opacity);return`${e===1?`hsl(`:`hsla(`}${gn(this.h)}, ${_n(this.s)*100}%, ${_n(this.l)*100}%${e===1?`)`:`, ${e})`}`}}));function gn(e){return e=(e||0)%360,e<0?e+360:e}function _n(e){return Math.max(0,Math.min(1,e||0))}function vn(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}var yn=e=>()=>e;function bn(e,t){return function(n){return e+n*t}}function xn(e,t,n){return e**=+n,t=t**+n-e,n=1/n,function(r){return(e+r*t)**+n}}function Sn(e){return(e=+e)==1?Cn:function(t,n){return n-t?xn(t,n,e):yn(isNaN(t)?n:t)}}function Cn(e,t){var n=t-e;return n?bn(e,n):yn(isNaN(e)?t:e)}var wn=(function e(t){var n=Sn(t);function r(e,t){var r=n((e=an(e)).r,(t=an(t)).r),i=n(e.g,t.g),a=n(e.b,t.b),o=Cn(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=a(t),e.opacity=o(t),e+``}}return r.gamma=e,r})(1);function Tn(e,t){t||=[];var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(a){for(i=0;i<n;++i)r[i]=e[i]*(1-a)+t[i]*a;return r}}function En(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Dn(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=Array(r),a=Array(n),o;for(o=0;o<r;++o)i[o]=In(e[o],t[o]);for(;o<n;++o)a[o]=t[o];return function(e){for(o=0;o<r;++o)a[o]=i[o](e);return a}}function On(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function kn(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function An(e,t){var n={},r={},i;for(i in(typeof e!=`object`||!e)&&(e={}),(typeof t!=`object`||!t)&&(t={}),t)i in e?n[i]=In(e[i],t[i]):r[i]=t[i];return function(e){for(i in n)r[i]=n[i](e);return r}}var jn=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Mn=new RegExp(jn.source,`g`);function Nn(e){return function(){return e}}function Pn(e){return function(t){return e(t)+``}}function Fn(e,t){var n=jn.lastIndex=Mn.lastIndex=0,r,i,a,o=-1,s=[],c=[];for(e+=``,t+=``;(r=jn.exec(e))&&(i=Mn.exec(t));)(a=i.index)>n&&(a=t.slice(n,a),s[o]?s[o]+=a:s[++o]=a),(r=r[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,c.push({i:o,x:kn(r,i)})),n=Mn.lastIndex;return n<t.length&&(a=t.slice(n),s[o]?s[o]+=a:s[++o]=a),s.length<2?c[0]?Pn(c[0].x):Nn(t):(t=c.length,function(e){for(var n=0,r;n<t;++n)s[(r=c[n]).i]=r.x(e);return s.join(``)})}function In(e,t){var n=typeof t,r;return t==null||n===`boolean`?yn(t):(n===`number`?kn:n===`string`?(r=en(t))?(t=r,wn):Fn:t instanceof en?wn:t instanceof Date?On:En(t)?Tn:Array.isArray(t)?Dn:typeof t.valueOf!=`function`&&typeof t.toString!=`function`||isNaN(t)?An:kn)(e,t)}var Ln=180/Math.PI,Rn={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function zn(e,t,n,r,i,a){var o,s,c;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(c=e*n+t*r)&&(n-=e*c,r-=t*c),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,c/=s),e*r<t*n&&(e=-e,t=-t,c=-c,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(t,e)*Ln,skewX:Math.atan(c)*Ln,scaleX:o,scaleY:s}}var Bn;function Vn(e){let t=new(typeof DOMMatrix==`function`?DOMMatrix:WebKitCSSMatrix)(e+``);return t.isIdentity?Rn:zn(t.a,t.b,t.c,t.d,t.e,t.f)}function Hn(e){return e==null||(Bn||=document.createElementNS(`http://www.w3.org/2000/svg`,`g`),Bn.setAttribute(`transform`,e),!(e=Bn.transform.baseVal.consolidate()))?Rn:(e=e.matrix,zn(e.a,e.b,e.c,e.d,e.e,e.f))}function Un(e,t,n,r){function i(e){return e.length?e.pop()+` `:``}function a(e,r,i,a,o,s){if(e!==i||r!==a){var c=o.push(`translate(`,null,t,null,n);s.push({i:c-4,x:kn(e,i)},{i:c-2,x:kn(r,a)})}else (i||a)&&o.push(`translate(`+i+t+a+n)}function o(e,t,n,a){e===t?t&&n.push(i(n)+`rotate(`+t+r):(e-t>180?t+=360:t-e>180&&(e+=360),a.push({i:n.push(i(n)+`rotate(`,null,r)-2,x:kn(e,t)}))}function s(e,t,n,a){e===t?t&&n.push(i(n)+`skewX(`+t+r):a.push({i:n.push(i(n)+`skewX(`,null,r)-2,x:kn(e,t)})}function c(e,t,n,r,a,o){if(e!==n||t!==r){var s=a.push(i(a)+`scale(`,null,`,`,null,`)`);o.push({i:s-4,x:kn(e,n)},{i:s-2,x:kn(t,r)})}else (n!==1||r!==1)&&a.push(i(a)+`scale(`+n+`,`+r+`)`)}return function(t,n){var r=[],i=[];return t=e(t),n=e(n),a(t.translateX,t.translateY,n.translateX,n.translateY,r,i),o(t.rotate,n.rotate,r,i),s(t.skewX,n.skewX,r,i),c(t.scaleX,t.scaleY,n.scaleX,n.scaleY,r,i),t=n=null,function(e){for(var t=-1,n=i.length,a;++t<n;)r[(a=i[t]).i]=a.x(e);return r.join(``)}}}var Wn=Un(Vn,`px, `,`px)`,`deg)`),Gn=Un(Hn,`, `,`)`,`)`),Kn=1e-12;function qn(e){return((e=Math.exp(e))+1/e)/2}function Jn(e){return((e=Math.exp(e))-1/e)/2}function Yn(e){return((e=Math.exp(2*e))-1)/(e+1)}var Xn=(function e(t,n,r){function i(e,i){var a=e[0],o=e[1],s=e[2],c=i[0],l=i[1],u=i[2],d=c-a,f=l-o,p=d*d+f*f,m,h;if(p<Kn)h=Math.log(u/s)/t,m=function(e){return[a+e*d,o+e*f,s*Math.exp(t*e*h)]};else{var g=Math.sqrt(p),_=(u*u-s*s+r*p)/(2*s*n*g),v=(u*u-s*s-r*p)/(2*u*n*g),y=Math.log(Math.sqrt(_*_+1)-_);h=(Math.log(Math.sqrt(v*v+1)-v)-y)/t,m=function(e){var r=e*h,i=qn(y),c=s/(n*g)*(i*Yn(t*r+y)-Jn(y));return[a+c*d,o+c*f,s*i/qn(t*r+y)]}}return m.duration=h*1e3*t/Math.SQRT2,m}return i.rho=function(t){var n=Math.max(.001,+t),r=n*n;return e(n,r,r*r)},i})(Math.SQRT2,2,4),Zn=0,Qn=0,$n=0,er=1e3,tr,nr,rr=0,ir=0,ar=0,or=typeof performance==`object`&&performance.now?performance:Date,sr=typeof window==`object`&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function cr(){return ir||=(sr(lr),or.now()+ar)}function lr(){ir=0}function ur(){this._call=this._time=this._next=null}ur.prototype=dr.prototype={constructor:ur,restart:function(e,t,n){if(typeof e!=`function`)throw TypeError(`callback is not a function`);n=(n==null?cr():+n)+(t==null?0:+t),!this._next&&nr!==this&&(nr?nr._next=this:tr=this,nr=this),this._call=e,this._time=n,gr()},stop:function(){this._call&&(this._call=null,this._time=1/0,gr())}};function dr(e,t,n){var r=new ur;return r.restart(e,t,n),r}function fr(){cr(),++Zn;for(var e=tr,t;e;)(t=ir-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Zn}function pr(){ir=(rr=or.now())+ar,Zn=Qn=0;try{fr()}finally{Zn=0,hr(),ir=0}}function mr(){var e=or.now(),t=e-rr;t>er&&(ar-=t,rr=e)}function hr(){for(var e,t=tr,n,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:tr=n);nr=e,gr(r)}function gr(e){Zn||(Qn&&=clearTimeout(Qn),e-ir>24?(e<1/0&&(Qn=setTimeout(pr,e-or.now()-ar)),$n&&=clearInterval($n)):($n||=(rr=or.now(),setInterval(mr,er)),Zn=1,sr(pr)))}function _r(e,t,n){var r=new ur;return t=t==null?0:+t,r.restart(n=>{r.stop(),e(n+t)},t,n),r}var vr=u(`start`,`end`,`cancel`,`interrupt`),yr=[];function br(e,t,n,r,i,a){var o=e.__transition;if(!o)e.__transition={};else if(n in o)return;wr(e,n,{name:t,index:r,group:i,on:vr,tween:yr,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:0})}function xr(e,t){var n=Cr(e,t);if(n.state>0)throw Error(`too late; already scheduled`);return n}function Sr(e,t){var n=Cr(e,t);if(n.state>3)throw Error(`too late; already running`);return n}function Cr(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw Error(`transition not found`);return n}function wr(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=dr(a,0,n.time);function a(e){n.state=1,n.timer.restart(o,n.delay,n.time),n.delay<=e&&o(e-n.delay)}function o(a){var l,u,d,f;if(n.state!==1)return c();for(l in r)if(f=r[l],f.name===n.name){if(f.state===3)return _r(o);f.state===4?(f.state=6,f.timer.stop(),f.on.call(`interrupt`,e,e.__data__,f.index,f.group),delete r[l]):+l<t&&(f.state=6,f.timer.stop(),f.on.call(`cancel`,e,e.__data__,f.index,f.group),delete r[l])}if(_r(function(){n.state===3&&(n.state=4,n.timer.restart(s,n.delay,n.time),s(a))}),n.state=2,n.on.call(`start`,e,e.__data__,n.index,n.group),n.state===2){for(n.state=3,i=Array(d=n.tween.length),l=0,u=-1;l<d;++l)(f=n.tween[l].value.call(e,e.__data__,n.index,n.group))&&(i[++u]=f);i.length=u+1}}function s(t){for(var r=t<n.duration?n.ease.call(null,t/n.duration):(n.timer.restart(c),n.state=5,1),a=-1,o=i.length;++a<o;)i[a].call(e,r);n.state===5&&(n.on.call(`end`,e,e.__data__,n.index,n.group),c())}function c(){for(var i in n.state=6,n.timer.stop(),delete r[t],r)return;delete e.__transition}}function Tr(e,t){var n=e.__transition,r,i,a=!0,o;if(n){for(o in t=t==null?null:t+``,n){if((r=n[o]).name!==t){a=!1;continue}i=r.state>2&&r.state<5,r.state=6,r.timer.stop(),r.on.call(i?`interrupt`:`cancel`,e,e.__data__,r.index,r.group),delete n[o]}a&&delete e.__transition}}function Er(e){return this.each(function(){Tr(this,e)})}function Dr(e,t){var n,r;return function(){var i=Sr(this,e),a=i.tween;if(a!==n){r=n=a;for(var o=0,s=r.length;o<s;++o)if(r[o].name===t){r=r.slice(),r.splice(o,1);break}}i.tween=r}}function Or(e,t,n){var r,i;if(typeof n!=`function`)throw Error();return function(){var a=Sr(this,e),o=a.tween;if(o!==r){i=(r=o).slice();for(var s={name:t,value:n},c=0,l=i.length;c<l;++c)if(i[c].name===t){i[c]=s;break}c===l&&i.push(s)}a.tween=i}}function kr(e,t){var n=this._id;if(e+=``,arguments.length<2){for(var r=Cr(this.node(),n).tween,i=0,a=r.length,o;i<a;++i)if((o=r[i]).name===e)return o.value;return null}return this.each((t==null?Dr:Or)(n,e,t))}function Ar(e,t,n){var r=e._id;return e.each(function(){var e=Sr(this,r);(e.value||={})[t]=n.apply(this,arguments)}),function(e){return Cr(e,r).value[t]}}function jr(e,t){var n;return(typeof t==`number`?kn:t instanceof en?wn:(n=en(t))?(t=n,wn):Fn)(e,t)}function Mr(e){return function(){this.removeAttribute(e)}}function Nr(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Pr(e,t,n){var r,i=n+``,a;return function(){var o=this.getAttribute(e);return o===i?null:o===r?a:a=t(r=o,n)}}function Fr(e,t,n){var r,i=n+``,a;return function(){var o=this.getAttributeNS(e.space,e.local);return o===i?null:o===r?a:a=t(r=o,n)}}function Ir(e,t,n){var r,i,a;return function(){var o,s=n(this),c;return s==null?void this.removeAttribute(e):(o=this.getAttribute(e),c=s+``,o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,s)))}}function Lr(e,t,n){var r,i,a;return function(){var o,s=n(this),c;return s==null?void this.removeAttributeNS(e.space,e.local):(o=this.getAttributeNS(e.space,e.local),c=s+``,o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,s)))}}function Rr(e,t){var n=g(e),r=n===`transform`?Gn:jr;return this.attrTween(e,typeof t==`function`?(n.local?Lr:Ir)(n,r,Ar(this,`attr.`+e,t)):t==null?(n.local?Nr:Mr)(n):(n.local?Fr:Pr)(n,r,t))}function zr(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function Br(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function Vr(e,t){var n,r;function i(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&Br(e,i)),n}return i._value=t,i}function Hr(e,t){var n,r;function i(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&zr(e,i)),n}return i._value=t,i}function Ur(e,t){var n=`attr.`+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!=`function`)throw Error();var r=g(e);return this.tween(n,(r.local?Vr:Hr)(r,t))}function Wr(e,t){return function(){xr(this,e).delay=+t.apply(this,arguments)}}function Gr(e,t){return t=+t,function(){xr(this,e).delay=t}}function Kr(e){var t=this._id;return arguments.length?this.each((typeof e==`function`?Wr:Gr)(t,e)):Cr(this.node(),t).delay}function qr(e,t){return function(){Sr(this,e).duration=+t.apply(this,arguments)}}function Jr(e,t){return t=+t,function(){Sr(this,e).duration=t}}function Yr(e){var t=this._id;return arguments.length?this.each((typeof e==`function`?qr:Jr)(t,e)):Cr(this.node(),t).duration}function Xr(e,t){if(typeof t!=`function`)throw Error();return function(){Sr(this,e).ease=t}}function Zr(e){var t=this._id;return arguments.length?this.each(Xr(t,e)):Cr(this.node(),t).ease}function Qr(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!=`function`)throw Error();Sr(this,e).ease=n}}function $r(e){if(typeof e!=`function`)throw Error();return this.each(Qr(this._id,e))}function ei(e){typeof e!=`function`&&(e=O(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,s=r[i]=[],c,l=0;l<o;++l)(c=a[l])&&e.call(c,c.__data__,l,a)&&s.push(c);return new ki(r,this._parents,this._name,this._id)}function ti(e){if(e._id!==this._id)throw Error();for(var t=this._groups,n=e._groups,r=t.length,i=n.length,a=Math.min(r,i),o=Array(r),s=0;s<a;++s)for(var c=t[s],l=n[s],u=c.length,d=o[s]=Array(u),f,p=0;p<u;++p)(f=c[p]||l[p])&&(d[p]=f);for(;s<r;++s)o[s]=t[s];return new ki(o,this._parents,this._name,this._id)}function ni(e){return(e+``).trim().split(/^|\s+/).every(function(e){var t=e.indexOf(`.`);return t>=0&&(e=e.slice(0,t)),!e||e===`start`})}function ri(e,t,n){var r,i,a=ni(t)?xr:Sr;return function(){var o=a(this,e),s=o.on;s!==r&&(i=(r=s).copy()).on(t,n),o.on=i}}function ii(e,t){var n=this._id;return arguments.length<2?Cr(this.node(),n).on.on(e):this.each(ri(n,e,t))}function ai(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function oi(){return this.on(`end.remove`,ai(this._id))}function si(e){var t=this._name,n=this._id;typeof e!=`function`&&(e=x(e));for(var r=this._groups,i=r.length,a=Array(i),o=0;o<i;++o)for(var s=r[o],c=s.length,l=a[o]=Array(c),u,d,f=0;f<c;++f)(u=s[f])&&(d=e.call(u,u.__data__,f,s))&&(`__data__`in u&&(d.__data__=u.__data__),l[f]=d,br(l[f],t,n,f,l,Cr(u,n)));return new ki(a,this._parents,t,n)}function ci(e){var t=this._name,n=this._id;typeof e!=`function`&&(e=T(e));for(var r=this._groups,i=r.length,a=[],o=[],s=0;s<i;++s)for(var c=r[s],l=c.length,u,d=0;d<l;++d)if(u=c[d]){for(var f=e.call(u,u.__data__,d,c),p,m=Cr(u,n),h=0,g=f.length;h<g;++h)(p=f[h])&&br(p,t,n,h,f,m);a.push(f),o.push(u)}return new ki(a,o,t,n)}var li=vt.prototype.constructor;function ui(){return new li(this._groups,this._parents)}function di(e,t){var n,r,i;return function(){var a=Ee(this,e),o=(this.style.removeProperty(e),Ee(this,e));return a===o?null:a===n&&o===r?i:i=t(n=a,r=o)}}function fi(e){return function(){this.style.removeProperty(e)}}function pi(e,t,n){var r,i=n+``,a;return function(){var o=Ee(this,e);return o===i?null:o===r?a:a=t(r=o,n)}}function mi(e,t,n){var r,i,a;return function(){var o=Ee(this,e),s=n(this),c=s+``;return s??(c=s=(this.style.removeProperty(e),Ee(this,e))),o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,s))}}function hi(e,t){var n,r,i,a=`style.`+t,o=`end.`+a,s;return function(){var c=Sr(this,e),l=c.on,u=c.value[a]==null?s||=fi(t):void 0;(l!==n||i!==u)&&(r=(n=l).copy()).on(o,i=u),c.on=r}}function gi(e,t,n){var r=(e+=``)==`transform`?Wn:jr;return t==null?this.styleTween(e,di(e,r)).on(`end.style.`+e,fi(e)):typeof t==`function`?this.styleTween(e,mi(e,r,Ar(this,`style.`+e,t))).each(hi(this._id,e)):this.styleTween(e,pi(e,r,t),n).on(`end.style.`+e,null)}function _i(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function vi(e,t,n){var r,i;function a(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&_i(e,a,n)),r}return a._value=t,a}function yi(e,t,n){var r=`style.`+(e+=``);if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!=`function`)throw Error();return this.tween(r,vi(e,t,n??``))}function bi(e){return function(){this.textContent=e}}function xi(e){return function(){this.textContent=e(this)??``}}function Si(e){return this.tween(`text`,typeof e==`function`?xi(Ar(this,`text`,e)):bi(e==null?``:e+``))}function Ci(e){return function(t){this.textContent=e.call(this,t)}}function wi(e){var t,n;function r(){var r=e.apply(this,arguments);return r!==n&&(t=(n=r)&&Ci(r)),t}return r._value=e,r}function Ti(e){var t=`text`;if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!=`function`)throw Error();return this.tween(t,wi(e))}function Ei(){for(var e=this._name,t=this._id,n=ji(),r=this._groups,i=r.length,a=0;a<i;++a)for(var o=r[a],s=o.length,c,l=0;l<s;++l)if(c=o[l]){var u=Cr(c,t);br(c,e,n,l,o,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new ki(r,this._parents,e,n)}function Di(){var e,t,n=this,r=n._id,i=n.size();return new Promise(function(a,o){var s={value:o},c={value:function(){--i===0&&a()}};n.each(function(){var n=Sr(this,r),i=n.on;i!==e&&(t=(e=i).copy(),t._.cancel.push(s),t._.interrupt.push(s),t._.end.push(c)),n.on=t}),i===0&&a()})}var Oi=0;function ki(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function Ai(e){return vt().transition(e)}function ji(){return++Oi}var Mi=vt.prototype;ki.prototype=Ai.prototype={constructor:ki,select:si,selectAll:ci,selectChild:Mi.selectChild,selectChildren:Mi.selectChildren,filter:ei,merge:ti,selection:ui,transition:Ei,call:Mi.call,nodes:Mi.nodes,node:Mi.node,size:Mi.size,empty:Mi.empty,each:Mi.each,on:ii,attr:Rr,attrTween:Ur,style:gi,styleTween:yi,text:Si,textTween:Ti,remove:oi,tween:kr,delay:Kr,duration:Yr,ease:Zr,easeVarying:$r,end:Di,[Symbol.iterator]:Mi[Symbol.iterator]};function Ni(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var Pi={time:null,delay:0,duration:250,ease:Ni};function Fi(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw Error(`transition ${t} not found`);return n}function Ii(e){var t,n;e instanceof ki?(t=e._id,e=e._name):(t=ji(),(n=Pi).time=cr(),e=e==null?null:e+``);for(var r=this._groups,i=r.length,a=0;a<i;++a)for(var o=r[a],s=o.length,c,l=0;l<s;++l)(c=o[l])&&br(c,e,t,l,o,n||Fi(c,t));return new ki(r,this._parents,e,t)}vt.prototype.interrupt=Er,vt.prototype.transition=Ii;var Li=e=>()=>e;function Ri(e,{sourceEvent:t,target:n,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function zi(e,t,n){this.k=e,this.x=t,this.y=n}zi.prototype={constructor:zi,scale:function(e){return e===1?this:new zi(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new zi(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 Bi=new zi(1,0,0);Vi.prototype=zi.prototype;function Vi(e){for(;!e.__zoom;)if(!(e=e.parentNode))return Bi;return e.__zoom}function Hi(e){e.stopImmediatePropagation()}function Ui(e){e.preventDefault(),e.stopImmediatePropagation()}function Wi(e){return(!e.ctrlKey||e.type===`wheel`)&&!e.button}function Gi(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute(`viewBox`)?(e=e.viewBox.baseVal,[[e.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 Ki(){return this.__zoom||Bi}function qi(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function Ji(){return navigator.maxTouchPoints||`ontouchstart`in this}function Yi(e,t,n){var r=e.invertX(t[0][0])-n[0][0],i=e.invertX(t[1][0])-n[1][0],a=e.invertY(t[0][1])-n[0][1],o=e.invertY(t[1][1])-n[1][1];return e.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),o>a?(a+o)/2:Math.min(0,a)||Math.max(0,o))}function Xi(){var e=Wi,t=Gi,n=Yi,r=qi,i=Ji,a=[0,1/0],o=[[-1/0,-1/0],[1/0,1/0]],s=250,c=Xn,l=u(`start`,`zoom`,`end`),d,f,p,m=500,h=150,g=0,_=10;function v(e){e.property(`__zoom`,Ki).on(`wheel.zoom`,T,{passive:!1}).on(`mousedown.zoom`,E).on(`dblclick.zoom`,D).filter(i).on(`touchstart.zoom`,O).on(`touchmove.zoom`,k).on(`touchend.zoom touchcancel.zoom`,A).style(`-webkit-tap-highlight-color`,`rgba(0,0,0,0)`)}v.transform=function(e,t,n,r){var i=e.selection?e.selection():e;i.property(`__zoom`,Ki),e===i?i.interrupt().each(function(){C(this,arguments).event(r).start().zoom(null,typeof t==`function`?t.apply(this,arguments):t).end()}):S(e,t,n,r)},v.scaleBy=function(e,t,n,r){v.scaleTo(e,function(){return this.__zoom.k*(typeof t==`function`?t.apply(this,arguments):t)},n,r)},v.scaleTo=function(e,r,i,a){v.transform(e,function(){var e=t.apply(this,arguments),a=this.__zoom,s=i==null?x(e):typeof i==`function`?i.apply(this,arguments):i,c=a.invert(s),l=typeof r==`function`?r.apply(this,arguments):r;return n(b(y(a,l),s,c),e,o)},i,a)},v.translateBy=function(e,r,i,a){v.transform(e,function(){return n(this.__zoom.translate(typeof r==`function`?r.apply(this,arguments):r,typeof i==`function`?i.apply(this,arguments):i),t.apply(this,arguments),o)},null,a)},v.translateTo=function(e,r,i,a,s){v.transform(e,function(){var e=t.apply(this,arguments),s=this.__zoom,c=a==null?x(e):typeof a==`function`?a.apply(this,arguments):a;return n(Bi.translate(c[0],c[1]).scale(s.k).translate(typeof r==`function`?-r.apply(this,arguments):-r,typeof i==`function`?-i.apply(this,arguments):-i),e,o)},a,s)};function y(e,t){return t=Math.max(a[0],Math.min(a[1],t)),t===e.k?e:new zi(t,e.x,e.y)}function b(e,t,n){var r=t[0]-n[0]*e.k,i=t[1]-n[1]*e.k;return r===e.x&&i===e.y?e:new zi(e.k,r,i)}function x(e){return[(+e[0][0]+ +e[1][0])/2,(+e[0][1]+ +e[1][1])/2]}function S(e,n,r,i){e.on(`start.zoom`,function(){C(this,arguments).event(i).start()}).on(`interrupt.zoom end.zoom`,function(){C(this,arguments).event(i).end()}).tween(`zoom`,function(){var e=this,a=arguments,o=C(e,a).event(i),s=t.apply(e,a),l=r==null?x(s):typeof r==`function`?r.apply(e,a):r,u=Math.max(s[1][0]-s[0][0],s[1][1]-s[0][1]),d=e.__zoom,f=typeof n==`function`?n.apply(e,a):n,p=c(d.invert(l).concat(u/d.k),f.invert(l).concat(u/f.k));return function(e){if(e===1)e=f;else{var t=p(e),n=u/t[2];e=new zi(n,l[0]-t[0]*n,l[1]-t[1]*n)}o.zoom(null,e)}})}function C(e,t,n){return!n&&e.__zooming||new w(e,t)}function w(e,n){this.that=e,this.args=n,this.active=0,this.sourceEvent=null,this.extent=t.apply(e,n),this.taps=0}w.prototype={event:function(e){return e&&(this.sourceEvent=e),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit(`start`)),this},zoom:function(e,t){return this.mouse&&e!==`mouse`&&(this.mouse[1]=t.invert(this.mouse[0])),this.touch0&&e!==`touch`&&(this.touch0[1]=t.invert(this.touch0[0])),this.touch1&&e!==`touch`&&(this.touch1[1]=t.invert(this.touch1[0])),this.that.__zoom=t,this.emit(`zoom`),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit(`end`)),this},emit:function(e){var t=q(this.that).datum();l.call(e,this.that,new Ri(e,{sourceEvent:this.sourceEvent,target:v,type:e,transform:this.that.__zoom,dispatch:l}),t)}};function T(t,...i){if(!e.apply(this,arguments))return;var s=C(this,i).event(t),c=this.__zoom,l=Math.max(a[0],Math.min(a[1],c.k*2**r.apply(this,arguments))),u=J(t);if(s.wheel)(s.mouse[0][0]!==u[0]||s.mouse[0][1]!==u[1])&&(s.mouse[1]=c.invert(s.mouse[0]=u)),clearTimeout(s.wheel);else if(c.k===l)return;else s.mouse=[u,c.invert(u)],Tr(this),s.start();Ui(t),s.wheel=setTimeout(d,h),s.zoom(`mouse`,n(b(y(c,l),s.mouse[0],s.mouse[1]),s.extent,o));function d(){s.wheel=null,s.end()}}function E(t,...r){if(p||!e.apply(this,arguments))return;var i=t.currentTarget,a=C(this,r,!0).event(t),s=q(t.view).on(`mousemove.zoom`,d,!0).on(`mouseup.zoom`,f,!0),c=J(t,i),l=t.clientX,u=t.clientY;Tt(t.view),Hi(t),a.mouse=[c,this.__zoom.invert(c)],Tr(this),a.start();function d(e){if(Ui(e),!a.moved){var t=e.clientX-l,r=e.clientY-u;a.moved=t*t+r*r>g}a.event(e).zoom(`mouse`,n(b(a.that.__zoom,a.mouse[0]=J(e,i),a.mouse[1]),a.extent,o))}function f(e){s.on(`mousemove.zoom mouseup.zoom`,null),Et(e.view,a.moved),Ui(e),a.event(e).end()}}function D(r,...i){if(e.apply(this,arguments)){var a=this.__zoom,c=J(r.changedTouches?r.changedTouches[0]:r,this),l=a.invert(c),u=a.k*(r.shiftKey?.5:2),d=n(b(y(a,u),c,l),t.apply(this,i),o);Ui(r),s>0?q(this).transition().duration(s).call(S,d,c,r):q(this).call(v.transform,d,c,r)}}function O(t,...n){if(e.apply(this,arguments)){var r=t.touches,i=r.length,a=C(this,n,t.changedTouches.length===i).event(t),o,s,c,l;for(Hi(t),s=0;s<i;++s)c=r[s],l=J(c,this),l=[l,this.__zoom.invert(l),c.identifier],a.touch0?!a.touch1&&a.touch0[2]!==l[2]&&(a.touch1=l,a.taps=0):(a.touch0=l,o=!0,a.taps=1+!!d);d&&=clearTimeout(d),o&&(a.taps<2&&(f=l[0],d=setTimeout(function(){d=null},m)),Tr(this),a.start())}}function k(e,...t){if(this.__zooming){var r=C(this,t).event(e),i=e.changedTouches,a=i.length,s,c,l,u;for(Ui(e),s=0;s<a;++s)c=i[s],l=J(c,this),r.touch0&&r.touch0[2]===c.identifier?r.touch0[0]=l:r.touch1&&r.touch1[2]===c.identifier&&(r.touch1[0]=l);if(c=r.that.__zoom,r.touch1){var d=r.touch0[0],f=r.touch0[1],p=r.touch1[0],m=r.touch1[1],h=(h=p[0]-d[0])*h+(h=p[1]-d[1])*h,g=(g=m[0]-f[0])*g+(g=m[1]-f[1])*g;c=y(c,Math.sqrt(h/g)),l=[(d[0]+p[0])/2,(d[1]+p[1])/2],u=[(f[0]+m[0])/2,(f[1]+m[1])/2]}else if(r.touch0)l=r.touch0[0],u=r.touch0[1];else return;r.zoom(`touch`,n(b(c,l,u),r.extent,o))}}function A(e,...t){if(this.__zooming){var n=C(this,t).event(e),r=e.changedTouches,i=r.length,a,o;for(Hi(e),p&&clearTimeout(p),p=setTimeout(function(){p=null},m),a=0;a<i;++a)o=r[a],n.touch0&&n.touch0[2]===o.identifier?delete n.touch0:n.touch1&&n.touch1[2]===o.identifier&&delete n.touch1;if(n.touch1&&!n.touch0&&(n.touch0=n.touch1,delete n.touch1),n.touch0)n.touch0[1]=this.__zoom.invert(n.touch0[0]);else if(n.end(),n.taps===2&&(o=J(o,this),Math.hypot(f[0]-o[0],f[1]-o[1])<_)){var s=q(this).on(`dblclick.zoom`);s&&s.apply(this,arguments)}}}return v.wheelDelta=function(e){return arguments.length?(r=typeof e==`function`?e:Li(+e),v):r},v.filter=function(t){return arguments.length?(e=typeof t==`function`?t:Li(!!t),v):e},v.touchable=function(e){return arguments.length?(i=typeof e==`function`?e:Li(!!e),v):i},v.extent=function(e){return arguments.length?(t=typeof e==`function`?e:Li([[+e[0][0],+e[0][1]],[+e[1][0],+e[1][1]]]),v):t},v.scaleExtent=function(e){return arguments.length?(a[0]=+e[0],a[1]=+e[1],v):[a[0],a[1]]},v.translateExtent=function(e){return arguments.length?(o[0][0]=+e[0][0],o[1][0]=+e[1][0],o[0][1]=+e[0][1],o[1][1]=+e[1][1],v):[[o[0][0],o[0][1]],[o[1][0],o[1][1]]]},v.constrain=function(e){return arguments.length?(n=e,v):n},v.duration=function(e){return arguments.length?(s=+e,v):s},v.interpolate=function(e){return arguments.length?(c=e,v):c},v.on=function(){var e=l.on.apply(l,arguments);return e===l?v:e},v.clickDistance=function(e){return arguments.length?(g=(e=+e)*e,v):Math.sqrt(g)},v.tapDistance=function(e){return arguments.length?(_=+e,v):_},v}var Zi={error001:()=>`[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.dev/error#001`,error002:()=>`It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.`,error003:e=>`Node type "${e}" not found. Using fallback type "default".`,error004:()=>`The React Flow parent container needs a width and a height to render the graph.`,error005:()=>`Only child nodes can use a parent extent.`,error006:()=>`Can't create edge. An edge needs a source and a target.`,error007:e=>`The old edge with id=${e} does not exist.`,error009:e=>`Marker type "${e}" doesn't exist.`,error008:(e,{id:t,sourceHandle:n,targetHandle:r})=>`Couldn't create edge for ${e} handle id: "${e===`source`?n:r}", edge id: ${t}.`,error010:()=>`Handle: No node id found. Make sure to only use a Handle inside a custom Node.`,error011:e=>`Edge type "${e}" not found. Using fallback type "default".`,error012:e=>`Node with id "${e}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(e=`react`)=>`It seems that you haven't loaded the styles. Please import '@xyflow/${e}/dist/style.css' or base.css to make sure everything is working properly.`,error014:()=>`useNodeConnections: No node ID found. Call useNodeConnections inside a custom Node or provide a node ID.`,error015:()=>`It seems that you are trying to drag a node that is not initialized. Please use onNodesChange as explained in the docs.`},Qi=[[-1/0,-1/0],[1/0,1/0]],$i=[`Enter`,` `,`Escape`],ea={"node.a11yDescription.default":`Press enter or space to select a node. Press delete to remove it and escape to cancel.`,"node.a11yDescription.keyboardDisabled":`Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.`,"node.a11yDescription.ariaLiveMessage":({direction:e,x:t,y:n})=>`Moved selected node ${e}. New position, x: ${t}, y: ${n}`,"edge.a11yDescription.default":`Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.`,"controls.ariaLabel":`Control Panel`,"controls.zoomIn.ariaLabel":`Zoom In`,"controls.zoomOut.ariaLabel":`Zoom Out`,"controls.fitView.ariaLabel":`Fit View`,"controls.interactive.ariaLabel":`Toggle Interactivity`,"minimap.ariaLabel":`Mini Map`,"handle.ariaLabel":`Handle`},ta;(function(e){e.Strict=`strict`,e.Loose=`loose`})(ta||={});var na;(function(e){e.Free=`free`,e.Vertical=`vertical`,e.Horizontal=`horizontal`})(na||={});var ra;(function(e){e.Partial=`partial`,e.Full=`full`})(ra||={});var ia={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null},aa;(function(e){e.Bezier=`default`,e.Straight=`straight`,e.Step=`step`,e.SmoothStep=`smoothstep`,e.SimpleBezier=`simplebezier`})(aa||={});var oa;(function(e){e.Arrow=`arrow`,e.ArrowClosed=`arrowclosed`})(oa||={});var X;(function(e){e.Left=`left`,e.Top=`top`,e.Right=`right`,e.Bottom=`bottom`})(X||={});var sa={[X.Left]:X.Right,[X.Right]:X.Left,[X.Top]:X.Bottom,[X.Bottom]:X.Top};function ca(e){return e===null?null:e?`valid`:`invalid`}var la=e=>`id`in e&&`source`in e&&`target`in e,ua=e=>`id`in e&&`position`in e&&!(`source`in e)&&!(`target`in e),da=e=>`id`in e&&`internals`in e&&!(`source`in e)&&!(`target`in e),fa=(e,t=[0,0])=>{let{width:n,height:r}=Ga(e),i=e.origin??t,a=n*i[0],o=r*i[1];return{x:e.position.x-a,y:e.position.y-o}},pa=(e,t={nodeOrigin:[0,0]})=>e.length===0?{x:0,y:0,width:0,height:0}:Oa(e.reduce((e,n)=>{let r=typeof n==`string`,i=!t.nodeLookup&&!r?n:void 0;return t.nodeLookup&&(i=r?t.nodeLookup.get(n):da(n)?n:t.nodeLookup.get(n.id)),Ea(e,i?Aa(i,t.nodeOrigin):{x:0,y:0,x2:0,y2:0})},{x:1/0,y:1/0,x2:-1/0,y2:-1/0})),ma=(e,t={})=>{let n={x:1/0,y:1/0,x2:-1/0,y2:-1/0},r=!1;return e.forEach(e=>{(t.filter===void 0||t.filter(e))&&(n=Ea(n,Aa(e)),r=!0)}),r?Oa(n):{x:0,y:0,width:0,height:0}},ha=(e,t,[n,r,i]=[0,0,1],a=!1,o=!1)=>{let s={...La(t,[n,r,i]),width:t.width/i,height:t.height/i},c=[];for(let t of e.values()){let{measured:e,selectable:n=!0,hidden:r=!1}=t;if(o&&!n||r)continue;let i=e.width??t.width??t.initialWidth??null,l=e.height??t.height??t.initialHeight??null,u=Ma(s,ka(t)),d=(i??0)*(l??0),f=a&&u>0;(!t.internals.handleBounds||f||u>=d||t.dragging)&&c.push(t)}return c},ga=(e,t)=>{let n=new Set;return e.forEach(e=>{n.add(e.id)}),t.filter(e=>n.has(e.source)||n.has(e.target))};function _a(e,t){let n=new Map,r=t?.nodes?new Set(t.nodes.map(e=>e.id)):null;return e.forEach(e=>{e.measured.width&&e.measured.height&&(t?.includeHiddenNodes||!e.hidden)&&(!r||r.has(e.id))&&n.set(e.id,e)}),n}async function va({nodes:e,width:t,height:n,panZoom:r,minZoom:i,maxZoom:a},o){if(e.size===0)return Promise.resolve(!0);let s=Ha(ma(_a(e,o)),t,n,o?.minZoom??i,o?.maxZoom??a,o?.padding??.1);return await r.setViewport(s,{duration:o?.duration,ease:o?.ease,interpolate:o?.interpolate}),Promise.resolve(!0)}function ya({nodeId:e,nextPosition:t,nodeLookup:n,nodeOrigin:r=[0,0],nodeExtent:i,onError:a}){let o=n.get(e),s=o.parentId?n.get(o.parentId):void 0,{x:c,y:l}=s?s.internals.positionAbsolute:{x:0,y:0},u=o.origin??r,d=o.extent||i;if(o.extent===`parent`&&!o.expandParent)if(!s)a?.(`005`,Zi.error005());else{let e=s.measured.width,t=s.measured.height;e&&t&&(d=[[c,l],[c+e,l+t]])}else s&&Wa(o.extent)&&(d=[[o.extent[0][0]+c,o.extent[0][1]+l],[o.extent[1][0]+c,o.extent[1][1]+l]]);let f=Wa(d)?Sa(t,d,o.measured):t;return(o.measured.width===void 0||o.measured.height===void 0)&&a?.(`015`,Zi.error015()),{position:{x:f.x-c+(o.measured.width??0)*u[0],y:f.y-l+(o.measured.height??0)*u[1]},positionAbsolute:f}}async function ba({nodesToRemove:e=[],edgesToRemove:t=[],nodes:n,edges:r,onBeforeDelete:i}){let a=new Set(e.map(e=>e.id)),o=[];for(let e of n){if(e.deletable===!1)continue;let t=a.has(e.id),n=!t&&e.parentId&&o.find(t=>t.id===e.parentId);(t||n)&&o.push(e)}let s=new Set(t.map(e=>e.id)),c=r.filter(e=>e.deletable!==!1),l=ga(o,c);for(let e of c)s.has(e.id)&&!l.find(t=>t.id===e.id)&&l.push(e);if(!i)return{edges:l,nodes:o};let u=await i({nodes:o,edges:l});return typeof u==`boolean`?u?{edges:l,nodes:o}:{edges:[],nodes:[]}:u}var xa=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),Sa=(e={x:0,y:0},t,n)=>({x:xa(e.x,t[0][0],t[1][0]-(n?.width??0)),y:xa(e.y,t[0][1],t[1][1]-(n?.height??0))});function Ca(e,t,n){let{width:r,height:i}=Ga(n),{x:a,y:o}=n.internals.positionAbsolute;return Sa(e,[[a,o],[a+r,o+i]],t)}var wa=(e,t,n)=>e<t?xa(Math.abs(e-t),1,t)/t:e>n?-xa(Math.abs(e-n),1,t)/t:0,Ta=(e,t,n=15,r=40)=>[wa(e.x,r,t.width-r)*n,wa(e.y,r,t.height-r)*n],Ea=(e,t)=>({x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}),Da=({x:e,y:t,width:n,height:r})=>({x:e,y:t,x2:e+n,y2:t+r}),Oa=({x:e,y:t,x2:n,y2:r})=>({x:e,y:t,width:n-e,height:r-t}),ka=(e,t=[0,0])=>{let{x:n,y:r}=da(e)?e.internals.positionAbsolute:fa(e,t);return{x:n,y:r,width:e.measured?.width??e.width??e.initialWidth??0,height:e.measured?.height??e.height??e.initialHeight??0}},Aa=(e,t=[0,0])=>{let{x:n,y:r}=da(e)?e.internals.positionAbsolute:fa(e,t);return{x:n,y:r,x2:n+(e.measured?.width??e.width??e.initialWidth??0),y2:r+(e.measured?.height??e.height??e.initialHeight??0)}},ja=(e,t)=>Oa(Ea(Da(e),Da(t))),Ma=(e,t)=>{let n=Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x)),r=Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y));return Math.ceil(n*r)},Na=e=>Pa(e.width)&&Pa(e.height)&&Pa(e.x)&&Pa(e.y),Pa=e=>!isNaN(e)&&isFinite(e),Fa=(e,t)=>{},Ia=(e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),La=({x:e,y:t},[n,r,i],a=!1,o=[1,1])=>{let s={x:(e-n)/i,y:(t-r)/i};return a?Ia(s,o):s},Ra=({x:e,y:t},[n,r,i])=>({x:e*i+n,y:t*i+r});function za(e,t){if(typeof e==`number`)return Math.floor((t-t/(1+e))*.5);if(typeof e==`string`&&e.endsWith(`px`)){let t=parseFloat(e);if(!Number.isNaN(t))return Math.floor(t)}if(typeof e==`string`&&e.endsWith(`%`)){let n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(t*n*.01)}return console.error(`[React Flow] The padding value "${e}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function Ba(e,t,n){if(typeof e==`string`||typeof e==`number`){let r=za(e,n),i=za(e,t);return{top:r,right:i,bottom:r,left:i,x:i*2,y:r*2}}if(typeof e==`object`){let r=za(e.top??e.y??0,n),i=za(e.bottom??e.y??0,n),a=za(e.left??e.x??0,t),o=za(e.right??e.x??0,t);return{top:r,right:o,bottom:i,left:a,x:a+o,y:r+i}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function Va(e,t,n,r,i,a){let{x:o,y:s}=Ra(e,[t,n,r]),{x:c,y:l}=Ra({x:e.x+e.width,y:e.y+e.height},[t,n,r]),u=i-c,d=a-l;return{left:Math.floor(o),top:Math.floor(s),right:Math.floor(u),bottom:Math.floor(d)}}var Ha=(e,t,n,r,i,a)=>{let o=Ba(a,t,n),s=(t-o.x)/e.width,c=(n-o.y)/e.height,l=xa(Math.min(s,c),r,i),u=e.x+e.width/2,d=e.y+e.height/2,f=t/2-u*l,p=n/2-d*l,m=Va(e,f,p,l,t,n),h={left:Math.min(m.left-o.left,0),top:Math.min(m.top-o.top,0),right:Math.min(m.right-o.right,0),bottom:Math.min(m.bottom-o.bottom,0)};return{x:f-h.left+h.right,y:p-h.top+h.bottom,zoom:l}},Ua=()=>typeof navigator<`u`&&navigator?.userAgent?.indexOf(`Mac`)>=0;function Wa(e){return e!=null&&e!==`parent`}function Ga(e){return{width:e.measured?.width??e.width??e.initialWidth??0,height:e.measured?.height??e.height??e.initialHeight??0}}function Ka(e){return(e.measured?.width??e.width??e.initialWidth)!==void 0&&(e.measured?.height??e.height??e.initialHeight)!==void 0}function qa(e,t={width:0,height:0},n,r,i){let a={...e},o=r.get(n);if(o){let e=o.origin||i;a.x+=o.internals.positionAbsolute.x-(t.width??0)*e[0],a.y+=o.internals.positionAbsolute.y-(t.height??0)*e[1]}return a}function Ja(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function Ya(){let e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}function Xa(e){return{...ea,...e||{}}}function Za(e,{snapGrid:t=[0,0],snapToGrid:n=!1,transform:r,containerBounds:i}){let{x:a,y:o}=ro(e),s=La({x:a-(i?.left??0),y:o-(i?.top??0)},r),{x:c,y:l}=n?Ia(s,t):s;return{xSnapped:c,ySnapped:l,...s}}var Qa=e=>({width:e.offsetWidth,height:e.offsetHeight}),$a=e=>e?.getRootNode?.()||window?.document,eo=[`INPUT`,`SELECT`,`TEXTAREA`];function to(e){let t=e.composedPath?.()?.[0]||e.target;return t?.nodeType===1?eo.includes(t.nodeName)||t.hasAttribute(`contenteditable`)||!!t.closest(`.nokey`):!1}var no=e=>`clientX`in e,ro=(e,t)=>{let n=no(e),r=n?e.clientX:e.touches?.[0].clientX,i=n?e.clientY:e.touches?.[0].clientY;return{x:r-(t?.left??0),y:i-(t?.top??0)}},io=(e,t,n,r,i)=>{let a=t.querySelectorAll(`.${e}`);return!a||!a.length?null:Array.from(a).map(t=>{let a=t.getBoundingClientRect();return{id:t.getAttribute(`data-handleid`),type:e,nodeId:i,position:t.getAttribute(`data-handlepos`),x:(a.left-n.left)/r,y:(a.top-n.top)/r,...Qa(t)}})};function ao({sourceX:e,sourceY:t,targetX:n,targetY:r,sourceControlX:i,sourceControlY:a,targetControlX:o,targetControlY:s}){let c=e*.125+i*.375+o*.375+n*.125,l=t*.125+a*.375+s*.375+r*.125;return[c,l,Math.abs(c-e),Math.abs(l-t)]}function oo(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function so({pos:e,x1:t,y1:n,x2:r,y2:i,c:a}){switch(e){case X.Left:return[t-oo(t-r,a),n];case X.Right:return[t+oo(r-t,a),n];case X.Top:return[t,n-oo(n-i,a)];case X.Bottom:return[t,n+oo(i-n,a)]}}function co({sourceX:e,sourceY:t,sourcePosition:n=X.Bottom,targetX:r,targetY:i,targetPosition:a=X.Top,curvature:o=.25}){let[s,c]=so({pos:n,x1:e,y1:t,x2:r,y2:i,c:o}),[l,u]=so({pos:a,x1:r,y1:i,x2:e,y2:t,c:o}),[d,f,p,m]=ao({sourceX:e,sourceY:t,targetX:r,targetY:i,sourceControlX:s,sourceControlY:c,targetControlX:l,targetControlY:u});return[`M${e},${t} C${s},${c} ${l},${u} ${r},${i}`,d,f,p,m]}function lo({sourceX:e,sourceY:t,targetX:n,targetY:r}){let i=Math.abs(n-e)/2,a=n<e?n+i:n-i,o=Math.abs(r-t)/2;return[a,r<t?r+o:r-o,i,o]}function uo({sourceNode:e,targetNode:t,selected:n=!1,zIndex:r=0,elevateOnSelect:i=!1,zIndexMode:a=`basic`}){return a===`manual`?r:(i&&n?r+1e3:r)+Math.max(e.parentId||i&&e.selected?e.internals.z:0,t.parentId||i&&t.selected?t.internals.z:0)}function fo({sourceNode:e,targetNode:t,width:n,height:r,transform:i}){let a=Ea(Aa(e),Aa(t));return a.x===a.x2&&(a.x2+=1),a.y===a.y2&&(a.y2+=1),Ma({x:-i[0]/i[2],y:-i[1]/i[2],width:n/i[2],height:r/i[2]},Oa(a))>0}var po=({source:e,sourceHandle:t,target:n,targetHandle:r})=>`xy-edge__${e}${t||``}-${n}${r||``}`,mo=(e,t)=>t.some(t=>t.source===e.source&&t.target===e.target&&(t.sourceHandle===e.sourceHandle||!t.sourceHandle&&!e.sourceHandle)&&(t.targetHandle===e.targetHandle||!t.targetHandle&&!e.targetHandle)),ho=(e,t,n={})=>{if(!e.source||!e.target)return Zi.error006(),t;let r=n.getEdgeId||po,i;return i=la(e)?{...e}:{...e,id:r(e)},mo(i,t)?t:(i.sourceHandle===null&&delete i.sourceHandle,i.targetHandle===null&&delete i.targetHandle,t.concat(i))};function go({sourceX:e,sourceY:t,targetX:n,targetY:r}){let[i,a,o,s]=lo({sourceX:e,sourceY:t,targetX:n,targetY:r});return[`M ${e},${t}L ${n},${r}`,i,a,o,s]}var _o={[X.Left]:{x:-1,y:0},[X.Right]:{x:1,y:0},[X.Top]:{x:0,y:-1},[X.Bottom]:{x:0,y:1}},vo=({source:e,sourcePosition:t=X.Bottom,target:n})=>t===X.Left||t===X.Right?e.x<n.x?{x:1,y:0}:{x:-1,y:0}:e.y<n.y?{x:0,y:1}:{x:0,y:-1},yo=(e,t)=>Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2);function bo({source:e,sourcePosition:t=X.Bottom,target:n,targetPosition:r=X.Top,center:i,offset:a,stepPosition:o}){let s=_o[t],c=_o[r],l={x:e.x+s.x*a,y:e.y+s.y*a},u={x:n.x+c.x*a,y:n.y+c.y*a},d=vo({source:l,sourcePosition:t,target:u}),f=d.x===0?`y`:`x`,p=d[f],m=[],h,g,_={x:0,y:0},v={x:0,y:0},[,,y,b]=lo({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(s[f]*c[f]===-1){f===`x`?(h=i.x??l.x+(u.x-l.x)*o,g=i.y??(l.y+u.y)/2):(h=i.x??(l.x+u.x)/2,g=i.y??l.y+(u.y-l.y)*o);let e=[{x:h,y:l.y},{x:h,y:u.y}],t=[{x:l.x,y:g},{x:u.x,y:g}];m=s[f]===p?f===`x`?e:t:f===`x`?t:e}else{let i=[{x:l.x,y:u.y}],o=[{x:u.x,y:l.y}];if(m=f===`x`?s.x===p?o:i:s.y===p?i:o,t===r){let t=Math.abs(e[f]-n[f]);if(t<=a){let r=Math.min(a-1,a-t);s[f]===p?_[f]=(l[f]>e[f]?-1:1)*r:v[f]=(u[f]>n[f]?-1:1)*r}}if(t!==r){let e=f===`x`?`y`:`x`,t=s[f]===c[e],n=l[e]>u[e],r=l[e]<u[e];(s[f]===1&&(!t&&n||t&&r)||s[f]!==1&&(!t&&r||t&&n))&&(m=f===`x`?i:o)}let d={x:l.x+_.x,y:l.y+_.y},y={x:u.x+v.x,y:u.y+v.y};Math.max(Math.abs(d.x-m[0].x),Math.abs(y.x-m[0].x))>=Math.max(Math.abs(d.y-m[0].y),Math.abs(y.y-m[0].y))?(h=(d.x+y.x)/2,g=m[0].y):(h=m[0].x,g=(d.y+y.y)/2)}let x={x:l.x+_.x,y:l.y+_.y},S={x:u.x+v.x,y:u.y+v.y};return[[e,...x.x!==m[0].x||x.y!==m[0].y?[x]:[],...m,...S.x!==m[m.length-1].x||S.y!==m[m.length-1].y?[S]:[],n],h,g,y,b]}function xo(e,t,n,r){let i=Math.min(yo(e,t)/2,yo(t,n)/2,r),{x:a,y:o}=t;if(e.x===a&&a===n.x||e.y===o&&o===n.y)return`L${a} ${o}`;if(e.y===o){let t=e.x<n.x?-1:1,r=e.y<n.y?1:-1;return`L ${a+i*t},${o}Q ${a},${o} ${a},${o+i*r}`}let s=e.x<n.x?1:-1;return`L ${a},${o+i*(e.y<n.y?-1:1)}Q ${a},${o} ${a+i*s},${o}`}function So({sourceX:e,sourceY:t,sourcePosition:n=X.Bottom,targetX:r,targetY:i,targetPosition:a=X.Top,borderRadius:o=5,centerX:s,centerY:c,offset:l=20,stepPosition:u=.5}){let[d,f,p,m,h]=bo({source:{x:e,y:t},sourcePosition:n,target:{x:r,y:i},targetPosition:a,center:{x:s,y:c},offset:l,stepPosition:u}),g=`M${d[0].x} ${d[0].y}`;for(let e=1;e<d.length-1;e++)g+=xo(d[e-1],d[e],d[e+1],o);return g+=`L${d[d.length-1].x} ${d[d.length-1].y}`,[g,f,p,m,h]}function Co(e){return e&&!!(e.internals.handleBounds||e.handles?.length)&&!!(e.measured.width||e.width||e.initialWidth)}function wo(e){let{sourceNode:t,targetNode:n}=e;if(!Co(t)||!Co(n))return null;let r=t.internals.handleBounds||To(t.handles),i=n.internals.handleBounds||To(n.handles),a=Do(r?.source??[],e.sourceHandle),o=Do(e.connectionMode===ta.Strict?i?.target??[]:(i?.target??[]).concat(i?.source??[]),e.targetHandle);if(!a||!o)return e.onError?.(`008`,Zi.error008(a?`target`:`source`,{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;let s=a?.position||X.Bottom,c=o?.position||X.Top,l=Eo(t,a,s),u=Eo(n,o,c);return{sourceX:l.x,sourceY:l.y,targetX:u.x,targetY:u.y,sourcePosition:s,targetPosition:c}}function To(e){if(!e)return null;let t=[],n=[];for(let r of e)r.width=r.width??1,r.height=r.height??1,r.type===`source`?t.push(r):r.type===`target`&&n.push(r);return{source:t,target:n}}function Eo(e,t,n=X.Left,r=!1){let i=(t?.x??0)+e.internals.positionAbsolute.x,a=(t?.y??0)+e.internals.positionAbsolute.y,{width:o,height:s}=t??Ga(e);if(r)return{x:i+o/2,y:a+s/2};switch(t?.position??n){case X.Top:return{x:i+o/2,y:a};case X.Right:return{x:i+o,y:a+s/2};case X.Bottom:return{x:i+o/2,y:a+s};case X.Left:return{x:i,y:a+s/2}}}function Do(e,t){return e&&(t?e.find(e=>e.id===t):e[0])||null}function Oo(e,t){return e?typeof e==`string`?e:`${t?`${t}__`:``}${Object.keys(e).sort().map(t=>`${t}=${e[t]}`).join(`&`)}`:``}function ko(e,{id:t,defaultColor:n,defaultMarkerStart:r,defaultMarkerEnd:i}){let a=new Set;return e.reduce((e,o)=>([o.markerStart||r,o.markerEnd||i].forEach(r=>{if(r&&typeof r==`object`){let i=Oo(r,t);a.has(i)||(e.push({id:i,color:r.color||n,...r}),a.add(i))}}),e),[]).sort((e,t)=>e.id.localeCompare(t.id))}var Ao=1e3,jo=10,Mo={nodeOrigin:[0,0],nodeExtent:Qi,elevateNodesOnSelect:!0,zIndexMode:`basic`,defaults:{}},No={...Mo,checkEquality:!0};function Po(e,t){let n={...e};for(let e in t)t[e]!==void 0&&(n[e]=t[e]);return n}function Fo(e,t,n){let r=Po(Mo,n);for(let n of e.values())if(n.parentId)Bo(n,e,t,r);else{let e=Sa(fa(n,r.nodeOrigin),Wa(n.extent)?n.extent:r.nodeExtent,Ga(n));n.internals.positionAbsolute=e}}function Io(e,t){if(!e.handles)return e.measured?t?.internals.handleBounds:void 0;let n=[],r=[];for(let t of e.handles){let i={id:t.id,width:t.width??1,height:t.height??1,nodeId:e.id,x:t.x,y:t.y,position:t.position,type:t.type};t.type===`source`?n.push(i):t.type===`target`&&r.push(i)}return{source:n,target:r}}function Lo(e){return e===`manual`}function Ro(e,t,n,r={}){let i=Po(No,r),a={i:0},o=new Map(t),s=i?.elevateNodesOnSelect&&!Lo(i.zIndexMode)?Ao:0,c=e.length>0,l=!1;t.clear(),n.clear();for(let u of e){let e=o.get(u.id);if(i.checkEquality&&u===e?.internals.userNode)t.set(u.id,e);else{let n=Sa(fa(u,i.nodeOrigin),Wa(u.extent)?u.extent:i.nodeExtent,Ga(u));e={...i.defaults,...u,measured:{width:u.measured?.width,height:u.measured?.height},internals:{positionAbsolute:n,handleBounds:Io(u,e),z:Vo(u,s,i.zIndexMode),userNode:u}},t.set(u.id,e)}(e.measured===void 0||e.measured.width===void 0||e.measured.height===void 0)&&!e.hidden&&(c=!1),u.parentId&&Bo(e,t,n,r,a),l||=u.selected??!1}return{nodesInitialized:c,hasSelectedNodes:l}}function zo(e,t){if(!e.parentId)return;let n=t.get(e.parentId);n?n.set(e.id,e):t.set(e.parentId,new Map([[e.id,e]]))}function Bo(e,t,n,r,i){let{elevateNodesOnSelect:a,nodeOrigin:o,nodeExtent:s,zIndexMode:c}=Po(Mo,r),l=e.parentId,u=t.get(l);if(!u){console.warn(`Parent node ${l} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}zo(e,n),i&&!u.parentId&&u.internals.rootParentIndex===void 0&&c===`auto`&&(u.internals.rootParentIndex=++i.i,u.internals.z=u.internals.z+i.i*jo),i&&u.internals.rootParentIndex!==void 0&&(i.i=u.internals.rootParentIndex);let{x:d,y:f,z:p}=Ho(e,u,o,s,a&&!Lo(c)?Ao:0,c),{positionAbsolute:m}=e.internals,h=d!==m.x||f!==m.y;(h||p!==e.internals.z)&&t.set(e.id,{...e,internals:{...e.internals,positionAbsolute:h?{x:d,y:f}:m,z:p}})}function Vo(e,t,n){let r=Pa(e.zIndex)?e.zIndex:0;return Lo(n)?r:r+(e.selected?t:0)}function Ho(e,t,n,r,i,a){let{x:o,y:s}=t.internals.positionAbsolute,c=Ga(e),l=fa(e,n),u=Wa(e.extent)?Sa(l,e.extent,c):l,d=Sa({x:o+u.x,y:s+u.y},r,c);e.extent===`parent`&&(d=Ca(d,c,t));let f=Vo(e,i,a),p=t.internals.z??0;return{x:d.x,y:d.y,z:p>=f?p+1:f}}function Uo(e,t,n,r=[0,0]){let i=[],a=new Map;for(let n of e){let e=t.get(n.parentId);if(!e)continue;let r=ja(a.get(n.parentId)?.expandedRect??ka(e),n.rect);a.set(n.parentId,{expandedRect:r,parent:e})}return a.size>0&&a.forEach(({expandedRect:t,parent:a},o)=>{let s=a.internals.positionAbsolute,c=Ga(a),l=a.origin??r,u=t.x<s.x?Math.round(Math.abs(s.x-t.x)):0,d=t.y<s.y?Math.round(Math.abs(s.y-t.y)):0,f=Math.max(c.width,Math.round(t.width)),p=Math.max(c.height,Math.round(t.height)),m=(f-c.width)*l[0],h=(p-c.height)*l[1];(u>0||d>0||m||h)&&(i.push({id:o,type:`position`,position:{x:a.position.x-u+m,y:a.position.y-d+h}}),n.get(o)?.forEach(t=>{e.some(e=>e.id===t.id)||i.push({id:t.id,type:`position`,position:{x:t.position.x+u,y:t.position.y+d}})})),(c.width<t.width||c.height<t.height||u||d)&&i.push({id:o,type:`dimensions`,setAttributes:!0,dimensions:{width:f+(u?l[0]*u-m:0),height:p+(d?l[1]*d-h:0)}})}),i}function Wo(e,t,n,r,i,a,o){let s=r?.querySelector(`.xyflow__viewport`),c=!1;if(!s)return{changes:[],updatedInternals:c};let l=[],u=window.getComputedStyle(s),{m22:d}=new window.DOMMatrixReadOnly(u.transform),f=[];for(let r of e.values()){let e=t.get(r.id);if(!e)continue;if(e.hidden){t.set(e.id,{...e,internals:{...e.internals,handleBounds:void 0}}),c=!0;continue}let s=Qa(r.nodeElement),u=e.measured.width!==s.width||e.measured.height!==s.height;if(s.width&&s.height&&(u||!e.internals.handleBounds||r.force)){let p=r.nodeElement.getBoundingClientRect(),m=Wa(e.extent)?e.extent:a,{positionAbsolute:h}=e.internals;e.parentId&&e.extent===`parent`?h=Ca(h,s,t.get(e.parentId)):m&&(h=Sa(h,m,s));let g={...e,measured:s,internals:{...e.internals,positionAbsolute:h,handleBounds:{source:io(`source`,r.nodeElement,p,d,e.id),target:io(`target`,r.nodeElement,p,d,e.id)}}};t.set(e.id,g),e.parentId&&Bo(g,t,n,{nodeOrigin:i,zIndexMode:o}),c=!0,u&&(l.push({id:e.id,type:`dimensions`,dimensions:s}),e.expandParent&&e.parentId&&f.push({id:e.id,parentId:e.parentId,rect:ka(g,i)}))}}if(f.length>0){let e=Uo(f,t,n,i);l.push(...e)}return{changes:l,updatedInternals:c}}async function Go({delta:e,panZoom:t,transform:n,translateExtent:r,width:i,height:a}){if(!t||!e.x&&!e.y)return Promise.resolve(!1);let o=await t.setViewportConstrained({x:n[0]+e.x,y:n[1]+e.y,zoom:n[2]},[[0,0],[i,a]],r),s=!!o&&(o.x!==n[0]||o.y!==n[1]||o.k!==n[2]);return Promise.resolve(s)}function Ko(e,t,n,r,i,a){let o=i,s=r.get(o)||new Map;r.set(o,s.set(n,t)),o=`${i}-${e}`;let c=r.get(o)||new Map;if(r.set(o,c.set(n,t)),a){o=`${i}-${e}-${a}`;let s=r.get(o)||new Map;r.set(o,s.set(n,t))}}function qo(e,t,n){e.clear(),t.clear();for(let r of n){let{source:n,target:i,sourceHandle:a=null,targetHandle:o=null}=r,s={edgeId:r.id,source:n,target:i,sourceHandle:a,targetHandle:o},c=`${n}-${a}--${i}-${o}`;Ko(`source`,s,`${i}-${o}--${n}-${a}`,e,n,a),Ko(`target`,s,c,e,i,o),t.set(r.id,r)}}function Jo(e,t){if(!e.parentId)return!1;let n=t.get(e.parentId);return n?n.selected?!0:Jo(n,t):!1}function Yo(e,t,n){let r=e;do{if(r?.matches?.(t))return!0;if(r===n)return!1;r=r?.parentElement}while(r);return!1}function Xo(e,t,n,r){let i=new Map;for(let[a,o]of e)if((o.selected||o.id===r)&&(!o.parentId||!Jo(o,e))&&(o.draggable||t&&o.draggable===void 0)){let t=e.get(a);t&&i.set(a,{id:a,position:t.position||{x:0,y:0},distance:{x:n.x-t.internals.positionAbsolute.x,y:n.y-t.internals.positionAbsolute.y},extent:t.extent,parentId:t.parentId,origin:t.origin,expandParent:t.expandParent,internals:{positionAbsolute:t.internals.positionAbsolute||{x:0,y:0}},measured:{width:t.measured.width??0,height:t.measured.height??0}})}return i}function Zo({nodeId:e,dragItems:t,nodeLookup:n,dragging:r=!0}){let i=[];for(let[e,a]of t){let t=n.get(e)?.internals.userNode;t&&i.push({...t,position:a.position,dragging:r})}if(!e)return[i[0],i];let a=n.get(e)?.internals.userNode;return[a?{...a,position:t.get(e)?.position||a.position,dragging:r}:i[0],i]}function Qo({dragItems:e,snapGrid:t,x:n,y:r}){let i=e.values().next().value;if(!i)return null;let a={x:n-i.distance.x,y:r-i.distance.y},o=Ia(a,t);return{x:o.x-a.x,y:o.y-a.y}}function $o({onNodeMouseDown:e,getStoreItems:t,onDragStart:n,onDrag:r,onDragStop:i}){let a={x:null,y:null},o=0,s=new Map,c=!1,l={x:0,y:0},u=null,d=!1,f=null,p=!1,m=!1,h=null;function g({noDragClassName:g,handleSelector:_,domNode:v,isSelectable:y,nodeId:b,nodeClickDistance:x=0}){f=q(v);function S({x:e,y:n}){let{nodeLookup:i,nodeExtent:o,snapGrid:c,snapToGrid:l,nodeOrigin:u,onNodeDrag:d,onSelectionDrag:f,onError:p,updateNodePositions:g}=t();a={x:e,y:n};let _=!1,v=s.size>1,y=v&&o?Da(ma(s)):null,x=v&&l?Qo({dragItems:s,snapGrid:c,x:e,y:n}):null;for(let[t,r]of s){if(!i.has(t))continue;let a={x:e-r.distance.x,y:n-r.distance.y};l&&(a=x?{x:Math.round(a.x+x.x),y:Math.round(a.y+x.y)}:Ia(a,c));let s=null;if(v&&o&&!r.extent&&y){let{positionAbsolute:e}=r.internals,t=e.x-y.x+o[0][0],n=e.x+r.measured.width-y.x2+o[1][0],i=e.y-y.y+o[0][1],a=e.y+r.measured.height-y.y2+o[1][1];s=[[t,i],[n,a]]}let{position:d,positionAbsolute:f}=ya({nodeId:t,nextPosition:a,nodeLookup:i,nodeExtent:s||o,nodeOrigin:u,onError:p});_=_||r.position.x!==d.x||r.position.y!==d.y,r.position=d,r.internals.positionAbsolute=f}if(m||=_,_&&(g(s,!0),h&&(r||d||!b&&f))){let[e,t]=Zo({nodeId:b,dragItems:s,nodeLookup:i});r?.(h,s,e,t),d?.(h,e,t),b||f?.(h,t)}}async function C(){if(!u)return;let{transform:e,panBy:n,autoPanSpeed:r,autoPanOnNodeDrag:i}=t();if(!i){c=!1,cancelAnimationFrame(o);return}let[s,d]=Ta(l,u,r);(s!==0||d!==0)&&(a.x=(a.x??0)-s/e[2],a.y=(a.y??0)-d/e[2],await n({x:s,y:d})&&S(a)),o=requestAnimationFrame(C)}function w(r){let{nodeLookup:i,multiSelectionActive:o,nodesDraggable:c,transform:l,snapGrid:f,snapToGrid:p,selectNodesOnDrag:m,onNodeDragStart:h,onSelectionDragStart:g,unselectNodesAndEdges:_}=t();d=!0,(!m||!y)&&!o&&b&&(i.get(b)?.selected||_()),y&&m&&b&&e?.(b);let v=Za(r.sourceEvent,{transform:l,snapGrid:f,snapToGrid:p,containerBounds:u});if(a=v,s=Xo(i,c,v,b),s.size>0&&(n||h||!b&&g)){let[e,t]=Zo({nodeId:b,dragItems:s,nodeLookup:i});n?.(r.sourceEvent,s,e,t),h?.(r.sourceEvent,e,t),b||g?.(r.sourceEvent,t)}}let T=Nt().clickDistance(x).on(`start`,e=>{let{domNode:n,nodeDragThreshold:r,transform:i,snapGrid:o,snapToGrid:s}=t();u=n?.getBoundingClientRect()||null,p=!1,m=!1,h=e.sourceEvent,r===0&&w(e),a=Za(e.sourceEvent,{transform:i,snapGrid:o,snapToGrid:s,containerBounds:u}),l=ro(e.sourceEvent,u)}).on(`drag`,e=>{let{autoPanOnNodeDrag:n,transform:r,snapGrid:i,snapToGrid:o,nodeDragThreshold:f,nodeLookup:m}=t(),g=Za(e.sourceEvent,{transform:r,snapGrid:i,snapToGrid:o,containerBounds:u});if(h=e.sourceEvent,(e.sourceEvent.type===`touchmove`&&e.sourceEvent.touches.length>1||b&&!m.has(b))&&(p=!0),!p){if(!c&&n&&d&&(c=!0,C()),!d){let t=ro(e.sourceEvent,u),n=t.x-l.x,r=t.y-l.y;Math.sqrt(n*n+r*r)>f&&w(e)}(a.x!==g.xSnapped||a.y!==g.ySnapped)&&s&&d&&(l=ro(e.sourceEvent,u),S(g))}}).on(`end`,e=>{if(!(!d||p)&&(c=!1,d=!1,cancelAnimationFrame(o),s.size>0)){let{nodeLookup:n,updateNodePositions:r,onNodeDragStop:a,onSelectionDragStop:o}=t();if(m&&=(r(s,!1),!1),i||a||!b&&o){let[t,r]=Zo({nodeId:b,dragItems:s,nodeLookup:n,dragging:!1});i?.(e.sourceEvent,s,t,r),a?.(e.sourceEvent,t,r),b||o?.(e.sourceEvent,r)}}}).filter(e=>{let t=e.target;return!e.button&&(!g||!Yo(t,`.${g}`,v))&&(!_||Yo(t,_,v))});f.call(T)}function _(){f?.on(`.drag`,null)}return{update:g,destroy:_}}function es(e,t,n){let r=[],i={x:e.x-n,y:e.y-n,width:n*2,height:n*2};for(let e of t.values())Ma(i,ka(e))>0&&r.push(e);return r}var ts=250;function ns(e,t,n,r){let i=[],a=1/0,o=es(e,n,t+ts);for(let n of o){let o=[...n.internals.handleBounds?.source??[],...n.internals.handleBounds?.target??[]];for(let s of o){if(r.nodeId===s.nodeId&&r.type===s.type&&r.id===s.id)continue;let{x:o,y:c}=Eo(n,s,s.position,!0),l=Math.sqrt((o-e.x)**2+(c-e.y)**2);l>t||(l<a?(i=[{...s,x:o,y:c}],a=l):l===a&&i.push({...s,x:o,y:c}))}}if(!i.length)return null;if(i.length>1){let e=r.type===`source`?`target`:`source`;return i.find(t=>t.type===e)??i[0]}return i[0]}function rs(e,t,n,r,i,a=!1){let o=r.get(e);if(!o)return null;let s=i===`strict`?o.internals.handleBounds?.[t]:[...o.internals.handleBounds?.source??[],...o.internals.handleBounds?.target??[]],c=(n?s?.find(e=>e.id===n):s?.[0])??null;return c&&a?{...c,...Eo(o,c,c.position,!0)}:c}function is(e,t){return e||(t?.classList.contains(`target`)?`target`:t?.classList.contains(`source`)?`source`:null)}function as(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}var os=()=>!0;function ss(e,{connectionMode:t,connectionRadius:n,handleId:r,nodeId:i,edgeUpdaterType:a,isTarget:o,domNode:s,nodeLookup:c,lib:l,autoPanOnConnect:u,flowId:d,panBy:f,cancelConnection:p,onConnectStart:m,onConnect:h,onConnectEnd:g,isValidConnection:_=os,onReconnectEnd:v,updateConnection:y,getTransform:b,getFromHandle:x,autoPanSpeed:S,dragThreshold:C=1,handleDomNode:w}){let T=$a(e.target),E=0,D,{x:O,y:k}=ro(e),A=is(a,w),j=s?.getBoundingClientRect(),M=!1;if(!j||!A)return;let N=rs(i,A,r,c,t);if(!N)return;let P=ro(e,j),F=!1,I=null,L=!1,R=null;function z(){if(!u||!j)return;let[e,t]=Ta(P,j,S);f({x:e,y:t}),E=requestAnimationFrame(z)}let B={...N,nodeId:i,type:A,position:N.position},V=c.get(i),H={inProgress:!0,isValid:null,from:Eo(V,B,X.Left,!0),fromHandle:B,fromPosition:B.position,fromNode:V,to:P,toHandle:null,toPosition:sa[B.position],toNode:null,pointer:P};function U(){M=!0,y(H),m?.(e,{nodeId:i,handleId:r,handleType:A})}C===0&&U();function W(e){if(!M){let{x:t,y:n}=ro(e),r=t-O,i=n-k;if(!(r*r+i*i>C*C))return;U()}if(!x()||!B){G(e);return}let a=b();P=ro(e,j),D=ns(La(P,a,!1,[1,1]),n,c,B),F||=(z(),!0);let s=cs(e,{handle:D,connectionMode:t,fromNodeId:i,fromHandleId:r,fromType:o?`target`:`source`,isValidConnection:_,doc:T,lib:l,flowId:d,nodeLookup:c});R=s.handleDomNode,I=s.connection,L=as(!!D,s.isValid);let u=c.get(i),f=u?Eo(u,B,X.Left,!0):H.from,p={...H,from:f,isValid:L,to:s.toHandle&&L?Ra({x:s.toHandle.x,y:s.toHandle.y},a):P,toHandle:s.toHandle,toPosition:L&&s.toHandle?s.toHandle.position:sa[B.position],toNode:s.toHandle?c.get(s.toHandle.nodeId):null,pointer:P};y(p),H=p}function G(e){if(!(`touches`in e&&e.touches.length>0)){if(M){(D||R)&&I&&L&&h?.(I);let{inProgress:t,...n}=H,r={...n,toPosition:H.toHandle?H.toPosition:null};g?.(e,r),a&&v?.(e,r)}p(),cancelAnimationFrame(E),F=!1,L=!1,I=null,R=null,T.removeEventListener(`mousemove`,W),T.removeEventListener(`mouseup`,G),T.removeEventListener(`touchmove`,W),T.removeEventListener(`touchend`,G)}}T.addEventListener(`mousemove`,W),T.addEventListener(`mouseup`,G),T.addEventListener(`touchmove`,W),T.addEventListener(`touchend`,G)}function cs(e,{handle:t,connectionMode:n,fromNodeId:r,fromHandleId:i,fromType:a,doc:o,lib:s,flowId:c,isValidConnection:l=os,nodeLookup:u}){let d=a===`target`,f=t?o.querySelector(`.${s}-flow__handle[data-id="${c}-${t?.nodeId}-${t?.id}-${t?.type}"]`):null,{x:p,y:m}=ro(e),h=o.elementFromPoint(p,m),g=h?.classList.contains(`${s}-flow__handle`)?h:f,_={handleDomNode:g,isValid:!1,connection:null,toHandle:null};if(g){let e=is(void 0,g),t=g.getAttribute(`data-nodeid`),a=g.getAttribute(`data-handleid`),o=g.classList.contains(`connectable`),s=g.classList.contains(`connectableend`);if(!t||!e)return _;let c={source:d?t:r,sourceHandle:d?a:i,target:d?r:t,targetHandle:d?i:a};_.connection=c,_.isValid=o&&s&&(n===ta.Strict?d&&e===`source`||!d&&e===`target`:t!==r||a!==i)&&l(c),_.toHandle=rs(t,e,a,u,n,!0)}return _}var ls={onPointerDown:ss,isValid:cs};function us({domNode:e,panZoom:t,getTransform:n,getViewScale:r}){let i=q(e);function a({translateExtent:e,width:a,height:o,zoomStep:s=1,pannable:c=!0,zoomable:l=!0,inversePan:u=!1}){let d=e=>{if(e.sourceEvent.type!==`wheel`||!t)return;let r=n(),i=e.sourceEvent.ctrlKey&&Ua()?10:1,a=-e.sourceEvent.deltaY*(e.sourceEvent.deltaMode===1?.05:e.sourceEvent.deltaMode?1:.002)*s,o=r[2]*2**(a*i);t.scaleTo(o)},f=[0,0],p=Xi().on(`start`,e=>{(e.sourceEvent.type===`mousedown`||e.sourceEvent.type===`touchstart`)&&(f=[e.sourceEvent.clientX??e.sourceEvent.touches[0].clientX,e.sourceEvent.clientY??e.sourceEvent.touches[0].clientY])}).on(`zoom`,c?i=>{let s=n();if(i.sourceEvent.type!==`mousemove`&&i.sourceEvent.type!==`touchmove`||!t)return;let c=[i.sourceEvent.clientX??i.sourceEvent.touches[0].clientX,i.sourceEvent.clientY??i.sourceEvent.touches[0].clientY],l=[c[0]-f[0],c[1]-f[1]];f=c;let d=r()*Math.max(s[2],Math.log(s[2]))*(u?-1:1),p={x:s[0]-l[0]*d,y:s[1]-l[1]*d},m=[[0,0],[a,o]];t.setViewportConstrained({x:p.x,y:p.y,zoom:s[2]},m,e)}:null).on(`zoom.wheel`,l?d:null);i.call(p,{})}function o(){i.on(`zoom`,null)}return{update:a,destroy:o,pointer:J}}var ds=e=>({x:e.x,y:e.y,zoom:e.k}),fs=({x:e,y:t,zoom:n})=>Bi.translate(e,t).scale(n),ps=(e,t)=>e.target.closest(`.${t}`),ms=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),hs=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,gs=(e,t=0,n=hs,r=()=>{})=>{let i=typeof t==`number`&&t>0;return i||r(),i?e.transition().duration(t).ease(n).on(`end`,r):e},_s=e=>{let t=e.ctrlKey&&Ua()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t};function vs({zoomPanValues:e,noWheelClassName:t,d3Selection:n,d3Zoom:r,panOnScrollMode:i,panOnScrollSpeed:a,zoomOnPinch:o,onPanZoomStart:s,onPanZoom:c,onPanZoomEnd:l}){return u=>{if(ps(u,t))return u.ctrlKey&&u.preventDefault(),!1;u.preventDefault(),u.stopImmediatePropagation();let d=n.property(`__zoom`).k||1;if(u.ctrlKey&&o){let e=J(u),t=d*2**_s(u);r.scaleTo(n,t,e,u);return}let f=u.deltaMode===1?20:1,p=i===na.Vertical?0:u.deltaX*f,m=i===na.Horizontal?0:u.deltaY*f;!Ua()&&u.shiftKey&&i!==na.Vertical&&(p=u.deltaY*f,m=0),r.translateBy(n,-(p/d)*a,-(m/d)*a,{internal:!0});let h=ds(n.property(`__zoom`));clearTimeout(e.panScrollTimeout),e.isPanScrolling?(c?.(u,h),e.panScrollTimeout=setTimeout(()=>{l?.(u,h),e.isPanScrolling=!1},150)):(e.isPanScrolling=!0,s?.(u,h))}}function ys({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:n}){return function(r,i){let a=r.type===`wheel`,o=!t&&a&&!r.ctrlKey,s=ps(r,e);if(r.ctrlKey&&a&&s&&r.preventDefault(),o||s)return null;r.preventDefault(),n.call(this,r,i)}}function bs({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:n}){return r=>{if(r.sourceEvent?.internal)return;let i=ds(r.transform);e.mouseButton=r.sourceEvent?.button||0,e.isZoomingOrPanning=!0,e.prevViewport=i,r.sourceEvent?.type===`mousedown`&&t(!0),n&&n?.(r.sourceEvent,i)}}function xs({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:n,onTransformChange:r,onPanZoom:i}){return a=>{e.usedRightMouseButton=!!(n&&ms(t,e.mouseButton??0)),a.sourceEvent?.sync||r([a.transform.x,a.transform.y,a.transform.k]),i&&!a.sourceEvent?.internal&&i?.(a.sourceEvent,ds(a.transform))}}function Ss({zoomPanValues:e,panOnDrag:t,panOnScroll:n,onDraggingChange:r,onPanZoomEnd:i,onPaneContextMenu:a}){return o=>{if(!o.sourceEvent?.internal&&(e.isZoomingOrPanning=!1,a&&ms(t,e.mouseButton??0)&&!e.usedRightMouseButton&&o.sourceEvent&&a(o.sourceEvent),e.usedRightMouseButton=!1,r(!1),i)){let t=ds(o.transform);e.prevViewport=t,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{i?.(o.sourceEvent,t)},n?150:0)}}}function Cs({zoomActivationKeyPressed:e,zoomOnScroll:t,zoomOnPinch:n,panOnDrag:r,panOnScroll:i,zoomOnDoubleClick:a,userSelectionActive:o,noWheelClassName:s,noPanClassName:c,lib:l,connectionInProgress:u}){return d=>{let f=e||t,p=n&&d.ctrlKey,m=d.type===`wheel`;if(d.button===1&&d.type===`mousedown`&&(ps(d,`${l}-flow__node`)||ps(d,`${l}-flow__edge`)))return!0;if(!r&&!f&&!i&&!a&&!n||o||u&&!m||ps(d,s)&&m||ps(d,c)&&(!m||i&&m&&!e)||!n&&d.ctrlKey&&m)return!1;if(!n&&d.type===`touchstart`&&d.touches?.length>1)return d.preventDefault(),!1;if(!f&&!i&&!p&&m||!r&&(d.type===`mousedown`||d.type===`touchstart`)||Array.isArray(r)&&!r.includes(d.button)&&d.type===`mousedown`)return!1;let h=Array.isArray(r)&&r.includes(d.button)||!d.button||d.button<=1;return(!d.ctrlKey||m)&&h}}function ws({domNode:e,minZoom:t,maxZoom:n,translateExtent:r,viewport:i,onPanZoom:a,onPanZoomStart:o,onPanZoomEnd:s,onDraggingChange:c}){let l={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{x:0,y:0,zoom:0},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},u=e.getBoundingClientRect(),d=Xi().scaleExtent([t,n]).translateExtent(r),f=q(e).call(d);v({x:i.x,y:i.y,zoom:xa(i.zoom,t,n)},[[0,0],[u.width,u.height]],r);let p=f.on(`wheel.zoom`),m=f.on(`dblclick.zoom`);d.wheelDelta(_s);function h(e,t){return f?new Promise(n=>{d?.interpolate(t?.interpolate===`linear`?In:Xn).transform(gs(f,t?.duration,t?.ease,()=>n(!0)),e)}):Promise.resolve(!1)}function g({noWheelClassName:e,noPanClassName:t,onPaneContextMenu:n,userSelectionActive:r,panOnScroll:i,panOnDrag:u,panOnScrollMode:h,panOnScrollSpeed:g,preventScrolling:v,zoomOnPinch:y,zoomOnScroll:b,zoomOnDoubleClick:x,zoomActivationKeyPressed:S,lib:C,onTransformChange:w,connectionInProgress:T,paneClickDistance:E,selectionOnDrag:D}){r&&!l.isZoomingOrPanning&&_();let O=i&&!S&&!r;d.clickDistance(D?1/0:!Pa(E)||E<0?0:E);let k=O?vs({zoomPanValues:l,noWheelClassName:e,d3Selection:f,d3Zoom:d,panOnScrollMode:h,panOnScrollSpeed:g,zoomOnPinch:y,onPanZoomStart:o,onPanZoom:a,onPanZoomEnd:s}):ys({noWheelClassName:e,preventScrolling:v,d3ZoomHandler:p});if(f.on(`wheel.zoom`,k,{passive:!1}),!r){let e=bs({zoomPanValues:l,onDraggingChange:c,onPanZoomStart:o});d.on(`start`,e);let t=xs({zoomPanValues:l,panOnDrag:u,onPaneContextMenu:!!n,onPanZoom:a,onTransformChange:w});d.on(`zoom`,t);let r=Ss({zoomPanValues:l,panOnDrag:u,panOnScroll:i,onPaneContextMenu:n,onPanZoomEnd:s,onDraggingChange:c});d.on(`end`,r)}let A=Cs({zoomActivationKeyPressed:S,panOnDrag:u,zoomOnScroll:b,panOnScroll:i,zoomOnDoubleClick:x,zoomOnPinch:y,userSelectionActive:r,noPanClassName:t,noWheelClassName:e,lib:C,connectionInProgress:T});d.filter(A),x?f.on(`dblclick.zoom`,m):f.on(`dblclick.zoom`,null)}function _(){d.on(`zoom`,null)}async function v(e,t,n){let r=fs(e),i=d?.constrain()(r,t,n);return i&&await h(i),new Promise(e=>e(i))}async function y(e,t){let n=fs(e);return await h(n,t),new Promise(e=>e(n))}function b(e){if(f){let t=fs(e),n=f.property(`__zoom`);(n.k!==e.zoom||n.x!==e.x||n.y!==e.y)&&d?.transform(f,t,null,{sync:!0})}}function x(){let e=f?Vi(f.node()):{x:0,y:0,k:1};return{x:e.x,y:e.y,zoom:e.k}}function S(e,t){return f?new Promise(n=>{d?.interpolate(t?.interpolate===`linear`?In:Xn).scaleTo(gs(f,t?.duration,t?.ease,()=>n(!0)),e)}):Promise.resolve(!1)}function C(e,t){return f?new Promise(n=>{d?.interpolate(t?.interpolate===`linear`?In:Xn).scaleBy(gs(f,t?.duration,t?.ease,()=>n(!0)),e)}):Promise.resolve(!1)}function w(e){d?.scaleExtent(e)}function T(e){d?.translateExtent(e)}function E(e){let t=!Pa(e)||e<0?0:e;d?.clickDistance(t)}return{update:g,destroy:_,setViewport:y,setViewportConstrained:v,getViewport:x,scaleTo:S,scaleBy:C,setScaleExtent:w,setTranslateExtent:T,syncViewport:b,setClickDistance:E}}var Ts;(function(e){e.Line=`line`,e.Handle=`handle`})(Ts||={});function Es({width:e,prevWidth:t,height:n,prevHeight:r,affectsX:i,affectsY:a}){let o=e-t,s=n-r,c=[o>0?1:o<0?-1:0,s>0?1:s<0?-1:0];return o&&i&&(c[0]*=-1),s&&a&&(c[1]*=-1),c}function Ds(e){return{isHorizontal:e.includes(`right`)||e.includes(`left`),isVertical:e.includes(`bottom`)||e.includes(`top`),affectsX:e.includes(`left`),affectsY:e.includes(`top`)}}function Os(e,t){return Math.max(0,t-e)}function ks(e,t){return Math.max(0,e-t)}function As(e,t,n){return Math.max(0,t-e,e-n)}function js(e,t){return e?!t:t}function Ms(e,t,n,r,i,a,o,s){let{affectsX:c,affectsY:l}=t,{isHorizontal:u,isVertical:d}=t,f=u&&d,{xSnapped:p,ySnapped:m}=n,{minWidth:h,maxWidth:g,minHeight:_,maxHeight:v}=r,{x:y,y:b,width:x,height:S,aspectRatio:C}=e,w=Math.floor(u?p-e.pointerX:0),T=Math.floor(d?m-e.pointerY:0),E=x+(c?-w:w),D=S+(l?-T:T),O=-a[0]*x,k=-a[1]*S,A=As(E,h,g),j=As(D,_,v);if(o){let e=0,t=0;c&&w<0?e=Os(y+w+O,o[0][0]):!c&&w>0&&(e=ks(y+E+O,o[1][0])),l&&T<0?t=Os(b+T+k,o[0][1]):!l&&T>0&&(t=ks(b+D+k,o[1][1])),A=Math.max(A,e),j=Math.max(j,t)}if(s){let e=0,t=0;c&&w>0?e=ks(y+w,s[0][0]):!c&&w<0&&(e=Os(y+E,s[1][0])),l&&T>0?t=ks(b+T,s[0][1]):!l&&T<0&&(t=Os(b+D,s[1][1])),A=Math.max(A,e),j=Math.max(j,t)}if(i){if(u){let e=As(E/C,_,v)*C;if(A=Math.max(A,e),o){let e=0;e=!c&&!l||c&&!l&&f?ks(b+k+E/C,o[1][1])*C:Os(b+k+(c?w:-w)/C,o[0][1])*C,A=Math.max(A,e)}if(s){let e=0;e=!c&&!l||c&&!l&&f?Os(b+E/C,s[1][1])*C:ks(b+(c?w:-w)/C,s[0][1])*C,A=Math.max(A,e)}}if(d){let e=As(D*C,h,g)/C;if(j=Math.max(j,e),o){let e=0;e=!c&&!l||l&&!c&&f?ks(y+D*C+O,o[1][0])/C:Os(y+(l?T:-T)*C+O,o[0][0])/C,j=Math.max(j,e)}if(s){let e=0;e=!c&&!l||l&&!c&&f?Os(y+D*C,s[1][0])/C:ks(y+(l?T:-T)*C,s[0][0])/C,j=Math.max(j,e)}}}T+=T<0?j:-j,w+=w<0?A:-A,i&&(f?E>D*C?T=(js(c,l)?-w:w)/C:w=(js(c,l)?-T:T)*C:u?(T=w/C,l=c):(w=T*C,c=l));let M=c?y+w:y,N=l?b+T:b;return{width:x+(c?-w:w),height:S+(l?-T:T),x:a[0]*w*(c?-1:1)+M,y:a[1]*T*(l?-1:1)+N}}var Ns={width:0,height:0,x:0,y:0},Ps={...Ns,pointerX:0,pointerY:0,aspectRatio:1};function Fs(e){return[[0,0],[e.measured.width,e.measured.height]]}function Is(e,t,n){let r=t.position.x+e.position.x,i=t.position.y+e.position.y,a=e.measured.width??0,o=e.measured.height??0,s=n[0]*a,c=n[1]*o;return[[r-s,i-c],[r+a-s,i+o-c]]}function Ls({domNode:e,nodeId:t,getStoreItems:n,onChange:r,onEnd:i}){let a=q(e),o={controlDirection:Ds(`bottom-right`),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function s({controlPosition:e,boundaries:s,keepAspectRatio:c,resizeDirection:l,onResizeStart:u,onResize:d,onResizeEnd:f,shouldResize:p}){let m={...Ns},h={...Ps};o={boundaries:s,resizeDirection:l,keepAspectRatio:c,controlDirection:Ds(e)};let g,_=null,v=[],y,b,x,S=!1,C=Nt().on(`start`,e=>{let{nodeLookup:r,transform:i,snapGrid:a,snapToGrid:o,nodeOrigin:s,paneDomNode:c}=n();if(g=r.get(t),!g)return;_=c?.getBoundingClientRect()??null;let{xSnapped:l,ySnapped:d}=Za(e.sourceEvent,{transform:i,snapGrid:a,snapToGrid:o,containerBounds:_});m={width:g.measured.width??0,height:g.measured.height??0,x:g.position.x??0,y:g.position.y??0},h={...m,pointerX:l,pointerY:d,aspectRatio:m.width/m.height},y=void 0,g.parentId&&(g.extent===`parent`||g.expandParent)&&(y=r.get(g.parentId),b=y&&g.extent===`parent`?Fs(y):void 0),v=[],x=void 0;for(let[e,n]of r)if(n.parentId===t&&(v.push({id:e,position:{...n.position},extent:n.extent}),n.extent===`parent`||n.expandParent)){let e=Is(n,g,n.origin??s);x=x?[[Math.min(e[0][0],x[0][0]),Math.min(e[0][1],x[0][1])],[Math.max(e[1][0],x[1][0]),Math.max(e[1][1],x[1][1])]]:e}u?.(e,{...m})}).on(`drag`,e=>{let{transform:t,snapGrid:i,snapToGrid:a,nodeOrigin:s}=n(),c=Za(e.sourceEvent,{transform:t,snapGrid:i,snapToGrid:a,containerBounds:_}),l=[];if(!g)return;let{x:u,y:f,width:C,height:w}=m,T={},E=g.origin??s,{width:D,height:O,x:k,y:A}=Ms(h,o.controlDirection,c,o.boundaries,o.keepAspectRatio,E,b,x),j=D!==C,M=O!==w,N=k!==u&&j,P=A!==f&&M;if(!N&&!P&&!j&&!M)return;if((N||P||E[0]===1||E[1]===1)&&(T.x=N?k:m.x,T.y=P?A:m.y,m.x=T.x,m.y=T.y,v.length>0)){let e=k-u,t=A-f;for(let n of v)n.position={x:n.position.x-e+E[0]*(D-C),y:n.position.y-t+E[1]*(O-w)},l.push(n)}if((j||M)&&(T.width=j&&(!o.resizeDirection||o.resizeDirection===`horizontal`)?D:m.width,T.height=M&&(!o.resizeDirection||o.resizeDirection===`vertical`)?O:m.height,m.width=T.width,m.height=T.height),y&&g.expandParent){let e=E[0]*(T.width??0);T.x&&T.x<e&&(m.x=e,h.x-=T.x-e);let t=E[1]*(T.height??0);T.y&&T.y<t&&(m.y=t,h.y-=T.y-t)}let F=Es({width:m.width,prevWidth:C,height:m.height,prevHeight:w,affectsX:o.controlDirection.affectsX,affectsY:o.controlDirection.affectsY}),I={...m,direction:F};p?.(e,I)!==!1&&(S=!0,d?.(e,I),r(T,l))}).on(`end`,e=>{S&&=(f?.(e,{...m}),i?.({...m}),!1)});a.call(C)}function c(){a.on(`.drag`,null)}return{update:s,destroy:c}}var Rs=t((e=>{var t=n(),r=a();function i(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var o=typeof Object.is==`function`?Object.is:i,s=r.useSyncExternalStore,c=t.useRef,l=t.useEffect,u=t.useMemo,d=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var a=c(null);if(a.current===null){var f={hasValue:!1,value:null};a.current=f}else f=a.current;a=u(function(){function e(e){if(!a){if(a=!0,s=e,e=r(e),i!==void 0&&f.hasValue){var t=f.value;if(i(t,e))return c=t}return c=e}if(t=c,o(s,e))return t;var n=r(e);return i!==void 0&&i(t,n)?(s=e,t):(s=e,c=n)}var a=!1,s,c,l=n===void 0?null:n;return[function(){return e(t())},l===null?void 0:function(){return e(l())}]},[t,n,r,i]);var p=s(e,a[0],a[1]);return l(function(){f.hasValue=!0,f.value=p},[p]),d(p),p}})),zs=e(t(((e,t)=>{t.exports=Rs()}))(),1),Bs=e=>{let t,n=new Set,r=(e,r)=>{let i=typeof e==`function`?e(t):e;if(!Object.is(i,t)){let e=t;t=r??(typeof i!=`object`||!i)?i:Object.assign({},t,i),n.forEach(n=>n(t,e))}},i=()=>t,a={setState:r,getState:i,getInitialState:()=>o,subscribe:e=>(n.add(e),()=>n.delete(e)),destroy:()=>{n.clear()}},o=t=e(r,i,a);return a},Vs=e=>e?Bs(e):Bs,{useDebugValue:Hs}=o.default,{useSyncExternalStoreWithSelector:Us}=zs.default,Ws=e=>e;function Gs(e,t=Ws,n){let r=Us(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return Hs(r),r}var Ks=(e,t)=>{let n=Vs(e),r=(e,r=t)=>Gs(n,e,r);return Object.assign(r,n),r},qs=(e,t)=>e?Ks(e,t):Ks;function Z(e,t){if(Object.is(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(let[n,r]of e)if(!Object.is(r,t.get(n)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}let n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(let r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||!Object.is(e[r],t[r]))return!1;return!0}i();var Js=(0,o.createContext)(null),Ys=Js.Provider,Xs=Zi.error001();function Q(e,t){let n=(0,o.useContext)(Js);if(n===null)throw Error(Xs);return Gs(n,e,t)}function $(){let e=(0,o.useContext)(Js);if(e===null)throw Error(Xs);return(0,o.useMemo)(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}var Zs={display:`none`},Qs={position:`absolute`,width:1,height:1,margin:-1,border:0,padding:0,overflow:`hidden`,clip:`rect(0px, 0px, 0px, 0px)`,clipPath:`inset(100%)`},$s=`react-flow__node-desc`,ec=`react-flow__edge-desc`,tc=`react-flow__aria-live`,nc=e=>e.ariaLiveMessage,rc=e=>e.ariaLabelConfig;function ic({rfId:e}){let t=Q(nc);return(0,s.jsx)(`div`,{id:`${tc}-${e}`,"aria-live":`assertive`,"aria-atomic":`true`,style:Qs,children:t})}function ac({rfId:e,disableKeyboardA11y:t}){let n=Q(rc);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(`div`,{id:`${$s}-${e}`,style:Zs,children:t?n[`node.a11yDescription.default`]:n[`node.a11yDescription.keyboardDisabled`]}),(0,s.jsx)(`div`,{id:`${ec}-${e}`,style:Zs,children:n[`edge.a11yDescription.default`]}),!t&&(0,s.jsx)(ic,{rfId:e})]})}var oc=(0,o.forwardRef)(({position:e=`top-left`,children:t,className:n,style:r,...i},a)=>(0,s.jsx)(`div`,{className:c([`react-flow__panel`,n,...`${e}`.split(`-`)]),style:r,ref:a,...i,children:t}));oc.displayName=`Panel`;function sc({proOptions:e,position:t=`bottom-right`}){return e?.hideAttribution?null:(0,s.jsx)(oc,{position:t,className:`react-flow__attribution`,"data-message":`Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev`,children:(0,s.jsx)(`a`,{href:`https://reactflow.dev`,target:`_blank`,rel:`noopener noreferrer`,"aria-label":`React Flow attribution`,children:`React Flow`})})}var cc=e=>{let t=[],n=[];for(let[,n]of e.nodeLookup)n.selected&&t.push(n.internals.userNode);for(let[,t]of e.edgeLookup)t.selected&&n.push(t);return{selectedNodes:t,selectedEdges:n}},lc=e=>e.id;function uc(e,t){return Z(e.selectedNodes.map(lc),t.selectedNodes.map(lc))&&Z(e.selectedEdges.map(lc),t.selectedEdges.map(lc))}function dc({onSelectionChange:e}){let t=$(),{selectedNodes:n,selectedEdges:r}=Q(cc,uc);return(0,o.useEffect)(()=>{let i={nodes:n,edges:r};e?.(i),t.getState().onSelectionChangeHandlers.forEach(e=>e(i))},[n,r,e]),null}var fc=e=>!!e.onSelectionChangeHandlers;function pc({onSelectionChange:e}){let t=Q(fc);return e||t?(0,s.jsx)(dc,{onSelectionChange:e}):null}var mc=typeof window<`u`?o.useLayoutEffect:o.useEffect,hc=[0,0],gc={x:0,y:0,zoom:1},_c=[...`nodes.edges.defaultNodes.defaultEdges.onConnect.onConnectStart.onConnectEnd.onClickConnectStart.onClickConnectEnd.nodesDraggable.autoPanOnNodeFocus.nodesConnectable.nodesFocusable.edgesFocusable.edgesReconnectable.elevateNodesOnSelect.elevateEdgesOnSelect.minZoom.maxZoom.nodeExtent.onNodesChange.onEdgesChange.elementsSelectable.connectionMode.snapGrid.snapToGrid.translateExtent.connectOnClick.defaultEdgeOptions.fitView.fitViewOptions.onNodesDelete.onEdgesDelete.onDelete.onNodeDrag.onNodeDragStart.onNodeDragStop.onSelectionDrag.onSelectionDragStart.onSelectionDragStop.onMoveStart.onMove.onMoveEnd.noPanClassName.nodeOrigin.autoPanOnConnect.autoPanOnNodeDrag.onError.connectionRadius.isValidConnection.selectNodesOnDrag.nodeDragThreshold.connectionDragThreshold.onBeforeDelete.debug.autoPanSpeed.ariaLabelConfig.zIndexMode`.split(`.`),`rfId`],vc=e=>({setNodes:e.setNodes,setEdges:e.setEdges,setMinZoom:e.setMinZoom,setMaxZoom:e.setMaxZoom,setTranslateExtent:e.setTranslateExtent,setNodeExtent:e.setNodeExtent,reset:e.reset,setDefaultNodesAndEdges:e.setDefaultNodesAndEdges}),yc={translateExtent:Qi,nodeOrigin:hc,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:`nopan`,rfId:`1`};function bc(e){let{setNodes:t,setEdges:n,setMinZoom:r,setMaxZoom:i,setTranslateExtent:a,setNodeExtent:s,reset:c,setDefaultNodesAndEdges:l}=Q(vc,Z),u=$();mc(()=>(l(e.defaultNodes,e.defaultEdges),()=>{d.current=yc,c()}),[]);let d=(0,o.useRef)(yc);return mc(()=>{for(let o of _c){let c=e[o];c!==d.current[o]&&e[o]!==void 0&&(o===`nodes`?t(c):o===`edges`?n(c):o===`minZoom`?r(c):o===`maxZoom`?i(c):o===`translateExtent`?a(c):o===`nodeExtent`?s(c):o===`ariaLabelConfig`?u.setState({ariaLabelConfig:Xa(c)}):o===`fitView`?u.setState({fitViewQueued:c}):o===`fitViewOptions`?u.setState({fitViewOptions:c}):u.setState({[o]:c}))}d.current=e},_c.map(t=>e[t])),null}function xc(){return typeof window>`u`||!window.matchMedia?null:window.matchMedia(`(prefers-color-scheme: dark)`)}function Sc(e){let[t,n]=(0,o.useState)(e===`system`?null:e);return(0,o.useEffect)(()=>{if(e!==`system`){n(e);return}let t=xc(),r=()=>n(t?.matches?`dark`:`light`);return r(),t?.addEventListener(`change`,r),()=>{t?.removeEventListener(`change`,r)}},[e]),t===null?xc()?.matches?`dark`:`light`:t}var Cc=typeof document<`u`?document:null;function wc(e=null,t={target:Cc,actInsideInputWithModifier:!0}){let[n,r]=(0,o.useState)(!1),i=(0,o.useRef)(!1),a=(0,o.useRef)(new Set([])),[s,c]=(0,o.useMemo)(()=>{if(e!==null){let t=(Array.isArray(e)?e:[e]).filter(e=>typeof e==`string`).map(e=>e.replace(`+`,`-`).replace(`--`,`-+`).split(`-`));return[t,t.reduce((e,t)=>e.concat(...t),[])]}return[[],[]]},[e]);return(0,o.useEffect)(()=>{let n=t?.target??Cc,o=t?.actInsideInputWithModifier??!0;if(e!==null){let e=e=>{if(i.current=e.ctrlKey||e.metaKey||e.shiftKey||e.altKey,(!i.current||i.current&&!o)&&to(e))return!1;let n=Ec(e.code,c);if(a.current.add(e[n]),Tc(s,a.current,!1)){let n=e.composedPath?.()?.[0]||e.target,a=n?.nodeName===`BUTTON`||n?.nodeName===`A`;t.preventDefault!==!1&&(i.current||!a)&&e.preventDefault(),r(!0)}},l=e=>{let t=Ec(e.code,c);Tc(s,a.current,!0)?(r(!1),a.current.clear()):a.current.delete(e[t]),e.key===`Meta`&&a.current.clear(),i.current=!1},u=()=>{a.current.clear(),r(!1)};return n?.addEventListener(`keydown`,e),n?.addEventListener(`keyup`,l),window.addEventListener(`blur`,u),window.addEventListener(`contextmenu`,u),()=>{n?.removeEventListener(`keydown`,e),n?.removeEventListener(`keyup`,l),window.removeEventListener(`blur`,u),window.removeEventListener(`contextmenu`,u)}}},[e,r]),n}function Tc(e,t,n){return e.filter(e=>n||e.length===t.size).some(e=>e.every(e=>t.has(e)))}function Ec(e,t){return t.includes(e)?`code`:`key`}var Dc=()=>{let e=$();return(0,o.useMemo)(()=>({zoomIn:t=>{let{panZoom:n}=e.getState();return n?n.scaleBy(1.2,t):Promise.resolve(!1)},zoomOut:t=>{let{panZoom:n}=e.getState();return n?n.scaleBy(1/1.2,t):Promise.resolve(!1)},zoomTo:(t,n)=>{let{panZoom:r}=e.getState();return r?r.scaleTo(t,n):Promise.resolve(!1)},getZoom:()=>e.getState().transform[2],setViewport:async(t,n)=>{let{transform:[r,i,a],panZoom:o}=e.getState();return o?(await o.setViewport({x:t.x??r,y:t.y??i,zoom:t.zoom??a},n),Promise.resolve(!0)):Promise.resolve(!1)},getViewport:()=>{let[t,n,r]=e.getState().transform;return{x:t,y:n,zoom:r}},setCenter:async(t,n,r)=>e.getState().setCenter(t,n,r),fitBounds:async(t,n)=>{let{width:r,height:i,minZoom:a,maxZoom:o,panZoom:s}=e.getState(),c=Ha(t,r,i,a,o,n?.padding??.1);return s?(await s.setViewport(c,{duration:n?.duration,ease:n?.ease,interpolate:n?.interpolate}),Promise.resolve(!0)):Promise.resolve(!1)},screenToFlowPosition:(t,n={})=>{let{transform:r,snapGrid:i,snapToGrid:a,domNode:o}=e.getState();if(!o)return t;let{x:s,y:c}=o.getBoundingClientRect(),l={x:t.x-s,y:t.y-c},u=n.snapGrid??i;return La(l,r,n.snapToGrid??a,u)},flowToScreenPosition:t=>{let{transform:n,domNode:r}=e.getState();if(!r)return t;let{x:i,y:a}=r.getBoundingClientRect(),o=Ra(t,n);return{x:o.x+i,y:o.y+a}}}),[])};function Oc(e,t){let n=[],r=new Map,i=[];for(let t of e)if(t.type===`add`){i.push(t);continue}else if(t.type===`remove`||t.type===`replace`)r.set(t.id,[t]);else{let e=r.get(t.id);e?e.push(t):r.set(t.id,[t])}for(let e of t){let t=r.get(e.id);if(!t){n.push(e);continue}if(t[0].type===`remove`)continue;if(t[0].type===`replace`){n.push({...t[0].item});continue}let i={...e};for(let e of t)kc(e,i);n.push(i)}return i.length&&i.forEach(e=>{e.index===void 0?n.push({...e.item}):n.splice(e.index,0,{...e.item})}),n}function kc(e,t){switch(e.type){case`select`:t.selected=e.selected;break;case`position`:e.position!==void 0&&(t.position=e.position),e.dragging!==void 0&&(t.dragging=e.dragging);break;case`dimensions`:e.dimensions!==void 0&&(t.measured={...e.dimensions},e.setAttributes&&((e.setAttributes===!0||e.setAttributes===`width`)&&(t.width=e.dimensions.width),(e.setAttributes===!0||e.setAttributes===`height`)&&(t.height=e.dimensions.height))),typeof e.resizing==`boolean`&&(t.resizing=e.resizing);break}}function Ac(e,t){return Oc(e,t)}function jc(e,t){return Oc(e,t)}function Mc(e,t){return{id:e,type:`select`,selected:t}}function Nc(e,t=new Set,n=!1){let r=[];for(let[i,a]of e){let e=t.has(i);!(a.selected===void 0&&!e)&&a.selected!==e&&(n&&(a.selected=e),r.push(Mc(a.id,e)))}return r}function Pc({items:e=[],lookup:t}){let n=[],r=new Map(e.map(e=>[e.id,e]));for(let[r,i]of e.entries()){let e=t.get(i.id),a=e?.internals?.userNode??e;a!==void 0&&a!==i&&n.push({id:i.id,item:i,type:`replace`}),a===void 0&&n.push({item:i,type:`add`,index:r})}for(let[e]of t)r.get(e)===void 0&&n.push({id:e,type:`remove`});return n}function Fc(e){return{id:e.id,type:`remove`}}var Ic=e=>ua(e),Lc=e=>la(e);function Rc(e){return(0,o.forwardRef)(e)}function zc(e){let[t,n]=(0,o.useState)(BigInt(0)),[r]=(0,o.useState)(()=>Bc(()=>n(e=>e+BigInt(1))));return mc(()=>{let t=r.get();t.length&&(e(t),r.reset())},[t]),r}function Bc(e){let t=[];return{get:()=>t,reset:()=>{t=[]},push:n=>{t.push(n),e()}}}var Vc=(0,o.createContext)(null);function Hc({children:e}){let t=$(),n=zc((0,o.useCallback)(e=>{let{nodes:n=[],setNodes:r,hasDefaultNodes:i,onNodesChange:a,nodeLookup:o,fitViewQueued:s,onNodesChangeMiddlewareMap:c}=t.getState(),l=n;for(let t of e)l=typeof t==`function`?t(l):t;let u=Pc({items:l,lookup:o});for(let e of c.values())u=e(u);i&&r(l),u.length>0?a?.(u):s&&window.requestAnimationFrame(()=>{let{fitViewQueued:e,nodes:n,setNodes:r}=t.getState();e&&r(n)})},[])),r=zc((0,o.useCallback)(e=>{let{edges:n=[],setEdges:r,hasDefaultEdges:i,onEdgesChange:a,edgeLookup:o}=t.getState(),s=n;for(let t of e)s=typeof t==`function`?t(s):t;i?r(s):a&&a(Pc({items:s,lookup:o}))},[])),i=(0,o.useMemo)(()=>({nodeQueue:n,edgeQueue:r}),[]);return(0,s.jsx)(Vc.Provider,{value:i,children:e})}function Uc(){let e=(0,o.useContext)(Vc);if(!e)throw Error(`useBatchContext must be used within a BatchProvider`);return e}var Wc=e=>!!e.panZoom;function Gc(){let e=Dc(),t=$(),n=Uc(),r=Q(Wc),i=(0,o.useMemo)(()=>{let e=e=>t.getState().nodeLookup.get(e),r=e=>{n.nodeQueue.push(e)},i=e=>{n.edgeQueue.push(e)},a=e=>{let{nodeLookup:n,nodeOrigin:r}=t.getState(),i=Ic(e)?e:n.get(e.id),a=i.parentId?qa(i.position,i.measured,i.parentId,n,r):i.position;return ka({...i,position:a,width:i.measured?.width??i.width,height:i.measured?.height??i.height})},o=(e,t,n={replace:!1})=>{r(r=>r.map(r=>{if(r.id===e){let e=typeof t==`function`?t(r):t;return n.replace&&Ic(e)?e:{...r,...e}}return r}))},s=(e,t,n={replace:!1})=>{i(r=>r.map(r=>{if(r.id===e){let e=typeof t==`function`?t(r):t;return n.replace&&Lc(e)?e:{...r,...e}}return r}))};return{getNodes:()=>t.getState().nodes.map(e=>({...e})),getNode:t=>e(t)?.internals.userNode,getInternalNode:e,getEdges:()=>{let{edges:e=[]}=t.getState();return e.map(e=>({...e}))},getEdge:e=>t.getState().edgeLookup.get(e),setNodes:r,setEdges:i,addNodes:e=>{let t=Array.isArray(e)?e:[e];n.nodeQueue.push(e=>[...e,...t])},addEdges:e=>{let t=Array.isArray(e)?e:[e];n.edgeQueue.push(e=>[...e,...t])},toObject:()=>{let{nodes:e=[],edges:n=[],transform:r}=t.getState(),[i,a,o]=r;return{nodes:e.map(e=>({...e})),edges:n.map(e=>({...e})),viewport:{x:i,y:a,zoom:o}}},deleteElements:async({nodes:e=[],edges:n=[]})=>{let{nodes:r,edges:i,onNodesDelete:a,onEdgesDelete:o,triggerNodeChanges:s,triggerEdgeChanges:c,onDelete:l,onBeforeDelete:u}=t.getState(),{nodes:d,edges:f}=await ba({nodesToRemove:e,edgesToRemove:n,nodes:r,edges:i,onBeforeDelete:u}),p=f.length>0,m=d.length>0;if(p){let e=f.map(Fc);o?.(f),c(e)}if(m){let e=d.map(Fc);a?.(d),s(e)}return(m||p)&&l?.({nodes:d,edges:f}),{deletedNodes:d,deletedEdges:f}},getIntersectingNodes:(e,n=!0,r)=>{let i=Na(e),o=i?e:a(e),s=r!==void 0;return o?(r||t.getState().nodes).filter(r=>{let a=t.getState().nodeLookup.get(r.id);if(a&&!i&&(r.id===e.id||!a.internals.positionAbsolute))return!1;let c=ka(s?r:a),l=Ma(c,o);return n&&l>0||l>=c.width*c.height||l>=o.width*o.height}):[]},isNodeIntersecting:(e,t,n=!0)=>{let r=Na(e)?e:a(e);if(!r)return!1;let i=Ma(r,t);return n&&i>0||i>=t.width*t.height||i>=r.width*r.height},updateNode:o,updateNodeData:(e,t,n={replace:!1})=>{o(e,e=>{let r=typeof t==`function`?t(e):t;return n.replace?{...e,data:r}:{...e,data:{...e.data,...r}}},n)},updateEdge:s,updateEdgeData:(e,t,n={replace:!1})=>{s(e,e=>{let r=typeof t==`function`?t(e):t;return n.replace?{...e,data:r}:{...e,data:{...e.data,...r}}},n)},getNodesBounds:e=>{let{nodeLookup:n,nodeOrigin:r}=t.getState();return pa(e,{nodeLookup:n,nodeOrigin:r})},getHandleConnections:({type:e,id:n,nodeId:r})=>Array.from(t.getState().connectionLookup.get(`${r}-${e}${n?`-${n}`:``}`)?.values()??[]),getNodeConnections:({type:e,handleId:n,nodeId:r})=>Array.from(t.getState().connectionLookup.get(`${r}${e?n?`-${e}-${n}`:`-${e}`:``}`)?.values()??[]),fitView:async e=>{let r=t.getState().fitViewResolver??Ya();return t.setState({fitViewQueued:!0,fitViewOptions:e,fitViewResolver:r}),n.nodeQueue.push(e=>[...e]),r.promise}}},[]);return(0,o.useMemo)(()=>({...i,...e,viewportInitialized:r}),[r])}var Kc=e=>e.selected,qc=typeof window<`u`?window:void 0;function Jc({deleteKeyCode:e,multiSelectionKeyCode:t}){let n=$(),{deleteElements:r}=Gc(),i=wc(e,{actInsideInputWithModifier:!1}),a=wc(t,{target:qc});(0,o.useEffect)(()=>{if(i){let{edges:e,nodes:t}=n.getState();r({nodes:t.filter(Kc),edges:e.filter(Kc)}),n.setState({nodesSelectionActive:!1})}},[i]),(0,o.useEffect)(()=>{n.setState({multiSelectionActive:a})},[a])}function Yc(e){let t=$();(0,o.useEffect)(()=>{let n=()=>{if(!e.current||!(e.current.checkVisibility?.()??!0))return!1;let n=Qa(e.current);(n.height===0||n.width===0)&&t.getState().onError?.(`004`,Zi.error004()),t.setState({width:n.width||500,height:n.height||500})};if(e.current){n(),window.addEventListener(`resize`,n);let t=new ResizeObserver(()=>n());return t.observe(e.current),()=>{window.removeEventListener(`resize`,n),t&&e.current&&t.unobserve(e.current)}}},[])}var Xc={position:`absolute`,width:`100%`,height:`100%`,top:0,left:0},Zc=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function Qc({onPaneContextMenu:e,zoomOnScroll:t=!0,zoomOnPinch:n=!0,panOnScroll:r=!1,panOnScrollSpeed:i=.5,panOnScrollMode:a=na.Free,zoomOnDoubleClick:c=!0,panOnDrag:l=!0,defaultViewport:u,translateExtent:d,minZoom:f,maxZoom:p,zoomActivationKeyCode:m,preventScrolling:h=!0,children:g,noWheelClassName:_,noPanClassName:v,onViewportChange:y,isControlledViewport:b,paneClickDistance:x,selectionOnDrag:S}){let C=$(),w=(0,o.useRef)(null),{userSelectionActive:T,lib:E,connectionInProgress:D}=Q(Zc,Z),O=wc(m),k=(0,o.useRef)();Yc(w);let A=(0,o.useCallback)(e=>{y?.({x:e[0],y:e[1],zoom:e[2]}),b||C.setState({transform:e})},[y,b]);return(0,o.useEffect)(()=>{if(w.current){k.current=ws({domNode:w.current,minZoom:f,maxZoom:p,translateExtent:d,viewport:u,onDraggingChange:e=>C.setState(t=>t.paneDragging===e?t:{paneDragging:e}),onPanZoomStart:(e,t)=>{let{onViewportChangeStart:n,onMoveStart:r}=C.getState();r?.(e,t),n?.(t)},onPanZoom:(e,t)=>{let{onViewportChange:n,onMove:r}=C.getState();r?.(e,t),n?.(t)},onPanZoomEnd:(e,t)=>{let{onViewportChangeEnd:n,onMoveEnd:r}=C.getState();r?.(e,t),n?.(t)}});let{x:e,y:t,zoom:n}=k.current.getViewport();return C.setState({panZoom:k.current,transform:[e,t,n],domNode:w.current.closest(`.react-flow`)}),()=>{k.current?.destroy()}}},[]),(0,o.useEffect)(()=>{k.current?.update({onPaneContextMenu:e,zoomOnScroll:t,zoomOnPinch:n,panOnScroll:r,panOnScrollSpeed:i,panOnScrollMode:a,zoomOnDoubleClick:c,panOnDrag:l,zoomActivationKeyPressed:O,preventScrolling:h,noPanClassName:v,userSelectionActive:T,noWheelClassName:_,lib:E,onTransformChange:A,connectionInProgress:D,selectionOnDrag:S,paneClickDistance:x})},[e,t,n,r,i,a,c,l,O,h,v,T,_,E,A,D,S,x]),(0,s.jsx)(`div`,{className:`react-flow__renderer`,ref:w,style:Xc,children:g})}var $c=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function el(){let{userSelectionActive:e,userSelectionRect:t}=Q($c,Z);return e&&t?(0,s.jsx)(`div`,{className:`react-flow__selection react-flow__container`,style:{width:t.width,height:t.height,transform:`translate(${t.x}px, ${t.y}px)`}}):null}var tl=(e,t)=>n=>{n.target===t.current&&e?.(n)},nl=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,connectionInProgress:e.connection.inProgress,dragging:e.paneDragging});function rl({isSelecting:e,selectionKeyPressed:t,selectionMode:n=ra.Full,panOnDrag:r,paneClickDistance:i,selectionOnDrag:a,onSelectionStart:l,onSelectionEnd:u,onPaneClick:d,onPaneContextMenu:f,onPaneScroll:p,onPaneMouseEnter:m,onPaneMouseMove:h,onPaneMouseLeave:g,children:_}){let v=$(),{userSelectionActive:y,elementsSelectable:b,dragging:x,connectionInProgress:S}=Q(nl,Z),C=b&&(e||y),w=(0,o.useRef)(null),T=(0,o.useRef)(),E=(0,o.useRef)(new Set),D=(0,o.useRef)(new Set),O=(0,o.useRef)(!1),k=e=>{if(O.current||S){O.current=!1;return}d?.(e),v.getState().resetSelectedElements(),v.setState({nodesSelectionActive:!1})},A=e=>{if(Array.isArray(r)&&r?.includes(2)){e.preventDefault();return}f?.(e)},j=p?e=>p(e):void 0;return(0,s.jsxs)(`div`,{className:c([`react-flow__pane`,{draggable:r===!0||Array.isArray(r)&&r.includes(0),dragging:x,selection:e}]),onClick:C?void 0:tl(k,w),onContextMenu:tl(A,w),onWheel:tl(j,w),onPointerEnter:C?void 0:m,onPointerMove:C?e=>{let{userSelectionRect:r,transform:a,nodeLookup:o,edgeLookup:s,connectionLookup:c,triggerNodeChanges:u,triggerEdgeChanges:d,defaultEdgeOptions:f,resetSelectedElements:p}=v.getState();if(!T.current||!r)return;let{x:m,y:h}=ro(e.nativeEvent,T.current),{startX:g,startY:_}=r;if(!O.current){let n=t?0:i;if(Math.hypot(m-g,h-_)<=n)return;p(),l?.(e)}O.current=!0;let y={startX:g,startY:_,x:m<g?m:g,y:h<_?h:_,width:Math.abs(m-g),height:Math.abs(h-_)},b=E.current,x=D.current;E.current=new Set(ha(o,y,a,n===ra.Partial,!0).map(e=>e.id)),D.current=new Set;let S=f?.selectable??!0;for(let e of E.current){let t=c.get(e);if(t)for(let{edgeId:e}of t.values()){let t=s.get(e);t&&(t.selectable??S)&&D.current.add(e)}}Ja(b,E.current)||u(Nc(o,E.current,!0)),Ja(x,D.current)||d(Nc(s,D.current)),v.setState({userSelectionRect:y,userSelectionActive:!0,nodesSelectionActive:!1})}:h,onPointerUp:C?e=>{e.button===0&&(e.target?.releasePointerCapture?.(e.pointerId),!y&&e.target===w.current&&v.getState().userSelectionRect&&k?.(e),v.setState({userSelectionActive:!1,userSelectionRect:null}),O.current&&(u?.(e),v.setState({nodesSelectionActive:E.current.size>0})))}:void 0,onPointerDownCapture:C?n=>{let{domNode:r}=v.getState();if(T.current=r?.getBoundingClientRect(),!T.current)return;let i=n.target===w.current;if(!i&&n.target.closest(`.nokey`)||!e||!(a&&i||t)||n.button!==0||!n.isPrimary)return;n.target?.setPointerCapture?.(n.pointerId),O.current=!1;let{x:o,y:s}=ro(n.nativeEvent,T.current);v.setState({userSelectionRect:{width:0,height:0,startX:o,startY:s,x:o,y:s}}),i||(n.stopPropagation(),n.preventDefault())}:void 0,onClickCapture:C?e=>{O.current&&=(e.stopPropagation(),!1)}:void 0,onPointerLeave:g,ref:w,style:Xc,children:[_,(0,s.jsx)(el,{})]})}function il({id:e,store:t,unselect:n=!1,nodeRef:r}){let{addSelectedNodes:i,unselectNodesAndEdges:a,multiSelectionActive:o,nodeLookup:s,onError:c}=t.getState(),l=s.get(e);if(!l){c?.(`012`,Zi.error012(e));return}t.setState({nodesSelectionActive:!1}),l.selected?(n||l.selected&&o)&&(a({nodes:[l],edges:[]}),requestAnimationFrame(()=>r?.current?.blur())):i([e])}function al({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:r,nodeId:i,isSelectable:a,nodeClickDistance:s}){let c=$(),[l,u]=(0,o.useState)(!1),d=(0,o.useRef)();return(0,o.useEffect)(()=>{d.current=$o({getStoreItems:()=>c.getState(),onNodeMouseDown:t=>{il({id:t,store:c,nodeRef:e})},onDragStart:()=>{u(!0)},onDragStop:()=>{u(!1)}})},[]),(0,o.useEffect)(()=>{if(!(t||!e.current||!d.current))return d.current.update({noDragClassName:n,handleSelector:r,domNode:e.current,isSelectable:a,nodeId:i,nodeClickDistance:s}),()=>{d.current?.destroy()}},[n,r,t,a,e,i,s]),l}var ol=e=>t=>t.selected&&(t.draggable||e&&t.draggable===void 0);function sl(){let e=$();return(0,o.useCallback)(t=>{let{nodeExtent:n,snapToGrid:r,snapGrid:i,nodesDraggable:a,onError:o,updateNodePositions:s,nodeLookup:c,nodeOrigin:l}=e.getState(),u=new Map,d=ol(a),f=r?i[0]:5,p=r?i[1]:5,m=t.direction.x*f*t.factor,h=t.direction.y*p*t.factor;for(let[,e]of c){if(!d(e))continue;let t={x:e.internals.positionAbsolute.x+m,y:e.internals.positionAbsolute.y+h};r&&(t=Ia(t,i));let{position:a,positionAbsolute:s}=ya({nodeId:e.id,nextPosition:t,nodeLookup:c,nodeExtent:n,nodeOrigin:l,onError:o});e.position=a,e.internals.positionAbsolute=s,u.set(e.id,e)}s(u)},[])}var cl=(0,o.createContext)(null),ll=cl.Provider;cl.Consumer;var ul=()=>(0,o.useContext)(cl),dl=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),fl=(e,t,n)=>r=>{let{connectionClickStartHandle:i,connectionMode:a,connection:o}=r,{fromHandle:s,toHandle:c,isValid:l}=o,u=c?.nodeId===e&&c?.id===t&&c?.type===n;return{connectingFrom:s?.nodeId===e&&s?.id===t&&s?.type===n,connectingTo:u,clickConnecting:i?.nodeId===e&&i?.id===t&&i?.type===n,isPossibleEndHandle:a===ta.Strict?s?.type!==n:e!==s?.nodeId||t!==s?.id,connectionInProcess:!!s,clickConnectionInProcess:!!i,valid:u&&l}};function pl({type:e=`source`,position:t=X.Top,isValidConnection:n,isConnectable:r=!0,isConnectableStart:i=!0,isConnectableEnd:a=!0,id:o,onConnect:l,children:u,className:d,onMouseDown:f,onTouchStart:p,...m},h){let g=o||null,_=e===`target`,v=$(),y=ul(),{connectOnClick:b,noPanClassName:x,rfId:S}=Q(dl,Z),{connectingFrom:C,connectingTo:w,clickConnecting:T,isPossibleEndHandle:E,connectionInProcess:D,clickConnectionInProcess:O,valid:k}=Q(fl(y,g,e),Z);y||v.getState().onError?.(`010`,Zi.error010());let A=e=>{let{defaultEdgeOptions:t,onConnect:n,hasDefaultEdges:r}=v.getState(),i={...t,...e};if(r){let{edges:e,setEdges:t}=v.getState();t(ho(i,e))}n?.(i),l?.(i)},j=e=>{if(!y)return;let t=no(e.nativeEvent);if(i&&(t&&e.button===0||!t)){let t=v.getState();ls.onPointerDown(e.nativeEvent,{handleDomNode:e.currentTarget,autoPanOnConnect:t.autoPanOnConnect,connectionMode:t.connectionMode,connectionRadius:t.connectionRadius,domNode:t.domNode,nodeLookup:t.nodeLookup,lib:t.lib,isTarget:_,handleId:g,nodeId:y,flowId:t.rfId,panBy:t.panBy,cancelConnection:t.cancelConnection,onConnectStart:t.onConnectStart,onConnectEnd:(...e)=>v.getState().onConnectEnd?.(...e),updateConnection:t.updateConnection,onConnect:A,isValidConnection:n||((...e)=>v.getState().isValidConnection?.(...e)??!0),getTransform:()=>v.getState().transform,getFromHandle:()=>v.getState().connection.fromHandle,autoPanSpeed:t.autoPanSpeed,dragThreshold:t.connectionDragThreshold})}t?f?.(e):p?.(e)},M=t=>{let{onClickConnectStart:r,onClickConnectEnd:a,connectionClickStartHandle:o,connectionMode:s,isValidConnection:c,lib:l,rfId:u,nodeLookup:d,connection:f}=v.getState();if(!y||!o&&!i)return;if(!o){r?.(t.nativeEvent,{nodeId:y,handleId:g,handleType:e}),v.setState({connectionClickStartHandle:{nodeId:y,type:e,id:g}});return}let p=$a(t.target),m=n||c,{connection:h,isValid:_}=ls.isValid(t.nativeEvent,{handle:{nodeId:y,id:g,type:e},connectionMode:s,fromNodeId:o.nodeId,fromHandleId:o.id||null,fromType:o.type,isValidConnection:m,flowId:u,doc:p,lib:l,nodeLookup:d});_&&h&&A(h);let b=structuredClone(f);delete b.inProgress,b.toPosition=b.toHandle?b.toHandle.position:null,a?.(t,b),v.setState({connectionClickStartHandle:null})};return(0,s.jsx)(`div`,{"data-handleid":g,"data-nodeid":y,"data-handlepos":t,"data-id":`${S}-${y}-${g}-${e}`,className:c([`react-flow__handle`,`react-flow__handle-${t}`,`nodrag`,x,d,{source:!_,target:_,connectable:r,connectablestart:i,connectableend:a,clickconnecting:T,connectingfrom:C,connectingto:w,valid:k,connectionindicator:r&&(!D||E)&&(D||O?a:i)}]),onMouseDown:j,onTouchStart:j,onClick:b?M:void 0,ref:h,...m,children:u})}var ml=(0,o.memo)(Rc(pl));function hl({data:e,isConnectable:t,sourcePosition:n=X.Bottom}){return(0,s.jsxs)(s.Fragment,{children:[e?.label,(0,s.jsx)(ml,{type:`source`,position:n,isConnectable:t})]})}function gl({data:e,isConnectable:t,targetPosition:n=X.Top,sourcePosition:r=X.Bottom}){return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(ml,{type:`target`,position:n,isConnectable:t}),e?.label,(0,s.jsx)(ml,{type:`source`,position:r,isConnectable:t})]})}function _l(){return null}function vl({data:e,isConnectable:t,targetPosition:n=X.Top}){return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(ml,{type:`target`,position:n,isConnectable:t}),e?.label]})}var yl={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},bl={input:hl,default:gl,output:vl,group:_l};function xl(e){return e.internals.handleBounds===void 0?{width:e.width??e.initialWidth??e.style?.width,height:e.height??e.initialHeight??e.style?.height}:{width:e.width??e.style?.width,height:e.height??e.style?.height}}var Sl=e=>{let{width:t,height:n,x:r,y:i}=ma(e.nodeLookup,{filter:e=>!!e.selected});return{width:Pa(t)?t:null,height:Pa(n)?n:null,userSelectionActive:e.userSelectionActive,transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]}) translate(${r}px,${i}px)`}};function Cl({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){let r=$(),{width:i,height:a,transformString:l,userSelectionActive:u}=Q(Sl,Z),d=sl(),f=(0,o.useRef)(null);(0,o.useEffect)(()=>{n||f.current?.focus({preventScroll:!0})},[n]);let p=!u&&i!==null&&a!==null;if(al({nodeRef:f,disabled:!p}),!p)return null;let m=e?t=>{e(t,r.getState().nodes.filter(e=>e.selected))}:void 0;return(0,s.jsx)(`div`,{className:c([`react-flow__nodesselection`,`react-flow__container`,t]),style:{transform:l},children:(0,s.jsx)(`div`,{ref:f,className:`react-flow__nodesselection-rect`,onContextMenu:m,tabIndex:n?void 0:-1,onKeyDown:n?void 0:e=>{Object.prototype.hasOwnProperty.call(yl,e.key)&&(e.preventDefault(),d({direction:yl[e.key],factor:e.shiftKey?4:1}))},style:{width:i,height:a}})})}var wl=typeof window<`u`?window:void 0,Tl=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function El({children:e,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:i,onPaneContextMenu:a,onPaneScroll:o,paneClickDistance:c,deleteKeyCode:l,selectionKeyCode:u,selectionOnDrag:d,selectionMode:f,onSelectionStart:p,onSelectionEnd:m,multiSelectionKeyCode:h,panActivationKeyCode:g,zoomActivationKeyCode:_,elementsSelectable:v,zoomOnScroll:y,zoomOnPinch:b,panOnScroll:x,panOnScrollSpeed:S,panOnScrollMode:C,zoomOnDoubleClick:w,panOnDrag:T,defaultViewport:E,translateExtent:D,minZoom:O,maxZoom:k,preventScrolling:A,onSelectionContextMenu:j,noWheelClassName:M,noPanClassName:N,disableKeyboardA11y:P,onViewportChange:F,isControlledViewport:I}){let{nodesSelectionActive:L,userSelectionActive:R}=Q(Tl,Z),z=wc(u,{target:wl}),B=wc(g,{target:wl}),V=B||T,H=B||x,U=d&&V!==!0,W=z||R||U;return Jc({deleteKeyCode:l,multiSelectionKeyCode:h}),(0,s.jsx)(Qc,{onPaneContextMenu:a,elementsSelectable:v,zoomOnScroll:y,zoomOnPinch:b,panOnScroll:H,panOnScrollSpeed:S,panOnScrollMode:C,zoomOnDoubleClick:w,panOnDrag:!z&&V,defaultViewport:E,translateExtent:D,minZoom:O,maxZoom:k,zoomActivationKeyCode:_,preventScrolling:A,noWheelClassName:M,noPanClassName:N,onViewportChange:F,isControlledViewport:I,paneClickDistance:c,selectionOnDrag:U,children:(0,s.jsxs)(rl,{onSelectionStart:p,onSelectionEnd:m,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:i,onPaneContextMenu:a,onPaneScroll:o,panOnDrag:V,isSelecting:!!W,selectionMode:f,selectionKeyPressed:z,paneClickDistance:c,selectionOnDrag:U,children:[e,L&&(0,s.jsx)(Cl,{onSelectionContextMenu:j,noPanClassName:N,disableKeyboardA11y:P})]})})}El.displayName=`FlowRenderer`;var Dl=(0,o.memo)(El),Ol=e=>t=>e?ha(t.nodeLookup,{x:0,y:0,width:t.width,height:t.height},t.transform,!0).map(e=>e.id):Array.from(t.nodeLookup.keys());function kl(e){return Q((0,o.useCallback)(Ol(e),[e]),Z)}var Al=e=>e.updateNodeInternals;function jl(){let e=Q(Al),[t]=(0,o.useState)(()=>typeof ResizeObserver>`u`?null:new ResizeObserver(t=>{let n=new Map;t.forEach(e=>{let t=e.target.getAttribute(`data-id`);n.set(t,{id:t,nodeElement:e.target,force:!0})}),e(n)}));return(0,o.useEffect)(()=>()=>{t?.disconnect()},[t]),t}function Ml({node:e,nodeType:t,hasDimensions:n,resizeObserver:r}){let i=$(),a=(0,o.useRef)(null),s=(0,o.useRef)(null),c=(0,o.useRef)(e.sourcePosition),l=(0,o.useRef)(e.targetPosition),u=(0,o.useRef)(t),d=n&&!!e.internals.handleBounds;return(0,o.useEffect)(()=>{a.current&&!e.hidden&&(!d||s.current!==a.current)&&(s.current&&r?.unobserve(s.current),r?.observe(a.current),s.current=a.current)},[d,e.hidden]),(0,o.useEffect)(()=>()=>{s.current&&=(r?.unobserve(s.current),null)},[]),(0,o.useEffect)(()=>{if(a.current){let n=u.current!==t,r=c.current!==e.sourcePosition,o=l.current!==e.targetPosition;(n||r||o)&&(u.current=t,c.current=e.sourcePosition,l.current=e.targetPosition,i.getState().updateNodeInternals(new Map([[e.id,{id:e.id,nodeElement:a.current,force:!0}]])))}},[e.id,t,e.sourcePosition,e.targetPosition]),a}function Nl({id:e,onClick:t,onMouseEnter:n,onMouseMove:r,onMouseLeave:i,onContextMenu:a,onDoubleClick:o,nodesDraggable:l,elementsSelectable:u,nodesConnectable:d,nodesFocusable:f,resizeObserver:p,noDragClassName:m,noPanClassName:h,disableKeyboardA11y:g,rfId:_,nodeTypes:v,nodeClickDistance:y,onError:b}){let{node:x,internals:S,isParent:C}=Q(t=>{let n=t.nodeLookup.get(e),r=t.parentLookup.has(e);return{node:n,internals:n.internals,isParent:r}},Z),w=x.type||`default`,T=v?.[w]||bl[w];T===void 0&&(b?.(`003`,Zi.error003(w)),w=`default`,T=v?.default||bl.default);let E=!!(x.draggable||l&&x.draggable===void 0),D=!!(x.selectable||u&&x.selectable===void 0),O=!!(x.connectable||d&&x.connectable===void 0),k=!!(x.focusable||f&&x.focusable===void 0),A=$(),j=Ka(x),M=Ml({node:x,nodeType:w,hasDimensions:j,resizeObserver:p}),N=al({nodeRef:M,disabled:x.hidden||!E,noDragClassName:m,handleSelector:x.dragHandle,nodeId:e,isSelectable:D,nodeClickDistance:y}),P=sl();if(x.hidden)return null;let F=Ga(x),I=xl(x),L=D||E||t||n||r||i,R=n?e=>n(e,{...S.userNode}):void 0,z=r?e=>r(e,{...S.userNode}):void 0,B=i?e=>i(e,{...S.userNode}):void 0,V=a?e=>a(e,{...S.userNode}):void 0,H=o?e=>o(e,{...S.userNode}):void 0,U=n=>{let{selectNodesOnDrag:r,nodeDragThreshold:i}=A.getState();D&&(!r||!E||i>0)&&il({id:e,store:A,nodeRef:M}),t&&t(n,{...S.userNode})},W=t=>{if(!(to(t.nativeEvent)||g)){if($i.includes(t.key)&&D)il({id:e,store:A,unselect:t.key===`Escape`,nodeRef:M});else if(E&&x.selected&&Object.prototype.hasOwnProperty.call(yl,t.key)){t.preventDefault();let{ariaLabelConfig:e}=A.getState();A.setState({ariaLiveMessage:e[`node.a11yDescription.ariaLiveMessage`]({direction:t.key.replace(`Arrow`,``).toLowerCase(),x:~~S.positionAbsolute.x,y:~~S.positionAbsolute.y})}),P({direction:yl[t.key],factor:t.shiftKey?4:1})}}},G=()=>{if(g||!M.current?.matches(`:focus-visible`))return;let{transform:t,width:n,height:r,autoPanOnNodeFocus:i,setCenter:a}=A.getState();i&&(ha(new Map([[e,x]]),{x:0,y:0,width:n,height:r},t,!0).length>0||a(x.position.x+F.width/2,x.position.y+F.height/2,{zoom:t[2]}))};return(0,s.jsx)(`div`,{className:c([`react-flow__node`,`react-flow__node-${w}`,{[h]:E},x.className,{selected:x.selected,selectable:D,parent:C,draggable:E,dragging:N}]),ref:M,style:{zIndex:S.z,transform:`translate(${S.positionAbsolute.x}px,${S.positionAbsolute.y}px)`,pointerEvents:L?`all`:`none`,visibility:j?`visible`:`hidden`,...x.style,...I},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:R,onMouseMove:z,onMouseLeave:B,onContextMenu:V,onClick:U,onDoubleClick:H,onKeyDown:k?W:void 0,tabIndex:k?0:void 0,onFocus:k?G:void 0,role:x.ariaRole??(k?`group`:void 0),"aria-roledescription":`node`,"aria-describedby":g?void 0:`${$s}-${_}`,"aria-label":x.ariaLabel,...x.domAttributes,children:(0,s.jsx)(ll,{value:e,children:(0,s.jsx)(T,{id:e,data:x.data,type:w,positionAbsoluteX:S.positionAbsolute.x,positionAbsoluteY:S.positionAbsolute.y,selected:x.selected??!1,selectable:D,draggable:E,deletable:x.deletable??!0,isConnectable:O,sourcePosition:x.sourcePosition,targetPosition:x.targetPosition,dragging:N,dragHandle:x.dragHandle,zIndex:S.z,parentId:x.parentId,...F})})})}var Pl=(0,o.memo)(Nl),Fl=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function Il(e){let{nodesDraggable:t,nodesConnectable:n,nodesFocusable:r,elementsSelectable:i,onError:a}=Q(Fl,Z),o=kl(e.onlyRenderVisibleElements),c=jl();return(0,s.jsx)(`div`,{className:`react-flow__nodes`,style:Xc,children:o.map(o=>(0,s.jsx)(Pl,{id:o,nodeTypes:e.nodeTypes,nodeExtent:e.nodeExtent,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,resizeObserver:c,nodesDraggable:t,nodesConnectable:n,nodesFocusable:r,elementsSelectable:i,nodeClickDistance:e.nodeClickDistance,onError:a},o))})}Il.displayName=`NodeRenderer`;var Ll=(0,o.memo)(Il);function Rl(e){return Q((0,o.useCallback)(t=>{if(!e)return t.edges.map(e=>e.id);let n=[];if(t.width&&t.height)for(let e of t.edges){let r=t.nodeLookup.get(e.source),i=t.nodeLookup.get(e.target);r&&i&&fo({sourceNode:r,targetNode:i,width:t.width,height:t.height,transform:t.transform})&&n.push(e.id)}return n},[e]),Z)}var zl=({color:e=`none`,strokeWidth:t=1})=>(0,s.jsx)(`polyline`,{className:`arrow`,style:{strokeWidth:t,...e&&{stroke:e}},strokeLinecap:`round`,fill:`none`,strokeLinejoin:`round`,points:`-5,-4 0,0 -5,4`}),Bl=({color:e=`none`,strokeWidth:t=1})=>(0,s.jsx)(`polyline`,{className:`arrowclosed`,style:{strokeWidth:t,...e&&{stroke:e,fill:e}},strokeLinecap:`round`,strokeLinejoin:`round`,points:`-5,-4 0,0 -5,4 -5,-4`}),Vl={[oa.Arrow]:zl,[oa.ArrowClosed]:Bl};function Hl(e){let t=$();return(0,o.useMemo)(()=>Object.prototype.hasOwnProperty.call(Vl,e)?Vl[e]:(t.getState().onError?.(`009`,Zi.error009(e)),null),[e])}var Ul=({id:e,type:t,color:n,width:r=12.5,height:i=12.5,markerUnits:a=`strokeWidth`,strokeWidth:o,orient:c=`auto-start-reverse`})=>{let l=Hl(t);return l?(0,s.jsx)(`marker`,{className:`react-flow__arrowhead`,id:e,markerWidth:`${r}`,markerHeight:`${i}`,viewBox:`-10 -10 20 20`,markerUnits:a,orient:c,refX:`0`,refY:`0`,children:(0,s.jsx)(l,{color:n,strokeWidth:o})}):null},Wl=({defaultColor:e,rfId:t})=>{let n=Q(e=>e.edges),r=Q(e=>e.defaultEdgeOptions),i=(0,o.useMemo)(()=>ko(n,{id:t,defaultColor:e,defaultMarkerStart:r?.markerStart,defaultMarkerEnd:r?.markerEnd}),[n,r,t,e]);return i.length?(0,s.jsx)(`svg`,{className:`react-flow__marker`,"aria-hidden":`true`,children:(0,s.jsx)(`defs`,{children:i.map(e=>(0,s.jsx)(Ul,{id:e.id,type:e.type,color:e.color,width:e.width,height:e.height,markerUnits:e.markerUnits,strokeWidth:e.strokeWidth,orient:e.orient},e.id))})}):null};Wl.displayName=`MarkerDefinitions`;var Gl=(0,o.memo)(Wl);function Kl({x:e,y:t,label:n,labelStyle:r,labelShowBg:i=!0,labelBgStyle:a,labelBgPadding:l=[2,4],labelBgBorderRadius:u=2,children:d,className:f,...p}){let[m,h]=(0,o.useState)({x:1,y:0,width:0,height:0}),g=c([`react-flow__edge-textwrapper`,f]),_=(0,o.useRef)(null);return(0,o.useEffect)(()=>{if(_.current){let e=_.current.getBBox();h({x:e.x,y:e.y,width:e.width,height:e.height})}},[n]),n?(0,s.jsxs)(`g`,{transform:`translate(${e-m.width/2} ${t-m.height/2})`,className:g,visibility:m.width?`visible`:`hidden`,...p,children:[i&&(0,s.jsx)(`rect`,{width:m.width+2*l[0],x:-l[0],y:-l[1],height:m.height+2*l[1],className:`react-flow__edge-textbg`,style:a,rx:u,ry:u}),(0,s.jsx)(`text`,{className:`react-flow__edge-text`,y:m.height/2,dy:`0.3em`,ref:_,style:r,children:n}),d]}):null}Kl.displayName=`EdgeText`;var ql=(0,o.memo)(Kl);function Jl({path:e,labelX:t,labelY:n,label:r,labelStyle:i,labelShowBg:a,labelBgStyle:o,labelBgPadding:l,labelBgBorderRadius:u,interactionWidth:d=20,...f}){return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(`path`,{...f,d:e,fill:`none`,className:c([`react-flow__edge-path`,f.className])}),d?(0,s.jsx)(`path`,{d:e,fill:`none`,strokeOpacity:0,strokeWidth:d,className:`react-flow__edge-interaction`}):null,r&&Pa(t)&&Pa(n)?(0,s.jsx)(ql,{x:t,y:n,label:r,labelStyle:i,labelShowBg:a,labelBgStyle:o,labelBgPadding:l,labelBgBorderRadius:u}):null]})}function Yl({pos:e,x1:t,y1:n,x2:r,y2:i}){return e===X.Left||e===X.Right?[.5*(t+r),n]:[t,.5*(n+i)]}function Xl({sourceX:e,sourceY:t,sourcePosition:n=X.Bottom,targetX:r,targetY:i,targetPosition:a=X.Top}){let[o,s]=Yl({pos:n,x1:e,y1:t,x2:r,y2:i}),[c,l]=Yl({pos:a,x1:r,y1:i,x2:e,y2:t}),[u,d,f,p]=ao({sourceX:e,sourceY:t,targetX:r,targetY:i,sourceControlX:o,sourceControlY:s,targetControlX:c,targetControlY:l});return[`M${e},${t} C${o},${s} ${c},${l} ${r},${i}`,u,d,f,p]}function Zl(e){return(0,o.memo)(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:a,sourcePosition:o,targetPosition:c,label:l,labelStyle:u,labelShowBg:d,labelBgStyle:f,labelBgPadding:p,labelBgBorderRadius:m,style:h,markerEnd:g,markerStart:_,interactionWidth:v})=>{let[y,b,x]=Xl({sourceX:n,sourceY:r,sourcePosition:o,targetX:i,targetY:a,targetPosition:c});return(0,s.jsx)(Jl,{id:e.isInternal?void 0:t,path:y,labelX:b,labelY:x,label:l,labelStyle:u,labelShowBg:d,labelBgStyle:f,labelBgPadding:p,labelBgBorderRadius:m,style:h,markerEnd:g,markerStart:_,interactionWidth:v})})}var Ql=Zl({isInternal:!1}),$l=Zl({isInternal:!0});Ql.displayName=`SimpleBezierEdge`,$l.displayName=`SimpleBezierEdgeInternal`;function eu(e){return(0,o.memo)(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:a,label:o,labelStyle:c,labelShowBg:l,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:f,style:p,sourcePosition:m=X.Bottom,targetPosition:h=X.Top,markerEnd:g,markerStart:_,pathOptions:v,interactionWidth:y})=>{let[b,x,S]=So({sourceX:n,sourceY:r,sourcePosition:m,targetX:i,targetY:a,targetPosition:h,borderRadius:v?.borderRadius,offset:v?.offset,stepPosition:v?.stepPosition});return(0,s.jsx)(Jl,{id:e.isInternal?void 0:t,path:b,labelX:x,labelY:S,label:o,labelStyle:c,labelShowBg:l,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:f,style:p,markerEnd:g,markerStart:_,interactionWidth:y})})}var tu=eu({isInternal:!1}),nu=eu({isInternal:!0});tu.displayName=`SmoothStepEdge`,nu.displayName=`SmoothStepEdgeInternal`;function ru(e){return(0,o.memo)(({id:t,...n})=>{let r=e.isInternal?void 0:t;return(0,s.jsx)(tu,{...n,id:r,pathOptions:(0,o.useMemo)(()=>({borderRadius:0,offset:n.pathOptions?.offset}),[n.pathOptions?.offset])})})}var iu=ru({isInternal:!1}),au=ru({isInternal:!0});iu.displayName=`StepEdge`,au.displayName=`StepEdgeInternal`;function ou(e){return(0,o.memo)(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:a,label:o,labelStyle:c,labelShowBg:l,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:f,style:p,markerEnd:m,markerStart:h,interactionWidth:g})=>{let[_,v,y]=go({sourceX:n,sourceY:r,targetX:i,targetY:a});return(0,s.jsx)(Jl,{id:e.isInternal?void 0:t,path:_,labelX:v,labelY:y,label:o,labelStyle:c,labelShowBg:l,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:f,style:p,markerEnd:m,markerStart:h,interactionWidth:g})})}var su=ou({isInternal:!1}),cu=ou({isInternal:!0});su.displayName=`StraightEdge`,cu.displayName=`StraightEdgeInternal`;function lu(e){return(0,o.memo)(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:a,sourcePosition:o=X.Bottom,targetPosition:c=X.Top,label:l,labelStyle:u,labelShowBg:d,labelBgStyle:f,labelBgPadding:p,labelBgBorderRadius:m,style:h,markerEnd:g,markerStart:_,pathOptions:v,interactionWidth:y})=>{let[b,x,S]=co({sourceX:n,sourceY:r,sourcePosition:o,targetX:i,targetY:a,targetPosition:c,curvature:v?.curvature});return(0,s.jsx)(Jl,{id:e.isInternal?void 0:t,path:b,labelX:x,labelY:S,label:l,labelStyle:u,labelShowBg:d,labelBgStyle:f,labelBgPadding:p,labelBgBorderRadius:m,style:h,markerEnd:g,markerStart:_,interactionWidth:y})})}var uu=lu({isInternal:!1}),du=lu({isInternal:!0});uu.displayName=`BezierEdge`,du.displayName=`BezierEdgeInternal`;var fu={default:du,straight:cu,step:au,smoothstep:nu,simplebezier:$l},pu={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},mu=(e,t,n)=>n===X.Left?e-t:n===X.Right?e+t:e,hu=(e,t,n)=>n===X.Top?e-t:n===X.Bottom?e+t:e,gu=`react-flow__edgeupdater`;function _u({position:e,centerX:t,centerY:n,radius:r=10,onMouseDown:i,onMouseEnter:a,onMouseOut:o,type:l}){return(0,s.jsx)(`circle`,{onMouseDown:i,onMouseEnter:a,onMouseOut:o,className:c([gu,`${gu}-${l}`]),cx:mu(t,r,e),cy:hu(n,r,e),r,stroke:`transparent`,fill:`transparent`})}function vu({isReconnectable:e,reconnectRadius:t,edge:n,sourceX:r,sourceY:i,targetX:a,targetY:o,sourcePosition:c,targetPosition:l,onReconnect:u,onReconnectStart:d,onReconnectEnd:f,setReconnecting:p,setUpdateHover:m}){let h=$(),g=(e,t)=>{if(e.button!==0)return;let{autoPanOnConnect:r,domNode:i,connectionMode:a,connectionRadius:o,lib:s,onConnectStart:c,cancelConnection:l,nodeLookup:m,rfId:g,panBy:_,updateConnection:v}=h.getState(),y=t.type===`target`;ls.onPointerDown(e.nativeEvent,{autoPanOnConnect:r,connectionMode:a,connectionRadius:o,domNode:i,handleId:t.id,nodeId:t.nodeId,nodeLookup:m,isTarget:y,edgeUpdaterType:t.type,lib:s,flowId:g,cancelConnection:l,panBy:_,isValidConnection:(...e)=>h.getState().isValidConnection?.(...e)??!0,onConnect:e=>u?.(n,e),onConnectStart:(r,i)=>{p(!0),d?.(e,n,t.type),c?.(r,i)},onConnectEnd:(...e)=>h.getState().onConnectEnd?.(...e),onReconnectEnd:(e,r)=>{p(!1),f?.(e,n,t.type,r)},updateConnection:v,getTransform:()=>h.getState().transform,getFromHandle:()=>h.getState().connection.fromHandle,dragThreshold:h.getState().connectionDragThreshold,handleDomNode:e.currentTarget})},_=e=>g(e,{nodeId:n.target,id:n.targetHandle??null,type:`target`}),v=e=>g(e,{nodeId:n.source,id:n.sourceHandle??null,type:`source`}),y=()=>m(!0),b=()=>m(!1);return(0,s.jsxs)(s.Fragment,{children:[(e===!0||e===`source`)&&(0,s.jsx)(_u,{position:c,centerX:r,centerY:i,radius:t,onMouseDown:_,onMouseEnter:y,onMouseOut:b,type:`source`}),(e===!0||e===`target`)&&(0,s.jsx)(_u,{position:l,centerX:a,centerY:o,radius:t,onMouseDown:v,onMouseEnter:y,onMouseOut:b,type:`target`})]})}function yu({id:e,edgesFocusable:t,edgesReconnectable:n,elementsSelectable:r,onClick:i,onDoubleClick:a,onContextMenu:l,onMouseEnter:u,onMouseMove:d,onMouseLeave:f,reconnectRadius:p,onReconnect:m,onReconnectStart:h,onReconnectEnd:g,rfId:_,edgeTypes:v,noPanClassName:y,onError:b,disableKeyboardA11y:x}){let S=Q(t=>t.edgeLookup.get(e)),C=Q(e=>e.defaultEdgeOptions);S=C?{...C,...S}:S;let w=S.type||`default`,T=v?.[w]||fu[w];T===void 0&&(b?.(`011`,Zi.error011(w)),w=`default`,T=v?.default||fu.default);let E=!!(S.focusable||t&&S.focusable===void 0),D=m!==void 0&&(S.reconnectable||n&&S.reconnectable===void 0),O=!!(S.selectable||r&&S.selectable===void 0),k=(0,o.useRef)(null),[A,j]=(0,o.useState)(!1),[M,N]=(0,o.useState)(!1),P=$(),{zIndex:F,sourceX:I,sourceY:L,targetX:R,targetY:z,sourcePosition:B,targetPosition:V}=Q((0,o.useCallback)(t=>{let n=t.nodeLookup.get(S.source),r=t.nodeLookup.get(S.target);if(!n||!r)return{zIndex:S.zIndex,...pu};let i=wo({id:e,sourceNode:n,targetNode:r,sourceHandle:S.sourceHandle||null,targetHandle:S.targetHandle||null,connectionMode:t.connectionMode,onError:b});return{zIndex:uo({selected:S.selected,zIndex:S.zIndex,sourceNode:n,targetNode:r,elevateOnSelect:t.elevateEdgesOnSelect,zIndexMode:t.zIndexMode}),...i||pu}},[S.source,S.target,S.sourceHandle,S.targetHandle,S.selected,S.zIndex]),Z),H=(0,o.useMemo)(()=>S.markerStart?`url('#${Oo(S.markerStart,_)}')`:void 0,[S.markerStart,_]),U=(0,o.useMemo)(()=>S.markerEnd?`url('#${Oo(S.markerEnd,_)}')`:void 0,[S.markerEnd,_]);if(S.hidden||I===null||L===null||R===null||z===null)return null;let W=t=>{let{addSelectedEdges:n,unselectNodesAndEdges:r,multiSelectionActive:a}=P.getState();O&&(P.setState({nodesSelectionActive:!1}),S.selected&&a?(r({nodes:[],edges:[S]}),k.current?.blur()):n([e])),i&&i(t,S)},G=a?e=>{a(e,{...S})}:void 0,ee=l?e=>{l(e,{...S})}:void 0,te=u?e=>{u(e,{...S})}:void 0,ne=d?e=>{d(e,{...S})}:void 0,re=f?e=>{f(e,{...S})}:void 0;return(0,s.jsx)(`svg`,{style:{zIndex:F},children:(0,s.jsxs)(`g`,{className:c([`react-flow__edge`,`react-flow__edge-${w}`,S.className,y,{selected:S.selected,animated:S.animated,inactive:!O&&!i,updating:A,selectable:O}]),onClick:W,onDoubleClick:G,onContextMenu:ee,onMouseEnter:te,onMouseMove:ne,onMouseLeave:re,onKeyDown:E?t=>{if(!x&&$i.includes(t.key)&&O){let{unselectNodesAndEdges:n,addSelectedEdges:r}=P.getState();t.key===`Escape`?(k.current?.blur(),n({edges:[S]})):r([e])}}:void 0,tabIndex:E?0:void 0,role:S.ariaRole??(E?`group`:`img`),"aria-roledescription":`edge`,"data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":S.ariaLabel===null?void 0:S.ariaLabel||`Edge from ${S.source} to ${S.target}`,"aria-describedby":E?`${ec}-${_}`:void 0,ref:k,...S.domAttributes,children:[!M&&(0,s.jsx)(T,{id:e,source:S.source,target:S.target,type:S.type,selected:S.selected,animated:S.animated,selectable:O,deletable:S.deletable??!0,label:S.label,labelStyle:S.labelStyle,labelShowBg:S.labelShowBg,labelBgStyle:S.labelBgStyle,labelBgPadding:S.labelBgPadding,labelBgBorderRadius:S.labelBgBorderRadius,sourceX:I,sourceY:L,targetX:R,targetY:z,sourcePosition:B,targetPosition:V,data:S.data,style:S.style,sourceHandleId:S.sourceHandle,targetHandleId:S.targetHandle,markerStart:H,markerEnd:U,pathOptions:`pathOptions`in S?S.pathOptions:void 0,interactionWidth:S.interactionWidth}),D&&(0,s.jsx)(vu,{edge:S,isReconnectable:D,reconnectRadius:p,onReconnect:m,onReconnectStart:h,onReconnectEnd:g,sourceX:I,sourceY:L,targetX:R,targetY:z,sourcePosition:B,targetPosition:V,setUpdateHover:j,setReconnecting:N})]})})}var bu=(0,o.memo)(yu),xu=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function Su({defaultMarkerColor:e,onlyRenderVisibleElements:t,rfId:n,edgeTypes:r,noPanClassName:i,onReconnect:a,onEdgeContextMenu:o,onEdgeMouseEnter:c,onEdgeMouseMove:l,onEdgeMouseLeave:u,onEdgeClick:d,reconnectRadius:f,onEdgeDoubleClick:p,onReconnectStart:m,onReconnectEnd:h,disableKeyboardA11y:g}){let{edgesFocusable:_,edgesReconnectable:v,elementsSelectable:y,onError:b}=Q(xu,Z),x=Rl(t);return(0,s.jsxs)(`div`,{className:`react-flow__edges`,children:[(0,s.jsx)(Gl,{defaultColor:e,rfId:n}),x.map(e=>(0,s.jsx)(bu,{id:e,edgesFocusable:_,edgesReconnectable:v,elementsSelectable:y,noPanClassName:i,onReconnect:a,onContextMenu:o,onMouseEnter:c,onMouseMove:l,onMouseLeave:u,onClick:d,reconnectRadius:f,onDoubleClick:p,onReconnectStart:m,onReconnectEnd:h,rfId:n,onError:b,edgeTypes:r,disableKeyboardA11y:g},e))]})}Su.displayName=`EdgeRenderer`;var Cu=(0,o.memo)(Su),wu=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function Tu({children:e}){return(0,s.jsx)(`div`,{className:`react-flow__viewport xyflow__viewport react-flow__container`,style:{transform:Q(wu)},children:e})}function Eu(e){let t=Gc(),n=(0,o.useRef)(!1);(0,o.useEffect)(()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),n.current=!0)},[e,t.viewportInitialized])}var Du=e=>e.panZoom?.syncViewport;function Ou(e){let t=Q(Du),n=$();return(0,o.useEffect)(()=>{e&&(t?.(e),n.setState({transform:[e.x,e.y,e.zoom]}))},[e,t]),null}function ku(e){return e.connection.inProgress?{...e.connection,to:La(e.connection.to,e.transform)}:{...e.connection}}function Au(e){return e?t=>e(ku(t)):ku}function ju(e){return Q(Au(e),Z)}var Mu=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function Nu({containerStyle:e,style:t,type:n,component:r}){let{nodesConnectable:i,width:a,height:o,isValid:l,inProgress:u}=Q(Mu,Z);return a&&i&&u?(0,s.jsx)(`svg`,{style:e,width:a,height:o,className:`react-flow__connectionline react-flow__container`,children:(0,s.jsx)(`g`,{className:c([`react-flow__connection`,ca(l)]),children:(0,s.jsx)(Pu,{style:t,type:n,CustomComponent:r,isValid:l})})}):null}var Pu=({style:e,type:t=aa.Bezier,CustomComponent:n,isValid:r})=>{let{inProgress:i,from:a,fromNode:o,fromHandle:c,fromPosition:l,to:u,toNode:d,toHandle:f,toPosition:p,pointer:m}=ju();if(!i)return;if(n)return(0,s.jsx)(n,{connectionLineType:t,connectionLineStyle:e,fromNode:o,fromHandle:c,fromX:a.x,fromY:a.y,toX:u.x,toY:u.y,fromPosition:l,toPosition:p,connectionStatus:ca(r),toNode:d,toHandle:f,pointer:m});let h=``,g={sourceX:a.x,sourceY:a.y,sourcePosition:l,targetX:u.x,targetY:u.y,targetPosition:p};switch(t){case aa.Bezier:[h]=co(g);break;case aa.SimpleBezier:[h]=Xl(g);break;case aa.Step:[h]=So({...g,borderRadius:0});break;case aa.SmoothStep:[h]=So(g);break;default:[h]=go(g)}return(0,s.jsx)(`path`,{d:h,fill:`none`,className:`react-flow__connection-path`,style:e})};Pu.displayName=`ConnectionLine`;var Fu={};function Iu(e=Fu){(0,o.useRef)(e),$(),(0,o.useEffect)(()=>{},[e])}function Lu(){$(),(0,o.useRef)(!1),(0,o.useEffect)(()=>{},[])}function Ru({nodeTypes:e,edgeTypes:t,onInit:n,onNodeClick:r,onEdgeClick:i,onNodeDoubleClick:a,onEdgeDoubleClick:o,onNodeMouseEnter:c,onNodeMouseMove:l,onNodeMouseLeave:u,onNodeContextMenu:d,onSelectionContextMenu:f,onSelectionStart:p,onSelectionEnd:m,connectionLineType:h,connectionLineStyle:g,connectionLineComponent:_,connectionLineContainerStyle:v,selectionKeyCode:y,selectionOnDrag:b,selectionMode:x,multiSelectionKeyCode:S,panActivationKeyCode:C,zoomActivationKeyCode:w,deleteKeyCode:T,onlyRenderVisibleElements:E,elementsSelectable:D,defaultViewport:O,translateExtent:k,minZoom:A,maxZoom:j,preventScrolling:M,defaultMarkerColor:N,zoomOnScroll:P,zoomOnPinch:F,panOnScroll:I,panOnScrollSpeed:L,panOnScrollMode:R,zoomOnDoubleClick:z,panOnDrag:B,onPaneClick:V,onPaneMouseEnter:H,onPaneMouseMove:U,onPaneMouseLeave:W,onPaneScroll:G,onPaneContextMenu:ee,paneClickDistance:te,nodeClickDistance:ne,onEdgeContextMenu:re,onEdgeMouseEnter:ie,onEdgeMouseMove:ae,onEdgeMouseLeave:oe,reconnectRadius:se,onReconnect:ce,onReconnectStart:le,onReconnectEnd:ue,noDragClassName:de,noWheelClassName:fe,noPanClassName:pe,disableKeyboardA11y:me,nodeExtent:he,rfId:ge,viewport:_e,onViewportChange:ve}){return Iu(e),Iu(t),Lu(),Eu(n),Ou(_e),(0,s.jsx)(Dl,{onPaneClick:V,onPaneMouseEnter:H,onPaneMouseMove:U,onPaneMouseLeave:W,onPaneContextMenu:ee,onPaneScroll:G,paneClickDistance:te,deleteKeyCode:T,selectionKeyCode:y,selectionOnDrag:b,selectionMode:x,onSelectionStart:p,onSelectionEnd:m,multiSelectionKeyCode:S,panActivationKeyCode:C,zoomActivationKeyCode:w,elementsSelectable:D,zoomOnScroll:P,zoomOnPinch:F,zoomOnDoubleClick:z,panOnScroll:I,panOnScrollSpeed:L,panOnScrollMode:R,panOnDrag:B,defaultViewport:O,translateExtent:k,minZoom:A,maxZoom:j,onSelectionContextMenu:f,preventScrolling:M,noDragClassName:de,noWheelClassName:fe,noPanClassName:pe,disableKeyboardA11y:me,onViewportChange:ve,isControlledViewport:!!_e,children:(0,s.jsxs)(Tu,{children:[(0,s.jsx)(Cu,{edgeTypes:t,onEdgeClick:i,onEdgeDoubleClick:o,onReconnect:ce,onReconnectStart:le,onReconnectEnd:ue,onlyRenderVisibleElements:E,onEdgeContextMenu:re,onEdgeMouseEnter:ie,onEdgeMouseMove:ae,onEdgeMouseLeave:oe,reconnectRadius:se,defaultMarkerColor:N,noPanClassName:pe,disableKeyboardA11y:me,rfId:ge}),(0,s.jsx)(Nu,{style:g,type:h,component:_,containerStyle:v}),(0,s.jsx)(`div`,{className:`react-flow__edgelabel-renderer`}),(0,s.jsx)(Ll,{nodeTypes:e,onNodeClick:r,onNodeDoubleClick:a,onNodeMouseEnter:c,onNodeMouseMove:l,onNodeMouseLeave:u,onNodeContextMenu:d,nodeClickDistance:ne,onlyRenderVisibleElements:E,noPanClassName:pe,noDragClassName:de,disableKeyboardA11y:me,nodeExtent:he,rfId:ge}),(0,s.jsx)(`div`,{className:`react-flow__viewport-portal`})]})})}Ru.displayName=`GraphView`;var zu=(0,o.memo)(Ru),Bu=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:i,height:a,fitView:o,fitViewOptions:s,minZoom:c=.5,maxZoom:l=2,nodeOrigin:u,nodeExtent:d,zIndexMode:f=`basic`}={})=>{let p=new Map,m=new Map,h=new Map,g=new Map,_=r??t??[],v=n??e??[],y=u??[0,0],b=d??Qi;qo(h,g,_);let{nodesInitialized:x}=Ro(v,p,m,{nodeOrigin:y,nodeExtent:b,zIndexMode:f}),S=[0,0,1];if(o&&i&&a){let{x:e,y:t,zoom:n}=Ha(ma(p,{filter:e=>!!((e.width||e.initialWidth)&&(e.height||e.initialHeight))}),i,a,c,l,s?.padding??.1);S=[e,t,n]}return{rfId:`1`,width:i??0,height:a??0,transform:S,nodes:v,nodesInitialized:x,nodeLookup:p,parentLookup:m,edges:_,edgeLookup:g,connectionLookup:h,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:n!==void 0,hasDefaultEdges:r!==void 0,panZoom:null,minZoom:c,maxZoom:l,translateExtent:Qi,nodeExtent:b,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:ta.Strict,domNode:null,paneDragging:!1,noPanClassName:`nopan`,nodeOrigin:y,nodeDragThreshold:1,connectionDragThreshold:1,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesReconnectable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,elevateEdgesOnSelect:!0,selectNodesOnDrag:!0,multiSelectionActive:!1,fitViewQueued:o??!1,fitViewOptions:s,fitViewResolver:null,connection:{...ia},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:``,autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:Fa,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:`react`,debug:!1,ariaLabelConfig:ea,zIndexMode:f,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},Vu=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:i,height:a,fitView:o,fitViewOptions:s,minZoom:c,maxZoom:l,nodeOrigin:u,nodeExtent:d,zIndexMode:f})=>qs((p,m)=>{async function h(){let{nodeLookup:e,panZoom:t,fitViewOptions:n,fitViewResolver:r,width:i,height:a,minZoom:o,maxZoom:s}=m();t&&(await va({nodes:e,width:i,height:a,panZoom:t,minZoom:o,maxZoom:s},n),r?.resolve(!0),p({fitViewResolver:null}))}return{...Bu({nodes:e,edges:t,width:i,height:a,fitView:o,fitViewOptions:s,minZoom:c,maxZoom:l,nodeOrigin:u,nodeExtent:d,defaultNodes:n,defaultEdges:r,zIndexMode:f}),setNodes:e=>{let{nodeLookup:t,parentLookup:n,nodeOrigin:r,elevateNodesOnSelect:i,fitViewQueued:a,zIndexMode:o,nodesSelectionActive:s}=m(),{nodesInitialized:c,hasSelectedNodes:l}=Ro(e,t,n,{nodeOrigin:r,nodeExtent:d,elevateNodesOnSelect:i,checkEquality:!0,zIndexMode:o}),u=s&&l;a&&c?(h(),p({nodes:e,nodesInitialized:c,fitViewQueued:!1,fitViewOptions:void 0,nodesSelectionActive:u})):p({nodes:e,nodesInitialized:c,nodesSelectionActive:u})},setEdges:e=>{let{connectionLookup:t,edgeLookup:n}=m();qo(t,n,e),p({edges:e})},setDefaultNodesAndEdges:(e,t)=>{if(e){let{setNodes:t}=m();t(e),p({hasDefaultNodes:!0})}if(t){let{setEdges:e}=m();e(t),p({hasDefaultEdges:!0})}},updateNodeInternals:e=>{let{triggerNodeChanges:t,nodeLookup:n,parentLookup:r,domNode:i,nodeOrigin:a,nodeExtent:o,debug:s,fitViewQueued:c,zIndexMode:l}=m(),{changes:u,updatedInternals:d}=Wo(e,n,r,i,a,o,l);d&&(Fo(n,r,{nodeOrigin:a,nodeExtent:o,zIndexMode:l}),c?(h(),p({fitViewQueued:!1,fitViewOptions:void 0})):p({}),u?.length>0&&(s&&console.log(`React Flow: trigger node changes`,u),t?.(u)))},updateNodePositions:(e,t=!1)=>{let n=[],r=[],{nodeLookup:i,triggerNodeChanges:a,connection:o,updateConnection:s,onNodesChangeMiddlewareMap:c}=m();for(let[a,c]of e){let e=i.get(a),l=!!(e?.expandParent&&e?.parentId&&c?.position),u={id:a,type:`position`,position:l?{x:Math.max(0,c.position.x),y:Math.max(0,c.position.y)}:c.position,dragging:t};if(e&&o.inProgress&&o.fromNode.id===e.id){let t=Eo(e,o.fromHandle,X.Left,!0);s({...o,from:t})}l&&e.parentId&&n.push({id:a,parentId:e.parentId,rect:{...c.internals.positionAbsolute,width:c.measured.width??0,height:c.measured.height??0}}),r.push(u)}if(n.length>0){let{parentLookup:e,nodeOrigin:t}=m(),a=Uo(n,i,e,t);r.push(...a)}for(let e of c.values())r=e(r);a(r)},triggerNodeChanges:e=>{let{onNodesChange:t,setNodes:n,nodes:r,hasDefaultNodes:i,debug:a}=m();e?.length&&(i&&n(Ac(e,r)),a&&console.log(`React Flow: trigger node changes`,e),t?.(e))},triggerEdgeChanges:e=>{let{onEdgesChange:t,setEdges:n,edges:r,hasDefaultEdges:i,debug:a}=m();e?.length&&(i&&n(jc(e,r)),a&&console.log(`React Flow: trigger edge changes`,e),t?.(e))},addSelectedNodes:e=>{let{multiSelectionActive:t,edgeLookup:n,nodeLookup:r,triggerNodeChanges:i,triggerEdgeChanges:a}=m();if(t){i(e.map(e=>Mc(e,!0)));return}i(Nc(r,new Set([...e]),!0)),a(Nc(n))},addSelectedEdges:e=>{let{multiSelectionActive:t,edgeLookup:n,nodeLookup:r,triggerNodeChanges:i,triggerEdgeChanges:a}=m();if(t){a(e.map(e=>Mc(e,!0)));return}a(Nc(n,new Set([...e]))),i(Nc(r,new Set,!0))},unselectNodesAndEdges:({nodes:e,edges:t}={})=>{let{edges:n,nodes:r,nodeLookup:i,triggerNodeChanges:a,triggerEdgeChanges:o}=m(),s=e||r,c=t||n,l=[];for(let e of s){if(!e.selected)continue;let t=i.get(e.id);t&&(t.selected=!1),l.push(Mc(e.id,!1))}let u=[];for(let e of c)e.selected&&u.push(Mc(e.id,!1));a(l),o(u)},setMinZoom:e=>{let{panZoom:t,maxZoom:n}=m();t?.setScaleExtent([e,n]),p({minZoom:e})},setMaxZoom:e=>{let{panZoom:t,minZoom:n}=m();t?.setScaleExtent([n,e]),p({maxZoom:e})},setTranslateExtent:e=>{m().panZoom?.setTranslateExtent(e),p({translateExtent:e})},resetSelectedElements:()=>{let{edges:e,nodes:t,triggerNodeChanges:n,triggerEdgeChanges:r,elementsSelectable:i}=m();if(!i)return;let a=t.reduce((e,t)=>t.selected?[...e,Mc(t.id,!1)]:e,[]),o=e.reduce((e,t)=>t.selected?[...e,Mc(t.id,!1)]:e,[]);n(a),r(o)},setNodeExtent:e=>{let{nodes:t,nodeLookup:n,parentLookup:r,nodeOrigin:i,elevateNodesOnSelect:a,nodeExtent:o,zIndexMode:s}=m();e[0][0]===o[0][0]&&e[0][1]===o[0][1]&&e[1][0]===o[1][0]&&e[1][1]===o[1][1]||(Ro(t,n,r,{nodeOrigin:i,nodeExtent:e,elevateNodesOnSelect:a,checkEquality:!1,zIndexMode:s}),p({nodeExtent:e}))},panBy:e=>{let{transform:t,width:n,height:r,panZoom:i,translateExtent:a}=m();return Go({delta:e,panZoom:i,transform:t,translateExtent:a,width:n,height:r})},setCenter:async(e,t,n)=>{let{width:r,height:i,maxZoom:a,panZoom:o}=m();if(!o)return Promise.resolve(!1);let s=n?.zoom===void 0?a:n.zoom;return await o.setViewport({x:r/2-e*s,y:i/2-t*s,zoom:s},{duration:n?.duration,ease:n?.ease,interpolate:n?.interpolate}),Promise.resolve(!0)},cancelConnection:()=>{p({connection:{...ia}})},updateConnection:e=>{p({connection:e})},reset:()=>p({...Bu()})}},Object.is);function Hu({initialNodes:e,initialEdges:t,defaultNodes:n,defaultEdges:r,initialWidth:i,initialHeight:a,initialMinZoom:c,initialMaxZoom:l,initialFitViewOptions:u,fitView:d,nodeOrigin:f,nodeExtent:p,zIndexMode:m,children:h}){let[g]=(0,o.useState)(()=>Vu({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:i,height:a,fitView:d,minZoom:c,maxZoom:l,fitViewOptions:u,nodeOrigin:f,nodeExtent:p,zIndexMode:m}));return(0,s.jsx)(Ys,{value:g,children:(0,s.jsx)(Hc,{children:h})})}function Uu({children:e,nodes:t,edges:n,defaultNodes:r,defaultEdges:i,width:a,height:c,fitView:l,fitViewOptions:u,minZoom:d,maxZoom:f,nodeOrigin:p,nodeExtent:m,zIndexMode:h}){return(0,o.useContext)(Js)?(0,s.jsx)(s.Fragment,{children:e}):(0,s.jsx)(Hu,{initialNodes:t,initialEdges:n,defaultNodes:r,defaultEdges:i,initialWidth:a,initialHeight:c,fitView:l,initialFitViewOptions:u,initialMinZoom:d,initialMaxZoom:f,nodeOrigin:p,nodeExtent:m,zIndexMode:h,children:e})}var Wu={width:`100%`,height:`100%`,overflow:`hidden`,position:`relative`,zIndex:0};function Gu({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,className:i,nodeTypes:a,edgeTypes:l,onNodeClick:u,onEdgeClick:d,onInit:f,onMove:p,onMoveStart:m,onMoveEnd:h,onConnect:g,onConnectStart:_,onConnectEnd:v,onClickConnectStart:y,onClickConnectEnd:b,onNodeMouseEnter:x,onNodeMouseMove:S,onNodeMouseLeave:C,onNodeContextMenu:w,onNodeDoubleClick:T,onNodeDragStart:E,onNodeDrag:D,onNodeDragStop:O,onNodesDelete:k,onEdgesDelete:A,onDelete:j,onSelectionChange:M,onSelectionDragStart:N,onSelectionDrag:P,onSelectionDragStop:F,onSelectionContextMenu:I,onSelectionStart:L,onSelectionEnd:R,onBeforeDelete:z,connectionMode:B,connectionLineType:V=aa.Bezier,connectionLineStyle:H,connectionLineComponent:U,connectionLineContainerStyle:W,deleteKeyCode:G=`Backspace`,selectionKeyCode:ee=`Shift`,selectionOnDrag:te=!1,selectionMode:ne=ra.Full,panActivationKeyCode:re=`Space`,multiSelectionKeyCode:ie=Ua()?`Meta`:`Control`,zoomActivationKeyCode:ae=Ua()?`Meta`:`Control`,snapToGrid:oe,snapGrid:se,onlyRenderVisibleElements:ce=!1,selectNodesOnDrag:le,nodesDraggable:ue,autoPanOnNodeFocus:de,nodesConnectable:fe,nodesFocusable:pe,nodeOrigin:me=hc,edgesFocusable:he,edgesReconnectable:ge,elementsSelectable:_e=!0,defaultViewport:ve=gc,minZoom:ye=.5,maxZoom:be=2,translateExtent:xe=Qi,preventScrolling:Se=!0,nodeExtent:Ce,defaultMarkerColor:we=`#b1b1b7`,zoomOnScroll:Te=!0,zoomOnPinch:Ee=!0,panOnScroll:De=!1,panOnScrollSpeed:Oe=.5,panOnScrollMode:ke=na.Free,zoomOnDoubleClick:Ae=!0,panOnDrag:je=!0,onPaneClick:Me,onPaneMouseEnter:Ne,onPaneMouseMove:Pe,onPaneMouseLeave:Fe,onPaneScroll:Ie,onPaneContextMenu:Le,paneClickDistance:Re=1,nodeClickDistance:ze=0,children:Be,onReconnect:Ve,onReconnectStart:He,onReconnectEnd:Ue,onEdgeContextMenu:We,onEdgeDoubleClick:Ge,onEdgeMouseEnter:Ke,onEdgeMouseMove:qe,onEdgeMouseLeave:Je,reconnectRadius:Ye=10,onNodesChange:Xe,onEdgesChange:Ze,noDragClassName:Qe=`nodrag`,noWheelClassName:$e=`nowheel`,noPanClassName:et=`nopan`,fitView:tt,fitViewOptions:nt,connectOnClick:rt,attributionPosition:it,proOptions:at,defaultEdgeOptions:ot,elevateNodesOnSelect:st=!0,elevateEdgesOnSelect:ct=!1,disableKeyboardA11y:lt=!1,autoPanOnConnect:ut,autoPanOnNodeDrag:dt,autoPanSpeed:ft,connectionRadius:pt,isValidConnection:mt,onError:ht,style:gt,id:_t,nodeDragThreshold:K,connectionDragThreshold:vt,viewport:yt,onViewportChange:q,width:bt,height:J,colorMode:xt=`light`,debug:St,onScroll:Ct,ariaLabelConfig:wt,zIndexMode:Tt=`basic`,...Et},Dt){let Ot=_t||`1`,kt=Sc(xt),At=(0,o.useCallback)(e=>{e.currentTarget.scrollTo({top:0,left:0,behavior:`instant`}),Ct?.(e)},[Ct]);return(0,s.jsx)(`div`,{"data-testid":`rf__wrapper`,...Et,onScroll:At,style:{...gt,...Wu},ref:Dt,className:c([`react-flow`,i,kt]),id:_t,role:`application`,children:(0,s.jsxs)(Uu,{nodes:e,edges:t,width:bt,height:J,fitView:tt,fitViewOptions:nt,minZoom:ye,maxZoom:be,nodeOrigin:me,nodeExtent:Ce,zIndexMode:Tt,children:[(0,s.jsx)(bc,{nodes:e,edges:t,defaultNodes:n,defaultEdges:r,onConnect:g,onConnectStart:_,onConnectEnd:v,onClickConnectStart:y,onClickConnectEnd:b,nodesDraggable:ue,autoPanOnNodeFocus:de,nodesConnectable:fe,nodesFocusable:pe,edgesFocusable:he,edgesReconnectable:ge,elementsSelectable:_e,elevateNodesOnSelect:st,elevateEdgesOnSelect:ct,minZoom:ye,maxZoom:be,nodeExtent:Ce,onNodesChange:Xe,onEdgesChange:Ze,snapToGrid:oe,snapGrid:se,connectionMode:B,translateExtent:xe,connectOnClick:rt,defaultEdgeOptions:ot,fitView:tt,fitViewOptions:nt,onNodesDelete:k,onEdgesDelete:A,onDelete:j,onNodeDragStart:E,onNodeDrag:D,onNodeDragStop:O,onSelectionDrag:P,onSelectionDragStart:N,onSelectionDragStop:F,onMove:p,onMoveStart:m,onMoveEnd:h,noPanClassName:et,nodeOrigin:me,rfId:Ot,autoPanOnConnect:ut,autoPanOnNodeDrag:dt,autoPanSpeed:ft,onError:ht,connectionRadius:pt,isValidConnection:mt,selectNodesOnDrag:le,nodeDragThreshold:K,connectionDragThreshold:vt,onBeforeDelete:z,debug:St,ariaLabelConfig:wt,zIndexMode:Tt}),(0,s.jsx)(zu,{onInit:f,onNodeClick:u,onEdgeClick:d,onNodeMouseEnter:x,onNodeMouseMove:S,onNodeMouseLeave:C,onNodeContextMenu:w,onNodeDoubleClick:T,nodeTypes:a,edgeTypes:l,connectionLineType:V,connectionLineStyle:H,connectionLineComponent:U,connectionLineContainerStyle:W,selectionKeyCode:ee,selectionOnDrag:te,selectionMode:ne,deleteKeyCode:G,multiSelectionKeyCode:ie,panActivationKeyCode:re,zoomActivationKeyCode:ae,onlyRenderVisibleElements:ce,defaultViewport:ve,translateExtent:xe,minZoom:ye,maxZoom:be,preventScrolling:Se,zoomOnScroll:Te,zoomOnPinch:Ee,zoomOnDoubleClick:Ae,panOnScroll:De,panOnScrollSpeed:Oe,panOnScrollMode:ke,panOnDrag:je,onPaneClick:Me,onPaneMouseEnter:Ne,onPaneMouseMove:Pe,onPaneMouseLeave:Fe,onPaneScroll:Ie,onPaneContextMenu:Le,paneClickDistance:Re,nodeClickDistance:ze,onSelectionContextMenu:I,onSelectionStart:L,onSelectionEnd:R,onReconnect:Ve,onReconnectStart:He,onReconnectEnd:Ue,onEdgeContextMenu:We,onEdgeDoubleClick:Ge,onEdgeMouseEnter:Ke,onEdgeMouseMove:qe,onEdgeMouseLeave:Je,reconnectRadius:Ye,defaultMarkerColor:we,noDragClassName:Qe,noWheelClassName:$e,noPanClassName:et,rfId:Ot,disableKeyboardA11y:lt,nodeExtent:Ce,viewport:yt,onViewportChange:q}),(0,s.jsx)(pc,{onSelectionChange:M}),Be,(0,s.jsx)(sc,{proOptions:at,position:it}),(0,s.jsx)(ac,{rfId:Ot,disableKeyboardA11y:lt})]})})}var Ku=Rc(Gu);Zi.error014();function qu({dimensions:e,lineWidth:t,variant:n,className:r}){return(0,s.jsx)(`path`,{strokeWidth:t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:c([`react-flow__background-pattern`,n,r])})}function Ju({radius:e,className:t}){return(0,s.jsx)(`circle`,{cx:e,cy:e,r:e,className:c([`react-flow__background-pattern`,`dots`,t])})}var Yu;(function(e){e.Lines=`lines`,e.Dots=`dots`,e.Cross=`cross`})(Yu||={});var Xu={[Yu.Dots]:1,[Yu.Lines]:1,[Yu.Cross]:6},Zu=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function Qu({id:e,variant:t=Yu.Dots,gap:n=20,size:r,lineWidth:i=1,offset:a=0,color:l,bgColor:u,style:d,className:f,patternClassName:p}){let m=(0,o.useRef)(null),{transform:h,patternId:g}=Q(Zu,Z),_=r||Xu[t],v=t===Yu.Dots,y=t===Yu.Cross,b=Array.isArray(n)?n:[n,n],x=[b[0]*h[2]||1,b[1]*h[2]||1],S=_*h[2],C=Array.isArray(a)?a:[a,a],w=y?[S,S]:x,T=[C[0]*h[2]||1+w[0]/2,C[1]*h[2]||1+w[1]/2],E=`${g}${e||``}`;return(0,s.jsxs)(`svg`,{className:c([`react-flow__background`,f]),style:{...d,...Xc,"--xy-background-color-props":u,"--xy-background-pattern-color-props":l},ref:m,"data-testid":`rf__background`,children:[(0,s.jsx)(`pattern`,{id:E,x:h[0]%x[0],y:h[1]%x[1],width:x[0],height:x[1],patternUnits:`userSpaceOnUse`,patternTransform:`translate(-${T[0]},-${T[1]})`,children:v?(0,s.jsx)(Ju,{radius:S/2,className:p}):(0,s.jsx)(qu,{dimensions:w,lineWidth:i,variant:t,className:p})}),(0,s.jsx)(`rect`,{x:`0`,y:`0`,width:`100%`,height:`100%`,fill:`url(#${E})`})]})}Qu.displayName=`Background`;var $u=(0,o.memo)(Qu);function ed(){return(0,s.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 32 32`,children:(0,s.jsx)(`path`,{d:`M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z`})})}function td(){return(0,s.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 32 5`,children:(0,s.jsx)(`path`,{d:`M0 0h32v4.2H0z`})})}function nd(){return(0,s.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 32 30`,children:(0,s.jsx)(`path`,{d:`M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z`})})}function rd(){return(0,s.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 25 32`,children:(0,s.jsx)(`path`,{d:`M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z`})})}function id(){return(0,s.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 25 32`,children:(0,s.jsx)(`path`,{d:`M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z`})})}function ad({children:e,className:t,...n}){return(0,s.jsx)(`button`,{type:`button`,className:c([`react-flow__controls-button`,t]),...n,children:e})}var od=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function sd({style:e,showZoom:t=!0,showFitView:n=!0,showInteractive:r=!0,fitViewOptions:i,onZoomIn:a,onZoomOut:o,onFitView:l,onInteractiveChange:u,className:d,children:f,position:p=`bottom-left`,orientation:m=`vertical`,"aria-label":h}){let g=$(),{isInteractive:_,minZoomReached:v,maxZoomReached:y,ariaLabelConfig:b}=Q(od,Z),{zoomIn:x,zoomOut:S,fitView:C}=Gc(),w=()=>{x(),a?.()},T=()=>{S(),o?.()},E=()=>{C(i),l?.()},D=()=>{g.setState({nodesDraggable:!_,nodesConnectable:!_,elementsSelectable:!_}),u?.(!_)};return(0,s.jsxs)(oc,{className:c([`react-flow__controls`,m===`horizontal`?`horizontal`:`vertical`,d]),position:p,style:e,"data-testid":`rf__controls`,"aria-label":h??b[`controls.ariaLabel`],children:[t&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(ad,{onClick:w,className:`react-flow__controls-zoomin`,title:b[`controls.zoomIn.ariaLabel`],"aria-label":b[`controls.zoomIn.ariaLabel`],disabled:y,children:(0,s.jsx)(ed,{})}),(0,s.jsx)(ad,{onClick:T,className:`react-flow__controls-zoomout`,title:b[`controls.zoomOut.ariaLabel`],"aria-label":b[`controls.zoomOut.ariaLabel`],disabled:v,children:(0,s.jsx)(td,{})})]}),n&&(0,s.jsx)(ad,{className:`react-flow__controls-fitview`,onClick:E,title:b[`controls.fitView.ariaLabel`],"aria-label":b[`controls.fitView.ariaLabel`],children:(0,s.jsx)(nd,{})}),r&&(0,s.jsx)(ad,{className:`react-flow__controls-interactive`,onClick:D,title:b[`controls.interactive.ariaLabel`],"aria-label":b[`controls.interactive.ariaLabel`],children:_?(0,s.jsx)(id,{}):(0,s.jsx)(rd,{})}),f]})}sd.displayName=`Controls`;var cd=(0,o.memo)(sd);function ld({id:e,x:t,y:n,width:r,height:i,style:a,color:o,strokeColor:l,strokeWidth:u,className:d,borderRadius:f,shapeRendering:p,selected:m,onClick:h}){let{background:g,backgroundColor:_}=a||{},v=o||g||_;return(0,s.jsx)(`rect`,{className:c([`react-flow__minimap-node`,{selected:m},d]),x:t,y:n,rx:f,ry:f,width:r,height:i,style:{fill:v,stroke:l,strokeWidth:u},shapeRendering:p,onClick:h?t=>h(t,e):void 0})}var ud=(0,o.memo)(ld),dd=e=>e.nodes.map(e=>e.id),fd=e=>e instanceof Function?e:()=>e;function pd({nodeStrokeColor:e,nodeColor:t,nodeClassName:n=``,nodeBorderRadius:r=5,nodeStrokeWidth:i,nodeComponent:a=ud,onClick:o}){let c=Q(dd,Z),l=fd(t),u=fd(e),d=fd(n),f=typeof window>`u`||window.chrome?`crispEdges`:`geometricPrecision`;return(0,s.jsx)(s.Fragment,{children:c.map(e=>(0,s.jsx)(hd,{id:e,nodeColorFunc:l,nodeStrokeColorFunc:u,nodeClassNameFunc:d,nodeBorderRadius:r,nodeStrokeWidth:i,NodeComponent:a,onClick:o,shapeRendering:f},e))})}function md({id:e,nodeColorFunc:t,nodeStrokeColorFunc:n,nodeClassNameFunc:r,nodeBorderRadius:i,nodeStrokeWidth:a,shapeRendering:o,NodeComponent:c,onClick:l}){let{node:u,x:d,y:f,width:p,height:m}=Q(t=>{let n=t.nodeLookup.get(e);if(!n)return{node:void 0,x:0,y:0,width:0,height:0};let r=n.internals.userNode,{x:i,y:a}=n.internals.positionAbsolute,{width:o,height:s}=Ga(r);return{node:r,x:i,y:a,width:o,height:s}},Z);return!u||u.hidden||!Ka(u)?null:(0,s.jsx)(c,{x:d,y:f,width:p,height:m,style:u.style,selected:!!u.selected,className:r(u),color:t(u),borderRadius:i,strokeColor:n(u),strokeWidth:a,shapeRendering:o,onClick:l,id:u.id})}var hd=(0,o.memo)(md),gd=(0,o.memo)(pd),_d=200,vd=150,yd=e=>!e.hidden,bd=e=>{let t={x:-e.transform[0]/e.transform[2],y:-e.transform[1]/e.transform[2],width:e.width/e.transform[2],height:e.height/e.transform[2]};return{viewBB:t,boundingRect:e.nodeLookup.size>0?ja(ma(e.nodeLookup,{filter:yd}),t):t,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},xd=`react-flow__minimap-desc`;function Sd({style:e,className:t,nodeStrokeColor:n,nodeColor:r,nodeClassName:i=``,nodeBorderRadius:a=5,nodeStrokeWidth:l,nodeComponent:u,bgColor:d,maskColor:f,maskStrokeColor:p,maskStrokeWidth:m,position:h=`bottom-right`,onClick:g,onNodeClick:_,pannable:v=!1,zoomable:y=!1,ariaLabel:b,inversePan:x,zoomStep:S=1,offsetScale:C=5}){let w=$(),T=(0,o.useRef)(null),{boundingRect:E,viewBB:D,rfId:O,panZoom:k,translateExtent:A,flowWidth:j,flowHeight:M,ariaLabelConfig:N}=Q(bd,Z),P=e?.width??_d,F=e?.height??vd,I=E.width/P,L=E.height/F,R=Math.max(I,L),z=R*P,B=R*F,V=C*R,H=E.x-(z-E.width)/2-V,U=E.y-(B-E.height)/2-V,W=z+V*2,G=B+V*2,ee=`${xd}-${O}`,te=(0,o.useRef)(0),ne=(0,o.useRef)();te.current=R,(0,o.useEffect)(()=>{if(T.current&&k)return ne.current=us({domNode:T.current,panZoom:k,getTransform:()=>w.getState().transform,getViewScale:()=>te.current}),()=>{ne.current?.destroy()}},[k]),(0,o.useEffect)(()=>{ne.current?.update({translateExtent:A,width:j,height:M,inversePan:x,pannable:v,zoomStep:S,zoomable:y})},[v,y,x,S,A,j,M]);let re=g?e=>{let[t,n]=ne.current?.pointer(e)||[0,0];g(e,{x:t,y:n})}:void 0,ie=_?(0,o.useCallback)((e,t)=>{let n=w.getState().nodeLookup.get(t).internals.userNode;_(e,n)},[]):void 0,ae=b??N[`minimap.ariaLabel`];return(0,s.jsx)(oc,{position:h,style:{...e,"--xy-minimap-background-color-props":typeof d==`string`?d:void 0,"--xy-minimap-mask-background-color-props":typeof f==`string`?f:void 0,"--xy-minimap-mask-stroke-color-props":typeof p==`string`?p:void 0,"--xy-minimap-mask-stroke-width-props":typeof m==`number`?m*R:void 0,"--xy-minimap-node-background-color-props":typeof r==`string`?r:void 0,"--xy-minimap-node-stroke-color-props":typeof n==`string`?n:void 0,"--xy-minimap-node-stroke-width-props":typeof l==`number`?l:void 0},className:c([`react-flow__minimap`,t]),"data-testid":`rf__minimap`,children:(0,s.jsxs)(`svg`,{width:P,height:F,viewBox:`${H} ${U} ${W} ${G}`,className:`react-flow__minimap-svg`,role:`img`,"aria-labelledby":ee,ref:T,onClick:re,children:[ae&&(0,s.jsx)(`title`,{id:ee,children:ae}),(0,s.jsx)(gd,{onClick:ie,nodeColor:r,nodeStrokeColor:n,nodeBorderRadius:a,nodeClassName:i,nodeStrokeWidth:l,nodeComponent:u}),(0,s.jsx)(`path`,{className:`react-flow__minimap-mask`,d:`M${H-V},${U-V}h${W+V*2}v${G+V*2}h${-W-V*2}z- M${D.x},${D.y}h${D.width}v${D.height}h${-D.width}z`,fillRule:`evenodd`,pointerEvents:`none`})]})})}Sd.displayName=`MiniMap`,(0,o.memo)(Sd);var Cd=e=>t=>e?`${Math.max(1/t.transform[2],1)}`:void 0,wd={[Ts.Line]:`right`,[Ts.Handle]:`bottom-right`};function Td({nodeId:e,position:t,variant:n=Ts.Handle,className:r,style:i=void 0,children:a,color:l,minWidth:u=10,minHeight:d=10,maxWidth:f=Number.MAX_VALUE,maxHeight:p=Number.MAX_VALUE,keepAspectRatio:m=!1,resizeDirection:h,autoScale:g=!0,shouldResize:_,onResizeStart:v,onResize:y,onResizeEnd:b}){let x=ul(),S=typeof e==`string`?e:x,C=$(),w=(0,o.useRef)(null),T=n===Ts.Handle,E=Q((0,o.useCallback)(Cd(T&&g),[T,g]),Z),D=(0,o.useRef)(null),O=t??wd[n];return(0,o.useEffect)(()=>{if(!(!w.current||!S))return D.current||=Ls({domNode:w.current,nodeId:S,getStoreItems:()=>{let{nodeLookup:e,transform:t,snapGrid:n,snapToGrid:r,nodeOrigin:i,domNode:a}=C.getState();return{nodeLookup:e,transform:t,snapGrid:n,snapToGrid:r,nodeOrigin:i,paneDomNode:a}},onChange:(e,t)=>{let{triggerNodeChanges:n,nodeLookup:r,parentLookup:i,nodeOrigin:a}=C.getState(),o=[],s={x:e.x,y:e.y},c=r.get(S);if(c&&c.expandParent&&c.parentId){let t=c.origin??a,n=e.width??c.measured.width??0,l=e.height??c.measured.height??0,u=Uo([{id:c.id,parentId:c.parentId,rect:{width:n,height:l,...qa({x:e.x??c.position.x,y:e.y??c.position.y},{width:n,height:l},c.parentId,r,t)}}],r,i,a);o.push(...u),s.x=e.x?Math.max(t[0]*n,e.x):void 0,s.y=e.y?Math.max(t[1]*l,e.y):void 0}if(s.x!==void 0&&s.y!==void 0){let e={id:S,type:`position`,position:{...s}};o.push(e)}if(e.width!==void 0&&e.height!==void 0){let t={id:S,type:`dimensions`,resizing:!0,setAttributes:h?h===`horizontal`?`width`:`height`:!0,dimensions:{width:e.width,height:e.height}};o.push(t)}for(let e of t){let t={...e,type:`position`};o.push(t)}n(o)},onEnd:({width:e,height:t})=>{let n={id:S,type:`dimensions`,resizing:!1,dimensions:{width:e,height:t}};C.getState().triggerNodeChanges([n])}}),D.current.update({controlPosition:O,boundaries:{minWidth:u,minHeight:d,maxWidth:f,maxHeight:p},keepAspectRatio:m,resizeDirection:h,onResizeStart:v,onResize:y,onResizeEnd:b,shouldResize:_}),()=>{D.current?.destroy()}},[O,u,d,f,p,m,v,y,b,_]),(0,s.jsx)(`div`,{className:c([`react-flow__resize-control`,`nodrag`,...O.split(`-`),n,r]),ref:w,style:{...i,scale:E,...l&&{[T?`backgroundColor`:`borderColor`]:l}},children:a})}(0,o.memo)(Td);var Ed=`- .react-flow { background: #0d1117; }- .react-flow__node-group {- background: rgba(88,166,255,0.05);- border: 1px dashed rgba(88,166,255,0.2);- border-radius: 8px;- }- .react-flow__node-default {- background: #161b22;- color: #c9d1d9;- border: 1px solid rgba(88,166,255,0.3);- border-radius: 6px;- padding: 10px;- white-space: pre-wrap;- font-size: 12px;- }-`;function Dd(){let[e,t]=(0,o.useState)([]),[n,r]=(0,o.useState)([]),[i,a]=(0,o.useState)(``),[c,l]=(0,o.useState)(``),u=async e=>{if(!c)return;let t=await fetch(`/api/provenance/report?node_id=${encodeURIComponent(c)}&format=${e}`);if(!t.ok)return;let n=await t.blob(),r=window.URL.createObjectURL(n),i=document.createElement(`a`);i.href=r,i.download=`${c}_provenance.${e===`markdown`?`md`:`json`}`,document.body.appendChild(i),i.click(),window.URL.revokeObjectURL(r),document.body.removeChild(i)};return(0,o.useEffect)(()=>{if(!c){t([]),r([]);return}let e=[{id:`group_agent`,type:`group`,position:{x:50,y:50},style:{width:800,height:120}},{id:`group_activity`,type:`group`,position:{x:50,y:200},style:{width:800,height:120}},{id:`group_entity`,type:`group`,position:{x:50,y:350},style:{width:800,height:120}}];(async()=>{try{let n=await fetch(`/api/provenance?node_id=`+encodeURIComponent(c));if(!n.ok){let e=await n.text();console.error(`HTTP ${n.status}: API Route missing or failed.`,e.substring(0,100));return}let i=n.headers.get(`content-type`);if(!i||!i.includes(`application/json`)){console.error(`Backend returned non-JSON response (likely an HTML fallback). Check FastAPI routing.`);return}let a=await n.json(),o={group_agent:0,group_activity:0,group_entity:0},s=a.nodes.map(e=>{let t=o[e.parent_id]||0;return o[e.parent_id]=t+1,{id:e.id,data:{label:e.label+`\\n(`+e.prov_type+`)`},position:{x:50+t*180,y:30},parentId:e.parent_id,extent:`parent`,type:`default`}}),l=a.edges.map(e=>({id:e.id,source:e.source,target:e.target,label:e.label,animated:!0,style:{stroke:`#58a6ff`}}));t([...e,...s]),r(l)}catch(e){console.error(e)}})()},[c]),(0,s.jsxs)(`div`,{style:{width:`100%`,height:`100%`,position:`relative`,background:`#0d1117`},children:[(0,s.jsx)(`style`,{children:Ed}),(0,s.jsxs)(`div`,{style:{position:`absolute`,top:16,left:16,zIndex:10,display:`flex`,gap:`12px`,alignItems:`center`},children:[(0,s.jsx)(`div`,{style:{background:`rgba(13,17,23,0.8)`,padding:`4px 8px`,borderRadius:4,color:`#fff`,fontWeight:600,border:`1px solid rgba(255,255,255,0.1)`,pointerEvents:`none`},children:`PROV-O Lineage`}),(0,s.jsxs)(`div`,{style:{display:`flex`,gap:`8px`,alignItems:`center`},children:[(0,s.jsx)(`input`,{type:`text`,placeholder:`Enter Node ID...`,value:i,onChange:e=>a(e.target.value),onKeyDown:e=>{e.key===`Enter`&&l(i)},style:{background:`rgba(0,0,0,0.3)`,border:`1px solid rgba(88,166,255,0.3)`,color:`#c9d1d9`,padding:`4px 8px`,borderRadius:`4px`,fontSize:`12px`,outline:`none`,width:`200px`}}),(0,s.jsx)(`button`,{onClick:()=>l(i),style:{background:`#1f6feb`,color:`#fff`,border:`none`,padding:`5px 12px`,borderRadius:`4px`,fontSize:`12px`,cursor:`pointer`,fontWeight:500},children:`Search`}),(0,s.jsx)(`button`,{onClick:()=>void u(`json`),disabled:!c,style:{background:`rgba(31, 111, 235, 0.18)`,color:`#fff`,border:`1px solid rgba(88,166,255,0.3)`,padding:`5px 12px`,borderRadius:`4px`,fontSize:`12px`,cursor:c?`pointer`:`not-allowed`,fontWeight:500,opacity:c?1:.5},children:`JSON`}),(0,s.jsx)(`button`,{onClick:()=>void u(`markdown`),disabled:!c,style:{background:`rgba(31, 111, 235, 0.18)`,color:`#fff`,border:`1px solid rgba(88,166,255,0.3)`,padding:`5px 12px`,borderRadius:`4px`,fontSize:`12px`,cursor:c?`pointer`:`not-allowed`,fontWeight:500,opacity:c?1:.5},children:`Markdown`})]})]}),c?(0,s.jsxs)(Ku,{nodes:e,edges:n,fitView:!0,children:[(0,s.jsx)($u,{color:`#30363d`,gap:20}),(0,s.jsx)(cd,{})]}):(0,s.jsx)(`div`,{style:{display:`flex`,height:`100%`,width:`100%`,alignItems:`center`,justifyContent:`center`,color:`#8b949e`,fontSize:`14px`},children:`Enter a Node ID to view its W3C PROV-O lineage.`})]})}export{Dd as LineageDiagram};\ No newline at end of filediff --git a/semantica/static/assets/TimelinePanel-DZ8Z1JsZ.js b/semantica/static/assets/TimelinePanel-DZ8Z1JsZ.jsdeleted file mode 100644index 0bd5131b..00000000--- a/semantica/static/assets/TimelinePanel-DZ8Z1JsZ.js+++ /dev/null@@ -1,36 +0,0 @@-import{i as e}from"./rolldown-runtime-B1FJdls4.js";import{T as t,a as n}from"./query-vendor-Cbp9LWgA.js";import{r}from"./index-DDOaKEbH.js";import{n as ee,t as te}from"./timeline-vendor-DxuOyw5t.js";var ne=r(),i=e(t(),1),a=n(),o=new Date(`1970-01-01T00:00:00Z`),re=new Date(`2030-01-01T00:00:00Z`),s=`playhead`,ie=500,ae=6,oe=`- .sem-timeline-wrap .vis-timeline { border: none !important; background: transparent !important; overflow: visible !important; }- .sem-timeline-wrap .vis-panel.vis-background, .sem-timeline-wrap .vis-panel.vis-center { background: transparent !important; }- .sem-timeline-wrap .vis-panel { border-color: rgba(88, 166, 255, 0.15) !important; }- .sem-timeline-wrap .vis-time-axis .vis-text {- color: #8b949e !important;- font-size: 11px !important;- font-family: 'JetBrains Mono', 'Fira Code', monospace !important;- padding-top: 3px !important;- }- .sem-timeline-wrap .vis-time-axis .vis-text.vis-major {- color: #c9d1d9 !important;- font-weight: 700 !important;- font-size: 12px !important;- }- .sem-timeline-wrap .vis-time-axis .vis-grid.vis-minor { border-color: rgba(88, 166, 255, 0.07) !important; }- .sem-timeline-wrap .vis-time-axis .vis-grid.vis-major { border-color: rgba(88, 166, 255, 0.18) !important; }- .sem-timeline-wrap .vis-custom-time.${s} {- background: rgba(88, 166, 255, 0.15) !important;- width: 2px !important;- cursor: ew-resize !important;- z-index: 5 !important;- }- .sem-timeline-wrap .vis-custom-time.${s} > .vis-custom-time-marker {- background: #58a6ff !important;- color: #0d1117 !important;- font-size: 10px !important;- font-weight: 700 !important;- border-radius: 3px !important;- padding: 1px 5px !important;- white-space: nowrap !important;- box-shadow: 0 0 8px rgba(88, 166, 255, 0.7) !important;- }- .sem-timeline-wrap .vis-current-time { display: none !important; }- .sem-timeline-wrap .vis-panel.vis-left { display: none !important; }-`;function c(e,t){if(!e)return t;let n=new Date(e);return Number.isNaN(n.getTime())?t:n}function l(e){return`${e.getFullYear()}/${String(e.getMonth()+1).padStart(2,`0`)}`}function se(e){let t=(0,ne.c)(56),{onTimeChange:n,minDate:r,maxDate:se}=e,u=(0,i.useRef)(null),d=(0,i.useRef)(null),f=(0,i.useRef)(o),p=(0,i.useRef)(null),[m,ce]=(0,i.useState)(!1),h;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(h=l(o),t[0]=h):h=t[0];let[g,_]=(0,i.useState)(h),v;t[1]===r?v=t[2]:(v=c(r,o),t[1]=r,t[2]=v);let y=v,b=c(se,re),x;t[3]!==b||t[4]!==y?(x=new Date(Math.round((y.getTime()+b.getTime())/2)),t[3]=b,t[4]=y,t[5]=x):x=t[5];let S=x,C,w;t[6]!==S||t[7]!==b||t[8]!==y||t[9]!==n?(C=()=>{if(!u.current)return;let e=d.current;if(!e){let e=new ee([]),t={height:`100%`,min:y,max:b,start:y,end:b,showCurrentTime:!1,zoomable:!0,moveable:!0,zoomMin:31536e6,zoomMax:252288e7,showMajorLabels:!0,showMinorLabels:!0,timeAxis:{scale:`year`,step:5},format:{minorLabels:{year:`YYYY`},majorLabels:{year:`YYYY`}},orientation:{axis:`bottom`},margin:{item:0,axis:0},selectable:!1,stack:!1},r=new te(u.current,e,t);return d.current=r,f.current=S,r.addCustomTime(S,s),r.on(`timechange`,e=>{e.id===s&&(f.current=e.time,r.setCustomTime(e.time,s),n(e.time),_(l(e.time)))}),n(S),_(l(S)),()=>{r.destroy(),d.current=null}}e.setOptions({min:y,max:b,start:y,end:b}),f.current=S,e.setCustomTime(S,s),n(S),_(l(S))},w=[S,b,y,n],t[6]=S,t[7]=b,t[8]=y,t[9]=n,t[10]=C,t[11]=w):(C=t[10],w=t[11]),(0,i.useEffect)(C,w);let T;t[12]!==b||t[13]!==y||t[14]!==n?(T=()=>{p.current||=setInterval(()=>{let e=d.current;if(!e)return;let t=new Date(f.current);t.setMonth(t.getMonth()+ae),t>=b&&t.setTime(y.getTime()),f.current=t,e.setCustomTime(t,s),n(t),_(l(t))},ie)},t[12]=b,t[13]=y,t[14]=n,t[15]=T):T=t[15];let E=T,D;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(D=()=>{p.current&&=(clearInterval(p.current),null)},t[16]=D):D=t[16];let O=D,k;t[17]===E?k=t[18]:(k=()=>{ce(e=>e?(O(),!1):(E(),!0))},t[17]=E,t[18]=k);let A=k,j,M;t[19]===Symbol.for(`react.memo_cache_sentinel`)?(M=()=>()=>O(),j=[O],t[19]=j,t[20]=M):(j=t[19],M=t[20]),(0,i.useEffect)(M,j);let N,P,F;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(N={position:`relative`,width:`100%`,height:`90px`,borderTop:`1px solid rgba(88, 166, 255, 0.2)`,background:`rgba(1, 4, 9, 0.88)`,backdropFilter:`blur(16px)`,WebkitBackdropFilter:`blur(16px)`,display:`flex`,alignItems:`stretch`,flexShrink:0},P=(0,a.jsx)(`style`,{children:oe}),F={display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,gap:4,padding:`0 16px`,borderRight:`1px solid rgba(88, 166, 255, 0.15)`,minWidth:80,flexShrink:0},t[21]=N,t[22]=P,t[23]=F):(N=t[21],P=t[22],F=t[23]);let I=m?`Pause Evolution`:`Play Evolution`,L=`1.5px solid ${m?`#58a6ff`:`rgba(88, 166, 255, 0.35)`}`,R=m?`rgba(88, 166, 255, 0.2)`:`rgba(88, 166, 255, 0.06)`,z=m?`0 0 10px rgba(88, 166, 255, 0.4)`:`none`,B;t[24]!==L||t[25]!==R||t[26]!==z?(B={width:34,height:34,borderRadius:`50%`,border:L,background:R,color:`#58a6ff`,cursor:`pointer`,display:`flex`,alignItems:`center`,justifyContent:`center`,transition:`all 0.2s`,boxShadow:z},t[24]=L,t[25]=R,t[26]=z,t[27]=B):B=t[27];let V;t[28]===m?V=t[29]:(V=m?(0,a.jsxs)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`currentColor`,children:[(0,a.jsx)(`rect`,{x:`6`,y:`4`,width:`4`,height:`16`}),(0,a.jsx)(`rect`,{x:`14`,y:`4`,width:`4`,height:`16`})]}):(0,a.jsx)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`currentColor`,children:(0,a.jsx)(`polygon`,{points:`5,3 19,12 5,21`})}),t[28]=m,t[29]=V);let H;t[30]!==I||t[31]!==B||t[32]!==V||t[33]!==A?(H=(0,a.jsx)(`button`,{id:`temporal-play-btn`,onClick:A,title:I,style:B,children:V}),t[30]=I,t[31]=B,t[32]=V,t[33]=A,t[34]=H):H=t[34];let U=m?`#58a6ff`:`#8b949e`,W;t[35]===U?W=t[36]:(W={fontSize:10,color:U,fontFamily:`monospace`,letterSpacing:`0.04em`,transition:`color 0.2s`},t[35]=U,t[36]=W);let G;t[37]!==g||t[38]!==W?(G=(0,a.jsx)(`span`,{style:W,children:g}),t[37]=g,t[38]=W,t[39]=G):G=t[39];let K;t[40]!==H||t[41]!==G?(K=(0,a.jsxs)(`div`,{style:F,children:[H,G]}),t[40]=H,t[41]=G,t[42]=K):K=t[42];let q;t[43]===Symbol.for(`react.memo_cache_sentinel`)?(q={position:`absolute`,top:5,left:100,fontSize:10,fontWeight:600,letterSpacing:`0.1em`,color:`rgba(88, 166, 255, 0.55)`,textTransform:`uppercase`,pointerEvents:`none`,zIndex:2},t[43]=q):q=t[43];let J;t[44]===y?J=t[45]:(J=y.getFullYear(),t[44]=y,t[45]=J);let Y;t[46]===b?Y=t[47]:(Y=b.getFullYear(),t[46]=b,t[47]=Y);let X;t[48]!==J||t[49]!==Y?(X=(0,a.jsxs)(`div`,{style:q,children:[`Temporal Scrubber · `,J,`-`,Y]}),t[48]=J,t[49]=Y,t[50]=X):X=t[50];let Z;t[51]===Symbol.for(`react.memo_cache_sentinel`)?(Z={flex:1,overflow:`hidden`,position:`relative`},t[51]=Z):Z=t[51];let Q;t[52]===Symbol.for(`react.memo_cache_sentinel`)?(Q=(0,a.jsx)(`div`,{className:`sem-timeline-wrap`,style:Z,children:(0,a.jsx)(`div`,{ref:u,style:{width:`100%`,height:`100%`,position:`relative`}})}),t[52]=Q):Q=t[52];let $;return t[53]!==K||t[54]!==X?($=(0,a.jsxs)(`div`,{style:N,children:[P,K,X,Q]}),t[53]=K,t[54]=X,t[55]=$):$=t[55],$}export{se as TimelinePanel};\ No newline at end of filediff --git a/semantica/static/assets/VocabularyWorkspace-BonIpRiP.js b/semantica/static/assets/VocabularyWorkspace-BonIpRiP.jsdeleted file mode 100644index eb4c2575..00000000--- a/semantica/static/assets/VocabularyWorkspace-BonIpRiP.js+++ /dev/null@@ -1,39 +0,0 @@-import{i as e,n as t,t as n}from"./rolldown-runtime-B1FJdls4.js";import{T as r,a as i,i as a,n as o,t as s}from"./query-vendor-Cbp9LWgA.js";import{a as c,i as l,n as u,r as d,t as f}from"./es-CS4MDIhr.js";import{n as p,r as m}from"./index-DDOaKEbH.js";import{t as h}from"./shim-CnYKr5zR.js";var g=p(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),_=p(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),v=p(`folder`,[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]),y=e(r()),b=m(),x=async()=>{let e=await fetch(`/api/vocabulary/schemes`);if(!e.ok)throw Error(`Failed to fetch vocabularies`);return e.json()},S=async e=>{let t=await fetch(`/api/vocabulary/hierarchy?scheme=${encodeURIComponent(e)}`);if(!t.ok)throw Error(`Failed to fetch hierarchy`);return t.json()},C=async e=>{let t=new FormData;t.append(`file`,e);let n=await fetch(`/api/vocabulary/import`,{method:`POST`,body:t});if(!n.ok)throw Error(`Failed to import vocabulary`);return n.json()},w=()=>{let e=(0,b.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={queryKey:[`vocabularies`],queryFn:x},e[0]=t):t=e[0],o(t)},T=e=>{let t=(0,b.c)(7),n,r;t[0]===e?(n=t[1],r=t[2]):(n=[`hierarchy`,e],r=()=>S(e),t[0]=e,t[1]=n,t[2]=r);let i=!!e,a;return t[3]!==n||t[4]!==r||t[5]!==i?(a={queryKey:n,queryFn:r,enabled:i},t[3]=n,t[4]=r,t[5]=i,t[6]=a):a=t[6],o(a)},E=()=>{let e=(0,b.c)(2),t=a(),n;return e[0]===t?n=e[1]:(n={mutationFn:C,onSuccess:()=>{t.invalidateQueries({queryKey:[`vocabularies`]})}},e[0]=t,e[1]=n),s(n)},D=(0,y.createContext)(null);function O(){let e=(0,y.useContext)(D);if(e===null)throw Error(`No Tree Api Provided`);return e}var k=(0,y.createContext)(null);function ee(){let e=(0,y.useContext)(k);if(e===null)throw Error(`Provide a NodesContext`);return e}var te=(0,y.createContext)(null);function ne(){let e=(0,y.useContext)(te);if(e===null)throw Error(`Provide a DnDContext`);return e}var re=(0,y.createContext)(0);function ie(){(0,y.useContext)(re)}var ae=t({access:()=>A,bound:()=>oe,dfs:()=>pe,focusNextElement:()=>he,focusPrevElement:()=>ge,getInsertIndex:()=>we,getInsertParentId:()=>Te,identify:()=>j,identifyNull:()=>be,indexOf:()=>de,isClosed:()=>ce,isDescendant:()=>ue,isItem:()=>se,isOpenWithEmptyChildren:()=>le,mergeRefs:()=>xe,noop:()=>fe,safeRun:()=>Se,waitFor:()=>Ce,walk:()=>me});function oe(e,t,n){return Math.max(Math.min(e,n),t)}function se(e){return e&&e.isLeaf}function ce(e){return e&&e.isInternal&&!e.isOpen}function le(e){return e&&e.isOpen&&!e.children?.length}var ue=(e,t)=>{let n=e;for(;n;){if(n.id===t.id)return!0;n=n.parent}return!1},de=e=>{if(!e.parent)throw Error(`Node does not have a parent`);return e.parent.children.findIndex(t=>t.id===e.id)};function fe(){}function pe(e,t){if(!e)return null;if(e.id===t)return e;if(e.children)for(let n of e.children){let e=pe(n,t);if(e)return e}return null}function me(e,t){if(t(e),e.children)for(let n of e.children)me(n,t)}function he(e){let t=ye(e),n;for(let r=0;r<t.length;++r)if(t[r]===e){n=_e(t,r);break}n?.focus()}function ge(e){let t=ye(e),n;for(let r=0;r<t.length;++r)if(t[r]===e){n=ve(t,r);break}n?.focus()}function _e(e,t){return t+1<e.length?e[t+1]:e[0]}function ve(e,t){return t-1>=0?e[t-1]:e[e.length-1]}function ye(e){return Array.from(document.querySelectorAll(`button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"]):not([disabled]), details:not([disabled]), summary:not(:disabled)`)).filter(t=>t===e||!e.contains(t))}function A(e,t){return typeof t==`boolean`?t:typeof t==`string`?e[t]:t(e)}function be(e){return e===null?null:j(e)}function j(e){return typeof e==`string`?e:e.id}function xe(...e){return t=>{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}function Se(e,...t){if(e)return e(...t)}function Ce(e){return new Promise((t,n)=>{let r=0;function i(){r+=1,r===100&&n(),e()?t():setTimeout(i,10)}i()})}function we(e){let t=e.focusedNode;return t?t.isOpen?0:t.parent?t.childIndex+1:0:e.root.children?.length??0}function Te(e){let t=e.focusedNode;return t?t.isOpen?t.id:t.parent&&!t.parent.isRoot?t.parent.id:null:null}var M=i(),Ee={display:`flex`,alignItems:`center`,zIndex:1},De={flex:1,height:`2px`,background:`#4B91E2`,borderRadius:`1px`},Oe={width:`4px`,height:`4px`,boxShadow:`0 0 0 3px #4B91E2`,borderRadius:`50%`},ke=y.memo(function({top:e,left:t,indent:n}){let r={position:`absolute`,pointerEvents:`none`,top:e-2+`px`,left:t+`px`,right:n+`px`};return(0,M.jsxs)(`div`,{style:Object.assign(Object.assign({},Ee),r),children:[(0,M.jsx)(`div`,{style:Object.assign({},Oe)}),(0,M.jsx)(`div`,{style:Object.assign({},De)})]})});function Ae({node:e,attrs:t,innerRef:n,children:r}){return(0,M.jsx)(`div`,Object.assign({},t,{ref:n,onFocus:e=>e.stopPropagation(),onClick:e.handleClick,children:r}))}function je(e){return(0,M.jsxs)(`div`,{ref:e.dragHandle,style:e.style,children:[(0,M.jsx)(`span`,{onClick:t=>{t.stopPropagation(),e.node.toggle()},children:e.node.isLeaf?`🌳`:e.node.isOpen?`🗁`:`🗀`}),` `,e.node.isEditing?(0,M.jsx)(Ne,Object.assign({},e)):(0,M.jsx)(Me,Object.assign({},e))]})}function Me(e){return(0,M.jsx)(M.Fragment,{children:(0,M.jsx)(`span`,{children:e.node.data.name})})}function Ne({node:e}){let t=(0,y.useRef)();return(0,y.useEffect)(()=>{var e,n;(e=t.current)==null||e.focus(),(n=t.current)==null||n.select()},[]),(0,M.jsx)(`input`,{ref:t,defaultValue:e.data.name,onBlur:()=>e.reset(),onKeyDown:n=>{n.key===`Escape`&&e.reset(),n.key===`Enter`&&e.submit(t.current?.value||``)}})}function Pe(e){return{type:`EDIT`,id:e}}function Fe(e={id:null},t){return t.type===`EDIT`?Object.assign(Object.assign({},e),{id:t.id}):e}function N(e){return{type:`FOCUS`,id:e}}function Ie(){return{type:`TREE_BLUR`}}function Le(e={id:null,treeFocused:!1},t){return t.type===`FOCUS`?Object.assign(Object.assign({},e),{id:t.id,treeFocused:!0}):t.type===`TREE_BLUR`?Object.assign(Object.assign({},e),{treeFocused:!1}):e}var Re=class e{constructor(e){this.handleClick=e=>{e.metaKey&&!this.tree.props.disableMultiSelection?this.isSelected?this.deselect():this.selectMulti():e.shiftKey&&!this.tree.props.disableMultiSelection?this.selectContiguous():(this.select(),this.activate())},this.tree=e.tree,this.id=e.id,this.data=e.data,this.level=e.level,this.children=e.children,this.parent=e.parent,this.isDraggable=e.isDraggable,this.rowIndex=e.rowIndex}get isRoot(){return this.id===ze}get isLeaf(){return!Array.isArray(this.children)}get isInternal(){return!this.isLeaf}get isOpen(){return this.isLeaf?!1:this.tree.isOpen(this.id)}get isClosed(){return this.isLeaf?!1:!this.tree.isOpen(this.id)}get isEditable(){return this.tree.isEditable(this.data)}get isEditing(){return this.tree.editingId===this.id}get isSelected(){return this.tree.isSelected(this.id)}get isOnlySelection(){return this.isSelected&&this.tree.hasOneSelection}get isSelectedStart(){return this.isSelected&&!this.prev?.isSelected}get isSelectedEnd(){return this.isSelected&&!this.next?.isSelected}get isFocused(){return this.tree.isFocused(this.id)}get isDragging(){return this.tree.isDragging(this.id)}get willReceiveDrop(){return this.tree.willReceiveDrop(this.id)}get state(){return{isClosed:this.isClosed,isDragging:this.isDragging,isEditing:this.isEditing,isFocused:this.isFocused,isInternal:this.isInternal,isLeaf:this.isLeaf,isOpen:this.isOpen,isSelected:this.isSelected,isSelectedEnd:this.isSelectedEnd,isSelectedStart:this.isSelectedStart,willReceiveDrop:this.willReceiveDrop}}get childIndex(){return this.parent&&this.parent.children?this.parent.children.findIndex(e=>e.id===this.id):-1}get next(){return this.rowIndex===null?null:this.tree.at(this.rowIndex+1)}get prev(){return this.rowIndex===null?null:this.tree.at(this.rowIndex-1)}get nextSibling(){let e=this.childIndex;return this.parent?.children[e+1]??null}isAncestorOf(e){if(!e)return!1;let t=e;for(;t;){if(t.id===this.id)return!0;t=t.parent}return!1}select(){this.tree.select(this)}deselect(){this.tree.deselect(this)}selectMulti(){this.tree.selectMulti(this)}selectContiguous(){this.tree.selectContiguous(this)}activate(){this.tree.activate(this)}focus(){this.tree.focus(this)}toggle(){this.tree.toggle(this)}open(){this.tree.open(this)}openParents(){this.tree.openParents(this)}close(){this.tree.close(this)}submit(e){this.tree.submit(this,e)}reset(){this.tree.reset()}clone(){return new e(Object.assign({},this))}edit(){return this.tree.edit(this)}},ze=`__REACT_ARBORIST_INTERNAL_ROOT__`;function Be(e){function t(n,r,i){let a=new Re({tree:e,data:n,level:r,parent:i,id:e.accessId(n),children:null,isDraggable:e.isDraggable(n),rowIndex:null}),o=e.accessChildren(n);return o&&(a.children=o.map(e=>t(e,r+1,a))),a}let n=new Re({tree:e,id:ze,data:{id:ze},level:-1,parent:null,children:null,isDraggable:!0,rowIndex:null});return n.children=(e.props.data??[]).map(e=>t(e,0,n)),n}var Ve={open(e,t){return{type:`VISIBILITY_OPEN`,id:e,filtered:t}},close(e,t){return{type:`VISIBILITY_CLOSE`,id:e,filtered:t}},toggle(e,t){return{type:`VISIBILITY_TOGGLE`,id:e,filtered:t}},clear(e){return{type:`VISIBILITY_CLEAR`,filtered:e}}};function He(e={},t){if(t.type===`VISIBILITY_OPEN`)return Object.assign(Object.assign({},e),{[t.id]:!0});if(t.type===`VISIBILITY_CLOSE`)return Object.assign(Object.assign({},e),{[t.id]:!1});if(t.type===`VISIBILITY_TOGGLE`){let n=e[t.id];return Object.assign(Object.assign({},e),{[t.id]:!n})}else if(t.type===`VISIBILITY_CLEAR`)return{};else return e}function Ue(e={filtered:{},unfiltered:{}},t){return t.type.startsWith(`VISIBILITY`)?t.filtered?Object.assign(Object.assign({},e),{filtered:He(e.filtered,t)}):Object.assign(Object.assign({},e),{unfiltered:He(e.unfiltered,t)}):e}var P=e=>({nodes:{open:{filtered:{},unfiltered:e?.initialOpenState??{}},focus:{id:null,treeFocused:!1},edit:{id:null},drag:{id:null,selectedIds:[],destinationParentId:null,destinationIndex:null},selection:{ids:new Set,anchor:null,mostRecent:null}},dnd:{cursor:{type:`none`},dragId:null,dragIds:[],parentId:null,index:-1}}),F={clear:()=>({type:`SELECTION_CLEAR`}),only:e=>({type:`SELECTION_ONLY`,id:j(e)}),add:e=>({type:`SELECTION_ADD`,ids:(Array.isArray(e)?e:[e]).map(j)}),remove:e=>({type:`SELECTION_REMOVE`,ids:(Array.isArray(e)?e:[e]).map(j)}),set:e=>Object.assign({type:`SELECTION_SET`},e),mostRecent:e=>({type:`SELECTION_MOST_RECENT`,id:e===null?null:j(e)}),anchor:e=>({type:`SELECTION_ANCHOR`,id:e===null?null:j(e)})};function We(e=P().nodes.selection,t){let n=e.ids;switch(t.type){case`SELECTION_CLEAR`:return Object.assign(Object.assign({},e),{ids:new Set});case`SELECTION_ONLY`:return Object.assign(Object.assign({},e),{ids:new Set([t.id])});case`SELECTION_ADD`:return t.ids.length===0?e:(t.ids.forEach(e=>n.add(e)),Object.assign(Object.assign({},e),{ids:new Set(n)}));case`SELECTION_REMOVE`:return t.ids.length===0?e:(t.ids.forEach(e=>n.delete(e)),Object.assign(Object.assign({},e),{ids:new Set(n)}));case`SELECTION_SET`:return Object.assign(Object.assign({},e),{ids:t.ids,mostRecent:t.mostRecent,anchor:t.anchor});case`SELECTION_MOST_RECENT`:return Object.assign(Object.assign({},e),{mostRecent:t.id});case`SELECTION_ANCHOR`:return Object.assign(Object.assign({},e),{anchor:t.id});default:return e}}var I={cursor(e){return{type:`DND_CURSOR`,cursor:e}},dragStart(e,t){return{type:`DND_DRAG_START`,id:e,dragIds:t}},dragEnd(){return{type:`DND_DRAG_END`}},hovering(e,t){return{type:`DND_HOVERING`,parentId:e,index:t}}};function Ge(e=P().dnd,t){switch(t.type){case`DND_CURSOR`:return Object.assign(Object.assign({},e),{cursor:t.cursor});case`DND_DRAG_START`:return Object.assign(Object.assign({},e),{dragId:t.id,dragIds:t.dragIds});case`DND_DRAG_END`:return P().dnd;case`DND_HOVERING`:return Object.assign(Object.assign({},e),{parentId:t.parentId,index:t.index});default:return e}}var Ke={position:`fixed`,pointerEvents:`none`,zIndex:100,left:0,top:0,width:`100%`,height:`100%`},qe=e=>{if(!e)return{display:`none`};let{x:t,y:n}=e;return{transform:`translate(${t}px, ${n}px)`}},Je=e=>{if(!e)return{display:`none`};let{x:t,y:n}=e;return{transform:`translate(${t+10}px, ${n+10}px)`}};function Ye({offset:e,mouse:t,id:n,dragIds:r,isDragging:i}){return(0,M.jsxs)(Xe,{isDragging:i,children:[(0,M.jsx)(Ze,{offset:e,children:(0,M.jsx)($e,{id:n,dragIds:r})}),(0,M.jsx)(Qe,{mouse:t,count:r.length})]})}var Xe=(0,y.memo)(function(e){return e.isDragging?(0,M.jsx)(`div`,{style:Ke,children:e.children}):null});function Ze(e){return(0,M.jsx)(`div`,{className:`row preview`,style:qe(e.offset),children:e.children})}function Qe(e){let{count:t,mouse:n}=e;return t>1?(0,M.jsx)(`div`,{className:`selected-count`,style:Je(n),children:t}):null}var $e=(0,y.memo)(function(e){let t=O(),n=t.get(e.id);return n?(0,M.jsx)(t.renderNode,{preview:!0,node:n,style:{paddingLeft:n.level*t.indent,opacity:.2,background:`transparent`},tree:t}):null});function et(){return et=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},et.apply(null,arguments)}function tt(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function nt(e,t){return nt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},nt(e,t)}function rt(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,nt(e,t)}var it=Number.isNaN||function(e){return typeof e==`number`&&e!==e};function at(e,t){return!!(e===t||it(e)&&it(t))}function ot(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!at(e[n],t[n]))return!1;return!0}function st(e,t){t===void 0&&(t=ot);var n,r=[],i,a=!1;function o(){var o=[...arguments];return a&&n===this&&t(o,r)?i:(i=e.apply(this,o),a=!0,n=this,r=o,i)}return o}var ct=typeof performance==`object`&&typeof performance.now==`function`?function(){return performance.now()}:function(){return Date.now()};function lt(e){cancelAnimationFrame(e.id)}function ut(e,t){var n=ct();function r(){ct()-n>=t?e.call(null):i.id=requestAnimationFrame(r)}var i={id:requestAnimationFrame(r)};return i}var dt=-1;function ft(e){if(e===void 0&&(e=!1),dt===-1||e){var t=document.createElement(`div`),n=t.style;n.width=`50px`,n.height=`50px`,n.overflow=`scroll`,document.body.appendChild(t),dt=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return dt}var pt=null;function mt(e){if(e===void 0&&(e=!1),pt===null||e){var t=document.createElement(`div`),n=t.style;n.width=`50px`,n.height=`50px`,n.overflow=`scroll`,n.direction=`rtl`;var r=document.createElement(`div`),i=r.style;return i.width=`100px`,i.height=`100px`,t.appendChild(r),document.body.appendChild(t),t.scrollLeft>0?pt=`positive-descending`:(t.scrollLeft=1,pt=t.scrollLeft===0?`negative`:`positive-ascending`),document.body.removeChild(t),pt}return pt}var ht=150,gt=function(e,t){return e};function _t(e){var t,n=e.getItemOffset,r=e.getEstimatedTotalSize,i=e.getItemSize,a=e.getOffsetForIndexAndAlignment,o=e.getStartIndexForOffset,s=e.getStopIndexForStartIndex,c=e.initInstanceProps,l=e.shouldResetStyleCacheOnItemSizeChange,u=e.validateProps;return t=function(e){rt(t,e);function t(t){var r=e.call(this,t)||this;return r._instanceProps=c(r.props,tt(r)),r._outerRef=void 0,r._resetIsScrollingTimeoutId=null,r.state={instance:tt(r),isScrolling:!1,scrollDirection:`forward`,scrollOffset:typeof r.props.initialScrollOffset==`number`?r.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},r._callOnItemsRendered=void 0,r._callOnItemsRendered=st(function(e,t,n,i){return r.props.onItemsRendered({overscanStartIndex:e,overscanStopIndex:t,visibleStartIndex:n,visibleStopIndex:i})}),r._callOnScroll=void 0,r._callOnScroll=st(function(e,t,n){return r.props.onScroll({scrollDirection:e,scrollOffset:t,scrollUpdateWasRequested:n})}),r._getItemStyle=void 0,r._getItemStyle=function(e){var t=r.props,a=t.direction,o=t.itemSize,s=t.layout,c=r._getItemStyleCache(l&&o,l&&s,l&&a),u;if(c.hasOwnProperty(e))u=c[e];else{var d=n(r.props,e,r._instanceProps),f=i(r.props,e,r._instanceProps),p=a===`horizontal`||s===`horizontal`,m=a===`rtl`,h=p?d:0;c[e]=u={position:`absolute`,left:m?void 0:h,right:m?h:void 0,top:p?0:d,height:p?`100%`:f,width:p?f:`100%`}}return u},r._getItemStyleCache=void 0,r._getItemStyleCache=st(function(e,t,n){return{}}),r._onScrollHorizontal=function(e){var t=e.currentTarget,n=t.clientWidth,i=t.scrollLeft,a=t.scrollWidth;r.setState(function(e){if(e.scrollOffset===i)return null;var t=r.props.direction,o=i;if(t===`rtl`)switch(mt()){case`negative`:o=-i;break;case`positive-descending`:o=a-n-i;break}return o=Math.max(0,Math.min(o,a-n)),{isScrolling:!0,scrollDirection:e.scrollOffset<o?`forward`:`backward`,scrollOffset:o,scrollUpdateWasRequested:!1}},r._resetIsScrollingDebounced)},r._onScrollVertical=function(e){var t=e.currentTarget,n=t.clientHeight,i=t.scrollHeight,a=t.scrollTop;r.setState(function(e){if(e.scrollOffset===a)return null;var t=Math.max(0,Math.min(a,i-n));return{isScrolling:!0,scrollDirection:e.scrollOffset<t?`forward`:`backward`,scrollOffset:t,scrollUpdateWasRequested:!1}},r._resetIsScrollingDebounced)},r._outerRefSetter=function(e){var t=r.props.outerRef;r._outerRef=e,typeof t==`function`?t(e):typeof t==`object`&&t&&t.hasOwnProperty(`current`)&&(t.current=e)},r._resetIsScrollingDebounced=function(){r._resetIsScrollingTimeoutId!==null&<(r._resetIsScrollingTimeoutId),r._resetIsScrollingTimeoutId=ut(r._resetIsScrolling,ht)},r._resetIsScrolling=function(){r._resetIsScrollingTimeoutId=null,r.setState({isScrolling:!1},function(){r._getItemStyleCache(-1,null)})},r}t.getDerivedStateFromProps=function(e,t){return vt(e,t),u(e),null};var d=t.prototype;return d.scrollTo=function(e){e=Math.max(0,e),this.setState(function(t){return t.scrollOffset===e?null:{scrollDirection:t.scrollOffset<e?`forward`:`backward`,scrollOffset:e,scrollUpdateWasRequested:!0}},this._resetIsScrollingDebounced)},d.scrollToItem=function(e,t){t===void 0&&(t=`auto`);var n=this.props,r=n.itemCount,i=n.layout,o=this.state.scrollOffset;e=Math.max(0,Math.min(e,r-1));var s=0;if(this._outerRef){var c=this._outerRef;s=i===`vertical`?c.scrollWidth>c.clientWidth?ft():0:c.scrollHeight>c.clientHeight?ft():0}this.scrollTo(a(this.props,e,t,o,this._instanceProps,s))},d.componentDidMount=function(){var e=this.props,t=e.direction,n=e.initialScrollOffset,r=e.layout;if(typeof n==`number`&&this._outerRef!=null){var i=this._outerRef;t===`horizontal`||r===`horizontal`?i.scrollLeft=n:i.scrollTop=n}this._callPropsCallbacks()},d.componentDidUpdate=function(){var e=this.props,t=e.direction,n=e.layout,r=this.state,i=r.scrollOffset;if(r.scrollUpdateWasRequested&&this._outerRef!=null){var a=this._outerRef;if(t===`horizontal`||n===`horizontal`)if(t===`rtl`)switch(mt()){case`negative`:a.scrollLeft=-i;break;case`positive-ascending`:a.scrollLeft=i;break;default:var o=a.clientWidth;a.scrollLeft=a.scrollWidth-o-i;break}else a.scrollLeft=i;else a.scrollTop=i}this._callPropsCallbacks()},d.componentWillUnmount=function(){this._resetIsScrollingTimeoutId!==null&<(this._resetIsScrollingTimeoutId)},d.render=function(){var e=this.props,t=e.children,n=e.className,i=e.direction,a=e.height,o=e.innerRef,s=e.innerElementType,c=e.innerTagName,l=e.itemCount,u=e.itemData,d=e.itemKey,f=d===void 0?gt:d,p=e.layout,m=e.outerElementType,h=e.outerTagName,g=e.style,_=e.useIsScrolling,v=e.width,b=this.state.isScrolling,x=i===`horizontal`||p===`horizontal`,S=x?this._onScrollHorizontal:this._onScrollVertical,C=this._getRangeToRender(),w=C[0],T=C[1],E=[];if(l>0)for(var D=w;D<=T;D++)E.push((0,y.createElement)(t,{data:u,key:f(D,u),index:D,isScrolling:_?b:void 0,style:this._getItemStyle(D)}));var O=r(this.props,this._instanceProps);return(0,y.createElement)(m||h||`div`,{className:n,onScroll:S,ref:this._outerRefSetter,style:et({position:`relative`,height:a,width:v,overflow:`auto`,WebkitOverflowScrolling:`touch`,willChange:`transform`,direction:i},g)},(0,y.createElement)(s||c||`div`,{children:E,ref:o,style:{height:x?`100%`:O,pointerEvents:b?`none`:void 0,width:x?O:`100%`}}))},d._callPropsCallbacks=function(){if(typeof this.props.onItemsRendered==`function`&&this.props.itemCount>0){var e=this._getRangeToRender(),t=e[0],n=e[1],r=e[2],i=e[3];this._callOnItemsRendered(t,n,r,i)}if(typeof this.props.onScroll==`function`){var a=this.state,o=a.scrollDirection,s=a.scrollOffset,c=a.scrollUpdateWasRequested;this._callOnScroll(o,s,c)}},d._getRangeToRender=function(){var e=this.props,t=e.itemCount,n=e.overscanCount,r=this.state,i=r.isScrolling,a=r.scrollDirection,c=r.scrollOffset;if(t===0)return[0,0,0,0];var l=o(this.props,c,this._instanceProps),u=s(this.props,l,c,this._instanceProps),d=!i||a===`backward`?Math.max(1,n):1,f=!i||a===`forward`?Math.max(1,n):1;return[Math.max(0,l-d),Math.max(0,Math.min(t-1,u+f)),l,u]},t}(y.PureComponent),t.defaultProps={direction:`ltr`,itemData:void 0,layout:`vertical`,overscanCount:2,useIsScrolling:!1},t}var vt=function(e,t){e.children,e.direction,e.height,e.layout,e.innerTagName,e.outerTagName,e.width,t.instance},yt=_t({getItemOffset:function(e,t){return t*e.itemSize},getItemSize:function(e,t){return e.itemSize},getEstimatedTotalSize:function(e){var t=e.itemCount;return e.itemSize*t},getOffsetForIndexAndAlignment:function(e,t,n,r,i,a){var o=e.direction,s=e.height,c=e.itemCount,l=e.itemSize,u=e.layout,d=e.width,f=o===`horizontal`||u===`horizontal`?d:s,p=Math.max(0,c*l-f),m=Math.min(p,t*l),h=Math.max(0,t*l-f+l+a);switch(n===`smart`&&(n=r>=h-f&&r<=m+f?`auto`:`center`),n){case`start`:return m;case`end`:return h;case`center`:var g=Math.round(h+(m-h)/2);return g<Math.ceil(f/2)?0:g>p+Math.floor(f/2)?p:g;default:return r>=h&&r<=m?r:r<h?h:m}},getStartIndexForOffset:function(e,t){var n=e.itemCount,r=e.itemSize;return Math.max(0,Math.min(n-1,Math.floor(t/r)))},getStopIndexForStartIndex:function(e,t,n){var r=e.direction,i=e.height,a=e.itemCount,o=e.itemSize,s=e.layout,c=e.width,l=r===`horizontal`||s===`horizontal`,u=t*o,d=Math.ceil(((l?c:i)+n-u)/o);return Math.max(0,Math.min(a-1,t+d-1))},initInstanceProps:function(e){},shouldResetStyleCacheOnItemSizeChange:!0,validateProps:function(e){e.itemSize}});function bt(){let e=O(),t=ne().cursor;if(!t||t.type!==`line`)return null;let n=e.indent,r=e.rowHeight*t.index+(e.props.padding??e.props.paddingTop??0),i=n*t.level,a=e.renderCursor;return(0,M.jsx)(a,{top:r,left:i,indent:n})}var xt=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},St=(0,y.forwardRef)(function(e,t){let{children:n}=e,r=xt(e,[`children`]),i=O();return(0,M.jsxs)(`div`,Object.assign({ref:t},r,{onClick:e=>{e.currentTarget===e.target&&i.deselectAll()},children:[(0,M.jsx)(Ct,{}),n]}))}),Ct=()=>{let e=O();return(0,M.jsx)(`div`,{style:{height:e.visibleNodes.length*e.rowHeight,width:`100%`,position:`absolute`,left:`0`,right:`0`},children:(0,M.jsx)(bt,{})})},wt=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},Tt=(0,y.forwardRef)(function(e,t){var{style:n}=e,r=wt(e,[`style`]);let i=O(),a=i.props.padding??i.props.paddingTop??0,o=i.props.padding??i.props.paddingBottom??0;return(0,M.jsx)(`div`,Object.assign({ref:t,style:Object.assign(Object.assign({},n),{height:`${parseFloat(n.height)+a+o}px`})},r))}),Et=(0,y.createContext)({dragDropManager:void 0}),L;(function(e){e.SOURCE=`SOURCE`,e.TARGET=`TARGET`})(L||={});function R(e,t){var n=[...arguments].slice(2);if(!e){var r;if(t===void 0)r=Error(`Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.`);else{var i=0;r=Error(t.replace(/%s/g,function(){return n[i++]})),r.name=`Invariant Violation`}throw r.framesToPop=1,r}}var Dt=`dnd-core/INIT_COORDS`,Ot=`dnd-core/BEGIN_DRAG`,kt=`dnd-core/PUBLISH_DRAG_SOURCE`,At=`dnd-core/HOVER`,jt=`dnd-core/DROP`,Mt=`dnd-core/END_DRAG`;function Nt(e,t){return{type:Dt,payload:{sourceClientOffset:t||null,clientOffset:e||null}}}function Pt(e){"@babel/helpers - typeof";return Pt=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Pt(e)}function Ft(e,t,n){return t.split(`.`).reduce(function(e,t){return e&&e[t]?e[t]:n||null},e)}function It(e,t){return e.filter(function(e){return e!==t})}function Lt(e){return Pt(e)===`object`}function Rt(e,t){var n=new Map,r=function(e){n.set(e,n.has(e)?n.get(e)+1:1)};e.forEach(r),t.forEach(r);var i=[];return n.forEach(function(e,t){e===1&&i.push(t)}),i}function zt(e,t){return e.filter(function(e){return t.indexOf(e)>-1})}var Bt={type:Dt,payload:{clientOffset:null,sourceClientOffset:null}};function Vt(e){return function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{publishSource:!0},r=n.publishSource,i=r===void 0?!0:r,a=n.clientOffset,o=n.getSourceClientOffset,s=e.getMonitor(),c=e.getRegistry();e.dispatch(Nt(a)),Ht(t,s,c);var l=Gt(t,s);if(l===null){e.dispatch(Bt);return}var u=null;if(a){if(!o)throw Error(`getSourceClientOffset must be defined`);Ut(o),u=o(l)}e.dispatch(Nt(a,u));var d=c.getSource(l).beginDrag(s,l);if(d!=null)return Wt(d),c.pinSource(l),{type:Ot,payload:{itemType:c.getSourceType(l),item:d,sourceId:l,clientOffset:a||null,sourceClientOffset:u||null,isSourcePublic:!!i}}}}function Ht(e,t,n){R(!t.isDragging(),`Cannot call beginDrag while dragging.`),e.forEach(function(e){R(n.getSource(e),`Expected sourceIds to be registered.`)})}function Ut(e){R(typeof e==`function`,`When clientOffset is provided, getSourceClientOffset must be a function.`)}function Wt(e){R(Lt(e),`Item must be an object.`)}function Gt(e,t){for(var n=null,r=e.length-1;r>=0;r--)if(t.canDragSource(e[r])){n=e[r];break}return n}function Kt(e){return function(){if(e.getMonitor().isDragging())return{type:kt}}}function qt(e,t){return t===null?e===null:Array.isArray(e)?e.some(function(e){return e===t}):e===t}function Jt(e){return function(t){var n=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{}).clientOffset;Yt(t);var r=t.slice(0),i=e.getMonitor(),a=e.getRegistry();return Xt(r,i,a),Zt(r,a,i.getItemType()),Qt(r,i,a),{type:At,payload:{targetIds:r,clientOffset:n||null}}}}function Yt(e){R(Array.isArray(e),`Expected targetIds to be an array.`)}function Xt(e,t,n){R(t.isDragging(),`Cannot call hover while not dragging.`),R(!t.didDrop(),`Cannot call hover after drop.`);for(var r=0;r<e.length;r++){var i=e[r];R(e.lastIndexOf(i)===r,`Expected targetIds to be unique in the passed array.`),R(n.getTarget(i),`Expected targetIds to be registered.`)}}function Zt(e,t,n){for(var r=e.length-1;r>=0;r--){var i=e[r];qt(t.getTargetType(i),n)||e.splice(r,1)}}function Qt(e,t,n){e.forEach(function(e){n.getTarget(e).hover(t,e)})}function $t(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function en(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?$t(Object(n),!0).forEach(function(t){tn(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$t(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function tn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nn(e){return function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=e.getMonitor(),r=e.getRegistry();rn(n),sn(n).forEach(function(i,a){var o=an(i,a,r,n),s={type:jt,payload:{dropResult:en(en({},t),o)}};e.dispatch(s)})}}function rn(e){R(e.isDragging(),`Cannot call drop while not dragging.`),R(!e.didDrop(),`Cannot call drop twice during one drag operation.`)}function an(e,t,n,r){var i=n.getTarget(e),a=i?i.drop(r,e):void 0;return on(a),a===void 0&&(a=t===0?{}:r.getDropResult()),a}function on(e){R(e===void 0||Lt(e),`Drop result must either be an object or undefined.`)}function sn(e){var t=e.getTargetIds().filter(e.canDropOnTarget,e);return t.reverse(),t}function cn(e){return function(){var t=e.getMonitor(),n=e.getRegistry();ln(t);var r=t.getSourceId();return r!=null&&(n.getSource(r,!0).endDrag(t,r),n.unpinSource()),{type:Mt}}}function ln(e){R(e.isDragging(),`Cannot call endDrag while not dragging.`)}function un(e){return{beginDrag:Vt(e),publishDragSource:Kt(e),hover:Jt(e),drop:nn(e),endDrag:cn(e)}}function dn(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function fn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function pn(e,t,n){return t&&fn(e.prototype,t),n&&fn(e,n),e}function z(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var mn=function(){function e(t,n){var r=this;dn(this,e),z(this,`store`,void 0),z(this,`monitor`,void 0),z(this,`backend`,void 0),z(this,`isSetUp`,!1),z(this,`handleRefCountChange`,function(){var e=r.store.getState().refCount>0;r.backend&&(e&&!r.isSetUp?(r.backend.setup(),r.isSetUp=!0):!e&&r.isSetUp&&(r.backend.teardown(),r.isSetUp=!1))}),this.store=t,this.monitor=n,t.subscribe(this.handleRefCountChange)}return pn(e,[{key:`receiveBackend`,value:function(e){this.backend=e}},{key:`getMonitor`,value:function(){return this.monitor}},{key:`getBackend`,value:function(){return this.backend}},{key:`getRegistry`,value:function(){return this.monitor.registry}},{key:`getActions`,value:function(){var e=this,t=this.store.dispatch;function n(n){return function(){var r=[...arguments],i=n.apply(e,r);i!==void 0&&t(i)}}var r=un(this);return Object.keys(r).reduce(function(e,t){var i=r[t];return e[t]=n(i),e},{})}},{key:`dispatch`,value:function(e){this.store.dispatch(e)}}]),e}();function B(e){return`Minified Redux error #`+e+`; visit https://redux.js.org/Errors?code=`+e+` for the full message or use the non-minified dev environment for full errors. `}var hn=(function(){return typeof Symbol==`function`&&Symbol.observable||`@@observable`})(),gn=function(){return Math.random().toString(36).substring(7).split(``).join(`.`)},_n={INIT:`@@redux/INIT`+gn(),REPLACE:`@@redux/REPLACE`+gn(),PROBE_UNKNOWN_ACTION:function(){return`@@redux/PROBE_UNKNOWN_ACTION`+gn()}};function vn(e){if(typeof e!=`object`||!e)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function yn(e,t,n){var r;if(typeof t==`function`&&typeof n==`function`||typeof n==`function`&&typeof arguments[3]==`function`)throw Error(B(0));if(typeof t==`function`&&n===void 0&&(n=t,t=void 0),n!==void 0){if(typeof n!=`function`)throw Error(B(1));return n(yn)(e,t)}if(typeof e!=`function`)throw Error(B(2));var i=e,a=t,o=[],s=o,c=!1;function l(){s===o&&(s=o.slice())}function u(){if(c)throw Error(B(3));return a}function d(e){if(typeof e!=`function`)throw Error(B(4));if(c)throw Error(B(5));var t=!0;return l(),s.push(e),function(){if(t){if(c)throw Error(B(6));t=!1,l();var n=s.indexOf(e);s.splice(n,1),o=null}}}function f(e){if(!vn(e))throw Error(B(7));if(e.type===void 0)throw Error(B(8));if(c)throw Error(B(9));try{c=!0,a=i(a,e)}finally{c=!1}for(var t=o=s,n=0;n<t.length;n++){var r=t[n];r()}return e}function p(e){if(typeof e!=`function`)throw Error(B(10));i=e,f({type:_n.REPLACE})}function m(){var e,t=d;return e={subscribe:function(e){if(typeof e!=`object`||!e)throw Error(B(11));function n(){e.next&&e.next(u())}return n(),{unsubscribe:t(n)}}},e[hn]=function(){return this},e}return f({type:_n.INIT}),r={dispatch:f,subscribe:d,getState:u,replaceReducer:p},r[hn]=m,r}var bn=function(e,t){return e===t};function xn(e,t){return!e&&!t?!0:!e||!t?!1:e.x===t.x&&e.y===t.y}function Sn(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:bn;if(e.length!==t.length)return!1;for(var r=0;r<e.length;++r)if(!n(e[r],t[r]))return!1;return!0}function Cn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function wn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Cn(Object(n),!0).forEach(function(t){Tn(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Cn(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Tn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var En={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function Dn(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:En,t=arguments.length>1?arguments[1]:void 0,n=t.payload;switch(t.type){case Dt:case Ot:return{initialSourceClientOffset:n.sourceClientOffset,initialClientOffset:n.clientOffset,clientOffset:n.clientOffset};case At:return xn(e.clientOffset,n.clientOffset)?e:wn(wn({},e),{},{clientOffset:n.clientOffset});case Mt:case jt:return En;default:return e}}var On=`dnd-core/ADD_SOURCE`,kn=`dnd-core/ADD_TARGET`,An=`dnd-core/REMOVE_SOURCE`,jn=`dnd-core/REMOVE_TARGET`;function Mn(e){return{type:On,payload:{sourceId:e}}}function Nn(e){return{type:kn,payload:{targetId:e}}}function Pn(e){return{type:An,payload:{sourceId:e}}}function Fn(e){return{type:jn,payload:{targetId:e}}}function In(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function V(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?In(Object(n),!0).forEach(function(t){Ln(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):In(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Ln(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Rn={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function zn(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Rn,t=arguments.length>1?arguments[1]:void 0,n=t.payload;switch(t.type){case Ot:return V(V({},e),{},{itemType:n.itemType,item:n.item,sourceId:n.sourceId,isSourcePublic:n.isSourcePublic,dropResult:null,didDrop:!1});case kt:return V(V({},e),{},{isSourcePublic:!0});case At:return V(V({},e),{},{targetIds:n.targetIds});case jn:return e.targetIds.indexOf(n.targetId)===-1?e:V(V({},e),{},{targetIds:It(e.targetIds,n.targetId)});case jt:return V(V({},e),{},{dropResult:n.dropResult,didDrop:!0,targetIds:[]});case Mt:return V(V({},e),{},{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return e}}function Bn(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;switch((arguments.length>1?arguments[1]:void 0).type){case On:case kn:return e+1;case An:case jn:return e-1;default:return e}}var Vn=[],Hn=[];Vn.__IS_NONE__=!0,Hn.__IS_ALL__=!0;function Un(e,t){return e===Vn?!1:e===Hn||t===void 0?!0:zt(t,e).length>0}function Wn(){arguments.length>0&&arguments[0]!==void 0&&arguments[0];var e=arguments.length>1?arguments[1]:void 0;switch(e.type){case At:break;case On:case kn:case jn:case An:return Vn;case Ot:case kt:case Mt:case jt:default:return Hn}var t=e.payload,n=t.targetIds,r=n===void 0?[]:n,i=t.prevTargetIds,a=i===void 0?[]:i,o=Rt(r,a);if(!(o.length>0||!Sn(r,a)))return Vn;var s=a[a.length-1],c=r[r.length-1];return s!==c&&(s&&o.push(s),c&&o.push(c)),o}function Gn(){return(arguments.length>0&&arguments[0]!==void 0?arguments[0]:0)+1}function Kn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function qn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Kn(Object(n),!0).forEach(function(t){Jn(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Kn(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Jn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Yn(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return{dirtyHandlerIds:Wn(e.dirtyHandlerIds,{type:t.type,payload:qn(qn({},t.payload),{},{prevTargetIds:Ft(e,`dragOperation.targetIds`,[])})}),dragOffset:Dn(e.dragOffset,t),refCount:Bn(e.refCount,t),dragOperation:zn(e.dragOperation,t),stateId:Gn(e.stateId)}}function Xn(e,t){return{x:e.x+t.x,y:e.y+t.y}}function Zn(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Qn(e){var t=e.clientOffset,n=e.initialClientOffset,r=e.initialSourceClientOffset;return!t||!n||!r?null:Zn(Xn(t,r),n)}function $n(e){var t=e.clientOffset,n=e.initialClientOffset;return!t||!n?null:Zn(t,n)}function er(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function tr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function nr(e,t,n){return t&&tr(e.prototype,t),n&&tr(e,n),e}function rr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ir=function(){function e(t,n){er(this,e),rr(this,`store`,void 0),rr(this,`registry`,void 0),this.store=t,this.registry=n}return nr(e,[{key:`subscribeToStateChange`,value:function(e){var t=this,n=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{handlerIds:void 0}).handlerIds;R(typeof e==`function`,`listener must be a function.`),R(n===void 0||Array.isArray(n),`handlerIds, when specified, must be an array of strings.`);var r=this.store.getState().stateId;return this.store.subscribe(function(){var i=t.store.getState(),a=i.stateId;try{a===r||a===r+1&&!Un(i.dirtyHandlerIds,n)||e()}finally{r=a}})}},{key:`subscribeToOffsetChange`,value:function(e){var t=this;R(typeof e==`function`,`listener must be a function.`);var n=this.store.getState().dragOffset;return this.store.subscribe(function(){var r=t.store.getState().dragOffset;r!==n&&(n=r,e())})}},{key:`canDragSource`,value:function(e){if(!e)return!1;var t=this.registry.getSource(e);return R(t,`Expected to find a valid source. sourceId=${e}`),this.isDragging()?!1:t.canDrag(this,e)}},{key:`canDropOnTarget`,value:function(e){if(!e)return!1;var t=this.registry.getTarget(e);return R(t,`Expected to find a valid target. targetId=${e}`),!this.isDragging()||this.didDrop()?!1:qt(this.registry.getTargetType(e),this.getItemType())&&t.canDrop(this,e)}},{key:`isDragging`,value:function(){return!!this.getItemType()}},{key:`isDraggingSource`,value:function(e){if(!e)return!1;var t=this.registry.getSource(e,!0);return R(t,`Expected to find a valid source. sourceId=${e}`),!this.isDragging()||!this.isSourcePublic()||this.registry.getSourceType(e)!==this.getItemType()?!1:t.isDragging(this,e)}},{key:`isOverTarget`,value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{shallow:!1};if(!e)return!1;var n=t.shallow;if(!this.isDragging())return!1;var r=this.registry.getTargetType(e),i=this.getItemType();if(i&&!qt(r,i))return!1;var a=this.getTargetIds();if(!a.length)return!1;var o=a.indexOf(e);return n?o===a.length-1:o>-1}},{key:`getItemType`,value:function(){return this.store.getState().dragOperation.itemType}},{key:`getItem`,value:function(){return this.store.getState().dragOperation.item}},{key:`getSourceId`,value:function(){return this.store.getState().dragOperation.sourceId}},{key:`getTargetIds`,value:function(){return this.store.getState().dragOperation.targetIds}},{key:`getDropResult`,value:function(){return this.store.getState().dragOperation.dropResult}},{key:`didDrop`,value:function(){return this.store.getState().dragOperation.didDrop}},{key:`isSourcePublic`,value:function(){return!!this.store.getState().dragOperation.isSourcePublic}},{key:`getInitialClientOffset`,value:function(){return this.store.getState().dragOffset.initialClientOffset}},{key:`getInitialSourceClientOffset`,value:function(){return this.store.getState().dragOffset.initialSourceClientOffset}},{key:`getClientOffset`,value:function(){return this.store.getState().dragOffset.clientOffset}},{key:`getSourceClientOffset`,value:function(){return Qn(this.store.getState().dragOffset)}},{key:`getDifferenceFromInitialOffset`,value:function(){return $n(this.store.getState().dragOffset)}}]),e}(),ar=0;function or(){return ar++}function sr(e){"@babel/helpers - typeof";return sr=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},sr(e)}function cr(e){R(typeof e.canDrag==`function`,`Expected canDrag to be a function.`),R(typeof e.beginDrag==`function`,`Expected beginDrag to be a function.`),R(typeof e.endDrag==`function`,`Expected endDrag to be a function.`)}function lr(e){R(typeof e.canDrop==`function`,`Expected canDrop to be a function.`),R(typeof e.hover==`function`,`Expected hover to be a function.`),R(typeof e.drop==`function`,`Expected beginDrag to be a function.`)}function ur(e,t){if(t&&Array.isArray(e)){e.forEach(function(e){return ur(e,!1)});return}R(typeof e==`string`||sr(e)===`symbol`,t?`Type can only be a string, a symbol, or an array of either.`:`Type can only be a string or a symbol.`)}var dr=typeof global<`u`?global:self,fr=dr.MutationObserver||dr.WebKitMutationObserver;function pr(e){return function(){let t=setTimeout(r,0),n=setInterval(r,50);function r(){clearTimeout(t),clearInterval(n),e()}}}function mr(e){let t=1,n=new fr(e),r=document.createTextNode(``);return n.observe(r,{characterData:!0}),function(){t=-t,r.data=t}}var hr=typeof fr==`function`?mr:pr,gr=class{enqueueTask(e){let{queue:t,requestFlush:n}=this;t.length||(n(),this.flushing=!0),t[t.length]=e}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{let{queue:e}=this;for(;this.index<e.length;){let t=this.index;if(this.index++,e[t].call(),this.index>this.capacity){for(let t=0,n=e.length-this.index;t<n;t++)e[t]=e[t+this.index];e.length-=this.index,this.index=0}}e.length=0,this.index=0,this.flushing=!1},this.registerPendingError=e=>{this.pendingErrors.push(e),this.requestErrorThrow()},this.requestFlush=hr(this.flush),this.requestErrorThrow=pr(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}},_r=class{call(){try{this.task&&this.task()}catch(e){this.onError(e)}finally{this.task=null,this.release(this)}}constructor(e,t){this.onError=e,this.release=t,this.task=null}},vr=class{create(e){let t=this.freeTasks,n=t.length?t.pop():new _r(this.onError,e=>t[t.length]=e);return n.task=e,n}constructor(e){this.onError=e,this.freeTasks=[]}},yr=new gr,br=new vr(yr.registerPendingError);function xr(e){yr.enqueueTask(br.create(e))}function Sr(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function Cr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function wr(e,t,n){return t&&Cr(e.prototype,t),n&&Cr(e,n),e}function H(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Tr(e,t){return Ar(e)||kr(e,t)||Dr(e,t)||Er()}function Er(){throw TypeError(`Invalid attempt to destructure non-iterable instance.-In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Dr(e,t){if(e){if(typeof e==`string`)return Or(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Or(e,t)}}function Or(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function kr(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r=[],i=!0,a=!1,o,s;try{for(n=n.call(e);!(i=(o=n.next()).done)&&(r.push(o.value),!(t&&r.length===t));i=!0);}catch(e){a=!0,s=e}finally{try{!i&&n.return!=null&&n.return()}finally{if(a)throw s}}return r}}function Ar(e){if(Array.isArray(e))return e}function jr(e){var t=or().toString();switch(e){case L.SOURCE:return`S${t}`;case L.TARGET:return`T${t}`;default:throw Error(`Unknown Handler Role: ${e}`)}}function Mr(e){switch(e[0]){case`S`:return L.SOURCE;case`T`:return L.TARGET;default:R(!1,`Cannot parse handler ID: ${e}`)}}function Nr(e,t){var n=e.entries(),r=!1;do{var i=n.next(),a=i.done;if(Tr(i.value,2)[1]===t)return!0;r=!!a}while(!r);return!1}var Pr=function(){function e(t){Sr(this,e),H(this,`types`,new Map),H(this,`dragSources`,new Map),H(this,`dropTargets`,new Map),H(this,`pinnedSourceId`,null),H(this,`pinnedSource`,null),H(this,`store`,void 0),this.store=t}return wr(e,[{key:`addSource`,value:function(e,t){ur(e),cr(t);var n=this.addHandler(L.SOURCE,e,t);return this.store.dispatch(Mn(n)),n}},{key:`addTarget`,value:function(e,t){ur(e,!0),lr(t);var n=this.addHandler(L.TARGET,e,t);return this.store.dispatch(Nn(n)),n}},{key:`containsHandler`,value:function(e){return Nr(this.dragSources,e)||Nr(this.dropTargets,e)}},{key:`getSource`,value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return R(this.isSourceId(e),`Expected a valid source ID.`),t&&e===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(e)}},{key:`getTarget`,value:function(e){return R(this.isTargetId(e),`Expected a valid target ID.`),this.dropTargets.get(e)}},{key:`getSourceType`,value:function(e){return R(this.isSourceId(e),`Expected a valid source ID.`),this.types.get(e)}},{key:`getTargetType`,value:function(e){return R(this.isTargetId(e),`Expected a valid target ID.`),this.types.get(e)}},{key:`isSourceId`,value:function(e){return Mr(e)===L.SOURCE}},{key:`isTargetId`,value:function(e){return Mr(e)===L.TARGET}},{key:`removeSource`,value:function(e){var t=this;R(this.getSource(e),`Expected an existing source.`),this.store.dispatch(Pn(e)),xr(function(){t.dragSources.delete(e),t.types.delete(e)})}},{key:`removeTarget`,value:function(e){R(this.getTarget(e),`Expected an existing target.`),this.store.dispatch(Fn(e)),this.dropTargets.delete(e),this.types.delete(e)}},{key:`pinSource`,value:function(e){var t=this.getSource(e);R(t,`Expected an existing source.`),this.pinnedSourceId=e,this.pinnedSource=t}},{key:`unpinSource`,value:function(){R(this.pinnedSource,`No source is pinned at the time.`),this.pinnedSourceId=null,this.pinnedSource=null}},{key:`addHandler`,value:function(e,t,n){var r=jr(e);return this.types.set(r,t),e===L.SOURCE?this.dragSources.set(r,n):e===L.TARGET&&this.dropTargets.set(r,n),r}}]),e}();function Fr(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:void 0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=Ir(arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1),i=new mn(r,new ir(r,new Pr(r))),a=e(i,t,n);return i.receiveBackend(a),i}function Ir(e){var t=typeof window<`u`&&window.__REDUX_DEVTOOLS_EXTENSION__;return yn(Yn,e&&t&&t({name:`dnd-core`,instanceId:`dnd-core`}))}var Lr=[`children`];function Rr(e,t){return Ur(e)||Hr(e,t)||Br(e,t)||zr()}function zr(){throw TypeError(`Invalid attempt to destructure non-iterable instance.-In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Br(e,t){if(e){if(typeof e==`string`)return Vr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Vr(e,t)}}function Vr(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Hr(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r=[],i=!0,a=!1,o,s;try{for(n=n.call(e);!(i=(o=n.next()).done)&&(r.push(o.value),!(t&&r.length===t));i=!0);}catch(e){a=!0,s=e}finally{try{!i&&n.return!=null&&n.return()}finally{if(a)throw s}}return r}}function Ur(e){if(Array.isArray(e))return e}function Wr(e,t){if(e==null)return{};var n=Gr(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Gr(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var Kr=0,qr=Symbol.for(`__REACT_DND_CONTEXT_INSTANCE__`),Jr=(0,y.memo)(function(e){var t=e.children,n=Rr(Yr(Wr(e,Lr)),2),r=n[0],i=n[1];return(0,y.useEffect)(function(){if(i){var e=Zr();return++Kr,function(){--Kr===0&&(e[qr]=null)}}},[]),(0,M.jsx)(Et.Provider,Object.assign({value:r},{children:t}),void 0)});function Yr(e){return`manager`in e?[{dragDropManager:e.manager},!1]:[Xr(e.backend,e.context,e.options,e.debugMode),!e.context]}function Xr(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Zr(),n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,i=t;return i[qr]||(i[qr]={dragDropManager:Fr(e,t,n,r)}),i[qr]}function Zr(){return typeof global<`u`?global:window}function Qr(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function $r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ei(e,t,n){return t&&$r(e.prototype,t),n&&$r(e,n),e}function ti(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ni=!1,ri=!1,ii=function(){function e(t){Qr(this,e),ti(this,`internalMonitor`,void 0),ti(this,`sourceId`,null),this.internalMonitor=t.getMonitor()}return ei(e,[{key:`receiveHandlerId`,value:function(e){this.sourceId=e}},{key:`getHandlerId`,value:function(){return this.sourceId}},{key:`canDrag`,value:function(){R(!ni,`You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor`);try{return ni=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{ni=!1}}},{key:`isDragging`,value:function(){if(!this.sourceId)return!1;R(!ri,`You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor`);try{return ri=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{ri=!1}}},{key:`subscribeToStateChange`,value:function(e,t){return this.internalMonitor.subscribeToStateChange(e,t)}},{key:`isDraggingSource`,value:function(e){return this.internalMonitor.isDraggingSource(e)}},{key:`isOverTarget`,value:function(e,t){return this.internalMonitor.isOverTarget(e,t)}},{key:`getTargetIds`,value:function(){return this.internalMonitor.getTargetIds()}},{key:`isSourcePublic`,value:function(){return this.internalMonitor.isSourcePublic()}},{key:`getSourceId`,value:function(){return this.internalMonitor.getSourceId()}},{key:`subscribeToOffsetChange`,value:function(e){return this.internalMonitor.subscribeToOffsetChange(e)}},{key:`canDragSource`,value:function(e){return this.internalMonitor.canDragSource(e)}},{key:`canDropOnTarget`,value:function(e){return this.internalMonitor.canDropOnTarget(e)}},{key:`getItemType`,value:function(){return this.internalMonitor.getItemType()}},{key:`getItem`,value:function(){return this.internalMonitor.getItem()}},{key:`getDropResult`,value:function(){return this.internalMonitor.getDropResult()}},{key:`didDrop`,value:function(){return this.internalMonitor.didDrop()}},{key:`getInitialClientOffset`,value:function(){return this.internalMonitor.getInitialClientOffset()}},{key:`getInitialSourceClientOffset`,value:function(){return this.internalMonitor.getInitialSourceClientOffset()}},{key:`getSourceClientOffset`,value:function(){return this.internalMonitor.getSourceClientOffset()}},{key:`getClientOffset`,value:function(){return this.internalMonitor.getClientOffset()}},{key:`getDifferenceFromInitialOffset`,value:function(){return this.internalMonitor.getDifferenceFromInitialOffset()}}]),e}();function ai(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function oi(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function si(e,t,n){return t&&oi(e.prototype,t),n&&oi(e,n),e}function ci(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var li=!1,ui=function(){function e(t){ai(this,e),ci(this,`internalMonitor`,void 0),ci(this,`targetId`,null),this.internalMonitor=t.getMonitor()}return si(e,[{key:`receiveHandlerId`,value:function(e){this.targetId=e}},{key:`getHandlerId`,value:function(){return this.targetId}},{key:`subscribeToStateChange`,value:function(e,t){return this.internalMonitor.subscribeToStateChange(e,t)}},{key:`canDrop`,value:function(){if(!this.targetId)return!1;R(!li,`You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor`);try{return li=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{li=!1}}},{key:`isOver`,value:function(e){return this.targetId?this.internalMonitor.isOverTarget(this.targetId,e):!1}},{key:`getItemType`,value:function(){return this.internalMonitor.getItemType()}},{key:`getItem`,value:function(){return this.internalMonitor.getItem()}},{key:`getDropResult`,value:function(){return this.internalMonitor.getDropResult()}},{key:`didDrop`,value:function(){return this.internalMonitor.didDrop()}},{key:`getInitialClientOffset`,value:function(){return this.internalMonitor.getInitialClientOffset()}},{key:`getInitialSourceClientOffset`,value:function(){return this.internalMonitor.getInitialSourceClientOffset()}},{key:`getSourceClientOffset`,value:function(){return this.internalMonitor.getSourceClientOffset()}},{key:`getClientOffset`,value:function(){return this.internalMonitor.getClientOffset()}},{key:`getDifferenceFromInitialOffset`,value:function(){return this.internalMonitor.getDifferenceFromInitialOffset()}}]),e}();function di(e){if(typeof e.type!=`string`){var t=e.type.displayName||e.type.name||`the component`;throw Error(`Only native element nodes can now be passed to React DnD connectors.You can either wrap ${t} into a <div>, or turn it into a drag source or a drop target itself.`)}}function fi(e){return function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(!(0,y.isValidElement)(t)){var r=t;return e(r,n),r}var i=t;return di(i),hi(i,n?function(t){return e(t,n)}:e)}}function pi(e){var t={};return Object.keys(e).forEach(function(n){var r=e[n];if(n.endsWith(`Ref`))t[n]=e[n];else{var i=fi(r);t[n]=function(){return i}}}),t}function mi(e,t){typeof e==`function`?e(t):e.current=t}function hi(e,t){var n=e.ref;return R(typeof n!=`string`,`Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a <span> or <div>. Read more: https://reactjs.org/docs/refs-and-the-dom.html#callback-refs`),n?(0,y.cloneElement)(e,{ref:function(e){mi(n,e),mi(t,e)}}):(0,y.cloneElement)(e,{ref:t})}function gi(e){"@babel/helpers - typeof";return gi=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},gi(e)}function _i(e){return e!==null&&gi(e)===`object`&&Object.prototype.hasOwnProperty.call(e,`current`)}function vi(e,t,n,r){var i=n?n.call(r,e,t):void 0;if(i!==void 0)return!!i;if(e===t)return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var a=Object.keys(e),o=Object.keys(t);if(a.length!==o.length)return!1;for(var s=Object.prototype.hasOwnProperty.bind(t),c=0;c<a.length;c++){var l=a[c];if(!s(l))return!1;var u=e[l],d=t[l];if(i=n?n.call(r,u,d,l):void 0,i===!1||i===void 0&&u!==d)return!1}return!0}function yi(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function bi(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function xi(e,t,n){return t&&bi(e.prototype,t),n&&bi(e,n),e}function U(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Si=function(){function e(t){var n=this;yi(this,e),U(this,`hooks`,pi({dragSource:function(e,t){n.clearDragSource(),n.dragSourceOptions=t||null,_i(e)?n.dragSourceRef=e:n.dragSourceNode=e,n.reconnectDragSource()},dragPreview:function(e,t){n.clearDragPreview(),n.dragPreviewOptions=t||null,_i(e)?n.dragPreviewRef=e:n.dragPreviewNode=e,n.reconnectDragPreview()}})),U(this,`handlerId`,null),U(this,`dragSourceRef`,null),U(this,`dragSourceNode`,void 0),U(this,`dragSourceOptionsInternal`,null),U(this,`dragSourceUnsubscribe`,void 0),U(this,`dragPreviewRef`,null),U(this,`dragPreviewNode`,void 0),U(this,`dragPreviewOptionsInternal`,null),U(this,`dragPreviewUnsubscribe`,void 0),U(this,`lastConnectedHandlerId`,null),U(this,`lastConnectedDragSource`,null),U(this,`lastConnectedDragSourceOptions`,null),U(this,`lastConnectedDragPreview`,null),U(this,`lastConnectedDragPreviewOptions`,null),U(this,`backend`,void 0),this.backend=t}return xi(e,[{key:`receiveHandlerId`,value:function(e){this.handlerId!==e&&(this.handlerId=e,this.reconnect())}},{key:`connectTarget`,get:function(){return this.dragSource}},{key:`dragSourceOptions`,get:function(){return this.dragSourceOptionsInternal},set:function(e){this.dragSourceOptionsInternal=e}},{key:`dragPreviewOptions`,get:function(){return this.dragPreviewOptionsInternal},set:function(e){this.dragPreviewOptionsInternal=e}},{key:`reconnect`,value:function(){this.reconnectDragSource(),this.reconnectDragPreview()}},{key:`reconnectDragSource`,value:function(){var e=this.dragSource,t=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();if(t&&this.disconnectDragSource(),this.handlerId){if(!e){this.lastConnectedDragSource=e;return}t&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=e,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,e,this.dragSourceOptions))}}},{key:`reconnectDragPreview`,value:function(){var e=this.dragPreview,t=this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();if(t&&this.disconnectDragPreview(),this.handlerId){if(!e){this.lastConnectedDragPreview=e;return}t&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=e,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,e,this.dragPreviewOptions))}}},{key:`didHandlerIdChange`,value:function(){return this.lastConnectedHandlerId!==this.handlerId}},{key:`didConnectedDragSourceChange`,value:function(){return this.lastConnectedDragSource!==this.dragSource}},{key:`didConnectedDragPreviewChange`,value:function(){return this.lastConnectedDragPreview!==this.dragPreview}},{key:`didDragSourceOptionsChange`,value:function(){return!vi(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}},{key:`didDragPreviewOptionsChange`,value:function(){return!vi(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)}},{key:`disconnectDragSource`,value:function(){this.dragSourceUnsubscribe&&=(this.dragSourceUnsubscribe(),void 0)}},{key:`disconnectDragPreview`,value:function(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null,this.dragPreviewRef=null)}},{key:`dragSource`,get:function(){return this.dragSourceNode||this.dragSourceRef&&this.dragSourceRef.current}},{key:`dragPreview`,get:function(){return this.dragPreviewNode||this.dragPreviewRef&&this.dragPreviewRef.current}},{key:`clearDragSource`,value:function(){this.dragSourceNode=null,this.dragSourceRef=null}},{key:`clearDragPreview`,value:function(){this.dragPreviewNode=null,this.dragPreviewRef=null}}]),e}();function Ci(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function wi(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ti(e,t,n){return t&&wi(e.prototype,t),n&&wi(e,n),e}function W(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ei=function(){function e(t){var n=this;Ci(this,e),W(this,`hooks`,pi({dropTarget:function(e,t){n.clearDropTarget(),n.dropTargetOptions=t,_i(e)?n.dropTargetRef=e:n.dropTargetNode=e,n.reconnect()}})),W(this,`handlerId`,null),W(this,`dropTargetRef`,null),W(this,`dropTargetNode`,void 0),W(this,`dropTargetOptionsInternal`,null),W(this,`unsubscribeDropTarget`,void 0),W(this,`lastConnectedHandlerId`,null),W(this,`lastConnectedDropTarget`,null),W(this,`lastConnectedDropTargetOptions`,null),W(this,`backend`,void 0),this.backend=t}return Ti(e,[{key:`connectTarget`,get:function(){return this.dropTarget}},{key:`reconnect`,value:function(){var e=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();e&&this.disconnectDropTarget();var t=this.dropTarget;if(this.handlerId){if(!t){this.lastConnectedDropTarget=t;return}e&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=t,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,t,this.dropTargetOptions))}}},{key:`receiveHandlerId`,value:function(e){e!==this.handlerId&&(this.handlerId=e,this.reconnect())}},{key:`dropTargetOptions`,get:function(){return this.dropTargetOptionsInternal},set:function(e){this.dropTargetOptionsInternal=e}},{key:`didHandlerIdChange`,value:function(){return this.lastConnectedHandlerId!==this.handlerId}},{key:`didDropTargetChange`,value:function(){return this.lastConnectedDropTarget!==this.dropTarget}},{key:`didOptionsChange`,value:function(){return!vi(this.lastConnectedDropTargetOptions,this.dropTargetOptions)}},{key:`disconnectDropTarget`,value:function(){this.unsubscribeDropTarget&&=(this.unsubscribeDropTarget(),void 0)}},{key:`dropTarget`,get:function(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.current}},{key:`clearDropTarget`,value:function(){this.dropTargetRef=null,this.dropTargetNode=null}}]),e}();function Di(e,t,n){var r=n.getRegistry(),i=r.addTarget(e,t);return[i,function(){return r.removeTarget(i)}]}function Oi(e,t,n){var r=n.getRegistry(),i=r.addSource(e,t);return[i,function(){return r.removeSource(i)}]}var G=typeof window<`u`?y.useLayoutEffect:y.useEffect;function ki(e){"@babel/helpers - typeof";return ki=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},ki(e)}function Ai(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function ji(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Mi(e,t,n){return t&&ji(e.prototype,t),n&&ji(e,n),e}function Ni(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Pi=function(){function e(t,n,r){Ai(this,e),Ni(this,`spec`,void 0),Ni(this,`monitor`,void 0),Ni(this,`connector`,void 0),this.spec=t,this.monitor=n,this.connector=r}return Mi(e,[{key:`beginDrag`,value:function(){var e=this.spec,t=this.monitor,n=null;return n=ki(e.item)===`object`?e.item:typeof e.item==`function`?e.item(t):{},n??null}},{key:`canDrag`,value:function(){var e=this.spec,t=this.monitor;return typeof e.canDrag==`boolean`?e.canDrag:typeof e.canDrag==`function`?e.canDrag(t):!0}},{key:`isDragging`,value:function(e,t){var n=this.spec,r=this.monitor,i=n.isDragging;return i?i(r):t===e.getSourceId()}},{key:`endDrag`,value:function(){var e=this.spec,t=this.monitor,n=this.connector,r=e.end;r&&r(t.getItem(),t),n.reconnect()}}]),e}();function Fi(e,t,n){var r=(0,y.useMemo)(function(){return new Pi(e,t,n)},[t,n]);return(0,y.useEffect)(function(){r.spec=e},[e]),r}function K(){var e=(0,y.useContext)(Et).dragDropManager;return R(e!=null,`Expected drag drop context`),e}function Ii(e){return(0,y.useMemo)(function(){var t=e.type;return R(t!=null,`spec.type must be defined`),t},[e])}function Li(e,t){return Hi(e)||Vi(e,t)||zi(e,t)||Ri()}function Ri(){throw TypeError(`Invalid attempt to destructure non-iterable instance.-In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function zi(e,t){if(e){if(typeof e==`string`)return Bi(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Bi(e,t)}}function Bi(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Vi(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r=[],i=!0,a=!1,o,s;try{for(n=n.call(e);!(i=(o=n.next()).done)&&(r.push(o.value),!(t&&r.length===t));i=!0);}catch(e){a=!0,s=e}finally{try{!i&&n.return!=null&&n.return()}finally{if(a)throw s}}return r}}function Hi(e){if(Array.isArray(e))return e}function Ui(e,t,n){var r=K(),i=Fi(e,t,n),a=Ii(e);G(function(){if(a!=null){var e=Li(Oi(a,i,r),2),o=e[0],s=e[1];return t.receiveHandlerId(o),n.receiveHandlerId(o),s}},[r,t,n,i,a])}function Wi(e){return Ji(e)||qi(e)||Ki(e)||Gi()}function Gi(){throw TypeError(`Invalid attempt to spread non-iterable instance.-In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ki(e,t){if(e){if(typeof e==`string`)return Yi(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Yi(e,t)}}function qi(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function Ji(e){if(Array.isArray(e))return Yi(e)}function Yi(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Xi(e,t){var n=Wi(t||[]);return t==null&&typeof e!=`function`&&n.push(e),(0,y.useMemo)(function(){return typeof e==`function`?e():e},n)}function Zi(){var e=K();return(0,y.useMemo)(function(){return new ii(e)},[e])}function Qi(e,t){var n=K(),r=(0,y.useMemo)(function(){return new Si(n.getBackend())},[n]);return G(function(){return r.dragSourceOptions=e||null,r.reconnect(),function(){return r.disconnectDragSource()}},[r,e]),G(function(){return r.dragPreviewOptions=t||null,r.reconnect(),function(){return r.disconnectDragPreview()}},[r,t]),r}var $i=e(n(((e,t)=>{t.exports=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t==`object`&&typeof n==`object`){if(t.constructor!==n.constructor)return!1;var r,i,a;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!e(t[i],n[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(a=Object.keys(t),r=a.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,a[i]))return!1;for(i=r;i--!==0;){var o=a[i];if(!e(t[o],n[o]))return!1}return!0}return t!==t&&n!==n}}))());function ea(e,t){return aa(e)||ia(e,t)||na(e,t)||ta()}function ta(){throw TypeError(`Invalid attempt to destructure non-iterable instance.-In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function na(e,t){if(e){if(typeof e==`string`)return ra(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ra(e,t)}}function ra(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function ia(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r=[],i=!0,a=!1,o,s;try{for(n=n.call(e);!(i=(o=n.next()).done)&&(r.push(o.value),!(t&&r.length===t));i=!0);}catch(e){a=!0,s=e}finally{try{!i&&n.return!=null&&n.return()}finally{if(a)throw s}}return r}}function aa(e){if(Array.isArray(e))return e}function oa(e,t,n){var r=ea((0,y.useState)(function(){return t(e)}),2),i=r[0],a=r[1],o=(0,y.useCallback)(function(){var r=t(e);(0,$i.default)(i,r)||(a(r),n&&n())},[i,e,n]);return G(o),[i,o]}function sa(e,t){return fa(e)||da(e,t)||la(e,t)||ca()}function ca(){throw TypeError(`Invalid attempt to destructure non-iterable instance.-In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function la(e,t){if(e){if(typeof e==`string`)return ua(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ua(e,t)}}function ua(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function da(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r=[],i=!0,a=!1,o,s;try{for(n=n.call(e);!(i=(o=n.next()).done)&&(r.push(o.value),!(t&&r.length===t));i=!0);}catch(e){a=!0,s=e}finally{try{!i&&n.return!=null&&n.return()}finally{if(a)throw s}}return r}}function fa(e){if(Array.isArray(e))return e}function pa(e,t,n){var r=sa(oa(e,t,n),2),i=r[0],a=r[1];return G(function(){var t=e.getHandlerId();if(t!=null)return e.subscribeToStateChange(a,{handlerIds:[t]})},[e,a]),i}function ma(e,t,n){return pa(t,e||function(){return{}},function(){return n.reconnect()})}function ha(e){return(0,y.useMemo)(function(){return e.hooks.dragSource()},[e])}function ga(e){return(0,y.useMemo)(function(){return e.hooks.dragPreview()},[e])}function _a(e,t){var n=Xi(e,t);R(!n.begin,`useDrag::spec.begin was deprecated in v14. Replace spec.begin() with spec.item(). (see more here - https://react-dnd.github.io/react-dnd/docs/api/use-drag)`);var r=Zi(),i=Qi(n.options,n.previewOptions);return Ui(n,r,i),[ma(n.collect,r,i),ha(i),ga(i)]}function va(e){var t=e.accept;return(0,y.useMemo)(function(){return R(e.accept!=null,`accept must be defined`),Array.isArray(t)?t:[t]},[t])}function ya(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function ba(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function xa(e,t,n){return t&&ba(e.prototype,t),n&&ba(e,n),e}function Sa(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ca=function(){function e(t,n){ya(this,e),Sa(this,`spec`,void 0),Sa(this,`monitor`,void 0),this.spec=t,this.monitor=n}return xa(e,[{key:`canDrop`,value:function(){var e=this.spec,t=this.monitor;return e.canDrop?e.canDrop(t.getItem(),t):!0}},{key:`hover`,value:function(){var e=this.spec,t=this.monitor;e.hover&&e.hover(t.getItem(),t)}},{key:`drop`,value:function(){var e=this.spec,t=this.monitor;if(e.drop)return e.drop(t.getItem(),t)}}]),e}();function wa(e,t){var n=(0,y.useMemo)(function(){return new Ca(e,t)},[t]);return(0,y.useEffect)(function(){n.spec=e},[e]),n}function Ta(e,t){return Aa(e)||ka(e,t)||Da(e,t)||Ea()}function Ea(){throw TypeError(`Invalid attempt to destructure non-iterable instance.-In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Da(e,t){if(e){if(typeof e==`string`)return Oa(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Oa(e,t)}}function Oa(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function ka(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r=[],i=!0,a=!1,o,s;try{for(n=n.call(e);!(i=(o=n.next()).done)&&(r.push(o.value),!(t&&r.length===t));i=!0);}catch(e){a=!0,s=e}finally{try{!i&&n.return!=null&&n.return()}finally{if(a)throw s}}return r}}function Aa(e){if(Array.isArray(e))return e}function ja(e,t,n){var r=K(),i=wa(e,t),a=va(e);G(function(){var e=Ta(Di(a,i,r),2),o=e[0],s=e[1];return t.receiveHandlerId(o),n.receiveHandlerId(o),s},[r,t,i,n,a.map(function(e){return e.toString()}).join(`|`)])}function Ma(){var e=K();return(0,y.useMemo)(function(){return new ui(e)},[e])}function Na(e){var t=K(),n=(0,y.useMemo)(function(){return new Ei(t.getBackend())},[t]);return G(function(){return n.dropTargetOptions=e||null,n.reconnect(),function(){return n.disconnectDropTarget()}},[e]),n}function Pa(e){return(0,y.useMemo)(function(){return e.hooks.dropTarget()},[e])}function Fa(e,t){var n=Xi(e,t),r=Ma(),i=Na(n.options);return ja(n,r,i),[ma(n.collect,r,i),Pa(i)]}function Ia(e,t){return Va(e)||Ba(e,t)||Ra(e,t)||La()}function La(){throw TypeError(`Invalid attempt to destructure non-iterable instance.-In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ra(e,t){if(e){if(typeof e==`string`)return za(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return za(e,t)}}function za(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Ba(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r=[],i=!0,a=!1,o,s;try{for(n=n.call(e);!(i=(o=n.next()).done)&&(r.push(o.value),!(t&&r.length===t));i=!0);}catch(e){a=!0,s=e}finally{try{!i&&n.return!=null&&n.return()}finally{if(a)throw s}}return r}}function Va(e){if(Array.isArray(e))return e}function Ha(e){var t=K().getMonitor(),n=Ia(oa(t,e),2),r=n[0],i=n[1];return(0,y.useEffect)(function(){return t.subscribeToOffsetChange(i)}),(0,y.useEffect)(function(){return t.subscribeToStateChange(i)}),r}function Ua(e){var t=null;return function(){return t??=e(),t}}function Wa(e,t){return e.filter(function(e){return e!==t})}function Ga(e,t){var n=new Set,r=function(e){return n.add(e)};e.forEach(r),t.forEach(r);var i=[];return n.forEach(function(e){return i.push(e)}),i}function Ka(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function qa(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ja(e,t,n){return t&&qa(e.prototype,t),n&&qa(e,n),e}function Ya(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Xa=function(){function e(t){Ka(this,e),Ya(this,`entered`,[]),Ya(this,`isNodeInDocument`,void 0),this.isNodeInDocument=t}return Ja(e,[{key:`enter`,value:function(e){var t=this,n=this.entered.length;return this.entered=Ga(this.entered.filter(function(n){return t.isNodeInDocument(n)&&(!n.contains||n.contains(e))}),[e]),n===0&&this.entered.length>0}},{key:`leave`,value:function(e){var t=this.entered.length;return this.entered=Wa(this.entered.filter(this.isNodeInDocument),e),t>0&&this.entered.length===0}},{key:`reset`,value:function(){this.entered=[]}}]),e}(),Za=Ua(function(){return/firefox/i.test(navigator.userAgent)}),Qa=Ua(function(){return!!window.safari});function $a(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function eo(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function to(e,t,n){return t&&eo(e.prototype,t),n&&eo(e,n),e}function no(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ro=function(){function e(t,n){$a(this,e),no(this,`xs`,void 0),no(this,`ys`,void 0),no(this,`c1s`,void 0),no(this,`c2s`,void 0),no(this,`c3s`,void 0);for(var r=t.length,i=[],a=0;a<r;a++)i.push(a);i.sort(function(e,n){return t[e]<t[n]?-1:1});for(var o=[],s=[],c=[],l,u,d=0;d<r-1;d++)l=t[d+1]-t[d],u=n[d+1]-n[d],s.push(l),o.push(u),c.push(u/l);for(var f=[c[0]],p=0;p<s.length-1;p++){var m=c[p],h=c[p+1];if(m*h<=0)f.push(0);else{l=s[p];var g=s[p+1],_=l+g;f.push(3*_/((_+g)/m+(_+l)/h))}}f.push(c[c.length-1]);for(var v=[],y=[],b,x=0;x<f.length-1;x++){b=c[x];var S=f[x],C=1/s[x],w=S+f[x+1]-b-b;v.push((b-S-w)*C),y.push(w*C*C)}this.xs=t,this.ys=n,this.c1s=f,this.c2s=v,this.c3s=y}return to(e,[{key:`interpolate`,value:function(e){var t=this.xs,n=this.ys,r=this.c1s,i=this.c2s,a=this.c3s,o=t.length-1;if(e===t[o])return n[o];for(var s=0,c=a.length-1,l;s<=c;){l=Math.floor(.5*(s+c));var u=t[l];if(u<e)s=l+1;else if(u>e)c=l-1;else return n[l]}o=Math.max(0,c);var d=e-t[o],f=d*d;return n[o]+r[o]*d+i[o]*f+a[o]*d*f}}]),e}(),io=1;function ao(e){var t=e.nodeType===io?e:e.parentElement;if(!t)return null;var n=t.getBoundingClientRect(),r=n.top;return{x:n.left,y:r}}function oo(e){return{x:e.clientX,y:e.clientY}}function so(e){var t;return e.nodeName===`IMG`&&(Za()||!((t=document.documentElement)!=null&&t.contains(e)))}function co(e,t,n,r){var i=e?t.width:n,a=e?t.height:r;return Qa()&&e&&(a/=window.devicePixelRatio,i/=window.devicePixelRatio),{dragPreviewWidth:i,dragPreviewHeight:a}}function lo(e,t,n,r,i){var a=so(t),o=ao(a?e:t),s={x:n.x-o.x,y:n.y-o.y},c=e.offsetWidth,l=e.offsetHeight,u=r.anchorX,d=r.anchorY,f=co(a,t,c,l),p=f.dragPreviewWidth,m=f.dragPreviewHeight,h=function(){var e=new ro([0,.5,1],[s.y,s.y/l*m,s.y+m-l]).interpolate(d);return Qa()&&a&&(e+=(window.devicePixelRatio-1)*m),e},g=function(){return new ro([0,.5,1],[s.x,s.x/c*p,s.x+p-c]).interpolate(u)},_=i.offsetX,v=i.offsetY,y=_===0||_,b=v===0||v;return{x:y?_:g(),y:b?v:h()}}var uo=t({FILE:()=>fo,HTML:()=>ho,TEXT:()=>mo,URL:()=>po}),fo=`__NATIVE_FILE__`,po=`__NATIVE_URL__`,mo=`__NATIVE_TEXT__`,ho=`__NATIVE_HTML__`;function go(e,t,n){return t.reduce(function(t,n){return t||e.getData(n)},``)??n}var q;function _o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var vo=(q={},_o(q,fo,{exposeProperties:{files:function(e){return Array.prototype.slice.call(e.files)},items:function(e){return e.items},dataTransfer:function(e){return e}},matchesTypes:[`Files`]}),_o(q,ho,{exposeProperties:{html:function(e,t){return go(e,t,``)},dataTransfer:function(e){return e}},matchesTypes:[`Html`,`text/html`]}),_o(q,po,{exposeProperties:{urls:function(e,t){return go(e,t,``).split(`-`)},dataTransfer:function(e){return e}},matchesTypes:[`Url`,`text/uri-list`]}),_o(q,mo,{exposeProperties:{text:function(e,t){return go(e,t,``)},dataTransfer:function(e){return e}},matchesTypes:[`Text`,`text/plain`]}),q);function yo(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function bo(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function xo(e,t,n){return t&&bo(e.prototype,t),n&&bo(e,n),e}function So(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Co=function(){function e(t){yo(this,e),So(this,`item`,void 0),So(this,`config`,void 0),this.config=t,this.item={},this.initializeExposedProperties()}return xo(e,[{key:`initializeExposedProperties`,value:function(){var e=this;Object.keys(this.config.exposeProperties).forEach(function(t){Object.defineProperty(e.item,t,{configurable:!0,enumerable:!0,get:function(){return console.warn(`Browser doesn't allow reading "${t}" until the drop event.`),null}})})}},{key:`loadDataTransfer`,value:function(e){var t=this;if(e){var n={};Object.keys(this.config.exposeProperties).forEach(function(r){n[r]={value:t.config.exposeProperties[r](e,t.config.matchesTypes),configurable:!0,enumerable:!0}}),Object.defineProperties(this.item,n)}}},{key:`canDrag`,value:function(){return!0}},{key:`beginDrag`,value:function(){return this.item}},{key:`isDragging`,value:function(e,t){return t===e.getSourceId()}},{key:`endDrag`,value:function(){}}]),e}();function wo(e,t){var n=new Co(vo[e]);return n.loadDataTransfer(t),n}function To(e){if(!e)return null;var t=Array.prototype.slice.call(e.types||[]);return Object.keys(vo).filter(function(e){return vo[e].matchesTypes.some(function(e){return t.indexOf(e)>-1})})[0]||null}function Eo(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function Do(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Oo(e,t,n){return t&&Do(e.prototype,t),n&&Do(e,n),e}function ko(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ao=function(){function e(t,n){Eo(this,e),ko(this,`ownerDocument`,null),ko(this,`globalContext`,void 0),ko(this,`optionsArgs`,void 0),this.globalContext=t,this.optionsArgs=n}return Oo(e,[{key:`window`,get:function(){if(this.globalContext)return this.globalContext;if(typeof window<`u`)return window}},{key:`document`,get:function(){var e;if((e=this.globalContext)!=null&&e.document)return this.globalContext.document;if(this.window)return this.window.document}},{key:`rootElement`,get:function(){return this.optionsArgs?.rootElement||this.window}}]),e}();function jo(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Mo(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?jo(Object(n),!0).forEach(function(t){J(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jo(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function No(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function Po(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Fo(e,t,n){return t&&Po(e.prototype,t),n&&Po(e,n),e}function J(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Io=function(){function e(t,n,r){var i=this;No(this,e),J(this,`options`,void 0),J(this,`actions`,void 0),J(this,`monitor`,void 0),J(this,`registry`,void 0),J(this,`enterLeaveCounter`,void 0),J(this,`sourcePreviewNodes`,new Map),J(this,`sourcePreviewNodeOptions`,new Map),J(this,`sourceNodes`,new Map),J(this,`sourceNodeOptions`,new Map),J(this,`dragStartSourceIds`,null),J(this,`dropTargetIds`,[]),J(this,`dragEnterTargetIds`,[]),J(this,`currentNativeSource`,null),J(this,`currentNativeHandle`,null),J(this,`currentDragSourceNode`,null),J(this,`altKeyPressed`,!1),J(this,`mouseMoveTimeoutTimer`,null),J(this,`asyncEndDragFrameId`,null),J(this,`dragOverTargetIds`,null),J(this,`lastClientOffset`,null),J(this,`hoverRafId`,null),J(this,`getSourceClientOffset`,function(e){var t=i.sourceNodes.get(e);return t&&ao(t)||null}),J(this,`endDragNativeItem`,function(){i.isDraggingNativeItem()&&(i.actions.endDrag(),i.currentNativeHandle&&i.registry.removeSource(i.currentNativeHandle),i.currentNativeHandle=null,i.currentNativeSource=null)}),J(this,`isNodeInDocument`,function(e){return!!(e&&i.document&&i.document.body&&i.document.body.contains(e))}),J(this,`endDragIfSourceWasRemovedFromDOM`,function(){var e=i.currentDragSourceNode;e==null||i.isNodeInDocument(e)||i.clearCurrentDragSourceNode()&&i.monitor.isDragging()&&i.actions.endDrag()}),J(this,`handleTopDragStartCapture`,function(){i.clearCurrentDragSourceNode(),i.dragStartSourceIds=[]}),J(this,`handleTopDragStart`,function(e){if(!e.defaultPrevented){var t=i.dragStartSourceIds;i.dragStartSourceIds=null;var n=oo(e);i.monitor.isDragging()&&i.actions.endDrag(),i.actions.beginDrag(t||[],{publishSource:!1,getSourceClientOffset:i.getSourceClientOffset,clientOffset:n});var r=e.dataTransfer,a=To(r);if(i.monitor.isDragging()){if(r&&typeof r.setDragImage==`function`){var o=i.monitor.getSourceId(),s=i.sourceNodes.get(o),c=i.sourcePreviewNodes.get(o)||s;if(c){var l=i.getCurrentSourcePreviewNodeOptions(),u=l.anchorX,d=l.anchorY,f=l.offsetX,p=l.offsetY,m=lo(s,c,n,{anchorX:u,anchorY:d},{offsetX:f,offsetY:p});r.setDragImage(c,m.x,m.y)}}try{r?.setData(`application/json`,{})}catch{}i.setCurrentDragSourceNode(e.target),i.getCurrentSourcePreviewNodeOptions().captureDraggingState?i.actions.publishDragSource():setTimeout(function(){return i.actions.publishDragSource()},0)}else if(a)i.beginDragNativeItem(a);else if(r&&!r.types&&(e.target&&!e.target.hasAttribute||!e.target.hasAttribute(`draggable`)))return;else e.preventDefault()}}),J(this,`handleTopDragEndCapture`,function(){i.clearCurrentDragSourceNode()&&i.monitor.isDragging()&&i.actions.endDrag()}),J(this,`handleTopDragEnterCapture`,function(e){if(i.dragEnterTargetIds=[],!(!i.enterLeaveCounter.enter(e.target)||i.monitor.isDragging())){var t=e.dataTransfer,n=To(t);n&&i.beginDragNativeItem(n,t)}}),J(this,`handleTopDragEnter`,function(e){var t=i.dragEnterTargetIds;i.dragEnterTargetIds=[],i.monitor.isDragging()&&(i.altKeyPressed=e.altKey,t.length>0&&i.actions.hover(t,{clientOffset:oo(e)}),t.some(function(e){return i.monitor.canDropOnTarget(e)})&&(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=i.getCurrentDropEffect())))}),J(this,`handleTopDragOverCapture`,function(){i.dragOverTargetIds=[]}),J(this,`handleTopDragOver`,function(e){var t=i.dragOverTargetIds;if(i.dragOverTargetIds=[],!i.monitor.isDragging()){e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=`none`);return}i.altKeyPressed=e.altKey,i.lastClientOffset=oo(e),i.hoverRafId===null&&typeof requestAnimationFrame<`u`&&(i.hoverRafId=requestAnimationFrame(function(){i.monitor.isDragging()&&i.actions.hover(t||[],{clientOffset:i.lastClientOffset}),i.hoverRafId=null})),(t||[]).some(function(e){return i.monitor.canDropOnTarget(e)})?(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=i.getCurrentDropEffect())):i.isDraggingNativeItem()?e.preventDefault():(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=`none`))}),J(this,`handleTopDragLeaveCapture`,function(e){i.isDraggingNativeItem()&&e.preventDefault(),i.enterLeaveCounter.leave(e.target)&&i.isDraggingNativeItem()&&setTimeout(function(){return i.endDragNativeItem()},0)}),J(this,`handleTopDropCapture`,function(e){if(i.dropTargetIds=[],i.isDraggingNativeItem()){var t;e.preventDefault(),(t=i.currentNativeSource)==null||t.loadDataTransfer(e.dataTransfer)}else To(e.dataTransfer)&&e.preventDefault();i.enterLeaveCounter.reset()}),J(this,`handleTopDrop`,function(e){var t=i.dropTargetIds;i.dropTargetIds=[],i.actions.hover(t,{clientOffset:oo(e)}),i.actions.drop({dropEffect:i.getCurrentDropEffect()}),i.isDraggingNativeItem()?i.endDragNativeItem():i.monitor.isDragging()&&i.actions.endDrag()}),J(this,`handleSelectStart`,function(e){var t=e.target;typeof t.dragDrop==`function`&&(t.tagName===`INPUT`||t.tagName===`SELECT`||t.tagName===`TEXTAREA`||t.isContentEditable||(e.preventDefault(),t.dragDrop()))}),this.options=new Ao(n,r),this.actions=t.getActions(),this.monitor=t.getMonitor(),this.registry=t.getRegistry(),this.enterLeaveCounter=new Xa(this.isNodeInDocument)}return Fo(e,[{key:`profile`,value:function(){return{sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,sourceNodeOptions:this.sourceNodeOptions.size,sourceNodes:this.sourceNodes.size,dragStartSourceIds:this.dragStartSourceIds?.length||0,dropTargetIds:this.dropTargetIds.length,dragEnterTargetIds:this.dragEnterTargetIds.length,dragOverTargetIds:this.dragOverTargetIds?.length||0}}},{key:`window`,get:function(){return this.options.window}},{key:`document`,get:function(){return this.options.document}},{key:`rootElement`,get:function(){return this.options.rootElement}},{key:`setup`,value:function(){var e=this.rootElement;if(e!==void 0){if(e.__isReactDndBackendSetUp)throw Error(`Cannot have two HTML5 backends at the same time.`);e.__isReactDndBackendSetUp=!0,this.addEventListeners(e)}}},{key:`teardown`,value:function(){var e=this.rootElement;if(e!==void 0&&(e.__isReactDndBackendSetUp=!1,this.removeEventListeners(this.rootElement),this.clearCurrentDragSourceNode(),this.asyncEndDragFrameId)){var t;(t=this.window)==null||t.cancelAnimationFrame(this.asyncEndDragFrameId)}}},{key:`connectDragPreview`,value:function(e,t,n){var r=this;return this.sourcePreviewNodeOptions.set(e,n),this.sourcePreviewNodes.set(e,t),function(){r.sourcePreviewNodes.delete(e),r.sourcePreviewNodeOptions.delete(e)}}},{key:`connectDragSource`,value:function(e,t,n){var r=this;this.sourceNodes.set(e,t),this.sourceNodeOptions.set(e,n);var i=function(t){return r.handleDragStart(t,e)},a=function(e){return r.handleSelectStart(e)};return t.setAttribute(`draggable`,`true`),t.addEventListener(`dragstart`,i),t.addEventListener(`selectstart`,a),function(){r.sourceNodes.delete(e),r.sourceNodeOptions.delete(e),t.removeEventListener(`dragstart`,i),t.removeEventListener(`selectstart`,a),t.setAttribute(`draggable`,`false`)}}},{key:`connectDropTarget`,value:function(e,t){var n=this,r=function(t){return n.handleDragEnter(t,e)},i=function(t){return n.handleDragOver(t,e)},a=function(t){return n.handleDrop(t,e)};return t.addEventListener(`dragenter`,r),t.addEventListener(`dragover`,i),t.addEventListener(`drop`,a),function(){t.removeEventListener(`dragenter`,r),t.removeEventListener(`dragover`,i),t.removeEventListener(`drop`,a)}}},{key:`addEventListeners`,value:function(e){e.addEventListener&&(e.addEventListener(`dragstart`,this.handleTopDragStart),e.addEventListener(`dragstart`,this.handleTopDragStartCapture,!0),e.addEventListener(`dragend`,this.handleTopDragEndCapture,!0),e.addEventListener(`dragenter`,this.handleTopDragEnter),e.addEventListener(`dragenter`,this.handleTopDragEnterCapture,!0),e.addEventListener(`dragleave`,this.handleTopDragLeaveCapture,!0),e.addEventListener(`dragover`,this.handleTopDragOver),e.addEventListener(`dragover`,this.handleTopDragOverCapture,!0),e.addEventListener(`drop`,this.handleTopDrop),e.addEventListener(`drop`,this.handleTopDropCapture,!0))}},{key:`removeEventListeners`,value:function(e){e.removeEventListener&&(e.removeEventListener(`dragstart`,this.handleTopDragStart),e.removeEventListener(`dragstart`,this.handleTopDragStartCapture,!0),e.removeEventListener(`dragend`,this.handleTopDragEndCapture,!0),e.removeEventListener(`dragenter`,this.handleTopDragEnter),e.removeEventListener(`dragenter`,this.handleTopDragEnterCapture,!0),e.removeEventListener(`dragleave`,this.handleTopDragLeaveCapture,!0),e.removeEventListener(`dragover`,this.handleTopDragOver),e.removeEventListener(`dragover`,this.handleTopDragOverCapture,!0),e.removeEventListener(`drop`,this.handleTopDrop),e.removeEventListener(`drop`,this.handleTopDropCapture,!0))}},{key:`getCurrentSourceNodeOptions`,value:function(){var e=this.monitor.getSourceId(),t=this.sourceNodeOptions.get(e);return Mo({dropEffect:this.altKeyPressed?`copy`:`move`},t||{})}},{key:`getCurrentDropEffect`,value:function(){return this.isDraggingNativeItem()?`copy`:this.getCurrentSourceNodeOptions().dropEffect}},{key:`getCurrentSourcePreviewNodeOptions`,value:function(){var e=this.monitor.getSourceId();return Mo({anchorX:.5,anchorY:.5,captureDraggingState:!1},this.sourcePreviewNodeOptions.get(e)||{})}},{key:`isDraggingNativeItem`,value:function(){var e=this.monitor.getItemType();return Object.keys(uo).some(function(t){return uo[t]===e})}},{key:`beginDragNativeItem`,value:function(e,t){this.clearCurrentDragSourceNode(),this.currentNativeSource=wo(e,t),this.currentNativeHandle=this.registry.addSource(e,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}},{key:`setCurrentDragSourceNode`,value:function(e){var t=this;this.clearCurrentDragSourceNode(),this.currentDragSourceNode=e,this.mouseMoveTimeoutTimer=setTimeout(function(){return t.rootElement?.addEventListener(`mousemove`,t.endDragIfSourceWasRemovedFromDOM,!0)},1e3)}},{key:`clearCurrentDragSourceNode`,value:function(){if(this.currentDragSourceNode){if(this.currentDragSourceNode=null,this.rootElement){var e;(e=this.window)==null||e.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.rootElement.removeEventListener(`mousemove`,this.endDragIfSourceWasRemovedFromDOM,!0)}return this.mouseMoveTimeoutTimer=null,!0}return!1}},{key:`handleDragStart`,value:function(e,t){e.defaultPrevented||(this.dragStartSourceIds||=[],this.dragStartSourceIds.unshift(t))}},{key:`handleDragEnter`,value:function(e,t){this.dragEnterTargetIds.unshift(t)}},{key:`handleDragOver`,value:function(e,t){this.dragOverTargetIds===null&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(t)}},{key:`handleDrop`,value:function(e,t){this.dropTargetIds.unshift(t)}}]),e}(),Lo;function Ro(){return Lo||(Lo=new Image,Lo.src=`data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==`),Lo}var zo=function(e,t,n){return new Io(e,t,n)};function Bo(e){let t=O(),n=t.selectedIds,[r,i,a]=_a(()=>({canDrag:()=>e.isDraggable,type:`NODE`,item:()=>{let r=t.isSelected(e.id)?Array.from(n):[e.id];return t.dispatch(I.dragStart(e.id,r)),{id:e.id,dragIds:r}},end:()=>{t.hideCursor(),t.dispatch(I.dragEnd())}}),[n,e]);return(0,y.useEffect)(()=>{a(Ro())},[a]),i}function Vo(e,t){let n=e.getBoundingClientRect(),r=t.x-Math.round(n.x),i=t.y-Math.round(n.y),a=n.height,o=i<a/2,s=!o,c=a/4,l=i>c&&i<a-c;return{x:r,inTopHalf:o,inBottomHalf:s,inMiddle:l,atTop:!l&&o,atBottom:!l&&s}}function Ho(e,t,n,r){return e?e.isInternal?r.atTop?[t,e]:r.inMiddle?[e,e]:[e,n]:r.inTopHalf?[t,e]:[e,n]:[t,null]}function Uo(e,t){return{parentId:e||null,index:t}}function Y(e,t){return{type:`line`,index:e,level:t}}function Wo(e){return{type:`highlight`,id:e}}function Go(e,t){let n=e;for(;n.parent&&n.level>t;)n=n.parent;return{parentId:n.parent?.id||null,index:de(n)+1}}function Ko(e){let t=Vo(e.element,e.offset),n=e.indent,r=Math.round(Math.max(0,t.x-n)/n),{node:i,nextNode:a,prevNode:o}=e,[s,c]=Ho(i,o,a,t);if(i&&i.isInternal&&t.inMiddle)return{drop:Uo(i.id,null),cursor:Wo(i.id)};if(!s)return{drop:Uo(c?.parent?.id,0),cursor:Y(0,0)};if(se(s)){let e=oe(r,c?.level||0,s.level);return{drop:Go(s,e),cursor:Y(s.rowIndex+1,e)}}if(ce(s)){let e=oe(r,c?.level||0,s.level);return{drop:Go(s,e),cursor:Y(s.rowIndex+1,e)}}if(le(s)){let e=oe(r,0,s.level+1);return e>s.level?{drop:Uo(s.id,0),cursor:Y(s.rowIndex+1,e)}:{drop:Go(s,e),cursor:Y(s.rowIndex+1,e)}}return{drop:Uo(s?.id,0),cursor:Y(s.rowIndex+1,s.level+1)}}function qo(e,t){let n=O(),[r,i]=Fa(()=>({accept:`NODE`,canDrop:()=>n.canDrop(),hover:(r,i)=>{let a=i.getClientOffset();if(!e.current||!a)return;let{cursor:o,drop:s}=Ko({element:e.current,offset:a,indent:n.indent,node:t,prevNode:t.prev,nextNode:t.next});s&&n.dispatch(I.hovering(s.parentId,s.index)),i.canDrop()?o&&n.showCursor(o):n.hideCursor()},drop:(e,t)=>{if(!t.canDrop())return null;let{parentId:r,index:i,dragIds:a}=n.state.dnd;Se(n.props.onMove,{dragIds:a,parentId:r===`__REACT_ARBORIST_INTERNAL_ROOT__`?null:r,index:i===null?0:i,dragNodes:n.dragNodes,parentNode:n.get(r)}),n.open(r)}}),[t,e.current,n.props]);return i}function Jo(e){let t=O(),n=t.at(e);if(!n)throw Error(`Could not find node for index: ${e}`);return(0,y.useMemo)(()=>{let r=n.clone();return t.visibleNodes[e]=r,r},[...Object.values(n.state),n])}var Yo=y.memo(function({index:e,style:t}){ie(),ee();let n=O(),r=Jo(e),i=(0,y.useRef)(null),a=Bo(r),o=qo(i,r),s=(0,y.useCallback)(e=>{i.current=e,o(e)},[o]),c=n.indent*r.level,l=(0,y.useMemo)(()=>({paddingLeft:c}),[c]),u=(0,y.useMemo)(()=>Object.assign(Object.assign({},t),{top:parseFloat(t.top)+(n.props.padding??n.props.paddingTop??0)}),[t,n.props.padding,n.props.paddingTop]),d={role:`treeitem`,"aria-level":r.level+1,"aria-selected":r.isSelected,"aria-expanded":r.isOpen,style:u,tabIndex:-1,className:n.props.rowClassName};(0,y.useEffect)(()=>{var e;!r.isEditing&&r.isFocused&&((e=i.current)==null||e.focus({preventScroll:!0}))},[r.isEditing,r.isFocused,i.current]);let f=n.renderNode,p=n.renderRow;return(0,M.jsx)(p,{node:r,innerRef:s,attrs:d,children:(0,M.jsx)(f,{node:r,tree:n,style:l,dragHandle:a})})}),Xo=``,Zo=null;function Qo(){ie();let e=O();return(0,M.jsx)(`div`,{role:`tree`,style:{height:e.height,width:e.width,minHeight:0,minWidth:0},onContextMenu:e.props.onContextMenu,onClick:e.props.onClick,tabIndex:0,onFocus:t=>{t.currentTarget.contains(t.relatedTarget)||e.onFocus()},onBlur:t=>{t.currentTarget.contains(t.relatedTarget)||e.onBlur()},onKeyDown:t=>{if(e.isEditing)return;if(t.key===`Backspace`){if(!e.props.onDelete)return;let t=Array.from(e.selectedIds);if(t.length>1){let n=e.mostRecentNode;for(;n&&n.isSelected;)n=n.nextSibling;n||=e.lastNode,e.focus(n,{scroll:!1}),e.delete(Array.from(t))}else{let t=e.focusedNode;if(t){let n=t.nextSibling,r=t.parent;e.focus(n||r,{scroll:!1}),e.delete(t)}}return}if(t.key===`Tab`&&!t.shiftKey){t.preventDefault(),he(t.currentTarget);return}if(t.key===`Tab`&&t.shiftKey){t.preventDefault(),ge(t.currentTarget);return}if(t.key===`ArrowDown`){t.preventDefault();let n=e.nextNode;if(t.metaKey){e.select(e.focusedNode),e.activate(e.focusedNode);return}else if(!t.shiftKey||e.props.disableMultiSelection){e.focus(n);return}else{if(!n)return;let t=e.focusedNode;t?t.isSelected?e.selectContiguous(n):e.selectMulti(n):e.focus(e.firstNode);return}}if(t.key===`ArrowUp`){t.preventDefault();let n=e.prevNode;if(!t.shiftKey||e.props.disableMultiSelection){e.focus(n);return}else{if(!n)return;let t=e.focusedNode;t?t.isSelected?e.selectContiguous(n):e.selectMulti(n):e.focus(e.lastNode);return}}if(t.key===`ArrowRight`){let t=e.focusedNode;if(!t)return;t.isInternal&&t.isOpen?e.focus(e.nextNode):t.isInternal&&e.open(t.id);return}if(t.key===`ArrowLeft`){let t=e.focusedNode;if(!t||t.isRoot)return;t.isInternal&&t.isOpen?e.close(t.id):t.parent?.isRoot||e.focus(t.parent);return}if(t.key===`a`&&t.metaKey&&!e.props.disableMultiSelection){t.preventDefault(),e.selectAll();return}if(t.key===`a`&&!t.metaKey&&e.props.onCreate){e.createLeaf();return}if(t.key===`A`&&!t.metaKey){if(!e.props.onCreate)return;e.createInternal();return}if(t.key===`Home`){t.preventDefault(),e.focus(e.firstNode);return}if(t.key===`End`){t.preventDefault(),e.focus(e.lastNode);return}if(t.key===`Enter`){let t=e.focusedNode;if(!t||!t.isEditable||!e.props.onRename)return;setTimeout(()=>{t&&e.edit(t)});return}if(t.key===` `){t.preventDefault();let n=e.focusedNode;if(!n)return;n.isLeaf?(n.select(),n.activate()):n.toggle();return}if(t.key===`*`){let t=e.focusedNode;if(!t)return;e.openSiblings(t);return}if(t.key===`PageUp`){t.preventDefault(),e.pageUp();return}t.key===`PageDown`&&(t.preventDefault(),e.pageDown()),clearTimeout(Zo),Xo+=t.key,Zo=setTimeout(()=>{Xo=``},600);let n=e.visibleNodes.find(e=>{let t=e.data.name;return typeof t==`string`?t.toLowerCase().startsWith(Xo):!1});n&&e.focus(n.id)},children:(0,M.jsx)(yt,{className:e.props.className,outerRef:e.listEl,itemCount:e.visibleNodes.length,height:e.height,width:e.width,itemSize:e.rowHeight,overscanCount:e.overscanCount,itemKey:t=>e.visibleNodes[t]?.id||t,outerElementType:St,innerElementType:Tt,onScroll:e.props.onScroll,onItemsRendered:e.onItemsRendered.bind(e),ref:e.list,children:Yo})})}function $o(e){return e.isFiltered?ts(e.root,e.isMatch.bind(e)):es(e.root)}function es(e){let t=[];function n(e){var r;e.level>=0&&t.push(e),e.isOpen&&((r=e.children)==null||r.forEach(n))}return n(e),t.forEach(ns),t}function ts(e,t){let n={},r=[];function i(e){if(!e.isRoot&&t(e)){n[e.id]=!0;let t=e.parent;for(;t;)n[t.id]=!0,t=t.parent}if(e.children)for(let t of e.children)i(t)}function a(e){var t;e.level>=0&&n[e.id]&&r.push(e),e.isOpen&&((t=e.children)==null||t.forEach(a))}return i(e),a(e),r.forEach(ns),r}function ns(e,t){e.rowIndex=t}var rs=e=>e.reduce((e,t,n)=>(e[t.id]=n,e),{}),is=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})},{safeRun:X,identify:Z,identifyNull:Q}=ae,as=class e{constructor(e,t,n,r){this.store=e,this.props=t,this.list=n,this.listEl=r,this.visibleStartIndex=0,this.visibleStopIndex=0,this.root=Be(this),this.visibleNodes=$o(this),this.idToIndex=rs(this.visibleNodes)}update(e){this.props=e,this.root=Be(this),this.visibleNodes=$o(this),this.idToIndex=rs(this.visibleNodes)}dispatch(e){return this.store.dispatch(e)}get state(){return this.store.getState()}get openState(){return this.state.nodes.open.unfiltered}get width(){return this.props.width??300}get height(){return this.props.height??500}get indent(){return this.props.indent??24}get rowHeight(){return this.props.rowHeight??24}get overscanCount(){return this.props.overscanCount??1}get searchTerm(){return(this.props.searchTerm||``).trim()}get matchFn(){let e=this.props.searchMatch??((e,t)=>JSON.stringify(Object.values(e.data)).toLocaleLowerCase().includes(t.toLocaleLowerCase()));return t=>e(t,this.searchTerm)}accessChildren(e){return A(e,this.props.childrenAccessor||`children`)??null}accessId(e){let t=A(e,this.props.idAccessor||`id`);if(!t)throw Error(`Data must contain an 'id' property or props.idAccessor must return a string`);return t}get firstNode(){return this.visibleNodes[0]??null}get lastNode(){return this.visibleNodes[this.visibleNodes.length-1]??null}get focusedNode(){return this.get(this.state.nodes.focus.id)??null}get mostRecentNode(){return this.get(this.state.nodes.selection.mostRecent)??null}get nextNode(){let e=this.indexOf(this.focusedNode);return e===null?null:this.at(e+1)}get prevNode(){let e=this.indexOf(this.focusedNode);return e===null?null:this.at(e-1)}get(e){return e&&e in this.idToIndex&&this.visibleNodes[this.idToIndex[e]]||null}at(e){return this.visibleNodes[e]||null}nodesBetween(e,t){if(e===null||t===null)return[];let n=this.indexOf(e)??0,r=this.indexOf(t);if(r===null)return[];let i=Math.min(n,r),a=Math.max(n,r);return this.visibleNodes.slice(i,a+1)}indexOf(e){let t=be(e);return t?this.idToIndex[t]:null}get editingId(){return this.state.nodes.edit.id}createInternal(){return this.create({type:`internal`})}createLeaf(){return this.create({type:`leaf`})}create(){return is(this,arguments,void 0,function*(e={}){let t=e.parentId===void 0?Te(this):e.parentId,n=e.index??we(this),r=e.type??`leaf`,i=yield X(this.props.onCreate,{type:r,parentId:t,index:n,parentNode:this.get(t)});i&&(this.focus(i),setTimeout(()=>{this.edit(i).then(()=>{this.select(i),this.activate(i)})}))})}delete(e){return is(this,void 0,void 0,function*(){if(!e)return;let t=(Array.isArray(e)?e:[e]).map(Z),n=t.map(e=>this.get(e)).filter(e=>!!e);yield X(this.props.onDelete,{nodes:n,ids:t})})}edit(t){let n=Z(t);return this.resolveEdit({cancelled:!0}),this.scrollTo(n),this.dispatch(Pe(n)),new Promise(t=>{e.editPromise=t})}submit(e,t){return is(this,void 0,void 0,function*(){if(!e)return;let n=Z(e);yield X(this.props.onRename,{id:n,name:t,node:this.get(n)}),this.dispatch(Pe(null)),this.resolveEdit({cancelled:!1,value:t}),setTimeout(()=>this.onFocus())})}reset(){this.dispatch(Pe(null)),this.resolveEdit({cancelled:!0}),setTimeout(()=>this.onFocus())}activate(e){let t=this.get(Q(e));t&&X(this.props.onActivate,t)}resolveEdit(t){let n=e.editPromise;n&&n(t),e.editPromise=null}get selectedIds(){return this.state.nodes.selection.ids}get selectedNodes(){let e=[];for(let t of Array.from(this.selectedIds)){let n=this.get(t);n&&e.push(n)}return e}focus(e,t={}){e&&(this.props.selectionFollowsFocus?this.select(e):(this.dispatch(N(Z(e))),t.scroll!==!1&&this.scrollTo(e),this.focusedNode&&X(this.props.onFocus,this.focusedNode)))}pageUp(){let e=this.visibleStartIndex,t=this.visibleStopIndex-e,n=this.focusedNode?.rowIndex??0;n=n>e?e:Math.max(e-t,0),this.focus(this.at(n))}pageDown(){let e=this.visibleStartIndex,t=this.visibleStopIndex,n=t-e,r=this.focusedNode?.rowIndex??0;r=r<t?t:Math.min(r+n,this.visibleNodes.length-1),this.focus(this.at(r))}select(e,t={}){if(!e)return;let n=t.focus!==!1,r=Z(e);n&&this.dispatch(N(r)),this.dispatch(F.only(r)),this.dispatch(F.anchor(r)),this.dispatch(F.mostRecent(r)),this.scrollTo(r,t.align),this.focusedNode&&n&&X(this.props.onFocus,this.focusedNode),X(this.props.onSelect,this.selectedNodes)}deselect(e){if(!e)return;let t=Z(e);this.dispatch(F.remove(t)),X(this.props.onSelect,this.selectedNodes)}selectMulti(e){let t=this.get(Q(e));t&&(this.dispatch(N(t.id)),this.dispatch(F.add(t.id)),this.dispatch(F.anchor(t.id)),this.dispatch(F.mostRecent(t.id)),this.scrollTo(t),this.focusedNode&&X(this.props.onFocus,this.focusedNode),X(this.props.onSelect,this.selectedNodes))}selectContiguous(e){if(!e)return;let t=Z(e),{anchor:n,mostRecent:r}=this.state.nodes.selection;this.dispatch(N(t)),this.dispatch(F.remove(this.nodesBetween(n,r))),this.dispatch(F.add(this.nodesBetween(n,Q(t)))),this.dispatch(F.mostRecent(t)),this.scrollTo(t),this.focusedNode&&X(this.props.onFocus,this.focusedNode),X(this.props.onSelect,this.selectedNodes)}deselectAll(){this.setSelection({ids:[],anchor:null,mostRecent:null}),X(this.props.onSelect,this.selectedNodes)}selectAll(){this.setSelection({ids:Object.keys(this.idToIndex),anchor:this.firstNode,mostRecent:this.lastNode}),this.dispatch(N(this.lastNode?.id)),this.focusedNode&&X(this.props.onFocus,this.focusedNode),X(this.props.onSelect,this.selectedNodes)}setSelection(e){let t=new Set(e.ids?.map(Z)),n=Q(e.anchor),r=Q(e.mostRecent);this.dispatch(F.set({ids:t,anchor:n,mostRecent:r})),X(this.props.onSelect,this.selectedNodes)}get cursorParentId(){let{cursor:e}=this.state.dnd;switch(e.type){case`highlight`:return e.id;default:return null}}get cursorOverFolder(){return this.state.dnd.cursor.type===`highlight`}get dragNodes(){return this.state.dnd.dragIds.map(e=>this.get(e)).filter(e=>!!e)}get dragNode(){return this.get(this.state.nodes.drag.id)}get dragDestinationParent(){return this.get(this.state.nodes.drag.destinationParentId)}get dragDestinationIndex(){return this.state.nodes.drag.destinationIndex}canDrop(){if(this.isFiltered)return!1;let e=this.get(this.state.dnd.parentId)??this.root,t=this.dragNodes,n=this.props.disableDrop;for(let n of t)if(!n||!e||n.isInternal&&ue(e,n))return!1;return typeof n==`function`?!n({parentNode:e,dragNodes:this.dragNodes,index:this.state.dnd.index||0}):typeof n==`string`?!e.data[n]:typeof n==`boolean`?!n:!0}hideCursor(){this.dispatch(I.cursor({type:`none`}))}showCursor(e){this.dispatch(I.cursor(e))}open(e){let t=Q(e);t&&(this.isOpen(t)||(this.dispatch(Ve.open(t,this.isFiltered)),X(this.props.onToggle,t)))}close(e){let t=Q(e);t&&this.isOpen(t)&&(this.dispatch(Ve.close(t,this.isFiltered)),X(this.props.onToggle,t))}toggle(e){let t=Q(e);if(t)return this.isOpen(t)?this.close(t):this.open(t)}openParents(e){let t=Q(e);if(!t)return;let n=pe(this.root,t)?.parent;for(;n;)this.open(n.id),n=n.parent}openSiblings(e){let t=e.parent;if(!t)this.toggle(e.id);else if(t.children){let n=e.isOpen;for(let e of t.children)e.isInternal&&(n?this.close(e.id):this.open(e.id));this.scrollTo(this.focusedNode)}}openAll(){me(this.root,e=>{e.isInternal&&e.open()})}closeAll(){me(this.root,e=>{e.isInternal&&e.close()})}scrollTo(e,t=`smart`){if(!e)return;let n=Z(e);return this.openParents(n),Ce(()=>n in this.idToIndex).then(()=>{var e;let r=this.idToIndex[n];r!==void 0&&((e=this.list.current)==null||e.scrollToItem(r,t))}).catch(()=>{})}get isEditing(){return this.state.nodes.edit.id!==null}get isFiltered(){return!!this.props.searchTerm?.trim()}get hasFocus(){return this.state.nodes.focus.treeFocused}get hasNoSelection(){return this.state.nodes.selection.ids.size===0}get hasOneSelection(){return this.state.nodes.selection.ids.size===1}get hasMultipleSelections(){return this.state.nodes.selection.ids.size>1}isSelected(e){return e?this.state.nodes.selection.ids.has(e):!1}isOpen(e){if(!e)return!1;if(e===`__REACT_ARBORIST_INTERNAL_ROOT__`)return!0;let t=this.props.openByDefault??!0;return this.isFiltered?this.state.nodes.open.filtered[e]??!0:this.state.nodes.open.unfiltered[e]??t}isEditable(e){return!A(e,this.props.disableEdit||(()=>!1))}isDraggable(e){return!A(e,this.props.disableDrag||(()=>!1))}isDragging(e){let t=Q(e);return t?this.state.nodes.drag.id===t:!1}isFocused(e){return this.hasFocus&&this.state.nodes.focus.id===e}isMatch(e){return this.matchFn(e)}willReceiveDrop(e){let t=Q(e);if(!t)return!1;let{destinationParentId:n,destinationIndex:r}=this.state.nodes.drag;return t===n&&r===null}onFocus(){let e=this.focusedNode||this.firstNode;e&&this.dispatch(N(e.id))}onBlur(){this.dispatch(Ie())}onItemsRendered(e){this.visibleStartIndex=e.visibleStartIndex,this.visibleStopIndex=e.visibleStopIndex}get renderContainer(){return this.props.renderContainer||Qo}get renderRow(){return this.props.renderRow||Ae}get renderNode(){return this.props.children||je}get renderDragPreview(){return this.props.renderDragPreview||Ye}get renderCursor(){return this.props.renderCursor||ke}};function $(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var os=typeof Symbol==`function`&&Symbol.observable||`@@observable`,ss=()=>Math.random().toString(36).substring(7).split(``).join(`.`),cs={INIT:`@@redux/INIT${ss()}`,REPLACE:`@@redux/REPLACE${ss()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${ss()}`};function ls(e){if(typeof e!=`object`||!e)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function us(e,t,n){if(typeof e!=`function`)throw Error($(2));if(typeof t==`function`&&typeof n==`function`||typeof n==`function`&&typeof arguments[3]==`function`)throw Error($(0));if(typeof t==`function`&&n===void 0&&(n=t,t=void 0),n!==void 0){if(typeof n!=`function`)throw Error($(1));return n(us)(e,t)}let r=e,i=t,a=new Map,o=a,s=0,c=!1;function l(){o===a&&(o=new Map,a.forEach((e,t)=>{o.set(t,e)}))}function u(){if(c)throw Error($(3));return i}function d(e){if(typeof e!=`function`)throw Error($(4));if(c)throw Error($(5));let t=!0;l();let n=s++;return o.set(n,e),function(){if(t){if(c)throw Error($(6));t=!1,l(),o.delete(n),a=null}}}function f(e){if(!ls(e))throw Error($(7));if(e.type===void 0)throw Error($(8));if(typeof e.type!=`string`)throw Error($(17));if(c)throw Error($(9));try{c=!0,i=r(i,e)}finally{c=!1}return(a=o).forEach(e=>{e()}),e}function p(e){if(typeof e!=`function`)throw Error($(10));r=e,f({type:cs.REPLACE})}function m(){let e=d;return{subscribe(t){if(typeof t!=`object`||!t)throw Error($(11));function n(){let e=t;e.next&&e.next(u())}return n(),{unsubscribe:e(n)}},[os](){return this}}}return f({type:cs.INIT}),{dispatch:f,subscribe:d,getState:u,replaceReducer:p,[os]:m}}function ds(e){Object.keys(e).forEach(t=>{let n=e[t];if(n(void 0,{type:cs.INIT})===void 0)throw Error($(12));if(n(void 0,{type:cs.PROBE_UNKNOWN_ACTION()})===void 0)throw Error($(13))})}function fs(e){let t=Object.keys(e),n={};for(let r=0;r<t.length;r++){let i=t[r];typeof e[i]==`function`&&(n[i]=e[i])}let r=Object.keys(n),i;try{ds(n)}catch(e){i=e}return function(e={},t){if(i)throw i;let a=!1,o={};for(let i=0;i<r.length;i++){let s=r[i],c=n[s],l=e[s],u=c(l,t);if(u===void 0)throw t&&t.type,Error($(14));o[s]=u,a||=u!==l}return a||=r.length!==Object.keys(e).length,a?o:e}}function ps(e=P().nodes.drag,t){switch(t.type){case`DND_DRAG_START`:return Object.assign(Object.assign({},e),{id:t.id,selectedIds:t.dragIds});case`DND_DRAG_END`:return Object.assign(Object.assign({},e),{id:null,destinationParentId:null,destinationIndex:null,selectedIds:[]});case`DND_HOVERING`:return t.parentId!==e.destinationParentId||t.index!=e.destinationIndex?Object.assign(Object.assign({},e),{destinationParentId:t.parentId,destinationIndex:t.index}):e;default:return e}}var ms=fs({nodes:fs({focus:Le,edit:Fe,open:Ue,selection:We,drag:ps}),dnd:Ge}),hs=h(),gs=P();function _s({treeProps:e,imperativeHandle:t,children:n}){let r=(0,y.useRef)(null),i=(0,y.useRef)(null),a=(0,y.useRef)(us(ms,P(e))),o=(0,hs.useSyncExternalStore)(a.current.subscribe,a.current.getState,()=>gs),s=(0,y.useMemo)(()=>new as(a.current,e,r,i),[]),c=(0,y.useRef)(0);return(0,y.useMemo)(()=>{c.current+=1,s.update(e)},[...Object.values(e),o.nodes.open]),(0,y.useImperativeHandle)(t,()=>s),(0,y.useEffect)(()=>{s.props.selection?s.select(s.props.selection,{focus:!1}):s.deselectAll()},[s.props.selection]),(0,y.useEffect)(()=>{s.props.searchTerm||a.current.dispatch(Ve.clear(!0))},[s.props.searchTerm]),(0,M.jsx)(D.Provider,{value:s,children:(0,M.jsx)(re.Provider,{value:c.current,children:(0,M.jsx)(k.Provider,{value:o.nodes,children:(0,M.jsx)(te.Provider,{value:o.dnd,children:(0,M.jsx)(Jr,Object.assign({backend:zo,options:{rootElement:s.props.dndRootElement||void 0}},e.dndManager&&{manager:e.dndManager},{children:n}))})})})})}function vs(){let e=O(),[,t]=Fa(()=>({accept:`NODE`,canDrop:(t,n)=>n.isOver({shallow:!0})?e.canDrop():!1,hover:(t,n)=>{if(!n.isOver({shallow:!0}))return;let r=n.getClientOffset();if(!e.listEl.current||!r)return;let{cursor:i,drop:a}=Ko({element:e.listEl.current,offset:r,indent:e.indent,node:null,prevNode:e.visibleNodes[e.visibleNodes.length-1],nextNode:null});a&&e.dispatch(I.hovering(a.parentId,a.index)),n.canDrop()?i&&e.showCursor(i):e.hideCursor()}}),[e]);t(e.listEl)}function ys(e){return vs(),e.children}function bs(){return(0,M.jsx)(M.Fragment,{children:(0,M.jsx)(O().props.renderContainer||Qo,{})})}function xs(){let e=O(),{offset:t,mouse:n,item:r,isDragging:i}=Ha(e=>({offset:e.getSourceClientOffset(),mouse:e.getClientOffset(),item:e.getItem(),isDragging:e.isDragging()}));return(0,M.jsx)(e.props.renderDragPreview||Ye,{offset:t,mouse:n,id:r?.id||null,dragIds:r?.dragIds||[],isDragging:i})}var Ss=class{constructor(e){this.root=Cs(e)}get data(){return this.root.children?.map(e=>e.data)??[]}create(e){let t=e.parentId?this.find(e.parentId):this.root;if(!t)return null;t.addChild(e.data,e.index)}move(e){let t=this.find(e.id),n=e.parentId?this.find(e.parentId):this.root;!t||!n||(n.addChild(t.data,e.index),t.drop())}update(e){let t=this.find(e.id);t&&t.update(e.changes)}drop(e){let t=this.find(e.id);t&&t.drop()}find(e,t=this.root){if(!t)return null;if(t.id===e)return t;if(t.children){for(let n of t.children){let t=this.find(e,n);if(t)return t}return null}return null}};function Cs(e){let t=new Ts({id:`ROOT`},null);return t.children=e.map(e=>ws(e,t)),t}function ws(e,t){let n=new Ts(e,t);return e.children&&(n.children=e.children.map(e=>ws(e,n))),n}var Ts=class{constructor(e,t){this.data=e,this.parent=t,this.id=e.id}hasParent(){return!!this.parent}get childIndex(){return this.hasParent()?this.parent.children.indexOf(this):-1}addChild(e,t){let n=ws(e,this);this.children=this.children??[],this.children.splice(t,0,n),this.data.children=this.data.children??[],this.data.children.splice(t,0,e)}removeChild(e){var t,n;(t=this.children)==null||t.splice(e,1),(n=this.data.children)==null||n.splice(e,1)}update(e){if(this.hasParent()){let t=this.childIndex;this.parent.addChild(Object.assign(Object.assign({},this.data),e),t),this.drop()}}drop(){this.hasParent()&&this.parent.removeChild(this.childIndex)}},Es=0;function Ds(e){let[t,n]=(0,y.useState)(e),r=(0,y.useMemo)(()=>new Ss(t),[t]);return[t,{onMove:e=>{for(let t of e.dragIds)r.move({id:t,parentId:e.parentId,index:e.index});n(r.data)},onRename:({name:e,id:t})=>{r.update({id:t,changes:{name:e}}),n(r.data)},onCreate:({parentId:e,index:t,type:i})=>{let a={id:`simple-tree-id-${Es++}`,name:``};return i===`internal`&&(a.children=[]),r.create({parentId:e,index:t,data:a}),n(r.data),a},onDelete:e=>{e.ids.forEach(e=>r.drop({id:e})),n(r.data)}}]}function Os(e){if(e.initialData&&e.data)throw Error(`React Arborist Tree => Provide either a data or initialData prop, but not both.`);if(e.initialData&&(e.onCreate||e.onDelete||e.onMove||e.onRename))throw Error(`React Arborist Tree => You passed the initialData prop along with a data handler.-Use the data prop if you want to provide your own handlers.`);if(e.initialData){let[t,n]=Ds(e.initialData);return Object.assign(Object.assign(Object.assign({},e),n),{data:t})}else return e}function ks(e,t){return(0,M.jsxs)(_s,{treeProps:Os(e),imperativeHandle:t,children:[(0,M.jsx)(ys,{children:(0,M.jsx)(bs,{})}),(0,M.jsx)(xs,{})]})}var As=(0,y.forwardRef)(ks),js=e=>{let t=(0,b.c)(6),{data:n,onSelectConcept:r}=e,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i={height:`100%`,width:`100%`,backgroundColor:`transparent`,overflow:`hidden`},t[0]=i):i=t[0];let a;t[1]===r?a=t[2]:(a=e=>{let{node:t,style:n,dragHandle:i}=e,a=t.children&&t.children.length>0;return(0,M.jsxs)(`div`,{ref:i,onClick:()=>{t.toggle(),r(t.data)},style:{...n,display:`flex`,alignItems:`center`,padding:`0 8px`,cursor:`pointer`,backgroundColor:t.isSelected?`rgba(88,166,255,0.12)`:`transparent`,userSelect:`none`,borderBottom:`1px solid rgba(255,255,255,0.04)`,transition:`background 0.15s`},onMouseEnter:e=>{t.isSelected||(e.currentTarget.style.background=`rgba(88,166,255,0.06)`)},onMouseLeave:e=>{t.isSelected||(e.currentTarget.style.background=`transparent`)},children:[(0,M.jsx)(`span`,{style:{width:20,display:`flex`,justifyContent:`center`},children:a?t.isOpen?(0,M.jsx)(g,{size:14,color:`#8b949e`}):(0,M.jsx)(_,{size:14,color:`#8b949e`}):null}),(0,M.jsx)(`span`,{style:{marginRight:8,display:`flex`,alignItems:`center`},children:a?(0,M.jsx)(v,{size:14,color:`#d2a8ff`}):(0,M.jsx)(d,{size:14,color:`#484f58`})}),(0,M.jsx)(`span`,{style:{fontSize:13,color:`#c9d1d9`,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`},children:t.data.pref_label})]})},t[1]=r,t[2]=a);let o;return t[3]!==n||t[4]!==a?(o=(0,M.jsx)(`div`,{style:i,children:(0,M.jsx)(As,{data:n,idAccessor:`uri`,width:`100%`,height:600,indent:24,rowHeight:36,childrenAccessor:`children`,children:a})}),t[3]=n,t[4]=a,t[5]=o):o=t[5],o},Ms=()=>{let e=(0,b.c)(29),[t,n]=(0,y.useState)(null),[r,i]=(0,y.useState)(null),a=E(),o;e[0]===a?o=e[1]:(o=e=>{if(e.length>0){let t=e[0];n(t),i(null),a.mutate(t,{onSuccess:e=>{i(e),setTimeout(()=>{n(null),i(null)},4e3)},onError:e=>{console.error(`Upload failed:`,e),n(null)}})}},e[0]=a,e[1]=o);let s=o,d;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(d={"text/turtle":[`.ttl`],"application/rdf+xml":[`.rdf`,`.owl`]},e[2]=d):d=e[2];let p;e[3]===s?p=e[4]:(p={onDrop:s,accept:d,maxFiles:1},e[3]=s,e[4]=p);let{getRootProps:m,getInputProps:h,isDragActive:g}=f(p),_;e[5]===m?_=e[6]:(_=m(),e[5]=m,e[6]=_);let v=`2px dashed ${g?`#58a6ff`:`rgba(88,166,255,0.25)`}`,x=g?`rgba(88,166,255,0.06)`:`rgba(0,0,0,0.2)`,S;e[7]!==v||e[8]!==x?(S={border:v,backgroundColor:x,borderRadius:8,padding:`16px 12px`,textAlign:`center`,cursor:`pointer`,transition:`all 0.2s ease`},e[7]=v,e[8]=x,e[9]=S):S=e[9];let C;e[10]===h?C=e[11]:(C=h(),e[10]=h,e[11]=C);let w;e[12]===C?w=e[13]:(w=(0,M.jsx)(`input`,{...C}),e[12]=C,e[13]=w);let T;e[14]!==t?.name||e[15]!==a.isPending||e[16]!==r||e[17]!==g?(T=a.isPending?(0,M.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,alignItems:`center`,color:`#8b949e`},children:[(0,M.jsx)(u,{className:`animate-spin`,size:20,style:{marginBottom:6}}),(0,M.jsxs)(`span`,{style:{fontSize:12},children:[`Uploading `,t?.name,`…`]})]}):r?(0,M.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,alignItems:`center`,color:`#3fb950`},children:[(0,M.jsx)(c,{size:20,style:{marginBottom:6}}),(0,M.jsx)(`span`,{style:{fontSize:12,fontWeight:500},children:`Import Successful!`}),(0,M.jsxs)(`span`,{style:{fontSize:11,marginTop:2,color:`#56d364`},children:[`+`,r.nodes_added,` concepts · +`,r.edges_added,` links`]})]}):(0,M.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,alignItems:`center`,color:`#8b949e`},children:[(0,M.jsx)(l,{size:20,style:{marginBottom:6,color:g?`#58a6ff`:`#484f58`}}),(0,M.jsx)(`span`,{style:{fontSize:12,fontWeight:500,color:`#c9d1d9`},children:g?`Drop here…`:`Import Vocabulary`}),(0,M.jsx)(`span`,{style:{fontSize:11,marginTop:2},children:`.ttl or .rdf`})]}),e[14]=t?.name,e[15]=a.isPending,e[16]=r,e[17]=g,e[18]=T):T=e[18];let D;e[19]!==_||e[20]!==S||e[21]!==w||e[22]!==T?(D=(0,M.jsxs)(`div`,{..._,style:S,children:[w,T]}),e[19]=_,e[20]=S,e[21]=w,e[22]=T,e[23]=D):D=e[23];let O;e[24]===a.isError?O=e[25]:(O=a.isError&&(0,M.jsx)(`p`,{style:{color:`#f85149`,fontSize:11,marginTop:6,textAlign:`center`},children:`Upload failed. Check console.`}),e[24]=a.isError,e[25]=O);let k;return e[26]!==D||e[27]!==O?(k=(0,M.jsxs)(`div`,{children:[D,O]}),e[26]=D,e[27]=O,e[28]=k):k=e[28],k};function Ns(e){let t=(0,b.c)(26),{onSelectConcept:n}=e,{data:r,isLoading:i}=w(),a;t[0]===r?a=t[1]:(a=r===void 0?[]:r,t[0]=r,t[1]=a);let o=a,[s,c]=(0,y.useState)(),l=s??o[0]?.uri,{data:u,isLoading:d}=T(l),f;t[2]===u?f=t[3]:(f=u===void 0?[]:u,t[2]=u,t[3]=f);let p=f,m,h,g,_;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(m={width:340,display:`flex`,flexDirection:`column`,borderRight:`1px solid rgba(88,166,255,0.15)`,backgroundColor:`#010409`,overflow:`hidden`},h={padding:`20px 20px 16px`,borderBottom:`1px solid rgba(88,166,255,0.15)`},g=(0,M.jsx)(`h2`,{style:{fontSize:18,color:`#c9d1d9`,margin:`0 0 4px 0`,fontWeight:600},children:`Ontology & Vocabulary`}),_={color:`#8b949e`,fontSize:13,margin:0},t[4]=m,t[5]=h,t[6]=g,t[7]=_):(m=t[4],h=t[5],g=t[6],_=t[7]);let v=o.length?`${o.length} vocabulary scheme${o.length>1?`s`:``}`:`No vocabularies loaded`,x;t[8]===v?x=t[9]:(x=(0,M.jsxs)(`div`,{style:h,children:[g,(0,M.jsx)(`p`,{style:_,children:v})]}),t[8]=v,t[9]=x);let S;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(S={padding:`12px 16px`,borderBottom:`1px solid rgba(88,166,255,0.1)`},t[10]=S):S=t[10];let C;t[11]!==o||t[12]!==i||t[13]!==l?(C=(0,M.jsx)(`div`,{style:S,children:i?(0,M.jsx)(`div`,{style:{color:`#8b949e`,fontSize:13},children:`Loading schemes…`}):o.length===0?(0,M.jsx)(`div`,{style:{color:`#484f58`,fontSize:13,fontStyle:`italic`},children:`No schemes found. Import a .ttl or .rdf file below.`}):(0,M.jsx)(`select`,{value:l||``,onChange:e=>c(e.target.value),style:{width:`100%`,appearance:`none`,background:`rgba(0,0,0,0.3)`,border:`1px solid rgba(88,166,255,0.2)`,color:`#c9d1d9`,padding:`8px 12px`,borderRadius:6,fontSize:13,cursor:`pointer`,outline:`none`},children:o.map(Ps)})}),t[11]=o,t[12]=i,t[13]=l,t[14]=C):C=t[14];let E;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(E={flex:1,overflow:`hidden`,display:`flex`,flexDirection:`column`},t[15]=E):E=t[15];let D;t[16]!==p||t[17]!==n||t[18]!==l||t[19]!==d?(D=(0,M.jsx)(`div`,{style:E,children:d?(0,M.jsx)(`div`,{style:{padding:20,color:`#8b949e`,fontSize:13,textAlign:`center`},children:`Loading hierarchy…`}):p.length===0?(0,M.jsx)(`div`,{style:{padding:20,color:`#484f58`,fontSize:13,textAlign:`center`,fontStyle:`italic`},children:l?`No concepts found in this scheme.`:`Select a scheme to browse concepts.`}):(0,M.jsx)(`div`,{style:{flex:1,overflow:`hidden`},children:(0,M.jsx)(js,{data:p,onSelectConcept:n})})}),t[16]=p,t[17]=n,t[18]=l,t[19]=d,t[20]=D):D=t[20];let O;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(O=(0,M.jsx)(`div`,{style:{padding:`12px 16px`,borderTop:`1px solid rgba(88,166,255,0.15)`},children:(0,M.jsx)(Ms,{})}),t[21]=O):O=t[21];let k;return t[22]!==x||t[23]!==C||t[24]!==D?(k=(0,M.jsxs)(`div`,{style:m,children:[x,C,D,O]}),t[22]=x,t[23]=C,t[24]=D,t[25]=k):k=t[25],k}function Ps(e){return(0,M.jsx)(`option`,{value:e.uri,style:{background:`#0d1117`},children:e.label},e.uri)}function Fs(e){let t=(0,b.c)(22),{concept:n}=e;if(!n){let e;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e={display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,height:`100%`,color:`#8b949e`,textAlign:`center`,padding:40},t[0]=e):e=t[0];let n;return t[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,M.jsxs)(`div`,{style:e,children:[(0,M.jsx)(`svg`,{width:`48`,height:`48`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`,style:{marginBottom:16,opacity:.4},children:(0,M.jsx)(`path`,{d:`M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H20v20H6.5a2.5 2.5 0 0 1 0-5H20`})}),(0,M.jsx)(`p`,{style:{fontSize:15,fontWeight:500,marginBottom:4},children:`No concept selected`}),(0,M.jsx)(`p`,{style:{fontSize:13},children:`Click a concept in the tree to view its properties.`})]}),t[1]=n):n=t[1],n}let r,i,a,o;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(r={padding:28,overflowY:`auto`,height:`100%`},i={borderBottom:`1px solid rgba(88,166,255,0.2)`,paddingBottom:20,marginBottom:24},a=(0,M.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10,marginBottom:8},children:[(0,M.jsx)(`span`,{style:{display:`inline-block`,width:8,height:8,borderRadius:`50%`,background:`#d2a8ff`,boxShadow:`0 0 8px rgba(210,168,255,0.6)`}}),(0,M.jsx)(`span`,{style:{color:`#d2a8ff`,fontSize:12,fontWeight:600,textTransform:`uppercase`,letterSpacing:`0.06em`},children:`SKOS Concept`})]}),o={margin:0,color:`#fff`,fontSize:22,fontWeight:700,wordBreak:`break-word`},t[2]=r,t[3]=i,t[4]=a,t[5]=o):(r=t[2],i=t[3],a=t[4],o=t[5]);let s;t[6]===n.pref_label?s=t[7]:(s=(0,M.jsxs)(`div`,{style:i,children:[a,(0,M.jsx)(`h2`,{style:o,children:n.pref_label})]}),t[6]=n.pref_label,t[7]=s);let c;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(c={marginBottom:20,padding:`8px 14px`,background:`rgba(88,166,255,0.08)`,border:`1px solid rgba(88,166,255,0.2)`,borderRadius:6,fontSize:13,color:`#79c0ff`,fontFamily:`'JetBrains Mono', monospace`,wordBreak:`break-all`},t[8]=c):c=t[8];let l;t[9]===n.uri?l=t[10]:(l=(0,M.jsx)(`div`,{style:c,children:n.uri}),t[9]=n.uri,t[10]=l);let u;t[11]===n.alt_labels?u=t[12]:(u=n.alt_labels&&n.alt_labels.length>0&&(0,M.jsxs)(`section`,{style:{marginBottom:24},children:[(0,M.jsx)(`h4`,{style:{color:`#8b949e`,fontSize:12,textTransform:`uppercase`,letterSpacing:`0.08em`,marginBottom:10},children:`Alternative Labels`}),(0,M.jsx)(`div`,{style:{display:`flex`,gap:8,flexWrap:`wrap`},children:n.alt_labels.map(Ls)})]}),t[11]=n.alt_labels,t[12]=u);let d,f;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(f={background:`rgba(0,0,0,0.2)`,padding:16,borderRadius:8,border:`1px solid rgba(255,255,255,0.05)`},d=(0,M.jsx)(`h4`,{style:{color:`#8b949e`,fontSize:12,textTransform:`uppercase`,letterSpacing:`0.08em`,marginBottom:10},children:`Narrower Concepts`}),t[13]=d,t[14]=f):(d=t[13],f=t[14]);let p;t[15]===n.children?p=t[16]:(p=(0,M.jsxs)(`section`,{style:f,children:[d,n.children&&n.children.length>0?(0,M.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:6},children:n.children.map(Is)}):(0,M.jsx)(`p`,{style:{margin:0,color:`#484f58`,fontStyle:`italic`,fontSize:13},children:`Leaf concept — no narrower concepts.`})]}),t[15]=n.children,t[16]=p);let m;return t[17]!==p||t[18]!==s||t[19]!==l||t[20]!==u?(m=(0,M.jsxs)(`div`,{style:r,children:[s,l,u,p]}),t[17]=p,t[18]=s,t[19]=l,t[20]=u,t[21]=m):m=t[21],m}function Is(e){return(0,M.jsx)(`span`,{style:{color:`#c9d1d9`,fontSize:13,padding:`6px 10px`,background:`rgba(88,166,255,0.06)`,borderRadius:4,border:`1px solid rgba(88,166,255,0.12)`},children:e.pref_label},e.uri)}function Ls(e,t){return(0,M.jsx)(`span`,{style:{background:`#21262d`,color:`#c9d1d9`,padding:`4px 10px`,borderRadius:4,fontSize:13,border:`1px solid rgba(255,255,255,0.06)`},children:e},t)}var Rs=`- .vocab-workspace {- display: flex;- width: 100%;- height: 100%;- background: #0d1117;- overflow: hidden;- }- .vocab-main {- flex: 1;- display: flex;- flex-direction: column;- position: relative;- overflow: hidden;- }- .vocab-main-content {- flex: 1;- overflow-y: auto;- }- .vocab-detail-glass {- background: linear-gradient(135deg, rgba(13,17,23,0.75), rgba(22,27,34,0.6));- backdrop-filter: blur(16px) saturate(1.2);- -webkit-backdrop-filter: blur(16px) saturate(1.2);- border: 1px solid rgba(88,166,255,0.15);- box-shadow: 0 8px 32px rgba(0,0,0,0.5), inset 1px 1px 0 rgba(255,255,255,0.04);- border-radius: 14px;- height: 100%;- }-`;function zs(){let e=(0,b.c)(6),[t,n]=(0,y.useState)(null),r,i;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,M.jsx)(`style`,{children:Rs}),i=(0,M.jsx)(Ns,{onSelectConcept:n}),e[0]=r,e[1]=i):(r=e[0],i=e[1]);let a;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,M.jsx)(`div`,{style:{position:`absolute`,inset:0,pointerEvents:`none`,background:`radial-gradient(ellipse at top right, rgba(210,168,255,0.04), transparent 60%)`}}),e[2]=a):a=e[2];let o;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(o={padding:32},e[3]=o):o=e[3];let s;return e[4]===t?s=e[5]:(s=(0,M.jsxs)(`div`,{className:`vocab-workspace`,children:[r,i,(0,M.jsxs)(`div`,{className:`vocab-main`,children:[a,(0,M.jsx)(`div`,{className:`vocab-main-content`,style:o,children:(0,M.jsx)(`div`,{className:`vocab-detail-glass`,children:(0,M.jsx)(Fs,{concept:t})})})]})]}),e[4]=t,e[5]=s),s}export{zs as VocabularyWorkspace};\ No newline at end of filediff --git a/semantica/static/assets/es-CS4MDIhr.js b/semantica/static/assets/es-CS4MDIhr.jsdeleted file mode 100644index 07721e34..00000000--- a/semantica/static/assets/es-CS4MDIhr.js+++ /dev/null@@ -1,5 +0,0 @@-import{i as e,t}from"./rolldown-runtime-B1FJdls4.js";import{T as n}from"./query-vendor-Cbp9LWgA.js";import{n as r}from"./index-DDOaKEbH.js";var i=r(`circle-check`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),a=r(`cloud-upload`,[[`path`,{d:`M12 13v8`,key:`1l5pq0`}],[`path`,{d:`M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242`,key:`1pljnt`}],[`path`,{d:`m8 17 4-4 4 4`,key:`1quai1`}]]),o=r(`file-text`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 9H8`,key:`b1mrlr`}],[`path`,{d:`M16 13H8`,key:`t4e002`}],[`path`,{d:`M16 17H8`,key:`z1uh3a`}]]),s=r(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),c=t(((e,t)=>{t.exports=`SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED`})),l=t(((e,t)=>{var n=c();function r(){}function i(){}i.resetWarningCache=r,t.exports=function(){function e(e,t,r,i,a,o){if(o!==n){var s=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name=`Invariant Violation`,s}}e.isRequired=e;function t(){return e}var a={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:r};return a.PropTypes=a,a}})),u=t(((e,t)=>{t.exports=l()()}));function d(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})}var f=new Map([[`1km`,`application/vnd.1000minds.decision-model+xml`],[`3dml`,`text/vnd.in3d.3dml`],[`3ds`,`image/x-3ds`],[`3g2`,`video/3gpp2`],[`3gp`,`video/3gp`],[`3gpp`,`video/3gpp`],[`3mf`,`model/3mf`],[`7z`,`application/x-7z-compressed`],[`7zip`,`application/x-7z-compressed`],[`123`,`application/vnd.lotus-1-2-3`],[`aab`,`application/x-authorware-bin`],[`aac`,`audio/x-acc`],[`aam`,`application/x-authorware-map`],[`aas`,`application/x-authorware-seg`],[`abw`,`application/x-abiword`],[`ac`,`application/vnd.nokia.n-gage.ac+xml`],[`ac3`,`audio/ac3`],[`acc`,`application/vnd.americandynamics.acc`],[`ace`,`application/x-ace-compressed`],[`acu`,`application/vnd.acucobol`],[`acutc`,`application/vnd.acucorp`],[`adp`,`audio/adpcm`],[`aep`,`application/vnd.audiograph`],[`afm`,`application/x-font-type1`],[`afp`,`application/vnd.ibm.modcap`],[`ahead`,`application/vnd.ahead.space`],[`ai`,`application/pdf`],[`aif`,`audio/x-aiff`],[`aifc`,`audio/x-aiff`],[`aiff`,`audio/x-aiff`],[`air`,`application/vnd.adobe.air-application-installer-package+zip`],[`ait`,`application/vnd.dvb.ait`],[`ami`,`application/vnd.amiga.ami`],[`amr`,`audio/amr`],[`apk`,`application/vnd.android.package-archive`],[`apng`,`image/apng`],[`appcache`,`text/cache-manifest`],[`application`,`application/x-ms-application`],[`apr`,`application/vnd.lotus-approach`],[`arc`,`application/x-freearc`],[`arj`,`application/x-arj`],[`asc`,`application/pgp-signature`],[`asf`,`video/x-ms-asf`],[`asm`,`text/x-asm`],[`aso`,`application/vnd.accpac.simply.aso`],[`asx`,`video/x-ms-asf`],[`atc`,`application/vnd.acucorp`],[`atom`,`application/atom+xml`],[`atomcat`,`application/atomcat+xml`],[`atomdeleted`,`application/atomdeleted+xml`],[`atomsvc`,`application/atomsvc+xml`],[`atx`,`application/vnd.antix.game-component`],[`au`,`audio/x-au`],[`avi`,`video/x-msvideo`],[`avif`,`image/avif`],[`aw`,`application/applixware`],[`azf`,`application/vnd.airzip.filesecure.azf`],[`azs`,`application/vnd.airzip.filesecure.azs`],[`azv`,`image/vnd.airzip.accelerator.azv`],[`azw`,`application/vnd.amazon.ebook`],[`b16`,`image/vnd.pco.b16`],[`bat`,`application/x-msdownload`],[`bcpio`,`application/x-bcpio`],[`bdf`,`application/x-font-bdf`],[`bdm`,`application/vnd.syncml.dm+wbxml`],[`bdoc`,`application/x-bdoc`],[`bed`,`application/vnd.realvnc.bed`],[`bh2`,`application/vnd.fujitsu.oasysprs`],[`bin`,`application/octet-stream`],[`blb`,`application/x-blorb`],[`blorb`,`application/x-blorb`],[`bmi`,`application/vnd.bmi`],[`bmml`,`application/vnd.balsamiq.bmml+xml`],[`bmp`,`image/bmp`],[`book`,`application/vnd.framemaker`],[`box`,`application/vnd.previewsystems.box`],[`boz`,`application/x-bzip2`],[`bpk`,`application/octet-stream`],[`bpmn`,`application/octet-stream`],[`bsp`,`model/vnd.valve.source.compiled-map`],[`btif`,`image/prs.btif`],[`buffer`,`application/octet-stream`],[`bz`,`application/x-bzip`],[`bz2`,`application/x-bzip2`],[`c`,`text/x-c`],[`c4d`,`application/vnd.clonk.c4group`],[`c4f`,`application/vnd.clonk.c4group`],[`c4g`,`application/vnd.clonk.c4group`],[`c4p`,`application/vnd.clonk.c4group`],[`c4u`,`application/vnd.clonk.c4group`],[`c11amc`,`application/vnd.cluetrust.cartomobile-config`],[`c11amz`,`application/vnd.cluetrust.cartomobile-config-pkg`],[`cab`,`application/vnd.ms-cab-compressed`],[`caf`,`audio/x-caf`],[`cap`,`application/vnd.tcpdump.pcap`],[`car`,`application/vnd.curl.car`],[`cat`,`application/vnd.ms-pki.seccat`],[`cb7`,`application/x-cbr`],[`cba`,`application/x-cbr`],[`cbr`,`application/x-cbr`],[`cbt`,`application/x-cbr`],[`cbz`,`application/x-cbr`],[`cc`,`text/x-c`],[`cco`,`application/x-cocoa`],[`cct`,`application/x-director`],[`ccxml`,`application/ccxml+xml`],[`cdbcmsg`,`application/vnd.contact.cmsg`],[`cda`,`application/x-cdf`],[`cdf`,`application/x-netcdf`],[`cdfx`,`application/cdfx+xml`],[`cdkey`,`application/vnd.mediastation.cdkey`],[`cdmia`,`application/cdmi-capability`],[`cdmic`,`application/cdmi-container`],[`cdmid`,`application/cdmi-domain`],[`cdmio`,`application/cdmi-object`],[`cdmiq`,`application/cdmi-queue`],[`cdr`,`application/cdr`],[`cdx`,`chemical/x-cdx`],[`cdxml`,`application/vnd.chemdraw+xml`],[`cdy`,`application/vnd.cinderella`],[`cer`,`application/pkix-cert`],[`cfs`,`application/x-cfs-compressed`],[`cgm`,`image/cgm`],[`chat`,`application/x-chat`],[`chm`,`application/vnd.ms-htmlhelp`],[`chrt`,`application/vnd.kde.kchart`],[`cif`,`chemical/x-cif`],[`cii`,`application/vnd.anser-web-certificate-issue-initiation`],[`cil`,`application/vnd.ms-artgalry`],[`cjs`,`application/node`],[`cla`,`application/vnd.claymore`],[`class`,`application/octet-stream`],[`clkk`,`application/vnd.crick.clicker.keyboard`],[`clkp`,`application/vnd.crick.clicker.palette`],[`clkt`,`application/vnd.crick.clicker.template`],[`clkw`,`application/vnd.crick.clicker.wordbank`],[`clkx`,`application/vnd.crick.clicker`],[`clp`,`application/x-msclip`],[`cmc`,`application/vnd.cosmocaller`],[`cmdf`,`chemical/x-cmdf`],[`cml`,`chemical/x-cml`],[`cmp`,`application/vnd.yellowriver-custom-menu`],[`cmx`,`image/x-cmx`],[`cod`,`application/vnd.rim.cod`],[`coffee`,`text/coffeescript`],[`com`,`application/x-msdownload`],[`conf`,`text/plain`],[`cpio`,`application/x-cpio`],[`cpp`,`text/x-c`],[`cpt`,`application/mac-compactpro`],[`crd`,`application/x-mscardfile`],[`crl`,`application/pkix-crl`],[`crt`,`application/x-x509-ca-cert`],[`crx`,`application/x-chrome-extension`],[`cryptonote`,`application/vnd.rig.cryptonote`],[`csh`,`application/x-csh`],[`csl`,`application/vnd.citationstyles.style+xml`],[`csml`,`chemical/x-csml`],[`csp`,`application/vnd.commonspace`],[`csr`,`application/octet-stream`],[`css`,`text/css`],[`cst`,`application/x-director`],[`csv`,`text/csv`],[`cu`,`application/cu-seeme`],[`curl`,`text/vnd.curl`],[`cww`,`application/prs.cww`],[`cxt`,`application/x-director`],[`cxx`,`text/x-c`],[`dae`,`model/vnd.collada+xml`],[`daf`,`application/vnd.mobius.daf`],[`dart`,`application/vnd.dart`],[`dataless`,`application/vnd.fdsn.seed`],[`davmount`,`application/davmount+xml`],[`dbf`,`application/vnd.dbf`],[`dbk`,`application/docbook+xml`],[`dcr`,`application/x-director`],[`dcurl`,`text/vnd.curl.dcurl`],[`dd2`,`application/vnd.oma.dd2+xml`],[`ddd`,`application/vnd.fujixerox.ddd`],[`ddf`,`application/vnd.syncml.dmddf+xml`],[`dds`,`image/vnd.ms-dds`],[`deb`,`application/x-debian-package`],[`def`,`text/plain`],[`deploy`,`application/octet-stream`],[`der`,`application/x-x509-ca-cert`],[`dfac`,`application/vnd.dreamfactory`],[`dgc`,`application/x-dgc-compressed`],[`dic`,`text/x-c`],[`dir`,`application/x-director`],[`dis`,`application/vnd.mobius.dis`],[`disposition-notification`,`message/disposition-notification`],[`dist`,`application/octet-stream`],[`distz`,`application/octet-stream`],[`djv`,`image/vnd.djvu`],[`djvu`,`image/vnd.djvu`],[`dll`,`application/octet-stream`],[`dmg`,`application/x-apple-diskimage`],[`dmn`,`application/octet-stream`],[`dmp`,`application/vnd.tcpdump.pcap`],[`dms`,`application/octet-stream`],[`dna`,`application/vnd.dna`],[`doc`,`application/msword`],[`docm`,`application/vnd.ms-word.template.macroEnabled.12`],[`docx`,`application/vnd.openxmlformats-officedocument.wordprocessingml.document`],[`dot`,`application/msword`],[`dotm`,`application/vnd.ms-word.template.macroEnabled.12`],[`dotx`,`application/vnd.openxmlformats-officedocument.wordprocessingml.template`],[`dp`,`application/vnd.osgi.dp`],[`dpg`,`application/vnd.dpgraph`],[`dra`,`audio/vnd.dra`],[`drle`,`image/dicom-rle`],[`dsc`,`text/prs.lines.tag`],[`dssc`,`application/dssc+der`],[`dtb`,`application/x-dtbook+xml`],[`dtd`,`application/xml-dtd`],[`dts`,`audio/vnd.dts`],[`dtshd`,`audio/vnd.dts.hd`],[`dump`,`application/octet-stream`],[`dvb`,`video/vnd.dvb.file`],[`dvi`,`application/x-dvi`],[`dwd`,`application/atsc-dwd+xml`],[`dwf`,`model/vnd.dwf`],[`dwg`,`image/vnd.dwg`],[`dxf`,`image/vnd.dxf`],[`dxp`,`application/vnd.spotfire.dxp`],[`dxr`,`application/x-director`],[`ear`,`application/java-archive`],[`ecelp4800`,`audio/vnd.nuera.ecelp4800`],[`ecelp7470`,`audio/vnd.nuera.ecelp7470`],[`ecelp9600`,`audio/vnd.nuera.ecelp9600`],[`ecma`,`application/ecmascript`],[`edm`,`application/vnd.novadigm.edm`],[`edx`,`application/vnd.novadigm.edx`],[`efif`,`application/vnd.picsel`],[`ei6`,`application/vnd.pg.osasli`],[`elc`,`application/octet-stream`],[`emf`,`image/emf`],[`eml`,`message/rfc822`],[`emma`,`application/emma+xml`],[`emotionml`,`application/emotionml+xml`],[`emz`,`application/x-msmetafile`],[`eol`,`audio/vnd.digital-winds`],[`eot`,`application/vnd.ms-fontobject`],[`eps`,`application/postscript`],[`epub`,`application/epub+zip`],[`es`,`application/ecmascript`],[`es3`,`application/vnd.eszigno3+xml`],[`esa`,`application/vnd.osgi.subsystem`],[`esf`,`application/vnd.epson.esf`],[`et3`,`application/vnd.eszigno3+xml`],[`etx`,`text/x-setext`],[`eva`,`application/x-eva`],[`evy`,`application/x-envoy`],[`exe`,`application/octet-stream`],[`exi`,`application/exi`],[`exp`,`application/express`],[`exr`,`image/aces`],[`ext`,`application/vnd.novadigm.ext`],[`ez`,`application/andrew-inset`],[`ez2`,`application/vnd.ezpix-album`],[`ez3`,`application/vnd.ezpix-package`],[`f`,`text/x-fortran`],[`f4v`,`video/mp4`],[`f77`,`text/x-fortran`],[`f90`,`text/x-fortran`],[`fbs`,`image/vnd.fastbidsheet`],[`fcdt`,`application/vnd.adobe.formscentral.fcdt`],[`fcs`,`application/vnd.isac.fcs`],[`fdf`,`application/vnd.fdf`],[`fdt`,`application/fdt+xml`],[`fe_launch`,`application/vnd.denovo.fcselayout-link`],[`fg5`,`application/vnd.fujitsu.oasysgp`],[`fgd`,`application/x-director`],[`fh`,`image/x-freehand`],[`fh4`,`image/x-freehand`],[`fh5`,`image/x-freehand`],[`fh7`,`image/x-freehand`],[`fhc`,`image/x-freehand`],[`fig`,`application/x-xfig`],[`fits`,`image/fits`],[`flac`,`audio/x-flac`],[`fli`,`video/x-fli`],[`flo`,`application/vnd.micrografx.flo`],[`flv`,`video/x-flv`],[`flw`,`application/vnd.kde.kivio`],[`flx`,`text/vnd.fmi.flexstor`],[`fly`,`text/vnd.fly`],[`fm`,`application/vnd.framemaker`],[`fnc`,`application/vnd.frogans.fnc`],[`fo`,`application/vnd.software602.filler.form+xml`],[`for`,`text/x-fortran`],[`fpx`,`image/vnd.fpx`],[`frame`,`application/vnd.framemaker`],[`fsc`,`application/vnd.fsc.weblaunch`],[`fst`,`image/vnd.fst`],[`ftc`,`application/vnd.fluxtime.clip`],[`fti`,`application/vnd.anser-web-funds-transfer-initiation`],[`fvt`,`video/vnd.fvt`],[`fxp`,`application/vnd.adobe.fxp`],[`fxpl`,`application/vnd.adobe.fxp`],[`fzs`,`application/vnd.fuzzysheet`],[`g2w`,`application/vnd.geoplan`],[`g3`,`image/g3fax`],[`g3w`,`application/vnd.geospace`],[`gac`,`application/vnd.groove-account`],[`gam`,`application/x-tads`],[`gbr`,`application/rpki-ghostbusters`],[`gca`,`application/x-gca-compressed`],[`gdl`,`model/vnd.gdl`],[`gdoc`,`application/vnd.google-apps.document`],[`geo`,`application/vnd.dynageo`],[`geojson`,`application/geo+json`],[`gex`,`application/vnd.geometry-explorer`],[`ggb`,`application/vnd.geogebra.file`],[`ggt`,`application/vnd.geogebra.tool`],[`ghf`,`application/vnd.groove-help`],[`gif`,`image/gif`],[`gim`,`application/vnd.groove-identity-message`],[`glb`,`model/gltf-binary`],[`gltf`,`model/gltf+json`],[`gml`,`application/gml+xml`],[`gmx`,`application/vnd.gmx`],[`gnumeric`,`application/x-gnumeric`],[`gpg`,`application/gpg-keys`],[`gph`,`application/vnd.flographit`],[`gpx`,`application/gpx+xml`],[`gqf`,`application/vnd.grafeq`],[`gqs`,`application/vnd.grafeq`],[`gram`,`application/srgs`],[`gramps`,`application/x-gramps-xml`],[`gre`,`application/vnd.geometry-explorer`],[`grv`,`application/vnd.groove-injector`],[`grxml`,`application/srgs+xml`],[`gsf`,`application/x-font-ghostscript`],[`gsheet`,`application/vnd.google-apps.spreadsheet`],[`gslides`,`application/vnd.google-apps.presentation`],[`gtar`,`application/x-gtar`],[`gtm`,`application/vnd.groove-tool-message`],[`gtw`,`model/vnd.gtw`],[`gv`,`text/vnd.graphviz`],[`gxf`,`application/gxf`],[`gxt`,`application/vnd.geonext`],[`gz`,`application/gzip`],[`gzip`,`application/gzip`],[`h`,`text/x-c`],[`h261`,`video/h261`],[`h263`,`video/h263`],[`h264`,`video/h264`],[`hal`,`application/vnd.hal+xml`],[`hbci`,`application/vnd.hbci`],[`hbs`,`text/x-handlebars-template`],[`hdd`,`application/x-virtualbox-hdd`],[`hdf`,`application/x-hdf`],[`heic`,`image/heic`],[`heics`,`image/heic-sequence`],[`heif`,`image/heif`],[`heifs`,`image/heif-sequence`],[`hej2`,`image/hej2k`],[`held`,`application/atsc-held+xml`],[`hh`,`text/x-c`],[`hjson`,`application/hjson`],[`hlp`,`application/winhlp`],[`hpgl`,`application/vnd.hp-hpgl`],[`hpid`,`application/vnd.hp-hpid`],[`hps`,`application/vnd.hp-hps`],[`hqx`,`application/mac-binhex40`],[`hsj2`,`image/hsj2`],[`htc`,`text/x-component`],[`htke`,`application/vnd.kenameaapp`],[`htm`,`text/html`],[`html`,`text/html`],[`hvd`,`application/vnd.yamaha.hv-dic`],[`hvp`,`application/vnd.yamaha.hv-voice`],[`hvs`,`application/vnd.yamaha.hv-script`],[`i2g`,`application/vnd.intergeo`],[`icc`,`application/vnd.iccprofile`],[`ice`,`x-conference/x-cooltalk`],[`icm`,`application/vnd.iccprofile`],[`ico`,`image/x-icon`],[`ics`,`text/calendar`],[`ief`,`image/ief`],[`ifb`,`text/calendar`],[`ifm`,`application/vnd.shana.informed.formdata`],[`iges`,`model/iges`],[`igl`,`application/vnd.igloader`],[`igm`,`application/vnd.insors.igm`],[`igs`,`model/iges`],[`igx`,`application/vnd.micrografx.igx`],[`iif`,`application/vnd.shana.informed.interchange`],[`img`,`application/octet-stream`],[`imp`,`application/vnd.accpac.simply.imp`],[`ims`,`application/vnd.ms-ims`],[`in`,`text/plain`],[`ini`,`text/plain`],[`ink`,`application/inkml+xml`],[`inkml`,`application/inkml+xml`],[`install`,`application/x-install-instructions`],[`iota`,`application/vnd.astraea-software.iota`],[`ipfix`,`application/ipfix`],[`ipk`,`application/vnd.shana.informed.package`],[`irm`,`application/vnd.ibm.rights-management`],[`irp`,`application/vnd.irepository.package+xml`],[`iso`,`application/x-iso9660-image`],[`itp`,`application/vnd.shana.informed.formtemplate`],[`its`,`application/its+xml`],[`ivp`,`application/vnd.immervision-ivp`],[`ivu`,`application/vnd.immervision-ivu`],[`jad`,`text/vnd.sun.j2me.app-descriptor`],[`jade`,`text/jade`],[`jam`,`application/vnd.jam`],[`jar`,`application/java-archive`],[`jardiff`,`application/x-java-archive-diff`],[`java`,`text/x-java-source`],[`jhc`,`image/jphc`],[`jisp`,`application/vnd.jisp`],[`jls`,`image/jls`],[`jlt`,`application/vnd.hp-jlyt`],[`jng`,`image/x-jng`],[`jnlp`,`application/x-java-jnlp-file`],[`joda`,`application/vnd.joost.joda-archive`],[`jp2`,`image/jp2`],[`jpe`,`image/jpeg`],[`jpeg`,`image/jpeg`],[`jpf`,`image/jpx`],[`jpg`,`image/jpeg`],[`jpg2`,`image/jp2`],[`jpgm`,`video/jpm`],[`jpgv`,`video/jpeg`],[`jph`,`image/jph`],[`jpm`,`video/jpm`],[`jpx`,`image/jpx`],[`js`,`application/javascript`],[`json`,`application/json`],[`json5`,`application/json5`],[`jsonld`,`application/ld+json`],[`jsonl`,`application/jsonl`],[`jsonml`,`application/jsonml+json`],[`jsx`,`text/jsx`],[`jxr`,`image/jxr`],[`jxra`,`image/jxra`],[`jxrs`,`image/jxrs`],[`jxs`,`image/jxs`],[`jxsc`,`image/jxsc`],[`jxsi`,`image/jxsi`],[`jxss`,`image/jxss`],[`kar`,`audio/midi`],[`karbon`,`application/vnd.kde.karbon`],[`kdb`,`application/octet-stream`],[`kdbx`,`application/x-keepass2`],[`key`,`application/x-iwork-keynote-sffkey`],[`kfo`,`application/vnd.kde.kformula`],[`kia`,`application/vnd.kidspiration`],[`kml`,`application/vnd.google-earth.kml+xml`],[`kmz`,`application/vnd.google-earth.kmz`],[`kne`,`application/vnd.kinar`],[`knp`,`application/vnd.kinar`],[`kon`,`application/vnd.kde.kontour`],[`kpr`,`application/vnd.kde.kpresenter`],[`kpt`,`application/vnd.kde.kpresenter`],[`kpxx`,`application/vnd.ds-keypoint`],[`ksp`,`application/vnd.kde.kspread`],[`ktr`,`application/vnd.kahootz`],[`ktx`,`image/ktx`],[`ktx2`,`image/ktx2`],[`ktz`,`application/vnd.kahootz`],[`kwd`,`application/vnd.kde.kword`],[`kwt`,`application/vnd.kde.kword`],[`lasxml`,`application/vnd.las.las+xml`],[`latex`,`application/x-latex`],[`lbd`,`application/vnd.llamagraphics.life-balance.desktop`],[`lbe`,`application/vnd.llamagraphics.life-balance.exchange+xml`],[`les`,`application/vnd.hhe.lesson-player`],[`less`,`text/less`],[`lgr`,`application/lgr+xml`],[`lha`,`application/octet-stream`],[`link66`,`application/vnd.route66.link66+xml`],[`list`,`text/plain`],[`list3820`,`application/vnd.ibm.modcap`],[`listafp`,`application/vnd.ibm.modcap`],[`litcoffee`,`text/coffeescript`],[`lnk`,`application/x-ms-shortcut`],[`log`,`text/plain`],[`lostxml`,`application/lost+xml`],[`lrf`,`application/octet-stream`],[`lrm`,`application/vnd.ms-lrm`],[`ltf`,`application/vnd.frogans.ltf`],[`lua`,`text/x-lua`],[`luac`,`application/x-lua-bytecode`],[`lvp`,`audio/vnd.lucent.voice`],[`lwp`,`application/vnd.lotus-wordpro`],[`lzh`,`application/octet-stream`],[`m1v`,`video/mpeg`],[`m2a`,`audio/mpeg`],[`m2v`,`video/mpeg`],[`m3a`,`audio/mpeg`],[`m3u`,`text/plain`],[`m3u8`,`application/vnd.apple.mpegurl`],[`m4a`,`audio/x-m4a`],[`m4p`,`application/mp4`],[`m4s`,`video/iso.segment`],[`m4u`,`application/vnd.mpegurl`],[`m4v`,`video/x-m4v`],[`m13`,`application/x-msmediaview`],[`m14`,`application/x-msmediaview`],[`m21`,`application/mp21`],[`ma`,`application/mathematica`],[`mads`,`application/mads+xml`],[`maei`,`application/mmt-aei+xml`],[`mag`,`application/vnd.ecowin.chart`],[`maker`,`application/vnd.framemaker`],[`man`,`text/troff`],[`manifest`,`text/cache-manifest`],[`map`,`application/json`],[`mar`,`application/octet-stream`],[`markdown`,`text/markdown`],[`mathml`,`application/mathml+xml`],[`mb`,`application/mathematica`],[`mbk`,`application/vnd.mobius.mbk`],[`mbox`,`application/mbox`],[`mc1`,`application/vnd.medcalcdata`],[`mcd`,`application/vnd.mcd`],[`mcurl`,`text/vnd.curl.mcurl`],[`md`,`text/markdown`],[`mdb`,`application/x-msaccess`],[`mdi`,`image/vnd.ms-modi`],[`mdx`,`text/mdx`],[`me`,`text/troff`],[`mesh`,`model/mesh`],[`meta4`,`application/metalink4+xml`],[`metalink`,`application/metalink+xml`],[`mets`,`application/mets+xml`],[`mfm`,`application/vnd.mfmp`],[`mft`,`application/rpki-manifest`],[`mgp`,`application/vnd.osgeo.mapguide.package`],[`mgz`,`application/vnd.proteus.magazine`],[`mid`,`audio/midi`],[`midi`,`audio/midi`],[`mie`,`application/x-mie`],[`mif`,`application/vnd.mif`],[`mime`,`message/rfc822`],[`mj2`,`video/mj2`],[`mjp2`,`video/mj2`],[`mjs`,`application/javascript`],[`mk3d`,`video/x-matroska`],[`mka`,`audio/x-matroska`],[`mkd`,`text/x-markdown`],[`mks`,`video/x-matroska`],[`mkv`,`video/x-matroska`],[`mlp`,`application/vnd.dolby.mlp`],[`mmd`,`application/vnd.chipnuts.karaoke-mmd`],[`mmf`,`application/vnd.smaf`],[`mml`,`text/mathml`],[`mmr`,`image/vnd.fujixerox.edmics-mmr`],[`mng`,`video/x-mng`],[`mny`,`application/x-msmoney`],[`mobi`,`application/x-mobipocket-ebook`],[`mods`,`application/mods+xml`],[`mov`,`video/quicktime`],[`movie`,`video/x-sgi-movie`],[`mp2`,`audio/mpeg`],[`mp2a`,`audio/mpeg`],[`mp3`,`audio/mpeg`],[`mp4`,`video/mp4`],[`mp4a`,`audio/mp4`],[`mp4s`,`application/mp4`],[`mp4v`,`video/mp4`],[`mp21`,`application/mp21`],[`mpc`,`application/vnd.mophun.certificate`],[`mpd`,`application/dash+xml`],[`mpe`,`video/mpeg`],[`mpeg`,`video/mpeg`],[`mpg`,`video/mpeg`],[`mpg4`,`video/mp4`],[`mpga`,`audio/mpeg`],[`mpkg`,`application/vnd.apple.installer+xml`],[`mpm`,`application/vnd.blueice.multipass`],[`mpn`,`application/vnd.mophun.application`],[`mpp`,`application/vnd.ms-project`],[`mpt`,`application/vnd.ms-project`],[`mpy`,`application/vnd.ibm.minipay`],[`mqy`,`application/vnd.mobius.mqy`],[`mrc`,`application/marc`],[`mrcx`,`application/marcxml+xml`],[`ms`,`text/troff`],[`mscml`,`application/mediaservercontrol+xml`],[`mseed`,`application/vnd.fdsn.mseed`],[`mseq`,`application/vnd.mseq`],[`msf`,`application/vnd.epson.msf`],[`msg`,`application/vnd.ms-outlook`],[`msh`,`model/mesh`],[`msi`,`application/x-msdownload`],[`msl`,`application/vnd.mobius.msl`],[`msm`,`application/octet-stream`],[`msp`,`application/octet-stream`],[`msty`,`application/vnd.muvee.style`],[`mtl`,`model/mtl`],[`mts`,`model/vnd.mts`],[`mus`,`application/vnd.musician`],[`musd`,`application/mmt-usd+xml`],[`musicxml`,`application/vnd.recordare.musicxml+xml`],[`mvb`,`application/x-msmediaview`],[`mvt`,`application/vnd.mapbox-vector-tile`],[`mwf`,`application/vnd.mfer`],[`mxf`,`application/mxf`],[`mxl`,`application/vnd.recordare.musicxml`],[`mxmf`,`audio/mobile-xmf`],[`mxml`,`application/xv+xml`],[`mxs`,`application/vnd.triscape.mxs`],[`mxu`,`video/vnd.mpegurl`],[`n-gage`,`application/vnd.nokia.n-gage.symbian.install`],[`n3`,`text/n3`],[`nb`,`application/mathematica`],[`nbp`,`application/vnd.wolfram.player`],[`nc`,`application/x-netcdf`],[`ncx`,`application/x-dtbncx+xml`],[`nfo`,`text/x-nfo`],[`ngdat`,`application/vnd.nokia.n-gage.data`],[`nitf`,`application/vnd.nitf`],[`nlu`,`application/vnd.neurolanguage.nlu`],[`nml`,`application/vnd.enliven`],[`nnd`,`application/vnd.noblenet-directory`],[`nns`,`application/vnd.noblenet-sealer`],[`nnw`,`application/vnd.noblenet-web`],[`npx`,`image/vnd.net-fpx`],[`nq`,`application/n-quads`],[`nsc`,`application/x-conference`],[`nsf`,`application/vnd.lotus-notes`],[`nt`,`application/n-triples`],[`ntf`,`application/vnd.nitf`],[`numbers`,`application/x-iwork-numbers-sffnumbers`],[`nzb`,`application/x-nzb`],[`oa2`,`application/vnd.fujitsu.oasys2`],[`oa3`,`application/vnd.fujitsu.oasys3`],[`oas`,`application/vnd.fujitsu.oasys`],[`obd`,`application/x-msbinder`],[`obgx`,`application/vnd.openblox.game+xml`],[`obj`,`model/obj`],[`oda`,`application/oda`],[`odb`,`application/vnd.oasis.opendocument.database`],[`odc`,`application/vnd.oasis.opendocument.chart`],[`odf`,`application/vnd.oasis.opendocument.formula`],[`odft`,`application/vnd.oasis.opendocument.formula-template`],[`odg`,`application/vnd.oasis.opendocument.graphics`],[`odi`,`application/vnd.oasis.opendocument.image`],[`odm`,`application/vnd.oasis.opendocument.text-master`],[`odp`,`application/vnd.oasis.opendocument.presentation`],[`ods`,`application/vnd.oasis.opendocument.spreadsheet`],[`odt`,`application/vnd.oasis.opendocument.text`],[`oga`,`audio/ogg`],[`ogex`,`model/vnd.opengex`],[`ogg`,`audio/ogg`],[`ogv`,`video/ogg`],[`ogx`,`application/ogg`],[`omdoc`,`application/omdoc+xml`],[`onepkg`,`application/onenote`],[`onetmp`,`application/onenote`],[`onetoc`,`application/onenote`],[`onetoc2`,`application/onenote`],[`opf`,`application/oebps-package+xml`],[`opml`,`text/x-opml`],[`oprc`,`application/vnd.palm`],[`opus`,`audio/ogg`],[`org`,`text/x-org`],[`osf`,`application/vnd.yamaha.openscoreformat`],[`osfpvg`,`application/vnd.yamaha.openscoreformat.osfpvg+xml`],[`osm`,`application/vnd.openstreetmap.data+xml`],[`otc`,`application/vnd.oasis.opendocument.chart-template`],[`otf`,`font/otf`],[`otg`,`application/vnd.oasis.opendocument.graphics-template`],[`oth`,`application/vnd.oasis.opendocument.text-web`],[`oti`,`application/vnd.oasis.opendocument.image-template`],[`otp`,`application/vnd.oasis.opendocument.presentation-template`],[`ots`,`application/vnd.oasis.opendocument.spreadsheet-template`],[`ott`,`application/vnd.oasis.opendocument.text-template`],[`ova`,`application/x-virtualbox-ova`],[`ovf`,`application/x-virtualbox-ovf`],[`owl`,`application/rdf+xml`],[`oxps`,`application/oxps`],[`oxt`,`application/vnd.openofficeorg.extension`],[`p`,`text/x-pascal`],[`p7a`,`application/x-pkcs7-signature`],[`p7b`,`application/x-pkcs7-certificates`],[`p7c`,`application/pkcs7-mime`],[`p7m`,`application/pkcs7-mime`],[`p7r`,`application/x-pkcs7-certreqresp`],[`p7s`,`application/pkcs7-signature`],[`p8`,`application/pkcs8`],[`p10`,`application/x-pkcs10`],[`p12`,`application/x-pkcs12`],[`pac`,`application/x-ns-proxy-autoconfig`],[`pages`,`application/x-iwork-pages-sffpages`],[`pas`,`text/x-pascal`],[`paw`,`application/vnd.pawaafile`],[`pbd`,`application/vnd.powerbuilder6`],[`pbm`,`image/x-portable-bitmap`],[`pcap`,`application/vnd.tcpdump.pcap`],[`pcf`,`application/x-font-pcf`],[`pcl`,`application/vnd.hp-pcl`],[`pclxl`,`application/vnd.hp-pclxl`],[`pct`,`image/x-pict`],[`pcurl`,`application/vnd.curl.pcurl`],[`pcx`,`image/x-pcx`],[`pdb`,`application/x-pilot`],[`pde`,`text/x-processing`],[`pdf`,`application/pdf`],[`pem`,`application/x-x509-user-cert`],[`pfa`,`application/x-font-type1`],[`pfb`,`application/x-font-type1`],[`pfm`,`application/x-font-type1`],[`pfr`,`application/font-tdpfr`],[`pfx`,`application/x-pkcs12`],[`pgm`,`image/x-portable-graymap`],[`pgn`,`application/x-chess-pgn`],[`pgp`,`application/pgp`],[`php`,`application/x-httpd-php`],[`php3`,`application/x-httpd-php`],[`php4`,`application/x-httpd-php`],[`phps`,`application/x-httpd-php-source`],[`phtml`,`application/x-httpd-php`],[`pic`,`image/x-pict`],[`pkg`,`application/octet-stream`],[`pki`,`application/pkixcmp`],[`pkipath`,`application/pkix-pkipath`],[`pkpass`,`application/vnd.apple.pkpass`],[`pl`,`application/x-perl`],[`plb`,`application/vnd.3gpp.pic-bw-large`],[`plc`,`application/vnd.mobius.plc`],[`plf`,`application/vnd.pocketlearn`],[`pls`,`application/pls+xml`],[`pm`,`application/x-perl`],[`pml`,`application/vnd.ctc-posml`],[`png`,`image/png`],[`pnm`,`image/x-portable-anymap`],[`portpkg`,`application/vnd.macports.portpkg`],[`pot`,`application/vnd.ms-powerpoint`],[`potm`,`application/vnd.ms-powerpoint.presentation.macroEnabled.12`],[`potx`,`application/vnd.openxmlformats-officedocument.presentationml.template`],[`ppa`,`application/vnd.ms-powerpoint`],[`ppam`,`application/vnd.ms-powerpoint.addin.macroEnabled.12`],[`ppd`,`application/vnd.cups-ppd`],[`ppm`,`image/x-portable-pixmap`],[`pps`,`application/vnd.ms-powerpoint`],[`ppsm`,`application/vnd.ms-powerpoint.slideshow.macroEnabled.12`],[`ppsx`,`application/vnd.openxmlformats-officedocument.presentationml.slideshow`],[`ppt`,`application/powerpoint`],[`pptm`,`application/vnd.ms-powerpoint.presentation.macroEnabled.12`],[`pptx`,`application/vnd.openxmlformats-officedocument.presentationml.presentation`],[`pqa`,`application/vnd.palm`],[`prc`,`application/x-pilot`],[`pre`,`application/vnd.lotus-freelance`],[`prf`,`application/pics-rules`],[`provx`,`application/provenance+xml`],[`ps`,`application/postscript`],[`psb`,`application/vnd.3gpp.pic-bw-small`],[`psd`,`application/x-photoshop`],[`psf`,`application/x-font-linux-psf`],[`pskcxml`,`application/pskc+xml`],[`pti`,`image/prs.pti`],[`ptid`,`application/vnd.pvi.ptid1`],[`pub`,`application/x-mspublisher`],[`pvb`,`application/vnd.3gpp.pic-bw-var`],[`pwn`,`application/vnd.3m.post-it-notes`],[`pya`,`audio/vnd.ms-playready.media.pya`],[`pyv`,`video/vnd.ms-playready.media.pyv`],[`qam`,`application/vnd.epson.quickanime`],[`qbo`,`application/vnd.intu.qbo`],[`qfx`,`application/vnd.intu.qfx`],[`qps`,`application/vnd.publishare-delta-tree`],[`qt`,`video/quicktime`],[`qwd`,`application/vnd.quark.quarkxpress`],[`qwt`,`application/vnd.quark.quarkxpress`],[`qxb`,`application/vnd.quark.quarkxpress`],[`qxd`,`application/vnd.quark.quarkxpress`],[`qxl`,`application/vnd.quark.quarkxpress`],[`qxt`,`application/vnd.quark.quarkxpress`],[`ra`,`audio/x-realaudio`],[`ram`,`audio/x-pn-realaudio`],[`raml`,`application/raml+yaml`],[`rapd`,`application/route-apd+xml`],[`rar`,`application/x-rar`],[`ras`,`image/x-cmu-raster`],[`rcprofile`,`application/vnd.ipunplugged.rcprofile`],[`rdf`,`application/rdf+xml`],[`rdz`,`application/vnd.data-vision.rdz`],[`relo`,`application/p2p-overlay+xml`],[`rep`,`application/vnd.businessobjects`],[`res`,`application/x-dtbresource+xml`],[`rgb`,`image/x-rgb`],[`rif`,`application/reginfo+xml`],[`rip`,`audio/vnd.rip`],[`ris`,`application/x-research-info-systems`],[`rl`,`application/resource-lists+xml`],[`rlc`,`image/vnd.fujixerox.edmics-rlc`],[`rld`,`application/resource-lists-diff+xml`],[`rm`,`audio/x-pn-realaudio`],[`rmi`,`audio/midi`],[`rmp`,`audio/x-pn-realaudio-plugin`],[`rms`,`application/vnd.jcp.javame.midlet-rms`],[`rmvb`,`application/vnd.rn-realmedia-vbr`],[`rnc`,`application/relax-ng-compact-syntax`],[`rng`,`application/xml`],[`roa`,`application/rpki-roa`],[`roff`,`text/troff`],[`rp9`,`application/vnd.cloanto.rp9`],[`rpm`,`audio/x-pn-realaudio-plugin`],[`rpss`,`application/vnd.nokia.radio-presets`],[`rpst`,`application/vnd.nokia.radio-preset`],[`rq`,`application/sparql-query`],[`rs`,`application/rls-services+xml`],[`rsa`,`application/x-pkcs7`],[`rsat`,`application/atsc-rsat+xml`],[`rsd`,`application/rsd+xml`],[`rsheet`,`application/urc-ressheet+xml`],[`rss`,`application/rss+xml`],[`rtf`,`text/rtf`],[`rtx`,`text/richtext`],[`run`,`application/x-makeself`],[`rusd`,`application/route-usd+xml`],[`rv`,`video/vnd.rn-realvideo`],[`s`,`text/x-asm`],[`s3m`,`audio/s3m`],[`saf`,`application/vnd.yamaha.smaf-audio`],[`sass`,`text/x-sass`],[`sbml`,`application/sbml+xml`],[`sc`,`application/vnd.ibm.secure-container`],[`scd`,`application/x-msschedule`],[`scm`,`application/vnd.lotus-screencam`],[`scq`,`application/scvp-cv-request`],[`scs`,`application/scvp-cv-response`],[`scss`,`text/x-scss`],[`scurl`,`text/vnd.curl.scurl`],[`sda`,`application/vnd.stardivision.draw`],[`sdc`,`application/vnd.stardivision.calc`],[`sdd`,`application/vnd.stardivision.impress`],[`sdkd`,`application/vnd.solent.sdkm+xml`],[`sdkm`,`application/vnd.solent.sdkm+xml`],[`sdp`,`application/sdp`],[`sdw`,`application/vnd.stardivision.writer`],[`sea`,`application/octet-stream`],[`see`,`application/vnd.seemail`],[`seed`,`application/vnd.fdsn.seed`],[`sema`,`application/vnd.sema`],[`semd`,`application/vnd.semd`],[`semf`,`application/vnd.semf`],[`senmlx`,`application/senml+xml`],[`sensmlx`,`application/sensml+xml`],[`ser`,`application/java-serialized-object`],[`setpay`,`application/set-payment-initiation`],[`setreg`,`application/set-registration-initiation`],[`sfd-hdstx`,`application/vnd.hydrostatix.sof-data`],[`sfs`,`application/vnd.spotfire.sfs`],[`sfv`,`text/x-sfv`],[`sgi`,`image/sgi`],[`sgl`,`application/vnd.stardivision.writer-global`],[`sgm`,`text/sgml`],[`sgml`,`text/sgml`],[`sh`,`application/x-sh`],[`shar`,`application/x-shar`],[`shex`,`text/shex`],[`shf`,`application/shf+xml`],[`shtml`,`text/html`],[`sid`,`image/x-mrsid-image`],[`sieve`,`application/sieve`],[`sig`,`application/pgp-signature`],[`sil`,`audio/silk`],[`silo`,`model/mesh`],[`sis`,`application/vnd.symbian.install`],[`sisx`,`application/vnd.symbian.install`],[`sit`,`application/x-stuffit`],[`sitx`,`application/x-stuffitx`],[`siv`,`application/sieve`],[`skd`,`application/vnd.koan`],[`skm`,`application/vnd.koan`],[`skp`,`application/vnd.koan`],[`skt`,`application/vnd.koan`],[`sldm`,`application/vnd.ms-powerpoint.slide.macroenabled.12`],[`sldx`,`application/vnd.openxmlformats-officedocument.presentationml.slide`],[`slim`,`text/slim`],[`slm`,`text/slim`],[`sls`,`application/route-s-tsid+xml`],[`slt`,`application/vnd.epson.salt`],[`sm`,`application/vnd.stepmania.stepchart`],[`smf`,`application/vnd.stardivision.math`],[`smi`,`application/smil`],[`smil`,`application/smil`],[`smv`,`video/x-smv`],[`smzip`,`application/vnd.stepmania.package`],[`snd`,`audio/basic`],[`snf`,`application/x-font-snf`],[`so`,`application/octet-stream`],[`spc`,`application/x-pkcs7-certificates`],[`spdx`,`text/spdx`],[`spf`,`application/vnd.yamaha.smaf-phrase`],[`spl`,`application/x-futuresplash`],[`spot`,`text/vnd.in3d.spot`],[`spp`,`application/scvp-vp-response`],[`spq`,`application/scvp-vp-request`],[`spx`,`audio/ogg`],[`sql`,`application/x-sql`],[`src`,`application/x-wais-source`],[`srt`,`application/x-subrip`],[`sru`,`application/sru+xml`],[`srx`,`application/sparql-results+xml`],[`ssdl`,`application/ssdl+xml`],[`sse`,`application/vnd.kodak-descriptor`],[`ssf`,`application/vnd.epson.ssf`],[`ssml`,`application/ssml+xml`],[`sst`,`application/octet-stream`],[`st`,`application/vnd.sailingtracker.track`],[`stc`,`application/vnd.sun.xml.calc.template`],[`std`,`application/vnd.sun.xml.draw.template`],[`stf`,`application/vnd.wt.stf`],[`sti`,`application/vnd.sun.xml.impress.template`],[`stk`,`application/hyperstudio`],[`stl`,`model/stl`],[`stpx`,`model/step+xml`],[`stpxz`,`model/step-xml+zip`],[`stpz`,`model/step+zip`],[`str`,`application/vnd.pg.format`],[`stw`,`application/vnd.sun.xml.writer.template`],[`styl`,`text/stylus`],[`stylus`,`text/stylus`],[`sub`,`text/vnd.dvb.subtitle`],[`sus`,`application/vnd.sus-calendar`],[`susp`,`application/vnd.sus-calendar`],[`sv4cpio`,`application/x-sv4cpio`],[`sv4crc`,`application/x-sv4crc`],[`svc`,`application/vnd.dvb.service`],[`svd`,`application/vnd.svd`],[`svg`,`image/svg+xml`],[`svgz`,`image/svg+xml`],[`swa`,`application/x-director`],[`swf`,`application/x-shockwave-flash`],[`swi`,`application/vnd.aristanetworks.swi`],[`swidtag`,`application/swid+xml`],[`sxc`,`application/vnd.sun.xml.calc`],[`sxd`,`application/vnd.sun.xml.draw`],[`sxg`,`application/vnd.sun.xml.writer.global`],[`sxi`,`application/vnd.sun.xml.impress`],[`sxm`,`application/vnd.sun.xml.math`],[`sxw`,`application/vnd.sun.xml.writer`],[`t`,`text/troff`],[`t3`,`application/x-t3vm-image`],[`t38`,`image/t38`],[`taglet`,`application/vnd.mynfc`],[`tao`,`application/vnd.tao.intent-module-archive`],[`tap`,`image/vnd.tencent.tap`],[`tar`,`application/x-tar`],[`tcap`,`application/vnd.3gpp2.tcap`],[`tcl`,`application/x-tcl`],[`td`,`application/urc-targetdesc+xml`],[`teacher`,`application/vnd.smart.teacher`],[`tei`,`application/tei+xml`],[`teicorpus`,`application/tei+xml`],[`tex`,`application/x-tex`],[`texi`,`application/x-texinfo`],[`texinfo`,`application/x-texinfo`],[`text`,`text/plain`],[`tfi`,`application/thraud+xml`],[`tfm`,`application/x-tex-tfm`],[`tfx`,`image/tiff-fx`],[`tga`,`image/x-tga`],[`tgz`,`application/x-tar`],[`thmx`,`application/vnd.ms-officetheme`],[`tif`,`image/tiff`],[`tiff`,`image/tiff`],[`tk`,`application/x-tcl`],[`tmo`,`application/vnd.tmobile-livetv`],[`toml`,`application/toml`],[`torrent`,`application/x-bittorrent`],[`tpl`,`application/vnd.groove-tool-template`],[`tpt`,`application/vnd.trid.tpt`],[`tr`,`text/troff`],[`tra`,`application/vnd.trueapp`],[`trig`,`application/trig`],[`trm`,`application/x-msterminal`],[`ts`,`video/mp2t`],[`tsd`,`application/timestamped-data`],[`tsv`,`text/tab-separated-values`],[`ttc`,`font/collection`],[`ttf`,`font/ttf`],[`ttl`,`text/turtle`],[`ttml`,`application/ttml+xml`],[`twd`,`application/vnd.simtech-mindmapper`],[`twds`,`application/vnd.simtech-mindmapper`],[`txd`,`application/vnd.genomatix.tuxedo`],[`txf`,`application/vnd.mobius.txf`],[`txt`,`text/plain`],[`u8dsn`,`message/global-delivery-status`],[`u8hdr`,`message/global-headers`],[`u8mdn`,`message/global-disposition-notification`],[`u8msg`,`message/global`],[`u32`,`application/x-authorware-bin`],[`ubj`,`application/ubjson`],[`udeb`,`application/x-debian-package`],[`ufd`,`application/vnd.ufdl`],[`ufdl`,`application/vnd.ufdl`],[`ulx`,`application/x-glulx`],[`umj`,`application/vnd.umajin`],[`unityweb`,`application/vnd.unity`],[`uoml`,`application/vnd.uoml+xml`],[`uri`,`text/uri-list`],[`uris`,`text/uri-list`],[`urls`,`text/uri-list`],[`usdz`,`model/vnd.usdz+zip`],[`ustar`,`application/x-ustar`],[`utz`,`application/vnd.uiq.theme`],[`uu`,`text/x-uuencode`],[`uva`,`audio/vnd.dece.audio`],[`uvd`,`application/vnd.dece.data`],[`uvf`,`application/vnd.dece.data`],[`uvg`,`image/vnd.dece.graphic`],[`uvh`,`video/vnd.dece.hd`],[`uvi`,`image/vnd.dece.graphic`],[`uvm`,`video/vnd.dece.mobile`],[`uvp`,`video/vnd.dece.pd`],[`uvs`,`video/vnd.dece.sd`],[`uvt`,`application/vnd.dece.ttml+xml`],[`uvu`,`video/vnd.uvvu.mp4`],[`uvv`,`video/vnd.dece.video`],[`uvva`,`audio/vnd.dece.audio`],[`uvvd`,`application/vnd.dece.data`],[`uvvf`,`application/vnd.dece.data`],[`uvvg`,`image/vnd.dece.graphic`],[`uvvh`,`video/vnd.dece.hd`],[`uvvi`,`image/vnd.dece.graphic`],[`uvvm`,`video/vnd.dece.mobile`],[`uvvp`,`video/vnd.dece.pd`],[`uvvs`,`video/vnd.dece.sd`],[`uvvt`,`application/vnd.dece.ttml+xml`],[`uvvu`,`video/vnd.uvvu.mp4`],[`uvvv`,`video/vnd.dece.video`],[`uvvx`,`application/vnd.dece.unspecified`],[`uvvz`,`application/vnd.dece.zip`],[`uvx`,`application/vnd.dece.unspecified`],[`uvz`,`application/vnd.dece.zip`],[`vbox`,`application/x-virtualbox-vbox`],[`vbox-extpack`,`application/x-virtualbox-vbox-extpack`],[`vcard`,`text/vcard`],[`vcd`,`application/x-cdlink`],[`vcf`,`text/x-vcard`],[`vcg`,`application/vnd.groove-vcard`],[`vcs`,`text/x-vcalendar`],[`vcx`,`application/vnd.vcx`],[`vdi`,`application/x-virtualbox-vdi`],[`vds`,`model/vnd.sap.vds`],[`vhd`,`application/x-virtualbox-vhd`],[`vis`,`application/vnd.visionary`],[`viv`,`video/vnd.vivo`],[`vlc`,`application/videolan`],[`vmdk`,`application/x-virtualbox-vmdk`],[`vob`,`video/x-ms-vob`],[`vor`,`application/vnd.stardivision.writer`],[`vox`,`application/x-authorware-bin`],[`vrml`,`model/vrml`],[`vsd`,`application/vnd.visio`],[`vsf`,`application/vnd.vsf`],[`vss`,`application/vnd.visio`],[`vst`,`application/vnd.visio`],[`vsw`,`application/vnd.visio`],[`vtf`,`image/vnd.valve.source.texture`],[`vtt`,`text/vtt`],[`vtu`,`model/vnd.vtu`],[`vxml`,`application/voicexml+xml`],[`w3d`,`application/x-director`],[`wad`,`application/x-doom`],[`wadl`,`application/vnd.sun.wadl+xml`],[`war`,`application/java-archive`],[`wasm`,`application/wasm`],[`wav`,`audio/x-wav`],[`wax`,`audio/x-ms-wax`],[`wbmp`,`image/vnd.wap.wbmp`],[`wbs`,`application/vnd.criticaltools.wbs+xml`],[`wbxml`,`application/wbxml`],[`wcm`,`application/vnd.ms-works`],[`wdb`,`application/vnd.ms-works`],[`wdp`,`image/vnd.ms-photo`],[`weba`,`audio/webm`],[`webapp`,`application/x-web-app-manifest+json`],[`webm`,`video/webm`],[`webmanifest`,`application/manifest+json`],[`webp`,`image/webp`],[`wg`,`application/vnd.pmi.widget`],[`wgt`,`application/widget`],[`wks`,`application/vnd.ms-works`],[`wm`,`video/x-ms-wm`],[`wma`,`audio/x-ms-wma`],[`wmd`,`application/x-ms-wmd`],[`wmf`,`image/wmf`],[`wml`,`text/vnd.wap.wml`],[`wmlc`,`application/wmlc`],[`wmls`,`text/vnd.wap.wmlscript`],[`wmlsc`,`application/vnd.wap.wmlscriptc`],[`wmv`,`video/x-ms-wmv`],[`wmx`,`video/x-ms-wmx`],[`wmz`,`application/x-msmetafile`],[`woff`,`font/woff`],[`woff2`,`font/woff2`],[`word`,`application/msword`],[`wpd`,`application/vnd.wordperfect`],[`wpl`,`application/vnd.ms-wpl`],[`wps`,`application/vnd.ms-works`],[`wqd`,`application/vnd.wqd`],[`wri`,`application/x-mswrite`],[`wrl`,`model/vrml`],[`wsc`,`message/vnd.wfa.wsc`],[`wsdl`,`application/wsdl+xml`],[`wspolicy`,`application/wspolicy+xml`],[`wtb`,`application/vnd.webturbo`],[`wvx`,`video/x-ms-wvx`],[`x3d`,`model/x3d+xml`],[`x3db`,`model/x3d+fastinfoset`],[`x3dbz`,`model/x3d+binary`],[`x3dv`,`model/x3d-vrml`],[`x3dvz`,`model/x3d+vrml`],[`x3dz`,`model/x3d+xml`],[`x32`,`application/x-authorware-bin`],[`x_b`,`model/vnd.parasolid.transmit.binary`],[`x_t`,`model/vnd.parasolid.transmit.text`],[`xaml`,`application/xaml+xml`],[`xap`,`application/x-silverlight-app`],[`xar`,`application/vnd.xara`],[`xav`,`application/xcap-att+xml`],[`xbap`,`application/x-ms-xbap`],[`xbd`,`application/vnd.fujixerox.docuworks.binder`],[`xbm`,`image/x-xbitmap`],[`xca`,`application/xcap-caps+xml`],[`xcs`,`application/calendar+xml`],[`xdf`,`application/xcap-diff+xml`],[`xdm`,`application/vnd.syncml.dm+xml`],[`xdp`,`application/vnd.adobe.xdp+xml`],[`xdssc`,`application/dssc+xml`],[`xdw`,`application/vnd.fujixerox.docuworks`],[`xel`,`application/xcap-el+xml`],[`xenc`,`application/xenc+xml`],[`xer`,`application/patch-ops-error+xml`],[`xfdf`,`application/vnd.adobe.xfdf`],[`xfdl`,`application/vnd.xfdl`],[`xht`,`application/xhtml+xml`],[`xhtml`,`application/xhtml+xml`],[`xhvml`,`application/xv+xml`],[`xif`,`image/vnd.xiff`],[`xl`,`application/excel`],[`xla`,`application/vnd.ms-excel`],[`xlam`,`application/vnd.ms-excel.addin.macroEnabled.12`],[`xlc`,`application/vnd.ms-excel`],[`xlf`,`application/xliff+xml`],[`xlm`,`application/vnd.ms-excel`],[`xls`,`application/vnd.ms-excel`],[`xlsb`,`application/vnd.ms-excel.sheet.binary.macroEnabled.12`],[`xlsm`,`application/vnd.ms-excel.sheet.macroEnabled.12`],[`xlsx`,`application/vnd.openxmlformats-officedocument.spreadsheetml.sheet`],[`xlt`,`application/vnd.ms-excel`],[`xltm`,`application/vnd.ms-excel.template.macroEnabled.12`],[`xltx`,`application/vnd.openxmlformats-officedocument.spreadsheetml.template`],[`xlw`,`application/vnd.ms-excel`],[`xm`,`audio/xm`],[`xml`,`application/xml`],[`xns`,`application/xcap-ns+xml`],[`xo`,`application/vnd.olpc-sugar`],[`xop`,`application/xop+xml`],[`xpi`,`application/x-xpinstall`],[`xpl`,`application/xproc+xml`],[`xpm`,`image/x-xpixmap`],[`xpr`,`application/vnd.is-xpr`],[`xps`,`application/vnd.ms-xpsdocument`],[`xpw`,`application/vnd.intercon.formnet`],[`xpx`,`application/vnd.intercon.formnet`],[`xsd`,`application/xml`],[`xsl`,`application/xml`],[`xslt`,`application/xslt+xml`],[`xsm`,`application/vnd.syncml+xml`],[`xspf`,`application/xspf+xml`],[`xul`,`application/vnd.mozilla.xul+xml`],[`xvm`,`application/xv+xml`],[`xvml`,`application/xv+xml`],[`xwd`,`image/x-xwindowdump`],[`xyz`,`chemical/x-xyz`],[`xz`,`application/x-xz`],[`yaml`,`text/yaml`],[`yang`,`application/yang`],[`yin`,`application/yin+xml`],[`yml`,`text/yaml`],[`ymp`,`text/x-suse-ymp`],[`z`,`application/x-compress`],[`z1`,`application/x-zmachine`],[`z2`,`application/x-zmachine`],[`z3`,`application/x-zmachine`],[`z4`,`application/x-zmachine`],[`z5`,`application/x-zmachine`],[`z6`,`application/x-zmachine`],[`z7`,`application/x-zmachine`],[`z8`,`application/x-zmachine`],[`zaz`,`application/vnd.zzazz.deck+xml`],[`zip`,`application/zip`],[`zir`,`application/vnd.zul`],[`zirz`,`application/vnd.zul`],[`zmm`,`application/vnd.handheld-entertainment+xml`],[`zsh`,`text/x-scriptzsh`]]);function p(e,t,n){let r=m(e),{webkitRelativePath:i}=e,a=typeof t==`string`?t:typeof i==`string`&&i.length>0?i:`./${e.name}`;return typeof r.path!=`string`&&h(r,`path`,a),n!==void 0&&Object.defineProperty(r,`handle`,{value:n,writable:!1,configurable:!1,enumerable:!0}),h(r,`relativePath`,a),r}function m(e){let{name:t}=e;if(t&&t.lastIndexOf(`.`)!==-1&&!e.type){let n=t.split(`.`).pop().toLowerCase(),r=f.get(n);r&&Object.defineProperty(e,`type`,{value:r,writable:!1,configurable:!1,enumerable:!0})}return e}function h(e,t,n){Object.defineProperty(e,t,{value:n,writable:!1,configurable:!1,enumerable:!0})}var g=[`.DS_Store`,`Thumbs.db`];function ee(e){return d(this,void 0,void 0,function*(){return v(e)&&te(e.dataTransfer)?b(e.dataTransfer,e.type):_(e)?y(e):Array.isArray(e)&&e.every(e=>`getFile`in e&&typeof e.getFile==`function`)?ne(e):[]})}function te(e){return v(e)}function _(e){return v(e)&&v(e.target)}function v(e){return typeof e==`object`&&!!e}function y(e){return S(e.target.files).map(e=>p(e))}function ne(e){return d(this,void 0,void 0,function*(){return(yield Promise.all(e.map(e=>e.getFile()))).map(e=>p(e))})}function b(e,t){return d(this,void 0,void 0,function*(){if(e.items){let n=S(e.items).filter(e=>e.kind===`file`);return t===`drop`?x(w(yield Promise.all(n.map(C)))):n}return x(S(e.files).map(e=>p(e)))})}function x(e){return e.filter(e=>g.indexOf(e.name)===-1)}function S(e){if(e===null)return[];let t=[];for(let n=0;n<e.length;n++){let r=e[n];t.push(r)}return t}function C(e){if(typeof e.webkitGetAsEntry!=`function`)return T(e);let t=e.webkitGetAsEntry();return t&&t.isDirectory?D(t):T(e,t)}function w(e){return e.reduce((e,t)=>[...e,...Array.isArray(t)?w(t):[t]],[])}function T(e,t){return d(this,void 0,void 0,function*(){if(globalThis.isSecureContext&&typeof e.getAsFileSystemHandle==`function`){let t=yield e.getAsFileSystemHandle();if(t===null)throw Error(`${e} is not a File`);if(t!==void 0){let e=yield t.getFile();return e.handle=t,p(e)}}let n=e.getAsFile();if(!n)throw Error(`${e} is not a File`);return p(n,t?.fullPath??void 0)})}function E(e){return d(this,void 0,void 0,function*(){return e.isDirectory?D(e):O(e)})}function D(e){let t=e.createReader();return new Promise((e,n)=>{let r=[];function i(){t.readEntries(t=>d(this,void 0,void 0,function*(){if(t.length){let e=Promise.all(t.map(E));r.push(e),i()}else try{e(yield Promise.all(r))}catch(e){n(e)}}),e=>{n(e)})}i()})}function O(e){return d(this,void 0,void 0,function*(){return new Promise((t,n)=>{e.file(n=>{t(p(n,e.fullPath))},e=>{n(e)})})})}var k=e(t((e=>{e.__esModule=!0,e.default=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(`,`);if(n.length===0)return!0;var r=e.name||``,i=(e.type||``).toLowerCase(),a=i.replace(/\/.*$/,``);return n.some(function(e){var t=e.trim().toLowerCase();return t.charAt(0)===`.`?r.toLowerCase().endsWith(t):t.endsWith(`/*`)?a===t.replace(/\/.*$/,``):i===t})}return!0}}))());function A(e){return ie(e)||re(e)||I(e)||j()}function j(){throw TypeError(`Invalid attempt to spread non-iterable instance.-In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function re(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function ie(e){if(Array.isArray(e))return L(e)}function M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function N(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?M(Object(n),!0).forEach(function(t){P(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):M(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function P(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function F(e,t){return se(e)||oe(e,t)||I(e,t)||ae()}function ae(){throw TypeError(`Invalid attempt to destructure non-iterable instance.-In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function I(e,t){if(e){if(typeof e==`string`)return L(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return L(e,t)}}function L(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function oe(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r=[],i=!0,a=!1,o,s;try{for(n=n.call(e);!(i=(o=n.next()).done)&&(r.push(o.value),!(t&&r.length===t));i=!0);}catch(e){a=!0,s=e}finally{try{!i&&n.return!=null&&n.return()}finally{if(a)throw s}}return r}}function se(e){if(Array.isArray(e))return e}var R=typeof k.default==`function`?k.default:k.default.default,z=`file-invalid-type`,B=`file-too-large`,ce=`file-too-small`,le=`too-many-files`,ue=function(){var e=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:``).split(`,`);return{code:z,message:`File type must be ${e.length>1?`one of ${e.join(`, `)}`:e[0]}`}},V=function(e){return{code:B,message:`File is larger than ${e} ${e===1?`byte`:`bytes`}`}},H=function(e){return{code:ce,message:`File is smaller than ${e} ${e===1?`byte`:`bytes`}`}},de={code:le,message:`Too many files`};function U(e){return e.type===``&&typeof e.getAsFile==`function`}function fe(e,t){var n=e.type===`application/x-moz-file`||R(e,t)||U(e);return[n,n?null:ue(t)]}function pe(e,t,n){if(W(e.size)){if(W(t)&&W(n)){if(e.size>n)return[!1,V(n)];if(e.size<t)return[!1,H(t)]}else if(W(t)&&e.size<t)return[!1,H(t)];else if(W(n)&&e.size>n)return[!1,V(n)]}return[!0,null]}function W(e){return e!=null}function me(e){var t=e.files,n=e.accept,r=e.minSize,i=e.maxSize,a=e.multiple,o=e.maxFiles,s=e.validator;return!a&&t.length>1||a&&o>=1&&t.length>o?!1:t.every(function(e){var t=F(fe(e,n),1)[0],a=F(pe(e,r,i),1)[0],o=s?s(e):null;return t&&a&&!o})}function G(e){return typeof e.isPropagationStopped==`function`?e.isPropagationStopped():e.cancelBubble===void 0?!1:e.cancelBubble}function K(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(e){return e===`Files`||e===`application/x-moz-file`}):!!e.target&&!!e.target.files}function he(e){e.preventDefault()}function q(e){return e.indexOf(`MSIE`)!==-1||e.indexOf(`Trident/`)!==-1}function ge(e){return e.indexOf(`Edge/`)!==-1}function _e(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return q(e)||ge(e)}function J(){var e=[...arguments];return function(t){var n=[...arguments].slice(1);return e.some(function(e){return!G(t)&&e&&e.apply(void 0,[t].concat(n)),G(t)})}}function ve(){return`showOpenFilePicker`in window}function ye(e){return W(e)?[{description:`Files`,accept:Object.entries(e).filter(function(e){var t=F(e,2),n=t[0],r=t[1],i=!0;return Y(n)||(console.warn(`Skipped "${n}" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.`),i=!1),(!Array.isArray(r)||!r.every(Ce))&&(console.warn(`Skipped "${n}" because an invalid file extension was provided.`),i=!1),i}).reduce(function(e,t){var n=F(t,2),r=n[0],i=n[1];return N(N({},e),{},P({},r,i))},{})}]:e}function be(e){if(W(e))return Object.entries(e).reduce(function(e,t){var n=F(t,2),r=n[0],i=n[1];return[].concat(A(e),[r],A(i))},[]).filter(function(e){return Y(e)||Ce(e)}).join(`,`)}function xe(e){return e instanceof DOMException&&(e.name===`AbortError`||e.code===e.ABORT_ERR)}function Se(e){return e instanceof DOMException&&(e.name===`SecurityError`||e.code===e.SECURITY_ERR)}function Y(e){return e===`audio/*`||e===`video/*`||e===`image/*`||e===`text/*`||e===`application/*`||/\w+\/[-+.\w]+/g.test(e)}function Ce(e){return/^.*\.[\w]+$/.test(e)}var X=e(n()),Z=e(u()),we=[`children`],Te=[`open`],Ee=[`refKey`,`role`,`onKeyDown`,`onFocus`,`onBlur`,`onClick`,`onDragEnter`,`onDragOver`,`onDragLeave`,`onDrop`],De=[`refKey`,`onChange`,`onClick`];function Oe(e){return je(e)||Ae(e)||Pe(e)||ke()}function ke(){throw TypeError(`Invalid attempt to spread non-iterable instance.-In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ae(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function je(e){if(Array.isArray(e))return Fe(e)}function Me(e,t){return Le(e)||Ie(e,t)||Pe(e,t)||Ne()}function Ne(){throw TypeError(`Invalid attempt to destructure non-iterable instance.-In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Pe(e,t){if(e){if(typeof e==`string`)return Fe(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Fe(e,t)}}function Fe(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Ie(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r=[],i=!0,a=!1,o,s;try{for(n=n.call(e);!(i=(o=n.next()).done)&&(r.push(o.value),!(t&&r.length===t));i=!0);}catch(e){a=!0,s=e}finally{try{!i&&n.return!=null&&n.return()}finally{if(a)throw s}}return r}}function Le(e){if(Array.isArray(e))return e}function Re(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Q(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Re(Object(n),!0).forEach(function(t){ze(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Re(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function ze(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $(e,t){if(e==null)return{};var n=Be(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Be(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var Ve=(0,X.forwardRef)(function(e,t){var n=e.children,r=We($(e,we)),i=r.open,a=$(r,Te);return(0,X.useImperativeHandle)(t,function(){return{open:i}},[i]),X.createElement(X.Fragment,null,n(Q(Q({},a),{},{open:i})))});Ve.displayName=`Dropzone`;var He={disabled:!1,getFilesFromEvent:ee,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!1,autoFocus:!1};Ve.defaultProps=He,Ve.propTypes={children:Z.default.func,accept:Z.default.objectOf(Z.default.arrayOf(Z.default.string)),multiple:Z.default.bool,preventDropOnDocument:Z.default.bool,noClick:Z.default.bool,noKeyboard:Z.default.bool,noDrag:Z.default.bool,noDragEventsBubbling:Z.default.bool,minSize:Z.default.number,maxSize:Z.default.number,maxFiles:Z.default.number,disabled:Z.default.bool,getFilesFromEvent:Z.default.func,onFileDialogCancel:Z.default.func,onFileDialogOpen:Z.default.func,useFsAccessApi:Z.default.bool,autoFocus:Z.default.bool,onDragEnter:Z.default.func,onDragLeave:Z.default.func,onDragOver:Z.default.func,onDrop:Z.default.func,onDropAccepted:Z.default.func,onDropRejected:Z.default.func,onError:Z.default.func,validator:Z.default.func};var Ue={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,isDragGlobal:!1,acceptedFiles:[],fileRejections:[]};function We(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=Q(Q({},He),e),n=t.accept,r=t.disabled,i=t.getFilesFromEvent,a=t.maxSize,o=t.minSize,s=t.multiple,c=t.maxFiles,l=t.onDragEnter,u=t.onDragLeave,d=t.onDragOver,f=t.onDrop,p=t.onDropAccepted,m=t.onDropRejected,h=t.onFileDialogCancel,g=t.onFileDialogOpen,ee=t.useFsAccessApi,te=t.autoFocus,_=t.preventDropOnDocument,v=t.noClick,y=t.noKeyboard,ne=t.noDrag,b=t.noDragEventsBubbling,x=t.onError,S=t.validator,C=(0,X.useMemo)(function(){return be(n)},[n]),w=(0,X.useMemo)(function(){return ye(n)},[n]),T=(0,X.useMemo)(function(){return typeof g==`function`?g:Ke},[g]),E=(0,X.useMemo)(function(){return typeof h==`function`?h:Ke},[h]),D=(0,X.useRef)(null),O=(0,X.useRef)(null),k=Me((0,X.useReducer)(Ge,Ue),2),A=k[0],j=k[1],re=A.isFocused,ie=A.isFileDialogActive,M=(0,X.useRef)(typeof window<`u`&&window.isSecureContext&&ee&&ve()),N=function(){!M.current&&ie&&setTimeout(function(){O.current&&(O.current.files.length||(j({type:`closeDialog`}),E()))},300)};(0,X.useEffect)(function(){return window.addEventListener(`focus`,N,!1),function(){window.removeEventListener(`focus`,N,!1)}},[O,ie,E,M]);var P=(0,X.useRef)([]),F=(0,X.useRef)([]),ae=function(e){D.current&&D.current.contains(e.target)||(e.preventDefault(),P.current=[])};(0,X.useEffect)(function(){return _&&(document.addEventListener(`dragover`,he,!1),document.addEventListener(`drop`,ae,!1)),function(){_&&(document.removeEventListener(`dragover`,he),document.removeEventListener(`drop`,ae))}},[D,_]),(0,X.useEffect)(function(){var e=function(e){F.current=[].concat(Oe(F.current),[e.target]),K(e)&&j({isDragGlobal:!0,type:`setDragGlobal`})},t=function(e){F.current=F.current.filter(function(t){return t!==e.target&&t!==null}),!(F.current.length>0)&&j({isDragGlobal:!1,type:`setDragGlobal`})},n=function(){F.current=[],j({isDragGlobal:!1,type:`setDragGlobal`})},r=function(){F.current=[],j({isDragGlobal:!1,type:`setDragGlobal`})};return document.addEventListener(`dragenter`,e,!1),document.addEventListener(`dragleave`,t,!1),document.addEventListener(`dragend`,n,!1),document.addEventListener(`drop`,r,!1),function(){document.removeEventListener(`dragenter`,e),document.removeEventListener(`dragleave`,t),document.removeEventListener(`dragend`,n),document.removeEventListener(`drop`,r)}},[D]),(0,X.useEffect)(function(){return!r&&te&&D.current&&D.current.focus(),function(){}},[D,te,r]);var I=(0,X.useCallback)(function(e){x?x(e):console.error(e)},[x]),L=(0,X.useCallback)(function(e){e.preventDefault(),e.persist(),q(e),P.current=[].concat(Oe(P.current),[e.target]),K(e)&&Promise.resolve(i(e)).then(function(t){if(!(G(e)&&!b)){var n=t.length,r=n>0&&me({files:t,accept:C,minSize:o,maxSize:a,multiple:s,maxFiles:c,validator:S});j({isDragAccept:r,isDragReject:n>0&&!r,isDragActive:!0,type:`setDraggedFiles`}),l&&l(e)}}).catch(function(e){return I(e)})},[i,l,I,b,C,o,a,s,c,S]),oe=(0,X.useCallback)(function(e){e.preventDefault(),e.persist(),q(e);var t=K(e);if(t&&e.dataTransfer)try{e.dataTransfer.dropEffect=`copy`}catch{}return t&&d&&d(e),!1},[d,b]),se=(0,X.useCallback)(function(e){e.preventDefault(),e.persist(),q(e);var t=P.current.filter(function(e){return D.current&&D.current.contains(e)}),n=t.indexOf(e.target);n!==-1&&t.splice(n,1),P.current=t,!(t.length>0)&&(j({type:`setDraggedFiles`,isDragActive:!1,isDragAccept:!1,isDragReject:!1}),K(e)&&u&&u(e))},[D,u,b]),R=(0,X.useCallback)(function(e,t){var n=[],r=[];e.forEach(function(e){var t=Me(fe(e,C),2),i=t[0],s=t[1],c=Me(pe(e,o,a),2),l=c[0],u=c[1],d=S?S(e):null;if(i&&l&&!d)n.push(e);else{var f=[s,u];d&&(f=f.concat(d)),r.push({file:e,errors:f.filter(function(e){return e})})}}),(!s&&n.length>1||s&&c>=1&&n.length>c)&&(n.forEach(function(e){r.push({file:e,errors:[de]})}),n.splice(0)),j({acceptedFiles:n,fileRejections:r,type:`setFiles`}),f&&f(n,r,t),r.length>0&&m&&m(r,t),n.length>0&&p&&p(n,t)},[j,s,C,o,a,c,f,p,m,S]),z=(0,X.useCallback)(function(e){e.preventDefault(),e.persist(),q(e),P.current=[],K(e)&&Promise.resolve(i(e)).then(function(t){G(e)&&!b||R(t,e)}).catch(function(e){return I(e)}),j({type:`reset`})},[i,R,I,b]),B=(0,X.useCallback)(function(){if(M.current){j({type:`openDialog`}),T();var e={multiple:s,types:w};window.showOpenFilePicker(e).then(function(e){return i(e)}).then(function(e){R(e,null),j({type:`closeDialog`})}).catch(function(e){xe(e)?(E(e),j({type:`closeDialog`})):Se(e)?(M.current=!1,O.current?(O.current.value=null,O.current.click()):I(Error(`Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided.`))):I(e)});return}O.current&&(j({type:`openDialog`}),T(),O.current.value=null,O.current.click())},[j,T,E,ee,R,I,w,s]),ce=(0,X.useCallback)(function(e){!D.current||!D.current.isEqualNode(e.target)||(e.key===` `||e.key===`Enter`||e.keyCode===32||e.keyCode===13)&&(e.preventDefault(),B())},[D,B]),le=(0,X.useCallback)(function(){j({type:`focus`})},[]),ue=(0,X.useCallback)(function(){j({type:`blur`})},[]),V=(0,X.useCallback)(function(){v||(_e()?setTimeout(B,0):B())},[v,B]),H=function(e){return r?null:e},U=function(e){return y?null:H(e)},W=function(e){return ne?null:H(e)},q=function(e){b&&e.stopPropagation()},ge=(0,X.useMemo)(function(){return function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.refKey,n=t===void 0?`ref`:t,i=e.role,a=e.onKeyDown,o=e.onFocus,s=e.onBlur,c=e.onClick,l=e.onDragEnter,u=e.onDragOver,d=e.onDragLeave,f=e.onDrop,p=$(e,Ee);return Q(Q(ze({onKeyDown:U(J(a,ce)),onFocus:U(J(o,le)),onBlur:U(J(s,ue)),onClick:H(J(c,V)),onDragEnter:W(J(l,L)),onDragOver:W(J(u,oe)),onDragLeave:W(J(d,se)),onDrop:W(J(f,z)),role:typeof i==`string`&&i!==``?i:`presentation`},n,D),!r&&!y?{tabIndex:0}:{}),p)}},[D,ce,le,ue,V,L,oe,se,z,y,ne,r]),Y=(0,X.useCallback)(function(e){e.stopPropagation()},[]),Ce=(0,X.useMemo)(function(){return function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.refKey,n=t===void 0?`ref`:t,r=e.onChange,i=e.onClick,a=$(e,De);return Q(Q({},ze({accept:C,multiple:s,type:`file`,style:{border:0,clip:`rect(0, 0, 0, 0)`,clipPath:`inset(50%)`,height:`1px`,margin:`0 -1px -1px 0`,overflow:`hidden`,padding:0,position:`absolute`,width:`1px`,whiteSpace:`nowrap`},onChange:H(J(r,z)),onClick:H(J(i,Y)),tabIndex:-1},n,O)),a)}},[O,n,s,z,r]);return Q(Q({},A),{},{isFocused:re&&!r,getRootProps:ge,getInputProps:Ce,rootRef:D,inputRef:O,open:H(B)})}function Ge(e,t){switch(t.type){case`focus`:return Q(Q({},e),{},{isFocused:!0});case`blur`:return Q(Q({},e),{},{isFocused:!1});case`openDialog`:return Q(Q({},Ue),{},{isFileDialogActive:!0});case`closeDialog`:return Q(Q({},e),{},{isFileDialogActive:!1});case`setDraggedFiles`:return Q(Q({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case`setFiles`:return Q(Q({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:!1});case`setDragGlobal`:return Q(Q({},e),{},{isDragGlobal:t.isDragGlobal});case`reset`:return Q({},Ue);default:return e}}function Ke(){}export{i as a,a as i,s as n,o as r,We as t};\ No newline at end of filediff --git a/semantica/static/assets/explorationEffectsPluginPhaseC-D23Zx1hX.js b/semantica/static/assets/explorationEffectsPluginPhaseC-D23Zx1hX.jsdeleted file mode 100644index dc0df3d4..00000000--- a/semantica/static/assets/explorationEffectsPluginPhaseC-D23Zx1hX.js+++ /dev/null@@ -1 +0,0 @@-import{t as e}from"./explorationEffectsPluginPhaseC-D5jYu8XU.js";export{e as explorationEffectsPluginPhaseC};\ No newline at end of filediff --git a/semantica/static/assets/explorationEffectsPluginPhaseC-D5jYu8XU.js b/semantica/static/assets/explorationEffectsPluginPhaseC-D5jYu8XU.jsdeleted file mode 100644index 8f4f9537..00000000--- a/semantica/static/assets/explorationEffectsPluginPhaseC-D5jYu8XU.js+++ /dev/null@@ -1 +0,0 @@-import{a as e}from"./query-vendor-Cbp9LWgA.js";import{r as t}from"./index-DDOaKEbH.js";var n=t(),r=e(),i=`effects-panel`,a=[{key:`pathPulseEnabled`,label:`Path Pulse`,description:`Animated pulse on the active selected path.`},{key:`pathFlowEnabled`,label:`Path Flow`,description:`Directional flow accents along the active selected path.`},{key:`lensEnabled`,label:`Neighborhood Lens`,description:`Local emphasis around the hovered or selected node.`},{key:`temporalEmphasisEnabled`,label:`Temporal Emphasis`,description:`Subtle glow around temporally relevant nodes in the active time window.`},{key:`semanticRegionsEnabled`,label:`Semantic Regions`,description:`Quiet semantic hulls around the strongest visible topic clusters.`},{key:`contoursEnabled`,label:`Contours`,description:`Low-contrast density halos around the strongest visible anchors.`},{key:`legendEnabled`,label:`Regions Summary`,description:`Keep the regions and signals summary visible in the Effects panel.`}],o=[{key:`pathfindingEnabled`,label:`Directed Pathfinding`,description:`Compare the traced path against a strict local directed shortest path.`},{key:`communitiesEnabled`,label:`Community Regions`,description:`Detect stable Louvain communities for orientation and scene grouping.`},{key:`centralityEnabled`,label:`Centrality Ranking`,description:`Rank the strongest graph anchors for labels, regions, and navigation.`}],s={pathPulseEnabled:`pathPulse`,pathFlowEnabled:`pathFlow`,lensEnabled:`lens`,temporalEmphasisEnabled:`temporalEmphasis`,semanticRegionsEnabled:`semanticRegions`,contoursEnabled:`contours`,pathfindingEnabled:`pathfinding`,communitiesEnabled:`communities`,centralityEnabled:`centrality`,legendEnabled:`legend`,diagnosticsEnabled:`diagnostics`};function c(e){return e.available?typeof e.visibleSegments==`number`&&typeof e.segmentCap==`number`?`${e.reason} - ${e.visibleSegments}/${e.segmentCap} segments`:e.reason:e.detail?`${e.reason} - ${e.detail}`:e.reason}function l(e){let t=new Map;return e.graph.forEachNode((n,r)=>{let i=String(r.semanticGroup||r.nodeType||`entity`),a=String(r.baseColor||e.theme.palette.semantic[0]),o=t.get(i);t.set(i,{count:(o?.count??0)+1,color:a})}),[...t.entries()].map(([e,t])=>({group:e,...t})).sort((e,t)=>t.count-e.count).slice(0,e.theme.effects.legend.maxGroups)}function u(e,t,n){return e?.[s[t]]??{enabled:n,available:!1,reason:`Waiting for graph runtime`}}function d(e){let t=(0,n.c)(20),{label:i,description:a,checked:o,availability:s,onToggle:l}=e,u;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(u={minWidth:0,flex:1},t[0]=u):u=t[0];let d;t[1]===i?d=t[2]:(d=(0,r.jsx)(`div`,{style:b,children:i}),t[1]=i,t[2]=d);let f;t[3]===a?f=t[4]:(f=(0,r.jsx)(`div`,{style:x,children:a}),t[3]=a,t[4]=f);let p;t[5]===s?p=t[6]:(p=c(s),t[5]=s,t[6]=p);let m;t[7]===p?m=t[8]:(m=(0,r.jsx)(`div`,{style:S,children:p}),t[7]=p,t[8]=m);let h;t[9]!==d||t[10]!==f||t[11]!==m?(h=(0,r.jsxs)(`div`,{style:u,children:[d,f,m]}),t[9]=d,t[10]=f,t[11]=m,t[12]=h):h=t[12];let g=o?w:C,_=o?`On`:`Off`,v;t[13]!==l||t[14]!==g||t[15]!==_?(v=(0,r.jsx)(`button`,{type:`button`,onClick:l,style:g,children:_}),t[13]=l,t[14]=g,t[15]=_,t[16]=v):v=t[16];let T;return t[17]!==h||t[18]!==v?(T=(0,r.jsxs)(`div`,{style:y,children:[h,v]}),t[17]=h,t[18]=v,t[19]=T):T=t[19],T}function f(e,t){let n=l(e),i=t?.semanticRegions.summaries??[],a=t?.communities.summaries??[],o=t?.centrality.topNodes??[],s=t?.directedPath??null;return!i.length&&!a.length&&!o.length&&!n.length&&!s?(0,r.jsx)(`div`,{style:k,children:`Regions and intelligence summaries will populate when graph analytics are ready.`}):(0,r.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:10},children:[i.length?(0,r.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:8},children:[(0,r.jsx)(`div`,{style:v,children:`Semantic regions`}),i.map(e=>(0,r.jsxs)(`div`,{style:T,children:[(0,r.jsx)(`span`,{style:{...E,background:e.color,boxShadow:`0 0 0 1px rgba(255,255,255,0.06), 0 0 14px ${e.color}40`}}),(0,r.jsxs)(`div`,{style:{minWidth:0,flex:1},children:[(0,r.jsx)(`div`,{style:b,children:e.semanticGroup}),(0,r.jsxs)(`div`,{style:S,children:[e.visibleNodeCount.toLocaleString(),` visible / `,e.nodeCount.toLocaleString(),` total`]})]}),(0,r.jsx)(`div`,{style:O,children:e.anchorLabel})]},e.semanticGroup))]}):null,a.length?(0,r.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:8},children:[(0,r.jsx)(`div`,{style:v,children:`Community anchors`}),a.slice(0,3).map(e=>(0,r.jsxs)(`div`,{style:D,children:[(0,r.jsxs)(`div`,{style:{minWidth:0,flex:1},children:[(0,r.jsx)(`div`,{style:b,children:e.anchorLabel}),(0,r.jsxs)(`div`,{style:S,children:[`Community `,e.communityId,` - `,e.visibleNodeCount,` visible / `,e.nodeCount,` total`]})]}),(0,r.jsx)(`div`,{style:O,children:e.dominantSemanticGroup})]},e.communityId))]}):null,o.length?(0,r.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:8},children:[(0,r.jsx)(`div`,{style:v,children:`Centrality leaders`}),o.slice(0,3).map(e=>(0,r.jsxs)(`div`,{style:D,children:[(0,r.jsxs)(`div`,{style:{minWidth:0,flex:1},children:[(0,r.jsx)(`div`,{style:b,children:e.label}),(0,r.jsxs)(`div`,{style:S,children:[e.semanticGroup,` - score `,e.score.toFixed(3)]})]}),(0,r.jsxs)(`div`,{style:O,children:[`deg `,e.degree.toFixed(3)]})]},e.id))]}):null,s?(0,r.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:8},children:[(0,r.jsx)(`div`,{style:v,children:`Directed pathfinding`}),(0,r.jsxs)(`div`,{style:D,children:[(0,r.jsxs)(`div`,{style:{minWidth:0,flex:1},children:[(0,r.jsx)(`div`,{style:b,children:s.ready?`Local directed path ready`:`Waiting for path context`}),(0,r.jsx)(`div`,{style:S,children:s.reason})]}),s.ready?(0,r.jsxs)(`div`,{style:O,children:[s.length,` hops`,s.verifiedAgainstActivePath?` - match`:``]}):null]})]}):null,!i.length&&!a.length&&!o.length&&n.length?(0,r.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:8},children:[(0,r.jsx)(`div`,{style:v,children:`Fallback semantic legend`}),n.map(e=>(0,r.jsxs)(`div`,{style:T,children:[(0,r.jsx)(`span`,{style:{...E,background:e.color,boxShadow:`0 0 0 1px rgba(255,255,255,0.06), 0 0 14px ${e.color}40`}}),(0,r.jsxs)(`div`,{style:{minWidth:0,flex:1},children:[(0,r.jsx)(`div`,{style:b,children:e.group}),(0,r.jsxs)(`div`,{style:S,children:[e.count.toLocaleString(),` nodes`]})]})]},e.group))]}):null]})}var p={id:`exploration-effects`,mount:()=>{},unmount:()=>{},onStateChange:()=>{},toolbarItems:e=>[{id:`effects-toggle`,label:`Effects`,title:`Open exploration effects controls`,active:e.isPanelOpen(i),order:18,onClick:()=>e.dispatchAction({type:`togglePanel`,panelId:i})}],renderPanel:e=>{if(!e.isPanelOpen(i))return null;let t=e.getEffectsState(),n=e.getDiagnosticsSnapshot(),s=e.getAnalyticsSnapshot(),c=n?.effectAvailability,l=t.legendEnabled||t.semanticRegionsEnabled||t.communitiesEnabled||t.centralityEnabled||t.pathfindingEnabled;return{id:i,title:`Effects`,placement:`bottom`,order:8,defaultOpen:!1,preferredWidth:460,preferredHeight:360,content:(0,r.jsxs)(`div`,{style:m,children:[(0,r.jsx)(`div`,{style:h,children:`Exploration effects`}),(0,r.jsxs)(`div`,{style:g,children:[(0,r.jsx)(`div`,{style:_,children:`Scene effects`}),a.map(n=>(0,r.jsx)(d,{label:n.label,description:n.description,checked:t[n.key],availability:u(c,n.key,t[n.key]),onToggle:()=>e.dispatchAction({type:`toggleEffect`,effect:n.key})},n.key))]}),(0,r.jsxs)(`div`,{style:g,children:[(0,r.jsx)(`div`,{style:_,children:`Graph intelligence`}),o.map(n=>(0,r.jsx)(d,{label:n.label,description:n.description,checked:t[n.key],availability:u(c,n.key,t[n.key]),onToggle:()=>e.dispatchAction({type:`toggleEffect`,effect:n.key})},n.key))]}),l?(0,r.jsxs)(`div`,{style:g,children:[(0,r.jsx)(`div`,{style:_,children:`Regions and signals`}),f(e,s)]}):null,null]})}}},m={display:`flex`,flexDirection:`column`,gap:12},h={color:`#8ea4be`,fontSize:11,fontWeight:700,letterSpacing:`0.08em`,textTransform:`uppercase`},g={display:`flex`,flexDirection:`column`,gap:8,padding:`10px 12px`,borderRadius:14,border:`1px solid rgba(255,255,255,0.06)`,background:`rgba(255,255,255,0.025)`},_={color:`#dce9f8`,fontSize:12,fontWeight:700},v={color:`#9cc4ec`,fontSize:11,fontWeight:700,letterSpacing:`0.05em`,textTransform:`uppercase`},y={display:`flex`,alignItems:`center`,gap:12,padding:`8px 0`},b={color:`#f3f7fd`,fontSize:13,fontWeight:600},x={color:`#a1b7cf`,fontSize:12,lineHeight:1.45},S={color:`#7fc6ff`,fontSize:11,lineHeight:1.45},C={minWidth:52,padding:`8px 10px`,borderRadius:999,border:`1px solid rgba(255,255,255,0.08)`,background:`rgba(255,255,255,0.03)`,color:`#cfe0f4`,fontSize:12,fontWeight:700,cursor:`pointer`},w={...C,background:`rgba(31, 111, 235, 0.24)`,border:`1px solid rgba(127, 208, 255, 0.28)`,color:`#eef6ff`},T={display:`flex`,alignItems:`center`,gap:10,padding:`8px 10px`,borderRadius:12,border:`1px solid rgba(255,255,255,0.06)`,background:`rgba(255,255,255,0.025)`},E={width:10,height:10,borderRadius:999,flexShrink:0},D={display:`flex`,alignItems:`center`,gap:10,padding:`8px 10px`,borderRadius:12,border:`1px solid rgba(255,255,255,0.05)`,background:`rgba(255,255,255,0.02)`},O={padding:`5px 8px`,borderRadius:999,background:`rgba(31, 111, 235, 0.16)`,border:`1px solid rgba(127, 208, 255, 0.16)`,color:`#dce9f8`,fontSize:11,fontWeight:700,whiteSpace:`nowrap`},k={color:`#8ea4be`,fontSize:12,lineHeight:1.5};export{p as t};\ No newline at end of filediff --git a/semantica/static/assets/graph-vendor-pbzH-eyf.js b/semantica/static/assets/graph-vendor-pbzH-eyf.jsdeleted file mode 100644index cba1cb16..00000000--- a/semantica/static/assets/graph-vendor-pbzH-eyf.js+++ /dev/null@@ -1,312 +0,0 @@-import{i as e,t}from"./rolldown-runtime-B1FJdls4.js";var n=t(((e,t)=>{var n=typeof Reflect==`object`?Reflect:null,r=n&&typeof n.apply==`function`?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)},i=n&&typeof n.ownKeys==`function`?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};function a(e){console&&console.warn&&console.warn(e)}var o=Number.isNaN||function(e){return e!==e};function s(){s.init.call(this)}t.exports=s,t.exports.once=y,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var c=10;function l(e){if(typeof e!=`function`)throw TypeError(`The "listener" argument must be of type Function. Received type `+typeof e)}Object.defineProperty(s,`defaultMaxListeners`,{enumerable:!0,get:function(){return c},set:function(e){if(typeof e!=`number`||e<0||o(e))throw RangeError(`The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received `+e+`.`);c=e}}),s.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(e){if(typeof e!=`number`||e<0||o(e))throw RangeError(`The value of "n" is out of range. It must be a non-negative number. Received `+e+`.`);return this._maxListeners=e,this};function u(e){return e._maxListeners===void 0?s.defaultMaxListeners:e._maxListeners}s.prototype.getMaxListeners=function(){return u(this)},s.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var i=e===`error`,a=this._events;if(a!==void 0)i&&=a.error===void 0;else if(!i)return!1;if(i){var o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var s=Error(`Unhandled error.`+(o?` (`+o.message+`)`:``));throw s.context=o,s}var c=a[e];if(c===void 0)return!1;if(typeof c==`function`)r(c,this,t);else for(var l=c.length,u=g(c,l),n=0;n<l;++n)r(u[n],this,t);return!0};function d(e,t,n,r){var i,o,s;if(l(n),o=e._events,o===void 0?(o=e._events=Object.create(null),e._eventsCount=0):(o.newListener!==void 0&&(e.emit(`newListener`,t,n.listener?n.listener:n),o=e._events),s=o[t]),s===void 0)s=o[t]=n,++e._eventsCount;else if(typeof s==`function`?s=o[t]=r?[n,s]:[s,n]:r?s.unshift(n):s.push(n),i=u(e),i>0&&s.length>i&&!s.warned){s.warned=!0;var c=Error(`Possible EventEmitter memory leak detected. `+s.length+` `+String(t)+` listeners added. Use emitter.setMaxListeners() to increase limit`);c.name=`MaxListenersExceededWarning`,c.emitter=e,c.type=t,c.count=s.length,a(c)}return e}s.prototype.addListener=function(e,t){return d(this,e,t,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(e,t){return d(this,e,t,!0)};function f(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function p(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=f.bind(r);return i.listener=n,r.wrapFn=i,i}s.prototype.once=function(e,t){return l(t),this.on(e,p(this,e,t)),this},s.prototype.prependOnceListener=function(e,t){return l(t),this.prependListener(e,p(this,e,t)),this},s.prototype.removeListener=function(e,t){var n,r,i,a,o;if(l(t),r=this._events,r===void 0||(n=r[e],n===void 0))return this;if(n===t||n.listener===t)--this._eventsCount===0?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit(`removeListener`,e,n.listener||t));else if(typeof n!=`function`){for(i=-1,a=n.length-1;a>=0;a--)if(n[a]===t||n[a].listener===t){o=n[a].listener,i=a;break}if(i<0)return this;i===0?n.shift():_(n,i),n.length===1&&(r[e]=n[0]),r.removeListener!==void 0&&this.emit(`removeListener`,e,o||t)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(e){var t,n=this._events,r;if(n===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[e]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[e]),this;if(arguments.length===0){var i=Object.keys(n),a;for(r=0;r<i.length;++r)a=i[r],a!==`removeListener`&&this.removeAllListeners(a);return this.removeAllListeners(`removeListener`),this._events=Object.create(null),this._eventsCount=0,this}if(t=n[e],typeof t==`function`)this.removeListener(e,t);else if(t!==void 0)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this};function m(e,t,n){var r=e._events;if(r===void 0)return[];var i=r[t];return i===void 0?[]:typeof i==`function`?n?[i.listener||i]:[i]:n?v(i):g(i,i.length)}s.prototype.listeners=function(e){return m(this,e,!0)},s.prototype.rawListeners=function(e){return m(this,e,!1)},s.listenerCount=function(e,t){return typeof e.listenerCount==`function`?e.listenerCount(t):h.call(e,t)},s.prototype.listenerCount=h;function h(e){var t=this._events;if(t!==void 0){var n=t[e];if(typeof n==`function`)return 1;if(n!==void 0)return n.length}return 0}s.prototype.eventNames=function(){return this._eventsCount>0?i(this._events):[]};function g(e,t){for(var n=Array(t),r=0;r<t;++r)n[r]=e[r];return n}function _(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}function v(e){for(var t=Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}function y(e,t){return new Promise(function(n,r){function i(n){e.removeListener(t,a),r(n)}function a(){typeof e.removeListener==`function`&&e.removeListener(`error`,i),n([].slice.call(arguments))}x(e,t,a,{once:!0}),t!==`error`&&b(e,i,{once:!0})})}function b(e,t,n){typeof e.on==`function`&&x(e,`error`,t,n)}function x(e,t,n,r){if(typeof e.on==`function`)r.once?e.once(t,n):e.on(t,n);else if(typeof e.addEventListener==`function`)e.addEventListener(t,function i(a){r.once&&e.removeEventListener(t,i),n(a)});else throw TypeError(`The "emitter" argument must be of type EventEmitter. Received type `+typeof e)}}))();function r(){let e=arguments[0];for(let t=1,n=arguments.length;t<n;t++)if(arguments[t])for(let n in arguments[t])e[n]=arguments[t][n];return e}var i=r;typeof Object.assign==`function`&&(i=Object.assign);function a(e,t,n,r){let i=e._nodes.get(t),a=null;return i&&(a=r===`mixed`?i.out&&i.out[n]||i.undirected&&i.undirected[n]:r===`directed`?i.out&&i.out[n]:i.undirected&&i.undirected[n]),a}function o(e){return typeof e==`object`&&!!e}function s(e){let t;for(t in e)return!1;return!0}function c(e,t,n){Object.defineProperty(e,t,{enumerable:!1,configurable:!1,writable:!0,value:n})}function l(e,t,n){let r={enumerable:!0,configurable:!0};typeof n==`function`?r.get=n:(r.value=n,r.writable=!1),Object.defineProperty(e,t,r)}function u(e){return!(!o(e)||e.attributes&&!Array.isArray(e.attributes))}function d(){let e=Math.floor(Math.random()*256)&255;return()=>e++}function f(){let e=arguments,t=null,n=-1;return{[Symbol.iterator](){return this},next(){let r=null;do{if(t===null){if(n++,n>=e.length)return{done:!0};t=e[n][Symbol.iterator]()}if(r=t.next(),r.done){t=null;continue}break}while(!0);return r}}}function p(){return{[Symbol.iterator](){return this},next(){return{done:!0}}}}var m=class extends Error{constructor(e){super(),this.name=`GraphError`,this.message=e}},h=class e extends m{constructor(t){super(t),this.name=`InvalidArgumentsGraphError`,typeof Error.captureStackTrace==`function`&&Error.captureStackTrace(this,e.prototype.constructor)}},g=class e extends m{constructor(t){super(t),this.name=`NotFoundGraphError`,typeof Error.captureStackTrace==`function`&&Error.captureStackTrace(this,e.prototype.constructor)}},_=class e extends m{constructor(t){super(t),this.name=`UsageGraphError`,typeof Error.captureStackTrace==`function`&&Error.captureStackTrace(this,e.prototype.constructor)}};function v(e,t){this.key=e,this.attributes=t,this.clear()}v.prototype.clear=function(){this.inDegree=0,this.outDegree=0,this.undirectedDegree=0,this.undirectedLoops=0,this.directedLoops=0,this.in={},this.out={},this.undirected={}};function y(e,t){this.key=e,this.attributes=t,this.clear()}y.prototype.clear=function(){this.inDegree=0,this.outDegree=0,this.directedLoops=0,this.in={},this.out={}};function b(e,t){this.key=e,this.attributes=t,this.clear()}b.prototype.clear=function(){this.undirectedDegree=0,this.undirectedLoops=0,this.undirected={}};function x(e,t,n,r,i){this.key=t,this.attributes=i,this.undirected=e,this.source=n,this.target=r}x.prototype.attach=function(){let e=`out`,t=`in`;this.undirected&&(e=t=`undirected`);let n=this.source.key,r=this.target.key;this.source[e][r]=this,!(this.undirected&&n===r)&&(this.target[t][n]=this)},x.prototype.attachMulti=function(){let e=`out`,t=`in`,n=this.source.key,r=this.target.key;this.undirected&&(e=t=`undirected`);let i=this.source[e],a=i[r];if(a===void 0){i[r]=this,this.undirected&&n===r||(this.target[t][n]=this);return}a.previous=this,this.next=a,i[r]=this,this.target[t][n]=this},x.prototype.detach=function(){let e=this.source.key,t=this.target.key,n=`out`,r=`in`;this.undirected&&(n=r=`undirected`),delete this.source[n][t],delete this.target[r][e]},x.prototype.detachMulti=function(){let e=this.source.key,t=this.target.key,n=`out`,r=`in`;this.undirected&&(n=r=`undirected`),this.previous===void 0?this.next===void 0?(delete this.source[n][t],delete this.target[r][e]):(this.next.previous=void 0,this.source[n][t]=this.next,this.target[r][e]=this.next):(this.previous.next=this.next,this.next!==void 0&&(this.next.previous=this.previous))};var S=0,C=1,w=2,T=3;function E(e,t,n,r,i,a,o){let s,c,l,u;if(r=``+r,n===S){if(s=e._nodes.get(r),!s)throw new g(`Graph.${t}: could not find the "${r}" node in the graph.`);l=i,u=a}else if(n===T){if(i=``+i,c=e._edges.get(i),!c)throw new g(`Graph.${t}: could not find the "${i}" edge in the graph.`);let n=c.source.key,d=c.target.key;if(r===n)s=c.target;else if(r===d)s=c.source;else throw new g(`Graph.${t}: the "${r}" node is not attached to the "${i}" edge (${n}, ${d}).`);l=a,u=o}else{if(c=e._edges.get(r),!c)throw new g(`Graph.${t}: could not find the "${r}" edge in the graph.`);s=n===C?c.source:c.target,l=i,u=a}return[s,l,u]}function D(e,t,n){e.prototype[t]=function(e,r,i){let[a,o]=E(this,t,n,e,r,i);return a.attributes[o]}}function O(e,t,n){e.prototype[t]=function(e,r){let[i]=E(this,t,n,e,r);return i.attributes}}function ee(e,t,n){e.prototype[t]=function(e,r,i){let[a,o]=E(this,t,n,e,r,i);return a.attributes.hasOwnProperty(o)}}function te(e,t,n){e.prototype[t]=function(e,r,i,a){let[o,s,c]=E(this,t,n,e,r,i,a);return o.attributes[s]=c,this.emit(`nodeAttributesUpdated`,{key:o.key,type:`set`,attributes:o.attributes,name:s}),this}}function k(e,t,n){e.prototype[t]=function(e,r,i,a){let[o,s,c]=E(this,t,n,e,r,i,a);if(typeof c!=`function`)throw new h(`Graph.${t}: updater should be a function.`);let l=o.attributes;return l[s]=c(l[s]),this.emit(`nodeAttributesUpdated`,{key:o.key,type:`set`,attributes:o.attributes,name:s}),this}}function A(e,t,n){e.prototype[t]=function(e,r,i){let[a,o]=E(this,t,n,e,r,i);return delete a.attributes[o],this.emit(`nodeAttributesUpdated`,{key:a.key,type:`remove`,attributes:a.attributes,name:o}),this}}function j(e,t,n){e.prototype[t]=function(e,r,i){let[a,s]=E(this,t,n,e,r,i);if(!o(s))throw new h(`Graph.${t}: provided attributes are not a plain object.`);return a.attributes=s,this.emit(`nodeAttributesUpdated`,{key:a.key,type:`replace`,attributes:a.attributes}),this}}function M(e,t,n){e.prototype[t]=function(e,r,a){let[s,c]=E(this,t,n,e,r,a);if(!o(c))throw new h(`Graph.${t}: provided attributes are not a plain object.`);return i(s.attributes,c),this.emit(`nodeAttributesUpdated`,{key:s.key,type:`merge`,attributes:s.attributes,data:c}),this}}function N(e,t,n){e.prototype[t]=function(e,r,i){let[a,o]=E(this,t,n,e,r,i);if(typeof o!=`function`)throw new h(`Graph.${t}: provided updater is not a function.`);return a.attributes=o(a.attributes),this.emit(`nodeAttributesUpdated`,{key:a.key,type:`update`,attributes:a.attributes}),this}}var ne=[{name:e=>`get${e}Attribute`,attacher:D},{name:e=>`get${e}Attributes`,attacher:O},{name:e=>`has${e}Attribute`,attacher:ee},{name:e=>`set${e}Attribute`,attacher:te},{name:e=>`update${e}Attribute`,attacher:k},{name:e=>`remove${e}Attribute`,attacher:A},{name:e=>`replace${e}Attributes`,attacher:j},{name:e=>`merge${e}Attributes`,attacher:M},{name:e=>`update${e}Attributes`,attacher:N}];function P(e){ne.forEach(function({name:t,attacher:n}){n(e,t(`Node`),S),n(e,t(`Source`),C),n(e,t(`Target`),w),n(e,t(`Opposite`),T)})}function F(e,t,n){e.prototype[t]=function(e,r){let i;if(this.type!==`mixed`&&n!==`mixed`&&n!==this.type)throw new _(`Graph.${t}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new _(`Graph.${t}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);let o=``+e,s=``+r;if(r=arguments[2],i=a(this,o,s,n),!i)throw new g(`Graph.${t}: could not find an edge for the given path ("${o}" - "${s}").`)}else{if(n!==`mixed`)throw new _(`Graph.${t}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=``+e,i=this._edges.get(e),!i)throw new g(`Graph.${t}: could not find the "${e}" edge in the graph.`)}return i.attributes[r]}}function re(e,t,n){e.prototype[t]=function(e){let r;if(this.type!==`mixed`&&n!==`mixed`&&n!==this.type)throw new _(`Graph.${t}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>1){if(this.multi)throw new _(`Graph.${t}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);let i=``+e,o=``+arguments[1];if(r=a(this,i,o,n),!r)throw new g(`Graph.${t}: could not find an edge for the given path ("${i}" - "${o}").`)}else{if(n!==`mixed`)throw new _(`Graph.${t}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=``+e,r=this._edges.get(e),!r)throw new g(`Graph.${t}: could not find the "${e}" edge in the graph.`)}return r.attributes}}function I(e,t,n){e.prototype[t]=function(e,r){let i;if(this.type!==`mixed`&&n!==`mixed`&&n!==this.type)throw new _(`Graph.${t}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new _(`Graph.${t}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);let o=``+e,s=``+r;if(r=arguments[2],i=a(this,o,s,n),!i)throw new g(`Graph.${t}: could not find an edge for the given path ("${o}" - "${s}").`)}else{if(n!==`mixed`)throw new _(`Graph.${t}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=``+e,i=this._edges.get(e),!i)throw new g(`Graph.${t}: could not find the "${e}" edge in the graph.`)}return i.attributes.hasOwnProperty(r)}}function ie(e,t,n){e.prototype[t]=function(e,r,i){let o;if(this.type!==`mixed`&&n!==`mixed`&&n!==this.type)throw new _(`Graph.${t}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>3){if(this.multi)throw new _(`Graph.${t}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);let s=``+e,c=``+r;if(r=arguments[2],i=arguments[3],o=a(this,s,c,n),!o)throw new g(`Graph.${t}: could not find an edge for the given path ("${s}" - "${c}").`)}else{if(n!==`mixed`)throw new _(`Graph.${t}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=``+e,o=this._edges.get(e),!o)throw new g(`Graph.${t}: could not find the "${e}" edge in the graph.`)}return o.attributes[r]=i,this.emit(`edgeAttributesUpdated`,{key:o.key,type:`set`,attributes:o.attributes,name:r}),this}}function ae(e,t,n){e.prototype[t]=function(e,r,i){let o;if(this.type!==`mixed`&&n!==`mixed`&&n!==this.type)throw new _(`Graph.${t}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>3){if(this.multi)throw new _(`Graph.${t}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);let s=``+e,c=``+r;if(r=arguments[2],i=arguments[3],o=a(this,s,c,n),!o)throw new g(`Graph.${t}: could not find an edge for the given path ("${s}" - "${c}").`)}else{if(n!==`mixed`)throw new _(`Graph.${t}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=``+e,o=this._edges.get(e),!o)throw new g(`Graph.${t}: could not find the "${e}" edge in the graph.`)}if(typeof i!=`function`)throw new h(`Graph.${t}: updater should be a function.`);return o.attributes[r]=i(o.attributes[r]),this.emit(`edgeAttributesUpdated`,{key:o.key,type:`set`,attributes:o.attributes,name:r}),this}}function oe(e,t,n){e.prototype[t]=function(e,r){let i;if(this.type!==`mixed`&&n!==`mixed`&&n!==this.type)throw new _(`Graph.${t}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new _(`Graph.${t}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);let o=``+e,s=``+r;if(r=arguments[2],i=a(this,o,s,n),!i)throw new g(`Graph.${t}: could not find an edge for the given path ("${o}" - "${s}").`)}else{if(n!==`mixed`)throw new _(`Graph.${t}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=``+e,i=this._edges.get(e),!i)throw new g(`Graph.${t}: could not find the "${e}" edge in the graph.`)}return delete i.attributes[r],this.emit(`edgeAttributesUpdated`,{key:i.key,type:`remove`,attributes:i.attributes,name:r}),this}}function se(e,t,n){e.prototype[t]=function(e,r){let i;if(this.type!==`mixed`&&n!==`mixed`&&n!==this.type)throw new _(`Graph.${t}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new _(`Graph.${t}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);let o=``+e,s=``+r;if(r=arguments[2],i=a(this,o,s,n),!i)throw new g(`Graph.${t}: could not find an edge for the given path ("${o}" - "${s}").`)}else{if(n!==`mixed`)throw new _(`Graph.${t}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=``+e,i=this._edges.get(e),!i)throw new g(`Graph.${t}: could not find the "${e}" edge in the graph.`)}if(!o(r))throw new h(`Graph.${t}: provided attributes are not a plain object.`);return i.attributes=r,this.emit(`edgeAttributesUpdated`,{key:i.key,type:`replace`,attributes:i.attributes}),this}}function L(e,t,n){e.prototype[t]=function(e,r){let s;if(this.type!==`mixed`&&n!==`mixed`&&n!==this.type)throw new _(`Graph.${t}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new _(`Graph.${t}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);let i=``+e,o=``+r;if(r=arguments[2],s=a(this,i,o,n),!s)throw new g(`Graph.${t}: could not find an edge for the given path ("${i}" - "${o}").`)}else{if(n!==`mixed`)throw new _(`Graph.${t}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=``+e,s=this._edges.get(e),!s)throw new g(`Graph.${t}: could not find the "${e}" edge in the graph.`)}if(!o(r))throw new h(`Graph.${t}: provided attributes are not a plain object.`);return i(s.attributes,r),this.emit(`edgeAttributesUpdated`,{key:s.key,type:`merge`,attributes:s.attributes,data:r}),this}}function R(e,t,n){e.prototype[t]=function(e,r){let i;if(this.type!==`mixed`&&n!==`mixed`&&n!==this.type)throw new _(`Graph.${t}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new _(`Graph.${t}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);let o=``+e,s=``+r;if(r=arguments[2],i=a(this,o,s,n),!i)throw new g(`Graph.${t}: could not find an edge for the given path ("${o}" - "${s}").`)}else{if(n!==`mixed`)throw new _(`Graph.${t}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(e=``+e,i=this._edges.get(e),!i)throw new g(`Graph.${t}: could not find the "${e}" edge in the graph.`)}if(typeof r!=`function`)throw new h(`Graph.${t}: provided updater is not a function.`);return i.attributes=r(i.attributes),this.emit(`edgeAttributesUpdated`,{key:i.key,type:`update`,attributes:i.attributes}),this}}var z=[{name:e=>`get${e}Attribute`,attacher:F},{name:e=>`get${e}Attributes`,attacher:re},{name:e=>`has${e}Attribute`,attacher:I},{name:e=>`set${e}Attribute`,attacher:ie},{name:e=>`update${e}Attribute`,attacher:ae},{name:e=>`remove${e}Attribute`,attacher:oe},{name:e=>`replace${e}Attributes`,attacher:se},{name:e=>`merge${e}Attributes`,attacher:L},{name:e=>`update${e}Attributes`,attacher:R}];function B(e){z.forEach(function({name:t,attacher:n}){n(e,t(`Edge`),`mixed`),n(e,t(`DirectedEdge`),`directed`),n(e,t(`UndirectedEdge`),`undirected`)})}var V=[{name:`edges`,type:`mixed`},{name:`inEdges`,type:`directed`,direction:`in`},{name:`outEdges`,type:`directed`,direction:`out`},{name:`inboundEdges`,type:`mixed`,direction:`in`},{name:`outboundEdges`,type:`mixed`,direction:`out`},{name:`directedEdges`,type:`directed`},{name:`undirectedEdges`,type:`undirected`}];function H(e,t,n,r){let i=!1;for(let a in t){if(a===r)continue;let o=t[a];if(i=n(o.key,o.attributes,o.source.key,o.target.key,o.source.attributes,o.target.attributes,o.undirected),e&&i)return o.key}}function U(e,t,n,r){let i,a,o,s=!1;for(let c in t)if(c!==r){i=t[c];do{if(a=i.source,o=i.target,s=n(i.key,i.attributes,a.key,o.key,a.attributes,o.attributes,i.undirected),e&&s)return i.key;i=i.next}while(i!==void 0)}}function W(e,t){let n=Object.keys(e),r=n.length,i,a=0;return{[Symbol.iterator](){return this},next(){do if(i)i=i.next;else{if(a>=r)return{done:!0};let o=n[a++];if(o===t){i=void 0;continue}i=e[o]}while(!i);return{done:!1,value:{edge:i.key,attributes:i.attributes,source:i.source.key,target:i.target.key,sourceAttributes:i.source.attributes,targetAttributes:i.target.attributes,undirected:i.undirected}}}}}function ce(e,t,n,r){let i=t[n];if(!i)return;let a=i.source,o=i.target;if(r(i.key,i.attributes,a.key,o.key,a.attributes,o.attributes,i.undirected)&&e)return i.key}function le(e,t,n,r){let i=t[n];if(!i)return;let a=!1;do{if(a=r(i.key,i.attributes,i.source.key,i.target.key,i.source.attributes,i.target.attributes,i.undirected),e&&a)return i.key;i=i.next}while(i!==void 0)}function ue(e,t){let n=e[t];if(n.next!==void 0)return{[Symbol.iterator](){return this},next(){if(!n)return{done:!0};let e={edge:n.key,attributes:n.attributes,source:n.source.key,target:n.target.key,sourceAttributes:n.source.attributes,targetAttributes:n.target.attributes,undirected:n.undirected};return n=n.next,{done:!1,value:e}}};let r=!1;return{[Symbol.iterator](){return this},next(){return r===!0?{done:!0}:(r=!0,{done:!1,value:{edge:n.key,attributes:n.attributes,source:n.source.key,target:n.target.key,sourceAttributes:n.source.attributes,targetAttributes:n.target.attributes,undirected:n.undirected}})}}}function de(e,t){if(e.size===0)return[];if(t===`mixed`||t===e.type)return Array.from(e._edges.keys());let n=t===`undirected`?e.undirectedSize:e.directedSize,r=Array(n),i=t===`undirected`,a=e._edges.values(),o=0,s,c;for(;s=a.next(),s.done!==!0;)c=s.value,c.undirected===i&&(r[o++]=c.key);return r}function fe(e,t,n,r){if(t.size===0)return;let i=n!==`mixed`&&n!==t.type,a=n===`undirected`,o,s,c=!1,l=t._edges.values();for(;o=l.next(),o.done!==!0;){if(s=o.value,i&&s.undirected!==a)continue;let{key:t,attributes:n,source:l,target:u}=s;if(c=r(t,n,l.key,u.key,l.attributes,u.attributes,s.undirected),e&&c)return t}}function pe(e,t){if(e.size===0)return p();let n=t!==`mixed`&&t!==e.type,r=t===`undirected`,i=e._edges.values();return{[Symbol.iterator](){return this},next(){let e,t;for(;;){if(e=i.next(),e.done)return e;if(t=e.value,!(n&&t.undirected!==r))break}return{value:{edge:t.key,attributes:t.attributes,source:t.source.key,target:t.target.key,sourceAttributes:t.source.attributes,targetAttributes:t.target.attributes,undirected:t.undirected},done:!1}}}}function me(e,t,n,r,i,a){let o=t?U:H,s;if(n!==`undirected`&&(r!==`out`&&(s=o(e,i.in,a),e&&s)||r!==`in`&&(s=o(e,i.out,a,r?void 0:i.key),e&&s))||n!==`directed`&&(s=o(e,i.undirected,a),e&&s))return s}function he(e,t,n,r){let i=[];return me(!1,e,t,n,r,function(e){i.push(e)}),i}function ge(e,t,n){let r=p();return e!==`undirected`&&(t!==`out`&&n.in!==void 0&&(r=f(r,W(n.in))),t!==`in`&&n.out!==void 0&&(r=f(r,W(n.out,t?void 0:n.key)))),e!==`directed`&&n.undirected!==void 0&&(r=f(r,W(n.undirected))),r}function _e(e,t,n,r,i,a,o){let s=n?le:ce,c;if(t!==`undirected`&&(i.in!==void 0&&r!==`out`&&(c=s(e,i.in,a,o),e&&c)||i.out!==void 0&&r!==`in`&&(r||i.key!==a)&&(c=s(e,i.out,a,o),e&&c))||t!==`directed`&&i.undirected!==void 0&&(c=s(e,i.undirected,a,o),e&&c))return c}function ve(e,t,n,r,i){let a=[];return _e(!1,e,t,n,r,i,function(e){a.push(e)}),a}function ye(e,t,n,r){let i=p();return e!==`undirected`&&(n.in!==void 0&&t!==`out`&&r in n.in&&(i=f(i,ue(n.in,r))),n.out!==void 0&&t!==`in`&&r in n.out&&(t||n.key!==r)&&(i=f(i,ue(n.out,r)))),e!==`directed`&&n.undirected!==void 0&&r in n.undirected&&(i=f(i,ue(n.undirected,r))),i}function be(e,t){let{name:n,type:r,direction:i}=t;e.prototype[n]=function(e,t){if(r!==`mixed`&&this.type!==`mixed`&&r!==this.type)return[];if(!arguments.length)return de(this,r);if(arguments.length===1){e=``+e;let t=this._nodes.get(e);if(t===void 0)throw new g(`Graph.${n}: could not find the "${e}" node in the graph.`);return he(this.multi,r===`mixed`?this.type:r,i,t)}if(arguments.length===2){e=``+e,t=``+t;let a=this._nodes.get(e);if(!a)throw new g(`Graph.${n}: could not find the "${e}" source node in the graph.`);if(!this._nodes.has(t))throw new g(`Graph.${n}: could not find the "${t}" target node in the graph.`);return ve(r,this.multi,i,a,t)}throw new h(`Graph.${n}: too many arguments (expecting 0, 1 or 2 and got ${arguments.length}).`)}}function xe(e,t){let{name:n,type:r,direction:i}=t,a=`forEach`+n[0].toUpperCase()+n.slice(1,-1);e.prototype[a]=function(e,t,n){if(!(r!==`mixed`&&this.type!==`mixed`&&r!==this.type)){if(arguments.length===1)return n=e,fe(!1,this,r,n);if(arguments.length===2){e=``+e,n=t;let o=this._nodes.get(e);if(o===void 0)throw new g(`Graph.${a}: could not find the "${e}" node in the graph.`);return me(!1,this.multi,r===`mixed`?this.type:r,i,o,n)}if(arguments.length===3){e=``+e,t=``+t;let o=this._nodes.get(e);if(!o)throw new g(`Graph.${a}: could not find the "${e}" source node in the graph.`);if(!this._nodes.has(t))throw new g(`Graph.${a}: could not find the "${t}" target node in the graph.`);return _e(!1,r,this.multi,i,o,t,n)}throw new h(`Graph.${a}: too many arguments (expecting 1, 2 or 3 and got ${arguments.length}).`)}};let o=`map`+n[0].toUpperCase()+n.slice(1);e.prototype[o]=function(){let e=Array.prototype.slice.call(arguments),t=e.pop(),n;if(e.length===0){let i=0;r!==`directed`&&(i+=this.undirectedSize),r!==`undirected`&&(i+=this.directedSize),n=Array(i);let a=0;e.push((e,r,i,o,s,c,l)=>{n[a++]=t(e,r,i,o,s,c,l)})}else n=[],e.push((e,r,i,a,o,s,c)=>{n.push(t(e,r,i,a,o,s,c))});return this[a].apply(this,e),n};let s=`filter`+n[0].toUpperCase()+n.slice(1);e.prototype[s]=function(){let e=Array.prototype.slice.call(arguments),t=e.pop(),n=[];return e.push((e,r,i,a,o,s,c)=>{t(e,r,i,a,o,s,c)&&n.push(e)}),this[a].apply(this,e),n};let c=`reduce`+n[0].toUpperCase()+n.slice(1);e.prototype[c]=function(){let e=Array.prototype.slice.call(arguments);if(e.length<2||e.length>4)throw new h(`Graph.${c}: invalid number of arguments (expecting 2, 3 or 4 and got ${e.length}).`);if(typeof e[e.length-1]==`function`&&typeof e[e.length-2]!=`function`)throw new h(`Graph.${c}: missing initial value. You must provide it because the callback takes more than one argument and we cannot infer the initial value from the first iteration, as you could with a simple array.`);let t,n;e.length===2?(t=e[0],n=e[1],e=[]):e.length===3?(t=e[1],n=e[2],e=[e[0]]):e.length===4&&(t=e[2],n=e[3],e=[e[0],e[1]]);let r=n;return e.push((e,n,i,a,o,s,c)=>{r=t(r,e,n,i,a,o,s,c)}),this[a].apply(this,e),r}}function Se(e,t){let{name:n,type:r,direction:i}=t,a=`find`+n[0].toUpperCase()+n.slice(1,-1);e.prototype[a]=function(e,t,n){if(r!==`mixed`&&this.type!==`mixed`&&r!==this.type)return!1;if(arguments.length===1)return n=e,fe(!0,this,r,n);if(arguments.length===2){e=``+e,n=t;let o=this._nodes.get(e);if(o===void 0)throw new g(`Graph.${a}: could not find the "${e}" node in the graph.`);return me(!0,this.multi,r===`mixed`?this.type:r,i,o,n)}if(arguments.length===3){e=``+e,t=``+t;let o=this._nodes.get(e);if(!o)throw new g(`Graph.${a}: could not find the "${e}" source node in the graph.`);if(!this._nodes.has(t))throw new g(`Graph.${a}: could not find the "${t}" target node in the graph.`);return _e(!0,r,this.multi,i,o,t,n)}throw new h(`Graph.${a}: too many arguments (expecting 1, 2 or 3 and got ${arguments.length}).`)};let o=`some`+n[0].toUpperCase()+n.slice(1,-1);e.prototype[o]=function(){let e=Array.prototype.slice.call(arguments),t=e.pop();return e.push((e,n,r,i,a,o,s)=>t(e,n,r,i,a,o,s)),!!this[a].apply(this,e)};let s=`every`+n[0].toUpperCase()+n.slice(1,-1);e.prototype[s]=function(){let e=Array.prototype.slice.call(arguments),t=e.pop();return e.push((e,n,r,i,a,o,s)=>!t(e,n,r,i,a,o,s)),!this[a].apply(this,e)}}function Ce(e,t){let{name:n,type:r,direction:i}=t,a=n.slice(0,-1)+`Entries`;e.prototype[a]=function(e,t){if(r!==`mixed`&&this.type!==`mixed`&&r!==this.type)return p();if(!arguments.length)return pe(this,r);if(arguments.length===1){e=``+e;let t=this._nodes.get(e);if(!t)throw new g(`Graph.${a}: could not find the "${e}" node in the graph.`);return ge(r,i,t)}if(arguments.length===2){e=``+e,t=``+t;let n=this._nodes.get(e);if(!n)throw new g(`Graph.${a}: could not find the "${e}" source node in the graph.`);if(!this._nodes.has(t))throw new g(`Graph.${a}: could not find the "${t}" target node in the graph.`);return ye(r,i,n,t)}throw new h(`Graph.${a}: too many arguments (expecting 0, 1 or 2 and got ${arguments.length}).`)}}function we(e){V.forEach(t=>{be(e,t),xe(e,t),Se(e,t),Ce(e,t)})}var Te=[{name:`neighbors`,type:`mixed`},{name:`inNeighbors`,type:`directed`,direction:`in`},{name:`outNeighbors`,type:`directed`,direction:`out`},{name:`inboundNeighbors`,type:`mixed`,direction:`in`},{name:`outboundNeighbors`,type:`mixed`,direction:`out`},{name:`directedNeighbors`,type:`directed`},{name:`undirectedNeighbors`,type:`undirected`}];function Ee(){this.A=null,this.B=null}Ee.prototype.wrap=function(e){this.A===null?this.A=e:this.B===null&&(this.B=e)},Ee.prototype.has=function(e){return this.A!==null&&e in this.A||this.B!==null&&e in this.B};function De(e,t,n,r,i){for(let a in r){let o=r[a],s=o.source,c=o.target,l=s===n?c:s;if(t&&t.has(l.key))continue;let u=i(l.key,l.attributes);if(e&&u)return l.key}}function Oe(e,t,n,r,i){if(t!==`mixed`){if(t===`undirected`)return De(e,null,r,r.undirected,i);if(typeof n==`string`)return De(e,null,r,r[n],i)}let a=new Ee,o;if(t!==`undirected`){if(n!==`out`){if(o=De(e,null,r,r.in,i),e&&o)return o;a.wrap(r.in)}if(n!==`in`){if(o=De(e,a,r,r.out,i),e&&o)return o;a.wrap(r.out)}}if(t!==`directed`&&(o=De(e,a,r,r.undirected,i),e&&o))return o}function ke(e,t,n){if(e!==`mixed`){if(e===`undirected`)return Object.keys(n.undirected);if(typeof t==`string`)return Object.keys(n[t])}let r=[];return Oe(!1,e,t,n,function(e){r.push(e)}),r}function Ae(e,t,n){let r=Object.keys(n),i=r.length,a=0;return{[Symbol.iterator](){return this},next(){let o=null;do{if(a>=i)return e&&e.wrap(n),{done:!0};let s=n[r[a++]],c=s.source,l=s.target;if(o=c===t?l:c,e&&e.has(o.key)){o=null;continue}}while(o===null);return{done:!1,value:{neighbor:o.key,attributes:o.attributes}}}}}function je(e,t,n){if(e!==`mixed`){if(e===`undirected`)return Ae(null,n,n.undirected);if(typeof t==`string`)return Ae(null,n,n[t])}let r=p(),i=new Ee;return e!==`undirected`&&(t!==`out`&&(r=f(r,Ae(i,n,n.in))),t!==`in`&&(r=f(r,Ae(i,n,n.out)))),e!==`directed`&&(r=f(r,Ae(i,n,n.undirected))),r}function Me(e,t){let{name:n,type:r,direction:i}=t;e.prototype[n]=function(e){if(r!==`mixed`&&this.type!==`mixed`&&r!==this.type)return[];e=``+e;let t=this._nodes.get(e);if(t===void 0)throw new g(`Graph.${n}: could not find the "${e}" node in the graph.`);return ke(r===`mixed`?this.type:r,i,t)}}function Ne(e,t){let{name:n,type:r,direction:i}=t,a=`forEach`+n[0].toUpperCase()+n.slice(1,-1);e.prototype[a]=function(e,t){if(r!==`mixed`&&this.type!==`mixed`&&r!==this.type)return;e=``+e;let n=this._nodes.get(e);if(n===void 0)throw new g(`Graph.${a}: could not find the "${e}" node in the graph.`);Oe(!1,r===`mixed`?this.type:r,i,n,t)};let o=`map`+n[0].toUpperCase()+n.slice(1);e.prototype[o]=function(e,t){let n=[];return this[a](e,(e,r)=>{n.push(t(e,r))}),n};let s=`filter`+n[0].toUpperCase()+n.slice(1);e.prototype[s]=function(e,t){let n=[];return this[a](e,(e,r)=>{t(e,r)&&n.push(e)}),n};let c=`reduce`+n[0].toUpperCase()+n.slice(1);e.prototype[c]=function(e,t,n){if(arguments.length<3)throw new h(`Graph.${c}: missing initial value. You must provide it because the callback takes more than one argument and we cannot infer the initial value from the first iteration, as you could with a simple array.`);let r=n;return this[a](e,(e,n)=>{r=t(r,e,n)}),r}}function Pe(e,t){let{name:n,type:r,direction:i}=t,a=n[0].toUpperCase()+n.slice(1,-1),o=`find`+a;e.prototype[o]=function(e,t){if(r!==`mixed`&&this.type!==`mixed`&&r!==this.type)return;e=``+e;let n=this._nodes.get(e);if(n===void 0)throw new g(`Graph.${o}: could not find the "${e}" node in the graph.`);return Oe(!0,r===`mixed`?this.type:r,i,n,t)};let s=`some`+a;e.prototype[s]=function(e,t){return!!this[o](e,t)};let c=`every`+a;e.prototype[c]=function(e,t){return!this[o](e,(e,n)=>!t(e,n))}}function Fe(e,t){let{name:n,type:r,direction:i}=t,a=n.slice(0,-1)+`Entries`;e.prototype[a]=function(e){if(r!==`mixed`&&this.type!==`mixed`&&r!==this.type)return p();e=``+e;let t=this._nodes.get(e);if(t===void 0)throw new g(`Graph.${a}: could not find the "${e}" node in the graph.`);return je(r===`mixed`?this.type:r,i,t)}}function Ie(e){Te.forEach(t=>{Me(e,t),Ne(e,t),Pe(e,t),Fe(e,t)})}function Le(e,t,n,r,i){let a=r._nodes.values(),o=r.type,s,c,l,u,d,f,p;for(;s=a.next(),s.done!==!0;){let r=!1;if(c=s.value,o!==`undirected`)for(l in u=c.out,u){d=u[l];do{if(f=d.target,r=!0,p=i(c.key,f.key,c.attributes,f.attributes,d.key,d.attributes,d.undirected),e&&p)return d;d=d.next}while(d)}if(o!==`directed`){for(l in u=c.undirected,u)if(!(t&&c.key>l)){d=u[l];do{if(f=d.target,f.key!==l&&(f=d.source),r=!0,p=i(c.key,f.key,c.attributes,f.attributes,d.key,d.attributes,d.undirected),e&&p)return d;d=d.next}while(d)}}if(n&&!r&&(p=i(c.key,null,c.attributes,null,null,null,null),e&&p))return null}}function Re(e,t){let n={key:e};return s(t.attributes)||(n.attributes=i({},t.attributes)),n}function ze(e,t,n){let r={key:t,source:n.source.key,target:n.target.key};return s(n.attributes)||(r.attributes=i({},n.attributes)),e===`mixed`&&n.undirected&&(r.undirected=!0),r}function Be(e){if(!o(e))throw new h(`Graph.import: invalid serialized node. A serialized node should be a plain object with at least a "key" property.`);if(!(`key`in e))throw new h(`Graph.import: serialized node is missing its key.`);if(`attributes`in e&&(!o(e.attributes)||e.attributes===null))throw new h(`Graph.import: invalid attributes. Attributes should be a plain object, null or omitted.`)}function Ve(e){if(!o(e))throw new h(`Graph.import: invalid serialized edge. A serialized edge should be a plain object with at least a "source" & "target" property.`);if(!(`source`in e))throw new h(`Graph.import: serialized edge is missing its source.`);if(!(`target`in e))throw new h(`Graph.import: serialized edge is missing its target.`);if(`attributes`in e&&(!o(e.attributes)||e.attributes===null))throw new h(`Graph.import: invalid attributes. Attributes should be a plain object, null or omitted.`);if(`undirected`in e&&typeof e.undirected!=`boolean`)throw new h(`Graph.import: invalid undirectedness information. Undirected should be boolean or omitted.`)}var He=d(),Ue=new Set([`directed`,`undirected`,`mixed`]),We=new Set([`domain`,`_events`,`_eventsCount`,`_maxListeners`]),Ge=[{name:e=>`${e}Edge`,generateKey:!0},{name:e=>`${e}DirectedEdge`,generateKey:!0,type:`directed`},{name:e=>`${e}UndirectedEdge`,generateKey:!0,type:`undirected`},{name:e=>`${e}EdgeWithKey`},{name:e=>`${e}DirectedEdgeWithKey`,type:`directed`},{name:e=>`${e}UndirectedEdgeWithKey`,type:`undirected`}],Ke={allowSelfLoops:!0,multi:!1,type:`mixed`};function qe(e,t,n){if(n&&!o(n))throw new h(`Graph.addNode: invalid attributes. Expecting an object but got "${n}"`);if(t=``+t,n||={},e._nodes.has(t))throw new _(`Graph.addNode: the "${t}" node already exist in the graph.`);let r=new e.NodeDataClass(t,n);return e._nodes.set(t,r),e.emit(`nodeAdded`,{key:t,attributes:n}),r}function Je(e,t,n){let r=new e.NodeDataClass(t,n);return e._nodes.set(t,r),e.emit(`nodeAdded`,{key:t,attributes:n}),r}function Ye(e,t,n,r,i,a,s,c){if(!r&&e.type===`undirected`)throw new _(`Graph.${t}: you cannot add a directed edge to an undirected graph. Use the #.addEdge or #.addUndirectedEdge instead.`);if(r&&e.type===`directed`)throw new _(`Graph.${t}: you cannot add an undirected edge to a directed graph. Use the #.addEdge or #.addDirectedEdge instead.`);if(c&&!o(c))throw new h(`Graph.${t}: invalid attributes. Expecting an object but got "${c}"`);if(a=``+a,s=``+s,c||={},!e.allowSelfLoops&&a===s)throw new _(`Graph.${t}: source & target are the same ("${a}"), thus creating a loop explicitly forbidden by this graph 'allowSelfLoops' option set to false.`);let l=e._nodes.get(a),u=e._nodes.get(s);if(!l)throw new g(`Graph.${t}: source node "${a}" not found.`);if(!u)throw new g(`Graph.${t}: target node "${s}" not found.`);let d={key:null,undirected:r,source:a,target:s,attributes:c};if(n)i=e._edgeKeyGenerator();else if(i=``+i,e._edges.has(i))throw new _(`Graph.${t}: the "${i}" edge already exists in the graph.`);if(!e.multi&&(r?l.undirected[s]!==void 0:l.out[s]!==void 0))throw new _(`Graph.${t}: an edge linking "${a}" to "${s}" already exists. If you really want to add multiple edges linking those nodes, you should create a multi graph by using the 'multi' option.`);let f=new x(r,i,l,u,c);e._edges.set(i,f);let p=a===s;return r?(l.undirectedDegree++,u.undirectedDegree++,p&&(l.undirectedLoops++,e._undirectedSelfLoopCount++)):(l.outDegree++,u.inDegree++,p&&(l.directedLoops++,e._directedSelfLoopCount++)),e.multi?f.attachMulti():f.attach(),r?e._undirectedSize++:e._directedSize++,d.key=i,e.emit(`edgeAdded`,d),i}function Xe(e,t,n,r,a,s,c,l,u){if(!r&&e.type===`undirected`)throw new _(`Graph.${t}: you cannot merge/update a directed edge to an undirected graph. Use the #.mergeEdge/#.updateEdge or #.addUndirectedEdge instead.`);if(r&&e.type===`directed`)throw new _(`Graph.${t}: you cannot merge/update an undirected edge to a directed graph. Use the #.mergeEdge/#.updateEdge or #.addDirectedEdge instead.`);if(l){if(u){if(typeof l!=`function`)throw new h(`Graph.${t}: invalid updater function. Expecting a function but got "${l}"`)}else if(!o(l))throw new h(`Graph.${t}: invalid attributes. Expecting an object but got "${l}"`)}s=``+s,c=``+c;let d;if(u&&(d=l,l=void 0),!e.allowSelfLoops&&s===c)throw new _(`Graph.${t}: source & target are the same ("${s}"), thus creating a loop explicitly forbidden by this graph 'allowSelfLoops' option set to false.`);let f=e._nodes.get(s),p=e._nodes.get(c),m,g;if(!n&&(m=e._edges.get(a),m)){if((m.source.key!==s||m.target.key!==c)&&(!r||m.source.key!==c||m.target.key!==s))throw new _(`Graph.${t}: inconsistency detected when attempting to merge the "${a}" edge with "${s}" source & "${c}" target vs. ("${m.source.key}", "${m.target.key}").`);g=m}if(!g&&!e.multi&&f&&(g=r?f.undirected[c]:f.out[c]),g){let t=[g.key,!1,!1,!1];if(u?!d:!l)return t;if(u){let t=g.attributes;g.attributes=d(t),e.emit(`edgeAttributesUpdated`,{type:`replace`,key:g.key,attributes:g.attributes})}else i(g.attributes,l),e.emit(`edgeAttributesUpdated`,{type:`merge`,key:g.key,attributes:g.attributes,data:l});return t}l||={},u&&d&&(l=d(l));let v={key:null,undirected:r,source:s,target:c,attributes:l};if(n)a=e._edgeKeyGenerator();else if(a=``+a,e._edges.has(a))throw new _(`Graph.${t}: the "${a}" edge already exists in the graph.`);let y=!1,b=!1;f||(f=Je(e,s,{}),y=!0,s===c&&(p=f,b=!0)),p||(p=Je(e,c,{}),b=!0),m=new x(r,a,f,p,l),e._edges.set(a,m);let S=s===c;return r?(f.undirectedDegree++,p.undirectedDegree++,S&&(f.undirectedLoops++,e._undirectedSelfLoopCount++)):(f.outDegree++,p.inDegree++,S&&(f.directedLoops++,e._directedSelfLoopCount++)),e.multi?m.attachMulti():m.attach(),r?e._undirectedSize++:e._directedSize++,v.key=a,e.emit(`edgeAdded`,v),[a,!0,y,b]}function Ze(e,t){e._edges.delete(t.key);let{source:n,target:r,attributes:i}=t,a=t.undirected,o=n===r;a?(n.undirectedDegree--,r.undirectedDegree--,o&&(n.undirectedLoops--,e._undirectedSelfLoopCount--)):(n.outDegree--,r.inDegree--,o&&(n.directedLoops--,e._directedSelfLoopCount--)),e.multi?t.detachMulti():t.detach(),a?e._undirectedSize--:e._directedSize--,e.emit(`edgeDropped`,{key:t.key,attributes:i,source:n.key,target:r.key,undirected:a})}var G=class e extends n.EventEmitter{constructor(e){if(super(),e=i({},Ke,e),typeof e.multi!=`boolean`)throw new h(`Graph.constructor: invalid 'multi' option. Expecting a boolean but got "${e.multi}".`);if(!Ue.has(e.type))throw new h(`Graph.constructor: invalid 'type' option. Should be one of "mixed", "directed" or "undirected" but got "${e.type}".`);if(typeof e.allowSelfLoops!=`boolean`)throw new h(`Graph.constructor: invalid 'allowSelfLoops' option. Expecting a boolean but got "${e.allowSelfLoops}".`);let t=e.type===`mixed`?v:e.type===`directed`?y:b;c(this,`NodeDataClass`,t);let n=`geid_`+He()+`_`,r=0;c(this,`_attributes`,{}),c(this,`_nodes`,new Map),c(this,`_edges`,new Map),c(this,`_directedSize`,0),c(this,`_undirectedSize`,0),c(this,`_directedSelfLoopCount`,0),c(this,`_undirectedSelfLoopCount`,0),c(this,`_edgeKeyGenerator`,()=>{let e;do e=n+ r++;while(this._edges.has(e));return e}),c(this,`_options`,e),We.forEach(e=>c(this,e,this[e])),l(this,`order`,()=>this._nodes.size),l(this,`size`,()=>this._edges.size),l(this,`directedSize`,()=>this._directedSize),l(this,`undirectedSize`,()=>this._undirectedSize),l(this,`selfLoopCount`,()=>this._directedSelfLoopCount+this._undirectedSelfLoopCount),l(this,`directedSelfLoopCount`,()=>this._directedSelfLoopCount),l(this,`undirectedSelfLoopCount`,()=>this._undirectedSelfLoopCount),l(this,`multi`,this._options.multi),l(this,`type`,this._options.type),l(this,`allowSelfLoops`,this._options.allowSelfLoops),l(this,`implementation`,()=>`graphology`)}_resetInstanceCounters(){this._directedSize=0,this._undirectedSize=0,this._directedSelfLoopCount=0,this._undirectedSelfLoopCount=0}hasNode(e){return this._nodes.has(``+e)}hasDirectedEdge(e,t){if(this.type===`undirected`)return!1;if(arguments.length===1){let t=``+e,n=this._edges.get(t);return!!n&&!n.undirected}else if(arguments.length===2){e=``+e,t=``+t;let n=this._nodes.get(e);return n?n.out.hasOwnProperty(t):!1}throw new h(`Graph.hasDirectedEdge: invalid arity (${arguments.length}, instead of 1 or 2). You can either ask for an edge id or for the existence of an edge between a source & a target.`)}hasUndirectedEdge(e,t){if(this.type===`directed`)return!1;if(arguments.length===1){let t=``+e,n=this._edges.get(t);return!!n&&n.undirected}else if(arguments.length===2){e=``+e,t=``+t;let n=this._nodes.get(e);return n?n.undirected.hasOwnProperty(t):!1}throw new h(`Graph.hasDirectedEdge: invalid arity (${arguments.length}, instead of 1 or 2). You can either ask for an edge id or for the existence of an edge between a source & a target.`)}hasEdge(e,t){if(arguments.length===1){let t=``+e;return this._edges.has(t)}else if(arguments.length===2){e=``+e,t=``+t;let n=this._nodes.get(e);return n?n.out!==void 0&&n.out.hasOwnProperty(t)||n.undirected!==void 0&&n.undirected.hasOwnProperty(t):!1}throw new h(`Graph.hasEdge: invalid arity (${arguments.length}, instead of 1 or 2). You can either ask for an edge id or for the existence of an edge between a source & a target.`)}directedEdge(e,t){if(this.type===`undirected`)return;if(e=``+e,t=``+t,this.multi)throw new _(`Graph.directedEdge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.directedEdges instead.`);let n=this._nodes.get(e);if(!n)throw new g(`Graph.directedEdge: could not find the "${e}" source node in the graph.`);if(!this._nodes.has(t))throw new g(`Graph.directedEdge: could not find the "${t}" target node in the graph.`);let r=n.out&&n.out[t]||void 0;if(r)return r.key}undirectedEdge(e,t){if(this.type===`directed`)return;if(e=``+e,t=``+t,this.multi)throw new _(`Graph.undirectedEdge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.undirectedEdges instead.`);let n=this._nodes.get(e);if(!n)throw new g(`Graph.undirectedEdge: could not find the "${e}" source node in the graph.`);if(!this._nodes.has(t))throw new g(`Graph.undirectedEdge: could not find the "${t}" target node in the graph.`);let r=n.undirected&&n.undirected[t]||void 0;if(r)return r.key}edge(e,t){if(this.multi)throw new _(`Graph.edge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.edges instead.`);e=``+e,t=``+t;let n=this._nodes.get(e);if(!n)throw new g(`Graph.edge: could not find the "${e}" source node in the graph.`);if(!this._nodes.has(t))throw new g(`Graph.edge: could not find the "${t}" target node in the graph.`);let r=n.out&&n.out[t]||n.undirected&&n.undirected[t]||void 0;if(r)return r.key}areDirectedNeighbors(e,t){e=``+e,t=``+t;let n=this._nodes.get(e);if(!n)throw new g(`Graph.areDirectedNeighbors: could not find the "${e}" node in the graph.`);return this.type===`undirected`?!1:t in n.in||t in n.out}areOutNeighbors(e,t){e=``+e,t=``+t;let n=this._nodes.get(e);if(!n)throw new g(`Graph.areOutNeighbors: could not find the "${e}" node in the graph.`);return this.type===`undirected`?!1:t in n.out}areInNeighbors(e,t){e=``+e,t=``+t;let n=this._nodes.get(e);if(!n)throw new g(`Graph.areInNeighbors: could not find the "${e}" node in the graph.`);return this.type===`undirected`?!1:t in n.in}areUndirectedNeighbors(e,t){e=``+e,t=``+t;let n=this._nodes.get(e);if(!n)throw new g(`Graph.areUndirectedNeighbors: could not find the "${e}" node in the graph.`);return this.type===`directed`?!1:t in n.undirected}areNeighbors(e,t){e=``+e,t=``+t;let n=this._nodes.get(e);if(!n)throw new g(`Graph.areNeighbors: could not find the "${e}" node in the graph.`);return this.type!==`undirected`&&(t in n.in||t in n.out)||this.type!==`directed`&&t in n.undirected}areInboundNeighbors(e,t){e=``+e,t=``+t;let n=this._nodes.get(e);if(!n)throw new g(`Graph.areInboundNeighbors: could not find the "${e}" node in the graph.`);return this.type!==`undirected`&&t in n.in||this.type!==`directed`&&t in n.undirected}areOutboundNeighbors(e,t){e=``+e,t=``+t;let n=this._nodes.get(e);if(!n)throw new g(`Graph.areOutboundNeighbors: could not find the "${e}" node in the graph.`);return this.type!==`undirected`&&t in n.out||this.type!==`directed`&&t in n.undirected}inDegree(e){e=``+e;let t=this._nodes.get(e);if(!t)throw new g(`Graph.inDegree: could not find the "${e}" node in the graph.`);return this.type===`undirected`?0:t.inDegree}outDegree(e){e=``+e;let t=this._nodes.get(e);if(!t)throw new g(`Graph.outDegree: could not find the "${e}" node in the graph.`);return this.type===`undirected`?0:t.outDegree}directedDegree(e){e=``+e;let t=this._nodes.get(e);if(!t)throw new g(`Graph.directedDegree: could not find the "${e}" node in the graph.`);return this.type===`undirected`?0:t.inDegree+t.outDegree}undirectedDegree(e){e=``+e;let t=this._nodes.get(e);if(!t)throw new g(`Graph.undirectedDegree: could not find the "${e}" node in the graph.`);return this.type===`directed`?0:t.undirectedDegree}inboundDegree(e){e=``+e;let t=this._nodes.get(e);if(!t)throw new g(`Graph.inboundDegree: could not find the "${e}" node in the graph.`);let n=0;return this.type!==`directed`&&(n+=t.undirectedDegree),this.type!==`undirected`&&(n+=t.inDegree),n}outboundDegree(e){e=``+e;let t=this._nodes.get(e);if(!t)throw new g(`Graph.outboundDegree: could not find the "${e}" node in the graph.`);let n=0;return this.type!==`directed`&&(n+=t.undirectedDegree),this.type!==`undirected`&&(n+=t.outDegree),n}degree(e){e=``+e;let t=this._nodes.get(e);if(!t)throw new g(`Graph.degree: could not find the "${e}" node in the graph.`);let n=0;return this.type!==`directed`&&(n+=t.undirectedDegree),this.type!==`undirected`&&(n+=t.inDegree+t.outDegree),n}inDegreeWithoutSelfLoops(e){e=``+e;let t=this._nodes.get(e);if(!t)throw new g(`Graph.inDegreeWithoutSelfLoops: could not find the "${e}" node in the graph.`);return this.type===`undirected`?0:t.inDegree-t.directedLoops}outDegreeWithoutSelfLoops(e){e=``+e;let t=this._nodes.get(e);if(!t)throw new g(`Graph.outDegreeWithoutSelfLoops: could not find the "${e}" node in the graph.`);return this.type===`undirected`?0:t.outDegree-t.directedLoops}directedDegreeWithoutSelfLoops(e){e=``+e;let t=this._nodes.get(e);if(!t)throw new g(`Graph.directedDegreeWithoutSelfLoops: could not find the "${e}" node in the graph.`);return this.type===`undirected`?0:t.inDegree+t.outDegree-t.directedLoops*2}undirectedDegreeWithoutSelfLoops(e){e=``+e;let t=this._nodes.get(e);if(!t)throw new g(`Graph.undirectedDegreeWithoutSelfLoops: could not find the "${e}" node in the graph.`);return this.type===`directed`?0:t.undirectedDegree-t.undirectedLoops*2}inboundDegreeWithoutSelfLoops(e){e=``+e;let t=this._nodes.get(e);if(!t)throw new g(`Graph.inboundDegreeWithoutSelfLoops: could not find the "${e}" node in the graph.`);let n=0,r=0;return this.type!==`directed`&&(n+=t.undirectedDegree,r+=t.undirectedLoops*2),this.type!==`undirected`&&(n+=t.inDegree,r+=t.directedLoops),n-r}outboundDegreeWithoutSelfLoops(e){e=``+e;let t=this._nodes.get(e);if(!t)throw new g(`Graph.outboundDegreeWithoutSelfLoops: could not find the "${e}" node in the graph.`);let n=0,r=0;return this.type!==`directed`&&(n+=t.undirectedDegree,r+=t.undirectedLoops*2),this.type!==`undirected`&&(n+=t.outDegree,r+=t.directedLoops),n-r}degreeWithoutSelfLoops(e){e=``+e;let t=this._nodes.get(e);if(!t)throw new g(`Graph.degreeWithoutSelfLoops: could not find the "${e}" node in the graph.`);let n=0,r=0;return this.type!==`directed`&&(n+=t.undirectedDegree,r+=t.undirectedLoops*2),this.type!==`undirected`&&(n+=t.inDegree+t.outDegree,r+=t.directedLoops*2),n-r}source(e){e=``+e;let t=this._edges.get(e);if(!t)throw new g(`Graph.source: could not find the "${e}" edge in the graph.`);return t.source.key}target(e){e=``+e;let t=this._edges.get(e);if(!t)throw new g(`Graph.target: could not find the "${e}" edge in the graph.`);return t.target.key}extremities(e){e=``+e;let t=this._edges.get(e);if(!t)throw new g(`Graph.extremities: could not find the "${e}" edge in the graph.`);return[t.source.key,t.target.key]}opposite(e,t){e=``+e,t=``+t;let n=this._edges.get(t);if(!n)throw new g(`Graph.opposite: could not find the "${t}" edge in the graph.`);let r=n.source.key,i=n.target.key;if(e===r)return i;if(e===i)return r;throw new g(`Graph.opposite: the "${e}" node is not attached to the "${t}" edge (${r}, ${i}).`)}hasExtremity(e,t){e=``+e,t=``+t;let n=this._edges.get(e);if(!n)throw new g(`Graph.hasExtremity: could not find the "${e}" edge in the graph.`);return n.source.key===t||n.target.key===t}isUndirected(e){e=``+e;let t=this._edges.get(e);if(!t)throw new g(`Graph.isUndirected: could not find the "${e}" edge in the graph.`);return t.undirected}isDirected(e){e=``+e;let t=this._edges.get(e);if(!t)throw new g(`Graph.isDirected: could not find the "${e}" edge in the graph.`);return!t.undirected}isSelfLoop(e){e=``+e;let t=this._edges.get(e);if(!t)throw new g(`Graph.isSelfLoop: could not find the "${e}" edge in the graph.`);return t.source===t.target}addNode(e,t){return qe(this,e,t).key}mergeNode(e,t){if(t&&!o(t))throw new h(`Graph.mergeNode: invalid attributes. Expecting an object but got "${t}"`);e=``+e,t||={};let n=this._nodes.get(e);return n?(t&&(i(n.attributes,t),this.emit(`nodeAttributesUpdated`,{type:`merge`,key:e,attributes:n.attributes,data:t})),[e,!1]):(n=new this.NodeDataClass(e,t),this._nodes.set(e,n),this.emit(`nodeAdded`,{key:e,attributes:t}),[e,!0])}updateNode(e,t){if(t&&typeof t!=`function`)throw new h(`Graph.updateNode: invalid updater function. Expecting a function but got "${t}"`);e=``+e;let n=this._nodes.get(e);if(n){if(t){let r=n.attributes;n.attributes=t(r),this.emit(`nodeAttributesUpdated`,{type:`replace`,key:e,attributes:n.attributes})}return[e,!1]}let r=t?t({}):{};return n=new this.NodeDataClass(e,r),this._nodes.set(e,n),this.emit(`nodeAdded`,{key:e,attributes:r}),[e,!0]}dropNode(e){e=``+e;let t=this._nodes.get(e);if(!t)throw new g(`Graph.dropNode: could not find the "${e}" node in the graph.`);let n;if(this.type!==`undirected`){for(let e in t.out){n=t.out[e];do Ze(this,n),n=n.next;while(n)}for(let e in t.in){n=t.in[e];do Ze(this,n),n=n.next;while(n)}}if(this.type!==`directed`)for(let e in t.undirected){n=t.undirected[e];do Ze(this,n),n=n.next;while(n)}this._nodes.delete(e),this.emit(`nodeDropped`,{key:e,attributes:t.attributes})}dropEdge(e){let t;if(arguments.length>1){let e=``+arguments[0],n=``+arguments[1];if(t=a(this,e,n,this.type),!t)throw new g(`Graph.dropEdge: could not find the "${e}" -> "${n}" edge in the graph.`)}else if(e=``+e,t=this._edges.get(e),!t)throw new g(`Graph.dropEdge: could not find the "${e}" edge in the graph.`);return Ze(this,t),this}dropDirectedEdge(e,t){if(arguments.length<2)throw new _(`Graph.dropDirectedEdge: it does not make sense to try and drop a directed edge by key. What if the edge with this key is undirected? Use #.dropEdge for this purpose instead.`);if(this.multi)throw new _(`Graph.dropDirectedEdge: cannot use a {source,target} combo when dropping an edge in a MultiGraph since we cannot infer the one you want to delete as there could be multiple ones.`);e=``+e,t=``+t;let n=a(this,e,t,`directed`);if(!n)throw new g(`Graph.dropDirectedEdge: could not find a "${e}" -> "${t}" edge in the graph.`);return Ze(this,n),this}dropUndirectedEdge(e,t){if(arguments.length<2)throw new _(`Graph.dropUndirectedEdge: it does not make sense to drop a directed edge by key. What if the edge with this key is undirected? Use #.dropEdge for this purpose instead.`);if(this.multi)throw new _(`Graph.dropUndirectedEdge: cannot use a {source,target} combo when dropping an edge in a MultiGraph since we cannot infer the one you want to delete as there could be multiple ones.`);let n=a(this,e,t,`undirected`);if(!n)throw new g(`Graph.dropUndirectedEdge: could not find a "${e}" -> "${t}" edge in the graph.`);return Ze(this,n),this}clear(){this._edges.clear(),this._nodes.clear(),this._resetInstanceCounters(),this.emit(`cleared`)}clearEdges(){let e=this._nodes.values(),t;for(;t=e.next(),t.done!==!0;)t.value.clear();this._edges.clear(),this._resetInstanceCounters(),this.emit(`edgesCleared`)}getAttribute(e){return this._attributes[e]}getAttributes(){return this._attributes}hasAttribute(e){return this._attributes.hasOwnProperty(e)}setAttribute(e,t){return this._attributes[e]=t,this.emit(`attributesUpdated`,{type:`set`,attributes:this._attributes,name:e}),this}updateAttribute(e,t){if(typeof t!=`function`)throw new h(`Graph.updateAttribute: updater should be a function.`);let n=this._attributes[e];return this._attributes[e]=t(n),this.emit(`attributesUpdated`,{type:`set`,attributes:this._attributes,name:e}),this}removeAttribute(e){return delete this._attributes[e],this.emit(`attributesUpdated`,{type:`remove`,attributes:this._attributes,name:e}),this}replaceAttributes(e){if(!o(e))throw new h(`Graph.replaceAttributes: provided attributes are not a plain object.`);return this._attributes=e,this.emit(`attributesUpdated`,{type:`replace`,attributes:this._attributes}),this}mergeAttributes(e){if(!o(e))throw new h(`Graph.mergeAttributes: provided attributes are not a plain object.`);return i(this._attributes,e),this.emit(`attributesUpdated`,{type:`merge`,attributes:this._attributes,data:e}),this}updateAttributes(e){if(typeof e!=`function`)throw new h(`Graph.updateAttributes: provided updater is not a function.`);return this._attributes=e(this._attributes),this.emit(`attributesUpdated`,{type:`update`,attributes:this._attributes}),this}updateEachNodeAttributes(e,t){if(typeof e!=`function`)throw new h(`Graph.updateEachNodeAttributes: expecting an updater function.`);if(t&&!u(t))throw new h(`Graph.updateEachNodeAttributes: invalid hints. Expecting an object having the following shape: {attributes?: [string]}`);let n=this._nodes.values(),r,i;for(;r=n.next(),r.done!==!0;)i=r.value,i.attributes=e(i.key,i.attributes);this.emit(`eachNodeAttributesUpdated`,{hints:t||null})}updateEachEdgeAttributes(e,t){if(typeof e!=`function`)throw new h(`Graph.updateEachEdgeAttributes: expecting an updater function.`);if(t&&!u(t))throw new h(`Graph.updateEachEdgeAttributes: invalid hints. Expecting an object having the following shape: {attributes?: [string]}`);let n=this._edges.values(),r,i,a,o;for(;r=n.next(),r.done!==!0;)i=r.value,a=i.source,o=i.target,i.attributes=e(i.key,i.attributes,a.key,o.key,a.attributes,o.attributes,i.undirected);this.emit(`eachEdgeAttributesUpdated`,{hints:t||null})}forEachAdjacencyEntry(e){if(typeof e!=`function`)throw new h(`Graph.forEachAdjacencyEntry: expecting a callback.`);Le(!1,!1,!1,this,e)}forEachAdjacencyEntryWithOrphans(e){if(typeof e!=`function`)throw new h(`Graph.forEachAdjacencyEntryWithOrphans: expecting a callback.`);Le(!1,!1,!0,this,e)}forEachAssymetricAdjacencyEntry(e){if(typeof e!=`function`)throw new h(`Graph.forEachAssymetricAdjacencyEntry: expecting a callback.`);Le(!1,!0,!1,this,e)}forEachAssymetricAdjacencyEntryWithOrphans(e){if(typeof e!=`function`)throw new h(`Graph.forEachAssymetricAdjacencyEntryWithOrphans: expecting a callback.`);Le(!1,!0,!0,this,e)}nodes(){return Array.from(this._nodes.keys())}forEachNode(e){if(typeof e!=`function`)throw new h(`Graph.forEachNode: expecting a callback.`);let t=this._nodes.values(),n,r;for(;n=t.next(),n.done!==!0;)r=n.value,e(r.key,r.attributes)}findNode(e){if(typeof e!=`function`)throw new h(`Graph.findNode: expecting a callback.`);let t=this._nodes.values(),n,r;for(;n=t.next(),n.done!==!0;)if(r=n.value,e(r.key,r.attributes))return r.key}mapNodes(e){if(typeof e!=`function`)throw new h(`Graph.mapNode: expecting a callback.`);let t=this._nodes.values(),n,r,i=Array(this.order),a=0;for(;n=t.next(),n.done!==!0;)r=n.value,i[a++]=e(r.key,r.attributes);return i}someNode(e){if(typeof e!=`function`)throw new h(`Graph.someNode: expecting a callback.`);let t=this._nodes.values(),n,r;for(;n=t.next(),n.done!==!0;)if(r=n.value,e(r.key,r.attributes))return!0;return!1}everyNode(e){if(typeof e!=`function`)throw new h(`Graph.everyNode: expecting a callback.`);let t=this._nodes.values(),n,r;for(;n=t.next(),n.done!==!0;)if(r=n.value,!e(r.key,r.attributes))return!1;return!0}filterNodes(e){if(typeof e!=`function`)throw new h(`Graph.filterNodes: expecting a callback.`);let t=this._nodes.values(),n,r,i=[];for(;n=t.next(),n.done!==!0;)r=n.value,e(r.key,r.attributes)&&i.push(r.key);return i}reduceNodes(e,t){if(typeof e!=`function`)throw new h(`Graph.reduceNodes: expecting a callback.`);if(arguments.length<2)throw new h(`Graph.reduceNodes: missing initial value. You must provide it because the callback takes more than one argument and we cannot infer the initial value from the first iteration, as you could with a simple array.`);let n=t,r=this._nodes.values(),i,a;for(;i=r.next(),i.done!==!0;)a=i.value,n=e(n,a.key,a.attributes);return n}nodeEntries(){let e=this._nodes.values();return{[Symbol.iterator](){return this},next(){let t=e.next();if(t.done)return t;let n=t.value;return{value:{node:n.key,attributes:n.attributes},done:!1}}}}export(){let e=Array(this._nodes.size),t=0;this._nodes.forEach((n,r)=>{e[t++]=Re(r,n)});let n=Array(this._edges.size);return t=0,this._edges.forEach((e,r)=>{n[t++]=ze(this.type,r,e)}),{options:{type:this.type,multi:this.multi,allowSelfLoops:this.allowSelfLoops},attributes:this.getAttributes(),nodes:e,edges:n}}import(t,n=!1){if(t instanceof e)return t.forEachNode((e,t)=>{n?this.mergeNode(e,t):this.addNode(e,t)}),t.forEachEdge((e,t,r,i,a,o,s)=>{n?s?this.mergeUndirectedEdgeWithKey(e,r,i,t):this.mergeDirectedEdgeWithKey(e,r,i,t):s?this.addUndirectedEdgeWithKey(e,r,i,t):this.addDirectedEdgeWithKey(e,r,i,t)}),this;if(!o(t))throw new h(`Graph.import: invalid argument. Expecting a serialized graph or, alternatively, a Graph instance.`);if(t.attributes){if(!o(t.attributes))throw new h(`Graph.import: invalid attributes. Expecting a plain object.`);n?this.mergeAttributes(t.attributes):this.replaceAttributes(t.attributes)}let r,i,a,s,c;if(t.nodes){if(a=t.nodes,!Array.isArray(a))throw new h(`Graph.import: invalid nodes. Expecting an array.`);for(r=0,i=a.length;r<i;r++){s=a[r],Be(s);let{key:e,attributes:t}=s;n?this.mergeNode(e,t):this.addNode(e,t)}}if(t.edges){let e=!1;if(this.type===`undirected`&&(e=!0),a=t.edges,!Array.isArray(a))throw new h(`Graph.import: invalid edges. Expecting an array.`);for(r=0,i=a.length;r<i;r++){c=a[r],Ve(c);let{source:t,target:i,attributes:o,undirected:s=e}=c,l;`key`in c?(l=n?s?this.mergeUndirectedEdgeWithKey:this.mergeDirectedEdgeWithKey:s?this.addUndirectedEdgeWithKey:this.addDirectedEdgeWithKey,l.call(this,c.key,t,i,o)):(l=n?s?this.mergeUndirectedEdge:this.mergeDirectedEdge:s?this.addUndirectedEdge:this.addDirectedEdge,l.call(this,t,i,o))}}return this}nullCopy(t){let n=new e(i({},this._options,t));return n.replaceAttributes(i({},this.getAttributes())),n}emptyCopy(e){let t=this.nullCopy(e);return this._nodes.forEach((e,n)=>{let r=i({},e.attributes);e=new t.NodeDataClass(n,r),t._nodes.set(n,e)}),t}copy(e){if(e||={},typeof e.type==`string`&&e.type!==this.type&&e.type!==`mixed`)throw new _(`Graph.copy: cannot create an incompatible copy from "${this.type}" type to "${e.type}" because this would mean losing information about the current graph.`);if(typeof e.multi==`boolean`&&e.multi!==this.multi&&e.multi!==!0)throw new _(`Graph.copy: cannot create an incompatible copy by downgrading a multi graph to a simple one because this would mean losing information about the current graph.`);if(typeof e.allowSelfLoops==`boolean`&&e.allowSelfLoops!==this.allowSelfLoops&&e.allowSelfLoops!==!0)throw new _(`Graph.copy: cannot create an incompatible copy from a graph allowing self loops to one that does not because this would mean losing information about the current graph.`);let t=this.emptyCopy(e),n=this._edges.values(),r,a;for(;r=n.next(),r.done!==!0;)a=r.value,Ye(t,`copy`,!1,a.undirected,a.key,a.source.key,a.target.key,i({},a.attributes));return t}toJSON(){return this.export()}toString(){return`[object Graph]`}inspect(){let e={};this._nodes.forEach((t,n)=>{e[n]=t.attributes});let t={},n={};this._edges.forEach((e,r)=>{let i=e.undirected?`--`:`->`,a=``,o=e.source.key,s=e.target.key,c;e.undirected&&o>s&&(c=o,o=s,s=c);let l=`(${o})${i}(${s})`;r.startsWith(`geid_`)?this.multi&&(n[l]===void 0?n[l]=0:n[l]++,a+=`${n[l]}. `):a+=`[${r}]: `,a+=l,t[a]=e.attributes});let r={};for(let e in this)this.hasOwnProperty(e)&&!We.has(e)&&typeof this[e]!=`function`&&typeof e!=`symbol`&&(r[e]=this[e]);return r.attributes=this._attributes,r.nodes=e,r.edges=t,c(r,`constructor`,this.constructor),r}};typeof Symbol<`u`&&(G.prototype[Symbol.for(`nodejs.util.inspect.custom`)]=G.prototype.inspect),Ge.forEach(e=>{[`add`,`merge`,`update`].forEach(t=>{let n=e.name(t),r=t===`add`?Ye:Xe;e.generateKey?G.prototype[n]=function(i,a,o){return r(this,n,!0,(e.type||this.type)===`undirected`,null,i,a,o,t===`update`)}:G.prototype[n]=function(i,a,o,s){return r(this,n,!1,(e.type||this.type)===`undirected`,i,a,o,s,t===`update`)}})}),P(G),B(G),we(G),Ie(G);var Qe=class extends G{constructor(e){let t=i({type:`directed`},e);if(`multi`in t&&t.multi!==!1)throw new h(`DirectedGraph.from: inconsistent indication that the graph should be multi in given options!`);if(t.type!==`directed`)throw new h(`DirectedGraph.from: inconsistent "`+t.type+`" type in given options!`);super(t)}},$e=class extends G{constructor(e){let t=i({type:`undirected`},e);if(`multi`in t&&t.multi!==!1)throw new h(`UndirectedGraph.from: inconsistent indication that the graph should be multi in given options!`);if(t.type!==`undirected`)throw new h(`UndirectedGraph.from: inconsistent "`+t.type+`" type in given options!`);super(t)}},et=class extends G{constructor(e){let t=i({multi:!0},e);if(`multi`in t&&t.multi!==!0)throw new h(`MultiGraph.from: inconsistent indication that the graph should be simple in given options!`);super(t)}},tt=class extends G{constructor(e){let t=i({type:`directed`,multi:!0},e);if(`multi`in t&&t.multi!==!0)throw new h(`MultiDirectedGraph.from: inconsistent indication that the graph should be simple in given options!`);if(t.type!==`directed`)throw new h(`MultiDirectedGraph.from: inconsistent "`+t.type+`" type in given options!`);super(t)}},nt=class extends G{constructor(e){let t=i({type:`undirected`,multi:!0},e);if(`multi`in t&&t.multi!==!0)throw new h(`MultiUndirectedGraph.from: inconsistent indication that the graph should be simple in given options!`);if(t.type!==`undirected`)throw new h(`MultiUndirectedGraph.from: inconsistent "`+t.type+`" type in given options!`);super(t)}};function rt(e){e.from=function(t,n){let r=new e(i({},t.options,n));return r.import(t),r}}rt(G),rt(Qe),rt($e),rt(et),rt(tt),rt(nt),G.Graph=G,G.DirectedGraph=Qe,G.UndirectedGraph=$e,G.MultiGraph=et,G.MultiDirectedGraph=tt,G.MultiUndirectedGraph=nt,G.InvalidArgumentsGraphError=h,G.NotFoundGraphError=g,G.UsageGraphError=_;function it(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function at(e){var t=it(e,`string`);return typeof t==`symbol`?t:t+``}function K(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function ot(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,at(r.key),r)}}function q(e,t,n){return t&&ot(e.prototype,t),n&&ot(e,n),Object.defineProperty(e,`prototype`,{writable:!1}),e}function st(e){return st=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},st(e)}function ct(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(ct=function(){return!!e})()}function lt(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function ut(e,t){if(t&&(typeof t==`object`||typeof t==`function`))return t;if(t!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return lt(e)}function J(e,t,n){return t=st(t),ut(e,ct()?Reflect.construct(t,n||[],st(e).constructor):t.apply(e,n))}function dt(e,t){return dt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},dt(e,t)}function Y(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,`prototype`,{writable:!1}),t&&dt(e,t)}function ft(e){if(Array.isArray(e))return e}function pt(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function mt(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function ht(e,t){if(e){if(typeof e==`string`)return mt(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?mt(e,t):void 0}}function gt(){throw TypeError(`Invalid attempt to destructure non-iterable instance.-In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _t(e,t){return ft(e)||pt(e,t)||ht(e,t)||gt()}var vt={black:`#000000`,silver:`#C0C0C0`,gray:`#808080`,grey:`#808080`,white:`#FFFFFF`,maroon:`#800000`,red:`#FF0000`,purple:`#800080`,fuchsia:`#FF00FF`,green:`#008000`,lime:`#00FF00`,olive:`#808000`,yellow:`#FFFF00`,navy:`#000080`,blue:`#0000FF`,teal:`#008080`,aqua:`#00FFFF`,darkblue:`#00008B`,mediumblue:`#0000CD`,darkgreen:`#006400`,darkcyan:`#008B8B`,deepskyblue:`#00BFFF`,darkturquoise:`#00CED1`,mediumspringgreen:`#00FA9A`,springgreen:`#00FF7F`,cyan:`#00FFFF`,midnightblue:`#191970`,dodgerblue:`#1E90FF`,lightseagreen:`#20B2AA`,forestgreen:`#228B22`,seagreen:`#2E8B57`,darkslategray:`#2F4F4F`,darkslategrey:`#2F4F4F`,limegreen:`#32CD32`,mediumseagreen:`#3CB371`,turquoise:`#40E0D0`,royalblue:`#4169E1`,steelblue:`#4682B4`,darkslateblue:`#483D8B`,mediumturquoise:`#48D1CC`,indigo:`#4B0082`,darkolivegreen:`#556B2F`,cadetblue:`#5F9EA0`,cornflowerblue:`#6495ED`,rebeccapurple:`#663399`,mediumaquamarine:`#66CDAA`,dimgray:`#696969`,dimgrey:`#696969`,slateblue:`#6A5ACD`,olivedrab:`#6B8E23`,slategray:`#708090`,slategrey:`#708090`,lightslategray:`#778899`,lightslategrey:`#778899`,mediumslateblue:`#7B68EE`,lawngreen:`#7CFC00`,chartreuse:`#7FFF00`,aquamarine:`#7FFFD4`,skyblue:`#87CEEB`,lightskyblue:`#87CEFA`,blueviolet:`#8A2BE2`,darkred:`#8B0000`,darkmagenta:`#8B008B`,saddlebrown:`#8B4513`,darkseagreen:`#8FBC8F`,lightgreen:`#90EE90`,mediumpurple:`#9370DB`,darkviolet:`#9400D3`,palegreen:`#98FB98`,darkorchid:`#9932CC`,yellowgreen:`#9ACD32`,sienna:`#A0522D`,brown:`#A52A2A`,darkgray:`#A9A9A9`,darkgrey:`#A9A9A9`,lightblue:`#ADD8E6`,greenyellow:`#ADFF2F`,paleturquoise:`#AFEEEE`,lightsteelblue:`#B0C4DE`,powderblue:`#B0E0E6`,firebrick:`#B22222`,darkgoldenrod:`#B8860B`,mediumorchid:`#BA55D3`,rosybrown:`#BC8F8F`,darkkhaki:`#BDB76B`,mediumvioletred:`#C71585`,indianred:`#CD5C5C`,peru:`#CD853F`,chocolate:`#D2691E`,tan:`#D2B48C`,lightgray:`#D3D3D3`,lightgrey:`#D3D3D3`,thistle:`#D8BFD8`,orchid:`#DA70D6`,goldenrod:`#DAA520`,palevioletred:`#DB7093`,crimson:`#DC143C`,gainsboro:`#DCDCDC`,plum:`#DDA0DD`,burlywood:`#DEB887`,lightcyan:`#E0FFFF`,lavender:`#E6E6FA`,darksalmon:`#E9967A`,violet:`#EE82EE`,palegoldenrod:`#EEE8AA`,lightcoral:`#F08080`,khaki:`#F0E68C`,aliceblue:`#F0F8FF`,honeydew:`#F0FFF0`,azure:`#F0FFFF`,sandybrown:`#F4A460`,wheat:`#F5DEB3`,beige:`#F5F5DC`,whitesmoke:`#F5F5F5`,mintcream:`#F5FFFA`,ghostwhite:`#F8F8FF`,salmon:`#FA8072`,antiquewhite:`#FAEBD7`,linen:`#FAF0E6`,lightgoldenrodyellow:`#FAFAD2`,oldlace:`#FDF5E6`,magenta:`#FF00FF`,deeppink:`#FF1493`,orangered:`#FF4500`,tomato:`#FF6347`,hotpink:`#FF69B4`,coral:`#FF7F50`,darkorange:`#FF8C00`,lightsalmon:`#FFA07A`,orange:`#FFA500`,lightpink:`#FFB6C1`,pink:`#FFC0CB`,gold:`#FFD700`,peachpuff:`#FFDAB9`,navajowhite:`#FFDEAD`,moccasin:`#FFE4B5`,bisque:`#FFE4C4`,mistyrose:`#FFE4E1`,blanchedalmond:`#FFEBCD`,papayawhip:`#FFEFD5`,lavenderblush:`#FFF0F5`,seashell:`#FFF5EE`,cornsilk:`#FFF8DC`,lemonchiffon:`#FFFACD`,floralwhite:`#FFFAF0`,snow:`#FFFAFA`,lightyellow:`#FFFFE0`,ivory:`#FFFFF0`},yt=new Int8Array(4),bt=new Int32Array(yt.buffer,0,1),xt=new Float32Array(yt.buffer,0,1),St=/^\s*rgba?\s*\(/,Ct=/^\s*rgba?\s*\(\s*([0-9]*)\s*,\s*([0-9]*)\s*,\s*([0-9]*)(?:\s*,\s*(.*)?)?\)\s*$/;function wt(e){var t=0,n=0,r=0,i=1;if(e[0]===`#`)e.length===4?(t=parseInt(e.charAt(1)+e.charAt(1),16),n=parseInt(e.charAt(2)+e.charAt(2),16),r=parseInt(e.charAt(3)+e.charAt(3),16)):(t=parseInt(e.charAt(1)+e.charAt(2),16),n=parseInt(e.charAt(3)+e.charAt(4),16),r=parseInt(e.charAt(5)+e.charAt(6),16)),e.length===9&&(i=parseInt(e.charAt(7)+e.charAt(8),16)/255);else if(St.test(e)){var a=e.match(Ct);a&&(t=+a[1],n=+a[2],r=+a[3],a[4]&&(i=+a[4]))}return{r:t,g:n,b:r,a:i}}var Tt={};for(var Et in vt)Tt[Et]=Ot(vt[Et]),Tt[vt[Et]]=Tt[Et];function Dt(e,t,n,r,i){return bt[0]=r<<24|n<<16|t<<8|e,i&&(bt[0]&=4278190079),xt[0]}function Ot(e){if(e=e.toLowerCase(),Tt[e]!==void 0)return Tt[e];var t=wt(e),n=t.r,r=t.g,i=t.b,a=t.a;a=a*255|0;var o=Dt(n,r,i,a,!0);return Tt[e]=o,o}var kt={};function At(e){if(kt[e]!==void 0)return kt[e];var t=Dt((e&16711680)>>>16,(e&65280)>>>8,e&255,255,!0);return kt[e]=t,t}function jt(e,t,n,r){return n+(t<<8)+(e<<16)}function Mt(e,t,n,r,i,a){var o=Math.floor(n/a*i),s=Math.floor(e.drawingBufferHeight/a-r/a*i),c=new Uint8Array(4);e.bindFramebuffer(e.FRAMEBUFFER,t),e.readPixels(o,s,1,1,e.RGBA,e.UNSIGNED_BYTE,c);var l=_t(c,4);return[l[0],l[1],l[2],l[3]]}function X(e,t,n){return(t=at(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Nt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Z(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Nt(Object(n),!0).forEach(function(t){X(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Nt(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Pt(e,t){for(;!{}.hasOwnProperty.call(e,t)&&(e=st(e))!==null;);return e}function Ft(){return Ft=typeof Reflect<`u`&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=Pt(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Ft.apply(null,arguments)}function It(e,t,n,r){var i=Ft(st(1&r?e.prototype:e),t,n);return 2&r&&typeof i==`function`?function(e){return i.apply(n,e)}:i}function Lt(e){return e.normalized?1:e.size}function Rt(e){var t=0;return e.forEach(function(e){return t+=Lt(e)}),t}function zt(e,t,n){var r=e===`VERTEX`?t.VERTEX_SHADER:t.FRAGMENT_SHADER,i=t.createShader(r);if(i===null)throw Error(`loadShader: error while creating the shader`);if(t.shaderSource(i,n),t.compileShader(i),!t.getShaderParameter(i,t.COMPILE_STATUS)){var a=t.getShaderInfoLog(i);throw t.deleteShader(i),Error(`loadShader: error while compiling the shader:-${a}-${n}`)}return i}function Bt(e,t){return zt(`VERTEX`,e,t)}function Vt(e,t){return zt(`FRAGMENT`,e,t)}function Ht(e,t){var n=e.createProgram();if(n===null)throw Error(`loadProgram: error while creating the program.`);var r,i;for(r=0,i=t.length;r<i;r++)e.attachShader(n,t[r]);if(e.linkProgram(n),!e.getProgramParameter(n,e.LINK_STATUS))throw e.deleteProgram(n),Error(`loadProgram: error while linking the program.`);return n}function Ut(e){var t=e.gl,n=e.buffer,r=e.program,i=e.vertexShader,a=e.fragmentShader;t.deleteShader(i),t.deleteShader(a),t.deleteProgram(r),t.deleteBuffer(n)}var Wt=`#define PICKING_MODE-`,Gt=X(X(X(X(X(X(X(X({},WebGL2RenderingContext.BOOL,1),WebGL2RenderingContext.BYTE,1),WebGL2RenderingContext.UNSIGNED_BYTE,1),WebGL2RenderingContext.SHORT,2),WebGL2RenderingContext.UNSIGNED_SHORT,2),WebGL2RenderingContext.INT,4),WebGL2RenderingContext.UNSIGNED_INT,4),WebGL2RenderingContext.FLOAT,4),Kt=function(){function e(t,n,r){K(this,e),X(this,`array`,new Float32Array),X(this,`constantArray`,new Float32Array),X(this,`capacity`,0),X(this,`verticesCount`,0);var i=this.getDefinition();if(this.VERTICES=i.VERTICES,this.VERTEX_SHADER_SOURCE=i.VERTEX_SHADER_SOURCE,this.FRAGMENT_SHADER_SOURCE=i.FRAGMENT_SHADER_SOURCE,this.UNIFORMS=i.UNIFORMS,this.ATTRIBUTES=i.ATTRIBUTES,this.METHOD=i.METHOD,this.CONSTANT_ATTRIBUTES=`CONSTANT_ATTRIBUTES`in i?i.CONSTANT_ATTRIBUTES:[],this.CONSTANT_DATA=`CONSTANT_DATA`in i?i.CONSTANT_DATA:[],this.isInstanced=`CONSTANT_ATTRIBUTES`in i,this.ATTRIBUTES_ITEMS_COUNT=Rt(this.ATTRIBUTES),this.STRIDE=this.VERTICES*this.ATTRIBUTES_ITEMS_COUNT,this.renderer=r,this.normalProgram=this.getProgramInfo(`normal`,t,i.VERTEX_SHADER_SOURCE,i.FRAGMENT_SHADER_SOURCE,null),this.pickProgram=n?this.getProgramInfo(`pick`,t,Wt+i.VERTEX_SHADER_SOURCE,Wt+i.FRAGMENT_SHADER_SOURCE,n):null,this.isInstanced){var a=Rt(this.CONSTANT_ATTRIBUTES);if(this.CONSTANT_DATA.length!==this.VERTICES)throw Error(`Program: error while getting constant data (expected ${this.VERTICES} items, received ${this.CONSTANT_DATA.length} instead)`);this.constantArray=new Float32Array(this.CONSTANT_DATA.length*a);for(var o=0;o<this.CONSTANT_DATA.length;o++){var s=this.CONSTANT_DATA[o];if(s.length!==a)throw Error(`Program: error while getting constant data (one vector has ${s.length} items instead of ${a})`);for(var c=0;c<s.length;c++)this.constantArray[o*a+c]=s[c]}this.STRIDE=this.ATTRIBUTES_ITEMS_COUNT}}return q(e,[{key:`kill`,value:function(){Ut(this.normalProgram),this.pickProgram&&=(Ut(this.pickProgram),null)}},{key:`getProgramInfo`,value:function(e,t,n,r,i){var a=this.getDefinition(),o=t.createBuffer();if(o===null)throw Error(`Program: error while creating the WebGL buffer.`);var s=Bt(t,n),c=Vt(t,r),l=Ht(t,[s,c]),u={};a.UNIFORMS.forEach(function(e){var n=t.getUniformLocation(l,e);n&&(u[e]=n)});var d={};a.ATTRIBUTES.forEach(function(e){d[e.name]=t.getAttribLocation(l,e.name)});var f;if(`CONSTANT_ATTRIBUTES`in a&&(a.CONSTANT_ATTRIBUTES.forEach(function(e){d[e.name]=t.getAttribLocation(l,e.name)}),f=t.createBuffer(),f===null))throw Error(`Program: error while creating the WebGL constant buffer.`);return{name:e,program:l,gl:t,frameBuffer:i,buffer:o,constantBuffer:f||{},uniformLocations:u,attributeLocations:d,isPicking:e===`pick`,vertexShader:s,fragmentShader:c}}},{key:`bindProgram`,value:function(e){var t=this,n=0,r=e.gl,i=e.buffer;this.isInstanced?(r.bindBuffer(r.ARRAY_BUFFER,e.constantBuffer),n=0,this.CONSTANT_ATTRIBUTES.forEach(function(r){return n+=t.bindAttribute(r,e,n,!1)}),r.bufferData(r.ARRAY_BUFFER,this.constantArray,r.STATIC_DRAW),r.bindBuffer(r.ARRAY_BUFFER,e.buffer),n=0,this.ATTRIBUTES.forEach(function(r){return n+=t.bindAttribute(r,e,n,!0)}),r.bufferData(r.ARRAY_BUFFER,this.array,r.DYNAMIC_DRAW)):(r.bindBuffer(r.ARRAY_BUFFER,i),n=0,this.ATTRIBUTES.forEach(function(r){return n+=t.bindAttribute(r,e,n)}),r.bufferData(r.ARRAY_BUFFER,this.array,r.DYNAMIC_DRAW)),r.bindBuffer(r.ARRAY_BUFFER,null)}},{key:`unbindProgram`,value:function(e){var t=this;this.isInstanced?(this.CONSTANT_ATTRIBUTES.forEach(function(n){return t.unbindAttribute(n,e,!1)}),this.ATTRIBUTES.forEach(function(n){return t.unbindAttribute(n,e,!0)})):this.ATTRIBUTES.forEach(function(n){return t.unbindAttribute(n,e)})}},{key:`bindAttribute`,value:function(e,t,n,r){var i=Gt[e.type];if(typeof i!=`number`)throw Error(`Program.bind: yet unsupported attribute type "${e.type}"`);var a=t.attributeLocations[e.name],o=t.gl;if(a!==-1){o.enableVertexAttribArray(a);var s=this.isInstanced?(r?this.ATTRIBUTES_ITEMS_COUNT:Rt(this.CONSTANT_ATTRIBUTES))*Float32Array.BYTES_PER_ELEMENT:this.ATTRIBUTES_ITEMS_COUNT*Float32Array.BYTES_PER_ELEMENT;if(o.vertexAttribPointer(a,e.size,e.type,e.normalized||!1,s,n),this.isInstanced&&r)if(o instanceof WebGL2RenderingContext)o.vertexAttribDivisor(a,1);else{var c=o.getExtension(`ANGLE_instanced_arrays`);c&&c.vertexAttribDivisorANGLE(a,1)}}return e.size*i}},{key:`unbindAttribute`,value:function(e,t,n){var r=t.attributeLocations[e.name],i=t.gl;if(r!==-1&&(i.disableVertexAttribArray(r),this.isInstanced&&n))if(i instanceof WebGL2RenderingContext)i.vertexAttribDivisor(r,0);else{var a=i.getExtension(`ANGLE_instanced_arrays`);a&&a.vertexAttribDivisorANGLE(r,0)}}},{key:`reallocate`,value:function(e){e!==this.capacity&&(this.capacity=e,this.verticesCount=this.VERTICES*e,this.array=new Float32Array(this.isInstanced?this.capacity*this.ATTRIBUTES_ITEMS_COUNT:this.verticesCount*this.ATTRIBUTES_ITEMS_COUNT))}},{key:`hasNothingToRender`,value:function(){return this.verticesCount===0}},{key:`renderProgram`,value:function(e,t){var n=t.gl,r=t.program;n.enable(n.BLEND),n.useProgram(r),this.setUniforms(e,t),this.drawWebGL(this.METHOD,t)}},{key:`render`,value:function(e){this.hasNothingToRender()||(this.pickProgram&&(this.pickProgram.gl.viewport(0,0,e.width*e.pixelRatio/e.downSizingRatio,e.height*e.pixelRatio/e.downSizingRatio),this.bindProgram(this.pickProgram),this.renderProgram(Z(Z({},e),{},{pixelRatio:e.pixelRatio/e.downSizingRatio}),this.pickProgram),this.unbindProgram(this.pickProgram)),this.normalProgram.gl.viewport(0,0,e.width*e.pixelRatio,e.height*e.pixelRatio),this.bindProgram(this.normalProgram),this.renderProgram(e,this.normalProgram),this.unbindProgram(this.normalProgram))}},{key:`drawWebGL`,value:function(e,t){var n=t.gl,r=t.frameBuffer;if(n.bindFramebuffer(n.FRAMEBUFFER,r),!this.isInstanced)n.drawArrays(e,0,this.verticesCount);else if(n instanceof WebGL2RenderingContext)n.drawArraysInstanced(e,0,this.VERTICES,this.capacity);else{var i=n.getExtension(`ANGLE_instanced_arrays`);i&&i.drawArraysInstancedANGLE(e,0,this.VERTICES,this.capacity)}}}])}(),qt=function(e){function t(){return K(this,t),J(this,t,arguments)}return Y(t,e),q(t,[{key:`kill`,value:function(){It(t,`kill`,this,3)([])}},{key:`process`,value:function(e,t,n){var r=t*this.STRIDE;if(n.hidden){for(var i=r+this.STRIDE;r<i;r++)this.array[r]=0;return}return this.processVisibleItem(At(e),r,n)}}])}(Kt),Jt=function(e){function t(){var e;K(this,t);var n=[...arguments];return e=J(this,t,[].concat(n)),X(e,`drawLabel`,void 0),e}return Y(t,e),q(t,[{key:`kill`,value:function(){It(t,`kill`,this,3)([])}},{key:`process`,value:function(e,t,n,r,i){var a=t*this.STRIDE;if(i.hidden||n.hidden||r.hidden){for(var o=a+this.STRIDE;a<o;a++)this.array[a]=0;return}return this.processVisibleItem(At(e),a,n,r,i)}}])}(Kt);function Yt(e,t){return function(){function n(r,i,a){K(this,n),X(this,`drawLabel`,t),this.programs=e.map(function(e){return new e(r,i,a)})}return q(n,[{key:`reallocate`,value:function(e){this.programs.forEach(function(t){return t.reallocate(e)})}},{key:`process`,value:function(e,t,n,r,i){this.programs.forEach(function(a){return a.process(e,t,n,r,i)})}},{key:`render`,value:function(e){this.programs.forEach(function(t){return t.render(e)})}},{key:`kill`,value:function(){this.programs.forEach(function(e){return e.kill()})}}])}()}function Xt(e,t,n,r,i){var a=i.edgeLabelSize,o=i.edgeLabelFont,s=i.edgeLabelWeight,c=i.edgeLabelColor.attribute?t[i.edgeLabelColor.attribute]||i.edgeLabelColor.color||`#000`:i.edgeLabelColor.color,l=t.label;if(l){e.fillStyle=c,e.font=`${s} ${a}px ${o}`;var u=n.size,d=r.size,f=n.x,p=n.y,m=r.x,h=r.y,g=(f+m)/2,_=(p+h)/2,v=m-f,y=h-p,b=Math.sqrt(v*v+y*y);if(!(b<u+d)){f+=v*u/b,p+=y*u/b,m-=v*d/b,h-=y*d/b,g=(f+m)/2,_=(p+h)/2,v=m-f,y=h-p,b=Math.sqrt(v*v+y*y);var x=e.measureText(l).width;if(x>b){var S=`…`;for(l+=S,x=e.measureText(l).width;x>b&&l.length>1;)l=l.slice(0,-2)+S,x=e.measureText(l).width;if(l.length<4)return}var C=v>0?y>0?Math.acos(v/b):Math.asin(y/b):y>0?Math.acos(v/b)+Math.PI:Math.asin(v/b)+Math.PI/2;e.save(),e.translate(g,_),e.rotate(C),e.fillText(l,-x/2,t.size/2+a),e.restore()}}}function Zt(e,t,n){if(t.label){var r=n.labelSize,i=n.labelFont,a=n.labelWeight;e.fillStyle=n.labelColor.attribute?t[n.labelColor.attribute]||n.labelColor.color||`#000`:n.labelColor.color,e.font=`${a} ${r}px ${i}`,e.fillText(t.label,t.x+t.size+3,t.y+r/3)}}function Qt(e,t,n){var r=n.labelSize,i=n.labelFont;e.font=`${n.labelWeight} ${r}px ${i}`,e.fillStyle=`#FFF`,e.shadowOffsetX=0,e.shadowOffsetY=0,e.shadowBlur=8,e.shadowColor=`#000`;var a=2;if(typeof t.label==`string`){var o=e.measureText(t.label).width,s=Math.round(o+5),c=Math.round(r+2*a),l=Math.max(t.size,r/2)+a,u=Math.asin(c/2/l),d=Math.sqrt(Math.abs(l**2-(c/2)**2));e.beginPath(),e.moveTo(t.x+d,t.y+c/2),e.lineTo(t.x+l+s,t.y+c/2),e.lineTo(t.x+l+s,t.y-c/2),e.lineTo(t.x+d,t.y-c/2),e.arc(t.x,t.y,l,u,-u),e.closePath(),e.fill()}else e.beginPath(),e.arc(t.x,t.y,t.size+a,0,Math.PI*2),e.closePath(),e.fill();e.shadowOffsetX=0,e.shadowOffsetY=0,e.shadowBlur=0,Zt(e,t,n)}var $t=`-precision highp float;--varying vec4 v_color;-varying vec2 v_diffVector;-varying float v_radius;--uniform float u_correctionRatio;--const vec4 transparent = vec4(0.0, 0.0, 0.0, 0.0);--void main(void) {- float border = u_correctionRatio * 2.0;- float dist = length(v_diffVector) - v_radius + border;-- // No antialiasing for picking mode:- #ifdef PICKING_MODE- if (dist > border)- gl_FragColor = transparent;- else- gl_FragColor = v_color;-- #else- float t = 0.0;- if (dist > border)- t = 1.0;- else if (dist > 0.0)- t = dist / border;-- gl_FragColor = mix(v_color, transparent, t);- #endif-}-`,en=`-attribute vec4 a_id;-attribute vec4 a_color;-attribute vec2 a_position;-attribute float a_size;-attribute float a_angle;--uniform mat3 u_matrix;-uniform float u_sizeRatio;-uniform float u_correctionRatio;--varying vec4 v_color;-varying vec2 v_diffVector;-varying float v_radius;-varying float v_border;--const float bias = 255.0 / 254.0;--void main() {- float size = a_size * u_correctionRatio / u_sizeRatio * 4.0;- vec2 diffVector = size * vec2(cos(a_angle), sin(a_angle));- vec2 position = a_position + diffVector;- gl_Position = vec4(- (u_matrix * vec3(position, 1)).xy,- 0,- 1- );-- v_diffVector = diffVector;- v_radius = size / 2.0;-- #ifdef PICKING_MODE- // For picking mode, we use the ID as the color:- v_color = a_id;- #else- // For normal mode, we use the color:- v_color = a_color;- #endif-- v_color.a *= bias;-}-`,tn=WebGLRenderingContext,nn=tn.UNSIGNED_BYTE,rn=tn.FLOAT,an=[`u_sizeRatio`,`u_correctionRatio`,`u_matrix`],on=function(e){function t(){return K(this,t),J(this,t,arguments)}return Y(t,e),q(t,[{key:`getDefinition`,value:function(){return{VERTICES:3,VERTEX_SHADER_SOURCE:en,FRAGMENT_SHADER_SOURCE:$t,METHOD:WebGLRenderingContext.TRIANGLES,UNIFORMS:an,ATTRIBUTES:[{name:`a_position`,size:2,type:rn},{name:`a_size`,size:1,type:rn},{name:`a_color`,size:4,type:nn,normalized:!0},{name:`a_id`,size:4,type:nn,normalized:!0}],CONSTANT_ATTRIBUTES:[{name:`a_angle`,size:1,type:rn}],CONSTANT_DATA:[[t.ANGLE_1],[t.ANGLE_2],[t.ANGLE_3]]}}},{key:`processVisibleItem`,value:function(e,t,n){var r=this.array,i=Ot(n.color);r[t++]=n.x,r[t++]=n.y,r[t++]=n.size,r[t++]=i,r[t++]=e}},{key:`setUniforms`,value:function(e,t){var n=t.gl,r=t.uniformLocations,i=r.u_sizeRatio,a=r.u_correctionRatio,o=r.u_matrix;n.uniform1f(a,e.correctionRatio),n.uniform1f(i,e.sizeRatio),n.uniformMatrix3fv(o,!1,e.matrix)}}])}(qt);X(on,`ANGLE_1`,0),X(on,`ANGLE_2`,2*Math.PI/3),X(on,`ANGLE_3`,4*Math.PI/3);var sn=`-precision mediump float;--varying vec4 v_color;--void main(void) {- gl_FragColor = v_color;-}-`,cn=`-attribute vec2 a_position;-attribute vec2 a_normal;-attribute float a_radius;-attribute vec3 a_barycentric;--#ifdef PICKING_MODE-attribute vec4 a_id;-#else-attribute vec4 a_color;-#endif--uniform mat3 u_matrix;-uniform float u_sizeRatio;-uniform float u_correctionRatio;-uniform float u_minEdgeThickness;-uniform float u_lengthToThicknessRatio;-uniform float u_widenessToThicknessRatio;--varying vec4 v_color;--const float bias = 255.0 / 254.0;--void main() {- float minThickness = u_minEdgeThickness;-- float normalLength = length(a_normal);- vec2 unitNormal = a_normal / normalLength;-- // These first computations are taken from edge.vert.glsl and- // edge.clamped.vert.glsl. Please read it to get better comments on what's- // happening:- float pixelsThickness = max(normalLength / u_sizeRatio, minThickness);- float webGLThickness = pixelsThickness * u_correctionRatio;- float webGLNodeRadius = a_radius * 2.0 * u_correctionRatio / u_sizeRatio;- float webGLArrowHeadLength = webGLThickness * u_lengthToThicknessRatio * 2.0;- float webGLArrowHeadThickness = webGLThickness * u_widenessToThicknessRatio;-- float da = a_barycentric.x;- float db = a_barycentric.y;- float dc = a_barycentric.z;-- vec2 delta = vec2(- da * (webGLNodeRadius * unitNormal.y)- + db * ((webGLNodeRadius + webGLArrowHeadLength) * unitNormal.y + webGLArrowHeadThickness * unitNormal.x)- + dc * ((webGLNodeRadius + webGLArrowHeadLength) * unitNormal.y - webGLArrowHeadThickness * unitNormal.x),-- da * (-webGLNodeRadius * unitNormal.x)- + db * (-(webGLNodeRadius + webGLArrowHeadLength) * unitNormal.x + webGLArrowHeadThickness * unitNormal.y)- + dc * (-(webGLNodeRadius + webGLArrowHeadLength) * unitNormal.x - webGLArrowHeadThickness * unitNormal.y)- );-- vec2 position = (u_matrix * vec3(a_position + delta, 1)).xy;-- gl_Position = vec4(position, 0, 1);-- #ifdef PICKING_MODE- // For picking mode, we use the ID as the color:- v_color = a_id;- #else- // For normal mode, we use the color:- v_color = a_color;- #endif-- v_color.a *= bias;-}-`,ln=WebGLRenderingContext,un=ln.UNSIGNED_BYTE,dn=ln.FLOAT,fn=[`u_matrix`,`u_sizeRatio`,`u_correctionRatio`,`u_minEdgeThickness`,`u_lengthToThicknessRatio`,`u_widenessToThicknessRatio`],pn={extremity:`target`,lengthToThicknessRatio:2.5,widenessToThicknessRatio:2};function mn(e){var t=Z(Z({},pn),e||{});return function(e){function n(){return K(this,n),J(this,n,arguments)}return Y(n,e),q(n,[{key:`getDefinition`,value:function(){return{VERTICES:3,VERTEX_SHADER_SOURCE:cn,FRAGMENT_SHADER_SOURCE:sn,METHOD:WebGLRenderingContext.TRIANGLES,UNIFORMS:fn,ATTRIBUTES:[{name:`a_position`,size:2,type:dn},{name:`a_normal`,size:2,type:dn},{name:`a_radius`,size:1,type:dn},{name:`a_color`,size:4,type:un,normalized:!0},{name:`a_id`,size:4,type:un,normalized:!0}],CONSTANT_ATTRIBUTES:[{name:`a_barycentric`,size:3,type:dn}],CONSTANT_DATA:[[1,0,0],[0,1,0],[0,0,1]]}}},{key:`processVisibleItem`,value:function(e,n,r,i,a){if(t.extremity===`source`){var o=[i,r];r=o[0],i=o[1]}var s=a.size||1,c=i.size||1,l=r.x,u=r.y,d=i.x,f=i.y,p=Ot(a.color),m=d-l,h=f-u,g=m*m+h*h,_=0,v=0;g&&(g=1/Math.sqrt(g),_=-h*g*s,v=m*g*s);var y=this.array;y[n++]=d,y[n++]=f,y[n++]=-_,y[n++]=-v,y[n++]=c,y[n++]=p,y[n++]=e}},{key:`setUniforms`,value:function(e,n){var r=n.gl,i=n.uniformLocations,a=i.u_matrix,o=i.u_sizeRatio,s=i.u_correctionRatio,c=i.u_minEdgeThickness,l=i.u_lengthToThicknessRatio,u=i.u_widenessToThicknessRatio;r.uniformMatrix3fv(a,!1,e.matrix),r.uniform1f(o,e.sizeRatio),r.uniform1f(s,e.correctionRatio),r.uniform1f(c,e.minEdgeThickness),r.uniform1f(l,t.lengthToThicknessRatio),r.uniform1f(u,t.widenessToThicknessRatio)}}])}(Jt)}mn();var hn=`-precision mediump float;--varying vec4 v_color;-varying vec2 v_normal;-varying float v_thickness;-varying float v_feather;--const vec4 transparent = vec4(0.0, 0.0, 0.0, 0.0);--void main(void) {- // We only handle antialiasing for normal mode:- #ifdef PICKING_MODE- gl_FragColor = v_color;- #else- float dist = length(v_normal) * v_thickness;-- float t = smoothstep(- v_thickness - v_feather,- v_thickness,- dist- );-- gl_FragColor = mix(v_color, transparent, t);- #endif-}-`,gn=`-attribute vec4 a_id;-attribute vec4 a_color;-attribute vec2 a_normal;-attribute float a_normalCoef;-attribute vec2 a_positionStart;-attribute vec2 a_positionEnd;-attribute float a_positionCoef;-attribute float a_radius;-attribute float a_radiusCoef;--uniform mat3 u_matrix;-uniform float u_zoomRatio;-uniform float u_sizeRatio;-uniform float u_pixelRatio;-uniform float u_correctionRatio;-uniform float u_minEdgeThickness;-uniform float u_lengthToThicknessRatio;-uniform float u_feather;--varying vec4 v_color;-varying vec2 v_normal;-varying float v_thickness;-varying float v_feather;--const float bias = 255.0 / 254.0;--void main() {- float minThickness = u_minEdgeThickness;-- float radius = a_radius * a_radiusCoef;- vec2 normal = a_normal * a_normalCoef;- vec2 position = a_positionStart * (1.0 - a_positionCoef) + a_positionEnd * a_positionCoef;-- float normalLength = length(normal);- vec2 unitNormal = normal / normalLength;-- // These first computations are taken from edge.vert.glsl. Please read it to- // get better comments on what's happening:- float pixelsThickness = max(normalLength, minThickness * u_sizeRatio);- float webGLThickness = pixelsThickness * u_correctionRatio / u_sizeRatio;-- // Here, we move the point to leave space for the arrow head:- float direction = sign(radius);- float webGLNodeRadius = direction * radius * 2.0 * u_correctionRatio / u_sizeRatio;- float webGLArrowHeadLength = webGLThickness * u_lengthToThicknessRatio * 2.0;-- vec2 compensationVector = vec2(-direction * unitNormal.y, direction * unitNormal.x) * (webGLNodeRadius + webGLArrowHeadLength);-- // Here is the proper position of the vertex- gl_Position = vec4((u_matrix * vec3(position + unitNormal * webGLThickness + compensationVector, 1)).xy, 0, 1);-- v_thickness = webGLThickness / u_zoomRatio;-- v_normal = unitNormal;-- v_feather = u_feather * u_correctionRatio / u_zoomRatio / u_pixelRatio * 2.0;-- #ifdef PICKING_MODE- // For picking mode, we use the ID as the color:- v_color = a_id;- #else- // For normal mode, we use the color:- v_color = a_color;- #endif-- v_color.a *= bias;-}-`,_n=WebGLRenderingContext,vn=_n.UNSIGNED_BYTE,yn=_n.FLOAT,bn=[`u_matrix`,`u_zoomRatio`,`u_sizeRatio`,`u_correctionRatio`,`u_pixelRatio`,`u_feather`,`u_minEdgeThickness`,`u_lengthToThicknessRatio`],xn={lengthToThicknessRatio:pn.lengthToThicknessRatio};function Sn(e){var t=Z(Z({},xn),e||{});return function(e){function n(){return K(this,n),J(this,n,arguments)}return Y(n,e),q(n,[{key:`getDefinition`,value:function(){return{VERTICES:6,VERTEX_SHADER_SOURCE:gn,FRAGMENT_SHADER_SOURCE:hn,METHOD:WebGLRenderingContext.TRIANGLES,UNIFORMS:bn,ATTRIBUTES:[{name:`a_positionStart`,size:2,type:yn},{name:`a_positionEnd`,size:2,type:yn},{name:`a_normal`,size:2,type:yn},{name:`a_color`,size:4,type:vn,normalized:!0},{name:`a_id`,size:4,type:vn,normalized:!0},{name:`a_radius`,size:1,type:yn}],CONSTANT_ATTRIBUTES:[{name:`a_positionCoef`,size:1,type:yn},{name:`a_normalCoef`,size:1,type:yn},{name:`a_radiusCoef`,size:1,type:yn}],CONSTANT_DATA:[[0,1,0],[0,-1,0],[1,1,1],[1,1,1],[0,-1,0],[1,-1,-1]]}}},{key:`processVisibleItem`,value:function(e,t,n,r,i){var a=i.size||1,o=n.x,s=n.y,c=r.x,l=r.y,u=Ot(i.color),d=c-o,f=l-s,p=r.size||1,m=d*d+f*f,h=0,g=0;m&&(m=1/Math.sqrt(m),h=-f*m*a,g=d*m*a);var _=this.array;_[t++]=o,_[t++]=s,_[t++]=c,_[t++]=l,_[t++]=h,_[t++]=g,_[t++]=u,_[t++]=e,_[t++]=p}},{key:`setUniforms`,value:function(e,n){var r=n.gl,i=n.uniformLocations,a=i.u_matrix,o=i.u_zoomRatio,s=i.u_feather,c=i.u_pixelRatio,l=i.u_correctionRatio,u=i.u_sizeRatio,d=i.u_minEdgeThickness,f=i.u_lengthToThicknessRatio;r.uniformMatrix3fv(a,!1,e.matrix),r.uniform1f(o,e.zoomRatio),r.uniform1f(u,e.sizeRatio),r.uniform1f(l,e.correctionRatio),r.uniform1f(c,e.pixelRatio),r.uniform1f(s,e.antiAliasingFeather),r.uniform1f(d,e.minEdgeThickness),r.uniform1f(f,t.lengthToThicknessRatio)}}])}(Jt)}Sn();function Cn(e){return Yt([Sn(e),mn(e)])}var wn=Cn(),Tn=`-attribute vec4 a_id;-attribute vec4 a_color;-attribute vec2 a_normal;-attribute float a_normalCoef;-attribute vec2 a_positionStart;-attribute vec2 a_positionEnd;-attribute float a_positionCoef;--uniform mat3 u_matrix;-uniform float u_sizeRatio;-uniform float u_zoomRatio;-uniform float u_pixelRatio;-uniform float u_correctionRatio;-uniform float u_minEdgeThickness;-uniform float u_feather;--varying vec4 v_color;-varying vec2 v_normal;-varying float v_thickness;-varying float v_feather;--const float bias = 255.0 / 254.0;--void main() {- float minThickness = u_minEdgeThickness;-- vec2 normal = a_normal * a_normalCoef;- vec2 position = a_positionStart * (1.0 - a_positionCoef) + a_positionEnd * a_positionCoef;-- float normalLength = length(normal);- vec2 unitNormal = normal / normalLength;-- // We require edges to be at least "minThickness" pixels thick *on screen*- // (so we need to compensate the size ratio):- float pixelsThickness = max(normalLength, minThickness * u_sizeRatio);-- // Then, we need to retrieve the normalized thickness of the edge in the WebGL- // referential (in a ([0, 1], [0, 1]) space), using our "magic" correction- // ratio:- float webGLThickness = pixelsThickness * u_correctionRatio / u_sizeRatio;-- // Here is the proper position of the vertex- gl_Position = vec4((u_matrix * vec3(position + unitNormal * webGLThickness, 1)).xy, 0, 1);-- // For the fragment shader though, we need a thickness that takes the "magic"- // correction ratio into account (as in webGLThickness), but so that the- // antialiasing effect does not depend on the zoom level. So here's yet- // another thickness version:- v_thickness = webGLThickness / u_zoomRatio;-- v_normal = unitNormal;-- v_feather = u_feather * u_correctionRatio / u_zoomRatio / u_pixelRatio * 2.0;-- #ifdef PICKING_MODE- // For picking mode, we use the ID as the color:- v_color = a_id;- #else- // For normal mode, we use the color:- v_color = a_color;- #endif-- v_color.a *= bias;-}-`,En=WebGLRenderingContext,Dn=En.UNSIGNED_BYTE,On=En.FLOAT,kn=[`u_matrix`,`u_zoomRatio`,`u_sizeRatio`,`u_correctionRatio`,`u_pixelRatio`,`u_feather`,`u_minEdgeThickness`],An=function(e){function t(){return K(this,t),J(this,t,arguments)}return Y(t,e),q(t,[{key:`getDefinition`,value:function(){return{VERTICES:6,VERTEX_SHADER_SOURCE:Tn,FRAGMENT_SHADER_SOURCE:hn,METHOD:WebGLRenderingContext.TRIANGLES,UNIFORMS:kn,ATTRIBUTES:[{name:`a_positionStart`,size:2,type:On},{name:`a_positionEnd`,size:2,type:On},{name:`a_normal`,size:2,type:On},{name:`a_color`,size:4,type:Dn,normalized:!0},{name:`a_id`,size:4,type:Dn,normalized:!0}],CONSTANT_ATTRIBUTES:[{name:`a_positionCoef`,size:1,type:On},{name:`a_normalCoef`,size:1,type:On}],CONSTANT_DATA:[[0,1],[0,-1],[1,1],[1,1],[0,-1],[1,-1]]}}},{key:`processVisibleItem`,value:function(e,t,n,r,i){var a=i.size||1,o=n.x,s=n.y,c=r.x,l=r.y,u=Ot(i.color),d=c-o,f=l-s,p=d*d+f*f,m=0,h=0;p&&(p=1/Math.sqrt(p),m=-f*p*a,h=d*p*a);var g=this.array;g[t++]=o,g[t++]=s,g[t++]=c,g[t++]=l,g[t++]=m,g[t++]=h,g[t++]=u,g[t++]=e}},{key:`setUniforms`,value:function(e,t){var n=t.gl,r=t.uniformLocations,i=r.u_matrix,a=r.u_zoomRatio,o=r.u_feather,s=r.u_pixelRatio,c=r.u_correctionRatio,l=r.u_sizeRatio,u=r.u_minEdgeThickness;n.uniformMatrix3fv(i,!1,e.matrix),n.uniform1f(a,e.zoomRatio),n.uniform1f(l,e.sizeRatio),n.uniform1f(c,e.correctionRatio),n.uniform1f(s,e.pixelRatio),n.uniform1f(o,e.antiAliasingFeather),n.uniform1f(u,e.minEdgeThickness)}}])}(Jt),jn=function(e){function t(){var e;return K(this,t),e=J(this,t),e.rawEmitter=e,e}return Y(t,e),q(t)}(n.EventEmitter),Mn=t(((e,t)=>{t.exports=function(e){return typeof e==`object`&&!!e&&typeof e.addUndirectedEdgeWithKey==`function`&&typeof e.dropNode==`function`&&typeof e.multi==`boolean`}})),Nn=e(Mn()),Pn={linear:function(e){return e},quadraticIn:function(e){return e*e},quadraticOut:function(e){return e*(2-e)},quadraticInOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)},cubicIn:function(e){return e*e*e},cubicOut:function(e){return--e*e*e+1},cubicInOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)}},Fn={easing:`quadraticInOut`,duration:150};function Q(){return Float32Array.of(1,0,0,0,1,0,0,0,1)}function In(e,t,n){return e[0]=t,e[4]=typeof n==`number`?n:t,e}function Ln(e,t){var n=Math.sin(t),r=Math.cos(t);return e[0]=r,e[1]=n,e[3]=-n,e[4]=r,e}function Rn(e,t,n){return e[6]=t,e[7]=n,e}function zn(e,t){var n=e[0],r=e[1],i=e[2],a=e[3],o=e[4],s=e[5],c=e[6],l=e[7],u=e[8],d=t[0],f=t[1],p=t[2],m=t[3],h=t[4],g=t[5],_=t[6],v=t[7],y=t[8];return e[0]=d*n+f*a+p*c,e[1]=d*r+f*o+p*l,e[2]=d*i+f*s+p*u,e[3]=m*n+h*a+g*c,e[4]=m*r+h*o+g*l,e[5]=m*i+h*s+g*u,e[6]=_*n+v*a+y*c,e[7]=_*r+v*o+y*l,e[8]=_*i+v*s+y*u,e}function Bn(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,r=e[0],i=e[1],a=e[3],o=e[4],s=e[6],c=e[7],l=t.x,u=t.y;return{x:l*r+u*a+s*n,y:l*i+u*o+c*n}}function Vn(e,t){var n=e.height/e.width,r=t.height/t.width;return n<1&&r>1||n>1&&r<1?1:Math.min(Math.max(r,1/r),Math.max(1/n,n))}function Hn(e,t,n,r,i){var a=e.angle,o=e.ratio,s=e.x,c=e.y,l=t.width,u=t.height,d=Q(),f=Math.min(l,u)-2*r,p=Vn(t,n);return i?(zn(d,Rn(Q(),s,c)),zn(d,In(Q(),o)),zn(d,Ln(Q(),a)),zn(d,In(Q(),l/f/2/p,u/f/2/p))):(zn(d,In(Q(),f/l*2*p,f/u*2*p)),zn(d,Ln(Q(),-a)),zn(d,In(Q(),1/o)),zn(d,Rn(Q(),-s,-c))),d}function Un(e,t,n){var r=Bn(e,{x:Math.cos(t.angle),y:Math.sin(t.angle)},0),i=r.x,a=r.y;return 1/Math.sqrt(i**2+a**2)/n.width}function Wn(e){if(!e.order)return{x:[0,1],y:[0,1]};var t=1/0,n=-1/0,r=1/0,i=-1/0;return e.forEachNode(function(e,a){var o=a.x,s=a.y;o<t&&(t=o),o>n&&(n=o),s<r&&(r=s),s>i&&(i=s)}),{x:[t,n],y:[r,i]}}function Gn(e){if(!(0,Nn.default)(e))throw Error(`Sigma: invalid graph instance.`);e.forEachNode(function(e,t){if(!Number.isFinite(t.x)||!Number.isFinite(t.y))throw Error(`Sigma: Coordinates of node ${e} are invalid. A node must have a numeric 'x' and 'y' attribute.`)})}function Kn(e,t,n){var r=document.createElement(e);if(t)for(var i in t)r.style[i]=t[i];if(n)for(var a in n)r.setAttribute(a,n[a]);return r}function qn(){return window.devicePixelRatio===void 0?1:window.devicePixelRatio}function Jn(e,t,n){return n.sort(function(e,n){var r=t(e)||0,i=t(n)||0;return r<i?-1:r>i?1:0})}function Yn(e){var t=_t(e.x,2),n=t[0],r=t[1],i=_t(e.y,2),a=i[0],o=i[1],s=Math.max(r-n,o-a),c=(r+n)/2,l=(o+a)/2;(s===0||Math.abs(s)===1/0||isNaN(s))&&(s=1),isNaN(c)&&(c=0),isNaN(l)&&(l=0);var u=function(e){return{x:.5+(e.x-c)/s,y:.5+(e.y-l)/s}};return u.applyTo=function(e){e.x=.5+(e.x-c)/s,e.y=.5+(e.y-l)/s},u.inverse=function(e){return{x:c+s*(e.x-.5),y:l+s*(e.y-.5)}},u.ratio=s,u}function Xn(e){"@babel/helpers - typeof";return Xn=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Xn(e)}function Zn(e,t){var n=t.size;if(n!==0){var r=e.length;e.length+=n;var i=0;t.forEach(function(t){e[r+i]=t,i++})}}function Qn(e){e||={};for(var t=0,n=arguments.length<=1?0:arguments.length-1;t<n;t++){var r=t+1<1||arguments.length<=t+1?void 0:arguments[t+1];r&&Object.assign(e,r)}return e}var $n={hideEdgesOnMove:!1,hideLabelsOnMove:!1,renderLabels:!0,renderEdgeLabels:!1,enableEdgeEvents:!1,defaultNodeColor:`#999`,defaultNodeType:`circle`,defaultEdgeColor:`#ccc`,defaultEdgeType:`line`,labelFont:`Arial`,labelSize:14,labelWeight:`normal`,labelColor:{color:`#000`},edgeLabelFont:`Arial`,edgeLabelSize:14,edgeLabelWeight:`normal`,edgeLabelColor:{attribute:`color`},stagePadding:30,defaultDrawEdgeLabel:Xt,defaultDrawNodeLabel:Zt,defaultDrawNodeHover:Qt,minEdgeThickness:1.7,antiAliasingFeather:1,dragTimeout:100,draggedEventsTolerance:3,inertiaDuration:200,inertiaRatio:3,zoomDuration:250,zoomingRatio:1.7,doubleClickTimeout:300,doubleClickZoomingRatio:2.2,doubleClickZoomingDuration:200,tapMoveTolerance:10,zoomToSizeRatioFunction:Math.sqrt,itemSizesReference:`screen`,autoRescale:!0,autoCenter:!0,labelDensity:1,labelGridCellSize:100,labelRenderedSizeThreshold:6,nodeReducer:null,edgeReducer:null,zIndex:!1,minCameraRatio:null,maxCameraRatio:null,enableCameraZooming:!0,enableCameraPanning:!0,enableCameraRotation:!0,cameraPanBoundaries:null,allowInvalidContainer:!1,nodeProgramClasses:{},nodeHoverProgramClasses:{},edgeProgramClasses:{}},er={circle:on},tr={arrow:wn,line:An};function nr(e){if(typeof e.labelDensity!=`number`||e.labelDensity<0)throw Error("Settings: invalid `labelDensity`. Expecting a positive number.");var t=e.minCameraRatio,n=e.maxCameraRatio;if(typeof t==`number`&&typeof n==`number`&&n<t)throw Error("Settings: invalid camera ratio boundaries. Expecting `maxCameraRatio` to be greater than `minCameraRatio`.")}function rr(e){var t=Qn({},$n,e);return t.nodeProgramClasses=Qn({},er,t.nodeProgramClasses),t.edgeProgramClasses=Qn({},tr,t.edgeProgramClasses),t}var ir=1.5,ar=function(e){function t(){var e;return K(this,t),e=J(this,t),X(e,`x`,.5),X(e,`y`,.5),X(e,`angle`,0),X(e,`ratio`,1),X(e,`minRatio`,null),X(e,`maxRatio`,null),X(e,`enabledZooming`,!0),X(e,`enabledPanning`,!0),X(e,`enabledRotation`,!0),X(e,`clean`,null),X(e,`nextFrame`,null),X(e,`previousState`,null),X(e,`enabled`,!0),e.previousState=e.getState(),e}return Y(t,e),q(t,[{key:`enable`,value:function(){return this.enabled=!0,this}},{key:`disable`,value:function(){return this.enabled=!1,this}},{key:`getState`,value:function(){return{x:this.x,y:this.y,angle:this.angle,ratio:this.ratio}}},{key:`hasState`,value:function(e){return this.x===e.x&&this.y===e.y&&this.ratio===e.ratio&&this.angle===e.angle}},{key:`getPreviousState`,value:function(){var e=this.previousState;return e?{x:e.x,y:e.y,angle:e.angle,ratio:e.ratio}:null}},{key:`getBoundedRatio`,value:function(e){var t=e;return typeof this.minRatio==`number`&&(t=Math.max(t,this.minRatio)),typeof this.maxRatio==`number`&&(t=Math.min(t,this.maxRatio)),t}},{key:`validateState`,value:function(e){var t={};return this.enabledPanning&&typeof e.x==`number`&&(t.x=e.x),this.enabledPanning&&typeof e.y==`number`&&(t.y=e.y),this.enabledZooming&&typeof e.ratio==`number`&&(t.ratio=this.getBoundedRatio(e.ratio)),this.enabledRotation&&typeof e.angle==`number`&&(t.angle=e.angle),this.clean?this.clean(Z(Z({},this.getState()),t)):t}},{key:`isAnimated`,value:function(){return!!this.nextFrame}},{key:`setState`,value:function(e){if(!this.enabled)return this;this.previousState=this.getState();var t=this.validateState(e);return typeof t.x==`number`&&(this.x=t.x),typeof t.y==`number`&&(this.y=t.y),typeof t.ratio==`number`&&(this.ratio=t.ratio),typeof t.angle==`number`&&(this.angle=t.angle),this.hasState(this.previousState)||this.emit(`updated`,this.getState()),this}},{key:`updateState`,value:function(e){return this.setState(e(this.getState())),this}},{key:`animate`,value:function(e){var t=this,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0;if(!r)return new Promise(function(r){return t.animate(e,n,r)});if(this.enabled){var i=Z(Z({},Fn),n),a=this.validateState(e),o=typeof i.easing==`function`?i.easing:Pn[i.easing],s=Date.now(),c=this.getState(),l=function(){var e=(Date.now()-s)/i.duration;if(e>=1){t.nextFrame=null,t.setState(a),t.animationCallback&&=(t.animationCallback.call(null),void 0);return}var n=o(e),r={};typeof a.x==`number`&&(r.x=c.x+(a.x-c.x)*n),typeof a.y==`number`&&(r.y=c.y+(a.y-c.y)*n),t.enabledRotation&&typeof a.angle==`number`&&(r.angle=c.angle+(a.angle-c.angle)*n),typeof a.ratio==`number`&&(r.ratio=c.ratio+(a.ratio-c.ratio)*n),t.setState(r),t.nextFrame=requestAnimationFrame(l)};this.nextFrame?(cancelAnimationFrame(this.nextFrame),this.animationCallback&&this.animationCallback.call(null),this.nextFrame=requestAnimationFrame(l)):l(),this.animationCallback=r}}},{key:`animatedZoom`,value:function(e){return e?typeof e==`number`?this.animate({ratio:this.ratio/e}):this.animate({ratio:this.ratio/(e.factor||ir)},e):this.animate({ratio:this.ratio/ir})}},{key:`animatedUnzoom`,value:function(e){return e?typeof e==`number`?this.animate({ratio:this.ratio*e}):this.animate({ratio:this.ratio*(e.factor||ir)},e):this.animate({ratio:this.ratio*ir})}},{key:`animatedReset`,value:function(e){return this.animate({x:.5,y:.5,ratio:1,angle:0},e)}},{key:`copy`,value:function(){return t.from(this.getState())}}],[{key:`from`,value:function(e){return new t().setState(e)}}])}(jn);function $(e,t){var n=t.getBoundingClientRect();return{x:e.clientX-n.left,y:e.clientY-n.top}}function or(e,t){var n=Z(Z({},$(e,t)),{},{sigmaDefaultPrevented:!1,preventSigmaDefault:function(){n.sigmaDefaultPrevented=!0},original:e});return n}function sr(e){var t=`x`in e?e:Z(Z({},e.touches[0]||e.previousTouches[0]),{},{original:e.original,sigmaDefaultPrevented:e.sigmaDefaultPrevented,preventSigmaDefault:function(){e.sigmaDefaultPrevented=!0,t.sigmaDefaultPrevented=!0}});return t}function cr(e,t){return Z(Z({},or(e,t)),{},{delta:fr(e)})}var lr=2;function ur(e){for(var t=[],n=0,r=Math.min(e.length,lr);n<r;n++)t.push(e[n]);return t}function dr(e,t,n){var r={touches:ur(e.touches).map(function(e){return $(e,n)}),previousTouches:t.map(function(e){return $(e,n)}),sigmaDefaultPrevented:!1,preventSigmaDefault:function(){r.sigmaDefaultPrevented=!0},original:e};return r}function fr(e){if(e.deltaY!==void 0)return e.deltaY*-3/360;if(e.detail!==void 0)return e.detail/-9;throw Error(`Captor: could not extract delta from event.`)}var pr=function(e){function t(e,n){var r;return K(this,t),r=J(this,t),r.container=e,r.renderer=n,r}return Y(t,e),q(t)}(jn),mr=[`doubleClickTimeout`,`doubleClickZoomingDuration`,`doubleClickZoomingRatio`,`dragTimeout`,`draggedEventsTolerance`,`inertiaDuration`,`inertiaRatio`,`zoomDuration`,`zoomingRatio`].reduce(function(e,t){return Z(Z({},e),{},X({},t,$n[t]))},{}),hr=function(e){function t(e,n){var r;return K(this,t),r=J(this,t,[e,n]),X(r,`enabled`,!0),X(r,`draggedEvents`,0),X(r,`downStartTime`,null),X(r,`lastMouseX`,null),X(r,`lastMouseY`,null),X(r,`isMouseDown`,!1),X(r,`isMoving`,!1),X(r,`movingTimeout`,null),X(r,`startCameraState`,null),X(r,`clicks`,0),X(r,`doubleClickTimeout`,null),X(r,`currentWheelDirection`,0),X(r,`settings`,mr),r.handleClick=r.handleClick.bind(r),r.handleRightClick=r.handleRightClick.bind(r),r.handleDown=r.handleDown.bind(r),r.handleUp=r.handleUp.bind(r),r.handleMove=r.handleMove.bind(r),r.handleWheel=r.handleWheel.bind(r),r.handleLeave=r.handleLeave.bind(r),r.handleEnter=r.handleEnter.bind(r),e.addEventListener(`click`,r.handleClick,{capture:!1}),e.addEventListener(`contextmenu`,r.handleRightClick,{capture:!1}),e.addEventListener(`mousedown`,r.handleDown,{capture:!1}),e.addEventListener(`wheel`,r.handleWheel,{capture:!1}),e.addEventListener(`mouseleave`,r.handleLeave,{capture:!1}),e.addEventListener(`mouseenter`,r.handleEnter,{capture:!1}),document.addEventListener(`mousemove`,r.handleMove,{capture:!1}),document.addEventListener(`mouseup`,r.handleUp,{capture:!1}),r}return Y(t,e),q(t,[{key:`kill`,value:function(){var e=this.container;e.removeEventListener(`click`,this.handleClick),e.removeEventListener(`contextmenu`,this.handleRightClick),e.removeEventListener(`mousedown`,this.handleDown),e.removeEventListener(`wheel`,this.handleWheel),e.removeEventListener(`mouseleave`,this.handleLeave),e.removeEventListener(`mouseenter`,this.handleEnter),document.removeEventListener(`mousemove`,this.handleMove),document.removeEventListener(`mouseup`,this.handleUp)}},{key:`handleClick`,value:function(e){var t=this;if(this.enabled){if(this.clicks++,this.clicks===2)return this.clicks=0,typeof this.doubleClickTimeout==`number`&&(clearTimeout(this.doubleClickTimeout),this.doubleClickTimeout=null),this.handleDoubleClick(e);setTimeout(function(){t.clicks=0,t.doubleClickTimeout=null},this.settings.doubleClickTimeout),this.draggedEvents<this.settings.draggedEventsTolerance&&this.emit(`click`,or(e,this.container))}}},{key:`handleRightClick`,value:function(e){this.enabled&&this.emit(`rightClick`,or(e,this.container))}},{key:`handleDoubleClick`,value:function(e){if(this.enabled){e.preventDefault(),e.stopPropagation();var t=or(e,this.container);if(this.emit(`doubleClick`,t),!t.sigmaDefaultPrevented){var n=this.renderer.getCamera(),r=n.getBoundedRatio(n.getState().ratio/this.settings.doubleClickZoomingRatio);n.animate(this.renderer.getViewportZoomedState($(e,this.container),r),{easing:`quadraticInOut`,duration:this.settings.doubleClickZoomingDuration})}}}},{key:`handleDown`,value:function(e){if(this.enabled){if(e.button===0){this.startCameraState=this.renderer.getCamera().getState();var t=$(e,this.container),n=t.x,r=t.y;this.lastMouseX=n,this.lastMouseY=r,this.draggedEvents=0,this.downStartTime=Date.now(),this.isMouseDown=!0}this.emit(`mousedown`,or(e,this.container))}}},{key:`handleUp`,value:function(e){var t=this;if(!(!this.enabled||!this.isMouseDown)){var n=this.renderer.getCamera();this.isMouseDown=!1,typeof this.movingTimeout==`number`&&(clearTimeout(this.movingTimeout),this.movingTimeout=null);var r=$(e,this.container),i=r.x,a=r.y,o=n.getState(),s=n.getPreviousState()||{x:0,y:0};this.isMoving?n.animate({x:o.x+this.settings.inertiaRatio*(o.x-s.x),y:o.y+this.settings.inertiaRatio*(o.y-s.y)},{duration:this.settings.inertiaDuration,easing:`quadraticOut`}):(this.lastMouseX!==i||this.lastMouseY!==a)&&n.setState({x:o.x,y:o.y}),this.isMoving=!1,setTimeout(function(){var e=t.draggedEvents>0;t.draggedEvents=0,e&&t.renderer.getSetting(`hideEdgesOnMove`)&&t.renderer.refresh()},0),this.emit(`mouseup`,or(e,this.container))}}},{key:`handleMove`,value:function(e){var t=this;if(this.enabled){var n=or(e,this.container);if(this.emit(`mousemovebody`,n),(e.target===this.container||e.composedPath()[0]===this.container)&&this.emit(`mousemove`,n),!n.sigmaDefaultPrevented&&this.isMouseDown){this.isMoving=!0,this.draggedEvents++,typeof this.movingTimeout==`number`&&clearTimeout(this.movingTimeout),this.movingTimeout=window.setTimeout(function(){t.movingTimeout=null,t.isMoving=!1},this.settings.dragTimeout);var r=this.renderer.getCamera(),i=$(e,this.container),a=i.x,o=i.y,s=this.renderer.viewportToFramedGraph({x:this.lastMouseX,y:this.lastMouseY}),c=this.renderer.viewportToFramedGraph({x:a,y:o}),l=s.x-c.x,u=s.y-c.y,d=r.getState(),f=d.x+l,p=d.y+u;r.setState({x:f,y:p}),this.lastMouseX=a,this.lastMouseY=o,e.preventDefault(),e.stopPropagation()}}}},{key:`handleLeave`,value:function(e){this.emit(`mouseleave`,or(e,this.container))}},{key:`handleEnter`,value:function(e){this.emit(`mouseenter`,or(e,this.container))}},{key:`handleWheel`,value:function(e){var t=this,n=this.renderer.getCamera();if(!(!this.enabled||!n.enabledZooming)){var r=fr(e);if(r){var i=cr(e,this.container);if(this.emit(`wheel`,i),i.sigmaDefaultPrevented){e.preventDefault(),e.stopPropagation();return}var a=n.getState().ratio,o=r>0?1/this.settings.zoomingRatio:this.settings.zoomingRatio,s=n.getBoundedRatio(a*o),c=r>0?1:-1,l=Date.now();a!==s&&(e.preventDefault(),e.stopPropagation(),!(this.currentWheelDirection===c&&this.lastWheelTriggerTime&&l-this.lastWheelTriggerTime<this.settings.zoomDuration/5)&&(n.animate(this.renderer.getViewportZoomedState($(e,this.container),s),{easing:`quadraticOut`,duration:this.settings.zoomDuration},function(){t.currentWheelDirection=0}),this.currentWheelDirection=c,this.lastWheelTriggerTime=l))}}}},{key:`setSettings`,value:function(e){this.settings=e}}])}(pr),gr=[`dragTimeout`,`inertiaDuration`,`inertiaRatio`,`doubleClickTimeout`,`doubleClickZoomingRatio`,`doubleClickZoomingDuration`,`tapMoveTolerance`].reduce(function(e,t){return Z(Z({},e),{},X({},t,$n[t]))},{}),_r=function(e){function t(e,n){var r;return K(this,t),r=J(this,t,[e,n]),X(r,`enabled`,!0),X(r,`isMoving`,!1),X(r,`hasMoved`,!1),X(r,`touchMode`,0),X(r,`startTouchesPositions`,[]),X(r,`lastTouches`,[]),X(r,`lastTap`,null),X(r,`settings`,gr),r.handleStart=r.handleStart.bind(r),r.handleLeave=r.handleLeave.bind(r),r.handleMove=r.handleMove.bind(r),e.addEventListener(`touchstart`,r.handleStart,{capture:!1}),e.addEventListener(`touchcancel`,r.handleLeave,{capture:!1}),document.addEventListener(`touchend`,r.handleLeave,{capture:!1,passive:!1}),document.addEventListener(`touchmove`,r.handleMove,{capture:!1,passive:!1}),r}return Y(t,e),q(t,[{key:`kill`,value:function(){var e=this.container;e.removeEventListener(`touchstart`,this.handleStart),e.removeEventListener(`touchcancel`,this.handleLeave),document.removeEventListener(`touchend`,this.handleLeave),document.removeEventListener(`touchmove`,this.handleMove)}},{key:`getDimensions`,value:function(){return{width:this.container.offsetWidth,height:this.container.offsetHeight}}},{key:`handleStart`,value:function(e){var t=this;if(this.enabled){e.preventDefault();var n=ur(e.touches);if(this.touchMode=n.length,this.startCameraState=this.renderer.getCamera().getState(),this.startTouchesPositions=n.map(function(e){return $(e,t.container)}),this.touchMode===2){var r=_t(this.startTouchesPositions,2),i=r[0],a=i.x,o=i.y,s=r[1],c=s.x,l=s.y;this.startTouchesAngle=Math.atan2(l-o,c-a),this.startTouchesDistance=Math.sqrt((c-a)**2+(l-o)**2)}this.emit(`touchdown`,dr(e,this.lastTouches,this.container)),this.lastTouches=n,this.lastTouchesPositions=this.startTouchesPositions}}},{key:`handleLeave`,value:function(e){if(!(!this.enabled||!this.startTouchesPositions.length)){switch(e.cancelable&&e.preventDefault(),this.movingTimeout&&(this.isMoving=!1,clearTimeout(this.movingTimeout)),this.touchMode){case 2:if(e.touches.length===1){this.handleStart(e),e.preventDefault();break}case 1:if(this.isMoving){var t=this.renderer.getCamera(),n=t.getState(),r=t.getPreviousState()||{x:0,y:0};t.animate({x:n.x+this.settings.inertiaRatio*(n.x-r.x),y:n.y+this.settings.inertiaRatio*(n.y-r.y)},{duration:this.settings.inertiaDuration,easing:`quadraticOut`})}this.hasMoved=!1,this.isMoving=!1,this.touchMode=0;break}if(this.emit(`touchup`,dr(e,this.lastTouches,this.container)),!e.touches.length){var i=$(this.lastTouches[0],this.container),a=this.startTouchesPositions[0],o=(i.x-a.x)**2+(i.y-a.y)**2;if(!e.touches.length&&o<this.settings.tapMoveTolerance**2)if(this.lastTap&&Date.now()-this.lastTap.time<this.settings.doubleClickTimeout){var s=dr(e,this.lastTouches,this.container);if(this.emit(`doubletap`,s),this.lastTap=null,!s.sigmaDefaultPrevented){var c=this.renderer.getCamera(),l=c.getBoundedRatio(c.getState().ratio/this.settings.doubleClickZoomingRatio);c.animate(this.renderer.getViewportZoomedState(i,l),{easing:`quadraticInOut`,duration:this.settings.doubleClickZoomingDuration})}}else{var u=dr(e,this.lastTouches,this.container);this.emit(`tap`,u),this.lastTap={time:Date.now(),position:u.touches[0]||u.previousTouches[0]}}}this.lastTouches=ur(e.touches),this.startTouchesPositions=[]}}},{key:`handleMove`,value:function(e){var t=this;if(!(!this.enabled||!this.startTouchesPositions.length)){e.preventDefault();var n=ur(e.touches),r=n.map(function(e){return $(e,t.container)}),i=this.lastTouches;this.lastTouches=n,this.lastTouchesPositions=r;var a=dr(e,i,this.container);if(this.emit(`touchmove`,a),!a.sigmaDefaultPrevented&&(this.hasMoved||=r.some(function(e,n){var r=t.startTouchesPositions[n];return r&&(e.x!==r.x||e.y!==r.y)}),this.hasMoved)){this.isMoving=!0,this.movingTimeout&&clearTimeout(this.movingTimeout),this.movingTimeout=window.setTimeout(function(){t.isMoving=!1},this.settings.dragTimeout);var o=this.renderer.getCamera(),s=this.startCameraState,c=this.renderer.getSetting(`stagePadding`);switch(this.touchMode){case 1:var l=this.renderer.viewportToFramedGraph((this.startTouchesPositions||[])[0]),u=l.x,d=l.y,f=this.renderer.viewportToFramedGraph(r[0]),p=f.x,m=f.y;o.setState({x:s.x+u-p,y:s.y+d-m});break;case 2:var h={x:.5,y:.5,angle:0,ratio:1},g=r[0],_=g.x,v=g.y,y=r[1],b=y.x,x=y.y,S=Math.atan2(x-v,b-_)-this.startTouchesAngle,C=Math.hypot(x-v,b-_)/this.startTouchesDistance,w=o.getBoundedRatio(s.ratio/C);h.ratio=w,h.angle=s.angle+S;var T=this.getDimensions(),E=this.renderer.viewportToFramedGraph((this.startTouchesPositions||[])[0],{cameraState:s}),D=Math.min(T.width,T.height)-2*c,O=D/T.width,ee=D/T.height,te=w/D,k=_-D/2/O,A=v-D/2/ee,j=[k*Math.cos(-h.angle)-A*Math.sin(-h.angle),A*Math.cos(-h.angle)+k*Math.sin(-h.angle)];k=j[0],A=j[1],h.x=E.x-k*te,h.y=E.y+A*te,o.setState(h);break}}}}},{key:`setSettings`,value:function(e){this.settings=e}}])}(pr);function vr(e){if(Array.isArray(e))return mt(e)}function yr(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function br(){throw TypeError(`Invalid attempt to spread non-iterable instance.-In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function xr(e){return vr(e)||yr(e)||ht(e)||br()}function Sr(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Cr(e,t){if(e==null)return{};var n,r,i=Sr(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var wr=function(){function e(t,n){K(this,e),this.key=t,this.size=n}return q(e,null,[{key:`compare`,value:function(e,t){return e.size>t.size?-1:e.size<t.size||e.key>t.key?1:-1}}])}(),Tr=function(){function e(){K(this,e),X(this,`width`,0),X(this,`height`,0),X(this,`cellSize`,0),X(this,`columns`,0),X(this,`rows`,0),X(this,`cells`,{})}return q(e,[{key:`resizeAndClear`,value:function(e,t){this.width=e.width,this.height=e.height,this.cellSize=t,this.columns=Math.ceil(e.width/t),this.rows=Math.ceil(e.height/t),this.cells={}}},{key:`getIndex`,value:function(e){var t=Math.floor(e.x/this.cellSize);return Math.floor(e.y/this.cellSize)*this.columns+t}},{key:`add`,value:function(e,t,n){var r=new wr(e,t),i=this.getIndex(n),a=this.cells[i];a||(a=[],this.cells[i]=a),a.push(r)}},{key:`organize`,value:function(){for(var e in this.cells)this.cells[e].sort(wr.compare)}},{key:`getLabelsToDisplay`,value:function(e,t){var n=this.cellSize*this.cellSize,r=n/e/e*t/n,i=Math.ceil(r),a=[];for(var o in this.cells)for(var s=this.cells[o],c=0;c<Math.min(i,s.length);c++)a.push(s[c].key);return a}}])}();function Er(e){var t=e.graph,n=e.hoveredNode,r=e.highlightedNodes,i=e.displayedNodeLabels,a=[];return t.forEachEdge(function(e,t,o,s){(o===n||s===n||r.has(o)||r.has(s)||i.has(o)&&i.has(s))&&a.push(e)}),a}var Dr=150,Or=50,kr=Object.prototype.hasOwnProperty;function Ar(e,t,n){if(!kr.call(n,`x`)||!kr.call(n,`y`))throw Error(`Sigma: could not find a valid position (x, y) for node "${t}". All your nodes must have a number "x" and "y". Maybe your forgot to apply a layout or your "nodeReducer" is not returning the correct data?`);return n.color||=e.defaultNodeColor,!n.label&&n.label!==``&&(n.label=null),n.label!==void 0&&n.label!==null?n.label=``+n.label:n.label=null,n.size||=2,kr.call(n,`hidden`)||(n.hidden=!1),kr.call(n,`highlighted`)||(n.highlighted=!1),kr.call(n,`forceLabel`)||(n.forceLabel=!1),(!n.type||n.type===``)&&(n.type=e.defaultNodeType),n.zIndex||=0,n}function jr(e,t,n){return n.color||=e.defaultEdgeColor,n.label||=``,n.size||=.5,kr.call(n,`hidden`)||(n.hidden=!1),kr.call(n,`forceLabel`)||(n.forceLabel=!1),(!n.type||n.type===``)&&(n.type=e.defaultEdgeType),n.zIndex||=0,n}var Mr=function(e){function t(e,n){var r,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(K(this,t),r=J(this,t),X(r,`elements`,{}),X(r,`canvasContexts`,{}),X(r,`webGLContexts`,{}),X(r,`pickingLayers`,new Set),X(r,`textures`,{}),X(r,`frameBuffers`,{}),X(r,`activeListeners`,{}),X(r,`labelGrid`,new Tr),X(r,`nodeDataCache`,{}),X(r,`edgeDataCache`,{}),X(r,`nodeProgramIndex`,{}),X(r,`edgeProgramIndex`,{}),X(r,`nodesWithForcedLabels`,new Set),X(r,`edgesWithForcedLabels`,new Set),X(r,`nodeExtent`,{x:[0,1],y:[0,1]}),X(r,`nodeZExtent`,[1/0,-1/0]),X(r,`edgeZExtent`,[1/0,-1/0]),X(r,`matrix`,Q()),X(r,`invMatrix`,Q()),X(r,`correctionRatio`,1),X(r,`customBBox`,null),X(r,`normalizationFunction`,Yn({x:[0,1],y:[0,1]})),X(r,`graphToViewportRatio`,1),X(r,`itemIDsIndex`,{}),X(r,`nodeIndices`,{}),X(r,`edgeIndices`,{}),X(r,`width`,0),X(r,`height`,0),X(r,`pixelRatio`,qn()),X(r,`pickingDownSizingRatio`,2*r.pixelRatio),X(r,`displayedNodeLabels`,new Set),X(r,`displayedEdgeLabels`,new Set),X(r,`highlightedNodes`,new Set),X(r,`hoveredNode`,null),X(r,`hoveredEdge`,null),X(r,`renderFrame`,null),X(r,`renderHighlightedNodesFrame`,null),X(r,`needToProcess`,!1),X(r,`checkEdgesEventsFrame`,null),X(r,`nodePrograms`,{}),X(r,`nodeHoverPrograms`,{}),X(r,`edgePrograms`,{}),r.settings=rr(i),nr(r.settings),Gn(e),!(n instanceof HTMLElement))throw Error(`Sigma: container should be an html element.`);for(var a in r.graph=e,r.container=n,r.createWebGLContext(`edges`,{picking:i.enableEdgeEvents}),r.createCanvasContext(`edgeLabels`),r.createWebGLContext(`nodes`,{picking:!0}),r.createCanvasContext(`labels`),r.createCanvasContext(`hovers`),r.createWebGLContext(`hoverNodes`),r.createCanvasContext(`mouse`,{style:{touchAction:`none`,userSelect:`none`}}),r.resize(),r.settings.nodeProgramClasses)r.registerNodeProgram(a,r.settings.nodeProgramClasses[a],r.settings.nodeHoverProgramClasses[a]);for(var o in r.settings.edgeProgramClasses)r.registerEdgeProgram(o,r.settings.edgeProgramClasses[o]);return r.camera=new ar,r.bindCameraHandlers(),r.mouseCaptor=new hr(r.elements.mouse,r),r.mouseCaptor.setSettings(r.settings),r.touchCaptor=new _r(r.elements.mouse,r),r.touchCaptor.setSettings(r.settings),r.bindEventHandlers(),r.bindGraphHandlers(),r.handleSettingsUpdate(),r.refresh(),r}return Y(t,e),q(t,[{key:`registerNodeProgram`,value:function(e,t,n){return this.nodePrograms[e]&&this.nodePrograms[e].kill(),this.nodeHoverPrograms[e]&&this.nodeHoverPrograms[e].kill(),this.nodePrograms[e]=new t(this.webGLContexts.nodes,this.frameBuffers.nodes,this),this.nodeHoverPrograms[e]=new(n||t)(this.webGLContexts.hoverNodes,null,this),this}},{key:`registerEdgeProgram`,value:function(e,t){return this.edgePrograms[e]&&this.edgePrograms[e].kill(),this.edgePrograms[e]=new t(this.webGLContexts.edges,this.frameBuffers.edges,this),this}},{key:`unregisterNodeProgram`,value:function(e){if(this.nodePrograms[e]){var t=this.nodePrograms,n=t[e],r=Cr(t,[e].map(at));n.kill(),this.nodePrograms=r}if(this.nodeHoverPrograms[e]){var i=this.nodeHoverPrograms,a=i[e],o=Cr(i,[e].map(at));a.kill(),this.nodePrograms=o}return this}},{key:`unregisterEdgeProgram`,value:function(e){if(this.edgePrograms[e]){var t=this.edgePrograms,n=t[e],r=Cr(t,[e].map(at));n.kill(),this.edgePrograms=r}return this}},{key:`resetWebGLTexture`,value:function(e){var t=this.webGLContexts[e],n=this.frameBuffers[e],r=this.textures[e];r&&t.deleteTexture(r);var i=t.createTexture();return t.bindFramebuffer(t.FRAMEBUFFER,n),t.bindTexture(t.TEXTURE_2D,i),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,this.width,this.height,0,t.RGBA,t.UNSIGNED_BYTE,null),t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,i,0),this.textures[e]=i,this}},{key:`bindCameraHandlers`,value:function(){var e=this;return this.activeListeners.camera=function(){e.scheduleRender()},this.camera.on(`updated`,this.activeListeners.camera),this}},{key:`unbindCameraHandlers`,value:function(){return this.camera.removeListener(`updated`,this.activeListeners.camera),this}},{key:`getNodeAtPosition`,value:function(e){var t=e.x,n=e.y,r=Mt(this.webGLContexts.nodes,this.frameBuffers.nodes,t,n,this.pixelRatio,this.pickingDownSizingRatio),i=jt.apply(void 0,xr(r)),a=this.itemIDsIndex[i];return a&&a.type===`node`?a.id:null}},{key:`bindEventHandlers`,value:function(){var e=this;this.activeListeners.handleResize=function(){e.scheduleRefresh()},window.addEventListener(`resize`,this.activeListeners.handleResize),this.activeListeners.handleMove=function(t){var n=sr(t),r={event:n,preventSigmaDefault:function(){n.preventSigmaDefault()}},i=e.getNodeAtPosition(n);if(i&&e.hoveredNode!==i&&!e.nodeDataCache[i].hidden){e.hoveredNode&&e.emit(`leaveNode`,Z(Z({},r),{},{node:e.hoveredNode})),e.hoveredNode=i,e.emit(`enterNode`,Z(Z({},r),{},{node:i})),e.scheduleHighlightedNodesRender();return}if(e.hoveredNode&&e.getNodeAtPosition(n)!==e.hoveredNode){var a=e.hoveredNode;e.hoveredNode=null,e.emit(`leaveNode`,Z(Z({},r),{},{node:a})),e.scheduleHighlightedNodesRender();return}if(e.settings.enableEdgeEvents){var o=e.hoveredNode?null:e.getEdgeAtPoint(r.event.x,r.event.y);o!==e.hoveredEdge&&(e.hoveredEdge&&e.emit(`leaveEdge`,Z(Z({},r),{},{edge:e.hoveredEdge})),o&&e.emit(`enterEdge`,Z(Z({},r),{},{edge:o})),e.hoveredEdge=o)}},this.activeListeners.handleMoveBody=function(t){var n=sr(t);e.emit(`moveBody`,{event:n,preventSigmaDefault:function(){n.preventSigmaDefault()}})},this.activeListeners.handleLeave=function(t){var n=sr(t),r={event:n,preventSigmaDefault:function(){n.preventSigmaDefault()}};e.hoveredNode&&(e.emit(`leaveNode`,Z(Z({},r),{},{node:e.hoveredNode})),e.scheduleHighlightedNodesRender()),e.settings.enableEdgeEvents&&e.hoveredEdge&&(e.emit(`leaveEdge`,Z(Z({},r),{},{edge:e.hoveredEdge})),e.scheduleHighlightedNodesRender()),e.emit(`leaveStage`,Z({},r))},this.activeListeners.handleEnter=function(t){var n=sr(t),r={event:n,preventSigmaDefault:function(){n.preventSigmaDefault()}};e.emit(`enterStage`,Z({},r))};var t=function(t){return function(n){var r=sr(n),i={event:r,preventSigmaDefault:function(){r.preventSigmaDefault()}},a=e.getNodeAtPosition(r);if(a)return e.emit(`${t}Node`,Z(Z({},i),{},{node:a}));if(e.settings.enableEdgeEvents){var o=e.getEdgeAtPoint(r.x,r.y);if(o)return e.emit(`${t}Edge`,Z(Z({},i),{},{edge:o}))}return e.emit(`${t}Stage`,i)}};return this.activeListeners.handleClick=t(`click`),this.activeListeners.handleRightClick=t(`rightClick`),this.activeListeners.handleDoubleClick=t(`doubleClick`),this.activeListeners.handleWheel=t(`wheel`),this.activeListeners.handleDown=t(`down`),this.activeListeners.handleUp=t(`up`),this.mouseCaptor.on(`mousemove`,this.activeListeners.handleMove),this.mouseCaptor.on(`mousemovebody`,this.activeListeners.handleMoveBody),this.mouseCaptor.on(`click`,this.activeListeners.handleClick),this.mouseCaptor.on(`rightClick`,this.activeListeners.handleRightClick),this.mouseCaptor.on(`doubleClick`,this.activeListeners.handleDoubleClick),this.mouseCaptor.on(`wheel`,this.activeListeners.handleWheel),this.mouseCaptor.on(`mousedown`,this.activeListeners.handleDown),this.mouseCaptor.on(`mouseup`,this.activeListeners.handleUp),this.mouseCaptor.on(`mouseleave`,this.activeListeners.handleLeave),this.mouseCaptor.on(`mouseenter`,this.activeListeners.handleEnter),this.touchCaptor.on(`touchdown`,this.activeListeners.handleDown),this.touchCaptor.on(`touchdown`,this.activeListeners.handleMove),this.touchCaptor.on(`touchup`,this.activeListeners.handleUp),this.touchCaptor.on(`touchmove`,this.activeListeners.handleMove),this.touchCaptor.on(`tap`,this.activeListeners.handleClick),this.touchCaptor.on(`doubletap`,this.activeListeners.handleDoubleClick),this.touchCaptor.on(`touchmove`,this.activeListeners.handleMoveBody),this}},{key:`bindGraphHandlers`,value:function(){var e=this,t=this.graph,n=new Set([`x`,`y`,`zIndex`,`type`]);return this.activeListeners.eachNodeAttributesUpdatedGraphUpdate=function(r){var i=r.hints?.attributes;e.graph.forEachNode(function(t){return e.updateNode(t)});var a=!i||i.some(function(e){return n.has(e)});e.refresh({partialGraph:{nodes:t.nodes()},skipIndexation:!a,schedule:!0})},this.activeListeners.eachEdgeAttributesUpdatedGraphUpdate=function(n){var r=n.hints?.attributes;e.graph.forEachEdge(function(t){return e.updateEdge(t)});var i=r&&[`zIndex`,`type`].some(function(e){return r?.includes(e)});e.refresh({partialGraph:{edges:t.edges()},skipIndexation:!i,schedule:!0})},this.activeListeners.addNodeGraphUpdate=function(t){var n=t.key;e.addNode(n),e.refresh({partialGraph:{nodes:[n]},skipIndexation:!1,schedule:!0})},this.activeListeners.updateNodeGraphUpdate=function(t){var n=t.key;e.refresh({partialGraph:{nodes:[n]},skipIndexation:!1,schedule:!0})},this.activeListeners.dropNodeGraphUpdate=function(t){var n=t.key;e.removeNode(n),e.refresh({schedule:!0})},this.activeListeners.addEdgeGraphUpdate=function(t){var n=t.key;e.addEdge(n),e.refresh({partialGraph:{edges:[n]},schedule:!0})},this.activeListeners.updateEdgeGraphUpdate=function(t){var n=t.key;e.refresh({partialGraph:{edges:[n]},skipIndexation:!1,schedule:!0})},this.activeListeners.dropEdgeGraphUpdate=function(t){var n=t.key;e.removeEdge(n),e.refresh({schedule:!0})},this.activeListeners.clearEdgesGraphUpdate=function(){e.clearEdgeState(),e.clearEdgeIndices(),e.refresh({schedule:!0})},this.activeListeners.clearGraphUpdate=function(){e.clearEdgeState(),e.clearNodeState(),e.clearEdgeIndices(),e.clearNodeIndices(),e.refresh({schedule:!0})},t.on(`nodeAdded`,this.activeListeners.addNodeGraphUpdate),t.on(`nodeDropped`,this.activeListeners.dropNodeGraphUpdate),t.on(`nodeAttributesUpdated`,this.activeListeners.updateNodeGraphUpdate),t.on(`eachNodeAttributesUpdated`,this.activeListeners.eachNodeAttributesUpdatedGraphUpdate),t.on(`edgeAdded`,this.activeListeners.addEdgeGraphUpdate),t.on(`edgeDropped`,this.activeListeners.dropEdgeGraphUpdate),t.on(`edgeAttributesUpdated`,this.activeListeners.updateEdgeGraphUpdate),t.on(`eachEdgeAttributesUpdated`,this.activeListeners.eachEdgeAttributesUpdatedGraphUpdate),t.on(`edgesCleared`,this.activeListeners.clearEdgesGraphUpdate),t.on(`cleared`,this.activeListeners.clearGraphUpdate),this}},{key:`unbindGraphHandlers`,value:function(){var e=this.graph;e.removeListener(`nodeAdded`,this.activeListeners.addNodeGraphUpdate),e.removeListener(`nodeDropped`,this.activeListeners.dropNodeGraphUpdate),e.removeListener(`nodeAttributesUpdated`,this.activeListeners.updateNodeGraphUpdate),e.removeListener(`eachNodeAttributesUpdated`,this.activeListeners.eachNodeAttributesUpdatedGraphUpdate),e.removeListener(`edgeAdded`,this.activeListeners.addEdgeGraphUpdate),e.removeListener(`edgeDropped`,this.activeListeners.dropEdgeGraphUpdate),e.removeListener(`edgeAttributesUpdated`,this.activeListeners.updateEdgeGraphUpdate),e.removeListener(`eachEdgeAttributesUpdated`,this.activeListeners.eachEdgeAttributesUpdatedGraphUpdate),e.removeListener(`edgesCleared`,this.activeListeners.clearEdgesGraphUpdate),e.removeListener(`cleared`,this.activeListeners.clearGraphUpdate)}},{key:`getEdgeAtPoint`,value:function(e,t){var n=Mt(this.webGLContexts.edges,this.frameBuffers.edges,e,t,this.pixelRatio,this.pickingDownSizingRatio),r=jt.apply(void 0,xr(n)),i=this.itemIDsIndex[r];return i&&i.type===`edge`?i.id:null}},{key:`process`,value:function(){var e=this;this.emit(`beforeProcess`);var t=this.graph,n=this.settings,r=this.getDimensions();if(this.nodeExtent=Wn(this.graph),!this.settings.autoRescale){var i=r.width,a=r.height,o=this.nodeExtent,s=o.x,c=o.y;this.nodeExtent={x:[(s[0]+s[1])/2-i/2,(s[0]+s[1])/2+i/2],y:[(c[0]+c[1])/2-a/2,(c[0]+c[1])/2+a/2]}}this.normalizationFunction=Yn(this.customBBox||this.nodeExtent);var l=Hn(new ar().getState(),r,this.getGraphDimensions(),this.getStagePadding());this.labelGrid.resizeAndClear(r,n.labelGridCellSize);for(var u={},d={},f={},p={},m=1,h=t.nodes(),g=0,_=h.length;g<_;g++){var v=h[g],y=this.nodeDataCache[v],b=t.getNodeAttributes(v);y.x=b.x,y.y=b.y,this.normalizationFunction.applyTo(y),typeof y.label==`string`&&!y.hidden&&this.labelGrid.add(v,y.size,this.framedGraphToViewport(y,{matrix:l})),u[y.type]=(u[y.type]||0)+1}for(var x in this.labelGrid.organize(),this.nodePrograms){if(!kr.call(this.nodePrograms,x))throw Error(`Sigma: could not find a suitable program for node type "${x}"!`);this.nodePrograms[x].reallocate(u[x]||0),u[x]=0}this.settings.zIndex&&this.nodeZExtent[0]!==this.nodeZExtent[1]&&(h=Jn(this.nodeZExtent,function(t){return e.nodeDataCache[t].zIndex},h));for(var S=0,C=h.length;S<C;S++){var w=h[S];d[w]=m,p[d[w]]={type:`node`,id:w},m++;var T=this.nodeDataCache[w];this.addNodeToProgram(w,d[w],u[T.type]++)}for(var E={},D=t.edges(),O=0,ee=D.length;O<ee;O++){var te=D[O],k=this.edgeDataCache[te];E[k.type]=(E[k.type]||0)+1}for(var A in this.settings.zIndex&&this.edgeZExtent[0]!==this.edgeZExtent[1]&&(D=Jn(this.edgeZExtent,function(t){return e.edgeDataCache[t].zIndex},D)),this.edgePrograms){if(!kr.call(this.edgePrograms,A))throw Error(`Sigma: could not find a suitable program for edge type "${A}"!`);this.edgePrograms[A].reallocate(E[A]||0),E[A]=0}for(var j=0,M=D.length;j<M;j++){var N=D[j];f[N]=m,p[f[N]]={type:`edge`,id:N},m++;var ne=this.edgeDataCache[N];this.addEdgeToProgram(N,f[N],E[ne.type]++)}return this.itemIDsIndex=p,this.nodeIndices=d,this.edgeIndices=f,this.emit(`afterProcess`),this}},{key:`handleSettingsUpdate`,value:function(e){var t=this,n=this.settings;if(this.camera.minRatio=n.minCameraRatio,this.camera.maxRatio=n.maxCameraRatio,this.camera.enabledZooming=n.enableCameraZooming,this.camera.enabledPanning=n.enableCameraPanning,this.camera.enabledRotation=n.enableCameraRotation,n.cameraPanBoundaries?this.camera.clean=function(e){return t.cleanCameraState(e,n.cameraPanBoundaries&&Xn(n.cameraPanBoundaries)===`object`?n.cameraPanBoundaries:{})}:this.camera.clean=null,this.camera.setState(this.camera.validateState(this.camera.getState())),e){if(e.edgeProgramClasses!==n.edgeProgramClasses){for(var r in n.edgeProgramClasses)n.edgeProgramClasses[r]!==e.edgeProgramClasses[r]&&this.registerEdgeProgram(r,n.edgeProgramClasses[r]);for(var i in e.edgeProgramClasses)n.edgeProgramClasses[i]||this.unregisterEdgeProgram(i)}if(e.nodeProgramClasses!==n.nodeProgramClasses||e.nodeHoverProgramClasses!==n.nodeHoverProgramClasses){for(var a in n.nodeProgramClasses)(n.nodeProgramClasses[a]!==e.nodeProgramClasses[a]||n.nodeHoverProgramClasses[a]!==e.nodeHoverProgramClasses[a])&&this.registerNodeProgram(a,n.nodeProgramClasses[a],n.nodeHoverProgramClasses[a]);for(var o in e.nodeProgramClasses)n.nodeProgramClasses[o]||this.unregisterNodeProgram(o)}}return this.mouseCaptor.setSettings(this.settings),this.touchCaptor.setSettings(this.settings),this}},{key:`cleanCameraState`,value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.tolerance,r=n===void 0?0:n,i=t.boundaries,a=Z({},e),o=i||this.nodeExtent,s=_t(o.x,2),c=s[0],l=s[1],u=_t(o.y,2),d=u[0],f=u[1],p=[this.graphToViewport({x:c,y:d},{cameraState:e}),this.graphToViewport({x:l,y:d},{cameraState:e}),this.graphToViewport({x:c,y:f},{cameraState:e}),this.graphToViewport({x:l,y:f},{cameraState:e})],m=1/0,h=-1/0,g=1/0,_=-1/0;p.forEach(function(e){var t=e.x,n=e.y;m=Math.min(m,t),h=Math.max(h,t),g=Math.min(g,n),_=Math.max(_,n)});var v=h-m,y=_-g,b=this.getDimensions(),x=b.width,S=b.height,C=0,w=0;if(v>=x?h<x-r?C=h-(x-r):m>r&&(C=m-r):h>x+r?C=h-(x+r):m<-r&&(C=m+r),y>=S?_<S-r?w=_-(S-r):g>r&&(w=g-r):_>S+r?w=_-(S+r):g<-r&&(w=g+r),C||w){var T=this.viewportToFramedGraph({x:0,y:0},{cameraState:e}),E=this.viewportToFramedGraph({x:C,y:w},{cameraState:e});C=E.x-T.x,w=E.y-T.y,a.x+=C,a.y+=w}return a}},{key:`renderLabels`,value:function(){if(!this.settings.renderLabels)return this;var e=this.camera.getState(),t=this.labelGrid.getLabelsToDisplay(e.ratio,this.settings.labelDensity);Zn(t,this.nodesWithForcedLabels),this.displayedNodeLabels=new Set;for(var n=this.canvasContexts.labels,r=0,i=t.length;r<i;r++){var a=t[r],o=this.nodeDataCache[a];if(!this.displayedNodeLabels.has(a)&&!o.hidden){var s=this.framedGraphToViewport(o),c=s.x,l=s.y,u=this.scaleSize(o.size);if(!(!o.forceLabel&&u<this.settings.labelRenderedSizeThreshold)&&!(c<-Dr||c>this.width+Dr||l<-Or||l>this.height+Or)){this.displayedNodeLabels.add(a);var d=this.settings.defaultDrawNodeLabel;(this.nodePrograms[o.type]?.drawLabel||d)(n,Z(Z({key:a},o),{},{size:u,x:c,y:l}),this.settings)}}}return this}},{key:`renderEdgeLabels`,value:function(){if(!this.settings.renderEdgeLabels)return this;var e=this.canvasContexts.edgeLabels;e.clearRect(0,0,this.width,this.height);var t=Er({graph:this.graph,hoveredNode:this.hoveredNode,displayedNodeLabels:this.displayedNodeLabels,highlightedNodes:this.highlightedNodes});Zn(t,this.edgesWithForcedLabels);for(var n=new Set,r=0,i=t.length;r<i;r++){var a=t[r],o=this.graph.extremities(a),s=this.nodeDataCache[o[0]],c=this.nodeDataCache[o[1]],l=this.edgeDataCache[a];if(!n.has(a)&&!(l.hidden||s.hidden||c.hidden)){var u=this.settings.defaultDrawEdgeLabel;(this.edgePrograms[l.type]?.drawLabel||u)(e,Z(Z({key:a},l),{},{size:this.scaleSize(l.size)}),Z(Z(Z({key:o[0]},s),this.framedGraphToViewport(s)),{},{size:this.scaleSize(s.size)}),Z(Z(Z({key:o[1]},c),this.framedGraphToViewport(c)),{},{size:this.scaleSize(c.size)}),this.settings),n.add(a)}}return this.displayedEdgeLabels=n,this}},{key:`renderHighlightedNodes`,value:function(){var e=this,t=this.canvasContexts.hovers;t.clearRect(0,0,this.width,this.height);var n=function(n){var r=e.nodeDataCache[n],i=e.framedGraphToViewport(r),a=i.x,o=i.y,s=e.scaleSize(r.size),c=e.settings.defaultDrawNodeHover;(e.nodePrograms[r.type]?.drawHover||c)(t,Z(Z({key:n},r),{},{size:s,x:a,y:o}),e.settings)},r=[];this.hoveredNode&&!this.nodeDataCache[this.hoveredNode].hidden&&r.push(this.hoveredNode),this.highlightedNodes.forEach(function(t){t!==e.hoveredNode&&r.push(t)}),r.forEach(function(e){return n(e)});var i={};for(var a in r.forEach(function(t){var n=e.nodeDataCache[t].type;i[n]=(i[n]||0)+1}),this.nodeHoverPrograms)this.nodeHoverPrograms[a].reallocate(i[a]||0),i[a]=0;r.forEach(function(t){var n=e.nodeDataCache[t];e.nodeHoverPrograms[n.type].process(0,i[n.type]++,n)}),this.webGLContexts.hoverNodes.clear(this.webGLContexts.hoverNodes.COLOR_BUFFER_BIT);var o=this.getRenderParams();for(var s in this.nodeHoverPrograms)this.nodeHoverPrograms[s].render(o)}},{key:`scheduleHighlightedNodesRender`,value:function(){var e=this;this.renderHighlightedNodesFrame||this.renderFrame||(this.renderHighlightedNodesFrame=requestAnimationFrame(function(){e.renderHighlightedNodesFrame=null,e.renderHighlightedNodes(),e.renderEdgeLabels()}))}},{key:`render`,value:function(){var e=this;this.emit(`beforeRender`);var t=function(){return e.emit(`afterRender`),e};if(this.renderFrame&&=(cancelAnimationFrame(this.renderFrame),null),this.resize(),this.needToProcess&&this.process(),this.needToProcess=!1,this.clear(),this.pickingLayers.forEach(function(t){return e.resetWebGLTexture(t)}),!this.graph.order)return t();var n=this.mouseCaptor,r=this.camera.isAnimated()||n.isMoving||n.draggedEvents||n.currentWheelDirection,i=this.camera.getState(),a=this.getDimensions(),o=this.getGraphDimensions(),s=this.getStagePadding();this.matrix=Hn(i,a,o,s),this.invMatrix=Hn(i,a,o,s,!0),this.correctionRatio=Un(this.matrix,i,a),this.graphToViewportRatio=this.getGraphToViewportRatio();var c=this.getRenderParams();for(var l in this.nodePrograms)this.nodePrograms[l].render(c);if(!this.settings.hideEdgesOnMove||!r)for(var u in this.edgePrograms)this.edgePrograms[u].render(c);return this.settings.hideLabelsOnMove&&r?t():(this.renderLabels(),this.renderEdgeLabels(),this.renderHighlightedNodes(),t())}},{key:`addNode`,value:function(e){var t=Object.assign({},this.graph.getNodeAttributes(e));this.settings.nodeReducer&&(t=this.settings.nodeReducer(e,t));var n=Ar(this.settings,e,t);this.nodeDataCache[e]=n,this.nodesWithForcedLabels.delete(e),n.forceLabel&&!n.hidden&&this.nodesWithForcedLabels.add(e),this.highlightedNodes.delete(e),n.highlighted&&!n.hidden&&this.highlightedNodes.add(e),this.settings.zIndex&&(n.zIndex<this.nodeZExtent[0]&&(this.nodeZExtent[0]=n.zIndex),n.zIndex>this.nodeZExtent[1]&&(this.nodeZExtent[1]=n.zIndex))}},{key:`updateNode`,value:function(e){this.addNode(e);var t=this.nodeDataCache[e];this.normalizationFunction.applyTo(t)}},{key:`removeNode`,value:function(e){delete this.nodeDataCache[e],delete this.nodeProgramIndex[e],this.highlightedNodes.delete(e),this.hoveredNode===e&&(this.hoveredNode=null),this.nodesWithForcedLabels.delete(e)}},{key:`addEdge`,value:function(e){var t=Object.assign({},this.graph.getEdgeAttributes(e));this.settings.edgeReducer&&(t=this.settings.edgeReducer(e,t));var n=jr(this.settings,e,t);this.edgeDataCache[e]=n,this.edgesWithForcedLabels.delete(e),n.forceLabel&&!n.hidden&&this.edgesWithForcedLabels.add(e),this.settings.zIndex&&(n.zIndex<this.edgeZExtent[0]&&(this.edgeZExtent[0]=n.zIndex),n.zIndex>this.edgeZExtent[1]&&(this.edgeZExtent[1]=n.zIndex))}},{key:`updateEdge`,value:function(e){this.addEdge(e)}},{key:`removeEdge`,value:function(e){delete this.edgeDataCache[e],delete this.edgeProgramIndex[e],this.hoveredEdge===e&&(this.hoveredEdge=null),this.edgesWithForcedLabels.delete(e)}},{key:`clearNodeIndices`,value:function(){this.labelGrid=new Tr,this.nodeExtent={x:[0,1],y:[0,1]},this.nodeDataCache={},this.edgeProgramIndex={},this.nodesWithForcedLabels=new Set,this.nodeZExtent=[1/0,-1/0],this.highlightedNodes=new Set}},{key:`clearEdgeIndices`,value:function(){this.edgeDataCache={},this.edgeProgramIndex={},this.edgesWithForcedLabels=new Set,this.edgeZExtent=[1/0,-1/0]}},{key:`clearIndices`,value:function(){this.clearEdgeIndices(),this.clearNodeIndices()}},{key:`clearNodeState`,value:function(){this.displayedNodeLabels=new Set,this.highlightedNodes=new Set,this.hoveredNode=null}},{key:`clearEdgeState`,value:function(){this.displayedEdgeLabels=new Set,this.highlightedNodes=new Set,this.hoveredEdge=null}},{key:`clearState`,value:function(){this.clearEdgeState(),this.clearNodeState()}},{key:`addNodeToProgram`,value:function(e,t,n){var r=this.nodeDataCache[e],i=this.nodePrograms[r.type];if(!i)throw Error(`Sigma: could not find a suitable program for node type "${r.type}"!`);i.process(t,n,r),this.nodeProgramIndex[e]=n}},{key:`addEdgeToProgram`,value:function(e,t,n){var r=this.edgeDataCache[e],i=this.edgePrograms[r.type];if(!i)throw Error(`Sigma: could not find a suitable program for edge type "${r.type}"!`);var a=this.graph.extremities(e),o=this.nodeDataCache[a[0]],s=this.nodeDataCache[a[1]];i.process(t,n,o,s,r),this.edgeProgramIndex[e]=n}},{key:`getRenderParams`,value:function(){return{matrix:this.matrix,invMatrix:this.invMatrix,width:this.width,height:this.height,pixelRatio:this.pixelRatio,zoomRatio:this.camera.ratio,cameraAngle:this.camera.angle,sizeRatio:1/this.scaleSize(),correctionRatio:this.correctionRatio,downSizingRatio:this.pickingDownSizingRatio,minEdgeThickness:this.settings.minEdgeThickness,antiAliasingFeather:this.settings.antiAliasingFeather}}},{key:`getStagePadding`,value:function(){var e=this.settings,t=e.stagePadding;return e.autoRescale&&t||0}},{key:`createLayer`,value:function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(this.elements[e])throw Error(`Sigma: a layer named "${e}" already exists`);var r=Kn(t,{position:`absolute`},{class:`sigma-${e}`});return n.style&&Object.assign(r.style,n.style),this.elements[e]=r,`beforeLayer`in n&&n.beforeLayer?this.elements[n.beforeLayer].before(r):`afterLayer`in n&&n.afterLayer?this.elements[n.afterLayer].after(r):this.container.appendChild(r),r}},{key:`createCanvas`,value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.createLayer(e,`canvas`,t)}},{key:`createCanvasContext`,value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=this.createCanvas(e,t),r={preserveDrawingBuffer:!1,antialias:!1};return this.canvasContexts[e]=n.getContext(`2d`,r),this}},{key:`createWebGLContext`,value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t?.canvas||this.createCanvas(e,t);t.hidden&&n.remove();var r=Z({preserveDrawingBuffer:!1,antialias:!1},t),i=n.getContext(`webgl2`,r);i||=n.getContext(`webgl`,r),i||=n.getContext(`experimental-webgl`,r);var a=i;if(this.webGLContexts[e]=a,a.blendFunc(a.ONE,a.ONE_MINUS_SRC_ALPHA),t.picking){this.pickingLayers.add(e);var o=a.createFramebuffer();if(!o)throw Error(`Sigma: cannot create a new frame buffer for layer ${e}`);this.frameBuffers[e]=o}return a}},{key:`killLayer`,value:function(e){var t=this.elements[e];if(!t)throw Error(`Sigma: cannot kill layer ${e}, which does not exist`);if(this.webGLContexts[e]){var n;(n=this.webGLContexts[e].getExtension(`WEBGL_lose_context`))==null||n.loseContext(),delete this.webGLContexts[e]}else this.canvasContexts[e]&&delete this.canvasContexts[e];return t.remove(),delete this.elements[e],this}},{key:`getCamera`,value:function(){return this.camera}},{key:`setCamera`,value:function(e){this.unbindCameraHandlers(),this.camera=e,this.bindCameraHandlers()}},{key:`getContainer`,value:function(){return this.container}},{key:`getGraph`,value:function(){return this.graph}},{key:`setGraph`,value:function(e){e!==this.graph&&(this.hoveredNode&&!e.hasNode(this.hoveredNode)&&(this.hoveredNode=null),this.hoveredEdge&&!e.hasEdge(this.hoveredEdge)&&(this.hoveredEdge=null),this.unbindGraphHandlers(),this.checkEdgesEventsFrame!==null&&(cancelAnimationFrame(this.checkEdgesEventsFrame),this.checkEdgesEventsFrame=null),this.graph=e,this.bindGraphHandlers(),this.refresh())}},{key:`getMouseCaptor`,value:function(){return this.mouseCaptor}},{key:`getTouchCaptor`,value:function(){return this.touchCaptor}},{key:`getDimensions`,value:function(){return{width:this.width,height:this.height}}},{key:`getGraphDimensions`,value:function(){var e=this.customBBox||this.nodeExtent;return{width:e.x[1]-e.x[0]||1,height:e.y[1]-e.y[0]||1}}},{key:`getNodeDisplayData`,value:function(e){var t=this.nodeDataCache[e];return t?Object.assign({},t):void 0}},{key:`getEdgeDisplayData`,value:function(e){var t=this.edgeDataCache[e];return t?Object.assign({},t):void 0}},{key:`getNodeDisplayedLabels`,value:function(){return new Set(this.displayedNodeLabels)}},{key:`getEdgeDisplayedLabels`,value:function(){return new Set(this.displayedEdgeLabels)}},{key:`getSettings`,value:function(){return Z({},this.settings)}},{key:`getSetting`,value:function(e){return this.settings[e]}},{key:`setSetting`,value:function(e,t){var n=Z({},this.settings);return this.settings[e]=t,nr(this.settings),this.handleSettingsUpdate(n),this.scheduleRefresh(),this}},{key:`updateSetting`,value:function(e,t){return this.setSetting(e,t(this.settings[e])),this}},{key:`setSettings`,value:function(e){var t=Z({},this.settings);return this.settings=Z(Z({},this.settings),e),nr(this.settings),this.handleSettingsUpdate(t),this.scheduleRefresh(),this}},{key:`resize`,value:function(e){var t=this.width,n=this.height;if(this.width=this.container.offsetWidth,this.height=this.container.offsetHeight,this.pixelRatio=qn(),this.width===0)if(this.settings.allowInvalidContainer)this.width=1;else throw Error(`Sigma: Container has no width. You can set the allowInvalidContainer setting to true to stop seeing this error.`);if(this.height===0)if(this.settings.allowInvalidContainer)this.height=1;else throw Error(`Sigma: Container has no height. You can set the allowInvalidContainer setting to true to stop seeing this error.`);if(!e&&t===this.width&&n===this.height)return this;for(var r in this.elements){var i=this.elements[r];i.style.width=this.width+`px`,i.style.height=this.height+`px`}for(var a in this.canvasContexts)this.elements[a].setAttribute(`width`,this.width*this.pixelRatio+`px`),this.elements[a].setAttribute(`height`,this.height*this.pixelRatio+`px`),this.pixelRatio!==1&&this.canvasContexts[a].scale(this.pixelRatio,this.pixelRatio);for(var o in this.webGLContexts){this.elements[o].setAttribute(`width`,this.width*this.pixelRatio+`px`),this.elements[o].setAttribute(`height`,this.height*this.pixelRatio+`px`);var s=this.webGLContexts[o];if(s.viewport(0,0,this.width*this.pixelRatio,this.height*this.pixelRatio),this.pickingLayers.has(o)){var c=this.textures[o];c&&s.deleteTexture(c)}}return this.emit(`resize`),this}},{key:`clear`,value:function(){return this.emit(`beforeClear`),this.webGLContexts.nodes.bindFramebuffer(WebGLRenderingContext.FRAMEBUFFER,null),this.webGLContexts.nodes.clear(WebGLRenderingContext.COLOR_BUFFER_BIT),this.webGLContexts.edges.bindFramebuffer(WebGLRenderingContext.FRAMEBUFFER,null),this.webGLContexts.edges.clear(WebGLRenderingContext.COLOR_BUFFER_BIT),this.webGLContexts.hoverNodes.clear(WebGLRenderingContext.COLOR_BUFFER_BIT),this.canvasContexts.labels.clearRect(0,0,this.width,this.height),this.canvasContexts.hovers.clearRect(0,0,this.width,this.height),this.canvasContexts.edgeLabels.clearRect(0,0,this.width,this.height),this.emit(`afterClear`),this}},{key:`refresh`,value:function(e){var t=this,n=e?.skipIndexation===void 0?!1:e?.skipIndexation,r=e?.schedule===void 0?!1:e.schedule,i=!e||!e.partialGraph;if(i)this.clearEdgeIndices(),this.clearNodeIndices(),this.graph.forEachNode(function(e){return t.addNode(e)}),this.graph.forEachEdge(function(e){return t.addEdge(e)});else{for(var a,o=e.partialGraph?.nodes||[],s=0,c=o?.length||0;s<c;s++){var l=o[s];if(this.updateNode(l),n){var u=this.nodeProgramIndex[l];if(u===void 0)throw Error(`Sigma: node "${l}" can't be repaint`);this.addNodeToProgram(l,this.nodeIndices[l],u)}}for(var d=(e==null||(a=e.partialGraph)==null?void 0:a.edges)||[],f=0,p=d.length;f<p;f++){var m=d[f];if(this.updateEdge(m),n){var h=this.edgeProgramIndex[m];if(h===void 0)throw Error(`Sigma: edge "${m}" can't be repaint`);this.addEdgeToProgram(m,this.edgeIndices[m],h)}}}return(i||!n)&&(this.needToProcess=!0),r?this.scheduleRender():this.render(),this}},{key:`scheduleRender`,value:function(){var e=this;return this.renderFrame||=requestAnimationFrame(function(){e.render()}),this}},{key:`scheduleRefresh`,value:function(e){return this.refresh(Z(Z({},e),{},{schedule:!0}))}},{key:`getViewportZoomedState`,value:function(e,t){var n=this.camera.getState(),r=n.ratio,i=n.angle,a=n.x,o=n.y,s=this.settings,c=s.minCameraRatio,l=s.maxCameraRatio;typeof l==`number`&&(t=Math.min(t,l)),typeof c==`number`&&(t=Math.max(t,c));var u=t/r,d={x:this.width/2,y:this.height/2},f=this.viewportToFramedGraph(e),p=this.viewportToFramedGraph(d);return{angle:i,x:(f.x-p.x)*(1-u)+a,y:(f.y-p.y)*(1-u)+o,ratio:t}}},{key:`viewRectangle`,value:function(){var e=this.viewportToFramedGraph({x:0,y:0}),t=this.viewportToFramedGraph({x:this.width,y:0}),n=this.viewportToFramedGraph({x:0,y:this.height});return{x1:e.x,y1:e.y,x2:t.x,y2:t.y,height:t.y-n.y}}},{key:`framedGraphToViewport`,value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=!!t.cameraState||!!t.viewportDimensions||!!t.graphDimensions,r=Bn(t.matrix?t.matrix:n?Hn(t.cameraState||this.camera.getState(),t.viewportDimensions||this.getDimensions(),t.graphDimensions||this.getGraphDimensions(),t.padding||this.getStagePadding()):this.matrix,e);return{x:(1+r.x)*this.width/2,y:(1-r.y)*this.height/2}}},{key:`viewportToFramedGraph`,value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=!!t.cameraState||!!t.viewportDimensions||!t.graphDimensions,r=Bn(t.matrix?t.matrix:n?Hn(t.cameraState||this.camera.getState(),t.viewportDimensions||this.getDimensions(),t.graphDimensions||this.getGraphDimensions(),t.padding||this.getStagePadding(),!0):this.invMatrix,{x:e.x/this.width*2-1,y:1-e.y/this.height*2});return isNaN(r.x)&&(r.x=0),isNaN(r.y)&&(r.y=0),r}},{key:`viewportToGraph`,value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.normalizationFunction.inverse(this.viewportToFramedGraph(e,t))}},{key:`graphToViewport`,value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.framedGraphToViewport(this.normalizationFunction(e),t)}},{key:`getGraphToViewportRatio`,value:function(){var e={x:0,y:0},t={x:1,y:1},n=Math.sqrt((e.x-t.x)**2+(e.y-t.y)**2),r=this.graphToViewport(e),i=this.graphToViewport(t);return Math.sqrt((r.x-i.x)**2+(r.y-i.y)**2)/n}},{key:`getBBox`,value:function(){return this.nodeExtent}},{key:`getCustomBBox`,value:function(){return this.customBBox}},{key:`setCustomBBox`,value:function(e){return this.customBBox=e,this.scheduleRender(),this}},{key:`kill`,value:function(){this.emit(`kill`),this.removeAllListeners(),this.unbindCameraHandlers(),window.removeEventListener(`resize`,this.activeListeners.handleResize),this.mouseCaptor.kill(),this.touchCaptor.kill(),this.unbindGraphHandlers(),this.clearIndices(),this.clearState(),this.nodeDataCache={},this.edgeDataCache={},this.highlightedNodes.clear(),this.renderFrame&&=(cancelAnimationFrame(this.renderFrame),null),this.renderHighlightedNodesFrame&&=(cancelAnimationFrame(this.renderHighlightedNodesFrame),null);for(var e=this.container;e.firstChild;)e.removeChild(e.firstChild);for(var t in this.nodePrograms)this.nodePrograms[t].kill();for(var n in this.nodeHoverPrograms)this.nodeHoverPrograms[n].kill();for(var r in this.edgePrograms)this.edgePrograms[r].kill();for(var i in this.nodePrograms={},this.nodeHoverPrograms={},this.edgePrograms={},this.elements)this.killLayer(i);this.canvasContexts={},this.webGLContexts={},this.elements={}}},{key:`scaleSize`,value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.camera.ratio;return e/this.settings.zoomToSizeRatioFunction(t)*(this.getSetting(`itemSizesReference`)===`positions`?t*this.graphToViewportRatio:1)}},{key:`getCanvases`,value:function(){var e={};for(var t in this.elements)this.elements[t]instanceof HTMLCanvasElement&&(e[t]=this.elements[t]);return e}}])}(jn),Nr=t(((e,t)=>{t.exports=function(){var e,t,n={};(function(){var e=0,t=1,r=2,i=3,a=4,o=5,s=6,c=7,l=8,u=9,d=0,f=1,p=2,m=0,h=1,g=2,_=3,v=4,y=5,b=6,x=7,S=8,C=3,w=10,T=3,E=9,D=10;n.exports=function(n,O,ee){var te,k,A,j,M,N,ne,P,F,re,I=O.length,ie=ee.length,ae=n.adjustSizes,oe=n.barnesHutTheta*n.barnesHutTheta,se,L,R,z,B,V,H,U=[];for(A=0;A<I;A+=w)O[A+a]=O[A+r],O[A+o]=O[A+i],O[A+r]=0,O[A+i]=0;if(n.outboundAttractionDistribution){for(se=0,A=0;A<I;A+=w)se+=O[A+s];se/=I/w}if(n.barnesHutOptimize){var W=1/0,ce=-1/0,le=1/0,ue=-1/0,de,fe,pe;for(A=0;A<I;A+=w)W=Math.min(W,O[A+e]),ce=Math.max(ce,O[A+e]),le=Math.min(le,O[A+t]),ue=Math.max(ue,O[A+t]);var me=ce-W,he=ue-le;for(me>he?(le-=(me-he)/2,ue=le+me):(W-=(he-me)/2,ce=W+he),U[0+m]=-1,U[0+h]=(W+ce)/2,U[0+g]=(le+ue)/2,U[0+_]=Math.max(ce-W,ue-le),U[0+v]=-1,U[0+y]=-1,U[0+b]=0,U[0+x]=0,U[0+S]=0,te=1,A=0;A<I;A+=w)for(k=0,pe=C;;)if(U[k+y]>=0){de=O[A+e]<U[k+h]?O[A+t]<U[k+g]?U[k+y]:U[k+y]+E:O[A+t]<U[k+g]?U[k+y]+E*2:U[k+y]+E*3,U[k+x]=(U[k+x]*U[k+b]+O[A+e]*O[A+s])/(U[k+b]+O[A+s]),U[k+S]=(U[k+S]*U[k+b]+O[A+t]*O[A+s])/(U[k+b]+O[A+s]),U[k+b]+=O[A+s],k=de;continue}else if(U[k+m]<0){U[k+m]=A;break}else{if(U[k+y]=te*E,P=U[k+_]/2,F=U[k+y],U[F+m]=-1,U[F+h]=U[k+h]-P,U[F+g]=U[k+g]-P,U[F+_]=P,U[F+v]=F+E,U[F+y]=-1,U[F+b]=0,U[F+x]=0,U[F+S]=0,F+=E,U[F+m]=-1,U[F+h]=U[k+h]-P,U[F+g]=U[k+g]+P,U[F+_]=P,U[F+v]=F+E,U[F+y]=-1,U[F+b]=0,U[F+x]=0,U[F+S]=0,F+=E,U[F+m]=-1,U[F+h]=U[k+h]+P,U[F+g]=U[k+g]-P,U[F+_]=P,U[F+v]=F+E,U[F+y]=-1,U[F+b]=0,U[F+x]=0,U[F+S]=0,F+=E,U[F+m]=-1,U[F+h]=U[k+h]+P,U[F+g]=U[k+g]+P,U[F+_]=P,U[F+v]=U[k+v],U[F+y]=-1,U[F+b]=0,U[F+x]=0,U[F+S]=0,te+=4,de=O[U[k+m]+e]<U[k+h]?O[U[k+m]+t]<U[k+g]?U[k+y]:U[k+y]+E:O[U[k+m]+t]<U[k+g]?U[k+y]+E*2:U[k+y]+E*3,U[k+b]=O[U[k+m]+s],U[k+x]=O[U[k+m]+e],U[k+S]=O[U[k+m]+t],U[de+m]=U[k+m],U[k+m]=-1,fe=O[A+e]<U[k+h]?O[A+t]<U[k+g]?U[k+y]:U[k+y]+E:O[A+t]<U[k+g]?U[k+y]+E*2:U[k+y]+E*3,de===fe)if(pe--){k=de;continue}else{pe=C;break}U[fe+m]=A;break}}if(n.barnesHutOptimize)for(L=n.scalingRatio,A=0;A<I;A+=w)for(k=0;;)if(U[k+y]>=0)if(V=(O[A+e]-U[k+x])**2+(O[A+t]-U[k+S])**2,re=U[k+_],4*re*re/V<oe){if(R=O[A+e]-U[k+x],z=O[A+t]-U[k+S],ae===!0?V>0?(H=L*O[A+s]*U[k+b]/V,O[A+r]+=R*H,O[A+i]+=z*H):V<0&&(H=-L*O[A+s]*U[k+b]/Math.sqrt(V),O[A+r]+=R*H,O[A+i]+=z*H):V>0&&(H=L*O[A+s]*U[k+b]/V,O[A+r]+=R*H,O[A+i]+=z*H),k=U[k+v],k<0)break;continue}else{k=U[k+y];continue}else{if(N=U[k+m],N>=0&&N!==A&&(R=O[A+e]-O[N+e],z=O[A+t]-O[N+t],V=R*R+z*z,ae===!0?V>0?(H=L*O[A+s]*O[N+s]/V,O[A+r]+=R*H,O[A+i]+=z*H):V<0&&(H=-L*O[A+s]*O[N+s]/Math.sqrt(V),O[A+r]+=R*H,O[A+i]+=z*H):V>0&&(H=L*O[A+s]*O[N+s]/V,O[A+r]+=R*H,O[A+i]+=z*H)),k=U[k+v],k<0)break;continue}else for(L=n.scalingRatio,j=0;j<I;j+=w)for(M=0;M<j;M+=w)R=O[j+e]-O[M+e],z=O[j+t]-O[M+t],ae===!0?(V=Math.sqrt(R*R+z*z)-O[j+l]-O[M+l],V>0?(H=L*O[j+s]*O[M+s]/V/V,O[j+r]+=R*H,O[j+i]+=z*H,O[M+r]-=R*H,O[M+i]-=z*H):V<0&&(H=100*L*O[j+s]*O[M+s],O[j+r]+=R*H,O[j+i]+=z*H,O[M+r]-=R*H,O[M+i]-=z*H)):(V=Math.sqrt(R*R+z*z),V>0&&(H=L*O[j+s]*O[M+s]/V/V,O[j+r]+=R*H,O[j+i]+=z*H,O[M+r]-=R*H,O[M+i]-=z*H));for(F=n.gravity/n.scalingRatio,L=n.scalingRatio,A=0;A<I;A+=w)H=0,R=O[A+e],z=O[A+t],V=Math.sqrt(R**2+z**2),n.strongGravityMode?V>0&&(H=L*O[A+s]*F):V>0&&(H=L*O[A+s]*F/V),O[A+r]-=R*H,O[A+i]-=z*H;for(L=1*(n.outboundAttractionDistribution?se:1),ne=0;ne<ie;ne+=T)j=ee[ne+d],M=ee[ne+f],P=ee[ne+p],B=P**+n.edgeWeightInfluence,R=O[j+e]-O[M+e],z=O[j+t]-O[M+t],ae===!0?(V=Math.sqrt(R*R+z*z)-O[j+l]-O[M+l],n.linLogMode?n.outboundAttractionDistribution?V>0&&(H=-L*B*Math.log(1+V)/V/O[j+s]):V>0&&(H=-L*B*Math.log(1+V)/V):n.outboundAttractionDistribution?V>0&&(H=-L*B/O[j+s]):V>0&&(H=-L*B)):(V=Math.sqrt(R**2+z**2),n.linLogMode?n.outboundAttractionDistribution?V>0&&(H=-L*B*Math.log(1+V)/V/O[j+s]):V>0&&(H=-L*B*Math.log(1+V)/V):n.outboundAttractionDistribution?(V=1,H=-L*B/O[j+s]):(V=1,H=-L*B)),V>0&&(O[j+r]+=R*H,O[j+i]+=z*H,O[M+r]-=R*H,O[M+i]-=z*H);var ge,_e,ve,ye,be,xe;if(ae===!0)for(A=0;A<I;A+=w)O[A+u]!==1&&(ge=Math.sqrt(O[A+r]**2+O[A+i]**2),ge>D&&(O[A+r]=O[A+r]*D/ge,O[A+i]=O[A+i]*D/ge),_e=O[A+s]*Math.sqrt((O[A+a]-O[A+r])*(O[A+a]-O[A+r])+(O[A+o]-O[A+i])*(O[A+o]-O[A+i])),ve=Math.sqrt((O[A+a]+O[A+r])*(O[A+a]+O[A+r])+(O[A+o]+O[A+i])*(O[A+o]+O[A+i]))/2,ye=.1*Math.log(1+ve)/(1+Math.sqrt(_e)),be=O[A+e]+O[A+r]*(ye/n.slowDown),O[A+e]=be,xe=O[A+t]+O[A+i]*(ye/n.slowDown),O[A+t]=xe);else for(A=0;A<I;A+=w)O[A+u]!==1&&(_e=O[A+s]*Math.sqrt((O[A+a]-O[A+r])*(O[A+a]-O[A+r])+(O[A+o]-O[A+i])*(O[A+o]-O[A+i])),ve=Math.sqrt((O[A+a]+O[A+r])*(O[A+a]+O[A+r])+(O[A+o]+O[A+i])*(O[A+o]+O[A+i]))/2,ye=O[A+c]*Math.log(1+ve)/(1+Math.sqrt(_e)),O[A+c]=Math.min(1,Math.sqrt(ye*(O[A+r]**2+O[A+i]**2)/(1+Math.sqrt(_e)))),be=O[A+e]+O[A+r]*(ye/n.slowDown),O[A+e]=be,xe=O[A+t]+O[A+i]*(ye/n.slowDown),O[A+t]=xe);return{}}})();var r=n.exports;self.addEventListener(`message`,function(n){var i=n.data;e=new Float32Array(i.nodes),i.edges&&(t=new Float32Array(i.edges)),r(i.settings,e,t),self.postMessage({nodes:e.buffer},[e.buffer])})}})),Pr=t((e=>{function t(e){return typeof e!=`number`||isNaN(e)?1:e}function n(e,t){var n={},r=function(e){return e===void 0?t:e};typeof t==`function`&&(r=t);var i=function(t){return r(t[e])},a=function(){return r(void 0)};return typeof e==`string`?(n.fromAttributes=i,n.fromGraph=function(e,t){return i(e.getNodeAttributes(t))},n.fromEntry=function(e,t){return i(t)}):typeof e==`function`?(n.fromAttributes=function(){throw Error(`graphology-utils/getters/createNodeValueGetter: irrelevant usage.`)},n.fromGraph=function(t,n){return r(e(n,t.getNodeAttributes(n)))},n.fromEntry=function(t,n){return r(e(t,n))}):(n.fromAttributes=a,n.fromGraph=a,n.fromEntry=a),n}function r(e,t){var n={},r=function(e){return e===void 0?t:e};typeof t==`function`&&(r=t);var i=function(t){return r(t[e])},a=function(){return r(void 0)};return typeof e==`string`?(n.fromAttributes=i,n.fromGraph=function(e,t){return i(e.getEdgeAttributes(t))},n.fromEntry=function(e,t){return i(t)},n.fromPartialEntry=n.fromEntry,n.fromMinimalEntry=n.fromEntry):typeof e==`function`?(n.fromAttributes=function(){throw Error(`graphology-utils/getters/createEdgeValueGetter: irrelevant usage.`)},n.fromGraph=function(t,n){var i=t.extremities(n);return r(e(n,t.getEdgeAttributes(n),i[0],i[1],t.getNodeAttributes(i[0]),t.getNodeAttributes(i[1]),t.isUndirected(n)))},n.fromEntry=function(t,n,i,a,o,s,c){return r(e(t,n,i,a,o,s,c))},n.fromPartialEntry=function(t,n,i,a){return r(e(t,n,i,a))},n.fromMinimalEntry=function(t,n){return r(e(t,n))}):(n.fromAttributes=a,n.fromGraph=a,n.fromEntry=a,n.fromMinimalEntry=a),n}e.createNodeValueGetter=n,e.createEdgeValueGetter=r,e.createEdgeWeightGetter=function(e){return r(e,t)}})),Fr=t((e=>{var t=10,n=3;e.assign=function(e){e||={};var t=Array.prototype.slice.call(arguments).slice(1),n,r,i;for(n=0,i=t.length;n<i;n++)if(t[n])for(r in t[n])e[r]=t[n][r];return e},e.validateSettings=function(e){return`linLogMode`in e&&typeof e.linLogMode!=`boolean`?{message:"the `linLogMode` setting should be a boolean."}:`outboundAttractionDistribution`in e&&typeof e.outboundAttractionDistribution!=`boolean`?{message:"the `outboundAttractionDistribution` setting should be a boolean."}:`adjustSizes`in e&&typeof e.adjustSizes!=`boolean`?{message:"the `adjustSizes` setting should be a boolean."}:`edgeWeightInfluence`in e&&typeof e.edgeWeightInfluence!=`number`?{message:"the `edgeWeightInfluence` setting should be a number."}:`scalingRatio`in e&&!(typeof e.scalingRatio==`number`&&e.scalingRatio>=0)?{message:"the `scalingRatio` setting should be a number >= 0."}:`strongGravityMode`in e&&typeof e.strongGravityMode!=`boolean`?{message:"the `strongGravityMode` setting should be a boolean."}:`gravity`in e&&!(typeof e.gravity==`number`&&e.gravity>=0)?{message:"the `gravity` setting should be a number >= 0."}:`slowDown`in e&&!(typeof e.slowDown==`number`||e.slowDown>=0)?{message:"the `slowDown` setting should be a number >= 0."}:`barnesHutOptimize`in e&&typeof e.barnesHutOptimize!=`boolean`?{message:"the `barnesHutOptimize` setting should be a boolean."}:`barnesHutTheta`in e&&!(typeof e.barnesHutTheta==`number`&&e.barnesHutTheta>=0)?{message:"the `barnesHutTheta` setting should be a number >= 0."}:null},e.graphToByteArrays=function(e,r){var i=e.order,a=e.size,o={},s,c=new Float32Array(i*t),l=new Float32Array(a*n);return s=0,e.forEachNode(function(e,n){o[e]=s,c[s]=n.x,c[s+1]=n.y,c[s+2]=0,c[s+3]=0,c[s+4]=0,c[s+5]=0,c[s+6]=1,c[s+7]=1,c[s+8]=n.size||1,c[s+9]=n.fixed?1:0,s+=t}),s=0,e.forEachEdge(function(e,t,i,a,u,d,f){var p=o[i],m=o[a],h=r(e,t,i,a,u,d,f);c[p+6]+=h,c[m+6]+=h,l[s]=p,l[s+1]=m,l[s+2]=h,s+=n}),{nodes:c,edges:l}},e.assignLayoutChanges=function(e,n,r){var i=0;e.updateEachNodeAttributes(function(e,a){return a.x=n[i],a.y=n[i+1],i+=t,r?r(e,a):a})},e.readGraphPositions=function(e,n){var r=0;e.forEachNode(function(e,i){n[r]=i.x,n[r+1]=i.y,r+=t})},e.collectLayoutChanges=function(e,n,r){for(var i=e.nodes(),a={},o=0,s=0,c=n.length;o<c;o+=t){if(r){var l=Object.assign({},e.getNodeAttributes(i[s]));l.x=n[o],l.y=n[o+1],l=r(i[s],l),a[i[s]]={x:l.x,y:l.y}}else a[i[s]]={x:n[o],y:n[o+1]};s++}return a},e.createWorker=function(e){var t=window.URL||window.webkitURL,n=e.toString(),r=t.createObjectURL(new Blob([`(`+n+`).call(this);`],{type:`text/javascript`})),i=new Worker(r);return t.revokeObjectURL(r),i}})),Ir=t(((e,t)=>{t.exports={linLogMode:!1,outboundAttractionDistribution:!1,adjustSizes:!1,edgeWeightInfluence:1,scalingRatio:1,strongGravityMode:!1,gravity:1,slowDown:1,barnesHutOptimize:!1,barnesHutTheta:.5}})),Lr=t(((e,t)=>{var n=Nr(),r=Mn(),i=Pr().createEdgeWeightGetter,a=Fr(),o=Ir();function s(e,t){if(t||={},!r(e))throw Error(`graphology-layout-forceatlas2/worker: the given graph is not a valid graphology instance.`);var n=i(`getEdgeWeight`in t?t.getEdgeWeight:`weight`).fromEntry,s=a.assign({},o,t.settings),c=a.validateSettings(s);if(c)throw Error(`graphology-layout-forceatlas2/worker: `+c.message);this.worker=null,this.graph=e,this.settings=s,this.getEdgeWeight=n,this.matrices=null,this.running=!1,this.killed=!1,this.outputReducer=typeof t.outputReducer==`function`?t.outputReducer:null,this.handleMessage=this.handleMessage.bind(this);var l=void 0,u=this;this.handleGraphUpdate=function(){u.worker&&u.worker.terminate(),l&&clearTimeout(l),l=setTimeout(function(){l=void 0,u.spawnWorker()},0)},e.on(`nodeAdded`,this.handleGraphUpdate),e.on(`edgeAdded`,this.handleGraphUpdate),e.on(`nodeDropped`,this.handleGraphUpdate),e.on(`edgeDropped`,this.handleGraphUpdate),this.spawnWorker()}s.prototype.isRunning=function(){return this.running},s.prototype.spawnWorker=function(){this.worker&&this.worker.terminate(),this.worker=a.createWorker(n),this.worker.addEventListener(`message`,this.handleMessage),this.running&&(this.running=!1,this.start())},s.prototype.handleMessage=function(e){if(this.running){var t=new Float32Array(e.data.nodes);a.assignLayoutChanges(this.graph,t,this.outputReducer),this.outputReducer&&a.readGraphPositions(this.graph,t),this.matrices.nodes=t,this.askForIterations()}},s.prototype.askForIterations=function(e){var t=this.matrices,n={settings:this.settings,nodes:t.nodes.buffer},r=[t.nodes.buffer];return e&&(n.edges=t.edges.buffer,r.push(t.edges.buffer)),this.worker.postMessage(n,r),this},s.prototype.start=function(){if(this.killed)throw Error(`graphology-layout-forceatlas2/worker.start: layout was killed.`);return this.running?this:(this.matrices=a.graphToByteArrays(this.graph,this.getEdgeWeight),this.running=!0,this.askForIterations(!0),this)},s.prototype.stop=function(){return this.running=!1,this},s.prototype.kill=function(){if(this.killed)return this;this.running=!1,this.killed=!0,this.matrices=null,this.worker.terminate(),this.graph.removeListener(`nodeAdded`,this.handleGraphUpdate),this.graph.removeListener(`edgeAdded`,this.handleGraphUpdate),this.graph.removeListener(`nodeDropped`,this.handleGraphUpdate),this.graph.removeListener(`edgeDropped`,this.handleGraphUpdate)},t.exports=s}));export{er as a,Jt as c,G as d,tr as i,qt as l,Pr as n,Mn as o,Mr as r,pn as s,Lr as t,Ot as u};\ No newline at end of filediff --git a/semantica/static/assets/graphTheme-aSRma4TX.js b/semantica/static/assets/graphTheme-aSRma4TX.jsdeleted file mode 100644index 8b907790..00000000--- a/semantica/static/assets/graphTheme-aSRma4TX.js+++ /dev/null@@ -1 +0,0 @@-import{d as e}from"./graph-vendor-pbzH-eyf.js";function t(e,t){return JSON.stringify([e,t])}function n(e,t){return JSON.stringify([e,t])}var r=new e({type:`directed`,multi:!0,allowSelfLoops:!1});function i(e,t){let i=[];r.forEachDirectedEdge(e,t,e=>{i.push(String(e))});let a=i.length,o=new Map;i.forEach(e=>{let t=r.getEdgeAttributes(e),n=String(t.familyId||e);o.set(n,(o.get(n)??0)+1)}),i.sort((e,t)=>{let n=r.getEdgeAttributes(e),i=r.getEdgeAttributes(t),a=Number(i.visualPriority??0)-Number(n.visualPriority??0);if(a!==0)return a;let o=Number(i.weight??0)-Number(n.weight??0);return o===0?e.localeCompare(t):o}).forEach((i,s)=>{let c=r.getEdgeAttributes(i),l=String(c.familyId||i);r.mergeEdgeAttributes(i,{edgeId:i,familyId:l,sourceId:e,targetId:t,isParallelPair:a>1,parallelIndex:s,parallelCount:a,familySize:o.get(l)??1,curveGroup:n(e,t)})})}function a(e){for(let{id:t,attributes:n}of e)r.mergeNode(t,n)}function o(e){let n=new Map;for(let{id:i,familyId:a,source:o,target:s,attributes:c}of e){let e=String(c.edgeId||i),l=String(c.familyId||a||e);r.hasNode(o)&&r.hasNode(s)&&(r.mergeDirectedEdgeWithKey(e,o,s,{...c,edgeId:e,familyId:l,sourceId:o,targetId:s}),n.set(t(o,s),{source:o,target:s}))}n.forEach(({source:e,target:t})=>{i(e,t)})}function s(){r.clear()}var c={palette:{semantic:[`#3E79F2`,`#149287`,`#2F9F61`,`#555FD6`,`#8A56D8`,`#B65473`,`#C9922E`],overview:{nodeBase:`#0B1320`,nodeCore:`#435D7A`,nodeMuted:`#121927`,nodeBorder:`#64758C`,nodeTintMix:.03,nodeCoreMix:.52,nodeShellAlpha:.97,nodeCoreAlpha:1,edgeBackbone:`rgba(83, 111, 148, 0.04)`,edgeStructure:`rgba(72, 90, 118, 0.009)`,edgeInspection:`rgba(98, 120, 148, 0.026)`},accent:{selected:`#F2D288`,hovered:`#8FE7FF`,path:`#D79056`,temporal:`#49D7FF`,provenance:`#C9A5FF`,inferred:`#D07B4D`},muted:{fallback:`rgba(96, 112, 136, 0.1)`,nodeAlpha:.085,edgeOverview:`rgba(82, 100, 124, 0.009)`,edgeStructure:`rgba(92, 112, 138, 0.02)`,edgeInspection:`rgba(124, 148, 176, 0.066)`,edgeFocus:`rgba(160, 186, 218, 0.16)`},background:{canvas:`#07101A`,shell:`rgba(8, 15, 26, 0.8)`,shellBorder:`rgba(118, 162, 207, 0.14)`,shellGlow:`rgba(48, 88, 140, 0.14)`,grid:`rgba(92, 126, 170, 0.034)`,vignette:`rgba(2, 5, 11, 0.84)`,nodeBorder:`#0C1522`}},zoomTiers:{overview:{maxRatio:1/0,nodeScale:.66,labelThreshold:.985,labelBudget:10,edgePriorityThreshold:.72,arrowPriorityThreshold:1/0,edgeSizeScale:.34,showBadges:!1,showCurves:!1,showContextualArrows:!1},structure:{maxRatio:1.2,nodeScale:.98,labelThreshold:.88,labelBudget:36,edgePriorityThreshold:.4,arrowPriorityThreshold:.75,edgeSizeScale:.92,showBadges:!0,showCurves:!0,showContextualArrows:!0},inspection:{maxRatio:.5,nodeScale:1,labelThreshold:.7,labelBudget:80,edgePriorityThreshold:0,arrowPriorityThreshold:.58,edgeSizeScale:1.04,showBadges:!0,showCurves:!0,showContextualArrows:!0}},labels:{forceVisibleStates:[`hovered`,`selected`,`neighbor`,`path`],policies:{none:{minZoomTier:`inspection`},priority:{minZoomTier:`overview`},local:{minZoomTier:`structure`},always:{minZoomTier:`overview`}},chip:{fontFamily:`"IBM Plex Sans", Inter, system-ui, sans-serif`,fontWeight:500,fontSize:10,maxFontSize:11,sizeScale:.25,paddingX:6,paddingY:3,radius:6,offsetX:12,offsetY:10,background:`rgba(8, 14, 24, 0.9)`,borderColor:`rgba(154, 181, 212, 0.16)`,borderAlpha:.28,textColor:`#EAF3FF`,shadowColor:`rgba(0, 0, 0, 0.6)`,shadowAlpha:.26,shadowBlur:12},hoverCard:{fontFamily:`"IBM Plex Sans", Inter, system-ui, sans-serif`,titleWeight:700,titleSize:13,metaWeight:500,metaSize:10,paddingX:10,paddingY:7,radius:12,offsetX:16,offsetY:16,metaGap:5,background:`rgba(8, 14, 24, 0.94)`,borderColor:`rgba(154, 181, 212, 0.18)`,borderAlpha:.32,textColor:`#F6FBFF`,metaColor:`rgba(184, 214, 255, 0.58)`,shadowColor:`rgba(0, 0, 0, 0.62)`,shadowAlpha:.34,shadowBlur:15}},nodes:{backgroundScale:.52,mutedAlpha:.08,strokeHierarchy:{overview:{base:.05,emphasis:.34,muted:.02},structure:{base:1.05,emphasis:1.45,muted:.55},inspection:{base:1.2,emphasis:1.7,muted:.6}},states:{default:{color:`base`,sizeMultiplier:.72,minSize:.68,forceLabel:!1,zIndex:0,borderBoost:-.42},hovered:{color:`hovered`,sizeMultiplier:1.18,minSize:12.5,forceLabel:!0,zIndex:4,borderBoost:.22},selected:{color:`selected`,sizeMultiplier:1.06,minSize:10.5,forceLabel:!0,zIndex:3,borderBoost:.2},neighbor:{color:`base`,sizeMultiplier:.84,minSize:4.8,forceLabel:!0,zIndex:2,borderBoost:-.08},path:{color:`path`,sizeMultiplier:1.01,minSize:6.2,forceLabel:!0,zIndex:2,borderBoost:.08},inactive:{color:`muted`,sizeMultiplier:.32,minSize:.46,forceLabel:!1,zIndex:0,borderBoost:-.42},muted:{color:`muted`,sizeMultiplier:.32,minSize:.46,forceLabel:!1,zIndex:0,borderBoost:-.42}},variants:{default:{sizeMultiplier:1,borderBoost:0,haloBoost:0,badgeVisibleFrom:`inspection`},temporal:{sizeMultiplier:1.02,borderBoost:.12,haloBoost:.1,badgeKind:`temporal`,badgeVisibleFrom:`structure`},inferred:{sizeMultiplier:1.05,borderBoost:.16,haloBoost:.14,badgeKind:`inferred`,badgeVisibleFrom:`structure`},provenance:{sizeMultiplier:1.03,borderBoost:.14,haloBoost:.12,badgeKind:`provenance`,badgeVisibleFrom:`structure`},selected:{sizeMultiplier:1.06,borderBoost:.22,haloBoost:.16,badgeVisibleFrom:`overview`}},selectedRing:{color:`#E7C57C`,width:1.9,nativeSize:2.2,glowAlpha:.2,visibleFrom:`overview`},badges:{inferred:{color:`#C98658`,label:`I`},temporal:{color:`#52CDEF`,label:`T`},provenance:{color:`#A289D0`,label:`P`}},badge:{radius:7,offset:3,fontSize:8,textColor:`#08111d`,background:`rgba(8, 17, 29, 0.84)`,stroke:`rgba(255,255,255,0.14)`,glowAlpha:.24}},edges:{states:{default:{color:`structure`,sizeMultiplier:.74,minSize:.18,zIndex:0,forceArrow:!1,hide:!1},backbone:{color:`backbone`,sizeMultiplier:.72,minSize:.18,zIndex:1,forceArrow:!1,hide:!1},hovered:{color:`hover`,sizeMultiplier:1.42,minSize:1.45,zIndex:3,forceArrow:!0,hide:!1},selected:{color:`hover`,sizeMultiplier:1.42,minSize:1.45,zIndex:3,forceArrow:!0,hide:!1},neighbor:{color:`focus`,sizeMultiplier:.92,minSize:.5,zIndex:1,forceArrow:!1,hide:!1},path:{color:`path`,sizeMultiplier:1.5,minSize:1.8,zIndex:4,forceArrow:!0,hide:!1},inactive:{color:`muted`,sizeMultiplier:1,minSize:.16,zIndex:0,forceArrow:!1,hide:!0},muted:{color:`muted`,sizeMultiplier:1,minSize:.16,zIndex:0,forceArrow:!1,hide:!0}},variants:{line:{baseType:`line`,arrowPolicy:`hidden`,curveStrength:0,sizeMultiplier:1,glowAlpha:0},directional:{baseType:`line`,arrowPolicy:`contextual`,curveStrength:0,sizeMultiplier:1.04,glowAlpha:.08},bidirectionalCurve:{baseType:`line`,arrowPolicy:`contextual`,curveStrength:.18,sizeMultiplier:1.08,glowAlpha:.1},parallelCurve:{baseType:`line`,arrowPolicy:`contextual`,curveStrength:.24,sizeMultiplier:1.1,glowAlpha:.12},pathSignal:{baseType:`arrow`,arrowPolicy:`always`,curveStrength:.16,sizeMultiplier:1.18,glowAlpha:.2}}},overlays:{hoverGlowAlpha:.18,pathGlowAlpha:.16,glowRadiusMultiplier:4.8,minGlowRadius:16,pulseRadius:11,curveLineWidth:1.7,curveGlowWidth:6,badgeGlowRadius:14},focus:{maxNeighbors:16,ringCapacity:6,ringGap:250,primaryLabels:6},motion:{cameraMs:380},effects:{pathPulse:{minZoomTier:`structure`,maxSegments:18,speed:.22,radius:11,glowAlpha:.92},pathFlow:{minZoomTier:`structure`,maxSegments:14,speed:.36,spacing:.26,opacity:.92,radius:3.8},lens:{minZoomTier:`structure`,radius:136,feather:78,glowAlpha:.18,edgeAlpha:.42,edgeLineWidth:1.8},temporalEmphasis:{minZoomTier:`structure`,maxHighlights:48,radiusMultiplier:4.2,glowAlpha:.12},semanticRegions:{minZoomTier:`overview`,maxRegions:3,minVisibleSamples:14,fogResolutionScale:.22,splatRadius:13,blurPasses:2,densityThreshold:.16,contourThreshold:.28,minMaskPixels:170,minOccupancyRatio:.0022,dominantMassRatio:.62,outerContourMinMaskPixels:240,fogAlpha:.11,innerContourAlpha:.16,outerContourAlpha:.045},contours:{minZoomTier:`overview`,maxContours:3,baseRadius:88,glowAlpha:.055},legend:{maxGroups:8},diagnostics:{enabledInDev:!1}}},l=[`overview`,`structure`,`inspection`];function u(e){let t=0;for(let n=0;n<e.length;n+=1)t=(t<<5)-t+e.charCodeAt(n),t|=0;return Math.abs(t)}function d(e,t,n){return Math.min(n,Math.max(e,t))}function f(e,t){if(!e)return`rgba(130, 145, 165, ${t})`;if(e.startsWith(`#`)){let n=e.slice(1),r=n.length===3?n.split(``).map(e=>`${e}${e}`).join(``):n;if(r.length===6)return`rgba(${Number.parseInt(r.slice(0,2),16)}, ${Number.parseInt(r.slice(2,4),16)}, ${Number.parseInt(r.slice(4,6),16)}, ${t})`}return e.startsWith(`rgba(`)?e.replace(/rgba\(([^)]+),\s*[\d.]+\)/,`rgba($1, ${t})`):e.startsWith(`rgb(`)?e.replace(`rgb(`,`rgba(`).replace(`)`,`, ${t})`):`rgba(130, 145, 165, ${t})`}function p(e,t){if(!e.startsWith(`#`))return e;let n=e.slice(1),r=n.length===3?n.split(``).map(e=>`${e}${e}`).join(``):n;if(r.length!==6)return e;let i=e=>d(0,e,255);return`#${[i(Number.parseInt(r.slice(0,2),16)-t),i(Number.parseInt(r.slice(2,4),16)-t),i(Number.parseInt(r.slice(4,6),16)-t)].map(e=>e.toString(16).padStart(2,`0`)).join(``)}`}function m(e,t,n){if(!e.startsWith(`#`)||!t.startsWith(`#`))return t||e;let r=e=>{let t=e.slice(1);return t.length===3?t.split(``).map(e=>`${e}${e}`).join(``):t},i=r(e),a=r(t);if(i.length!==6||a.length!==6)return t||e;let o=d(0,n,1),s=(e,t)=>Math.round(e+(t-e)*o);return`#${[0,2,4].map(e=>s(Number.parseInt(i.slice(e,e+2),16),Number.parseInt(a.slice(e,e+2),16)).toString(16).padStart(2,`0`)).join(``)}`}function h(e){return e<=c.zoomTiers.inspection.maxRatio?`inspection`:e<=c.zoomTiers.structure.maxRatio?`structure`:`overview`}function g(e,t){return l.indexOf(e)>=l.indexOf(t)}export{h as a,g as c,s as d,r as f,p as i,o as l,t as m,m as n,u as o,n as p,d as r,f as s,c as t,a as u};\ No newline at end of filediff --git a/semantica/static/assets/index-DDOaKEbH.js b/semantica/static/assets/index-DDOaKEbH.jsdeleted file mode 100644index b282c8ec..00000000--- a/semantica/static/assets/index-DDOaKEbH.js+++ /dev/null@@ -1,245 +0,0 @@-const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DecisionWorkspace-CkoD0QKe.js","assets/rolldown-runtime-B1FJdls4.js","assets/query-vendor-Cbp9LWgA.js","assets/DiffMergeWorkspace-DDK7n-jO.js","assets/GraphWorkspace-Bqx0S-ru.js","assets/graph-vendor-pbzH-eyf.js","assets/graphTheme-aSRma4TX.js","assets/explorationEffectsPluginPhaseC-D5jYu8XU.js","assets/neighborhoodPanelPlugin-qsLfEPn1.js","assets/temporalOverlayPlugin-l3pE8rf_.js","assets/ImportExportWorkspace-BU8nK4nT.js","assets/es-CS4MDIhr.js","assets/LineageDiagram-BcIhRlOg.js","assets/shim-CnYKr5zR.js","assets/LineageDiagram-CHpVij2M.css","assets/ReasoningWorkspace-BGe6HUKK.js","assets/SparqlWorkspace-CK6q2l7f.js","assets/VocabularyWorkspace-BonIpRiP.js"])))=>i.map(i=>d[i]);-import{i as e,t}from"./rolldown-runtime-B1FJdls4.js";import{C as n,S as r,T as i,_ as a,a as o,b as s,c,d as l,f as u,g as d,h as f,l as p,m,o as h,p as g,r as _,s as v,u as y,v as b,w as x,x as ee,y as te}from"./query-vendor-Cbp9LWgA.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var ne=t((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,ee||(ee=!0,oe());else{var t=n(l);t!==null&&le(x,t.startTime-e)}}var ee=!1,te=-1,ne=5,re=-1;function ie(){return g?!0:!(e.unstable_now()-re<ne)}function ae(){if(g=!1,ee){var t=e.unstable_now();re=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(te),te=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&ie());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&le(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?oe():ee=!1}}}var oe;if(typeof y==`function`)oe=function(){y(ae)};else if(typeof MessageChannel<`u`){var se=new MessageChannel,ce=se.port2;se.port1.onmessage=ae,oe=function(){ce.postMessage(null)}}else oe=function(){_(ae,0)};function le(t,n){te=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):ne=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(te),te=-1):h=!0,le(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,ee||(ee=!0,oe()))),r},e.unstable_shouldYield=ie,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),re=t(((e,t)=>{t.exports=ne()})),ie=t((e=>{var t=i();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var a={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},o=Symbol.for(`react.portal`);function s(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var c=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function l(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return s(e,t,null,r)},e.flushSync=function(e){var t=c.T,n=a.p;try{if(c.T=null,a.p=2,e)return e()}finally{c.T=t,a.p=n,a.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,a.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&a.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=l(n,t.crossOrigin),i=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?a.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:i,fetchPriority:o}):n===`script`&&a.d.X(e,{crossOrigin:r,integrity:i,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`)if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=l(t.as,t.crossOrigin);a.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??a.d.M(e)},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=l(n,t.crossOrigin);a.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`)if(t){var n=l(t.as,t.crossOrigin);a.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else a.d.m(e)},e.requestFormReset=function(e){a.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return c.H.useFormState(e,t,n)},e.useFormStatus=function(){return c.H.useHostTransitionStatus()},e.version=`19.2.4`})),ae=t(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=ie()})),oe=t((e=>{var t=re(),n=i(),r=ae();function a(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function o(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function s(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function c(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function u(e){if(s(e)!==e)throw Error(a(188))}function d(e){var t=e.alternate;if(!t){if(t=s(e),t===null)throw Error(a(188));return t===e?e:null}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var o=i.alternate;if(o===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return u(i),e;if(o===r)return u(i),t;o=o.sibling}throw Error(a(188))}if(n.return!==r.return)n=i,r=o;else{for(var c=!1,l=i.child;l;){if(l===n){c=!0,n=i,r=o;break}if(l===r){c=!0,r=i,n=o;break}l=l.sibling}if(!c){for(l=o.child;l;){if(l===n){c=!0,n=o,r=i;break}if(l===r){c=!0,r=o,n=i;break}l=l.sibling}if(!c)throw Error(a(189))}}if(n.alternate!==r)throw Error(a(190))}if(n.tag!==3)throw Error(a(188));return n.stateNode.current===n?e:t}function f(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=f(e),t!==null)return t;e=e.sibling}return null}var p=Object.assign,m=Symbol.for(`react.element`),h=Symbol.for(`react.transitional.element`),g=Symbol.for(`react.portal`),_=Symbol.for(`react.fragment`),v=Symbol.for(`react.strict_mode`),y=Symbol.for(`react.profiler`),b=Symbol.for(`react.consumer`),x=Symbol.for(`react.context`),ee=Symbol.for(`react.forward_ref`),te=Symbol.for(`react.suspense`),ne=Symbol.for(`react.suspense_list`),ie=Symbol.for(`react.memo`),oe=Symbol.for(`react.lazy`),se=Symbol.for(`react.activity`),ce=Symbol.for(`react.memo_cache_sentinel`),le=Symbol.iterator;function ue(e){return typeof e!=`object`||!e?null:(e=le&&e[le]||e[`@@iterator`],typeof e==`function`?e:null)}var de=Symbol.for(`react.client.reference`);function fe(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===de?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case _:return`Fragment`;case y:return`Profiler`;case v:return`StrictMode`;case te:return`Suspense`;case ne:return`SuspenseList`;case se:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case g:return`Portal`;case x:return e.displayName||`Context`;case b:return(e._context.displayName||`Context`)+`.Consumer`;case ee:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case ie:return t=e.displayName||null,t===null?fe(e.type)||`Memo`:t;case oe:t=e._payload,e=e._init;try{return fe(e(t))}catch{}}return null}var pe=Array.isArray,S=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,C=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,me={pending:!1,data:null,method:null,action:null},he=[],ge=-1;function _e(e){return{current:e}}function w(e){0>ge||(e.current=he[ge],he[ge]=null,ge--)}function T(e,t){ge++,he[ge]=e.current,e.current=t}var ve=_e(null),E=_e(null),ye=_e(null),be=_e(null);function xe(e,t){switch(T(ye,t),T(E,e),T(ve,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Vd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Vd(t),e=Hd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}w(ve),T(ve,e)}function Se(){w(ve),w(E),w(ye)}function Ce(e){e.memoizedState!==null&&T(be,e);var t=ve.current,n=Hd(t,e.type);t!==n&&(T(E,e),T(ve,n))}function we(e){E.current===e&&(w(ve),w(E)),be.current===e&&(w(be),Qf._currentValue=me)}var Te,Ee;function De(e){if(Te===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);Te=t&&t[1]||``,Ee=-1<e.stack.indexOf(`- at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`-`+Te+e+Ee}var Oe=!1;function D(e,t){if(!e||Oe)return``;Oe=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,`props`,{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,`name`,{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`-`),l=s.split(`-`);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`-`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{Oe=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?De(n):``}function ke(e,t){switch(e.tag){case 26:case 27:case 5:return De(e.type);case 16:return De(`Lazy`);case 13:return e.child!==t&&t!==null?De(`Suspense Fallback`):De(`Suspense`);case 19:return De(`SuspenseList`);case 0:case 15:return D(e.type,!1);case 11:return D(e.type.render,!1);case 1:return D(e.type,!0);case 31:return De(`Activity`);default:return``}}function Ae(e){try{var t=``,n=null;do t+=ke(e,n),n=e,e=e.return;while(e);return t}catch(e){return`-Error generating stack: `+e.message+`-`+e.stack}}var je=Object.prototype.hasOwnProperty,Me=t.unstable_scheduleCallback,Ne=t.unstable_cancelCallback,Pe=t.unstable_shouldYield,Fe=t.unstable_requestPaint,Ie=t.unstable_now,Le=t.unstable_getCurrentPriorityLevel,Re=t.unstable_ImmediatePriority,ze=t.unstable_UserBlockingPriority,Be=t.unstable_NormalPriority,Ve=t.unstable_LowPriority,He=t.unstable_IdlePriority,Ue=t.log,We=t.unstable_setDisableYieldValue,Ge=null,Ke=null;function qe(e){if(typeof Ue==`function`&&We(e),Ke&&typeof Ke.setStrictMode==`function`)try{Ke.setStrictMode(Ge,e)}catch{}}var Je=Math.clz32?Math.clz32:Ze,Ye=Math.log,Xe=Math.LN2;function Ze(e){return e>>>=0,e===0?32:31-(Ye(e)/Xe|0)|0}var Qe=256,$e=262144,et=4194304;function tt(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function nt(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=tt(n))):i=tt(o):i=tt(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=tt(n))):i=tt(o)):i=tt(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function rt(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function it(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function at(){var e=et;return et<<=1,!(et&62914560)&&(et=4194304),e}function ot(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function st(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function ct(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-Je(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&<(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function lt(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Je(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function ut(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Je(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function dt(e,t){var n=t&-t;return n=n&42?1:ft(n),(n&(e.suspendedLanes|t))===0?n:0}function ft(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function pt(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function mt(){var e=C.p;return e===0?(e=window.event,e===void 0?32:mp(e.type)):e}function ht(e,t){var n=C.p;try{return C.p=e,t()}finally{C.p=n}}var gt=Math.random().toString(36).slice(2),_t=`__reactFiber$`+gt,vt=`__reactProps$`+gt,yt=`__reactContainer$`+gt,bt=`__reactEvents$`+gt,xt=`__reactListeners$`+gt,St=`__reactHandles$`+gt,Ct=`__reactResources$`+gt,wt=`__reactMarker$`+gt;function Tt(e){delete e[_t],delete e[vt],delete e[bt],delete e[xt],delete e[St]}function Et(e){var t=e[_t];if(t)return t;for(var n=e.parentNode;n;){if(t=n[yt]||n[_t]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=df(e);e!==null;){if(n=e[_t])return n;e=df(e)}return t}e=n,n=e.parentNode}return null}function Dt(e){if(e=e[_t]||e[yt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Ot(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(a(33))}function kt(e){var t=e[Ct];return t||=e[Ct]={hoistableStyles:new Map,hoistableScripts:new Map},t}function O(e){e[wt]=!0}var At=new Set,jt={};function Mt(e,t){Nt(e,t),Nt(e+`Capture`,t)}function Nt(e,t){for(jt[e]=t,e=0;e<t.length;e++)At.add(t[e])}var Pt=RegExp(`^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$`),Ft={},It={};function Lt(e){return je.call(It,e)?!0:je.call(Ft,e)?!1:Pt.test(e)?It[e]=!0:(Ft[e]=!0,!1)}function Rt(e,t,n){if(Lt(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,``+n)}}function zt(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,``+n)}}function Bt(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,``+r)}}function Vt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Ht(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Ut(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Wt(e){if(!e._valueTracker){var t=Ht(e)?`checked`:`value`;e._valueTracker=Ut(e,t,``+e[t])}}function Gt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Ht(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function Kt(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var qt=/[\n"\\]/g;function Jt(e){return e.replace(qt,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Yt(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+Vt(t)):e.value!==``+Vt(t)&&(e.value=``+Vt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Zt(e,o,Vt(n)):Zt(e,o,Vt(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+Vt(s):e.removeAttribute(`name`)}function Xt(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){Wt(e);return}n=n==null?``:``+Vt(n),t=t==null?n:``+Vt(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),Wt(e)}function Zt(e,t,n){t===`number`&&Kt(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function Qt(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+Vt(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function $t(e,t,n){if(t!=null&&(t=``+Vt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+Vt(n)}function en(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(a(92));if(pe(r)){if(1<r.length)throw Error(a(93));r=r[0]}n=r}n??=``,t=n}n=Vt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Wt(e)}function tn(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var nn=new Set(`animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp`.split(` `));function rn(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||nn.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function an(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(a(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``);for(var i in t)r=t[i],t.hasOwnProperty(i)&&n[i]!==r&&rn(e,i,r)}else for(var o in t)t.hasOwnProperty(o)&&rn(e,o,t[o])}function on(e){if(e.indexOf(`-`)===-1)return!1;switch(e){case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return!1;default:return!0}}var sn=new Map([[`acceptCharset`,`accept-charset`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`],[`crossOrigin`,`crossorigin`],[`accentHeight`,`accent-height`],[`alignmentBaseline`,`alignment-baseline`],[`arabicForm`,`arabic-form`],[`baselineShift`,`baseline-shift`],[`capHeight`,`cap-height`],[`clipPath`,`clip-path`],[`clipRule`,`clip-rule`],[`colorInterpolation`,`color-interpolation`],[`colorInterpolationFilters`,`color-interpolation-filters`],[`colorProfile`,`color-profile`],[`colorRendering`,`color-rendering`],[`dominantBaseline`,`dominant-baseline`],[`enableBackground`,`enable-background`],[`fillOpacity`,`fill-opacity`],[`fillRule`,`fill-rule`],[`floodColor`,`flood-color`],[`floodOpacity`,`flood-opacity`],[`fontFamily`,`font-family`],[`fontSize`,`font-size`],[`fontSizeAdjust`,`font-size-adjust`],[`fontStretch`,`font-stretch`],[`fontStyle`,`font-style`],[`fontVariant`,`font-variant`],[`fontWeight`,`font-weight`],[`glyphName`,`glyph-name`],[`glyphOrientationHorizontal`,`glyph-orientation-horizontal`],[`glyphOrientationVertical`,`glyph-orientation-vertical`],[`horizAdvX`,`horiz-adv-x`],[`horizOriginX`,`horiz-origin-x`],[`imageRendering`,`image-rendering`],[`letterSpacing`,`letter-spacing`],[`lightingColor`,`lighting-color`],[`markerEnd`,`marker-end`],[`markerMid`,`marker-mid`],[`markerStart`,`marker-start`],[`overlinePosition`,`overline-position`],[`overlineThickness`,`overline-thickness`],[`paintOrder`,`paint-order`],[`panose-1`,`panose-1`],[`pointerEvents`,`pointer-events`],[`renderingIntent`,`rendering-intent`],[`shapeRendering`,`shape-rendering`],[`stopColor`,`stop-color`],[`stopOpacity`,`stop-opacity`],[`strikethroughPosition`,`strikethrough-position`],[`strikethroughThickness`,`strikethrough-thickness`],[`strokeDasharray`,`stroke-dasharray`],[`strokeDashoffset`,`stroke-dashoffset`],[`strokeLinecap`,`stroke-linecap`],[`strokeLinejoin`,`stroke-linejoin`],[`strokeMiterlimit`,`stroke-miterlimit`],[`strokeOpacity`,`stroke-opacity`],[`strokeWidth`,`stroke-width`],[`textAnchor`,`text-anchor`],[`textDecoration`,`text-decoration`],[`textRendering`,`text-rendering`],[`transformOrigin`,`transform-origin`],[`underlinePosition`,`underline-position`],[`underlineThickness`,`underline-thickness`],[`unicodeBidi`,`unicode-bidi`],[`unicodeRange`,`unicode-range`],[`unitsPerEm`,`units-per-em`],[`vAlphabetic`,`v-alphabetic`],[`vHanging`,`v-hanging`],[`vIdeographic`,`v-ideographic`],[`vMathematical`,`v-mathematical`],[`vectorEffect`,`vector-effect`],[`vertAdvY`,`vert-adv-y`],[`vertOriginX`,`vert-origin-x`],[`vertOriginY`,`vert-origin-y`],[`wordSpacing`,`word-spacing`],[`writingMode`,`writing-mode`],[`xmlnsXlink`,`xmlns:xlink`],[`xHeight`,`x-height`]]),cn=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function ln(e){return cn.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function un(){}var dn=null;function fn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var pn=null,mn=null;function hn(e){var t=Dt(e);if(t&&(e=t.stateNode)){var n=e[vt]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Yt(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+Jt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=r[vt]||null;if(!i)throw Error(a(90));Yt(r,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&Gt(r)}break a;case`textarea`:$t(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&Qt(e,!!n.multiple,t,!1)}}}var gn=!1;function _n(e,t,n){if(gn)return e(t,n);gn=!0;try{return e(t)}finally{if(gn=!1,(pn!==null||mn!==null)&&(bu(),pn&&(t=pn,e=mn,mn=pn=null,hn(t),e)))for(t=0;t<e.length;t++)hn(e[t])}}function vn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[vt]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=!(e===`button`||e===`input`||e===`select`||e===`textarea`)),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(a(231,t,typeof n));return n}var yn=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),bn=!1;if(yn)try{var xn={};Object.defineProperty(xn,`passive`,{get:function(){bn=!0}}),window.addEventListener(`test`,xn,xn),window.removeEventListener(`test`,xn,xn)}catch{bn=!1}var Sn=null,Cn=null,wn=null;function Tn(){if(wn)return wn;var e,t=Cn,n=t.length,r,i=`value`in Sn?Sn.value:Sn.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return wn=i.slice(e,1<r?1-r:void 0)}function En(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Dn(){return!0}function On(){return!1}function kn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?Dn:On,this.isPropagationStopped=On,this}return p(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=Dn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=Dn)},persist:function(){},isPersistent:Dn}),t}var An={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},jn=kn(An),Mn=p({},An,{view:0,detail:0}),Nn=kn(Mn),Pn,Fn,In,Ln=p({},Mn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Jn,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==In&&(In&&e.type===`mousemove`?(Pn=e.screenX-In.screenX,Fn=e.screenY-In.screenY):Fn=Pn=0,In=e),Pn)},movementY:function(e){return`movementY`in e?e.movementY:Fn}}),Rn=kn(Ln),zn=kn(p({},Ln,{dataTransfer:0})),Bn=kn(p({},Mn,{relatedTarget:0})),Vn=kn(p({},An,{animationName:0,elapsedTime:0,pseudoElement:0})),Hn=kn(p({},An,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Un=kn(p({},An,{data:0})),Wn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Gn={8:`Backspace`,9:`Tab`,12:`Clear`,13:`Enter`,16:`Shift`,17:`Control`,18:`Alt`,19:`Pause`,20:`CapsLock`,27:`Escape`,32:` `,33:`PageUp`,34:`PageDown`,35:`End`,36:`Home`,37:`ArrowLeft`,38:`ArrowUp`,39:`ArrowRight`,40:`ArrowDown`,45:`Insert`,46:`Delete`,112:`F1`,113:`F2`,114:`F3`,115:`F4`,116:`F5`,117:`F6`,118:`F7`,119:`F8`,120:`F9`,121:`F10`,122:`F11`,123:`F12`,144:`NumLock`,145:`ScrollLock`,224:`Meta`},Kn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function qn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Kn[e])?!!t[e]:!1}function Jn(){return qn}var Yn=kn(p({},Mn,{key:function(e){if(e.key){var t=Wn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=En(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Gn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Jn,charCode:function(e){return e.type===`keypress`?En(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?En(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Xn=kn(p({},Ln,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Zn=kn(p({},Mn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Jn})),Qn=kn(p({},An,{propertyName:0,elapsedTime:0,pseudoElement:0})),$n=kn(p({},Ln,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),er=kn(p({},An,{newState:0,oldState:0})),tr=[9,13,27,32],nr=yn&&`CompositionEvent`in window,rr=null;yn&&`documentMode`in document&&(rr=document.documentMode);var ir=yn&&`TextEvent`in window&&!rr,ar=yn&&(!nr||rr&&8<rr&&11>=rr),or=` `,sr=!1;function cr(e,t){switch(e){case`keyup`:return tr.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function lr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var ur=!1;function dr(e,t){switch(e){case`compositionend`:return lr(t);case`keypress`:return t.which===32?(sr=!0,or):null;case`textInput`:return e=t.data,e===or&&sr?null:e;default:return null}}function fr(e,t){if(ur)return e===`compositionend`||!nr&&cr(e,t)?(e=Tn(),wn=Cn=Sn=null,ur=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return ar&&t.locale!==`ko`?null:t.data;default:return null}}var pr={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function mr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!pr[e.type]:t===`textarea`}function hr(e,t,n,r){pn?mn?mn.push(r):mn=[r]:pn=r,t=Ed(t,`onChange`),0<t.length&&(n=new jn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var gr=null,_r=null;function vr(e){yd(e,0)}function yr(e){if(Gt(Ot(e)))return e}function br(e,t){if(e===`change`)return t}var xr=!1;if(yn){var Sr;if(yn){var Cr=`oninput`in document;if(!Cr){var wr=document.createElement(`div`);wr.setAttribute(`oninput`,`return;`),Cr=typeof wr.oninput==`function`}Sr=Cr}else Sr=!1;xr=Sr&&(!document.documentMode||9<document.documentMode)}function Tr(){gr&&(gr.detachEvent(`onpropertychange`,Er),_r=gr=null)}function Er(e){if(e.propertyName===`value`&&yr(_r)){var t=[];hr(t,_r,e,fn(e)),_n(vr,t)}}function Dr(e,t,n){e===`focusin`?(Tr(),gr=t,_r=n,gr.attachEvent(`onpropertychange`,Er)):e===`focusout`&&Tr()}function Or(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return yr(_r)}function kr(e,t){if(e===`click`)return yr(t)}function Ar(e,t){if(e===`input`||e===`change`)return yr(t)}function jr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Mr=typeof Object.is==`function`?Object.is:jr;function Nr(e,t){if(Mr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!je.call(t,i)||!Mr(e[i],t[i]))return!1}return!0}function Pr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Fr(e,t){var n=Pr(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Pr(n)}}function Ir(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Ir(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Lr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Kt(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Kt(e.document)}return t}function Rr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var zr=yn&&`documentMode`in document&&11>=document.documentMode,Br=null,Vr=null,Hr=null,Ur=!1;function Wr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Ur||Br==null||Br!==Kt(r)||(r=Br,`selectionStart`in r&&Rr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Hr&&Nr(Hr,r)||(Hr=r,r=Ed(Vr,`onSelect`),0<r.length&&(t=new jn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Br)))}function Gr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Kr={animationend:Gr(`Animation`,`AnimationEnd`),animationiteration:Gr(`Animation`,`AnimationIteration`),animationstart:Gr(`Animation`,`AnimationStart`),transitionrun:Gr(`Transition`,`TransitionRun`),transitionstart:Gr(`Transition`,`TransitionStart`),transitioncancel:Gr(`Transition`,`TransitionCancel`),transitionend:Gr(`Transition`,`TransitionEnd`)},qr={},Jr={};yn&&(Jr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Kr.animationend.animation,delete Kr.animationiteration.animation,delete Kr.animationstart.animation),`TransitionEvent`in window||delete Kr.transitionend.transition);function Yr(e){if(qr[e])return qr[e];if(!Kr[e])return e;var t=Kr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Jr)return qr[e]=t[n];return e}var Xr=Yr(`animationend`),Zr=Yr(`animationiteration`),Qr=Yr(`animationstart`),$r=Yr(`transitionrun`),ei=Yr(`transitionstart`),ti=Yr(`transitioncancel`),ni=Yr(`transitionend`),ri=new Map,ii=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);ii.push(`scrollEnd`);function ai(e,t){ri.set(e,t),Mt(t,[e])}var oi=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},si=[],ci=0,li=0;function ui(){for(var e=ci,t=li=ci=0;t<e;){var n=si[t];si[t++]=null;var r=si[t];si[t++]=null;var i=si[t];si[t++]=null;var a=si[t];if(si[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&mi(n,i,a)}}function di(e,t,n,r){si[ci++]=e,si[ci++]=t,si[ci++]=n,si[ci++]=r,li|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function fi(e,t,n,r){return di(e,t,n,r),hi(e)}function pi(e,t){return di(e,null,null,t),hi(e)}function mi(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-Je(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function hi(e){if(50<du)throw du=0,fu=null,Error(a(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var gi={};function _i(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function vi(e,t,n,r){return new _i(e,t,n,r)}function yi(e){return e=e.prototype,!(!e||!e.isReactComponent)}function bi(e,t){var n=e.alternate;return n===null?(n=vi(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function xi(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Si(e,t,n,r,i,o){var s=0;if(r=e,typeof e==`function`)yi(e)&&(s=1);else if(typeof e==`string`)s=Uf(e,n,ve.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case se:return e=vi(31,n,t,i),e.elementType=se,e.lanes=o,e;case _:return Ci(n.children,i,o,t);case v:s=8,i|=24;break;case y:return e=vi(12,n,t,i|2),e.elementType=y,e.lanes=o,e;case te:return e=vi(13,n,t,i),e.elementType=te,e.lanes=o,e;case ne:return e=vi(19,n,t,i),e.elementType=ne,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case x:s=10;break a;case b:s=9;break a;case ee:s=11;break a;case ie:s=14;break a;case oe:s=16,r=null;break a}s=29,n=Error(a(130,e===null?`null`:typeof e,``)),r=null}return t=vi(s,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function Ci(e,t,n,r){return e=vi(7,e,r,t),e.lanes=n,e}function wi(e,t,n){return e=vi(6,e,null,t),e.lanes=n,e}function Ti(e){var t=vi(18,null,null,0);return t.stateNode=e,t}function Ei(e,t,n){return t=vi(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Di=new WeakMap;function Oi(e,t){if(typeof e==`object`&&e){var n=Di.get(e);return n===void 0?(t={value:e,source:t,stack:Ae(t)},Di.set(e,t),t):n}return{value:e,source:t,stack:Ae(t)}}var ki=[],Ai=0,ji=null,Mi=0,Ni=[],Pi=0,Fi=null,Ii=1,Li=``;function Ri(e,t){ki[Ai++]=Mi,ki[Ai++]=ji,ji=e,Mi=t}function zi(e,t,n){Ni[Pi++]=Ii,Ni[Pi++]=Li,Ni[Pi++]=Fi,Fi=e;var r=Ii;e=Li;var i=32-Je(r)-1;r&=~(1<<i),n+=1;var a=32-Je(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Ii=1<<32-Je(t)+i|n<<i|r,Li=a+e}else Ii=1<<a|n<<i|r,Li=e}function Bi(e){e.return!==null&&(Ri(e,1),zi(e,1,0))}function Vi(e){for(;e===ji;)ji=ki[--Ai],ki[Ai]=null,Mi=ki[--Ai],ki[Ai]=null;for(;e===Fi;)Fi=Ni[--Pi],Ni[Pi]=null,Li=Ni[--Pi],Ni[Pi]=null,Ii=Ni[--Pi],Ni[Pi]=null}function Hi(e,t){Ni[Pi++]=Ii,Ni[Pi++]=Li,Ni[Pi++]=Fi,Ii=t.id,Li=t.overflow,Fi=e}var Ui=null,k=null,A=!1,Wi=null,Gi=!1,Ki=Error(a(519));function qi(e){throw $i(Oi(Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Ki}function Ji(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[_t]=e,t[vt]=r,n){case`dialog`:Q(`cancel`,t),Q(`close`,t);break;case`iframe`:case`object`:case`embed`:Q(`load`,t);break;case`video`:case`audio`:for(n=0;n<_d.length;n++)Q(_d[n],t);break;case`source`:Q(`error`,t);break;case`img`:case`image`:case`link`:Q(`error`,t),Q(`load`,t);break;case`details`:Q(`toggle`,t);break;case`input`:Q(`invalid`,t),Xt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:Q(`invalid`,t);break;case`textarea`:Q(`invalid`,t),en(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||Md(t.textContent,n)?(r.popover!=null&&(Q(`beforetoggle`,t),Q(`toggle`,t)),r.onScroll!=null&&Q(`scroll`,t),r.onScrollEnd!=null&&Q(`scrollend`,t),r.onClick!=null&&(t.onclick=un),t=!0):t=!1,t||qi(e,!0)}function Yi(e){for(Ui=e.return;Ui;)switch(Ui.tag){case 5:case 31:case 13:Gi=!1;return;case 27:case 3:Gi=!0;return;default:Ui=Ui.return}}function Xi(e){if(e!==Ui)return!1;if(!A)return Yi(e),A=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!==`form`&&n!==`button`)||Ud(e.type,e.memoizedProps)),n=!n),n&&k&&qi(e),Yi(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(a(317));k=uf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(a(317));k=uf(e)}else t===27?(t=k,Zd(e.type)?(e=lf,lf=null,k=e):k=t):k=Ui?cf(e.stateNode.nextSibling):null;return!0}function Zi(){k=Ui=null,A=!1}function Qi(){var e=Wi;return e!==null&&(Ql===null?Ql=e:Ql.push.apply(Ql,e),Wi=null),e}function $i(e){Wi===null?Wi=[e]:Wi.push(e)}var ea=_e(null),ta=null,na=null;function ra(e,t,n){T(ea,t._currentValue),t._currentValue=n}function ia(e){e._currentValue=ea.current,w(ea)}function aa(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function oa(e,t,n,r){var i=e.child;for(i!==null&&(i.return=e);i!==null;){var o=i.dependencies;if(o!==null){var s=i.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=i;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),aa(o.return,n,e),r||(s=null);break a}o=c.next}}else if(i.tag===18){if(s=i.return,s===null)throw Error(a(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),aa(s,n,e),s=null}else s=i.child;if(s!==null)s.return=i;else for(s=i;s!==null;){if(s===e){s=null;break}if(i=s.sibling,i!==null){i.return=s.return,s=i;break}s=s.return}i=s}}function sa(e,t,n,r){e=null;for(var i=t,o=!1;i!==null;){if(!o){if(i.flags&524288)o=!0;else if(i.flags&262144)break}if(i.tag===10){var s=i.alternate;if(s===null)throw Error(a(387));if(s=s.memoizedProps,s!==null){var c=i.type;Mr(i.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(i===be.current){if(s=i.alternate,s===null)throw Error(a(387));s.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(e===null?e=[Qf]:e.push(Qf))}i=i.return}e!==null&&oa(t,e,n,r),t.flags|=262144}function ca(e){for(e=e.firstContext;e!==null;){if(!Mr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function la(e){ta=e,na=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function j(e){return da(ta,e)}function ua(e,t){return ta===null&&la(e),da(e,t)}function da(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},na===null){if(e===null)throw Error(a(308));na=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else na=na.next=t;return n}var fa=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},pa=t.unstable_scheduleCallback,ma=t.unstable_NormalPriority,M={$$typeof:x,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ha(){return{controller:new fa,data:new Map,refCount:0}}function ga(e){e.refCount--,e.refCount===0&&pa(ma,function(){e.controller.abort()})}var _a=null,va=0,ya=0,ba=null;function xa(e,t){if(_a===null){var n=_a=[];va=0,ya=dd(),ba={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return va++,t.then(Sa,Sa),t}function Sa(){if(--va===0&&_a!==null){ba!==null&&(ba.status=`fulfilled`);var e=_a;_a=null,ya=0,ba=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Ca(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var wa=S.S;S.S=function(e,t){tu=Ie(),typeof t==`object`&&t&&typeof t.then==`function`&&xa(e,t),wa!==null&&wa(e,t)};var Ta=_e(null);function Ea(){var e=Ta.current;return e===null?G.pooledCache:e}function Da(e,t){t===null?T(Ta,Ta.current):T(Ta,t.pool)}function Oa(){var e=Ea();return e===null?null:{parent:M._currentValue,pool:e}}var ka=Error(a(460)),Aa=Error(a(474)),ja=Error(a(542)),Ma={then:function(){}};function Na(e){return e=e.status,e===`fulfilled`||e===`rejected`}function Pa(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(un,un),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Ra(e),e;default:if(typeof t.status==`string`)t.then(un,un);else{if(e=G,e!==null&&100<e.shellSuspendCounter)throw Error(a(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Ra(e),e}throw Ia=t,ka}}function Fa(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(Ia=e,ka):e}}var Ia=null;function La(){if(Ia===null)throw Error(a(459));var e=Ia;return Ia=null,e}function Ra(e){if(e===ka||e===ja)throw Error(a(483))}var za=null,Ba=0;function Va(e){var t=Ba;return Ba+=1,za===null&&(za=[]),Pa(za,e,t)}function Ha(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function Ua(e,t){throw t.$$typeof===m?Error(a(525)):(e=Object.prototype.toString.call(t),Error(a(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function Wa(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function i(e,t){return e=bi(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=67108866,n):(r=r.index,r<n?(t.flags|=67108866,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=wi(n,e.mode,r),t.return=e,t):(t=i(t,n),t.return=e,t)}function l(e,t,n,r){var a=n.type;return a===_?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===a||typeof a==`object`&&a&&a.$$typeof===oe&&Fa(a)===t.type)?(t=i(t,n.props),Ha(t,n),t.return=e,t):(t=Si(n.type,n.key,n.props,null,e.mode,r),Ha(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=Ei(n,e.mode,r),t.return=e,t):(t=i(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,a){return t===null||t.tag!==7?(t=Ci(n,e.mode,r,a),t.return=e,t):(t=i(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=wi(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case h:return n=Si(t.type,t.key,t.props,null,e.mode,n),Ha(n,t),n.return=e,n;case g:return t=Ei(t,e.mode,n),t.return=e,t;case oe:return t=Fa(t),f(e,t,n)}if(pe(t)||ue(t))return t=Ci(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,Va(t),n);if(t.$$typeof===x)return f(e,ua(e,t),n);Ua(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case h:return n.key===i?l(e,t,n,r):null;case g:return n.key===i?u(e,t,n,r):null;case oe:return n=Fa(n),p(e,t,n,r)}if(pe(n)||ue(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,Va(n),r);if(n.$$typeof===x)return p(e,t,ua(e,n),r);Ua(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case h:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case g:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case oe:return r=Fa(r),m(e,t,n,r,i)}if(pe(r)||ue(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,Va(r),i);if(r.$$typeof===x)return m(e,t,n,ua(t,r),i);Ua(t,r)}return null}function v(i,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),A&&Ri(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return A&&Ri(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&g.alternate!==null&&d.delete(g.key===null?h:g.key),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),A&&Ri(i,h),l}function y(i,s,c,l){if(c==null)throw Error(a(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(i,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(i,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(i,h),A&&Ri(i,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(i,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return A&&Ri(i,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,i,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(i,e)}),A&&Ri(i,g),u}function b(e,r,o,c){if(typeof o==`object`&&o&&o.type===_&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case h:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===_){if(r.tag===7){n(e,r.sibling),c=i(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===oe&&Fa(l)===r.type){n(e,r.sibling),c=i(r,o.props),Ha(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===_?(c=Ci(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=Si(o.type,o.key,o.props,null,e.mode,c),Ha(c,o),c.return=e,e=c)}return s(e);case g:a:{for(l=o.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=i(r,o.children||[]),c.return=e,e=c;break a}else{n(e,r);break}else t(e,r);r=r.sibling}c=Ei(o,e.mode,c),c.return=e,e=c}return s(e);case oe:return o=Fa(o),b(e,r,o,c)}if(pe(o))return v(e,r,o,c);if(ue(o)){if(l=ue(o),typeof l!=`function`)throw Error(a(150));return o=l.call(o),y(e,r,o,c)}if(typeof o.then==`function`)return b(e,r,Va(o),c);if(o.$$typeof===x)return b(e,r,ua(e,o),c);Ua(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=i(r,o),c.return=e,e=c):(n(e,r),c=wi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Ba=0;var i=b(e,t,n,r);return za=null,i}catch(t){if(t===ka||t===ja)throw t;var a=vi(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Ga=Wa(!0),Ka=Wa(!1),qa=!1;function Ja(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ya(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Xa(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Za(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,W&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=hi(e),mi(e,null,n),t}return di(e,r,t,n),hi(e)}function Qa(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ut(e,n)}}function $a(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var eo=!1;function to(){if(eo){var e=ba;if(e!==null)throw e}}function no(e,t,n,r){eo=!1;var i=e.updateQueue;qa=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,m=f!==s.lane;if(m?(q&f)===f:(r&f)===f){f!==0&&f===ya&&(eo=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;f=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,f);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,f=typeof h==`function`?h.call(_,d,f):h,f==null)break a;d=p({},d,f);break a;case 2:qa=!0}}f=s.callback,f!==null&&(e.flags|=64,m&&(e.flags|=8192),m=i.callbacks,m===null?i.callbacks=[f]:m.push(f))}else m={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=m,c=d):u=u.next=m,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;m=s,s=m.next,m.next=null,i.lastBaseUpdate=m,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),Kl|=o,e.lanes=o,e.memoizedState=d}}function ro(e,t){if(typeof e!=`function`)throw Error(a(191,e));e.call(t)}function io(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)ro(n[e],t)}var ao=_e(null),oo=_e(0);function so(e,t){e=Gl,T(oo,e),T(ao,t),Gl=e|t.baseLanes}function co(){T(oo,Gl),T(ao,ao.current)}function lo(){Gl=oo.current,w(ao),w(oo)}var uo=_e(null),fo=null;function po(e){var t=e.alternate;T(N,N.current&1),T(uo,e),fo===null&&(t===null||ao.current!==null||t.memoizedState!==null)&&(fo=e)}function mo(e){T(N,N.current),T(uo,e),fo===null&&(fo=e)}function ho(e){e.tag===22?(T(N,N.current),T(uo,e),fo===null&&(fo=e)):go(e)}function go(){T(N,N.current),T(uo,uo.current)}function _o(e){w(uo),fo===e&&(fo=null),w(N)}var N=_e(0);function vo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||af(n)||of(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder===`forwards`||t.memoizedProps.revealOrder===`backwards`||t.memoizedProps.revealOrder===`unstable_legacy-backwards`||t.memoizedProps.revealOrder===`together`)){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var yo=0,P=null,F=null,I=null,bo=!1,xo=!1,So=!1,Co=0,wo=0,To=null,Eo=0;function L(){throw Error(a(321))}function Do(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Mr(e[n],t[n]))return!1;return!0}function Oo(e,t,n,r,i,a){return yo=a,P=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,S.H=e===null||e.memoizedState===null?Ws:Gs,So=!1,a=n(r,i),So=!1,xo&&(a=Ao(t,n,r,i)),ko(e),a}function ko(e){S.H=Us;var t=F!==null&&F.next!==null;if(yo=0,I=F=P=null,bo=!1,wo=0,To=null,t)throw Error(a(300));e===null||z||(e=e.dependencies,e!==null&&ca(e)&&(z=!0))}function Ao(e,t,n,r){P=e;var i=0;do{if(xo&&(To=null),wo=0,xo=!1,25<=i)throw Error(a(301));if(i+=1,I=F=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}S.H=Ks,o=t(n,r)}while(xo);return o}function jo(){var e=S.H,t=e.useState()[0];return t=typeof t.then==`function`?Lo(t):t,e=e.useState()[0],(F===null?null:F.memoizedState)!==e&&(P.flags|=1024),t}function Mo(){var e=Co!==0;return Co=0,e}function No(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Po(e){if(bo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}bo=!1}yo=0,I=F=P=null,xo=!1,wo=Co=0,To=null}function Fo(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return I===null?P.memoizedState=I=e:I=I.next=e,I}function R(){if(F===null){var e=P.alternate;e=e===null?null:e.memoizedState}else e=F.next;var t=I===null?P.memoizedState:I.next;if(t!==null)I=t,F=e;else{if(e===null)throw P.alternate===null?Error(a(467)):Error(a(310));F=e,e={memoizedState:F.memoizedState,baseState:F.baseState,baseQueue:F.baseQueue,queue:F.queue,next:null},I===null?P.memoizedState=I=e:I=I.next=e}return I}function Io(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Lo(e){var t=wo;return wo+=1,To===null&&(To=[]),e=Pa(To,e,t),t=P,(I===null?t.memoizedState:I.next)===null&&(t=t.alternate,S.H=t===null||t.memoizedState===null?Ws:Gs),e}function Ro(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return Lo(e);if(e.$$typeof===x)return j(e)}throw Error(a(438,String(e)))}function zo(e){var t=null,n=P.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=P.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=Io(),P.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=ce;return t.index++,n}function Bo(e,t){return typeof t==`function`?t(e):t}function Vo(e){return Ho(R(),F,e)}function Ho(e,t,n){var r=e.queue;if(r===null)throw Error(a(311));r.lastRenderedReducer=n;var i=e.baseQueue,o=r.pending;if(o!==null){if(i!==null){var s=i.next;i.next=o.next,o.next=s}t.baseQueue=i=o,r.pending=null}if(o=e.baseState,i===null)e.memoizedState=o;else{t=i.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(yo&f)===f:(q&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===ya&&(d=!0);else if((yo&p)===p){u=u.next,p===ya&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,P.lanes|=p,Kl|=p;f=u.action,So&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,P.lanes|=f,Kl|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!Mr(o,e.memoizedState)&&(z=!0,d&&(n=ba,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return i===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function Uo(e){var t=R(),n=t.queue;if(n===null)throw Error(a(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(i!==null){n.pending=null;var s=i=i.next;do o=e(o,s.action),s=s.next;while(s!==i);Mr(o,t.memoizedState)||(z=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Wo(e,t,n){var r=P,i=R(),o=A;if(o){if(n===void 0)throw Error(a(407));n=n()}else n=t();var s=!Mr((F||i).memoizedState,n);if(s&&(i.memoizedState=n,z=!0),i=i.queue,hs(qo.bind(null,r,i,e),[e]),i.getSnapshot!==t||s||I!==null&&I.memoizedState.tag&1){if(r.flags|=2048,us(9,{destroy:void 0},Ko.bind(null,r,i,n,t),null),G===null)throw Error(a(349));o||yo&127||Go(r,t,n)}return n}function Go(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=P.updateQueue,t===null?(t=Io(),P.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Ko(e,t,n,r){t.value=n,t.getSnapshot=r,Jo(t)&&Yo(e)}function qo(e,t,n){return n(function(){Jo(t)&&Yo(e)})}function Jo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Mr(e,n)}catch{return!0}}function Yo(e){var t=pi(e,2);t!==null&&hu(t,e,2)}function Xo(e){var t=Fo();if(typeof e==`function`){var n=e;if(e=n(),So){qe(!0);try{n()}finally{qe(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Bo,lastRenderedState:e},t}function Zo(e,t,n,r){return e.baseState=n,Ho(e,F,typeof r==`function`?r:Bo)}function Qo(e,t,n,r,i){if(Bs(e))throw Error(a(485));if(e=t.action,e!==null){var o={payload:i,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};S.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,$o(t,o)):(o.next=n.next,t.pending=n.next=o)}}function $o(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=S.T,o={};S.T=o;try{var s=n(i,r),c=S.S;c!==null&&c(o,s),es(e,t,s)}catch(n){ns(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),S.T=a}}else try{a=n(i,r),es(e,t,a)}catch(n){ns(e,t,n)}}function es(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){ts(e,t,n)},function(n){return ns(e,t,n)}):ts(e,t,n)}function ts(e,t,n){t.status=`fulfilled`,t.value=n,rs(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,$o(e,n)))}function ns(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,rs(t),t=t.next;while(t!==r)}e.action=null}function rs(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function is(e,t){return t}function as(e,t){if(A){var n=G.formState;if(n!==null){a:{var r=P;if(A){if(k){b:{for(var i=k,a=Gi;i.nodeType!==8;){if(!a){i=null;break b}if(i=cf(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){k=cf(i.nextSibling),r=i.data===`F!`;break a}}qi(r)}r=!1}r&&(t=n[0])}}return n=Fo(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:is,lastRenderedState:t},n.queue=r,n=Ls.bind(null,P,r),r.dispatch=n,r=Xo(!1),a=zs.bind(null,P,!1,r.queue),r=Fo(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Qo.bind(null,P,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function os(e){return ss(R(),F,e)}function ss(e,t,n){if(t=Ho(e,t,is)[0],e=Vo(Bo)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=Lo(t)}catch(e){throw e===ka?ja:e}else r=t;t=R();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(P.flags|=2048,us(9,{destroy:void 0},cs.bind(null,i,n),null)),[r,a,e]}function cs(e,t){e.action=t}function ls(e){var t=R(),n=F;if(n!==null)return ss(t,n,e);R(),t=t.memoizedState,n=R();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function us(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=P.updateQueue,t===null&&(t=Io(),P.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function ds(){return R().memoizedState}function fs(e,t,n,r){var i=Fo();P.flags|=e,i.memoizedState=us(1|t,{destroy:void 0},n,r===void 0?null:r)}function ps(e,t,n,r){var i=R();r=r===void 0?null:r;var a=i.memoizedState.inst;F!==null&&r!==null&&Do(r,F.memoizedState.deps)?i.memoizedState=us(t,a,n,r):(P.flags|=e,i.memoizedState=us(1|t,a,n,r))}function ms(e,t){fs(8390656,8,e,t)}function hs(e,t){ps(2048,8,e,t)}function gs(e){P.flags|=4;var t=P.updateQueue;if(t===null)t=Io(),P.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function _s(e){var t=R().memoizedState;return gs({ref:t,nextImpl:e}),function(){if(W&2)throw Error(a(440));return t.impl.apply(void 0,arguments)}}function vs(e,t){return ps(4,2,e,t)}function ys(e,t){return ps(4,4,e,t)}function bs(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function xs(e,t,n){n=n==null?null:n.concat([e]),ps(4,4,bs.bind(null,t,e),n)}function Ss(){}function Cs(e,t){var n=R();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&Do(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function ws(e,t){var n=R();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&Do(t,r[1]))return r[0];if(r=e(),So){qe(!0);try{e()}finally{qe(!1)}}return n.memoizedState=[r,t],r}function Ts(e,t,n){return n===void 0||yo&1073741824&&!(q&261930)?e.memoizedState=t:(e.memoizedState=n,e=mu(),P.lanes|=e,Kl|=e,n)}function Es(e,t,n,r){return Mr(n,t)?n:ao.current===null?!(yo&42)||yo&1073741824&&!(q&261930)?(z=!0,e.memoizedState=n):(e=mu(),P.lanes|=e,Kl|=e,t):(e=Ts(e,n,r),Mr(e,t)||(z=!0),e)}function Ds(e,t,n,r,i){var a=C.p;C.p=a!==0&&8>a?a:8;var o=S.T,s={};S.T=s,zs(e,!1,t,n);try{var c=i(),l=S.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Rs(e,t,Ca(c,r),pu(e)):Rs(e,t,r,pu(e))}catch(n){Rs(e,t,{then:function(){},status:`rejected`,reason:n},pu())}finally{C.p=a,o!==null&&s.types!==null&&(o.types=s.types),S.T=o}}function Os(){}function ks(e,t,n,r){if(e.tag!==5)throw Error(a(476));var i=As(e).queue;Ds(e,i,t,me,n===null?Os:function(){return js(e),n(r)})}function As(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:me,baseState:me,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Bo,lastRenderedState:me},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Bo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function js(e){var t=As(e);t.next===null&&(t=e.alternate.memoizedState),Rs(e,t.next.queue,{},pu())}function Ms(){return j(Qf)}function Ns(){return R().memoizedState}function Ps(){return R().memoizedState}function Fs(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=pu();e=Xa(n);var r=Za(t,e,n);r!==null&&(hu(r,t,n),Qa(r,t,n)),t={cache:ha()},e.payload=t;return}t=t.return}}function Is(e,t,n){var r=pu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Bs(e)?Vs(t,n):(n=fi(e,t,n,r),n!==null&&(hu(n,e,r),Hs(n,t,r)))}function Ls(e,t,n){Rs(e,t,n,pu())}function Rs(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Bs(e))Vs(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Mr(s,o))return di(e,t,i,0),G===null&&ui(),!1}catch{}if(n=fi(e,t,i,r),n!==null)return hu(n,e,r),Hs(n,t,r),!0}return!1}function zs(e,t,n,r){if(r={lane:2,revertLane:dd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Bs(e)){if(t)throw Error(a(479))}else t=fi(e,n,r,2),t!==null&&hu(t,e,2)}function Bs(e){var t=e.alternate;return e===P||t!==null&&t===P}function Vs(e,t){xo=bo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Hs(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ut(e,n)}}var Us={readContext:j,use:Ro,useCallback:L,useContext:L,useEffect:L,useImperativeHandle:L,useLayoutEffect:L,useInsertionEffect:L,useMemo:L,useReducer:L,useRef:L,useState:L,useDebugValue:L,useDeferredValue:L,useTransition:L,useSyncExternalStore:L,useId:L,useHostTransitionStatus:L,useFormState:L,useActionState:L,useOptimistic:L,useMemoCache:L,useCacheRefresh:L};Us.useEffectEvent=L;var Ws={readContext:j,use:Ro,useCallback:function(e,t){return Fo().memoizedState=[e,t===void 0?null:t],e},useContext:j,useEffect:ms,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),fs(4194308,4,bs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return fs(4194308,4,e,t)},useInsertionEffect:function(e,t){fs(4,2,e,t)},useMemo:function(e,t){var n=Fo();t=t===void 0?null:t;var r=e();if(So){qe(!0);try{e()}finally{qe(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Fo();if(n!==void 0){var i=n(t);if(So){qe(!0);try{n(t)}finally{qe(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=Is.bind(null,P,e),[r.memoizedState,e]},useRef:function(e){var t=Fo();return e={current:e},t.memoizedState=e},useState:function(e){e=Xo(e);var t=e.queue,n=Ls.bind(null,P,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Ss,useDeferredValue:function(e,t){return Ts(Fo(),e,t)},useTransition:function(){var e=Xo(!1);return e=Ds.bind(null,P,e.queue,!0,!1),Fo().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=P,i=Fo();if(A){if(n===void 0)throw Error(a(407));n=n()}else{if(n=t(),G===null)throw Error(a(349));q&127||Go(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,ms(qo.bind(null,r,o,e),[e]),r.flags|=2048,us(9,{destroy:void 0},Ko.bind(null,r,o,n,t),null),n},useId:function(){var e=Fo(),t=G.identifierPrefix;if(A){var n=Li,r=Ii;n=(r&~(1<<32-Je(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=Co++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=Eo++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:Ms,useFormState:as,useActionState:as,useOptimistic:function(e){var t=Fo();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=zs.bind(null,P,!0,n),n.dispatch=t,[e,t]},useMemoCache:zo,useCacheRefresh:function(){return Fo().memoizedState=Fs.bind(null,P)},useEffectEvent:function(e){var t=Fo(),n={impl:e};return t.memoizedState=n,function(){if(W&2)throw Error(a(440));return n.impl.apply(void 0,arguments)}}},Gs={readContext:j,use:Ro,useCallback:Cs,useContext:j,useEffect:hs,useImperativeHandle:xs,useInsertionEffect:vs,useLayoutEffect:ys,useMemo:ws,useReducer:Vo,useRef:ds,useState:function(){return Vo(Bo)},useDebugValue:Ss,useDeferredValue:function(e,t){return Es(R(),F.memoizedState,e,t)},useTransition:function(){var e=Vo(Bo)[0],t=R().memoizedState;return[typeof e==`boolean`?e:Lo(e),t]},useSyncExternalStore:Wo,useId:Ns,useHostTransitionStatus:Ms,useFormState:os,useActionState:os,useOptimistic:function(e,t){return Zo(R(),F,e,t)},useMemoCache:zo,useCacheRefresh:Ps};Gs.useEffectEvent=_s;var Ks={readContext:j,use:Ro,useCallback:Cs,useContext:j,useEffect:hs,useImperativeHandle:xs,useInsertionEffect:vs,useLayoutEffect:ys,useMemo:ws,useReducer:Uo,useRef:ds,useState:function(){return Uo(Bo)},useDebugValue:Ss,useDeferredValue:function(e,t){var n=R();return F===null?Ts(n,e,t):Es(n,F.memoizedState,e,t)},useTransition:function(){var e=Uo(Bo)[0],t=R().memoizedState;return[typeof e==`boolean`?e:Lo(e),t]},useSyncExternalStore:Wo,useId:Ns,useHostTransitionStatus:Ms,useFormState:ls,useActionState:ls,useOptimistic:function(e,t){var n=R();return F===null?(n.baseState=e,[e,n.queue.dispatch]):Zo(n,F,e,t)},useMemoCache:zo,useCacheRefresh:Ps};Ks.useEffectEvent=_s;function qs(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:p({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Js={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=pu(),i=Xa(r);i.payload=t,n!=null&&(i.callback=n),t=Za(e,i,r),t!==null&&(hu(t,e,r),Qa(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=pu(),i=Xa(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Za(e,i,r),t!==null&&(hu(t,e,r),Qa(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=pu(),r=Xa(n);r.tag=2,t!=null&&(r.callback=t),t=Za(e,r,n),t!==null&&(hu(t,e,n),Qa(t,e,n))}};function Ys(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!Nr(n,r)||!Nr(i,a):!0}function Xs(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Js.enqueueReplaceState(t,t.state,null)}function Zs(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=p({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Qs(e){oi(e)}function $s(e){console.error(e)}function ec(e){oi(e)}function tc(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function nc(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function rc(e,t,n){return n=Xa(n),n.tag=3,n.payload={element:null},n.callback=function(){tc(e,t)},n}function ic(e){return e=Xa(e),e.tag=3,e}function ac(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){nc(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){nc(t,n,r),typeof i!=`function`&&(iu===null?iu=new Set([this]):iu.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function oc(e,t,n,r,i){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&sa(t,n,i,!0),n=uo.current,n!==null){switch(n.tag){case 31:case 13:return fo===null?Du():n.alternate===null&&Y===0&&(Y=3),n.flags&=-257,n.flags|=65536,n.lanes=i,r===Ma?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),Gu(e,r,i)),!1;case 22:return n.flags|=65536,r===Ma?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),Gu(e,r,i)),!1}throw Error(a(435,n.tag))}return Gu(e,r,i),Du(),!1}if(A)return t=uo.current,t===null?(r!==Ki&&(t=Error(a(423),{cause:r}),$i(Oi(t,n))),e=e.current.alternate,e.flags|=65536,i&=-i,e.lanes|=i,r=Oi(r,n),i=rc(e.stateNode,r,i),$a(e,i),Y!==4&&(Y=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=i,r!==Ki&&(e=Error(a(422),{cause:r}),$i(Oi(e,n)))),!1;var o=Error(a(520),{cause:r});if(o=Oi(o,n),Zl===null?Zl=[o]:Zl.push(o),Y!==4&&(Y=2),t===null)return!0;r=Oi(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=i&-i,n.lanes|=e,e=rc(n.stateNode,r,e),$a(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(iu===null||!iu.has(o))))return n.flags|=65536,i&=-i,n.lanes|=i,i=ic(i),ac(i,e,n,r),$a(n,i),!1}n=n.return}while(n!==null);return!1}var sc=Error(a(461)),z=!1;function cc(e,t,n,r){t.child=e===null?Ka(t,null,n,r):Ga(t,e.child,n,r)}function lc(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return la(t),r=Oo(e,t,n,o,a,i),s=Mo(),e!==null&&!z?(No(e,t,i),Nc(e,t,i)):(A&&s&&Bi(t),t.flags|=1,cc(e,t,r,i),t.child)}function uc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!yi(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,dc(e,t,a,r,i)):(e=Si(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Pc(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Nr:n,n(o,r)&&e.ref===t.ref)return Nc(e,t,i)}return t.flags|=1,e=bi(a,r),e.ref=t.ref,e.return=t,t.child=e}function dc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Nr(a,r)&&e.ref===t.ref)if(z=!1,t.pendingProps=r=a,Pc(e,i))e.flags&131072&&(z=!0);else return t.lanes=e.lanes,Nc(e,t,i)}return yc(e,t,n,r,i)}function fc(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return mc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Da(t,a===null?null:a.cachePool),a===null?co():so(t,a),ho(t);else return r=t.lanes=536870912,mc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&Da(t,null),co(),go(t)):(Da(t,a.cachePool),so(t,a),go(t),t.memoizedState=null);return cc(e,t,i,n),t.child}function pc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function mc(e,t,n,r,i){var a=Ea();return a=a===null?null:{parent:M._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&Da(t,null),co(),ho(t),e!==null&&sa(e,t,r,!0),t.childLanes=i,null}function hc(e,t){return t=Oc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function gc(e,t,n){return Ga(t,e.child,null,n),e=hc(t,t.pendingProps),e.flags|=2,_o(t),t.memoizedState=null,e}function _c(e,t,n){var r=t.pendingProps,i=(t.flags&128)!=0;if(t.flags&=-129,e===null){if(A){if(r.mode===`hidden`)return e=hc(t,r),t.lanes=536870912,pc(null,e);if(mo(t),(e=k)?(e=rf(e,Gi),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Fi===null?null:{id:Ii,overflow:Li},retryLane:536870912,hydrationErrors:null},n=Ti(e),n.return=t,t.child=n,Ui=t,k=null)):e=null,e===null)throw qi(t);return t.lanes=536870912,null}return hc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(mo(t),i)if(t.flags&256)t.flags&=-257,t=gc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(a(558));else if(z||sa(e,t,n,!1),i=(n&e.childLanes)!==0,z||i){if(r=G,r!==null&&(s=dt(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,pi(e,s),hu(r,e,s),sc;Du(),t=gc(e,t,n)}else e=o.treeContext,k=cf(s.nextSibling),Ui=t,A=!0,Wi=null,Gi=!1,e!==null&&Hi(t,e),t=hc(t,r),t.flags|=4096;return t}return e=bi(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function vc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(a(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function yc(e,t,n,r,i){return la(t),n=Oo(e,t,n,r,void 0,i),r=Mo(),e!==null&&!z?(No(e,t,i),Nc(e,t,i)):(A&&r&&Bi(t),t.flags|=1,cc(e,t,n,i),t.child)}function bc(e,t,n,r,i,a){return la(t),t.updateQueue=null,n=Ao(t,r,n,i),ko(e),r=Mo(),e!==null&&!z?(No(e,t,a),Nc(e,t,a)):(A&&r&&Bi(t),t.flags|=1,cc(e,t,n,a),t.child)}function xc(e,t,n,r,i){if(la(t),t.stateNode===null){var a=gi,o=n.contextType;typeof o==`object`&&o&&(a=j(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Js,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},Ja(t),o=n.contextType,a.context=typeof o==`object`&&o?j(o):gi,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(qs(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&Js.enqueueReplaceState(a,a.state,null),no(t,r,a,i),to(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=Zs(n,s);a.props=c;var l=a.context,u=n.contextType;o=gi,typeof u==`object`&&u&&(o=j(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&Xs(t,a,r,o),qa=!1;var f=t.memoizedState;a.state=f,no(t,r,a,i),to(),l=t.memoizedState,s||f!==l||qa?(typeof d==`function`&&(qs(t,n,d,r),l=t.memoizedState),(c=qa||Ys(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Ya(e,t),o=t.memoizedProps,u=Zs(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=gi,typeof l==`object`&&l&&(c=j(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&Xs(t,a,r,c),qa=!1,f=t.memoizedState,a.state=f,no(t,r,a,i),to();var p=t.memoizedState;o!==d||f!==p||qa||e!==null&&e.dependencies!==null&&ca(e.dependencies)?(typeof s==`function`&&(qs(t,n,s,r),p=t.memoizedState),(u=qa||Ys(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&ca(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,vc(e,t),r=(t.flags&128)!=0,a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=Ga(t,e.child,null,i),t.child=Ga(t,null,n,i)):cc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=Nc(e,t,i),e}function Sc(e,t,n,r){return Zi(),t.flags|=256,cc(e,t,n,r),t.child}var Cc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function wc(e){return{baseLanes:e,cachePool:Oa()}}function Tc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=Yl),e}function Ec(e,t,n){var r=t.pendingProps,i=!1,o=(t.flags&128)!=0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(N.current&2)!=0),s&&(i=!0,t.flags&=-129),s=(t.flags&32)!=0,t.flags&=-33,e===null){if(A){if(i?po(t):go(t),(e=k)?(e=rf(e,Gi),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Fi===null?null:{id:Ii,overflow:Li},retryLane:536870912,hydrationErrors:null},n=Ti(e),n.return=t,t.child=n,Ui=t,k=null)):e=null,e===null)throw qi(t);return of(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,i?(go(t),i=t.mode,c=Oc({mode:`hidden`,children:c},i),r=Ci(r,i,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=wc(n),r.childLanes=Tc(e,s,n),t.memoizedState=Cc,pc(null,r)):(po(t),Dc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(po(t),t.flags&=-257,t=kc(e,t,n)):t.memoizedState===null?(go(t),c=r.fallback,i=t.mode,r=Oc({mode:`visible`,children:r.children},i),c=Ci(c,i,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Ga(t,e.child,null,n),r=t.child,r.memoizedState=wc(n),r.childLanes=Tc(e,s,n),t.memoizedState=Cc,t=pc(null,r)):(go(t),t.child=e.child,t.flags|=128,t=null);else if(po(t),of(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(a(419)),r.stack=``,r.digest=s,$i({value:r,source:null,stack:null}),t=kc(e,t,n)}else if(z||sa(e,t,n,!1),s=(n&e.childLanes)!==0,z||s){if(s=G,s!==null&&(r=dt(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,pi(e,r),hu(s,e,r),sc;af(c)||Du(),t=kc(e,t,n)}else af(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,k=cf(c.nextSibling),Ui=t,A=!0,Wi=null,Gi=!1,e!==null&&Hi(t,e),t=Dc(t,r.children),t.flags|=4096);return t}return i?(go(t),c=r.fallback,i=t.mode,l=e.child,u=l.sibling,r=bi(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=Ci(c,i,n,null),c.flags|=2):c=bi(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,pc(null,r),r=t.child,c=e.child.memoizedState,c===null?c=wc(n):(i=c.cachePool,i===null?i=Oa():(l=M._currentValue,i=i.parent===l?i:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:i}),r.memoizedState=c,r.childLanes=Tc(e,s,n),t.memoizedState=Cc,pc(e.child,r)):(po(t),n=e.child,e=n.sibling,n=bi(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function Dc(e,t){return t=Oc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function Oc(e,t){return e=vi(22,e,null,t),e.lanes=0,e}function kc(e,t,n){return Ga(t,e.child,null,n),e=Dc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Ac(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),aa(e.return,t,n)}function jc(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function Mc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=N.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,T(N,o),cc(e,t,r,n),r=A?Mi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Ac(e,n,t);else if(e.tag===19)Ac(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&vo(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),jc(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&vo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}jc(t,!0,n,null,a,r);break;case`together`:jc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function Nc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Kl|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(sa(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(a(153));if(t.child!==null){for(e=t.child,n=bi(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=bi(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Pc(e,t){return(e.lanes&t)===0?(e=e.dependencies,!!(e!==null&&ca(e))):!0}function Fc(e,t,n){switch(t.tag){case 3:xe(t,t.stateNode.containerInfo),ra(t,M,e.memoizedState.cache),Zi();break;case 27:case 5:Ce(t);break;case 4:xe(t,t.stateNode.containerInfo);break;case 10:ra(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,mo(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(po(t),e=Nc(e,t,n),e===null?null:e.sibling):Ec(e,t,n):(po(t),t.flags|=128,null);po(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||=(sa(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return Mc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),T(N,N.current),r)break;return null;case 22:return t.lanes=0,fc(e,t,n,t.pendingProps);case 24:ra(t,M,e.memoizedState.cache)}return Nc(e,t,n)}function Ic(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)z=!0;else{if(!Pc(e,n)&&!(t.flags&128))return z=!1,Fc(e,t,n);z=!!(e.flags&131072)}else z=!1,A&&t.flags&1048576&&zi(t,Mi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Fa(t.elementType),t.type=e,typeof e==`function`)yi(e)?(r=Zs(e,r),t.tag=1,t=xc(null,t,e,r,n)):(t.tag=0,t=yc(null,t,e,r,n));else{if(e!=null){var i=e.$$typeof;if(i===ee){t.tag=11,t=lc(null,t,e,r,n);break a}else if(i===ie){t.tag=14,t=uc(null,t,e,r,n);break a}}throw t=fe(e)||e,Error(a(306,t,``))}}return t;case 0:return yc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,i=Zs(r,t.pendingProps),xc(e,t,r,i,n);case 3:a:{if(xe(t,t.stateNode.containerInfo),e===null)throw Error(a(387));r=t.pendingProps;var o=t.memoizedState;i=o.element,Ya(e,t),no(t,r,null,n);var s=t.memoizedState;if(r=s.cache,ra(t,M,r),r!==o.cache&&oa(t,[M],n,!0),to(),r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=Sc(e,t,r,n);break a}else if(r!==i){i=Oi(Error(a(424)),t),$i(i),t=Sc(e,t,r,n);break a}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(k=cf(e.firstChild),Ui=t,A=!0,Wi=null,Gi=!0,n=Ka(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Zi(),r===i){t=Nc(e,t,n);break a}cc(e,t,r,n)}t=t.child}return t;case 26:return vc(e,t),e===null?(n=kf(t.type,null,t.pendingProps,null))?t.memoizedState=n:A||(n=t.type,e=t.pendingProps,r=Bd(ye.current).createElement(n),r[_t]=t,r[vt]=e,Pd(r,n,e),O(r),t.stateNode=r):t.memoizedState=kf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Ce(t),e===null&&A&&(r=t.stateNode=ff(t.type,t.pendingProps,ye.current),Ui=t,Gi=!0,i=k,Zd(t.type)?(lf=i,k=cf(r.firstChild)):k=i),cc(e,t,t.pendingProps.children,n),vc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&A&&((i=r=k)&&(r=tf(r,t.type,t.pendingProps,Gi),r===null?i=!1:(t.stateNode=r,Ui=t,k=cf(r.firstChild),Gi=!1,i=!0)),i||qi(t)),Ce(t),i=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,Ud(i,o)?r=null:s!==null&&Ud(i,s)&&(t.flags|=32),t.memoizedState!==null&&(i=Oo(e,t,jo,null,null,n),Qf._currentValue=i),vc(e,t),cc(e,t,r,n),t.child;case 6:return e===null&&A&&((e=n=k)&&(n=nf(n,t.pendingProps,Gi),n===null?e=!1:(t.stateNode=n,Ui=t,k=null,e=!0)),e||qi(t)),null;case 13:return Ec(e,t,n);case 4:return xe(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ga(t,null,r,n):cc(e,t,r,n),t.child;case 11:return lc(e,t,t.type,t.pendingProps,n);case 7:return cc(e,t,t.pendingProps,n),t.child;case 8:return cc(e,t,t.pendingProps.children,n),t.child;case 12:return cc(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,ra(t,t.type,r.value),cc(e,t,r.children,n),t.child;case 9:return i=t.type._context,r=t.pendingProps.children,la(t),i=j(i),r=r(i),t.flags|=1,cc(e,t,r,n),t.child;case 14:return uc(e,t,t.type,t.pendingProps,n);case 15:return dc(e,t,t.type,t.pendingProps,n);case 19:return Mc(e,t,n);case 31:return _c(e,t,n);case 22:return fc(e,t,n,t.pendingProps);case 24:return la(t),r=j(M),e===null?(i=Ea(),i===null&&(i=G,o=ha(),i.pooledCache=o,o.refCount++,o!==null&&(i.pooledCacheLanes|=n),i=o),t.memoizedState={parent:r,cache:i},Ja(t),ra(t,M,i)):((e.lanes&n)!==0&&(Ya(e,t),no(t,null,null,n),to()),i=e.memoizedState,o=t.memoizedState,i.parent===r?(r=o.cache,ra(t,M,r),r!==i.cache&&oa(t,[M],n,!0)):(i={parent:r,cache:r},t.memoizedState=i,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=i),ra(t,M,r))),cc(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(a(156,t.tag))}function Lc(e){e.flags|=4}function Rc(e,t,n,r,i){if((t=(e.mode&32)!=0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(wu())e.flags|=8192;else throw Ia=Ma,Aa}else e.flags&=-16777217}function zc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Wf(t))if(wu())e.flags|=8192;else throw Ia=Ma,Aa}function Bc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:at(),e.lanes|=t,Xl|=t)}function Vc(e,t){if(!A)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function B(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&65011712,r|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Hc(e,t,n){var r=t.pendingProps;switch(Vi(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return B(t),null;case 1:return B(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),ia(M),Se(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Xi(t)?Lc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Qi())),B(t),null;case 26:var i=t.type,o=t.memoizedState;return e===null?(Lc(t),o===null?(B(t),Rc(t,i,null,r,n)):(B(t),zc(t,o))):o?o===e.memoizedState?(B(t),t.flags&=-16777217):(Lc(t),B(t),zc(t,o)):(e=e.memoizedProps,e!==r&&Lc(t),B(t),Rc(t,i,e,r,n)),null;case 27:if(we(t),n=ye.current,i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Lc(t);else{if(!r){if(t.stateNode===null)throw Error(a(166));return B(t),null}e=ve.current,Xi(t)?Ji(t,e):(e=ff(i,r,n),t.stateNode=e,Lc(t))}return B(t),null;case 5:if(we(t),i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Lc(t);else{if(!r){if(t.stateNode===null)throw Error(a(166));return B(t),null}if(o=ve.current,Xi(t))Ji(t,o);else{var s=Bd(ye.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,i);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,i);break;default:switch(i){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,i);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,i);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(i,{is:r.is}):s.createElement(i)}}o[_t]=t,o[vt]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Pd(o,i,r),i){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Lc(t)}}return B(t),Rc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Lc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(a(166));if(e=ye.current,Xi(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,i=Ui,i!==null)switch(i.tag){case 27:case 5:r=i.memoizedProps}e[_t]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Md(e.nodeValue,n)),e||qi(t,!0)}else e=Bd(e).createTextNode(r),e[_t]=t,t.stateNode=e}return B(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Xi(t),n!==null){if(e===null){if(!r)throw Error(a(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(a(557));e[_t]=t}else Zi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;B(t),e=!1}else n=Qi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(_o(t),t):(_o(t),null);if(t.flags&128)throw Error(a(558))}return B(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=Xi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(a(318));if(i=t.memoizedState,i=i===null?null:i.dehydrated,!i)throw Error(a(317));i[_t]=t}else Zi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;B(t),i=!1}else i=Qi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(_o(t),t):(_o(t),null)}return _o(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,i=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(i=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==i&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Bc(t,t.updateQueue),B(t),null);case 4:return Se(),e===null&&Sd(t.stateNode.containerInfo),B(t),null;case 10:return ia(t.type),B(t),null;case 19:if(w(N),r=t.memoizedState,r===null)return B(t),null;if(i=(t.flags&128)!=0,o=r.rendering,o===null)if(i)Vc(r,!1);else{if(Y!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=vo(e),o!==null){for(t.flags|=128,Vc(r,!1),e=o.updateQueue,t.updateQueue=e,Bc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)xi(n,e),n=n.sibling;return T(N,N.current&1|2),A&&Ri(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Ie()>nu&&(t.flags|=128,i=!0,Vc(r,!1),t.lanes=4194304)}else{if(!i)if(e=vo(o),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,Bc(t,e),Vc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!A)return B(t),null}else 2*Ie()-r.renderingStartTime>nu&&n!==536870912&&(t.flags|=128,i=!0,Vc(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(B(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Ie(),e.sibling=null,n=N.current,T(N,i?n&1|2:n&1),A&&Ri(t,r.treeForkCount),e);case 22:case 23:return _o(t),lo(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(B(t),t.subtreeFlags&6&&(t.flags|=8192)):B(t),n=t.updateQueue,n!==null&&Bc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&w(Ta),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),ia(M),B(t),null;case 25:return null;case 30:return null}throw Error(a(156,t.tag))}function Uc(e,t){switch(Vi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ia(M),Se(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return we(t),null;case 31:if(t.memoizedState!==null){if(_o(t),t.alternate===null)throw Error(a(340));Zi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(_o(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(a(340));Zi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return w(N),null;case 4:return Se(),null;case 10:return ia(t.type),null;case 22:case 23:return _o(t),lo(),e!==null&&w(Ta),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ia(M),null;case 25:return null;default:return null}}function Wc(e,t){switch(Vi(t),t.tag){case 3:ia(M),Se();break;case 26:case 27:case 5:we(t);break;case 4:Se();break;case 31:t.memoizedState!==null&&_o(t);break;case 13:_o(t);break;case 19:w(N);break;case 10:ia(t.type);break;case 22:case 23:_o(t),lo(),e!==null&&w(Ta);break;case 24:ia(M)}}function Gc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Z(t,t.return,e)}}function Kc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Z(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Z(t,t.return,e)}}function qc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{io(t,n)}catch(t){Z(e,e.return,t)}}}function Jc(e,t,n){n.props=Zs(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Z(e,t,n)}}function Yc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Z(e,t,n)}}function Xc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){Z(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Z(e,t,n)}else n.current=null}function Zc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){Z(e,e.return,t)}}function Qc(e,t,n){try{var r=e.stateNode;Fd(r,e.type,n,t),r[vt]=t}catch(t){Z(e,e.return,t)}}function $c(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Zd(e.type)||e.tag===4}function el(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||$c(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Zd(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function tl(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=un));else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(tl(e,t,n),e=e.sibling;e!==null;)tl(e,t,n),e=e.sibling}function nl(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(nl(e,t,n),e=e.sibling;e!==null;)nl(e,t,n),e=e.sibling}function rl(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Pd(t,r,n),t[_t]=e,t[vt]=n}catch(t){Z(e,e.return,t)}}var il=!1,V=!1,al=!1,ol=typeof WeakSet==`function`?WeakSet:Set,H=null;function sl(e,t){if(e=e.containerInfo,Rd=sp,e=Lr(e),Rr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||i!==0&&f.nodeType!==3||(c=s+i),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===i&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(zd={focusedElem:e,selectionRange:n},sp=!1,H=t;H!==null;)if(t=H,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,H=e;else for(;H!==null;){switch(t=H,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)i=e[n],i.ref.impl=i.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,n=t,i=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var h=Zs(n.type,i);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){Z(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)ef(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:ef(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(a(163))}if(e=t.sibling,e!==null){e.return=t.return,H=e;break}H=t.return}}function cl(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Sl(e,n),r&4&&Gc(5,n);break;case 1:if(Sl(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){Z(n,n.return,e)}else{var i=Zs(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Z(n,n.return,e)}}r&64&&qc(n),r&512&&Yc(n,n.return);break;case 3:if(Sl(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{io(e,t)}catch(e){Z(n,n.return,e)}}break;case 27:t===null&&r&4&&rl(n);case 26:case 5:Sl(e,n),t===null&&r&4&&Zc(n),r&512&&Yc(n,n.return);break;case 12:Sl(e,n);break;case 31:Sl(e,n),r&4&&pl(e,n);break;case 13:Sl(e,n),r&4&&ml(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Ju.bind(null,n),sf(e,n))));break;case 22:if(r=n.memoizedState!==null||il,!r){t=t!==null&&t.memoizedState!==null||V,i=il;var a=V;il=r,(V=t)&&!a?wl(e,n,(n.subtreeFlags&8772)!=0):Sl(e,n),il=i,V=a}break;case 30:break;default:Sl(e,n)}}function ll(e){var t=e.alternate;t!==null&&(e.alternate=null,ll(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Tt(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var U=null,ul=!1;function dl(e,t,n){for(n=n.child;n!==null;)fl(e,t,n),n=n.sibling}function fl(e,t,n){if(Ke&&typeof Ke.onCommitFiberUnmount==`function`)try{Ke.onCommitFiberUnmount(Ge,n)}catch{}switch(n.tag){case 26:V||Xc(n,t),dl(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:V||Xc(n,t);var r=U,i=ul;Zd(n.type)&&(U=n.stateNode,ul=!1),dl(e,t,n),pf(n.stateNode),U=r,ul=i;break;case 5:V||Xc(n,t);case 6:if(r=U,i=ul,U=null,dl(e,t,n),U=r,ul=i,U!==null)if(ul)try{(U.nodeType===9?U.body:U.nodeName===`HTML`?U.ownerDocument.body:U).removeChild(n.stateNode)}catch(e){Z(n,t,e)}else try{U.removeChild(n.stateNode)}catch(e){Z(n,t,e)}break;case 18:U!==null&&(ul?(e=U,Qd(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Np(e)):Qd(U,n.stateNode));break;case 4:r=U,i=ul,U=n.stateNode.containerInfo,ul=!0,dl(e,t,n),U=r,ul=i;break;case 0:case 11:case 14:case 15:Kc(2,n,t),V||Kc(4,n,t),dl(e,t,n);break;case 1:V||(Xc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Jc(n,t,r)),dl(e,t,n);break;case 21:dl(e,t,n);break;case 22:V=(r=V)||n.memoizedState!==null,dl(e,t,n),V=r;break;default:dl(e,t,n)}}function pl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Np(e)}catch(e){Z(t,t.return,e)}}}function ml(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Np(e)}catch(e){Z(t,t.return,e)}}function hl(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new ol),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new ol),t;default:throw Error(a(435,e.tag))}}function gl(e,t){var n=hl(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Yu.bind(null,e,t);t.then(r,r)}})}function _l(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r],o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if(Zd(c.type)){U=c.stateNode,ul=!1;break a}break;case 5:U=c.stateNode,ul=!1;break a;case 3:case 4:U=c.stateNode.containerInfo,ul=!0;break a}c=c.return}if(U===null)throw Error(a(160));fl(o,s,i),U=null,ul=!1,o=i.alternate,o!==null&&(o.return=null),i.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)yl(t,e),t=t.sibling}var vl=null;function yl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:_l(t,e),bl(e),r&4&&(Kc(3,e,e.return),Gc(3,e),Kc(5,e,e.return));break;case 1:_l(t,e),bl(e),r&512&&(V||n===null||Xc(n,n.return)),r&64&&il&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var i=vl;if(_l(t,e),bl(e),r&512&&(V||n===null||Xc(n,n.return)),r&4){var o=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null)if(r===null)if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,i=i.ownerDocument||i;b:switch(r){case`title`:o=i.getElementsByTagName(`title`)[0],(!o||o[wt]||o[_t]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=i.createElement(r),i.head.insertBefore(o,i.querySelector(`head > title`))),Pd(o,r,n),o[_t]=e,O(o),r=o;break a;case`link`:var s=Vf(`link`,`href`,i).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&o.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&o.getAttribute(`title`)===(n.title==null?null:n.title)&&o.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}o=i.createElement(r),Pd(o,r,n),i.head.appendChild(o);break;case`meta`:if(s=Vf(`meta`,`content`,i).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`content`)===(n.content==null?null:``+n.content)&&o.getAttribute(`name`)===(n.name==null?null:n.name)&&o.getAttribute(`property`)===(n.property==null?null:n.property)&&o.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}o=i.createElement(r),Pd(o,r,n),i.head.appendChild(o);break;default:throw Error(a(468,r))}o[_t]=e,O(o),r=o}e.stateNode=r}else Hf(i,e.type,e.stateNode);else e.stateNode=If(i,r,e.memoizedProps);else o===r?r===null&&e.stateNode!==null&&Qc(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?Hf(i,e.type,e.stateNode):If(i,r,e.memoizedProps))}break;case 27:_l(t,e),bl(e),r&512&&(V||n===null||Xc(n,n.return)),n!==null&&r&4&&Qc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(_l(t,e),bl(e),r&512&&(V||n===null||Xc(n,n.return)),e.flags&32){i=e.stateNode;try{tn(i,``)}catch(t){Z(e,e.return,t)}}r&4&&e.stateNode!=null&&(i=e.memoizedProps,Qc(e,i,n===null?i:n.memoizedProps)),r&1024&&(al=!0);break;case 6:if(_l(t,e),bl(e),r&4){if(e.stateNode===null)throw Error(a(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){Z(e,e.return,t)}}break;case 3:if(Bf=null,i=vl,vl=gf(t.containerInfo),_l(t,e),vl=i,bl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Np(t.containerInfo)}catch(t){Z(e,e.return,t)}al&&(al=!1,xl(e));break;case 4:r=vl,vl=gf(e.stateNode.containerInfo),_l(t,e),bl(e),vl=r;break;case 12:_l(t,e),bl(e);break;case 31:_l(t,e),bl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,gl(e,r)));break;case 13:_l(t,e),bl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(eu=Ie()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,gl(e,r)));break;case 22:i=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=il,d=V;if(il=u||i,V=d||l,_l(t,e),V=d,il=u,bl(e),r&8192)a:for(t=e.stateNode,t._visibility=i?t._visibility&-2:t._visibility|1,i&&(n===null||l||il||V||Cl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(o=l.stateNode,i)s=o.style,typeof s.setProperty==`function`?s.setProperty(`display`,`none`,`important`):s.display=`none`;else{c=l.stateNode;var f=l.memoizedProps.style,p=f!=null&&f.hasOwnProperty(`display`)?f.display:null;c.style.display=p==null||typeof p==`boolean`?``:(``+p).trim()}}catch(e){Z(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=i?``:l.memoizedProps}catch(e){Z(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;i?$d(m,!0):$d(l.stateNode,!1)}catch(e){Z(l,l.return,e)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,gl(e,n))));break;case 19:_l(t,e),bl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,gl(e,r)));break;case 30:break;case 21:break;default:_l(t,e),bl(e)}}function bl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if($c(r)){n=r;break}r=r.return}if(n==null)throw Error(a(160));switch(n.tag){case 27:var i=n.stateNode;nl(e,el(e),i);break;case 5:var o=n.stateNode;n.flags&32&&(tn(o,``),n.flags&=-33),nl(e,el(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;tl(e,el(e),s);break;default:throw Error(a(161))}}catch(t){Z(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function xl(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;xl(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Sl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)cl(e,t.alternate,t),t=t.sibling}function Cl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Kc(4,t,t.return),Cl(t);break;case 1:Xc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Jc(t,t.return,n),Cl(t);break;case 27:pf(t.stateNode);case 26:case 5:Xc(t,t.return),Cl(t);break;case 22:t.memoizedState===null&&Cl(t);break;case 30:Cl(t);break;default:Cl(t)}e=e.sibling}}function wl(e,t,n){for(n&&=(t.subtreeFlags&8772)!=0,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:wl(i,a,n),Gc(4,a);break;case 1:if(wl(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){Z(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)ro(c[i],s)}catch(e){Z(r,r.return,e)}}n&&o&64&&qc(a),Yc(a,a.return);break;case 27:rl(a);case 26:case 5:wl(i,a,n),n&&r===null&&o&4&&Zc(a),Yc(a,a.return);break;case 12:wl(i,a,n);break;case 31:wl(i,a,n),n&&o&4&&pl(i,a);break;case 13:wl(i,a,n),n&&o&4&&ml(i,a);break;case 22:a.memoizedState===null&&wl(i,a,n),Yc(a,a.return);break;case 30:break;default:wl(i,a,n)}t=t.sibling}}function Tl(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&ga(n))}function El(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ga(e))}function Dl(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Ol(e,t,n,r),t=t.sibling}function Ol(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Dl(e,t,n,r),i&2048&&Gc(9,t);break;case 1:Dl(e,t,n,r);break;case 3:Dl(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ga(e)));break;case 12:if(i&2048){Dl(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;typeof s==`function`&&s(o,t.alternate===null?`mount`:`update`,e.passiveEffectDuration,-0)}catch(e){Z(t,t.return,e)}}else Dl(e,t,n,r);break;case 31:Dl(e,t,n,r);break;case 13:Dl(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?Dl(e,t,n,r):(a._visibility|=2,kl(e,t,n,r,(t.subtreeFlags&10256)!=0||!1)):a._visibility&2?Dl(e,t,n,r):Al(e,t),i&2048&&Tl(o,t);break;case 24:Dl(e,t,n,r),i&2048&&El(t.alternate,t);break;default:Dl(e,t,n,r)}}function kl(e,t,n,r,i){for(i&&=(t.subtreeFlags&10256)!=0||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:kl(a,o,s,c,i),Gc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,kl(a,o,s,c,i)):u._visibility&2?kl(a,o,s,c,i):Al(a,o),i&&l&2048&&Tl(o.alternate,o);break;case 24:kl(a,o,s,c,i),i&&l&2048&&El(o.alternate,o);break;default:kl(a,o,s,c,i)}t=t.sibling}}function Al(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:Al(n,r),i&2048&&Tl(r.alternate,r);break;case 24:Al(n,r),i&2048&&El(r.alternate,r);break;default:Al(n,r)}t=t.sibling}}var jl=8192;function Ml(e,t,n){if(e.subtreeFlags&jl)for(e=e.child;e!==null;)Nl(e,t,n),e=e.sibling}function Nl(e,t,n){switch(e.tag){case 26:Ml(e,t,n),e.flags&jl&&e.memoizedState!==null&&Gf(n,vl,e.memoizedState,e.memoizedProps);break;case 5:Ml(e,t,n);break;case 3:case 4:var r=vl;vl=gf(e.stateNode.containerInfo),Ml(e,t,n),vl=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=jl,jl=16777216,Ml(e,t,n),jl=r):Ml(e,t,n));break;default:Ml(e,t,n)}}function Pl(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Fl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];H=r,Rl(r,e)}Pl(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Il(e),e=e.sibling}function Il(e){switch(e.tag){case 0:case 11:case 15:Fl(e),e.flags&2048&&Kc(9,e,e.return);break;case 3:Fl(e);break;case 12:Fl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Ll(e)):Fl(e);break;default:Fl(e)}}function Ll(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];H=r,Rl(r,e)}Pl(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Kc(8,t,t.return),Ll(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Ll(t));break;default:Ll(t)}e=e.sibling}}function Rl(e,t){for(;H!==null;){var n=H;switch(n.tag){case 0:case 11:case 15:Kc(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:ga(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,H=r;else a:for(n=e;H!==null;){r=H;var i=r.sibling,a=r.return;if(ll(r),r===n){H=null;break a}if(i!==null){i.return=a,H=i;break a}H=a}}}var zl={getCacheForType:function(e){var t=j(M),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return j(M).controller.signal}},Bl=typeof WeakMap==`function`?WeakMap:Map,W=0,G=null,K=null,q=0,J=0,Vl=null,Hl=!1,Ul=!1,Wl=!1,Gl=0,Y=0,Kl=0,ql=0,Jl=0,Yl=0,Xl=0,Zl=null,Ql=null,$l=!1,eu=0,tu=0,nu=1/0,ru=null,iu=null,X=0,au=null,ou=null,su=0,cu=0,lu=null,uu=null,du=0,fu=null;function pu(){return W&2&&q!==0?q&-q:S.T===null?mt():dd()}function mu(){if(Yl===0)if(!(q&536870912)||A){var e=$e;$e<<=1,!($e&3932160)&&($e=262144),Yl=e}else Yl=536870912;return e=uo.current,e!==null&&(e.flags|=32),Yl}function hu(e,t,n){(e===G&&(J===2||J===9)||e.cancelPendingCommit!==null)&&(Su(e,0),yu(e,q,Yl,!1)),st(e,n),(!(W&2)||e!==G)&&(e===G&&(!(W&2)&&(ql|=n),Y===4&&yu(e,q,Yl,!1)),rd(e))}function gu(e,t,n){if(W&6)throw Error(a(327));var r=!n&&(t&127)==0&&(t&e.expiredLanes)===0||rt(e,t),i=r?Au(e,t):Ou(e,t,!0),o=r;do{if(i===0){Ul&&!r&&yu(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!vu(n)){i=Ou(e,t,!1),o=!1;continue}if(i===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;i=Zl;var l=c.current.memoizedState.isDehydrated;if(l&&(Su(c,s).flags|=256),s=Ou(c,s,!1),s!==2){if(Wl&&!l){c.errorRecoveryDisabledLanes|=o,ql|=o,i=4;break a}o=Ql,Ql=i,o!==null&&(Ql===null?Ql=o:Ql.push.apply(Ql,o))}i=s}if(o=!1,i!==2)continue}}if(i===1){Su(e,0),yu(e,t,0,!0);break}a:{switch(r=e,o=i,o){case 0:case 1:throw Error(a(345));case 4:if((t&4194048)!==t)break;case 6:yu(r,t,Yl,!Hl);break a;case 2:Ql=null;break;case 3:case 5:break;default:throw Error(a(329))}if((t&62914560)===t&&(i=eu+300-Ie(),10<i)){if(yu(r,t,Yl,!Hl),nt(r,0,!0)!==0)break a;su=t,r.timeoutHandle=Kd(_u.bind(null,r,n,Ql,ru,$l,t,Yl,ql,Xl,Hl,o,`Throttled`,-0,0),i);break a}_u(r,n,Ql,ru,$l,t,Yl,ql,Xl,Hl,o,null,-0,0)}}break}while(1);rd(e)}function _u(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)==16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:un},Nl(t,a,d);var m=(a&62914560)===a?eu-Ie():(a&4194048)===a?tu-Ie():0;if(m=qf(d,m),m!==null){su=a,e.cancelPendingCommit=m(Lu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),yu(e,a,o,!l);return}}Lu(e,t,a,n,r,i,o,s,c)}function vu(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!Mr(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function yu(e,t,n,r){t&=~Jl,t&=~ql,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Je(i),o=1<<a;r[a]=-1,i&=~o}n!==0&<(e,n,t)}function bu(){return W&6?!0:(id(0,!1),!1)}function xu(){if(K!==null){if(J===0)var e=K.return;else e=K,na=ta=null,Po(e),za=null,Ba=0,e=K;for(;e!==null;)Wc(e.alternate,e),e=e.return;K=null}}function Su(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,qd(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),su=0,xu(),G=e,K=n=bi(e.current,null),q=t,J=0,Vl=null,Hl=!1,Ul=rt(e,t),Wl=!1,Xl=Yl=Jl=ql=Kl=Y=0,Ql=Zl=null,$l=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-Je(r),a=1<<i;t|=e[i],r&=~a}return Gl=t,ui(),n}function Cu(e,t){P=null,S.H=Us,t===ka||t===ja?(t=La(),J=3):t===Aa?(t=La(),J=4):J=t===sc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Vl=t,K===null&&(Y=1,tc(e,Oi(t,e.current)))}function wu(){var e=uo.current;return e===null?!0:(q&4194048)===q?fo===null:(q&62914560)===q||q&536870912?e===fo:!1}function Tu(){var e=S.H;return S.H=Us,e===null?Us:e}function Eu(){var e=S.A;return S.A=zl,e}function Du(){Y=4,Hl||(q&4194048)!==q&&uo.current!==null||(Ul=!0),!(Kl&134217727)&&!(ql&134217727)||G===null||yu(G,q,Yl,!1)}function Ou(e,t,n){var r=W;W|=2;var i=Tu(),a=Eu();(G!==e||q!==t)&&(ru=null,Su(e,t)),t=!1;var o=Y;a:do try{if(J!==0&&K!==null){var s=K,c=Vl;switch(J){case 8:xu(),o=6;break a;case 3:case 2:case 9:case 6:uo.current===null&&(t=!0);var l=J;if(J=0,Vl=null,Pu(e,s,c,l),n&&Ul){o=0;break a}break;default:l=J,J=0,Vl=null,Pu(e,s,c,l)}}ku(),o=Y;break}catch(t){Cu(e,t)}while(1);return t&&e.shellSuspendCounter++,na=ta=null,W=r,S.H=i,S.A=a,K===null&&(G=null,q=0,ui()),o}function ku(){for(;K!==null;)Mu(K)}function Au(e,t){var n=W;W|=2;var r=Tu(),i=Eu();G!==e||q!==t?(ru=null,nu=Ie()+500,Su(e,t)):Ul=rt(e,t);a:do try{if(J!==0&&K!==null){t=K;var o=Vl;b:switch(J){case 1:J=0,Vl=null,Pu(e,t,o,1);break;case 2:case 9:if(Na(o)){J=0,Vl=null,Nu(t);break}t=function(){J!==2&&J!==9||G!==e||(J=7),rd(e)},o.then(t,t);break a;case 3:J=7;break a;case 4:J=5;break a;case 7:Na(o)?(J=0,Vl=null,Nu(t)):(J=0,Vl=null,Pu(e,t,o,7));break;case 5:var s=null;switch(K.tag){case 26:s=K.memoizedState;case 5:case 27:var c=K;if(s?Wf(s):c.stateNode.complete){J=0,Vl=null;var l=c.sibling;if(l!==null)K=l;else{var u=c.return;u===null?K=null:(K=u,Fu(u))}break b}}J=0,Vl=null,Pu(e,t,o,5);break;case 6:J=0,Vl=null,Pu(e,t,o,6);break;case 8:xu(),Y=6;break a;default:throw Error(a(462))}}ju();break}catch(t){Cu(e,t)}while(1);return na=ta=null,S.H=r,S.A=i,W=n,K===null?(G=null,q=0,ui(),Y):0}function ju(){for(;K!==null&&!Pe();)Mu(K)}function Mu(e){var t=Ic(e.alternate,e,Gl);e.memoizedProps=e.pendingProps,t===null?Fu(e):K=t}function Nu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=bc(n,t,t.pendingProps,t.type,void 0,q);break;case 11:t=bc(n,t,t.pendingProps,t.type.render,t.ref,q);break;case 5:Po(t);default:Wc(n,t),t=K=xi(t,Gl),t=Ic(n,t,Gl)}e.memoizedProps=e.pendingProps,t===null?Fu(e):K=t}function Pu(e,t,n,r){na=ta=null,Po(t),za=null,Ba=0;var i=t.return;try{if(oc(e,i,t,n,q)){Y=1,tc(e,Oi(n,e.current)),K=null;return}}catch(t){if(i!==null)throw K=i,t;Y=1,tc(e,Oi(n,e.current)),K=null;return}t.flags&32768?(A||r===1?e=!0:Ul||q&536870912?e=!1:(Hl=e=!0,(r===2||r===9||r===3||r===6)&&(r=uo.current,r!==null&&r.tag===13&&(r.flags|=16384))),Iu(t,e)):Fu(t)}function Fu(e){var t=e;do{if(t.flags&32768){Iu(t,Hl);return}e=t.return;var n=Hc(t.alternate,t,Gl);if(n!==null){K=n;return}if(t=t.sibling,t!==null){K=t;return}K=t=e}while(t!==null);Y===0&&(Y=5)}function Iu(e,t){do{var n=Uc(e.alternate,e);if(n!==null){n.flags&=32767,K=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){K=e;return}K=e=n}while(e!==null);Y=6,K=null}function Lu(e,t,n,r,i,o,s,c,l){e.cancelPendingCommit=null;do Hu();while(X!==0);if(W&6)throw Error(a(327));if(t!==null){if(t===e.current)throw Error(a(177));if(o=t.lanes|t.childLanes,o|=li,ct(e,n,o,s,c,l),e===G&&(K=G=null,q=0),ou=t,au=e,su=n,cu=o,lu=i,uu=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,Xu(Be,function(){return Uu(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!=0,t.subtreeFlags&13878||r){r=S.T,S.T=null,i=C.p,C.p=2,s=W,W|=4;try{sl(e,t,n)}finally{W=s,C.p=i,S.T=r}}X=1,Ru(),zu(),Bu()}}function Ru(){if(X===1){X=0;var e=au,t=ou,n=(t.flags&13878)!=0;if(t.subtreeFlags&13878||n){n=S.T,S.T=null;var r=C.p;C.p=2;var i=W;W|=4;try{yl(t,e);var a=zd,o=Lr(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&Ir(s.ownerDocument.documentElement,s)){if(c!==null&&Rr(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=Fr(s,h),v=Fr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}sp=!!Rd,zd=Rd=null}finally{W=i,C.p=r,S.T=n}}e.current=t,X=2}}function zu(){if(X===2){X=0;var e=au,t=ou,n=(t.flags&8772)!=0;if(t.subtreeFlags&8772||n){n=S.T,S.T=null;var r=C.p;C.p=2;var i=W;W|=4;try{cl(e,t.alternate,t)}finally{W=i,C.p=r,S.T=n}}X=3}}function Bu(){if(X===4||X===3){X=0,Fe();var e=au,t=ou,n=su,r=uu;t.subtreeFlags&10256||t.flags&10256?X=5:(X=0,ou=au=null,Vu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(iu=null),pt(n),t=t.stateNode,Ke&&typeof Ke.onCommitFiberRoot==`function`)try{Ke.onCommitFiberRoot(Ge,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=S.T,i=C.p,C.p=2,S.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var s=r[o];a(s.value,{componentStack:s.stack})}}finally{S.T=t,C.p=i}}su&3&&Hu(),rd(e),i=e.pendingLanes,n&261930&&i&42?e===fu?du++:(du=0,fu=e):du=0,id(0,!1)}}function Vu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ga(t)))}function Hu(){return Ru(),zu(),Bu(),Uu()}function Uu(){if(X!==5)return!1;var e=au,t=cu;cu=0;var n=pt(su),r=S.T,i=C.p;try{C.p=32>n?32:n,S.T=null,n=lu,lu=null;var o=au,s=su;if(X=0,ou=au=null,su=0,W&6)throw Error(a(331));var c=W;if(W|=4,Il(o.current),Ol(o,o.current,s,n),W=c,id(0,!1),Ke&&typeof Ke.onPostCommitFiberRoot==`function`)try{Ke.onPostCommitFiberRoot(Ge,o)}catch{}return!0}finally{C.p=i,S.T=r,Vu(e,t)}}function Wu(e,t,n){t=Oi(n,t),t=rc(e.stateNode,t,2),e=Za(e,t,2),e!==null&&(st(e,2),rd(e))}function Z(e,t,n){if(e.tag===3)Wu(e,e,n);else for(;t!==null;){if(t.tag===3){Wu(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(iu===null||!iu.has(r))){e=Oi(n,e),n=ic(2),r=Za(t,n,2),r!==null&&(ac(n,r,t,e),st(r,2),rd(r));break}}t=t.return}}function Gu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Bl;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Wl=!0,i.add(n),e=Ku.bind(null,e,t,n),t.then(e,e))}function Ku(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,G===e&&(q&n)===n&&(Y===4||Y===3&&(q&62914560)===q&&300>Ie()-eu?!(W&2)&&Su(e,0):Jl|=n,Xl===q&&(Xl=0)),rd(e)}function qu(e,t){t===0&&(t=at()),e=pi(e,t),e!==null&&(st(e,t),rd(e))}function Ju(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),qu(e,n)}function Yu(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(a(314))}r!==null&&r.delete(t),qu(e,n)}function Xu(e,t){return Me(e,t)}var Zu=null,Qu=null,$u=!1,ed=!1,td=!1,nd=0;function rd(e){e!==Qu&&e.next===null&&(Qu===null?Zu=Qu=e:Qu=Qu.next=e),ed=!0,$u||($u=!0,ud())}function id(e,t){if(!td&&ed){td=!0;do for(var n=!1,r=Zu;r!==null;){if(!t)if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Je(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,ld(r,a))}else a=q,a=nt(r,r===G?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||rt(r,a)||(n=!0,ld(r,a));r=r.next}while(n);td=!1}}function ad(){od()}function od(){ed=$u=!1;var e=0;nd!==0&&Gd()&&(e=nd);for(var t=Ie(),n=null,r=Zu;r!==null;){var i=r.next,a=sd(r,t);a===0?(r.next=null,n===null?Zu=i:n.next=i,i===null&&(Qu=n)):(n=r,(e!==0||a&3)&&(ed=!0)),r=i}X!==0&&X!==5||id(e,!1),nd!==0&&(nd=0)}function sd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Je(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=it(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=G,n=q,n=nt(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(J===2||J===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Ne(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||rt(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&Ne(r),pt(n)){case 2:case 8:n=ze;break;case 32:n=Be;break;case 268435456:n=He;break;default:n=Be}return r=cd.bind(null,e),n=Me(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&Ne(r),e.callbackPriority=2,e.callbackNode=null,2}function cd(e,t){if(X!==0&&X!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Hu()&&e.callbackNode!==n)return null;var r=q;return r=nt(e,e===G?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(gu(e,r,t),sd(e,Ie()),e.callbackNode!=null&&e.callbackNode===n?cd.bind(null,e):null)}function ld(e,t){if(Hu())return null;gu(e,t,!0)}function ud(){Yd(function(){W&6?Me(Re,ad):od()})}function dd(){if(nd===0){var e=ya;e===0&&(e=Qe,Qe<<=1,!(Qe&261888)&&(Qe=256)),nd=e}return nd}function fd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:ln(``+e)}function pd(e,t){var n=t.ownerDocument.createElement(`input`);return n.name=t.name,n.value=t.value,e.id&&n.setAttribute(`form`,e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function md(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=fd((i[vt]||null).action),o=r.submitter;o&&(t=(t=o[vt]||null)?fd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new jn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(nd!==0){var e=o?pd(i,o):new FormData(i);ks(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?pd(i,o):new FormData(i),ks(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var hd=0;hd<ii.length;hd++){var gd=ii[hd];ai(gd.toLowerCase(),`on`+(gd[0].toUpperCase()+gd.slice(1)))}ai(Xr,`onAnimationEnd`),ai(Zr,`onAnimationIteration`),ai(Qr,`onAnimationStart`),ai(`dblclick`,`onDoubleClick`),ai(`focusin`,`onFocus`),ai(`focusout`,`onBlur`),ai($r,`onTransitionRun`),ai(ei,`onTransitionStart`),ai(ti,`onTransitionCancel`),ai(ni,`onTransitionEnd`),Nt(`onMouseEnter`,[`mouseout`,`mouseover`]),Nt(`onMouseLeave`,[`mouseout`,`mouseover`]),Nt(`onPointerEnter`,[`pointerout`,`pointerover`]),Nt(`onPointerLeave`,[`pointerout`,`pointerover`]),Mt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),Mt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),Mt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),Mt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),Mt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),Mt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var _d=`abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting`.split(` `),vd=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(_d));function yd(e,t){t=(t&4)!=0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){oi(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){oi(e)}i.currentTarget=null,a=c}}}}function Q(e,t){var n=t[bt];n===void 0&&(n=t[bt]=new Set);var r=e+`__bubble`;n.has(r)||(Cd(t,e,2,!1),n.add(r))}function bd(e,t,n){var r=0;t&&(r|=4),Cd(n,e,r,t)}var xd=`_reactListening`+Math.random().toString(36).slice(2);function Sd(e){if(!e[xd]){e[xd]=!0,At.forEach(function(t){t!==`selectionchange`&&(vd.has(t)||bd(t,!1,e),bd(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[xd]||(t[xd]=!0,bd(`selectionchange`,!1,t))}}function Cd(e,t,n,r){switch(mp(t)){case 2:var i=cp;break;case 8:i=lp;break;default:i=up}n=i.bind(null,t,n,e),i=void 0,!bn||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function wd(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var c=r.stateNode.containerInfo;if(c===i)break;if(o===4)for(o=r.return;o!==null;){var l=o.tag;if((l===3||l===4)&&o.stateNode.containerInfo===i)return;o=o.return}for(;c!==null;){if(o=Et(c),o===null)return;if(l=o.tag,l===5||l===6||l===26||l===27){r=a=o;continue a}c=c.parentNode}}r=r.return}_n(function(){var r=a,i=fn(n),o=[];a:{var c=ri.get(e);if(c!==void 0){var l=jn,u=e;switch(e){case`keypress`:if(En(n)===0)break a;case`keydown`:case`keyup`:l=Yn;break;case`focusin`:u=`focus`,l=Bn;break;case`focusout`:u=`blur`,l=Bn;break;case`beforeblur`:case`afterblur`:l=Bn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=Rn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=zn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=Zn;break;case Xr:case Zr:case Qr:l=Vn;break;case ni:l=Qn;break;case`scroll`:case`scrollend`:l=Nn;break;case`wheel`:l=$n;break;case`copy`:case`cut`:case`paste`:l=Hn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=Xn;break;case`toggle`:case`beforetoggle`:l=er}var d=(t&4)!=0,f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=vn(m,p),g!=null&&d.push(Td(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),o.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(c=e===`mouseover`||e===`pointerover`,l=e===`mouseout`||e===`pointerout`,c&&n!==dn&&(u=n.relatedTarget||n.fromElement)&&(Et(u)||u[yt]))break a;if((l||c)&&(c=i.window===i?i:(c=i.ownerDocument)?c.defaultView||c.parentWindow:window,l?(u=n.relatedTarget||n.toElement,l=r,u=u?Et(u):null,u!==null&&(f=s(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=Rn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Xn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:Ot(l),h=u==null?c:Ot(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,Et(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,l&&u)b:{for(d=Dd,p=l,m=u,h=0,g=p;g;g=d(g))h++;g=0;for(var _=m;_;_=d(_))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||m!==null&&p===m.alternate){d=p;break b}p=d(p),m=d(m)}d=null}else d=null;l!==null&&Od(o,c,l,d,!1),u!==null&&f!==null&&Od(o,f,u,d,!0)}}a:{if(c=r?Ot(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=br;else if(mr(c))if(xr)v=Ar;else{v=Or;var y=Dr}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&on(r.elementType)&&(v=br):v=kr;if(v&&=v(e,r)){hr(o,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&Zt(c,`number`,c.value)}switch(y=r?Ot(r):window,e){case`focusin`:(mr(y)||y.contentEditable===`true`)&&(Br=y,Vr=r,Hr=null);break;case`focusout`:Hr=Vr=Br=null;break;case`mousedown`:Ur=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Ur=!1,Wr(o,n,i);break;case`selectionchange`:if(zr)break;case`keydown`:case`keyup`:Wr(o,n,i)}var b;if(nr)b:{switch(e){case`compositionstart`:var x=`onCompositionStart`;break b;case`compositionend`:x=`onCompositionEnd`;break b;case`compositionupdate`:x=`onCompositionUpdate`;break b}x=void 0}else ur?cr(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(ar&&n.locale!==`ko`&&(ur||x!==`onCompositionStart`?x===`onCompositionEnd`&&ur&&(b=Tn()):(Sn=i,Cn=`value`in Sn?Sn.value:Sn.textContent,ur=!0)),y=Ed(r,x),0<y.length&&(x=new Un(x,e,null,n,i),o.push({event:x,listeners:y}),b?x.data=b:(b=lr(n),b!==null&&(x.data=b)))),(b=ir?dr(e,n):fr(e,n))&&(x=Ed(r,`onBeforeInput`),0<x.length&&(y=new Un(`onBeforeInput`,`beforeinput`,null,n,i),o.push({event:y,listeners:x}),y.data=b)),md(o,e,r,n,i)}yd(o,t)})}function Td(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Ed(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=vn(e,n),i!=null&&r.unshift(Td(e,i,a)),i=vn(e,t),i!=null&&r.push(Td(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Dd(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Od(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=vn(n,a),l!=null&&o.unshift(Td(n,l,c))):i||(l=vn(n,a),l!=null&&o.push(Td(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var kd=/\r\n?/g,Ad=/\u0000|\uFFFD/g;function jd(e){return(typeof e==`string`?e:``+e).replace(kd,`-`).replace(Ad,``)}function Md(e,t){return t=jd(t),jd(e)===t}function $(e,t,n,r,i,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||tn(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&tn(e,``+r);break;case`className`:zt(e,`class`,r);break;case`tabIndex`:zt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:zt(e,n,r);break;case`style`:an(e,r,o);break;case`data`:if(t!==`object`){zt(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=ln(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}else typeof o==`function`&&(n===`formAction`?(t!==`input`&&$(e,t,`name`,i.name,i,null),$(e,t,`formEncType`,i.formEncType,i,null),$(e,t,`formMethod`,i.formMethod,i,null),$(e,t,`formTarget`,i.formTarget,i,null)):($(e,t,`encType`,i.encType,i,null),$(e,t,`method`,i.method,i,null),$(e,t,`target`,i.target,i,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=ln(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=un);break;case`onScroll`:r!=null&&Q(`scroll`,e);break;case`onScrollEnd`:r!=null&&Q(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(a(61));if(n=r.__html,n!=null){if(i.children!=null)throw Error(a(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=ln(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:Q(`beforetoggle`,e),Q(`toggle`,e),Rt(e,`popover`,r);break;case`xlinkActuate`:Bt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Bt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Bt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Bt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Bt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Bt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Bt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Bt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Bt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Rt(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=sn.get(n)||n,Rt(e,n,r))}}function Nd(e,t,n,r,i,o){switch(n){case`style`:an(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(a(61));if(n=r.__html,n!=null){if(i.children!=null)throw Error(a(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?tn(e,r):(typeof r==`number`||typeof r==`bigint`)&&tn(e,``+r);break;case`onScroll`:r!=null&&Q(`scroll`,e);break;case`onScrollEnd`:r!=null&&Q(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=un);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!jt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(i=n.endsWith(`Capture`),t=n.slice(2,i?n.length-7:void 0),o=e[vt]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,i),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,i);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):Rt(e,n,r)}}}function Pd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:Q(`error`,e),Q(`load`,e);var r=!1,i=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:i=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(a(137,t));default:$(e,t,o,s,n,null)}}i&&$(e,t,`srcSet`,n.srcSet,n,null),r&&$(e,t,`src`,n.src,n,null);return;case`input`:Q(`invalid`,e);var c=o=s=i=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:i=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(a(137,t));break;default:$(e,t,r,d,n,null)}}Xt(e,o,c,l,u,s,i,!1);return;case`select`:for(i in Q(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(i)&&(c=n[i],c!=null))switch(i){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:$(e,t,i,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&Qt(e,!!r,n,!0):Qt(e,!!r,t,!1);return;case`textarea`:for(s in Q(`invalid`,e),o=i=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:i=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(a(91));break;default:$(e,t,s,c,n,null)}en(e,r,i,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:$(e,t,l,r,n,null)}return;case`dialog`:Q(`beforetoggle`,e),Q(`toggle`,e),Q(`cancel`,e),Q(`close`,e);break;case`iframe`:case`object`:Q(`load`,e);break;case`video`:case`audio`:for(r=0;r<_d.length;r++)Q(_d[r],e);break;case`image`:Q(`error`,e),Q(`load`,e);break;case`details`:Q(`toggle`,e);break;case`embed`:case`source`:case`link`:Q(`error`,e),Q(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(a(137,t));default:$(e,t,u,r,n,null)}return;default:if(on(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Nd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&$(e,t,c,r,n,null))}function Fd(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var i=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||$(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:i=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(a(137,t));break;default:m!==f&&$(e,t,p,m,r,f)}}Yt(e,s,c,l,u,d,o,i);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||$(e,t,o,null,r,l)}for(i in r)if(o=r[i],l=n[i],r.hasOwnProperty(i)&&(o!=null||l!=null))switch(i){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&$(e,t,i,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Qt(e,!!n,n?[]:``,!1):Qt(e,!!n,t,!0)):Qt(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(i=n[c],n.hasOwnProperty(c)&&i!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:$(e,t,c,null,r,i)}for(s in r)if(i=r[s],o=n[s],r.hasOwnProperty(s)&&(i!=null||o!=null))switch(s){case`value`:p=i;break;case`defaultValue`:m=i;break;case`children`:break;case`dangerouslySetInnerHTML`:if(i!=null)throw Error(a(91));break;default:i!==o&&$(e,t,s,i,r,o)}$t(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:$(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:$(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&$(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(a(137,t));break;default:$(e,t,u,p,r,m)}return;default:if(on(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Nd(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||Nd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&$(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||$(e,t,f,p,r,m)}function Id(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Ld(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&Id(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&Id(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var Rd=null,zd=null;function Bd(e){return e.nodeType===9?e:e.ownerDocument}function Vd(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function Hd(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function Ud(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Wd=null;function Gd(){var e=window.event;return e&&e.type===`popstate`?e===Wd?!1:(Wd=e,!0):(Wd=null,!1)}var Kd=typeof setTimeout==`function`?setTimeout:void 0,qd=typeof clearTimeout==`function`?clearTimeout:void 0,Jd=typeof Promise==`function`?Promise:void 0,Yd=typeof queueMicrotask==`function`?queueMicrotask:Jd===void 0?Kd:function(e){return Jd.resolve(null).then(e).catch(Xd)};function Xd(e){setTimeout(function(){throw e})}function Zd(e){return e===`head`}function Qd(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Np(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)pf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,pf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[wt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&pf(e.ownerDocument.body);n=i}while(n);Np(t)}function $d(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8)if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++;n=r}while(n)}function ef(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:ef(n),Tt(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function tf(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r)if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e;else if(!e[wt])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=cf(e.nextSibling),e===null)break}return null}function nf(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=cf(e.nextSibling),e===null))return null;return e}function rf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=cf(e.nextSibling),e===null))return null;return e}function af(e){return e.data===`$?`||e.data===`$~`}function of(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function sf(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function cf(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var lf=null;function uf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return cf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function df(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function ff(e,t,n){switch(t=Bd(n),e){case`html`:if(e=t.documentElement,!e)throw Error(a(452));return e;case`head`:if(e=t.head,!e)throw Error(a(453));return e;case`body`:if(e=t.body,!e)throw Error(a(454));return e;default:throw Error(a(451))}}function pf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Tt(e)}var mf=new Map,hf=new Set;function gf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var _f=C.d;C.d={f:vf,r:yf,D:Sf,C:Cf,L:wf,m:Tf,X:Df,S:Ef,M:Of};function vf(){var e=_f.f(),t=bu();return e||t}function yf(e){var t=Dt(e);t!==null&&t.tag===5&&t.type===`form`?js(t):_f.r(e)}var bf=typeof document>`u`?null:document;function xf(e,t,n){var r=bf;if(r&&typeof t==`string`&&t){var i=Jt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),hf.has(i)||(hf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Pd(t,`link`,e),O(t),r.head.appendChild(t)))}}function Sf(e){_f.D(e),xf(`dns-prefetch`,e,null)}function Cf(e,t){_f.C(e,t),xf(`preconnect`,e,t)}function wf(e,t,n){_f.L(e,t,n);var r=bf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Jt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Jt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Jt(n.imageSizes)+`"]`)):i+=`[href="`+Jt(e)+`"]`;var a=i;switch(t){case`style`:a=Af(e);break;case`script`:a=Pf(e)}mf.has(a)||(e=p({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),mf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(jf(a))||t===`script`&&r.querySelector(Ff(a))||(t=r.createElement(`link`),Pd(t,`link`,e),O(t),r.head.appendChild(t)))}}function Tf(e,t){_f.m(e,t);var n=bf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Jt(r)+`"][href="`+Jt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Pf(e)}if(!mf.has(a)&&(e=p({rel:`modulepreload`,href:e},t),mf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Ff(a)))return}r=n.createElement(`link`),Pd(r,`link`,e),O(r),n.head.appendChild(r)}}}function Ef(e,t,n){_f.S(e,t,n);var r=bf;if(r&&e){var i=kt(r).hoistableStyles,a=Af(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(jf(a)))s.loading=5;else{e=p({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=mf.get(a))&&Rf(e,n);var c=o=r.createElement(`link`);O(c),Pd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Lf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Df(e,t){_f.X(e,t);var n=bf;if(n&&e){var r=kt(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=p({src:e,async:!0},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),O(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Of(e,t){_f.M(e,t);var n=bf;if(n&&e){var r=kt(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=p({src:e,async:!0,type:`module`},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),O(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function kf(e,t,n,r){var i=(i=ye.current)?gf(i):null;if(!i)throw Error(a(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Af(n.href),n=kt(i).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Af(n.href);var o=kt(i).hoistableStyles,s=o.get(e);if(s||(i=i.ownerDocument||i,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=i.querySelector(jf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),mf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},mf.set(e,n),o||Nf(i,e,n,s.state))),t&&r===null)throw Error(a(528,``));return s}if(t&&r!==null)throw Error(a(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Pf(n),n=kt(i).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(a(444,e))}}function Af(e){return`href="`+Jt(e)+`"`}function jf(e){return`link[rel="stylesheet"][`+e+`]`}function Mf(e){return p({},e,{"data-precedence":e.precedence,precedence:null})}function Nf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Pd(t,`link`,n),O(t),e.head.appendChild(t))}function Pf(e){return`[src="`+Jt(e)+`"]`}function Ff(e){return`script[async]`+e}function If(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Jt(n.href)+`"]`);if(r)return t.instance=r,O(r),r;var i=p({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),O(r),Pd(r,`style`,i),Lf(r,n.precedence,e),t.instance=r;case`stylesheet`:i=Af(n.href);var o=e.querySelector(jf(i));if(o)return t.state.loading|=4,t.instance=o,O(o),o;r=Mf(n),(i=mf.get(i))&&Rf(r,i),o=(e.ownerDocument||e).createElement(`link`),O(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Pd(o,`link`,r),t.state.loading|=4,Lf(o,n.precedence,e),t.instance=o;case`script`:return o=Pf(n.src),(i=e.querySelector(Ff(o)))?(t.instance=i,O(i),i):(r=n,(i=mf.get(o))&&(r=p({},n),zf(r,i)),e=e.ownerDocument||e,i=e.createElement(`script`),O(i),Pd(i,`link`,r),e.head.appendChild(i),t.instance=i);case`void`:return null;default:throw Error(a(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Lf(r,n.precedence,e));return t.instance}function Lf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Rf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function zf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Bf=null;function Vf(e,t,n){if(Bf===null){var r=new Map,i=Bf=new Map;i.set(n,r)}else i=Bf,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[wt]||a[_t]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Hf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Uf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Wf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Gf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Af(r.href),a=t.querySelector(jf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Jf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,O(a);return}a=t.ownerDocument||t,r=Mf(r),(i=mf.get(i))&&Rf(r,i),a=a.createElement(`link`),O(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Pd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Jf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Kf=0;function qf(e,t){return e.stylesheets&&e.count===0&&Xf(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&Xf(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&Kf===0&&(Kf=62500*Ld());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Xf(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>Kf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Jf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Xf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Yf=null;function Xf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Yf=new Map,t.forEach(Zf,e),Yf=null,Jf.call(e))}function Zf(e,t){if(!(t.state.loading&4)){var n=Yf.get(e);if(n)var r=n.get(null);else{n=new Map,Yf.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=Jf.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var Qf={$$typeof:x,Provider:null,Consumer:null,_currentValue:me,_currentValue2:me,_threadCount:0};function $f(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=ot(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ot(0),this.hiddenUpdates=ot(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function ep(e,t,n,r,i,a,o,s,c,l,u,d){return e=new $f(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=vi(3,null,null,t),e.current=a,a.stateNode=e,t=ha(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Ja(a),e}function tp(e){return e?(e=gi,e):gi}function np(e,t,n,r,i,a){i=tp(i),r.context===null?r.context=i:r.pendingContext=i,r=Xa(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Za(e,r,t),n!==null&&(hu(n,e,t),Qa(n,e,t))}function rp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ip(e,t){rp(e,t),(e=e.alternate)&&rp(e,t)}function ap(e){if(e.tag===13||e.tag===31){var t=pi(e,67108864);t!==null&&hu(t,e,67108864),ip(e,67108864)}}function op(e){if(e.tag===13||e.tag===31){var t=pu();t=ft(t);var n=pi(e,t);n!==null&&hu(n,e,t),ip(e,t)}}var sp=!0;function cp(e,t,n,r){var i=S.T;S.T=null;var a=C.p;try{C.p=2,up(e,t,n,r)}finally{C.p=a,S.T=i}}function lp(e,t,n,r){var i=S.T;S.T=null;var a=C.p;try{C.p=8,up(e,t,n,r)}finally{C.p=a,S.T=i}}function up(e,t,n,r){if(sp){var i=dp(r);if(i===null)wd(e,t,r,fp,n),Cp(e,r);else if(Tp(i,e,t,n,r))r.stopPropagation();else if(Cp(e,r),t&4&&-1<Sp.indexOf(e)){for(;i!==null;){var a=Dt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=tt(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Je(o);s.entanglements[1]|=c,o&=~c}rd(a),!(W&6)&&(nu=Ie()+500,id(0,!1))}}break;case 31:case 13:s=pi(a,2),s!==null&&hu(s,a,2),bu(),ip(a,2)}if(a=dp(r),a===null&&wd(e,t,r,fp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else wd(e,t,r,null,n)}}function dp(e){return e=fn(e),pp(e)}var fp=null;function pp(e){if(fp=null,e=Et(e),e!==null){var t=s(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=c(t),e!==null)return e;e=null}else if(n===31){if(e=l(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return fp=e,null}function mp(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`resize`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(Le()){case Re:return 2;case ze:return 8;case Be:case Ve:return 32;case He:return 268435456;default:return 32}default:return 32}}var hp=!1,gp=null,_p=null,vp=null,yp=new Map,bp=new Map,xp=[],Sp=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset`.split(` `);function Cp(e,t){switch(e){case`focusin`:case`focusout`:gp=null;break;case`dragenter`:case`dragleave`:_p=null;break;case`mouseover`:case`mouseout`:vp=null;break;case`pointerover`:case`pointerout`:yp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:bp.delete(t.pointerId)}}function wp(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=Dt(t),t!==null&&ap(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Tp(e,t,n,r,i){switch(t){case`focusin`:return gp=wp(gp,e,t,n,r,i),!0;case`dragenter`:return _p=wp(_p,e,t,n,r,i),!0;case`mouseover`:return vp=wp(vp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return yp.set(a,wp(yp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,bp.set(a,wp(bp.get(a)||null,e,t,n,r,i)),!0}return!1}function Ep(e){var t=Et(e.target);if(t!==null){var n=s(t);if(n!==null){if(t=n.tag,t===13){if(t=c(n),t!==null){e.blockedOn=t,ht(e.priority,function(){op(n)});return}}else if(t===31){if(t=l(n),t!==null){e.blockedOn=t,ht(e.priority,function(){op(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Dp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=dp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);dn=r,n.target.dispatchEvent(r),dn=null}else return t=Dt(n),t!==null&&ap(t),e.blockedOn=n,!1;t.shift()}return!0}function Op(e,t,n){Dp(e)&&n.delete(t)}function kp(){hp=!1,gp!==null&&Dp(gp)&&(gp=null),_p!==null&&Dp(_p)&&(_p=null),vp!==null&&Dp(vp)&&(vp=null),yp.forEach(Op),bp.forEach(Op)}function Ap(e,n){e.blockedOn===n&&(e.blockedOn=null,hp||(hp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,kp)))}var jp=null;function Mp(e){jp!==e&&(jp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){jp===e&&(jp=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(pp(r||n)===null)continue;break}var a=Dt(n);a!==null&&(e.splice(t,3),t-=3,ks(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Np(e){function t(t){return Ap(t,e)}gp!==null&&Ap(gp,e),_p!==null&&Ap(_p,e),vp!==null&&Ap(vp,e),yp.forEach(t),bp.forEach(t);for(var n=0;n<xp.length;n++){var r=xp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<xp.length&&(n=xp[0],n.blockedOn===null);)Ep(n),n.blockedOn===null&&xp.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[vt]||null;if(typeof a==`function`)o||Mp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[vt]||null)s=o.formAction;else if(pp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Mp(n)}}}function Pp(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Fp(e){this._internalRoot=e}Ip.prototype.render=Fp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(a(409));var n=t.current;np(n,pu(),e,t,null,null)},Ip.prototype.unmount=Fp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;np(e.current,2,null,e,null,null),bu(),t[yt]=null}};function Ip(e){this._internalRoot=e}Ip.prototype.unstable_scheduleHydration=function(e){if(e){var t=mt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<xp.length&&t!==0&&t<xp[n].priority;n++);xp.splice(n,0,e),n===0&&Ep(e)}};var Lp=n.version;if(Lp!==`19.2.4`)throw Error(a(527,Lp,`19.2.4`));C.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(a(188)):(e=Object.keys(e).join(`,`),Error(a(268,e)));return e=d(t),e=e===null?null:f(e),e=e===null?null:e.stateNode,e};var Rp={bundleType:0,version:`19.2.4`,rendererPackageName:`react-dom`,currentDispatcherRef:S,reconcilerVersion:`19.2.4`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var zp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!zp.isDisabled&&zp.supportsFiber)try{Ge=zp.inject(Rp),Ke=zp}catch{}}e.createRoot=function(e,t){if(!o(e))throw Error(a(299));var n=!1,r=``,i=Qs,s=$s,c=ec;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(i=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=ep(e,1,!1,null,null,n,r,null,i,s,c,Pp),e[yt]=t.current,Sd(e),new Fp(t)}})),se=t(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=oe()}))(),ce=t((e=>{var t=i().__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;e.c=function(e){return t.H.useMemoCache(e)}})),le=t(((e,t)=>{t.exports=ce()}));function ue(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,d=async()=>{let n=!1,d=e=>{y(e,()=>t.signal,()=>n=!0)},f=g(t.options,t.fetchOptions),p=async(e,r,i)=>{if(n)return Promise.reject();if(r==null&&e.pages.length)return Promise.resolve(e);let a=await f((()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return d(e),e})()),{maxPages:o}=t.options,s=i?u:l;return{pages:s(e.pages,a,o),pageParams:s(e.pageParams,r,o)}};if(i&&a.length){let e=i===`backward`,t=e?fe:de,n={pages:a,pageParams:o};s=await p(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]??r.initialPageParam:de(r,s);if(c>0&&e==null)break;s=await p(s,e),c++}while(c<t)}return s};t.options.persister?t.fetchFn=()=>t.options.persister?.(d,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=d}}}function de(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function fe(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var pe=class extends x{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){let r=new h({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);let t=S(e);if(typeof t==`string`){let n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:`added`,mutation:e})}remove(e){if(this.#e.delete(e)){let t=S(e);if(typeof t==`string`){let n=this.#t.get(t);if(n)if(n.length>1){let t=n.indexOf(e);t!==-1&&n.splice(t,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:`removed`,mutation:e})}canRun(e){let t=S(e);if(typeof t==`string`){let n=this.#t.get(t)?.find(e=>e.state.status===`pending`);return!n||n===e}else return!0}runNext(e){let t=S(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){p.batch(()=>{this.#e.forEach(e=>{this.notify({type:`removed`,mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>a(t,e))}findAll(e={}){return this.getAll().filter(t=>a(e,t))}notify(e){p.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return p.batch(()=>Promise.all(e.map(e=>e.continue().catch(te))))}};function S(e){return e.options.scope?.id}var C=class extends x{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){let r=t.queryKey,i=t.queryHash??d(r,t),a=this.get(i);return a||(a=new v({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:`added`,query:e}))}remove(e){let t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){p.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>b(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>b(e,t)):t}notify(e){p.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){p.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){p.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},me=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new C,this.#t=e.mutationCache||new pe,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=n.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=c.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:`fetching`}).length}isMutating(e){return this.#t.findAll({...e,status:`pending`}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(ee(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(r.queryHash)?.state.data,a=m(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return p.batch(()=>this.#e.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){let t=this.#e;p.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return p.batch(()=>(n.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,...e},t)))}cancelQueries(e,t={}){let n={revert:!0,...t},r=p.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(te).catch(te)}invalidateQueries(e,t={}){return p.batch(()=>(this.#e.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType===`none`?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??`active`},t)))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0},r=p.batch(()=>this.#e.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(te)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(r).then(te)}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t);return n.isStaleByTime(ee(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(te).catch(te)}fetchInfiniteQuery(e){return e.behavior=ue(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(te).catch(te)}ensureInfiniteQueryData(e){return e.behavior=ue(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return c.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(f(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{s(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(f(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{s(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||=d(t.queryKey,t),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!==`always`),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode=`offlineFirst`),t.queryFn===r&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},he=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),ge=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),_e=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),w=e=>{let t=_e(e);return t.charAt(0).toUpperCase()+t.slice(1)},T={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},ve=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},E=e(i()),ye=(0,E.createContext)({}),be=()=>(0,E.useContext)(ye),xe=(0,E.forwardRef)(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>{let{size:l=24,strokeWidth:u=2,absoluteStrokeWidth:d=!1,color:f=`currentColor`,className:p=``}=be()??{},m=r??d?Number(n??u)*24/Number(t??l):n??u;return(0,E.createElement)(`svg`,{ref:c,...T,width:t??l??T.width,height:t??l??T.height,stroke:e??f,strokeWidth:m,className:he(`lucide`,p,i),...!a&&!ve(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>(0,E.createElement)(e,t)),...Array.isArray(a)?a:[a]])}),Se=(e,t)=>{let n=(0,E.forwardRef)(({className:n,...r},i)=>(0,E.createElement)(xe,{ref:i,iconNode:t,className:he(`lucide-${ge(w(e))}`,`lucide-${e}`,n),...r}));return n.displayName=w(e),n},Ce=Se(`database`,[[`ellipse`,{cx:`12`,cy:`5`,rx:`9`,ry:`3`,key:`msslwz`}],[`path`,{d:`M3 5V19A9 3 0 0 0 21 19V5`,key:`1wlel7`}],[`path`,{d:`M3 12A9 3 0 0 0 21 12`,key:`mv7ke4`}]]),we=Se(`file-search`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`circle`,{cx:`11.5`,cy:`14.5`,r:`2.5`,key:`1bq0ko`}],[`path`,{d:`M13.3 16.3 15 18`,key:`2quom7`}]]),Te=Se(`git-branch-plus`,[[`path`,{d:`M6 3v12`,key:`qpgusn`}],[`path`,{d:`M18 9a3 3 0 1 0 0-6 3 3 0 0 0 0 6z`,key:`1d02ji`}],[`path`,{d:`M6 21a3 3 0 1 0 0-6 3 3 0 0 0 0 6z`,key:`chk6ph`}],[`path`,{d:`M15 6a9 9 0 0 0-9 9`,key:`or332x`}],[`path`,{d:`M18 15v6`,key:`9wciyi`}],[`path`,{d:`M21 18h-6`,key:`139f0c`}]]),Ee=Se(`scale`,[[`path`,{d:`M12 3v18`,key:`108xh3`}],[`path`,{d:`m19 8 3 8a5 5 0 0 1-6 0zV7`,key:`zcdpyk`}],[`path`,{d:`M3 7h1a17 17 0 0 0 8-2 17 17 0 0 0 8 2h1`,key:`1yorad`}],[`path`,{d:`m5 8 3 8a5 5 0 0 1-6 0zV7`,key:`eua70x`}],[`path`,{d:`M7 21h10`,key:`1b0cd5`}]]),De=Se(`settings-2`,[[`path`,{d:`M14 17H5`,key:`gfn3mx`}],[`path`,{d:`M19 7h-9`,key:`6i9tg`}],[`circle`,{cx:`17`,cy:`17`,r:`3`,key:`18b49y`}],[`circle`,{cx:`7`,cy:`7`,r:`3`,key:`dfmy0x`}]]),Oe=le(),D=o(),ke=`modulepreload`,Ae=function(e){return`/`+e},je={},Me=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}r=o(t.map(t=>{if(t=Ae(t,n),t in je)return;je[t]=!0;let r=t.endsWith(`.css`),i=r?`[rel="stylesheet"]`:``;if(n)for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${t}"]${i}`))return;let o=document.createElement(`link`);if(o.rel=r?`stylesheet`:ke,r||(o.as=`script`),o.crossOrigin=``,o.href=t,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),r)return new Promise((e,n)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},Ne=(0,E.lazy)(()=>Me(()=>import(`./DecisionWorkspace-CkoD0QKe.js`).then(e=>({default:e.DecisionWorkspace})),__vite__mapDeps([0,1,2]))),Pe=(0,E.lazy)(()=>Me(()=>import(`./DiffMergeWorkspace-DDK7n-jO.js`).then(e=>({default:e.DiffMergeWorkspace})),__vite__mapDeps([3,1,2]))),Fe=(0,E.lazy)(()=>Me(()=>import(`./GraphWorkspace-Bqx0S-ru.js`).then(e=>({default:e.GraphWorkspace})),__vite__mapDeps([4,1,2,5,6,7,8,9]))),Ie=(0,E.lazy)(()=>Me(()=>import(`./ImportExportWorkspace-BU8nK4nT.js`).then(e=>({default:e.ImportExportWorkspace})),__vite__mapDeps([10,1,2,11]))),Le=(0,E.lazy)(()=>Me(()=>import(`./LineageDiagram-BcIhRlOg.js`).then(e=>({default:e.LineageDiagram})),__vite__mapDeps([12,1,2,13,14]))),Re=(0,E.lazy)(()=>Me(()=>import(`./ReasoningWorkspace-BGe6HUKK.js`).then(e=>({default:e.ReasoningWorkspace})),__vite__mapDeps([15,1,2]))),ze=(0,E.lazy)(()=>Me(()=>import(`./SparqlWorkspace-CK6q2l7f.js`).then(e=>({default:e.SparqlWorkspace})),__vite__mapDeps([16,1,2]))),Be=(0,E.lazy)(()=>Me(()=>import(`./VocabularyWorkspace-BonIpRiP.js`).then(e=>({default:e.VocabularyWorkspace})),__vite__mapDeps([17,1,2,11,13]))),Ve=new me,He=[{id:`explore`,label:`Explore`,hint:`Graph and vocabulary browsing`,icon:Ce},{id:`analyze`,label:`Analyze`,hint:`Query and inspect the dataset`,icon:we},{id:`decisions`,label:`Decisions`,hint:`Decision chains and precedent review`,icon:Ee},{id:`enrich`,label:`Enrich`,hint:`Import, export, and merge workflows`,icon:Te},{id:`manage`,label:`Manage`,hint:`Lineage and governance tooling`,icon:De}],Ue=`- :root {- --app-bg: #07111f;- --panel-bg: rgba(7, 17, 31, 0.82);- --panel-border: rgba(140, 192, 255, 0.14);- --text-main: #ebf3ff;- --text-muted: #8fa8c6;- --accent: #4aa3ff;- --accent-strong: #7fd0ff;- --warm: #f2b66d;- --success: #4cc38a;- }-- .app-shell {- display: flex;- width: 100vw;- height: 100vh;- overflow: hidden;- color: var(--text-main);- background:- radial-gradient(circle at top left, rgba(74, 163, 255, 0.12), transparent 32%),- radial-gradient(circle at bottom right, rgba(242, 182, 109, 0.08), transparent 26%),- linear-gradient(180deg, #091322 0%, #050b15 100%);- font-family: "Segoe UI", "SF Pro Display", sans-serif;- }-- .app-rail {- width: 88px;- padding: 20px 14px;- display: flex;- flex-direction: column;- gap: 12px;- border-right: 1px solid var(--panel-border);- background: rgba(3, 9, 18, 0.92);- backdrop-filter: blur(18px);- }-- .brand-pill {- width: 100%;- min-height: 56px;- border-radius: 18px;- display: grid;- place-items: center;- color: var(--text-main);- background: linear-gradient(135deg, rgba(74, 163, 255, 0.22), rgba(127, 208, 255, 0.08));- border: 1px solid rgba(127, 208, 255, 0.18);- box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);- font-size: 11px;- font-weight: 700;- letter-spacing: 0.12em;- }-- .nav-button {- border: 1px solid transparent;- background: transparent;- color: var(--text-muted);- border-radius: 18px;- min-height: 72px;- display: flex;- flex-direction: column;- align-items: center;- justify-content: center;- gap: 8px;- cursor: pointer;- transition: 160ms ease;- }-- .nav-button:hover {- color: var(--text-main);- background: rgba(74, 163, 255, 0.08);- border-color: rgba(74, 163, 255, 0.12);- }-- .nav-button[data-active='true'] {- color: var(--text-main);- background: linear-gradient(180deg, rgba(74, 163, 255, 0.18), rgba(74, 163, 255, 0.08));- border-color: rgba(127, 208, 255, 0.22);- box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);- }-- .nav-label {- font-size: 11px;- font-weight: 600;- letter-spacing: 0.02em;- }-- .workspace-shell {- flex: 1;- min-width: 0;- display: flex;- flex-direction: column;- }-- .workspace-header {- padding: 14px 22px;- border-bottom: 1px solid var(--panel-border);- background: linear-gradient(180deg, rgba(7, 17, 31, 0.94), rgba(7, 17, 31, 0.82));- backdrop-filter: blur(18px);- display: flex;- align-items: center;- justify-content: space-between;- gap: 18px;- min-height: 68px;- }-- .workspace-header--compact {- min-height: 60px;- padding: 10px 18px;- background: linear-gradient(180deg, rgba(7, 17, 31, 0.92), rgba(7, 17, 31, 0.72));- }-- .workspace-header--compact .workspace-title {- font-size: 16px;- }-- .workspace-header--compact .workspace-subtitle {- font-size: 11px;- }-- .workspace-header-main {- min-width: 0;- display: flex;- align-items: center;- gap: 14px;- }-- .workspace-kicker {- display: inline-flex;- align-items: center;- gap: 8px;- padding: 6px 10px;- border-radius: 999px;- background: rgba(74, 163, 255, 0.08);- border: 1px solid rgba(127, 208, 255, 0.14);- color: var(--text-muted);- font-size: 11px;- font-weight: 700;- letter-spacing: 0.08em;- text-transform: uppercase;- white-space: nowrap;- }-- .workspace-kicker::before {- content: "";- width: 7px;- height: 7px;- border-radius: 999px;- background: linear-gradient(135deg, var(--accent-strong), var(--warm));- box-shadow: 0 0 14px rgba(127, 208, 255, 0.45);- }-- .workspace-title-block {- min-width: 0;- display: flex;- flex-direction: column;- gap: 3px;- }-- .workspace-title {- margin: 0;- font-size: 20px;- line-height: 1;- letter-spacing: -0.03em;- }-- .workspace-subtitle {- color: var(--text-muted);- font-size: 12px;- white-space: nowrap;- overflow: hidden;- text-overflow: ellipsis;- }-- .workspace-tabs {- display: flex;- gap: 8px;- flex-wrap: wrap;- justify-content: flex-end;- }-- .workspace-tab {- border: 1px solid rgba(127, 208, 255, 0.18);- background: rgba(9, 19, 34, 0.56);- color: var(--text-muted);- border-radius: 999px;- padding: 8px 12px;- cursor: pointer;- font-size: 12px;- font-weight: 600;- transition: 160ms ease;- white-space: nowrap;- }-- .workspace-tab[data-active='true'] {- color: var(--text-main);- background: rgba(74, 163, 255, 0.16);- border-color: rgba(127, 208, 255, 0.3);- box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);- }-- .workspace-body {- flex: 1;- min-height: 0;- overflow: hidden;- }-- .workspace-loading {- height: 100%;- display: grid;- place-items: center;- color: var(--text-muted);- background: linear-gradient(180deg, rgba(7, 17, 31, 0.8), rgba(5, 11, 21, 0.92));- font-size: 14px;- }-- @media (max-width: 980px) {- .workspace-header {- flex-direction: column;- align-items: stretch;- min-height: auto;- padding: 12px 18px;- }-- .workspace-header-main {- justify-content: space-between;- }-- .workspace-subtitle {- white-space: normal;- }-- .workspace-tabs {- justify-content: flex-start;- }- }-`;function We(e){let t=(0,Oe.c)(19),{title:n,subtitle:r,tabs:i,compact:a,children:o}=e,s=`workspace-header${a!==void 0&&a?` workspace-header--compact`:``}`,c;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,D.jsx)(`div`,{className:`workspace-kicker`,children:`Workspace`}),t[0]=c):c=t[0];let l;t[1]===n?l=t[2]:(l=(0,D.jsx)(`h1`,{className:`workspace-title`,children:n}),t[1]=n,t[2]=l);let u;t[3]===r?u=t[4]:(u=r?(0,D.jsx)(`div`,{className:`workspace-subtitle`,children:r}):null,t[3]=r,t[4]=u);let d;t[5]!==l||t[6]!==u?(d=(0,D.jsxs)(`div`,{className:`workspace-header-main`,children:[c,(0,D.jsxs)(`div`,{className:`workspace-title-block`,children:[l,u]})]}),t[5]=l,t[6]=u,t[7]=d):d=t[7];let f;t[8]===i?f=t[9]:(f=i?(0,D.jsx)(`div`,{className:`workspace-tabs`,children:i}):null,t[8]=i,t[9]=f);let p;t[10]!==s||t[11]!==d||t[12]!==f?(p=(0,D.jsxs)(`header`,{className:s,children:[d,f]}),t[10]=s,t[11]=d,t[12]=f,t[13]=p):p=t[13];let m;t[14]===o?m=t[15]:(m=(0,D.jsx)(`div`,{className:`workspace-body`,children:o}),t[14]=o,t[15]=m);let h;return t[16]!==p||t[17]!==m?(h=(0,D.jsxs)(`section`,{className:`workspace-shell`,children:[p,m]}),t[16]=p,t[17]=m,t[18]=h):h=t[18],h}function Ge(){let e=(0,Oe.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,D.jsx)(`div`,{className:`workspace-loading`,children:`Loading workspace…`}),e[0]=t):t=e[0],t}function Ke(){let e=(0,Oe.c)(16),[t,n]=(0,E.useState)(`explore`),[r,i]=(0,E.useState)(`graph`),[a,o]=(0,E.useState)(`reasoning`),[s,c]=(0,E.useState)(`import`),l;e[0]!==t||e[1]!==a||e[2]!==s||e[3]!==r?(l=()=>t===`explore`?(0,D.jsx)(We,{title:`Explore`,subtitle:r===`graph`?void 0:`Browse the graph and switch views without leaving the workspace.`,compact:!0,tabs:(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(`button`,{className:`workspace-tab`,"data-active":r===`graph`,onClick:()=>i(`graph`),children:`Network Explorer`}),(0,D.jsx)(`button`,{className:`workspace-tab`,"data-active":r===`vocabulary`,onClick:()=>i(`vocabulary`),children:`Vocabulary Browser`})]}),children:(0,D.jsx)(E.Suspense,{fallback:(0,D.jsx)(Ge,{}),children:r===`graph`?(0,D.jsx)(Fe,{}):(0,D.jsx)(Be,{})})}):t===`analyze`?(0,D.jsx)(We,{title:`Analyze`,subtitle:`Query the active graph and test inference rules.`,tabs:(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(`button`,{className:`workspace-tab`,"data-active":a===`reasoning`,onClick:()=>o(`reasoning`),children:`Reasoning Playground`}),(0,D.jsx)(`button`,{className:`workspace-tab`,"data-active":a===`sparql`,onClick:()=>o(`sparql`),children:`SPARQL Querying`})]}),children:(0,D.jsx)(E.Suspense,{fallback:(0,D.jsx)(Ge,{}),children:a===`reasoning`?(0,D.jsx)(Re,{}):(0,D.jsx)(ze,{})})}):t===`decisions`?(0,D.jsx)(We,{title:`Decisions`,subtitle:`Inspect decision chains, causal context, and precedent matches.`,children:(0,D.jsx)(E.Suspense,{fallback:(0,D.jsx)(Ge,{}),children:(0,D.jsx)(Ne,{})})}):t===`enrich`?(0,D.jsx)(We,{title:`Enrich`,subtitle:`Import, export, and reconcile graph entities.`,tabs:(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(`button`,{className:`workspace-tab`,"data-active":s===`import`,onClick:()=>c(`import`),children:`Import and Export`}),(0,D.jsx)(`button`,{className:`workspace-tab`,"data-active":s===`merge`,onClick:()=>c(`merge`),children:`Diff and Merge`})]}),children:(0,D.jsx)(E.Suspense,{fallback:(0,D.jsx)(Ge,{}),children:s===`import`?(0,D.jsx)(Ie,{}):(0,D.jsx)(Pe,{})})}):(0,D.jsx)(We,{title:`Manage`,subtitle:`Review provenance, lineage, and governance context.`,children:(0,D.jsx)(E.Suspense,{fallback:(0,D.jsx)(Ge,{}),children:(0,D.jsx)(Le,{})})}),e[0]=t,e[1]=a,e[2]=s,e[3]=r,e[4]=l):l=e[4];let u=l,d;e[5]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,D.jsx)(`style`,{children:Ue}),e[5]=d):d=e[5];let f;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,D.jsx)(`div`,{className:`brand-pill`,children:`SEM`}),e[6]=f):f=e[6];let p;e[7]===t?p=e[8]:(p=He.map(e=>{let{id:r,label:i,hint:a,icon:o}=e;return(0,D.jsxs)(`button`,{className:`nav-button`,"data-active":t===r,onClick:()=>n(r),title:a,children:[(0,D.jsx)(o,{size:20}),(0,D.jsx)(`span`,{className:`nav-label`,children:i})]},r)}),e[7]=t,e[8]=p);let m;e[9]===p?m=e[10]:(m=(0,D.jsxs)(`aside`,{className:`app-rail`,children:[f,p]}),e[9]=p,e[10]=m);let h;e[11]===u?h=e[12]:(h=u(),e[11]=u,e[12]=h);let g;return e[13]!==m||e[14]!==h?(g=(0,D.jsxs)(_,{client:Ve,children:[d,(0,D.jsxs)(`div`,{className:`app-shell`,children:[m,h]})]}),e[13]=m,e[14]=h,e[15]=g):g=e[15],g}(0,se.createRoot)(document.getElementById(`root`)).render((0,D.jsx)(Ke,{}));export{ae as i,Se as n,le as r,Me as t};\ No newline at end of filediff --git a/semantica/static/assets/neighborhoodPanelPlugin-DtCzBl4D.js b/semantica/static/assets/neighborhoodPanelPlugin-DtCzBl4D.jsdeleted file mode 100644index 959d94eb..00000000--- a/semantica/static/assets/neighborhoodPanelPlugin-DtCzBl4D.js+++ /dev/null@@ -1 +0,0 @@-import{t as e}from"./neighborhoodPanelPlugin-qsLfEPn1.js";export{e as neighborhoodPanelPlugin};\ No newline at end of filediff --git a/semantica/static/assets/neighborhoodPanelPlugin-qsLfEPn1.js b/semantica/static/assets/neighborhoodPanelPlugin-qsLfEPn1.jsdeleted file mode 100644index 878963bb..00000000--- a/semantica/static/assets/neighborhoodPanelPlugin-qsLfEPn1.js+++ /dev/null@@ -1 +0,0 @@-import{a as e}from"./query-vendor-Cbp9LWgA.js";var t=e(),n=`neighborhood-panel`,r=10;function i(e,t,n){let r=0;return e.forEachDirectedEdge(t,n,(e,t)=>{r=Math.max(r,Number(t.weight??0))}),r}function a(e){let t=[e.nodeType,`degree ${e.degree}`];return e.weight>0&&t.push(`weight ${e.weight.toFixed(2)}`),t.join(` · `)}var o={id:`neighborhood-panel`,mount:()=>{},unmount:()=>{},onStateChange:()=>{},toolbarItems:e=>[{id:`neighborhood-toggle`,label:`Neighbors`,title:`Toggle neighborhood panel`,active:e.isPanelOpen(n),order:30,onClick:()=>e.dispatchAction({type:`togglePanel`,panelId:n})}],renderPanel:e=>{if(!e.isPanelOpen(n))return null;let o=e.getSelectedNodeState();if(!o)return{id:n,title:`Neighborhood`,placement:`bottom`,order:20,defaultOpen:!1,preferredWidth:360,preferredHeight:260,content:(0,t.jsx)(`div`,{style:m,children:`Select a node to inspect its local neighborhood.`})};let h=e.graph.neighbors(o.id).map(t=>{let n=e.graph.getNodeAttributes(t),r=Math.max(i(e.graph,o.id,t),i(e.graph,t,o.id));return{id:t,label:String(n.label||t),nodeType:String(n.nodeType||`Entity`),color:String(n.baseColor||n.color||e.theme.palette.semantic[0]),weight:r,degree:e.graph.degree(t)}}).sort((e,t)=>t.weight===e.weight?t.degree===e.degree?e.label.localeCompare(t.label):t.degree-e.degree:t.weight-e.weight).slice(0,r);return{id:n,title:`Neighborhood`,placement:`bottom`,order:20,defaultOpen:!1,preferredWidth:360,preferredHeight:260,content:(0,t.jsxs)(`div`,{style:s,children:[(0,t.jsx)(`div`,{style:c,children:o.label}),(0,t.jsxs)(`div`,{style:l,children:[o.neighborCount.toLocaleString(),` direct neighbors in the full graph`]}),h.length?(0,t.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:8},children:h.map(n=>(0,t.jsxs)(`button`,{type:`button`,onClick:()=>e.dispatchAction({type:`selectNode`,nodeId:n.id}),style:u,children:[(0,t.jsx)(`span`,{style:{...d,background:n.color,boxShadow:`0 0 16px ${n.color}40`}}),(0,t.jsxs)(`div`,{style:{minWidth:0,flex:1,textAlign:`left`},children:[(0,t.jsx)(`div`,{style:f,children:n.label}),(0,t.jsx)(`div`,{style:p,children:a(n)})]})]},n.id))}):(0,t.jsx)(`div`,{style:m,children:`No direct neighbors are available for this node.`})]})}}},s={display:`flex`,flexDirection:`column`,gap:12},c={color:`#f3f7fd`,fontSize:14,fontWeight:700},l={color:`#8ea4be`,fontSize:12,lineHeight:1.5},u={display:`flex`,alignItems:`center`,gap:10,width:`100%`,padding:`8px 10px`,background:`rgba(255,255,255,0.025)`,border:`1px solid rgba(255,255,255,0.06)`,borderRadius:12,cursor:`pointer`},d={width:10,height:10,borderRadius:999,flexShrink:0},f={color:`#f3f7fd`,fontSize:13,fontWeight:600,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},p={color:`#8ea4be`,fontSize:12},m={color:`#8ea4be`,fontSize:12,lineHeight:1.5};export{o as t};\ No newline at end of filediff --git a/semantica/static/assets/query-vendor-Cbp9LWgA.js b/semantica/static/assets/query-vendor-Cbp9LWgA.jsdeleted file mode 100644index 223ae441..00000000--- a/semantica/static/assets/query-vendor-Cbp9LWgA.js+++ /dev/null@@ -1 +0,0 @@-import{i as e,t}from"./rolldown-runtime-B1FJdls4.js";var n=t((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function k(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var A=/\/+/g;function j(e,t){return typeof e==`object`&&e&&e.key!=null?k(``+e.key):t.toString(36)}function M(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function N(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,N(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+j(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(A,`$&/`)+`/`),N(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(A,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+j(a,u),c+=N(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+j(a,u++),c+=N(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return N(M(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function P(e,t,n){if(e==null)return e;var r=[],i=0;return N(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function F(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var I=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},ee={map:P,forEach:function(e,t,n){P(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return P(e,function(){t++}),t},toArray:function(e){return P(e,function(e){return e})||[]},only:function(e){if(!O(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=ee,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!T.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return E(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)T.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return E(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=O,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:F}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,I)}catch(e){I(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()},e.version=`19.2.4`})),r=t(((e,t)=>{t.exports=n()})),i=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},a=new class extends i{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}},o={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},s=new class{#e=o;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};function c(e){setTimeout(e,0)}var l=typeof window>`u`||`Deno`in globalThis;function u(){}function d(e,t){return typeof e==`function`?e(t):e}function f(e){return typeof e==`number`&&e>=0&&e!==1/0}function p(e,t){return Math.max(e+(t||0)-Date.now(),0)}function m(e,t){return typeof e==`function`?e(t):e}function h(e,t){return typeof e==`function`?e(t):e}function g(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==v(o,t.options))return!1}else if(!b(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function _(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(y(t.options.mutationKey)!==y(a))return!1}else if(!b(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function v(e,t){return(t?.queryKeyHashFn||y)(e)}function y(e){return JSON.stringify(e,(e,t)=>T(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function b(e,t){return e===t?!0:typeof e==typeof t&&e&&t&&typeof e==`object`&&typeof t==`object`?Object.keys(t).every(n=>b(e[n],t[n])):!1}var x=Object.prototype.hasOwnProperty;function S(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=w(e)&&w(t);if(!r&&!(T(e)&&T(t)))return t;let i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?Array(o):{},c=0;for(let l=0;l<o;l++){let o=r?l:a[l],u=e[o],d=t[o];if(u===d){s[o]=u,(r?l<i:x.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=S(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function C(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function w(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function T(e){if(!E(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!E(n)||!n.hasOwnProperty(`isPrototypeOf`)||Object.getPrototypeOf(e)!==Object.prototype)}function E(e){return Object.prototype.toString.call(e)===`[object Object]`}function D(e){return new Promise(t=>{s.setTimeout(t,e)})}function O(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:S(e,t)}function k(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function A(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var j=Symbol();function M(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===j?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function N(e,t){return typeof e==`function`?e(...t):!!e}function P(e,t,n){let r=!1,i;return Object.defineProperty(e,`signal`,{enumerable:!0,get:()=>(i??=t(),r?i:(r=!0,i.aborted?n():i.addEventListener(`abort`,n,{once:!0}),i))}),e}var F=(()=>{let e=()=>l;return{isServer(){return e()},setIsServer(t){e=t}}})();function I(){let e,t,n=new Promise((n,r)=>{e=n,t=r});n.status=`pending`,n.catch(()=>{});function r(e){Object.assign(n,e),delete n.resolve,delete n.reject}return n.resolve=t=>{r({status:`fulfilled`,value:t}),e(t)},n.reject=e=>{r({status:`rejected`,reason:e}),t(e)},n}var ee=c;function te(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=ee,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var L=te(),R=new class extends i{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener(`online`,t,!1),window.addEventListener(`offline`,n,!1),()=>{window.removeEventListener(`online`,t),window.removeEventListener(`offline`,n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};function ne(e){return Math.min(1e3*2**e,3e4)}function re(e){return(e??`online`)===`online`?R.isOnline():!0}var z=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function B(e){let t=!1,n=0,r,i=I(),o=()=>i.status!==`pending`,s=t=>{if(!o()){let n=new z(t);p(n),e.onCancel?.(n)}},c=()=>{t=!0},l=()=>{t=!1},u=()=>a.isFocused()&&(e.networkMode===`always`||R.isOnline())&&e.canRun(),d=()=>re(e.networkMode)&&e.canRun(),f=e=>{o()||(r?.(),i.resolve(e))},p=e=>{o()||(r?.(),i.reject(e))},m=()=>new Promise(t=>{r=e=>{(o()||u())&&t(e)},e.onPause?.()}).then(()=>{r=void 0,o()||e.onContinue?.()}),h=()=>{if(o())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(f).catch(r=>{if(o())return;let i=e.retry??(F.isServer()?0:3),a=e.retryDelay??ne,s=typeof a==`function`?a(n,r):a,c=i===!0||typeof i==`number`&&n<i||typeof i==`function`&&i(n,r);if(t||!c){p(r);return}n++,e.onFail?.(n,r),D(s).then(()=>u()?void 0:m()).then(()=>{t?p(r):h()})})};return{promise:i,status:()=>i.status,cancel:s,continue:()=>(r?.(),i),cancelRetry:c,continueRetry:l,canStart:d,start:()=>(d()?h():m().then(h),i)}}var V=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),f(this.gcTime)&&(this.#e=s.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(F.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e&&=(s.clearTimeout(this.#e),void 0)}},ie=class extends V{#e;#t;#n;#r;#i;#a;#o;constructor(e){super(),this.#o=!1,this.#a=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#r=e.client,this.#n=this.#r.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=W(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#i?.promise}setOptions(e){if(this.options={...this.#a,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=W(this.options);e.data!==void 0&&(this.setState(U(e.data,e.dataUpdatedAt)),this.#e=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#n.remove(this)}setData(e,t){let n=O(this.state.data,e,this.options);return this.#c({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#c({type:`setState`,state:e,setStateOptions:t})}cancel(e){let t=this.#i?.promise;return this.#i?.cancel(e),t?t.then(u).catch(u):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#e}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>h(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===j||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>m(e.options.staleTime,this)===`static`):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e===`static`?!1:this.state.isInvalidated?!0:!p(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#i?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#i?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#i&&(this.#o||this.#s()?this.#i.cancel({revert:!0}):this.#i.cancelRetry()),this.scheduleGc()),this.#n.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}#s(){return this.state.fetchStatus===`paused`&&this.state.status===`pending`}invalidate(){this.state.isInvalidated||this.#c({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#i?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#i)return this.#i.continueRetry(),this.#i.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperty(e,`signal`,{enumerable:!0,get:()=>(this.#o=!0,n.signal)})},i=()=>{let e=M(this.options,t),n=(()=>{let e={client:this.#r,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#o=!1,this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#r,state:this.state,fetchFn:i};return r(e),e})();this.options.behavior?.onFetch(a,this),this.#t=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#c({type:`fetch`,meta:a.fetchOptions?.meta}),this.#i=B({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof z&&e.revert&&this.setState({...this.#t,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#c({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#c({type:`pause`})},onContinue:()=>{this.#c({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{let e=await this.#i.start();if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#n.config.onSuccess?.(e,this),this.#n.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof z){if(e.silent)return this.#i.promise;if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#c({type:`error`,error:e}),this.#n.config.onError?.(e,this),this.#n.config.onSettled?.(this.state.data,e,this),e}finally{this.scheduleGc()}}#c(e){this.state=(t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,...H(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...U(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#t=e.manual?n:void 0,n;case`error`:let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:`idle`,status:`error`,isInvalidated:!0};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}})(this.state),L.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#n.notify({query:this,type:`updated`,action:e})})}};function H(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:re(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function U(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function W(e){let t=typeof e.initialData==`function`?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt==`function`?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?`success`:`pending`,fetchStatus:`idle`}}var ae=class extends i{constructor(e,t){super(),this.options=t,this.#e=e,this.#s=null,this.#o=I(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),G(this.#t,this.options)?this.#h():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return K(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return K(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof h(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!C(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&q(this.#t,n,this.options,t)&&this.#h(),this.updateResult(),r&&(this.#t!==n||h(this.options.enabled,this.#t)!==h(t.enabled,this.#t)||m(this.options.staleTime,this.#t)!==m(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||h(this.options.enabled,this.#t)!==h(t.enabled,this.#t)||i!==this.#p)&&this.#v(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return se(this,n)&&(this.#r=n,this.#a=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),n===`promise`&&(this.trackProp(`data`),!this.options.experimental_prefetchInRender&&this.#o.status===`pending`&&this.#o.reject(Error(`experimental_prefetchInRender feature flag is not enabled`))),Reflect.get(e,n))})}trackProp(e){this.#m.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#h({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#h(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(u)),t}#g(){this.#b();let e=m(this.options.staleTime,this.#t);if(F.isServer()||this.#r.isStale||!f(e))return;let t=p(this.#r.dataUpdatedAt,e)+1;this.#d=s.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return(typeof this.options.refetchInterval==`function`?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(e){this.#x(),this.#p=e,!(F.isServer()||h(this.options.enabled,this.#t)===!1||!f(this.#p)||this.#p===0)&&(this.#f=s.setInterval(()=>{(this.options.refetchIntervalInBackground||a.isFocused())&&this.#h()},this.#p))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#d&&=(s.clearTimeout(this.#d),void 0)}#x(){this.#f&&=(s.clearInterval(this.#f),void 0)}createResult(e,t){let n=this.#t,r=this.options,i=this.#r,a=this.#i,o=this.#a,s=e===n?this.#n:e.state,{state:c}=e,l={...c},u=!1,d;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&G(e,t),o=i&&q(e,n,t,r);(a||o)&&(l={...l,...H(c.data,e.options)}),t._optimisticResults===`isRestoring`&&(l.fetchStatus=`idle`)}let{error:f,errorUpdatedAt:p,status:m}=l;d=l.data;let g=!1;if(t.placeholderData!==void 0&&d===void 0&&m===`pending`){let e;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=i.data,g=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#u?.state.data,this.#u):t.placeholderData,e!==void 0&&(m=`success`,d=O(i?.data,e,t),u=!0)}if(t.select&&d!==void 0&&!g)if(i&&d===a?.data&&t.select===this.#c)d=this.#l;else try{this.#c=t.select,d=t.select(d),d=O(i?.data,d,t),this.#l=d,this.#s=null}catch(e){this.#s=e}this.#s&&(f=this.#s,d=this.#l,p=Date.now(),m=`error`);let _=l.fetchStatus===`fetching`,v=m===`pending`,y=m===`error`,b=v&&_,x=d!==void 0,S={status:m,fetchStatus:l.fetchStatus,isPending:v,isSuccess:m===`success`,isError:y,isInitialLoading:b,isLoading:b,data:d,dataUpdatedAt:l.dataUpdatedAt,error:f,errorUpdatedAt:p,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:l.dataUpdateCount>s.dataUpdateCount||l.errorUpdateCount>s.errorUpdateCount,isFetching:_,isRefetching:_&&!v,isLoadingError:y&&!x,isPaused:l.fetchStatus===`paused`,isPlaceholderData:u,isRefetchError:y&&x,isStale:J(e,t),refetch:this.refetch,promise:this.#o,isEnabled:h(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){let t=S.data!==void 0,r=S.status===`error`&&!t,i=e=>{r?e.reject(S.error):t&&e.resolve(S.data)},a=()=>{i(this.#o=S.promise=I())},o=this.#o;switch(o.status){case`pending`:e.queryHash===n.queryHash&&i(o);break;case`fulfilled`:(r||S.data!==o.value)&&a();break;case`rejected`:(!r||S.error!==o.reason)&&a();break}}return S}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#u=this.#t),!C(t,e)&&(this.#r=t,this.#C({listeners:(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#m.size)return!0;let r=new Set(n??this.#m);return this.options.throwOnError&&r.add(`error`),Object.keys(this.#r).some(t=>{let n=t;return this.#r[n]!==e[n]&&r.has(n)})})()}))}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}#C(e){L.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}};function oe(e,t){return h(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status===`error`&&t.retryOnMount===!1)}function G(e,t){return oe(e,t)||e.state.data!==void 0&&K(e,t,t.refetchOnMount)}function K(e,t,n){if(h(t.enabled,e)!==!1&&m(t.staleTime,e)!==`static`){let r=typeof n==`function`?n(e):n;return r===`always`||r!==!1&&J(e,t)}return!1}function q(e,t,n,r){return(e!==t||h(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&J(e,n)}function J(e,t){return h(t.enabled,e)!==!1&&e.isStaleByTime(m(t.staleTime,e))}function se(e,t){return!C(e.getCurrentResult(),t)}var ce=class extends V{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||Y(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(e){let t=()=>{this.#i({type:`continue`})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=B({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});let r=this.state.status===`pending`,i=!this.#r.canStart();try{if(r)t();else{this.#i({type:`pending`,variables:e,isPaused:i}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:i})}let a=await this.#r.start();return await this.#n.config.onSuccess?.(a,e,this.state.context,this,n),await this.options.onSuccess?.(a,e,this.state.context,n),await this.#n.config.onSettled?.(a,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(a,null,e,this.state.context,n),this.#i({type:`success`,data:a}),a}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:t}),t}finally{this.#n.runNext(this)}}#i(e){this.state=(t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:`pending`,variables:e.variables,submittedAt:Date.now()};case`success`:return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}})(this.state),L.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function Y(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var le=class extends i{#e;#t=void 0;#n;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),C(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&y(t.mutationKey)!==y(this.options.mutationKey)?this.reset():this.#n?.state.status===`pending`&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#a(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#a()}mutate(e,t){return this.#r=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){let e=this.#n?.state??Y();this.#t={...e,isPending:e.status===`pending`,isSuccess:e.status===`success`,isError:e.status===`error`,isIdle:e.status===`idle`,mutate:this.mutate,reset:this.reset}}#a(e){L.batch(()=>{if(this.#r&&this.hasListeners()){let t=this.#t.variables,n=this.#t.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type===`success`){try{this.#r.onSuccess?.(e.data,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(e.data,null,t,n,r)}catch(e){Promise.reject(e)}}else if(e?.type===`error`){try{this.#r.onError?.(e.error,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(void 0,e.error,t,n,r)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},ue=t((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),X=t(((e,t)=>{t.exports=ue()})),Z=e(r(),1),de=X(),Q=Z.createContext(void 0),$=e=>{let t=Z.useContext(Q);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},fe=({client:e,children:t})=>(Z.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,de.jsx)(Q.Provider,{value:e,children:t})),pe=Z.createContext(!1),me=()=>Z.useContext(pe);pe.Provider;function he(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var ge=Z.createContext(he()),_e=()=>Z.useContext(ge),ve=(e,t,n)=>{let r=n?.state.error&&typeof e.throwOnError==`function`?N(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},ye=e=>{Z.useEffect(()=>{e.clearReset()},[e])},be=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||N(n,[e.error,r])),xe=e=>{if(e.suspense){let t=1e3,n=e=>e===`static`?e:Math.max(e??t,t),r=e.staleTime;e.staleTime=typeof r==`function`?(...e)=>n(r(...e)):n(r),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},Se=(e,t)=>e.isLoading&&e.isFetching&&!t,Ce=(e,t)=>e?.suspense&&t.isPending,we=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function Te(e,t,n){let r=me(),i=_e(),a=$(n),o=a.defaultQueryOptions(e);a.getDefaultOptions().queries?._experimental_beforeQuery?.(o);let s=a.getQueryCache().get(o.queryHash);o._optimisticResults=r?`isRestoring`:`optimistic`,xe(o),ve(o,i,s),ye(i);let c=!a.getQueryCache().get(o.queryHash),[l]=Z.useState(()=>new t(a,o)),d=l.getOptimisticResult(o),f=!r&&e.subscribed!==!1;if(Z.useSyncExternalStore(Z.useCallback(e=>{let t=f?l.subscribe(L.batchCalls(e)):u;return l.updateResult(),t},[l,f]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),Z.useEffect(()=>{l.setOptions(o)},[o,l]),Ce(o,d))throw we(o,l,i);if(be({result:d,errorResetBoundary:i,throwOnError:o.throwOnError,query:s,suspense:o.suspense}))throw d.error;return a.getDefaultOptions().queries?._experimental_afterQuery?.(o,d),o.experimental_prefetchInRender&&!F.isServer()&&Se(d,r)&&(c?we(o,l,i):s?.promise)?.catch(u).finally(()=>{l.updateResult()}),o.notifyOnChangeProps?d:l.trackResult(d)}function Ee(e,t){return Te(e,ae,t)}function De(e,t){let n=$(t),[r]=Z.useState(()=>new le(n,e));Z.useEffect(()=>{r.setOptions(e)},[r,e]);let i=Z.useSyncExternalStore(Z.useCallback(e=>r.subscribe(L.batchCalls(e)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=Z.useCallback((e,t)=>{r.mutate(e,t).catch(u)},[r]);if(i.error&&N(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}export{a as C,j as S,r as T,_,X as a,b,R as c,k as d,A as f,v as g,y as h,$ as i,L as l,d as m,Ee as n,ce as o,M as p,fe as r,ie as s,De as t,P as u,g as v,i as w,m as x,u as y};\ No newline at end of filediff --git a/semantica/static/assets/rolldown-runtime-B1FJdls4.js b/semantica/static/assets/rolldown-runtime-B1FJdls4.jsdeleted file mode 100644index 222146e8..00000000--- a/semantica/static/assets/rolldown-runtime-B1FJdls4.js+++ /dev/null@@ -1 +0,0 @@-var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,a)=>(a=n==null?{}:e(i(n)),c(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n)),u=(e=>typeof require<`u`?require:typeof Proxy<`u`?new Proxy(e,{get:(e,t)=>(typeof require<`u`?require:e)[t]}):e)(function(e){if(typeof require<`u`)return require.apply(this,arguments);throw Error('Calling `require` for "'+e+"\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.")});export{l as i,s as n,u as r,o as t};\ No newline at end of filediff --git a/semantica/static/assets/shim-CnYKr5zR.js b/semantica/static/assets/shim-CnYKr5zR.jsdeleted file mode 100644index a7ceb484..00000000--- a/semantica/static/assets/shim-CnYKr5zR.js+++ /dev/null@@ -1 +0,0 @@-import{t as e}from"./rolldown-runtime-B1FJdls4.js";import{T as t}from"./query-vendor-Cbp9LWgA.js";var n=e((e=>{var n=t();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=n.useState,o=n.useEffect,s=n.useLayoutEffect,c=n.useDebugValue;function l(e,t){var n=t(),r=a({inst:{value:n,getSnapshot:t}}),i=r[0].inst,l=r[1];return s(function(){i.value=n,i.getSnapshot=t,u(i)&&l({inst:i})},[e,n,t]),o(function(){return u(i)&&l({inst:i}),e(function(){u(i)&&l({inst:i})})},[e]),c(n),n}function u(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(e,n)}catch{return!0}}function d(e,t){return t()}var f=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?d:l;e.useSyncExternalStore=n.useSyncExternalStore===void 0?f:n.useSyncExternalStore})),r=e(((e,t)=>{t.exports=n()}));export{r as t};\ No newline at end of filediff --git a/semantica/static/assets/temporalOverlayPlugin-l3pE8rf_.js b/semantica/static/assets/temporalOverlayPlugin-l3pE8rf_.jsdeleted file mode 100644index 0c8e5d18..00000000--- a/semantica/static/assets/temporalOverlayPlugin-l3pE8rf_.js+++ /dev/null@@ -1 +0,0 @@-import{a as e}from"./query-vendor-Cbp9LWgA.js";var t=e(),n=`temporal-panel`;function r(e){return e?`${e.getFullYear()}/${String(e.getMonth()+1).padStart(2,`0`)}`:`No time selected`}var i={id:`temporal-overlay`,mount:()=>{},unmount:()=>{},onStateChange:()=>{},toolbarItems:e=>[{id:`temporal-toggle`,label:`Temporal`,title:`Toggle temporal context panel`,active:e.isPanelOpen(n),order:40,onClick:()=>e.dispatchAction({type:`togglePanel`,panelId:n})}],renderOverlay:e=>{let n=e.getTemporalState();if(!n?.currentTime)return null;let i=r(n.currentTime);return{id:`temporal-overlay-chip`,layer:1,order:10,element:(0,t.jsxs)(`div`,{style:{position:`absolute`,left:140,bottom:26,display:`inline-flex`,alignItems:`center`,gap:10,padding:`8px 12px`,borderRadius:999,border:`1px solid rgba(127, 208, 255, 0.18)`,background:`linear-gradient(135deg, rgba(6, 15, 27, 0.88), rgba(11, 22, 39, 0.76))`,boxShadow:`0 12px 30px rgba(0, 0, 0, 0.28)`,color:`#dce9f8`,fontSize:11,letterSpacing:`0.05em`,textTransform:`uppercase`,pointerEvents:`none`},children:[(0,t.jsx)(`span`,{style:{color:`#7fc6ff`,fontWeight:700},children:`Temporal`}),(0,t.jsx)(`span`,{children:i}),typeof n.activeNodeCount==`number`?(0,t.jsxs)(`span`,{style:{color:`#8ea4be`},children:[n.activeNodeCount.toLocaleString(),` active`]}):null]})}},renderPanel:e=>{if(!e.isPanelOpen(n))return null;let i=e.getTemporalState();return{id:n,title:`Temporal Context`,placement:`bottom`,order:30,defaultOpen:!1,preferredWidth:320,preferredHeight:220,content:(0,t.jsxs)(`div`,{style:a,children:[(0,t.jsx)(`div`,{style:o,children:`Current scrubber state`}),(0,t.jsxs)(`div`,{style:s,children:[(0,t.jsx)(`span`,{style:c,children:`Current`}),(0,t.jsx)(`span`,{style:l,children:r(i?.currentTime??null)})]}),(0,t.jsxs)(`div`,{style:s,children:[(0,t.jsx)(`span`,{style:c,children:`Bounds`}),(0,t.jsxs)(`span`,{style:l,children:[i?.minDate??`1970`,` → `,i?.maxDate??`2030`]})]}),(0,t.jsxs)(`div`,{style:s,children:[(0,t.jsx)(`span`,{style:c,children:`Active nodes`}),(0,t.jsx)(`span`,{style:l,children:typeof i?.activeNodeCount==`number`?i.activeNodeCount.toLocaleString():`All`})]})]})}}},a={display:`flex`,flexDirection:`column`,gap:10},o={color:`#8ea4be`,fontSize:11,fontWeight:700,letterSpacing:`0.08em`,textTransform:`uppercase`},s={display:`flex`,justifyContent:`space-between`,gap:16,padding:`8px 10px`,borderRadius:12,border:`1px solid rgba(255,255,255,0.06)`,background:`rgba(255,255,255,0.025)`},c={color:`#8ea4be`,fontSize:12},l={color:`#f3f7fd`,fontSize:12,fontWeight:600};export{i as t};\ No newline at end of filediff --git a/semantica/static/assets/temporalOverlayPlugin-tGkpBW1s.js b/semantica/static/assets/temporalOverlayPlugin-tGkpBW1s.jsdeleted file mode 100644index 0680bb6a..00000000--- a/semantica/static/assets/temporalOverlayPlugin-tGkpBW1s.js+++ /dev/null@@ -1 +0,0 @@-import{t as e}from"./temporalOverlayPlugin-l3pE8rf_.js";export{e as temporalOverlayPlugin};\ No newline at end of filediff --git a/semantica/static/assets/timeline-vendor-DxuOyw5t.js b/semantica/static/assets/timeline-vendor-DxuOyw5t.jsdeleted file mode 100644index 2e8ccbe2..00000000--- a/semantica/static/assets/timeline-vendor-DxuOyw5t.js+++ /dev/null@@ -1,32 +0,0 @@-import{r as e}from"./rolldown-runtime-B1FJdls4.js";var t=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{};function n(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}var r={exports:{}},i={},a,o;function s(){if(o)return a;o=1;var e=function(e){return e&&e.Math===Math&&e};return a=e(typeof globalThis==`object`&&globalThis)||e(typeof window==`object`&&window)||e(typeof self==`object`&&self)||e(typeof t==`object`&&t)||e(typeof a==`object`&&a)||(function(){return this})()||Function(`return this`)(),a}var c,l;function u(){return l?c:(l=1,c=function(e){try{return!!e()}catch{return!0}},c)}var d,f;function p(){return f?d:(f=1,d=!u()(function(){var e=(function(){}).bind();return typeof e!=`function`||e.hasOwnProperty(`prototype`)}),d)}var m,h;function g(){if(h)return m;h=1;var e=p(),t=Function.prototype,n=t.apply,r=t.call;return m=typeof Reflect==`object`&&Reflect.apply||(e?r.bind(n):function(){return r.apply(n,arguments)}),m}var _,v;function y(){if(v)return _;v=1;var e=p(),t=Function.prototype,n=t.call,r=e&&t.bind.bind(n,n);return _=e?r:function(e){return function(){return n.apply(e,arguments)}},_}var b,x;function S(){if(x)return b;x=1;var e=y(),t=e({}.toString),n=e(``.slice);return b=function(e){return n(t(e),8,-1)},b}var C,w;function T(){if(w)return C;w=1;var e=S(),t=y();return C=function(n){if(e(n)===`Function`)return t(n)},C}var E,D;function O(){if(D)return E;D=1;var e=typeof document==`object`&&document.all;return E=e===void 0&&e!==void 0?function(t){return typeof t==`function`||t===e}:function(e){return typeof e==`function`},E}var ee={},k,te;function A(){return te?k:(te=1,k=!u()(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),k)}var ne,re;function ie(){if(re)return ne;re=1;var e=p(),t=Function.prototype.call;return ne=e?t.bind(t):function(){return t.apply(t,arguments)},ne}var ae={},oe;function se(){if(oe)return ae;oe=1;var e={}.propertyIsEnumerable,t=Object.getOwnPropertyDescriptor;return ae.f=t&&!e.call({1:2},1)?function(e){var n=t(this,e);return!!n&&n.enumerable}:e,ae}var ce,le;function ue(){return le?ce:(le=1,ce=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}},ce)}var de,fe;function pe(){if(fe)return de;fe=1;var e=y(),t=u(),n=S(),r=Object,i=e(``.split);return de=t(function(){return!r(`z`).propertyIsEnumerable(0)})?function(e){return n(e)===`String`?i(e,``):r(e)}:r,de}var me,he;function ge(){return he?me:(he=1,me=function(e){return e==null},me)}var _e,ve;function ye(){if(ve)return _e;ve=1;var e=ge(),t=TypeError;return _e=function(n){if(e(n))throw new t(`Can't call method on `+n);return n},_e}var be,xe;function Se(){if(xe)return be;xe=1;var e=pe(),t=ye();return be=function(n){return e(t(n))},be}var Ce,we;function Te(){if(we)return Ce;we=1;var e=O();return Ce=function(t){return typeof t==`object`?t!==null:e(t)},Ce}var Ee,De;function Oe(){return De?Ee:(De=1,Ee={},Ee)}var ke,Ae;function je(){if(Ae)return ke;Ae=1;var e=Oe(),t=s(),n=O(),r=function(e){return n(e)?e:void 0};return ke=function(n,i){return arguments.length<2?r(e[n])||r(t[n]):e[n]&&e[n][i]||t[n]&&t[n][i]},ke}var Me,Ne;function Pe(){return Ne?Me:(Ne=1,Me=y()({}.isPrototypeOf),Me)}var Fe,Ie;function Le(){if(Ie)return Fe;Ie=1;var e=s().navigator,t=e&&e.userAgent;return Fe=t?String(t):``,Fe}var Re,ze;function Be(){if(ze)return Re;ze=1;var e=s(),t=Le(),n=e.process,r=e.Deno,i=n&&n.versions||r&&r.version,a=i&&i.v8,o,c;return a&&(o=a.split(`.`),c=o[0]>0&&o[0]<4?1:+(o[0]+o[1])),!c&&t&&(o=t.match(/Edge\/(\d+)/),(!o||o[1]>=74)&&(o=t.match(/Chrome\/(\d+)/),o&&(c=+o[1]))),Re=c,Re}var Ve,He;function Ue(){if(He)return Ve;He=1;var e=Be(),t=u(),n=s().String;return Ve=!!Object.getOwnPropertySymbols&&!t(function(){var t=Symbol(`symbol detection`);return!n(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&e&&e<41}),Ve}var We,Ge;function Ke(){return Ge?We:(Ge=1,We=Ue()&&!Symbol.sham&&typeof Symbol.iterator==`symbol`,We)}var qe,Je;function Ye(){if(Je)return qe;Je=1;var e=je(),t=O(),n=Pe(),r=Ke(),i=Object;return qe=r?function(e){return typeof e==`symbol`}:function(r){var a=e(`Symbol`);return t(a)&&n(a.prototype,i(r))},qe}var Xe,Ze;function Qe(){if(Ze)return Xe;Ze=1;var e=String;return Xe=function(t){try{return e(t)}catch{return`Object`}},Xe}var $e,et;function tt(){if(et)return $e;et=1;var e=O(),t=Qe(),n=TypeError;return $e=function(r){if(e(r))return r;throw new n(t(r)+` is not a function`)},$e}var nt,rt;function it(){if(rt)return nt;rt=1;var e=tt(),t=ge();return nt=function(n,r){var i=n[r];return t(i)?void 0:e(i)},nt}var at,ot;function st(){if(ot)return at;ot=1;var e=ie(),t=O(),n=Te(),r=TypeError;return at=function(i,a){var o,s;if(a===`string`&&t(o=i.toString)&&!n(s=e(o,i))||t(o=i.valueOf)&&!n(s=e(o,i))||a!==`string`&&t(o=i.toString)&&!n(s=e(o,i)))return s;throw new r(`Can't convert object to primitive value`)},at}var ct={exports:{}},lt,ut;function dt(){return ut?lt:(ut=1,lt=!0,lt)}var ft,pt;function mt(){if(pt)return ft;pt=1;var e=s(),t=Object.defineProperty;return ft=function(n,r){try{t(e,n,{value:r,configurable:!0,writable:!0})}catch{e[n]=r}return r},ft}var ht;function gt(){if(ht)return ct.exports;ht=1;var e=dt(),t=s(),n=mt(),r=`__core-js_shared__`,i=ct.exports=t[r]||n(r,{});return(i.versions||=[]).push({version:`3.44.0`,mode:e?`pure`:`global`,copyright:`© 2014-2025 Denis Pushkarev (zloirock.ru)`,license:`https://github.com/zloirock/core-js/blob/v3.44.0/LICENSE`,source:`https://github.com/zloirock/core-js`}),ct.exports}var _t,vt;function yt(){if(vt)return _t;vt=1;var e=gt();return _t=function(t,n){return e[t]||(e[t]=n||{})},_t}var bt,xt;function St(){if(xt)return bt;xt=1;var e=ye(),t=Object;return bt=function(n){return t(e(n))},bt}var Ct,wt;function Tt(){if(wt)return Ct;wt=1;var e=y(),t=St(),n=e({}.hasOwnProperty);return Ct=Object.hasOwn||function(e,r){return n(t(e),r)},Ct}var Et,Dt;function Ot(){if(Dt)return Et;Dt=1;var e=y(),t=0,n=Math.random(),r=e(1.1.toString);return Et=function(e){return`Symbol(`+(e===void 0?``:e)+`)_`+r(++t+n,36)},Et}var kt,At;function jt(){if(At)return kt;At=1;var e=s(),t=yt(),n=Tt(),r=Ot(),i=Ue(),a=Ke(),o=e.Symbol,c=t(`wks`),l=a?o.for||o:o&&o.withoutSetter||r;return kt=function(e){return n(c,e)||(c[e]=i&&n(o,e)?o[e]:l(`Symbol.`+e)),c[e]},kt}var Mt,Nt;function Pt(){if(Nt)return Mt;Nt=1;var e=ie(),t=Te(),n=Ye(),r=it(),i=st(),a=jt(),o=TypeError,s=a(`toPrimitive`);return Mt=function(a,c){if(!t(a)||n(a))return a;var l=r(a,s),u;if(l){if(c===void 0&&(c=`default`),u=e(l,a,c),!t(u)||n(u))return u;throw new o(`Can't convert object to primitive value`)}return c===void 0&&(c=`number`),i(a,c)},Mt}var Ft,It;function Lt(){if(It)return Ft;It=1;var e=Pt(),t=Ye();return Ft=function(n){var r=e(n,`string`);return t(r)?r:r+``},Ft}var Rt,zt;function Bt(){if(zt)return Rt;zt=1;var e=s(),t=Te(),n=e.document,r=t(n)&&t(n.createElement);return Rt=function(e){return r?n.createElement(e):{}},Rt}var Vt,Ht;function Ut(){if(Ht)return Vt;Ht=1;var e=A(),t=u(),n=Bt();return Vt=!e&&!t(function(){return Object.defineProperty(n(`div`),`a`,{get:function(){return 7}}).a!==7}),Vt}var Wt;function Gt(){if(Wt)return ee;Wt=1;var e=A(),t=ie(),n=se(),r=ue(),i=Se(),a=Lt(),o=Tt(),s=Ut(),c=Object.getOwnPropertyDescriptor;return ee.f=e?c:function(e,l){if(e=i(e),l=a(l),s)try{return c(e,l)}catch{}if(o(e,l))return r(!t(n.f,e,l),e[l])},ee}var Kt,qt;function Jt(){if(qt)return Kt;qt=1;var e=u(),t=O(),n=/#|\.prototype\./,r=function(n,r){var c=a[i(n)];return c===s?!0:c===o?!1:t(r)?e(r):!!r},i=r.normalize=function(e){return String(e).replace(n,`.`).toLowerCase()},a=r.data={},o=r.NATIVE=`N`,s=r.POLYFILL=`P`;return Kt=r,Kt}var Yt,Xt;function Zt(){if(Xt)return Yt;Xt=1;var e=T(),t=tt(),n=p(),r=e(e.bind);return Yt=function(e,i){return t(e),i===void 0?e:n?r(e,i):function(){return e.apply(i,arguments)}},Yt}var Qt={},$t,en;function tn(){return en?$t:(en=1,$t=A()&&u()(function(){return Object.defineProperty(function(){},`prototype`,{value:42,writable:!1}).prototype!==42}),$t)}var nn,rn;function an(){if(rn)return nn;rn=1;var e=Te(),t=String,n=TypeError;return nn=function(r){if(e(r))return r;throw new n(t(r)+` is not an object`)},nn}var on;function sn(){if(on)return Qt;on=1;var e=A(),t=Ut(),n=tn(),r=an(),i=Lt(),a=TypeError,o=Object.defineProperty,s=Object.getOwnPropertyDescriptor,c=`enumerable`,l=`configurable`,u=`writable`;return Qt.f=e?n?function(e,t,n){if(r(e),t=i(t),r(n),typeof e==`function`&&t===`prototype`&&`value`in n&&u in n&&!n[u]){var a=s(e,t);a&&a[u]&&(e[t]=n.value,n={configurable:l in n?n[l]:a[l],enumerable:c in n?n[c]:a[c],writable:!1})}return o(e,t,n)}:o:function(e,n,s){if(r(e),n=i(n),r(s),t)try{return o(e,n,s)}catch{}if(`get`in s||`set`in s)throw new a(`Accessors not supported`);return`value`in s&&(e[n]=s.value),e},Qt}var cn,ln;function un(){if(ln)return cn;ln=1;var e=A(),t=sn(),n=ue();return cn=e?function(e,r,i){return t.f(e,r,n(1,i))}:function(e,t,n){return e[t]=n,e},cn}var dn,fn;function j(){if(fn)return dn;fn=1;var e=s(),t=g(),n=T(),r=O(),i=Gt().f,a=Jt(),o=Oe(),c=Zt(),l=un(),u=Tt(),d=function(e){var n=function(r,i,a){if(this instanceof n){switch(arguments.length){case 0:return new e;case 1:return new e(r);case 2:return new e(r,i)}return new e(r,i,a)}return t(e,this,arguments)};return n.prototype=e.prototype,n};return dn=function(t,s){var f=t.target,p=t.global,m=t.stat,h=t.proto,g=p?e:m?e[f]:e[f]&&e[f].prototype,_=p?o:o[f]||l(o,f,{})[f],v=_.prototype,y,b,x,S,C,w,T,E,D;for(S in s)y=a(p?S:f+(m?`.`:`#`)+S,t.forced),b=!y&&g&&u(g,S),w=_[S],b&&(t.dontCallGetSet?(D=i(g,S),T=D&&D.value):T=g[S]),C=b&&T?T:s[S],!(!y&&!h&&typeof w==typeof C)&&(E=t.bind&&b?c(C,e):t.wrap&&b?d(C):h&&r(C)?n(C):C,(t.sham||C&&C.sham||w&&w.sham)&&l(E,`sham`,!0),l(_,S,E),h&&(x=f+`Prototype`,u(o,x)||l(o,x,{}),l(o[x],S,C),t.real&&v&&(y||!v[S])&&l(v,S,C)))},dn}var pn;function mn(){if(pn)return i;pn=1;var e=j(),t=A(),n=sn().f;return e({target:`Object`,stat:!0,forced:Object.defineProperty!==n,sham:!t},{defineProperty:n}),i}var hn;function gn(){if(hn)return r.exports;hn=1,mn();var e=Oe().Object,t=r.exports=function(t,n,r){return e.defineProperty(t,n,r)};return e.defineProperty.sham&&(t.sham=!0),r.exports}var _n,vn;function yn(){return vn?_n:(vn=1,_n=gn(),_n)}var bn,xn;function Sn(){return xn?bn:(xn=1,bn=yn(),bn)}var Cn,wn;function Tn(){return wn?Cn:(wn=1,Cn=Sn(),Cn)}var En,Dn;function On(){return Dn?En:(Dn=1,En=Tn(),En)}var kn=n(On()),An={},jn,Mn;function Nn(){if(Mn)return jn;Mn=1;var e=S();return jn=Array.isArray||function(t){return e(t)===`Array`},jn}var Pn,Fn;function In(){if(Fn)return Pn;Fn=1;var e=Math.ceil,t=Math.floor;return Pn=Math.trunc||function(n){var r=+n;return(r>0?t:e)(r)},Pn}var Ln,Rn;function zn(){if(Rn)return Ln;Rn=1;var e=In();return Ln=function(t){var n=+t;return n!==n||n===0?0:e(n)},Ln}var Bn,Vn;function Hn(){if(Vn)return Bn;Vn=1;var e=zn(),t=Math.min;return Bn=function(n){var r=e(n);return r>0?t(r,9007199254740991):0},Bn}var Un,Wn;function Gn(){if(Wn)return Un;Wn=1;var e=Hn();return Un=function(t){return e(t.length)},Un}var Kn,qn;function Jn(){if(qn)return Kn;qn=1;var e=TypeError,t=9007199254740991;return Kn=function(n){if(n>t)throw e(`Maximum allowed index exceeded`);return n},Kn}var Yn,Xn;function Zn(){if(Xn)return Yn;Xn=1;var e=A(),t=sn(),n=ue();return Yn=function(r,i,a){e?t.f(r,i,n(0,a)):r[i]=a},Yn}var Qn,$n;function er(){if($n)return Qn;$n=1;var e=jt()(`toStringTag`),t={};return t[e]=`z`,Qn=String(t)===`[object z]`,Qn}var tr,nr;function rr(){if(nr)return tr;nr=1;var e=er(),t=O(),n=S(),r=jt()(`toStringTag`),i=Object,a=n(function(){return arguments}())===`Arguments`,o=function(e,t){try{return e[t]}catch{}};return tr=e?n:function(e){var s,c,l;return e===void 0?`Undefined`:e===null?`Null`:typeof(c=o(s=i(e),r))==`string`?c:a?n(s):(l=n(s))===`Object`&&t(s.callee)?`Arguments`:l},tr}var ir,ar;function or(){if(ar)return ir;ar=1;var e=y(),t=O(),n=gt(),r=e(Function.toString);return t(n.inspectSource)||(n.inspectSource=function(e){return r(e)}),ir=n.inspectSource,ir}var sr,cr;function lr(){if(cr)return sr;cr=1;var e=y(),t=u(),n=O(),r=rr(),i=je(),a=or(),o=function(){},s=i(`Reflect`,`construct`),c=/^\s*(?:class|function)\b/,l=e(c.exec),d=!c.test(o),f=function(e){if(!n(e))return!1;try{return s(o,[],e),!0}catch{return!1}},p=function(e){if(!n(e))return!1;switch(r(e)){case`AsyncFunction`:case`GeneratorFunction`:case`AsyncGeneratorFunction`:return!1}try{return d||!!l(c,a(e))}catch{return!0}};return p.sham=!0,sr=!s||t(function(){var e;return f(f.call)||!f(Object)||!f(function(){e=!0})||e})?p:f,sr}var ur,dr;function fr(){if(dr)return ur;dr=1;var e=Nn(),t=lr(),n=Te(),r=jt()(`species`),i=Array;return ur=function(a){var o;return e(a)&&(o=a.constructor,t(o)&&(o===i||e(o.prototype))?o=void 0:n(o)&&(o=o[r],o===null&&(o=void 0))),o===void 0?i:o},ur}var pr,mr;function hr(){if(mr)return pr;mr=1;var e=fr();return pr=function(t,n){return new(e(t))(n===0?0:n)},pr}var gr,_r;function vr(){if(_r)return gr;_r=1;var e=u(),t=jt(),n=Be(),r=t(`species`);return gr=function(t){return n>=51||!e(function(){var e=[],n=e.constructor={};return n[r]=function(){return{foo:1}},e[t](Boolean).foo!==1})},gr}var yr;function br(){if(yr)return An;yr=1;var e=j(),t=u(),n=Nn(),r=Te(),i=St(),a=Gn(),o=Jn(),s=Zn(),c=hr(),l=vr(),d=jt(),f=Be(),p=d(`isConcatSpreadable`),m=f>=51||!t(function(){var e=[];return e[p]=!1,e.concat()[0]!==e}),h=function(e){if(!r(e))return!1;var t=e[p];return t===void 0?n(e):!!t};return e({target:`Array`,proto:!0,arity:1,forced:!m||!l(`concat`)},{concat:function(e){var t=i(this),n=c(t,0),r=0,l,u,d,f,p;for(l=-1,d=arguments.length;l<d;l++)if(p=l===-1?t:arguments[l],h(p))for(f=a(p),o(r+f),u=0;u<f;u++,r++)u in p&&s(n,r,p[u]);else o(r+1),s(n,r++,p);return n.length=r,n}}),An}var xr={},Sr={},Cr,wr;function Tr(){if(wr)return Cr;wr=1;var e=rr(),t=String;return Cr=function(n){if(e(n)===`Symbol`)throw TypeError(`Cannot convert a Symbol value to a string`);return t(n)},Cr}var Er={},Dr,Or;function kr(){if(Or)return Dr;Or=1;var e=zn(),t=Math.max,n=Math.min;return Dr=function(r,i){var a=e(r);return a<0?t(a+i,0):n(a,i)},Dr}var Ar,jr;function Mr(){if(jr)return Ar;jr=1;var e=Se(),t=kr(),n=Gn(),r=function(r){return function(i,a,o){var s=e(i),c=n(s);if(c===0)return!r&&-1;var l=t(o,c),u;if(r&&a!==a){for(;c>l;)if(u=s[l++],u!==u)return!0}else for(;c>l;l++)if((r||l in s)&&s[l]===a)return r||l||0;return!r&&-1}};return Ar={includes:r(!0),indexOf:r(!1)},Ar}var Nr,Pr;function Fr(){return Pr?Nr:(Pr=1,Nr={},Nr)}var Ir,Lr;function Rr(){if(Lr)return Ir;Lr=1;var e=y(),t=Tt(),n=Se(),r=Mr().indexOf,i=Fr(),a=e([].push);return Ir=function(e,o){var s=n(e),c=0,l=[],u;for(u in s)!t(i,u)&&t(s,u)&&a(l,u);for(;o.length>c;)t(s,u=o[c++])&&(~r(l,u)||a(l,u));return l},Ir}var zr,Br;function Vr(){return Br?zr:(Br=1,zr=[`constructor`,`hasOwnProperty`,`isPrototypeOf`,`propertyIsEnumerable`,`toLocaleString`,`toString`,`valueOf`],zr)}var Hr,Ur;function Wr(){if(Ur)return Hr;Ur=1;var e=Rr(),t=Vr();return Hr=Object.keys||function(n){return e(n,t)},Hr}var Gr;function Kr(){if(Gr)return Er;Gr=1;var e=A(),t=tn(),n=sn(),r=an(),i=Se(),a=Wr();return Er.f=e&&!t?Object.defineProperties:function(e,t){r(e);for(var o=i(t),s=a(t),c=s.length,l=0,u;c>l;)n.f(e,u=s[l++],o[u]);return e},Er}var qr,Jr;function Yr(){return Jr?qr:(Jr=1,qr=je()(`document`,`documentElement`),qr)}var Xr,Zr;function Qr(){if(Zr)return Xr;Zr=1;var e=yt(),t=Ot(),n=e(`keys`);return Xr=function(e){return n[e]||(n[e]=t(e))},Xr}var $r,ei;function ti(){if(ei)return $r;ei=1;var e=an(),t=Kr(),n=Vr(),r=Fr(),i=Yr(),a=Bt(),o=Qr(),s=`>`,c=`<`,l=`prototype`,u=`script`,d=o(`IE_PROTO`),f=function(){},p=function(e){return c+u+s+e+c+`/`+u+s},m=function(e){e.write(p(``)),e.close();var t=e.parentWindow.Object;return e=null,t},h=function(){var e=a(`iframe`),t=`java`+u+`:`,n;return e.style.display=`none`,i.appendChild(e),e.src=String(t),n=e.contentWindow.document,n.open(),n.write(p(`document.F=Object`)),n.close(),n.F},g,_=function(){try{g=new ActiveXObject(`htmlfile`)}catch{}_=typeof document<`u`?document.domain&&g?m(g):h():m(g);for(var e=n.length;e--;)delete _[l][n[e]];return _()};return r[d]=!0,$r=Object.create||function(n,r){var i;return n===null?i=_():(f[l]=e(n),i=new f,f[l]=null,i[d]=n),r===void 0?i:t.f(i,r)},$r}var ni={},ri;function ii(){if(ri)return ni;ri=1;var e=Rr(),t=Vr().concat(`length`,`prototype`);return ni.f=Object.getOwnPropertyNames||function(n){return e(n,t)},ni}var ai={},oi,si;function ci(){return si?oi:(si=1,oi=y()([].slice),oi)}var li;function ui(){if(li)return ai;li=1;var e=S(),t=Se(),n=ii().f,r=ci(),i=typeof window==`object`&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],a=function(e){try{return n(e)}catch{return r(i)}};return ai.f=function(r){return i&&e(r)===`Window`?a(r):n(t(r))},ai}var di={},fi;function pi(){return fi?di:(fi=1,di.f=Object.getOwnPropertySymbols,di)}var mi,hi;function gi(){if(hi)return mi;hi=1;var e=un();return mi=function(t,n,r,i){return i&&i.enumerable?t[n]=r:e(t,n,r),t},mi}var _i,vi;function yi(){if(vi)return _i;vi=1;var e=sn();return _i=function(t,n,r){return e.f(t,n,r)},_i}var bi={},xi;function Si(){return xi?bi:(xi=1,bi.f=jt(),bi)}var Ci,wi;function Ti(){if(wi)return Ci;wi=1;var e=Oe(),t=Tt(),n=Si(),r=sn().f;return Ci=function(i){var a=e.Symbol||={};t(a,i)||r(a,i,{value:n.f(i)})},Ci}var Ei,Di;function Oi(){if(Di)return Ei;Di=1;var e=ie(),t=je(),n=jt(),r=gi();return Ei=function(){var i=t(`Symbol`),a=i&&i.prototype,o=a&&a.valueOf,s=n(`toPrimitive`);a&&!a[s]&&r(a,s,function(t){return e(o,this)},{arity:1})},Ei}var ki,Ai;function ji(){if(Ai)return ki;Ai=1;var e=er(),t=rr();return ki=e?{}.toString:function(){return`[object `+t(this)+`]`},ki}var Mi,Ni;function Pi(){if(Ni)return Mi;Ni=1;var e=er(),t=sn().f,n=un(),r=Tt(),i=ji(),a=jt()(`toStringTag`);return Mi=function(o,s,c,l){var u=c?o:o&&o.prototype;u&&(r(u,a)||t(u,a,{configurable:!0,value:s}),l&&!e&&n(u,`toString`,i))},Mi}var Fi,Ii;function Li(){if(Ii)return Fi;Ii=1;var e=s(),t=O(),n=e.WeakMap;return Fi=t(n)&&/native code/.test(String(n)),Fi}var Ri,zi;function Bi(){if(zi)return Ri;zi=1;var e=Li(),t=s(),n=Te(),r=un(),i=Tt(),a=gt(),o=Qr(),c=Fr(),l=`Object already initialized`,u=t.TypeError,d=t.WeakMap,f,p,m,h=function(e){return m(e)?p(e):f(e,{})},g=function(e){return function(t){var r;if(!n(t)||(r=p(t)).type!==e)throw new u(`Incompatible receiver, `+e+` required`);return r}};if(e||a.state){var _=a.state||=new d;_.get=_.get,_.has=_.has,_.set=_.set,f=function(e,t){if(_.has(e))throw new u(l);return t.facade=e,_.set(e,t),t},p=function(e){return _.get(e)||{}},m=function(e){return _.has(e)}}else{var v=o(`state`);c[v]=!0,f=function(e,t){if(i(e,v))throw new u(l);return t.facade=e,r(e,v,t),t},p=function(e){return i(e,v)?e[v]:{}},m=function(e){return i(e,v)}}return Ri={set:f,get:p,has:m,enforce:h,getterFor:g},Ri}var Vi,Hi;function Ui(){if(Hi)return Vi;Hi=1;var e=Zt(),t=y(),n=pe(),r=St(),i=Gn(),a=hr(),o=t([].push),s=function(t){var s=t===1,c=t===2,l=t===3,u=t===4,d=t===6,f=t===7,p=t===5||d;return function(m,h,g,_){for(var v=r(m),y=n(v),b=i(y),x=e(h,g),S=0,C=_||a,w=s?C(m,b):c||f?C(m,0):void 0,T,E;b>S;S++)if((p||S in y)&&(T=y[S],E=x(T,S,v),t))if(s)w[S]=E;else if(E)switch(t){case 3:return!0;case 5:return T;case 6:return S;case 2:o(w,T)}else switch(t){case 4:return!1;case 7:o(w,T)}return d?-1:l||u?u:w}};return Vi={forEach:s(0),map:s(1),filter:s(2),some:s(3),every:s(4),find:s(5),findIndex:s(6),filterReject:s(7)},Vi}var Wi;function Gi(){if(Wi)return Sr;Wi=1;var e=j(),t=s(),n=ie(),r=y(),i=dt(),a=A(),o=Ue(),c=u(),l=Tt(),d=Pe(),f=an(),p=Se(),m=Lt(),h=Tr(),g=ue(),_=ti(),v=Wr(),b=ii(),x=ui(),S=pi(),C=Gt(),w=sn(),T=Kr(),E=se(),D=gi(),O=yi(),ee=yt(),k=Qr(),te=Fr(),ne=Ot(),re=jt(),ae=Si(),oe=Ti(),ce=Oi(),le=Pi(),de=Bi(),fe=Ui().forEach,pe=k(`hidden`),me=`Symbol`,he=`prototype`,ge=de.set,_e=de.getterFor(me),ve=Object[he],ye=t.Symbol,be=ye&&ye[he],xe=t.RangeError,Ce=t.TypeError,we=t.QObject,Te=C.f,Ee=w.f,De=x.f,Oe=E.f,ke=r([].push),Ae=ee(`symbols`),je=ee(`op-symbols`),Me=ee(`wks`),Ne=!we||!we[he]||!we[he].findChild,Fe=function(e,t,n){var r=Te(ve,t);r&&delete ve[t],Ee(e,t,n),r&&e!==ve&&Ee(ve,t,r)},Ie=a&&c(function(){return _(Ee({},`a`,{get:function(){return Ee(this,`a`,{value:7}).a}})).a!==7})?Fe:Ee,Le=function(e,t){var n=Ae[e]=_(be);return ge(n,{type:me,tag:e,description:t}),a||(n.description=t),n},Re=function(e,t,n){e===ve&&Re(je,t,n),f(e);var r=m(t);return f(n),l(Ae,r)?(n.enumerable?(l(e,pe)&&e[pe][r]&&(e[pe][r]=!1),n=_(n,{enumerable:g(0,!1)})):(l(e,pe)||Ee(e,pe,g(1,_(null))),e[pe][r]=!0),Ie(e,r,n)):Ee(e,r,n)},ze=function(e,t){f(e);var r=p(t);return fe(v(r).concat(Ge(r)),function(t){(!a||n(Ve,r,t))&&Re(e,t,r[t])}),e},Be=function(e,t){return t===void 0?_(e):ze(_(e),t)},Ve=function(e){var t=m(e),r=n(Oe,this,t);return this===ve&&l(Ae,t)&&!l(je,t)?!1:r||!l(this,t)||!l(Ae,t)||l(this,pe)&&this[pe][t]?r:!0},He=function(e,t){var n=p(e),r=m(t);if(!(n===ve&&l(Ae,r)&&!l(je,r))){var i=Te(n,r);return i&&l(Ae,r)&&!(l(n,pe)&&n[pe][r])&&(i.enumerable=!0),i}},We=function(e){var t=De(p(e)),n=[];return fe(t,function(e){!l(Ae,e)&&!l(te,e)&&ke(n,e)}),n},Ge=function(e){var t=e===ve,n=De(t?je:p(e)),r=[];return fe(n,function(e){l(Ae,e)&&(!t||l(ve,e))&&ke(r,Ae[e])}),r};return o||(ye=function(){if(d(be,this))throw new Ce(`Symbol is not a constructor`);var e=!arguments.length||arguments[0]===void 0?void 0:h(arguments[0]),r=ne(e),i=function(e){var a=this===void 0?t:this;a===ve&&n(i,je,e),l(a,pe)&&l(a[pe],r)&&(a[pe][r]=!1);var o=g(1,e);try{Ie(a,r,o)}catch(e){if(!(e instanceof xe))throw e;Fe(a,r,o)}};return a&&Ne&&Ie(ve,r,{configurable:!0,set:i}),Le(r,e)},be=ye[he],D(be,`toString`,function(){return _e(this).tag}),D(ye,`withoutSetter`,function(e){return Le(ne(e),e)}),E.f=Ve,w.f=Re,T.f=ze,C.f=He,b.f=x.f=We,S.f=Ge,ae.f=function(e){return Le(re(e),e)},a&&(O(be,`description`,{configurable:!0,get:function(){return _e(this).description}}),i||D(ve,`propertyIsEnumerable`,Ve,{unsafe:!0}))),e({global:!0,constructor:!0,wrap:!0,forced:!o,sham:!o},{Symbol:ye}),fe(v(Me),function(e){oe(e)}),e({target:me,stat:!0,forced:!o},{useSetter:function(){Ne=!0},useSimple:function(){Ne=!1}}),e({target:`Object`,stat:!0,forced:!o,sham:!a},{create:Be,defineProperty:Re,defineProperties:ze,getOwnPropertyDescriptor:He}),e({target:`Object`,stat:!0,forced:!o},{getOwnPropertyNames:We}),ce(),le(ye,me),te[pe]=!0,Sr}var Ki={},qi,Ji;function Yi(){return Ji?qi:(Ji=1,qi=Ue()&&!!Symbol.for&&!!Symbol.keyFor,qi)}var Xi;function Zi(){if(Xi)return Ki;Xi=1;var e=j(),t=je(),n=Tt(),r=Tr(),i=yt(),a=Yi(),o=i(`string-to-symbol-registry`),s=i(`symbol-to-string-registry`);return e({target:`Symbol`,stat:!0,forced:!a},{for:function(e){var i=r(e);if(n(o,i))return o[i];var a=t(`Symbol`)(i);return o[i]=a,s[a]=i,a}}),Ki}var Qi={},$i;function ea(){if($i)return Qi;$i=1;var e=j(),t=Tt(),n=Ye(),r=Qe(),i=yt(),a=Yi(),o=i(`symbol-to-string-registry`);return e({target:`Symbol`,stat:!0,forced:!a},{keyFor:function(e){if(!n(e))throw TypeError(r(e)+` is not a symbol`);if(t(o,e))return o[e]}}),Qi}var ta={},na,ra;function ia(){if(ra)return na;ra=1;var e=y(),t=Nn(),n=O(),r=S(),i=Tr(),a=e([].push);return na=function(e){if(n(e))return e;if(t(e)){for(var o=e.length,s=[],c=0;c<o;c++){var l=e[c];typeof l==`string`?a(s,l):(typeof l==`number`||r(l)===`Number`||r(l)===`String`)&&a(s,i(l))}var u=s.length,d=!0;return function(e,n){if(d)return d=!1,n;if(t(this))return n;for(var r=0;r<u;r++)if(s[r]===e)return n}}},na}var aa;function oa(){if(aa)return ta;aa=1;var e=j(),t=je(),n=g(),r=ie(),i=y(),a=u(),o=O(),s=Ye(),c=ci(),l=ia(),d=Ue(),f=String,p=t(`JSON`,`stringify`),m=i(/./.exec),h=i(``.charAt),_=i(``.charCodeAt),v=i(``.replace),b=i(1.1.toString),x=/[\uD800-\uDFFF]/g,S=/^[\uD800-\uDBFF]$/,C=/^[\uDC00-\uDFFF]$/,w=!d||a(function(){var e=t(`Symbol`)(`stringify detection`);return p([e])!==`[null]`||p({a:e})!==`{}`||p(Object(e))!==`{}`}),T=a(function(){return p(`\udf06\ud834`)!==`"\\udf06\\ud834"`||p(`\udead`)!==`"\\udead"`}),E=function(e,t){var i=c(arguments),a=l(t);if(!(!o(a)&&(e===void 0||s(e))))return i[1]=function(e,t){if(o(a)&&(t=r(a,this,f(e),t)),!s(t))return t},n(p,null,i)},D=function(e,t,n){var r=h(n,t-1),i=h(n,t+1);return m(S,e)&&!m(C,i)||m(C,e)&&!m(S,r)?`\\u`+b(_(e,0),16):e};return p&&e({target:`JSON`,stat:!0,arity:3,forced:w||T},{stringify:function(e,t,r){var i=c(arguments),a=n(w?E:p,null,i);return T&&typeof a==`string`?v(a,x,D):a}}),ta}var sa={},ca;function la(){if(ca)return sa;ca=1;var e=j(),t=Ue(),n=u(),r=pi(),i=St();return e({target:`Object`,stat:!0,forced:!t||n(function(){r.f(1)})},{getOwnPropertySymbols:function(e){var t=r.f;return t?t(i(e)):[]}}),sa}var ua;function da(){return ua?xr:(ua=1,Gi(),Zi(),ea(),oa(),la(),xr)}var fa={},pa;function ma(){return pa?fa:(pa=1,Ti()(`asyncDispose`),fa)}var ha={},ga;function _a(){return ga?ha:(ga=1,Ti()(`asyncIterator`),ha)}var va={},ya;function ba(){return ya?va:(ya=1,Ti()(`dispose`),va)}var xa={},Sa;function Ca(){return Sa?xa:(Sa=1,Ti()(`hasInstance`),xa)}var wa={},Ta;function Ea(){return Ta?wa:(Ta=1,Ti()(`isConcatSpreadable`),wa)}var Da={},Oa;function ka(){return Oa?Da:(Oa=1,Ti()(`iterator`),Da)}var Aa={},ja;function Ma(){return ja?Aa:(ja=1,Ti()(`match`),Aa)}var Na={},Pa;function Fa(){return Pa?Na:(Pa=1,Ti()(`matchAll`),Na)}var Ia={},La;function Ra(){return La?Ia:(La=1,Ti()(`replace`),Ia)}var za={},Ba;function Va(){return Ba?za:(Ba=1,Ti()(`search`),za)}var Ha={},Ua;function Wa(){return Ua?Ha:(Ua=1,Ti()(`species`),Ha)}var Ga={},Ka;function qa(){return Ka?Ga:(Ka=1,Ti()(`split`),Ga)}var Ja={},Ya;function Xa(){if(Ya)return Ja;Ya=1;var e=Ti(),t=Oi();return e(`toPrimitive`),t(),Ja}var Za={},Qa;function $a(){if(Qa)return Za;Qa=1;var e=je(),t=Ti(),n=Pi();return t(`toStringTag`),n(e(`Symbol`),`Symbol`),Za}var eo={},to;function no(){return to?eo:(to=1,Ti()(`unscopables`),eo)}var ro={},io;function ao(){return io?ro:(io=1,Pi()(s().JSON,`JSON`,!0),ro)}var oo,so;function co(){return so?oo:(so=1,br(),da(),ma(),_a(),ba(),Ca(),Ea(),ka(),Ma(),Fa(),Ra(),Va(),Wa(),qa(),Xa(),$a(),no(),ao(),oo=Oe().Symbol,oo)}var lo={},uo,fo;function po(){return fo?uo:(fo=1,uo=function(){},uo)}var mo,ho;function go(){return ho?mo:(ho=1,mo={},mo)}var _o,vo;function yo(){if(vo)return _o;vo=1;var e=A(),t=Tt(),n=Function.prototype,r=e&&Object.getOwnPropertyDescriptor,i=t(n,`name`);return _o={EXISTS:i,PROPER:i&&(function(){}).name===`something`,CONFIGURABLE:i&&(!e||e&&r(n,`name`).configurable)},_o}var bo,xo;function So(){return xo?bo:(xo=1,bo=!u()(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),bo)}var Co,wo;function To(){if(wo)return Co;wo=1;var e=Tt(),t=O(),n=St(),r=Qr(),i=So(),a=r(`IE_PROTO`),o=Object,s=o.prototype;return Co=i?o.getPrototypeOf:function(r){var i=n(r);if(e(i,a))return i[a];var c=i.constructor;return t(c)&&i instanceof c?c.prototype:i instanceof o?s:null},Co}var Eo,Do;function Oo(){if(Do)return Eo;Do=1;var e=u(),t=O(),n=Te(),r=ti(),i=To(),a=gi(),o=jt(),s=dt(),c=o(`iterator`),l=!1,d,f,p;return[].keys&&(p=[].keys(),`next`in p?(f=i(i(p)),f!==Object.prototype&&(d=f)):l=!0),!n(d)||e(function(){var e={};return d[c].call(e)!==e})?d={}:s&&(d=r(d)),t(d[c])||a(d,c,function(){return this}),Eo={IteratorPrototype:d,BUGGY_SAFARI_ITERATORS:l},Eo}var ko,Ao;function jo(){if(Ao)return ko;Ao=1;var e=Oo().IteratorPrototype,t=ti(),n=ue(),r=Pi(),i=go(),a=function(){return this};return ko=function(o,s,c,l){var u=s+` Iterator`;return o.prototype=t(e,{next:n(+!l,c)}),r(o,u,!1,!0),i[u]=a,o},ko}var Mo,No;function Po(){if(No)return Mo;No=1;var e=y(),t=tt();return Mo=function(n,r,i){try{return e(t(Object.getOwnPropertyDescriptor(n,r)[i]))}catch{}},Mo}var Fo,Io;function Lo(){if(Io)return Fo;Io=1;var e=Te();return Fo=function(t){return e(t)||t===null},Fo}var Ro,zo;function Bo(){if(zo)return Ro;zo=1;var e=Lo(),t=String,n=TypeError;return Ro=function(r){if(e(r))return r;throw new n(`Can't set `+t(r)+` as a prototype`)},Ro}var Vo,Ho;function Uo(){if(Ho)return Vo;Ho=1;var e=Po(),t=Te(),n=ye(),r=Bo();return Vo=Object.setPrototypeOf||(`__proto__`in{}?function(){var i=!1,a={},o;try{o=e(Object.prototype,`__proto__`,`set`),o(a,[]),i=a instanceof Array}catch{}return function(e,a){return n(e),r(a),t(e)&&(i?o(e,a):e.__proto__=a),e}}():void 0),Vo}var Wo,Go;function Ko(){if(Go)return Wo;Go=1;var e=j(),t=ie(),n=dt(),r=yo(),i=O(),a=jo(),o=To(),s=Uo(),c=Pi(),l=un(),u=gi(),d=jt(),f=go(),p=Oo(),m=r.PROPER,h=r.CONFIGURABLE,g=p.IteratorPrototype,_=p.BUGGY_SAFARI_ITERATORS,v=d(`iterator`),y=`keys`,b=`values`,x=`entries`,S=function(){return this};return Wo=function(r,d,p,C,w,T,E){a(p,d,C);var D=function(e){if(e===w&&A)return A;if(!_&&e&&e in k)return k[e];switch(e){case y:return function(){return new p(this,e)};case b:return function(){return new p(this,e)};case x:return function(){return new p(this,e)}}return function(){return new p(this)}},O=d+` Iterator`,ee=!1,k=r.prototype,te=k[v]||k[`@@iterator`]||w&&k[w],A=!_&&te||D(w),ne=d===`Array`&&k.entries||te,re,ie,ae;if(ne&&(re=o(ne.call(new r)),re!==Object.prototype&&re.next&&(!n&&o(re)!==g&&(s?s(re,g):i(re[v])||u(re,v,S)),c(re,O,!0,!0),n&&(f[O]=S))),m&&w===b&&te&&te.name!==b&&(!n&&h?l(k,`name`,b):(ee=!0,A=function(){return t(te,this)})),w)if(ie={values:D(b),keys:T?A:D(y),entries:D(x)},E)for(ae in ie)(_||ee||!(ae in k))&&u(k,ae,ie[ae]);else e({target:d,proto:!0,forced:_||ee},ie);return(!n||E)&&k[v]!==A&&u(k,v,A,{name:w}),f[d]=A,ie},Wo}var qo,Jo;function Yo(){return Jo?qo:(Jo=1,qo=function(e,t){return{value:e,done:t}},qo)}var Xo,Zo;function Qo(){if(Zo)return Xo;Zo=1;var e=Se(),t=po(),n=go(),r=Bi(),i=sn().f,a=Ko(),o=Yo(),s=dt(),c=A(),l=`Array Iterator`,u=r.set,d=r.getterFor(l);Xo=a(Array,`Array`,function(t,n){u(this,{type:l,target:e(t),index:0,kind:n})},function(){var e=d(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=null,o(void 0,!0);switch(e.kind){case`keys`:return o(n,!1);case`values`:return o(t[n],!1)}return o([n,t[n]],!1)},`values`);var f=n.Arguments=n.Array;if(t(`keys`),t(`values`),t(`entries`),!s&&c&&f.name!==`values`)try{i(f,`name`,{value:`values`})}catch{}return Xo}var $o,es;function ts(){return es?$o:(es=1,$o={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},$o)}var ns;function rs(){if(ns)return lo;ns=1,Qo();var e=ts(),t=s(),n=Pi(),r=go();for(var i in e)n(t[i],i),r[i]=r.Array;return lo}var is,as;function os(){if(as)return is;as=1;var e=co();return rs(),is=e,is}var ss={},cs;function ls(){if(cs)return ss;cs=1;var e=jt(),t=sn().f,n=e(`metadata`),r=Function.prototype;return r[n]===void 0&&t(r,n,{value:null}),ss}var us={},ds;function fs(){return ds?us:(ds=1,ma(),us)}var ps={},ms;function hs(){return ms?ps:(ms=1,ba(),ps)}var gs={},_s;function vs(){return _s?gs:(_s=1,Ti()(`metadata`),gs)}var ys,bs;function xs(){if(bs)return ys;bs=1;var e=os();return ls(),fs(),hs(),vs(),ys=e,ys}var Ss={},Cs,ws;function Ts(){if(ws)return Cs;ws=1;var e=je(),t=y(),n=e(`Symbol`),r=n.keyFor,i=t(n.prototype.valueOf);return Cs=n.isRegisteredSymbol||function(e){try{return r(i(e))!==void 0}catch{return!1}},Cs}var Es;function Ds(){return Es?Ss:(Es=1,j()({target:`Symbol`,stat:!0},{isRegisteredSymbol:Ts()}),Ss)}var Os={},ks,As;function js(){if(As)return ks;As=1;for(var e=yt(),t=je(),n=y(),r=Ye(),i=jt(),a=t(`Symbol`),o=a.isWellKnownSymbol,s=t(`Object`,`getOwnPropertyNames`),c=n(a.prototype.valueOf),l=e(`wks`),u=0,d=s(a),f=d.length;u<f;u++)try{var p=d[u];r(a[p])&&i(p)}catch{}return ks=function(e){if(o&&o(e))return!0;try{for(var t=c(e),n=0,r=s(l),i=r.length;n<i;n++)if(l[r[n]]==t)return!0}catch{}return!1},ks}var Ms;function Ns(){return Ms?Os:(Ms=1,j()({target:`Symbol`,stat:!0,forced:!0},{isWellKnownSymbol:js()}),Os)}var Ps={},Fs;function Is(){return Fs?Ps:(Fs=1,Ti()(`customMatcher`),Ps)}var Ls={},Rs;function zs(){return Rs?Ls:(Rs=1,Ti()(`observable`),Ls)}var Bs={},Vs;function Hs(){return Vs?Bs:(Vs=1,j()({target:`Symbol`,stat:!0,name:`isRegisteredSymbol`},{isRegistered:Ts()}),Bs)}var Us={},Ws;function Gs(){return Ws?Us:(Ws=1,j()({target:`Symbol`,stat:!0,name:`isWellKnownSymbol`,forced:!0},{isWellKnown:js()}),Us)}var Ks={},qs;function Js(){return qs?Ks:(qs=1,Ti()(`matcher`),Ks)}var Ys={},Xs;function Zs(){return Xs?Ys:(Xs=1,Ti()(`metadataKey`),Ys)}var Qs={},$s;function ec(){return $s?Qs:($s=1,Ti()(`patternMatch`),Qs)}var tc={},nc;function rc(){return nc?tc:(nc=1,Ti()(`replaceAll`),tc)}var ic,ac;function oc(){if(ac)return ic;ac=1;var e=xs();return Ds(),Ns(),Is(),zs(),Hs(),Gs(),Js(),Zs(),ec(),rc(),ic=e,ic}var sc,cc;function lc(){return cc?sc:(cc=1,sc=oc(),sc)}var uc=n(lc()),dc={},fc,pc;function mc(){if(pc)return fc;pc=1;var e=y(),t=zn(),n=Tr(),r=ye(),i=e(``.charAt),a=e(``.charCodeAt),o=e(``.slice),s=function(e){return function(s,c){var l=n(r(s)),u=t(c),d=l.length,f,p;return u<0||u>=d?e?``:void 0:(f=a(l,u),f<55296||f>56319||u+1===d||(p=a(l,u+1))<56320||p>57343?e?i(l,u):f:e?o(l,u,u+2):(f-55296<<10)+(p-56320)+65536)}};return fc={codeAt:s(!1),charAt:s(!0)},fc}var hc;function gc(){if(hc)return dc;hc=1;var e=mc().charAt,t=Tr(),n=Bi(),r=Ko(),i=Yo(),a=`String Iterator`,o=n.set,s=n.getterFor(a);return r(String,`String`,function(e){o(this,{type:a,string:t(e),index:0})},function(){var t=s(this),n=t.string,r=t.index,a;return r>=n.length?i(void 0,!0):(a=e(n,r),t.index+=a.length,i(a,!1))}),dc}var _c,vc;function yc(){return vc?_c:(vc=1,Qo(),gc(),ka(),_c=Si().f(`iterator`),_c)}var bc,xc;function Sc(){if(xc)return bc;xc=1;var e=yc();return rs(),bc=e,bc}var Cc,wc;function Tc(){return wc?Cc:(wc=1,Cc=Sc(),Cc)}var Ec,Dc;function Oc(){return Dc?Ec:(Dc=1,Ec=Tc(),Ec)}var kc,Ac;function jc(){return Ac?kc:(Ac=1,kc=Oc(),kc)}var Mc=n(jc());function Nc(e){"@babel/helpers - typeof";return Nc=typeof uc==`function`&&typeof Mc==`symbol`?function(e){return typeof e}:function(e){return e&&typeof uc==`function`&&e.constructor===uc&&e!==uc.prototype?`symbol`:typeof e},Nc(e)}var Pc,Fc;function Ic(){return Fc?Pc:(Fc=1,Xa(),Pc=Si().f(`toPrimitive`),Pc)}var Lc,Rc;function zc(){return Rc?Lc:(Rc=1,Lc=Ic(),Lc)}var Bc,Vc;function Hc(){return Vc?Bc:(Vc=1,Bc=zc(),Bc)}var Uc,Wc;function Gc(){return Wc?Uc:(Wc=1,Uc=Hc(),Uc)}var Kc,qc;function Jc(){return qc?Kc:(qc=1,Kc=Gc(),Kc)}var Yc=n(Jc());function Xc(e,t){if(Nc(e)!=`object`||!e)return e;var n=e[Yc];if(n!==void 0){var r=n.call(e,t);if(Nc(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Zc(e){var t=Xc(e,`string`);return Nc(t)==`symbol`?t:t+``}function Qc(e,t,n){return(t=Zc(t))in e?kn(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var $c={},el,tl;function nl(){if(tl)return el;tl=1;var e=y(),t=tt(),n=Te(),r=Tt(),i=ci(),a=p(),o=Function,s=e([].concat),c=e([].join),l={},u=function(e,t,n){if(!r(l,t)){for(var i=[],a=0;a<t;a++)i[a]=`a[`+a+`]`;l[t]=o(`C,a`,`return new C(`+c(i,`,`)+`)`)}return l[t](e,n)};return el=a?o.bind:function(e){var r=t(this),a=r.prototype,o=i(arguments,1),c=function(){var t=s(o,i(arguments));return this instanceof c?u(r,t.length,t):r.apply(e,t)};return n(a)&&(c.prototype=a),c},el}var rl;function il(){if(rl)return $c;rl=1;var e=j(),t=nl();return e({target:`Function`,proto:!0,forced:Function.bind!==t},{bind:t}),$c}var al,ol;function sl(){if(ol)return al;ol=1;var e=s(),t=Oe();return al=function(n,r){var i=t[n+`Prototype`],a=i&&i[r];if(a)return a;var o=e[n],s=o&&o.prototype;return s&&s[r]},al}var cl,ll;function ul(){return ll?cl:(ll=1,il(),cl=sl()(`Function`,`bind`),cl)}var dl,fl;function pl(){if(fl)return dl;fl=1;var e=Pe(),t=ul(),n=Function.prototype;return dl=function(r){var i=r.bind;return r===n||e(n,r)&&i===n.bind?t:i},dl}var ml,hl;function gl(){return hl?ml:(hl=1,ml=pl(),ml)}var _l,vl;function yl(){return vl?_l:(vl=1,_l=gl(),_l)}var bl=n(yl()),xl={},Sl,Cl;function wl(){if(Cl)return Sl;Cl=1;var e=tt(),t=St(),n=pe(),r=Gn(),i=TypeError,a=`Reduce of empty array with no initial value`,o=function(o){return function(s,c,l,u){var d=t(s),f=n(d),p=r(d);if(e(c),p===0&&l<2)throw new i(a);var m=o?p-1:0,h=o?-1:1;if(l<2)for(;;){if(m in f){u=f[m],m+=h;break}if(m+=h,o?m<0:p<=m)throw new i(a)}for(;o?m>=0:p>m;m+=h)m in f&&(u=c(u,f[m],m,d));return u}};return Sl={left:o(!1),right:o(!0)},Sl}var Tl,El;function Dl(){if(El)return Tl;El=1;var e=u();return Tl=function(t,n){var r=[][t];return!!r&&e(function(){r.call(null,n||function(){return 1},1)})},Tl}var Ol,kl;function Al(){if(kl)return Ol;kl=1;var e=s(),t=Le(),n=S(),r=function(e){return t.slice(0,e.length)===e};return Ol=(function(){return r(`Bun/`)?`BUN`:r(`Cloudflare-Workers`)?`CLOUDFLARE`:r(`Deno/`)?`DENO`:r(`Node.js/`)?`NODE`:e.Bun&&typeof Bun.version==`string`?`BUN`:e.Deno&&typeof Deno.version==`object`?`DENO`:n(e.process)===`process`?`NODE`:e.window&&e.document?`BROWSER`:`REST`})(),Ol}var jl,Ml;function Nl(){return Ml?jl:(Ml=1,jl=Al()===`NODE`,jl)}var Pl;function Fl(){if(Pl)return xl;Pl=1;var e=j(),t=wl().left,n=Dl(),r=Be();return e({target:`Array`,proto:!0,forced:!Nl()&&r>79&&r<83||!n(`reduce`)},{reduce:function(e){var n=arguments.length;return t(this,e,n,n>1?arguments[1]:void 0)}}),xl}var Il,Ll;function Rl(){return Ll?Il:(Ll=1,Fl(),Il=sl()(`Array`,`reduce`),Il)}var zl,Bl;function Vl(){if(Bl)return zl;Bl=1;var e=Pe(),t=Rl(),n=Array.prototype;return zl=function(r){var i=r.reduce;return r===n||e(n,r)&&i===n.reduce?t:i},zl}var Hl,Ul;function Wl(){return Ul?Hl:(Ul=1,Hl=Vl(),Hl)}var Gl,Kl;function ql(){return Kl?Gl:(Kl=1,Gl=Wl(),Gl)}var Jl=n(ql()),Yl={},Xl;function Zl(){if(Xl)return Yl;Xl=1;var e=j(),t=Ui().filter;return e({target:`Array`,proto:!0,forced:!vr()(`filter`)},{filter:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}}),Yl}var Ql,$l;function eu(){return $l?Ql:($l=1,Zl(),Ql=sl()(`Array`,`filter`),Ql)}var tu,nu;function ru(){if(nu)return tu;nu=1;var e=Pe(),t=eu(),n=Array.prototype;return tu=function(r){var i=r.filter;return r===n||e(n,r)&&i===n.filter?t:i},tu}var iu,au;function ou(){return au?iu:(au=1,iu=ru(),iu)}var su,cu;function lu(){return cu?su:(cu=1,su=ou(),su)}var uu=n(lu()),du={},fu;function pu(){if(fu)return du;fu=1;var e=j(),t=Ui().map;return e({target:`Array`,proto:!0,forced:!vr()(`map`)},{map:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}}),du}var mu,hu;function gu(){return hu?mu:(hu=1,pu(),mu=sl()(`Array`,`map`),mu)}var _u,vu;function yu(){if(vu)return _u;vu=1;var e=Pe(),t=gu(),n=Array.prototype;return _u=function(r){var i=r.map;return r===n||e(n,r)&&i===n.map?t:i},_u}var bu,xu;function Su(){return xu?bu:(xu=1,bu=yu(),bu)}var Cu,wu;function Tu(){return wu?Cu:(wu=1,Cu=Su(),Cu)}var Eu=n(Tu()),Du={},Ou,ku;function Au(){if(ku)return Ou;ku=1;var e=Nn(),t=Gn(),n=Jn(),r=Zt(),i=function(a,o,s,c,l,u,d,f){for(var p=l,m=0,h=d?r(d,f):!1,g,_;m<c;)m in s&&(g=h?h(s[m],m,o):s[m],u>0&&e(g)?(_=t(g),p=i(a,o,g,_,p,u-1)-1):(n(p+1),a[p]=g),p++),m++;return p};return Ou=i,Ou}var ju;function Mu(){if(ju)return Du;ju=1;var e=j(),t=Au(),n=tt(),r=St(),i=Gn(),a=hr();return e({target:`Array`,proto:!0},{flatMap:function(e){var o=r(this),s=i(o),c;return n(e),c=a(o,0),c.length=t(c,o,o,s,0,1,e,arguments.length>1?arguments[1]:void 0),c}}),Du}var Nu={},Pu;function Fu(){return Pu?Nu:(Pu=1,po()(`flatMap`),Nu)}var Iu,Lu;function Ru(){return Lu?Iu:(Lu=1,Mu(),Fu(),Iu=sl()(`Array`,`flatMap`),Iu)}var zu,Bu;function Vu(){if(Bu)return zu;Bu=1;var e=Pe(),t=Ru(),n=Array.prototype;return zu=function(r){var i=r.flatMap;return r===n||e(n,r)&&i===n.flatMap?t:i},zu}var Hu,Uu;function Wu(){return Uu?Hu:(Uu=1,Hu=Vu(),Hu)}var Gu,Ku;function qu(){return Ku?Gu:(Ku=1,Gu=Wu(),Gu)}var Ju=n(qu());function Yu(e){return new Zu(e)}var Xu=class{constructor(e,t,n){var r,i,a;Qc(this,`_listeners`,{add:bl(r=this._add).call(r,this),remove:bl(i=this._remove).call(i,this),update:bl(a=this._update).call(a,this)}),this._source=e,this._transformers=t,this._target=n}all(){return this._target.update(this._transformItems(this._source.get())),this}start(){return this._source.on(`add`,this._listeners.add),this._source.on(`remove`,this._listeners.remove),this._source.on(`update`,this._listeners.update),this}stop(){return this._source.off(`add`,this._listeners.add),this._source.off(`remove`,this._listeners.remove),this._source.off(`update`,this._listeners.update),this}_transformItems(e){var t;return Jl(t=this._transformers).call(t,(e,t)=>t(e),e)}_add(e,t){t!=null&&this._target.add(this._transformItems(this._source.get(t.items)))}_update(e,t){t!=null&&this._target.update(this._transformItems(this._source.get(t.items)))}_remove(e,t){t!=null&&this._target.remove(this._transformItems(t.oldData))}},Zu=class{constructor(e){Qc(this,`_transformers`,[]),this._source=e}filter(e){return this._transformers.push(t=>uu(t).call(t,e)),this}map(e){return this._transformers.push(t=>Eu(t).call(t,e)),this}flatMap(e){return this._transformers.push(t=>Ju(t).call(t,e)),this}to(e){return new Xu(this._source,this._transformers,e)}},Qu,$u;function ed(){return $u?Qu:($u=1,Qu=os(),Qu)}var td=n(ed()),nd={},rd;function id(){if(rd)return nd;rd=1;var e=j(),t=Nn(),n=lr(),r=Te(),i=kr(),a=Gn(),o=Se(),s=Zn(),c=jt(),l=vr(),u=ci(),d=l(`slice`),f=c(`species`),p=Array,m=Math.max;return e({target:`Array`,proto:!0,forced:!d},{slice:function(e,c){var l=o(this),d=a(l),h=i(e,d),g=i(c===void 0?d:c,d),_,v,y;if(t(l)&&(_=l.constructor,n(_)&&(_===p||t(_.prototype))?_=void 0:r(_)&&(_=_[f],_===null&&(_=void 0)),_===p||_===void 0))return u(l,h,g);for(v=new(_===void 0?p:_)(m(g-h,0)),y=0;h<g;h++,y++)h in l&&s(v,y,l[h]);return v.length=y,v}}),nd}var ad,od;function sd(){return od?ad:(od=1,id(),ad=sl()(`Array`,`slice`),ad)}var cd,ld;function ud(){if(ld)return cd;ld=1;var e=Pe(),t=sd(),n=Array.prototype;return cd=function(r){var i=r.slice;return r===n||e(n,r)&&i===n.slice?t:i},cd}var dd,fd;function pd(){return fd?dd:(fd=1,dd=ud(),dd)}var md,hd;function gd(){return hd?md:(hd=1,md=pd(),md)}var _d=n(gd()),vd={},yd,bd;function xd(){if(bd)return yd;bd=1;var e=je(),t=y(),n=ii(),r=pi(),i=an(),a=t([].concat);return yd=e(`Reflect`,`ownKeys`)||function(e){var t=n.f(i(e)),o=r.f;return o?a(t,o(e)):t},yd}var Sd;function Cd(){return Sd?vd:(Sd=1,j()({target:`Reflect`,stat:!0},{ownKeys:xd()}),vd)}var wd,Td;function Ed(){return Td?wd:(Td=1,Cd(),wd=Oe().Reflect.ownKeys,wd)}var Dd,Od;function kd(){return Od?Dd:(Od=1,Dd=Ed(),Dd)}var Ad,jd;function Md(){return jd?Ad:(jd=1,Ad=kd(),Ad)}var Nd=n(Md()),Pd={},Fd;function Id(){return Fd?Pd:(Fd=1,j()({target:`Array`,stat:!0},{isArray:Nn()}),Pd)}var Ld,Rd;function zd(){return Rd?Ld:(Rd=1,Id(),Ld=Oe().Array.isArray,Ld)}var Bd,Vd;function Hd(){return Vd?Bd:(Vd=1,Bd=zd(),Bd)}var Ud,Wd;function Gd(){return Wd?Ud:(Wd=1,Ud=Hd(),Ud)}var Kd=n(Gd()),qd={},Jd;function Yd(){if(Jd)return qd;Jd=1;var e=j(),t=St(),n=Wr();return e({target:`Object`,stat:!0,forced:u()(function(){n(1)})},{keys:function(e){return n(t(e))}}),qd}var Xd,Zd;function Qd(){return Zd?Xd:(Zd=1,Yd(),Xd=Oe().Object.keys,Xd)}var $d,ef;function tf(){return ef?$d:(ef=1,$d=Qd(),$d)}var nf,rf;function af(){return rf?nf:(rf=1,nf=tf(),nf)}var of=n(af()),sf={},cf,lf;function uf(){if(lf)return cf;lf=1;var e=Ui().forEach;return cf=Dl()(`forEach`)?[].forEach:function(t){return e(this,t,arguments.length>1?arguments[1]:void 0)},cf}var df;function ff(){if(df)return sf;df=1;var e=j(),t=uf();return e({target:`Array`,proto:!0,forced:[].forEach!==t},{forEach:t}),sf}var pf,mf;function hf(){return mf?pf:(mf=1,ff(),pf=sl()(`Array`,`forEach`),pf)}var gf,_f;function vf(){return _f?gf:(_f=1,gf=hf(),gf)}var yf,bf;function xf(){if(bf)return yf;bf=1;var e=rr(),t=Tt(),n=Pe(),r=vf(),i=Array.prototype,a={DOMTokenList:!0,NodeList:!0};return yf=function(o){var s=o.forEach;return o===i||n(i,o)&&s===i.forEach||t(a,e(o))?r:s},yf}var Sf,Cf;function wf(){return Cf?Sf:(Cf=1,Sf=xf(),Sf)}var Tf=n(wf()),Ef={},Df;function Of(){if(Df)return Ef;Df=1;var e=j(),t=y(),n=Nn(),r=t([].reverse),i=[1,2];return e({target:`Array`,proto:!0,forced:String(i)===String(i.reverse())},{reverse:function(){return n(this)&&(this.length=this.length),r(this)}}),Ef}var kf,Af;function jf(){return Af?kf:(Af=1,Of(),kf=sl()(`Array`,`reverse`),kf)}var Mf,Nf;function Pf(){if(Nf)return Mf;Nf=1;var e=Pe(),t=jf(),n=Array.prototype;return Mf=function(r){var i=r.reverse;return r===n||e(n,r)&&i===n.reverse?t:i},Mf}var Ff,If;function Lf(){return If?Ff:(If=1,Ff=Pf(),Ff)}var Rf,zf;function Bf(){return zf?Rf:(zf=1,Rf=Lf(),Rf)}var Vf=n(Bf()),Hf={},Uf,Wf;function Gf(){if(Wf)return Uf;Wf=1;var e=A(),t=Nn(),n=TypeError,r=Object.getOwnPropertyDescriptor;return Uf=e&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],`length`,{writable:!1}).length=1}catch(e){return e instanceof TypeError}}()?function(e,i){if(t(e)&&!r(e,`length`).writable)throw new n(`Cannot set read only .length`);return e.length=i}:function(e,t){return e.length=t},Uf}var Kf,qf;function Jf(){if(qf)return Kf;qf=1;var e=Qe(),t=TypeError;return Kf=function(n,r){if(!delete n[r])throw new t(`Cannot delete property `+e(r)+` of `+e(n))},Kf}var Yf;function Xf(){if(Yf)return Hf;Yf=1;var e=j(),t=St(),n=kr(),r=zn(),i=Gn(),a=Gf(),o=Jn(),s=hr(),c=Zn(),l=Jf(),u=vr()(`splice`),d=Math.max,f=Math.min;return e({target:`Array`,proto:!0,forced:!u},{splice:function(e,u){var p=t(this),m=i(p),h=n(e,m),g=arguments.length,_,v,y,b,x,S;for(g===0?_=v=0:g===1?(_=0,v=m-h):(_=g-2,v=f(d(r(u),0),m-h)),o(m+_-v),y=s(p,v),b=0;b<v;b++)x=h+b,x in p&&c(y,b,p[x]);if(y.length=v,_<v){for(b=h;b<m-v;b++)x=b+v,S=b+_,x in p?p[S]=p[x]:l(p,S);for(b=m;b>m-v+_;b--)l(p,b-1)}else if(_>v)for(b=m-v;b>h;b--)x=b+v-1,S=b+_-1,x in p?p[S]=p[x]:l(p,S);for(b=0;b<_;b++)p[b+h]=arguments[b+2];return a(p,m-v+_),y}}),Hf}var Zf,Qf;function $f(){return Qf?Zf:(Qf=1,Xf(),Zf=sl()(`Array`,`splice`),Zf)}var ep,tp;function np(){if(tp)return ep;tp=1;var e=Pe(),t=$f(),n=Array.prototype;return ep=function(r){var i=r.splice;return r===n||e(n,r)&&i===n.splice?t:i},ep}var rp,ip;function ap(){return ip?rp:(ip=1,rp=np(),rp)}var op,sp;function cp(){return sp?op:(sp=1,op=ap(),op)}var lp=n(cp()),up={},dp,fp;function pp(){if(fp)return dp;fp=1;var e=A(),t=y(),n=ie(),r=u(),i=Wr(),a=pi(),o=se(),s=St(),c=pe(),l=Object.assign,d=Object.defineProperty,f=t([].concat);return dp=!l||r(function(){if(e&&l({b:1},l(d({},`a`,{enumerable:!0,get:function(){d(this,`b`,{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var t={},n={},r=Symbol(`assign detection`),a=`abcdefghijklmnopqrst`;return t[r]=7,a.split(``).forEach(function(e){n[e]=e}),l({},t)[r]!==7||i(l({},n)).join(``)!==a})?function(t,r){for(var l=s(t),u=arguments.length,d=1,p=a.f,m=o.f;u>d;)for(var h=c(arguments[d++]),g=p?f(i(h),p(h)):i(h),_=g.length,v=0,y;_>v;)y=g[v++],(!e||n(m,h,y))&&(l[y]=h[y]);return l}:l,dp}var mp;function hp(){if(mp)return up;mp=1;var e=j(),t=pp();return e({target:`Object`,stat:!0,arity:2,forced:Object.assign!==t},{assign:t}),up}var gp,_p;function vp(){return _p?gp:(_p=1,hp(),gp=Oe().Object.assign,gp)}var yp,bp;function xp(){return bp?yp:(bp=1,yp=vp(),yp)}var Sp,Cp;function wp(){return Cp?Sp:(Cp=1,Sp=xp(),Sp)}var Tp=n(wp()),Ep,Dp;function Op(){return Dp?Ep:(Dp=1,br(),Ep=sl()(`Array`,`concat`),Ep)}var kp,Ap;function jp(){if(Ap)return kp;Ap=1;var e=Pe(),t=Op(),n=Array.prototype;return kp=function(r){var i=r.concat;return r===n||e(n,r)&&i===n.concat?t:i},kp}var Mp,Np;function Pp(){return Np?Mp:(Np=1,Mp=jp(),Mp)}var Fp,Ip;function Lp(){return Ip?Fp:(Ip=1,Fp=Pp(),Fp)}var Rp=n(Lp()),zp={},Bp;function Vp(){return Bp?zp:(Bp=1,j()({target:`Object`,stat:!0,sham:!A()},{create:ti()}),zp)}var Hp,Up;function Wp(){if(Up)return Hp;Up=1,Vp();var e=Oe().Object;return Hp=function(t,n){return e.create(t,n)},Hp}var Gp,Kp;function qp(){return Kp?Gp:(Kp=1,Gp=Wp(),Gp)}var Jp,Yp;function Xp(){return Yp?Jp:(Yp=1,Jp=qp(),Jp)}var Zp=n(Xp()),Qp={},$p,em;function tm(){if(em)return $p;em=1;var e=zn(),t=Tr(),n=ye(),r=RangeError;return $p=function(i){var a=t(n(this)),o=``,s=e(i);if(s<0||s===1/0)throw new r(`Wrong number of repetitions`);for(;s>0;(s>>>=1)&&(a+=a))s&1&&(o+=a);return o},$p}var nm,rm;function im(){if(rm)return nm;rm=1;var e=y(),t=Hn(),n=Tr(),r=tm(),i=ye(),a=e(r),o=e(``.slice),s=Math.ceil,c=function(e){return function(r,c,l){var u=n(i(r)),d=t(c),f=u.length,p=l===void 0?` `:n(l),m,h;return d<=f||p===``?u:(m=d-f,h=a(p,s(m/p.length)),h.length>m&&(h=o(h,0,m)),e?u+h:h+u)}};return nm={start:c(!1),end:c(!0)},nm}var am,om;function sm(){if(om)return am;om=1;var e=y(),t=u(),n=im().start,r=RangeError,i=isFinite,a=Math.abs,o=Date.prototype,s=o.toISOString,c=e(o.getTime),l=e(o.getUTCDate),d=e(o.getUTCFullYear),f=e(o.getUTCHours),p=e(o.getUTCMilliseconds),m=e(o.getUTCMinutes),h=e(o.getUTCMonth),g=e(o.getUTCSeconds);return am=t(function(){return s.call(new Date(-50000000000001))!==`0385-07-25T07:06:39.999Z`})||!t(function(){s.call(new Date(NaN))})?function(){if(!i(c(this)))throw new r(`Invalid time value`);var e=this,t=d(e),o=p(e),s=t<0?`-`:t>9999?`+`:``;return s+n(a(t),s?6:4,0)+`-`+n(h(e)+1,2,0)+`-`+n(l(e),2,0)+`T`+n(f(e),2,0)+`:`+n(m(e),2,0)+`:`+n(g(e),2,0)+`.`+n(o,3,0)+`Z`}:s,am}var cm;function lm(){if(cm)return Qp;cm=1;var e=j(),t=ie(),n=St(),r=Pt(),i=sm(),a=S();return e({target:`Date`,proto:!0,forced:u()(function(){return new Date(NaN).toJSON()!==null||t(Date.prototype.toJSON,{toISOString:function(){return 1}})!==1})},{toJSON:function(e){var o=n(this),s=r(o,`number`);return typeof s==`number`&&!isFinite(s)?null:!(`toISOString`in o)&&a(o)===`Date`?t(i,o):o.toISOString()}}),Qp}var um,dm;function fm(){if(dm)return um;dm=1,lm(),oa();var e=Oe(),t=g();return e.JSON||={stringify:JSON.stringify},um=function(n,r,i){return t(e.JSON.stringify,null,arguments)},um}var pm,mm;function hm(){return mm?pm:(mm=1,pm=fm(),pm)}var gm,_m;function vm(){return _m?gm:(_m=1,gm=hm(),gm)}var ym=n(vm()),bm={},xm={},Sm,Cm;function wm(){if(Cm)return Sm;Cm=1;var e=TypeError;return Sm=function(t,n){if(t<n)throw new e(`Not enough arguments`);return t},Sm}var Tm,Em;function Dm(){if(Em)return Tm;Em=1;var e=s(),t=g(),n=O(),r=Al(),i=Le(),a=ci(),o=wm(),c=e.Function,l=/MSIE .\./.test(i)||r===`BUN`&&(function(){var t=e.Bun.version.split(`.`);return t.length<3||t[0]===`0`&&(t[1]<3||t[1]===`3`&&t[2]===`0`)})();return Tm=function(e,r){var i=r?2:1;return l?function(s,l){var u=o(arguments.length,1)>i,d=n(s)?s:c(s),f=u?a(arguments,i):[],p=u?function(){t(d,this,f)}:d;return r?e(p,l):e(p)}:e},Tm}var Om;function km(){if(Om)return xm;Om=1;var e=j(),t=s(),n=Dm()(t.setInterval,!0);return e({global:!0,bind:!0,forced:t.setInterval!==n},{setInterval:n}),xm}var Am={},jm;function Mm(){if(jm)return Am;jm=1;var e=j(),t=s(),n=Dm()(t.setTimeout,!0);return e({global:!0,bind:!0,forced:t.setTimeout!==n},{setTimeout:n}),Am}var Nm;function Pm(){return Nm?bm:(Nm=1,km(),Mm(),bm)}var Fm,Im;function Lm(){return Im?Fm:(Im=1,Pm(),Fm=Oe().setTimeout,Fm)}var Rm,zm;function Bm(){return zm?Rm:(zm=1,Rm=Lm(),Rm)}var Vm=n(Bm()),Hm={exports:{}},Um;function Wm(){return Um?Hm.exports:(Um=1,(function(e){function t(e){if(e)return n(e);this._callbacks=new Map}function n(e){return Object.assign(e,t.prototype),e._callbacks=new Map,e}t.prototype.on=function(e,t){let n=this._callbacks.get(e)??[];return n.push(t),this._callbacks.set(e,n),this},t.prototype.once=function(e,t){let n=(...r)=>{this.off(e,n),t.apply(this,r)};return n.fn=t,this.on(e,n),this},t.prototype.off=function(e,t){if(e===void 0&&t===void 0)return this._callbacks.clear(),this;if(t===void 0)return this._callbacks.delete(e),this;let n=this._callbacks.get(e);if(n){for(let[e,r]of n.entries())if(r===t||r.fn===t){n.splice(e,1);break}n.length===0?this._callbacks.delete(e):this._callbacks.set(e,n)}return this},t.prototype.emit=function(e,...t){let n=this._callbacks.get(e);if(n){let e=[...n];for(let n of e)n.apply(this,t)}return this},t.prototype.listeners=function(e){return this._callbacks.get(e)??[]},t.prototype.listenerCount=function(e){if(e)return this.listeners(e).length;let t=0;for(let e of this._callbacks.values())t+=e.length;return t},t.prototype.hasListeners=function(e){return this.listenerCount(e)>0},t.prototype.addEventListener=t.prototype.on,t.prototype.removeListener=t.prototype.off,t.prototype.removeEventListener=t.prototype.off,t.prototype.removeAllListeners=t.prototype.off,e.exports=t})(Hm),Hm.exports)}var Gm=n(Wm());function Km(){return Km=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Km.apply(this,arguments)}function qm(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function Jm(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}var Ym=typeof Object.assign==`function`?Object.assign:function(e){if(e==null)throw TypeError(`Cannot convert undefined or null to object`);for(var t=Object(e),n=1;n<arguments.length;n++){var r=arguments[n];if(r!=null)for(var i in r)r.hasOwnProperty(i)&&(t[i]=r[i])}return t},Xm=[``,`webkit`,`Moz`,`MS`,`ms`,`o`],Zm=typeof document>`u`?{style:{}}:document.createElement(`div`),Qm=`function`,$m=Math.round,eh=Math.abs,th=Date.now;function nh(e,t){for(var n,r,i=t[0].toUpperCase()+t.slice(1),a=0;a<Xm.length;){if(n=Xm[a],r=n?n+i:t,r in e)return r;a++}}var rh=typeof window>`u`?{}:window,ih=nh(Zm.style,`touchAction`),ah=ih!==void 0;function oh(){if(!ah)return!1;var e={},t=rh.CSS&&rh.CSS.supports;return[`auto`,`manipulation`,`pan-y`,`pan-x`,`pan-x pan-y`,`none`].forEach(function(n){return e[n]=t?rh.CSS.supports(`touch-action`,n):!0}),e}var sh=`compute`,ch=`auto`,lh=`manipulation`,uh=`none`,dh=`pan-x`,fh=`pan-y`,ph=oh(),mh=/mobile|tablet|ip(ad|hone|od)|android/i,hh=`ontouchstart`in rh,gh=nh(rh,`PointerEvent`)!==void 0,_h=hh&&mh.test(navigator.userAgent),vh=`touch`,yh=`pen`,bh=`mouse`,xh=`kinect`,Sh=25,Ch=1,wh=2,Th=4,Eh=8,Dh=1,Oh=2,kh=4,Ah=8,jh=16,Mh=Oh|kh,Nh=Ah|jh,Ph=Mh|Nh,Fh=[`x`,`y`],Ih=[`clientX`,`clientY`];function Lh(e,t,n){var r;if(e)if(e.forEach)e.forEach(t,n);else if(e.length!==void 0)for(r=0;r<e.length;)t.call(n,e[r],r,e),r++;else for(r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r,e)}function Rh(e,t){return typeof e===Qm?e.apply(t&&t[0]||void 0,t):e}function zh(e,t){return e.indexOf(t)>-1}function Bh(e){if(zh(e,uh))return uh;var t=zh(e,dh),n=zh(e,fh);return t&&n?uh:t||n?t?dh:fh:zh(e,lh)?lh:ch}var Vh=function(){function e(e,t){this.manager=e,this.set(t)}var t=e.prototype;return t.set=function(e){e===sh&&(e=this.compute()),ah&&this.manager.element.style&&ph[e]&&(this.manager.element.style[ih]=e),this.actions=e.toLowerCase().trim()},t.update=function(){this.set(this.manager.options.touchAction)},t.compute=function(){var e=[];return Lh(this.manager.recognizers,function(t){Rh(t.options.enable,[t])&&(e=e.concat(t.getTouchAction()))}),Bh(e.join(` `))},t.preventDefaults=function(e){var t=e.srcEvent,n=e.offsetDirection;if(this.manager.session.prevented){t.preventDefault();return}var r=this.actions,i=zh(r,uh)&&!ph[uh],a=zh(r,fh)&&!ph[fh],o=zh(r,dh)&&!ph[dh];if(i){var s=e.pointers.length===1,c=e.distance<2,l=e.deltaTime<250;if(s&&c&&l)return}if(!(o&&a)&&(i||a&&n&Mh||o&&n&Nh))return this.preventSrc(t)},t.preventSrc=function(e){this.manager.session.prevented=!0,e.preventDefault()},e}();function Hh(e,t){for(;e;){if(e===t)return!0;e=e.parentNode}return!1}function Uh(e){var t=e.length;if(t===1)return{x:$m(e[0].clientX),y:$m(e[0].clientY)};for(var n=0,r=0,i=0;i<t;)n+=e[i].clientX,r+=e[i].clientY,i++;return{x:$m(n/t),y:$m(r/t)}}function Wh(e){for(var t=[],n=0;n<e.pointers.length;)t[n]={clientX:$m(e.pointers[n].clientX),clientY:$m(e.pointers[n].clientY)},n++;return{timeStamp:th(),pointers:t,center:Uh(t),deltaX:e.deltaX,deltaY:e.deltaY}}function Gh(e,t,n){n||=Fh;var r=t[n[0]]-e[n[0]],i=t[n[1]]-e[n[1]];return Math.sqrt(r*r+i*i)}function Kh(e,t,n){n||=Fh;var r=t[n[0]]-e[n[0]],i=t[n[1]]-e[n[1]];return Math.atan2(i,r)*180/Math.PI}function qh(e,t){return e===t?Dh:eh(e)>=eh(t)?e<0?Oh:kh:t<0?Ah:jh}function Jh(e,t){var n=t.center,r=e.offsetDelta||{},i=e.prevDelta||{},a=e.prevInput||{};(t.eventType===Ch||a.eventType===Th)&&(i=e.prevDelta={x:a.deltaX||0,y:a.deltaY||0},r=e.offsetDelta={x:n.x,y:n.y}),t.deltaX=i.x+(n.x-r.x),t.deltaY=i.y+(n.y-r.y)}function Yh(e,t,n){return{x:t/e||0,y:n/e||0}}function Xh(e,t){return Gh(t[0],t[1],Ih)/Gh(e[0],e[1],Ih)}function Zh(e,t){return Kh(t[1],t[0],Ih)+Kh(e[1],e[0],Ih)}function Qh(e,t){var n=e.lastInterval||t,r=t.timeStamp-n.timeStamp,i,a,o,s;if(t.eventType!==Eh&&(r>Sh||n.velocity===void 0)){var c=t.deltaX-n.deltaX,l=t.deltaY-n.deltaY,u=Yh(r,c,l);a=u.x,o=u.y,i=eh(u.x)>eh(u.y)?u.x:u.y,s=qh(c,l),e.lastInterval=t}else i=n.velocity,a=n.velocityX,o=n.velocityY,s=n.direction;t.velocity=i,t.velocityX=a,t.velocityY=o,t.direction=s}function $h(e,t){var n=e.session,r=t.pointers,i=r.length;n.firstInput||=Wh(t),i>1&&!n.firstMultiple?n.firstMultiple=Wh(t):i===1&&(n.firstMultiple=!1);var a=n.firstInput,o=n.firstMultiple,s=o?o.center:a.center,c=t.center=Uh(r);t.timeStamp=th(),t.deltaTime=t.timeStamp-a.timeStamp,t.angle=Kh(s,c),t.distance=Gh(s,c),Jh(n,t),t.offsetDirection=qh(t.deltaX,t.deltaY);var l=Yh(t.deltaTime,t.deltaX,t.deltaY);t.overallVelocityX=l.x,t.overallVelocityY=l.y,t.overallVelocity=eh(l.x)>eh(l.y)?l.x:l.y,t.scale=o?Xh(o.pointers,r):1,t.rotation=o?Zh(o.pointers,r):0,t.maxPointers=n.prevInput?t.pointers.length>n.prevInput.maxPointers?t.pointers.length:n.prevInput.maxPointers:t.pointers.length,Qh(n,t);var u=e.element,d=t.srcEvent,f=d.composedPath?d.composedPath()[0]:d.path?d.path[0]:d.target;Hh(f,u)&&(u=f),t.target=u}function eg(e,t,n){var r=n.pointers.length,i=n.changedPointers.length,a=t&Ch&&r-i===0,o=t&(Th|Eh)&&r-i===0;n.isFirst=!!a,n.isFinal=!!o,a&&(e.session={}),n.eventType=t,$h(e,n),e.emit(`hammer.input`,n),e.recognize(n),e.session.prevInput=n}function tg(e){return e.trim().split(/\s+/g)}function ng(e,t,n){Lh(tg(t),function(t){e.addEventListener(t,n,!1)})}function rg(e,t,n){Lh(tg(t),function(t){e.removeEventListener(t,n,!1)})}function ig(e){var t=e.ownerDocument||e;return t.defaultView||t.parentWindow||window}var ag=function(){function e(e,t){var n=this;this.manager=e,this.callback=t,this.element=e.element,this.target=e.options.inputTarget,this.domHandler=function(t){Rh(e.options.enable,[e])&&n.handler(t)},this.init()}var t=e.prototype;return t.handler=function(){},t.init=function(){this.evEl&&ng(this.element,this.evEl,this.domHandler),this.evTarget&&ng(this.target,this.evTarget,this.domHandler),this.evWin&&ng(ig(this.element),this.evWin,this.domHandler)},t.destroy=function(){this.evEl&&rg(this.element,this.evEl,this.domHandler),this.evTarget&&rg(this.target,this.evTarget,this.domHandler),this.evWin&&rg(ig(this.element),this.evWin,this.domHandler)},e}();function og(e,t,n){if(e.indexOf&&!n)return e.indexOf(t);for(var r=0;r<e.length;){if(n&&e[r][n]==t||!n&&e[r]===t)return r;r++}return-1}var sg={pointerdown:Ch,pointermove:wh,pointerup:Th,pointercancel:Eh,pointerout:Eh},cg={2:vh,3:yh,4:bh,5:xh},lg=`pointerdown`,ug=`pointermove pointerup pointercancel`;rh.MSPointerEvent&&!rh.PointerEvent&&(lg=`MSPointerDown`,ug=`MSPointerMove MSPointerUp MSPointerCancel`);var dg=function(e){qm(t,e);function t(){var n,r=t.prototype;return r.evEl=lg,r.evWin=ug,n=e.apply(this,arguments)||this,n.store=n.manager.session.pointerEvents=[],n}var n=t.prototype;return n.handler=function(e){var t=this.store,n=!1,r=sg[e.type.toLowerCase().replace(`ms`,``)],i=cg[e.pointerType]||e.pointerType,a=i===vh,o=og(t,e.pointerId,`pointerId`);r&Ch&&(e.button===0||a)?o<0&&(t.push(e),o=t.length-1):r&(Th|Eh)&&(n=!0),!(o<0)&&(t[o]=e,this.callback(this.manager,r,{pointers:t,changedPointers:[e],pointerType:i,srcEvent:e}),n&&t.splice(o,1))},t}(ag);function fg(e){return Array.prototype.slice.call(e,0)}function pg(e,t,n){for(var r=[],i=[],a=0;a<e.length;){var o=t?e[a][t]:e[a];og(i,o)<0&&r.push(e[a]),i[a]=o,a++}return n&&(r=t?r.sort(function(e,n){return e[t]>n[t]}):r.sort()),r}var mg={touchstart:Ch,touchmove:wh,touchend:Th,touchcancel:Eh},hg=`touchstart touchmove touchend touchcancel`,gg=function(e){qm(t,e);function t(){var n;return t.prototype.evTarget=hg,n=e.apply(this,arguments)||this,n.targetIds={},n}var n=t.prototype;return n.handler=function(e){var t=mg[e.type],n=_g.call(this,e,t);n&&this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:vh,srcEvent:e})},t}(ag);function _g(e,t){var n=fg(e.touches),r=this.targetIds;if(t&(Ch|wh)&&n.length===1)return r[n[0].identifier]=!0,[n,n];var i,a,o=fg(e.changedTouches),s=[],c=this.target;if(a=n.filter(function(e){return Hh(e.target,c)}),t===Ch)for(i=0;i<a.length;)r[a[i].identifier]=!0,i++;for(i=0;i<o.length;)r[o[i].identifier]&&s.push(o[i]),t&(Th|Eh)&&delete r[o[i].identifier],i++;if(s.length)return[pg(a.concat(s),`identifier`,!0),s]}var vg={mousedown:Ch,mousemove:wh,mouseup:Th},yg=`mousedown`,bg=`mousemove mouseup`,xg=function(e){qm(t,e);function t(){var n,r=t.prototype;return r.evEl=yg,r.evWin=bg,n=e.apply(this,arguments)||this,n.pressed=!1,n}var n=t.prototype;return n.handler=function(e){var t=vg[e.type];t&Ch&&e.button===0&&(this.pressed=!0),t&wh&&e.which!==1&&(t=Th),this.pressed&&(t&Th&&(this.pressed=!1),this.callback(this.manager,t,{pointers:[e],changedPointers:[e],pointerType:bh,srcEvent:e}))},t}(ag),Sg=2500,Cg=25;function wg(e){var t=e.changedPointers[0];if(t.identifier===this.primaryTouch){var n={x:t.clientX,y:t.clientY},r=this.lastTouches;this.lastTouches.push(n),setTimeout(function(){var e=r.indexOf(n);e>-1&&r.splice(e,1)},Sg)}}function Tg(e,t){e&Ch?(this.primaryTouch=t.changedPointers[0].identifier,wg.call(this,t)):e&(Th|Eh)&&wg.call(this,t)}function Eg(e){for(var t=e.srcEvent.clientX,n=e.srcEvent.clientY,r=0;r<this.lastTouches.length;r++){var i=this.lastTouches[r],a=Math.abs(t-i.x),o=Math.abs(n-i.y);if(a<=Cg&&o<=Cg)return!0}return!1}var Dg=function(){return function(e){qm(t,e);function t(t,n){var r=e.call(this,t,n)||this;return r.handler=function(e,t,n){var i=n.pointerType===vh,a=n.pointerType===bh;if(!(a&&n.sourceCapabilities&&n.sourceCapabilities.firesTouchEvents)){if(i)Tg.call(Jm(Jm(r)),t,n);else if(a&&Eg.call(Jm(Jm(r)),n))return;r.callback(e,t,n)}},r.touch=new gg(r.manager,r.handler),r.mouse=new xg(r.manager,r.handler),r.primaryTouch=null,r.lastTouches=[],r}var n=t.prototype;return n.destroy=function(){this.touch.destroy(),this.mouse.destroy()},t}(ag)}();function Og(e){var t;return t=e.options.inputClass||(gh?dg:_h?gg:hh?Dg:xg),new t(e,eg)}function kg(e,t,n){return Array.isArray(e)?(Lh(e,n[t],n),!0):!1}var Ag=1,jg=2,Mg=4,Ng=8,Pg=Ng,Fg=16,Ig=32,Lg=1;function Rg(){return Lg++}function zg(e,t){var n=t.manager;return n?n.get(e):e}function Bg(e){return e&Fg?`cancel`:e&Ng?`end`:e&Mg?`move`:e&jg?`start`:``}var Vg=function(){function e(e){e===void 0&&(e={}),this.options=Km({enable:!0},e),this.id=Rg(),this.manager=null,this.state=Ag,this.simultaneous={},this.requireFail=[]}var t=e.prototype;return t.set=function(e){return Ym(this.options,e),this.manager&&this.manager.touchAction.update(),this},t.recognizeWith=function(e){if(kg(e,`recognizeWith`,this))return this;var t=this.simultaneous;return e=zg(e,this),t[e.id]||(t[e.id]=e,e.recognizeWith(this)),this},t.dropRecognizeWith=function(e){return kg(e,`dropRecognizeWith`,this)?this:(e=zg(e,this),delete this.simultaneous[e.id],this)},t.requireFailure=function(e){if(kg(e,`requireFailure`,this))return this;var t=this.requireFail;return e=zg(e,this),og(t,e)===-1&&(t.push(e),e.requireFailure(this)),this},t.dropRequireFailure=function(e){if(kg(e,`dropRequireFailure`,this))return this;e=zg(e,this);var t=og(this.requireFail,e);return t>-1&&this.requireFail.splice(t,1),this},t.hasRequireFailures=function(){return this.requireFail.length>0},t.canRecognizeWith=function(e){return!!this.simultaneous[e.id]},t.emit=function(e){var t=this,n=this.state;function r(n){t.manager.emit(n,e)}n<Ng&&r(t.options.event+Bg(n)),r(t.options.event),e.additionalEvent&&r(e.additionalEvent),n>=Ng&&r(t.options.event+Bg(n))},t.tryEmit=function(e){if(this.canEmit())return this.emit(e);this.state=Ig},t.canEmit=function(){for(var e=0;e<this.requireFail.length;){if(!(this.requireFail[e].state&(Ig|Ag)))return!1;e++}return!0},t.recognize=function(e){var t=Ym({},e);if(!Rh(this.options.enable,[this,t])){this.reset(),this.state=Ig;return}this.state&(Pg|Fg|Ig)&&(this.state=Ag),this.state=this.process(t),this.state&(jg|Mg|Ng|Fg)&&this.tryEmit(t)},t.process=function(e){},t.getTouchAction=function(){},t.reset=function(){},e}(),Hg=function(e){qm(t,e);function t(t){var n;return t===void 0&&(t={}),n=e.call(this,Km({event:`tap`,pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},t))||this,n.pTime=!1,n.pCenter=!1,n._timer=null,n._input=null,n.count=0,n}var n=t.prototype;return n.getTouchAction=function(){return[lh]},n.process=function(e){var t=this,n=this.options,r=e.pointers.length===n.pointers,i=e.distance<n.threshold,a=e.deltaTime<n.time;if(this.reset(),e.eventType&Ch&&this.count===0)return this.failTimeout();if(i&&a&&r){if(e.eventType!==Th)return this.failTimeout();var o=this.pTime?e.timeStamp-this.pTime<n.interval:!0,s=!this.pCenter||Gh(this.pCenter,e.center)<n.posThreshold;if(this.pTime=e.timeStamp,this.pCenter=e.center,!s||!o?this.count=1:this.count+=1,this._input=e,this.count%n.taps===0)return this.hasRequireFailures()?(this._timer=setTimeout(function(){t.state=Pg,t.tryEmit()},n.interval),jg):Pg}return Ig},n.failTimeout=function(){var e=this;return this._timer=setTimeout(function(){e.state=Ig},this.options.interval),Ig},n.reset=function(){clearTimeout(this._timer)},n.emit=function(){this.state===Pg&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))},t}(Vg),Ug=function(e){qm(t,e);function t(t){return t===void 0&&(t={}),e.call(this,Km({pointers:1},t))||this}var n=t.prototype;return n.attrTest=function(e){var t=this.options.pointers;return t===0||e.pointers.length===t},n.process=function(e){var t=this.state,n=e.eventType,r=t&(jg|Mg),i=this.attrTest(e);return r&&(n&Eh||!i)?t|Fg:r||i?n&Th?t|Ng:t&jg?t|Mg:jg:Ig},t}(Vg);function Wg(e){return e===jh?`down`:e===Ah?`up`:e===Oh?`left`:e===kh?`right`:``}var Gg=function(e){qm(t,e);function t(t){var n;return t===void 0&&(t={}),n=e.call(this,Km({event:`pan`,threshold:10,pointers:1,direction:Ph},t))||this,n.pX=null,n.pY=null,n}var n=t.prototype;return n.getTouchAction=function(){var e=this.options.direction,t=[];return e&Mh&&t.push(fh),e&Nh&&t.push(dh),t},n.directionTest=function(e){var t=this.options,n=!0,r=e.distance,i=e.direction,a=e.deltaX,o=e.deltaY;return i&t.direction||(t.direction&Mh?(i=a===0?Dh:a<0?Oh:kh,n=a!==this.pX,r=Math.abs(e.deltaX)):(i=o===0?Dh:o<0?Ah:jh,n=o!==this.pY,r=Math.abs(e.deltaY))),e.direction=i,n&&r>t.threshold&&i&t.direction},n.attrTest=function(e){return Ug.prototype.attrTest.call(this,e)&&(this.state&jg||!(this.state&jg)&&this.directionTest(e))},n.emit=function(t){this.pX=t.deltaX,this.pY=t.deltaY;var n=Wg(t.direction);n&&(t.additionalEvent=this.options.event+n),e.prototype.emit.call(this,t)},t}(Ug),Kg=function(e){qm(t,e);function t(t){return t===void 0&&(t={}),e.call(this,Km({event:`swipe`,threshold:10,velocity:.3,direction:Mh|Nh,pointers:1},t))||this}var n=t.prototype;return n.getTouchAction=function(){return Gg.prototype.getTouchAction.call(this)},n.attrTest=function(t){var n=this.options.direction,r;return n&(Mh|Nh)?r=t.overallVelocity:n&Mh?r=t.overallVelocityX:n&Nh&&(r=t.overallVelocityY),e.prototype.attrTest.call(this,t)&&n&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers===this.options.pointers&&eh(r)>this.options.velocity&&t.eventType&Th},n.emit=function(e){var t=Wg(e.offsetDirection);t&&this.manager.emit(this.options.event+t,e),this.manager.emit(this.options.event,e)},t}(Ug),qg=function(e){qm(t,e);function t(t){return t===void 0&&(t={}),e.call(this,Km({event:`pinch`,threshold:0,pointers:2},t))||this}var n=t.prototype;return n.getTouchAction=function(){return[uh]},n.attrTest=function(t){return e.prototype.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||this.state&jg)},n.emit=function(t){if(t.scale!==1){var n=t.scale<1?`in`:`out`;t.additionalEvent=this.options.event+n}e.prototype.emit.call(this,t)},t}(Ug),Jg=function(e){qm(t,e);function t(t){return t===void 0&&(t={}),e.call(this,Km({event:`rotate`,threshold:0,pointers:2},t))||this}var n=t.prototype;return n.getTouchAction=function(){return[uh]},n.attrTest=function(t){return e.prototype.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||this.state&jg)},t}(Ug),Yg=function(e){qm(t,e);function t(t){var n;return t===void 0&&(t={}),n=e.call(this,Km({event:`press`,pointers:1,time:251,threshold:9},t))||this,n._timer=null,n._input=null,n}var n=t.prototype;return n.getTouchAction=function(){return[ch]},n.process=function(e){var t=this,n=this.options,r=e.pointers.length===n.pointers,i=e.distance<n.threshold,a=e.deltaTime>n.time;if(this._input=e,!i||!r||e.eventType&(Th|Eh)&&!a)this.reset();else if(e.eventType&Ch)this.reset(),this._timer=setTimeout(function(){t.state=Pg,t.tryEmit()},n.time);else if(e.eventType&Th)return Pg;return Ig},n.reset=function(){clearTimeout(this._timer)},n.emit=function(e){this.state===Pg&&(e&&e.eventType&Th?this.manager.emit(this.options.event+`up`,e):(this._input.timeStamp=th(),this.manager.emit(this.options.event,this._input)))},t}(Vg),Xg={domEvents:!1,touchAction:sh,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:`none`,touchSelect:`none`,touchCallout:`none`,contentZooming:`none`,userDrag:`none`,tapHighlightColor:`rgba(0,0,0,0)`}},Zg=[[Jg,{enable:!1}],[qg,{enable:!1},[`rotate`]],[Kg,{direction:Mh}],[Gg,{direction:Mh},[`swipe`]],[Hg],[Hg,{event:`doubletap`,taps:2},[`tap`]],[Yg]],Qg=1,$g=2;function e_(e,t){var n=e.element;if(n.style){var r;Lh(e.options.cssProps,function(i,a){r=nh(n.style,a),t?(e.oldCssProps[r]=n.style[r],n.style[r]=i):n.style[r]=e.oldCssProps[r]||``}),t||(e.oldCssProps={})}}function t_(e,t){var n=document.createEvent(`Event`);n.initEvent(e,!0,!0),n.gesture=t,t.target.dispatchEvent(n)}var n_=function(){function e(e,t){var n=this;this.options=Ym({},Xg,t||{}),this.options.inputTarget=this.options.inputTarget||e,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=e,this.input=Og(this),this.touchAction=new Vh(this,this.options.touchAction),e_(this,!0),Lh(this.options.recognizers,function(e){var t=n.add(new e[0](e[1]));e[2]&&t.recognizeWith(e[2]),e[3]&&t.requireFailure(e[3])},this)}var t=e.prototype;return t.set=function(e){return Ym(this.options,e),e.touchAction&&this.touchAction.update(),e.inputTarget&&(this.input.destroy(),this.input.target=e.inputTarget,this.input.init()),this},t.stop=function(e){this.session.stopped=e?$g:Qg},t.recognize=function(e){var t=this.session;if(!t.stopped){this.touchAction.preventDefaults(e);var n,r=this.recognizers,i=t.curRecognizer;(!i||i&&i.state&Pg)&&(t.curRecognizer=null,i=null);for(var a=0;a<r.length;)n=r[a],t.stopped!==$g&&(!i||n===i||n.canRecognizeWith(i))?n.recognize(e):n.reset(),!i&&n.state&(jg|Mg|Ng)&&(t.curRecognizer=n,i=n),a++}},t.get=function(e){if(e instanceof Vg)return e;for(var t=this.recognizers,n=0;n<t.length;n++)if(t[n].options.event===e)return t[n];return null},t.add=function(e){if(kg(e,`add`,this))return this;var t=this.get(e.options.event);return t&&this.remove(t),this.recognizers.push(e),e.manager=this,this.touchAction.update(),e},t.remove=function(e){if(kg(e,`remove`,this))return this;var t=this.get(e);if(e){var n=this.recognizers,r=og(n,t);r!==-1&&(n.splice(r,1),this.touchAction.update())}return this},t.on=function(e,t){if(e===void 0||t===void 0)return this;var n=this.handlers;return Lh(tg(e),function(e){n[e]=n[e]||[],n[e].push(t)}),this},t.off=function(e,t){if(e===void 0)return this;var n=this.handlers;return Lh(tg(e),function(e){t?n[e]&&n[e].splice(og(n[e],t),1):delete n[e]}),this},t.emit=function(e,t){this.options.domEvents&&t_(e,t);var n=this.handlers[e]&&this.handlers[e].slice();if(!(!n||!n.length)){t.type=e,t.preventDefault=function(){t.srcEvent.preventDefault()};for(var r=0;r<n.length;)n[r](t),r++}},t.destroy=function(){this.element&&e_(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null},e}(),r_={touchstart:Ch,touchmove:wh,touchend:Th,touchcancel:Eh},i_=`touchstart`,a_=`touchstart touchmove touchend touchcancel`,o_=function(e){qm(t,e);function t(){var n,r=t.prototype;return r.evTarget=i_,r.evWin=a_,n=e.apply(this,arguments)||this,n.started=!1,n}var n=t.prototype;return n.handler=function(e){var t=r_[e.type];if(t===Ch&&(this.started=!0),this.started){var n=s_.call(this,e,t);t&(Th|Eh)&&n[0].length-n[1].length===0&&(this.started=!1),this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:vh,srcEvent:e})}},t}(ag);function s_(e,t){var n=fg(e.touches),r=fg(e.changedTouches);return t&(Th|Eh)&&(n=pg(n.concat(r),`identifier`,!0)),[n,r]}function c_(e,t,n){var r=`DEPRECATED METHOD: `+t+`-`+n+` AT-`;return function(){var t=Error(`get-stack-trace`),n=t&&t.stack?t.stack.replace(/^[^\(]+?[\n$]/gm,``).replace(/^\s+at\s+/gm,``).replace(/^Object.<anonymous>\s*\(/gm,`{anonymous}()@`):`Unknown Stack Trace`,i=window.console&&(window.console.warn||window.console.log);return i&&i.call(window.console,r,n),e.apply(this,arguments)}}var l_=c_(function(e,t,n){for(var r=Object.keys(t),i=0;i<r.length;)(!n||n&&e[r[i]]===void 0)&&(e[r[i]]=t[r[i]]),i++;return e},`extend`,"Use `assign`."),u_=c_(function(e,t){return l_(e,t,!0)},`merge`,"Use `assign`.");function d_(e,t,n){var r=t.prototype,i=e.prototype=Object.create(r);i.constructor=e,i._super=r,n&&Ym(i,n)}function f_(e,t){return function(){return e.apply(t,arguments)}}var p_=function(){var e=function(e,t){return t===void 0&&(t={}),new n_(e,Km({recognizers:Zg.concat()},t))};return e.VERSION=`2.0.17-rc`,e.DIRECTION_ALL=Ph,e.DIRECTION_DOWN=jh,e.DIRECTION_LEFT=Oh,e.DIRECTION_RIGHT=kh,e.DIRECTION_UP=Ah,e.DIRECTION_HORIZONTAL=Mh,e.DIRECTION_VERTICAL=Nh,e.DIRECTION_NONE=Dh,e.DIRECTION_DOWN=jh,e.INPUT_START=Ch,e.INPUT_MOVE=wh,e.INPUT_END=Th,e.INPUT_CANCEL=Eh,e.STATE_POSSIBLE=Ag,e.STATE_BEGAN=jg,e.STATE_CHANGED=Mg,e.STATE_ENDED=Ng,e.STATE_RECOGNIZED=Pg,e.STATE_CANCELLED=Fg,e.STATE_FAILED=Ig,e.Manager=n_,e.Input=ag,e.TouchAction=Vh,e.TouchInput=gg,e.MouseInput=xg,e.PointerEventInput=dg,e.TouchMouseInput=Dg,e.SingleTouchInput=o_,e.Recognizer=Vg,e.AttrRecognizer=Ug,e.Tap=Hg,e.Pan=Gg,e.Swipe=Kg,e.Pinch=qg,e.Rotate=Jg,e.Press=Yg,e.on=ng,e.off=rg,e.each=Lh,e.merge=u_,e.extend=l_,e.bindFn=f_,e.assign=Ym,e.inherit=d_,e.bindFn=f_,e.prefixed=nh,e.toArray=fg,e.inArray=og,e.uniqueArray=pg,e.splitStr=tg,e.boolOrFn=Rh,e.hasParent=Hh,e.addEventListeners=ng,e.removeEventListeners=rg,e.defaults=Ym({},Xg,{preset:Zg}),e}(),m_=td(`DELETE`);function h_(e){return g_({},e,...[...arguments].slice(1))}function g_(){let e=__(...arguments);return y_(e),e}function __(){var e=[...arguments];if(e.length<2)return e[0];if(e.length>2)return __(g_(e[0],e[1]),..._d(e).call(e,2));let t=e[0],n=e[1];if(t instanceof Date&&n instanceof Date)return t.setTime(n.getTime()),t;for(let e of Nd(n))Object.prototype.propertyIsEnumerable.call(n,e)&&(n[e]===m_?delete t[e]:t[e]!==null&&n[e]!==null&&typeof t[e]==`object`&&typeof n[e]==`object`&&!Kd(t[e])&&!Kd(n[e])?t[e]=__(t[e],n[e]):t[e]=v_(n[e]));return t}function v_(e){return Kd(e)?Eu(e).call(e,e=>v_(e)):typeof e==`object`&&e?e instanceof Date?new Date(e.getTime()):__({},e):e}function y_(e){for(let t of of(e))e[t]===m_?delete e[t]:typeof e[t]==`object`&&e[t]!==null&&y_(e[t])}function b_(){let e=()=>{};return{on:e,off:e,destroy:e,emit:e,get(){return{set:e}}}}var x_=typeof window<`u`?window.Hammer||p_:function(){return b_()};function S_(e){var t;this._cleanupQueue=[],this.active=!1,this._dom={container:e,overlay:document.createElement(`div`)},this._dom.overlay.classList.add(`vis-overlay`),this._dom.container.appendChild(this._dom.overlay),this._cleanupQueue.push(()=>{this._dom.overlay.parentNode.removeChild(this._dom.overlay)});let n=x_(this._dom.overlay);n.on(`tap`,bl(t=this._onTapOverlay).call(t,this)),this._cleanupQueue.push(()=>{n.destroy()});let r=[`tap`,`doubletap`,`press`,`pinch`,`pan`,`panstart`,`panmove`,`panend`];Tf(r).call(r,e=>{n.on(e,e=>{e.srcEvent.stopPropagation()})}),document&&document.body&&(this._onClick=t=>{C_(t.target,e)||this.deactivate()},document.body.addEventListener(`click`,this._onClick),this._cleanupQueue.push(()=>{document.body.removeEventListener(`click`,this._onClick)})),this._escListener=e=>{(`key`in e?e.key===`Escape`:e.keyCode===27)&&this.deactivate()}}Gm(S_.prototype),S_.current=null,S_.prototype.destroy=function(){this.deactivate();for(let n of Vf(e=lp(t=this._cleanupQueue).call(t,0)).call(e)){var e,t;n()}},S_.prototype.activate=function(){S_.current&&S_.current.deactivate(),S_.current=this,this.active=!0,this._dom.overlay.style.display=`none`,this._dom.container.classList.add(`vis-active`),this.emit(`change`),this.emit(`activate`),document.body.addEventListener(`keydown`,this._escListener)},S_.prototype.deactivate=function(){this.active=!1,this._dom.overlay.style.display=`block`,this._dom.container.classList.remove(`vis-active`),document.body.removeEventListener(`keydown`,this._escListener),this.emit(`change`),this.emit(`deactivate`)},S_.prototype._onTapOverlay=function(e){this.activate(),e.srcEvent.stopPropagation()};function C_(e,t){for(;e;){if(e===t)return!0;e=e.parentNode}return!1}var w_,T_;function E_(){return T_?w_:(T_=1,da(),w_=Oe().Object.getOwnPropertySymbols,w_)}var D_,O_;function k_(){return O_?D_:(O_=1,D_=E_(),D_)}var A_,j_;function M_(){return j_?A_:(j_=1,A_=k_(),A_)}var N_=n(M_()),P_={exports:{}},F_={},I_;function L_(){if(I_)return F_;I_=1;var e=j(),t=u(),n=Se(),r=Gt().f,i=A();return e({target:`Object`,stat:!0,forced:!i||t(function(){r(1)}),sham:!i},{getOwnPropertyDescriptor:function(e,t){return r(n(e),t)}}),F_}var R_;function z_(){if(R_)return P_.exports;R_=1,L_();var e=Oe().Object,t=P_.exports=function(t,n){return e.getOwnPropertyDescriptor(t,n)};return e.getOwnPropertyDescriptor.sham&&(t.sham=!0),P_.exports}var B_,V_;function H_(){return V_?B_:(V_=1,B_=z_(),B_)}var U_,W_;function G_(){return W_?U_:(W_=1,U_=H_(),U_)}var K_=n(G_()),q_={},J_;function Y_(){if(J_)return q_;J_=1;var e=j(),t=A(),n=xd(),r=Se(),i=Gt(),a=Zn();return e({target:`Object`,stat:!0,sham:!t},{getOwnPropertyDescriptors:function(e){for(var t=r(e),o=i.f,s=n(t),c={},l=0,u,d;s.length>l;)d=o(t,u=s[l++]),d!==void 0&&a(c,u,d);return c}}),q_}var X_,Z_;function Q_(){return Z_?X_:(Z_=1,Y_(),X_=Oe().Object.getOwnPropertyDescriptors,X_)}var $_,ev;function tv(){return ev?$_:(ev=1,$_=Q_(),$_)}var nv,rv;function iv(){return rv?nv:(rv=1,nv=tv(),nv)}var av=n(iv()),ov={exports:{}},sv={},cv;function lv(){if(cv)return sv;cv=1;var e=j(),t=A(),n=Kr().f;return e({target:`Object`,stat:!0,forced:Object.defineProperties!==n,sham:!t},{defineProperties:n}),sv}var uv;function dv(){if(uv)return ov.exports;uv=1,lv();var e=Oe().Object,t=ov.exports=function(t,n){return e.defineProperties(t,n)};return e.defineProperties.sham&&(t.sham=!0),ov.exports}var fv,pv;function mv(){return pv?fv:(pv=1,fv=dv(),fv)}var hv,gv;function _v(){return gv?hv:(gv=1,hv=mv(),hv)}var vv=n(_v()),yv,bv;function xv(){return bv?yv:(bv=1,yv=yn(),yv)}var Sv=n(xv()),Cv={},wv={},Tv={exports:{}},Ev,Dv;function Ov(){return Dv?Ev:(Dv=1,Ev=u()(function(){if(typeof ArrayBuffer==`function`){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,`a`,{value:8})}}),Ev)}var kv,Av;function jv(){if(Av)return kv;Av=1;var e=u(),t=Te(),n=S(),r=Ov(),i=Object.isExtensible;return kv=e(function(){})||r?function(e){return!t(e)||r&&n(e)===`ArrayBuffer`?!1:i?i(e):!0}:i,kv}var Mv,Nv;function Pv(){return Nv?Mv:(Nv=1,Mv=!u()(function(){return Object.isExtensible(Object.preventExtensions({}))}),Mv)}var Fv;function Iv(){if(Fv)return Tv.exports;Fv=1;var e=j(),t=y(),n=Fr(),r=Te(),i=Tt(),a=sn().f,o=ii(),s=ui(),c=jv(),l=Ot(),u=Pv(),d=!1,f=l(`meta`),p=0,m=function(e){a(e,f,{value:{objectID:`O`+ p++,weakData:{}}})},h=Tv.exports={enable:function(){h.enable=function(){},d=!0;var n=o.f,r=t([].splice),i={};i[f]=1,n(i).length&&(o.f=function(e){for(var t=n(e),i=0,a=t.length;i<a;i++)if(t[i]===f){r(t,i,1);break}return t},e({target:`Object`,stat:!0,forced:!0},{getOwnPropertyNames:s.f}))},fastKey:function(e,t){if(!r(e))return typeof e==`symbol`?e:(typeof e==`string`?`S`:`P`)+e;if(!i(e,f)){if(!c(e))return`F`;if(!t)return`E`;m(e)}return e[f].objectID},getWeakData:function(e,t){if(!i(e,f)){if(!c(e))return!0;if(!t)return!1;m(e)}return e[f].weakData},onFreeze:function(e){return u&&d&&c(e)&&!i(e,f)&&m(e),e}};return n[f]=!0,Tv.exports}var Lv,Rv;function zv(){if(Rv)return Lv;Rv=1;var e=jt(),t=go(),n=e(`iterator`),r=Array.prototype;return Lv=function(e){return e!==void 0&&(t.Array===e||r[n]===e)},Lv}var Bv,Vv;function Hv(){if(Vv)return Bv;Vv=1;var e=rr(),t=it(),n=ge(),r=go(),i=jt()(`iterator`);return Bv=function(a){if(!n(a))return t(a,i)||t(a,`@@iterator`)||r[e(a)]},Bv}var Uv,Wv;function Gv(){if(Wv)return Uv;Wv=1;var e=ie(),t=tt(),n=an(),r=Qe(),i=Hv(),a=TypeError;return Uv=function(o,s){var c=arguments.length<2?i(o):s;if(t(c))return n(e(c,o));throw new a(r(o)+` is not iterable`)},Uv}var Kv,qv;function Jv(){if(qv)return Kv;qv=1;var e=ie(),t=an(),n=it();return Kv=function(r,i,a){var o,s;t(r);try{if(o=n(r,`return`),!o){if(i===`throw`)throw a;return a}o=e(o,r)}catch(e){s=!0,o=e}if(i===`throw`)throw a;if(s)throw o;return t(o),a},Kv}var Yv,Xv;function Zv(){if(Xv)return Yv;Xv=1;var e=Zt(),t=ie(),n=an(),r=Qe(),i=zv(),a=Gn(),o=Pe(),s=Gv(),c=Hv(),l=Jv(),u=TypeError,d=function(e,t){this.stopped=e,this.result=t},f=d.prototype;return Yv=function(p,m,h){var g=h&&h.that,_=!!(h&&h.AS_ENTRIES),v=!!(h&&h.IS_RECORD),y=!!(h&&h.IS_ITERATOR),b=!!(h&&h.INTERRUPTED),x=e(m,g),S,C,w,T,E,D,O,ee=function(e){return S&&l(S,`normal`),new d(!0,e)},k=function(e){return _?(n(e),b?x(e[0],e[1],ee):x(e[0],e[1])):b?x(e,ee):x(e)};if(v)S=p.iterator;else if(y)S=p;else{if(C=c(p),!C)throw new u(r(p)+` is not iterable`);if(i(C)){for(w=0,T=a(p);T>w;w++)if(E=k(p[w]),E&&o(f,E))return E;return new d(!1)}S=s(p,C)}for(D=v?p.next:S.next;!(O=t(D,S)).done;){try{E=k(O.value)}catch(e){l(S,`throw`,e)}if(typeof E==`object`&&E&&o(f,E))return E}return new d(!1)},Yv}var Qv,$v;function ey(){if($v)return Qv;$v=1;var e=Pe(),t=TypeError;return Qv=function(n,r){if(e(r,n))return n;throw new t(`Incorrect invocation`)},Qv}var ty,ny;function ry(){if(ny)return ty;ny=1;var e=j(),t=s(),n=Iv(),r=u(),i=un(),a=Zv(),o=ey(),c=O(),l=Te(),d=ge(),f=Pi(),p=sn().f,m=Ui().forEach,h=A(),g=Bi(),_=g.set,v=g.getterFor;return ty=function(s,u,g){var y=s.indexOf(`Map`)!==-1,b=s.indexOf(`Weak`)!==-1,x=y?`set`:`add`,S=t[s],C=S&&S.prototype,w={},T;if(!h||!c(S)||!(b||C.forEach&&!r(function(){new S().entries().next()})))T=g.getConstructor(u,s,y,x),n.enable();else{T=u(function(e,t){_(o(e,E),{type:s,collection:new S}),d(t)||a(t,e[x],{that:e,AS_ENTRIES:y})});var E=T.prototype,D=v(s);m([`add`,`clear`,`delete`,`forEach`,`get`,`has`,`set`,`keys`,`values`,`entries`],function(e){var t=e===`add`||e===`set`;e in C&&!(b&&e===`clear`)&&i(E,e,function(n,r){var i=D(this).collection;if(!t&&b&&!l(n))return e===`get`?void 0:!1;var a=i[e](n===0?0:n,r);return t?this:a})}),b||p(E,`size`,{configurable:!0,get:function(){return D(this).collection.size}})}return f(T,s,!1,!0),w[s]=T,e({global:!0,forced:!0},w),b||g.setStrong(T,s,y),T},ty}var iy,ay;function oy(){if(ay)return iy;ay=1;var e=gi();return iy=function(t,n,r){for(var i in n)r&&r.unsafe&&t[i]?t[i]=n[i]:e(t,i,n[i],r);return t},iy}var sy,cy;function ly(){if(cy)return sy;cy=1;var e=je(),t=yi(),n=jt(),r=A(),i=n(`species`);return sy=function(n){var a=e(n);r&&a&&!a[i]&&t(a,i,{configurable:!0,get:function(){return this}})},sy}var uy,dy;function fy(){if(dy)return uy;dy=1;var e=ti(),t=yi(),n=oy(),r=Zt(),i=ey(),a=ge(),o=Zv(),s=Ko(),c=Yo(),l=ly(),u=A(),d=Iv().fastKey,f=Bi(),p=f.set,m=f.getterFor;return uy={getConstructor:function(s,c,l,f){var h=s(function(t,n){i(t,g),p(t,{type:c,index:e(null),first:null,last:null,size:0}),u||(t.size=0),a(n)||o(n,t[f],{that:t,AS_ENTRIES:l})}),g=h.prototype,_=m(c),v=function(e,t,n){var r=_(e),i=y(e,t),a,o;return i?i.value=n:(r.last=i={index:o=d(t,!0),key:t,value:n,previous:a=r.last,next:null,removed:!1},r.first||=i,a&&(a.next=i),u?r.size++:e.size++,o!==`F`&&(r.index[o]=i)),e},y=function(e,t){var n=_(e),r=d(t),i;if(r!==`F`)return n.index[r];for(i=n.first;i;i=i.next)if(i.key===t)return i};return n(g,{clear:function(){for(var t=this,n=_(t),r=n.first;r;)r.removed=!0,r.previous&&=r.previous.next=null,r=r.next;n.first=n.last=null,n.index=e(null),u?n.size=0:t.size=0},delete:function(e){var t=this,n=_(t),r=y(t,e);if(r){var i=r.next,a=r.previous;delete n.index[r.index],r.removed=!0,a&&(a.next=i),i&&(i.previous=a),n.first===r&&(n.first=i),n.last===r&&(n.last=a),u?n.size--:t.size--}return!!r},forEach:function(e){for(var t=_(this),n=r(e,arguments.length>1?arguments[1]:void 0),i;i=i?i.next:t.first;)for(n(i.value,i.key,this);i&&i.removed;)i=i.previous},has:function(e){return!!y(this,e)}}),n(g,l?{get:function(e){var t=y(this,e);return t&&t.value},set:function(e,t){return v(this,e===0?0:e,t)}}:{add:function(e){return v(this,e=e===0?0:e,e)}}),u&&t(g,`size`,{configurable:!0,get:function(){return _(this).size}}),h},setStrong:function(e,t,n){var r=t+` Iterator`,i=m(t),a=m(r);s(e,t,function(e,t){p(this,{type:r,target:e,state:i(e),kind:t,last:null})},function(){for(var e=a(this),t=e.kind,n=e.last;n&&n.removed;)n=n.previous;return!e.target||!(e.last=n=n?n.next:e.state.first)?(e.target=null,c(void 0,!0)):c(t===`keys`?n.key:t===`values`?n.value:[n.key,n.value],!1)},n?`entries`:`values`,!n,!0),l(t)}},uy}var py;function my(){return py?wv:(py=1,ry()(`Map`,function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},fy()),wv)}var hy;function gy(){return hy?Cv:(hy=1,my(),Cv)}var _y={},vy,yy;function by(){return yy?vy:(yy=1,vy=function(e,t){return t===1?function(t,n){return t[e](n)}:function(t,n,r){return t[e](n,r)}},vy)}var xy,Sy;function Cy(){if(Sy)return xy;Sy=1;var e=je(),t=by(),n=e(`Map`);return xy={Map:n,set:t(`set`,2),get:t(`get`,1),has:t(`has`,1),remove:t(`delete`,1),proto:n.prototype},xy}var wy;function Ty(){if(wy)return _y;wy=1;var e=j(),t=y(),n=tt(),r=ye(),i=Zv(),a=Cy(),o=dt(),s=u(),c=a.Map,l=a.has,d=a.get,f=a.set,p=t([].push),m=o||s(function(){return c.groupBy(`ab`,function(e){return e}).get(`a`).length!==1});return e({target:`Map`,stat:!0,forced:o||m},{groupBy:function(e,t){r(e),n(t);var a=new c,o=0;return i(e,function(e){var n=t(e,o++);l(a,n)?p(d(a,n),e):f(a,n,[e])}),a}}),_y}var Ey,Dy;function Oy(){return Dy?Ey:(Dy=1,Qo(),gy(),Ty(),gc(),Ey=Oe().Map,Ey)}var ky,Ay;function jy(){if(Ay)return ky;Ay=1;var e=Oy();return rs(),ky=e,ky}var My,Ny;function Py(){return Ny?My:(Ny=1,My=jy(),My)}var Fy=n(Py()),Iy={},Ly;function Ry(){if(Ly)return Iy;Ly=1;var e=j(),t=Ui().some;return e({target:`Array`,proto:!0,forced:!Dl()(`some`)},{some:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}}),Iy}var zy,By;function Vy(){return By?zy:(By=1,Ry(),zy=sl()(`Array`,`some`),zy)}var Hy,Uy;function Wy(){if(Uy)return Hy;Uy=1;var e=Pe(),t=Vy(),n=Array.prototype;return Hy=function(r){var i=r.some;return r===n||e(n,r)&&i===n.some?t:i},Hy}var Gy,Ky;function qy(){return Ky?Gy:(Ky=1,Gy=Wy(),Gy)}var Jy,Yy;function Xy(){return Yy?Jy:(Yy=1,Jy=qy(),Jy)}var Zy=n(Xy()),Qy,$y;function eb(){return $y?Qy:($y=1,Qo(),Qy=sl()(`Array`,`keys`),Qy)}var tb,nb;function rb(){return nb?tb:(nb=1,tb=eb(),tb)}var ib,ab;function ob(){if(ab)return ib;ab=1,rs();var e=rr(),t=Tt(),n=Pe(),r=rb(),i=Array.prototype,a={DOMTokenList:!0,NodeList:!0};return ib=function(o){var s=o.keys;return o===i||n(i,o)&&s===i.keys||t(a,e(o))?r:s},ib}var sb,cb;function lb(){return cb?sb:(cb=1,sb=ob(),sb)}var ub=n(lb()),db={},fb,pb;function mb(){if(pb)return fb;pb=1;var e=ci(),t=Math.floor,n=function(r,i){var a=r.length;if(a<8)for(var o=1,s,c;o<a;){for(c=o,s=r[o];c&&i(r[c-1],s)>0;)r[c]=r[--c];c!==o++&&(r[c]=s)}else for(var l=t(a/2),u=n(e(r,0,l),i),d=n(e(r,l),i),f=u.length,p=d.length,m=0,h=0;m<f||h<p;)r[m+h]=m<f&&h<p?i(u[m],d[h])<=0?u[m++]:d[h++]:m<f?u[m++]:d[h++];return r};return fb=n,fb}var hb,gb;function _b(){if(gb)return hb;gb=1;var e=Le().match(/firefox\/(\d+)/i);return hb=!!e&&+e[1],hb}var vb,yb;function bb(){if(yb)return vb;yb=1;var e=Le();return vb=/MSIE|Trident/.test(e),vb}var xb,Sb;function Cb(){if(Sb)return xb;Sb=1;var e=Le().match(/AppleWebKit\/(\d+)\./);return xb=!!e&&+e[1],xb}var wb;function Tb(){if(wb)return db;wb=1;var e=j(),t=y(),n=tt(),r=St(),i=Gn(),a=Jf(),o=Tr(),s=u(),c=mb(),l=Dl(),d=_b(),f=bb(),p=Be(),m=Cb(),h=[],g=t(h.sort),_=t(h.push),v=s(function(){h.sort(void 0)}),b=s(function(){h.sort(null)}),x=l(`sort`),S=!s(function(){if(p)return p<70;if(!(d&&d>3)){if(f)return!0;if(m)return m<603;var e=``,t,n,r,i;for(t=65;t<76;t++){switch(n=String.fromCharCode(t),t){case 66:case 69:case 70:case 72:r=3;break;case 68:case 71:r=4;break;default:r=2}for(i=0;i<47;i++)h.push({k:n+i,v:r})}for(h.sort(function(e,t){return t.v-e.v}),i=0;i<h.length;i++)n=h[i].k.charAt(0),e.charAt(e.length-1)!==n&&(e+=n);return e!==`DGBEFHACIJK`}}),C=v||!b||!x||!S,w=function(e){return function(t,n){return n===void 0?-1:t===void 0?1:e===void 0?o(t)>o(n)?1:-1:+e(t,n)||0}};return e({target:`Array`,proto:!0,forced:C},{sort:function(e){e!==void 0&&n(e);var t=r(this);if(S)return e===void 0?g(t):g(t,e);var o=[],s=i(t),l,u;for(u=0;u<s;u++)u in t&&_(o,t[u]);for(c(o,w(e)),l=i(o),u=0;u<l;)t[u]=o[u++];for(;u<s;)a(t,u++);return t}}),db}var Eb,Db;function Ob(){return Db?Eb:(Db=1,Tb(),Eb=sl()(`Array`,`sort`),Eb)}var kb,Ab;function jb(){if(Ab)return kb;Ab=1;var e=Pe(),t=Ob(),n=Array.prototype;return kb=function(r){var i=r.sort;return r===n||e(n,r)&&i===n.sort?t:i},kb}var Mb,Nb;function Pb(){return Nb?Mb:(Nb=1,Mb=jb(),Mb)}var Fb,Ib;function Lb(){return Ib?Fb:(Ib=1,Fb=Pb(),Fb)}var Rb=n(Lb()),zb,Bb;function Vb(){return Bb?zb:(Bb=1,Qo(),zb=sl()(`Array`,`values`),zb)}var Hb,Ub;function Wb(){return Ub?Hb:(Ub=1,Hb=Vb(),Hb)}var Gb,Kb;function qb(){if(Kb)return Gb;Kb=1,rs();var e=rr(),t=Tt(),n=Pe(),r=Wb(),i=Array.prototype,a={DOMTokenList:!0,NodeList:!0};return Gb=function(o){var s=o.values;return o===i||n(i,o)&&s===i.values||t(a,e(o))?r:s},Gb}var Jb,Yb;function Xb(){return Yb?Jb:(Yb=1,Jb=qb(),Jb)}var Zb=n(Xb()),Qb,$b;function ex(){return $b?Qb:($b=1,Qb=Sc(),Qb)}var tx=n(ex()),nx,rx;function ix(){return rx?nx:(rx=1,Qo(),nx=sl()(`Array`,`entries`),nx)}var ax,ox;function sx(){return ox?ax:(ox=1,ax=ix(),ax)}var cx,lx;function ux(){if(lx)return cx;lx=1,rs();var e=rr(),t=Tt(),n=Pe(),r=sx(),i=Array.prototype,a={DOMTokenList:!0,NodeList:!0};return cx=function(o){var s=o.entries;return o===i||n(i,o)&&s===i.entries||t(a,e(o))?r:s},cx}var dx,fx;function px(){return fx?dx:(fx=1,dx=ux(),dx)}var mx=n(px()),hx=[];for(let e=0;e<256;++e)hx.push((e+256).toString(16).slice(1));function gx(e,t=0){return(hx[e[t+0]]+hx[e[t+1]]+hx[e[t+2]]+hx[e[t+3]]+`-`+hx[e[t+4]]+hx[e[t+5]]+`-`+hx[e[t+6]]+hx[e[t+7]]+`-`+hx[e[t+8]]+hx[e[t+9]]+`-`+hx[e[t+10]]+hx[e[t+11]]+hx[e[t+12]]+hx[e[t+13]]+hx[e[t+14]]+hx[e[t+15]]).toLowerCase()}var _x,vx=new Uint8Array(16);function yx(){if(!_x){if(typeof crypto>`u`||!crypto.getRandomValues)throw Error(`crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported`);_x=crypto.getRandomValues.bind(crypto)}return _x(vx)}var bx={randomUUID:typeof crypto<`u`&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function xx(e,t,n){e||={};let r=e.random??e.rng?.()??yx();if(r.length<16)throw Error(`Random bytes length must be >= 16`);return r[6]=r[6]&15|64,r[8]=r[8]&63|128,gx(r)}function Sx(e,t,n){return bx.randomUUID&&!e?bx.randomUUID():xx(e)}function Cx(e){return typeof e==`string`||typeof e==`number`}var wx=class e{constructor(e){Qc(this,`_queue`,[]),Qc(this,`_timeout`,null),Qc(this,`_extended`,null),this.delay=null,this.max=1/0,this.setOptions(e)}setOptions(e){e&&e.delay!==void 0&&(this.delay=e.delay),e&&e.max!==void 0&&(this.max=e.max),this._flushIfNeeded()}static extend(t,n){let r=new e(n);if(t.flush!==void 0)throw Error(`Target object already has a property flush`);t.flush=()=>{r.flush()};let i=[{name:`flush`,original:void 0}];if(n&&n.replace)for(let e=0;e<n.replace.length;e++){let a=n.replace[e];i.push({name:a,original:t[a]}),r.replace(t,a)}return r._extended={object:t,methods:i},r}destroy(){if(this.flush(),this._extended){let e=this._extended.object,t=this._extended.methods;for(let n=0;n<t.length;n++){let r=t[n];r.original?e[r.name]=r.original:delete e[r.name]}this._extended=null}}replace(e,t){let n=this,r=e[t];if(!r)throw Error(`Method `+t+` undefined`);e[t]=function(){var e=[...arguments];n.queue({args:e,fn:r,context:this})}}queue(e){typeof e==`function`?this._queue.push({fn:e}):this._queue.push(e),this._flushIfNeeded()}_flushIfNeeded(){this._queue.length>this.max&&this.flush(),this._timeout!=null&&(clearTimeout(this._timeout),this._timeout=null),this.queue.length>0&&typeof this.delay==`number`&&(this._timeout=Vm(()=>{this.flush()},this.delay))}flush(){var e,t;Tf(e=lp(t=this._queue).call(t,0)).call(e,e=>{e.fn.apply(e.context||e.fn,e.args||[])})}},Tx=class e{constructor(){Qc(this,`_subscribers`,{"*":[],add:[],remove:[],update:[]}),Qc(this,`subscribe`,e.prototype.on),Qc(this,`unsubscribe`,e.prototype.off)}_trigger(e,t,n){var r;if(e===`*`)throw Error(`Cannot trigger event *`);Tf(r=[...this._subscribers[e],...this._subscribers[`*`]]).call(r,r=>{r(e,t,n??null)})}on(e,t){typeof t==`function`&&this._subscribers[e].push(t)}off(e,t){var n;this._subscribers[e]=uu(n=this._subscribers[e]).call(n,e=>e!==t)}},Ex={},Dx={},Ox;function kx(){return Ox?Dx:(Ox=1,ry()(`Set`,function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},fy()),Dx)}var Ax;function jx(){return Ax?Ex:(Ax=1,kx(),Ex)}var Mx={},Nx,Px;function Fx(){if(Px)return Nx;Px=1;var e=Qe(),t=TypeError;return Nx=function(n){if(typeof n==`object`&&`size`in n&&`has`in n&&`add`in n&&`delete`in n&&`keys`in n)return n;throw new t(e(n)+` is not a set`)},Nx}var Ix,Lx;function Rx(){if(Lx)return Ix;Lx=1;var e=je(),t=by(),n=e(`Set`),r=n.prototype;return Ix={Set:n,add:t(`add`,1),has:t(`has`,1),remove:t(`delete`,1),proto:r},Ix}var zx,Bx;function Vx(){if(Bx)return zx;Bx=1;var e=ie();return zx=function(t,n,r){for(var i=r?t:t.iterator,a=t.next,o,s;!(o=e(a,i)).done;)if(s=n(o.value),s!==void 0)return s},zx}var Hx,Ux;function Wx(){if(Ux)return Hx;Ux=1;var e=Vx();return Hx=function(t,n,r){return r?e(t.keys(),n,!0):t.forEach(n)},Hx}var Gx,Kx;function qx(){if(Kx)return Gx;Kx=1;var e=Rx(),t=Wx(),n=e.Set,r=e.add;return Gx=function(e){var i=new n;return t(e,function(e){r(i,e)}),i},Gx}var Jx,Yx;function Xx(){return Yx?Jx:(Yx=1,Jx=function(e){return e.size},Jx)}var Zx,Qx;function $x(){return Qx?Zx:(Qx=1,Zx=function(e){return{iterator:e,next:e.next,done:!1}},Zx)}var eS,tS;function nS(){if(tS)return eS;tS=1;var e=tt(),t=an(),n=ie(),r=zn(),i=$x(),a=`Invalid size`,o=RangeError,s=TypeError,c=Math.max,l=function(t,n){this.set=t,this.size=c(n,0),this.has=e(t.has),this.keys=e(t.keys)};return l.prototype={getIterator:function(){return i(t(n(this.keys,this.set)))},includes:function(e){return n(this.has,this.set,e)}},eS=function(e){t(e);var n=+e.size;if(n!==n)throw new s(a);var i=r(n);if(i<0)throw new o(a);return new l(e,i)},eS}var rS,iS;function aS(){if(iS)return rS;iS=1;var e=Fx(),t=Rx(),n=qx(),r=Xx(),i=nS(),a=Wx(),o=Vx(),s=t.has,c=t.remove;return rS=function(t){var l=e(this),u=i(t),d=n(l);return r(l)<=u.size?a(l,function(e){u.includes(e)&&c(d,e)}):o(u.getIterator(),function(e){s(d,e)&&c(d,e)}),d},rS}var oS,sS;function cS(){return sS?oS:(sS=1,oS=function(){return!1},oS)}var lS;function uS(){if(lS)return Mx;lS=1;var e=j(),t=aS(),n=u();return e({target:`Set`,proto:!0,real:!0,forced:!cS()(`difference`,function(e){return e.size===0})||n(function(){var e={size:1,has:function(){return!0},keys:function(){var e=0;return{next:function(){var n=e++>1;return t.has(1)&&t.clear(),{done:n,value:2}}}}},t=new Set([1,2,3,4]);return t.difference(e).size!==3})},{difference:t}),Mx}var dS={},fS,pS;function mS(){if(pS)return fS;pS=1;var e=Fx(),t=Rx(),n=Xx(),r=nS(),i=Wx(),a=Vx(),o=t.Set,s=t.add,c=t.has;return fS=function(t){var l=e(this),u=r(t),d=new o;return n(l)>u.size?a(u.getIterator(),function(e){c(l,e)&&s(d,e)}):i(l,function(e){u.includes(e)&&s(d,e)}),d},fS}var hS;function gS(){if(hS)return dS;hS=1;var e=j(),t=u(),n=mS();return e({target:`Set`,proto:!0,real:!0,forced:!cS()(`intersection`,function(e){return e.size===2&&e.has(1)&&e.has(2)})||t(function(){return String(Array.from(new Set([1,2,3]).intersection(new Set([3,2]))))!==`3,2`})},{intersection:n}),dS}var _S={},vS,yS;function bS(){if(yS)return vS;yS=1;var e=Fx(),t=Rx().has,n=Xx(),r=nS(),i=Wx(),a=Vx(),o=Jv();return vS=function(s){var c=e(this),l=r(s);if(n(c)<=l.size)return i(c,function(e){if(l.includes(e))return!1},!0)!==!1;var u=l.getIterator();return a(u,function(e){if(t(c,e))return o(u,`normal`,!1)})!==!1},vS}var xS;function SS(){if(xS)return _S;xS=1;var e=j(),t=bS();return e({target:`Set`,proto:!0,real:!0,forced:!cS()(`isDisjointFrom`,function(e){return!e})},{isDisjointFrom:t}),_S}var CS={},wS,TS;function ES(){if(TS)return wS;TS=1;var e=Fx(),t=Xx(),n=Wx(),r=nS();return wS=function(i){var a=e(this),o=r(i);return t(a)>o.size?!1:n(a,function(e){if(!o.includes(e))return!1},!0)!==!1},wS}var DS;function OS(){if(DS)return CS;DS=1;var e=j(),t=ES();return e({target:`Set`,proto:!0,real:!0,forced:!cS()(`isSubsetOf`,function(e){return e})},{isSubsetOf:t}),CS}var kS={},AS,jS;function MS(){if(jS)return AS;jS=1;var e=Fx(),t=Rx().has,n=Xx(),r=nS(),i=Vx(),a=Jv();return AS=function(o){var s=e(this),c=r(o);if(n(s)<c.size)return!1;var l=c.getIterator();return i(l,function(e){if(!t(s,e))return a(l,`normal`,!1)})!==!1},AS}var NS;function PS(){if(NS)return kS;NS=1;var e=j(),t=MS();return e({target:`Set`,proto:!0,real:!0,forced:!cS()(`isSupersetOf`,function(e){return!e})},{isSupersetOf:t}),kS}var FS={},IS,LS;function RS(){if(LS)return IS;LS=1;var e=Fx(),t=Rx(),n=qx(),r=nS(),i=Vx(),a=t.add,o=t.has,s=t.remove;return IS=function(t){var c=e(this),l=r(t).getIterator(),u=n(c);return i(l,function(e){o(c,e)?s(u,e):a(u,e)}),u},IS}var zS,BS;function VS(){return BS?zS:(BS=1,zS=function(e){try{var t=new Set,n=t[e]({size:0,has:function(){return!0},keys:function(){return Object.defineProperty({},`next`,{get:function(){return t.clear(),t.add(4),function(){return{done:!0}}}})}});return n.size===1&&n.values().next().value===4}catch{return!1}},zS)}var HS;function US(){if(HS)return FS;HS=1;var e=j(),t=RS(),n=VS();return e({target:`Set`,proto:!0,real:!0,forced:!cS()(`symmetricDifference`)||!n(`symmetricDifference`)},{symmetricDifference:t}),FS}var WS={},GS,KS;function qS(){if(KS)return GS;KS=1;var e=Fx(),t=Rx().add,n=qx(),r=nS(),i=Vx();return GS=function(a){var o=e(this),s=r(a).getIterator(),c=n(o);return i(s,function(e){t(c,e)}),c},GS}var JS;function YS(){if(JS)return WS;JS=1;var e=j(),t=qS(),n=VS();return e({target:`Set`,proto:!0,real:!0,forced:!cS()(`union`)||!n(`union`)},{union:t}),WS}var XS,ZS;function QS(){return ZS?XS:(ZS=1,Qo(),jx(),uS(),gS(),SS(),OS(),PS(),US(),YS(),gc(),XS=Oe().Set,XS)}var $S,eC;function tC(){if(eC)return $S;eC=1;var e=QS();return rs(),$S=e,$S}var nC,rC;function iC(){return rC?nC:(rC=1,nC=tC(),nC)}var aC=n(iC()),oC,sC;function cC(){return sC?oC:(sC=1,Qo(),gc(),oC=Gv(),oC)}var lC,uC;function dC(){if(uC)return lC;uC=1;var e=cC();return rs(),lC=e,lC}var fC,pC;function mC(){return pC?fC:(pC=1,fC=dC(),fC)}var hC,gC;function _C(){return gC?hC:(gC=1,hC=mC(),hC)}var vC,yC;function bC(){return yC?vC:(yC=1,vC=_C(),vC)}var xC,SC;function CC(){return SC?xC:(SC=1,xC=bC(),xC)}var wC=n(CC()),TC=class e{constructor(e){this._pairs=e}*[tx](){for(let[e,t]of this._pairs)yield[e,t]}*entries(){for(let[e,t]of this._pairs)yield[e,t]}*keys(){for(let[e]of this._pairs)yield e}*values(){for(let[,e]of this._pairs)yield e}toIdArray(){var e;return Eu(e=[...this._pairs]).call(e,e=>e[0])}toItemArray(){var e;return Eu(e=[...this._pairs]).call(e,e=>e[1])}toEntryArray(){return[...this._pairs]}toObjectMap(){let e=Zp(null);for(let[t,n]of this._pairs)e[t]=n;return e}toMap(){return new Fy(this._pairs)}toIdSet(){return new aC(this.toIdArray())}toItemSet(){return new aC(this.toItemArray())}cache(){return new e([...this._pairs])}distinct(e){let t=new aC;for(let[n,r]of this._pairs)t.add(e(r,n));return t}filter(t){let n=this._pairs;return new e({*[tx](){for(let[e,r]of n)t(r,e)&&(yield[e,r])}})}forEach(e){for(let[t,n]of this._pairs)e(n,t)}map(t){let n=this._pairs;return new e({*[tx](){for(let[e,r]of n)yield[e,t(r,e)]}})}max(e){let t=wC(this._pairs),n=t.next();if(n.done)return null;let r=n.value[1],i=e(n.value[1],n.value[0]);for(;!(n=t.next()).done;){let[t,a]=n.value,o=e(a,t);o>i&&(i=o,r=a)}return r}min(e){let t=wC(this._pairs),n=t.next();if(n.done)return null;let r=n.value[1],i=e(n.value[1],n.value[0]);for(;!(n=t.next()).done;){let[t,a]=n.value,o=e(a,t);o<i&&(i=o,r=a)}return r}reduce(e,t){for(let[n,r]of this._pairs)t=e(t,r,n);return t}sort(t){return new e({[tx]:()=>{var e;return wC(Rb(e=[...this._pairs]).call(e,(e,n)=>{let[r,i]=e,[a,o]=n;return t(i,o,r,a)}))}})}};function EC(e,t){var n=of(e);if(N_){var r=N_(e);t&&(r=uu(r).call(r,function(t){return K_(e,t).enumerable})),n.push.apply(n,r)}return n}function DC(e){for(var t=1;t<arguments.length;t++){var n,r,i=arguments[t]==null?{}:arguments[t];t%2?Tf(n=EC(Object(i),!0)).call(n,function(t){Qc(e,t,i[t])}):av?vv(e,av(i)):Tf(r=EC(Object(i))).call(r,function(t){Sv(e,t,K_(i,t))})}return e}function OC(e,t){return e[t]??(e[t]=Sx()),e}var kC=class extends Tx{get idProp(){return this._idProp}constructor(e,t){super(),Qc(this,`_queue`,null),e&&!Kd(e)&&(t=e,e=[]),this._options=t||{},this._data=new Fy,this.length=0,this._idProp=this._options.fieldId||`id`,e&&e.length&&this.add(e),this.setOptions(t)}setOptions(e){e&&e.queue!==void 0&&(e.queue===!1?this._queue&&=(this._queue.destroy(),null):(this._queue||=wx.extend(this,{replace:[`add`,`update`,`remove`]}),e.queue&&typeof e.queue==`object`&&this._queue.setOptions(e.queue)))}add(e,t){let n=[],r;if(Kd(e)){let t=Eu(e).call(e,e=>e[this._idProp]);if(Zy(t).call(t,e=>this._data.has(e)))throw Error(`A duplicate id was found in the parameter array.`);for(let t=0,i=e.length;t<i;t++)r=this._addItem(e[t]),n.push(r)}else if(e&&typeof e==`object`)r=this._addItem(e),n.push(r);else throw Error(`Unknown dataType`);return n.length&&this._trigger(`add`,{items:n},t),n}update(e,t){let n=[],r=[],i=[],a=[],o=this._idProp,s=e=>{let t=e[o];if(t!=null&&this._data.has(t)){let n=e,o=Tp({},this._data.get(t)),s=this._updateItem(n);r.push(s),a.push(n),i.push(o)}else{let t=this._addItem(e);n.push(t)}};if(Kd(e))for(let t=0,n=e.length;t<n;t++)e[t]&&typeof e[t]==`object`?s(e[t]):console.warn(`Ignoring input item, which is not an object at index `+t);else if(e&&typeof e==`object`)s(e);else throw Error(`Unknown dataType`);if(n.length&&this._trigger(`add`,{items:n},t),r.length){let e={items:r,oldData:i,data:a};this._trigger(`update`,e,t)}return Rp(n).call(n,r)}updateOnly(e,t){var n;Kd(e)||(e=[e]);let r=Eu(n=Eu(e).call(e,e=>{let t=this._data.get(e[this._idProp]);if(t==null)throw Error(`Updating non-existent items is not allowed.`);return{oldData:t,update:e}})).call(n,e=>{let{oldData:t,update:n}=e,r=t[this._idProp],i=h_(t,n);return this._data.set(r,i),{id:r,oldData:t,updatedData:i}});if(r.length){let e={items:Eu(r).call(r,e=>e.id),oldData:Eu(r).call(r,e=>e.oldData),data:Eu(r).call(r,e=>e.updatedData)};return this._trigger(`update`,e,t),e.items}else return[]}get(e,t){let n,r,i;Cx(e)?(n=e,i=t):Kd(e)?(r=e,i=t):i=e;let a=i&&i.returnType===`Object`?`Object`:`Array`,o=i&&uu(i),s=[],c,l,u;if(n!=null)c=this._data.get(n),c&&o&&!o(c)&&(c=void 0);else if(r!=null)for(let e=0,t=r.length;e<t;e++)c=this._data.get(r[e]),c!=null&&(!o||o(c))&&s.push(c);else{var d;l=[...ub(d=this._data).call(d)];for(let e=0,t=l.length;e<t;e++)u=l[e],c=this._data.get(u),c!=null&&(!o||o(c))&&s.push(c)}if(i&&i.order&&n==null&&this._sort(s,i.order),i&&i.fields){let e=i.fields;if(n!=null&&c!=null)c=this._filterFields(c,e);else for(let t=0,n=s.length;t<n;t++)s[t]=this._filterFields(s[t],e)}if(a==`Object`){let e={};for(let t=0,n=s.length;t<n;t++){let n=s[t],r=n[this._idProp];e[r]=n}return e}else if(n!=null)return c??null;else return s}getIds(e){let t=this._data,n=e&&uu(e),r=e&&e.order,i=[...ub(t).call(t)],a=[];if(n)if(r){let e=[];for(let t=0,r=i.length;t<r;t++){let r=i[t],a=this._data.get(r);a!=null&&n(a)&&e.push(a)}this._sort(e,r);for(let t=0,n=e.length;t<n;t++)a.push(e[t][this._idProp])}else for(let e=0,t=i.length;e<t;e++){let t=i[e],r=this._data.get(t);r!=null&&n(r)&&a.push(r[this._idProp])}else if(r){let e=[];for(let n=0,r=i.length;n<r;n++){let r=i[n];e.push(t.get(r))}this._sort(e,r);for(let t=0,n=e.length;t<n;t++)a.push(e[t][this._idProp])}else for(let e=0,n=i.length;e<n;e++){let n=i[e],r=t.get(n);r!=null&&a.push(r[this._idProp])}return a}getDataSet(){return this}forEach(e,t){let n=t&&uu(t),r=this._data,i=[...ub(r).call(r)];if(t&&t.order){let n=this.get(t);for(let t=0,r=n.length;t<r;t++){let r=n[t],i=r[this._idProp];e(r,i)}}else for(let t=0,r=i.length;t<r;t++){let r=i[t],a=this._data.get(r);a!=null&&(!n||n(a))&&e(a,r)}}map(e,t){let n=t&&uu(t),r=[],i=this._data,a=[...ub(i).call(i)];for(let t=0,i=a.length;t<i;t++){let i=a[t],o=this._data.get(i);o!=null&&(!n||n(o))&&r.push(e(o,i))}return t&&t.order&&this._sort(r,t.order),r}_filterFields(e,t){var n;return e&&Jl(n=Kd(t)?t:of(t)).call(n,(t,n)=>(t[n]=e[n],t),{})}_sort(e,t){if(typeof t==`string`){let n=t;Rb(e).call(e,(e,t)=>{let r=e[n],i=t[n];return r>i?1:r<i?-1:0})}else if(typeof t==`function`)Rb(e).call(e,t);else throw TypeError(`Order must be a function or a string`)}remove(e,t){let n=[],r=[],i=Kd(e)?e:[e];for(let e=0,t=i.length;e<t;e++){let t=this._remove(i[e]);if(t){let e=t[this._idProp];e!=null&&(n.push(e),r.push(t))}}return n.length&&this._trigger(`remove`,{items:n,oldData:r},t),n}_remove(e){let t;if(Cx(e)?t=e:e&&typeof e==`object`&&(t=e[this._idProp]),t!=null&&this._data.has(t)){let e=this._data.get(t)||null;return this._data.delete(t),--this.length,e}return null}clear(e){var t;let n=[...ub(t=this._data).call(t)],r=[];for(let e=0,t=n.length;e<t;e++)r.push(this._data.get(n[e]));return this._data.clear(),this.length=0,this._trigger(`remove`,{items:n,oldData:r},e),n}max(e){let t=null,n=null;for(let i of Zb(r=this._data).call(r)){var r;let a=i[e];typeof a==`number`&&(n==null||a>n)&&(t=i,n=a)}return t||null}min(e){let t=null,n=null;for(let i of Zb(r=this._data).call(r)){var r;let a=i[e];typeof a==`number`&&(n==null||a<n)&&(t=i,n=a)}return t||null}distinct(e){let t=this._data,n=[...ub(t).call(t)],r=[],i=0;for(let a=0,o=n.length;a<o;a++){let o=n[a],s=t.get(o)[e],c=!1;for(let e=0;e<i;e++)if(r[e]==s){c=!0;break}!c&&s!==void 0&&(r[i]=s,i++)}return r}_addItem(e){let t=OC(e,this._idProp),n=t[this._idProp];if(this._data.has(n))throw Error(`Cannot add item: item with id `+n+` already exists`);return this._data.set(n,t),++this.length,n}_updateItem(e){let t=e[this._idProp];if(t==null)throw Error(`Cannot update item: item has no id (item: `+ym(e)+`)`);let n=this._data.get(t);if(!n)throw Error(`Cannot update item: no item with id `+t+` found`);return this._data.set(t,DC(DC({},n),e)),t}stream(e){if(e){let t=this._data;return new TC({*[tx](){for(let n of e){let e=t.get(n);e!=null&&(yield[n,e])}}})}else{var t;return new TC({[tx]:bl(t=mx(this._data)).call(t,this._data)})}}},AC=class e extends Tx{get idProp(){return this.getDataSet().idProp}constructor(e,t){var n;super(),Qc(this,`length`,0),Qc(this,`_ids`,new aC),this._options=t||{},this._listener=bl(n=this._onEvent).call(n,this),this.setData(e)}setData(e){if(this._data){this._data.off&&this._data.off(`*`,this._listener);let e=this._data.getIds({filter:uu(this._options)}),t=this._data.get(e);this._ids.clear(),this.length=0,this._trigger(`remove`,{items:e,oldData:t})}if(e!=null){this._data=e;let t=this._data.getIds({filter:uu(this._options)});for(let e=0,n=t.length;e<n;e++){let n=t[e];this._ids.add(n)}this.length=t.length,this._trigger(`add`,{items:t})}else this._data=new kC;this._data.on&&this._data.on(`*`,this._listener)}refresh(){let e=this._data.getIds({filter:uu(this._options)}),t=[...this._ids],n={},r=[],i=[],a=[];for(let t=0,i=e.length;t<i;t++){let i=e[t];n[i]=!0,this._ids.has(i)||(r.push(i),this._ids.add(i))}for(let e=0,r=t.length;e<r;e++){let r=t[e],o=this._data.get(r);o==null?console.error(`If you see this, report it please.`):n[r]||(i.push(r),a.push(o),this._ids.delete(r))}this.length+=r.length-i.length,r.length&&this._trigger(`add`,{items:r}),i.length&&this._trigger(`remove`,{items:i,oldData:a})}get(e,t){if(this._data==null)return null;let n=null,r;Cx(e)||Kd(e)?(n=e,r=t):r=e;let i=Tp({},this._options,r),a=uu(this._options),o=r&&uu(r);return a&&o&&(i.filter=e=>a(e)&&o(e)),n==null?this._data.get(i):this._data.get(n,i)}getIds(e){if(this._data.length){let t=uu(this._options),n=e==null?null:uu(e),r;return r=n?t?e=>t(e)&&n(e):n:t,this._data.getIds({filter:r,order:e&&e.order})}else return[]}forEach(e,t){if(this._data){var n;let r=uu(this._options),i=t&&uu(t),a;a=i?r?function(e){return r(e)&&i(e)}:i:r,Tf(n=this._data).call(n,e,{filter:a,order:t&&t.order})}}map(e,t){if(this._data){var n;let r=uu(this._options),i=t&&uu(t),a;return a=i?r?e=>r(e)&&i(e):i:r,Eu(n=this._data).call(n,e,{filter:a,order:t&&t.order})}else return[]}getDataSet(){return this._data.getDataSet()}stream(e){var t;return this._data.stream(e||{[tx]:bl(t=ub(this._ids)).call(t,this._ids)})}dispose(){var t;(t=this._data)!=null&&t.off&&this._data.off(`*`,this._listener);let n=`This data view has already been disposed of.`,r={get:()=>{throw Error(n)},set:()=>{throw Error(n)},configurable:!1};for(let t of Nd(e.prototype))Sv(this,t,r)}_onEvent(e,t,n){if(!t||!t.items||!this._data)return;let r=t.items,i=[],a=[],o=[],s=[],c=[],l=[];switch(e){case`add`:for(let e=0,t=r.length;e<t;e++){let t=r[e];this.get(t)&&(this._ids.add(t),i.push(t))}break;case`update`:for(let e=0,n=r.length;e<n;e++){let n=r[e];this.get(n)?this._ids.has(n)?(a.push(n),c.push(t.data[e]),s.push(t.oldData[e])):(this._ids.add(n),i.push(n)):this._ids.has(n)&&(this._ids.delete(n),o.push(n),l.push(t.oldData[e]))}break;case`remove`:for(let e=0,n=r.length;e<n;e++){let n=r[e];this._ids.has(n)&&(this._ids.delete(n),o.push(n),l.push(t.oldData[e]))}break}this.length+=i.length-o.length,i.length&&this._trigger(`add`,{items:i},n),a.length&&this._trigger(`update`,{items:a,oldData:s,data:c},n),o.length&&this._trigger(`remove`,{items:o,oldData:l},n)}};function jC(e,t){return typeof t==`object`&&!!t&&e===t.idProp&&typeof t.add==`function`&&typeof t.clear==`function`&&typeof t.distinct==`function`&&typeof Tf(t)==`function`&&typeof t.get==`function`&&typeof t.getDataSet==`function`&&typeof t.getIds==`function`&&typeof t.length==`number`&&typeof Eu(t)==`function`&&typeof t.max==`function`&&typeof t.min==`function`&&typeof t.off==`function`&&typeof t.on==`function`&&typeof t.remove==`function`&&typeof t.setOptions==`function`&&typeof t.stream==`function`&&typeof t.update==`function`&&typeof t.updateOnly==`function`}function MC(e,t){return typeof t==`object`&&!!t&&e===t.idProp&&typeof Tf(t)==`function`&&typeof t.get==`function`&&typeof t.getDataSet==`function`&&typeof t.getIds==`function`&&typeof t.length==`number`&&typeof Eu(t)==`function`&&typeof t.off==`function`&&typeof t.on==`function`&&typeof t.stream==`function`&&jC(e,t.getDataSet())}var NC;function M(){return NC.apply(null,arguments)}function PC(e){NC=e}function FC(e){return e instanceof Array||Object.prototype.toString.call(e)===`[object Array]`}function IC(e){return e!=null&&Object.prototype.toString.call(e)===`[object Object]`}function N(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function LC(e){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(e).length===0;for(var t in e)if(N(e,t))return!1;return!0}function RC(e){return e===void 0}function zC(e){return typeof e==`number`||Object.prototype.toString.call(e)===`[object Number]`}function BC(e){return e instanceof Date||Object.prototype.toString.call(e)===`[object Date]`}function VC(e,t){var n=[],r,i=e.length;for(r=0;r<i;++r)n.push(t(e[r],r));return n}function HC(e,t){for(var n in t)N(t,n)&&(e[n]=t[n]);return N(t,`toString`)&&(e.toString=t.toString),N(t,`valueOf`)&&(e.valueOf=t.valueOf),e}function UC(e,t,n,r){return yD(e,t,n,r,!0).utc()}function WC(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function P(e){return e._pf??=WC(),e._pf}var GC=Array.prototype.some?Array.prototype.some:function(e){var t=Object(this),n=t.length>>>0,r;for(r=0;r<n;r++)if(r in t&&e.call(this,t[r],r,t))return!0;return!1};function KC(e){var t=null,n=!1,r=e._d&&!isNaN(e._d.getTime());if(r&&(t=P(e),n=GC.call(t.parsedDateParts,function(e){return e!=null}),r=t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n),e._strict&&(r=r&&t.charsLeftOver===0&&t.unusedTokens.length===0&&t.bigHour===void 0)),Object.isFrozen==null||!Object.isFrozen(e))e._isValid=r;else return r;return e._isValid}function qC(e){var t=UC(NaN);return e==null?P(t).userInvalidated=!0:HC(P(t),e),t}var JC=M.momentProperties=[],YC=!1;function XC(e,t){var n,r,i,a=JC.length;if(RC(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),RC(t._i)||(e._i=t._i),RC(t._f)||(e._f=t._f),RC(t._l)||(e._l=t._l),RC(t._strict)||(e._strict=t._strict),RC(t._tzm)||(e._tzm=t._tzm),RC(t._isUTC)||(e._isUTC=t._isUTC),RC(t._offset)||(e._offset=t._offset),RC(t._pf)||(e._pf=P(t)),RC(t._locale)||(e._locale=t._locale),a>0)for(n=0;n<a;n++)r=JC[n],i=t[r],RC(i)||(e[r]=i);return e}function ZC(e){XC(this,e),this._d=new Date(e._d==null?NaN:e._d.getTime()),this.isValid()||(this._d=new Date(NaN)),YC===!1&&(YC=!0,M.updateOffset(this),YC=!1)}function QC(e){return e instanceof ZC||e!=null&&e._isAMomentObject!=null}function $C(e){M.suppressDeprecationWarnings===!1&&typeof console<`u`&&console.warn&&console.warn(`Deprecation warning: `+e)}function ew(e,t){var n=!0;return HC(function(){if(M.deprecationHandler!=null&&M.deprecationHandler(null,e),n){var r=[],i,a,o,s=arguments.length;for(a=0;a<s;a++){if(i=``,typeof arguments[a]==`object`){for(o in i+=`-[`+a+`] `,arguments[0])N(arguments[0],o)&&(i+=o+`: `+arguments[0][o]+`, `);i=i.slice(0,-2)}else i=arguments[a];r.push(i)}$C(e+`-Arguments: `+Array.prototype.slice.call(r).join(``)+`-`+Error().stack),n=!1}return t.apply(this,arguments)},t)}var tw={};function nw(e,t){M.deprecationHandler!=null&&M.deprecationHandler(e,t),tw[e]||($C(t),tw[e]=!0)}M.suppressDeprecationWarnings=!1,M.deprecationHandler=null;function rw(e){return typeof Function<`u`&&e instanceof Function||Object.prototype.toString.call(e)===`[object Function]`}function iw(e){var t,n;for(n in e)N(e,n)&&(t=e[n],rw(t)?this[n]=t:this[`_`+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+`|\\d{1,2}`)}function aw(e,t){var n=HC({},e),r;for(r in t)N(t,r)&&(IC(e[r])&&IC(t[r])?(n[r]={},HC(n[r],e[r]),HC(n[r],t[r])):t[r]==null?delete n[r]:n[r]=t[r]);for(r in e)N(e,r)&&!N(t,r)&&IC(e[r])&&(n[r]=HC({},n[r]));return n}function ow(e){e!=null&&this.set(e)}var sw=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)N(e,t)&&n.push(t);return n},cw={sameDay:`[Today at] LT`,nextDay:`[Tomorrow at] LT`,nextWeek:`dddd [at] LT`,lastDay:`[Yesterday at] LT`,lastWeek:`[Last] dddd [at] LT`,sameElse:`L`};function lw(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return rw(r)?r.call(t,n):r}function uw(e,t,n){var r=``+Math.abs(e),i=t-r.length;return(e>=0?n?`+`:``:`-`)+(10**Math.max(0,i)).toString().substr(1)+r}var dw=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,fw=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,pw={},mw={};function F(e,t,n,r){var i=r;typeof r==`string`&&(i=function(){return this[r]()}),e&&(mw[e]=i),t&&(mw[t[0]]=function(){return uw(i.apply(this,arguments),t[1],t[2])}),n&&(mw[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function hw(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,``):e.replace(/\\/g,``)}function gw(e){var t=e.match(dw),n,r;for(n=0,r=t.length;n<r;n++)mw[t[n]]?t[n]=mw[t[n]]:t[n]=hw(t[n]);return function(n){var i=``,a;for(a=0;a<r;a++)i+=rw(t[a])?t[a].call(n,e):t[a];return i}}function _w(e,t){return e.isValid()?(t=vw(t,e.localeData()),pw[t]=pw[t]||gw(t),pw[t](e)):e.localeData().invalidDate()}function vw(e,t){var n=5;function r(e){return t.longDateFormat(e)||e}for(fw.lastIndex=0;n>=0&&fw.test(e);)e=e.replace(fw,r),fw.lastIndex=0,--n;return e}var yw={LTS:`h:mm:ss A`,LT:`h:mm A`,L:`MM/DD/YYYY`,LL:`MMMM D, YYYY`,LLL:`MMMM D, YYYY h:mm A`,LLLL:`dddd, MMMM D, YYYY h:mm A`};function bw(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(dw).map(function(e){return e===`MMMM`||e===`MM`||e===`DD`||e===`dddd`?e.slice(1):e}).join(``),this._longDateFormat[e])}var xw=`Invalid date`;function Sw(){return this._invalidDate}var Cw=`%d`,ww=/\d{1,2}/;function Tw(e){return this._ordinal.replace(`%d`,e)}var Ew={future:`in %s`,past:`%s ago`,s:`a few seconds`,ss:`%d seconds`,m:`a minute`,mm:`%d minutes`,h:`an hour`,hh:`%d hours`,d:`a day`,dd:`%d days`,w:`a week`,ww:`%d weeks`,M:`a month`,MM:`%d months`,y:`a year`,yy:`%d years`};function Dw(e,t,n,r){var i=this._relativeTime[n];return rw(i)?i(e,t,n,r):i.replace(/%d/i,e)}function Ow(e,t){var n=this._relativeTime[e>0?`future`:`past`];return rw(n)?n(t):n.replace(/%s/i,t)}var kw={D:`date`,dates:`date`,date:`date`,d:`day`,days:`day`,day:`day`,e:`weekday`,weekdays:`weekday`,weekday:`weekday`,E:`isoWeekday`,isoweekdays:`isoWeekday`,isoweekday:`isoWeekday`,DDD:`dayOfYear`,dayofyears:`dayOfYear`,dayofyear:`dayOfYear`,h:`hour`,hours:`hour`,hour:`hour`,ms:`millisecond`,milliseconds:`millisecond`,millisecond:`millisecond`,m:`minute`,minutes:`minute`,minute:`minute`,M:`month`,months:`month`,month:`month`,Q:`quarter`,quarters:`quarter`,quarter:`quarter`,s:`second`,seconds:`second`,second:`second`,gg:`weekYear`,weekyears:`weekYear`,weekyear:`weekYear`,GG:`isoWeekYear`,isoweekyears:`isoWeekYear`,isoweekyear:`isoWeekYear`,w:`week`,weeks:`week`,week:`week`,W:`isoWeek`,isoweeks:`isoWeek`,isoweek:`isoWeek`,y:`year`,years:`year`,year:`year`};function Aw(e){return typeof e==`string`?kw[e]||kw[e.toLowerCase()]:void 0}function jw(e){var t={},n,r;for(r in e)N(e,r)&&(n=Aw(r),n&&(t[n]=e[r]));return t}var Mw={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function Nw(e){var t=[],n;for(n in e)N(e,n)&&t.push({unit:n,priority:Mw[n]});return t.sort(function(e,t){return e.priority-t.priority}),t}var Pw=/\d/,Fw=/\d\d/,Iw=/\d{3}/,Lw=/\d{4}/,Rw=/[+-]?\d{6}/,zw=/\d\d?/,Bw=/\d\d\d\d?/,Vw=/\d\d\d\d\d\d?/,Hw=/\d{1,3}/,Uw=/\d{1,4}/,Ww=/[+-]?\d{1,6}/,Gw=/\d+/,Kw=/[+-]?\d+/,qw=/Z|[+-]\d\d:?\d\d/gi,Jw=/Z|[+-]\d\d(?::?\d\d)?/gi,Yw=/[+-]?\d+(\.\d{1,3})?/,Xw=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,Zw=/^[1-9]\d?/,Qw=/^([1-9]\d|\d)/,$w={};function I(e,t,n){$w[e]=rw(t)?t:function(e,r){return e&&n?n:t}}function eT(e,t){return N($w,e)?$w[e](t._strict,t._locale):new RegExp(tT(e))}function tT(e){return nT(e.replace(`\\`,``).replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,n,r,i){return t||n||r||i}))}function nT(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,`\\$&`)}function rT(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function L(e){var t=+e,n=0;return t!==0&&isFinite(t)&&(n=rT(t)),n}var iT={};function aT(e,t){var n,r=t,i;for(typeof e==`string`&&(e=[e]),zC(t)&&(r=function(e,n){n[t]=L(e)}),i=e.length,n=0;n<i;n++)iT[e[n]]=r}function oT(e,t){aT(e,function(e,n,r,i){r._w=r._w||{},t(e,r._w,r,i)})}function sT(e,t,n){t!=null&&N(iT,e)&&iT[e](t,n._a,n,e)}function cT(e){return e%4==0&&e%100!=0||e%400==0}var lT=0,uT=1,dT=2,fT=3,pT=4,mT=5,hT=6,gT=7,_T=8;F(`Y`,0,0,function(){var e=this.year();return e<=9999?uw(e,4):`+`+e}),F(0,[`YY`,2],0,function(){return this.year()%100}),F(0,[`YYYY`,4],0,`year`),F(0,[`YYYYY`,5],0,`year`),F(0,[`YYYYYY`,6,!0],0,`year`),I(`Y`,Kw),I(`YY`,zw,Fw),I(`YYYY`,Uw,Lw),I(`YYYYY`,Ww,Rw),I(`YYYYYY`,Ww,Rw),aT([`YYYYY`,`YYYYYY`],lT),aT(`YYYY`,function(e,t){t[lT]=e.length===2?M.parseTwoDigitYear(e):L(e)}),aT(`YY`,function(e,t){t[lT]=M.parseTwoDigitYear(e)}),aT(`Y`,function(e,t){t[lT]=parseInt(e,10)});function vT(e){return cT(e)?366:365}M.parseTwoDigitYear=function(e){return L(e)+(L(e)>68?1900:2e3)};var yT=xT(`FullYear`,!0);function bT(){return cT(this.year())}function xT(e,t){return function(n){return n==null?ST(this,e):(CT(this,e,n),M.updateOffset(this,t),this)}}function ST(e,t){if(!e.isValid())return NaN;var n=e._d,r=e._isUTC;switch(t){case`Milliseconds`:return r?n.getUTCMilliseconds():n.getMilliseconds();case`Seconds`:return r?n.getUTCSeconds():n.getSeconds();case`Minutes`:return r?n.getUTCMinutes():n.getMinutes();case`Hours`:return r?n.getUTCHours():n.getHours();case`Date`:return r?n.getUTCDate():n.getDate();case`Day`:return r?n.getUTCDay():n.getDay();case`Month`:return r?n.getUTCMonth():n.getMonth();case`FullYear`:return r?n.getUTCFullYear():n.getFullYear();default:return NaN}}function CT(e,t,n){var r,i,a,o,s;if(!(!e.isValid()||isNaN(n))){switch(r=e._d,i=e._isUTC,t){case`Milliseconds`:i?r.setUTCMilliseconds(n):r.setMilliseconds(n);return;case`Seconds`:i?r.setUTCSeconds(n):r.setSeconds(n);return;case`Minutes`:i?r.setUTCMinutes(n):r.setMinutes(n);return;case`Hours`:i?r.setUTCHours(n):r.setHours(n);return;case`Date`:i?r.setUTCDate(n):r.setDate(n);return;case`FullYear`:break;default:return}a=n,o=e.month(),s=e.date(),s=s===29&&o===1&&!cT(a)?28:s,i?r.setUTCFullYear(a,o,s):r.setFullYear(a,o,s)}}function wT(e){return e=Aw(e),rw(this[e])?this[e]():this}function TT(e,t){if(typeof e==`object`){e=jw(e);var n=Nw(e),r,i=n.length;for(r=0;r<i;r++)this[n[r].unit](e[n[r].unit])}else if(e=Aw(e),rw(this[e]))return this[e](t);return this}function ET(e,t){return(e%t+t)%t}var DT=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1};function OT(e,t){if(isNaN(e)||isNaN(t))return NaN;var n=ET(t,12);return e+=(t-n)/12,n===1?cT(e)?29:28:31-n%7%2}F(`M`,[`MM`,2],`Mo`,function(){return this.month()+1}),F(`MMM`,0,0,function(e){return this.localeData().monthsShort(this,e)}),F(`MMMM`,0,0,function(e){return this.localeData().months(this,e)}),I(`M`,zw,Zw),I(`MM`,zw,Fw),I(`MMM`,function(e,t){return t.monthsShortRegex(e)}),I(`MMMM`,function(e,t){return t.monthsRegex(e)}),aT([`M`,`MM`],function(e,t){t[uT]=L(e)-1}),aT([`MMM`,`MMMM`],function(e,t,n,r){var i=n._locale.monthsParse(e,r,n._strict);i==null?P(n).invalidMonth=e:t[uT]=i});var kT=`January_February_March_April_May_June_July_August_September_October_November_December`.split(`_`),AT=`Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec`.split(`_`),jT=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,MT=Xw,NT=Xw;function PT(e,t){return e?FC(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||jT).test(t)?`format`:`standalone`][e.month()]:FC(this._months)?this._months:this._months.standalone}function FT(e,t){return e?FC(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[jT.test(t)?`format`:`standalone`][e.month()]:FC(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function IT(e,t,n){var r,i,a,o=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)a=UC([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(a,``).toLocaleLowerCase(),this._longMonthsParse[r]=this.months(a,``).toLocaleLowerCase();return n?t===`MMM`?(i=DT.call(this._shortMonthsParse,o),i===-1?null:i):(i=DT.call(this._longMonthsParse,o),i===-1?null:i):t===`MMM`?(i=DT.call(this._shortMonthsParse,o),i===-1?(i=DT.call(this._longMonthsParse,o),i===-1?null:i):i):(i=DT.call(this._longMonthsParse,o),i===-1?(i=DT.call(this._shortMonthsParse,o),i===-1?null:i):i)}function LT(e,t,n){var r,i,a;if(this._monthsParseExact)return IT.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++)if(i=UC([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=RegExp(`^`+this.months(i,``).replace(`.`,``)+`$`,`i`),this._shortMonthsParse[r]=RegExp(`^`+this.monthsShort(i,``).replace(`.`,``)+`$`,`i`)),!n&&!this._monthsParse[r]&&(a=`^`+this.months(i,``)+`|^`+this.monthsShort(i,``),this._monthsParse[r]=new RegExp(a.replace(`.`,``),`i`)),n&&t===`MMMM`&&this._longMonthsParse[r].test(e)||n&&t===`MMM`&&this._shortMonthsParse[r].test(e)||!n&&this._monthsParse[r].test(e))return r}function RT(e,t){if(!e.isValid())return e;if(typeof t==`string`){if(/^\d+$/.test(t))t=L(t);else if(t=e.localeData().monthsParse(t),!zC(t))return e}var n=t,r=e.date();return r=r<29?r:Math.min(r,OT(e.year(),n)),e._isUTC?e._d.setUTCMonth(n,r):e._d.setMonth(n,r),e}function zT(e){return e==null?ST(this,`Month`):(RT(this,e),M.updateOffset(this,!0),this)}function BT(){return OT(this.year(),this.month())}function VT(e){return this._monthsParseExact?(N(this,`_monthsRegex`)||UT.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(N(this,`_monthsShortRegex`)||(this._monthsShortRegex=MT),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function HT(e){return this._monthsParseExact?(N(this,`_monthsRegex`)||UT.call(this),e?this._monthsStrictRegex:this._monthsRegex):(N(this,`_monthsRegex`)||(this._monthsRegex=NT),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function UT(){function e(e,t){return t.length-e.length}var t=[],n=[],r=[],i,a,o,s;for(i=0;i<12;i++)a=UC([2e3,i]),o=nT(this.monthsShort(a,``)),s=nT(this.months(a,``)),t.push(o),n.push(s),r.push(s),r.push(o);t.sort(e),n.sort(e),r.sort(e),this._monthsRegex=RegExp(`^(`+r.join(`|`)+`)`,`i`),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=RegExp(`^(`+n.join(`|`)+`)`,`i`),this._monthsShortStrictRegex=RegExp(`^(`+t.join(`|`)+`)`,`i`)}function WT(e,t,n,r,i,a,o){var s;return e<100&&e>=0?(s=new Date(e+400,t,n,r,i,a,o),isFinite(s.getFullYear())&&s.setFullYear(e)):s=new Date(e,t,n,r,i,a,o),s}function GT(e){var t,n;return e<100&&e>=0?(n=Array.prototype.slice.call(arguments),n[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function KT(e,t,n){var r=7+t-n;return-((7+GT(e,0,r).getUTCDay()-t)%7)+r-1}function qT(e,t,n,r,i){var a=(7+n-r)%7,o=KT(e,r,i),s=1+7*(t-1)+a+o,c,l;return s<=0?(c=e-1,l=vT(c)+s):s>vT(e)?(c=e+1,l=s-vT(e)):(c=e,l=s),{year:c,dayOfYear:l}}function JT(e,t,n){var r=KT(e.year(),t,n),i=Math.floor((e.dayOfYear()-r-1)/7)+1,a,o;return i<1?(o=e.year()-1,a=i+YT(o,t,n)):i>YT(e.year(),t,n)?(a=i-YT(e.year(),t,n),o=e.year()+1):(o=e.year(),a=i),{week:a,year:o}}function YT(e,t,n){var r=KT(e,t,n),i=KT(e+1,t,n);return(vT(e)-r+i)/7}F(`w`,[`ww`,2],`wo`,`week`),F(`W`,[`WW`,2],`Wo`,`isoWeek`),I(`w`,zw,Zw),I(`ww`,zw,Fw),I(`W`,zw,Zw),I(`WW`,zw,Fw),oT([`w`,`ww`,`W`,`WW`],function(e,t,n,r){t[r.substr(0,1)]=L(e)});function XT(e){return JT(e,this._week.dow,this._week.doy).week}var ZT={dow:0,doy:6};function QT(){return this._week.dow}function $T(){return this._week.doy}function eE(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,`d`)}function tE(e){var t=JT(this,1,4).week;return e==null?t:this.add((e-t)*7,`d`)}F(`d`,0,`do`,`day`),F(`dd`,0,0,function(e){return this.localeData().weekdaysMin(this,e)}),F(`ddd`,0,0,function(e){return this.localeData().weekdaysShort(this,e)}),F(`dddd`,0,0,function(e){return this.localeData().weekdays(this,e)}),F(`e`,0,0,`weekday`),F(`E`,0,0,`isoWeekday`),I(`d`,zw),I(`e`,zw),I(`E`,zw),I(`dd`,function(e,t){return t.weekdaysMinRegex(e)}),I(`ddd`,function(e,t){return t.weekdaysShortRegex(e)}),I(`dddd`,function(e,t){return t.weekdaysRegex(e)}),oT([`dd`,`ddd`,`dddd`],function(e,t,n,r){var i=n._locale.weekdaysParse(e,r,n._strict);i==null?P(n).invalidWeekday=e:t.d=i}),oT([`d`,`e`,`E`],function(e,t,n,r){t[r]=L(e)});function nE(e,t){return typeof e==`string`?isNaN(e)?(e=t.weekdaysParse(e),typeof e==`number`?e:null):parseInt(e,10):e}function rE(e,t){return typeof e==`string`?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function iE(e,t){return e.slice(t,7).concat(e.slice(0,t))}var aE=`Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday`.split(`_`),oE=`Sun_Mon_Tue_Wed_Thu_Fri_Sat`.split(`_`),sE=`Su_Mo_Tu_We_Th_Fr_Sa`.split(`_`),cE=Xw,lE=Xw,uE=Xw;function dE(e,t){var n=FC(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?`format`:`standalone`];return e===!0?iE(n,this._week.dow):e?n[e.day()]:n}function fE(e){return e===!0?iE(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function pE(e){return e===!0?iE(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function mE(e,t,n){var r,i,a,o=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)a=UC([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(a,``).toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(a,``).toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(a,``).toLocaleLowerCase();return n?t===`dddd`?(i=DT.call(this._weekdaysParse,o),i===-1?null:i):t===`ddd`?(i=DT.call(this._shortWeekdaysParse,o),i===-1?null:i):(i=DT.call(this._minWeekdaysParse,o),i===-1?null:i):t===`dddd`?(i=DT.call(this._weekdaysParse,o),i!==-1||(i=DT.call(this._shortWeekdaysParse,o),i!==-1)?i:(i=DT.call(this._minWeekdaysParse,o),i===-1?null:i)):t===`ddd`?(i=DT.call(this._shortWeekdaysParse,o),i!==-1||(i=DT.call(this._weekdaysParse,o),i!==-1)?i:(i=DT.call(this._minWeekdaysParse,o),i===-1?null:i)):(i=DT.call(this._minWeekdaysParse,o),i!==-1||(i=DT.call(this._weekdaysParse,o),i!==-1)?i:(i=DT.call(this._shortWeekdaysParse,o),i===-1?null:i))}function hE(e,t,n){var r,i,a;if(this._weekdaysParseExact)return mE.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++)if(i=UC([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=RegExp(`^`+this.weekdays(i,``).replace(`.`,`\\.?`)+`$`,`i`),this._shortWeekdaysParse[r]=RegExp(`^`+this.weekdaysShort(i,``).replace(`.`,`\\.?`)+`$`,`i`),this._minWeekdaysParse[r]=RegExp(`^`+this.weekdaysMin(i,``).replace(`.`,`\\.?`)+`$`,`i`)),this._weekdaysParse[r]||(a=`^`+this.weekdays(i,``)+`|^`+this.weekdaysShort(i,``)+`|^`+this.weekdaysMin(i,``),this._weekdaysParse[r]=new RegExp(a.replace(`.`,``),`i`)),n&&t===`dddd`&&this._fullWeekdaysParse[r].test(e)||n&&t===`ddd`&&this._shortWeekdaysParse[r].test(e)||n&&t===`dd`&&this._minWeekdaysParse[r].test(e)||!n&&this._weekdaysParse[r].test(e))return r}function gE(e){if(!this.isValid())return e==null?NaN:this;var t=ST(this,`Day`);return e==null?t:(e=nE(e,this.localeData()),this.add(e-t,`d`))}function _E(e){if(!this.isValid())return e==null?NaN:this;var t=(this.day()+7-this.localeData()._week.dow)%7;return e==null?t:this.add(e-t,`d`)}function vE(e){if(!this.isValid())return e==null?NaN:this;if(e!=null){var t=rE(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function yE(e){return this._weekdaysParseExact?(N(this,`_weekdaysRegex`)||SE.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(N(this,`_weekdaysRegex`)||(this._weekdaysRegex=cE),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function bE(e){return this._weekdaysParseExact?(N(this,`_weekdaysRegex`)||SE.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(N(this,`_weekdaysShortRegex`)||(this._weekdaysShortRegex=lE),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function xE(e){return this._weekdaysParseExact?(N(this,`_weekdaysRegex`)||SE.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(N(this,`_weekdaysMinRegex`)||(this._weekdaysMinRegex=uE),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function SE(){function e(e,t){return t.length-e.length}var t=[],n=[],r=[],i=[],a,o,s,c,l;for(a=0;a<7;a++)o=UC([2e3,1]).day(a),s=nT(this.weekdaysMin(o,``)),c=nT(this.weekdaysShort(o,``)),l=nT(this.weekdays(o,``)),t.push(s),n.push(c),r.push(l),i.push(s),i.push(c),i.push(l);t.sort(e),n.sort(e),r.sort(e),i.sort(e),this._weekdaysRegex=RegExp(`^(`+i.join(`|`)+`)`,`i`),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=RegExp(`^(`+r.join(`|`)+`)`,`i`),this._weekdaysShortStrictRegex=RegExp(`^(`+n.join(`|`)+`)`,`i`),this._weekdaysMinStrictRegex=RegExp(`^(`+t.join(`|`)+`)`,`i`)}function CE(){return this.hours()%12||12}function wE(){return this.hours()||24}F(`H`,[`HH`,2],0,`hour`),F(`h`,[`hh`,2],0,CE),F(`k`,[`kk`,2],0,wE),F(`hmm`,0,0,function(){return``+CE.apply(this)+uw(this.minutes(),2)}),F(`hmmss`,0,0,function(){return``+CE.apply(this)+uw(this.minutes(),2)+uw(this.seconds(),2)}),F(`Hmm`,0,0,function(){return``+this.hours()+uw(this.minutes(),2)}),F(`Hmmss`,0,0,function(){return``+this.hours()+uw(this.minutes(),2)+uw(this.seconds(),2)});function TE(e,t){F(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}TE(`a`,!0),TE(`A`,!1);function EE(e,t){return t._meridiemParse}I(`a`,EE),I(`A`,EE),I(`H`,zw,Qw),I(`h`,zw,Zw),I(`k`,zw,Zw),I(`HH`,zw,Fw),I(`hh`,zw,Fw),I(`kk`,zw,Fw),I(`hmm`,Bw),I(`hmmss`,Vw),I(`Hmm`,Bw),I(`Hmmss`,Vw),aT([`H`,`HH`],fT),aT([`k`,`kk`],function(e,t,n){var r=L(e);t[fT]=r===24?0:r}),aT([`a`,`A`],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),aT([`h`,`hh`],function(e,t,n){t[fT]=L(e),P(n).bigHour=!0}),aT(`hmm`,function(e,t,n){var r=e.length-2;t[fT]=L(e.substr(0,r)),t[pT]=L(e.substr(r)),P(n).bigHour=!0}),aT(`hmmss`,function(e,t,n){var r=e.length-4,i=e.length-2;t[fT]=L(e.substr(0,r)),t[pT]=L(e.substr(r,2)),t[mT]=L(e.substr(i)),P(n).bigHour=!0}),aT(`Hmm`,function(e,t,n){var r=e.length-2;t[fT]=L(e.substr(0,r)),t[pT]=L(e.substr(r))}),aT(`Hmmss`,function(e,t,n){var r=e.length-4,i=e.length-2;t[fT]=L(e.substr(0,r)),t[pT]=L(e.substr(r,2)),t[mT]=L(e.substr(i))});function DE(e){return(e+``).toLowerCase().charAt(0)===`p`}var OE=/[ap]\.?m?\.?/i,kE=xT(`Hours`,!0);function AE(e,t,n){return e>11?n?`pm`:`PM`:n?`am`:`AM`}var jE={calendar:cw,longDateFormat:yw,invalidDate:xw,ordinal:Cw,dayOfMonthOrdinalParse:ww,relativeTime:Ew,months:kT,monthsShort:AT,week:ZT,weekdays:aE,weekdaysMin:sE,weekdaysShort:oE,meridiemParse:OE},ME={},NE={},PE;function FE(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n<r;n+=1)if(e[n]!==t[n])return n;return r}function IE(e){return e&&e.toLowerCase().replace(`_`,`-`)}function LE(e){for(var t=0,n,r,i,a;t<e.length;){for(a=IE(e[t]).split(`-`),n=a.length,r=IE(e[t+1]),r=r?r.split(`-`):null;n>0;){if(i=zE(a.slice(0,n).join(`-`)),i)return i;if(r&&r.length>=n&&FE(a,r)>=n-1)break;n--}t++}return PE}function RE(e){return!!(e&&e.match(`^[^/\\\\]*$`))}function zE(t){var n=null,r;if(ME[t]===void 0&&typeof module<`u`&&module&&module.exports&&RE(t))try{n=PE._abbr,r=e,r(`./locale/`+t),BE(n)}catch{ME[t]=null}return ME[t]}function BE(e,t){var n;return e&&(n=RC(t)?UE(e):VE(e,t),n?PE=n:typeof console<`u`&&console.warn&&console.warn(`Locale `+e+` not found. Did you forget to load it?`)),PE._abbr}function VE(e,t){if(t!==null){var n,r=jE;if(t.abbr=e,ME[e]!=null)nw(`defineLocaleOverride`,`use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info.`),r=ME[e]._config;else if(t.parentLocale!=null)if(ME[t.parentLocale]!=null)r=ME[t.parentLocale]._config;else if(n=zE(t.parentLocale),n!=null)r=n._config;else return NE[t.parentLocale]||(NE[t.parentLocale]=[]),NE[t.parentLocale].push({name:e,config:t}),null;return ME[e]=new ow(aw(r,t)),NE[e]&&NE[e].forEach(function(e){VE(e.name,e.config)}),BE(e),ME[e]}else return delete ME[e],null}function HE(e,t){if(t!=null){var n,r,i=jE;ME[e]!=null&&ME[e].parentLocale!=null?ME[e].set(aw(ME[e]._config,t)):(r=zE(e),r!=null&&(i=r._config),t=aw(i,t),r??(t.abbr=e),n=new ow(t),n.parentLocale=ME[e],ME[e]=n),BE(e)}else ME[e]!=null&&(ME[e].parentLocale==null?ME[e]!=null&&delete ME[e]:(ME[e]=ME[e].parentLocale,e===BE()&&BE(e)));return ME[e]}function UE(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return PE;if(!FC(e)){if(t=zE(e),t)return t;e=[e]}return LE(e)}function WE(){return sw(ME)}function GE(e){var t,n=e._a;return n&&P(e).overflow===-2&&(t=n[uT]<0||n[uT]>11?uT:n[dT]<1||n[dT]>OT(n[lT],n[uT])?dT:n[fT]<0||n[fT]>24||n[fT]===24&&(n[pT]!==0||n[mT]!==0||n[hT]!==0)?fT:n[pT]<0||n[pT]>59?pT:n[mT]<0||n[mT]>59?mT:n[hT]<0||n[hT]>999?hT:-1,P(e)._overflowDayOfYear&&(t<lT||t>dT)&&(t=dT),P(e)._overflowWeeks&&t===-1&&(t=gT),P(e)._overflowWeekday&&t===-1&&(t=_T),P(e).overflow=t),e}var KE=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,qE=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,JE=/Z|[+-]\d\d(?::?\d\d)?/,YE=[[`YYYYYY-MM-DD`,/[+-]\d{6}-\d\d-\d\d/],[`YYYY-MM-DD`,/\d{4}-\d\d-\d\d/],[`GGGG-[W]WW-E`,/\d{4}-W\d\d-\d/],[`GGGG-[W]WW`,/\d{4}-W\d\d/,!1],[`YYYY-DDD`,/\d{4}-\d{3}/],[`YYYY-MM`,/\d{4}-\d\d/,!1],[`YYYYYYMMDD`,/[+-]\d{10}/],[`YYYYMMDD`,/\d{8}/],[`GGGG[W]WWE`,/\d{4}W\d{3}/],[`GGGG[W]WW`,/\d{4}W\d{2}/,!1],[`YYYYDDD`,/\d{7}/],[`YYYYMM`,/\d{6}/,!1],[`YYYY`,/\d{4}/,!1]],XE=[[`HH:mm:ss.SSSS`,/\d\d:\d\d:\d\d\.\d+/],[`HH:mm:ss,SSSS`,/\d\d:\d\d:\d\d,\d+/],[`HH:mm:ss`,/\d\d:\d\d:\d\d/],[`HH:mm`,/\d\d:\d\d/],[`HHmmss.SSSS`,/\d\d\d\d\d\d\.\d+/],[`HHmmss,SSSS`,/\d\d\d\d\d\d,\d+/],[`HHmmss`,/\d\d\d\d\d\d/],[`HHmm`,/\d\d\d\d/],[`HH`,/\d\d/]],ZE=/^\/?Date\((-?\d+)/i,QE=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,$E={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function eD(e){var t,n,r=e._i,i=KE.exec(r)||qE.exec(r),a,o,s,c,l=YE.length,u=XE.length;if(i){for(P(e).iso=!0,t=0,n=l;t<n;t++)if(YE[t][1].exec(i[1])){o=YE[t][0],a=YE[t][2]!==!1;break}if(o==null){e._isValid=!1;return}if(i[3]){for(t=0,n=u;t<n;t++)if(XE[t][1].exec(i[3])){s=(i[2]||` `)+XE[t][0];break}if(s==null){e._isValid=!1;return}}if(!a&&s!=null){e._isValid=!1;return}if(i[4])if(JE.exec(i[4]))c=`Z`;else{e._isValid=!1;return}e._f=o+(s||``)+(c||``),fD(e)}else e._isValid=!1}function tD(e,t,n,r,i,a){var o=[nD(e),AT.indexOf(t),parseInt(n,10),parseInt(r,10),parseInt(i,10)];return a&&o.push(parseInt(a,10)),o}function nD(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function rD(e){return e.replace(/\([^()]*\)|[\n\t]/g,` `).replace(/(\s\s+)/g,` `).replace(/^\s\s*/,``).replace(/\s\s*$/,``)}function iD(e,t,n){return e&&oE.indexOf(e)!==new Date(t[0],t[1],t[2]).getDay()?(P(n).weekdayMismatch=!0,n._isValid=!1,!1):!0}function aD(e,t,n){if(e)return $E[e];if(t)return 0;var r=parseInt(n,10),i=r%100;return(r-i)/100*60+i}function oD(e){var t=QE.exec(rD(e._i)),n;if(t){if(n=tD(t[4],t[3],t[2],t[5],t[6],t[7]),!iD(t[1],n,e))return;e._a=n,e._tzm=aD(t[8],t[9],t[10]),e._d=GT.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),P(e).rfc2822=!0}else e._isValid=!1}function sD(e){var t=ZE.exec(e._i);if(t!==null){e._d=new Date(+t[1]);return}if(eD(e),e._isValid===!1)delete e._isValid;else return;if(oD(e),e._isValid===!1)delete e._isValid;else return;e._strict?e._isValid=!1:M.createFromInputFallback(e)}M.createFromInputFallback=ew(`value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.`,function(e){e._d=new Date(e._i+(e._useUTC?` UTC`:``))});function cD(e,t,n){return e??t??n}function lD(e){var t=new Date(M.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function uD(e){var t,n,r=[],i,a,o;if(!e._d){for(i=lD(e),e._w&&e._a[dT]==null&&e._a[uT]==null&&dD(e),e._dayOfYear!=null&&(o=cD(e._a[lT],i[lT]),(e._dayOfYear>vT(o)||e._dayOfYear===0)&&(P(e)._overflowDayOfYear=!0),n=GT(o,0,e._dayOfYear),e._a[uT]=n.getUTCMonth(),e._a[dT]=n.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=r[t]=i[t];for(;t<7;t++)e._a[t]=r[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[fT]===24&&e._a[pT]===0&&e._a[mT]===0&&e._a[hT]===0&&(e._nextDay=!0,e._a[fT]=0),e._d=(e._useUTC?GT:WT).apply(null,r),a=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[fT]=24),e._w&&e._w.d!==void 0&&e._w.d!==a&&(P(e).weekdayMismatch=!0)}}function dD(e){var t=e._w,n,r,i,a,o,s,c,l;t.GG!=null||t.W!=null||t.E!=null?(a=1,o=4,n=cD(t.GG,e._a[lT],JT(bD(),1,4).year),r=cD(t.W,1),i=cD(t.E,1),(i<1||i>7)&&(c=!0)):(a=e._locale._week.dow,o=e._locale._week.doy,l=JT(bD(),a,o),n=cD(t.gg,e._a[lT],l.year),r=cD(t.w,l.week),t.d==null?t.e==null?i=a:(i=t.e+a,(t.e<0||t.e>6)&&(c=!0)):(i=t.d,(i<0||i>6)&&(c=!0))),r<1||r>YT(n,a,o)?P(e)._overflowWeeks=!0:c==null?(s=qT(n,r,i,a,o),e._a[lT]=s.year,e._dayOfYear=s.dayOfYear):P(e)._overflowWeekday=!0}M.ISO_8601=function(){},M.RFC_2822=function(){};function fD(e){if(e._f===M.ISO_8601){eD(e);return}if(e._f===M.RFC_2822){oD(e);return}e._a=[],P(e).empty=!0;var t=``+e._i,n,r,i,a,o,s=t.length,c=0,l,u;for(i=vw(e._f,e._locale).match(dw)||[],u=i.length,n=0;n<u;n++)a=i[n],r=(t.match(eT(a,e))||[])[0],r&&(o=t.substr(0,t.indexOf(r)),o.length>0&&P(e).unusedInput.push(o),t=t.slice(t.indexOf(r)+r.length),c+=r.length),mw[a]?(r?P(e).empty=!1:P(e).unusedTokens.push(a),sT(a,r,e)):e._strict&&!r&&P(e).unusedTokens.push(a);P(e).charsLeftOver=s-c,t.length>0&&P(e).unusedInput.push(t),e._a[fT]<=12&&P(e).bigHour===!0&&e._a[fT]>0&&(P(e).bigHour=void 0),P(e).parsedDateParts=e._a.slice(0),P(e).meridiem=e._meridiem,e._a[fT]=pD(e._locale,e._a[fT],e._meridiem),l=P(e).era,l!==null&&(e._a[lT]=e._locale.erasConvertYear(l,e._a[lT])),uD(e),GE(e)}function pD(e,t,n){var r;return n==null?t:e.meridiemHour==null?e.isPM==null?t:(r=e.isPM(n),r&&t<12&&(t+=12),!r&&t===12&&(t=0),t):e.meridiemHour(t,n)}function mD(e){var t,n,r,i,a,o,s=!1,c=e._f.length;if(c===0){P(e).invalidFormat=!0,e._d=new Date(NaN);return}for(i=0;i<c;i++)a=0,o=!1,t=XC({},e),e._useUTC!=null&&(t._useUTC=e._useUTC),t._f=e._f[i],fD(t),KC(t)&&(o=!0),a+=P(t).charsLeftOver,a+=P(t).unusedTokens.length*10,P(t).score=a,s?a<r&&(r=a,n=t):(r==null||a<r||o)&&(r=a,n=t,o&&(s=!0));HC(e,n||t)}function hD(e){if(!e._d){var t=jw(e._i),n=t.day===void 0?t.date:t.day;e._a=VC([t.year,t.month,n,t.hour,t.minute,t.second,t.millisecond],function(e){return e&&parseInt(e,10)}),uD(e)}}function gD(e){var t=new ZC(GE(_D(e)));return t._nextDay&&=(t.add(1,`d`),void 0),t}function _D(e){var t=e._i,n=e._f;return e._locale=e._locale||UE(e._l),t===null||n===void 0&&t===``?qC({nullInput:!0}):(typeof t==`string`&&(e._i=t=e._locale.preparse(t)),QC(t)?new ZC(GE(t)):(BC(t)?e._d=t:FC(n)?mD(e):n?fD(e):vD(e),KC(e)||(e._d=null),e))}function vD(e){var t=e._i;RC(t)?e._d=new Date(M.now()):BC(t)?e._d=new Date(t.valueOf()):typeof t==`string`?sD(e):FC(t)?(e._a=VC(t.slice(0),function(e){return parseInt(e,10)}),uD(e)):IC(t)?hD(e):zC(t)?e._d=new Date(t):M.createFromInputFallback(e)}function yD(e,t,n,r,i){var a={};return(t===!0||t===!1)&&(r=t,t=void 0),(n===!0||n===!1)&&(r=n,n=void 0),(IC(e)&&LC(e)||FC(e)&&e.length===0)&&(e=void 0),a._isAMomentObject=!0,a._useUTC=a._isUTC=i,a._l=n,a._i=e,a._f=t,a._strict=r,gD(a)}function bD(e,t,n,r){return yD(e,t,n,r,!1)}var xD=ew(`moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/`,function(){var e=bD.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:qC()}),SD=ew(`moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/`,function(){var e=bD.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:qC()});function CD(e,t){var n,r;if(t.length===1&&FC(t[0])&&(t=t[0]),!t.length)return bD();for(n=t[0],r=1;r<t.length;++r)(!t[r].isValid()||t[r][e](n))&&(n=t[r]);return n}function wD(){return CD(`isBefore`,[].slice.call(arguments,0))}function TD(){return CD(`isAfter`,[].slice.call(arguments,0))}var ED=function(){return Date.now?Date.now():+new Date},DD=[`year`,`quarter`,`month`,`week`,`day`,`hour`,`minute`,`second`,`millisecond`];function OD(e){var t,n=!1,r,i=DD.length;for(t in e)if(N(e,t)&&!(DT.call(DD,t)!==-1&&(e[t]==null||!isNaN(e[t]))))return!1;for(r=0;r<i;++r)if(e[DD[r]]){if(n)return!1;parseFloat(e[DD[r]])!==L(e[DD[r]])&&(n=!0)}return!0}function kD(){return this._isValid}function AD(){return $D(NaN)}function jD(e){var t=jw(e),n=t.year||0,r=t.quarter||0,i=t.month||0,a=t.week||t.isoWeek||0,o=t.day||0,s=t.hour||0,c=t.minute||0,l=t.second||0,u=t.millisecond||0;this._isValid=OD(t),this._milliseconds=+u+l*1e3+c*6e4+s*1e3*60*60,this._days=+o+a*7,this._months=+i+r*3+n*12,this._data={},this._locale=UE(),this._bubble()}function MD(e){return e instanceof jD}function ND(e){return e<0?Math.round(-1*e)*-1:Math.round(e)}function PD(e,t,n){var r=Math.min(e.length,t.length),i=Math.abs(e.length-t.length),a=0,o;for(o=0;o<r;o++)(n&&e[o]!==t[o]||!n&&L(e[o])!==L(t[o]))&&a++;return a+i}function FD(e,t){F(e,0,0,function(){var e=this.utcOffset(),n=`+`;return e<0&&(e=-e,n=`-`),n+uw(~~(e/60),2)+t+uw(~~e%60,2)})}FD(`Z`,`:`),FD(`ZZ`,``),I(`Z`,Jw),I(`ZZ`,Jw),aT([`Z`,`ZZ`],function(e,t,n){n._useUTC=!0,n._tzm=LD(Jw,e)});var ID=/([\+\-]|\d\d)/gi;function LD(e,t){var n=(t||``).match(e),r,i,a;return n===null?null:(r=n[n.length-1]||[],i=(r+``).match(ID)||[`-`,0,0],a=+(i[1]*60)+L(i[2]),a===0?0:i[0]===`+`?a:-a)}function RD(e,t){var n,r;return t._isUTC?(n=t.clone(),r=(QC(e)||BC(e)?e.valueOf():bD(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+r),M.updateOffset(n,!1),n):bD(e).local()}function zD(e){return-Math.round(e._d.getTimezoneOffset())}M.updateOffset=function(){};function BD(e,t,n){var r=this._offset||0,i;if(!this.isValid())return e==null?NaN:this;if(e!=null){if(typeof e==`string`){if(e=LD(Jw,e),e===null)return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(i=zD(this)),this._offset=e,this._isUTC=!0,i!=null&&this.add(i,`m`),r!==e&&(!t||this._changeInProgress?iO(this,$D(e-r,`m`),1,!1):this._changeInProgress||=(this._changeInProgress=!0,M.updateOffset(this,!0),null)),this}else return this._isUTC?r:zD(this)}function VD(e,t){return e==null?-this.utcOffset():(typeof e!=`string`&&(e=-e),this.utcOffset(e,t),this)}function HD(e){return this.utcOffset(0,e)}function UD(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(zD(this),`m`)),this}function WD(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i==`string`){var e=LD(qw,this._i);e==null?this.utcOffset(0,!0):this.utcOffset(e)}return this}function GD(e){return this.isValid()?(e=e?bD(e).utcOffset():0,(this.utcOffset()-e)%60==0):!1}function KD(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function qD(){if(!RC(this._isDSTShifted))return this._isDSTShifted;var e={},t;return XC(e,this),e=_D(e),e._a?(t=e._isUTC?UC(e._a):bD(e._a),this._isDSTShifted=this.isValid()&&PD(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function JD(){return this.isValid()?!this._isUTC:!1}function YD(){return this.isValid()?this._isUTC:!1}function XD(){return this.isValid()?this._isUTC&&this._offset===0:!1}var ZD=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,QD=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function $D(e,t){var n=e,r=null,i,a,o;return MD(e)?n={ms:e._milliseconds,d:e._days,M:e._months}:zC(e)||!isNaN(+e)?(n={},t?n[t]=+e:n.milliseconds=+e):(r=ZD.exec(e))?(i=r[1]===`-`?-1:1,n={y:0,d:L(r[dT])*i,h:L(r[fT])*i,m:L(r[pT])*i,s:L(r[mT])*i,ms:L(ND(r[hT]*1e3))*i}):(r=QD.exec(e))?(i=r[1]===`-`?-1:1,n={y:eO(r[2],i),M:eO(r[3],i),w:eO(r[4],i),d:eO(r[5],i),h:eO(r[6],i),m:eO(r[7],i),s:eO(r[8],i)}):n==null?n={}:typeof n==`object`&&(`from`in n||`to`in n)&&(o=nO(bD(n.from),bD(n.to)),n={},n.ms=o.milliseconds,n.M=o.months),a=new jD(n),MD(e)&&N(e,`_locale`)&&(a._locale=e._locale),MD(e)&&N(e,`_isValid`)&&(a._isValid=e._isValid),a}$D.fn=jD.prototype,$D.invalid=AD;function eO(e,t){var n=e&&parseFloat(e.replace(`,`,`.`));return(isNaN(n)?0:n)*t}function tO(e,t){var n={};return n.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(n.months,`M`).isAfter(t)&&--n.months,n.milliseconds=t-+e.clone().add(n.months,`M`),n}function nO(e,t){var n;return e.isValid()&&t.isValid()?(t=RD(t,e),e.isBefore(t)?n=tO(e,t):(n=tO(t,e),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function rO(e,t){return function(n,r){var i,a;return r!==null&&!isNaN(+r)&&(nw(t,`moment().`+t+`(period, number) is deprecated. Please use moment().`+t+`(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.`),a=n,n=r,r=a),i=$D(n,r),iO(this,i,e),this}}function iO(e,t,n,r){var i=t._milliseconds,a=ND(t._days),o=ND(t._months);e.isValid()&&(r??=!0,o&&RT(e,ST(e,`Month`)+o*n),a&&CT(e,`Date`,ST(e,`Date`)+a*n),i&&e._d.setTime(e._d.valueOf()+i*n),r&&M.updateOffset(e,a||o))}var aO=rO(1,`add`),oO=rO(-1,`subtract`);function sO(e){return typeof e==`string`||e instanceof String}function cO(e){return QC(e)||BC(e)||sO(e)||zC(e)||uO(e)||lO(e)||e==null}function lO(e){var t=IC(e)&&!LC(e),n=!1,r=[`years`,`year`,`y`,`months`,`month`,`M`,`days`,`day`,`d`,`dates`,`date`,`D`,`hours`,`hour`,`h`,`minutes`,`minute`,`m`,`seconds`,`second`,`s`,`milliseconds`,`millisecond`,`ms`],i,a,o=r.length;for(i=0;i<o;i+=1)a=r[i],n||=N(e,a);return t&&n}function uO(e){var t=FC(e),n=!1;return t&&(n=e.filter(function(t){return!zC(t)&&sO(e)}).length===0),t&&n}function dO(e){var t=IC(e)&&!LC(e),n=!1,r=[`sameDay`,`nextDay`,`lastDay`,`nextWeek`,`lastWeek`,`sameElse`],i,a;for(i=0;i<r.length;i+=1)a=r[i],n||=N(e,a);return t&&n}function fO(e,t){var n=e.diff(t,`days`,!0);return n<-6?`sameElse`:n<-1?`lastWeek`:n<0?`lastDay`:n<1?`sameDay`:n<2?`nextDay`:n<7?`nextWeek`:`sameElse`}function pO(e,t){arguments.length===1&&(arguments[0]?cO(arguments[0])?(e=arguments[0],t=void 0):dO(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var n=e||bD(),r=RD(n,this).startOf(`day`),i=M.calendarFormat(this,r)||`sameElse`,a=t&&(rw(t[i])?t[i].call(this,n):t[i]);return this.format(a||this.localeData().calendar(i,this,bD(n)))}function mO(){return new ZC(this)}function hO(e,t){var n=QC(e)?e:bD(e);return this.isValid()&&n.isValid()?(t=Aw(t)||`millisecond`,t===`millisecond`?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf()):!1}function gO(e,t){var n=QC(e)?e:bD(e);return this.isValid()&&n.isValid()?(t=Aw(t)||`millisecond`,t===`millisecond`?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf()):!1}function _O(e,t,n,r){var i=QC(e)?e:bD(e),a=QC(t)?t:bD(t);return this.isValid()&&i.isValid()&&a.isValid()?(r||=`()`,(r[0]===`(`?this.isAfter(i,n):!this.isBefore(i,n))&&(r[1]===`)`?this.isBefore(a,n):!this.isAfter(a,n))):!1}function vO(e,t){var n=QC(e)?e:bD(e),r;return this.isValid()&&n.isValid()?(t=Aw(t)||`millisecond`,t===`millisecond`?this.valueOf()===n.valueOf():(r=n.valueOf(),this.clone().startOf(t).valueOf()<=r&&r<=this.clone().endOf(t).valueOf())):!1}function yO(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function bO(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function xO(e,t,n){var r,i,a;if(!this.isValid()||(r=RD(e,this),!r.isValid()))return NaN;switch(i=(r.utcOffset()-this.utcOffset())*6e4,t=Aw(t),t){case`year`:a=SO(this,r)/12;break;case`month`:a=SO(this,r);break;case`quarter`:a=SO(this,r)/3;break;case`second`:a=(this-r)/1e3;break;case`minute`:a=(this-r)/6e4;break;case`hour`:a=(this-r)/36e5;break;case`day`:a=(this-r-i)/864e5;break;case`week`:a=(this-r-i)/6048e5;break;default:a=this-r}return n?a:rT(a)}function SO(e,t){if(e.date()<t.date())return-SO(t,e);var n=(t.year()-e.year())*12+(t.month()-e.month()),r=e.clone().add(n,`months`),i,a;return t-r<0?(i=e.clone().add(n-1,`months`),a=(t-r)/(r-i)):(i=e.clone().add(n+1,`months`),a=(t-r)/(i-r)),-(n+a)||0}M.defaultFormat=`YYYY-MM-DDTHH:mm:ssZ`,M.defaultFormatUtc=`YYYY-MM-DDTHH:mm:ss[Z]`;function CO(){return this.clone().locale(`en`).format(`ddd MMM DD YYYY HH:mm:ss [GMT]ZZ`)}function wO(e){if(!this.isValid())return null;var t=e!==!0,n=t?this.clone().utc():this;return n.year()<0||n.year()>9999?_w(n,t?`YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]`:`YYYYYY-MM-DD[T]HH:mm:ss.SSSZ`):rw(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace(`Z`,_w(n,`Z`)):_w(n,t?`YYYY-MM-DD[T]HH:mm:ss.SSS[Z]`:`YYYY-MM-DD[T]HH:mm:ss.SSSZ`)}function TO(){if(!this.isValid())return`moment.invalid(/* `+this._i+` */)`;var e=`moment`,t=``,n,r,i,a;return this.isLocal()||(e=this.utcOffset()===0?`moment.utc`:`moment.parseZone`,t=`Z`),n=`[`+e+`("]`,r=0<=this.year()&&this.year()<=9999?`YYYY`:`YYYYYY`,i=`-MM-DD[T]HH:mm:ss.SSS`,a=t+`[")]`,this.format(n+r+i+a)}function EO(e){e||=this.isUtc()?M.defaultFormatUtc:M.defaultFormat;var t=_w(this,e);return this.localeData().postformat(t)}function DO(e,t){return this.isValid()&&(QC(e)&&e.isValid()||bD(e).isValid())?$D({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function OO(e){return this.from(bD(),e)}function kO(e,t){return this.isValid()&&(QC(e)&&e.isValid()||bD(e).isValid())?$D({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function AO(e){return this.to(bD(),e)}function jO(e){var t;return e===void 0?this._locale._abbr:(t=UE(e),t!=null&&(this._locale=t),this)}var MO=ew(`moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.`,function(e){return e===void 0?this.localeData():this.locale(e)});function NO(){return this._locale}var PO=1e3,FO=60*PO,IO=60*FO,LO=146097*24*IO;function RO(e,t){return(e%t+t)%t}function zO(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-LO:new Date(e,t,n).valueOf()}function BO(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-LO:Date.UTC(e,t,n)}function VO(e){var t,n;if(e=Aw(e),e===void 0||e===`millisecond`||!this.isValid())return this;switch(n=this._isUTC?BO:zO,e){case`year`:t=n(this.year(),0,1);break;case`quarter`:t=n(this.year(),this.month()-this.month()%3,1);break;case`month`:t=n(this.year(),this.month(),1);break;case`week`:t=n(this.year(),this.month(),this.date()-this.weekday());break;case`isoWeek`:t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case`day`:case`date`:t=n(this.year(),this.month(),this.date());break;case`hour`:t=this._d.valueOf(),t-=RO(t+(this._isUTC?0:this.utcOffset()*FO),IO);break;case`minute`:t=this._d.valueOf(),t-=RO(t,FO);break;case`second`:t=this._d.valueOf(),t-=RO(t,PO);break}return this._d.setTime(t),M.updateOffset(this,!0),this}function HO(e){var t,n;if(e=Aw(e),e===void 0||e===`millisecond`||!this.isValid())return this;switch(n=this._isUTC?BO:zO,e){case`year`:t=n(this.year()+1,0,1)-1;break;case`quarter`:t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case`month`:t=n(this.year(),this.month()+1,1)-1;break;case`week`:t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case`isoWeek`:t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case`day`:case`date`:t=n(this.year(),this.month(),this.date()+1)-1;break;case`hour`:t=this._d.valueOf(),t+=IO-RO(t+(this._isUTC?0:this.utcOffset()*FO),IO)-1;break;case`minute`:t=this._d.valueOf(),t+=FO-RO(t,FO)-1;break;case`second`:t=this._d.valueOf(),t+=PO-RO(t,PO)-1;break}return this._d.setTime(t),M.updateOffset(this,!0),this}function UO(){return this._d.valueOf()-(this._offset||0)*6e4}function WO(){return Math.floor(this.valueOf()/1e3)}function GO(){return new Date(this.valueOf())}function KO(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function qO(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function JO(){return this.isValid()?this.toISOString():null}function YO(){return KC(this)}function XO(){return HC({},P(this))}function ZO(){return P(this).overflow}function QO(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}F(`N`,0,0,`eraAbbr`),F(`NN`,0,0,`eraAbbr`),F(`NNN`,0,0,`eraAbbr`),F(`NNNN`,0,0,`eraName`),F(`NNNNN`,0,0,`eraNarrow`),F(`y`,[`y`,1],`yo`,`eraYear`),F(`y`,[`yy`,2],0,`eraYear`),F(`y`,[`yyy`,3],0,`eraYear`),F(`y`,[`yyyy`,4],0,`eraYear`),I(`N`,lk),I(`NN`,lk),I(`NNN`,lk),I(`NNNN`,uk),I(`NNNNN`,dk),aT([`N`,`NN`,`NNN`,`NNNN`,`NNNNN`],function(e,t,n,r){var i=n._locale.erasParse(e,r,n._strict);i?P(n).era=i:P(n).invalidEra=e}),I(`y`,Gw),I(`yy`,Gw),I(`yyy`,Gw),I(`yyyy`,Gw),I(`yo`,fk),aT([`y`,`yy`,`yyy`,`yyyy`],lT),aT([`yo`],function(e,t,n,r){var i;n._locale._eraYearOrdinalRegex&&(i=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[lT]=n._locale.eraYearOrdinalParse(e,i):t[lT]=parseInt(e,10)});function $O(e,t){var n,r,i,a=this._eras||UE(`en`)._eras;for(n=0,r=a.length;n<r;++n){switch(typeof a[n].since){case`string`:i=M(a[n].since).startOf(`day`),a[n].since=i.valueOf();break}switch(typeof a[n].until){case`undefined`:a[n].until=1/0;break;case`string`:i=M(a[n].until).startOf(`day`).valueOf(),a[n].until=i.valueOf();break}}return a}function ek(e,t,n){var r,i,a=this.eras(),o,s,c;for(e=e.toUpperCase(),r=0,i=a.length;r<i;++r)if(o=a[r].name.toUpperCase(),s=a[r].abbr.toUpperCase(),c=a[r].narrow.toUpperCase(),n)switch(t){case`N`:case`NN`:case`NNN`:if(s===e)return a[r];break;case`NNNN`:if(o===e)return a[r];break;case`NNNNN`:if(c===e)return a[r];break}else if([o,s,c].indexOf(e)>=0)return a[r]}function tk(e,t){var n=e.since<=e.until?1:-1;return t===void 0?M(e.since).year():M(e.since).year()+(t-e.offset)*n}function nk(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(n=this.clone().startOf(`day`).valueOf(),r[e].since<=n&&n<=r[e].until||r[e].until<=n&&n<=r[e].since)return r[e].name;return``}function rk(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(n=this.clone().startOf(`day`).valueOf(),r[e].since<=n&&n<=r[e].until||r[e].until<=n&&n<=r[e].since)return r[e].narrow;return``}function ik(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(n=this.clone().startOf(`day`).valueOf(),r[e].since<=n&&n<=r[e].until||r[e].until<=n&&n<=r[e].since)return r[e].abbr;return``}function ak(){var e,t,n,r,i=this.localeData().eras();for(e=0,t=i.length;e<t;++e)if(n=i[e].since<=i[e].until?1:-1,r=this.clone().startOf(`day`).valueOf(),i[e].since<=r&&r<=i[e].until||i[e].until<=r&&r<=i[e].since)return(this.year()-M(i[e].since).year())*n+i[e].offset;return this.year()}function ok(e){return N(this,`_erasNameRegex`)||pk.call(this),e?this._erasNameRegex:this._erasRegex}function sk(e){return N(this,`_erasAbbrRegex`)||pk.call(this),e?this._erasAbbrRegex:this._erasRegex}function ck(e){return N(this,`_erasNarrowRegex`)||pk.call(this),e?this._erasNarrowRegex:this._erasRegex}function lk(e,t){return t.erasAbbrRegex(e)}function uk(e,t){return t.erasNameRegex(e)}function dk(e,t){return t.erasNarrowRegex(e)}function fk(e,t){return t._eraYearOrdinalRegex||Gw}function pk(){var e=[],t=[],n=[],r=[],i,a,o,s,c,l=this.eras();for(i=0,a=l.length;i<a;++i)o=nT(l[i].name),s=nT(l[i].abbr),c=nT(l[i].narrow),t.push(o),e.push(s),n.push(c),r.push(o),r.push(s),r.push(c);this._erasRegex=RegExp(`^(`+r.join(`|`)+`)`,`i`),this._erasNameRegex=RegExp(`^(`+t.join(`|`)+`)`,`i`),this._erasAbbrRegex=RegExp(`^(`+e.join(`|`)+`)`,`i`),this._erasNarrowRegex=RegExp(`^(`+n.join(`|`)+`)`,`i`)}F(0,[`gg`,2],0,function(){return this.weekYear()%100}),F(0,[`GG`,2],0,function(){return this.isoWeekYear()%100});function mk(e,t){F(0,[e,e.length],0,t)}mk(`gggg`,`weekYear`),mk(`ggggg`,`weekYear`),mk(`GGGG`,`isoWeekYear`),mk(`GGGGG`,`isoWeekYear`),I(`G`,Kw),I(`g`,Kw),I(`GG`,zw,Fw),I(`gg`,zw,Fw),I(`GGGG`,Uw,Lw),I(`gggg`,Uw,Lw),I(`GGGGG`,Ww,Rw),I(`ggggg`,Ww,Rw),oT([`gggg`,`ggggg`,`GGGG`,`GGGGG`],function(e,t,n,r){t[r.substr(0,2)]=L(e)}),oT([`gg`,`GG`],function(e,t,n,r){t[r]=M.parseTwoDigitYear(e)});function hk(e){return xk.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function gk(e){return xk.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function _k(){return YT(this.year(),1,4)}function vk(){return YT(this.isoWeekYear(),1,4)}function yk(){var e=this.localeData()._week;return YT(this.year(),e.dow,e.doy)}function bk(){var e=this.localeData()._week;return YT(this.weekYear(),e.dow,e.doy)}function xk(e,t,n,r,i){var a;return e==null?JT(this,r,i).year:(a=YT(e,r,i),t>a&&(t=a),Sk.call(this,e,t,n,r,i))}function Sk(e,t,n,r,i){var a=qT(e,t,n,r,i),o=GT(a.year,0,a.dayOfYear);return this.year(o.getUTCFullYear()),this.month(o.getUTCMonth()),this.date(o.getUTCDate()),this}F(`Q`,0,`Qo`,`quarter`),I(`Q`,Pw),aT(`Q`,function(e,t){t[uT]=(L(e)-1)*3});function Ck(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}F(`D`,[`DD`,2],`Do`,`date`),I(`D`,zw,Zw),I(`DD`,zw,Fw),I(`Do`,function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),aT([`D`,`DD`],dT),aT(`Do`,function(e,t){t[dT]=L(e.match(zw)[0])});var wk=xT(`Date`,!0);F(`DDD`,[`DDDD`,3],`DDDo`,`dayOfYear`),I(`DDD`,Hw),I(`DDDD`,Iw),aT([`DDD`,`DDDD`],function(e,t,n){n._dayOfYear=L(e)});function Tk(e){var t=Math.round((this.clone().startOf(`day`)-this.clone().startOf(`year`))/864e5)+1;return e==null?t:this.add(e-t,`d`)}F(`m`,[`mm`,2],0,`minute`),I(`m`,zw,Qw),I(`mm`,zw,Fw),aT([`m`,`mm`],pT);var Ek=xT(`Minutes`,!1);F(`s`,[`ss`,2],0,`second`),I(`s`,zw,Qw),I(`ss`,zw,Fw),aT([`s`,`ss`],mT);var Dk=xT(`Seconds`,!1);F(`S`,0,0,function(){return~~(this.millisecond()/100)}),F(0,[`SS`,2],0,function(){return~~(this.millisecond()/10)}),F(0,[`SSS`,3],0,`millisecond`),F(0,[`SSSS`,4],0,function(){return this.millisecond()*10}),F(0,[`SSSSS`,5],0,function(){return this.millisecond()*100}),F(0,[`SSSSSS`,6],0,function(){return this.millisecond()*1e3}),F(0,[`SSSSSSS`,7],0,function(){return this.millisecond()*1e4}),F(0,[`SSSSSSSS`,8],0,function(){return this.millisecond()*1e5}),F(0,[`SSSSSSSSS`,9],0,function(){return this.millisecond()*1e6}),I(`S`,Hw,Pw),I(`SS`,Hw,Fw),I(`SSS`,Hw,Iw);var Ok,kk;for(Ok=`SSSS`;Ok.length<=9;Ok+=`S`)I(Ok,Gw);function Ak(e,t){t[hT]=L((`0.`+e)*1e3)}for(Ok=`S`;Ok.length<=9;Ok+=`S`)aT(Ok,Ak);kk=xT(`Milliseconds`,!1),F(`z`,0,0,`zoneAbbr`),F(`zz`,0,0,`zoneName`);function jk(){return this._isUTC?`UTC`:``}function Mk(){return this._isUTC?`Coordinated Universal Time`:``}var R=ZC.prototype;R.add=aO,R.calendar=pO,R.clone=mO,R.diff=xO,R.endOf=HO,R.format=EO,R.from=DO,R.fromNow=OO,R.to=kO,R.toNow=AO,R.get=wT,R.invalidAt=ZO,R.isAfter=hO,R.isBefore=gO,R.isBetween=_O,R.isSame=vO,R.isSameOrAfter=yO,R.isSameOrBefore=bO,R.isValid=YO,R.lang=MO,R.locale=jO,R.localeData=NO,R.max=SD,R.min=xD,R.parsingFlags=XO,R.set=TT,R.startOf=VO,R.subtract=oO,R.toArray=KO,R.toObject=qO,R.toDate=GO,R.toISOString=wO,R.inspect=TO,typeof Symbol<`u`&&Symbol.for!=null&&(R[Symbol.for(`nodejs.util.inspect.custom`)]=function(){return`Moment<`+this.format()+`>`}),R.toJSON=JO,R.toString=CO,R.unix=WO,R.valueOf=UO,R.creationData=QO,R.eraName=nk,R.eraNarrow=rk,R.eraAbbr=ik,R.eraYear=ak,R.year=yT,R.isLeapYear=bT,R.weekYear=hk,R.isoWeekYear=gk,R.quarter=R.quarters=Ck,R.month=zT,R.daysInMonth=BT,R.week=R.weeks=eE,R.isoWeek=R.isoWeeks=tE,R.weeksInYear=yk,R.weeksInWeekYear=bk,R.isoWeeksInYear=_k,R.isoWeeksInISOWeekYear=vk,R.date=wk,R.day=R.days=gE,R.weekday=_E,R.isoWeekday=vE,R.dayOfYear=Tk,R.hour=R.hours=kE,R.minute=R.minutes=Ek,R.second=R.seconds=Dk,R.millisecond=R.milliseconds=kk,R.utcOffset=BD,R.utc=HD,R.local=UD,R.parseZone=WD,R.hasAlignedHourOffset=GD,R.isDST=KD,R.isLocal=JD,R.isUtcOffset=YD,R.isUtc=XD,R.isUTC=XD,R.zoneAbbr=jk,R.zoneName=Mk,R.dates=ew(`dates accessor is deprecated. Use date instead.`,wk),R.months=ew(`months accessor is deprecated. Use month instead`,zT),R.years=ew(`years accessor is deprecated. Use year instead`,yT),R.zone=ew(`moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/`,VD),R.isDSTShifted=ew(`isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information`,qD);function Nk(e){return bD(e*1e3)}function Pk(){return bD.apply(null,arguments).parseZone()}function Fk(e){return e}var z=ow.prototype;z.calendar=lw,z.longDateFormat=bw,z.invalidDate=Sw,z.ordinal=Tw,z.preparse=Fk,z.postformat=Fk,z.relativeTime=Dw,z.pastFuture=Ow,z.set=iw,z.eras=$O,z.erasParse=ek,z.erasConvertYear=tk,z.erasAbbrRegex=sk,z.erasNameRegex=ok,z.erasNarrowRegex=ck,z.months=PT,z.monthsShort=FT,z.monthsParse=LT,z.monthsRegex=HT,z.monthsShortRegex=VT,z.week=XT,z.firstDayOfYear=$T,z.firstDayOfWeek=QT,z.weekdays=dE,z.weekdaysMin=pE,z.weekdaysShort=fE,z.weekdaysParse=hE,z.weekdaysRegex=yE,z.weekdaysShortRegex=bE,z.weekdaysMinRegex=xE,z.isPM=DE,z.meridiem=AE;function Ik(e,t,n,r){var i=UE(),a=UC().set(r,t);return i[n](a,e)}function Lk(e,t,n){if(zC(e)&&(t=e,e=void 0),e||=``,t!=null)return Ik(e,t,n,`month`);var r,i=[];for(r=0;r<12;r++)i[r]=Ik(e,r,n,`month`);return i}function Rk(e,t,n,r){typeof e==`boolean`?(zC(t)&&(n=t,t=void 0),t||=``):(t=e,n=t,e=!1,zC(t)&&(n=t,t=void 0),t||=``);var i=UE(),a=e?i._week.dow:0,o,s=[];if(n!=null)return Ik(t,(n+a)%7,r,`day`);for(o=0;o<7;o++)s[o]=Ik(t,(o+a)%7,r,`day`);return s}function zk(e,t){return Lk(e,t,`months`)}function Bk(e,t){return Lk(e,t,`monthsShort`)}function Vk(e,t,n){return Rk(e,t,n,`weekdays`)}function Hk(e,t,n){return Rk(e,t,n,`weekdaysShort`)}function Uk(e,t,n){return Rk(e,t,n,`weekdaysMin`)}BE(`en`,{eras:[{since:`0001-01-01`,until:1/0,offset:1,name:`Anno Domini`,narrow:`AD`,abbr:`AD`},{since:`0000-12-31`,until:-1/0,offset:1,name:`Before Christ`,narrow:`BC`,abbr:`BC`}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(L(e%100/10)===1?`th`:t===1?`st`:t===2?`nd`:t===3?`rd`:`th`)}}),M.lang=ew(`moment.lang is deprecated. Use moment.locale instead.`,BE),M.langData=ew(`moment.langData is deprecated. Use moment.localeData instead.`,UE);var Wk=Math.abs;function Gk(){var e=this._data;return this._milliseconds=Wk(this._milliseconds),this._days=Wk(this._days),this._months=Wk(this._months),e.milliseconds=Wk(e.milliseconds),e.seconds=Wk(e.seconds),e.minutes=Wk(e.minutes),e.hours=Wk(e.hours),e.months=Wk(e.months),e.years=Wk(e.years),this}function Kk(e,t,n,r){var i=$D(t,n);return e._milliseconds+=r*i._milliseconds,e._days+=r*i._days,e._months+=r*i._months,e._bubble()}function qk(e,t){return Kk(this,e,t,1)}function Jk(e,t){return Kk(this,e,t,-1)}function Yk(e){return e<0?Math.floor(e):Math.ceil(e)}function Xk(){var e=this._milliseconds,t=this._days,n=this._months,r=this._data,i,a,o,s,c;return e>=0&&t>=0&&n>=0||e<=0&&t<=0&&n<=0||(e+=Yk(Qk(n)+t)*864e5,t=0,n=0),r.milliseconds=e%1e3,i=rT(e/1e3),r.seconds=i%60,a=rT(i/60),r.minutes=a%60,o=rT(a/60),r.hours=o%24,t+=rT(o/24),c=rT(Zk(t)),n+=c,t-=Yk(Qk(c)),s=rT(n/12),n%=12,r.days=t,r.months=n,r.years=s,this}function Zk(e){return e*4800/146097}function Qk(e){return e*146097/4800}function $k(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if(e=Aw(e),e===`month`||e===`quarter`||e===`year`)switch(t=this._days+r/864e5,n=this._months+Zk(t),e){case`month`:return n;case`quarter`:return n/3;case`year`:return n/12}else switch(t=this._days+Math.round(Qk(this._months)),e){case`week`:return t/7+r/6048e5;case`day`:return t+r/864e5;case`hour`:return t*24+r/36e5;case`minute`:return t*1440+r/6e4;case`second`:return t*86400+r/1e3;case`millisecond`:return Math.floor(t*864e5)+r;default:throw Error(`Unknown unit `+e)}}function eA(e){return function(){return this.as(e)}}var tA=eA(`ms`),nA=eA(`s`),rA=eA(`m`),iA=eA(`h`),aA=eA(`d`),oA=eA(`w`),sA=eA(`M`),cA=eA(`Q`),lA=eA(`y`),uA=tA;function dA(){return $D(this)}function fA(e){return e=Aw(e),this.isValid()?this[e+`s`]():NaN}function pA(e){return function(){return this.isValid()?this._data[e]:NaN}}var mA=pA(`milliseconds`),hA=pA(`seconds`),gA=pA(`minutes`),_A=pA(`hours`),vA=pA(`days`),yA=pA(`months`),bA=pA(`years`);function xA(){return rT(this.days()/7)}var SA=Math.round,CA={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function wA(e,t,n,r,i){return i.relativeTime(t||1,!!n,e,r)}function TA(e,t,n,r){var i=$D(e).abs(),a=SA(i.as(`s`)),o=SA(i.as(`m`)),s=SA(i.as(`h`)),c=SA(i.as(`d`)),l=SA(i.as(`M`)),u=SA(i.as(`w`)),d=SA(i.as(`y`)),f=a<=n.ss&&[`s`,a]||a<n.s&&[`ss`,a]||o<=1&&[`m`]||o<n.m&&[`mm`,o]||s<=1&&[`h`]||s<n.h&&[`hh`,s]||c<=1&&[`d`]||c<n.d&&[`dd`,c];return n.w!=null&&(f=f||u<=1&&[`w`]||u<n.w&&[`ww`,u]),f=f||l<=1&&[`M`]||l<n.M&&[`MM`,l]||d<=1&&[`y`]||[`yy`,d],f[2]=t,f[3]=+e>0,f[4]=r,wA.apply(null,f)}function EA(e){return e===void 0?SA:typeof e==`function`?(SA=e,!0):!1}function DA(e,t){return CA[e]===void 0?!1:t===void 0?CA[e]:(CA[e]=t,e===`s`&&(CA.ss=t-1),!0)}function OA(e,t){if(!this.isValid())return this.localeData().invalidDate();var n=!1,r=CA,i,a;return typeof e==`object`&&(t=e,e=!1),typeof e==`boolean`&&(n=e),typeof t==`object`&&(r=Object.assign({},CA,t),t.s!=null&&t.ss==null&&(r.ss=t.s-1)),i=this.localeData(),a=TA(this,!n,r,i),n&&(a=i.pastFuture(+this,a)),i.postformat(a)}var kA=Math.abs;function AA(e){return(e>0)-(e<0)||+e}function jA(){if(!this.isValid())return this.localeData().invalidDate();var e=kA(this._milliseconds)/1e3,t=kA(this._days),n=kA(this._months),r,i,a,o,s=this.asSeconds(),c,l,u,d;return s?(r=rT(e/60),i=rT(r/60),e%=60,r%=60,a=rT(n/12),n%=12,o=e?e.toFixed(3).replace(/\.?0+$/,``):``,c=s<0?`-`:``,l=AA(this._months)===AA(s)?``:`-`,u=AA(this._days)===AA(s)?``:`-`,d=AA(this._milliseconds)===AA(s)?``:`-`,c+`P`+(a?l+a+`Y`:``)+(n?l+n+`M`:``)+(t?u+t+`D`:``)+(i||r||e?`T`:``)+(i?d+i+`H`:``)+(r?d+r+`M`:``)+(e?d+o+`S`:``)):`P0D`}var B=jD.prototype;B.isValid=kD,B.abs=Gk,B.add=qk,B.subtract=Jk,B.as=$k,B.asMilliseconds=tA,B.asSeconds=nA,B.asMinutes=rA,B.asHours=iA,B.asDays=aA,B.asWeeks=oA,B.asMonths=sA,B.asQuarters=cA,B.asYears=lA,B.valueOf=uA,B._bubble=Xk,B.clone=dA,B.get=fA,B.milliseconds=mA,B.seconds=hA,B.minutes=gA,B.hours=_A,B.days=vA,B.weeks=xA,B.months=yA,B.years=bA,B.humanize=OA,B.toISOString=jA,B.toString=jA,B.toJSON=jA,B.locale=jO,B.localeData=NO,B.toIsoString=ew(`toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)`,jA),B.lang=MO,F(`X`,0,0,`unix`),F(`x`,0,0,`valueOf`),I(`x`,Kw),I(`X`,Yw),aT(`X`,function(e,t,n){n._d=new Date(parseFloat(e)*1e3)}),aT(`x`,function(e,t,n){n._d=new Date(L(e))}),M.version=`2.30.1`,PC(bD),M.fn=R,M.min=wD,M.max=TD,M.now=ED,M.utc=UC,M.unix=Nk,M.months=zk,M.isDate=BC,M.locale=BE,M.invalid=qC,M.duration=$D,M.isMoment=QC,M.weekdays=Vk,M.parseZone=Pk,M.localeData=UE,M.isDuration=MD,M.monthsShort=Bk,M.weekdaysMin=Uk,M.defineLocale=VE,M.updateLocale=HE,M.locales=WE,M.weekdaysShort=Hk,M.normalizeUnits=Aw,M.relativeTimeRounding=EA,M.relativeTimeThreshold=DA,M.calendarFormat=fO,M.prototype=R,M.HTML5_FMT={DATETIME_LOCAL:`YYYY-MM-DDTHH:mm`,DATETIME_LOCAL_SECONDS:`YYYY-MM-DDTHH:mm:ss`,DATETIME_LOCAL_MS:`YYYY-MM-DDTHH:mm:ss.SSS`,DATE:`YYYY-MM-DD`,TIME:`HH:mm`,TIME_SECONDS:`HH:mm:ss`,TIME_MS:`HH:mm:ss.SSS`,WEEK:`GGGG-[W]WW`,MONTH:`YYYY-MM`};var MA=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{};function V(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}var NA={},PA,FA;function IA(){if(FA)return PA;FA=1;var e=function(e){return e&&e.Math===Math&&e};return PA=e(typeof globalThis==`object`&&globalThis)||e(typeof window==`object`&&window)||e(typeof self==`object`&&self)||e(typeof MA==`object`&&MA)||e(typeof PA==`object`&&PA)||(function(){return this})()||Function(`return this`)(),PA}var LA,RA;function H(){return RA?LA:(RA=1,LA=function(e){try{return!!e()}catch{return!0}},LA)}var zA,BA;function VA(){return BA?zA:(BA=1,zA=!H()(function(){var e=(function(){}).bind();return typeof e!=`function`||e.hasOwnProperty(`prototype`)}),zA)}var HA,UA;function WA(){if(UA)return HA;UA=1;var e=VA(),t=Function.prototype,n=t.apply,r=t.call;return HA=typeof Reflect==`object`&&Reflect.apply||(e?r.bind(n):function(){return r.apply(n,arguments)}),HA}var GA,KA;function U(){if(KA)return GA;KA=1;var e=VA(),t=Function.prototype,n=t.call,r=e&&t.bind.bind(n,n);return GA=e?r:function(e){return function(){return n.apply(e,arguments)}},GA}var qA,JA;function YA(){if(JA)return qA;JA=1;var e=U(),t=e({}.toString),n=e(``.slice);return qA=function(e){return n(t(e),8,-1)},qA}var XA,ZA;function QA(){if(ZA)return XA;ZA=1;var e=YA(),t=U();return XA=function(n){if(e(n)===`Function`)return t(n)},XA}var $A,ej;function tj(){if(ej)return $A;ej=1;var e=typeof document==`object`&&document.all;return $A=e===void 0&&e!==void 0?function(t){return typeof t==`function`||t===e}:function(e){return typeof e==`function`},$A}var nj={},rj,ij;function aj(){return ij?rj:(ij=1,rj=!H()(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),rj)}var oj,sj;function cj(){if(sj)return oj;sj=1;var e=VA(),t=Function.prototype.call;return oj=e?t.bind(t):function(){return t.apply(t,arguments)},oj}var lj={},uj;function dj(){if(uj)return lj;uj=1;var e={}.propertyIsEnumerable,t=Object.getOwnPropertyDescriptor;return lj.f=t&&!e.call({1:2},1)?function(e){var n=t(this,e);return!!n&&n.enumerable}:e,lj}var fj,pj;function mj(){return pj?fj:(pj=1,fj=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}},fj)}var hj,gj;function _j(){if(gj)return hj;gj=1;var e=U(),t=H(),n=YA(),r=Object,i=e(``.split);return hj=t(function(){return!r(`z`).propertyIsEnumerable(0)})?function(e){return n(e)===`String`?i(e,``):r(e)}:r,hj}var vj,yj;function bj(){return yj?vj:(yj=1,vj=function(e){return e==null},vj)}var xj,Sj;function Cj(){if(Sj)return xj;Sj=1;var e=bj(),t=TypeError;return xj=function(n){if(e(n))throw new t(`Can't call method on `+n);return n},xj}var wj,Tj;function Ej(){if(Tj)return wj;Tj=1;var e=_j(),t=Cj();return wj=function(n){return e(t(n))},wj}var Dj,Oj;function kj(){if(Oj)return Dj;Oj=1;var e=tj();return Dj=function(t){return typeof t==`object`?t!==null:e(t)},Dj}var Aj,jj;function Mj(){return jj?Aj:(jj=1,Aj={},Aj)}var Nj,Pj;function Fj(){if(Pj)return Nj;Pj=1;var e=Mj(),t=IA(),n=tj(),r=function(e){return n(e)?e:void 0};return Nj=function(n,i){return arguments.length<2?r(e[n])||r(t[n]):e[n]&&e[n][i]||t[n]&&t[n][i]},Nj}var Ij,Lj;function Rj(){return Lj?Ij:(Lj=1,Ij=U()({}.isPrototypeOf),Ij)}var zj,Bj;function Vj(){if(Bj)return zj;Bj=1;var e=IA().navigator,t=e&&e.userAgent;return zj=t?String(t):``,zj}var Hj,Uj;function Wj(){if(Uj)return Hj;Uj=1;var e=IA(),t=Vj(),n=e.process,r=e.Deno,i=n&&n.versions||r&&r.version,a=i&&i.v8,o,s;return a&&(o=a.split(`.`),s=o[0]>0&&o[0]<4?1:+(o[0]+o[1])),!s&&t&&(o=t.match(/Edge\/(\d+)/),(!o||o[1]>=74)&&(o=t.match(/Chrome\/(\d+)/),o&&(s=+o[1]))),Hj=s,Hj}var Gj,Kj;function qj(){if(Kj)return Gj;Kj=1;var e=Wj(),t=H(),n=IA().String;return Gj=!!Object.getOwnPropertySymbols&&!t(function(){var t=Symbol(`symbol detection`);return!n(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&e&&e<41}),Gj}var Jj,Yj;function Xj(){return Yj?Jj:(Yj=1,Jj=qj()&&!Symbol.sham&&typeof Symbol.iterator==`symbol`,Jj)}var Zj,Qj;function $j(){if(Qj)return Zj;Qj=1;var e=Fj(),t=tj(),n=Rj(),r=Xj(),i=Object;return Zj=r?function(e){return typeof e==`symbol`}:function(r){var a=e(`Symbol`);return t(a)&&n(a.prototype,i(r))},Zj}var eM,tM;function nM(){if(tM)return eM;tM=1;var e=String;return eM=function(t){try{return e(t)}catch{return`Object`}},eM}var rM,iM;function aM(){if(iM)return rM;iM=1;var e=tj(),t=nM(),n=TypeError;return rM=function(r){if(e(r))return r;throw new n(t(r)+` is not a function`)},rM}var oM,sM;function cM(){if(sM)return oM;sM=1;var e=aM(),t=bj();return oM=function(n,r){var i=n[r];return t(i)?void 0:e(i)},oM}var lM,uM;function dM(){if(uM)return lM;uM=1;var e=cj(),t=tj(),n=kj(),r=TypeError;return lM=function(i,a){var o,s;if(a===`string`&&t(o=i.toString)&&!n(s=e(o,i))||t(o=i.valueOf)&&!n(s=e(o,i))||a!==`string`&&t(o=i.toString)&&!n(s=e(o,i)))return s;throw new r(`Can't convert object to primitive value`)},lM}var fM={exports:{}},pM,mM;function hM(){return mM?pM:(mM=1,pM=!0,pM)}var gM,_M;function vM(){if(_M)return gM;_M=1;var e=IA(),t=Object.defineProperty;return gM=function(n,r){try{t(e,n,{value:r,configurable:!0,writable:!0})}catch{e[n]=r}return r},gM}var yM;function bM(){if(yM)return fM.exports;yM=1;var e=hM(),t=IA(),n=vM(),r=`__core-js_shared__`,i=fM.exports=t[r]||n(r,{});return(i.versions||=[]).push({version:`3.44.0`,mode:e?`pure`:`global`,copyright:`© 2014-2025 Denis Pushkarev (zloirock.ru)`,license:`https://github.com/zloirock/core-js/blob/v3.44.0/LICENSE`,source:`https://github.com/zloirock/core-js`}),fM.exports}var xM,SM;function CM(){if(SM)return xM;SM=1;var e=bM();return xM=function(t,n){return e[t]||(e[t]=n||{})},xM}var wM,TM;function EM(){if(TM)return wM;TM=1;var e=Cj(),t=Object;return wM=function(n){return t(e(n))},wM}var DM,OM;function kM(){if(OM)return DM;OM=1;var e=U(),t=EM(),n=e({}.hasOwnProperty);return DM=Object.hasOwn||function(e,r){return n(t(e),r)},DM}var AM,jM;function MM(){if(jM)return AM;jM=1;var e=U(),t=0,n=Math.random(),r=e(1.1.toString);return AM=function(e){return`Symbol(`+(e===void 0?``:e)+`)_`+r(++t+n,36)},AM}var NM,PM;function FM(){if(PM)return NM;PM=1;var e=IA(),t=CM(),n=kM(),r=MM(),i=qj(),a=Xj(),o=e.Symbol,s=t(`wks`),c=a?o.for||o:o&&o.withoutSetter||r;return NM=function(e){return n(s,e)||(s[e]=i&&n(o,e)?o[e]:c(`Symbol.`+e)),s[e]},NM}var IM,LM;function RM(){if(LM)return IM;LM=1;var e=cj(),t=kj(),n=$j(),r=cM(),i=dM(),a=FM(),o=TypeError,s=a(`toPrimitive`);return IM=function(a,c){if(!t(a)||n(a))return a;var l=r(a,s),u;if(l){if(c===void 0&&(c=`default`),u=e(l,a,c),!t(u)||n(u))return u;throw new o(`Can't convert object to primitive value`)}return c===void 0&&(c=`number`),i(a,c)},IM}var zM,BM;function VM(){if(BM)return zM;BM=1;var e=RM(),t=$j();return zM=function(n){var r=e(n,`string`);return t(r)?r:r+``},zM}var HM,UM;function WM(){if(UM)return HM;UM=1;var e=IA(),t=kj(),n=e.document,r=t(n)&&t(n.createElement);return HM=function(e){return r?n.createElement(e):{}},HM}var GM,KM;function qM(){if(KM)return GM;KM=1;var e=aj(),t=H(),n=WM();return GM=!e&&!t(function(){return Object.defineProperty(n(`div`),`a`,{get:function(){return 7}}).a!==7}),GM}var JM;function YM(){if(JM)return nj;JM=1;var e=aj(),t=cj(),n=dj(),r=mj(),i=Ej(),a=VM(),o=kM(),s=qM(),c=Object.getOwnPropertyDescriptor;return nj.f=e?c:function(e,l){if(e=i(e),l=a(l),s)try{return c(e,l)}catch{}if(o(e,l))return r(!t(n.f,e,l),e[l])},nj}var XM,ZM;function QM(){if(ZM)return XM;ZM=1;var e=H(),t=tj(),n=/#|\.prototype\./,r=function(n,r){var c=a[i(n)];return c===s?!0:c===o?!1:t(r)?e(r):!!r},i=r.normalize=function(e){return String(e).replace(n,`.`).toLowerCase()},a=r.data={},o=r.NATIVE=`N`,s=r.POLYFILL=`P`;return XM=r,XM}var $M,eN;function tN(){if(eN)return $M;eN=1;var e=QA(),t=aM(),n=VA(),r=e(e.bind);return $M=function(e,i){return t(e),i===void 0?e:n?r(e,i):function(){return e.apply(i,arguments)}},$M}var nN={},rN,iN;function aN(){return iN?rN:(iN=1,rN=aj()&&H()(function(){return Object.defineProperty(function(){},`prototype`,{value:42,writable:!1}).prototype!==42}),rN)}var oN,sN;function cN(){if(sN)return oN;sN=1;var e=kj(),t=String,n=TypeError;return oN=function(r){if(e(r))return r;throw new n(t(r)+` is not an object`)},oN}var lN;function uN(){if(lN)return nN;lN=1;var e=aj(),t=qM(),n=aN(),r=cN(),i=VM(),a=TypeError,o=Object.defineProperty,s=Object.getOwnPropertyDescriptor,c=`enumerable`,l=`configurable`,u=`writable`;return nN.f=e?n?function(e,t,n){if(r(e),t=i(t),r(n),typeof e==`function`&&t===`prototype`&&`value`in n&&u in n&&!n[u]){var a=s(e,t);a&&a[u]&&(e[t]=n.value,n={configurable:l in n?n[l]:a[l],enumerable:c in n?n[c]:a[c],writable:!1})}return o(e,t,n)}:o:function(e,n,s){if(r(e),n=i(n),r(s),t)try{return o(e,n,s)}catch{}if(`get`in s||`set`in s)throw new a(`Accessors not supported`);return`value`in s&&(e[n]=s.value),e},nN}var dN,fN;function pN(){if(fN)return dN;fN=1;var e=aj(),t=uN(),n=mj();return dN=e?function(e,r,i){return t.f(e,r,n(1,i))}:function(e,t,n){return e[t]=n,e},dN}var mN,hN;function W(){if(hN)return mN;hN=1;var e=IA(),t=WA(),n=QA(),r=tj(),i=YM().f,a=QM(),o=Mj(),s=tN(),c=pN(),l=kM(),u=function(e){var n=function(r,i,a){if(this instanceof n){switch(arguments.length){case 0:return new e;case 1:return new e(r);case 2:return new e(r,i)}return new e(r,i,a)}return t(e,this,arguments)};return n.prototype=e.prototype,n};return mN=function(t,d){var f=t.target,p=t.global,m=t.stat,h=t.proto,g=p?e:m?e[f]:e[f]&&e[f].prototype,_=p?o:o[f]||c(o,f,{})[f],v=_.prototype,y,b,x,S,C,w,T,E,D;for(S in d)y=a(p?S:f+(m?`.`:`#`)+S,t.forced),b=!y&&g&&l(g,S),w=_[S],b&&(t.dontCallGetSet?(D=i(g,S),T=D&&D.value):T=g[S]),C=b&&T?T:d[S],!(!y&&!h&&typeof w==typeof C)&&(E=t.bind&&b?s(C,e):t.wrap&&b?u(C):h&&r(C)?n(C):C,(t.sham||C&&C.sham||w&&w.sham)&&c(E,`sham`,!0),c(_,S,E),h&&(x=f+`Prototype`,l(o,x)||c(o,x,{}),c(o[x],S,C),t.real&&v&&(y||!v[S])&&c(v,S,C)))},mN}var gN,_N;function vN(){if(_N)return gN;_N=1;var e=YA();return gN=Array.isArray||function(t){return e(t)===`Array`},gN}var yN;function bN(){return yN?NA:(yN=1,W()({target:`Array`,stat:!0},{isArray:vN()}),NA)}var xN,SN;function CN(){return SN?xN:(SN=1,bN(),xN=Mj().Array.isArray,xN)}var wN,TN;function EN(){return TN?wN:(TN=1,wN=CN(),wN)}var DN,ON;function kN(){return ON?DN:(ON=1,DN=EN(),DN)}var G=V(kN()),AN={},jN,MN;function NN(){return MN?jN:(MN=1,jN=U()([].slice),jN)}var PN,FN;function IN(){if(FN)return PN;FN=1;var e=U(),t=aM(),n=kj(),r=kM(),i=NN(),a=VA(),o=Function,s=e([].concat),c=e([].join),l={},u=function(e,t,n){if(!r(l,t)){for(var i=[],a=0;a<t;a++)i[a]=`a[`+a+`]`;l[t]=o(`C,a`,`return new C(`+c(i,`,`)+`)`)}return l[t](e,n)};return PN=a?o.bind:function(e){var r=t(this),a=r.prototype,o=i(arguments,1),c=function(){var t=s(o,i(arguments));return this instanceof c?u(r,t.length,t):r.apply(e,t)};return n(a)&&(c.prototype=a),c},PN}var LN;function RN(){if(LN)return AN;LN=1;var e=W(),t=IN();return e({target:`Function`,proto:!0,forced:Function.bind!==t},{bind:t}),AN}var zN,BN;function VN(){if(BN)return zN;BN=1;var e=IA(),t=Mj();return zN=function(n,r){var i=t[n+`Prototype`],a=i&&i[r];if(a)return a;var o=e[n],s=o&&o.prototype;return s&&s[r]},zN}var HN,UN;function WN(){return UN?HN:(UN=1,RN(),HN=VN()(`Function`,`bind`),HN)}var GN,KN;function qN(){if(KN)return GN;KN=1;var e=Rj(),t=WN(),n=Function.prototype;return GN=function(r){var i=r.bind;return r===n||e(n,r)&&i===n.bind?t:i},GN}var JN,YN;function XN(){return YN?JN:(YN=1,JN=qN(),JN)}var ZN,QN;function $N(){return QN?ZN:(QN=1,ZN=XN(),ZN)}var K=V($N()),eP={},tP={},nP,rP;function iP(){if(rP)return nP;rP=1;var e=IA(),t=Vj(),n=YA(),r=function(e){return t.slice(0,e.length)===e};return nP=(function(){return r(`Bun/`)?`BUN`:r(`Cloudflare-Workers`)?`CLOUDFLARE`:r(`Deno/`)?`DENO`:r(`Node.js/`)?`NODE`:e.Bun&&typeof Bun.version==`string`?`BUN`:e.Deno&&typeof Deno.version==`object`?`DENO`:n(e.process)===`process`?`NODE`:e.window&&e.document?`BROWSER`:`REST`})(),nP}var aP,oP;function sP(){if(oP)return aP;oP=1;var e=TypeError;return aP=function(t,n){if(t<n)throw new e(`Not enough arguments`);return t},aP}var cP,lP;function uP(){if(lP)return cP;lP=1;var e=IA(),t=WA(),n=tj(),r=iP(),i=Vj(),a=NN(),o=sP(),s=e.Function,c=/MSIE .\./.test(i)||r===`BUN`&&(function(){var t=e.Bun.version.split(`.`);return t.length<3||t[0]===`0`&&(t[1]<3||t[1]===`3`&&t[2]===`0`)})();return cP=function(e,r){var i=r?2:1;return c?function(c,l){var u=o(arguments.length,1)>i,d=n(c)?c:s(c),f=u?a(arguments,i):[],p=u?function(){t(d,this,f)}:d;return r?e(p,l):e(p)}:e},cP}var dP;function fP(){if(dP)return tP;dP=1;var e=W(),t=IA(),n=uP()(t.setInterval,!0);return e({global:!0,bind:!0,forced:t.setInterval!==n},{setInterval:n}),tP}var pP={},mP;function hP(){if(mP)return pP;mP=1;var e=W(),t=IA(),n=uP()(t.setTimeout,!0);return e({global:!0,bind:!0,forced:t.setTimeout!==n},{setTimeout:n}),pP}var gP;function _P(){return gP?eP:(gP=1,fP(),hP(),eP)}var vP,yP;function bP(){return yP?vP:(yP=1,_P(),vP=Mj().setTimeout,vP)}var xP,SP;function CP(){return SP?xP:(SP=1,xP=bP(),xP)}var wP=V(CP()),TP,EP;function DP(){if(EP)return TP;EP=1;var e=FM()(`toStringTag`),t={};return t[e]=`z`,TP=String(t)===`[object z]`,TP}var OP,kP;function AP(){if(kP)return OP;kP=1;var e=DP(),t=tj(),n=YA(),r=FM()(`toStringTag`),i=Object,a=n(function(){return arguments}())===`Arguments`,o=function(e,t){try{return e[t]}catch{}};return OP=e?n:function(e){var s,c,l;return e===void 0?`Undefined`:e===null?`Null`:typeof(c=o(s=i(e),r))==`string`?c:a?n(s):(l=n(s))===`Object`&&t(s.callee)?`Arguments`:l},OP}var jP={},MP,NP;function PP(){if(NP)return MP;NP=1;var e=Math.ceil,t=Math.floor;return MP=Math.trunc||function(n){var r=+n;return(r>0?t:e)(r)},MP}var FP,IP;function LP(){if(IP)return FP;IP=1;var e=PP();return FP=function(t){var n=+t;return n!==n||n===0?0:e(n)},FP}var RP,zP;function BP(){if(zP)return RP;zP=1;var e=LP(),t=Math.min;return RP=function(n){var r=e(n);return r>0?t(r,9007199254740991):0},RP}var VP,HP;function UP(){if(HP)return VP;HP=1;var e=BP();return VP=function(t){return e(t.length)},VP}var WP,GP;function KP(){if(GP)return WP;GP=1;var e=U(),t=tj(),n=bM(),r=e(Function.toString);return t(n.inspectSource)||(n.inspectSource=function(e){return r(e)}),WP=n.inspectSource,WP}var qP,JP;function YP(){if(JP)return qP;JP=1;var e=U(),t=H(),n=tj(),r=AP(),i=Fj(),a=KP(),o=function(){},s=i(`Reflect`,`construct`),c=/^\s*(?:class|function)\b/,l=e(c.exec),u=!c.test(o),d=function(e){if(!n(e))return!1;try{return s(o,[],e),!0}catch{return!1}},f=function(e){if(!n(e))return!1;switch(r(e)){case`AsyncFunction`:case`GeneratorFunction`:case`AsyncGeneratorFunction`:return!1}try{return u||!!l(c,a(e))}catch{return!0}};return f.sham=!0,qP=!s||t(function(){var e;return d(d.call)||!d(Object)||!d(function(){e=!0})||e})?f:d,qP}var XP,ZP;function QP(){if(ZP)return XP;ZP=1;var e=vN(),t=YP(),n=kj(),r=FM()(`species`),i=Array;return XP=function(a){var o;return e(a)&&(o=a.constructor,t(o)&&(o===i||e(o.prototype))?o=void 0:n(o)&&(o=o[r],o===null&&(o=void 0))),o===void 0?i:o},XP}var $P,eF;function tF(){if(eF)return $P;eF=1;var e=QP();return $P=function(t,n){return new(e(t))(n===0?0:n)},$P}var nF,rF;function iF(){if(rF)return nF;rF=1;var e=tN(),t=U(),n=_j(),r=EM(),i=UP(),a=tF(),o=t([].push),s=function(t){var s=t===1,c=t===2,l=t===3,u=t===4,d=t===6,f=t===7,p=t===5||d;return function(m,h,g,_){for(var v=r(m),y=n(v),b=i(y),x=e(h,g),S=0,C=_||a,w=s?C(m,b):c||f?C(m,0):void 0,T,E;b>S;S++)if((p||S in y)&&(T=y[S],E=x(T,S,v),t))if(s)w[S]=E;else if(E)switch(t){case 3:return!0;case 5:return T;case 6:return S;case 2:o(w,T)}else switch(t){case 4:return!1;case 7:o(w,T)}return d?-1:l||u?u:w}};return nF={forEach:s(0),map:s(1),filter:s(2),some:s(3),every:s(4),find:s(5),findIndex:s(6),filterReject:s(7)},nF}var aF,oF;function sF(){if(oF)return aF;oF=1;var e=H();return aF=function(t,n){var r=[][t];return!!r&&e(function(){r.call(null,n||function(){return 1},1)})},aF}var cF,lF;function uF(){if(lF)return cF;lF=1;var e=iF().forEach;return cF=sF()(`forEach`)?[].forEach:function(t){return e(this,t,arguments.length>1?arguments[1]:void 0)},cF}var dF;function fF(){if(dF)return jP;dF=1;var e=W(),t=uF();return e({target:`Array`,proto:!0,forced:[].forEach!==t},{forEach:t}),jP}var pF,mF;function hF(){return mF?pF:(mF=1,fF(),pF=VN()(`Array`,`forEach`),pF)}var gF,_F;function vF(){return _F?gF:(_F=1,gF=hF(),gF)}var yF,bF;function xF(){if(bF)return yF;bF=1;var e=AP(),t=kM(),n=Rj(),r=vF(),i=Array.prototype,a={DOMTokenList:!0,NodeList:!0};return yF=function(o){var s=o.forEach;return o===i||n(i,o)&&s===i.forEach||t(a,e(o))?r:s},yF}var SF,CF;function wF(){return CF?SF:(CF=1,SF=xF(),SF)}var q=V(wF()),TF=typeof window<`u`&&window.moment||M,EF={},DF={},OF,kF;function AF(){if(kF)return OF;kF=1;var e=AP(),t=String;return OF=function(n){if(e(n)===`Symbol`)throw TypeError(`Cannot convert a Symbol value to a string`);return t(n)},OF}var jF={},MF,NF;function PF(){if(NF)return MF;NF=1;var e=LP(),t=Math.max,n=Math.min;return MF=function(r,i){var a=e(r);return a<0?t(a+i,0):n(a,i)},MF}var FF,IF;function LF(){if(IF)return FF;IF=1;var e=Ej(),t=PF(),n=UP(),r=function(r){return function(i,a,o){var s=e(i),c=n(s);if(c===0)return!r&&-1;var l=t(o,c),u;if(r&&a!==a){for(;c>l;)if(u=s[l++],u!==u)return!0}else for(;c>l;l++)if((r||l in s)&&s[l]===a)return r||l||0;return!r&&-1}};return FF={includes:r(!0),indexOf:r(!1)},FF}var RF,zF;function BF(){return zF?RF:(zF=1,RF={},RF)}var VF,HF;function UF(){if(HF)return VF;HF=1;var e=U(),t=kM(),n=Ej(),r=LF().indexOf,i=BF(),a=e([].push);return VF=function(e,o){var s=n(e),c=0,l=[],u;for(u in s)!t(i,u)&&t(s,u)&&a(l,u);for(;o.length>c;)t(s,u=o[c++])&&(~r(l,u)||a(l,u));return l},VF}var WF,GF;function KF(){return GF?WF:(GF=1,WF=[`constructor`,`hasOwnProperty`,`isPrototypeOf`,`propertyIsEnumerable`,`toLocaleString`,`toString`,`valueOf`],WF)}var qF,JF;function YF(){if(JF)return qF;JF=1;var e=UF(),t=KF();return qF=Object.keys||function(n){return e(n,t)},qF}var XF;function ZF(){if(XF)return jF;XF=1;var e=aj(),t=aN(),n=uN(),r=cN(),i=Ej(),a=YF();return jF.f=e&&!t?Object.defineProperties:function(e,t){r(e);for(var o=i(t),s=a(t),c=s.length,l=0,u;c>l;)n.f(e,u=s[l++],o[u]);return e},jF}var QF,$F;function eI(){return $F?QF:($F=1,QF=Fj()(`document`,`documentElement`),QF)}var tI,nI;function rI(){if(nI)return tI;nI=1;var e=CM(),t=MM(),n=e(`keys`);return tI=function(e){return n[e]||(n[e]=t(e))},tI}var iI,aI;function oI(){if(aI)return iI;aI=1;var e=cN(),t=ZF(),n=KF(),r=BF(),i=eI(),a=WM(),o=rI(),s=`>`,c=`<`,l=`prototype`,u=`script`,d=o(`IE_PROTO`),f=function(){},p=function(e){return c+u+s+e+c+`/`+u+s},m=function(e){e.write(p(``)),e.close();var t=e.parentWindow.Object;return e=null,t},h=function(){var e=a(`iframe`),t=`java`+u+`:`,n;return e.style.display=`none`,i.appendChild(e),e.src=String(t),n=e.contentWindow.document,n.open(),n.write(p(`document.F=Object`)),n.close(),n.F},g,_=function(){try{g=new ActiveXObject(`htmlfile`)}catch{}_=typeof document<`u`?document.domain&&g?m(g):h():m(g);for(var e=n.length;e--;)delete _[l][n[e]];return _()};return r[d]=!0,iI=Object.create||function(n,r){var i;return n===null?i=_():(f[l]=e(n),i=new f,f[l]=null,i[d]=n),r===void 0?i:t.f(i,r)},iI}var sI={},cI;function lI(){if(cI)return sI;cI=1;var e=UF(),t=KF().concat(`length`,`prototype`);return sI.f=Object.getOwnPropertyNames||function(n){return e(n,t)},sI}var uI={},dI;function fI(){if(dI)return uI;dI=1;var e=YA(),t=Ej(),n=lI().f,r=NN(),i=typeof window==`object`&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],a=function(e){try{return n(e)}catch{return r(i)}};return uI.f=function(r){return i&&e(r)===`Window`?a(r):n(t(r))},uI}var pI={},mI;function hI(){return mI?pI:(mI=1,pI.f=Object.getOwnPropertySymbols,pI)}var gI,_I;function vI(){if(_I)return gI;_I=1;var e=pN();return gI=function(t,n,r,i){return i&&i.enumerable?t[n]=r:e(t,n,r),t},gI}var yI,bI;function xI(){if(bI)return yI;bI=1;var e=uN();return yI=function(t,n,r){return e.f(t,n,r)},yI}var SI={},CI;function wI(){return CI?SI:(CI=1,SI.f=FM(),SI)}var TI,EI;function DI(){if(EI)return TI;EI=1;var e=Mj(),t=kM(),n=wI(),r=uN().f;return TI=function(i){var a=e.Symbol||={};t(a,i)||r(a,i,{value:n.f(i)})},TI}var OI,kI;function AI(){if(kI)return OI;kI=1;var e=cj(),t=Fj(),n=FM(),r=vI();return OI=function(){var i=t(`Symbol`),a=i&&i.prototype,o=a&&a.valueOf,s=n(`toPrimitive`);a&&!a[s]&&r(a,s,function(t){return e(o,this)},{arity:1})},OI}var jI,MI;function NI(){if(MI)return jI;MI=1;var e=DP(),t=AP();return jI=e?{}.toString:function(){return`[object `+t(this)+`]`},jI}var PI,FI;function II(){if(FI)return PI;FI=1;var e=DP(),t=uN().f,n=pN(),r=kM(),i=NI(),a=FM()(`toStringTag`);return PI=function(o,s,c,l){var u=c?o:o&&o.prototype;u&&(r(u,a)||t(u,a,{configurable:!0,value:s}),l&&!e&&n(u,`toString`,i))},PI}var LI,RI;function zI(){if(RI)return LI;RI=1;var e=IA(),t=tj(),n=e.WeakMap;return LI=t(n)&&/native code/.test(String(n)),LI}var BI,VI;function HI(){if(VI)return BI;VI=1;var e=zI(),t=IA(),n=kj(),r=pN(),i=kM(),a=bM(),o=rI(),s=BF(),c=`Object already initialized`,l=t.TypeError,u=t.WeakMap,d,f,p,m=function(e){return p(e)?f(e):d(e,{})},h=function(e){return function(t){var r;if(!n(t)||(r=f(t)).type!==e)throw new l(`Incompatible receiver, `+e+` required`);return r}};if(e||a.state){var g=a.state||=new u;g.get=g.get,g.has=g.has,g.set=g.set,d=function(e,t){if(g.has(e))throw new l(c);return t.facade=e,g.set(e,t),t},f=function(e){return g.get(e)||{}},p=function(e){return g.has(e)}}else{var _=o(`state`);s[_]=!0,d=function(e,t){if(i(e,_))throw new l(c);return t.facade=e,r(e,_,t),t},f=function(e){return i(e,_)?e[_]:{}},p=function(e){return i(e,_)}}return BI={set:d,get:f,has:p,enforce:m,getterFor:h},BI}var UI;function WI(){if(UI)return DF;UI=1;var e=W(),t=IA(),n=cj(),r=U(),i=hM(),a=aj(),o=qj(),s=H(),c=kM(),l=Rj(),u=cN(),d=Ej(),f=VM(),p=AF(),m=mj(),h=oI(),g=YF(),_=lI(),v=fI(),y=hI(),b=YM(),x=uN(),S=ZF(),C=dj(),w=vI(),T=xI(),E=CM(),D=rI(),O=BF(),ee=MM(),k=FM(),te=wI(),A=DI(),ne=AI(),re=II(),ie=HI(),ae=iF().forEach,oe=D(`hidden`),se=`Symbol`,ce=`prototype`,le=ie.set,ue=ie.getterFor(se),de=Object[ce],fe=t.Symbol,pe=fe&&fe[ce],me=t.RangeError,he=t.TypeError,ge=t.QObject,_e=b.f,ve=x.f,ye=v.f,be=C.f,xe=r([].push),Se=E(`symbols`),Ce=E(`op-symbols`),we=E(`wks`),Te=!ge||!ge[ce]||!ge[ce].findChild,Ee=function(e,t,n){var r=_e(de,t);r&&delete de[t],ve(e,t,n),r&&e!==de&&ve(de,t,r)},De=a&&s(function(){return h(ve({},`a`,{get:function(){return ve(this,`a`,{value:7}).a}})).a!==7})?Ee:ve,Oe=function(e,t){var n=Se[e]=h(pe);return le(n,{type:se,tag:e,description:t}),a||(n.description=t),n},ke=function(e,t,n){e===de&&ke(Ce,t,n),u(e);var r=f(t);return u(n),c(Se,r)?(n.enumerable?(c(e,oe)&&e[oe][r]&&(e[oe][r]=!1),n=h(n,{enumerable:m(0,!1)})):(c(e,oe)||ve(e,oe,m(1,h(null))),e[oe][r]=!0),De(e,r,n)):ve(e,r,n)},Ae=function(e,t){u(e);var r=d(t);return ae(g(r).concat(Fe(r)),function(t){(!a||n(Me,r,t))&&ke(e,t,r[t])}),e},je=function(e,t){return t===void 0?h(e):Ae(h(e),t)},Me=function(e){var t=f(e),r=n(be,this,t);return this===de&&c(Se,t)&&!c(Ce,t)?!1:r||!c(this,t)||!c(Se,t)||c(this,oe)&&this[oe][t]?r:!0},Ne=function(e,t){var n=d(e),r=f(t);if(!(n===de&&c(Se,r)&&!c(Ce,r))){var i=_e(n,r);return i&&c(Se,r)&&!(c(n,oe)&&n[oe][r])&&(i.enumerable=!0),i}},Pe=function(e){var t=ye(d(e)),n=[];return ae(t,function(e){!c(Se,e)&&!c(O,e)&&xe(n,e)}),n},Fe=function(e){var t=e===de,n=ye(t?Ce:d(e)),r=[];return ae(n,function(e){c(Se,e)&&(!t||c(de,e))&&xe(r,Se[e])}),r};return o||(fe=function(){if(l(pe,this))throw new he(`Symbol is not a constructor`);var e=!arguments.length||arguments[0]===void 0?void 0:p(arguments[0]),r=ee(e),i=function(e){var a=this===void 0?t:this;a===de&&n(i,Ce,e),c(a,oe)&&c(a[oe],r)&&(a[oe][r]=!1);var o=m(1,e);try{De(a,r,o)}catch(e){if(!(e instanceof me))throw e;Ee(a,r,o)}};return a&&Te&&De(de,r,{configurable:!0,set:i}),Oe(r,e)},pe=fe[ce],w(pe,`toString`,function(){return ue(this).tag}),w(fe,`withoutSetter`,function(e){return Oe(ee(e),e)}),C.f=Me,x.f=ke,S.f=Ae,b.f=Ne,_.f=v.f=Pe,y.f=Fe,te.f=function(e){return Oe(k(e),e)},a&&(T(pe,`description`,{configurable:!0,get:function(){return ue(this).description}}),i||w(de,`propertyIsEnumerable`,Me,{unsafe:!0}))),e({global:!0,constructor:!0,wrap:!0,forced:!o,sham:!o},{Symbol:fe}),ae(g(we),function(e){A(e)}),e({target:se,stat:!0,forced:!o},{useSetter:function(){Te=!0},useSimple:function(){Te=!1}}),e({target:`Object`,stat:!0,forced:!o,sham:!a},{create:je,defineProperty:ke,defineProperties:Ae,getOwnPropertyDescriptor:Ne}),e({target:`Object`,stat:!0,forced:!o},{getOwnPropertyNames:Pe}),ne(),re(fe,se),O[oe]=!0,DF}var GI={},KI,qI;function JI(){return qI?KI:(qI=1,KI=qj()&&!!Symbol.for&&!!Symbol.keyFor,KI)}var YI;function XI(){if(YI)return GI;YI=1;var e=W(),t=Fj(),n=kM(),r=AF(),i=CM(),a=JI(),o=i(`string-to-symbol-registry`),s=i(`symbol-to-string-registry`);return e({target:`Symbol`,stat:!0,forced:!a},{for:function(e){var i=r(e);if(n(o,i))return o[i];var a=t(`Symbol`)(i);return o[i]=a,s[a]=i,a}}),GI}var ZI={},QI;function $I(){if(QI)return ZI;QI=1;var e=W(),t=kM(),n=$j(),r=nM(),i=CM(),a=JI(),o=i(`symbol-to-string-registry`);return e({target:`Symbol`,stat:!0,forced:!a},{keyFor:function(e){if(!n(e))throw TypeError(r(e)+` is not a symbol`);if(t(o,e))return o[e]}}),ZI}var eL={},tL,nL;function rL(){if(nL)return tL;nL=1;var e=U(),t=vN(),n=tj(),r=YA(),i=AF(),a=e([].push);return tL=function(e){if(n(e))return e;if(t(e)){for(var o=e.length,s=[],c=0;c<o;c++){var l=e[c];typeof l==`string`?a(s,l):(typeof l==`number`||r(l)===`Number`||r(l)===`String`)&&a(s,i(l))}var u=s.length,d=!0;return function(e,n){if(d)return d=!1,n;if(t(this))return n;for(var r=0;r<u;r++)if(s[r]===e)return n}}},tL}var iL;function aL(){if(iL)return eL;iL=1;var e=W(),t=Fj(),n=WA(),r=cj(),i=U(),a=H(),o=tj(),s=$j(),c=NN(),l=rL(),u=qj(),d=String,f=t(`JSON`,`stringify`),p=i(/./.exec),m=i(``.charAt),h=i(``.charCodeAt),g=i(``.replace),_=i(1.1.toString),v=/[\uD800-\uDFFF]/g,y=/^[\uD800-\uDBFF]$/,b=/^[\uDC00-\uDFFF]$/,x=!u||a(function(){var e=t(`Symbol`)(`stringify detection`);return f([e])!==`[null]`||f({a:e})!==`{}`||f(Object(e))!==`{}`}),S=a(function(){return f(`\udf06\ud834`)!==`"\\udf06\\ud834"`||f(`\udead`)!==`"\\udead"`}),C=function(e,t){var i=c(arguments),a=l(t);if(!(!o(a)&&(e===void 0||s(e))))return i[1]=function(e,t){if(o(a)&&(t=r(a,this,d(e),t)),!s(t))return t},n(f,null,i)},w=function(e,t,n){var r=m(n,t-1),i=m(n,t+1);return p(y,e)&&!p(b,i)||p(b,e)&&!p(y,r)?`\\u`+_(h(e,0),16):e};return f&&e({target:`JSON`,stat:!0,arity:3,forced:x||S},{stringify:function(e,t,r){var i=c(arguments),a=n(x?C:f,null,i);return S&&typeof a==`string`?g(a,v,w):a}}),eL}var oL={},sL;function cL(){if(sL)return oL;sL=1;var e=W(),t=qj(),n=H(),r=hI(),i=EM();return e({target:`Object`,stat:!0,forced:!t||n(function(){r.f(1)})},{getOwnPropertySymbols:function(e){var t=r.f;return t?t(i(e)):[]}}),oL}var lL;function uL(){return lL?EF:(lL=1,WI(),XI(),$I(),aL(),cL(),EF)}var dL,fL;function pL(){return fL?dL:(fL=1,uL(),dL=Mj().Object.getOwnPropertySymbols,dL)}var mL,hL;function gL(){return hL?mL:(hL=1,mL=pL(),mL)}var _L,vL;function yL(){return vL?_L:(vL=1,_L=gL(),_L)}var bL=V(yL()),xL={},SL,CL;function wL(){if(CL)return SL;CL=1;var e=H(),t=FM(),n=Wj(),r=t(`species`);return SL=function(t){return n>=51||!e(function(){var e=[],n=e.constructor={};return n[r]=function(){return{foo:1}},e[t](Boolean).foo!==1})},SL}var TL;function EL(){if(TL)return xL;TL=1;var e=W(),t=iF().filter;return e({target:`Array`,proto:!0,forced:!wL()(`filter`)},{filter:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}}),xL}var DL,OL;function kL(){return OL?DL:(OL=1,EL(),DL=VN()(`Array`,`filter`),DL)}var AL,jL;function ML(){if(jL)return AL;jL=1;var e=Rj(),t=kL(),n=Array.prototype;return AL=function(r){var i=r.filter;return r===n||e(n,r)&&i===n.filter?t:i},AL}var NL,PL;function FL(){return PL?NL:(PL=1,NL=ML(),NL)}var IL,LL;function RL(){return LL?IL:(LL=1,IL=FL(),IL)}var J=V(RL()),zL={exports:{}},BL={},VL;function HL(){if(VL)return BL;VL=1;var e=W(),t=H(),n=Ej(),r=YM().f,i=aj();return e({target:`Object`,stat:!0,forced:!i||t(function(){r(1)}),sham:!i},{getOwnPropertyDescriptor:function(e,t){return r(n(e),t)}}),BL}var UL;function WL(){if(UL)return zL.exports;UL=1,HL();var e=Mj().Object,t=zL.exports=function(t,n){return e.getOwnPropertyDescriptor(t,n)};return e.getOwnPropertyDescriptor.sham&&(t.sham=!0),zL.exports}var GL,KL;function qL(){return KL?GL:(KL=1,GL=WL(),GL)}var JL,YL;function XL(){return YL?JL:(YL=1,JL=qL(),JL)}var ZL=V(XL()),QL={},$L,eR;function tR(){if(eR)return $L;eR=1;var e=Fj(),t=U(),n=lI(),r=hI(),i=cN(),a=t([].concat);return $L=e(`Reflect`,`ownKeys`)||function(e){var t=n.f(i(e)),o=r.f;return o?a(t,o(e)):t},$L}var nR,rR;function iR(){if(rR)return nR;rR=1;var e=aj(),t=uN(),n=mj();return nR=function(r,i,a){e?t.f(r,i,n(0,a)):r[i]=a},nR}var aR;function oR(){if(aR)return QL;aR=1;var e=W(),t=aj(),n=tR(),r=Ej(),i=YM(),a=iR();return e({target:`Object`,stat:!0,sham:!t},{getOwnPropertyDescriptors:function(e){for(var t=r(e),o=i.f,s=n(t),c={},l=0,u,d;s.length>l;)d=o(t,u=s[l++]),d!==void 0&&a(c,u,d);return c}}),QL}var sR,cR;function lR(){return cR?sR:(cR=1,oR(),sR=Mj().Object.getOwnPropertyDescriptors,sR)}var uR,dR;function fR(){return dR?uR:(dR=1,uR=lR(),uR)}var pR,mR;function hR(){return mR?pR:(mR=1,pR=fR(),pR)}var gR=V(hR()),_R={exports:{}},vR={},yR;function bR(){if(yR)return vR;yR=1;var e=W(),t=aj(),n=ZF().f;return e({target:`Object`,stat:!0,forced:Object.defineProperties!==n,sham:!t},{defineProperties:n}),vR}var xR;function SR(){if(xR)return _R.exports;xR=1,bR();var e=Mj().Object,t=_R.exports=function(t,n){return e.defineProperties(t,n)};return e.defineProperties.sham&&(t.sham=!0),_R.exports}var CR,wR;function TR(){return wR?CR:(wR=1,CR=SR(),CR)}var ER,DR;function OR(){return DR?ER:(DR=1,ER=TR(),ER)}var kR=V(OR()),AR={exports:{}},jR={},MR;function NR(){if(MR)return jR;MR=1;var e=W(),t=aj(),n=uN().f;return e({target:`Object`,stat:!0,forced:Object.defineProperty!==n,sham:!t},{defineProperty:n}),jR}var PR;function FR(){if(PR)return AR.exports;PR=1,NR();var e=Mj().Object,t=AR.exports=function(t,n,r){return e.defineProperty(t,n,r)};return e.defineProperty.sham&&(t.sham=!0),AR.exports}var IR,LR;function RR(){return LR?IR:(LR=1,IR=FR(),IR)}var zR,BR;function VR(){return BR?zR:(BR=1,zR=RR(),zR)}var HR,UR;function WR(){return UR?HR:(UR=1,HR=VR(),HR)}var GR,KR;function qR(){return KR?GR:(KR=1,GR=WR(),GR)}var JR=V(qR()),YR={},XR,ZR;function QR(){if(ZR)return XR;ZR=1;var e=TypeError,t=9007199254740991;return XR=function(n){if(n>t)throw e(`Maximum allowed index exceeded`);return n},XR}var $R;function ez(){if($R)return YR;$R=1;var e=W(),t=H(),n=vN(),r=kj(),i=EM(),a=UP(),o=QR(),s=iR(),c=tF(),l=wL(),u=FM(),d=Wj(),f=u(`isConcatSpreadable`),p=d>=51||!t(function(){var e=[];return e[f]=!1,e.concat()[0]!==e}),m=function(e){if(!r(e))return!1;var t=e[f];return t===void 0?n(e):!!t};return e({target:`Array`,proto:!0,arity:1,forced:!p||!l(`concat`)},{concat:function(e){var t=i(this),n=c(t,0),r=0,l,u,d,f,p;for(l=-1,d=arguments.length;l<d;l++)if(p=l===-1?t:arguments[l],m(p))for(f=a(p),o(r+f),u=0;u<f;u++,r++)u in p&&s(n,r,p[u]);else o(r+1),s(n,r++,p);return n.length=r,n}}),YR}var tz={},nz;function rz(){return nz?tz:(nz=1,DI()(`asyncDispose`),tz)}var iz={},az;function oz(){return az?iz:(az=1,DI()(`asyncIterator`),iz)}var sz={},cz;function lz(){return cz?sz:(cz=1,DI()(`dispose`),sz)}var uz={},dz;function fz(){return dz?uz:(dz=1,DI()(`hasInstance`),uz)}var pz={},mz;function hz(){return mz?pz:(mz=1,DI()(`isConcatSpreadable`),pz)}var gz={},_z;function vz(){return _z?gz:(_z=1,DI()(`iterator`),gz)}var yz={},bz;function xz(){return bz?yz:(bz=1,DI()(`match`),yz)}var Sz={},Cz;function wz(){return Cz?Sz:(Cz=1,DI()(`matchAll`),Sz)}var Tz={},Ez;function Dz(){return Ez?Tz:(Ez=1,DI()(`replace`),Tz)}var Oz={},kz;function Az(){return kz?Oz:(kz=1,DI()(`search`),Oz)}var jz={},Mz;function Nz(){return Mz?jz:(Mz=1,DI()(`species`),jz)}var Pz={},Fz;function Iz(){return Fz?Pz:(Fz=1,DI()(`split`),Pz)}var Lz={},Rz;function zz(){if(Rz)return Lz;Rz=1;var e=DI(),t=AI();return e(`toPrimitive`),t(),Lz}var Bz={},Vz;function Hz(){if(Vz)return Bz;Vz=1;var e=Fj(),t=DI(),n=II();return t(`toStringTag`),n(e(`Symbol`),`Symbol`),Bz}var Uz={},Wz;function Gz(){return Wz?Uz:(Wz=1,DI()(`unscopables`),Uz)}var Kz={},qz;function Jz(){return qz?Kz:(qz=1,II()(IA().JSON,`JSON`,!0),Kz)}var Yz,Xz;function Zz(){return Xz?Yz:(Xz=1,ez(),uL(),rz(),oz(),lz(),fz(),hz(),vz(),xz(),wz(),Dz(),Az(),Nz(),Iz(),zz(),Hz(),Gz(),Jz(),Yz=Mj().Symbol,Yz)}var Qz={},$z,eB;function tB(){return eB?$z:(eB=1,$z=function(){},$z)}var nB,rB;function iB(){return rB?nB:(rB=1,nB={},nB)}var aB,oB;function sB(){if(oB)return aB;oB=1;var e=aj(),t=kM(),n=Function.prototype,r=e&&Object.getOwnPropertyDescriptor,i=t(n,`name`);return aB={EXISTS:i,PROPER:i&&(function(){}).name===`something`,CONFIGURABLE:i&&(!e||e&&r(n,`name`).configurable)},aB}var cB,lB;function uB(){return lB?cB:(lB=1,cB=!H()(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),cB)}var dB,fB;function pB(){if(fB)return dB;fB=1;var e=kM(),t=tj(),n=EM(),r=rI(),i=uB(),a=r(`IE_PROTO`),o=Object,s=o.prototype;return dB=i?o.getPrototypeOf:function(r){var i=n(r);if(e(i,a))return i[a];var c=i.constructor;return t(c)&&i instanceof c?c.prototype:i instanceof o?s:null},dB}var mB,hB;function gB(){if(hB)return mB;hB=1;var e=H(),t=tj(),n=kj(),r=oI(),i=pB(),a=vI(),o=FM(),s=hM(),c=o(`iterator`),l=!1,u,d,f;return[].keys&&(f=[].keys(),`next`in f?(d=i(i(f)),d!==Object.prototype&&(u=d)):l=!0),!n(u)||e(function(){var e={};return u[c].call(e)!==e})?u={}:s&&(u=r(u)),t(u[c])||a(u,c,function(){return this}),mB={IteratorPrototype:u,BUGGY_SAFARI_ITERATORS:l},mB}var _B,vB;function yB(){if(vB)return _B;vB=1;var e=gB().IteratorPrototype,t=oI(),n=mj(),r=II(),i=iB(),a=function(){return this};return _B=function(o,s,c,l){var u=s+` Iterator`;return o.prototype=t(e,{next:n(+!l,c)}),r(o,u,!1,!0),i[u]=a,o},_B}var bB,xB;function SB(){if(xB)return bB;xB=1;var e=U(),t=aM();return bB=function(n,r,i){try{return e(t(Object.getOwnPropertyDescriptor(n,r)[i]))}catch{}},bB}var CB,wB;function TB(){if(wB)return CB;wB=1;var e=kj();return CB=function(t){return e(t)||t===null},CB}var EB,DB;function OB(){if(DB)return EB;DB=1;var e=TB(),t=String,n=TypeError;return EB=function(r){if(e(r))return r;throw new n(`Can't set `+t(r)+` as a prototype`)},EB}var kB,AB;function jB(){if(AB)return kB;AB=1;var e=SB(),t=kj(),n=Cj(),r=OB();return kB=Object.setPrototypeOf||(`__proto__`in{}?function(){var i=!1,a={},o;try{o=e(Object.prototype,`__proto__`,`set`),o(a,[]),i=a instanceof Array}catch{}return function(e,a){return n(e),r(a),t(e)&&(i?o(e,a):e.__proto__=a),e}}():void 0),kB}var MB,NB;function PB(){if(NB)return MB;NB=1;var e=W(),t=cj(),n=hM(),r=sB(),i=tj(),a=yB(),o=pB(),s=jB(),c=II(),l=pN(),u=vI(),d=FM(),f=iB(),p=gB(),m=r.PROPER,h=r.CONFIGURABLE,g=p.IteratorPrototype,_=p.BUGGY_SAFARI_ITERATORS,v=d(`iterator`),y=`keys`,b=`values`,x=`entries`,S=function(){return this};return MB=function(r,d,p,C,w,T,E){a(p,d,C);var D=function(e){if(e===w&&A)return A;if(!_&&e&&e in k)return k[e];switch(e){case y:return function(){return new p(this,e)};case b:return function(){return new p(this,e)};case x:return function(){return new p(this,e)}}return function(){return new p(this)}},O=d+` Iterator`,ee=!1,k=r.prototype,te=k[v]||k[`@@iterator`]||w&&k[w],A=!_&&te||D(w),ne=d===`Array`&&k.entries||te,re,ie,ae;if(ne&&(re=o(ne.call(new r)),re!==Object.prototype&&re.next&&(!n&&o(re)!==g&&(s?s(re,g):i(re[v])||u(re,v,S)),c(re,O,!0,!0),n&&(f[O]=S))),m&&w===b&&te&&te.name!==b&&(!n&&h?l(k,`name`,b):(ee=!0,A=function(){return t(te,this)})),w)if(ie={values:D(b),keys:T?A:D(y),entries:D(x)},E)for(ae in ie)(_||ee||!(ae in k))&&u(k,ae,ie[ae]);else e({target:d,proto:!0,forced:_||ee},ie);return(!n||E)&&k[v]!==A&&u(k,v,A,{name:w}),f[d]=A,ie},MB}var FB,IB;function LB(){return IB?FB:(IB=1,FB=function(e,t){return{value:e,done:t}},FB)}var RB,zB;function BB(){if(zB)return RB;zB=1;var e=Ej(),t=tB(),n=iB(),r=HI(),i=uN().f,a=PB(),o=LB(),s=hM(),c=aj(),l=`Array Iterator`,u=r.set,d=r.getterFor(l);RB=a(Array,`Array`,function(t,n){u(this,{type:l,target:e(t),index:0,kind:n})},function(){var e=d(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=null,o(void 0,!0);switch(e.kind){case`keys`:return o(n,!1);case`values`:return o(t[n],!1)}return o([n,t[n]],!1)},`values`);var f=n.Arguments=n.Array;if(t(`keys`),t(`values`),t(`entries`),!s&&c&&f.name!==`values`)try{i(f,`name`,{value:`values`})}catch{}return RB}var VB,HB;function UB(){return HB?VB:(HB=1,VB={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},VB)}var WB;function GB(){if(WB)return Qz;WB=1,BB();var e=UB(),t=IA(),n=II(),r=iB();for(var i in e)n(t[i],i),r[i]=r.Array;return Qz}var KB,qB;function JB(){if(qB)return KB;qB=1;var e=Zz();return GB(),KB=e,KB}var YB={},XB;function ZB(){if(XB)return YB;XB=1;var e=FM(),t=uN().f,n=e(`metadata`),r=Function.prototype;return r[n]===void 0&&t(r,n,{value:null}),YB}var QB={},$B;function eV(){return $B?QB:($B=1,rz(),QB)}var tV={},nV;function rV(){return nV?tV:(nV=1,lz(),tV)}var iV={},aV;function oV(){return aV?iV:(aV=1,DI()(`metadata`),iV)}var sV,cV;function lV(){if(cV)return sV;cV=1;var e=JB();return ZB(),eV(),rV(),oV(),sV=e,sV}var uV={},dV,fV;function pV(){if(fV)return dV;fV=1;var e=Fj(),t=U(),n=e(`Symbol`),r=n.keyFor,i=t(n.prototype.valueOf);return dV=n.isRegisteredSymbol||function(e){try{return r(i(e))!==void 0}catch{return!1}},dV}var mV;function hV(){return mV?uV:(mV=1,W()({target:`Symbol`,stat:!0},{isRegisteredSymbol:pV()}),uV)}var gV={},_V,vV;function yV(){if(vV)return _V;vV=1;for(var e=CM(),t=Fj(),n=U(),r=$j(),i=FM(),a=t(`Symbol`),o=a.isWellKnownSymbol,s=t(`Object`,`getOwnPropertyNames`),c=n(a.prototype.valueOf),l=e(`wks`),u=0,d=s(a),f=d.length;u<f;u++)try{var p=d[u];r(a[p])&&i(p)}catch{}return _V=function(e){if(o&&o(e))return!0;try{for(var t=c(e),n=0,r=s(l),i=r.length;n<i;n++)if(l[r[n]]==t)return!0}catch{}return!1},_V}var bV;function xV(){return bV?gV:(bV=1,W()({target:`Symbol`,stat:!0,forced:!0},{isWellKnownSymbol:yV()}),gV)}var SV={},CV;function wV(){return CV?SV:(CV=1,DI()(`customMatcher`),SV)}var TV={},EV;function DV(){return EV?TV:(EV=1,DI()(`observable`),TV)}var OV={},kV;function AV(){return kV?OV:(kV=1,W()({target:`Symbol`,stat:!0,name:`isRegisteredSymbol`},{isRegistered:pV()}),OV)}var jV={},MV;function NV(){return MV?jV:(MV=1,W()({target:`Symbol`,stat:!0,name:`isWellKnownSymbol`,forced:!0},{isWellKnown:yV()}),jV)}var PV={},FV;function IV(){return FV?PV:(FV=1,DI()(`matcher`),PV)}var LV={},RV;function zV(){return RV?LV:(RV=1,DI()(`metadataKey`),LV)}var BV={},VV;function HV(){return VV?BV:(VV=1,DI()(`patternMatch`),BV)}var UV={},WV;function GV(){return WV?UV:(WV=1,DI()(`replaceAll`),UV)}var KV,qV;function JV(){if(qV)return KV;qV=1;var e=lV();return hV(),xV(),wV(),DV(),AV(),NV(),IV(),zV(),HV(),GV(),KV=e,KV}var YV,XV;function ZV(){return XV?YV:(XV=1,YV=JV(),YV)}var QV=V(ZV()),$V={},eH,tH;function nH(){if(tH)return eH;tH=1;var e=U(),t=LP(),n=AF(),r=Cj(),i=e(``.charAt),a=e(``.charCodeAt),o=e(``.slice),s=function(e){return function(s,c){var l=n(r(s)),u=t(c),d=l.length,f,p;return u<0||u>=d?e?``:void 0:(f=a(l,u),f<55296||f>56319||u+1===d||(p=a(l,u+1))<56320||p>57343?e?i(l,u):f:e?o(l,u,u+2):(f-55296<<10)+(p-56320)+65536)}};return eH={codeAt:s(!1),charAt:s(!0)},eH}var rH;function iH(){if(rH)return $V;rH=1;var e=nH().charAt,t=AF(),n=HI(),r=PB(),i=LB(),a=`String Iterator`,o=n.set,s=n.getterFor(a);return r(String,`String`,function(e){o(this,{type:a,string:t(e),index:0})},function(){var t=s(this),n=t.string,r=t.index,a;return r>=n.length?i(void 0,!0):(a=e(n,r),t.index+=a.length,i(a,!1))}),$V}var aH,oH;function sH(){return oH?aH:(oH=1,BB(),iH(),vz(),aH=wI().f(`iterator`),aH)}var cH,lH;function uH(){if(lH)return cH;lH=1;var e=sH();return GB(),cH=e,cH}var dH,fH;function pH(){return fH?dH:(fH=1,dH=uH(),dH)}var mH,hH;function gH(){return hH?mH:(hH=1,mH=pH(),mH)}var _H,vH;function yH(){return vH?_H:(vH=1,_H=gH(),_H)}var bH=V(yH());function xH(e){"@babel/helpers - typeof";return xH=typeof QV==`function`&&typeof bH==`symbol`?function(e){return typeof e}:function(e){return e&&typeof QV==`function`&&e.constructor===QV&&e!==QV.prototype?`symbol`:typeof e},xH(e)}var SH,CH;function wH(){return CH?SH:(CH=1,zz(),SH=wI().f(`toPrimitive`),SH)}var TH,EH;function DH(){return EH?TH:(EH=1,TH=wH(),TH)}var OH,kH;function AH(){return kH?OH:(kH=1,OH=DH(),OH)}var jH,MH;function NH(){return MH?jH:(MH=1,jH=AH(),jH)}var PH,FH;function IH(){return FH?PH:(FH=1,PH=NH(),PH)}var LH=V(IH());function RH(e,t){if(xH(e)!=`object`||!e)return e;var n=e[LH];if(n!==void 0){var r=n.call(e,t);if(xH(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function zH(e){var t=RH(e,`string`);return xH(t)==`symbol`?t:t+``}function BH(e,t,n){return(t=zH(t))in e?JR(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var VH={},HH;function UH(){if(HH)return VH;HH=1;var e=W(),t=iF().map;return e({target:`Array`,proto:!0,forced:!wL()(`map`)},{map:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}}),VH}var WH,GH;function KH(){return GH?WH:(GH=1,UH(),WH=VN()(`Array`,`map`),WH)}var qH,JH;function YH(){if(JH)return qH;JH=1;var e=Rj(),t=KH(),n=Array.prototype;return qH=function(r){var i=r.map;return r===n||e(n,r)&&i===n.map?t:i},qH}var XH,ZH;function QH(){return ZH?XH:(ZH=1,XH=YH(),XH)}var $H,eU;function tU(){return eU?$H:(eU=1,$H=QH(),$H)}var nU=V(tU()),rU={},iU,aU;function oU(){if(aU)return iU;aU=1;var e=aM(),t=EM(),n=_j(),r=UP(),i=TypeError,a=`Reduce of empty array with no initial value`,o=function(o){return function(s,c,l,u){var d=t(s),f=n(d),p=r(d);if(e(c),p===0&&l<2)throw new i(a);var m=o?p-1:0,h=o?-1:1;if(l<2)for(;;){if(m in f){u=f[m],m+=h;break}if(m+=h,o?m<0:p<=m)throw new i(a)}for(;o?m>=0:p>m;m+=h)m in f&&(u=c(u,f[m],m,d));return u}};return iU={left:o(!1),right:o(!0)},iU}var sU,cU;function lU(){return cU?sU:(cU=1,sU=iP()===`NODE`,sU)}var uU;function dU(){if(uU)return rU;uU=1;var e=W(),t=oU().left,n=sF(),r=Wj();return e({target:`Array`,proto:!0,forced:!lU()&&r>79&&r<83||!n(`reduce`)},{reduce:function(e){var n=arguments.length;return t(this,e,n,n>1?arguments[1]:void 0)}}),rU}var fU,pU;function mU(){return pU?fU:(pU=1,dU(),fU=VN()(`Array`,`reduce`),fU)}var hU,gU;function _U(){if(gU)return hU;gU=1;var e=Rj(),t=mU(),n=Array.prototype;return hU=function(r){var i=r.reduce;return r===n||e(n,r)&&i===n.reduce?t:i},hU}var vU,yU;function bU(){return yU?vU:(yU=1,vU=_U(),vU)}var xU,SU;function CU(){return SU?xU:(SU=1,xU=bU(),xU)}var wU=V(CU()),TU={},EU;function DU(){if(EU)return TU;EU=1;var e=W(),t=EM(),n=YF();return e({target:`Object`,stat:!0,forced:H()(function(){n(1)})},{keys:function(e){return n(t(e))}}),TU}var OU,kU;function AU(){return kU?OU:(kU=1,DU(),OU=Mj().Object.keys,OU)}var jU,MU;function NU(){return MU?jU:(MU=1,jU=AU(),jU)}var PU,FU;function IU(){return FU?PU:(FU=1,PU=NU(),PU)}var LU=V(IU()),RU,zU;function BU(){return zU?RU:(zU=1,RU=RR(),RU)}var VU=V(BU()),HU,UU;function WU(){return UU?HU:(UU=1,HU=JB(),HU)}var GU=V(WU()),KU={},qU;function JU(){if(qU)return KU;qU=1;var e=W(),t=vN(),n=YP(),r=kj(),i=PF(),a=UP(),o=Ej(),s=iR(),c=FM(),l=wL(),u=NN(),d=l(`slice`),f=c(`species`),p=Array,m=Math.max;return e({target:`Array`,proto:!0,forced:!d},{slice:function(e,c){var l=o(this),d=a(l),h=i(e,d),g=i(c===void 0?d:c,d),_,v,y;if(t(l)&&(_=l.constructor,n(_)&&(_===p||t(_.prototype))?_=void 0:r(_)&&(_=_[f],_===null&&(_=void 0)),_===p||_===void 0))return u(l,h,g);for(v=new(_===void 0?p:_)(m(g-h,0)),y=0;h<g;h++,y++)h in l&&s(v,y,l[h]);return v.length=y,v}}),KU}var YU,XU;function ZU(){return XU?YU:(XU=1,JU(),YU=VN()(`Array`,`slice`),YU)}var QU,$U;function eW(){if($U)return QU;$U=1;var e=Rj(),t=ZU(),n=Array.prototype;return QU=function(r){var i=r.slice;return r===n||e(n,r)&&i===n.slice?t:i},QU}var tW,nW;function rW(){return nW?tW:(nW=1,tW=eW(),tW)}var iW,aW;function oW(){return aW?iW:(aW=1,iW=rW(),iW)}var sW=V(oW()),cW={},lW;function uW(){return lW?cW:(lW=1,W()({target:`Reflect`,stat:!0},{ownKeys:tR()}),cW)}var dW,fW;function pW(){return fW?dW:(fW=1,uW(),dW=Mj().Reflect.ownKeys,dW)}var mW,hW;function gW(){return hW?mW:(hW=1,mW=pW(),mW)}var _W,vW;function yW(){return vW?_W:(vW=1,_W=gW(),_W)}var bW=V(yW()),xW={},SW;function CW(){if(SW)return xW;SW=1;var e=W(),t=U(),n=Date,r=t(n.prototype.getTime);return e({target:`Date`,stat:!0},{now:function(){return r(new n)}}),xW}var wW,TW;function EW(){return TW?wW:(TW=1,CW(),wW=Mj().Date.now,wW)}var DW,OW;function kW(){return OW?DW:(OW=1,DW=EW(),DW)}var AW,jW;function MW(){return jW?AW:(jW=1,AW=kW(),AW)}var NW=V(MW()),PW={},FW;function IW(){if(FW)return PW;FW=1;var e=W(),t=U(),n=vN(),r=t([].reverse),i=[1,2];return e({target:`Array`,proto:!0,forced:String(i)===String(i.reverse())},{reverse:function(){return n(this)&&(this.length=this.length),r(this)}}),PW}var LW,RW;function zW(){return RW?LW:(RW=1,IW(),LW=VN()(`Array`,`reverse`),LW)}var BW,VW;function HW(){if(VW)return BW;VW=1;var e=Rj(),t=zW(),n=Array.prototype;return BW=function(r){var i=r.reverse;return r===n||e(n,r)&&i===n.reverse?t:i},BW}var UW,WW;function GW(){return WW?UW:(WW=1,UW=HW(),UW)}var KW,qW;function JW(){return qW?KW:(qW=1,KW=GW(),KW)}var YW=V(JW()),XW={},ZW,QW;function $W(){if(QW)return ZW;QW=1;var e=aj(),t=vN(),n=TypeError,r=Object.getOwnPropertyDescriptor;return ZW=e&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],`length`,{writable:!1}).length=1}catch(e){return e instanceof TypeError}}()?function(e,i){if(t(e)&&!r(e,`length`).writable)throw new n(`Cannot set read only .length`);return e.length=i}:function(e,t){return e.length=t},ZW}var eG,tG;function nG(){if(tG)return eG;tG=1;var e=nM(),t=TypeError;return eG=function(n,r){if(!delete n[r])throw new t(`Cannot delete property `+e(r)+` of `+e(n))},eG}var rG;function iG(){if(rG)return XW;rG=1;var e=W(),t=EM(),n=PF(),r=LP(),i=UP(),a=$W(),o=QR(),s=tF(),c=iR(),l=nG(),u=wL()(`splice`),d=Math.max,f=Math.min;return e({target:`Array`,proto:!0,forced:!u},{splice:function(e,u){var p=t(this),m=i(p),h=n(e,m),g=arguments.length,_,v,y,b,x,S;for(g===0?_=v=0:g===1?(_=0,v=m-h):(_=g-2,v=f(d(r(u),0),m-h)),o(m+_-v),y=s(p,v),b=0;b<v;b++)x=h+b,x in p&&c(y,b,p[x]);if(y.length=v,_<v){for(b=h;b<m-v;b++)x=b+v,S=b+_,x in p?p[S]=p[x]:l(p,S);for(b=m;b>m-v+_;b--)l(p,b-1)}else if(_>v)for(b=m-v;b>h;b--)x=b+v-1,S=b+_-1,x in p?p[S]=p[x]:l(p,S);for(b=0;b<_;b++)p[b+h]=arguments[b+2];return a(p,m-v+_),y}}),XW}var aG,oG;function sG(){return oG?aG:(oG=1,iG(),aG=VN()(`Array`,`splice`),aG)}var cG,lG;function uG(){if(lG)return cG;lG=1;var e=Rj(),t=sG(),n=Array.prototype;return cG=function(r){var i=r.splice;return r===n||e(n,r)&&i===n.splice?t:i},cG}var dG,fG;function pG(){return fG?dG:(fG=1,dG=uG(),dG)}var mG,hG;function gG(){return hG?mG:(hG=1,mG=pG(),mG)}var _G=V(gG()),vG={},yG,bG;function xG(){if(bG)return yG;bG=1;var e=aj(),t=U(),n=cj(),r=H(),i=YF(),a=hI(),o=dj(),s=EM(),c=_j(),l=Object.assign,u=Object.defineProperty,d=t([].concat);return yG=!l||r(function(){if(e&&l({b:1},l(u({},`a`,{enumerable:!0,get:function(){u(this,`b`,{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var t={},n={},r=Symbol(`assign detection`),a=`abcdefghijklmnopqrst`;return t[r]=7,a.split(``).forEach(function(e){n[e]=e}),l({},t)[r]!==7||i(l({},n)).join(``)!==a})?function(t,r){for(var l=s(t),u=arguments.length,f=1,p=a.f,m=o.f;u>f;)for(var h=c(arguments[f++]),g=p?d(i(h),p(h)):i(h),_=g.length,v=0,y;_>v;)y=g[v++],(!e||n(m,h,y))&&(l[y]=h[y]);return l}:l,yG}var SG;function CG(){if(SG)return vG;SG=1;var e=W(),t=xG();return e({target:`Object`,stat:!0,arity:2,forced:Object.assign!==t},{assign:t}),vG}var wG,TG;function EG(){return TG?wG:(TG=1,CG(),wG=Mj().Object.assign,wG)}var DG,OG;function kG(){return OG?DG:(OG=1,DG=EG(),DG)}var AG,jG;function MG(){return jG?AG:(jG=1,AG=kG(),AG)}var NG=V(MG()),PG={},FG;function IG(){if(FG)return PG;FG=1;var e=W(),t=LF().includes,n=H(),r=tB();return e({target:`Array`,proto:!0,forced:n(function(){return![,].includes()})},{includes:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}}),r(`includes`),PG}var LG,RG;function zG(){return RG?LG:(RG=1,IG(),LG=VN()(`Array`,`includes`),LG)}var BG={},VG,HG;function UG(){if(HG)return VG;HG=1;var e=kj(),t=YA(),n=FM()(`match`);return VG=function(r){var i;return e(r)&&((i=r[n])===void 0?t(r)===`RegExp`:!!i)},VG}var WG,GG;function KG(){if(GG)return WG;GG=1;var e=UG(),t=TypeError;return WG=function(n){if(e(n))throw new t(`The method doesn't accept regular expressions`);return n},WG}var qG,JG;function YG(){if(JG)return qG;JG=1;var e=FM()(`match`);return qG=function(t){var n=/./;try{`/./`[t](n)}catch{try{return n[e]=!1,`/./`[t](n)}catch{}}return!1},qG}var XG;function ZG(){if(XG)return BG;XG=1;var e=W(),t=U(),n=KG(),r=Cj(),i=AF(),a=YG(),o=t(``.indexOf);return e({target:`String`,proto:!0,forced:!a(`includes`)},{includes:function(e){return!!~o(i(r(this)),i(n(e)),arguments.length>1?arguments[1]:void 0)}}),BG}var QG,$G;function eK(){return $G?QG:($G=1,ZG(),QG=VN()(`String`,`includes`),QG)}var tK,nK;function rK(){if(nK)return tK;nK=1;var e=Rj(),t=zG(),n=eK(),r=Array.prototype,i=String.prototype;return tK=function(a){var o=a.includes;return a===r||e(r,a)&&o===r.includes?t:typeof a==`string`||a===i||e(i,a)&&o===i.includes?n:o},tK}var iK,aK;function oK(){return aK?iK:(aK=1,iK=rK(),iK)}var sK,cK;function lK(){return cK?sK:(cK=1,sK=oK(),sK)}var uK=V(lK()),dK={},fK;function pK(){if(fK)return dK;fK=1;var e=W(),t=H(),n=EM(),r=pB(),i=uB();return e({target:`Object`,stat:!0,forced:t(function(){r(1)}),sham:!i},{getPrototypeOf:function(e){return r(n(e))}}),dK}var mK,hK;function gK(){return hK?mK:(hK=1,pK(),mK=Mj().Object.getPrototypeOf,mK)}var _K,vK;function yK(){return vK?_K:(vK=1,_K=gK(),_K)}var bK,xK;function SK(){return xK?bK:(xK=1,bK=yK(),bK)}var CK=V(SK()),wK,TK;function EK(){return TK?wK:(TK=1,ez(),wK=VN()(`Array`,`concat`),wK)}var DK,OK;function kK(){if(OK)return DK;OK=1;var e=Rj(),t=EK(),n=Array.prototype;return DK=function(r){var i=r.concat;return r===n||e(n,r)&&i===n.concat?t:i},DK}var AK,jK;function MK(){return jK?AK:(jK=1,AK=kK(),AK)}var NK,PK;function FK(){return PK?NK:(PK=1,NK=MK(),NK)}var IK=V(FK()),LK={},RK,zK;function BK(){if(zK)return RK;zK=1;var e=aj(),t=H(),n=U(),r=pB(),i=YF(),a=Ej(),o=dj().f,s=n(o),c=n([].push),l=e&&t(function(){var e=Object.create(null);return e[2]=2,!s(e,2)}),u=function(t){return function(n){for(var o=a(n),u=i(o),d=l&&r(o)===null,f=u.length,p=0,m=[],h;f>p;)h=u[p++],(!e||(d?h in o:s(o,h)))&&c(m,t?[h,o[h]]:o[h]);return m}};return RK={entries:u(!0),values:u(!1)},RK}var VK;function HK(){if(VK)return LK;VK=1;var e=W(),t=BK().values;return e({target:`Object`,stat:!0},{values:function(e){return t(e)}}),LK}var UK,WK;function GK(){return WK?UK:(WK=1,HK(),UK=Mj().Object.values,UK)}var KK,qK;function JK(){return qK?KK:(qK=1,KK=GK(),KK)}var YK,XK;function ZK(){return XK?YK:(XK=1,YK=JK(),YK)}var QK=V(ZK()),$K={},eq,tq;function nq(){return tq?eq:(tq=1,eq=`-\v\f\r \xA0 \u2028\u2029`,eq)}var rq,iq;function aq(){if(iq)return rq;iq=1;var e=U(),t=Cj(),n=AF(),r=nq(),i=e(``.replace),a=RegExp(`^[`+r+`]+`),o=RegExp(`(^|[^`+r+`])[`+r+`]+$`),s=function(e){return function(r){var s=n(t(r));return e&1&&(s=i(s,a,``)),e&2&&(s=i(s,o,`$1`)),s}};return rq={start:s(1),end:s(2),trim:s(3)},rq}var oq,sq;function cq(){if(sq)return oq;sq=1;var e=IA(),t=H(),n=U(),r=AF(),i=aq().trim,a=nq(),o=e.parseInt,s=e.Symbol,c=s&&s.iterator,l=/^[+-]?0x/i,u=n(l.exec);return oq=o(a+`08`)!==8||o(a+`0x16`)!==22||c&&!t(function(){o(Object(c))})?function(e,t){var n=i(r(e));return o(n,t>>>0||(u(l,n)?16:10))}:o,oq}var lq;function uq(){if(lq)return $K;lq=1;var e=W(),t=cq();return e({global:!0,forced:parseInt!==t},{parseInt:t}),$K}var dq,fq;function pq(){return fq?dq:(fq=1,uq(),dq=Mj().parseInt,dq)}var mq,hq;function gq(){return hq?mq:(hq=1,mq=pq(),mq)}var _q,vq;function yq(){return vq?_q:(vq=1,_q=gq(),_q)}var bq=V(yq()),xq={},Sq;function Cq(){if(Sq)return xq;Sq=1;var e=W(),t=QA(),n=LF().indexOf,r=sF(),i=t([].indexOf),a=!!i&&1/i([1],1,-0)<0;return e({target:`Array`,proto:!0,forced:a||!r(`indexOf`)},{indexOf:function(e){var t=arguments.length>1?arguments[1]:void 0;return a?i(this,e,t)||0:n(this,e,t)}}),xq}var wq,Tq;function Eq(){return Tq?wq:(Tq=1,Cq(),wq=VN()(`Array`,`indexOf`),wq)}var Dq,Oq;function kq(){if(Oq)return Dq;Oq=1;var e=Rj(),t=Eq(),n=Array.prototype;return Dq=function(r){var i=r.indexOf;return r===n||e(n,r)&&i===n.indexOf?t:i},Dq}var Aq,jq;function Mq(){return jq?Aq:(jq=1,Aq=kq(),Aq)}var Nq,Pq;function Fq(){return Pq?Nq:(Pq=1,Nq=Mq(),Nq)}var Iq=V(Fq()),Lq={},Rq;function zq(){if(Rq)return Lq;Rq=1;var e=W(),t=BK().entries;return e({target:`Object`,stat:!0},{entries:function(e){return t(e)}}),Lq}var Bq,Vq;function Hq(){return Vq?Bq:(Vq=1,zq(),Bq=Mj().Object.entries,Bq)}var Uq,Wq;function Gq(){return Wq?Uq:(Wq=1,Uq=Hq(),Uq)}var Kq,qq;function Jq(){return qq?Kq:(qq=1,Kq=Gq(),Kq)}var Yq=V(Jq()),Xq={},Zq;function Qq(){return Zq?Xq:(Zq=1,W()({target:`Object`,stat:!0,sham:!aj()},{create:oI()}),Xq)}var $q,eJ;function tJ(){if(eJ)return $q;eJ=1,Qq();var e=Mj().Object;return $q=function(t,n){return e.create(t,n)},$q}var nJ,rJ;function iJ(){return rJ?nJ:(rJ=1,nJ=tJ(),nJ)}var aJ,oJ;function sJ(){return oJ?aJ:(oJ=1,aJ=iJ(),aJ)}var cJ=V(sJ()),lJ={},uJ,dJ;function fJ(){if(dJ)return uJ;dJ=1;var e=LP(),t=AF(),n=Cj(),r=RangeError;return uJ=function(i){var a=t(n(this)),o=``,s=e(i);if(s<0||s===1/0)throw new r(`Wrong number of repetitions`);for(;s>0;(s>>>=1)&&(a+=a))s&1&&(o+=a);return o},uJ}var pJ,mJ;function hJ(){if(mJ)return pJ;mJ=1;var e=U(),t=BP(),n=AF(),r=fJ(),i=Cj(),a=e(r),o=e(``.slice),s=Math.ceil,c=function(e){return function(r,c,l){var u=n(i(r)),d=t(c),f=u.length,p=l===void 0?` `:n(l),m,h;return d<=f||p===``?u:(m=d-f,h=a(p,s(m/p.length)),h.length>m&&(h=o(h,0,m)),e?u+h:h+u)}};return pJ={start:c(!1),end:c(!0)},pJ}var gJ,_J;function vJ(){if(_J)return gJ;_J=1;var e=U(),t=H(),n=hJ().start,r=RangeError,i=isFinite,a=Math.abs,o=Date.prototype,s=o.toISOString,c=e(o.getTime),l=e(o.getUTCDate),u=e(o.getUTCFullYear),d=e(o.getUTCHours),f=e(o.getUTCMilliseconds),p=e(o.getUTCMinutes),m=e(o.getUTCMonth),h=e(o.getUTCSeconds);return gJ=t(function(){return s.call(new Date(-50000000000001))!==`0385-07-25T07:06:39.999Z`})||!t(function(){s.call(new Date(NaN))})?function(){if(!i(c(this)))throw new r(`Invalid time value`);var e=this,t=u(e),o=f(e),s=t<0?`-`:t>9999?`+`:``;return s+n(a(t),s?6:4,0)+`-`+n(m(e)+1,2,0)+`-`+n(l(e),2,0)+`T`+n(d(e),2,0)+`:`+n(p(e),2,0)+`:`+n(h(e),2,0)+`.`+n(o,3,0)+`Z`}:s,gJ}var yJ;function bJ(){if(yJ)return lJ;yJ=1;var e=W(),t=cj(),n=EM(),r=RM(),i=vJ(),a=YA();return e({target:`Date`,proto:!0,forced:H()(function(){return new Date(NaN).toJSON()!==null||t(Date.prototype.toJSON,{toISOString:function(){return 1}})!==1})},{toJSON:function(e){var o=n(this),s=r(o,`number`);return typeof s==`number`&&!isFinite(s)?null:!(`toISOString`in o)&&a(o)===`Date`?t(i,o):o.toISOString()}}),lJ}var xJ,SJ;function CJ(){if(SJ)return xJ;SJ=1,bJ(),aL();var e=Mj(),t=WA();return e.JSON||={stringify:JSON.stringify},xJ=function(n,r,i){return t(e.JSON.stringify,null,arguments)},xJ}var wJ,TJ;function EJ(){return TJ?wJ:(TJ=1,wJ=CJ(),wJ)}var DJ,OJ;function kJ(){return OJ?DJ:(OJ=1,DJ=EJ(),DJ)}var AJ=V(kJ()),jJ={},MJ,NJ;function PJ(){if(NJ)return MJ;NJ=1;var e=EM(),t=PF(),n=UP();return MJ=function(r){for(var i=e(this),a=n(i),o=arguments.length,s=t(o>1?arguments[1]:void 0,a),c=o>2?arguments[2]:void 0,l=c===void 0?a:t(c,a);l>s;)i[s++]=r;return i},MJ}var FJ;function IJ(){if(FJ)return jJ;FJ=1;var e=W(),t=PJ(),n=tB();return e({target:`Array`,proto:!0},{fill:t}),n(`fill`),jJ}var LJ,RJ;function zJ(){return RJ?LJ:(RJ=1,IJ(),LJ=VN()(`Array`,`fill`),LJ)}var BJ,VJ;function HJ(){if(VJ)return BJ;VJ=1;var e=Rj(),t=zJ(),n=Array.prototype;return BJ=function(r){var i=r.fill;return r===n||e(n,r)&&i===n.fill?t:i},BJ}var UJ,WJ;function GJ(){return WJ?UJ:(WJ=1,UJ=HJ(),UJ)}var KJ,qJ;function JJ(){return qJ?KJ:(qJ=1,KJ=GJ(),KJ)}var YJ=V(JJ()),XJ={exports:{}},ZJ;function QJ(){return ZJ?XJ.exports:(ZJ=1,(function(e){e.exports=t;function t(e){if(e)return n(e)}function n(e){for(var n in t.prototype)e[n]=t.prototype[n];return e}t.prototype.on=t.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks[`$`+e]=this._callbacks[`$`+e]||[]).push(t),this},t.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},t.prototype.off=t.prototype.removeListener=t.prototype.removeAllListeners=t.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks[`$`+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks[`$`+e],this;for(var r,i=0;i<n.length;i++)if(r=n[i],r===t||r.fn===t){n.splice(i,1);break}return n.length===0&&delete this._callbacks[`$`+e],this},t.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=Array(arguments.length-1),n=this._callbacks[`$`+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,i=n.length;r<i;++r)n[r].apply(this,t)}return this},t.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks[`$`+e]||[]},t.prototype.hasListeners=function(e){return!!this.listeners(e).length}})(XJ),XJ.exports)}var $J=V(QJ());function eY(){return eY=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},eY.apply(this,arguments)}function tY(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function nY(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}var rY=typeof Object.assign==`function`?Object.assign:function(e){if(e==null)throw TypeError(`Cannot convert undefined or null to object`);for(var t=Object(e),n=1;n<arguments.length;n++){var r=arguments[n];if(r!=null)for(var i in r)r.hasOwnProperty(i)&&(t[i]=r[i])}return t},iY=[``,`webkit`,`Moz`,`MS`,`ms`,`o`],aY=typeof document>`u`?{style:{}}:document.createElement(`div`),oY=`function`,sY=Math.round,cY=Math.abs,lY=Date.now;function uY(e,t){for(var n,r,i=t[0].toUpperCase()+t.slice(1),a=0;a<iY.length;){if(n=iY[a],r=n?n+i:t,r in e)return r;a++}}var dY=typeof window>`u`?{}:window,fY=uY(aY.style,`touchAction`),pY=fY!==void 0;function mY(){if(!pY)return!1;var e={},t=dY.CSS&&dY.CSS.supports;return[`auto`,`manipulation`,`pan-y`,`pan-x`,`pan-x pan-y`,`none`].forEach(function(n){return e[n]=t?dY.CSS.supports(`touch-action`,n):!0}),e}var hY=`compute`,gY=`auto`,_Y=`manipulation`,vY=`none`,yY=`pan-x`,bY=`pan-y`,xY=mY(),SY=/mobile|tablet|ip(ad|hone|od)|android/i,CY=`ontouchstart`in dY,wY=uY(dY,`PointerEvent`)!==void 0,TY=CY&&SY.test(navigator.userAgent),EY=`touch`,DY=`pen`,OY=`mouse`,kY=`kinect`,AY=25,jY=1,MY=2,NY=4,PY=8,FY=1,IY=2,LY=4,RY=8,zY=16,BY=IY|LY,VY=RY|zY,HY=BY|VY,UY=[`x`,`y`],WY=[`clientX`,`clientY`];function GY(e,t,n){var r;if(e)if(e.forEach)e.forEach(t,n);else if(e.length!==void 0)for(r=0;r<e.length;)t.call(n,e[r],r,e),r++;else for(r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r,e)}function KY(e,t){return typeof e===oY?e.apply(t&&t[0]||void 0,t):e}function qY(e,t){return e.indexOf(t)>-1}function JY(e){if(qY(e,vY))return vY;var t=qY(e,yY),n=qY(e,bY);return t&&n?vY:t||n?t?yY:bY:qY(e,_Y)?_Y:gY}var YY=function(){function e(e,t){this.manager=e,this.set(t)}var t=e.prototype;return t.set=function(e){e===hY&&(e=this.compute()),pY&&this.manager.element.style&&xY[e]&&(this.manager.element.style[fY]=e),this.actions=e.toLowerCase().trim()},t.update=function(){this.set(this.manager.options.touchAction)},t.compute=function(){var e=[];return GY(this.manager.recognizers,function(t){KY(t.options.enable,[t])&&(e=e.concat(t.getTouchAction()))}),JY(e.join(` `))},t.preventDefaults=function(e){var t=e.srcEvent,n=e.offsetDirection;if(this.manager.session.prevented){t.preventDefault();return}var r=this.actions,i=qY(r,vY)&&!xY[vY],a=qY(r,bY)&&!xY[bY],o=qY(r,yY)&&!xY[yY];if(i){var s=e.pointers.length===1,c=e.distance<2,l=e.deltaTime<250;if(s&&c&&l)return}if(!(o&&a)&&(i||a&&n&BY||o&&n&VY))return this.preventSrc(t)},t.preventSrc=function(e){this.manager.session.prevented=!0,e.preventDefault()},e}();function XY(e,t){for(;e;){if(e===t)return!0;e=e.parentNode}return!1}function ZY(e){var t=e.length;if(t===1)return{x:sY(e[0].clientX),y:sY(e[0].clientY)};for(var n=0,r=0,i=0;i<t;)n+=e[i].clientX,r+=e[i].clientY,i++;return{x:sY(n/t),y:sY(r/t)}}function QY(e){for(var t=[],n=0;n<e.pointers.length;)t[n]={clientX:sY(e.pointers[n].clientX),clientY:sY(e.pointers[n].clientY)},n++;return{timeStamp:lY(),pointers:t,center:ZY(t),deltaX:e.deltaX,deltaY:e.deltaY}}function $Y(e,t,n){n||=UY;var r=t[n[0]]-e[n[0]],i=t[n[1]]-e[n[1]];return Math.sqrt(r*r+i*i)}function eX(e,t,n){n||=UY;var r=t[n[0]]-e[n[0]],i=t[n[1]]-e[n[1]];return Math.atan2(i,r)*180/Math.PI}function tX(e,t){return e===t?FY:cY(e)>=cY(t)?e<0?IY:LY:t<0?RY:zY}function nX(e,t){var n=t.center,r=e.offsetDelta||{},i=e.prevDelta||{},a=e.prevInput||{};(t.eventType===jY||a.eventType===NY)&&(i=e.prevDelta={x:a.deltaX||0,y:a.deltaY||0},r=e.offsetDelta={x:n.x,y:n.y}),t.deltaX=i.x+(n.x-r.x),t.deltaY=i.y+(n.y-r.y)}function rX(e,t,n){return{x:t/e||0,y:n/e||0}}function iX(e,t){return $Y(t[0],t[1],WY)/$Y(e[0],e[1],WY)}function aX(e,t){return eX(t[1],t[0],WY)+eX(e[1],e[0],WY)}function oX(e,t){var n=e.lastInterval||t,r=t.timeStamp-n.timeStamp,i,a,o,s;if(t.eventType!==PY&&(r>AY||n.velocity===void 0)){var c=t.deltaX-n.deltaX,l=t.deltaY-n.deltaY,u=rX(r,c,l);a=u.x,o=u.y,i=cY(u.x)>cY(u.y)?u.x:u.y,s=tX(c,l),e.lastInterval=t}else i=n.velocity,a=n.velocityX,o=n.velocityY,s=n.direction;t.velocity=i,t.velocityX=a,t.velocityY=o,t.direction=s}function sX(e,t){var n=e.session,r=t.pointers,i=r.length;n.firstInput||=QY(t),i>1&&!n.firstMultiple?n.firstMultiple=QY(t):i===1&&(n.firstMultiple=!1);var a=n.firstInput,o=n.firstMultiple,s=o?o.center:a.center,c=t.center=ZY(r);t.timeStamp=lY(),t.deltaTime=t.timeStamp-a.timeStamp,t.angle=eX(s,c),t.distance=$Y(s,c),nX(n,t),t.offsetDirection=tX(t.deltaX,t.deltaY);var l=rX(t.deltaTime,t.deltaX,t.deltaY);t.overallVelocityX=l.x,t.overallVelocityY=l.y,t.overallVelocity=cY(l.x)>cY(l.y)?l.x:l.y,t.scale=o?iX(o.pointers,r):1,t.rotation=o?aX(o.pointers,r):0,t.maxPointers=n.prevInput?t.pointers.length>n.prevInput.maxPointers?t.pointers.length:n.prevInput.maxPointers:t.pointers.length,oX(n,t);var u=e.element,d=t.srcEvent,f=d.composedPath?d.composedPath()[0]:d.path?d.path[0]:d.target;XY(f,u)&&(u=f),t.target=u}function cX(e,t,n){var r=n.pointers.length,i=n.changedPointers.length,a=t&jY&&r-i===0,o=t&(NY|PY)&&r-i===0;n.isFirst=!!a,n.isFinal=!!o,a&&(e.session={}),n.eventType=t,sX(e,n),e.emit(`hammer.input`,n),e.recognize(n),e.session.prevInput=n}function lX(e){return e.trim().split(/\s+/g)}function uX(e,t,n){GY(lX(t),function(t){e.addEventListener(t,n,!1)})}function dX(e,t,n){GY(lX(t),function(t){e.removeEventListener(t,n,!1)})}function fX(e){var t=e.ownerDocument||e;return t.defaultView||t.parentWindow||window}var pX=function(){function e(e,t){var n=this;this.manager=e,this.callback=t,this.element=e.element,this.target=e.options.inputTarget,this.domHandler=function(t){KY(e.options.enable,[e])&&n.handler(t)},this.init()}var t=e.prototype;return t.handler=function(){},t.init=function(){this.evEl&&uX(this.element,this.evEl,this.domHandler),this.evTarget&&uX(this.target,this.evTarget,this.domHandler),this.evWin&&uX(fX(this.element),this.evWin,this.domHandler)},t.destroy=function(){this.evEl&&dX(this.element,this.evEl,this.domHandler),this.evTarget&&dX(this.target,this.evTarget,this.domHandler),this.evWin&&dX(fX(this.element),this.evWin,this.domHandler)},e}();function mX(e,t,n){if(e.indexOf&&!n)return e.indexOf(t);for(var r=0;r<e.length;){if(n&&e[r][n]==t||!n&&e[r]===t)return r;r++}return-1}var hX={pointerdown:jY,pointermove:MY,pointerup:NY,pointercancel:PY,pointerout:PY},gX={2:EY,3:DY,4:OY,5:kY},_X=`pointerdown`,vX=`pointermove pointerup pointercancel`;dY.MSPointerEvent&&!dY.PointerEvent&&(_X=`MSPointerDown`,vX=`MSPointerMove MSPointerUp MSPointerCancel`);var yX=function(e){tY(t,e);function t(){var n,r=t.prototype;return r.evEl=_X,r.evWin=vX,n=e.apply(this,arguments)||this,n.store=n.manager.session.pointerEvents=[],n}var n=t.prototype;return n.handler=function(e){var t=this.store,n=!1,r=hX[e.type.toLowerCase().replace(`ms`,``)],i=gX[e.pointerType]||e.pointerType,a=i===EY,o=mX(t,e.pointerId,`pointerId`);r&jY&&(e.button===0||a)?o<0&&(t.push(e),o=t.length-1):r&(NY|PY)&&(n=!0),!(o<0)&&(t[o]=e,this.callback(this.manager,r,{pointers:t,changedPointers:[e],pointerType:i,srcEvent:e}),n&&t.splice(o,1))},t}(pX);function bX(e){return Array.prototype.slice.call(e,0)}function xX(e,t,n){for(var r=[],i=[],a=0;a<e.length;){var o=t?e[a][t]:e[a];mX(i,o)<0&&r.push(e[a]),i[a]=o,a++}return n&&(r=t?r.sort(function(e,n){return e[t]>n[t]}):r.sort()),r}var SX={touchstart:jY,touchmove:MY,touchend:NY,touchcancel:PY},CX=`touchstart touchmove touchend touchcancel`,wX=function(e){tY(t,e);function t(){var n;return t.prototype.evTarget=CX,n=e.apply(this,arguments)||this,n.targetIds={},n}var n=t.prototype;return n.handler=function(e){var t=SX[e.type],n=TX.call(this,e,t);n&&this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:EY,srcEvent:e})},t}(pX);function TX(e,t){var n=bX(e.touches),r=this.targetIds;if(t&(jY|MY)&&n.length===1)return r[n[0].identifier]=!0,[n,n];var i,a,o=bX(e.changedTouches),s=[],c=this.target;if(a=n.filter(function(e){return XY(e.target,c)}),t===jY)for(i=0;i<a.length;)r[a[i].identifier]=!0,i++;for(i=0;i<o.length;)r[o[i].identifier]&&s.push(o[i]),t&(NY|PY)&&delete r[o[i].identifier],i++;if(s.length)return[xX(a.concat(s),`identifier`,!0),s]}var EX={mousedown:jY,mousemove:MY,mouseup:NY},DX=`mousedown`,OX=`mousemove mouseup`,kX=function(e){tY(t,e);function t(){var n,r=t.prototype;return r.evEl=DX,r.evWin=OX,n=e.apply(this,arguments)||this,n.pressed=!1,n}var n=t.prototype;return n.handler=function(e){var t=EX[e.type];t&jY&&e.button===0&&(this.pressed=!0),t&MY&&e.which!==1&&(t=NY),this.pressed&&(t&NY&&(this.pressed=!1),this.callback(this.manager,t,{pointers:[e],changedPointers:[e],pointerType:OY,srcEvent:e}))},t}(pX),AX=2500,jX=25;function MX(e){var t=e.changedPointers[0];if(t.identifier===this.primaryTouch){var n={x:t.clientX,y:t.clientY},r=this.lastTouches;this.lastTouches.push(n),setTimeout(function(){var e=r.indexOf(n);e>-1&&r.splice(e,1)},AX)}}function NX(e,t){e&jY?(this.primaryTouch=t.changedPointers[0].identifier,MX.call(this,t)):e&(NY|PY)&&MX.call(this,t)}function PX(e){for(var t=e.srcEvent.clientX,n=e.srcEvent.clientY,r=0;r<this.lastTouches.length;r++){var i=this.lastTouches[r],a=Math.abs(t-i.x),o=Math.abs(n-i.y);if(a<=jX&&o<=jX)return!0}return!1}var FX=function(){return function(e){tY(t,e);function t(t,n){var r=e.call(this,t,n)||this;return r.handler=function(e,t,n){var i=n.pointerType===EY,a=n.pointerType===OY;if(!(a&&n.sourceCapabilities&&n.sourceCapabilities.firesTouchEvents)){if(i)NX.call(nY(nY(r)),t,n);else if(a&&PX.call(nY(nY(r)),n))return;r.callback(e,t,n)}},r.touch=new wX(r.manager,r.handler),r.mouse=new kX(r.manager,r.handler),r.primaryTouch=null,r.lastTouches=[],r}var n=t.prototype;return n.destroy=function(){this.touch.destroy(),this.mouse.destroy()},t}(pX)}();function IX(e){var t;return t=e.options.inputClass||(wY?yX:TY?wX:CY?FX:kX),new t(e,cX)}function LX(e,t,n){return Array.isArray(e)?(GY(e,n[t],n),!0):!1}var RX=1,zX=2,BX=4,VX=8,HX=VX,UX=16,WX=32,GX=1;function KX(){return GX++}function qX(e,t){var n=t.manager;return n?n.get(e):e}function JX(e){return e&UX?`cancel`:e&VX?`end`:e&BX?`move`:e&zX?`start`:``}var YX=function(){function e(e){e===void 0&&(e={}),this.options=eY({enable:!0},e),this.id=KX(),this.manager=null,this.state=RX,this.simultaneous={},this.requireFail=[]}var t=e.prototype;return t.set=function(e){return rY(this.options,e),this.manager&&this.manager.touchAction.update(),this},t.recognizeWith=function(e){if(LX(e,`recognizeWith`,this))return this;var t=this.simultaneous;return e=qX(e,this),t[e.id]||(t[e.id]=e,e.recognizeWith(this)),this},t.dropRecognizeWith=function(e){return LX(e,`dropRecognizeWith`,this)?this:(e=qX(e,this),delete this.simultaneous[e.id],this)},t.requireFailure=function(e){if(LX(e,`requireFailure`,this))return this;var t=this.requireFail;return e=qX(e,this),mX(t,e)===-1&&(t.push(e),e.requireFailure(this)),this},t.dropRequireFailure=function(e){if(LX(e,`dropRequireFailure`,this))return this;e=qX(e,this);var t=mX(this.requireFail,e);return t>-1&&this.requireFail.splice(t,1),this},t.hasRequireFailures=function(){return this.requireFail.length>0},t.canRecognizeWith=function(e){return!!this.simultaneous[e.id]},t.emit=function(e){var t=this,n=this.state;function r(n){t.manager.emit(n,e)}n<VX&&r(t.options.event+JX(n)),r(t.options.event),e.additionalEvent&&r(e.additionalEvent),n>=VX&&r(t.options.event+JX(n))},t.tryEmit=function(e){if(this.canEmit())return this.emit(e);this.state=WX},t.canEmit=function(){for(var e=0;e<this.requireFail.length;){if(!(this.requireFail[e].state&(WX|RX)))return!1;e++}return!0},t.recognize=function(e){var t=rY({},e);if(!KY(this.options.enable,[this,t])){this.reset(),this.state=WX;return}this.state&(HX|UX|WX)&&(this.state=RX),this.state=this.process(t),this.state&(zX|BX|VX|UX)&&this.tryEmit(t)},t.process=function(e){},t.getTouchAction=function(){},t.reset=function(){},e}(),XX=function(e){tY(t,e);function t(t){var n;return t===void 0&&(t={}),n=e.call(this,eY({event:`tap`,pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},t))||this,n.pTime=!1,n.pCenter=!1,n._timer=null,n._input=null,n.count=0,n}var n=t.prototype;return n.getTouchAction=function(){return[_Y]},n.process=function(e){var t=this,n=this.options,r=e.pointers.length===n.pointers,i=e.distance<n.threshold,a=e.deltaTime<n.time;if(this.reset(),e.eventType&jY&&this.count===0)return this.failTimeout();if(i&&a&&r){if(e.eventType!==NY)return this.failTimeout();var o=this.pTime?e.timeStamp-this.pTime<n.interval:!0,s=!this.pCenter||$Y(this.pCenter,e.center)<n.posThreshold;if(this.pTime=e.timeStamp,this.pCenter=e.center,!s||!o?this.count=1:this.count+=1,this._input=e,this.count%n.taps===0)return this.hasRequireFailures()?(this._timer=setTimeout(function(){t.state=HX,t.tryEmit()},n.interval),zX):HX}return WX},n.failTimeout=function(){var e=this;return this._timer=setTimeout(function(){e.state=WX},this.options.interval),WX},n.reset=function(){clearTimeout(this._timer)},n.emit=function(){this.state===HX&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))},t}(YX),ZX=function(e){tY(t,e);function t(t){return t===void 0&&(t={}),e.call(this,eY({pointers:1},t))||this}var n=t.prototype;return n.attrTest=function(e){var t=this.options.pointers;return t===0||e.pointers.length===t},n.process=function(e){var t=this.state,n=e.eventType,r=t&(zX|BX),i=this.attrTest(e);return r&&(n&PY||!i)?t|UX:r||i?n&NY?t|VX:t&zX?t|BX:zX:WX},t}(YX);function QX(e){return e===zY?`down`:e===RY?`up`:e===IY?`left`:e===LY?`right`:``}var $X=function(e){tY(t,e);function t(t){var n;return t===void 0&&(t={}),n=e.call(this,eY({event:`pan`,threshold:10,pointers:1,direction:HY},t))||this,n.pX=null,n.pY=null,n}var n=t.prototype;return n.getTouchAction=function(){var e=this.options.direction,t=[];return e&BY&&t.push(bY),e&VY&&t.push(yY),t},n.directionTest=function(e){var t=this.options,n=!0,r=e.distance,i=e.direction,a=e.deltaX,o=e.deltaY;return i&t.direction||(t.direction&BY?(i=a===0?FY:a<0?IY:LY,n=a!==this.pX,r=Math.abs(e.deltaX)):(i=o===0?FY:o<0?RY:zY,n=o!==this.pY,r=Math.abs(e.deltaY))),e.direction=i,n&&r>t.threshold&&i&t.direction},n.attrTest=function(e){return ZX.prototype.attrTest.call(this,e)&&(this.state&zX||!(this.state&zX)&&this.directionTest(e))},n.emit=function(t){this.pX=t.deltaX,this.pY=t.deltaY;var n=QX(t.direction);n&&(t.additionalEvent=this.options.event+n),e.prototype.emit.call(this,t)},t}(ZX),eZ=function(e){tY(t,e);function t(t){return t===void 0&&(t={}),e.call(this,eY({event:`swipe`,threshold:10,velocity:.3,direction:BY|VY,pointers:1},t))||this}var n=t.prototype;return n.getTouchAction=function(){return $X.prototype.getTouchAction.call(this)},n.attrTest=function(t){var n=this.options.direction,r;return n&(BY|VY)?r=t.overallVelocity:n&BY?r=t.overallVelocityX:n&VY&&(r=t.overallVelocityY),e.prototype.attrTest.call(this,t)&&n&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers===this.options.pointers&&cY(r)>this.options.velocity&&t.eventType&NY},n.emit=function(e){var t=QX(e.offsetDirection);t&&this.manager.emit(this.options.event+t,e),this.manager.emit(this.options.event,e)},t}(ZX),tZ=function(e){tY(t,e);function t(t){return t===void 0&&(t={}),e.call(this,eY({event:`pinch`,threshold:0,pointers:2},t))||this}var n=t.prototype;return n.getTouchAction=function(){return[vY]},n.attrTest=function(t){return e.prototype.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||this.state&zX)},n.emit=function(t){if(t.scale!==1){var n=t.scale<1?`in`:`out`;t.additionalEvent=this.options.event+n}e.prototype.emit.call(this,t)},t}(ZX),nZ=function(e){tY(t,e);function t(t){return t===void 0&&(t={}),e.call(this,eY({event:`rotate`,threshold:0,pointers:2},t))||this}var n=t.prototype;return n.getTouchAction=function(){return[vY]},n.attrTest=function(t){return e.prototype.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||this.state&zX)},t}(ZX),rZ=function(e){tY(t,e);function t(t){var n;return t===void 0&&(t={}),n=e.call(this,eY({event:`press`,pointers:1,time:251,threshold:9},t))||this,n._timer=null,n._input=null,n}var n=t.prototype;return n.getTouchAction=function(){return[gY]},n.process=function(e){var t=this,n=this.options,r=e.pointers.length===n.pointers,i=e.distance<n.threshold,a=e.deltaTime>n.time;if(this._input=e,!i||!r||e.eventType&(NY|PY)&&!a)this.reset();else if(e.eventType&jY)this.reset(),this._timer=setTimeout(function(){t.state=HX,t.tryEmit()},n.time);else if(e.eventType&NY)return HX;return WX},n.reset=function(){clearTimeout(this._timer)},n.emit=function(e){this.state===HX&&(e&&e.eventType&NY?this.manager.emit(this.options.event+`up`,e):(this._input.timeStamp=lY(),this.manager.emit(this.options.event,this._input)))},t}(YX),iZ={domEvents:!1,touchAction:hY,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:`none`,touchSelect:`none`,touchCallout:`none`,contentZooming:`none`,userDrag:`none`,tapHighlightColor:`rgba(0,0,0,0)`}},aZ=[[nZ,{enable:!1}],[tZ,{enable:!1},[`rotate`]],[eZ,{direction:BY}],[$X,{direction:BY},[`swipe`]],[XX],[XX,{event:`doubletap`,taps:2},[`tap`]],[rZ]],oZ=1,sZ=2;function cZ(e,t){var n=e.element;if(n.style){var r;GY(e.options.cssProps,function(i,a){r=uY(n.style,a),t?(e.oldCssProps[r]=n.style[r],n.style[r]=i):n.style[r]=e.oldCssProps[r]||``}),t||(e.oldCssProps={})}}function lZ(e,t){var n=document.createEvent(`Event`);n.initEvent(e,!0,!0),n.gesture=t,t.target.dispatchEvent(n)}var uZ=function(){function e(e,t){var n=this;this.options=rY({},iZ,t||{}),this.options.inputTarget=this.options.inputTarget||e,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=e,this.input=IX(this),this.touchAction=new YY(this,this.options.touchAction),cZ(this,!0),GY(this.options.recognizers,function(e){var t=n.add(new e[0](e[1]));e[2]&&t.recognizeWith(e[2]),e[3]&&t.requireFailure(e[3])},this)}var t=e.prototype;return t.set=function(e){return rY(this.options,e),e.touchAction&&this.touchAction.update(),e.inputTarget&&(this.input.destroy(),this.input.target=e.inputTarget,this.input.init()),this},t.stop=function(e){this.session.stopped=e?sZ:oZ},t.recognize=function(e){var t=this.session;if(!t.stopped){this.touchAction.preventDefaults(e);var n,r=this.recognizers,i=t.curRecognizer;(!i||i&&i.state&HX)&&(t.curRecognizer=null,i=null);for(var a=0;a<r.length;)n=r[a],t.stopped!==sZ&&(!i||n===i||n.canRecognizeWith(i))?n.recognize(e):n.reset(),!i&&n.state&(zX|BX|VX)&&(t.curRecognizer=n,i=n),a++}},t.get=function(e){if(e instanceof YX)return e;for(var t=this.recognizers,n=0;n<t.length;n++)if(t[n].options.event===e)return t[n];return null},t.add=function(e){if(LX(e,`add`,this))return this;var t=this.get(e.options.event);return t&&this.remove(t),this.recognizers.push(e),e.manager=this,this.touchAction.update(),e},t.remove=function(e){if(LX(e,`remove`,this))return this;var t=this.get(e);if(e){var n=this.recognizers,r=mX(n,t);r!==-1&&(n.splice(r,1),this.touchAction.update())}return this},t.on=function(e,t){if(e===void 0||t===void 0)return this;var n=this.handlers;return GY(lX(e),function(e){n[e]=n[e]||[],n[e].push(t)}),this},t.off=function(e,t){if(e===void 0)return this;var n=this.handlers;return GY(lX(e),function(e){t?n[e]&&n[e].splice(mX(n[e],t),1):delete n[e]}),this},t.emit=function(e,t){this.options.domEvents&&lZ(e,t);var n=this.handlers[e]&&this.handlers[e].slice();if(!(!n||!n.length)){t.type=e,t.preventDefault=function(){t.srcEvent.preventDefault()};for(var r=0;r<n.length;)n[r](t),r++}},t.destroy=function(){this.element&&cZ(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null},e}(),dZ={touchstart:jY,touchmove:MY,touchend:NY,touchcancel:PY},fZ=`touchstart`,pZ=`touchstart touchmove touchend touchcancel`,mZ=function(e){tY(t,e);function t(){var n,r=t.prototype;return r.evTarget=fZ,r.evWin=pZ,n=e.apply(this,arguments)||this,n.started=!1,n}var n=t.prototype;return n.handler=function(e){var t=dZ[e.type];if(t===jY&&(this.started=!0),this.started){var n=hZ.call(this,e,t);t&(NY|PY)&&n[0].length-n[1].length===0&&(this.started=!1),this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:EY,srcEvent:e})}},t}(pX);function hZ(e,t){var n=bX(e.touches),r=bX(e.changedTouches);return t&(NY|PY)&&(n=xX(n.concat(r),`identifier`,!0)),[n,r]}function gZ(e,t,n){var r=`DEPRECATED METHOD: `+t+`-`+n+` AT-`;return function(){var t=Error(`get-stack-trace`),n=t&&t.stack?t.stack.replace(/^[^\(]+?[\n$]/gm,``).replace(/^\s+at\s+/gm,``).replace(/^Object.<anonymous>\s*\(/gm,`{anonymous}()@`):`Unknown Stack Trace`,i=window.console&&(window.console.warn||window.console.log);return i&&i.call(window.console,r,n),e.apply(this,arguments)}}var _Z=gZ(function(e,t,n){for(var r=Object.keys(t),i=0;i<r.length;)(!n||n&&e[r[i]]===void 0)&&(e[r[i]]=t[r[i]]),i++;return e},`extend`,"Use `assign`."),vZ=gZ(function(e,t){return _Z(e,t,!0)},`merge`,"Use `assign`.");function yZ(e,t,n){var r=t.prototype,i=e.prototype=Object.create(r);i.constructor=e,i._super=r,n&&rY(i,n)}function bZ(e,t){return function(){return e.apply(t,arguments)}}var xZ=function(){var e=function(e,t){return t===void 0&&(t={}),new uZ(e,eY({recognizers:aZ.concat()},t))};return e.VERSION=`2.0.17-rc`,e.DIRECTION_ALL=HY,e.DIRECTION_DOWN=zY,e.DIRECTION_LEFT=IY,e.DIRECTION_RIGHT=LY,e.DIRECTION_UP=RY,e.DIRECTION_HORIZONTAL=BY,e.DIRECTION_VERTICAL=VY,e.DIRECTION_NONE=FY,e.DIRECTION_DOWN=zY,e.INPUT_START=jY,e.INPUT_MOVE=MY,e.INPUT_END=NY,e.INPUT_CANCEL=PY,e.STATE_POSSIBLE=RX,e.STATE_BEGAN=zX,e.STATE_CHANGED=BX,e.STATE_ENDED=VX,e.STATE_RECOGNIZED=HX,e.STATE_CANCELLED=UX,e.STATE_FAILED=WX,e.Manager=uZ,e.Input=pX,e.TouchAction=YY,e.TouchInput=wX,e.MouseInput=kX,e.PointerEventInput=yX,e.TouchMouseInput=FX,e.SingleTouchInput=mZ,e.Recognizer=YX,e.AttrRecognizer=ZX,e.Tap=XX,e.Pan=$X,e.Swipe=eZ,e.Pinch=tZ,e.Rotate=nZ,e.Press=rZ,e.on=uX,e.off=dX,e.each=GY,e.merge=vZ,e.extend=_Z,e.bindFn=bZ,e.assign=rY,e.inherit=yZ,e.bindFn=bZ,e.prefixed=uY,e.toArray=bX,e.inArray=mX,e.uniqueArray=xX,e.splitStr=lX,e.boolOrFn=KY,e.hasParent=XY,e.addEventListeners=uX,e.removeEventListeners=dX,e.defaults=rY({},iZ,{preset:aZ}),e}();xZ.defaults;var SZ=GU(`DELETE`);function CZ(e){return wZ({},e,...[...arguments].slice(1))}function wZ(){let e=TZ(...arguments);return DZ(e),e}function TZ(){var e=[...arguments];if(e.length<2)return e[0];if(e.length>2)return TZ(wZ(e[0],e[1]),...sW(e).call(e,2));let t=e[0],n=e[1];if(t instanceof Date&&n instanceof Date)return t.setTime(n.getTime()),t;for(let e of bW(n))Object.prototype.propertyIsEnumerable.call(n,e)&&(n[e]===SZ?delete t[e]:t[e]!==null&&n[e]!==null&&typeof t[e]==`object`&&typeof n[e]==`object`&&!G(t[e])&&!G(n[e])?t[e]=TZ(t[e],n[e]):t[e]=EZ(n[e]));return t}function EZ(e){return G(e)?nU(e).call(e,e=>EZ(e)):typeof e==`object`&&e?e instanceof Date?new Date(e.getTime()):TZ({},e):e}function DZ(e){for(let t of LU(e))e[t]===SZ?delete e[t]:typeof e[t]==`object`&&e[t]!==null&&DZ(e[t])}function OZ(){var e=[...arguments];return kZ(e.length?e:[NW()])}function kZ(e){let[t,n,r]=AZ(e),i=1,a=()=>{let e=2091639*t+i*23283064365386963e-26;return t=n,n=r,r=e-(i=e|0)};return a.uint32=()=>a()*4294967296,a.fract53=()=>a()+(a()*2097152|0)*11102230246251565e-32,a.algorithm=`Alea`,a.seed=e,a.version=`0.9`,a}function AZ(){let e=jZ(),t=e(` `),n=e(` `),r=e(` `);for(let i=0;i<arguments.length;i++)t-=e(i<0||arguments.length<=i?void 0:arguments[i]),t<0&&(t+=1),n-=e(i<0||arguments.length<=i?void 0:arguments[i]),n<0&&(n+=1),r-=e(i<0||arguments.length<=i?void 0:arguments[i]),r<0&&(r+=1);return[t,n,r]}function jZ(){let e=4022871197;return function(t){let n=t.toString();for(let t=0;t<n.length;t++){e+=n.charCodeAt(t);let r=.02519603282416938*e;e=r>>>0,r-=e,r*=e,e=r>>>0,r-=e,e+=r*4294967296}return(e>>>0)*23283064365386963e-26}}function MZ(){let e=()=>{};return{on:e,off:e,destroy:e,emit:e,get(){return{set:e}}}}var NZ=typeof window<`u`?window.Hammer||xZ:function(){return MZ()};function PZ(e){var t;this._cleanupQueue=[],this.active=!1,this._dom={container:e,overlay:document.createElement(`div`)},this._dom.overlay.classList.add(`vis-overlay`),this._dom.container.appendChild(this._dom.overlay),this._cleanupQueue.push(()=>{this._dom.overlay.parentNode.removeChild(this._dom.overlay)});let n=NZ(this._dom.overlay);n.on(`tap`,K(t=this._onTapOverlay).call(t,this)),this._cleanupQueue.push(()=>{n.destroy()});let r=[`tap`,`doubletap`,`press`,`pinch`,`pan`,`panstart`,`panmove`,`panend`];q(r).call(r,e=>{n.on(e,e=>{e.srcEvent.stopPropagation()})}),document&&document.body&&(this._onClick=t=>{FZ(t.target,e)||this.deactivate()},document.body.addEventListener(`click`,this._onClick),this._cleanupQueue.push(()=>{document.body.removeEventListener(`click`,this._onClick)})),this._escListener=e=>{(`key`in e?e.key===`Escape`:e.keyCode===27)&&this.deactivate()}}$J(PZ.prototype),PZ.current=null,PZ.prototype.destroy=function(){this.deactivate();for(let n of YW(e=_G(t=this._cleanupQueue).call(t,0)).call(e)){var e,t;n()}},PZ.prototype.activate=function(){PZ.current&&PZ.current.deactivate(),PZ.current=this,this.active=!0,this._dom.overlay.style.display=`none`,this._dom.container.classList.add(`vis-active`),this.emit(`change`),this.emit(`activate`),document.body.addEventListener(`keydown`,this._escListener)},PZ.prototype.deactivate=function(){this.active=!1,this._dom.overlay.style.display=`block`,this._dom.container.classList.remove(`vis-active`),document.body.removeEventListener(`keydown`,this._escListener),this.emit(`change`),this.emit(`deactivate`)},PZ.prototype._onTapOverlay=function(e){this.activate(),e.srcEvent.stopPropagation()};function FZ(e,t){for(;e;){if(e===t)return!0;e=e.parentNode}return!1}var IZ=/^\/?Date\((-?\d+)/i,LZ=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,RZ=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,zZ=/^rgb\( *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *\)$/i,BZ=/^rgba\( *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *([01]|0?\.\d+) *\)$/i;function VZ(e){return e instanceof Number||typeof e==`number`}function HZ(e){if(e)for(;e.hasChildNodes()===!0;){let t=e.firstChild;t&&(HZ(t),e.removeChild(t))}}function UZ(e){return e instanceof String||typeof e==`string`}function WZ(e){return typeof e==`object`&&!!e}function GZ(e){return!!(e instanceof Date||UZ(e)&&(IZ.exec(e)||!isNaN(Date.parse(e))))}function KZ(e,t,n,r){let i=!1;r===!0&&(i=t[n]===null&&e[n]!==void 0),i?delete e[n]:e[n]=t[n]}function qZ(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;for(let r in e)if(t[r]!==void 0)if(t[r]===null||typeof t[r]!=`object`)KZ(e,t,r,n);else{let i=e[r],a=t[r];WZ(i)&&WZ(a)&&qZ(i,a,n)}}var JZ=NG;function YZ(e,t){if(!G(e))throw Error(`Array with property names expected as first argument`);var n=[...arguments].slice(2);for(let r of n)for(let n=0;n<e.length;n++){let i=e[n];r&&Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t}function XZ(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(G(n))throw TypeError(`Arrays are not supported by deepExtend`);for(let i=0;i<e.length;i++){let a=e[i];if(Object.prototype.hasOwnProperty.call(n,a))if(n[a]&&n[a].constructor===Object)t[a]===void 0&&(t[a]={}),t[a].constructor===Object?QZ(t[a],n[a],!1,r):KZ(t,n,a,r);else if(G(n[a]))throw TypeError(`Arrays are not supported by deepExtend`);else KZ(t,n,a,r)}return t}function ZZ(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(G(n))throw TypeError(`Arrays are not supported by deepExtend`);for(let i in n)if(Object.prototype.hasOwnProperty.call(n,i)&&!uK(e).call(e,i))if(n[i]&&n[i].constructor===Object)t[i]===void 0&&(t[i]={}),t[i].constructor===Object?QZ(t[i],n[i]):KZ(t,n,i,r);else if(G(n[i])){t[i]=[];for(let e=0;e<n[i].length;e++)t[i].push(n[i][e])}else KZ(t,n,i,r);return t}function QZ(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;for(let a in t)if(Object.prototype.hasOwnProperty.call(t,a)||n===!0)if(typeof t[a]==`object`&&t[a]!==null&&CK(t[a])===Object.prototype)e[a]===void 0?e[a]=QZ({},t[a],n):typeof e[a]==`object`&&e[a]!==null&&CK(e[a])===Object.prototype?QZ(e[a],t[a],n):KZ(e,t,a,r);else if(G(t[a])){var i;e[a]=sW(i=t[a]).call(i)}else KZ(e,t,a,r);return e}function $Z(e,t){if(e.length!==t.length)return!1;for(let n=0,r=e.length;n<r;n++)if(e[n]!=t[n])return!1;return!0}function eQ(e){let t=typeof e;return t===`object`?e===null?`null`:e instanceof Boolean?`Boolean`:e instanceof Number?`Number`:e instanceof String?`String`:G(e)?`Array`:e instanceof Date?`Date`:`Object`:t===`number`?`Number`:t===`boolean`?`Boolean`:t===`string`?`String`:t===void 0?`undefined`:t}function tQ(e,t){return[...e,t]}function nQ(e){return sW(e).call(e)}function rQ(e){return e.getBoundingClientRect().left}function iQ(e){return e.getBoundingClientRect().right}function aQ(e){return e.getBoundingClientRect().top}function oQ(e,t){let n=e.className.split(` `),r=t.split(` `);n=IK(n).call(n,J(r).call(r,function(e){return!uK(n).call(n,e)})),e.className=n.join(` `)}function sQ(e,t){let n=e.className.split(` `),r=t.split(` `);n=J(n).call(n,function(e){return!uK(r).call(r,e)}),e.className=n.join(` `)}function cQ(e,t){if(G(e)){let n=e.length;for(let r=0;r<n;r++)t(e[r],r,e)}else for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t(e[n],n,e)}var lQ=QK;function uQ(e,t,n){return e[t]===n?!1:(e[t]=n,!0)}function dQ(e){let t=!1;return()=>{t||(t=!0,requestAnimationFrame(()=>{t=!1,e()}))}}function fQ(e){e||=window.event,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)}function pQ(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.event,t=null;return e&&(e.target?t=e.target:e.srcElement&&(t=e.srcElement)),!(t instanceof Element)||t.nodeType!=null&&t.nodeType==3&&(t=t.parentNode,!(t instanceof Element))?null:t}function mQ(e,t){let n=e;for(;n;)if(n===t)return!0;else if(n.parentNode)n=n.parentNode;else return!1;return!1}var hQ={asBoolean(e,t){return typeof e==`function`&&(e=e()),e==null?t||null:e!=0},asNumber(e,t){return typeof e==`function`&&(e=e()),e==null?t||null:Number(e)||t||null},asString(e,t){return typeof e==`function`&&(e=e()),e==null?t||null:String(e)},asSize(e,t){return typeof e==`function`&&(e=e()),UZ(e)?e:VZ(e)?e+`px`:t||null},asElement(e,t){return typeof e==`function`&&(e=e()),e||t||null}};function gQ(e){let t;switch(e.length){case 3:case 4:return t=RZ.exec(e),t?{r:bq(t[1]+t[1],16),g:bq(t[2]+t[2],16),b:bq(t[3]+t[3],16)}:null;case 6:case 7:return t=LZ.exec(e),t?{r:bq(t[1],16),g:bq(t[2],16),b:bq(t[3],16)}:null;default:return null}}function _Q(e,t){if(uK(e).call(e,`rgba`))return e;if(uK(e).call(e,`rgb`)){let n=e.substr(Iq(e).call(e,`(`)+1).replace(`)`,``).split(`,`);return`rgba(`+n[0]+`,`+n[1]+`,`+n[2]+`,`+t+`)`}else{let n=gQ(e);return n==null?e:`rgba(`+n.r+`,`+n.g+`,`+n.b+`,`+t+`)`}}function vQ(e,t,n){var r;return`#`+sW(r=((1<<24)+(e<<16)+(t<<8)+n).toString(16)).call(r,1)}function yQ(e,t){if(UZ(e)){let t=e;if(OQ(t)){var n;let e=nU(n=t.substr(4).substr(0,t.length-5).split(`,`)).call(n,function(e){return bq(e)});t=vQ(e[0],e[1],e[2])}if(DQ(t)===!0){let e=EQ(t),n={h:e.h,s:e.s*.8,v:Math.min(1,e.v*1.02)},r={h:e.h,s:Math.min(1,e.s*1.25),v:e.v*.8},i=TQ(r.h,r.s,r.v),a=TQ(n.h,n.s,n.v);return{background:t,border:i,highlight:{background:a,border:i},hover:{background:a,border:i}}}else return{background:t,border:t,highlight:{background:t,border:t},hover:{background:t,border:t}}}else if(t)return{background:e.background||t.background,border:e.border||t.border,highlight:UZ(e.highlight)?{border:e.highlight,background:e.highlight}:{background:e.highlight&&e.highlight.background||t.highlight.background,border:e.highlight&&e.highlight.border||t.highlight.border},hover:UZ(e.hover)?{border:e.hover,background:e.hover}:{border:e.hover&&e.hover.border||t.hover.border,background:e.hover&&e.hover.background||t.hover.background}};else return{background:e.background||void 0,border:e.border||void 0,highlight:UZ(e.highlight)?{border:e.highlight,background:e.highlight}:{background:e.highlight&&e.highlight.background||void 0,border:e.highlight&&e.highlight.border||void 0},hover:UZ(e.hover)?{border:e.hover,background:e.hover}:{border:e.hover&&e.hover.border||void 0,background:e.hover&&e.hover.background||void 0}}}function bQ(e,t,n){e/=255,t/=255,n/=255;let r=Math.min(e,Math.min(t,n)),i=Math.max(e,Math.max(t,n));if(r===i)return{h:0,s:0,v:r};let a=e===r?t-n:n===r?e-t:n-e;return{h:60*((e===r?3:n===r?1:5)-a/(i-r))/360,s:(i-r)/i,v:i}}function xQ(e){let t=document.createElement(`div`),n={};t.style.cssText=e;for(let e=0;e<t.style.length;++e)n[t.style[e]]=t.style.getPropertyValue(t.style[e]);return n}function SQ(e,t){let n=xQ(t);for(let[t,r]of Yq(n))e.style.setProperty(t,r)}function CQ(e,t){let n=xQ(t);for(let t of LU(n))e.style.removeProperty(t)}function wQ(e,t,n){let r,i,a,o=Math.floor(e*6),s=e*6-o,c=n*(1-t),l=n*(1-s*t),u=n*(1-(1-s)*t);switch(o%6){case 0:r=n,i=u,a=c;break;case 1:r=l,i=n,a=c;break;case 2:r=c,i=n,a=u;break;case 3:r=c,i=l,a=n;break;case 4:r=u,i=c,a=n;break;case 5:r=n,i=c,a=l;break}return{r:Math.floor(r*255),g:Math.floor(i*255),b:Math.floor(a*255)}}function TQ(e,t,n){let r=wQ(e,t,n);return vQ(r.r,r.g,r.b)}function EQ(e){let t=gQ(e);if(!t)throw TypeError(`'${e}' is not a valid color.`);return bQ(t.r,t.g,t.b)}function DQ(e){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(e)}function OQ(e){return zZ.test(e)}function kQ(e){return BZ.test(e)}function AQ(e,t){if(typeof t==`object`&&t){let n=cJ(t);for(let r=0;r<e.length;r++)Object.prototype.hasOwnProperty.call(t,e[r])&&typeof t[e[r]]==`object`&&(n[e[r]]=jQ(t[e[r]]));return n}else return null}function jQ(e){if(typeof e!=`object`||!e)return null;if(e instanceof Element)return e;let t=cJ(e);for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&typeof e[n]==`object`&&(t[n]=jQ(e[n]));return t}function MQ(e,t){for(let n=0;n<e.length;n++){let r=e[n],i;for(i=n;i>0&&t(r,e[i-1])<0;i--)e[i]=e[i-1];e[i]=r}return e}function NQ(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},i=function(e){return e!=null},a=function(e){return typeof e==`object`&&!!e},o=function(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0};if(!a(e))throw Error(`Parameter mergeTarget must be an object`);if(!a(t))throw Error(`Parameter options must be an object`);if(!i(n))throw Error(`Parameter option must have a value`);if(!a(r))throw Error(`Parameter globalOptions must be an object`);let s=function(e,t,n){a(e[n])||(e[n]={});let r=t[n],i=e[n];for(let e in r)Object.prototype.hasOwnProperty.call(r,e)&&(i[e]=r[e])},c=t[n],l=a(r)&&!o(r)?r[n]:void 0,u=l?l.enabled:void 0;if(c===void 0)return;if(typeof c==`boolean`){a(e[n])||(e[n]={}),e[n].enabled=c;return}if(c===null&&!a(e[n]))if(i(l))e[n]=cJ(l);else return;if(!a(c))return;let d=!0;c.enabled===void 0?u!==void 0&&(d=l.enabled):d=c.enabled,s(e,t,n),e[n].enabled=d}function PQ(e,t,n,r){let i=0,a=0,o=e.length-1;for(;a<=o&&i<1e4;){let s=Math.floor((a+o)/2),c=e[s],l=t(r===void 0?c[n]:c[n][r]);if(l==0)return s;l==-1?a=s+1:o=s-1,i++}return-1}function FQ(e,t,n,r,i){let a=0,o=0,s=e.length-1,c,l,u,d;for(i??=function(e,t){return e==t?0:e<t?-1:1};o<=s&&a<1e4;){if(d=Math.floor(.5*(s+o)),c=e[Math.max(0,d-1)][n],l=e[d][n],u=e[Math.min(e.length-1,d+1)][n],i(l,t)==0)return d;if(i(c,t)<0&&i(l,t)>0)return r==`before`?Math.max(0,d-1):d;if(i(l,t)<0&&i(u,t)>0)return r==`before`?d:Math.min(e.length-1,d+1);i(l,t)<0?o=d+1:s=d-1,a++}return-1}var IQ={linear(e){return e},easeInQuad(e){return e*e},easeOutQuad(e){return e*(2-e)},easeInOutQuad(e){return e<.5?2*e*e:-1+(4-2*e)*e},easeInCubic(e){return e*e*e},easeOutCubic(e){return--e*e*e+1},easeInOutCubic(e){return e<.5?4*e*e*e:(e-1)*(2*e-2)*(2*e-2)+1},easeInQuart(e){return e*e*e*e},easeOutQuart(e){return 1- --e*e*e*e},easeInOutQuart(e){return e<.5?8*e*e*e*e:1-8*--e*e*e*e},easeInQuint(e){return e*e*e*e*e},easeOutQuint(e){return 1+--e*e*e*e*e},easeInOutQuint(e){return e<.5?16*e*e*e*e*e:1+16*--e*e*e*e*e}};function LQ(){let e=document.createElement(`p`);e.style.width=`100%`,e.style.height=`200px`;let t=document.createElement(`div`);t.style.position=`absolute`,t.style.top=`0px`,t.style.left=`0px`,t.style.visibility=`hidden`,t.style.width=`200px`,t.style.height=`150px`,t.style.overflow=`hidden`,t.appendChild(e),document.body.appendChild(t);let n=e.offsetWidth;t.style.overflow=`scroll`;let r=e.offsetWidth;return n==r&&(r=t.clientWidth),document.body.removeChild(t),n-r}function RQ(e,t){let n;G(t)||(t=[t]);for(let r of e)if(r){n=r[t[0]];for(let e=1;e<t.length;e++)n&&=n[t[e]];if(n!==void 0)break}return n}var zQ={black:`#000000`,navy:`#000080`,darkblue:`#00008B`,mediumblue:`#0000CD`,blue:`#0000FF`,darkgreen:`#006400`,green:`#008000`,teal:`#008080`,darkcyan:`#008B8B`,deepskyblue:`#00BFFF`,darkturquoise:`#00CED1`,mediumspringgreen:`#00FA9A`,lime:`#00FF00`,springgreen:`#00FF7F`,aqua:`#00FFFF`,cyan:`#00FFFF`,midnightblue:`#191970`,dodgerblue:`#1E90FF`,lightseagreen:`#20B2AA`,forestgreen:`#228B22`,seagreen:`#2E8B57`,darkslategray:`#2F4F4F`,limegreen:`#32CD32`,mediumseagreen:`#3CB371`,turquoise:`#40E0D0`,royalblue:`#4169E1`,steelblue:`#4682B4`,darkslateblue:`#483D8B`,mediumturquoise:`#48D1CC`,indigo:`#4B0082`,darkolivegreen:`#556B2F`,cadetblue:`#5F9EA0`,cornflowerblue:`#6495ED`,mediumaquamarine:`#66CDAA`,dimgray:`#696969`,slateblue:`#6A5ACD`,olivedrab:`#6B8E23`,slategray:`#708090`,lightslategray:`#778899`,mediumslateblue:`#7B68EE`,lawngreen:`#7CFC00`,chartreuse:`#7FFF00`,aquamarine:`#7FFFD4`,maroon:`#800000`,purple:`#800080`,olive:`#808000`,gray:`#808080`,skyblue:`#87CEEB`,lightskyblue:`#87CEFA`,blueviolet:`#8A2BE2`,darkred:`#8B0000`,darkmagenta:`#8B008B`,saddlebrown:`#8B4513`,darkseagreen:`#8FBC8F`,lightgreen:`#90EE90`,mediumpurple:`#9370D8`,darkviolet:`#9400D3`,palegreen:`#98FB98`,darkorchid:`#9932CC`,yellowgreen:`#9ACD32`,sienna:`#A0522D`,brown:`#A52A2A`,darkgray:`#A9A9A9`,lightblue:`#ADD8E6`,greenyellow:`#ADFF2F`,paleturquoise:`#AFEEEE`,lightsteelblue:`#B0C4DE`,powderblue:`#B0E0E6`,firebrick:`#B22222`,darkgoldenrod:`#B8860B`,mediumorchid:`#BA55D3`,rosybrown:`#BC8F8F`,darkkhaki:`#BDB76B`,silver:`#C0C0C0`,mediumvioletred:`#C71585`,indianred:`#CD5C5C`,peru:`#CD853F`,chocolate:`#D2691E`,tan:`#D2B48C`,lightgrey:`#D3D3D3`,palevioletred:`#D87093`,thistle:`#D8BFD8`,orchid:`#DA70D6`,goldenrod:`#DAA520`,crimson:`#DC143C`,gainsboro:`#DCDCDC`,plum:`#DDA0DD`,burlywood:`#DEB887`,lightcyan:`#E0FFFF`,lavender:`#E6E6FA`,darksalmon:`#E9967A`,violet:`#EE82EE`,palegoldenrod:`#EEE8AA`,lightcoral:`#F08080`,khaki:`#F0E68C`,aliceblue:`#F0F8FF`,honeydew:`#F0FFF0`,azure:`#F0FFFF`,sandybrown:`#F4A460`,wheat:`#F5DEB3`,beige:`#F5F5DC`,whitesmoke:`#F5F5F5`,mintcream:`#F5FFFA`,ghostwhite:`#F8F8FF`,salmon:`#FA8072`,antiquewhite:`#FAEBD7`,linen:`#FAF0E6`,lightgoldenrodyellow:`#FAFAD2`,oldlace:`#FDF5E6`,red:`#FF0000`,fuchsia:`#FF00FF`,magenta:`#FF00FF`,deeppink:`#FF1493`,orangered:`#FF4500`,tomato:`#FF6347`,hotpink:`#FF69B4`,coral:`#FF7F50`,darkorange:`#FF8C00`,lightsalmon:`#FFA07A`,orange:`#FFA500`,lightpink:`#FFB6C1`,pink:`#FFC0CB`,gold:`#FFD700`,peachpuff:`#FFDAB9`,navajowhite:`#FFDEAD`,moccasin:`#FFE4B5`,bisque:`#FFE4C4`,mistyrose:`#FFE4E1`,blanchedalmond:`#FFEBCD`,papayawhip:`#FFEFD5`,lavenderblush:`#FFF0F5`,seashell:`#FFF5EE`,cornsilk:`#FFF8DC`,lemonchiffon:`#FFFACD`,floralwhite:`#FFFAF0`,snow:`#FFFAFA`,yellow:`#FFFF00`,lightyellow:`#FFFFE0`,ivory:`#FFFFF0`,white:`#FFFFFF`},BQ=class{constructor(){this.pixelRatio=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1,this.generated=!1,this.centerCoordinates={x:289/2,y:289/2},this.r=289*.49,this.color={r:255,g:255,b:255,a:1},this.hueCircle=void 0,this.initialColor={r:255,g:255,b:255,a:1},this.previousColor=void 0,this.applied=!1,this.updateCallback=()=>{},this.closeCallback=()=>{},this._create()}insertTo(e){this.hammer!==void 0&&(this.hammer.destroy(),this.hammer=void 0),this.container=e,this.container.appendChild(this.frame),this._bindHammer(),this._setSize()}setUpdateCallback(e){if(typeof e==`function`)this.updateCallback=e;else throw Error(`Function attempted to set as colorPicker update callback is not a function.`)}setCloseCallback(e){if(typeof e==`function`)this.closeCallback=e;else throw Error(`Function attempted to set as colorPicker closing callback is not a function.`)}_isColorString(e){if(typeof e==`string`)return zQ[e]}setColor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(e===`none`)return;let n,r=this._isColorString(e);if(r!==void 0&&(e=r),UZ(e)===!0){if(OQ(e)===!0){let t=e.substr(4).substr(0,e.length-5).split(`,`);n={r:t[0],g:t[1],b:t[2],a:1}}else if(kQ(e)===!0){let t=e.substr(5).substr(0,e.length-6).split(`,`);n={r:t[0],g:t[1],b:t[2],a:t[3]}}else if(DQ(e)===!0){let t=gQ(e);n={r:t.r,g:t.g,b:t.b,a:1}}}else if(e instanceof Object&&e.r!==void 0&&e.g!==void 0&&e.b!==void 0){let t=e.a===void 0?`1.0`:e.a;n={r:e.r,g:e.g,b:e.b,a:t}}if(n===void 0)throw Error(`Unknown color passed to the colorPicker. Supported are strings: rgb, hex, rgba. Object: rgb ({r:r,g:g,b:b,[a:a]}). Supplied: `+AJ(e));this._setColor(n,t)}show(){this.closeCallback!==void 0&&(this.closeCallback(),this.closeCallback=void 0),this.applied=!1,this.frame.style.display=`block`,this._generateHueCircle()}_hide(){(arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0)===!0&&(this.previousColor=NG({},this.color)),this.applied===!0&&this.updateCallback(this.initialColor),this.frame.style.display=`none`,wP(()=>{this.closeCallback!==void 0&&(this.closeCallback(),this.closeCallback=void 0)},0)}_save(){this.updateCallback(this.color),this.applied=!1,this._hide()}_apply(){this.applied=!0,this.updateCallback(this.color),this._updatePicker(this.color)}_loadLast(){this.previousColor===void 0?alert(`There is no last color to load...`):this.setColor(this.previousColor,!1)}_setColor(e){(arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0)===!0&&(this.initialColor=NG({},e)),this.color=e;let t=bQ(e.r,e.g,e.b),n=2*Math.PI,r=this.r*t.s,i=this.centerCoordinates.x+r*Math.sin(n*t.h),a=this.centerCoordinates.y+r*Math.cos(n*t.h);this.colorPickerSelector.style.left=i-.5*this.colorPickerSelector.clientWidth+`px`,this.colorPickerSelector.style.top=a-.5*this.colorPickerSelector.clientHeight+`px`,this._updatePicker(e)}_setOpacity(e){this.color.a=e/100,this._updatePicker(this.color)}_setBrightness(e){let t=bQ(this.color.r,this.color.g,this.color.b);t.v=e/100;let n=wQ(t.h,t.s,t.v);n.a=this.color.a,this.color=n,this._updatePicker()}_updatePicker(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.color,t=bQ(e.r,e.g,e.b),n=this.colorPickerCanvas.getContext(`2d`);this.pixelRation===void 0&&(this.pixelRatio=(window.devicePixelRatio||1)/(n.webkitBackingStorePixelRatio||n.mozBackingStorePixelRatio||n.msBackingStorePixelRatio||n.oBackingStorePixelRatio||n.backingStorePixelRatio||1)),n.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);let r=this.colorPickerCanvas.clientWidth,i=this.colorPickerCanvas.clientHeight;n.clearRect(0,0,r,i),n.putImageData(this.hueCircle,0,0),n.fillStyle=`rgba(0,0,0,`+(1-t.v)+`)`,n.circle(this.centerCoordinates.x,this.centerCoordinates.y,this.r),YJ(n).call(n),this.brightnessRange.value=100*t.v,this.opacityRange.value=100*e.a,this.initialColorDiv.style.backgroundColor=`rgba(`+this.initialColor.r+`,`+this.initialColor.g+`,`+this.initialColor.b+`,`+this.initialColor.a+`)`,this.newColorDiv.style.backgroundColor=`rgba(`+this.color.r+`,`+this.color.g+`,`+this.color.b+`,`+this.color.a+`)`}_setSize(){this.colorPickerCanvas.style.width=`100%`,this.colorPickerCanvas.style.height=`100%`,this.colorPickerCanvas.width=289*this.pixelRatio,this.colorPickerCanvas.height=289*this.pixelRatio}_create(){var e,t,n,r;if(this.frame=document.createElement(`div`),this.frame.className=`vis-color-picker`,this.colorPickerDiv=document.createElement(`div`),this.colorPickerSelector=document.createElement(`div`),this.colorPickerSelector.className=`vis-selector`,this.colorPickerDiv.appendChild(this.colorPickerSelector),this.colorPickerCanvas=document.createElement(`canvas`),this.colorPickerDiv.appendChild(this.colorPickerCanvas),this.colorPickerCanvas.getContext){let e=this.colorPickerCanvas.getContext(`2d`);this.pixelRatio=(window.devicePixelRatio||1)/(e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1),this.colorPickerCanvas.getContext(`2d`).setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0)}else{let e=document.createElement(`DIV`);e.style.color=`red`,e.style.fontWeight=`bold`,e.style.padding=`10px`,e.innerText=`Error: your browser does not support HTML canvas`,this.colorPickerCanvas.appendChild(e)}this.colorPickerDiv.className=`vis-color`,this.opacityDiv=document.createElement(`div`),this.opacityDiv.className=`vis-opacity`,this.brightnessDiv=document.createElement(`div`),this.brightnessDiv.className=`vis-brightness`,this.arrowDiv=document.createElement(`div`),this.arrowDiv.className=`vis-arrow`,this.opacityRange=document.createElement(`input`);try{this.opacityRange.type=`range`,this.opacityRange.min=`0`,this.opacityRange.max=`100`}catch{}this.opacityRange.value=`100`,this.opacityRange.className=`vis-range`,this.brightnessRange=document.createElement(`input`);try{this.brightnessRange.type=`range`,this.brightnessRange.min=`0`,this.brightnessRange.max=`100`}catch{}this.brightnessRange.value=`100`,this.brightnessRange.className=`vis-range`,this.opacityDiv.appendChild(this.opacityRange),this.brightnessDiv.appendChild(this.brightnessRange);let i=this;this.opacityRange.onchange=function(){i._setOpacity(this.value)},this.opacityRange.oninput=function(){i._setOpacity(this.value)},this.brightnessRange.onchange=function(){i._setBrightness(this.value)},this.brightnessRange.oninput=function(){i._setBrightness(this.value)},this.brightnessLabel=document.createElement(`div`),this.brightnessLabel.className=`vis-label vis-brightness`,this.brightnessLabel.innerText=`brightness:`,this.opacityLabel=document.createElement(`div`),this.opacityLabel.className=`vis-label vis-opacity`,this.opacityLabel.innerText=`opacity:`,this.newColorDiv=document.createElement(`div`),this.newColorDiv.className=`vis-new-color`,this.newColorDiv.innerText=`new`,this.initialColorDiv=document.createElement(`div`),this.initialColorDiv.className=`vis-initial-color`,this.initialColorDiv.innerText=`initial`,this.cancelButton=document.createElement(`div`),this.cancelButton.className=`vis-button vis-cancel`,this.cancelButton.innerText=`cancel`,this.cancelButton.onclick=K(e=this._hide).call(e,this,!1),this.applyButton=document.createElement(`div`),this.applyButton.className=`vis-button vis-apply`,this.applyButton.innerText=`apply`,this.applyButton.onclick=K(t=this._apply).call(t,this),this.saveButton=document.createElement(`div`),this.saveButton.className=`vis-button vis-save`,this.saveButton.innerText=`save`,this.saveButton.onclick=K(n=this._save).call(n,this),this.loadButton=document.createElement(`div`),this.loadButton.className=`vis-button vis-load`,this.loadButton.innerText=`load last`,this.loadButton.onclick=K(r=this._loadLast).call(r,this),this.frame.appendChild(this.colorPickerDiv),this.frame.appendChild(this.arrowDiv),this.frame.appendChild(this.brightnessLabel),this.frame.appendChild(this.brightnessDiv),this.frame.appendChild(this.opacityLabel),this.frame.appendChild(this.opacityDiv),this.frame.appendChild(this.newColorDiv),this.frame.appendChild(this.initialColorDiv),this.frame.appendChild(this.cancelButton),this.frame.appendChild(this.applyButton),this.frame.appendChild(this.saveButton),this.frame.appendChild(this.loadButton)}_bindHammer(){this.drag={},this.pinch={},this.hammer=new NZ(this.colorPickerCanvas),this.hammer.get(`pinch`).set({enable:!0}),this.hammer.on(`hammer.input`,e=>{e.isFirst&&this._moveSelector(e)}),this.hammer.on(`tap`,e=>{this._moveSelector(e)}),this.hammer.on(`panstart`,e=>{this._moveSelector(e)}),this.hammer.on(`panmove`,e=>{this._moveSelector(e)}),this.hammer.on(`panend`,e=>{this._moveSelector(e)})}_generateHueCircle(){if(this.generated===!1){let e=this.colorPickerCanvas.getContext(`2d`);this.pixelRation===void 0&&(this.pixelRatio=(window.devicePixelRatio||1)/(e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1)),e.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);let t=this.colorPickerCanvas.clientWidth,n=this.colorPickerCanvas.clientHeight;e.clearRect(0,0,t,n);let r,i,a,o;this.centerCoordinates={x:t*.5,y:n*.5},this.r=.49*t;let s=2*Math.PI/360,c=1/this.r,l;for(a=0;a<360;a++)for(o=0;o<this.r;o++)r=this.centerCoordinates.x+o*Math.sin(s*a),i=this.centerCoordinates.y+o*Math.cos(s*a),l=wQ(a*.002777777777777778,o*c,1),e.fillStyle=`rgb(`+l.r+`,`+l.g+`,`+l.b+`)`,e.fillRect(r-.5,i-.5,2,2);e.strokeStyle=`rgba(0,0,0,1)`,e.circle(this.centerCoordinates.x,this.centerCoordinates.y,this.r),e.stroke(),this.hueCircle=e.getImageData(0,0,t,n)}this.generated=!0}_moveSelector(e){let t=this.colorPickerDiv.getBoundingClientRect(),n=e.center.x-t.left,r=e.center.y-t.top,i=.5*this.colorPickerDiv.clientHeight,a=.5*this.colorPickerDiv.clientWidth,o=n-a,s=r-i,c=Math.atan2(o,s),l=.98*Math.min(Math.sqrt(o*o+s*s),a),u=Math.cos(c)*l+i,d=Math.sin(c)*l+a;this.colorPickerSelector.style.top=u-.5*this.colorPickerSelector.clientHeight+`px`,this.colorPickerSelector.style.left=d-.5*this.colorPickerSelector.clientWidth+`px`;let f=c/(2*Math.PI);f=f<0?f+1:f;let p=l/this.r,m=bQ(this.color.r,this.color.g,this.color.b);m.h=f,m.s=p;let h=wQ(m.h,m.s,m.v);h.a=this.color.a,this.color=h,this.initialColorDiv.style.backgroundColor=`rgba(`+this.initialColor.r+`,`+this.initialColor.g+`,`+this.initialColor.b+`,`+this.initialColor.a+`)`,this.newColorDiv.style.backgroundColor=`rgba(`+this.color.r+`,`+this.color.g+`,`+this.color.b+`,`+this.color.a+`)`}};function VQ(){var e=[...arguments];if(e.length<1)throw TypeError(`Invalid arguments.`);if(e.length===1)return document.createTextNode(e[0]);{let t=document.createElement(e[0]);return t.appendChild(VQ(...sW(e).call(e,1))),t}}var HQ=class{constructor(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:()=>!1;this.parent=e,this.changedOptions=[],this.container=t,this.allowCreation=!1,this.hideOption=i,this.options={},this.initialized=!1,this.popupCounter=0,this.defaultOptions={enabled:!1,filter:!0,container:void 0,showButton:!0},NG(this.options,this.defaultOptions),this.configureOptions=n,this.moduleOptions={},this.domElements=[],this.popupDiv={},this.popupLimit=5,this.popupHistory={},this.colorPicker=new BQ(r),this.wrapper=void 0}setOptions(e){if(e!==void 0){this.popupHistory={},this._removePopup();let t=!0;if(typeof e==`string`)this.options.filter=e;else if(G(e))this.options.filter=e.join();else if(typeof e==`object`){if(e==null)throw TypeError(`options cannot be null`);e.container!==void 0&&(this.options.container=e.container),J(e)!==void 0&&(this.options.filter=J(e)),e.showButton!==void 0&&(this.options.showButton=e.showButton),e.enabled!==void 0&&(t=e.enabled)}else typeof e==`boolean`?(this.options.filter=!0,t=e):typeof e==`function`&&(this.options.filter=e,t=!0);J(this.options)===!1&&(t=!1),this.options.enabled=t}this._clean()}setModuleOptions(e){this.moduleOptions=e,this.options.enabled===!0&&(this._clean(),this.options.container!==void 0&&(this.container=this.options.container),this._create())}_create(){this._clean(),this.changedOptions=[];let e=J(this.options),t=0,n=!1;for(let r in this.configureOptions)Object.prototype.hasOwnProperty.call(this.configureOptions,r)&&(this.allowCreation=!1,n=!1,typeof e==`function`?(n=e(r,[]),n||=this._handleObject(this.configureOptions[r],[r],!0)):(e===!0||Iq(e).call(e,r)!==-1)&&(n=!0),n!==!1&&(this.allowCreation=!0,t>0&&this._makeItem([]),this._makeHeader(r),this._handleObject(this.configureOptions[r],[r])),t++);this._makeButton(),this._push()}_push(){this.wrapper=document.createElement(`div`),this.wrapper.className=`vis-configuration-wrapper`,this.container.appendChild(this.wrapper);for(let e=0;e<this.domElements.length;e++)this.wrapper.appendChild(this.domElements[e]);this._showPopupIfNeeded()}_clean(){for(let e=0;e<this.domElements.length;e++)this.wrapper.removeChild(this.domElements[e]);this.wrapper!==void 0&&(this.container.removeChild(this.wrapper),this.wrapper=void 0),this.domElements=[],this._removePopup()}_getValue(e){let t=this.moduleOptions;for(let n=0;n<e.length;n++)if(t[e[n]]!==void 0)t=t[e[n]];else{t=void 0;break}return t}_makeItem(e){if(this.allowCreation===!0){let n=document.createElement(`div`);n.className=`vis-configuration vis-config-item vis-config-s`+e.length;var t=[...arguments].slice(1);return q(t).call(t,e=>{n.appendChild(e)}),this.domElements.push(n),this.domElements.length}return 0}_makeHeader(e){let t=document.createElement(`div`);t.className=`vis-configuration vis-config-header`,t.innerText=e,this._makeItem([],t)}_makeLabel(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,r=document.createElement(`div`);if(r.className=`vis-configuration vis-config-label vis-config-s`+t.length,n===!0){for(;r.firstChild;)r.removeChild(r.firstChild);r.appendChild(VQ(`i`,`b`,e))}else r.innerText=e+`:`;return r}_makeDropdown(e,t,n){let r=document.createElement(`select`);r.className=`vis-configuration vis-config-select`;let i=0;t!==void 0&&Iq(e).call(e,t)!==-1&&(i=Iq(e).call(e,t));for(let t=0;t<e.length;t++){let n=document.createElement(`option`);n.value=e[t],t===i&&(n.selected=`selected`),n.innerText=e[t],r.appendChild(n)}let a=this;r.onchange=function(){a._update(this.value,n)};let o=this._makeLabel(n[n.length-1],n);this._makeItem(n,o,r)}_makeRange(e,t,n){let r=e[0],i=e[1],a=e[2],o=e[3],s=document.createElement(`input`);s.className=`vis-configuration vis-config-range`;try{s.type=`range`,s.min=i,s.max=a}catch{}s.step=o;let c=``,l=0;if(t!==void 0){let e=1.2;t<0&&t*e<i?(s.min=Math.ceil(t*e),l=s.min,c=`range increased`):t/e<i&&(s.min=Math.ceil(t/e),l=s.min,c=`range increased`),t*e>a&&a!==1&&(s.max=Math.ceil(t*e),l=s.max,c=`range increased`),s.value=t}else s.value=r;let u=document.createElement(`input`);u.className=`vis-configuration vis-config-rangeinput`,u.value=s.value;let d=this;s.onchange=function(){u.value=this.value,d._update(Number(this.value),n)},s.oninput=function(){u.value=this.value};let f=this._makeLabel(n[n.length-1],n),p=this._makeItem(n,f,s,u);c!==``&&this.popupHistory[p]!==l&&(this.popupHistory[p]=l,this._setupPopup(c,p))}_makeButton(){if(this.options.showButton===!0){let e=document.createElement(`div`);e.className=`vis-configuration vis-config-button`,e.innerText=`generate options`,e.onclick=()=>{this._printOptions()},e.onmouseover=()=>{e.className=`vis-configuration vis-config-button hover`},e.onmouseout=()=>{e.className=`vis-configuration vis-config-button`},this.optionsContainer=document.createElement(`div`),this.optionsContainer.className=`vis-configuration vis-config-option-container`,this.domElements.push(this.optionsContainer),this.domElements.push(e)}}_setupPopup(e,t){if(this.initialized===!0&&this.allowCreation===!0&&this.popupCounter<this.popupLimit){let n=document.createElement(`div`);n.id=`vis-configuration-popup`,n.className=`vis-configuration-popup`,n.innerText=e,n.onclick=()=>{this._removePopup()},this.popupCounter+=1,this.popupDiv={html:n,index:t}}}_removePopup(){this.popupDiv.html!==void 0&&(this.popupDiv.html.parentNode.removeChild(this.popupDiv.html),clearTimeout(this.popupDiv.hideTimeout),clearTimeout(this.popupDiv.deleteTimeout),this.popupDiv={})}_showPopupIfNeeded(){if(this.popupDiv.html!==void 0){let e=this.domElements[this.popupDiv.index].getBoundingClientRect();this.popupDiv.html.style.left=e.left+`px`,this.popupDiv.html.style.top=e.top-30+`px`,document.body.appendChild(this.popupDiv.html),this.popupDiv.hideTimeout=wP(()=>{this.popupDiv.html.style.opacity=0},1500),this.popupDiv.deleteTimeout=wP(()=>{this._removePopup()},1800)}}_makeCheckbox(e,t,n){let r=document.createElement(`input`);r.type=`checkbox`,r.className=`vis-configuration vis-config-checkbox`,r.checked=e,t!==void 0&&(r.checked=t,t!==e&&(typeof e==`object`?t!==e.enabled&&this.changedOptions.push({path:n,value:t}):this.changedOptions.push({path:n,value:t})));let i=this;r.onchange=function(){i._update(this.checked,n)};let a=this._makeLabel(n[n.length-1],n);this._makeItem(n,a,r)}_makeTextInput(e,t,n){let r=document.createElement(`input`);r.type=`text`,r.className=`vis-configuration vis-config-text`,r.value=t,t!==e&&this.changedOptions.push({path:n,value:t});let i=this;r.onchange=function(){i._update(this.value,n)};let a=this._makeLabel(n[n.length-1],n);this._makeItem(n,a,r)}_makeColorField(e,t,n){let r=e[1],i=document.createElement(`div`);t=t===void 0?r:t,t===`none`?i.className=`vis-configuration vis-config-colorBlock none`:(i.className=`vis-configuration vis-config-colorBlock`,i.style.backgroundColor=t),t=t===void 0?r:t,i.onclick=()=>{this._showColorPicker(t,i,n)};let a=this._makeLabel(n[n.length-1],n);this._makeItem(n,a,i)}_showColorPicker(e,t,n){t.onclick=function(){},this.colorPicker.insertTo(t),this.colorPicker.show(),this.colorPicker.setColor(e),this.colorPicker.setUpdateCallback(e=>{let r=`rgba(`+e.r+`,`+e.g+`,`+e.b+`,`+e.a+`)`;t.style.backgroundColor=r,this._update(r,n)}),this.colorPicker.setCloseCallback(()=>{t.onclick=()=>{this._showColorPicker(e,t,n)}})}_handleObject(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,r=!1,i=J(this.options),a=!1;for(let o in e)if(Object.prototype.hasOwnProperty.call(e,o)){r=!0;let s=e[o],c=tQ(t,o);if(typeof i==`function`&&(r=i(o,t),r===!1&&!G(s)&&typeof s!=`string`&&typeof s!=`boolean`&&s instanceof Object&&(this.allowCreation=!1,r=this._handleObject(s,c,!0),this.allowCreation=n===!1)),r!==!1){a=!0;let e=this._getValue(c);if(G(s))this._handleArray(s,e,c);else if(typeof s==`string`)this._makeTextInput(s,e,c);else if(typeof s==`boolean`)this._makeCheckbox(s,e,c);else if(s instanceof Object){if(!this.hideOption(t,o,this.moduleOptions))if(s.enabled!==void 0){let e=tQ(c,`enabled`),t=this._getValue(e);if(t===!0){let e=this._makeLabel(o,c,!0);this._makeItem(c,e),a=this._handleObject(s,c)||a}else this._makeCheckbox(s,t,c)}else{let e=this._makeLabel(o,c,!0);this._makeItem(c,e),a=this._handleObject(s,c)||a}}else console.error(`dont know how to handle`,s,o,c)}}return a}_handleArray(e,t,n){typeof e[0]==`string`&&e[0]===`color`?(this._makeColorField(e,t,n),e[1]!==t&&this.changedOptions.push({path:n,value:t})):typeof e[0]==`string`?(this._makeDropdown(e,t,n),e[0]!==t&&this.changedOptions.push({path:n,value:t})):typeof e[0]==`number`&&(this._makeRange(e,t,n),e[0]!==t&&this.changedOptions.push({path:n,value:Number(t)}))}_update(e,t){let n=this._constructOptions(e,t);this.parent.body&&this.parent.body.emitter&&this.parent.body.emitter.emit&&this.parent.body.emitter.emit(`configChange`,n),this.initialized=!0,this.parent.setOptions(n)}_constructOptions(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=n;e=e===`true`?!0:e,e=e===`false`?!1:e;for(let n=0;n<t.length;n++)t[n]!==`global`&&(r[t[n]]===void 0&&(r[t[n]]={}),n===t.length-1?r[t[n]]=e:r=r[t[n]]);return n}_printOptions(){let e=this.getOptions();for(;this.optionsContainer.firstChild;)this.optionsContainer.removeChild(this.optionsContainer.firstChild);this.optionsContainer.appendChild(VQ(`pre`,`const options = `+AJ(e,null,2)))}getOptions(){let e={};for(let t=0;t<this.changedOptions.length;t++)this._constructOptions(this.changedOptions[t].value,this.changedOptions[t].path,e);return e}},UQ=class{constructor(e,t){this.container=e,this.overflowMethod=t||`cap`,this.x=0,this.y=0,this.padding=5,this.hidden=!1,this.frame=document.createElement(`div`),this.frame.className=`vis-tooltip`,this.container.appendChild(this.frame)}setPosition(e,t){this.x=bq(e),this.y=bq(t)}setText(e){if(e instanceof Element){for(;this.frame.firstChild;)this.frame.removeChild(this.frame.firstChild);this.frame.appendChild(e)}else this.frame.innerText=e}show(e){if(e===void 0&&(e=!0),e===!0){let e=this.frame.clientHeight,t=this.frame.clientWidth,n=this.frame.parentNode.clientHeight,r=this.frame.parentNode.clientWidth,i=0,a=0;if(this.overflowMethod==`flip`){let n=!1,o=!0;this.y-e<this.padding&&(o=!1),this.x+t>r-this.padding&&(n=!0),i=n?this.x-t:this.x,a=o?this.y-e:this.y}else a=this.y-e,a+e+this.padding>n&&(a=n-e-this.padding),a<this.padding&&(a=this.padding),i=this.x,i+t+this.padding>r&&(i=r-t-this.padding),i<this.padding&&(i=this.padding);this.frame.style.left=i+`px`,this.frame.style.top=a+`px`,this.frame.style.visibility=`visible`,this.hidden=!1}else this.hide()}hide(){this.hidden=!0,this.frame.style.left=`0`,this.frame.style.top=`0`,this.frame.style.visibility=`hidden`}destroy(){this.frame.parentNode.removeChild(this.frame)}},WQ=!1,GQ,KQ=`background: #FFeeee; color: #dd0000`,qQ=Object.freeze({__proto__:null,Activator:PZ,Alea:OZ,ColorPicker:BQ,Configurator:HQ,DELETE:SZ,HSVToHex:TQ,HSVToRGB:wQ,Hammer:NZ,Popup:UQ,RGBToHSV:bQ,RGBToHex:vQ,VALIDATOR_PRINT_STYLE:KQ,Validator:class e{static validate(t,n,r){WQ=!1,GQ=n;let i=n;return r!==void 0&&(i=n[r]),e.parse(t,i,[]),WQ}static parse(t,n,r){for(let i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.check(i,t,n,r)}static check(t,n,r,i){if(r[t]===void 0&&r.__any__===void 0){e.getSuggestion(t,r,i);return}let a=t,o=!0;r[t]===void 0&&r.__any__!==void 0&&(a=`__any__`,o=e.getType(n[t])===`object`);let s=r[a];o&&s.__type__!==void 0&&(s=s.__type__),e.checkFields(t,n,r,a,s,i)}static checkFields(t,n,r,i,a,o){let s=function(n){console.error(`%c`+n+e.printLocation(o,t),KQ)},c=e.getType(n[t]),l=a[c];l===void 0?a.any===void 0&&(s(`Invalid type received for "`+t+`". Expected: `+e.print(LU(a))+`. Received [`+c+`] "`+n[t]+`"`),WQ=!0):e.getType(l)===`array`&&Iq(l).call(l,n[t])===-1?(s(`Invalid option detected in "`+t+`". Allowed values are:`+e.print(l)+` not "`+n[t]+`". `),WQ=!0):c===`object`&&i!==`__any__`&&(o=tQ(o,t),e.parse(n[t],r[i],o))}static getType(e){let t=typeof e;return t===`object`?e===null?`null`:e instanceof Boolean?`boolean`:e instanceof Number?`number`:e instanceof String?`string`:G(e)?`array`:e instanceof Date?`date`:e.nodeType===void 0?e._isAMomentObject===!0?`moment`:`object`:`dom`:t===`number`?`number`:t===`boolean`?`boolean`:t===`string`?`string`:t===void 0?`undefined`:t}static getSuggestion(t,n,r){let i=e.findInOptions(t,n,r,!1),a=e.findInOptions(t,GQ,[],!0),o;o=i.indexMatch===void 0?a.distance<=4&&i.distance>a.distance?` in `+e.printLocation(i.path,t,``)+`Perhaps it was misplaced? Matching option found at: `+e.printLocation(a.path,a.closestMatch,``):i.distance<=8?`. Did you mean "`+i.closestMatch+`"?`+e.printLocation(i.path,t):`. Did you mean one of these: `+e.print(LU(n))+e.printLocation(r,t):` in `+e.printLocation(i.path,t,``)+`Perhaps it was incomplete? Did you mean: "`+i.indexMatch+`"?--`,console.error(`%cUnknown option detected: "`+t+`"`+o,KQ),WQ=!0}static findInOptions(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,a=1e9,o=``,s=[],c=t.toLowerCase(),l;for(let d in n){let f;if(n[d].__type__!==void 0&&i===!0){let i=e.findInOptions(t,n[d],tQ(r,d));a>i.distance&&(o=i.closestMatch,s=i.path,a=i.distance,l=i.indexMatch)}else{var u;Iq(u=d.toLowerCase()).call(u,c)!==-1&&(l=d),f=e.levenshteinDistance(t,d),a>f&&(o=d,s=nQ(r),a=f)}}return{closestMatch:o,path:s,distance:a,indexMatch:l}}static printLocation(e,t){let n=`--`+(arguments.length>2&&arguments[2]!==void 0?arguments[2]:`Problem value found at:-`)+`options = {-`;for(let t=0;t<e.length;t++){for(let e=0;e<t+1;e++)n+=` `;n+=e[t]+`: {-`}for(let t=0;t<e.length+1;t++)n+=` `;n+=t+`-`;for(let t=0;t<e.length+1;t++){for(let r=0;r<e.length-t;r++)n+=` `;n+=`}-`}return n+`--`}static print(e){return AJ(e).replace(/(")|(\[)|(\])|(,"__type__")/g,``).replace(/(,)/g,`, `)}static levenshteinDistance(e,t){if(e.length===0)return t.length;if(t.length===0)return e.length;let n=[],r;for(r=0;r<=t.length;r++)n[r]=[r];let i;for(i=0;i<=e.length;i++)n[0][i]=i;for(r=1;r<=t.length;r++)for(i=1;i<=e.length;i++)t.charAt(r-1)==e.charAt(i-1)?n[r][i]=n[r-1][i-1]:n[r][i]=Math.min(n[r-1][i-1]+1,Math.min(n[r][i-1]+1,n[r-1][i]+1));return n[t.length][e.length]}},addClassName:oQ,addCssText:SQ,binarySearchCustom:PQ,binarySearchValue:FQ,bridgeObject:jQ,copyAndExtendArray:tQ,copyArray:nQ,deepExtend:QZ,deepObjectAssign:wZ,easingFunctions:IQ,equalArray:$Z,extend:JZ,fillIfDefined:qZ,forEach:cQ,getAbsoluteLeft:rQ,getAbsoluteRight:iQ,getAbsoluteTop:aQ,getScrollBarWidth:LQ,getTarget:pQ,getType:eQ,hasParent:mQ,hexToHSV:EQ,hexToRGB:gQ,insertSort:MQ,isDate:GZ,isNumber:VZ,isObject:WZ,isString:UZ,isValidHex:DQ,isValidRGB:OQ,isValidRGBA:kQ,mergeOptions:NQ,option:hQ,overrideOpacity:_Q,parseColor:yQ,preventDefault:fQ,pureDeepObjectAssign:CZ,recursiveDOMDelete:HZ,removeClassName:sQ,removeCssText:CQ,selectiveBridgeObject:AQ,selectiveDeepExtend:XZ,selectiveExtend:YZ,selectiveNotDeepExtend:ZZ,throttle:dQ,toArray:lQ,topMost:RQ,updateProperty:uQ}),JQ={exports:{}},YQ={},XQ={exports:{}},ZQ={},QQ;function $Q(){if(QQ)return ZQ;QQ=1;function e(){var e={};return e[`align-content`]=!1,e[`align-items`]=!1,e[`align-self`]=!1,e[`alignment-adjust`]=!1,e[`alignment-baseline`]=!1,e.all=!1,e[`anchor-point`]=!1,e.animation=!1,e[`animation-delay`]=!1,e[`animation-direction`]=!1,e[`animation-duration`]=!1,e[`animation-fill-mode`]=!1,e[`animation-iteration-count`]=!1,e[`animation-name`]=!1,e[`animation-play-state`]=!1,e[`animation-timing-function`]=!1,e.azimuth=!1,e[`backface-visibility`]=!1,e.background=!0,e[`background-attachment`]=!0,e[`background-clip`]=!0,e[`background-color`]=!0,e[`background-image`]=!0,e[`background-origin`]=!0,e[`background-position`]=!0,e[`background-repeat`]=!0,e[`background-size`]=!0,e[`baseline-shift`]=!1,e.binding=!1,e.bleed=!1,e[`bookmark-label`]=!1,e[`bookmark-level`]=!1,e[`bookmark-state`]=!1,e.border=!0,e[`border-bottom`]=!0,e[`border-bottom-color`]=!0,e[`border-bottom-left-radius`]=!0,e[`border-bottom-right-radius`]=!0,e[`border-bottom-style`]=!0,e[`border-bottom-width`]=!0,e[`border-collapse`]=!0,e[`border-color`]=!0,e[`border-image`]=!0,e[`border-image-outset`]=!0,e[`border-image-repeat`]=!0,e[`border-image-slice`]=!0,e[`border-image-source`]=!0,e[`border-image-width`]=!0,e[`border-left`]=!0,e[`border-left-color`]=!0,e[`border-left-style`]=!0,e[`border-left-width`]=!0,e[`border-radius`]=!0,e[`border-right`]=!0,e[`border-right-color`]=!0,e[`border-right-style`]=!0,e[`border-right-width`]=!0,e[`border-spacing`]=!0,e[`border-style`]=!0,e[`border-top`]=!0,e[`border-top-color`]=!0,e[`border-top-left-radius`]=!0,e[`border-top-right-radius`]=!0,e[`border-top-style`]=!0,e[`border-top-width`]=!0,e[`border-width`]=!0,e.bottom=!1,e[`box-decoration-break`]=!0,e[`box-shadow`]=!0,e[`box-sizing`]=!0,e[`box-snap`]=!0,e[`box-suppress`]=!0,e[`break-after`]=!0,e[`break-before`]=!0,e[`break-inside`]=!0,e[`caption-side`]=!1,e.chains=!1,e.clear=!0,e.clip=!1,e[`clip-path`]=!1,e[`clip-rule`]=!1,e.color=!0,e[`color-interpolation-filters`]=!0,e[`column-count`]=!1,e[`column-fill`]=!1,e[`column-gap`]=!1,e[`column-rule`]=!1,e[`column-rule-color`]=!1,e[`column-rule-style`]=!1,e[`column-rule-width`]=!1,e[`column-span`]=!1,e[`column-width`]=!1,e.columns=!1,e.contain=!1,e.content=!1,e[`counter-increment`]=!1,e[`counter-reset`]=!1,e[`counter-set`]=!1,e.crop=!1,e.cue=!1,e[`cue-after`]=!1,e[`cue-before`]=!1,e.cursor=!1,e.direction=!1,e.display=!0,e[`display-inside`]=!0,e[`display-list`]=!0,e[`display-outside`]=!0,e[`dominant-baseline`]=!1,e.elevation=!1,e[`empty-cells`]=!1,e.filter=!1,e.flex=!1,e[`flex-basis`]=!1,e[`flex-direction`]=!1,e[`flex-flow`]=!1,e[`flex-grow`]=!1,e[`flex-shrink`]=!1,e[`flex-wrap`]=!1,e.float=!1,e[`float-offset`]=!1,e[`flood-color`]=!1,e[`flood-opacity`]=!1,e[`flow-from`]=!1,e[`flow-into`]=!1,e.font=!0,e[`font-family`]=!0,e[`font-feature-settings`]=!0,e[`font-kerning`]=!0,e[`font-language-override`]=!0,e[`font-size`]=!0,e[`font-size-adjust`]=!0,e[`font-stretch`]=!0,e[`font-style`]=!0,e[`font-synthesis`]=!0,e[`font-variant`]=!0,e[`font-variant-alternates`]=!0,e[`font-variant-caps`]=!0,e[`font-variant-east-asian`]=!0,e[`font-variant-ligatures`]=!0,e[`font-variant-numeric`]=!0,e[`font-variant-position`]=!0,e[`font-weight`]=!0,e.grid=!1,e[`grid-area`]=!1,e[`grid-auto-columns`]=!1,e[`grid-auto-flow`]=!1,e[`grid-auto-rows`]=!1,e[`grid-column`]=!1,e[`grid-column-end`]=!1,e[`grid-column-start`]=!1,e[`grid-row`]=!1,e[`grid-row-end`]=!1,e[`grid-row-start`]=!1,e[`grid-template`]=!1,e[`grid-template-areas`]=!1,e[`grid-template-columns`]=!1,e[`grid-template-rows`]=!1,e[`hanging-punctuation`]=!1,e.height=!0,e.hyphens=!1,e.icon=!1,e[`image-orientation`]=!1,e[`image-resolution`]=!1,e[`ime-mode`]=!1,e[`initial-letters`]=!1,e[`inline-box-align`]=!1,e[`justify-content`]=!1,e[`justify-items`]=!1,e[`justify-self`]=!1,e.left=!1,e[`letter-spacing`]=!0,e[`lighting-color`]=!0,e[`line-box-contain`]=!1,e[`line-break`]=!1,e[`line-grid`]=!1,e[`line-height`]=!1,e[`line-snap`]=!1,e[`line-stacking`]=!1,e[`line-stacking-ruby`]=!1,e[`line-stacking-shift`]=!1,e[`line-stacking-strategy`]=!1,e[`list-style`]=!0,e[`list-style-image`]=!0,e[`list-style-position`]=!0,e[`list-style-type`]=!0,e.margin=!0,e[`margin-bottom`]=!0,e[`margin-left`]=!0,e[`margin-right`]=!0,e[`margin-top`]=!0,e[`marker-offset`]=!1,e[`marker-side`]=!1,e.marks=!1,e.mask=!1,e[`mask-box`]=!1,e[`mask-box-outset`]=!1,e[`mask-box-repeat`]=!1,e[`mask-box-slice`]=!1,e[`mask-box-source`]=!1,e[`mask-box-width`]=!1,e[`mask-clip`]=!1,e[`mask-image`]=!1,e[`mask-origin`]=!1,e[`mask-position`]=!1,e[`mask-repeat`]=!1,e[`mask-size`]=!1,e[`mask-source-type`]=!1,e[`mask-type`]=!1,e[`max-height`]=!0,e[`max-lines`]=!1,e[`max-width`]=!0,e[`min-height`]=!0,e[`min-width`]=!0,e[`move-to`]=!1,e[`nav-down`]=!1,e[`nav-index`]=!1,e[`nav-left`]=!1,e[`nav-right`]=!1,e[`nav-up`]=!1,e[`object-fit`]=!1,e[`object-position`]=!1,e.opacity=!1,e.order=!1,e.orphans=!1,e.outline=!1,e[`outline-color`]=!1,e[`outline-offset`]=!1,e[`outline-style`]=!1,e[`outline-width`]=!1,e.overflow=!1,e[`overflow-wrap`]=!1,e[`overflow-x`]=!1,e[`overflow-y`]=!1,e.padding=!0,e[`padding-bottom`]=!0,e[`padding-left`]=!0,e[`padding-right`]=!0,e[`padding-top`]=!0,e.page=!1,e[`page-break-after`]=!1,e[`page-break-before`]=!1,e[`page-break-inside`]=!1,e[`page-policy`]=!1,e.pause=!1,e[`pause-after`]=!1,e[`pause-before`]=!1,e.perspective=!1,e[`perspective-origin`]=!1,e.pitch=!1,e[`pitch-range`]=!1,e[`play-during`]=!1,e.position=!1,e[`presentation-level`]=!1,e.quotes=!1,e[`region-fragment`]=!1,e.resize=!1,e.rest=!1,e[`rest-after`]=!1,e[`rest-before`]=!1,e.richness=!1,e.right=!1,e.rotation=!1,e[`rotation-point`]=!1,e[`ruby-align`]=!1,e[`ruby-merge`]=!1,e[`ruby-position`]=!1,e[`shape-image-threshold`]=!1,e[`shape-outside`]=!1,e[`shape-margin`]=!1,e.size=!1,e.speak=!1,e[`speak-as`]=!1,e[`speak-header`]=!1,e[`speak-numeral`]=!1,e[`speak-punctuation`]=!1,e[`speech-rate`]=!1,e.stress=!1,e[`string-set`]=!1,e[`tab-size`]=!1,e[`table-layout`]=!1,e[`text-align`]=!0,e[`text-align-last`]=!0,e[`text-combine-upright`]=!0,e[`text-decoration`]=!0,e[`text-decoration-color`]=!0,e[`text-decoration-line`]=!0,e[`text-decoration-skip`]=!0,e[`text-decoration-style`]=!0,e[`text-emphasis`]=!0,e[`text-emphasis-color`]=!0,e[`text-emphasis-position`]=!0,e[`text-emphasis-style`]=!0,e[`text-height`]=!0,e[`text-indent`]=!0,e[`text-justify`]=!0,e[`text-orientation`]=!0,e[`text-overflow`]=!0,e[`text-shadow`]=!0,e[`text-space-collapse`]=!0,e[`text-transform`]=!0,e[`text-underline-position`]=!0,e[`text-wrap`]=!0,e.top=!1,e.transform=!1,e[`transform-origin`]=!1,e[`transform-style`]=!1,e.transition=!1,e[`transition-delay`]=!1,e[`transition-duration`]=!1,e[`transition-property`]=!1,e[`transition-timing-function`]=!1,e[`unicode-bidi`]=!1,e[`vertical-align`]=!1,e.visibility=!1,e[`voice-balance`]=!1,e[`voice-duration`]=!1,e[`voice-family`]=!1,e[`voice-pitch`]=!1,e[`voice-range`]=!1,e[`voice-rate`]=!1,e[`voice-stress`]=!1,e[`voice-volume`]=!1,e.volume=!1,e[`white-space`]=!1,e.widows=!1,e.width=!0,e[`will-change`]=!1,e[`word-break`]=!0,e[`word-spacing`]=!0,e[`word-wrap`]=!0,e[`wrap-flow`]=!1,e[`wrap-through`]=!1,e[`writing-mode`]=!1,e[`z-index`]=!1,e}function t(e,t,n){}function n(e,t,n){}var r=/javascript\s*\:/gim;function i(e,t){return r.test(t)?``:t}return ZQ.whiteList=e(),ZQ.getDefaultWhiteList=e,ZQ.onAttr=t,ZQ.onIgnoreAttr=n,ZQ.safeAttrValue=i,ZQ}var e$,t$;function n$(){return t$?e$:(t$=1,e$={indexOf:function(e,t){var n,r;if(Array.prototype.indexOf)return e.indexOf(t);for(n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},forEach:function(e,t,n){var r,i;if(Array.prototype.forEach)return e.forEach(t,n);for(r=0,i=e.length;r<i;r++)t.call(n,e[r],r,e)},trim:function(e){return String.prototype.trim?e.trim():e.replace(/(^\s*)|(\s*$)/g,``)},trimRight:function(e){return String.prototype.trimRight?e.trimRight():e.replace(/(\s*$)/g,``)}},e$)}var r$,i$;function a$(){if(i$)return r$;i$=1;var e=n$();function t(t,n){t=e.trimRight(t),t[t.length-1]!==`;`&&(t+=`;`);var r=t.length,i=!1,a=0,o=0,s=``;function c(){if(!i){var r=e.trim(t.slice(a,o)),c=r.indexOf(`:`);if(c!==-1){var l=e.trim(r.slice(0,c)),u=e.trim(r.slice(c+1));if(l){var d=n(a,s.length,l,u,r);d&&(s+=d+`; `)}}}a=o+1}for(;o<r;o++){var l=t[o];if(l===`/`&&t[o+1]===`*`){var u=t.indexOf(`*/`,o+2);if(u===-1)break;o=u+1,a=o+1,i=!1}else l===`(`?i=!0:l===`)`?i=!1:l===`;`?i||c():l===`-`&&c()}return e.trim(s)}return r$=t,r$}var o$,s$;function c$(){if(s$)return o$;s$=1;var e=$Q(),t=a$();n$();function n(e){return e==null}function r(e){var t={};for(var n in e)t[n]=e[n];return t}function i(t){t=r(t||{}),t.whiteList=t.whiteList||e.whiteList,t.onAttr=t.onAttr||e.onAttr,t.onIgnoreAttr=t.onIgnoreAttr||e.onIgnoreAttr,t.safeAttrValue=t.safeAttrValue||e.safeAttrValue,this.options=t}return i.prototype.process=function(e){if(e||=``,e=e.toString(),!e)return``;var r=this.options,i=r.whiteList,a=r.onAttr,o=r.onIgnoreAttr,s=r.safeAttrValue;return t(e,function(e,t,r,c,l){var u=i[r],d=!1;if(u===!0?d=u:typeof u==`function`?d=u(c):u instanceof RegExp&&(d=u.test(c)),d!==!0&&(d=!1),c=s(r,c),c){var f={position:t,sourcePosition:e,source:l,isWhite:d};if(d){var p=a(r,c,f);return n(p)?r+`:`+c:p}else{var p=o(r,c,f);if(!n(p))return p}}})},o$=i,o$}var l$;function u$(){return l$?XQ.exports:(l$=1,(function(e,t){var n=$Q(),r=c$();function i(e,t){return new r(t).process(e)}for(var a in t=e.exports=i,t.FilterCSS=r,n)t[a]=n[a];typeof window<`u`&&(window.filterCSS=e.exports)})(XQ,XQ.exports),XQ.exports)}var d$,f$;function p$(){return f$?d$:(f$=1,d$={indexOf:function(e,t){var n,r;if(Array.prototype.indexOf)return e.indexOf(t);for(n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},forEach:function(e,t,n){var r,i;if(Array.prototype.forEach)return e.forEach(t,n);for(r=0,i=e.length;r<i;r++)t.call(n,e[r],r,e)},trim:function(e){return String.prototype.trim?e.trim():e.replace(/(^\s*)|(\s*$)/g,``)},spaceIndex:function(e){var t=/\s|\n|\t/.exec(e);return t?t.index:-1}},d$)}var m$;function h$(){if(m$)return YQ;m$=1;var e=u$().FilterCSS,t=u$().getDefaultWhiteList,n=p$();function r(){return{a:[`target`,`href`,`title`],abbr:[`title`],address:[],area:[`shape`,`coords`,`href`,`alt`],article:[],aside:[],audio:[`autoplay`,`controls`,`crossorigin`,`loop`,`muted`,`preload`,`src`],b:[],bdi:[`dir`],bdo:[`dir`],big:[],blockquote:[`cite`],br:[],caption:[],center:[],cite:[],code:[],col:[`align`,`valign`,`span`,`width`],colgroup:[`align`,`valign`,`span`,`width`],dd:[],del:[`datetime`],details:[`open`],div:[],dl:[],dt:[],em:[],figcaption:[],figure:[],font:[`color`,`size`,`face`],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:[`src`,`alt`,`title`,`width`,`height`,`loading`],ins:[`datetime`],kbd:[],li:[],mark:[],nav:[],ol:[],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],summary:[],sup:[],strong:[],strike:[],table:[`width`,`border`,`align`,`valign`],tbody:[`align`,`valign`],td:[`width`,`rowspan`,`colspan`,`align`,`valign`],tfoot:[`align`,`valign`],th:[`width`,`rowspan`,`colspan`,`align`,`valign`],thead:[`align`,`valign`],tr:[`rowspan`,`align`,`valign`],tt:[],u:[],ul:[],video:[`autoplay`,`controls`,`crossorigin`,`loop`,`muted`,`playsinline`,`poster`,`preload`,`src`,`height`,`width`]}}var i=new e;function a(e,t,n){}function o(e,t,n){}function s(e,t,n){}function c(e,t,n){}function l(e){return e.replace(d,`<`).replace(f,`>`)}function u(e,t,r,a){if(r=E(r),t===`href`||t===`src`){if(r=n.trim(r),r===`#`)return`#`;if(!(r.substr(0,7)===`http://`||r.substr(0,8)===`https://`||r.substr(0,7)===`mailto:`||r.substr(0,4)===`tel:`||r.substr(0,11)===`data:image/`||r.substr(0,6)===`ftp://`||r.substr(0,2)===`./`||r.substr(0,3)===`../`||r[0]===`#`||r[0]===`/`))return``}else if(t===`background`){if(v.lastIndex=0,v.test(r))return``}else if(t===`style`){if(y.lastIndex=0,y.test(r)||(b.lastIndex=0,b.test(r)&&(v.lastIndex=0,v.test(r))))return``;a!==!1&&(a||=i,r=a.process(r))}return r=D(r),r}var d=/</g,f=/>/g,p=/"/g,m=/"/g,h=/&#([a-zA-Z0-9]*);?/gim,g=/:?/gim,_=/&newline;?/gim,v=/((j\s*a\s*v\s*a|v\s*b|l\s*i\s*v\s*e)\s*s\s*c\s*r\s*i\s*p\s*t\s*|m\s*o\s*c\s*h\s*a):/gi,y=/e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi,b=/u\s*r\s*l\s*\(.*/gi;function x(e){return e.replace(p,`"`)}function S(e){return e.replace(m,`"`)}function C(e){return e.replace(h,function(e,t){return t[0]===`x`||t[0]===`X`?String.fromCharCode(parseInt(t.substr(1),16)):String.fromCharCode(parseInt(t,10))})}function w(e){return e.replace(g,`:`).replace(_,` `)}function T(e){for(var t=``,r=0,i=e.length;r<i;r++)t+=e.charCodeAt(r)<32?` `:e.charAt(r);return n.trim(t)}function E(e){return e=S(e),e=C(e),e=w(e),e=T(e),e}function D(e){return e=x(e),e=l(e),e}function O(){return``}function ee(e,t){typeof t!=`function`&&(t=function(){});var r=!Array.isArray(e);function i(t){return r?!0:n.indexOf(e,t)!==-1}var a=[],o=!1;return{onIgnoreTag:function(e,n,r){if(i(e))if(r.isClosing){var s=`[/removed]`,c=r.position+s.length;return a.push([o===!1?r.position:o,c]),o=!1,s}else return o||=r.position,`[removed]`;else return t(e,n,r)},remove:function(e){var t=``,r=0;return n.forEach(a,function(n){t+=e.slice(r,n[0]),r=n[1]}),t+=e.slice(r),t}}}function k(e){for(var t=``,n=0;n<e.length;){var r=e.indexOf(`<!--`,n);if(r===-1){t+=e.slice(n);break}t+=e.slice(n,r);var i=e.indexOf(`-->`,r);if(i===-1)break;n=i+3}return t}function te(e){var t=e.split(``);return t=t.filter(function(e){var t=e.charCodeAt(0);return t===127?!1:t<=31?t===10||t===13:!0}),t.join(``)}return YQ.whiteList=r(),YQ.getDefaultWhiteList=r,YQ.onTag=a,YQ.onIgnoreTag=o,YQ.onTagAttr=s,YQ.onIgnoreTagAttr=c,YQ.safeAttrValue=u,YQ.escapeHtml=l,YQ.escapeQuote=x,YQ.unescapeQuote=S,YQ.escapeHtmlEntities=C,YQ.escapeDangerHtml5Entities=w,YQ.clearNonPrintableCharacter=T,YQ.friendlyAttrValue=E,YQ.escapeAttrValue=D,YQ.onIgnoreTagStripAll=O,YQ.StripTagBody=ee,YQ.stripCommentTag=k,YQ.stripBlankChar=te,YQ.attributeWrapSign=`"`,YQ.cssFilter=i,YQ.getDefaultCSSWhiteList=t,YQ}var g$={},_$;function v$(){if(_$)return g$;_$=1;var e=p$();function t(t){var n=e.spaceIndex(t),r=n===-1?t.slice(1,-1):t.slice(1,n+1);return r=e.trim(r).toLowerCase(),r.slice(0,1)===`/`&&(r=r.slice(1)),r.slice(-1)===`/`&&(r=r.slice(0,-1)),r}function n(e){return e.slice(0,2)===`</`}function r(e,r,i){var a=``,o=0,s=!1,c=!1,l=0,u=e.length,d=``,f=``;chariterator:for(l=0;l<u;l++){var p=e.charAt(l);if(s===!1){if(p===`<`){s=l;continue}}else if(c===!1){if(p===`<`){a+=i(e.slice(o,l)),s=l,o=l;continue}if(p===`>`||l===u-1){a+=i(e.slice(o,s)),f=e.slice(s,l+1),d=t(f),a+=r(s,a.length,d,f,n(f)),o=l+1,s=!1;continue}if(p===`"`||p===`'`)for(var m=1,h=e.charAt(l-m);h.trim()===``||h===`=`;){if(h===`=`){c=p;continue chariterator}h=e.charAt(l-++m)}}else if(p===c){c=!1;continue}}return o<u&&(a+=i(e.substr(o))),a}var i=/[^a-zA-Z0-9\\_:.-]/gim;function a(t,n){var r=0,a=0,l=[],d=!1,f=t.length;function p(t,r){if(t=e.trim(t),t=t.replace(i,``).toLowerCase(),!(t.length<1)){var a=n(t,r||``);a&&l.push(a)}}for(var m=0;m<f;m++){var h=t.charAt(m),g,_;if(d===!1&&h===`=`){d=t.slice(r,m),r=m+1,a=t.charAt(r)===`"`||t.charAt(r)===`'`?r:s(t,m+1);continue}if(d!==!1&&m===a){if(_=t.indexOf(h,m+1),_===-1)break;g=e.trim(t.slice(a+1,_)),p(d,g),d=!1,m=_,r=m+1;continue}if(/\s|\n|\t/.test(h))if(t=t.replace(/\s|\n|\t/g,` `),d===!1)if(_=o(t,m),_===-1){g=e.trim(t.slice(r,m)),p(g),d=!1,r=m+1;continue}else{m=_-1;continue}else if(_=c(t,m-1),_===-1){g=e.trim(t.slice(r,m)),g=u(g),p(d,g),d=!1,r=m+1;continue}else continue}return r<t.length&&(d===!1?p(t.slice(r)):p(d,u(e.trim(t.slice(r))))),e.trim(l.join(` `))}function o(e,t){for(;t<e.length;t++){var n=e[t];if(n!==` `)return n===`=`?t:-1}}function s(e,t){for(;t<e.length;t++){var n=e[t];if(n!==` `)return n===`'`||n===`"`?t:-1}}function c(e,t){for(;t>0;t--){var n=e[t];if(n!==` `)return n===`=`?t:-1}}function l(e){return e[0]===`"`&&e[e.length-1]===`"`||e[0]===`'`&&e[e.length-1]===`'`}function u(e){return l(e)?e.substr(1,e.length-2):e}return g$.parseTag=r,g$.parseAttr=a,g$}var y$,b$;function x$(){if(b$)return y$;b$=1;var e=u$().FilterCSS,t=h$(),n=v$(),r=n.parseTag,i=n.parseAttr,a=p$();function o(e){return e==null}function s(e){var t=a.spaceIndex(e);if(t===-1)return{html:``,closing:e[e.length-2]===`/`};e=a.trim(e.slice(t+1,-1));var n=e[e.length-1]===`/`;return n&&(e=a.trim(e.slice(0,-1))),{html:e,closing:n}}function c(e){var t={};for(var n in e)t[n]=e[n];return t}function l(e){var t={};for(var n in e)Array.isArray(e[n])?t[n.toLowerCase()]=e[n].map(function(e){return e.toLowerCase()}):t[n.toLowerCase()]=e[n];return t}function u(n){n=c(n||{}),n.stripIgnoreTag&&(n.onIgnoreTag&&console.error(`Notes: cannot use these two options "stripIgnoreTag" and "onIgnoreTag" at the same time`),n.onIgnoreTag=t.onIgnoreTagStripAll),n.whiteList||n.allowList?n.whiteList=l(n.whiteList||n.allowList):n.whiteList=t.whiteList,this.attributeWrapSign=n.singleQuotedAttributeValue===!0?`'`:t.attributeWrapSign,n.onTag=n.onTag||t.onTag,n.onTagAttr=n.onTagAttr||t.onTagAttr,n.onIgnoreTag=n.onIgnoreTag||t.onIgnoreTag,n.onIgnoreTagAttr=n.onIgnoreTagAttr||t.onIgnoreTagAttr,n.safeAttrValue=n.safeAttrValue||t.safeAttrValue,n.escapeHtml=n.escapeHtml||t.escapeHtml,this.options=n,n.css===!1?this.cssFilter=!1:(n.css=n.css||{},this.cssFilter=new e(n.css))}return u.prototype.process=function(e){if(e||=``,e=e.toString(),!e)return``;var n=this,c=n.options,l=c.whiteList,u=c.onTag,d=c.onIgnoreTag,f=c.onTagAttr,p=c.onIgnoreTagAttr,m=c.safeAttrValue,h=c.escapeHtml,g=n.attributeWrapSign,_=n.cssFilter;c.stripBlankChar&&(e=t.stripBlankChar(e)),c.allowCommentTag||(e=t.stripCommentTag(e));var v=!1;c.stripIgnoreTagBody&&(v=t.StripTagBody(c.stripIgnoreTagBody,d),d=v.onIgnoreTag);var y=r(e,function(e,t,n,r,c){var v={sourcePosition:e,position:t,isClosing:c,isWhite:Object.prototype.hasOwnProperty.call(l,n)},y=u(n,r,v);if(!o(y))return y;if(v.isWhite){if(v.isClosing)return`</`+n+`>`;var b=s(r),x=l[n],S=i(b.html,function(e,t){var r=a.indexOf(x,e)!==-1,i=f(n,e,t,r);return o(i)?r?(t=m(n,e,t,_),t?e+`=`+g+t+g:e):(i=p(n,e,t,r),o(i)?void 0:i):i});return r=`<`+n,S&&(r+=` `+S),b.closing&&(r+=` /`),r+=`>`,r}else return y=d(n,r,v),o(y)?h(r):y},h);return v&&(y=v.remove(y)),y},y$=u,y$}var S$;function C$(){return S$?JQ.exports:(S$=1,(function(e,t){var n=h$(),r=v$(),i=x$();function a(e,t){return new i(t).process(e)}t=e.exports=a,t.filterXSS=a,t.FilterXSS=i,(function(){for(var e in n)t[e]=n[e];for(var i in r)t[i]=r[i]})(),typeof window<`u`&&(window.filterXSS=e.exports);function o(){return typeof self<`u`&&typeof DedicatedWorkerGlobalScope<`u`&&self instanceof DedicatedWorkerGlobalScope}o()&&(self.filterXSS=e.exports)})(JQ,JQ.exports),JQ.exports)}var w$=V(C$()),T$=[];for(let e=0;e<256;++e)T$.push((e+256).toString(16).slice(1));function E$(e,t=0){return(T$[e[t+0]]+T$[e[t+1]]+T$[e[t+2]]+T$[e[t+3]]+`-`+T$[e[t+4]]+T$[e[t+5]]+`-`+T$[e[t+6]]+T$[e[t+7]]+`-`+T$[e[t+8]]+T$[e[t+9]]+`-`+T$[e[t+10]]+T$[e[t+11]]+T$[e[t+12]]+T$[e[t+13]]+T$[e[t+14]]+T$[e[t+15]]).toLowerCase()}var D$,O$=new Uint8Array(16);function k$(){if(!D$){if(typeof crypto>`u`||!crypto.getRandomValues)throw Error(`crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported`);D$=crypto.getRandomValues.bind(crypto)}return D$(O$)}var A$={randomUUID:typeof crypto<`u`&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function j$(e,t,n){e||={};let r=e.random??e.rng?.()??k$();if(r.length<16)throw Error(`Random bytes length must be >= 16`);return r[6]=r[6]&15|64,r[8]=r[8]&63|128,E$(r)}function M$(e,t,n){return A$.randomUUID&&!e?A$.randomUUID():j$(e)}function N$(e,t){var n=LU(e);if(bL){var r=bL(e);t&&(r=J(r).call(r,function(t){return ZL(e,t).enumerable})),n.push.apply(n,r)}return n}function P$(e){for(var t=1;t<arguments.length;t++){var n,r,i=arguments[t]==null?{}:arguments[t];t%2?q(n=N$(Object(i),!0)).call(n,function(t){BH(e,t,i[t])}):gR?kR(e,gR(i)):q(r=N$(Object(i))).call(r,function(t){VU(e,t,ZL(i,t))})}return e}function F$(e){if(!e)return!1;let t=e.idProp??e._idProp;return t?MC(t,e):!1}var I$=/^\/?Date\((-?\d+)/i,L$=/^\d+$/;function R$(e,t){let n;if(e!==void 0){if(e===null)return null;if(!t)return e;if(typeof t!=`string`&&!(t instanceof String))throw Error(`Type must be a string`);switch(t){case`boolean`:case`Boolean`:return!!e;case`number`:case`Number`:return UZ(e)&&!isNaN(Date.parse(e))?M(e).valueOf():Number(e.valueOf());case`string`:case`String`:return String(e);case`Date`:try{return R$(e,`Moment`).toDate()}catch(n){throw n instanceof TypeError?TypeError(`Cannot convert object of type `+eQ(e)+` to type `+t):n}case`Moment`:if(VZ(e))return M(e);if(e instanceof Date)return M(e.valueOf());if(M.isMoment(e))return M(e);if(UZ(e))return n=I$.exec(e),n?M(Number(n[1])):(n=L$.exec(e),M(n?Number(e):e));throw TypeError(`Cannot convert object of type `+eQ(e)+` to type `+t);case`ISODate`:if(VZ(e))return new Date(e);if(e instanceof Date)return e.toISOString();if(M.isMoment(e))return e.toDate().toISOString();if(UZ(e))return n=I$.exec(e),n?new Date(Number(n[1])).toISOString():M(e).format();throw Error(`Cannot convert object of type `+eQ(e)+` to type ISODate`);case`ASPDate`:if(VZ(e))return`/Date(`+e+`)/`;if(e instanceof Date||M.isMoment(e))return`/Date(`+e.valueOf()+`)/`;if(UZ(e)){n=I$.exec(e);let t;return t=n?new Date(Number(n[1])).valueOf():new Date(e).valueOf(),`/Date(`+t+`)/`}else throw Error(`Cannot convert object of type `+eQ(e)+` to type ASPDate`);default:throw Error(`Unknown type ${t}`)}}}function z$(e){var t,n,r,i,a,o;let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{start:`Date`,end:`Date`},c=e._idProp,l=new kC({fieldId:c}),u=nU(t=Yu(e)).call(t,e=>{var t;return wU(t=LU(e)).call(t,(t,n)=>(t[n]=R$(e[n],s[n]),t),{})}).to(l);return u.all().start(),{add:function(){return e.getDataSet().add(...arguments)},remove:function(){return e.getDataSet().remove(...arguments)},update:function(){return e.getDataSet().update(...arguments)},updateOnly:function(){return e.getDataSet().updateOnly(...arguments)},clear:function(){return e.getDataSet().clear(...arguments)},forEach:K(n=q(l)).call(n,l),get:K(r=l.get).call(r,l),getIds:K(i=l.getIds).call(i,l),off:K(a=l.off).call(a,l),on:K(o=l.on).call(o,l),get length(){return l.length},idProp:c,type:s,rawDS:e,coercedDS:l,dispose:()=>u.stop()}}var B$=e=>{let t=new w$.FilterXSS(e);return e=>typeof e==`string`?t.process(e):e},V$=e=>e,H$=B$(),Y=P$(P$({},qQ),{},{convert:R$,setupXSSProtection:e=>{e&&(e.disabled===!0?(H$=V$,console.warn(`You disabled XSS protection for vis-Timeline. I sure hope you know what you're doing!`)):e.filterOptions&&(H$=B$(e.filterOptions)))}});VU(Y,`xss`,{get:function(){return H$}});var U$={},W$,G$;function K$(){if(G$)return W$;G$=1;var e=IA(),t=H(),n=U(),r=AF(),i=aq().trim,a=nq(),o=n(``.charAt),s=e.parseFloat,c=e.Symbol,l=c&&c.iterator;return W$=1/s(a+`-0`)!=-1/0||l&&!t(function(){s(Object(l))})?function(e){var t=i(r(e)),n=s(t);return n===0&&o(t,0)===`-`?-0:n}:s,W$}var q$;function J$(){if(q$)return U$;q$=1;var e=W(),t=K$();return e({global:!0,forced:parseFloat!==t},{parseFloat:t}),U$}var Y$,X$;function Z$(){return X$?Y$:(X$=1,J$(),Y$=Mj().parseFloat,Y$)}var Q$,$$;function e1(){return $$?Q$:($$=1,Q$=Z$(),Q$)}var t1,n1;function r1(){return n1?t1:(n1=1,t1=e1(),t1)}var i1=V(r1()),a1=class{constructor(){this.options=null,this.props=null}setOptions(e){e&&Y.extend(this.options,e)}redraw(){return!1}destroy(){}_isResized(){let e=this.props._previousWidth!==this.props.width||this.props._previousHeight!==this.props.height;return this.props._previousWidth=this.props.width,this.props._previousHeight=this.props.height,e}},o1={},s1;function c1(){return s1?o1:(s1=1,W()({target:`String`,proto:!0},{repeat:fJ()}),o1)}var l1,u1;function d1(){return u1?l1:(u1=1,c1(),l1=VN()(`String`,`repeat`),l1)}var f1,p1;function m1(){if(p1)return f1;p1=1;var e=Rj(),t=d1(),n=String.prototype;return f1=function(r){var i=r.repeat;return typeof r==`string`||r===n||e(n,r)&&i===n.repeat?t:i},f1}var h1,g1;function _1(){return g1?h1:(g1=1,h1=m1(),h1)}var v1,y1;function b1(){return y1?v1:(y1=1,v1=_1(),v1)}var x1=V(b1()),S1={},C1,w1;function T1(){if(w1)return C1;w1=1;var e=NN(),t=Math.floor,n=function(r,i){var a=r.length;if(a<8)for(var o=1,s,c;o<a;){for(c=o,s=r[o];c&&i(r[c-1],s)>0;)r[c]=r[--c];c!==o++&&(r[c]=s)}else for(var l=t(a/2),u=n(e(r,0,l),i),d=n(e(r,l),i),f=u.length,p=d.length,m=0,h=0;m<f||h<p;)r[m+h]=m<f&&h<p?i(u[m],d[h])<=0?u[m++]:d[h++]:m<f?u[m++]:d[h++];return r};return C1=n,C1}var E1,D1;function O1(){if(D1)return E1;D1=1;var e=Vj().match(/firefox\/(\d+)/i);return E1=!!e&&+e[1],E1}var k1,A1;function j1(){if(A1)return k1;A1=1;var e=Vj();return k1=/MSIE|Trident/.test(e),k1}var M1,N1;function P1(){if(N1)return M1;N1=1;var e=Vj().match(/AppleWebKit\/(\d+)\./);return M1=!!e&&+e[1],M1}var F1;function I1(){if(F1)return S1;F1=1;var e=W(),t=U(),n=aM(),r=EM(),i=UP(),a=nG(),o=AF(),s=H(),c=T1(),l=sF(),u=O1(),d=j1(),f=Wj(),p=P1(),m=[],h=t(m.sort),g=t(m.push),_=s(function(){m.sort(void 0)}),v=s(function(){m.sort(null)}),y=l(`sort`),b=!s(function(){if(f)return f<70;if(!(u&&u>3)){if(d)return!0;if(p)return p<603;var e=``,t,n,r,i;for(t=65;t<76;t++){switch(n=String.fromCharCode(t),t){case 66:case 69:case 70:case 72:r=3;break;case 68:case 71:r=4;break;default:r=2}for(i=0;i<47;i++)m.push({k:n+i,v:r})}for(m.sort(function(e,t){return t.v-e.v}),i=0;i<m.length;i++)n=m[i].k.charAt(0),e.charAt(e.length-1)!==n&&(e+=n);return e!==`DGBEFHACIJK`}}),x=_||!v||!y||!b,S=function(e){return function(t,n){return n===void 0?-1:t===void 0?1:e===void 0?o(t)>o(n)?1:-1:+e(t,n)||0}};return e({target:`Array`,proto:!0,forced:x},{sort:function(e){e!==void 0&&n(e);var t=r(this);if(b)return e===void 0?h(t):h(t,e);var o=[],s=i(t),l,u;for(u=0;u<s;u++)u in t&&g(o,t[u]);for(c(o,S(e)),l=i(o),u=0;u<l;)t[u]=o[u++];for(;u<s;)a(t,u++);return t}}),S1}var L1,R1;function z1(){return R1?L1:(R1=1,I1(),L1=VN()(`Array`,`sort`),L1)}var B1,V1;function H1(){if(V1)return B1;V1=1;var e=Rj(),t=z1(),n=Array.prototype;return B1=function(r){var i=r.sort;return r===n||e(n,r)&&i===n.sort?t:i},B1}var U1,W1;function G1(){return W1?U1:(W1=1,U1=H1(),U1)}var K1,q1;function J1(){return q1?K1:(q1=1,K1=G1(),K1)}var Y1=V(J1());function X1(e,t,n){if(n&&!G(n))return X1(e,t,[n]);if(t.hiddenDates=[],n&&G(n)==1){var r;for(let r=0;r<n.length;r++)if(x1(n[r])===void 0){let i={};i.start=e(n[r].start).toDate().valueOf(),i.end=e(n[r].end).toDate().valueOf(),t.hiddenDates.push(i)}Y1(r=t.hiddenDates).call(r,(e,t)=>e.start-t.start)}}function Z1(e,t,n){if(n&&!G(n))return Z1(e,t,[n]);if(n&&t.domProps.centerContainer.width!==void 0){X1(e,t,n);let r=e(t.range.start),i=e(t.range.end),a=(t.range.end-t.range.start)/t.domProps.centerContainer.width;for(let o=0;o<n.length;o++)if(x1(n[o])!==void 0){let s=e(n[o].start),c=e(n[o].end);if(s._d==`Invalid Date`)throw Error(`Supplied start date is not valid: ${n[o].start}`);if(c._d==`Invalid Date`)throw Error(`Supplied end date is not valid: ${n[o].end}`);if(c-s>=4*a){let e=0,a=i.clone();switch(x1(n[o])){case`daily`:s.day()!=c.day()&&(e=1),s=s.dayOfYear(r.dayOfYear()).year(r.year()).subtract(7,`days`),c=c.dayOfYear(r.dayOfYear()).year(r.year()).subtract(7-e,`days`),a.add(1,`weeks`);break;case`weekly`:{let e=c.diff(s,`days`),t=s.day();s=s.date(r.date()).month(r.month()).year(r.year()),c=s.clone(),s=s.day(t).subtract(1,`weeks`),c=c.day(t).add(e,`days`).subtract(1,`weeks`),a.add(1,`weeks`);break}case`monthly`:s.month()!=c.month()&&(e=1),s=s.month(r.month()).year(r.year()).subtract(1,`months`),c=c.month(r.month()).year(r.year()).subtract(1,`months`).add(e,`months`),a.add(1,`months`);break;case`yearly`:s.year()!=c.year()&&(e=1),s=s.year(r.year()).subtract(1,`years`),c=c.year(r.year()).subtract(1,`years`).add(e,`years`),a.add(1,`years`);break;default:console.log(`Wrong repeat format, allowed are: daily, weekly, monthly, yearly. Given:`,x1(n[o]));return}for(;s<a;)switch(t.hiddenDates.push({start:s.valueOf(),end:c.valueOf()}),x1(n[o])){case`daily`:s=s.add(1,`days`),c=c.add(1,`days`);break;case`weekly`:s=s.add(1,`weeks`),c=c.add(1,`weeks`);break;case`monthly`:s=s.add(1,`months`),c=c.add(1,`months`);break;case`yearly`:s=s.add(1,`y`),c=c.add(1,`y`);break;default:console.log(`Wrong repeat format, allowed are: daily, weekly, monthly, yearly. Given:`,x1(n[o]));return}t.hiddenDates.push({start:s.valueOf(),end:c.valueOf()})}}Q1(t);let o=c0(t.range.start,t.hiddenDates),s=c0(t.range.end,t.hiddenDates),c=t.range.start,l=t.range.end;o.hidden==1&&(c=t.range.startToFront==1?o.startDate-1:o.endDate+1),s.hidden==1&&(l=t.range.endToFront==1?s.startDate-1:s.endDate+1),(o.hidden==1||s.hidden==1)&&t.range._applyRange(c,l)}}function Q1(e){var t;let n=e.hiddenDates,r=[];for(var i=0;i<n.length;i++)for(let e=0;e<n.length;e++)i!=e&&n[e].remove!=1&&n[i].remove!=1&&(n[e].start>=n[i].start&&n[e].end<=n[i].end?n[e].remove=!0:n[e].start>=n[i].start&&n[e].start<=n[i].end?(n[i].end=n[e].end,n[e].remove=!0):n[e].end>=n[i].start&&n[e].end<=n[i].end&&(n[i].start=n[e].start,n[e].remove=!0));for(i=0;i<n.length;i++)n[i].remove!==!0&&r.push(n[i]);e.hiddenDates=r,Y1(t=e.hiddenDates).call(t,(e,t)=>e.start-t.start)}function $1(e,t,n){let r=!1,i=t.current.valueOf();for(let e=0;e<t.hiddenDates.length;e++){let n=t.hiddenDates[e].start;var a=t.hiddenDates[e].end;if(i>=n&&i<a){r=!0;break}}if(r==1&&i<t._end.valueOf()&&i!=n){let r=e(n),i=e(a);r.year()==i.year()?r.month()==i.month()?r.dayOfYear()!=i.dayOfYear()&&(t.switchedDay=!0):t.switchedMonth=!0:t.switchedYear=!0,t.current=i}}function e0(e,t,n){let r;if(e.body.hiddenDates.length==0)return r=e.range.conversion(n),(t.valueOf()-r.offset)*r.scale;{let i=c0(t,e.body.hiddenDates);i.hidden==1&&(t=i.startDate);let a=n0(e.body.hiddenDates,e.range.start,e.range.end);if(t<e.range.start){r=e.range.conversion(n,a);let i=r0(e.body.hiddenDates,t,r.offset);return t=e.options.moment(t).toDate().valueOf(),t+=i,-(r.offset-t.valueOf())*r.scale}else if(t>e.range.end){let i={start:e.range.start,end:t};return t=i0(e.options.moment,e.body.hiddenDates,i,t),r=e.range.conversion(n,a),(t.valueOf()-r.offset)*r.scale}else return t=i0(e.options.moment,e.body.hiddenDates,e.range,t),r=e.range.conversion(n,a),(t.valueOf()-r.offset)*r.scale}}function t0(e,t,n){if(e.body.hiddenDates.length==0){let r=e.range.conversion(n);return new Date(t/r.scale+r.offset)}else{let r=n0(e.body.hiddenDates,e.range.start,e.range.end),i=(e.range.end-e.range.start-r)*t/n,a=o0(e.body.hiddenDates,e.range,i);return new Date(a+i+e.range.start)}}function n0(e,t,n){let r=0;for(let i=0;i<e.length;i++){let a=e[i].start,o=e[i].end;a>=t&&o<n&&(r+=o-a)}return r}function r0(e,t,n){let r=0;for(let i=0;i<e.length;i++){let a=e[i].start,o=e[i].end;a>=t&&o<=n&&(r+=o-a)}return r}function i0(e,t,n,r){return r=e(r).toDate().valueOf(),r-=a0(e,t,n,r),r}function a0(e,t,n,r){let i=0;r=e(r).toDate().valueOf();for(let e=0;e<t.length;e++){let a=t[e].start,o=t[e].end;a>=n.start&&o<n.end&&r>=o&&(i+=o-a)}return i}function o0(e,t,n){let r=0,i=0,a=t.start;for(let o=0;o<e.length;o++){let s=e[o].start,c=e[o].end;if(s>=t.start&&c<t.end){if(i+=s-a,a=c,i>=n)break;r+=c-s}}return r}function s0(e,t,n,r){let i=c0(t,e);return i.hidden==1?n<0?r==1?i.startDate-(i.endDate-t)-1:i.startDate-1:r==1?i.endDate+(t-i.startDate)+1:i.endDate+1:t}function c0(e,t){for(let i=0;i<t.length;i++){var n=t[i].start,r=t[i].end;if(e>=n&&e<r)return{hidden:!0,startDate:n,endDate:r}}return{hidden:!1,startDate:n,endDate:r}}var l0=class e extends a1{constructor(e,t){var n,r,i,a,o,s,c;super();let l=TF().hours(0).minutes(0).seconds(0).milliseconds(0),u=l.clone().add(-3,`days`).valueOf(),d=l.clone().add(3,`days`).valueOf();this.millisecondsPerPixelCache=void 0,t===void 0?(this.start=u,this.end=d):(this.start=t.start||u,this.end=t.end||d),this.rolling=!1,this.body=e,this.deltaDifference=0,this.scaleOffset=0,this.startToFront=!1,this.endToFront=!0,this.defaultOptions={rtl:!1,start:null,end:null,moment:TF,direction:`horizontal`,moveable:!0,zoomable:!0,min:null,max:null,zoomMin:10,zoomMax:1e3*60*60*24*365*1e4,rollingMode:{follow:!1,offset:.5}},this.options=Y.extend({},this.defaultOptions),this.props={touch:{}},this.animationTimer=null,this.body.emitter.on(`panstart`,K(n=this._onDragStart).call(n,this)),this.body.emitter.on(`panmove`,K(r=this._onDrag).call(r,this)),this.body.emitter.on(`panend`,K(i=this._onDragEnd).call(i,this)),this.body.emitter.on(`mousewheel`,K(a=this._onMouseWheel).call(a,this)),this.body.emitter.on(`touch`,K(o=this._onTouch).call(o,this)),this.body.emitter.on(`pinch`,K(s=this._onPinch).call(s,this)),this.body.dom.rollingModeBtn.addEventListener(`click`,K(c=this.startRolling).call(c,this)),this.setOptions(t)}setOptions(e){e&&(Y.selectiveExtend([`animation`,`direction`,`min`,`max`,`zoomMin`,`zoomMax`,`moveable`,`zoomable`,`moment`,`activate`,`hiddenDates`,`zoomKey`,`zoomFriction`,`rtl`,`showCurrentTime`,`rollingMode`,`horizontalScroll`,`horizontalScrollKey`,`horizontalScrollInvert`,`verticalScroll`],this.options,e),e.rollingMode&&e.rollingMode.follow&&this.startRolling(),(`start`in e||`end`in e)&&this.setRange(e.start,e.end))}startRolling(){let e=this;function t(){e.stopRolling(),e.rolling=!0;let n=e.end-e.start,r=Y.convert(new Date,`Date`).valueOf(),i=e.options.rollingMode&&e.options.rollingMode.offset||.5,a=r-n*i,o=r+n*(1-i);e.setRange(a,o,{animation:!1}),n=1/e.conversion(e.body.domProps.center.width).scale/10,n<30&&(n=30),n>1e3&&(n=1e3),e.body.dom.rollingModeBtn.style.visibility=`hidden`,e.currentTimeTimer=wP(t,n)}t()}stopRolling(){this.currentTimeTimer!==void 0&&(clearTimeout(this.currentTimeTimer),this.rolling=!1,this.body.dom.rollingModeBtn.style.visibility=`visible`)}setRange(e,t,n,r,i){n||={},n.byUser!==!0&&(n.byUser=!1);let a=this,o=e==null?null:Y.convert(e,`Date`).valueOf(),s=t==null?null:Y.convert(t,`Date`).valueOf();if(this._cancelAnimation(),this.millisecondsPerPixelCache=void 0,n.animation){let e=this.start,t=this.end,u=typeof n.animation==`object`&&`duration`in n.animation?n.animation.duration:500,d=typeof n.animation==`object`&&`easingFunction`in n.animation?n.animation.easingFunction:`easeInOutQuad`,f=Y.easingFunctions[d];if(!f){var c;throw Error(IK(c=`Unknown easing function ${AJ(d)}. Choose from: `).call(c,LU(Y.easingFunctions).join(`, `)))}let p=NW(),m=!1,h=()=>{if(!a.props.touch.dragging){let c=NW()-p,d=f(c/u),g=c>u,_=g||o===null?o:e+(o-e)*d,v=g||s===null?s:t+(s-t)*d;l=a._applyRange(_,v),Z1(a.options.moment,a.body,a.options.hiddenDates),m||=l;let y={start:new Date(a.start),end:new Date(a.end),byUser:n.byUser,event:n.event};if(i&&i(d,l,g),l&&a.body.emitter.emit(`rangechange`,y),g){if(m&&(a.body.emitter.emit(`rangechanged`,y),r))return r()}else a.animationTimer=wP(h,20)}};return h()}else{var l=this._applyRange(o,s);if(Z1(this.options.moment,this.body,this.options.hiddenDates),l){let e={start:new Date(this.start),end:new Date(this.end),byUser:n.byUser,event:n.event};if(this.body.emitter.emit(`rangechange`,e),clearTimeout(a.timeoutID),a.timeoutID=wP(()=>{a.body.emitter.emit(`rangechanged`,e)},200),r)return r()}}}getMillisecondsPerPixel(){return this.millisecondsPerPixelCache===void 0&&(this.millisecondsPerPixelCache=(this.end-this.start)/this.body.dom.center.clientWidth),this.millisecondsPerPixelCache}_cancelAnimation(){this.animationTimer&&=(clearTimeout(this.animationTimer),null)}_applyRange(e,t){let n=e==null?this.start:Y.convert(e,`Date`).valueOf(),r=t==null?this.end:Y.convert(t,`Date`).valueOf(),i=this.options.max==null?null:Y.convert(this.options.max,`Date`).valueOf(),a=this.options.min==null?null:Y.convert(this.options.min,`Date`).valueOf(),o;if(isNaN(n)||n===null)throw Error(`Invalid start "${e}"`);if(isNaN(r)||r===null)throw Error(`Invalid end "${t}"`);if(r<n&&(r=n),a!==null&&n<a&&(o=a-n,n+=o,r+=o,i!=null&&r>i&&(r=i)),i!==null&&r>i&&(o=r-i,n-=o,r-=o,a!=null&&n<a&&(n=a)),this.options.zoomMin!==null){let e=i1(this.options.zoomMin);e<0&&(e=0),r-n<e&&(this.end-this.start===e&&n>=this.start-.5&&r<=this.end?(n=this.start,r=this.end):(o=e-(r-n),n-=o/2,r+=o/2))}if(this.options.zoomMax!==null){let e=i1(this.options.zoomMax);e<0&&(e=0),r-n>e&&(this.end-this.start===e&&n<this.start&&r>this.end?(n=this.start,r=this.end):(o=r-n-e,n+=o/2,r-=o/2))}let s=this.start!=n||this.end!=r;return!(n>=this.start&&n<=this.end||r>=this.start&&r<=this.end)&&!(this.start>=n&&this.start<=r||this.end>=n&&this.end<=r)&&this.body.emitter.emit(`checkRangedItems`),this.start=n,this.end=r,s}getRange(){return{start:this.start,end:this.end}}conversion(t,n){return e.conversion(this.start,this.end,t,n)}static conversion(e,t,n,r){return r===void 0&&(r=0),n!=0&&t-e!=0?{offset:e,scale:n/(t-e-r)}:{offset:0,scale:1}}_onDragStart(e){this.deltaDifference=0,this.previousDelta=0,this.options.moveable&&this._isInsideRange(e)&&this.props.touch.allowDragging&&(this.stopRolling(),this.props.touch.start=this.start,this.props.touch.end=this.end,this.props.touch.dragging=!0,this.body.dom.root&&(this.body.dom.root.style.cursor=`move`))}_onDrag(e){if(!e||!this.props.touch.dragging||!this.options.moveable||!this.props.touch.allowDragging)return;let t=this.options.direction;u0(t);let n=t==`horizontal`?e.deltaX:e.deltaY;n-=this.deltaDifference;let r=this.props.touch.end-this.props.touch.start,i=n0(this.body.hiddenDates,this.start,this.end);r-=i;let a=t==`horizontal`?this.body.domProps.center.width:this.body.domProps.center.height,o;o=this.options.rtl?n/a*r:-n/a*r;let s=this.props.touch.start+o,c=this.props.touch.end+o,l=s0(this.body.hiddenDates,s,this.previousDelta-n,!0),u=s0(this.body.hiddenDates,c,this.previousDelta-n,!0);if(l!=s||u!=c){this.deltaDifference+=n,this.props.touch.start=l,this.props.touch.end=u,this._onDrag(e);return}this.previousDelta=n,this._applyRange(s,c);let d=new Date(this.start),f=new Date(this.end);this.body.emitter.emit(`rangechange`,{start:d,end:f,byUser:!0,event:e}),this.body.emitter.emit(`panmove`)}_onDragEnd(e){this.props.touch.dragging&&this.options.moveable&&this.props.touch.allowDragging&&(this.props.touch.dragging=!1,this.body.dom.root&&(this.body.dom.root.style.cursor=`auto`),this.body.emitter.emit(`rangechanged`,{start:new Date(this.start),end:new Date(this.end),byUser:!0,event:e}))}_onMouseWheel(e){let t=0;if(e.wheelDelta?t=e.wheelDelta/120:e.detail?t=-e.detail/3:e.deltaY&&(t=-e.deltaY/3),!(this.options.zoomKey&&!e[this.options.zoomKey]&&this.options.zoomable||!this.options.zoomable&&this.options.moveable)&&this.options.zoomable&&this.options.moveable&&this._isInsideRange(e)&&t){let n=this.options.zoomFriction||5,r;r=t<0?1-t/n:1/(1+t/n);let i;if(this.rolling){let e=this.options.rollingMode&&this.options.rollingMode.offset||.5;i=this.start+(this.end-this.start)*e}else{let t=this.getPointer({x:e.clientX,y:e.clientY},this.body.dom.center);i=this._pointerToDate(t)}this.zoom(r,i,t,e),e.preventDefault()}}_onTouch(e){this.props.touch.start=this.start,this.props.touch.end=this.end,this.props.touch.allowDragging=!0,this.props.touch.center=null,this.props.touch.centerDate=null,this.scaleOffset=0,this.deltaDifference=0,Y.preventDefault(e)}_onPinch(e){if(!(this.options.zoomable&&this.options.moveable))return;Y.preventDefault(e),this.props.touch.allowDragging=!1,this.props.touch.center||(this.props.touch.center=this.getPointer(e.center,this.body.dom.center),this.props.touch.centerDate=this._pointerToDate(this.props.touch.center)),this.stopRolling();let t=1/(e.scale+this.scaleOffset),n=this.props.touch.centerDate,r=n0(this.body.hiddenDates,this.start,this.end),i=a0(this.options.moment,this.body.hiddenDates,this,n),a=r-i,o=n-i+(this.props.touch.start-(n-i))*t,s=n+a+(this.props.touch.end-(n+a))*t;this.startToFront=1-t<=0,this.endToFront=t-1<=0;let c=s0(this.body.hiddenDates,o,1-t,!0),l=s0(this.body.hiddenDates,s,t-1,!0);(c!=o||l!=s)&&(this.props.touch.start=c,this.props.touch.end=l,this.scaleOffset=1-e.scale,o=c,s=l);let u={animation:!1,byUser:!0,event:e};this.setRange(o,s,u),this.startToFront=!1,this.endToFront=!0}_isInsideRange(e){let t=e.center?e.center.x:e.clientX,n=this.body.dom.centerContainer.getBoundingClientRect(),r=this.options.rtl?t-n.left:n.right-t,i=this.body.util.toTime(r);return i>=this.start&&i<=this.end}_pointerToDate(e){let t,n=this.options.direction;if(u0(n),n==`horizontal`)return this.body.util.toTime(e.x).valueOf();{let n=this.body.domProps.center.height;return t=this.conversion(n),e.y/t.scale+t.offset}}getPointer(e,t){let n=t.getBoundingClientRect();return this.options.rtl?{x:n.right-e.x,y:e.y-n.top}:{x:e.x-n.left,y:e.y-n.top}}zoom(e,t,n,r){t??=(this.start+this.end)/2;let i=n0(this.body.hiddenDates,this.start,this.end),a=a0(this.options.moment,this.body.hiddenDates,this,t),o=i-a,s=t-a+(this.start-(t-a))*e,c=t+o+(this.end-(t+o))*e;this.startToFront=!(n>0),this.endToFront=!(-n>0);let l=s0(this.body.hiddenDates,s,n,!0),u=s0(this.body.hiddenDates,c,-n,!0);(l!=s||u!=c)&&(s=l,c=u);let d={animation:!1,byUser:!0,event:r};this.setRange(s,c,d),this.startToFront=!1,this.endToFront=!0}move(e){let t=this.end-this.start,n=this.start+t*e,r=this.end+t*e;this.start=n,this.end=r}moveTo(e){let t=(this.start+this.end)/2-e,n=this.start-t,r=this.end-t;this.setRange(n,r,{animation:!1,byUser:!0,event:null})}destroy(){this.stopRolling()}};function u0(e){if(e!=`horizontal`&&e!=`vertical`)throw TypeError(`Unknown direction "${e}". Choose "horizontal" or "vertical".`)}var d0={},f0;function p0(){if(f0)return d0;f0=1;var e=W(),t=iF().some;return e({target:`Array`,proto:!0,forced:!sF()(`some`)},{some:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}}),d0}var m0,h0;function g0(){return h0?m0:(h0=1,p0(),m0=VN()(`Array`,`some`),m0)}var _0,v0;function y0(){if(v0)return _0;v0=1;var e=Rj(),t=g0(),n=Array.prototype;return _0=function(r){var i=r.some;return r===n||e(n,r)&&i===n.some?t:i},_0}var b0,x0;function S0(){return x0?b0:(x0=1,b0=y0(),b0)}var C0,w0;function T0(){return w0?C0:(w0=1,C0=S0(),C0)}var E0=V(T0()),D0,O0;function k0(){return O0?D0:(O0=1,_P(),D0=Mj().setInterval,D0)}var A0,j0;function M0(){return j0?A0:(j0=1,A0=k0(),A0)}var N0=V(M0()),P0=null;function F0(e,t){var n=t||{preventDefault:!1};if(e.Manager){var r=e,i=function(e,t){var i=Object.create(n);return t&&r.assign(i,t),F0(new r(e,i),i)};return r.assign(i,r),i.Manager=function(e,t){var i=Object.create(n);return t&&r.assign(i,t),F0(new r.Manager(e,i),i)},i}var a=Object.create(e),o=e.element;o.hammer||=[],o.hammer.push(a),e.on(`hammer.input`,function(e){(n.preventDefault===!0||n.preventDefault===e.pointerType)&&e.preventDefault(),e.isFirst&&(P0=e.target)}),a._handlers={},a.on=function(t,n){return s(t).forEach(function(t){var r=a._handlers[t];r||(a._handlers[t]=r=[],e.on(t,c)),r.push(n)}),a},a.off=function(t,n){return s(t).forEach(function(t){var r=a._handlers[t];r&&(r=n?r.filter(function(e){return e!==n}):[],r.length>0?a._handlers[t]=r:(e.off(t,c),delete a._handlers[t]))}),a},a.emit=function(t,n){P0=n.target,e.emit(t,n)},a.destroy=function(){var t=e.element.hammer,n=t.indexOf(a);n!==-1&&t.splice(n,1),t.length||delete e.element.hammer,a._handlers={},e.destroy()};function s(e){return e.match(/[^ ]+/g)}function c(e){if(e.type!==`hammer.input`){if(e.srcEvent._handled||(e.srcEvent._handled={}),e.srcEvent._handled[e.type])return;e.srcEvent._handled[e.type]=!0}var t=!1;e.stopPropagation=function(){t=!0};var n=e.srcEvent.stopPropagation.bind(e.srcEvent);typeof n==`function`&&(e.srcEvent.stopPropagation=function(){n(),e.stopPropagation()}),e.firstTarget=P0;for(var r=P0.isConnected?P0:e.target;r&&!t;){var i=r.hammer;if(i){for(var a,o=0;o<i.length;o++)if(a=i[o]._handlers[e.type],a)for(var s=0;s<a.length&&!t;s++)a[s](e)}r=r.parentNode}}return a}function I0(){let e=()=>{};return{on:e,off:e,destroy:e,emit:e,get(){return{set:e}}}}var L0=typeof window<`u`?F0(window.Hammer||xZ,{preventDefault:`mouse`}):function(){return I0()};function R0(e,t){t.inputHandler=function(e){e.isFirst&&t(e)},e.on(`hammer.input`,t.inputHandler)}function z0(e,t){return t.inputHandler=function(e){e.isFinal&&t(e)},e.on(`hammer.input`,t.inputHandler)}function B0(e){return e.getTouchAction=function(){return[`pan-y`]},e}var V0=class e{constructor(t,n,r,i,a){this.moment=a&&a.moment||TF,this.options=a||{},this.current=this.moment(),this._start=this.moment(),this._end=this.moment(),this.autoScale=!0,this.scale=`day`,this.step=1,this.setRange(t,n,r),this.switchedDay=!1,this.switchedMonth=!1,this.switchedYear=!1,G(i)?this.hiddenDates=i:i==null?this.hiddenDates=[]:this.hiddenDates=[i],this.format=e.FORMAT}setMoment(e){this.moment=e,this.current=this.moment(this.current.valueOf()),this._start=this.moment(this._start.valueOf()),this._end=this.moment(this._end.valueOf())}setFormat(t){let n=Y.deepExtend({},e.FORMAT);this.format=Y.deepExtend(n,t)}setRange(e,t,n){if(!(e instanceof Date)||!(t instanceof Date))throw`No legal start or end date in method setRange`;this._start=e==null?NW():this.moment(e.valueOf()),this._end=t==null?NW():this.moment(t.valueOf()),this.autoScale&&this.setMinimumStep(n)}start(){this.current=this._start.clone(),this.roundToMinor()}roundToMinor(){switch(this.scale==`week`&&this.current.weekday(0),this.scale){case`year`:this.current=this.current.year(this.step*Math.floor(this.current.year()/this.step)).month(0);case`month`:this.current=this.current.date(1);case`week`:case`day`:case`weekday`:this.current=this.current.hours(0);case`hour`:this.current=this.current.minutes(0);case`minute`:this.current=this.current.seconds(0);case`second`:this.current=this.current.milliseconds(0)}if(this.step!=1){let e=this.current.clone();switch(this.scale){case`millisecond`:this.current=this.current.subtract(this.current.milliseconds()%this.step,`milliseconds`);break;case`second`:this.current=this.current.subtract(this.current.seconds()%this.step,`seconds`);break;case`minute`:this.current=this.current.subtract(this.current.minutes()%this.step,`minutes`);break;case`hour`:this.current=this.current.subtract(this.current.hours()%this.step,`hours`);break;case`weekday`:case`day`:this.current=this.current.subtract((this.current.date()-1)%this.step,`day`);break;case`week`:this.current=this.current.subtract(this.current.week()%this.step,`week`);break;case`month`:this.current=this.current.subtract(this.current.month()%this.step,`month`);break;case`year`:this.current=this.current.subtract(this.current.year()%this.step,`year`);break}e.isSame(this.current)||(this.current=this.moment(s0(this.hiddenDates,this.current.valueOf(),-1,!0)))}}hasNext(){return this.current.valueOf()<=this._end.valueOf()}next(){let e=this.current.valueOf();switch(this.scale){case`millisecond`:this.current=this.current.add(this.step,`millisecond`);break;case`second`:this.current=this.current.add(this.step,`second`);break;case`minute`:this.current=this.current.add(this.step,`minute`);break;case`hour`:this.current=this.current.add(this.step,`hour`),this.current.month()<6?this.current=this.current.subtract(this.current.hours()%this.step,`hour`):this.current.hours()%this.step!==0&&(this.current=this.current.add(this.step-this.current.hours()%this.step,`hour`));break;case`weekday`:case`day`:this.current=this.current.add(this.step,`day`);break;case`week`:if(this.current.weekday()!==0)this.current=this.current.weekday(0).add(this.step,`week`);else if(this.options.showMajorLabels===!1)this.current=this.current.add(this.step,`week`);else{let e=this.current.clone();e.add(1,`week`),e.isSame(this.current,`month`)?this.current=this.current.add(this.step,`week`):this.current=this.current.add(this.step,`week`).date(1)}break;case`month`:this.current=this.current.add(this.step,`month`);break;case`year`:this.current=this.current.add(this.step,`year`);break}if(this.step!=1)switch(this.scale){case`millisecond`:this.current.milliseconds()>0&&this.current.milliseconds()<this.step&&(this.current=this.current.milliseconds(0));break;case`second`:this.current.seconds()>0&&this.current.seconds()<this.step&&(this.current=this.current.seconds(0));break;case`minute`:this.current.minutes()>0&&this.current.minutes()<this.step&&(this.current=this.current.minutes(0));break;case`hour`:this.current.hours()>0&&this.current.hours()<this.step&&(this.current=this.current.hours(0));break;case`weekday`:case`day`:this.current.date()<this.step+1&&(this.current=this.current.date(1));break;case`week`:this.current.week()<this.step&&(this.current=this.current.week(1));break;case`month`:this.current.month()<this.step&&(this.current=this.current.month(0));break}this.current.valueOf()==e&&(this.current=this._end.clone()),this.switchedDay=!1,this.switchedMonth=!1,this.switchedYear=!1,$1(this.moment,this,e)}getCurrent(){return this.current.clone()}setScale(e){e&&typeof e.scale==`string`&&(this.scale=e.scale,this.step=e.step>0?e.step:1,this.autoScale=!1)}setAutoScale(e){this.autoScale=e}setMinimumStep(e){if(e==null)return;let t=1e3*60*60*24*30*12,n=1e3*60*60*24*30,r=1e3*60*60*24,i=1e3*60*60,a=1e3*60,o=1e3;t*1e3>e&&(this.scale=`year`,this.step=1e3),t*500>e&&(this.scale=`year`,this.step=500),t*100>e&&(this.scale=`year`,this.step=100),t*50>e&&(this.scale=`year`,this.step=50),t*10>e&&(this.scale=`year`,this.step=10),t*5>e&&(this.scale=`year`,this.step=5),t>e&&(this.scale=`year`,this.step=1),n*3>e&&(this.scale=`month`,this.step=3),n>e&&(this.scale=`month`,this.step=1),r*7>e&&this.options.showWeekScale&&(this.scale=`week`,this.step=1),r*2>e&&(this.scale=`day`,this.step=2),r>e&&(this.scale=`day`,this.step=1),r/2>e&&(this.scale=`weekday`,this.step=1),i*4>e&&(this.scale=`hour`,this.step=4),i>e&&(this.scale=`hour`,this.step=1),a*15>e&&(this.scale=`minute`,this.step=15),a*10>e&&(this.scale=`minute`,this.step=10),a*5>e&&(this.scale=`minute`,this.step=5),a>e&&(this.scale=`minute`,this.step=1),o*15>e&&(this.scale=`second`,this.step=15),o*10>e&&(this.scale=`second`,this.step=10),o*5>e&&(this.scale=`second`,this.step=5),o>e&&(this.scale=`second`,this.step=1),200>e&&(this.scale=`millisecond`,this.step=200),100>e&&(this.scale=`millisecond`,this.step=100),50>e&&(this.scale=`millisecond`,this.step=50),10>e&&(this.scale=`millisecond`,this.step=10),5>e&&(this.scale=`millisecond`,this.step=5),1>e&&(this.scale=`millisecond`,this.step=1)}static snap(e,t,n){let r=TF(e);if(t==`year`){let e=r.year()+Math.round(r.month()/12);r=r.year(Math.round(e/n)*n).month(0).date(0).hours(0).minutes(0).seconds(0).milliseconds(0)}else if(t==`month`)r=r.date()>15?r.date(1).add(1,`month`):r.date(1),r=r.hours(0).minutes(0).seconds(0).milliseconds(0);else if(t==`week`)r=r.weekday()>2?r.weekday(0).add(1,`week`):r.weekday(0),r=r.hours(0).minutes(0).seconds(0).milliseconds(0);else if(t==`day`){switch(n){case 5:case 2:r=r.hours(Math.round(r.hours()/24)*24);break;default:r=r.hours(Math.round(r.hours()/12)*12);break}r=r.minutes(0).seconds(0).milliseconds(0)}else if(t==`weekday`){switch(n){case 5:case 2:r=r.hours(Math.round(r.hours()/12)*12);break;default:r=r.hours(Math.round(r.hours()/6)*6);break}r=r.minutes(0).seconds(0).milliseconds(0)}else if(t==`hour`){switch(n){case 4:r=r.minutes(Math.round(r.minutes()/60)*60);break;default:r=r.minutes(Math.round(r.minutes()/30)*30);break}r=r.seconds(0).milliseconds(0)}else if(t==`minute`){switch(n){case 15:case 10:r=r.minutes(Math.round(r.minutes()/5)*5).seconds(0);break;case 5:r=r.seconds(Math.round(r.seconds()/60)*60);break;default:r=r.seconds(Math.round(r.seconds()/30)*30);break}r=r.milliseconds(0)}else if(t==`second`)switch(n){case 15:case 10:r=r.seconds(Math.round(r.seconds()/5)*5).milliseconds(0);break;case 5:r=r.milliseconds(Math.round(r.milliseconds()/1e3)*1e3);break;default:r=r.milliseconds(Math.round(r.milliseconds()/500)*500);break}else if(t==`millisecond`){let e=n>5?n/2:1;r=r.milliseconds(Math.round(r.milliseconds()/e)*e)}return r}isMajor(){if(this.switchedYear==1)switch(this.scale){case`year`:case`month`:case`week`:case`weekday`:case`day`:case`hour`:case`minute`:case`second`:case`millisecond`:return!0;default:return!1}else if(this.switchedMonth==1)switch(this.scale){case`week`:case`weekday`:case`day`:case`hour`:case`minute`:case`second`:case`millisecond`:return!0;default:return!1}else if(this.switchedDay==1)switch(this.scale){case`millisecond`:case`second`:case`minute`:case`hour`:return!0;default:return!1}let e=this.moment(this.current);switch(this.scale){case`millisecond`:return e.milliseconds()==0;case`second`:return e.seconds()==0;case`minute`:return e.hours()==0&&e.minutes()==0;case`hour`:return e.hours()==0;case`weekday`:case`day`:return this.options.showWeekScale?e.isoWeekday()==1:e.date()==1;case`week`:return e.date()==1;case`month`:return e.month()==0;case`year`:return!1;default:return!1}}getLabelMinor(e){if(e??=this.current,e instanceof Date&&(e=this.moment(e)),typeof this.format.minorLabels==`function`)return this.format.minorLabels(e,this.scale,this.step);let t=this.format.minorLabels[this.scale];switch(this.scale){case`week`:if(e.date()===1&&e.weekday()!==0)return``;default:return t&&t.length>0?this.moment(e).format(t):``}}getLabelMajor(e){if(e??=this.current,e instanceof Date&&(e=this.moment(e)),typeof this.format.majorLabels==`function`)return this.format.majorLabels(e,this.scale,this.step);let t=this.format.majorLabels[this.scale];return t&&t.length>0?this.moment(e).format(t):``}getClassName(){var e;let t=this.moment,n=this.moment(this.current),r=n.locale?n.locale(`en`):n.lang(`en`),i=this.step,a=[];function o(e){return e/i%2==0?` vis-even`:` vis-odd`}function s(e){return e.isSame(NW(),`day`)?` vis-today`:e.isSame(t().add(1,`day`),`day`)?` vis-tomorrow`:e.isSame(t().add(-1,`day`),`day`)?` vis-yesterday`:``}function c(e){return e.isSame(NW(),`week`)?` vis-current-week`:``}function l(e){return e.isSame(NW(),`month`)?` vis-current-month`:``}function u(e){return e.isSame(NW(),`year`)?` vis-current-year`:``}switch(this.scale){case`millisecond`:a.push(s(r)),a.push(o(r.milliseconds()));break;case`second`:a.push(s(r)),a.push(o(r.seconds()));break;case`minute`:a.push(s(r)),a.push(o(r.minutes()));break;case`hour`:a.push(IK(e=`vis-h${r.hours()}`).call(e,this.step==4?`-h`+(r.hours()+4):``)),a.push(s(r)),a.push(o(r.hours()));break;case`weekday`:a.push(`vis-${r.format(`dddd`).toLowerCase()}`),a.push(s(r)),a.push(c(r)),a.push(o(r.date()));break;case`day`:a.push(`vis-day${r.date()}`),a.push(`vis-${r.format(`MMMM`).toLowerCase()}`),a.push(s(r)),a.push(l(r)),a.push(this.step<=2?s(r):``),a.push(this.step<=2?`vis-${r.format(`dddd`).toLowerCase()}`:``),a.push(o(r.date()-1));break;case`week`:a.push(`vis-week${r.format(`w`)}`),a.push(c(r)),a.push(o(r.week()));break;case`month`:a.push(`vis-${r.format(`MMMM`).toLowerCase()}`),a.push(l(r)),a.push(o(r.month()));break;case`year`:a.push(`vis-year${r.year()}`),a.push(u(r)),a.push(o(r.year()));break}return J(a).call(a,String).join(` `)}};V0.FORMAT={minorLabels:{millisecond:`SSS`,second:`s`,minute:`HH:mm`,hour:`HH:mm`,weekday:`ddd D`,day:`D`,week:`w`,month:`MMM`,year:`YYYY`},majorLabels:{millisecond:`HH:mm:ss`,second:`D MMMM HH:mm`,minute:`ddd D MMMM`,hour:`ddd D MMMM`,weekday:`MMMM YYYY`,day:`MMMM YYYY`,week:`MMMM YYYY`,month:`YYYY`,year:``}};var H0=class extends a1{constructor(e,t){super(),this.dom={foreground:null,lines:[],majorTexts:[],minorTexts:[],redundant:{lines:[],majorTexts:[],minorTexts:[]}},this.props={range:{start:0,end:0,minimumStep:0},lineTop:0},this.defaultOptions={orientation:{axis:`bottom`},showMinorLabels:!0,showMajorLabels:!0,showWeekScale:!1,maxMinorChars:7,format:Y.extend({},V0.FORMAT),moment:TF,timeAxis:null},this.options=Y.extend({},this.defaultOptions),this.body=e,this._create(),this.setOptions(t)}setOptions(e){e&&(Y.selectiveExtend([`showMinorLabels`,`showMajorLabels`,`showWeekScale`,`maxMinorChars`,`hiddenDates`,`timeAxis`,`moment`,`rtl`],this.options,e),Y.selectiveDeepExtend([`format`],this.options,e),`orientation`in e&&(typeof e.orientation==`string`?this.options.orientation.axis=e.orientation:typeof e.orientation==`object`&&`axis`in e.orientation&&(this.options.orientation.axis=e.orientation.axis)),`locale`in e&&(typeof TF.locale==`function`?TF.locale(e.locale):TF.lang(e.locale)))}_create(){this.dom.foreground=document.createElement(`div`),this.dom.background=document.createElement(`div`),this.dom.foreground.className=`vis-time-axis vis-foreground`,this.dom.background.className=`vis-time-axis vis-background`}destroy(){this.dom.foreground.parentNode&&this.dom.foreground.parentNode.removeChild(this.dom.foreground),this.dom.background.parentNode&&this.dom.background.parentNode.removeChild(this.dom.background),this.body=null}redraw(){let e=this.props,t=this.dom.foreground,n=this.dom.background,r=this.options.orientation.axis==`top`?this.body.dom.top:this.body.dom.bottom,i=t.parentNode!==r;this._calculateCharSize();let a=this.options.showMinorLabels&&this.options.orientation.axis!==`none`,o=this.options.showMajorLabels&&this.options.orientation.axis!==`none`;e.minorLabelHeight=a?e.minorCharHeight:0,e.majorLabelHeight=o?e.majorCharHeight:0,e.height=e.minorLabelHeight+e.majorLabelHeight,e.width=t.offsetWidth,e.minorLineHeight=this.body.domProps.root.height-e.majorLabelHeight-(this.options.orientation.axis==`top`?this.body.domProps.bottom.height:this.body.domProps.top.height),e.minorLineWidth=1,e.majorLineHeight=e.minorLineHeight+e.majorLabelHeight,e.majorLineWidth=1;let s=t.nextSibling,c=n.nextSibling;return t.parentNode&&t.parentNode.removeChild(t),n.parentNode&&n.parentNode.removeChild(n),t.style.height=`${this.props.height}px`,this._repaintLabels(),s?r.insertBefore(t,s):r.appendChild(t),c?this.body.dom.backgroundVertical.insertBefore(n,c):this.body.dom.backgroundVertical.appendChild(n),this._isResized()||i}_repaintLabels(){let e=this.options.orientation.axis,t=Y.convert(this.body.range.start,`Number`),n=Y.convert(this.body.range.end,`Number`),r=this.body.util.toTime((this.props.minorCharWidth||10)*this.options.maxMinorChars).valueOf(),i=r-a0(this.options.moment,this.body.hiddenDates,this.body.range,r);i-=this.body.util.toTime(0).valueOf();let a=new V0(new Date(t),new Date(n),i,this.body.hiddenDates,this.options);a.setMoment(this.options.moment),this.options.format&&a.setFormat(this.options.format),this.options.timeAxis&&a.setScale(this.options.timeAxis),this.step=a;let o=this.dom;o.redundant.lines=o.lines,o.redundant.majorTexts=o.majorTexts,o.redundant.minorTexts=o.minorTexts,o.lines=[],o.majorTexts=[],o.minorTexts=[];let s,c,l,u,d,f,p=0,m,h,g,_=0,v=1e3,y;for(a.start(),c=a.getCurrent(),u=this.body.util.toScreen(c);a.hasNext()&&_<v;){switch(_++,d=a.isMajor(),y=a.getClassName(),s=c,l=u,a.next(),c=a.getCurrent(),u=this.body.util.toScreen(c),m=p,p=u-l,a.scale){case`week`:f=!0;break;default:f=p>=m*.4;break}if(this.options.showMinorLabels&&f){var b=this._repaintMinorText(l,a.getLabelMinor(s),e,y);b.style.width=`${p}px`}d&&this.options.showMajorLabels?(l>0&&(g??=l,b=this._repaintMajorText(l,a.getLabelMajor(s),e,y)),h=this._repaintMajorLine(l,p,e,y)):f?h=this._repaintMinorLine(l,p,e,y):h&&(h.style.width=`${bq(h.style.width)+p}px`)}if(_===v&&!U0&&(console.warn(`Something is wrong with the Timeline scale. Limited drawing of grid lines to ${v} lines.`),U0=!0),this.options.showMajorLabels){let t=this.body.util.toTime(0),n=a.getLabelMajor(t),r=n.length*(this.props.majorCharWidth||10)+10;(g==null||r<g)&&this._repaintMajorText(0,n,e,y)}q(Y).call(Y,this.dom.redundant,e=>{for(;e.length;){let t=e.pop();t&&t.parentNode&&t.parentNode.removeChild(t)}})}_repaintMinorText(e,t,n,r){let i=this.dom.redundant.minorTexts.shift();if(!i){let e=document.createTextNode(``);i=document.createElement(`div`),i.appendChild(e),this.dom.foreground.appendChild(i)}this.dom.minorTexts.push(i),i.innerHTML=Y.xss(t);let a=n==`top`?this.props.majorLabelHeight:0;return this._setXY(i,e,a),i.className=`vis-text vis-minor ${r}`,i}_repaintMajorText(e,t,n,r){let i=this.dom.redundant.majorTexts.shift();if(!i){let e=document.createElement(`div`);i=document.createElement(`div`),i.appendChild(e),this.dom.foreground.appendChild(i)}i.childNodes[0].innerHTML=Y.xss(t),i.className=`vis-text vis-major ${r}`;let a=n==`top`?0:this.props.minorLabelHeight;return this._setXY(i,e,a),this.dom.majorTexts.push(i),i}_setXY(e,t,n){var r;let i=this.options.rtl?t*-1:t;e.style.transform=IK(r=`translate(${i}px, `).call(r,n,`px)`)}_repaintMinorLine(e,t,n,r){var i;let a=this.dom.redundant.lines.shift();a||(a=document.createElement(`div`),this.dom.background.appendChild(a)),this.dom.lines.push(a);let o=this.props;a.style.width=`${t}px`,a.style.height=`${o.minorLineHeight}px`;let s=n==`top`?o.majorLabelHeight:this.body.domProps.top.height,c=e-o.minorLineWidth/2;return this._setXY(a,c,s),a.className=IK(i=`vis-grid ${this.options.rtl?`vis-vertical-rtl`:`vis-vertical`} vis-minor `).call(i,r),a}_repaintMajorLine(e,t,n,r){var i;let a=this.dom.redundant.lines.shift();a||(a=document.createElement(`div`),this.dom.background.appendChild(a)),this.dom.lines.push(a);let o=this.props;a.style.width=`${t}px`,a.style.height=`${o.majorLineHeight}px`;let s=n==`top`?0:this.body.domProps.top.height,c=e-o.majorLineWidth/2;return this._setXY(a,c,s),a.className=IK(i=`vis-grid ${this.options.rtl?`vis-vertical-rtl`:`vis-vertical`} vis-major `).call(i,r),a}_calculateCharSize(){this.dom.measureCharMinor||(this.dom.measureCharMinor=document.createElement(`DIV`),this.dom.measureCharMinor.className=`vis-text vis-minor vis-measure`,this.dom.measureCharMinor.style.position=`absolute`,this.dom.measureCharMinor.appendChild(document.createTextNode(`0`)),this.dom.foreground.appendChild(this.dom.measureCharMinor)),this.props.minorCharHeight=this.dom.measureCharMinor.clientHeight,this.props.minorCharWidth=this.dom.measureCharMinor.clientWidth,this.dom.measureCharMajor||(this.dom.measureCharMajor=document.createElement(`DIV`),this.dom.measureCharMajor.className=`vis-text vis-major vis-measure`,this.dom.measureCharMajor.style.position=`absolute`,this.dom.measureCharMajor.appendChild(document.createTextNode(`0`)),this.dom.foreground.appendChild(this.dom.measureCharMajor)),this.props.majorCharHeight=this.dom.measureCharMajor.clientHeight,this.props.majorCharWidth=this.dom.measureCharMajor.clientWidth}},U0=!1;function W0(e){var t=window,n={},r={keydown:{},keyup:{}},i={},a;for(a=97;a<=122;a++)i[String.fromCharCode(a)]={code:65+(a-97),shift:!1};for(a=65;a<=90;a++)i[String.fromCharCode(a)]={code:a,shift:!0};for(a=0;a<=9;a++)i[``+a]={code:48+a,shift:!1};for(a=1;a<=12;a++)i[`F`+a]={code:111+a,shift:!1};for(a=0;a<=9;a++)i[`num`+a]={code:96+a,shift:!1};i[`num*`]={code:106,shift:!1},i[`num+`]={code:107,shift:!1},i[`num-`]={code:109,shift:!1},i[`num/`]={code:111,shift:!1},i[`num.`]={code:110,shift:!1},i.left={code:37,shift:!1},i.up={code:38,shift:!1},i.right={code:39,shift:!1},i.down={code:40,shift:!1},i.space={code:32,shift:!1},i.enter={code:13,shift:!1},i.shift={code:16,shift:void 0},i.esc={code:27,shift:!1},i.backspace={code:8,shift:!1},i.tab={code:9,shift:!1},i.ctrl={code:17,shift:!1},i.alt={code:18,shift:!1},i.delete={code:46,shift:!1},i.pageup={code:33,shift:!1},i.pagedown={code:34,shift:!1},i[`=`]={code:187,shift:!1},i[`-`]={code:189,shift:!1},i[`]`]={code:221,shift:!1},i[`[`]={code:219,shift:!1};var o=function(e){c(e,`keydown`)},s=function(e){c(e,`keyup`)},c=function(e,t){if(r[t][e.keyCode]!==void 0)for(var n=r[t][e.keyCode],i=0;i<n.length;i++)(n[i].shift===void 0||n[i].shift==1&&e.shiftKey==1||n[i].shift==0&&e.shiftKey==0)&&n[i].fn(e)};return n.bind=function(e,t,n){if(n===void 0&&(n=`keydown`),i[e]===void 0)throw Error(`unsupported key: `+e);r[n][i[e].code]===void 0&&(r[n][i[e].code]=[]),r[n][i[e].code].push({fn:t,shift:i[e].shift})},n.bindAll=function(e,t){for(var r in t===void 0&&(t=`keydown`),i)i.hasOwnProperty(r)&&n.bind(r,e,t)},n.getKey=function(e){for(var t in i)if(i.hasOwnProperty(t)&&(e.shiftKey==1&&i[t].shift==1&&e.keyCode==i[t].code||e.shiftKey==0&&i[t].shift==0&&e.keyCode==i[t].code||e.keyCode==i[t].code&&t==`shift`))return t;return`unknown key, currently not supported`},n.unbind=function(e,t,n){if(n===void 0&&(n=`keydown`),i[e]===void 0)throw Error(`unsupported key: `+e);if(t!==void 0){var a=[],o=r[n][i[e].code];if(o!==void 0)for(var s=0;s<o.length;s++)o[s].fn==t&&o[s].shift==i[e].shift||a.push(r[n][i[e].code][s]);r[n][i[e].code]=a}else r[n][i[e].code]=[]},n.reset=function(){r={keydown:{},keyup:{}}},n.destroy=function(){r={keydown:{},keyup:{}},t.removeEventListener(`keydown`,o,!0),t.removeEventListener(`keyup`,s,!0)},t.addEventListener(`keydown`,o,!0),t.addEventListener(`keyup`,s,!0),n}function G0(e){var t,n;this.active=!1,this.dom={container:e},this.dom.overlay=document.createElement(`div`),this.dom.overlay.className=`vis-overlay`,this.dom.container.appendChild(this.dom.overlay),this.hammer=L0(this.dom.overlay),this.hammer.on(`tap`,K(t=this._onTapOverlay).call(t,this));var r=this,i=[`tap`,`doubletap`,`press`,`pinch`,`pan`,`panstart`,`panmove`,`panend`];q(i).call(i,function(e){r.hammer.on(e,function(e){e.stopPropagation()})}),document&&document.body&&(this.onClick=function(t){K0(t.target,e)||r.deactivate()},document.body.addEventListener(`click`,this.onClick)),this.keycharm!==void 0&&this.keycharm.destroy(),this.keycharm=W0(),this.escListener=K(n=this.deactivate).call(n,this)}$J(G0.prototype),G0.current=null,G0.prototype.destroy=function(){this.deactivate(),this.dom.overlay.parentNode.removeChild(this.dom.overlay),this.onClick&&document.body.removeEventListener(`click`,this.onClick),this.keycharm!==void 0&&this.keycharm.destroy(),this.keycharm=null,this.hammer.destroy(),this.hammer=null},G0.prototype.activate=function(){var e;G0.current&&G0.current.deactivate(),G0.current=this,this.active=!0,this.dom.overlay.style.display=`none`,Y.addClassName(this.dom.container,`vis-active`),this.emit(`change`),this.emit(`activate`),K(e=this.keycharm).call(e,`esc`,this.escListener)},G0.prototype.deactivate=function(){G0.current===this&&(G0.current=null),this.active=!1,this.dom.overlay.style.display=``,Y.removeClassName(this.dom.container,`vis-active`),this.keycharm.unbind(`esc`,this.escListener),this.emit(`change`),this.emit(`deactivate`)},G0.prototype._onTapOverlay=function(e){this.activate(),e.stopPropagation()};function K0(e,t){for(;e;){if(e===t)return!0;e=e.parentNode}return!1}var q0={current:`current`,time:`time`,deleteSelected:`Delete selected`},J0=q0,Y0=q0,X0={current:`attuale`,time:`tempo`,deleteSelected:`Cancella la selezione`},Z0=X0,Q0=X0,$0={current:`huidige`,time:`tijd`,deleteSelected:`Selectie verwijderen`},e2=$0,t2=$0,n2={current:`Aktuelle`,time:`Zeit`,deleteSelected:`Lösche Auswahl`},r2=n2,i2=n2,a2={current:`actuel`,time:`heure`,deleteSelected:`Effacer la selection`},o2=a2,s2=a2,c2=a2,l2=a2,u2={current:`actual`,time:`hora`,deleteSelected:`Eliminar selección`},d2=u2,f2={current:`поточний`,time:`час`,deleteSelected:`Видалити обране`},p2=f2,m2={current:`текущее`,time:`время`,deleteSelected:`Удалить выбранное`},h2=m2,g2={current:`aktualny`,time:`czas`,deleteSelected:`Usuń wybrane`},_2=g2,v2={current:`atual`,time:`data`,deleteSelected:`Apagar selecionado`},y2=v2,b2=v2,x2={current:`güncel`,time:`zaman`,deleteSelected:`Seçileni sil`},S2=x2,C2={current:`現在`,time:`時刻`,deleteSelected:`選択されたものを削除`},w2=C2,T2={current:`nuvarande`,time:`tid`,deleteSelected:`Radera valda`},E2=T2,D2={current:`nåværende`,time:`tid`,deleteSelected:`Slett valgte`},O2=D2,k2=D2,A2=D2,j2={current:`einamas`,time:`laikas`,deleteSelected:`Pašalinti pasirinktą`},M2={en:q0,en_EN:J0,en_US:Y0,it:X0,it_IT:Z0,it_CH:Q0,nl:$0,nl_NL:e2,nl_BE:t2,de:n2,de_DE:r2,de_CH:i2,fr:a2,fr_FR:o2,fr_CA:s2,fr_BE:c2,fr_CH:l2,es:u2,es_ES:d2,uk:f2,uk_UA:p2,ru:m2,ru_RU:h2,pl:g2,pl_PL:_2,pt:v2,pt_BR:y2,pt_PT:b2,tr:x2,tr_TR:S2,ja:C2,ja_JP:w2,lt:j2,lt_LT:j2,sv:T2,sv_SE:E2,nb:D2,nn:k2,nb_NO:O2,nn_NO:A2},N2=class extends a1{constructor(e,t){var n;super(),this.body=e,this.defaultOptions={moment:TF,locales:M2,locale:`en`,id:void 0,title:void 0},this.options=Y.extend({},this.defaultOptions),this.setOptions(t),this.options.locales=Y.extend({},M2,this.options.locales);let r=this.defaultOptions.locales[this.defaultOptions.locale];q(n=LU(this.options.locales)).call(n,e=>{this.options.locales[e]=Y.extend({},r,this.options.locales[e])}),t&&t.time!=null?this.customTime=t.time:this.customTime=new Date,this.eventParams={},this._create()}setOptions(e){e&&Y.selectiveExtend([`moment`,`locale`,`locales`,`id`,`title`,`rtl`,`snap`],this.options,e)}_create(){var e,t,n;let r=document.createElement(`div`);r[`custom-time`]=this,r.className=`vis-custom-time ${this.options.id||``}`,r.style.position=`absolute`,r.style.top=`0px`,r.style.height=`100%`,this.bar=r;let i=document.createElement(`div`);i.style.position=`relative`,i.style.top=`0px`,this.options.rtl?i.style.right=`-10px`:i.style.left=`-10px`,i.style.height=`100%`,i.style.width=`20px`;function a(e){this.body.range._onMouseWheel(e)}i.addEventListener?(i.addEventListener(`mousewheel`,K(a).call(a,this),!1),i.addEventListener(`DOMMouseScroll`,K(a).call(a,this),!1)):i.attachEvent(`onmousewheel`,K(a).call(a,this)),r.appendChild(i),this.hammer=new L0(i),this.hammer.on(`panstart`,K(e=this._onDragStart).call(e,this)),this.hammer.on(`panmove`,K(t=this._onDrag).call(t,this)),this.hammer.on(`panend`,K(n=this._onDragEnd).call(n,this)),this.hammer.get(`pan`).set({threshold:5,direction:L0.DIRECTION_ALL}),this.hammer.get(`press`).set({time:1e4})}destroy(){this.hide(),this.hammer.destroy(),this.hammer=null,this.body=null}redraw(){let e=this.body.dom.backgroundVertical;this.bar.parentNode!=e&&(this.bar.parentNode&&this.bar.parentNode.removeChild(this.bar),e.appendChild(this.bar));let t=this.body.util.toScreen(this.customTime),n=this.options.locales[this.options.locale];n||=(this.warned||=(console.warn(`WARNING: options.locales['${this.options.locale}'] not found. See https://visjs.github.io/vis-timeline/docs/timeline/#Localization`),!0),this.options.locales.en);let r=this.options.title;if(r===void 0){var i;r=IK(i=`${n.time}: `).call(i,this.options.moment(this.customTime).format(`dddd, MMMM Do YYYY, H:mm:ss`)),r=r.charAt(0).toUpperCase()+r.substring(1)}else typeof r==`function`&&(r=r.call(this,this.customTime));return this.options.rtl?this.bar.style.right=`${t}px`:this.bar.style.left=`${t}px`,this.bar.title=r,!1}hide(){this.bar.parentNode&&this.bar.parentNode.removeChild(this.bar)}setCustomTime(e){this.customTime=Y.convert(e,`Date`),this.redraw()}getCustomTime(){return new Date(this.customTime.valueOf())}setCustomMarker(e,t){if(this.marker&&this.bar.removeChild(this.marker),this.marker=document.createElement(`div`),this.marker.className=`vis-custom-time-marker`,this.marker.innerHTML=Y.xss(e),this.marker.style.position=`absolute`,t){var n;this.marker.setAttribute(`contenteditable`,`true`),this.marker.addEventListener(`pointerdown`,()=>{this.marker.focus()}),this.marker.addEventListener(`input`,K(n=this._onMarkerChange).call(n,this)),this.marker.title=e,this.marker.addEventListener(`blur`,e=>{this.title!=e.target.innerHTML&&(this._onMarkerChanged(e),this.title=e.target.innerHTML)})}this.bar.appendChild(this.marker)}setCustomTitle(e){this.options.title=e}_onDragStart(e){this.eventParams.dragging=!0,this.eventParams.customTime=this.customTime,e.stopPropagation()}_onDrag(e){if(!this.eventParams.dragging)return;let t=this.options.rtl?-1*e.deltaX:e.deltaX,n=this.body.util.toScreen(this.eventParams.customTime)+t,r=this.body.util.toTime(n),i=this.body.util.getScale(),a=this.body.util.getStep(),o=this.options.snap,s=o?o(r,i,a):r;this.setCustomTime(s),this.body.emitter.emit(`timechange`,{id:this.options.id,time:new Date(this.customTime.valueOf()),event:e}),e.stopPropagation()}_onDragEnd(e){this.eventParams.dragging&&(this.body.emitter.emit(`timechanged`,{id:this.options.id,time:new Date(this.customTime.valueOf()),event:e}),e.stopPropagation())}_onMarkerChange(e){this.body.emitter.emit(`markerchange`,{id:this.options.id,title:e.target.innerHTML,event:e}),e.stopPropagation()}_onMarkerChanged(e){this.body.emitter.emit(`markerchanged`,{id:this.options.id,title:e.target.innerHTML,event:e}),e.stopPropagation()}static customTimeFromTarget(e){let t=e.target;for(;t;){if(Object.prototype.hasOwnProperty.call(t,`custom-time`))return t[`custom-time`];t=t.parentNode}return null}},P2=class{_create(e){var t,n,r;this.dom={},this.dom.container=e,this.dom.container.style.position=`relative`,this.dom.root=document.createElement(`div`),this.dom.background=document.createElement(`div`),this.dom.backgroundVertical=document.createElement(`div`),this.dom.backgroundHorizontal=document.createElement(`div`),this.dom.centerContainer=document.createElement(`div`),this.dom.leftContainer=document.createElement(`div`),this.dom.rightContainer=document.createElement(`div`),this.dom.center=document.createElement(`div`),this.dom.left=document.createElement(`div`),this.dom.right=document.createElement(`div`),this.dom.top=document.createElement(`div`),this.dom.bottom=document.createElement(`div`),this.dom.shadowTop=document.createElement(`div`),this.dom.shadowBottom=document.createElement(`div`),this.dom.shadowTopLeft=document.createElement(`div`),this.dom.shadowBottomLeft=document.createElement(`div`),this.dom.shadowTopRight=document.createElement(`div`),this.dom.shadowBottomRight=document.createElement(`div`),this.dom.rollingModeBtn=document.createElement(`div`),this.dom.loadingScreen=document.createElement(`div`),this.dom.root.className=`vis-timeline`,this.dom.background.className=`vis-panel vis-background`,this.dom.backgroundVertical.className=`vis-panel vis-background vis-vertical`,this.dom.backgroundHorizontal.className=`vis-panel vis-background vis-horizontal`,this.dom.centerContainer.className=`vis-panel vis-center`,this.dom.leftContainer.className=`vis-panel vis-left`,this.dom.rightContainer.className=`vis-panel vis-right`,this.dom.top.className=`vis-panel vis-top`,this.dom.bottom.className=`vis-panel vis-bottom`,this.dom.left.className=`vis-content`,this.dom.center.className=`vis-content`,this.dom.right.className=`vis-content`,this.dom.shadowTop.className=`vis-shadow vis-top`,this.dom.shadowBottom.className=`vis-shadow vis-bottom`,this.dom.shadowTopLeft.className=`vis-shadow vis-top`,this.dom.shadowBottomLeft.className=`vis-shadow vis-bottom`,this.dom.shadowTopRight.className=`vis-shadow vis-top`,this.dom.shadowBottomRight.className=`vis-shadow vis-bottom`,this.dom.rollingModeBtn.className=`vis-rolling-mode-btn`,this.dom.loadingScreen.className=`vis-loading-screen`,this.dom.root.appendChild(this.dom.background),this.dom.root.appendChild(this.dom.backgroundVertical),this.dom.root.appendChild(this.dom.backgroundHorizontal),this.dom.root.appendChild(this.dom.centerContainer),this.dom.root.appendChild(this.dom.leftContainer),this.dom.root.appendChild(this.dom.rightContainer),this.dom.root.appendChild(this.dom.top),this.dom.root.appendChild(this.dom.bottom),this.dom.root.appendChild(this.dom.rollingModeBtn),this.dom.centerContainer.appendChild(this.dom.center),this.dom.leftContainer.appendChild(this.dom.left),this.dom.rightContainer.appendChild(this.dom.right),this.dom.centerContainer.appendChild(this.dom.shadowTop),this.dom.centerContainer.appendChild(this.dom.shadowBottom),this.dom.leftContainer.appendChild(this.dom.shadowTopLeft),this.dom.leftContainer.appendChild(this.dom.shadowBottomLeft),this.dom.rightContainer.appendChild(this.dom.shadowTopRight),this.dom.rightContainer.appendChild(this.dom.shadowBottomRight),this.props={root:{},background:{},centerContainer:{},leftContainer:{},rightContainer:{},center:{},left:{},right:{},top:{},bottom:{},border:{},scrollTop:0,scrollTopMin:0},this.on(`rangechange`,()=>{this.initialDrawDone===!0&&this._redraw()}),this.on(`rangechanged`,()=>{this.initialRangeChangeDone||=!0}),this.on(`touch`,K(t=this._onTouch).call(t,this)),this.on(`panmove`,K(n=this._onDrag).call(n,this));let i=this;this._origRedraw=K(r=this._redraw).call(r,this),this._redraw=Y.throttle(this._origRedraw),this.on(`_change`,e=>{i.itemSet&&i.itemSet.initialItemSetDrawn&&e&&e.queue==1?i._redraw():i._origRedraw()}),this.hammer=new L0(this.dom.root);let a=this.hammer.get(`pinch`).set({enable:!0});a&&B0(a),this.hammer.get(`pan`).set({threshold:5,direction:L0.DIRECTION_ALL}),this.timelineListeners={};let o=[`tap`,`doubletap`,`press`,`pinch`,`pan`,`panstart`,`panmove`,`panend`];q(o).call(o,e=>{let t=t=>{i.isActive()&&i.emit(e,t)};i.hammer.on(e,t),i.timelineListeners[e]=t}),R0(this.hammer,e=>{i.emit(`touch`,e)}),z0(this.hammer,e=>{i.emit(`release`,e)});function s(e){if(!this.isActive())return;if(this.emit(`mousewheel`,e),this.options.preferZoom){if(!this.options.zoomKey||e[this.options.zoomKey])return}else if(this.options.zoomKey&&e[this.options.zoomKey])return;if(!this.options.verticalScroll&&!this.options.horizontalScroll)return;let t=0,n=0;`detail`in e&&(n=e.detail*-1),`wheelDelta`in e&&(n=e.wheelDelta),`wheelDeltaY`in e&&(n=e.wheelDeltaY),`wheelDeltaX`in e&&(t=e.wheelDeltaX*-1),`axis`in e&&e.axis===e.HORIZONTAL_AXIS&&(t=n*-1,n=0),`deltaY`in e&&(n=e.deltaY*-1),`deltaX`in e&&(t=e.deltaX);var r=40;e.deltaMode&&(e.deltaMode===1?(t*=r,n*=r):(t*=r,n*=800));let i=this.options.verticalScroll,a=Math.abs(n)>=Math.abs(t),o=this.options.horizontalScroll&&this.options.horizontalScrollKey&&e[this.options.horizontalScrollKey];if(i&&a&&!o){let t=this.props.scrollTop,r=t+n;this._setScrollTop(r)!==t&&(this._redraw(),this.emit(`scroll`,e),e.preventDefault());return}if(this.options.horizontalScroll){this.range.stopRolling();let r=(a?n:t)/120*(this.range.end-this.range.start)/20;this.options.horizontalScrollInvert&&a&&(r=-r);let i=this.range.start+r,o=this.range.end+r,s={animation:!1,byUser:!0,event:e};this.range.setRange(i,o,s),e.preventDefault();return}}let c=`onwheel`in document.createElement(`div`)?`wheel`:document.onmousewheel===void 0?this.dom.centerContainer.addEventListener?`DOMMouseScroll`:`onmousewheel`:`mousewheel`;this.dom.top.addEventListener,this.dom.bottom.addEventListener,this.dom.centerContainer.addEventListener(c,K(s).call(s,this),!1),this.dom.top.addEventListener(c,K(s).call(s,this),!1),this.dom.bottom.addEventListener(c,K(s).call(s,this),!1);function l(e){if(i.options.verticalScroll&&(e.preventDefault(),i.isActive())){let t=-e.target.scrollTop;i._setScrollTop(t),i._redraw(),i.emit(`scrollSide`,e)}}this.dom.left.parentNode.addEventListener(`scroll`,K(l).call(l,this)),this.dom.right.parentNode.addEventListener(`scroll`,K(l).call(l,this));let u=!1;function d(e){var t;if(e.preventDefault&&(i.emit(`dragover`,i.getEventProperties(e)),e.preventDefault()),Iq(t=e.target.className).call(t,`timeline`)>-1&&!u)return e.dataTransfer.dropEffect=`move`,u=!0,!1}function f(e){e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation();try{var t=JSON.parse(e.dataTransfer.getData(`text`));if(!t||!t.content)return}catch{return!1}return u=!1,e.center={x:e.clientX,y:e.clientY},t.target===`item`?i.itemSet._onDropObjectOnItem(e):i.itemSet._onAddItem(e),i.emit(`drop`,i.getEventProperties(e)),!1}if(this.dom.center.addEventListener(`dragover`,K(d).call(d,this),!1),this.dom.center.addEventListener(`drop`,K(f).call(f,this),!1),this.customTimes=[],this.touch={},this.redrawCount=0,this.initialDrawDone=!1,this.initialRangeChangeDone=!1,!e)throw Error(`No container provided`);e.appendChild(this.dom.root),e.appendChild(this.dom.loadingScreen)}setOptions(e){var t;if(e){if(Y.selectiveExtend([`width`,`height`,`minHeight`,`maxHeight`,`autoResize`,`start`,`end`,`clickToUse`,`dataAttributes`,`hiddenDates`,`locale`,`locales`,`moment`,`preferZoom`,`rtl`,`zoomKey`,`horizontalScroll`,`horizontalScrollKey`,`horizontalScrollInvert`,`verticalScroll`,`longSelectPressTime`,`snap`],this.options,e),this.dom.rollingModeBtn.style.visibility=`hidden`,this.options.rtl&&(this.dom.container.style.direction=`rtl`,this.dom.backgroundVertical.className=`vis-panel vis-background vis-vertical-rtl`),this.options.verticalScroll&&(this.options.rtl?this.dom.rightContainer.className=`vis-panel vis-right vis-vertical-scroll`:this.dom.leftContainer.className=`vis-panel vis-left vis-vertical-scroll`),typeof this.options.orientation!=`object`&&(this.options.orientation={item:void 0,axis:void 0}),`orientation`in e&&(typeof e.orientation==`string`?this.options.orientation={item:e.orientation,axis:e.orientation}:typeof e.orientation==`object`&&(`item`in e.orientation&&(this.options.orientation.item=e.orientation.item),`axis`in e.orientation&&(this.options.orientation.axis=e.orientation.axis))),this.options.orientation.axis===`both`){if(!this.timeAxis2){let e=this.timeAxis2=new H0(this.body,this.options);e.setOptions=t=>{let n=t?Y.extend({},t):{};n.orientation=`top`,H0.prototype.setOptions.call(e,n)},this.components.push(e)}}else if(this.timeAxis2){var n;let e=Iq(n=this.components).call(n,this.timeAxis2);if(e!==-1){var r;_G(r=this.components).call(r,e,1)}this.timeAxis2.destroy(),this.timeAxis2=null}typeof e.drawPoints==`function`&&(e.drawPoints={onRender:e.drawPoints}),`hiddenDates`in this.options&&X1(this.options.moment,this.body,this.options.hiddenDates),`clickToUse`in e&&(e.clickToUse?this.activator||=new G0(this.dom.root):this.activator&&(this.activator.destroy(),delete this.activator)),this._initAutoResize()}if(q(t=this.components).call(t,t=>t.setOptions(e)),`configure`in e){var i;this.configurator||=this._createConfigurator(),this.configurator.setOptions(e.configure);let t=Y.deepExtend({},this.options);q(i=this.components).call(i,e=>{Y.deepExtend(t,e.options)}),this.configurator.setModuleOptions({global:t})}this._redraw()}isActive(){return!this.activator||this.activator.active}destroy(){var e;this.setItems(null),this.setGroups(null),this.off(),this._stopAutoResize(),this.dom.root.parentNode&&this.dom.root.parentNode.removeChild(this.dom.root),this.dom=null,this.activator&&(this.activator.destroy(),delete this.activator);for(let e in this.timelineListeners)Object.prototype.hasOwnProperty.call(this.timelineListeners,e)&&delete this.timelineListeners[e];this.timelineListeners=null,this.hammer&&this.hammer.destroy(),this.hammer=null,q(e=this.components).call(e,e=>e.destroy()),this.body=null}setCustomTime(e,t){var n;let r=J(n=this.customTimes).call(n,e=>t===e.options.id);if(r.length===0)throw Error(`No custom time bar found with id ${AJ(t)}`);r.length>0&&r[0].setCustomTime(e)}getCustomTime(e){var t;let n=J(t=this.customTimes).call(t,t=>t.options.id===e);if(n.length===0)throw Error(`No custom time bar found with id ${AJ(e)}`);return n[0].getCustomTime()}setCustomTimeMarker(e,t,n){var r;let i=J(r=this.customTimes).call(r,e=>e.options.id===t);if(i.length===0)throw Error(`No custom time bar found with id ${AJ(t)}`);i.length>0&&i[0].setCustomMarker(e,n)}setCustomTimeTitle(e,t){var n;let r=J(n=this.customTimes).call(n,e=>e.options.id===t);if(r.length===0)throw Error(`No custom time bar found with id ${AJ(t)}`);if(r.length>0)return r[0].setCustomTitle(e)}getEventProperties(e){return{event:e}}addCustomTime(e,t){var n;let r=e===void 0?new Date:Y.convert(e,`Date`);if(E0(n=this.customTimes).call(n,e=>e.options.id===t))throw Error(`A custom time with id ${AJ(t)} already exists`);let i=new N2(this.body,Y.extend({},this.options,{time:r,id:t,snap:this.itemSet?this.itemSet.options.snap:this.options.snap}));return this.customTimes.push(i),this.components.push(i),this._redraw(),t}removeCustomTime(e){var t;let n=J(t=this.customTimes).call(t,t=>t.options.id===e);if(n.length===0)throw Error(`No custom time bar found with id ${AJ(e)}`);q(n).call(n,e=>{var t,n,r,i;_G(t=this.customTimes).call(t,Iq(n=this.customTimes).call(n,e),1),_G(r=this.components).call(r,Iq(i=this.components).call(i,e),1),e.destroy()})}getVisibleItems(){return this.itemSet&&this.itemSet.getVisibleItems()||[]}getItemsAtCurrentTime(e){return this.time=e,this.itemSet&&this.itemSet.getItemsAtCurrentTime(this.time)||[]}getVisibleGroups(){return this.itemSet&&this.itemSet.getVisibleGroups()||[]}fit(e,t){let n=this.getDataRange();if(n.min===null&&n.max===null)return;let r=n.max-n.min,i=new Date(n.min.valueOf()-r*.01),a=new Date(n.max.valueOf()+r*.01),o=e&&e.animation!==void 0?e.animation:!0;this.range.setRange(i,a,{animation:o},t)}getDataRange(){throw Error(`Cannot invoke abstract method getDataRange`)}setWindow(e,t,n,r){typeof arguments[2]==`function`&&(r=arguments[2],n={});let i,a;arguments.length==1?(a=arguments[0],i=a.animation===void 0?!0:a.animation,this.range.setRange(a.start,a.end,{animation:i})):arguments.length==2&&typeof arguments[1]==`function`?(a=arguments[0],r=arguments[1],i=a.animation===void 0?!0:a.animation,this.range.setRange(a.start,a.end,{animation:i},r)):(i=n&&n.animation!==void 0?n.animation:!0,this.range.setRange(e,t,{animation:i},r))}moveTo(e,t,n){typeof arguments[1]==`function`&&(n=arguments[1],t={});let r=this.range.end-this.range.start,i=Y.convert(e,`Date`).valueOf(),a=i-r/2,o=i+r/2,s=t&&t.animation!==void 0?t.animation:!0;this.range.setRange(a,o,{animation:s},n)}getWindow(){let e=this.range.getRange();return{start:new Date(e.start),end:new Date(e.end)}}zoomIn(e,t,n){if(!e||e<0||e>1)return;typeof arguments[1]==`function`&&(n=arguments[1],t={});let r=this.getWindow(),i=r.start.valueOf(),a=r.end.valueOf(),o=a-i,s=(o-o/(1+e))/2,c=i+s,l=a-s;this.setWindow(c,l,t,n)}zoomOut(e,t,n){if(!e||e<0||e>1)return;typeof arguments[1]==`function`&&(n=arguments[1],t={});let r=this.getWindow(),i=r.start.valueOf(),a=r.end.valueOf(),o=a-i,s=i-o*e/2,c=a+o*e/2;this.setWindow(s,c,t,n)}redraw(){this._redraw()}_redraw(){var e;this.redrawCount++;let t=this.dom;if(!t||!t.container||t.root.offsetWidth==0)return;let n=!1,r=this.options,i=this.props;Z1(this.options.moment,this.body,this.options.hiddenDates),r.orientation==`top`?(Y.addClassName(t.root,`vis-top`),Y.removeClassName(t.root,`vis-bottom`)):(Y.removeClassName(t.root,`vis-top`),Y.addClassName(t.root,`vis-bottom`)),r.rtl?(Y.addClassName(t.root,`vis-rtl`),Y.removeClassName(t.root,`vis-ltr`)):(Y.addClassName(t.root,`vis-ltr`),Y.removeClassName(t.root,`vis-rtl`)),t.root.style.maxHeight=Y.option.asSize(r.maxHeight,``),t.root.style.minHeight=Y.option.asSize(r.minHeight,``),t.root.style.width=Y.option.asSize(r.width,``);let a=t.root.offsetWidth;i.border.left=1,i.border.right=1,i.border.top=1,i.border.bottom=1,i.center.height=t.center.offsetHeight,i.left.height=t.left.offsetHeight,i.right.height=t.right.offsetHeight,i.top.height=t.top.clientHeight||-i.border.top,i.bottom.height=Math.round(t.bottom.getBoundingClientRect().height)||t.bottom.clientHeight||-i.border.bottom;let o=Math.max(i.left.height,i.center.height,i.right.height),s=i.top.height+o+i.bottom.height+i.border.top+i.border.bottom;t.root.style.height=Y.option.asSize(r.height,`${s}px`),i.root.height=t.root.offsetHeight,i.background.height=i.root.height;let c=i.root.height-i.top.height-i.bottom.height;i.centerContainer.height=c,i.leftContainer.height=c,i.rightContainer.height=i.leftContainer.height,i.root.width=a,i.background.width=i.root.width,this.initialDrawDone||(i.scrollbarWidth=Y.getScrollBarWidth());let l=t.leftContainer.clientWidth,u=t.rightContainer.clientWidth;r.verticalScroll?r.rtl?(i.left.width=l||-i.border.left,i.right.width=u+i.scrollbarWidth||-i.border.right):(i.left.width=l+i.scrollbarWidth||-i.border.left,i.right.width=u||-i.border.right):(i.left.width=l||-i.border.left,i.right.width=u||-i.border.right),this._setDOM();let d=this._updateScrollTop();r.orientation.item!=`top`&&(d+=Math.max(i.centerContainer.height-i.center.height-i.border.top-i.border.bottom,0)),t.center.style.transform=`translateY(${d}px)`;let f=i.scrollTop==0?`hidden`:``,p=i.scrollTop==i.scrollTopMin?`hidden`:``;t.shadowTop.style.visibility=f,t.shadowBottom.style.visibility=p,t.shadowTopLeft.style.visibility=f,t.shadowBottomLeft.style.visibility=p,t.shadowTopRight.style.visibility=f,t.shadowBottomRight.style.visibility=p,r.verticalScroll&&(t.rightContainer.className=`vis-panel vis-right vis-vertical-scroll`,t.leftContainer.className=`vis-panel vis-left vis-vertical-scroll`,t.shadowTopRight.style.visibility=`hidden`,t.shadowBottomRight.style.visibility=`hidden`,t.shadowTopLeft.style.visibility=`hidden`,t.shadowBottomLeft.style.visibility=`hidden`,t.left.style.top=`0px`,t.right.style.top=`0px`),(!r.verticalScroll||i.center.height<i.centerContainer.height)&&(t.left.style.top=`${d}px`,t.right.style.top=`${d}px`,t.rightContainer.className=t.rightContainer.className.replace(RegExp(`(?:^|\\s)vis-vertical-scroll(?:\\s|$)`),` `),t.leftContainer.className=t.leftContainer.className.replace(RegExp(`(?:^|\\s)vis-vertical-scroll(?:\\s|$)`),` `),i.left.width=l||-i.border.left,i.right.width=u||-i.border.right,this._setDOM());let m=i.center.height>i.centerContainer.height;if(this.hammer.get(`pan`).set({direction:m?L0.DIRECTION_ALL:L0.DIRECTION_HORIZONTAL}),this.hammer.get(`press`).set({time:this.options.longSelectPressTime}),q(e=this.components).call(e,e=>{n=e.redraw()||n}),n)if(this.redrawCount<5){this.body.emitter.emit(`_change`);return}else console.log(`WARNING: infinite loop in redraw?`);else this.redrawCount=0;this.body.emitter.emit(`changed`)}_setDOM(){let e=this.props,t=this.dom;e.leftContainer.width=e.left.width,e.rightContainer.width=e.right.width;let n=e.root.width-e.left.width-e.right.width;e.center.width=n,e.centerContainer.width=n,e.top.width=n,e.bottom.width=n,t.background.style.height=`${e.background.height}px`,t.backgroundVertical.style.height=`${e.background.height}px`,t.backgroundHorizontal.style.height=`${e.centerContainer.height}px`,t.centerContainer.style.height=`${e.centerContainer.height}px`,t.leftContainer.style.height=`${e.leftContainer.height}px`,t.rightContainer.style.height=`${e.rightContainer.height}px`,t.background.style.width=`${e.background.width}px`,t.backgroundVertical.style.width=`${e.centerContainer.width}px`,t.backgroundHorizontal.style.width=`${e.background.width}px`,t.centerContainer.style.width=`${e.center.width}px`,t.top.style.width=`${e.top.width}px`,t.bottom.style.width=`${e.bottom.width}px`,t.background.style.left=`0`,t.background.style.top=`0`,t.backgroundVertical.style.left=`${e.left.width+e.border.left}px`,t.backgroundVertical.style.top=`0`,t.backgroundHorizontal.style.left=`0`,t.backgroundHorizontal.style.top=`${e.top.height}px`,t.centerContainer.style.left=`${e.left.width}px`,t.centerContainer.style.top=`${e.top.height}px`,t.leftContainer.style.left=`0`,t.leftContainer.style.top=`${e.top.height}px`,t.rightContainer.style.left=`${e.left.width+e.center.width}px`,t.rightContainer.style.top=`${e.top.height}px`,t.top.style.left=`${e.left.width}px`,t.top.style.top=`0`,t.bottom.style.left=`${e.left.width}px`,t.bottom.style.top=`${e.top.height+e.centerContainer.height}px`,t.center.style.left=`0`,t.left.style.left=`0`,t.right.style.left=`0`}setCurrentTime(e){if(!this.currentTime)throw Error(`Option showCurrentTime must be true`);this.currentTime.setCurrentTime(e)}getCurrentTime(){if(!this.currentTime)throw Error(`Option showCurrentTime must be true`);return this.currentTime.getCurrentTime()}_toTime(e){return t0(this,e,this.props.center.width)}_toGlobalTime(e){return t0(this,e,this.props.root.width)}_toScreen(e){return e0(this,e,this.props.center.width)}_toGlobalScreen(e){return e0(this,e,this.props.root.width)}_initAutoResize(){this.options.autoResize==1?this._startAutoResize():this._stopAutoResize()}_startAutoResize(){let e=this;this._stopAutoResize(),this._onResize=()=>{if(e.options.autoResize!=1){e._stopAutoResize();return}if(e.dom.root){let t=e.dom.root.offsetHeight,n=e.dom.root.offsetWidth;(n!=e.props.lastWidth||t!=e.props.lastHeight)&&(e.props.lastWidth=n,e.props.lastHeight=t,e.props.scrollbarWidth=Y.getScrollBarWidth(),e.body.emitter.emit(`_change`))}},window.addEventListener(`resize`,this._onResize),e.dom.root&&(e.props.lastWidth=e.dom.root.offsetWidth,e.props.lastHeight=e.dom.root.offsetHeight),this.watchTimer=N0(this._onResize,1e3)}_stopAutoResize(){this.watchTimer&&=(clearInterval(this.watchTimer),void 0),this._onResize&&=(window.removeEventListener(`resize`,this._onResize),null)}_onTouch(){this.touch.allowDragging=!0,this.touch.initialScrollTop=this.props.scrollTop}_onPinch(){this.touch.allowDragging=!1}_onDrag(e){if(!e||!this.touch.allowDragging)return;let t=e.deltaY,n=this._getScrollTop(),r=this._setScrollTop(this.touch.initialScrollTop+t);this.options.verticalScroll&&(this.dom.left.parentNode.scrollTop=-this.props.scrollTop,this.dom.right.parentNode.scrollTop=-this.props.scrollTop),r!=n&&this.emit(`verticalDrag`)}_setScrollTop(e){return this.props.scrollTop=e,this._updateScrollTop(),this.props.scrollTop}_updateScrollTop(){let e=Math.min(this.props.centerContainer.height-this.props.border.top-this.props.border.bottom-this.props.center.height,0);return e!=this.props.scrollTopMin&&(this.options.orientation.item!=`top`&&(this.props.scrollTop+=e-this.props.scrollTopMin),this.props.scrollTopMin=e),this.props.scrollTop>0&&(this.props.scrollTop=0),this.props.scrollTop<e&&(this.props.scrollTop=e),this.options.verticalScroll&&(this.dom.left.parentNode.scrollTop=-this.props.scrollTop,this.dom.right.parentNode.scrollTop=-this.props.scrollTop),this.props.scrollTop}_getScrollTop(){return this.props.scrollTop}_createConfigurator(){throw Error(`Cannot invoke abstract method _createConfigurator`)}};$J(P2.prototype);var F2=class extends a1{constructor(e,t){var n;super(),this.body=e,this.defaultOptions={rtl:!1,showCurrentTime:!0,alignCurrentTime:void 0,moment:TF,locales:M2,locale:`en`},this.options=Y.extend({},this.defaultOptions),this.setOptions(t),this.options.locales=Y.extend({},M2,this.options.locales);let r=this.defaultOptions.locales[this.defaultOptions.locale];q(n=LU(this.options.locales)).call(n,e=>{this.options.locales[e]=Y.extend({},r,this.options.locales[e])}),this.offset=0,this._create()}_create(){let e=document.createElement(`div`);e.className=`vis-current-time`,e.style.position=`absolute`,e.style.top=`0px`,e.style.height=`100%`,this.bar=e}destroy(){this.options.showCurrentTime=!1,this.redraw(),this.body=null}setOptions(e){e&&Y.selectiveExtend([`rtl`,`showCurrentTime`,`alignCurrentTime`,`moment`,`locale`,`locales`],this.options,e)}redraw(){if(this.options.showCurrentTime){var e,t;let n=this.body.dom.backgroundVertical;this.bar.parentNode!=n&&(this.bar.parentNode&&this.bar.parentNode.removeChild(this.bar),n.appendChild(this.bar),this.start());let r=this.options.moment(NW()+this.offset);this.options.alignCurrentTime&&(r=r.startOf(this.options.alignCurrentTime));let i=this.body.util.toScreen(r),a=this.options.locales[this.options.locale];a||=(this.warned||=(console.warn(`WARNING: options.locales['${this.options.locale}'] not found. See https://visjs.github.io/vis-timeline/docs/timeline/#Localization`),!0),this.options.locales.en);let o=IK(e=IK(t=`${a.current} `).call(t,a.time,`: `)).call(e,r.format(`dddd, MMMM Do YYYY, H:mm:ss`));o=o.charAt(0).toUpperCase()+o.substring(1),this.options.rtl?this.bar.style.transform=`translateX(${i*-1}px)`:this.bar.style.transform=`translateX(${i}px)`,this.bar.title=o}else this.bar.parentNode&&this.bar.parentNode.removeChild(this.bar),this.stop();return!1}start(){let e=this;function t(){e.stop();let n=1/e.body.range.conversion(e.body.domProps.center.width).scale/10;n<30&&(n=30),n>1e3&&(n=1e3),e.redraw(),e.body.emitter.emit(`currentTimeTick`),e.currentTimeTimer=wP(t,n)}t()}stop(){this.currentTimeTimer!==void 0&&(clearTimeout(this.currentTimeTimer),delete this.currentTimeTimer)}setCurrentTime(e){this.offset=Y.convert(e,`Date`).valueOf()-NW(),this.redraw()}getCurrentTime(){return new Date(NW()+this.offset)}},I2={},L2;function R2(){if(L2)return I2;L2=1;var e=W(),t=iF().find,n=tB(),r=`find`,i=!0;return r in[]&&[,][r](function(){i=!1}),e({target:`Array`,proto:!0,forced:i},{find:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}}),n(r),I2}var z2,B2;function V2(){return B2?z2:(B2=1,R2(),z2=VN()(`Array`,`find`),z2)}var H2,U2;function W2(){if(U2)return H2;U2=1;var e=Rj(),t=V2(),n=Array.prototype;return H2=function(r){var i=r.find;return r===n||e(n,r)&&i===n.find?t:i},H2}var G2,K2;function q2(){return K2?G2:(K2=1,G2=W2(),G2)}var J2,Y2;function X2(){return Y2?J2:(Y2=1,J2=q2(),J2)}var Z2=V(X2()),Q2={},$2={},e4={exports:{}},t4,n4;function r4(){return n4?t4:(n4=1,t4=H()(function(){if(typeof ArrayBuffer==`function`){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,`a`,{value:8})}}),t4)}var i4,a4;function o4(){if(a4)return i4;a4=1;var e=H(),t=kj(),n=YA(),r=r4(),i=Object.isExtensible;return i4=e(function(){})||r?function(e){return!t(e)||r&&n(e)===`ArrayBuffer`?!1:i?i(e):!0}:i,i4}var s4,c4;function l4(){return c4?s4:(c4=1,s4=!H()(function(){return Object.isExtensible(Object.preventExtensions({}))}),s4)}var u4;function d4(){if(u4)return e4.exports;u4=1;var e=W(),t=U(),n=BF(),r=kj(),i=kM(),a=uN().f,o=lI(),s=fI(),c=o4(),l=MM(),u=l4(),d=!1,f=l(`meta`),p=0,m=function(e){a(e,f,{value:{objectID:`O`+ p++,weakData:{}}})},h=e4.exports={enable:function(){h.enable=function(){},d=!0;var n=o.f,r=t([].splice),i={};i[f]=1,n(i).length&&(o.f=function(e){for(var t=n(e),i=0,a=t.length;i<a;i++)if(t[i]===f){r(t,i,1);break}return t},e({target:`Object`,stat:!0,forced:!0},{getOwnPropertyNames:s.f}))},fastKey:function(e,t){if(!r(e))return typeof e==`symbol`?e:(typeof e==`string`?`S`:`P`)+e;if(!i(e,f)){if(!c(e))return`F`;if(!t)return`E`;m(e)}return e[f].objectID},getWeakData:function(e,t){if(!i(e,f)){if(!c(e))return!0;if(!t)return!1;m(e)}return e[f].weakData},onFreeze:function(e){return u&&d&&c(e)&&!i(e,f)&&m(e),e}};return n[f]=!0,e4.exports}var f4,p4;function m4(){if(p4)return f4;p4=1;var e=FM(),t=iB(),n=e(`iterator`),r=Array.prototype;return f4=function(e){return e!==void 0&&(t.Array===e||r[n]===e)},f4}var h4,g4;function _4(){if(g4)return h4;g4=1;var e=AP(),t=cM(),n=bj(),r=iB(),i=FM()(`iterator`);return h4=function(a){if(!n(a))return t(a,i)||t(a,`@@iterator`)||r[e(a)]},h4}var v4,y4;function b4(){if(y4)return v4;y4=1;var e=cj(),t=aM(),n=cN(),r=nM(),i=_4(),a=TypeError;return v4=function(o,s){var c=arguments.length<2?i(o):s;if(t(c))return n(e(c,o));throw new a(r(o)+` is not iterable`)},v4}var x4,S4;function C4(){if(S4)return x4;S4=1;var e=cj(),t=cN(),n=cM();return x4=function(r,i,a){var o,s;t(r);try{if(o=n(r,`return`),!o){if(i===`throw`)throw a;return a}o=e(o,r)}catch(e){s=!0,o=e}if(i===`throw`)throw a;if(s)throw o;return t(o),a},x4}var w4,T4;function E4(){if(T4)return w4;T4=1;var e=tN(),t=cj(),n=cN(),r=nM(),i=m4(),a=UP(),o=Rj(),s=b4(),c=_4(),l=C4(),u=TypeError,d=function(e,t){this.stopped=e,this.result=t},f=d.prototype;return w4=function(p,m,h){var g=h&&h.that,_=!!(h&&h.AS_ENTRIES),v=!!(h&&h.IS_RECORD),y=!!(h&&h.IS_ITERATOR),b=!!(h&&h.INTERRUPTED),x=e(m,g),S,C,w,T,E,D,O,ee=function(e){return S&&l(S,`normal`),new d(!0,e)},k=function(e){return _?(n(e),b?x(e[0],e[1],ee):x(e[0],e[1])):b?x(e,ee):x(e)};if(v)S=p.iterator;else if(y)S=p;else{if(C=c(p),!C)throw new u(r(p)+` is not iterable`);if(i(C)){for(w=0,T=a(p);T>w;w++)if(E=k(p[w]),E&&o(f,E))return E;return new d(!1)}S=s(p,C)}for(D=v?p.next:S.next;!(O=t(D,S)).done;){try{E=k(O.value)}catch(e){l(S,`throw`,e)}if(typeof E==`object`&&E&&o(f,E))return E}return new d(!1)},w4}var D4,O4;function k4(){if(O4)return D4;O4=1;var e=Rj(),t=TypeError;return D4=function(n,r){if(e(r,n))return n;throw new t(`Incorrect invocation`)},D4}var A4,j4;function M4(){if(j4)return A4;j4=1;var e=W(),t=IA(),n=d4(),r=H(),i=pN(),a=E4(),o=k4(),s=tj(),c=kj(),l=bj(),u=II(),d=uN().f,f=iF().forEach,p=aj(),m=HI(),h=m.set,g=m.getterFor;return A4=function(m,_,v){var y=m.indexOf(`Map`)!==-1,b=m.indexOf(`Weak`)!==-1,x=y?`set`:`add`,S=t[m],C=S&&S.prototype,w={},T;if(!p||!s(S)||!(b||C.forEach&&!r(function(){new S().entries().next()})))T=v.getConstructor(_,m,y,x),n.enable();else{T=_(function(e,t){h(o(e,E),{type:m,collection:new S}),l(t)||a(t,e[x],{that:e,AS_ENTRIES:y})});var E=T.prototype,D=g(m);f([`add`,`clear`,`delete`,`forEach`,`get`,`has`,`set`,`keys`,`values`,`entries`],function(e){var t=e===`add`||e===`set`;e in C&&!(b&&e===`clear`)&&i(E,e,function(n,r){var i=D(this).collection;if(!t&&b&&!c(n))return e===`get`?void 0:!1;var a=i[e](n===0?0:n,r);return t?this:a})}),b||d(E,`size`,{configurable:!0,get:function(){return D(this).collection.size}})}return u(T,m,!1,!0),w[m]=T,e({global:!0,forced:!0},w),b||v.setStrong(T,m,y),T},A4}var N4,P4;function F4(){if(P4)return N4;P4=1;var e=vI();return N4=function(t,n,r){for(var i in n)r&&r.unsafe&&t[i]?t[i]=n[i]:e(t,i,n[i],r);return t},N4}var I4,L4;function R4(){if(L4)return I4;L4=1;var e=Fj(),t=xI(),n=FM(),r=aj(),i=n(`species`);return I4=function(n){var a=e(n);r&&a&&!a[i]&&t(a,i,{configurable:!0,get:function(){return this}})},I4}var z4,B4;function V4(){if(B4)return z4;B4=1;var e=oI(),t=xI(),n=F4(),r=tN(),i=k4(),a=bj(),o=E4(),s=PB(),c=LB(),l=R4(),u=aj(),d=d4().fastKey,f=HI(),p=f.set,m=f.getterFor;return z4={getConstructor:function(s,c,l,f){var h=s(function(t,n){i(t,g),p(t,{type:c,index:e(null),first:null,last:null,size:0}),u||(t.size=0),a(n)||o(n,t[f],{that:t,AS_ENTRIES:l})}),g=h.prototype,_=m(c),v=function(e,t,n){var r=_(e),i=y(e,t),a,o;return i?i.value=n:(r.last=i={index:o=d(t,!0),key:t,value:n,previous:a=r.last,next:null,removed:!1},r.first||=i,a&&(a.next=i),u?r.size++:e.size++,o!==`F`&&(r.index[o]=i)),e},y=function(e,t){var n=_(e),r=d(t),i;if(r!==`F`)return n.index[r];for(i=n.first;i;i=i.next)if(i.key===t)return i};return n(g,{clear:function(){for(var t=this,n=_(t),r=n.first;r;)r.removed=!0,r.previous&&=r.previous.next=null,r=r.next;n.first=n.last=null,n.index=e(null),u?n.size=0:t.size=0},delete:function(e){var t=this,n=_(t),r=y(t,e);if(r){var i=r.next,a=r.previous;delete n.index[r.index],r.removed=!0,a&&(a.next=i),i&&(i.previous=a),n.first===r&&(n.first=i),n.last===r&&(n.last=a),u?n.size--:t.size--}return!!r},forEach:function(e){for(var t=_(this),n=r(e,arguments.length>1?arguments[1]:void 0),i;i=i?i.next:t.first;)for(n(i.value,i.key,this);i&&i.removed;)i=i.previous},has:function(e){return!!y(this,e)}}),n(g,l?{get:function(e){var t=y(this,e);return t&&t.value},set:function(e,t){return v(this,e===0?0:e,t)}}:{add:function(e){return v(this,e=e===0?0:e,e)}}),u&&t(g,`size`,{configurable:!0,get:function(){return _(this).size}}),h},setStrong:function(e,t,n){var r=t+` Iterator`,i=m(t),a=m(r);s(e,t,function(e,t){p(this,{type:r,target:e,state:i(e),kind:t,last:null})},function(){for(var e=a(this),t=e.kind,n=e.last;n&&n.removed;)n=n.previous;return!e.target||!(e.last=n=n?n.next:e.state.first)?(e.target=null,c(void 0,!0)):c(t===`keys`?n.key:t===`values`?n.value:[n.key,n.value],!1)},n?`entries`:`values`,!n,!0),l(t)}},z4}var H4;function U4(){return H4?$2:(H4=1,M4()(`Set`,function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},V4()),$2)}var W4;function G4(){return W4?Q2:(W4=1,U4(),Q2)}var K4={},q4,J4;function Y4(){if(J4)return q4;J4=1;var e=nM(),t=TypeError;return q4=function(n){if(typeof n==`object`&&`size`in n&&`has`in n&&`add`in n&&`delete`in n&&`keys`in n)return n;throw new t(e(n)+` is not a set`)},q4}var X4,Z4;function Q4(){return Z4?X4:(Z4=1,X4=function(e,t){return t===1?function(t,n){return t[e](n)}:function(t,n,r){return t[e](n,r)}},X4)}var $4,e3;function t3(){if(e3)return $4;e3=1;var e=Fj(),t=Q4(),n=e(`Set`),r=n.prototype;return $4={Set:n,add:t(`add`,1),has:t(`has`,1),remove:t(`delete`,1),proto:r},$4}var n3,r3;function i3(){if(r3)return n3;r3=1;var e=cj();return n3=function(t,n,r){for(var i=r?t:t.iterator,a=t.next,o,s;!(o=e(a,i)).done;)if(s=n(o.value),s!==void 0)return s},n3}var a3,o3;function s3(){if(o3)return a3;o3=1;var e=i3();return a3=function(t,n,r){return r?e(t.keys(),n,!0):t.forEach(n)},a3}var c3,l3;function u3(){if(l3)return c3;l3=1;var e=t3(),t=s3(),n=e.Set,r=e.add;return c3=function(e){var i=new n;return t(e,function(e){r(i,e)}),i},c3}var d3,f3;function p3(){return f3?d3:(f3=1,d3=function(e){return e.size},d3)}var m3,h3;function g3(){return h3?m3:(h3=1,m3=function(e){return{iterator:e,next:e.next,done:!1}},m3)}var _3,v3;function y3(){if(v3)return _3;v3=1;var e=aM(),t=cN(),n=cj(),r=LP(),i=g3(),a=`Invalid size`,o=RangeError,s=TypeError,c=Math.max,l=function(t,n){this.set=t,this.size=c(n,0),this.has=e(t.has),this.keys=e(t.keys)};return l.prototype={getIterator:function(){return i(t(n(this.keys,this.set)))},includes:function(e){return n(this.has,this.set,e)}},_3=function(e){t(e);var n=+e.size;if(n!==n)throw new s(a);var i=r(n);if(i<0)throw new o(a);return new l(e,i)},_3}var b3,x3;function S3(){if(x3)return b3;x3=1;var e=Y4(),t=t3(),n=u3(),r=p3(),i=y3(),a=s3(),o=i3(),s=t.has,c=t.remove;return b3=function(t){var l=e(this),u=i(t),d=n(l);return r(l)<=u.size?a(l,function(e){u.includes(e)&&c(d,e)}):o(u.getIterator(),function(e){s(d,e)&&c(d,e)}),d},b3}var C3,w3;function T3(){return w3?C3:(w3=1,C3=function(){return!1},C3)}var E3;function D3(){if(E3)return K4;E3=1;var e=W(),t=S3(),n=H();return e({target:`Set`,proto:!0,real:!0,forced:!T3()(`difference`,function(e){return e.size===0})||n(function(){var e={size:1,has:function(){return!0},keys:function(){var e=0;return{next:function(){var n=e++>1;return t.has(1)&&t.clear(),{done:n,value:2}}}}},t=new Set([1,2,3,4]);return t.difference(e).size!==3})},{difference:t}),K4}var O3={},k3,A3;function j3(){if(A3)return k3;A3=1;var e=Y4(),t=t3(),n=p3(),r=y3(),i=s3(),a=i3(),o=t.Set,s=t.add,c=t.has;return k3=function(t){var l=e(this),u=r(t),d=new o;return n(l)>u.size?a(u.getIterator(),function(e){c(l,e)&&s(d,e)}):i(l,function(e){u.includes(e)&&s(d,e)}),d},k3}var M3;function N3(){if(M3)return O3;M3=1;var e=W(),t=H(),n=j3();return e({target:`Set`,proto:!0,real:!0,forced:!T3()(`intersection`,function(e){return e.size===2&&e.has(1)&&e.has(2)})||t(function(){return String(Array.from(new Set([1,2,3]).intersection(new Set([3,2]))))!==`3,2`})},{intersection:n}),O3}var P3={},F3,I3;function L3(){if(I3)return F3;I3=1;var e=Y4(),t=t3().has,n=p3(),r=y3(),i=s3(),a=i3(),o=C4();return F3=function(s){var c=e(this),l=r(s);if(n(c)<=l.size)return i(c,function(e){if(l.includes(e))return!1},!0)!==!1;var u=l.getIterator();return a(u,function(e){if(t(c,e))return o(u,`normal`,!1)})!==!1},F3}var R3;function z3(){if(R3)return P3;R3=1;var e=W(),t=L3();return e({target:`Set`,proto:!0,real:!0,forced:!T3()(`isDisjointFrom`,function(e){return!e})},{isDisjointFrom:t}),P3}var B3={},V3,H3;function U3(){if(H3)return V3;H3=1;var e=Y4(),t=p3(),n=s3(),r=y3();return V3=function(i){var a=e(this),o=r(i);return t(a)>o.size?!1:n(a,function(e){if(!o.includes(e))return!1},!0)!==!1},V3}var W3;function G3(){if(W3)return B3;W3=1;var e=W(),t=U3();return e({target:`Set`,proto:!0,real:!0,forced:!T3()(`isSubsetOf`,function(e){return e})},{isSubsetOf:t}),B3}var K3={},q3,J3;function Y3(){if(J3)return q3;J3=1;var e=Y4(),t=t3().has,n=p3(),r=y3(),i=i3(),a=C4();return q3=function(o){var s=e(this),c=r(o);if(n(s)<c.size)return!1;var l=c.getIterator();return i(l,function(e){if(!t(s,e))return a(l,`normal`,!1)})!==!1},q3}var X3;function Z3(){if(X3)return K3;X3=1;var e=W(),t=Y3();return e({target:`Set`,proto:!0,real:!0,forced:!T3()(`isSupersetOf`,function(e){return!e})},{isSupersetOf:t}),K3}var Q3={},$3,e6;function t6(){if(e6)return $3;e6=1;var e=Y4(),t=t3(),n=u3(),r=y3(),i=i3(),a=t.add,o=t.has,s=t.remove;return $3=function(t){var c=e(this),l=r(t).getIterator(),u=n(c);return i(l,function(e){o(c,e)?s(u,e):a(u,e)}),u},$3}var n6,r6;function i6(){return r6?n6:(r6=1,n6=function(e){try{var t=new Set,n=t[e]({size:0,has:function(){return!0},keys:function(){return Object.defineProperty({},`next`,{get:function(){return t.clear(),t.add(4),function(){return{done:!0}}}})}});return n.size===1&&n.values().next().value===4}catch{return!1}},n6)}var a6;function o6(){if(a6)return Q3;a6=1;var e=W(),t=t6(),n=i6();return e({target:`Set`,proto:!0,real:!0,forced:!T3()(`symmetricDifference`)||!n(`symmetricDifference`)},{symmetricDifference:t}),Q3}var s6={},c6,l6;function u6(){if(l6)return c6;l6=1;var e=Y4(),t=t3().add,n=u3(),r=y3(),i=i3();return c6=function(a){var o=e(this),s=r(a).getIterator(),c=n(o);return i(s,function(e){t(c,e)}),c},c6}var d6;function f6(){if(d6)return s6;d6=1;var e=W(),t=u6(),n=i6();return e({target:`Set`,proto:!0,real:!0,forced:!T3()(`union`)||!n(`union`)},{union:t}),s6}var p6,m6;function h6(){return m6?p6:(m6=1,BB(),G4(),D3(),N3(),z3(),G3(),Z3(),o6(),f6(),iH(),p6=Mj().Set,p6)}var g6,_6;function v6(){if(_6)return g6;_6=1;var e=h6();return GB(),g6=e,g6}var y6,b6;function x6(){return b6?y6:(b6=1,y6=v6(),y6)}var S6=V(x6()),C6=.001;function w6(e){Y1(e).call(e,(e,t)=>e.data.start-t.data.start)}function T6(e){Y1(e).call(e,(e,t)=>(`end`in e.data?e.data.end:e.data.start)-(`end`in t.data?t.data.end:t.data.start))}function E6(e,t,n,r){return j6(e,t.item,!1,e=>e.stack&&(n||e.top===null),e=>e.stack,()=>t.axis,r)===null}function D6(e,t,n){n.height=j6(e,t.item,!1,e=>e.stack,()=>!0,e=>e.baseTop)-n.top+.5*t.item.vertical}function O6(e,t,n,r){for(let i=0;i<e.length;i++){if(e[i].data.subgroup==null){e[i].top=t.item.vertical;continue}if(e[i].data.subgroup===void 0||!r)continue;let a=0;for(let t in n)!Object.prototype.hasOwnProperty.call(n,t)||n[t].visible!==!0||n[t].index>=n[e[i].data.subgroup].index||(a+=n[t].height,n[e[i].data.subgroup].top=a);e[i].top=a+.5*t.item.vertical}r||k6(e,t,n)}function k6(e,t,n){var r;j6(Y1(r=QK(n)).call(r,(e,t)=>e.index>t.index?1:e.index<t.index?-1:0),{vertical:0},!0,()=>!0,()=>!0,()=>0);for(let r=0;r<e.length;r++)e[r].data.subgroup!==void 0&&(e[r].top=n[e[r].data.subgroup].top+.5*t.item.vertical)}function A6(e,t,n){let r=!1,i=[];for(let e in n)Object.prototype.hasOwnProperty.call(n[e],`index`)?i[n[e].index]=e:i.push(e);for(let a=0;a<i.length;a++){let o=i[a];if(!Object.prototype.hasOwnProperty.call(n,o))continue;r||=n[o].stack,n[o].top=0;for(let e in n)n[e].visible&&n[o].index>n[e].index&&(n[o].top+=n[e].height);let s=e[o];for(let e=0;e<s.length;e++)s[e].data.subgroup!==void 0&&(s[e].top=n[s[e].data.subgroup].top+.5*t.item.vertical,n[o].stack&&(s[e].baseTop=s[e].top));r&&n[o].stack&&D6(e[o],t,n[o])}}function j6(e,t,n,r,i,a,o){let s=e=>e.start,c=e=>e.end;n||(s=e[0]&&e[0].options.rtl?e=>e.right:e=>e.left,c=e=>s(e)+e.width+t.horizontal);let l=[],u=[],d=null,f=0;for(let t of e)if(r(t))l.push(t);else if(i(t)){let e=s(t);d!==null&&e<d-C6&&(f=0),d=e,f=N6(u,t=>s(t)-C6>e,f),_G(u).call(u,f,0,t),f++}d=null;let p=null;f=0;let m=0,h=0,g=0;for(;l.length>0;){var _;let e=l.shift();e.top=a(e);let n=s(e),r=c(e);d!==null&&n<d-C6&&(m=0,h=0,f=0,p=null),(d===null||n>d+C6)&&(m=N6(u,e=>n<c(e)-C6,m)),d=n,(p===null||p<r-C6)&&(h=N6(u,e=>r<s(e)-C6,Math.max(m,h))),p!==null&&p-C6>r&&(h=P6(u,e=>r+C6>=s(e),m,h)+1),p=r;let v=Y1(_=F6(u,e=>n<c(e)-C6,m,h)).call(_,(e,t)=>e.top-t.top);for(let n=0;n<v.length;n++){let r=v[n];M6(e,r,t)&&(e.top=r.top+r.height+t.vertical)}i(e)&&(f=N6(u,e=>s(e)-C6>n,f),_G(u).call(u,f,0,e),f<m&&m++,f<=h&&h++,f++);let y=e.top+e.height;if(y>g&&(g=y),o&&o())return null}return g}function M6(e,t,n){return e.top-n.vertical+C6<t.top+t.height&&e.top+e.height+n.vertical-C6>t.top}function N6(e,t,n){n||=0;for(let r=n;r<e.length;r++)if(t(e[r]))return r;return e.length}function P6(e,t,n,r){n||=0,r||=e.length;for(let i=r-1;i>=n;i--)if(t(e[i]))return i;return n-1}function F6(e,t,n,r){n||=0,r=r?Math.min(r,e.length):e.length;let i=[];for(let a=n;a<r;a++)t(e[a])&&i.push(e[a]);return i}var I6={BACKGROUND:`__background__`},L6=class{constructor(e,t,n){if(this.groupId=e,this.subgroups={},this.subgroupStack={},this.subgroupStackAll=!1,this.subgroupVisibility={},this.doInnerStack=!1,this.shouldBailStackItems=!1,this.subgroupIndex=0,this.subgroupOrderer=t&&t.subgroupOrder,this.itemSet=n,this.isVisible=null,this.height=0,this.stackDirty=!0,this._disposeCallbacks=[],t&&t.nestedGroups&&(this.nestedGroups=t.nestedGroups,t.showNested==0?this.showNested=!1:this.showNested=!0),t&&t.subgroupStack)if(typeof t.subgroupStack==`boolean`)this.doInnerStack=t.subgroupStack,this.subgroupStackAll=t.subgroupStack;else for(let e in t.subgroupStack)Object.prototype.hasOwnProperty.call(t.subgroupStack,e)&&(this.subgroupStack[e]=t.subgroupStack[e],this.doInnerStack=this.doInnerStack||t.subgroupStack[e]);t&&t.heightMode?this.heightMode=t.heightMode:this.heightMode=n.options.groupHeightMode,this.nestedInGroup=null,this.dom={},this.props={label:{width:0,height:0}},this.className=null,this.items={},this.visibleItems=[],this.itemsInRange=[],this.orderedItems={byStart:[],byEnd:[]},this.checkRangedItems=!1;let r=()=>{this.checkRangedItems=!0};this.itemSet.body.emitter.on(`checkRangedItems`,r),this._disposeCallbacks.push(()=>{this.itemSet.body.emitter.off(`checkRangedItems`,r)}),this._create(),this.setData(t)}_create(){let e=document.createElement(`div`);this.itemSet.options.groupEditable.order?e.className=`vis-label draggable`:e.className=`vis-label`,this.dom.label=e;let t=document.createElement(`div`);t.className=`vis-inner`,e.appendChild(t),this.dom.inner=t;let n=document.createElement(`div`);n.className=`vis-group`,n[`vis-group`]=this,this.dom.foreground=n,this.dom.background=document.createElement(`div`),this.dom.background.className=`vis-group`,this.dom.axis=document.createElement(`div`),this.dom.axis.className=`vis-group`,this.dom.marker=document.createElement(`div`),this.dom.marker.style.visibility=`hidden`,this.dom.marker.style.position=`absolute`,this.dom.marker.innerHTML=``,this.dom.background.appendChild(this.dom.marker)}setData(e){if(this.itemSet.groupTouchParams.isDragging)return;let t,n;if(e&&e.subgroupVisibility)for(let t in e.subgroupVisibility)Object.prototype.hasOwnProperty.call(e.subgroupVisibility,t)&&(this.subgroupVisibility[t]=e.subgroupVisibility[t]);if(this.itemSet.options&&this.itemSet.options.groupTemplate){var r;n=K(r=this.itemSet.options.groupTemplate).call(r,this),t=n(e,this.dom.inner)}else t=e&&e.content;if(t instanceof Element){for(;this.dom.inner.firstChild;)this.dom.inner.removeChild(this.dom.inner.firstChild);this.dom.inner.appendChild(t)}else t instanceof Object&&t.isReactComponent||(t instanceof Object?n(e,this.dom.inner):t==null?this.dom.inner.innerHTML=Y.xss(this.groupId||``):this.dom.inner.innerHTML=Y.xss(t));this.dom.label.title=e&&e.title||``,this.dom.inner.firstChild?Y.removeClassName(this.dom.inner,`vis-hidden`):Y.addClassName(this.dom.inner,`vis-hidden`),e&&e.nestedGroups?((!this.nestedGroups||this.nestedGroups!=e.nestedGroups)&&(this.nestedGroups=e.nestedGroups),(e.showNested!==void 0||this.showNested===void 0)&&(e.showNested==0?this.showNested=!1:this.showNested=!0),Y.addClassName(this.dom.label,`vis-nesting-group`),this.showNested?(Y.removeClassName(this.dom.label,`collapsed`),Y.addClassName(this.dom.label,`expanded`)):(Y.removeClassName(this.dom.label,`expanded`),Y.addClassName(this.dom.label,`collapsed`))):this.nestedGroups&&(this.nestedGroups=null,Y.removeClassName(this.dom.label,`collapsed`),Y.removeClassName(this.dom.label,`expanded`),Y.removeClassName(this.dom.label,`vis-nesting-group`)),e&&(e.treeLevel||e.nestedInGroup)?(Y.addClassName(this.dom.label,`vis-nested-group`),e.treeLevel?Y.addClassName(this.dom.label,`vis-group-level-`+e.treeLevel):Y.addClassName(this.dom.label,`vis-group-level-unknown-but-gte1`)):Y.addClassName(this.dom.label,`vis-group-level-0`);let i=e&&e.className||null;i!=this.className&&(this.className&&(Y.removeClassName(this.dom.label,this.className),Y.removeClassName(this.dom.foreground,this.className),Y.removeClassName(this.dom.background,this.className),Y.removeClassName(this.dom.axis,this.className)),Y.addClassName(this.dom.label,i),Y.addClassName(this.dom.foreground,i),Y.addClassName(this.dom.background,i),Y.addClassName(this.dom.axis,i),this.className=i),this.style&&=(Y.removeCssText(this.dom.label,this.style),null),e&&e.style&&(Y.addCssText(this.dom.label,e.style),this.style=e.style)}getLabelWidth(){return this.props.label.width}_didMarkerHeightChange(){let e=this.dom.marker.clientHeight;if(e!=this.lastMarkerHeight){this.lastMarkerHeight=e;let t={},n=0;if(q(Y).call(Y,this.items,(e,r)=>{e.dirty=!0,e.displayed&&(t[r]=e.redraw(!0),n=t[r].length)}),n>0)for(let e=0;e<n;e++)q(Y).call(Y,t,t=>{t[e]()});return!0}else return!1}_calculateGroupSizeAndPosition(){let{offsetTop:e,offsetLeft:t,offsetWidth:n}=this.dom.foreground;this.top=e,this.right=t,this.width=n}_shouldBailItemsRedraw(){let e=this,t=this.itemSet.options.onTimeout,n={relativeBailingTime:this.itemSet.itemsSettingTime,bailTimeMs:t&&t.timeoutMs,userBailFunction:t&&t.callback,shouldBailStackItems:this.shouldBailStackItems},r=null;if(!this.itemSet.initialDrawDone){if(n.shouldBailStackItems)return!0;Math.abs(NW()-new Date(n.relativeBailingTime))>n.bailTimeMs&&(n.userBailFunction&&this.itemSet.userContinueNotBail==null?n.userBailFunction(t=>{e.itemSet.userContinueNotBail=t,r=!t}):r=e.itemSet.userContinueNotBail==0)}return r}_redrawItems(e,t,n,r){if(e||this.stackDirty||this.isVisible&&!t){var i,a,o,s,c,l;let e={byEnd:J(i=this.orderedItems.byEnd).call(i,e=>!e.isCluster),byStart:J(a=this.orderedItems.byStart).call(a,e=>!e.isCluster)},t={byEnd:[...new S6(J(o=nU(s=this.orderedItems.byEnd).call(s,e=>e.cluster)).call(o,e=>!!e))],byStart:[...new S6(J(c=nU(l=this.orderedItems.byStart).call(l,e=>e.cluster)).call(c,e=>!!e))]},h=()=>{var n,i;let a=this._updateItemsInRange(e,J(n=this.visibleItems).call(n,e=>!e.isCluster),r),o=this._updateClustersInRange(t,J(i=this.visibleItems).call(i,e=>e.isCluster),r);return[...a,...o]},g=e=>{let t={};for(let r in this.subgroups){var n;if(!Object.prototype.hasOwnProperty.call(this.subgroups,r))continue;let i=J(n=this.visibleItems).call(n,e=>e.data.subgroup===r);t[r]=e?Y1(i).call(i,(t,n)=>e(t.data,n.data)):i}return t};if(typeof this.itemSet.options.order==`function`){let e=this;if(this.doInnerStack&&this.itemSet.options.stackSubgroups)A6(g(this.itemSet.options.order),n,this.subgroups),this.visibleItems=h(),this._updateSubGroupHeights(n);else{var u,d,f,p;this.visibleItems=h(),this._updateSubGroupHeights(n),this.shouldBailStackItems=E6(Y1(u=J(d=sW(f=this.visibleItems).call(f)).call(d,e=>e.isCluster||!e.isCluster&&!e.cluster)).call(u,(t,n)=>e.itemSet.options.order(t.data,n.data)),n,!0,K(p=this._shouldBailItemsRedraw).call(p,this))}}else if(this.visibleItems=h(),this._updateSubGroupHeights(n),this.itemSet.options.stack)if(this.doInnerStack&&this.itemSet.options.stackSubgroups)A6(g(),n,this.subgroups);else{var m;this.shouldBailStackItems=E6(this.visibleItems,n,!0,K(m=this._shouldBailItemsRedraw).call(m,this))}else O6(this.visibleItems,n,this.subgroups,this.itemSet.options.stackSubgroups);for(let e=0;e<this.visibleItems.length;e++)this.visibleItems[e].repositionX(),this.subgroupVisibility[this.visibleItems[e].data.subgroup]!==void 0&&(this.subgroupVisibility[this.visibleItems[e].data.subgroup]||this.visibleItems[e].hide());this.itemSet.options.cluster&&q(Y).call(Y,this.items,e=>{e.cluster&&e.displayed&&e.hide()}),this.shouldBailStackItems&&this.itemSet.body.emitter.emit(`destroyTimeline`),this.stackDirty=!1}}_didResize(e,t){e=Y.updateProperty(this,`height`,t)||e;let n=this.dom.inner.clientWidth,r=this.dom.inner.clientHeight;return e=Y.updateProperty(this.props.label,`width`,n)||e,e=Y.updateProperty(this.props.label,`height`,r)||e,e}_applyGroupHeight(e){this.dom.background.style.height=`${e}px`,this.dom.foreground.style.height=`${e}px`,this.dom.label.style.height=`${e}px`}_updateItemsVerticalPosition(e){for(let t=0,n=this.visibleItems.length;t<n;t++){let n=this.visibleItems[t];n.repositionY(e),!this.isVisible&&this.groupId!=I6.BACKGROUND&&n.displayed&&n.hide()}}redraw(e,t,n,r){var i,a,o,s,c;let l=!1,u=this.isVisible,d,f=[()=>{n=this._didMarkerHeightChange.call(this)||n},K(i=this._updateSubGroupHeights).call(i,this,t),K(a=this._calculateGroupSizeAndPosition).call(a,this),()=>{var n;this.isVisible=K(n=this._isGroupVisible).call(n,this)(e,t)},()=>{var r;K(r=this._redrawItems).call(r,this)(n,u,t,e)},K(o=this._updateSubgroupsSizes).call(o,this),()=>{var e;d=this.height=K(e=this._calculateHeight).call(e,this)(t)},K(s=this._calculateGroupSizeAndPosition).call(s,this),()=>{var e;l=K(e=this._didResize).call(e,this)(l,d)},()=>{var e;K(e=this._applyGroupHeight).call(e,this)(d)},()=>{var e;K(e=this._updateItemsVerticalPosition).call(e,this)(t)},K(c=()=>(!this.isVisible&&this.height&&(l=!1),l)).call(c,this)];if(r)return f;{let e;return q(f).call(f,t=>{e=t()}),e}}_updateSubGroupHeights(e){if(LU(this.subgroups).length>0){let t=this;this._resetSubgroups(),q(Y).call(Y,this.visibleItems,n=>{n.data.subgroup!==void 0&&(t.subgroups[n.data.subgroup].height=Math.max(t.subgroups[n.data.subgroup].height,n.height+e.item.vertical),t.subgroups[n.data.subgroup].visible=this.subgroupVisibility[n.data.subgroup]===void 0?!0:!!this.subgroupVisibility[n.data.subgroup])})}}_isGroupVisible(e,t){return this.top<=e.body.domProps.centerContainer.height-e.body.domProps.scrollTop+t.axis&&this.top+this.height+t.axis>=-e.body.domProps.scrollTop}_calculateHeight(e){let t,n;if(n=this.heightMode===`fixed`?Y.toArray(this.items):this.visibleItems,!this.isVisible&&this.height)t=Math.max(this.height,this.props.label.height);else if(n.length>0){let r=n[0].top,i=n[0].top+n[0].height;if(q(Y).call(Y,n,e=>{r=Math.min(r,e.top),i=Math.max(i,e.top+e.height)}),r>e.axis){let t=r-e.axis;i-=t,q(Y).call(Y,n,e=>{e.top-=t})}t=Math.ceil(i+e.item.vertical/2),this.heightMode!==`fitItems`&&(t=Math.max(t,this.props.label.height))}else t=this.props.label.height;return t}show(){this.dom.label.parentNode||this.itemSet.dom.labelSet.appendChild(this.dom.label),this.dom.foreground.parentNode||this.itemSet.dom.foreground.appendChild(this.dom.foreground),this.dom.background.parentNode||this.itemSet.dom.background.appendChild(this.dom.background),this.dom.axis.parentNode||this.itemSet.dom.axis.appendChild(this.dom.axis)}hide(){let e=this.dom.label;e.parentNode&&e.parentNode.removeChild(e);let t=this.dom.foreground;t.parentNode&&t.parentNode.removeChild(t);let n=this.dom.background;n.parentNode&&n.parentNode.removeChild(n);let r=this.dom.axis;r.parentNode&&r.parentNode.removeChild(r)}add(e){var t;if(this.items[e.id]=e,e.setParent(this),this.stackDirty=!0,e.data.subgroup!==void 0&&(this._addToSubgroup(e),this.orderSubgroups()),!uK(t=this.visibleItems).call(t,e)){let t=this.itemSet.body.range;this._checkIfVisible(e,this.visibleItems,t)}}_addToSubgroup(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e.data.subgroup;t!=null&&this.subgroups[t]===void 0&&(this.subgroups[t]={height:0,top:0,start:e.data.start,end:e.data.end||e.data.start,visible:!1,index:this.subgroupIndex,items:[],stack:this.subgroupStackAll||this.subgroupStack[t]||!1},this.subgroupIndex++),new Date(e.data.start)<new Date(this.subgroups[t].start)&&(this.subgroups[t].start=e.data.start);let n=e.data.end||e.data.start;new Date(n)>new Date(this.subgroups[t].end)&&(this.subgroups[t].end=n),this.subgroups[t].items.push(e)}_updateSubgroupsSizes(){let e=this;if(e.subgroups)for(let n in e.subgroups){var t;if(!Object.prototype.hasOwnProperty.call(e.subgroups,n))continue;let r=e.subgroups[n].items[0].data.end||e.subgroups[n].items[0].data.start,i=e.subgroups[n].items[0].data.start,a=r-1;q(t=e.subgroups[n].items).call(t,e=>{new Date(e.data.start)<new Date(i)&&(i=e.data.start);let t=e.data.end||e.data.start;new Date(t)>new Date(a)&&(a=t)}),e.subgroups[n].start=i,e.subgroups[n].end=new Date(a-1)}}orderSubgroups(){if(this.subgroupOrderer!==void 0){let e=[];if(typeof this.subgroupOrderer==`string`){for(let t in this.subgroups)Object.prototype.hasOwnProperty.call(this.subgroups,t)&&e.push({subgroup:t,sortField:this.subgroups[t].items[0].data[this.subgroupOrderer]});Y1(e).call(e,(e,t)=>e.sortField-t.sortField)}else if(typeof this.subgroupOrderer==`function`){for(let t in this.subgroups)Object.prototype.hasOwnProperty.call(this.subgroups,t)&&e.push(this.subgroups[t].items[0].data);Y1(e).call(e,this.subgroupOrderer)}if(e.length>0)for(let t=0;t<e.length;t++)this.subgroups[e[t].subgroup].index=t}}_resetSubgroups(){for(let e in this.subgroups)Object.prototype.hasOwnProperty.call(this.subgroups,e)&&(this.subgroups[e].visible=!1,this.subgroups[e].height=0)}remove(e){var t,n;delete this.items[e.id],e.setParent(null),this.stackDirty=!0;let r=Iq(t=this.visibleItems).call(t,e);r!=-1&&_G(n=this.visibleItems).call(n,r,1),e.data.subgroup!==void 0&&(this._removeFromSubgroup(e),this.orderSubgroups())}_removeFromSubgroup(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e.data.subgroup;if(t!=null){let i=this.subgroups[t];if(i){var n;let a=Iq(n=i.items).call(n,e);if(a>=0){var r;_G(r=i.items).call(r,a,1),i.items.length?this._updateSubgroupsSizes():delete this.subgroups[t]}}}}removeFromDataSet(e){this.itemSet.removeItem(e.id)}order(){let e=Y.toArray(this.items),t=[],n=[];for(let r=0;r<e.length;r++)e[r].data.end!==void 0&&n.push(e[r]),t.push(e[r]);this.orderedItems={byStart:t,byEnd:n},w6(this.orderedItems.byStart),T6(this.orderedItems.byEnd)}_updateItemsInRange(e,t,n){let r=[],i={};if(!this.isVisible&&this.height!==void 0&&this.groupId!=I6.BACKGROUND){for(let e=0;e<t.length;e++){var a=t[e];a.displayed&&a.hide()}return r}let o=(n.end-n.start)/4,s=n.start-o,c=n.end+o,l=e=>e<s?-1:e<=c?0:1,u=e=>{let{start:t,end:n}=e;return n<s?-1:t<=c?0:1};if(t.length>0)for(let e=0;e<t.length;e++)this._checkIfVisibleWithReference(t[e],r,i,n);let d=Y.binarySearchCustom(e.byStart,l,`data`,`start`);if(this._traceVisible(d,e.byStart,r,i,e=>e.data.start<s||e.data.start>c),this.checkRangedItems==1){this.checkRangedItems=!1;for(let t=0;t<e.byEnd.length;t++)this._checkIfVisibleWithReference(e.byEnd[t],r,i,n)}else{let t=Y.binarySearchCustom(e.byEnd,u,`data`);this._traceVisible(t,e.byEnd,r,i,e=>e.data.end<s||e.data.start>c)}this._sortVisibleItems(e.byStart,r,i);let f={},p=0;for(let e=0;e<r.length;e++){let t=r[e];t.displayed||(f[e]=t.redraw(!0),p=f[e].length)}if(p>0)for(let e=0;e<p;e++)q(Y).call(Y,f,t=>{t[e]()});for(let e=0;e<r.length;e++)r[e].repositionX();return r}_traceVisible(e,t,n,r,i){if(e!=-1){for(let a=e;a>=0;a--){let e=t[a];if(i(e))break;!(e.isCluster&&!e.hasItems())&&!e.cluster&&r[e.id]===void 0&&(r[e.id]=!0,n.unshift(e))}for(let a=e+1;a<t.length;a++){let e=t[a];if(i(e))break;!(e.isCluster&&!e.hasItems())&&!e.cluster&&r[e.id]===void 0&&(r[e.id]=!0,n.push(e))}}}_sortVisibleItems(e,t,n){t.length=0;for(let r=0;r<e.length;r++){let i=e[r];n[i.id]&&t.push(i)}}_checkIfVisible(e,t,n){e.isVisible(n)?(e.displayed||e.show(),e.repositionX(),t.push(e)):e.displayed&&e.hide()}_checkIfVisibleWithReference(e,t,n,r){e.isVisible(r)?n[e.id]===void 0&&(n[e.id]=!0,t.push(e)):e.displayed&&e.hide()}_updateClustersInRange(e,t,n){let r=[],i={};if(t.length>0)for(let e=0;e<t.length;e++)this._checkIfVisibleWithReference(t[e],r,i,n);for(let t=0;t<e.byStart.length;t++)this._checkIfVisibleWithReference(e.byStart[t],r,i,n);for(let t=0;t<e.byEnd.length;t++)this._checkIfVisibleWithReference(e.byEnd[t],r,i,n);let a={},o=0;for(let e=0;e<r.length;e++){let t=r[e];t.displayed||(a[e]=t.redraw(!0),o=a[e].length)}if(o>0)for(var s=0;s<o;s++)q(Y).call(Y,a,function(e){e[s]()});for(let e=0;e<r.length;e++)r[e].repositionX();return r}changeSubgroup(e,t,n){this._removeFromSubgroup(e,t),this._addToSubgroup(e,n),this.orderSubgroups()}dispose(){this.hide();let e;for(;e=this._disposeCallbacks.pop();)e()}},R6=class extends L6{constructor(e,t,n){super(e,t,n),this.width=0,this.height=0,this.top=0,this.left=0}redraw(e,t){this.visibleItems=this._updateItemsInRange(this.orderedItems,this.visibleItems,e),this.width=this.dom.background.offsetWidth,this.dom.background.style.height=`0`;for(let e=0,n=this.visibleItems.length;e<n;e++)this.visibleItems[e].repositionY(t);return!1}show(){this.dom.background.parentNode||this.itemSet.dom.background.appendChild(this.dom.background)}},z6=class{constructor(e,t,n){var r;this.id=null,this.parent=null,this.data=e,this.dom=null,this.conversion=t||{},this.defaultOptions={locales:M2,locale:`en`},this.options=Y.extend({},this.defaultOptions,n),this.options.locales=Y.extend({},M2,this.options.locales);let i=this.defaultOptions.locales[this.defaultOptions.locale];q(r=LU(this.options.locales)).call(r,e=>{this.options.locales[e]=Y.extend({},i,this.options.locales[e])}),this.selected=!1,this.displayed=!1,this.groupShowing=!0,this.selectable=n&&n.selectable||!1,this.dirty=!0,this.top=null,this.right=null,this.left=null,this.width=null,this.height=null,this.setSelectability(e),this.editable=null,this._updateEditStatus()}select(){this.selectable&&(this.selected=!0,this.dirty=!0,this.displayed&&this.redraw())}unselect(){this.selected=!1,this.dirty=!0,this.displayed&&this.redraw()}setData(e){e.group!=null&&this.data.group!=e.group&&this.parent!=null&&this.parent.itemSet._moveToGroup(this,e.group),this.setSelectability(e),this.parent&&(this.parent.stackDirty=!0),e.subgroup!=null&&this.data.subgroup!=e.subgroup&&this.parent!=null&&this.parent.changeSubgroup(this,this.data.subgroup,e.subgroup),this.data=e,this._updateEditStatus(),this.dirty=!0,this.displayed&&this.redraw()}setSelectability(e){e&&(this.selectable=e.selectable===void 0?!0:!!e.selectable)}setParent(e){this.displayed?(this.hide(),this.parent=e,this.parent&&this.show()):this.parent=e}isVisible(){return!1}show(){return!1}hide(){return!1}redraw(){}repositionX(){}repositionY(){}_repaintDragCenter(){if(this.selected&&this.editable.updateTime&&!this.dom.dragCenter){var e,t;let n=this,r=document.createElement(`div`);r.className=`vis-drag-center`,r.dragCenterItem=this,this.hammerDragCenter=new L0(r),this.hammerDragCenter.on(`tap`,e=>{n.parent.itemSet.body.emitter.emit(`click`,{event:e,item:n.id})}),this.hammerDragCenter.on(`doubletap`,e=>{e.stopPropagation(),n.parent.itemSet._onUpdateItem(n),n.parent.itemSet.body.emitter.emit(`doubleClick`,{event:e,item:n.id})}),this.hammerDragCenter.on(`panstart`,e=>{e.stopPropagation(),n.parent.itemSet._onDragStart(e)}),this.hammerDragCenter.on(`panmove`,K(e=n.parent.itemSet._onDrag).call(e,n.parent.itemSet)),this.hammerDragCenter.on(`panend`,K(t=n.parent.itemSet._onDragEnd).call(t,n.parent.itemSet)),this.hammerDragCenter.get(`press`).set({time:1e4}),this.dom.box?this.dom.dragLeft?this.dom.box.insertBefore(r,this.dom.dragLeft):this.dom.box.appendChild(r):this.dom.point&&this.dom.point.appendChild(r),this.dom.dragCenter=r}else !this.selected&&this.dom.dragCenter&&(this.dom.dragCenter.parentNode&&this.dom.dragCenter.parentNode.removeChild(this.dom.dragCenter),this.dom.dragCenter=null,this.hammerDragCenter&&=(this.hammerDragCenter.destroy(),null))}_repaintDeleteButton(e){let t=(this.options.editable.overrideItems||this.editable==null)&&this.options.editable.remove||!this.options.editable.overrideItems&&this.editable!=null&&this.editable.remove;if(this.selected&&t&&!this.dom.deleteButton){let t=this,n=document.createElement(`div`);this.options.rtl?n.className=`vis-delete-rtl`:n.className=`vis-delete`;let r=this.options.locales[this.options.locale];r||=(this.warned||=(console.warn(`WARNING: options.locales['${this.options.locale}'] not found. See https://visjs.github.io/vis-timeline/docs/timeline/#Localization`),!0),this.options.locales.en),n.title=r.deleteSelected,this.hammerDeleteButton=new L0(n).on(`tap`,e=>{e.stopPropagation(),t.parent.removeFromDataSet(t)}),e.appendChild(n),this.dom.deleteButton=n}else (!this.selected||!t)&&this.dom.deleteButton&&(this.dom.deleteButton.parentNode&&this.dom.deleteButton.parentNode.removeChild(this.dom.deleteButton),this.dom.deleteButton=null,this.hammerDeleteButton&&=(this.hammerDeleteButton.destroy(),null))}_repaintOnItemUpdateTimeTooltip(e){if(!this.options.tooltipOnItemUpdateTime)return;let t=(this.options.editable.updateTime||this.data.editable===!0)&&this.data.editable!==!1;if(this.selected&&t&&!this.dom.onItemUpdateTimeTooltip){let t=document.createElement(`div`);t.className=`vis-onUpdateTime-tooltip`,e.appendChild(t),this.dom.onItemUpdateTimeTooltip=t}else !this.selected&&this.dom.onItemUpdateTimeTooltip&&(this.dom.onItemUpdateTimeTooltip.parentNode&&this.dom.onItemUpdateTimeTooltip.parentNode.removeChild(this.dom.onItemUpdateTimeTooltip),this.dom.onItemUpdateTimeTooltip=null);if(this.dom.onItemUpdateTimeTooltip){this.dom.onItemUpdateTimeTooltip.style.visibility=this.parent.itemSet.touchParams.itemIsDragging?`visible`:`hidden`,this.dom.onItemUpdateTimeTooltip.style.transform=`translateX(-50%)`,this.dom.onItemUpdateTimeTooltip.style.left=`50%`;let e=this.parent.itemSet.body.domProps.scrollTop,t;t=this.options.orientation.item==`top`?this.top:this.parent.height-this.top-this.height,t+this.parent.top-50<-e?(this.dom.onItemUpdateTimeTooltip.style.bottom=``,this.dom.onItemUpdateTimeTooltip.style.top=`${this.height+2}px`):(this.dom.onItemUpdateTimeTooltip.style.top=``,this.dom.onItemUpdateTimeTooltip.style.bottom=`${this.height+2}px`);let r,i;if(this.options.tooltipOnItemUpdateTime&&this.options.tooltipOnItemUpdateTime.template){var n;i=K(n=this.options.tooltipOnItemUpdateTime.template).call(n,this),r=i(this.data)}else r=`start: ${TF(this.data.start).format(`MM/DD/YYYY hh:mm`)}`,this.data.end&&(r+=`<br> end: ${TF(this.data.end).format(`MM/DD/YYYY hh:mm`)}`);this.dom.onItemUpdateTimeTooltip.innerHTML=Y.xss(r)}}_getItemData(){return this.parent.itemSet.itemsData.get(this.id)}_updateContents(e){let t,n,r,i,a,o=this._getItemData(),s=(this.dom.box||this.dom.point).getElementsByClassName(`vis-item-visible-frame`)[0];if(this.options.visibleFrameTemplate){var c;a=K(c=this.options.visibleFrameTemplate).call(c,this),i=Y.xss(a(o,s))}else i=``;if(s){if(i instanceof Object&&!(i instanceof Element))a(o,s);else if(n=this._contentToString(this.itemVisibleFrameContent)!==this._contentToString(i),n){if(i instanceof Element)s.innerHTML=``,s.appendChild(i);else if(i!=null)s.innerHTML=Y.xss(i);else if(!(this.data.type==`background`&&this.data.content===void 0))throw Error(`Property "content" missing in item ${this.id}`);this.itemVisibleFrameContent=i}}if(this.options.template){var l;r=K(l=this.options.template).call(l,this),t=r(o,e,this.data)}else t=this.data.content;if(t instanceof Object&&!(t instanceof Element))r(o,e);else if(n=this._contentToString(this.content)!==this._contentToString(t),n){if(t instanceof Element)e.innerHTML=``,e.appendChild(t);else if(t!=null)e.innerHTML=Y.xss(t);else if(!(this.data.type==`background`&&this.data.content===void 0))throw Error(`Property "content" missing in item ${this.id}`);this.content=t}}_updateDataAttributes(e){if(this.options.dataAttributes&&this.options.dataAttributes.length>0){let t=[];if(G(this.options.dataAttributes))t=this.options.dataAttributes;else if(this.options.dataAttributes==`all`)t=LU(this.data);else return;for(let n of t){let t=this.data[n];t==null?e.removeAttribute(`data-${n}`):e.setAttribute(`data-${n}`,t)}}}_updateStyle(e){this.style&&=(Y.removeCssText(e,this.style),null),this.data.style&&(Y.addCssText(e,this.data.style),this.style=this.data.style)}_contentToString(e){return typeof e==`string`?e:e&&`outerHTML`in e?e.outerHTML:e}_updateEditStatus(){this.options&&(typeof this.options.editable==`boolean`?this.editable={updateTime:this.options.editable,updateGroup:this.options.editable,remove:this.options.editable}:typeof this.options.editable==`object`&&(this.editable={},Y.selectiveExtend([`updateTime`,`updateGroup`,`remove`],this.editable,this.options.editable))),(!this.options||!this.options.editable||this.options.editable.overrideItems!==!0)&&this.data&&(typeof this.data.editable==`boolean`?this.editable={updateTime:this.data.editable,updateGroup:this.data.editable,remove:this.data.editable}:typeof this.data.editable==`object`&&(this.editable={},Y.selectiveExtend([`updateTime`,`updateGroup`,`remove`],this.editable,this.data.editable)))}getWidthLeft(){return 0}getWidthRight(){return 0}getTitle(){if(this.options.tooltip&&this.options.tooltip.template){var e;return K(e=this.options.tooltip.template).call(e,this)(this._getItemData(),this.data)}return this.data.title}};z6.prototype.stack=!0;var B6=class extends z6{constructor(e,t,n){if(super(e,t,n),this.props={dot:{width:0,height:0},line:{width:0,height:0}},e&&e.start==null)throw Error(`Property "start" missing in item ${e}`)}isVisible(e){if(this.cluster)return!1;let t,n=this.data.align||this.options.align,r=this.width*e.getMillisecondsPerPixel();return t=n==`right`?this.data.start.getTime()>e.start&&this.data.start.getTime()-r<e.end:n==`left`?this.data.start.getTime()+r>e.start&&this.data.start.getTime()<e.end:this.data.start.getTime()+r/2>e.start&&this.data.start.getTime()-r/2<e.end,t}_createDomElement(){this.dom||(this.dom={},this.dom.box=document.createElement(`DIV`),this.dom.content=document.createElement(`DIV`),this.dom.content.className=`vis-item-content`,this.dom.box.appendChild(this.dom.content),this.dom.line=document.createElement(`DIV`),this.dom.line.className=`vis-line`,this.dom.dot=document.createElement(`DIV`),this.dom.dot.className=`vis-dot`,this.dom.box[`vis-item`]=this,this.dirty=!0)}_appendDomElement(){if(!this.parent)throw Error(`Cannot redraw item: no parent attached`);if(!this.dom.box.parentNode){let e=this.parent.dom.foreground;if(!e)throw Error(`Cannot redraw item: parent has no foreground container element`);e.appendChild(this.dom.box)}if(!this.dom.line.parentNode){var e=this.parent.dom.background;if(!e)throw Error(`Cannot redraw item: parent has no background container element`);e.appendChild(this.dom.line)}if(!this.dom.dot.parentNode){let t=this.parent.dom.axis;if(!e)throw Error(`Cannot redraw item: parent has no axis container element`);t.appendChild(this.dom.dot)}this.displayed=!0}_updateDirtyDomComponents(){if(this.dirty){this._updateContents(this.dom.content),this._updateDataAttributes(this.dom.box),this._updateStyle(this.dom.box);let e=this.editable.updateTime||this.editable.updateGroup,t=(this.data.className?` `+this.data.className:``)+(this.selected?` vis-selected`:``)+(e?` vis-editable`:` vis-readonly`);this.dom.box.className=`vis-item vis-box${t}`,this.dom.line.className=`vis-item vis-line${t}`,this.dom.dot.className=`vis-item vis-dot${t}`}}_getDomComponentsSizes(){return{previous:{right:this.dom.box.style.right,left:this.dom.box.style.left},dot:{height:this.dom.dot.offsetHeight,width:this.dom.dot.offsetWidth},line:{width:this.dom.line.offsetWidth},box:{width:this.dom.box.offsetWidth,height:this.dom.box.offsetHeight}}}_updateDomComponentsSizes(e){this.options.rtl?this.dom.box.style.right=`0px`:this.dom.box.style.left=`0px`,this.props.dot.height=e.dot.height,this.props.dot.width=e.dot.width,this.props.line.width=e.line.width,this.width=e.box.width,this.height=e.box.height,this.options.rtl?this.dom.box.style.right=e.previous.right:this.dom.box.style.left=e.previous.left,this.dirty=!1}_repaintDomAdditionals(){this._repaintOnItemUpdateTimeTooltip(this.dom.box),this._repaintDragCenter(),this._repaintDeleteButton(this.dom.box)}redraw(e){var t,n,r,i;let a,o=[K(t=this._createDomElement).call(t,this),K(n=this._appendDomElement).call(n,this),K(r=this._updateDirtyDomComponents).call(r,this),()=>{this.dirty&&(a=this._getDomComponentsSizes())},()=>{if(this.dirty){var e;K(e=this._updateDomComponentsSizes).call(e,this)(a)}},K(i=this._repaintDomAdditionals).call(i,this)];if(e)return o;{let e;return q(o).call(o,t=>{e=t()}),e}}show(e){if(!this.displayed)return this.redraw(e)}hide(){if(this.displayed){let e=this.dom;e.box.remove?e.box.remove():e.box.parentNode&&e.box.parentNode.removeChild(e.box),e.line.remove?e.line.remove():e.line.parentNode&&e.line.parentNode.removeChild(e.line),e.dot.remove?e.dot.remove():e.dot.parentNode&&e.dot.parentNode.removeChild(e.dot),this.displayed=!1}}repositionXY(){let e=this.options.rtl,t=function(e,t,n){var r;let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(t===void 0&&n===void 0)return;let a=i?t*-1:t;if(n===void 0){e.style.transform=`translateX(${a}px)`;return}if(t===void 0){e.style.transform=`translateY(${n}px)`;return}e.style.transform=IK(r=`translate(${a}px, `).call(r,n,`px)`)};t(this.dom.box,this.boxX,this.boxY,e),t(this.dom.dot,this.dotX,this.dotY,e),t(this.dom.line,this.lineX,this.lineY,e)}repositionX(){let e=this.conversion.toScreen(this.data.start),t=this.data.align===void 0?this.options.align:this.data.align,n=this.props.line.width,r=this.props.dot.width;t==`right`?(this.boxX=e-this.width,this.lineX=e-n,this.dotX=e-n/2-r/2):t==`left`?(this.boxX=e,this.lineX=e,this.dotX=e+n/2-r/2):(this.boxX=e-this.width/2,this.lineX=this.options.rtl?e-n:e-n/2,this.dotX=e-r/2),this.options.rtl?this.right=this.boxX:this.left=this.boxX,this.repositionXY()}repositionY(){let e=this.options.orientation.item,t=this.dom.line.style;if(e==`top`){let e=this.parent.top+this.top+1;this.boxY=this.top||0,t.height=`${e}px`,t.bottom=``,t.top=`0`}else{let e=this.parent.itemSet.props.height-this.parent.top-this.parent.height+this.top;this.boxY=this.parent.height-this.top-(this.height||0),t.height=`${e}px`,t.top=``,t.bottom=`0`}this.dotY=-this.props.dot.height/2,this.repositionXY()}getWidthLeft(){return this.width/2}getWidthRight(){return this.width/2}},V6=class extends z6{constructor(e,t,n){if(super(e,t,n),this.props={dot:{top:0,width:0,height:0},content:{height:0,marginLeft:0,marginRight:0}},e&&e.start==null)throw Error(`Property "start" missing in item ${e}`)}isVisible(e){if(this.cluster)return!1;let t=this.width*e.getMillisecondsPerPixel();return this.data.start.getTime()+t>e.start&&this.data.start<e.end}_createDomElement(){this.dom||(this.dom={},this.dom.point=document.createElement(`div`),this.dom.content=document.createElement(`div`),this.dom.content.className=`vis-item-content`,this.dom.point.appendChild(this.dom.content),this.dom.dot=document.createElement(`div`),this.dom.point.appendChild(this.dom.dot),this.dom.point[`vis-item`]=this,this.dirty=!0)}_appendDomElement(){if(!this.parent)throw Error(`Cannot redraw item: no parent attached`);if(!this.dom.point.parentNode){let e=this.parent.dom.foreground;if(!e)throw Error(`Cannot redraw item: parent has no foreground container element`);e.appendChild(this.dom.point)}this.displayed=!0}_updateDirtyDomComponents(){if(this.dirty){this._updateContents(this.dom.content),this._updateDataAttributes(this.dom.point),this._updateStyle(this.dom.point);let e=this.editable.updateTime||this.editable.updateGroup,t=(this.data.className?` `+this.data.className:``)+(this.selected?` vis-selected`:``)+(e?` vis-editable`:` vis-readonly`);this.dom.point.className=`vis-item vis-point${t}`,this.dom.dot.className=`vis-item vis-dot${t}`}}_getDomComponentsSizes(){return{dot:{width:this.dom.dot.offsetWidth,height:this.dom.dot.offsetHeight},content:{width:this.dom.content.offsetWidth,height:this.dom.content.offsetHeight},point:{width:this.dom.point.offsetWidth,height:this.dom.point.offsetHeight}}}_updateDomComponentsSizes(e){this.props.dot.width=e.dot.width,this.props.dot.height=e.dot.height,this.props.content.height=e.content.height,this.options.rtl?this.dom.content.style.marginRight=`${this.props.dot.width/2}px`:this.dom.content.style.marginLeft=`${this.props.dot.width/2}px`,this.width=e.point.width,this.height=e.point.height,this.dom.dot.style.top=`${(this.height-this.props.dot.height)/2}px`;let t=this.props.dot.width,n=this.options.rtl?t/2:t/2*-1;this.dom.dot.style.transform=`translateX(${n}px`,this.dirty=!1}_repaintDomAdditionals(){this._repaintOnItemUpdateTimeTooltip(this.dom.point),this._repaintDragCenter(),this._repaintDeleteButton(this.dom.point)}redraw(e){var t,n,r,i;let a,o=[K(t=this._createDomElement).call(t,this),K(n=this._appendDomElement).call(n,this),K(r=this._updateDirtyDomComponents).call(r,this),()=>{this.dirty&&(a=this._getDomComponentsSizes())},()=>{if(this.dirty){var e;K(e=this._updateDomComponentsSizes).call(e,this)(a)}},K(i=this._repaintDomAdditionals).call(i,this)];if(e)return o;{let e;return q(o).call(o,t=>{e=t()}),e}}repositionXY(){let e=this.options.rtl;(function(e,t,n){var r;let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(t===void 0&&n===void 0)return;let a=i?t*-1:t;if(n===void 0){e.style.transform=`translateX(${a}px)`;return}if(t===void 0){e.style.transform=`translateY(${n}px)`;return}e.style.transform=IK(r=`translate(${a}px, `).call(r,n,`px)`)})(this.dom.point,this.pointX,this.pointY,e)}show(e){if(!this.displayed)return this.redraw(e)}hide(){this.displayed&&=(this.dom.point.parentNode&&this.dom.point.parentNode.removeChild(this.dom.point),!1)}repositionX(){let e=this.conversion.toScreen(this.data.start);this.pointX=e,this.options.rtl?this.right=e-this.props.dot.width:this.left=e-this.props.dot.width,this.repositionXY()}repositionY(){this.options.orientation.item==`top`?this.pointY=this.top:this.pointY=this.parent.height-this.top-this.height,this.repositionXY()}getWidthLeft(){return this.props.dot.width}getWidthRight(){return this.props.dot.width}},H6=class extends z6{constructor(e,t,n){if(super(e,t,n),this.props={content:{width:0}},this.overflow=!1,e){if(e.start==null)throw Error(`Property "start" missing in item ${e.id}`);if(e.end==null)throw Error(`Property "end" missing in item ${e.id}`)}}isVisible(e){return this.cluster?!1:this.data.start<e.end&&this.data.end>e.start}_createDomElement(){this.dom||(this.dom={},this.dom.box=document.createElement(`div`),this.dom.frame=document.createElement(`div`),this.dom.frame.className=`vis-item-overflow`,this.dom.box.appendChild(this.dom.frame),this.dom.visibleFrame=document.createElement(`div`),this.dom.visibleFrame.className=`vis-item-visible-frame`,this.dom.box.appendChild(this.dom.visibleFrame),this.dom.content=document.createElement(`div`),this.dom.content.className=`vis-item-content`,this.dom.frame.appendChild(this.dom.content),this.dom.box[`vis-item`]=this,this.dirty=!0)}_appendDomElement(){if(!this.parent)throw Error(`Cannot redraw item: no parent attached`);if(!this.dom.box.parentNode){let e=this.parent.dom.foreground;if(!e)throw Error(`Cannot redraw item: parent has no foreground container element`);e.appendChild(this.dom.box)}this.displayed=!0}_updateDirtyDomComponents(){if(this.dirty){this._updateContents(this.dom.content),this._updateDataAttributes(this.dom.box),this._updateStyle(this.dom.box);let e=this.editable.updateTime||this.editable.updateGroup,t=(this.data.className?` `+this.data.className:``)+(this.selected?` vis-selected`:``)+(e?` vis-editable`:` vis-readonly`);this.dom.box.className=this.baseClassName+t,this.dom.content.style.maxWidth=`none`}}_getDomComponentsSizes(){return this.overflow=window.getComputedStyle(this.dom.frame).overflow!==`hidden`,this.whiteSpace=window.getComputedStyle(this.dom.content).whiteSpace!==`nowrap`,{content:{width:this.dom.content.offsetWidth},box:{height:this.dom.box.offsetHeight}}}_updateDomComponentsSizes(e){this.props.content.width=e.content.width,this.height=e.box.height,this.dom.content.style.maxWidth=``,this.dirty=!1}_repaintDomAdditionals(){this._repaintOnItemUpdateTimeTooltip(this.dom.box),this._repaintDeleteButton(this.dom.box),this._repaintDragCenter(),this._repaintDragLeft(),this._repaintDragRight()}redraw(e){var t,n,r,i;let a,o=[K(t=this._createDomElement).call(t,this),K(n=this._appendDomElement).call(n,this),K(r=this._updateDirtyDomComponents).call(r,this),()=>{if(this.dirty){var e;a=K(e=this._getDomComponentsSizes).call(e,this)()}},()=>{if(this.dirty){var e;K(e=this._updateDomComponentsSizes).call(e,this)(a)}},K(i=this._repaintDomAdditionals).call(i,this)];if(e)return o;{let e;return q(o).call(o,t=>{e=t()}),e}}show(e){if(!this.displayed)return this.redraw(e)}hide(){if(this.displayed){let e=this.dom.box;e.parentNode&&e.parentNode.removeChild(e),this.displayed=!1}}repositionX(e){let t=this.parent.width,n=this.conversion.toScreen(this.data.start),r=this.conversion.toScreen(this.data.end),i=this.data.align===void 0?this.options.align:this.data.align,a,o;this.data.limitSize!==!1&&(e===void 0||e===!0)&&(n<-t&&(n=-t),r>2*t&&(r=2*t));let s=Math.max(Math.round((r-n)*1e3)/1e3,1);switch(this.overflow?(this.options.rtl?this.right=n:this.left=n,this.width=s+this.props.content.width,o=this.props.content.width):(this.options.rtl?this.right=n:this.left=n,this.width=s,o=Math.min(r-n,this.props.content.width)),this.options.rtl?this.dom.box.style.transform=`translateX(${this.right*-1}px)`:this.dom.box.style.transform=`translateX(${this.left}px)`,this.dom.box.style.width=`${s}px`,this.whiteSpace&&(this.height=this.dom.box.offsetHeight),i){case`left`:this.dom.content.style.transform=`translateX(0)`;break;case`right`:if(this.options.rtl){let e=Math.max(s-o,0)*-1;this.dom.content.style.transform=`translateX(${e}px)`}else this.dom.content.style.transform=`translateX(${Math.max(s-o,0)}px)`;break;case`center`:if(this.options.rtl){let e=Math.max((s-o)/2,0)*-1;this.dom.content.style.transform=`translateX(${e}px)`}else this.dom.content.style.transform=`translateX(${Math.max((s-o)/2,0)}px)`;break;default:if(a=this.overflow?r>0?Math.max(-n,0):-o:n<0?-n:0,this.options.rtl){let e=a*-1;this.dom.content.style.transform=`translateX(${e}px)`}else this.dom.content.style.transform=`translateX(${a}px)`}}repositionY(){let e=this.options.orientation.item,t=this.dom.box;e==`top`?t.style.top=`${this.top}px`:t.style.top=`${this.parent.height-this.top-this.height}px`}_repaintDragLeft(){if((this.selected||this.options.itemsAlwaysDraggable.range)&&this.editable.updateTime&&!this.dom.dragLeft){let e=document.createElement(`div`);e.className=`vis-drag-left`,e.dragLeftItem=this,this.dom.box.appendChild(e),this.dom.dragLeft=e}else !this.selected&&!this.options.itemsAlwaysDraggable.range&&this.dom.dragLeft&&(this.dom.dragLeft.parentNode&&this.dom.dragLeft.parentNode.removeChild(this.dom.dragLeft),this.dom.dragLeft=null)}_repaintDragRight(){if((this.selected||this.options.itemsAlwaysDraggable.range)&&this.editable.updateTime&&!this.dom.dragRight){let e=document.createElement(`div`);e.className=`vis-drag-right`,e.dragRightItem=this,this.dom.box.appendChild(e),this.dom.dragRight=e}else !this.selected&&!this.options.itemsAlwaysDraggable.range&&this.dom.dragRight&&(this.dom.dragRight.parentNode&&this.dom.dragRight.parentNode.removeChild(this.dom.dragRight),this.dom.dragRight=null)}};H6.prototype.baseClassName=`vis-item vis-range`;var U6=class extends z6{constructor(e,t,n){if(super(e,t,n),this.props={content:{width:0}},this.overflow=!1,e){if(e.start==null)throw Error(`Property "start" missing in item ${e.id}`);if(e.end==null)throw Error(`Property "end" missing in item ${e.id}`)}}isVisible(e){return this.data.start<e.end&&this.data.end>e.start}_createDomElement(){this.dom||(this.dom={},this.dom.box=document.createElement(`div`),this.dom.frame=document.createElement(`div`),this.dom.frame.className=`vis-item-overflow`,this.dom.box.appendChild(this.dom.frame),this.dom.content=document.createElement(`div`),this.dom.content.className=`vis-item-content`,this.dom.frame.appendChild(this.dom.content),this.dirty=!0)}_appendDomElement(){if(!this.parent)throw Error(`Cannot redraw item: no parent attached`);if(!this.dom.box.parentNode){let e=this.parent.dom.background;if(!e)throw Error(`Cannot redraw item: parent has no background container element`);e.appendChild(this.dom.box)}this.displayed=!0}_updateDirtyDomComponents(){if(this.dirty){this._updateContents(this.dom.content),this._updateDataAttributes(this.dom.content),this._updateStyle(this.dom.box);let e=(this.data.className?` `+this.data.className:``)+(this.selected?` vis-selected`:``);this.dom.box.className=this.baseClassName+e}}_getDomComponentsSizes(){return this.overflow=window.getComputedStyle(this.dom.content).overflow!==`hidden`,{content:{width:this.dom.content.offsetWidth}}}_updateDomComponentsSizes(e){this.props.content.width=e.content.width,this.height=0,this.dirty=!1}_repaintDomAdditionals(){}redraw(e){var t,n,r,i;let a,o=[K(t=this._createDomElement).call(t,this),K(n=this._appendDomElement).call(n,this),K(r=this._updateDirtyDomComponents).call(r,this),()=>{if(this.dirty){var e;a=K(e=this._getDomComponentsSizes).call(e,this)()}},()=>{if(this.dirty){var e;K(e=this._updateDomComponentsSizes).call(e,this)(a)}},K(i=this._repaintDomAdditionals).call(i,this)];if(e)return o;{let e;return q(o).call(o,t=>{e=t()}),e}}repositionY(){let e,t=this.options.orientation.item;if(this.data.subgroup!==void 0){let e=this.data.subgroup;this.dom.box.style.height=`${this.parent.subgroups[e].height}px`,t==`top`?this.dom.box.style.top=`${this.parent.top+this.parent.subgroups[e].top}px`:this.dom.box.style.top=`${this.parent.top+this.parent.height-this.parent.subgroups[e].top-this.parent.subgroups[e].height}px`,this.dom.box.style.bottom=``}else this.parent instanceof R6?(e=Math.max(this.parent.height,this.parent.itemSet.body.domProps.center.height,this.parent.itemSet.body.domProps.centerContainer.height),this.dom.box.style.bottom=t==`bottom`?`0`:``,this.dom.box.style.top=t==`top`?`0`:``):(e=this.parent.height,this.dom.box.style.top=`${this.parent.top}px`,this.dom.box.style.bottom=``);this.dom.box.style.height=`${e}px`}};U6.prototype.baseClassName=`vis-item vis-background`,U6.prototype.stack=!1,U6.prototype.show=H6.prototype.show,U6.prototype.hide=H6.prototype.hide,U6.prototype.repositionX=H6.prototype.repositionX;var W6=class{constructor(e,t){this.container=e,this.overflowMethod=t||`cap`,this.x=0,this.y=0,this.padding=5,this.hidden=!1,this.frame=document.createElement(`div`),this.frame.className=`vis-tooltip`,this.container.appendChild(this.frame)}setPosition(e,t){this.x=bq(e),this.y=bq(t)}setText(e){e instanceof Element?(this.frame.innerHTML=``,this.frame.appendChild(e)):this.frame.innerHTML=Y.xss(e)}show(e){if(e===void 0&&(e=!0),e===!0){var t=this.frame.clientHeight,n=this.frame.clientWidth,r=this.frame.parentNode.clientHeight,i=this.frame.parentNode.clientWidth,a=0,o=0;if(this.overflowMethod==`flip`||this.overflowMethod==`none`){let e=!1,r=!0;this.overflowMethod==`flip`&&(this.y-t<this.padding&&(r=!1),this.x+n>i-this.padding&&(e=!0)),a=e?this.x-n:this.x,o=r?this.y-t:this.y}else o=this.y-t,o+t+this.padding>r&&(o=r-t-this.padding),o<this.padding&&(o=this.padding),a=this.x,a+n+this.padding>i&&(a=i-n-this.padding),a<this.padding&&(a=this.padding);this.frame.style.left=a+`px`,this.frame.style.top=o+`px`,this.frame.style.visibility=`visible`,this.hidden=!1}else this.hide()}hide(){this.hidden=!0,this.frame.style.left=`0`,this.frame.style.top=`0`,this.frame.style.visibility=`hidden`}destroy(){this.frame.parentNode.removeChild(this.frame)}},G6={},K6;function q6(){if(K6)return G6;K6=1;var e=W(),t=iF().every;return e({target:`Array`,proto:!0,forced:!sF()(`every`)},{every:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}}),G6}var J6,Y6;function X6(){return Y6?J6:(Y6=1,q6(),J6=VN()(`Array`,`every`),J6)}var Z6,Q6;function $6(){if(Q6)return Z6;Q6=1;var e=Rj(),t=X6(),n=Array.prototype;return Z6=function(r){var i=r.every;return r===n||e(n,r)&&i===n.every?t:i},Z6}var e8,t8;function n8(){return t8?e8:(t8=1,e8=$6(),e8)}var r8,i8;function a8(){return i8?r8:(i8=1,r8=n8(),r8)}var o8=V(a8()),s8=class e extends z6{constructor(e,t,n){let r=NG({},{fitOnDoubleClick:!0},n,{editable:!1});if(super(e,t,r),this.props={content:{width:0,height:0}},!e||e.uiItems==null)throw Error(`Property "uiItems" missing in item `+e.id);this.id=M$(),this.group=e.group,this._setupRange(),this.emitter=this.data.eventEmitter,this.range=this.data.range,this.attached=!1,this.isCluster=!0,this.data.isCluster=!0}hasItems(){return this.data.uiItems&&this.data.uiItems.length&&this.attached}setUiItems(e){this.detach(),this.data.uiItems=e,this._setupRange(),this.attach()}isVisible(e){let t=this.data.end?this.data.end-this.data.start:0,n=this.width*e.getMillisecondsPerPixel(),r=Math.max(this.data.start.getTime()+t,this.data.start.getTime()+n);return this.data.start<e.end&&r>e.start&&this.hasItems()}getData(){return{isCluster:!0,id:this.id,items:this.data.items||[],data:this.data}}redraw(e){var t,n,r,i,a,o,s,c=[K(t=this._createDomElement).call(t,this),K(n=this._appendDomElement).call(n,this),K(r=this._updateDirtyDomComponents).call(r,this),K(i=function(){this.dirty&&(s=this._getDomComponentsSizes())}).call(i,this),K(a=function(){if(this.dirty){var e;K(e=this._updateDomComponentsSizes).call(e,this)(s)}}).call(a,this),K(o=this._repaintDomAdditionals).call(o,this)];if(e)return c;var l;return q(c).call(c,function(e){l=e()}),l}show(){this.displayed||this.redraw()}hide(){if(this.displayed){var e=this.dom;e.box.parentNode&&e.box.parentNode.removeChild(e.box),this.options.showStipes&&(e.line.parentNode&&e.line.parentNode.removeChild(e.line),e.dot.parentNode&&e.dot.parentNode.removeChild(e.dot)),this.displayed=!1}}repositionX(){let e=this.conversion.toScreen(this.data.start),t=this.data.end?this.conversion.toScreen(this.data.end):0;if(t)this.repositionXWithRanges(e,t);else{let t=this.data.align===void 0?this.options.align:this.data.align;this.repositionXWithoutRanges(e,t)}this.options.showStipes&&(this.dom.line.style.display=this._isStipeVisible()?`block`:`none`,this.dom.dot.style.display=this._isStipeVisible()?`block`:`none`,this._isStipeVisible()&&this.repositionStype(e,t))}repositionStype(e,t){this.dom.line.style.display=`block`,this.dom.dot.style.display=`block`;let n=this.dom.line.offsetWidth,r=this.dom.dot.offsetWidth;if(t){let i=n+e+(t-e)/2,a=i-r/2,o=this.options.rtl?i*-1:i,s=this.options.rtl?a*-1:a;this.dom.line.style.transform=`translateX(${o}px)`,this.dom.dot.style.transform=`translateX(${s}px)`}else{let t=this.options.rtl?e*-1:e,n=this.options.rtl?(e-r/2)*-1:e-r/2;this.dom.line.style.transform=`translateX(${t}px)`,this.dom.dot.style.transform=`translateX(${n}px)`}}repositionXWithoutRanges(e,t){t==`right`?this.options.rtl?(this.right=e-this.width,this.dom.box.style.right=this.right+`px`):(this.left=e-this.width,this.dom.box.style.left=this.left+`px`):t==`left`?this.options.rtl?(this.right=e,this.dom.box.style.right=this.right+`px`):(this.left=e,this.dom.box.style.left=this.left+`px`):this.options.rtl?(this.right=e-this.width/2,this.dom.box.style.right=this.right+`px`):(this.left=e-this.width/2,this.dom.box.style.left=this.left+`px`)}repositionXWithRanges(e,t){let n=Math.round(Math.max(t-e+.5,1));this.options.rtl?this.right=e:this.left=e,this.width=Math.max(n,this.minWidth||0),this.options.rtl?this.dom.box.style.right=this.right+`px`:this.dom.box.style.left=this.left+`px`,this.dom.box.style.width=n+`px`}repositionY(){var e=this.options.orientation.item,t=this.dom.box;if(e==`top`?t.style.top=(this.top||0)+`px`:t.style.top=(this.parent.height-this.top-this.height||0)+`px`,this.options.showStipes){if(e==`top`)this.dom.line.style.top=`0`,this.dom.line.style.height=this.parent.top+this.top+1+`px`,this.dom.line.style.bottom=``;else{var n=this.parent.itemSet.props.height,r=n-this.parent.top-this.parent.height+this.top;this.dom.line.style.top=n-r+`px`,this.dom.line.style.bottom=`0`}this.dom.dot.style.top=-this.dom.dot.offsetHeight/2+`px`}}getWidthLeft(){return this.width/2}getWidthRight(){return this.width/2}move(){this.repositionX(),this.repositionY()}attach(){var e;for(let e of this.data.uiItems)e.cluster=this;this.data.items=nU(e=this.data.uiItems).call(e,e=>e.data),this.attached=!0,this.dirty=!0}detach(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;if(this.hasItems()){for(let e of this.data.uiItems)delete e.cluster;this.attached=!1,e&&this.group&&(this.group.remove(this),this.group=null),this.data.items=[],this.dirty=!0}}_onDoubleClick(){this._fit()}_setupRange(){var e,t,n;let r=nU(e=this.data.uiItems).call(e,e=>({start:e.data.start.valueOf(),end:e.data.end?e.data.end.valueOf():e.data.start.valueOf()}));this.data.min=Math.min(...nU(r).call(r,e=>Math.min(e.start,e.end||e.start))),this.data.max=Math.max(...nU(r).call(r,e=>Math.max(e.start,e.end||e.start)));let i=nU(t=this.data.uiItems).call(t,e=>e.center),a=wU(i).call(i,(e,t)=>e+t,0)/this.data.uiItems.length;E0(n=this.data.uiItems).call(n,e=>e.data.end)?(this.data.start=new Date(this.data.min),this.data.end=new Date(this.data.max)):(this.data.start=new Date(a),this.data.end=null)}_getUiItems(){if(this.data.uiItems&&this.data.uiItems.length){var e;return J(e=this.data.uiItems).call(e,e=>e.cluster===this)}return[]}_createDomElement(){if(!this.dom){if(this.dom={},this.dom.box=document.createElement(`DIV`),this.dom.content=document.createElement(`DIV`),this.dom.content.className=`vis-item-content`,this.dom.box.appendChild(this.dom.content),this.options.showStipes&&(this.dom.line=document.createElement(`DIV`),this.dom.line.className=`vis-cluster-line`,this.dom.line.style.display=`none`,this.dom.dot=document.createElement(`DIV`),this.dom.dot.className=`vis-cluster-dot`,this.dom.dot.style.display=`none`),this.options.fitOnDoubleClick){var t;this.dom.box.ondblclick=K(t=e.prototype._onDoubleClick).call(t,this)}this.dom.box[`vis-item`]=this,this.dirty=!0}}_appendDomElement(){if(!this.parent)throw Error(`Cannot redraw item: no parent attached`);if(!this.dom.box.parentNode){let e=this.parent.dom.foreground;if(!e)throw Error(`Cannot redraw item: parent has no foreground container element`);e.appendChild(this.dom.box)}let e=this.parent.dom.background;if(this.options.showStipes){if(!this.dom.line.parentNode){if(!e)throw Error(`Cannot redraw item: parent has no background container element`);e.appendChild(this.dom.line)}if(!this.dom.dot.parentNode){var t=this.parent.dom.axis;if(!e)throw Error(`Cannot redraw item: parent has no axis container element`);t.appendChild(this.dom.dot)}}this.displayed=!0}_updateDirtyDomComponents(){if(this.dirty){this._updateContents(this.dom.content),this._updateDataAttributes(this.dom.box),this._updateStyle(this.dom.box);let e=this.baseClassName+` `+(this.data.className?` `+this.data.className:``)+(this.selected?` vis-selected`:``)+` vis-readonly`;this.dom.box.className=`vis-item `+e,this.options.showStipes&&(this.dom.line.className=`vis-item vis-cluster-line `+(this.selected?` vis-selected`:``),this.dom.dot.className=`vis-item vis-cluster-dot `+(this.selected?` vis-selected`:``)),this.data.end&&(this.dom.content.style.maxWidth=`none`)}}_getDomComponentsSizes(){let e={previous:{right:this.dom.box.style.right,left:this.dom.box.style.left},box:{width:this.dom.box.offsetWidth,height:this.dom.box.offsetHeight}};return this.options.showStipes&&(e.dot={height:this.dom.dot.offsetHeight,width:this.dom.dot.offsetWidth},e.line={width:this.dom.line.offsetWidth}),e}_updateDomComponentsSizes(e){this.options.rtl?this.dom.box.style.right=`0px`:this.dom.box.style.left=`0px`,this.data.end?this.minWidth=e.box.width:this.width=e.box.width,this.height=e.box.height,this.options.rtl?this.dom.box.style.right=e.previous.right:this.dom.box.style.left=e.previous.left,this.dirty=!1}_repaintDomAdditionals(){this._repaintOnItemUpdateTimeTooltip(this.dom.box)}_isStipeVisible(){return this.minWidth>=this.width||!this.data.end}_getFitRange(){let e=.05*(this.data.max-this.data.min)/2;return{fitStart:this.data.min-e,fitEnd:this.data.max+e}}_fit(){if(this.emitter){let{fitStart:e,fitEnd:t}=this._getFitRange(),n={start:new Date(e),end:new Date(t),animation:!0};this.emitter.emit(`fit`,n)}}_getItemData(){return this.data}};s8.prototype.baseClassName=`vis-item vis-range vis-cluster`;var c8={UNGROUPED:`__ungrouped__`},l8=class{constructor(e){this.itemSet=e,this.groups={},this.cache={},this.cache[-1]=[]}createClusterItem(e,t,n){return new s8(e,t,n)}setItems(e,t){this.items=e||[],this.dataChanged=!0,this.applyOnChangedLevel=!1,t&&t.applyOnChangedLevel&&(this.applyOnChangedLevel=t.applyOnChangedLevel)}updateData(){this.dataChanged=!0,this.applyOnChangedLevel=!1}getClusters(e,t,n){let{maxItems:r,clusterCriteria:i}=typeof n==`boolean`?{}:n;i||=()=>!0,r||=1;let a=-1,o=0;if(t>0){if(t>=1)return[];a=Math.abs(Math.round(Math.log(100/t)/Math.log(2))),o=Math.abs(2**a)}if(this.dataChanged){let e=a!=this.cacheLevel;(!this.applyOnChangedLevel||e)&&(this._dropLevelsCache(),this._filterData())}this.cacheLevel=a;let s=this.cache[a];if(!s){s=[];for(let t in this.groups){if(!Object.prototype.hasOwnProperty.call(this.groups,t))continue;let a=this.groups[t],c=a.length,l=0;for(;l<c;){let t=a[l],c=1,u=l-1;for(;u>=0&&t.center-a[u].center<o/2;)!a[u].cluster&&i(t.data,a[u].data)&&c++,u--;let d=l+1;for(;d<a.length&&a[d].center-t.center<o/2;)i(t.data,a[d].data)&&c++,d++;let f=s.length-1;for(;f>=0&&t.center-s[f].center<o;)t.group==s[f].group&&i(t.data,s[f].data)&&c++,f--;if(c>r){let o=c-r+1,u=[],d=l;for(;u.length<o&&d<a.length;)i(a[l].data,a[d].data)&&u.push(a[d]),d++;let f=this.itemSet.getGroupId(t.data),p=this.itemSet.groups[f]||this.itemSet.groups[c8.UNGROUPED],m=this._getClusterForItems(u,p,e,n);s.push(m),l+=o}else delete t.cluster,l+=1}}this.cache[a]=s}return s}_filterData(){let e={};this.groups=e;for(let t of QK(this.items)){let n=t.parent?t.parent.groupId:``,r=e[n];r||(r=[],e[n]=r),r.push(t),t.data.start&&(t.data.end?t.center=(t.data.start.valueOf()+t.data.end.valueOf())/2:t.center=t.data.start.valueOf())}for(let n in e){var t;Object.prototype.hasOwnProperty.call(e,n)&&Y1(t=e[n]).call(t,(e,t)=>e.center-t.center)}this.dataChanged=!1}_getClusterForItems(e,t,n,r){var i;let a=nU(i=n||[]).call(i,e=>{var t;return{cluster:e,itemsIds:new S6(nU(t=e.data.uiItems).call(t,e=>e.id))}}),o;if(a.length){for(let t of a)if(t.itemsIds.size===e.length&&o8(e).call(e,e=>t.itemsIds.has(e.id))){o=t.cluster;break}}if(o)return o.setUiItems(e),o.group!==t&&(o.group&&o.group.remove(o),t&&(t.add(o),o.group=t)),o;let s=r.titleTemplate||``,c={toScreen:this.itemSet.body.util.toScreen,toTime:this.itemSet.body.util.toTime},l=s.replace(/{count}/,e.length),u=`<div title="`+l+`">`+e.length+`</div>`,d=NG({},r,this.itemSet.options),f={content:u,title:l,group:t,uiItems:e,eventEmitter:this.itemSet.body.emitter,range:this.itemSet.body.range};return o=this.createClusterItem(f,c,d),t&&(t.add(o),o.group=t),o.attach(),o}_dropLevelsCache(){this.cache={},this.cacheLevel=-1,this.cache[this.cacheLevel]=[]}},u8=`__ungrouped__`,d8=`__background__`,f8=class e extends a1{constructor(e,t){super(),this.body=e,this.defaultOptions={type:null,orientation:{item:`bottom`},align:`auto`,stack:!0,stackSubgroups:!0,groupOrderSwap(e,t){let n=t.order;t.order=e.order,e.order=n},groupOrder:`order`,selectable:!0,multiselect:!1,longSelectPressTime:251,itemsAlwaysDraggable:{item:!1,range:!1},editable:{updateTime:!1,updateGroup:!1,add:!1,remove:!1,overrideItems:!1},groupEditable:{order:!1,add:!1,remove:!1},snap:V0.snap,onDropObjectOnItem(e,t,n){n(t)},onAdd(e,t){t(e)},onUpdate(e,t){t(e)},onMove(e,t){t(e)},onRemove(e,t){t(e)},onMoving(e,t){t(e)},onAddGroup(e,t){t(e)},onMoveGroup(e,t){t(e)},onRemoveGroup(e,t){t(e)},margin:{item:{horizontal:10,vertical:10},axis:20},showTooltips:!0,tooltip:{followMouse:!1,overflowMethod:`flip`,delay:500},tooltipOnItemUpdateTime:!1},this.options=Y.extend({},this.defaultOptions),this.options.rtl=t.rtl,this.options.onTimeout=t.onTimeout,this.conversion={toScreen:e.util.toScreen,toTime:e.util.toTime},this.dom={},this.props={},this.hammer=null;let n=this;this.itemsData=null,this.groupsData=null,this.itemsSettingTime=null,this.initialItemSetDrawn=!1,this.userContinueNotBail=null,this.sequentialSelection=!1,this.itemListeners={add(e,t){n._onAdd(t.items),n.options.cluster&&n.clusterGenerator.setItems(n.items,{applyOnChangedLevel:!1}),n.redraw()},update(e,t){n._onUpdate(t.items),n.options.cluster&&n.clusterGenerator.setItems(n.items,{applyOnChangedLevel:!1}),n.redraw()},remove(e,t){n._onRemove(t.items),n.options.cluster&&n.clusterGenerator.setItems(n.items,{applyOnChangedLevel:!1}),n.redraw()}},this.groupListeners={add(e,t,r){if(n._onAddGroups(t.items),n.groupsData&&n.groupsData.length>0){var i;let e=n.groupsData.getDataSet();q(i=e.get()).call(i,t=>{if(t.nestedGroups){var n;t.showNested!=0&&(t.showNested=!0);let i=[];q(n=t.nestedGroups).call(n,n=>{let r=e.get(n);r&&(r.nestedInGroup=t.id,t.showNested==0&&(r.visible=!1),i=IK(i).call(i,r))}),e.update(i,r)}})}},update(e,t){n._onUpdateGroups(t.items)},remove(e,t){n._onRemoveGroups(t.items)}},this.items={},this.groups={},this.groupIds=[],this.selection=[],this.popup=null,this.popupTimer=null,this.touchParams={},this.groupTouchParams={group:null,isDragging:!1},this._create(),this.setOptions(t),this.clusters=[]}_create(){var e,t,n,r,i,a,o,s,c,l,u,d,f,p,m;let h=document.createElement(`div`);h.className=`vis-itemset`,h[`vis-itemset`]=this,this.dom.frame=h;let g=document.createElement(`div`);g.className=`vis-background`,h.appendChild(g),this.dom.background=g;let _=document.createElement(`div`);_.className=`vis-foreground`,h.appendChild(_),this.dom.foreground=_;let v=document.createElement(`div`);v.className=`vis-axis`,this.dom.axis=v;let y=document.createElement(`div`);y.className=`vis-labelset`,this.dom.labelSet=y,this._updateUngrouped();let b=new R6(d8,null,this);b.show(),this.groups[d8]=b,this.hammer=new L0(this.body.dom.centerContainer),this.hammer.on(`hammer.input`,e=>{e.isFirst&&this._onTouch(e)}),this.hammer.on(`panstart`,K(e=this._onDragStart).call(e,this)),this.hammer.on(`panmove`,K(t=this._onDrag).call(t,this)),this.hammer.on(`panend`,K(n=this._onDragEnd).call(n,this)),this.hammer.get(`pan`).set({threshold:5,direction:L0.ALL}),this.hammer.get(`press`).set({time:1e4}),this.hammer.on(`tap`,K(r=this._onSelectItem).call(r,this)),this.hammer.on(`press`,K(i=this._onMultiSelectItem).call(i,this)),this.hammer.get(`press`).set({time:1e4}),this.hammer.on(`doubletap`,K(a=this._onAddItem).call(a,this)),this.options.rtl?this.groupHammer=new L0(this.body.dom.rightContainer):this.groupHammer=new L0(this.body.dom.leftContainer),this.groupHammer.on(`tap`,K(o=this._onGroupClick).call(o,this)),this.groupHammer.on(`panstart`,K(s=this._onGroupDragStart).call(s,this)),this.groupHammer.on(`panmove`,K(c=this._onGroupDrag).call(c,this)),this.groupHammer.on(`panend`,K(l=this._onGroupDragEnd).call(l,this)),this.groupHammer.get(`pan`).set({threshold:5,direction:L0.DIRECTION_VERTICAL}),this.body.dom.centerContainer.addEventListener(`mouseover`,K(u=this._onMouseOver).call(u,this)),this.body.dom.centerContainer.addEventListener(`mouseout`,K(d=this._onMouseOut).call(d,this)),this.body.dom.centerContainer.addEventListener(`mousemove`,K(f=this._onMouseMove).call(f,this)),this.body.dom.centerContainer.addEventListener(`contextmenu`,K(p=this._onDragEnd).call(p,this)),this.body.dom.centerContainer.addEventListener(`mousewheel`,K(m=this._onMouseWheel).call(m,this)),this.show()}setOptions(e){if(e){var t,n;Y.selectiveExtend([`type`,`rtl`,`align`,`order`,`stack`,`stackSubgroups`,`selectable`,`multiselect`,`sequentialSelection`,`multiselectPerGroup`,`longSelectPressTime`,`groupOrder`,`dataAttributes`,`template`,`groupTemplate`,`visibleFrameTemplate`,`hide`,`snap`,`groupOrderSwap`,`showTooltips`,`tooltip`,`tooltipOnItemUpdateTime`,`groupHeightMode`,`onTimeout`],this.options,e),`itemsAlwaysDraggable`in e&&(typeof e.itemsAlwaysDraggable==`boolean`?(this.options.itemsAlwaysDraggable.item=e.itemsAlwaysDraggable,this.options.itemsAlwaysDraggable.range=!1):typeof e.itemsAlwaysDraggable==`object`&&(Y.selectiveExtend([`item`,`range`],this.options.itemsAlwaysDraggable,e.itemsAlwaysDraggable),this.options.itemsAlwaysDraggable.item||(this.options.itemsAlwaysDraggable.range=!1))),`sequentialSelection`in e&&typeof e.sequentialSelection==`boolean`&&(this.options.sequentialSelection=e.sequentialSelection),`orientation`in e&&(typeof e.orientation==`string`?this.options.orientation.item=e.orientation===`top`?`top`:`bottom`:typeof e.orientation==`object`&&`item`in e.orientation&&(this.options.orientation.item=e.orientation.item)),`margin`in e&&(typeof e.margin==`number`?(this.options.margin.axis=e.margin,this.options.margin.item.horizontal=e.margin,this.options.margin.item.vertical=e.margin):typeof e.margin==`object`&&(Y.selectiveExtend([`axis`],this.options.margin,e.margin),`item`in e.margin&&(typeof e.margin.item==`number`?(this.options.margin.item.horizontal=e.margin.item,this.options.margin.item.vertical=e.margin.item):typeof e.margin.item==`object`&&Y.selectiveExtend([`horizontal`,`vertical`],this.options.margin.item,e.margin.item)))),q(t=[`locale`,`locales`]).call(t,t=>{t in e&&(this.options[t]=e[t])}),`editable`in e&&(typeof e.editable==`boolean`?(this.options.editable.updateTime=e.editable,this.options.editable.updateGroup=e.editable,this.options.editable.add=e.editable,this.options.editable.remove=e.editable,this.options.editable.overrideItems=!1):typeof e.editable==`object`&&Y.selectiveExtend([`updateTime`,`updateGroup`,`add`,`remove`,`overrideItems`],this.options.editable,e.editable)),`groupEditable`in e&&(typeof e.groupEditable==`boolean`?(this.options.groupEditable.order=e.groupEditable,this.options.groupEditable.add=e.groupEditable,this.options.groupEditable.remove=e.groupEditable):typeof e.groupEditable==`object`&&Y.selectiveExtend([`order`,`add`,`remove`],this.options.groupEditable,e.groupEditable)),q(n=[`onDropObjectOnItem`,`onAdd`,`onUpdate`,`onRemove`,`onMove`,`onMoving`,`onAddGroup`,`onMoveGroup`,`onRemoveGroup`]).call(n,t=>{let n=e[t];if(n){if(typeof n!=`function`){var r;throw Error(IK(r=`option ${t} must be a function `).call(r,t,`(item, callback)`))}this.options[t]=n}}),e.cluster?(NG(this.options,{cluster:e.cluster}),this.clusterGenerator||=new l8(this),this.clusterGenerator.setItems(this.items,{applyOnChangedLevel:!1}),this.markDirty({refreshItems:!0,restackGroups:!0}),this.redraw()):this.clusterGenerator?(this._detachAllClusters(),this.clusters=[],this.clusterGenerator=null,this.options.cluster=void 0,this.markDirty({refreshItems:!0,restackGroups:!0}),this.redraw()):this.markDirty()}}markDirty(e){this.groupIds=[],e&&(e.refreshItems&&q(Y).call(Y,this.items,e=>{e.dirty=!0,e.displayed&&e.redraw()}),e.restackGroups&&q(Y).call(Y,this.groups,(e,t)=>{t!==d8&&(e.stackDirty=!0)}))}destroy(){this.clearPopupTimer(),this.hide(),this.setItems(null),this.setGroups(null),this.hammer&&this.hammer.destroy(),this.groupHammer&&this.groupHammer.destroy(),this.hammer=null,this.body=null,this.conversion=null}hide(){this.dom.frame.parentNode&&this.dom.frame.parentNode.removeChild(this.dom.frame),this.dom.axis.parentNode&&this.dom.axis.parentNode.removeChild(this.dom.axis),this.dom.labelSet.parentNode&&this.dom.labelSet.parentNode.removeChild(this.dom.labelSet)}show(){this.dom.frame.parentNode||this.body.dom.center.appendChild(this.dom.frame),this.dom.axis.parentNode||this.body.dom.backgroundVertical.appendChild(this.dom.axis),this.dom.labelSet.parentNode||(this.options.rtl?this.body.dom.right.appendChild(this.dom.labelSet):this.body.dom.left.appendChild(this.dom.labelSet))}setPopupTimer(e){this.clearPopupTimer(),e&&(this.popupTimer=wP(function(){e.show()},this.options.tooltip.delay||typeof this.options.tooltip.delay==`number`?this.options.tooltip.delay:500))}clearPopupTimer(){this.popupTimer!=null&&(clearTimeout(this.popupTimer),this.popupTimer=null)}setSelection(e){var t;e??=[],G(e)||(e=[e]);let n=J(t=this.selection).call(t,t=>Iq(e).call(e,t)===-1);for(let e of n){let t=this.getItemById(e);t&&t.unselect()}this.selection=[...e];for(let t of e){let e=this.getItemById(t);e&&e.select()}}getSelection(){var e;return IK(e=this.selection).call(e,[])}getVisibleItems(){let e=this.body.range.getRange(),t,n;this.options.rtl?(t=this.body.util.toScreen(e.start),n=this.body.util.toScreen(e.end)):(n=this.body.util.toScreen(e.start),t=this.body.util.toScreen(e.end));let r=[];for(let e in this.groups){if(!Object.prototype.hasOwnProperty.call(this.groups,e))continue;let i=this.groups[e],a=i.isVisible?i.visibleItems:[];for(let e of a)this.options.rtl?e.right<n&&e.right+e.width>t&&r.push(e.id):e.left<t&&e.left+e.width>n&&r.push(e.id)}return r}getItemsAtCurrentTime(e){let t,n;this.options.rtl?(t=this.body.util.toScreen(e),n=this.body.util.toScreen(e)):(n=this.body.util.toScreen(e),t=this.body.util.toScreen(e));let r=[];for(let e in this.groups){if(!Object.prototype.hasOwnProperty.call(this.groups,e))continue;let i=this.groups[e],a=i.isVisible?i.visibleItems:[];for(let e of a)this.options.rtl?e.right<n&&e.right+e.width>t&&r.push(e.id):e.left<t&&e.left+e.width>n&&r.push(e.id)}return r}getVisibleGroups(){let e=[];for(let t in this.groups)Object.prototype.hasOwnProperty.call(this.groups,t)&&this.groups[t].isVisible&&e.push(t);return e}getItemById(e){var t;return this.items[e]||Z2(t=this.clusters).call(t,t=>t.id===e)}_deselect(e){let t=this.selection;for(let n=0,r=t.length;n<r;n++)if(t[n]==e){_G(t).call(t,n,1);break}}redraw(){let e=this.options.margin,t=this.body.range,n=Y.option.asSize,r=this.options,i=r.orientation.item,a=!1,o=this.dom.frame;this.props.top=this.body.domProps.top.height+this.body.domProps.border.top,this.options.rtl?this.props.right=this.body.domProps.right.width+this.body.domProps.border.right:this.props.left=this.body.domProps.left.width+this.body.domProps.border.left,o.className=`vis-itemset`,this.options.cluster&&this._clusterItems(),a=this._orderGroups()||a;let s=t.end-t.start,c=s!=this.lastVisibleInterval||this.props.width!=this.props.lastWidth,l=t.start!=this.lastRangeStart,u=r.stack!=this.lastStack,d=r.stackSubgroups!=this.lastStackSubgroups,f=c||l||u||d;this.lastVisibleInterval=s,this.lastRangeStart=t.start,this.lastStack=r.stack,this.lastStackSubgroups=r.stackSubgroups,this.props.lastWidth=this.props.width;let p=this._firstGroup(),m={item:e.item,axis:e.axis},h={item:e.item,axis:e.item.vertical/2},g=0,_=e.axis+e.item.vertical;this.groups[d8].redraw(t,h,f);let v={},y=0;if(q(Y).call(Y,this.groups,(e,n)=>{if(n===d8)return;let r=e==p?m:h;v[n]=e.redraw(t,r,f,!0),y=v[n].length}),y>0){let e={};for(let t=0;t<y;t++)q(Y).call(Y,v,(n,r)=>{e[r]=n[t]()});q(Y).call(Y,this.groups,(t,n)=>{n!==d8&&(a=e[n]||a,g+=t.height)}),g=Math.max(g,_)}return g=Math.max(g,_),o.style.height=n(g),this.props.width=o.offsetWidth,this.props.height=g,this.dom.axis.style.top=n(i==`top`?this.body.domProps.top.height+this.body.domProps.border.top:this.body.domProps.top.height+this.body.domProps.centerContainer.height),this.options.rtl?this.dom.axis.style.right=`0`:this.dom.axis.style.left=`0`,this.hammer.get(`press`).set({time:this.options.longSelectPressTime}),this.initialItemSetDrawn=!0,a=this._isResized()||a,a}_firstGroup(){let e=this.options.orientation.item==`top`?0:this.groupIds.length-1,t=this.groupIds[e];return this.groups[t]||this.groups[u8]||null}_updateUngrouped(){let e=this.groups[u8],t,n;if(this.groupsData){if(e)for(n in e.dispose(),delete this.groups[u8],this.items){if(!Object.prototype.hasOwnProperty.call(this.items,n))continue;t=this.items[n],t.parent&&t.parent.remove(t);let e=this.getGroupId(t.data),r=this.groups[e];r&&r.add(t)||t.hide()}}else if(!e){for(n in e=new L6(null,null,this),this.groups[u8]=e,this.items)Object.prototype.hasOwnProperty.call(this.items,n)&&(t=this.items[n],e.add(t));e.show()}}getLabelSet(){return this.dom.labelSet}setItems(e){this.itemsSettingTime=new Date;let t=this,n,r=this.itemsData;if(!e)this.itemsData=null;else if(F$(e))this.itemsData=z$(e);else throw TypeError(`Data must implement the interface of DataSet or DataView`);if(r&&(q(Y).call(Y,this.itemListeners,(e,t)=>{r.off(t,e)}),r.dispose(),n=r.getIds(),this._onRemove(n)),this.itemsData){let e=this.id;q(Y).call(Y,this.itemListeners,(n,r)=>{t.itemsData.on(r,n,e)}),n=this.itemsData.getIds(),this._onAdd(n),this._updateUngrouped()}this.body.emitter.emit(`_change`,{queue:!0})}getItems(){return this.itemsData==null?null:this.itemsData.rawDS}setGroups(e){let t=this,n;if(this.groupsData&&(q(Y).call(Y,this.groupListeners,(e,n)=>{t.groupsData.off(n,e)}),n=this.groupsData.getIds(),this.groupsData=null,this._onRemoveGroups(n)),!e)this.groupsData=null;else if(F$(e))this.groupsData=e;else throw TypeError(`Data must implement the interface of DataSet or DataView`);if(this.groupsData){var r;let e=this.groupsData.getDataSet();q(r=e.get()).call(r,t=>{if(t.nestedGroups){var n;q(n=t.nestedGroups).call(n,n=>{let r=e.get(n);r.nestedInGroup=t.id,t.showNested==0&&(r.visible=!1),e.update(r)})}});let i=this.id;q(Y).call(Y,this.groupListeners,(e,n)=>{t.groupsData.on(n,e,i)}),n=this.groupsData.getIds(),this._onAddGroups(n)}this._updateUngrouped(),this._order(),this.options.cluster&&(this.clusterGenerator.updateData(),this._clusterItems(),this.markDirty({refreshItems:!0,restackGroups:!0})),this.body.emitter.emit(`_change`,{queue:!0})}getGroups(){return this.groupsData}removeItem(e){let t=this.itemsData.get(e);t&&this.options.onRemove(t,t=>{t&&this.itemsData.remove(e)})}_getType(e){return e.type||this.options.type||(e.end?`range`:`box`)}getGroupId(e){return this._getType(e)==`background`&&e.group==null?d8:this.groupsData?e.group:u8}_onUpdate(t){let n=this;q(t).call(t,t=>{let r=n.itemsData.get(t),i=n.items[t],a=r?n._getType(r):null,o=e.types[a],s;if(i&&(!o||!(i instanceof o)?(s=i.selected,n._removeItem(i),i=null):n._updateItem(i,r)),!i&&r)if(o)i=new o(r,n.conversion,n.options),i.id=t,n._addItem(i),s&&(this.selection.push(t),i.select());else throw TypeError(`Unknown item type "${a}"`)}),this._order(),this.options.cluster&&(this.clusterGenerator.setItems(this.items,{applyOnChangedLevel:!1}),this._clusterItems()),this.body.emitter.emit(`_change`,{queue:!0})}_onRemove(e){let t=0,n=this;q(e).call(e,e=>{let r=n.items[e];r&&(t++,n._removeItem(r))}),t&&(this._order(),this.body.emitter.emit(`_change`,{queue:!0}))}_order(){q(Y).call(Y,this.groups,e=>{e.order()})}_onUpdateGroups(e){this._onAddGroups(e)}_onAddGroups(e){let t=this;q(e).call(e,e=>{let n=t.groupsData.get(e),r=t.groups[e];if(r)r.setData(n);else{if(e==u8||e==d8)throw Error(`Illegal group id. ${e} is a reserved id.`);let i=cJ(t.options);Y.extend(i,{height:null}),r=new L6(e,n,t),t.groups[e]=r;for(let n in t.items){if(!Object.prototype.hasOwnProperty.call(t.items,n))continue;let i=t.items[n];i.data.group==e&&r.add(i)}r.order(),r.show()}}),this.body.emitter.emit(`_change`,{queue:!0})}_onRemoveGroups(e){q(e).call(e,e=>{let t=this.groups[e];t&&(t.dispose(),delete this.groups[e])}),this.options.cluster&&(this.clusterGenerator.updateData(),this._clusterItems()),this.markDirty({restackGroups:!!this.options.cluster}),this.body.emitter.emit(`_change`,{queue:!0})}_orderGroups(){if(this.groupsData){let e=this.groupsData.getIds({order:this.options.groupOrder});e=this._orderNestedGroups(e);let t=!Y.equalArray(e,this.groupIds);if(t){let t=this.groups;q(e).call(e,e=>{t[e].hide()}),q(e).call(e,e=>{t[e].show()}),this.groupIds=e}return t}else return!1}_orderNestedGroups(e){function t(e,n){let r=[];return q(n).call(n,n=>{if(r.push(n),e.groupsData.get(n).nestedGroups){var i;let a=nU(i=e.groupsData.get({filter(e){return e.nestedInGroup==n},order:e.options.groupOrder})).call(i,e=>e.id);r=IK(r).call(r,t(e,a))}}),r}let n=J(e).call(e,e=>!this.groupsData.get(e).nestedInGroup);return t(this,n)}_addItem(e){this.items[e.id]=e;let t=this.getGroupId(e.data),n=this.groups[t];n?n&&n.data&&n.data.showNested&&(e.groupShowing=!0):e.groupShowing=!1,n&&n.add(e)}_updateItem(e,t){e.setData(t);let n=this.getGroupId(e.data),r=this.groups[n];r?r&&r.data&&r.data.showNested&&(e.groupShowing=!0):e.groupShowing=!1}_removeItem(e){var t,n;e.hide(),delete this.items[e.id];let r=Iq(t=this.selection).call(t,e.id);r!=-1&&_G(n=this.selection).call(n,r,1),e.parent&&e.parent.remove(e),this.popup!=null&&this.popup.hide()}_constructByEndArray(e){let t=[];for(let n=0;n<e.length;n++)e[n]instanceof H6&&t.push(e[n]);return t}_onTouch(e){this.touchParams.item=this.itemFromTarget(e),this.touchParams.dragLeftItem=e.target.dragLeftItem||!1,this.touchParams.dragRightItem=e.target.dragRightItem||!1,this.touchParams.itemProps=null}_getGroupIndex(e){for(let t=0;t<this.groupIds.length;t++)if(e==this.groupIds[t])return t}_onDragStart(e){if(this.touchParams.itemIsDragging)return;let t=this.touchParams.item||null,n=this,r;if(t&&(t.selected||this.options.itemsAlwaysDraggable.item)){if(this.options.editable.overrideItems&&!this.options.editable.updateTime&&!this.options.editable.updateGroup||t.editable!=null&&!t.editable.updateTime&&!t.editable.updateGroup&&!this.options.editable.overrideItems)return;let i=this.touchParams.dragLeftItem,a=this.touchParams.dragRightItem;if(this.touchParams.itemIsDragging=!0,this.touchParams.selectedItem=t,i)r={item:i,initialX:e.center.x,dragLeft:!0,data:this._cloneItemData(t.data)},this.touchParams.itemProps=[r];else if(a)r={item:a,initialX:e.center.x,dragRight:!0,data:this._cloneItemData(t.data)},this.touchParams.itemProps=[r];else if(this.options.editable.add&&(e.srcEvent.ctrlKey||e.srcEvent.metaKey))this._onDragStartAddItem(e);else{this.groupIds.length<1&&this.redraw();let r=this._getGroupIndex(t.data.group),i=this.options.itemsAlwaysDraggable.item&&!t.selected?[t.id]:this.getSelection();this.touchParams.itemProps=nU(i).call(i,t=>{let i=n.items[t],a=n._getGroupIndex(i.data.group);return{item:i,initialX:e.center.x,groupOffset:r-a,data:this._cloneItemData(i.data)}})}e.stopPropagation()}else this.options.editable.add&&(e.srcEvent.ctrlKey||e.srcEvent.metaKey)&&this._onDragStartAddItem(e)}_onDragStartAddItem(e){let t=this.options.snap||null,n=this.dom.frame.getBoundingClientRect(),r=this.options.rtl?n.right-e.center.x+10:e.center.x-n.left-10,i=this.body.util.toTime(r),a=this.body.util.getScale(),o=this.body.util.getStep(),s=t?t(i,a,o):i,c={type:`range`,start:s,end:s,content:`new item`},l=M$();c[this.itemsData.idProp]=l;let u=this.groupFromTarget(e);u&&(c.group=u.groupId);let d=new H6(c,this.conversion,this.options);d.id=l,d.data=this._cloneItemData(c),this._addItem(d),this.touchParams.selectedItem=d;let f={item:d,initialX:e.center.x,data:d.data};this.options.rtl?f.dragLeft=!0:f.dragRight=!0,this.touchParams.itemProps=[f],e.stopPropagation()}_onDrag(e){if(this.popup!=null&&this.options.showTooltips&&!this.popup.hidden){let t=this.body.dom.centerContainer,n=t.getBoundingClientRect();this.popup.setPosition(e.center.x-n.left+t.offsetLeft,e.center.y-n.top+t.offsetTop),this.popup.show()}if(this.touchParams.itemProps){var t;e.stopPropagation();let n=this,r=this.options.snap||null,i=this.body.dom.root.offsetLeft,a=this.options.rtl?i+this.body.domProps.right.width:i+this.body.domProps.left.width,o=this.body.util.getScale(),s=this.body.util.getStep(),c=this.touchParams.selectedItem,l=(this.options.editable.overrideItems||c.editable==null)&&this.options.editable.updateGroup||!this.options.editable.overrideItems&&c.editable!=null&&c.editable.updateGroup,u=null;if(l&&c&&c.data.group!=null){let t=n.groupFromTarget(e);t&&(u=this._getGroupIndex(t.groupId))}q(t=this.touchParams.itemProps).call(t,t=>{let i=n.body.util.toTime(e.center.x-a),d=n.body.util.toTime(t.initialX-a),f,p,m,h,g;f=this.options.rtl?-(i-d):i-d;let _=this._cloneItemData(t.item.data);if(!(t.item.editable!=null&&!t.item.editable.updateTime&&!t.item.editable.updateGroup&&!n.options.editable.overrideItems)){if((this.options.editable.overrideItems||c.editable==null)&&this.options.editable.updateTime||!this.options.editable.overrideItems&&c.editable!=null&&c.editable.updateTime){if(t.dragLeft)this.options.rtl?_.end!=null&&(m=Y.convert(t.data.end,`Date`),g=new Date(m.valueOf()+f),_.end=r?r(g,o,s):g):_.start!=null&&(p=Y.convert(t.data.start,`Date`),h=new Date(p.valueOf()+f),_.start=r?r(h,o,s):h);else if(t.dragRight)this.options.rtl?_.start!=null&&(p=Y.convert(t.data.start,`Date`),h=new Date(p.valueOf()+f),_.start=r?r(h,o,s):h):_.end!=null&&(m=Y.convert(t.data.end,`Date`),g=new Date(m.valueOf()+f),_.end=r?r(g,o,s):g);else if(_.start!=null)if(p=Y.convert(t.data.start,`Date`).valueOf(),h=new Date(p+f),_.end!=null){m=Y.convert(t.data.end,`Date`);let e=m.valueOf()-p.valueOf();_.start=r?r(h,o,s):h,_.end=new Date(_.start.valueOf()+e)}else _.start=r?r(h,o,s):h}if(l&&!t.dragLeft&&!t.dragRight&&u!=null&&_.group!=null){let e=u-t.groupOffset;e=Math.max(0,e),e=Math.min(n.groupIds.length-1,e),_.group=n.groupIds[e]}_=this._cloneItemData(_),n.options.onMoving(_,e=>{e&&t.item.setData(this._cloneItemData(e,`Date`))})}}),this.body.emitter.emit(`_change`)}}_moveToGroup(e,t){let n=this.groups[t];if(n&&n.groupId!=e.data.group){let t=e.parent;t.remove(e),t.order(),e.data.group=n.groupId,n.add(e),n.order()}}_onDragEnd(e){if(this.touchParams.itemIsDragging=!1,this.touchParams.itemProps){e.stopPropagation();let t=this,n=this.touchParams.itemProps;this.touchParams.itemProps=null,q(n).call(n,e=>{let n=e.item.id;if(t.itemsData.get(n)==null)t.options.onAdd(e.item.data,n=>{t._removeItem(e.item),n&&t.itemsData.add(n),t.body.emitter.emit(`_change`)});else{let r=this._cloneItemData(e.item.data);t.options.onMove(r,r=>{r?(r[this.itemsData.idProp]=n,this.itemsData.update(r)):(e.item.setData(e.data),t.body.emitter.emit(`_change`))})}})}}_onGroupClick(e){let t=this.groupFromTarget(e);wP(()=>{this.toggleGroupShowNested(t)},1)}toggleGroupShowNested(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:void 0;if(!e||!e.nestedGroups)return;let n=this.groupsData.getDataSet();t==null?e.showNested=!e.showNested:e.showNested=!!t;let r=n.get(e.groupId);r.showNested=e.showNested;let i=e.nestedGroups,a=i;for(;a.length>0;){let e=a;a=[];for(let t=0;t<e.length;t++){let r=n.get(e[t]);r.nestedGroups&&(a=IK(a).call(a,r.nestedGroups))}a.length>0&&(i=IK(i).call(i,a))}var o;if(r.showNested){var s=n.get(r.nestedGroups);for(let e=0;e<s.length;e++){let t=s[e];t.nestedGroups&&t.nestedGroups.length>0&&(t.showNested==null||t.showNested==1)&&s.push(...n.get(t.nestedGroups))}o=nU(s).call(s,function(e){return e.visible??=!0,e.visible=!!r.showNested,e})}else{var c;o=nU(c=n.get(i)).call(c,function(e){return e.visible??=!0,e.visible=!!r.showNested,e})}n.update(IK(o).call(o,r)),r.showNested?(Y.removeClassName(e.dom.label,`collapsed`),Y.addClassName(e.dom.label,`expanded`)):(Y.removeClassName(e.dom.label,`expanded`),Y.addClassName(e.dom.label,`collapsed`))}toggleGroupDragClassName(e){e.dom.label.classList.toggle(`vis-group-is-dragging`),e.dom.foreground.classList.toggle(`vis-group-is-dragging`)}_onGroupDragStart(e){this.groupTouchParams.isDragging||this.options.groupEditable.order&&(this.groupTouchParams.group=this.groupFromTarget(e),this.groupTouchParams.group&&(e.stopPropagation(),this.groupTouchParams.isDragging=!0,this.toggleGroupDragClassName(this.groupTouchParams.group),this.groupTouchParams.originalOrder=this.groupsData.getIds({order:this.options.groupOrder})))}_onGroupDrag(e){if(this.options.groupEditable.order&&this.groupTouchParams.group){e.stopPropagation();let t=this.groupsData.getDataSet(),n=this.groupFromTarget(e);if(n&&n.height!=this.groupTouchParams.group.height){let t=n.top<this.groupTouchParams.group.top,r=e.center?e.center.y:e.clientY,i=n.dom.foreground.getBoundingClientRect(),a=this.groupTouchParams.group.height;if(t){if(i.top+a<r)return}else{let e=n.height;if(i.top+e-a>r)return}}if(n&&n!=this.groupTouchParams.group){let e=t.get(n.groupId),r=t.get(this.groupTouchParams.group.groupId);r&&e&&(this.options.groupOrderSwap(r,e,t),t.update(r),t.update(e));let i=t.getIds({order:this.options.groupOrder});if(!Y.equalArray(i,this.groupTouchParams.originalOrder)){let e=this.groupTouchParams.originalOrder,n=this.groupTouchParams.group.groupId,r=Math.min(e.length,i.length),a=0,o=0,s=0;for(;a<r;){for(;a+o<r&&a+s<r&&i[a+o]==e[a+s];)a++;if(a+o>=r)break;if(i[a+o]==n)o=1;else if(e[a+s]==n)s=1;else{let n=Iq(i).call(i,e[a+s]),r=t.get(i[a+o]),c=t.get(e[a+s]);this.options.groupOrderSwap(r,c,t),t.update(r),t.update(c);let l=i[a+o];i[a+o]=e[a+s],i[n]=l,a++}}}}}}_onGroupDragEnd(e){if(this.groupTouchParams.isDragging=!1,this.options.groupEditable.order&&this.groupTouchParams.group){e.stopPropagation();let t=this,n=t.groupTouchParams.group.groupId,r=t.groupsData.getDataSet(),i=Y.extend({},r.get(n));t.options.onMoveGroup(i,e=>{if(e)e[r._idProp]=n,r.update(e);else{let e=r.getIds({order:t.options.groupOrder});if(!Y.equalArray(e,t.groupTouchParams.originalOrder)){let n=t.groupTouchParams.originalOrder,i=Math.min(n.length,e.length),a=0;for(;a<i;){for(;a<i&&e[a]==n[a];)a++;if(a>=i)break;let o=Iq(e).call(e,n[a]),s=r.get(e[a]),c=r.get(n[a]);t.options.groupOrderSwap(s,c,r),r.update(s),r.update(c);let l=e[a];e[a]=n[a],e[o]=l,a++}}}}),t.body.emitter.emit(`groupDragged`,{groupId:n}),this.toggleGroupDragClassName(this.groupTouchParams.group),this.groupTouchParams.group=null}}_onSelectItem(e){if(!this.options.selectable)return;let t=e.srcEvent&&(e.srcEvent.ctrlKey||e.srcEvent.metaKey),n=e.srcEvent&&e.srcEvent.shiftKey;if(t||n){this._onMultiSelectItem(e);return}let r=this.getSelection(),i=this.itemFromTarget(e),a=i&&i.selectable?[i.id]:[];this.setSelection(a);let o=this.getSelection();(o.length>0||r.length>0)&&this.body.emitter.emit(`select`,{items:o,event:e})}_onMouseOver(e){let t=this.itemFromTarget(e);if(!t||t===this.itemFromRelatedTarget(e))return;let n=t.getTitle();if(this.options.showTooltips&&n){this.popup??=new W6(this.body.dom.root,this.options.tooltip.overflowMethod||`flip`),this.popup.setText(n);let t=this.body.dom.centerContainer,r=t.getBoundingClientRect();this.popup.setPosition(e.clientX-r.left+t.offsetLeft,e.clientY-r.top+t.offsetTop),this.setPopupTimer(this.popup)}else this.clearPopupTimer(),this.popup!=null&&this.popup.hide();this.body.emitter.emit(`itemover`,{item:t.id,event:e})}_onMouseOut(e){let t=this.itemFromTarget(e);t&&t!==this.itemFromRelatedTarget(e)&&(this.clearPopupTimer(),this.popup!=null&&this.popup.hide(),this.body.emitter.emit(`itemout`,{item:t.id,event:e}))}_onMouseMove(e){if(this.itemFromTarget(e)&&(this.popupTimer!=null&&this.setPopupTimer(this.popup),this.options.showTooltips&&this.options.tooltip.followMouse&&this.popup&&!this.popup.hidden)){let t=this.body.dom.centerContainer,n=t.getBoundingClientRect();this.popup.setPosition(e.clientX-n.left+t.offsetLeft,e.clientY-n.top+t.offsetTop),this.popup.show()}}_onMouseWheel(e){this.touchParams.itemIsDragging&&this._onDragEnd(e)}_onUpdateItem(e){if(!this.options.selectable||!this.options.editable.updateTime&&!this.options.editable.updateGroup)return;let t=this;if(e){let n=t.itemsData.get(e.id);this.options.onUpdate(n,e=>{e&&t.itemsData.update(e)})}}_onDropObjectOnItem(e){let t=this.itemFromTarget(e),n=JSON.parse(e.dataTransfer.getData(`text`));this.options.onDropObjectOnItem(n,t)}_onAddItem(e){if(!this.options.selectable||!this.options.editable.add)return;let t=this,n=this.options.snap||null,r=this.dom.frame.getBoundingClientRect(),i=this.options.rtl?r.right-e.center.x:e.center.x-r.left,a=this.body.util.toTime(i),o=this.body.util.getScale(),s=this.body.util.getStep(),c,l;e.type==`drop`?(l=JSON.parse(e.dataTransfer.getData(`text`)),l.content=l.content?l.content:`new item`,l.start=l.start?l.start:n?n(a,o,s):a,l.type=l.type||`box`,l[this.itemsData.idProp]=l.id||M$(),l.type==`range`&&!l.end&&(c=this.body.util.toTime(i+this.props.width/5),l.end=n?n(c,o,s):c)):(l={start:n?n(a,o,s):a,content:`new item`},l[this.itemsData.idProp]=M$(),this.options.type===`range`&&(c=this.body.util.toTime(i+this.props.width/5),l.end=n?n(c,o,s):c));let u=this.groupFromTarget(e);u&&(l.group=u.groupId),l=this._cloneItemData(l),this.options.onAdd(l,n=>{n&&(t.itemsData.add(n),e.type==`drop`&&t.setSelection([n.id]))})}_onMultiSelectItem(t){if(!this.options.selectable)return;let n=this.itemFromTarget(t);if(n){let r=this.options.multiselect?this.getSelection():[];if((t.srcEvent&&t.srcEvent.shiftKey||this.options.sequentialSelection)&&this.options.multiselect){let t=this.itemsData.get(n.id).group,i;this.options.multiselectPerGroup&&r.length>0&&(i=this.itemsData.get(r[0]).group),(!this.options.multiselectPerGroup||i==null||i==t)&&r.push(n.id);let a=e._getItemRange(this.itemsData.get(r));if(!this.options.multiselectPerGroup||i==t){r=[];for(let e in this.items){if(!Object.prototype.hasOwnProperty.call(this.items,e))continue;let t=this.items[e],n=t.data.start,o=t.data.end===void 0?n:t.data.end;n>=a.min&&o<=a.max&&(!this.options.multiselectPerGroup||i==this.itemsData.get(t.id).group)&&!(t instanceof U6)&&r.push(t.id)}}}else{let e=Iq(r).call(r,n.id);e==-1?r.push(n.id):_G(r).call(r,e,1)}let i=J(r).call(r,e=>this.getItemById(e).selectable);this.setSelection(i),this.body.emitter.emit(`select`,{items:this.getSelection(),event:t})}}static _getItemRange(e){let t=null,n=null;return q(e).call(e,e=>{(n==null||e.start<n)&&(n=e.start),e.end==null?(t==null||e.start>t)&&(t=e.start):(t==null||e.end>t)&&(t=e.end)}),{min:n,max:t}}itemFromElement(e){let t=e;for(;t;){if(Object.prototype.hasOwnProperty.call(t,`vis-item`))return t[`vis-item`];t=t.parentNode}return null}itemFromTarget(e){return this.itemFromElement(e.target)}itemFromRelatedTarget(e){return this.itemFromElement(e.relatedTarget)}groupFromTarget(e){let t=e.center?e.center.y:e.clientY,n=this.groupIds;n.length<=0&&this.groupsData&&(n=this.groupsData.getIds({order:this.options.groupOrder}));for(let e=0;e<n.length;e++){let r=n[e],i=this.groups[r],a=i.dom.foreground,o=a.getBoundingClientRect();if(t>=o.top&&t<o.top+a.offsetHeight)return i;if(this.options.orientation.item===`top`){if(e===this.groupIds.length-1&&t>o.top)return i}else if(e===0&&t<o.top+a.offset)return i}return null}static itemSetFromTarget(e){let t=e.target;for(;t;){if(Object.prototype.hasOwnProperty.call(t,`vis-itemset`))return t[`vis-itemset`];t=t.parentNode}return null}_cloneItemData(e,t){let n=Y.extend({},e);return t||=this.itemsData.type,n.start!=null&&(n.start=Y.convert(n.start,t&&t.start||`Date`)),n.end!=null&&(n.end=Y.convert(n.end,t&&t.end||`Date`)),n}_clusterItems(){if(!this.options.cluster)return;let{scale:e}=this.body.range.conversion(this.body.domProps.center.width),t=this.clusterGenerator.getClusters(this.clusters,e,this.options.cluster);if(this.clusters!=t){if(this._detachAllClusters(),t){for(let e of t)e.attach();this.clusters=t}this._updateClusters(t)}}_detachAllClusters(){if(this.options.cluster&&this.clusters&&this.clusters.length)for(let e of this.clusters)e.detach()}_updateClusters(e){if(this.clusters&&this.clusters.length){var t;let i=new S6(nU(e).call(e,e=>e.id)),a=J(t=this.clusters).call(t,e=>!i.has(e.id)),o=!1;for(let e of a){var n;let t=Iq(n=this.selection).call(n,e.id);if(t!==-1){var r;e.unselect(),_G(r=this.selection).call(r,t,1),o=!0}}if(o){let e=this.getSelection();this.body.emitter.emit(`select`,{items:e,event})}}this.clusters=e||[]}};f8.types={background:U6,box:B6,range:H6,point:V6},f8.prototype._onAdd=f8.prototype._onUpdate;var p8=!1,m8,h8=`background: #FFeeee; color: #dd0000`,g8=class e{constructor(){}static validate(t,n,r){p8=!1,m8=n;let i=n;return r!==void 0&&(i=n[r]),e.parse(t,i,[]),p8}static parse(t,n,r){for(let i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.check(i,t,n,r)}static check(t,n,r,i){if(r[t]===void 0&&r.__any__===void 0){e.getSuggestion(t,r,i);return}let a=t,o=!0;r[t]===void 0&&r.__any__!==void 0&&(a=`__any__`,o=e.getType(n[t])===`object`);let s=r[a];o&&s.__type__!==void 0&&(s=s.__type__),e.checkFields(t,n,r,a,s,i)}static checkFields(t,n,r,i,a,o){let s=function(n){console.log(`%c`+n+e.printLocation(o,t),h8)},c=e.getType(n[t]),l=a[c];l===void 0?a.any===void 0&&(s(`Invalid type received for "`+t+`". Expected: `+e.print(LU(a))+`. Received [`+c+`] "`+n[t]+`"`),p8=!0):e.getType(l)===`array`&&Iq(l).call(l,n[t])===-1?(s(`Invalid option detected in "`+t+`". Allowed values are:`+e.print(l)+` not "`+n[t]+`". `),p8=!0):c===`object`&&i!==`__any__`&&(o=Y.copyAndExtendArray(o,t),e.parse(n[t],r[i],o))}static getType(e){var t=typeof e;return t===`object`?e===null?`null`:e instanceof Boolean?`boolean`:e instanceof Number?`number`:e instanceof String?`string`:G(e)?`array`:e instanceof Date?`date`:e.nodeType===void 0?e._isAMomentObject===!0?`moment`:`object`:`dom`:t===`number`?`number`:t===`boolean`?`boolean`:t===`string`?`string`:t===void 0?`undefined`:t}static getSuggestion(t,n,r){let i=e.findInOptions(t,n,r,!1),a=e.findInOptions(t,m8,[],!0),o;o=i.indexMatch===void 0?a.distance<=4&&i.distance>a.distance?` in `+e.printLocation(i.path,t,``)+`Perhaps it was misplaced? Matching option found at: `+e.printLocation(a.path,a.closestMatch,``):i.distance<=8?`. Did you mean "`+i.closestMatch+`"?`+e.printLocation(i.path,t):`. Did you mean one of these: `+e.print(LU(n))+e.printLocation(r,t):` in `+e.printLocation(i.path,t,``)+`Perhaps it was incomplete? Did you mean: "`+i.indexMatch+`"?--`,console.log(`%cUnknown option detected: "`+t+`"`+o,h8),p8=!0}static findInOptions(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,a=1e9,o=``,s=[],c=t.toLowerCase(),l;for(let d in n){if(!Object.prototype.hasOwnProperty.call(n,d))continue;let f;if(n[d].__type__!==void 0&&i===!0){let i=e.findInOptions(t,n[d],Y.copyAndExtendArray(r,d));a>i.distance&&(o=i.closestMatch,s=i.path,a=i.distance,l=i.indexMatch)}else{var u;Iq(u=d.toLowerCase()).call(u,c)!==-1&&(l=d),f=e.levenshteinDistance(t,d),a>f&&(o=d,s=Y.copyArray(r),a=f)}}return{closestMatch:o,path:s,distance:a,indexMatch:l}}static printLocation(e,t){let n=`--`+(arguments.length>2&&arguments[2]!==void 0?arguments[2]:`Problem value found at:-`)+`options = {-`;for(let t=0;t<e.length;t++){for(let e=0;e<t+1;e++)n+=` `;n+=e[t]+`: {-`}for(let t=0;t<e.length+1;t++)n+=` `;n+=t+`-`;for(let t=0;t<e.length+1;t++){for(let r=0;r<e.length-t;r++)n+=` `;n+=`}-`}return n+`--`}static print(e){return AJ(e).replace(/(\")|(\[)|(\])|(,"__type__")/g,``).replace(/(\,)/g,`, `)}static levenshteinDistance(e,t){if(e.length===0)return t.length;if(t.length===0)return e.length;var n=[],r;for(r=0;r<=t.length;r++)n[r]=[r];var i;for(i=0;i<=e.length;i++)n[0][i]=i;for(r=1;r<=t.length;r++)for(i=1;i<=e.length;i++)t.charAt(r-1)==e.charAt(i-1)?n[r][i]=n[r-1][i-1]:n[r][i]=Math.min(n[r-1][i-1]+1,Math.min(n[r][i-1]+1,n[r-1][i]+1));return n[t.length][e.length]}},X=`string`,Z=`boolean`,_8=`number`,v8=`array`,y8=`date`,b8=`object`,x8=`dom`,S8=`moment`,C8=`any`,w8={configure:{enabled:{boolean:Z},filter:{boolean:Z,function:`function`},container:{dom:x8},__type__:{object:b8,boolean:Z,function:`function`}},align:{string:X},alignCurrentTime:{string:X,undefined:`undefined`},rtl:{boolean:Z,undefined:`undefined`},rollingMode:{follow:{boolean:Z},offset:{number:_8,undefined:`undefined`},__type__:{object:b8}},onTimeout:{timeoutMs:{number:_8},callback:{function:`function`},__type__:{object:b8}},verticalScroll:{boolean:Z,undefined:`undefined`},horizontalScroll:{boolean:Z,undefined:`undefined`},horizontalScrollKey:{string:X,undefined:`undefined`},horizontalScrollInvert:{boolean:Z,undefined:`undefined`},autoResize:{boolean:Z},throttleRedraw:{number:_8},clickToUse:{boolean:Z},dataAttributes:{string:X,array:v8},editable:{add:{boolean:Z,undefined:`undefined`},remove:{boolean:Z,undefined:`undefined`},updateGroup:{boolean:Z,undefined:`undefined`},updateTime:{boolean:Z,undefined:`undefined`},overrideItems:{boolean:Z,undefined:`undefined`},__type__:{boolean:Z,object:b8}},end:{number:_8,date:y8,string:X,moment:S8},format:{minorLabels:{millisecond:{string:X,undefined:`undefined`},second:{string:X,undefined:`undefined`},minute:{string:X,undefined:`undefined`},hour:{string:X,undefined:`undefined`},weekday:{string:X,undefined:`undefined`},day:{string:X,undefined:`undefined`},week:{string:X,undefined:`undefined`},month:{string:X,undefined:`undefined`},year:{string:X,undefined:`undefined`},__type__:{object:b8,function:`function`}},majorLabels:{millisecond:{string:X,undefined:`undefined`},second:{string:X,undefined:`undefined`},minute:{string:X,undefined:`undefined`},hour:{string:X,undefined:`undefined`},weekday:{string:X,undefined:`undefined`},day:{string:X,undefined:`undefined`},week:{string:X,undefined:`undefined`},month:{string:X,undefined:`undefined`},year:{string:X,undefined:`undefined`},__type__:{object:b8,function:`function`}},__type__:{object:b8}},moment:{function:`function`},groupHeightMode:{string:X},groupOrder:{string:X,function:`function`},groupEditable:{add:{boolean:Z,undefined:`undefined`},remove:{boolean:Z,undefined:`undefined`},order:{boolean:Z,undefined:`undefined`},__type__:{boolean:Z,object:b8}},groupOrderSwap:{function:`function`},height:{string:X,number:_8},hiddenDates:{start:{date:y8,number:_8,string:X,moment:S8},end:{date:y8,number:_8,string:X,moment:S8},repeat:{string:X},__type__:{object:b8,array:v8}},itemsAlwaysDraggable:{item:{boolean:Z,undefined:`undefined`},range:{boolean:Z,undefined:`undefined`},__type__:{boolean:Z,object:b8}},limitSize:{boolean:Z},locale:{string:X},locales:{__any__:{any:C8},__type__:{object:b8}},longSelectPressTime:{number:_8},margin:{axis:{number:_8},item:{horizontal:{number:_8,undefined:`undefined`},vertical:{number:_8,undefined:`undefined`},__type__:{object:b8,number:_8}},__type__:{object:b8,number:_8}},max:{date:y8,number:_8,string:X,moment:S8},maxHeight:{number:_8,string:X},maxMinorChars:{number:_8},min:{date:y8,number:_8,string:X,moment:S8},minHeight:{number:_8,string:X},moveable:{boolean:Z},multiselect:{boolean:Z},multiselectPerGroup:{boolean:Z},onAdd:{function:`function`},onDropObjectOnItem:{function:`function`},onUpdate:{function:`function`},onMove:{function:`function`},onMoving:{function:`function`},onRemove:{function:`function`},onAddGroup:{function:`function`},onMoveGroup:{function:`function`},onRemoveGroup:{function:`function`},onInitialDrawComplete:{function:`function`},order:{function:`function`},orientation:{axis:{string:X,undefined:`undefined`},item:{string:X,undefined:`undefined`},__type__:{string:X,object:b8}},selectable:{boolean:Z},sequentialSelection:{boolean:Z},showCurrentTime:{boolean:Z},showMajorLabels:{boolean:Z},showMinorLabels:{boolean:Z},showWeekScale:{boolean:Z},stack:{boolean:Z},stackSubgroups:{boolean:Z},cluster:{maxItems:{number:_8,undefined:`undefined`},titleTemplate:{string:X,undefined:`undefined`},clusterCriteria:{function:`function`,undefined:`undefined`},showStipes:{boolean:Z,undefined:`undefined`},fitOnDoubleClick:{boolean:Z,undefined:`undefined`},__type__:{boolean:Z,object:b8}},snap:{function:`function`,null:`null`},start:{date:y8,number:_8,string:X,moment:S8},template:{function:`function`},loadingScreenTemplate:{function:`function`},groupTemplate:{function:`function`},visibleFrameTemplate:{string:X,function:`function`},showTooltips:{boolean:Z},tooltip:{followMouse:{boolean:Z},overflowMethod:{string:[`cap`,`flip`,`none`]},delay:{number:_8},template:{function:`function`},__type__:{object:b8}},tooltipOnItemUpdateTime:{template:{function:`function`},__type__:{boolean:Z,object:b8}},timeAxis:{scale:{string:X,undefined:`undefined`},step:{number:_8,undefined:`undefined`},__type__:{object:b8}},type:{string:X},width:{string:X,number:_8},preferZoom:{boolean:Z},zoomable:{boolean:Z},zoomKey:{string:[`ctrlKey`,`altKey`,`shiftKey`,`metaKey`,``]},zoomFriction:{number:_8},zoomMax:{number:_8},zoomMin:{number:_8},xss:{disabled:{boolean:Z},filterOptions:{__any__:{any:C8},__type__:{object:b8}},__type__:{object:b8}},__type__:{object:b8}},T8={global:{align:[`center`,`left`,`right`],alignCurrentTime:[`none`,`year`,`month`,`quarter`,`week`,`isoWeek`,`day`,`date`,`hour`,`minute`,`second`],direction:!1,autoResize:!0,clickToUse:!1,editable:{add:!1,remove:!1,updateGroup:!1,updateTime:!1},end:``,format:{minorLabels:{millisecond:`SSS`,second:`s`,minute:`HH:mm`,hour:`HH:mm`,weekday:`ddd D`,day:`D`,week:`w`,month:`MMM`,year:`YYYY`},majorLabels:{millisecond:`HH:mm:ss`,second:`D MMMM HH:mm`,minute:`ddd D MMMM`,hour:`ddd D MMMM`,weekday:`MMMM YYYY`,day:`MMMM YYYY`,week:`MMMM YYYY`,month:`YYYY`,year:``}},groupHeightMode:[`auto`,`fixed`,`fitItems`],groupsDraggable:!1,height:``,locale:``,longSelectPressTime:251,margin:{axis:[20,0,100,1],item:{horizontal:[10,0,100,1],vertical:[10,0,100,1]}},max:``,maxHeight:``,maxMinorChars:[7,0,20,1],min:``,minHeight:``,moveable:!1,multiselect:!1,multiselectPerGroup:!1,orientation:{axis:[`both`,`bottom`,`top`],item:[`bottom`,`top`]},preferZoom:!1,selectable:!0,showCurrentTime:!1,showMajorLabels:!0,showMinorLabels:!0,stack:!0,stackSubgroups:!0,cluster:!1,start:``,showTooltips:!0,tooltip:{followMouse:!1,overflowMethod:`flip`,delay:[500,0,99999,100]},tooltipOnItemUpdateTime:!1,type:[`box`,`point`,`range`,`background`],width:`100%`,zoomable:!0,zoomKey:[`ctrlKey`,`altKey`,`shiftKey`,`metaKey`,``],zoomMax:[31536e10,10,31536e10,1],zoomMin:[10,10,31536e10,1],xss:{disabled:!1}}},E8={black:`#000000`,navy:`#000080`,darkblue:`#00008B`,mediumblue:`#0000CD`,blue:`#0000FF`,darkgreen:`#006400`,green:`#008000`,teal:`#008080`,darkcyan:`#008B8B`,deepskyblue:`#00BFFF`,darkturquoise:`#00CED1`,mediumspringgreen:`#00FA9A`,lime:`#00FF00`,springgreen:`#00FF7F`,aqua:`#00FFFF`,cyan:`#00FFFF`,midnightblue:`#191970`,dodgerblue:`#1E90FF`,lightseagreen:`#20B2AA`,forestgreen:`#228B22`,seagreen:`#2E8B57`,darkslategray:`#2F4F4F`,limegreen:`#32CD32`,mediumseagreen:`#3CB371`,turquoise:`#40E0D0`,royalblue:`#4169E1`,steelblue:`#4682B4`,darkslateblue:`#483D8B`,mediumturquoise:`#48D1CC`,indigo:`#4B0082`,darkolivegreen:`#556B2F`,cadetblue:`#5F9EA0`,cornflowerblue:`#6495ED`,mediumaquamarine:`#66CDAA`,dimgray:`#696969`,slateblue:`#6A5ACD`,olivedrab:`#6B8E23`,slategray:`#708090`,lightslategray:`#778899`,mediumslateblue:`#7B68EE`,lawngreen:`#7CFC00`,chartreuse:`#7FFF00`,aquamarine:`#7FFFD4`,maroon:`#800000`,purple:`#800080`,olive:`#808000`,gray:`#808080`,skyblue:`#87CEEB`,lightskyblue:`#87CEFA`,blueviolet:`#8A2BE2`,darkred:`#8B0000`,darkmagenta:`#8B008B`,saddlebrown:`#8B4513`,darkseagreen:`#8FBC8F`,lightgreen:`#90EE90`,mediumpurple:`#9370D8`,darkviolet:`#9400D3`,palegreen:`#98FB98`,darkorchid:`#9932CC`,yellowgreen:`#9ACD32`,sienna:`#A0522D`,brown:`#A52A2A`,darkgray:`#A9A9A9`,lightblue:`#ADD8E6`,greenyellow:`#ADFF2F`,paleturquoise:`#AFEEEE`,lightsteelblue:`#B0C4DE`,powderblue:`#B0E0E6`,firebrick:`#B22222`,darkgoldenrod:`#B8860B`,mediumorchid:`#BA55D3`,rosybrown:`#BC8F8F`,darkkhaki:`#BDB76B`,silver:`#C0C0C0`,mediumvioletred:`#C71585`,indianred:`#CD5C5C`,peru:`#CD853F`,chocolate:`#D2691E`,tan:`#D2B48C`,lightgrey:`#D3D3D3`,palevioletred:`#D87093`,thistle:`#D8BFD8`,orchid:`#DA70D6`,goldenrod:`#DAA520`,crimson:`#DC143C`,gainsboro:`#DCDCDC`,plum:`#DDA0DD`,burlywood:`#DEB887`,lightcyan:`#E0FFFF`,lavender:`#E6E6FA`,darksalmon:`#E9967A`,violet:`#EE82EE`,palegoldenrod:`#EEE8AA`,lightcoral:`#F08080`,khaki:`#F0E68C`,aliceblue:`#F0F8FF`,honeydew:`#F0FFF0`,azure:`#F0FFFF`,sandybrown:`#F4A460`,wheat:`#F5DEB3`,beige:`#F5F5DC`,whitesmoke:`#F5F5F5`,mintcream:`#F5FFFA`,ghostwhite:`#F8F8FF`,salmon:`#FA8072`,antiquewhite:`#FAEBD7`,linen:`#FAF0E6`,lightgoldenrodyellow:`#FAFAD2`,oldlace:`#FDF5E6`,red:`#FF0000`,fuchsia:`#FF00FF`,magenta:`#FF00FF`,deeppink:`#FF1493`,orangered:`#FF4500`,tomato:`#FF6347`,hotpink:`#FF69B4`,coral:`#FF7F50`,darkorange:`#FF8C00`,lightsalmon:`#FFA07A`,orange:`#FFA500`,lightpink:`#FFB6C1`,pink:`#FFC0CB`,gold:`#FFD700`,peachpuff:`#FFDAB9`,navajowhite:`#FFDEAD`,moccasin:`#FFE4B5`,bisque:`#FFE4C4`,mistyrose:`#FFE4E1`,blanchedalmond:`#FFEBCD`,papayawhip:`#FFEFD5`,lavenderblush:`#FFF0F5`,seashell:`#FFF5EE`,cornsilk:`#FFF8DC`,lemonchiffon:`#FFFACD`,floralwhite:`#FFFAF0`,snow:`#FFFAFA`,yellow:`#FFFF00`,lightyellow:`#FFFFE0`,ivory:`#FFFFF0`,white:`#FFFFFF`},D8=class{constructor(){this.pixelRatio=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1,this.generated=!1,this.centerCoordinates={x:289/2,y:289/2},this.r=289*.49,this.color={r:255,g:255,b:255,a:1},this.hueCircle=void 0,this.initialColor={r:255,g:255,b:255,a:1},this.previousColor=void 0,this.applied=!1,this.updateCallback=()=>{},this.closeCallback=()=>{},this._create()}insertTo(e){this.hammer!==void 0&&(this.hammer.destroy(),this.hammer=void 0),this.container=e,this.container.appendChild(this.frame),this._bindHammer(),this._setSize()}setUpdateCallback(e){if(typeof e==`function`)this.updateCallback=e;else throw Error(`Function attempted to set as colorPicker update callback is not a function.`)}setCloseCallback(e){if(typeof e==`function`)this.closeCallback=e;else throw Error(`Function attempted to set as colorPicker closing callback is not a function.`)}_isColorString(e){if(typeof e==`string`)return E8[e]}setColor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(e===`none`)return;let n;var r=this._isColorString(e);if(r!==void 0&&(e=r),Y.isString(e)===!0){if(Y.isValidRGB(e)===!0){let t=e.substr(4).substr(0,e.length-5).split(`,`);n={r:t[0],g:t[1],b:t[2],a:1}}else if(Y.isValidRGBA(e)===!0){let t=e.substr(5).substr(0,e.length-6).split(`,`);n={r:t[0],g:t[1],b:t[2],a:t[3]}}else if(Y.isValidHex(e)===!0){let t=Y.hexToRGB(e);n={r:t.r,g:t.g,b:t.b,a:1}}}else if(e instanceof Object&&e.r!==void 0&&e.g!==void 0&&e.b!==void 0){let t=e.a===void 0?`1.0`:e.a;n={r:e.r,g:e.g,b:e.b,a:t}}if(n===void 0)throw Error(`Unknown color passed to the colorPicker. Supported are strings: rgb, hex, rgba. Object: rgb ({r:r,g:g,b:b,[a:a]}). Supplied: `+AJ(e));this._setColor(n,t)}show(){this.closeCallback!==void 0&&(this.closeCallback(),this.closeCallback=void 0),this.applied=!1,this.frame.style.display=`block`,this._generateHueCircle()}_hide(){(arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0)===!0&&(this.previousColor=Y.extend({},this.color)),this.applied===!0&&this.updateCallback(this.initialColor),this.frame.style.display=`none`,wP(()=>{this.closeCallback!==void 0&&(this.closeCallback(),this.closeCallback=void 0)},0)}_save(){this.updateCallback(this.color),this.applied=!1,this._hide()}_apply(){this.applied=!0,this.updateCallback(this.color),this._updatePicker(this.color)}_loadLast(){this.previousColor===void 0?alert(`There is no last color to load...`):this.setColor(this.previousColor,!1)}_setColor(e){(arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0)===!0&&(this.initialColor=Y.extend({},e)),this.color=e;let t=Y.RGBToHSV(e.r,e.g,e.b),n=2*Math.PI,r=this.r*t.s,i=this.centerCoordinates.x+r*Math.sin(n*t.h),a=this.centerCoordinates.y+r*Math.cos(n*t.h);this.colorPickerSelector.style.left=i-.5*this.colorPickerSelector.clientWidth+`px`,this.colorPickerSelector.style.top=a-.5*this.colorPickerSelector.clientHeight+`px`,this._updatePicker(e)}_setOpacity(e){this.color.a=e/100,this._updatePicker(this.color)}_setBrightness(e){let t=Y.RGBToHSV(this.color.r,this.color.g,this.color.b);t.v=e/100;let n=Y.HSVToRGB(t.h,t.s,t.v);n.a=this.color.a,this.color=n,this._updatePicker()}_updatePicker(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.color,t=Y.RGBToHSV(e.r,e.g,e.b),n=this.colorPickerCanvas.getContext(`2d`);this.pixelRation===void 0&&(this.pixelRatio=(window.devicePixelRatio||1)/(n.webkitBackingStorePixelRatio||n.mozBackingStorePixelRatio||n.msBackingStorePixelRatio||n.oBackingStorePixelRatio||n.backingStorePixelRatio||1)),n.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);let r=this.colorPickerCanvas.clientWidth,i=this.colorPickerCanvas.clientHeight;n.clearRect(0,0,r,i),n.putImageData(this.hueCircle,0,0),n.fillStyle=`rgba(0,0,0,`+(1-t.v)+`)`,n.circle(this.centerCoordinates.x,this.centerCoordinates.y,this.r),YJ(n).call(n),this.brightnessRange.value=100*t.v,this.opacityRange.value=100*e.a,this.initialColorDiv.style.backgroundColor=`rgba(`+this.initialColor.r+`,`+this.initialColor.g+`,`+this.initialColor.b+`,`+this.initialColor.a+`)`,this.newColorDiv.style.backgroundColor=`rgba(`+this.color.r+`,`+this.color.g+`,`+this.color.b+`,`+this.color.a+`)`}_setSize(){this.colorPickerCanvas.style.width=`100%`,this.colorPickerCanvas.style.height=`100%`,this.colorPickerCanvas.width=289*this.pixelRatio,this.colorPickerCanvas.height=289*this.pixelRatio}_create(){var e,t,n,r;if(this.frame=document.createElement(`div`),this.frame.className=`vis-color-picker`,this.colorPickerDiv=document.createElement(`div`),this.colorPickerSelector=document.createElement(`div`),this.colorPickerSelector.className=`vis-selector`,this.colorPickerDiv.appendChild(this.colorPickerSelector),this.colorPickerCanvas=document.createElement(`canvas`),this.colorPickerDiv.appendChild(this.colorPickerCanvas),this.colorPickerCanvas.getContext){let e=this.colorPickerCanvas.getContext(`2d`);this.pixelRatio=(window.devicePixelRatio||1)/(e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1),this.colorPickerCanvas.getContext(`2d`).setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0)}else{let e=document.createElement(`DIV`);e.style.color=`red`,e.style.fontWeight=`bold`,e.style.padding=`10px`,e.innerHTML=`Error: your browser does not support HTML canvas`,this.colorPickerCanvas.appendChild(e)}this.colorPickerDiv.className=`vis-color`,this.opacityDiv=document.createElement(`div`),this.opacityDiv.className=`vis-opacity`,this.brightnessDiv=document.createElement(`div`),this.brightnessDiv.className=`vis-brightness`,this.arrowDiv=document.createElement(`div`),this.arrowDiv.className=`vis-arrow`,this.opacityRange=document.createElement(`input`);try{this.opacityRange.type=`range`,this.opacityRange.min=`0`,this.opacityRange.max=`100`}catch{}this.opacityRange.value=`100`,this.opacityRange.className=`vis-range`,this.brightnessRange=document.createElement(`input`);try{this.brightnessRange.type=`range`,this.brightnessRange.min=`0`,this.brightnessRange.max=`100`}catch{}this.brightnessRange.value=`100`,this.brightnessRange.className=`vis-range`,this.opacityDiv.appendChild(this.opacityRange),this.brightnessDiv.appendChild(this.brightnessRange);var i=this;this.opacityRange.onchange=function(){i._setOpacity(this.value)},this.opacityRange.oninput=function(){i._setOpacity(this.value)},this.brightnessRange.onchange=function(){i._setBrightness(this.value)},this.brightnessRange.oninput=function(){i._setBrightness(this.value)},this.brightnessLabel=document.createElement(`div`),this.brightnessLabel.className=`vis-label vis-brightness`,this.brightnessLabel.innerHTML=`brightness:`,this.opacityLabel=document.createElement(`div`),this.opacityLabel.className=`vis-label vis-opacity`,this.opacityLabel.innerHTML=`opacity:`,this.newColorDiv=document.createElement(`div`),this.newColorDiv.className=`vis-new-color`,this.newColorDiv.innerHTML=`new`,this.initialColorDiv=document.createElement(`div`),this.initialColorDiv.className=`vis-initial-color`,this.initialColorDiv.innerHTML=`initial`,this.cancelButton=document.createElement(`div`),this.cancelButton.className=`vis-button vis-cancel`,this.cancelButton.innerHTML=`cancel`,this.cancelButton.onclick=K(e=this._hide).call(e,this,!1),this.applyButton=document.createElement(`div`),this.applyButton.className=`vis-button vis-apply`,this.applyButton.innerHTML=`apply`,this.applyButton.onclick=K(t=this._apply).call(t,this),this.saveButton=document.createElement(`div`),this.saveButton.className=`vis-button vis-save`,this.saveButton.innerHTML=`save`,this.saveButton.onclick=K(n=this._save).call(n,this),this.loadButton=document.createElement(`div`),this.loadButton.className=`vis-button vis-load`,this.loadButton.innerHTML=`load last`,this.loadButton.onclick=K(r=this._loadLast).call(r,this),this.frame.appendChild(this.colorPickerDiv),this.frame.appendChild(this.arrowDiv),this.frame.appendChild(this.brightnessLabel),this.frame.appendChild(this.brightnessDiv),this.frame.appendChild(this.opacityLabel),this.frame.appendChild(this.opacityDiv),this.frame.appendChild(this.newColorDiv),this.frame.appendChild(this.initialColorDiv),this.frame.appendChild(this.cancelButton),this.frame.appendChild(this.applyButton),this.frame.appendChild(this.saveButton),this.frame.appendChild(this.loadButton)}_bindHammer(){this.drag={},this.pinch={},this.hammer=new L0(this.colorPickerCanvas),this.hammer.get(`pinch`).set({enable:!0}),R0(this.hammer,e=>{this._moveSelector(e)}),this.hammer.on(`tap`,e=>{this._moveSelector(e)}),this.hammer.on(`panstart`,e=>{this._moveSelector(e)}),this.hammer.on(`panmove`,e=>{this._moveSelector(e)}),this.hammer.on(`panend`,e=>{this._moveSelector(e)})}_generateHueCircle(){if(this.generated===!1){let e=this.colorPickerCanvas.getContext(`2d`);this.pixelRation===void 0&&(this.pixelRatio=(window.devicePixelRatio||1)/(e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1)),e.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);let t=this.colorPickerCanvas.clientWidth,n=this.colorPickerCanvas.clientHeight;e.clearRect(0,0,t,n);let r,i,a,o;this.centerCoordinates={x:t*.5,y:n*.5},this.r=.49*t;let s=2*Math.PI/360,c=1/this.r,l;for(a=0;a<360;a++)for(o=0;o<this.r;o++)r=this.centerCoordinates.x+o*Math.sin(s*a),i=this.centerCoordinates.y+o*Math.cos(s*a),l=Y.HSVToRGB(a*.002777777777777778,o*c,1),e.fillStyle=`rgb(`+l.r+`,`+l.g+`,`+l.b+`)`,e.fillRect(r-.5,i-.5,2,2);e.strokeStyle=`rgba(0,0,0,1)`,e.circle(this.centerCoordinates.x,this.centerCoordinates.y,this.r),e.stroke(),this.hueCircle=e.getImageData(0,0,t,n)}this.generated=!0}_moveSelector(e){let t=this.colorPickerDiv.getBoundingClientRect(),n=e.center.x-t.left,r=e.center.y-t.top,i=.5*this.colorPickerDiv.clientHeight,a=.5*this.colorPickerDiv.clientWidth,o=n-a,s=r-i,c=Math.atan2(o,s),l=.98*Math.min(Math.sqrt(o*o+s*s),a),u=Math.cos(c)*l+i,d=Math.sin(c)*l+a;this.colorPickerSelector.style.top=u-.5*this.colorPickerSelector.clientHeight+`px`,this.colorPickerSelector.style.left=d-.5*this.colorPickerSelector.clientWidth+`px`;let f=c/(2*Math.PI);f=f<0?f+1:f;let p=l/this.r,m=Y.RGBToHSV(this.color.r,this.color.g,this.color.b);m.h=f,m.s=p;let h=Y.HSVToRGB(m.h,m.s,m.v);h.a=this.color.a,this.color=h,this.initialColorDiv.style.backgroundColor=`rgba(`+this.initialColor.r+`,`+this.initialColor.g+`,`+this.initialColor.b+`,`+this.initialColor.a+`)`,this.newColorDiv.style.backgroundColor=`rgba(`+this.color.r+`,`+this.color.g+`,`+this.color.b+`,`+this.color.a+`)`}},O8=class{constructor(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;this.parent=e,this.changedOptions=[],this.container=t,this.allowCreation=!1,this.options={},this.initialized=!1,this.popupCounter=0,this.defaultOptions={enabled:!1,filter:!0,container:void 0,showButton:!0},Y.extend(this.options,this.defaultOptions),this.configureOptions=n,this.moduleOptions={},this.domElements=[],this.popupDiv={},this.popupLimit=5,this.popupHistory={},this.colorPicker=new D8(r),this.wrapper=void 0}setOptions(e){if(e!==void 0){this.popupHistory={},this._removePopup();let t=!0;if(typeof e==`string`)this.options.filter=e;else if(G(e))this.options.filter=e.join();else if(typeof e==`object`){if(e==null)throw TypeError(`options cannot be null`);e.container!==void 0&&(this.options.container=e.container),J(e)!==void 0&&(this.options.filter=J(e)),e.showButton!==void 0&&(this.options.showButton=e.showButton),e.enabled!==void 0&&(t=e.enabled)}else typeof e==`boolean`?(this.options.filter=!0,t=e):typeof e==`function`&&(this.options.filter=e,t=!0);J(this.options)===!1&&(t=!1),this.options.enabled=t}this._clean()}setModuleOptions(e){this.moduleOptions=e,this.options.enabled===!0&&(this._clean(),this.options.container!==void 0&&(this.container=this.options.container),this._create())}_create(){this._clean(),this.changedOptions=[];let e=J(this.options),t=0,n=!1;for(let r in this.configureOptions)Object.prototype.hasOwnProperty.call(this.configureOptions,r)&&(this.allowCreation=!1,n=!1,typeof e==`function`?(n=e(r,[]),n||=this._handleObject(this.configureOptions[r],[r],!0)):(e===!0||Iq(e).call(e,r)!==-1)&&(n=!0),n!==!1&&(this.allowCreation=!0,t>0&&this._makeItem([]),this._makeHeader(r),this._handleObject(this.configureOptions[r],[r])),t++);this._makeButton(),this._push()}_push(){this.wrapper=document.createElement(`div`),this.wrapper.className=`vis-configuration-wrapper`,this.container.appendChild(this.wrapper);for(var e=0;e<this.domElements.length;e++)this.wrapper.appendChild(this.domElements[e]);this._showPopupIfNeeded()}_clean(){for(var e=0;e<this.domElements.length;e++)this.wrapper.removeChild(this.domElements[e]);this.wrapper!==void 0&&(this.container.removeChild(this.wrapper),this.wrapper=void 0),this.domElements=[],this._removePopup()}_getValue(e){let t=this.moduleOptions;for(let n=0;n<e.length;n++)if(t[e[n]]!==void 0)t=t[e[n]];else{t=void 0;break}return t}_makeItem(e){if(this.allowCreation===!0){let n=document.createElement(`div`);n.className=`vis-configuration vis-config-item vis-config-s`+e.length;var t=[...arguments].slice(1);return q(t).call(t,e=>{n.appendChild(e)}),this.domElements.push(n),this.domElements.length}return 0}_makeHeader(e){let t=document.createElement(`div`);t.className=`vis-configuration vis-config-header`,t.innerHTML=Y.xss(e),this._makeItem([],t)}_makeLabel(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,r=document.createElement(`div`);return r.className=`vis-configuration vis-config-label vis-config-s`+t.length,n===!0?r.innerHTML=Y.xss(`<i><b>`+e+`:</b></i>`):r.innerHTML=Y.xss(e+`:`),r}_makeDropdown(e,t,n){let r=document.createElement(`select`);r.className=`vis-configuration vis-config-select`;let i=0;t!==void 0&&Iq(e).call(e,t)!==-1&&(i=Iq(e).call(e,t));for(let t=0;t<e.length;t++){let n=document.createElement(`option`);n.value=e[t],t===i&&(n.selected=`selected`),n.innerHTML=e[t],r.appendChild(n)}let a=this;r.onchange=function(){a._update(this.value,n)};let o=this._makeLabel(n[n.length-1],n);this._makeItem(n,o,r)}_makeRange(e,t,n){let r=e[0],i=e[1],a=e[2],o=e[3],s=document.createElement(`input`);s.className=`vis-configuration vis-config-range`;try{s.type=`range`,s.min=i,s.max=a}catch{}s.step=o;let c=``,l=0;if(t!==void 0){let e=1.2;t<0&&t*e<i?(s.min=Math.ceil(t*e),l=s.min,c=`range increased`):t/e<i&&(s.min=Math.ceil(t/e),l=s.min,c=`range increased`),t*e>a&&a!==1&&(s.max=Math.ceil(t*e),l=s.max,c=`range increased`),s.value=t}else s.value=r;let u=document.createElement(`input`);u.className=`vis-configuration vis-config-rangeinput`,u.value=Number(s.value);var d=this;s.onchange=function(){u.value=this.value,d._update(Number(this.value),n)},s.oninput=function(){u.value=this.value};let f=this._makeLabel(n[n.length-1],n),p=this._makeItem(n,f,s,u);c!==``&&this.popupHistory[p]!==l&&(this.popupHistory[p]=l,this._setupPopup(c,p))}_makeButton(){if(this.options.showButton===!0){let e=document.createElement(`div`);e.className=`vis-configuration vis-config-button`,e.innerHTML=`generate options`,e.onclick=()=>{this._printOptions()},e.onmouseover=()=>{e.className=`vis-configuration vis-config-button hover`},e.onmouseout=()=>{e.className=`vis-configuration vis-config-button`},this.optionsContainer=document.createElement(`div`),this.optionsContainer.className=`vis-configuration vis-config-option-container`,this.domElements.push(this.optionsContainer),this.domElements.push(e)}}_setupPopup(e,t){if(this.initialized===!0&&this.allowCreation===!0&&this.popupCounter<this.popupLimit){let n=document.createElement(`div`);n.id=`vis-configuration-popup`,n.className=`vis-configuration-popup`,n.innerHTML=Y.xss(e),n.onclick=()=>{this._removePopup()},this.popupCounter+=1,this.popupDiv={html:n,index:t}}}_removePopup(){this.popupDiv.html!==void 0&&(this.popupDiv.html.parentNode.removeChild(this.popupDiv.html),clearTimeout(this.popupDiv.hideTimeout),clearTimeout(this.popupDiv.deleteTimeout),this.popupDiv={})}_showPopupIfNeeded(){if(this.popupDiv.html!==void 0){let e=this.domElements[this.popupDiv.index].getBoundingClientRect();this.popupDiv.html.style.left=e.left+`px`,this.popupDiv.html.style.top=e.top-30+`px`,document.body.appendChild(this.popupDiv.html),this.popupDiv.hideTimeout=wP(()=>{this.popupDiv.html.style.opacity=0},1500),this.popupDiv.deleteTimeout=wP(()=>{this._removePopup()},1800)}}_makeCheckbox(e,t,n){var r=document.createElement(`input`);r.type=`checkbox`,r.className=`vis-configuration vis-config-checkbox`,r.checked=e,t!==void 0&&(r.checked=t,t!==e&&(typeof e==`object`?t!==e.enabled&&this.changedOptions.push({path:n,value:t}):this.changedOptions.push({path:n,value:t})));let i=this;r.onchange=function(){i._update(this.checked,n)};let a=this._makeLabel(n[n.length-1],n);this._makeItem(n,a,r)}_makeTextInput(e,t,n){var r=document.createElement(`input`);r.type=`text`,r.className=`vis-configuration vis-config-text`,r.value=t,t!==e&&this.changedOptions.push({path:n,value:t});let i=this;r.onchange=function(){i._update(this.value,n)};let a=this._makeLabel(n[n.length-1],n);this._makeItem(n,a,r)}_makeColorField(e,t,n){let r=e[1],i=document.createElement(`div`);t=t===void 0?r:t,t===`none`?i.className=`vis-configuration vis-config-colorBlock none`:(i.className=`vis-configuration vis-config-colorBlock`,i.style.backgroundColor=t),t=t===void 0?r:t,i.onclick=()=>{this._showColorPicker(t,i,n)};let a=this._makeLabel(n[n.length-1],n);this._makeItem(n,a,i)}_showColorPicker(e,t,n){t.onclick=function(){},this.colorPicker.insertTo(t),this.colorPicker.show(),this.colorPicker.setColor(e),this.colorPicker.setUpdateCallback(e=>{let r=`rgba(`+e.r+`,`+e.g+`,`+e.b+`,`+e.a+`)`;t.style.backgroundColor=r,this._update(r,n)}),this.colorPicker.setCloseCallback(()=>{t.onclick=()=>{this._showColorPicker(e,t,n)}})}_handleObject(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,r=!1,i=J(this.options),a=!1;for(let o in e){if(!Object.prototype.hasOwnProperty.call(e,o))continue;r=!0;let s=e[o],c=Y.copyAndExtendArray(t,o);if(typeof i==`function`&&(r=i(o,t),r===!1&&!G(s)&&typeof s!=`string`&&typeof s!=`boolean`&&s instanceof Object&&(this.allowCreation=!1,r=this._handleObject(s,c,!0),this.allowCreation=n===!1)),r!==!1){a=!0;let e=this._getValue(c);if(G(s))this._handleArray(s,e,c);else if(typeof s==`string`)this._makeTextInput(s,e,c);else if(typeof s==`boolean`)this._makeCheckbox(s,e,c);else if(s instanceof Object){let e=!0;if(Iq(t).call(t,`physics`)!==-1&&this.moduleOptions.physics.solver!==o&&(e=!1),e===!0)if(s.enabled!==void 0){let e=Y.copyAndExtendArray(c,`enabled`),t=this._getValue(e);if(t===!0){let e=this._makeLabel(o,c,!0);this._makeItem(c,e),a=this._handleObject(s,c)||a}else this._makeCheckbox(s,t,c)}else{let e=this._makeLabel(o,c,!0);this._makeItem(c,e),a=this._handleObject(s,c)||a}}else console.error(`dont know how to handle`,s,o,c)}}return a}_handleArray(e,t,n){typeof e[0]==`string`&&e[0]===`color`?(this._makeColorField(e,t,n),e[1]!==t&&this.changedOptions.push({path:n,value:t})):typeof e[0]==`string`?(this._makeDropdown(e,t,n),e[0]!==t&&this.changedOptions.push({path:n,value:t})):typeof e[0]==`number`&&(this._makeRange(e,t,n),e[0]!==t&&this.changedOptions.push({path:n,value:Number(t)}))}_update(e,t){let n=this._constructOptions(e,t);this.parent.body&&this.parent.body.emitter&&this.parent.body.emitter.emit&&this.parent.body.emitter.emit(`configChange`,n),this.initialized=!0,this.parent.setOptions(n)}_constructOptions(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=n;e=e===`true`?!0:e,e=e===`false`?!1:e;for(let n=0;n<t.length;n++)t[n]!==`global`&&(r[t[n]]===void 0&&(r[t[n]]={}),n===t.length-1?r[t[n]]=e:r=r[t[n]]);return n}_printOptions(){let e=this.getOptions();this.optionsContainer.innerHTML=`<pre>var options = `+AJ(e,null,2)+`</pre>`}getOptions(){let e={};for(var t=0;t<this.changedOptions.length;t++)this._constructOptions(this.changedOptions[t].value,this.changedOptions[t].path,e);return e}},k8=class e extends P2{constructor(t,n,r,i){var a,o,s,c,l,u,d;if(super(),this.initTime=new Date,this.itemsDone=!1,!(this instanceof e))throw SyntaxError(`Constructor must be called with the new operator`);if(!(G(r)||F$(r))&&r instanceof Object){let e=i;i=r,r=e}i&&i.throttleRedraw&&console.warn(`Timeline option "throttleRedraw" is DEPRICATED and no longer supported. It will be removed in the next MAJOR release.`);let f=this;if(this.defaultOptions={autoResize:!0,longSelectPressTime:251,orientation:{axis:`bottom`,item:`bottom`},moment:TF},this.options=Y.deepExtend({},this.defaultOptions),i&&Y.setupXSSProtection(i.xss),this._create(t),!i||i&&i.rtl===void 0){this.dom.root.style.visibility=`hidden`;let e,t=this.dom.root;for(;!e&&t;)e=window.getComputedStyle(t,null).direction,t=t.parentElement;this.options.rtl=e&&e.toLowerCase()==`rtl`}else this.options.rtl=i.rtl;i&&(i.rollingMode&&(this.options.rollingMode=i.rollingMode),i.onInitialDrawComplete&&(this.options.onInitialDrawComplete=i.onInitialDrawComplete),i.onTimeout&&(this.options.onTimeout=i.onTimeout),i.loadingScreenTemplate&&(this.options.loadingScreenTemplate=i.loadingScreenTemplate));let p=document.createElement(`div`);if(this.options.loadingScreenTemplate){var m;let e=K(m=this.options.loadingScreenTemplate).call(m,this),t=e(this.dom.loadingScreen);t instanceof Object&&!(t instanceof Element)?e(p):t instanceof Element?(p.innerHTML=``,p.appendChild(t)):t!=null&&(p.innerHTML=Y.xss(t))}this.dom.loadingScreen.appendChild(p),this.components=[],this.body={dom:this.dom,domProps:this.props,emitter:{on:K(a=this.on).call(a,this),off:K(o=this.off).call(o,this),emit:K(s=this.emit).call(s,this)},hiddenDates:[],util:{getScale(){return f.timeAxis.step.scale},getStep(){return f.timeAxis.step.step},toScreen:K(c=f._toScreen).call(c,f),toGlobalScreen:K(l=f._toGlobalScreen).call(l,f),toTime:K(u=f._toTime).call(u,f),toGlobalTime:K(d=f._toGlobalTime).call(d,f)}},this.range=new l0(this.body,this.options),this.components.push(this.range),this.body.range=this.range,this.timeAxis=new H0(this.body,this.options),this.timeAxis2=null,this.components.push(this.timeAxis),this.currentTime=new F2(this.body,this.options),this.components.push(this.currentTime),this.itemSet=new f8(this.body,this.options),this.components.push(this.itemSet),this.itemsData=null,this.groupsData=null;function h(e,t){f.hasListeners(e)&&f.emit(e,f.getEventProperties(t))}this.dom.root.onclick=e=>h(`click`,e),this.dom.root.ondblclick=e=>h(`doubleClick`,e),this.dom.root.oncontextmenu=e=>h(`contextmenu`,e),this.dom.root.onmouseover=e=>h(`mouseOver`,e),window.PointerEvent?(this.dom.root.onpointerdown=e=>h(`mouseDown`,e),this.dom.root.onpointermove=e=>h(`mouseMove`,e),this.dom.root.onpointerup=e=>h(`mouseUp`,e)):(this.dom.root.onmousemove=e=>h(`mouseMove`,e),this.dom.root.onmousedown=e=>h(`mouseDown`,e),this.dom.root.onmouseup=e=>h(`mouseUp`,e)),this.initialFitDone=!1,this.on(`changed`,()=>{if(f.itemsData!=null){if(!f.initialFitDone&&!f.options.rollingMode)if(f.initialFitDone=!0,f.options.start!=null||f.options.end!=null){if(f.options.start==null||f.options.end==null)var e=f.getItemRange();let t=f.options.start==null?e.min:f.options.start,n=f.options.end==null?e.max:f.options.end;f.setWindow(t,n,{animation:!1})}else f.fit({animation:!1});!f.initialDrawDone&&(f.initialRangeChangeDone||!f.options.start&&!f.options.end||f.options.rollingMode)&&(f.initialDrawDone=!0,f.itemSet.initialDrawDone=!0,f.dom.root.style.visibility=`visible`,f.dom.loadingScreen.parentNode.removeChild(f.dom.loadingScreen),f.options.onInitialDrawComplete&&wP(()=>f.options.onInitialDrawComplete(),0))}}),this.on(`destroyTimeline`,()=>{f.destroy()}),i&&this.setOptions(i),this.body.emitter.on(`fit`,e=>{this._onFit(e),this.redraw()}),r&&this.setGroups(r),n&&this.setItems(n),this._redraw()}_createConfigurator(){return new O8(this,this.dom.container,T8)}redraw(){this.itemSet&&this.itemSet.markDirty({refreshItems:!0}),this._redraw()}setOptions(e){if(g8.validate(e,w8)===!0&&console.log(`%cErrors have been found in the supplied options object.`,h8),P2.prototype.setOptions.call(this,e),`type`in e&&e.type!==this.options.type){this.options.type=e.type;let t=this.itemsData;if(t){let e=this.getSelection();this.setItems(null),this.setItems(t.rawDS),this.setSelection(e)}}}setItems(e){this.itemsDone=!1;let t;t=e?F$(e)?z$(e):z$(new kC(e)):null,this.itemsData&&this.itemsData.dispose(),this.itemsData=t,this.itemSet&&this.itemSet.setItems(t==null?null:t.rawDS)}setGroups(e){let t;e?(G(e)&&(e=new kC(e)),t=new AC(e,{filter:e=>e.visible!==!1})):t=null,this.groupsData!=null&&typeof this.groupsData.setData==`function`&&this.groupsData.setData(null),this.groupsData=t,this.itemSet.setGroups(t)}setData(e){e&&e.groups&&this.setGroups(e.groups),e&&e.items&&this.setItems(e.items)}setSelection(e,t){this.itemSet&&this.itemSet.setSelection(e),t&&t.focus&&this.focus(e,t)}getSelection(){return this.itemSet&&this.itemSet.getSelection()||[]}focus(e,t){if(!this.itemsData||e==null)return;let n=G(e)?e:[e],r=this.itemsData.get(n),i=null,a=null;if(q(r).call(r,e=>{let t=e.start.valueOf(),n=`end`in e?e.end.valueOf():e.start.valueOf();(i===null||t<i)&&(i=t),(a===null||n>a)&&(a=n)}),i!==null&&a!==null){let e=this,r=this.itemSet.items[n[0]],o=this._getScrollTop()*-1,s=null,c=(t,n,i)=>{let a=M8(e,r);if(a===!1||(s||=a,s.itemTop==a.itemTop&&!s.shouldScroll))return;s.itemTop!=a.itemTop&&a.shouldScroll&&(s=a,o=e._getScrollTop()*-1);let c=o,l=s.scrollOffset,u=i?l:c+(l-c)*t;e._setScrollTop(-u),n||e._redraw()},l=()=>{let t=M8(e,r);t.shouldScroll&&t.itemTop!=s.itemTop&&(e._setScrollTop(-t.scrollOffset),e._redraw())},u=()=>{l(),wP(l,100)},d=t&&t.zoom!==void 0?t.zoom:!0,f=(i+a)/2,p=d?(a-i)*1.1:Math.max(this.range.end-this.range.start,(a-i)*1.1),m=t&&t.animation!==void 0?t.animation:!0;m||(s={shouldScroll:!1,scrollOffset:-1,itemTop:-1}),this.range.stopRolling(),this.range.setRange(f-p/2,f+p/2,{animation:m},u,c)}}fit(e,t){let n=e&&e.animation!==void 0?e.animation:!0,r;this.itemsData.length===1&&this.itemsData.get()[0].end===void 0?(r=this.getDataRange(),this.moveTo(r.min.valueOf(),{animation:n},t)):(r=this.getItemRange(),this.range.setRange(r.min,r.max,{animation:n},t))}getItemRange(){let e=this.getDataRange(),t=e.min===null?null:e.min.valueOf(),n=e.max===null?null:e.max.valueOf(),r=null,i=null;if(t!=null&&n!=null){let e=n-t;e<=0&&(e=10);let a=e/this.props.center.width,o={},s=0;if(q(Y).call(Y,this.itemSet.items,(e,t)=>{e.groupShowing&&(o[t]=e.redraw(!0),s=o[t].length)}),s>0)for(let e=0;e<s;e++)q(Y).call(Y,o,t=>{t[e]()});if(q(Y).call(Y,this.itemSet.items,e=>{let o=A8(e),s=j8(e),c,l;this.options.rtl?(c=o-(e.getWidthRight()+10)*a,l=s+(e.getWidthLeft()+10)*a):(c=o-(e.getWidthLeft()+10)*a,l=s+(e.getWidthRight()+10)*a),c<t&&(t=c,r=e),l>n&&(n=l,i=e)}),r&&i){let a=r.getWidthLeft()+10,o=i.getWidthRight()+10,s=this.props.center.width-a-o;s>0&&(this.options.rtl?(t=A8(r)-o*e/s,n=j8(i)+a*e/s):(t=A8(r)-a*e/s,n=j8(i)+o*e/s))}}return{min:t==null?null:new Date(t),max:n==null?null:new Date(n)}}getDataRange(){let e=null,t=null;if(this.itemsData){var n;q(n=this.itemsData).call(n,n=>{let r=Y.convert(n.start,`Date`).valueOf(),i=Y.convert(n.end==null?n.start:n.end,`Date`).valueOf();(e===null||r<e)&&(e=r),(t===null||i>t)&&(t=i)})}return{min:e==null?null:new Date(e),max:t==null?null:new Date(t)}}getEventProperties(e){let t=e.center?e.center.x:e.clientX,n=e.center?e.center.y:e.clientY,r=this.dom.centerContainer.getBoundingClientRect(),i=this.options.rtl?r.right-t:t-r.left,a=n-r.top,o=this.itemSet.itemFromTarget(e),s=this.itemSet.groupFromTarget(e),c=N2.customTimeFromTarget(e),l=this.itemSet.options.snap||null,u=this.body.util.getScale(),d=this.body.util.getStep(),f=this._toTime(i),p=l?l(f,u,d):f,m=Y.getTarget(e),h=null;return o==null?c==null?Y.hasParent(m,this.timeAxis.dom.foreground)||this.timeAxis2&&Y.hasParent(m,this.timeAxis2.dom.foreground)?h=`axis`:Y.hasParent(m,this.itemSet.dom.labelSet)?h=`group-label`:Y.hasParent(m,this.currentTime.bar)?h=`current-time`:Y.hasParent(m,this.dom.center)&&(h=`background`):h=`custom-time`:h=`item`,{event:e,item:o?o.id:null,isCluster:o?!!o.isCluster:!1,items:o?o.items||[]:null,group:s?s.groupId:null,customTime:c?c.options.id:null,what:h,pageX:e.srcEvent?e.srcEvent.pageX:e.pageX,pageY:e.srcEvent?e.srcEvent.pageY:e.pageY,x:i,y:a,time:f,snappedTime:p}}toggleRollingMode(){this.range.rolling?this.range.stopRolling():(this.options.rollingMode??this.setOptions(this.options),this.range.startRolling())}_redraw(){P2.prototype._redraw.call(this)}_onFit(e){let{start:t,end:n,animation:r}=e;n?this.range.setRange(t,n,{animation:r}):this.moveTo(t.valueOf(),{animation:r})}};function A8(e){return Y.convert(e.data.start,`Date`).valueOf()}function j8(e){let t=e.data.end==null?e.data.start:e.data.end;return Y.convert(t,`Date`).valueOf()}function M8(e,t){if(!t.parent)return!1;let n=e.options.rtl?e.props.rightContainer.height:e.props.leftContainer.height,r=e.props.center.height,i=t.parent,a=i.top,o=!0,s=e.timeAxis.options.orientation.axis,c=()=>s==`bottom`?i.height-t.top-t.height:t.top,l=e._getScrollTop()*-1,u=a+c(),d=t.height;return u<l?a+n<=a+c()+d&&(a+=c()-e.itemSet.options.margin.item.vertical):u+d>l+n?a+=c()+d-n+e.itemSet.options.margin.item.vertical:o=!1,a=Math.min(a,r-n),{shouldScroll:o,scrollOffset:a,itemTop:u}}function N8(e){for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(e[t].redundant=e[t].used,e[t].used=[])}function P8(e){for(var t in e){if(!Object.prototype.hasOwnProperty.call(e,t))continue;let r=e[t];for(var n=0;n<r.redundant.length;n++)r.redundant[n].parentNode.removeChild(r.redundant[n]);r.redundant=[]}}function F8(e){N8(e),P8(e),N8(e)}function I8(e,t,n){var r;return Object.prototype.hasOwnProperty.call(t,e)?t[e].redundant.length>0?(r=t[e].redundant[0],t[e].redundant.shift()):(r=document.createElementNS(`http://www.w3.org/2000/svg`,e),n.appendChild(r)):(r=document.createElementNS(`http://www.w3.org/2000/svg`,e),t[e]={used:[],redundant:[]},n.appendChild(r)),t[e].used.push(r),r}function L8(e,t,n,r){var i;return Object.prototype.hasOwnProperty.call(t,e)?t[e].redundant.length>0?(i=t[e].redundant[0],t[e].redundant.shift()):(i=document.createElement(e),n.appendChild(i)):(i=document.createElement(e),t[e]={used:[],redundant:[]},n.appendChild(i)),t[e].used.push(i),i}function R8(e,t,n,r,i,a){var o;if(n.style==`circle`?(o=I8(`circle`,r,i),o.setAttributeNS(null,`cx`,e),o.setAttributeNS(null,`cy`,t),o.setAttributeNS(null,`r`,.5*n.size)):(o=I8(`rect`,r,i),o.setAttributeNS(null,`x`,e-.5*n.size),o.setAttributeNS(null,`y`,t-.5*n.size),o.setAttributeNS(null,`width`,n.size),o.setAttributeNS(null,`height`,n.size)),n.styles!==void 0&&o.setAttributeNS(null,`style`,n.styles),o.setAttributeNS(null,`class`,n.className+` vis-point`),a){var s=I8(`text`,r,i);a.xOffset&&(e+=a.xOffset),a.yOffset&&(t+=a.yOffset),a.content&&(s.textContent=a.content),a.className&&s.setAttributeNS(null,`class`,a.className+` vis-label`),s.setAttributeNS(null,`x`,e),s.setAttributeNS(null,`y`,t)}return o}function z8(e,t,n,r,i,a,o,s){if(r!=0){r<0&&(r*=-1,t-=r);var c=I8(`rect`,a,o);c.setAttributeNS(null,`x`,e-.5*n),c.setAttributeNS(null,`y`,t),c.setAttributeNS(null,`width`,n),c.setAttributeNS(null,`height`,r),c.setAttributeNS(null,`class`,i),s&&c.setAttributeNS(null,`style`,s)}}function B8(){try{return navigator?navigator.languages&&navigator.languages.length?navigator.languages:navigator.userLanguage||navigator.language||navigator.browserLanguage||`en`:`en`}catch{return`en`}}var V8=class{constructor(e,t,n,r,i,a){let o=arguments.length>6&&arguments[6]!==void 0?arguments[6]:!1,s=arguments.length>7&&arguments[7]!==void 0?arguments[7]:!1;if(this.majorSteps=[1,2,5,10],this.minorSteps=[.25,.5,1,2],this.customLines=null,this.containerHeight=i,this.majorCharHeight=a,this._start=e,this._end=t,this.scale=1,this.minorStepIdx=-1,this.magnitudefactor=1,this.determineScale(),this.zeroAlign=o,this.autoScaleStart=n,this.autoScaleEnd=r,this.formattingFunction=s,n||r){let e=this,t=t=>{let n=t-t%(e.magnitudefactor*e.minorSteps[e.minorStepIdx]);return t%(e.magnitudefactor*e.minorSteps[e.minorStepIdx])>.5*(e.magnitudefactor*e.minorSteps[e.minorStepIdx])?n+e.magnitudefactor*e.minorSteps[e.minorStepIdx]:n};n&&(this._start-=this.magnitudefactor*2*this.minorSteps[this.minorStepIdx],this._start=t(this._start)),r&&(this._end+=this.magnitudefactor*this.minorSteps[this.minorStepIdx],this._end=t(this._end)),this.determineScale()}}setCharHeight(e){this.majorCharHeight=e}setHeight(e){this.containerHeight=e}determineScale(){let e=this._end-this._start;this.scale=this.containerHeight/e;let t=this.majorCharHeight/this.scale,n=e>0?Math.round(Math.log(e)/Math.LN10):0;this.minorStepIdx=-1,this.magnitudefactor=10**n;let r=0;n<0&&(r=n);let i=!1;for(let e=r;Math.abs(e)<=Math.abs(n);e++){this.magnitudefactor=10**e;for(let e=0;e<this.minorSteps.length;e++)if(this.magnitudefactor*this.minorSteps[e]>=t){i=!0,this.minorStepIdx=e;break}if(i===!0)break}}is_major(e){return e%(this.magnitudefactor*this.majorSteps[this.minorStepIdx])===0}getStep(){return this.magnitudefactor*this.minorSteps[this.minorStepIdx]}getFirstMajor(){let e=this.magnitudefactor*this.majorSteps[this.minorStepIdx];return this.convertValue(this._start+(e-this._start%e)%e)}formatValue(e){let t=e.toPrecision(5);return typeof this.formattingFunction==`function`&&(t=this.formattingFunction(e)),typeof t==`number`?`${t}`:typeof t==`string`?t:e.toPrecision(5)}getLines(){let e=[],t=this.getStep(),n=(t-this._start%t)%t;for(let r=this._start+n;this._end-r>1e-5;r+=t)r!=this._start&&e.push({major:this.is_major(r),y:this.convertValue(r),val:this.formatValue(r)});return e}followScale(e){let t=this.minorStepIdx,n=this._start,r=this._end,i=this,a=()=>{i.magnitudefactor*=2},o=()=>{i.magnitudefactor/=2};e.minorStepIdx<=1&&this.minorStepIdx<=1||e.minorStepIdx>1&&this.minorStepIdx>1||(e.minorStepIdx<this.minorStepIdx?(this.minorStepIdx=1,t==2||a(),a()):(this.minorStepIdx=2,t==1||o(),o()));let s=e.convertValue(0),c=e.getStep()*e.scale,l=!1,u=0;for(;!l&&u++<5;){this.scale=c/(this.minorSteps[this.minorStepIdx]*this.magnitudefactor);let t=this.containerHeight/this.scale;this._start=n,this._end=this._start+t;let i=this._end*this.scale,u=this.magnitudefactor*this.majorSteps[this.minorStepIdx],d=this.getFirstMajor()-e.getFirstMajor();if(this.zeroAlign){let e=s-i;this._end+=e/this.scale,this._start=this._end-t}else this.autoScaleStart?(this._start-=d/this.scale,this._end=this._start+t):(this._start+=u-d/this.scale,this._end=this._start+t);if(!this.autoScaleEnd&&this._end>r+1e-5){o(),l=!1;continue}if(!this.autoScaleStart&&this._start<n-1e-5)if(this.zeroAlign&&n>=0)console.warn(`Can't adhere to given 'min' range, due to zeroalign`);else{o(),l=!1;continue}if(this.autoScaleStart&&this.autoScaleEnd&&t<r-n){a(),l=!1;continue}l=!0}}convertValue(e){return this.containerHeight-(e-this._start)*this.scale}screenToValue(e){return(this.containerHeight-e)/this.scale+this._start}},H8=class extends a1{constructor(e,t,n,r){super(),this.id=M$(),this.body=e,this.defaultOptions={orientation:`left`,showMinorLabels:!0,showMajorLabels:!0,showWeekScale:!1,icons:!1,majorLinesOffset:7,minorLinesOffset:4,labelOffsetX:10,labelOffsetY:2,iconWidth:20,width:`40px`,visible:!0,alignZeros:!0,left:{range:{min:void 0,max:void 0},format(e){return`${i1(e.toPrecision(3))}`},title:{text:void 0,style:void 0}},right:{range:{min:void 0,max:void 0},format(e){return`${i1(e.toPrecision(3))}`},title:{text:void 0,style:void 0}}},this.linegraphOptions=r,this.linegraphSVG=n,this.props={},this.DOMelements={lines:{},labels:{},title:{}},this.dom={},this.scale=void 0,this.range={start:0,end:0},this.options=Y.extend({},this.defaultOptions),this.conversionFactor=1,this.setOptions(t),this.width=Number(`${this.options.width}`.replace(`px`,``)),this.minWidth=this.width,this.height=this.linegraphSVG.getBoundingClientRect().height,this.hidden=!1,this.stepPixels=25,this.zeroCrossing=-1,this.amountOfSteps=-1,this.lineOffset=0,this.master=!0,this.masterAxis=null,this.svgElements={},this.iconsRemoved=!1,this.groups={},this.amountOfGroups=0,this._create(),this.scale??this._redrawLabels(),this.framework={svg:this.svg,svgElements:this.svgElements,options:this.options,groups:this.groups};let i=this;this.body.emitter.on(`verticalDrag`,()=>{i.dom.lineContainer.style.top=`${i.body.domProps.scrollTop}px`})}addGroup(e,t){Object.prototype.hasOwnProperty.call(this.groups,e)||(this.groups[e]=t),this.amountOfGroups+=1}updateGroup(e,t){Object.prototype.hasOwnProperty.call(this.groups,e)||(this.amountOfGroups+=1),this.groups[e]=t}removeGroup(e){Object.prototype.hasOwnProperty.call(this.groups,e)&&(delete this.groups[e],--this.amountOfGroups)}setOptions(e){if(e){let t=!1;this.options.orientation!=e.orientation&&e.orientation!==void 0&&(t=!0),Y.selectiveDeepExtend([`orientation`,`showMinorLabels`,`showMajorLabels`,`icons`,`majorLinesOffset`,`minorLinesOffset`,`labelOffsetX`,`labelOffsetY`,`iconWidth`,`width`,`visible`,`left`,`right`,`alignZeros`],this.options,e),this.minWidth=Number(`${this.options.width}`.replace(`px`,``)),t===!0&&this.dom.frame&&(this.hide(),this.show())}}_create(){this.dom.frame=document.createElement(`div`),this.dom.frame.style.width=this.options.width,this.dom.frame.style.height=this.height,this.dom.lineContainer=document.createElement(`div`),this.dom.lineContainer.style.width=`100%`,this.dom.lineContainer.style.height=this.height,this.dom.lineContainer.style.position=`relative`,this.dom.lineContainer.style.visibility=`visible`,this.dom.lineContainer.style.display=`block`,this.svg=document.createElementNS(`http://www.w3.org/2000/svg`,`svg`),this.svg.style.position=`absolute`,this.svg.style.top=`0px`,this.svg.style.height=`100%`,this.svg.style.width=`100%`,this.svg.style.display=`block`,this.dom.frame.appendChild(this.svg)}_redrawGroupIcons(){N8(this.svgElements);let e,t=this.options.iconWidth,n=11.5;e=this.options.orientation===`left`?4:this.width-t-4;let r=LU(this.groups);Y1(r).call(r,(e,t)=>e<t?-1:1);for(let i of r)this.groups[i].visible===!0&&(this.linegraphOptions.visibility[i]===void 0||this.linegraphOptions.visibility[i]===!0)&&(this.groups[i].getLegend(t,15,this.framework,e,n),n+=19);P8(this.svgElements),this.iconsRemoved=!1}_cleanupIcons(){this.iconsRemoved===!1&&(N8(this.svgElements),P8(this.svgElements),this.iconsRemoved=!0)}show(){this.hidden=!1,this.dom.frame.parentNode||(this.options.orientation===`left`?this.body.dom.left.appendChild(this.dom.frame):this.body.dom.right.appendChild(this.dom.frame)),this.dom.lineContainer.parentNode||this.body.dom.backgroundHorizontal.appendChild(this.dom.lineContainer),this.dom.lineContainer.style.display=`block`}hide(){this.hidden=!0,this.dom.frame.parentNode&&this.dom.frame.parentNode.removeChild(this.dom.frame),this.dom.lineContainer.style.display=`none`}setRange(e,t){this.range.start=e,this.range.end=t}redraw(){let e=!1,t=0;this.dom.lineContainer.style.top=`${this.body.domProps.scrollTop}px`;for(let e in this.groups)Object.prototype.hasOwnProperty.call(this.groups,e)&&this.groups[e].visible===!0&&(this.linegraphOptions.visibility[e]===void 0||this.linegraphOptions.visibility[e]===!0)&&t++;if(this.amountOfGroups===0||t===0)this.hide();else{this.show(),this.height=Number(this.linegraphSVG.style.height.replace(`px`,``)),this.dom.lineContainer.style.height=`${this.height}px`,this.width=this.options.visible===!0?Number(`${this.options.width}`.replace(`px`,``)):0;let t=this.props,n=this.dom.frame;n.className=`vis-data-axis`,this._calculateCharSize();let r=this.options.orientation,i=this.options.showMinorLabels,a=this.options.showMajorLabels,o=this.body.dom.backgroundHorizontal.offsetWidth;t.minorLabelHeight=i?t.minorCharHeight:0,t.majorLabelHeight=a?t.majorCharHeight:0,t.minorLineWidth=o-this.lineOffset-this.width+2*this.options.minorLinesOffset,t.minorLineHeight=1,t.majorLineWidth=o-this.lineOffset-this.width+2*this.options.majorLinesOffset,t.majorLineHeight=1,r===`left`?(n.style.top=`0`,n.style.left=`0`,n.style.bottom=``,n.style.width=`${this.width}px`,n.style.height=`${this.height}px`,this.props.width=this.body.domProps.left.width,this.props.height=this.body.domProps.left.height):(n.style.top=``,n.style.bottom=`0`,n.style.left=`0`,n.style.width=`${this.width}px`,n.style.height=`${this.height}px`,this.props.width=this.body.domProps.right.width,this.props.height=this.body.domProps.right.height),e=this._redrawLabels(),e=this._isResized()||e,this.options.icons===!0?this._redrawGroupIcons():this._cleanupIcons(),this._redrawTitle(r)}return e}_redrawLabels(){let e=!1;N8(this.DOMelements.lines),N8(this.DOMelements.labels);let t=this.options.orientation,n=this.options[t].range==null?{}:this.options[t].range,r=!0;n.max!=null&&(this.range.end=n.max,r=!1);let i=!0;n.min!=null&&(this.range.start=n.min,i=!1),this.scale=new V8(this.range.start,this.range.end,i,r,this.dom.frame.offsetHeight,this.props.majorCharHeight,this.options.alignZeros,this.options[t].format),this.master===!1&&this.masterAxis!=null?(this.scale.followScale(this.masterAxis.scale),this.dom.lineContainer.style.display=`none`):this.dom.lineContainer.style.display=`block`,this.maxLabelSize=0;let a=this.scale.getLines();q(a).call(a,e=>{let n=e.y,r=e.major;this.options.showMinorLabels&&r===!1&&this._redrawLabel(n-2,e.val,t,`vis-y-axis vis-minor`,this.props.minorCharHeight),r&&n>=0&&this._redrawLabel(n-2,e.val,t,`vis-y-axis vis-major`,this.props.majorCharHeight),this.master===!0&&(r?this._redrawLine(n,t,`vis-grid vis-horizontal vis-major`,this.options.majorLinesOffset,this.props.majorLineWidth):this._redrawLine(n,t,`vis-grid vis-horizontal vis-minor`,this.options.minorLinesOffset,this.props.minorLineWidth))});let o=0;this.options[t].title!==void 0&&this.options[t].title.text!==void 0&&(o=this.props.titleCharHeight);let s=this.options.icons===!0?Math.max(this.options.iconWidth,o)+this.options.labelOffsetX+15:o+this.options.labelOffsetX+15;return this.maxLabelSize>this.width-s&&this.options.visible===!0?(this.width=this.maxLabelSize+s,this.options.width=`${this.width}px`,P8(this.DOMelements.lines),P8(this.DOMelements.labels),this.redraw(),e=!0):this.maxLabelSize<this.width-s&&this.options.visible===!0&&this.width>this.minWidth?(this.width=Math.max(this.minWidth,this.maxLabelSize+s),this.options.width=`${this.width}px`,P8(this.DOMelements.lines),P8(this.DOMelements.labels),this.redraw(),e=!0):(P8(this.DOMelements.lines),P8(this.DOMelements.labels),e=!1),e}convertValue(e){return this.scale.convertValue(e)}screenToValue(e){return this.scale.screenToValue(e)}_redrawLabel(e,t,n,r,i){let a=L8(`div`,this.DOMelements.labels,this.dom.frame);a.className=r,a.innerHTML=Y.xss(t),n===`left`?(a.style.left=`-${this.options.labelOffsetX}px`,a.style.textAlign=`right`):(a.style.right=`-${this.options.labelOffsetX}px`,a.style.textAlign=`left`),a.style.top=`${e-.5*i+this.options.labelOffsetY}px`,t+=``;let o=Math.max(this.props.majorCharWidth,this.props.minorCharWidth);this.maxLabelSize<t.length*o&&(this.maxLabelSize=t.length*o)}_redrawLine(e,t,n,r,i){if(this.master===!0){let a=L8(`div`,this.DOMelements.lines,this.dom.lineContainer);a.className=n,a.innerHTML=``,t===`left`?a.style.left=`${this.width-r}px`:a.style.right=`${this.width-r}px`,a.style.width=`${i}px`,a.style.top=`${e}px`}}_redrawTitle(e){if(N8(this.DOMelements.title),this.options[e].title!==void 0&&this.options[e].title.text!==void 0){let t=L8(`div`,this.DOMelements.title,this.dom.frame);t.className=`vis-y-axis vis-title vis-${e}`,t.innerHTML=Y.xss(this.options[e].title.text),this.options[e].title.style!==void 0&&Y.addCssText(t,this.options[e].title.style),e===`left`?t.style.left=`${this.props.titleCharHeight}px`:t.style.right=`${this.props.titleCharHeight}px`,t.style.width=`${this.height}px`}P8(this.DOMelements.title)}_calculateCharSize(){if(!(`minorCharHeight`in this.props)){let e=document.createTextNode(`0`),t=document.createElement(`div`);t.className=`vis-y-axis vis-minor vis-measure`,t.appendChild(e),this.dom.frame.appendChild(t),this.props.minorCharHeight=t.clientHeight,this.props.minorCharWidth=t.clientWidth,this.dom.frame.removeChild(t)}if(!(`majorCharHeight`in this.props)){let e=document.createTextNode(`0`),t=document.createElement(`div`);t.className=`vis-y-axis vis-major vis-measure`,t.appendChild(e),this.dom.frame.appendChild(t),this.props.majorCharHeight=t.clientHeight,this.props.majorCharWidth=t.clientWidth,this.dom.frame.removeChild(t)}if(!(`titleCharHeight`in this.props)){let e=document.createTextNode(`0`),t=document.createElement(`div`);t.className=`vis-y-axis vis-title vis-measure`,t.appendChild(e),this.dom.frame.appendChild(t),this.props.titleCharHeight=t.clientHeight,this.props.titleCharWidth=t.clientWidth,this.dom.frame.removeChild(t)}}};function U8(){}U8.draw=function(e,t,n,r){r||=0;for(var i=G8(n,t),a=0;a<e.length;a++)if(!i)R8(e[a].screen_x+r,e[a].screen_y,W8(t),n.svgElements,n.svg,e[a].label);else{var o=i(e[a],t);(o===!0||typeof o==`object`)&&R8(e[a].screen_x+r,e[a].screen_y,W8(t,o),n.svgElements,n.svg,e[a].label)}},U8.drawIcon=function(e,t,n,r,i,a){var o=i*.5,s=I8(`rect`,a.svgElements,a.svg);s.setAttributeNS(null,`x`,t),s.setAttributeNS(null,`y`,n-o),s.setAttributeNS(null,`width`,r),s.setAttributeNS(null,`height`,2*o),s.setAttributeNS(null,`class`,`vis-outline`),R8(t+.5*r,n,W8(e),a.svgElements,a.svg)};function W8(e,t){return t=t===void 0?{}:t,{style:t.style||e.options.drawPoints.style,styles:t.styles||e.options.drawPoints.styles,size:t.size||e.options.drawPoints.size,className:t.className||e.className}}function G8(e,t){var n=void 0;return e.options&&e.options.drawPoints&&e.options.drawPoints.onRender&&typeof e.options.drawPoints.onRender==`function`&&(n=e.options.drawPoints.onRender),t.group.options&&t.group.options.drawPoints&&t.group.options.drawPoints.onRender&&typeof t.group.options.drawPoints.onRender==`function`&&(n=t.group.options.drawPoints.onRender),n}function K8(){}K8.drawIcon=function(e,t,n,r,i,a){var o=i*.5,s=I8(`rect`,a.svgElements,a.svg);s.setAttributeNS(null,`x`,t),s.setAttributeNS(null,`y`,n-o),s.setAttributeNS(null,`width`,r),s.setAttributeNS(null,`height`,2*o),s.setAttributeNS(null,`class`,`vis-outline`);var c=Math.round(.3*r),l=e.options.barChart.width/c,u=Math.round(.4*i),d=Math.round(.75*i),f=Math.round((r-2*c)/3);if(z8(t+.5*c+f,n+o-u-1,c,u,e.className+` vis-bar`,a.svgElements,a.svg,e.style),z8(t+1.5*c+f+2,n+o-d-1,c,d,e.className+` vis-bar`,a.svgElements,a.svg,e.style),e.options.drawPoints.enabled==1){var p={style:e.options.drawPoints.style,styles:e.options.drawPoints.styles,size:e.options.drawPoints.size/l,className:e.className};R8(t+.5*c+f,n+o-u-1,p,a.svgElements,a.svg),R8(t+1.5*c+f+2,n+o-d-1,p,a.svgElements,a.svg)}},K8.draw=function(e,t,n){var r=[],i={},a,o,s,c,l,u,d=0;for(l=0;l<e.length;l++)if(c=n.groups[e[l]],c.options.style===`bar`&&c.visible===!0&&(n.options.groups.visibility[e[l]]===void 0||n.options.groups.visibility[e[l]]===!0))for(u=0;u<t[e[l]].length;u++)r.push({screen_x:t[e[l]][u].screen_x,screen_end:t[e[l]][u].screen_end,screen_y:t[e[l]][u].screen_y,x:t[e[l]][u].x,end:t[e[l]][u].end,y:t[e[l]][u].y,groupId:e[l],label:t[e[l]][u].label}),d+=1;if(d!==0)for(Y1(r).call(r,function(e,t){return e.screen_x===t.screen_x?e.groupId<t.groupId?-1:1:e.screen_x-t.screen_x}),K8._getDataIntersections(i,r),l=0;l<r.length;l++){c=n.groups[r[l].groupId];var f=c.options.barChart.minWidth==null?.1*c.options.barChart.width:c.options.barChart.minWidth;o=r[l].screen_x;var p=0;if(i[o]===void 0)l+1<r.length&&(a=Math.abs(r[l+1].screen_x-o)),s=K8._getSafeDrawData(a,c,f);else{var m=l+(i[o].amount-i[o].resolved);m<r.length&&(a=Math.abs(r[m].screen_x-o)),s=K8._getSafeDrawData(a,c,f),i[o].resolved+=1,c.options.stack===!0&&c.options.excludeFromStacking!==!0?r[l].screen_y<c.zeroPosition?(p=i[o].accumulatedNegative,i[o].accumulatedNegative+=c.zeroPosition-r[l].screen_y):(p=i[o].accumulatedPositive,i[o].accumulatedPositive+=c.zeroPosition-r[l].screen_y):c.options.barChart.sideBySide===!0&&(s.width/=i[o].amount,s.offset+=i[o].resolved*s.width-.5*s.width*(i[o].amount+1))}let e=s.width,t=r[l].screen_x;if(r[l].screen_end==null?t+=s.offset:(e=r[l].screen_end-r[l].screen_x,t+=e*.5),z8(t,r[l].screen_y-p,e,c.zeroPosition-r[l].screen_y,c.className+` vis-bar`,n.svgElements,n.svg,c.style),c.options.drawPoints.enabled===!0){let e={screen_x:r[l].screen_x,screen_y:r[l].screen_y-p,x:r[l].x,y:r[l].y,groupId:r[l].groupId,label:r[l].label};U8.draw([e],c,n,s.offset)}}},K8._getDataIntersections=function(e,t){for(var n,r=0;r<t.length;r++)r+1<t.length&&(n=Math.abs(t[r+1].screen_x-t[r].screen_x)),r>0&&(n=Math.min(n,Math.abs(t[r-1].screen_x-t[r].screen_x))),n===0&&(e[t[r].screen_x]===void 0&&(e[t[r].screen_x]={amount:0,resolved:0,accumulatedPositive:0,accumulatedNegative:0}),e[t[r].screen_x].amount+=1)},K8._getSafeDrawData=function(e,t,n){var r,i;return e<t.options.barChart.width&&e>0?(r=e<n?n:e,i=0,t.options.barChart.align===`left`?i-=.5*e:t.options.barChart.align===`right`&&(i+=.5*e)):(r=t.options.barChart.width,i=0,t.options.barChart.align===`left`?i-=.5*t.options.barChart.width:t.options.barChart.align===`right`&&(i+=.5*t.options.barChart.width)),{width:r,offset:i}},K8.getStackedYRange=function(e,t,n,r,i){if(e.length>0){Y1(e).call(e,function(e,t){return e.screen_x===t.screen_x?e.groupId<t.groupId?-1:1:e.screen_x-t.screen_x});var a={};K8._getDataIntersections(a,e),t[r]=K8._getStackedYRange(a,e),t[r].yAxisOrientation=i,n.push(r)}},K8._getStackedYRange=function(e,t){for(var n,r=t[0].screen_y,i=t[0].screen_y,a=0;a<t.length;a++)n=t[a].screen_x,e[n]===void 0?(r=r>t[a].screen_y?t[a].screen_y:r,i=i<t[a].screen_y?t[a].screen_y:i):t[a].screen_y<0?e[n].accumulatedNegative+=t[a].screen_y:e[n].accumulatedPositive+=t[a].screen_y;for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(r=r>e[o].accumulatedNegative?e[o].accumulatedNegative:r,r=r>e[o].accumulatedPositive?e[o].accumulatedPositive:r,i=i<e[o].accumulatedNegative?e[o].accumulatedNegative:i,i=i<e[o].accumulatedPositive?e[o].accumulatedPositive:i);return{min:r,max:i}};function q8(){}q8.calcPath=function(e,t){if(e!=null&&e.length>0){var n=[];return n=t.options.interpolation.enabled==1?q8._catmullRom(e,t):q8._linear(e),n}},q8.drawIcon=function(e,t,n,r,i,a){var o=i*.5,s,c,l=I8(`rect`,a.svgElements,a.svg);if(l.setAttributeNS(null,`x`,t),l.setAttributeNS(null,`y`,n-o),l.setAttributeNS(null,`width`,r),l.setAttributeNS(null,`height`,2*o),l.setAttributeNS(null,`class`,`vis-outline`),s=I8(`path`,a.svgElements,a.svg),s.setAttributeNS(null,`class`,e.className),e.style!==void 0&&s.setAttributeNS(null,`style`,e.style),s.setAttributeNS(null,`d`,`M`+t+`,`+n+` L`+(t+r)+`,`+n),e.options.shaded.enabled==1&&(c=I8(`path`,a.svgElements,a.svg),e.options.shaded.orientation==`top`?c.setAttributeNS(null,`d`,`M`+t+`, `+(n-o)+`L`+t+`,`+n+` L`+(t+r)+`,`+n+` L`+(t+r)+`,`+(n-o)):c.setAttributeNS(null,`d`,`M`+t+`,`+n+` L`+t+`,`+(n+o)+` L`+(t+r)+`,`+(n+o)+`L`+(t+r)+`,`+n),c.setAttributeNS(null,`class`,e.className+` vis-icon-fill`),e.options.shaded.style!==void 0&&e.options.shaded.style!==``&&c.setAttributeNS(null,`style`,e.options.shaded.style)),e.options.drawPoints.enabled==1){var u={style:e.options.drawPoints.style,styles:e.options.drawPoints.styles,size:e.options.drawPoints.size,className:e.className};R8(t+.5*r,n,u,a.svgElements,a.svg)}},q8.drawShading=function(e,t,n,r){if(t.options.shaded.enabled==1){var i=Number(r.svg.style.height.replace(`px`,``)),a=I8(`path`,r.svgElements,r.svg),o=`L`;t.options.interpolation.enabled==1&&(o=`C`);var s,c=0;c=t.options.shaded.orientation==`top`?0:t.options.shaded.orientation==`bottom`?i:Math.min(Math.max(0,t.zeroPosition),i),s=t.options.shaded.orientation==`group`&&n!=null&&n!=null?`M`+e[0][0]+`,`+e[0][1]+` `+this.serializePath(e,o,!1)+` L`+n[n.length-1][0]+`,`+n[n.length-1][1]+` `+this.serializePath(n,o,!0)+n[0][0]+`,`+n[0][1]+` Z`:`M`+e[0][0]+`,`+e[0][1]+` `+this.serializePath(e,o,!1)+` V`+c+` H`+e[0][0]+` Z`,a.setAttributeNS(null,`class`,t.className+` vis-fill`),t.options.shaded.style!==void 0&&a.setAttributeNS(null,`style`,t.options.shaded.style),a.setAttributeNS(null,`d`,s)}},q8.draw=function(e,t,n){if(e!=null&&e!=null){var r=I8(`path`,n.svgElements,n.svg);r.setAttributeNS(null,`class`,t.className),t.style!==void 0&&r.setAttributeNS(null,`style`,t.style);var i=`L`;t.options.interpolation.enabled==1&&(i=`C`),r.setAttributeNS(null,`d`,`M`+e[0][0]+`,`+e[0][1]+` `+this.serializePath(e,i,!1))}},q8.serializePath=function(e,t,n){if(e.length<2)return``;var r=t,i;if(n)for(i=e.length-2;i>0;i--)r+=e[i][0]+`,`+e[i][1]+` `;else for(i=1;i<e.length;i++)r+=e[i][0]+`,`+e[i][1]+` `;return r},q8._catmullRomUniform=function(e){var t,n,r,i,a,o,s=[];s.push([Math.round(e[0].screen_x),Math.round(e[0].screen_y)]);for(var c=1/6,l=e.length,u=0;u<l-1;u++)t=u==0?e[0]:e[u-1],n=e[u],r=e[u+1],i=u+2<l?e[u+2]:r,a={screen_x:(-t.screen_x+6*n.screen_x+r.screen_x)*c,screen_y:(-t.screen_y+6*n.screen_y+r.screen_y)*c},o={screen_x:(n.screen_x+6*r.screen_x-i.screen_x)*c,screen_y:(n.screen_y+6*r.screen_y-i.screen_y)*c},s.push([a.screen_x,a.screen_y]),s.push([o.screen_x,o.screen_y]),s.push([r.screen_x,r.screen_y]);return s},q8._catmullRom=function(e,t){var n=t.options.interpolation.alpha;if(n==0||n===void 0)return this._catmullRomUniform(e);var r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S=[];S.push([Math.round(e[0].screen_x),Math.round(e[0].screen_y)]);for(var C=e.length,w=0;w<C-1;w++)r=w==0?e[0]:e[w-1],i=e[w],a=e[w+1],o=w+2<C?e[w+2]:a,l=Math.sqrt((r.screen_x-i.screen_x)**2+(r.screen_y-i.screen_y)**2),u=Math.sqrt((i.screen_x-a.screen_x)**2+(i.screen_y-a.screen_y)**2),d=Math.sqrt((a.screen_x-o.screen_x)**2+(a.screen_y-o.screen_y)**2),g=d**+n,v=d**(2*n),_=u**+n,y=u**(2*n),x=l**+n,b=l**(2*n),f=2*b+3*x*_+y,p=2*v+3*g*_+y,m=3*x*(x+_),m>0&&(m=1/m),h=3*g*(g+_),h>0&&(h=1/h),s={screen_x:(-y*r.screen_x+f*i.screen_x+b*a.screen_x)*m,screen_y:(-y*r.screen_y+f*i.screen_y+b*a.screen_y)*m},c={screen_x:(v*i.screen_x+p*a.screen_x-y*o.screen_x)*h,screen_y:(v*i.screen_y+p*a.screen_y-y*o.screen_y)*h},s.screen_x==0&&s.screen_y==0&&(s=i),c.screen_x==0&&c.screen_y==0&&(c=a),S.push([s.screen_x,s.screen_y]),S.push([c.screen_x,c.screen_y]),S.push([a.screen_x,a.screen_y]);return S},q8._linear=function(e){for(var t=[],n=0;n<e.length;n++)t.push([e[n].screen_x,e[n].screen_y]);return t};function J8(e,t,n,r){this.id=t,this.options=Y.selectiveBridgeObject([`sampling`,`style`,`sort`,`yAxisOrientation`,`barChart`,`drawPoints`,`shaded`,`interpolation`,`zIndex`,`excludeFromStacking`,`excludeFromLegend`],n),this.usingDefaultStyle=e.className===void 0,this.groupsUsingDefaultStyles=r,this.zeroPosition=0,this.update(e),this.usingDefaultStyle==1&&(this.groupsUsingDefaultStyles[0]+=1),this.itemsData=[],this.visible=e.visible===void 0?!0:e.visible}J8.prototype.setItems=function(e){e==null?this.itemsData=[]:(this.itemsData=e,Y1(this.options)==1&&Y.insertSort(this.itemsData,function(e,t){return e.x>t.x?1:-1}))},J8.prototype.getItems=function(){return this.itemsData},J8.prototype.setZeroPosition=function(e){this.zeroPosition=e},J8.prototype.setOptions=function(e){e!==void 0&&(Y.selectiveDeepExtend([`sampling`,`style`,`sort`,`yAxisOrientation`,`barChart`,`zIndex`,`excludeFromStacking`,`excludeFromLegend`],this.options,e),typeof e.drawPoints==`function`&&(e.drawPoints={onRender:e.drawPoints}),Y.mergeOptions(this.options,e,`interpolation`),Y.mergeOptions(this.options,e,`drawPoints`),Y.mergeOptions(this.options,e,`shaded`),e.interpolation&&typeof e.interpolation==`object`&&e.interpolation.parametrization&&(e.interpolation.parametrization==`uniform`?this.options.interpolation.alpha=0:e.interpolation.parametrization==`chordal`?this.options.interpolation.alpha=1:(this.options.interpolation.parametrization=`centripetal`,this.options.interpolation.alpha=.5)))},J8.prototype.update=function(e){this.group=e,this.content=e.content||`graph`,this.className=e.className||this.className||`vis-graph-group`+this.groupsUsingDefaultStyles[0]%10,this.visible=e.visible===void 0?!0:e.visible,this.style=e.style,this.setOptions(e.options)},J8.prototype.getLegend=function(e,t,n,r,i){switch((n==null||n==null)&&(n={svg:document.createElementNS(`http://www.w3.org/2000/svg`,`svg`),svgElements:{},options:this.options,groups:[this]}),(r==null||r==null)&&(r=0),(i==null||i==null)&&(i=.5*t),this.options.style){case`line`:q8.drawIcon(this,r,i,e,t,n);break;case`points`:case`point`:U8.drawIcon(this,r,i,e,t,n);break;case`bar`:K8.drawIcon(this,r,i,e,t,n);break}return{icon:n.svg,label:this.content,orientation:this.options.yAxisOrientation}},J8.prototype.getYRange=function(e){for(var t=e[0].y,n=e[0].y,r=0;r<e.length;r++)t=t>e[r].y?e[r].y:t,n=n<e[r].y?e[r].y:n;return{min:t,max:n,yAxisOrientation:this.options.yAxisOrientation}};function Y8(e,t,n,r){this.body=e,this.defaultOptions={enabled:!1,icons:!0,iconSize:20,iconSpacing:6,left:{visible:!0,position:`top-left`},right:{visible:!0,position:`top-right`}},this.side=n,this.options=Y.extend({},this.defaultOptions),this.linegraphOptions=r,this.svgElements={},this.dom={},this.groups={},this.amountOfGroups=0,this._create(),this.framework={svg:this.svg,svgElements:this.svgElements,options:this.options,groups:this.groups},this.setOptions(t)}Y8.prototype=new a1,Y8.prototype.clear=function(){this.groups={},this.amountOfGroups=0},Y8.prototype.addGroup=function(e,t){t.options.excludeFromLegend!=1&&(Object.prototype.hasOwnProperty.call(this.groups,e)||(this.groups[e]=t),this.amountOfGroups+=1)},Y8.prototype.updateGroup=function(e,t){this.groups[e]=t},Y8.prototype.removeGroup=function(e){Object.prototype.hasOwnProperty.call(this.groups,e)&&(delete this.groups[e],--this.amountOfGroups)},Y8.prototype._create=function(){this.dom.frame=document.createElement(`div`),this.dom.frame.className=`vis-legend`,this.dom.frame.style.position=`absolute`,this.dom.frame.style.top=`10px`,this.dom.frame.style.display=`block`,this.dom.textArea=document.createElement(`div`),this.dom.textArea.className=`vis-legend-text`,this.dom.textArea.style.position=`relative`,this.dom.textArea.style.top=`0px`,this.svg=document.createElementNS(`http://www.w3.org/2000/svg`,`svg`),this.svg.style.position=`absolute`,this.svg.style.top=`0px`,this.svg.style.width=this.options.iconSize+5+`px`,this.svg.style.height=`100%`,this.dom.frame.appendChild(this.svg),this.dom.frame.appendChild(this.dom.textArea)},Y8.prototype.hide=function(){this.dom.frame.parentNode&&this.dom.frame.parentNode.removeChild(this.dom.frame)},Y8.prototype.show=function(){this.dom.frame.parentNode||this.body.dom.center.appendChild(this.dom.frame)},Y8.prototype.setOptions=function(e){Y.selectiveDeepExtend([`enabled`,`orientation`,`icons`,`left`,`right`],this.options,e)},Y8.prototype.redraw=function(){var e=0,t=LU(this.groups);Y1(t).call(t,function(e,t){return e<t?-1:1});for(var n=0;n<t.length;n++){var r=t[n];this.groups[r].visible==1&&(this.linegraphOptions.visibility[r]===void 0||this.linegraphOptions.visibility[r]==1)&&e++}if(this.options[this.side].visible==0||this.amountOfGroups==0||this.options.enabled==0||e==0)this.hide();else{if(this.show(),this.options[this.side].position==`top-left`||this.options[this.side].position==`bottom-left`?(this.dom.frame.style.left=`4px`,this.dom.frame.style.textAlign=`left`,this.dom.textArea.style.textAlign=`left`,this.dom.textArea.style.left=this.options.iconSize+15+`px`,this.dom.textArea.style.right=``,this.svg.style.left=`0px`,this.svg.style.right=``):(this.dom.frame.style.right=`4px`,this.dom.frame.style.textAlign=`right`,this.dom.textArea.style.textAlign=`right`,this.dom.textArea.style.right=this.options.iconSize+15+`px`,this.dom.textArea.style.left=``,this.svg.style.right=`0px`,this.svg.style.left=``),this.options[this.side].position==`top-left`||this.options[this.side].position==`top-right`)this.dom.frame.style.top=4-Number(this.body.dom.center.style.top.replace(`px`,``))+`px`,this.dom.frame.style.bottom=``;else{var i=this.body.domProps.center.height-this.body.domProps.centerContainer.height;this.dom.frame.style.bottom=4+i+Number(this.body.dom.center.style.top.replace(`px`,``))+`px`,this.dom.frame.style.top=``}this.options.icons==0?(this.dom.frame.style.width=this.dom.textArea.offsetWidth+10+`px`,this.dom.textArea.style.right=``,this.dom.textArea.style.left=``,this.svg.style.width=`0px`):(this.dom.frame.style.width=this.options.iconSize+15+this.dom.textArea.offsetWidth+10+`px`,this.drawLegendIcons());var a=``;for(n=0;n<t.length;n++)r=t[n],this.groups[r].visible==1&&(this.linegraphOptions.visibility[r]===void 0||this.linegraphOptions.visibility[r]==1)&&(a+=this.groups[r].content+`<br />`);this.dom.textArea.innerHTML=Y.xss(a),this.dom.textArea.style.lineHeight=.75*this.options.iconSize+this.options.iconSpacing+`px`}},Y8.prototype.drawLegendIcons=function(){if(this.dom.frame.parentNode){var e=LU(this.groups);Y1(e).call(e,function(e,t){return e<t?-1:1}),F8(this.svgElements);var t=window.getComputedStyle(this.dom.frame).paddingTop,n=Number(t.replace(`px`,``)),r=n,i=this.options.iconSize,a=.75*this.options.iconSize,o=n+.5*a+3;this.svg.style.width=i+5+n+`px`;for(var s=0;s<e.length;s++){var c=e[s];this.groups[c].visible==1&&(this.linegraphOptions.visibility[c]===void 0||this.linegraphOptions.visibility[c]==1)&&(this.groups[c].getLegend(i,a,this.framework,r,o),o+=a+this.options.iconSpacing)}}};var X8=`__ungrouped__`;function Z8(e,t){this.id=M$(),this.body=e,this.defaultOptions={yAxisOrientation:`left`,defaultGroup:`default`,sort:!0,sampling:!0,stack:!1,graphHeight:`400px`,shaded:{enabled:!1,orientation:`bottom`},style:`line`,barChart:{width:50,sideBySide:!1,align:`center`},interpolation:{enabled:!0,parametrization:`centripetal`,alpha:.5},drawPoints:{enabled:!0,size:6,style:`square`},dataAxis:{},legend:{},groups:{visibility:{}}},this.options=Y.extend({},this.defaultOptions),this.dom={},this.props={},this.hammer=null,this.groups={},this.abortedGraphUpdate=!1,this.updateSVGheight=!1,this.updateSVGheightOnResize=!1,this.forceGraphUpdate=!0;var n=this;this.itemsData=null,this.groupsData=null,this.itemListeners={add:function(e,t){n._onAdd(t.items)},update:function(e,t){n._onUpdate(t.items)},remove:function(e,t){n._onRemove(t.items)}},this.groupListeners={add:function(e,t){n._onAddGroups(t.items)},update:function(e,t){n._onUpdateGroups(t.items)},remove:function(e,t){n._onRemoveGroups(t.items)}},this.items={},this.selection=[],this.lastStart=this.body.range.start,this.touchParams={},this.svgElements={},this.setOptions(t),this.groupsUsingDefaultStyles=[0],this.body.emitter.on(`rangechanged`,function(){n.svg.style.left=Y.option.asSize(-n.props.width),n.forceGraphUpdate=!0,n.redraw.call(n)}),this._create(),this.framework={svg:this.svg,svgElements:this.svgElements,options:this.options,groups:this.groups}}Z8.prototype=new a1,Z8.prototype._create=function(){var e=document.createElement(`div`);e.className=`vis-line-graph`,this.dom.frame=e,this.svg=document.createElementNS(`http://www.w3.org/2000/svg`,`svg`),this.svg.style.position=`relative`,this.svg.style.height=(``+this.options.graphHeight).replace(`px`,``)+`px`,this.svg.style.display=`block`,e.appendChild(this.svg),this.options.dataAxis.orientation=`left`,this.yAxisLeft=new H8(this.body,this.options.dataAxis,this.svg,this.options.groups),this.options.dataAxis.orientation=`right`,this.yAxisRight=new H8(this.body,this.options.dataAxis,this.svg,this.options.groups),delete this.options.dataAxis.orientation,this.legendLeft=new Y8(this.body,this.options.legend,`left`,this.options.groups),this.legendRight=new Y8(this.body,this.options.legend,`right`,this.options.groups),this.show()},Z8.prototype.setOptions=function(e){e&&(e.graphHeight===void 0&&e.height!==void 0?(this.updateSVGheight=!0,this.updateSVGheightOnResize=!0):this.body.domProps.centerContainer.height!==void 0&&e.graphHeight!==void 0&&bq((e.graphHeight+``).replace(`px`,``))<this.body.domProps.centerContainer.height&&(this.updateSVGheight=!0),Y.selectiveDeepExtend([`sampling`,`defaultGroup`,`stack`,`height`,`graphHeight`,`yAxisOrientation`,`style`,`barChart`,`dataAxis`,`sort`,`groups`],this.options,e),Y.mergeOptions(this.options,e,`interpolation`),Y.mergeOptions(this.options,e,`drawPoints`),Y.mergeOptions(this.options,e,`shaded`),Y.mergeOptions(this.options,e,`legend`),e.interpolation&&typeof e.interpolation==`object`&&e.interpolation.parametrization&&(e.interpolation.parametrization==`uniform`?this.options.interpolation.alpha=0:e.interpolation.parametrization==`chordal`?this.options.interpolation.alpha=1:(this.options.interpolation.parametrization=`centripetal`,this.options.interpolation.alpha=.5)),this.yAxisLeft&&e.dataAxis!==void 0&&(this.yAxisLeft.setOptions(this.options.dataAxis),this.yAxisRight.setOptions(this.options.dataAxis)),this.legendLeft&&e.legend!==void 0&&(this.legendLeft.setOptions(this.options.legend),this.legendRight.setOptions(this.options.legend)),Object.prototype.hasOwnProperty.call(this.groups,X8)&&this.groups[X8].setOptions(e)),this.dom.frame&&(this.forceGraphUpdate=!0,this.body.emitter.emit(`_change`,{queue:!0}))},Z8.prototype.hide=function(){this.dom.frame.parentNode&&this.dom.frame.parentNode.removeChild(this.dom.frame)},Z8.prototype.show=function(){this.dom.frame.parentNode||this.body.dom.center.appendChild(this.dom.frame)},Z8.prototype.setItems=function(e){var t=this,n,r=this.itemsData;if(!e)this.itemsData=null;else if(F$(e))this.itemsData=z$(e);else throw TypeError(`Data must implement the interface of DataSet or DataView`);if(r&&(q(Y).call(Y,this.itemListeners,function(e,t){r.off(t,e)}),r.dispose(),n=r.getIds(),this._onRemove(n)),this.itemsData){var i=this.id;q(Y).call(Y,this.itemListeners,function(e,n){t.itemsData.on(n,e,i)}),n=this.itemsData.getIds(),this._onAdd(n)}},Z8.prototype.setGroups=function(e){var t=this,n;if(this.groupsData){q(Y).call(Y,this.groupListeners,function(e,n){t.groupsData.off(n,e)}),n=this.groupsData.getIds(),this.groupsData=null;for(var r=0;r<n.length;r++)this._removeGroup(n[r])}if(!e)this.groupsData=null;else if(F$(e))this.groupsData=e;else throw TypeError(`Data must implement the interface of DataSet or DataView`);if(this.groupsData){var i=this.id;q(Y).call(Y,this.groupListeners,function(e,n){t.groupsData.on(n,e,i)}),n=this.groupsData.getIds(),this._onAddGroups(n)}},Z8.prototype._onUpdate=function(e){this._updateAllGroupData(e)},Z8.prototype._onAdd=function(e){this._onUpdate(e)},Z8.prototype._onRemove=function(e){this._onUpdate(e)},Z8.prototype._onUpdateGroups=function(e){this._updateAllGroupData(null,e)},Z8.prototype._onAddGroups=function(e){this._onUpdateGroups(e)},Z8.prototype._onRemoveGroups=function(e){for(var t=0;t<e.length;t++)this._removeGroup(e[t]);this.forceGraphUpdate=!0,this.body.emitter.emit(`_change`,{queue:!0})},Z8.prototype._removeGroup=function(e){Object.prototype.hasOwnProperty.call(this.groups,e)&&(this.groups[e].options.yAxisOrientation==`right`?(this.yAxisRight.removeGroup(e),this.legendRight.removeGroup(e),this.legendRight.redraw()):(this.yAxisLeft.removeGroup(e),this.legendLeft.removeGroup(e),this.legendLeft.redraw()),delete this.groups[e])},Z8.prototype._updateGroup=function(e,t){Object.prototype.hasOwnProperty.call(this.groups,t)?(this.groups[t].update(e),this.groups[t].options.yAxisOrientation==`right`?(this.yAxisRight.updateGroup(t,this.groups[t]),this.legendRight.updateGroup(t,this.groups[t]),this.yAxisLeft.removeGroup(t),this.legendLeft.removeGroup(t)):(this.yAxisLeft.updateGroup(t,this.groups[t]),this.legendLeft.updateGroup(t,this.groups[t]),this.yAxisRight.removeGroup(t),this.legendRight.removeGroup(t))):(this.groups[t]=new J8(e,t,this.options,this.groupsUsingDefaultStyles),this.groups[t].options.yAxisOrientation==`right`?(this.yAxisRight.addGroup(t,this.groups[t]),this.legendRight.addGroup(t,this.groups[t])):(this.yAxisLeft.addGroup(t,this.groups[t]),this.legendLeft.addGroup(t,this.groups[t]))),this.legendLeft.redraw(),this.legendRight.redraw()},Z8.prototype._updateAllGroupData=function(e,t){if(this.itemsData!=null){var n={},r=this.itemsData.get(),i=this.itemsData.idProp,a={};e&&nU(e).call(e,function(e){a[e]=e});for(var o={},s=0;s<r.length;s++){var c=r[s],l=c.group;l??=X8,Object.prototype.hasOwnProperty.call(o,l)?o[l]++:o[l]=1}var u={};if(!t&&e){for(l in this.groups)if(Object.prototype.hasOwnProperty.call(this.groups,l)){h=this.groups[l];var d=h.getItems();n[l]=J(d).call(d,function(e){return u[e[i]]=e[i],e[i]!==a[e[i]]});var f=o[l];o[l]-=n[l].length,n[l].length<f&&(n[l][f-1]={})}}for(s=0;s<r.length;s++)if(c=r[s],l=c.group,l??=X8,!(!t&&e&&c[i]!==a[c[i]]&&Object.prototype.hasOwnProperty.call(u,c[i]))){Object.prototype.hasOwnProperty.call(n,l)||(n[l]=Array(o[l]));var p=Y.bridgeObject(c);p.x=Y.convert(c.x,`Date`),p.end=Y.convert(c.end,`Date`),p.orginalY=c.y,p.y=Number(c.y),p[i]=c[i];var m=n[l].length- o[l]--;n[l][m]=p}for(l in this.groups)!Object.prototype.hasOwnProperty.call(this.groups,l)||Object.prototype.hasOwnProperty.call(n,l)||(n[l]=[]);for(l in n)if(Object.prototype.hasOwnProperty.call(n,l))if(n[l].length==0)Object.prototype.hasOwnProperty.call(this.groups,l)&&this._removeGroup(l);else{var h=void 0;this.groupsData!=null&&(h=this.groupsData.get(l)),h??={id:l,content:this.options.defaultGroup+l},this._updateGroup(h,l),this.groups[l].setItems(n[l])}this.forceGraphUpdate=!0,this.body.emitter.emit(`_change`,{queue:!0})}},Z8.prototype.redraw=function(){var e=!1;this.props.width=this.dom.frame.offsetWidth,this.props.height=this.body.domProps.centerContainer.height-this.body.domProps.border.top-this.body.domProps.border.bottom,e=this._isResized()||e;var t=this.body.range.end-this.body.range.start,n=t!=this.lastVisibleInterval;if(this.lastVisibleInterval=t,e==1){var r;this.svg.style.width=Y.option.asSize(3*this.props.width),this.svg.style.left=Y.option.asSize(-this.props.width),(Iq(r=this.options.height+``).call(r,`%`)!=-1||this.updateSVGheightOnResize==1)&&(this.updateSVGheight=!0)}if(this.updateSVGheight==1?(this.options.graphHeight!=this.props.height+`px`&&(this.options.graphHeight=this.props.height+`px`,this.svg.style.height=this.props.height+`px`),this.updateSVGheight=!1):this.svg.style.height=(``+this.options.graphHeight).replace(`px`,``)+`px`,e==1||n==1||this.abortedGraphUpdate==1||this.forceGraphUpdate==1)e=this._updateGraph()||e,this.forceGraphUpdate=!1,this.lastStart=this.body.range.start,this.svg.style.left=-this.props.width+`px`;else if(this.lastStart!=0){var i=this.body.range.start-this.lastStart,a=this.body.range.end-this.body.range.start;if(this.props.width!=0){var o=i*(this.props.width/a);this.svg.style.left=-this.props.width-o+`px`}}return this.legendLeft.redraw(),this.legendRight.redraw(),e},Z8.prototype._getSortedGroupIds=function(){var e=[];for(var t in this.groups)if(Object.prototype.hasOwnProperty.call(this.groups,t)){var n=this.groups[t];n.visible==1&&(this.options.groups.visibility[t]===void 0||this.options.groups.visibility[t]==1)&&e.push({id:t,zIndex:n.options.zIndex})}Y.insertSort(e,function(e,t){var n=e.zIndex,r=t.zIndex;return n===void 0&&(n=0),r===void 0&&(r=0),n==r?0:n<r?-1:1});for(var r=Array(e.length),i=0;i<e.length;i++)r[i]=e[i].id;return r},Z8.prototype._updateGraph=function(){if(N8(this.svgElements),this.props.width!=0&&this.itemsData!=null){var e,t,n={},r=!1,i=this.body.util.toGlobalTime(-this.body.domProps.root.width),a=this.body.util.toGlobalTime(2*this.body.domProps.root.width),o=this._getSortedGroupIds();if(o.length>0){var s={};for(this._getRelevantData(o,s,i,a),this._applySampling(o,s),t=0;t<o.length;t++)this._convertXcoordinates(s[o[t]]);if(this._getYRanges(o,s,n),r=this._updateYAxis(o,n),r==1)return P8(this.svgElements),this.abortedGraphUpdate=!0,!0;this.abortedGraphUpdate=!1;var c=void 0;for(t=0;t<o.length;t++)e=this.groups[o[t]],this.options.stack===!0&&this.options.style===`line`&&(e.options.excludeFromStacking==null||!e.options.excludeFromStacking)&&(c!=null&&(this._stack(s[e.id],s[c.id]),e.options.shaded.enabled==1&&e.options.shaded.orientation!==`group`&&(e.options.shaded.orientation==`top`&&c.options.shaded.orientation!==`group`?(c.options.shaded.orientation=`group`,c.options.shaded.groupId=e.id):(e.options.shaded.orientation=`group`,e.options.shaded.groupId=c.id))),c=e),this._convertYcoordinates(s[o[t]],e);var l={};for(t=0;t<o.length;t++)if(e=this.groups[o[t]],e.options.style===`line`&&e.options.shaded.enabled==1){var u=s[o[t]];if(u==null||u.length==0)continue;if(Object.prototype.hasOwnProperty.call(l,o[t])||(l[o[t]]=q8.calcPath(u,e)),e.options.shaded.orientation===`group`){var d=e.options.shaded.groupId;if(Iq(o).call(o,d)===-1){console.log(e.id+`: Unknown shading group target given:`+d);continue}Object.prototype.hasOwnProperty.call(l,d)||(l[d]=q8.calcPath(s[d],this.groups[d])),q8.drawShading(l[o[t]],e,l[d],this.framework)}else q8.drawShading(l[o[t]],e,void 0,this.framework)}for(K8.draw(o,s,this.framework),t=0;t<o.length;t++)if(e=this.groups[o[t]],s[o[t]].length>0)switch(e.options.style){case`line`:Object.prototype.hasOwnProperty.call(l,o[t])||(l[o[t]]=q8.calcPath(s[o[t]],e)),q8.draw(l[o[t]],e,this.framework);case`point`:case`points`:(e.options.style==`point`||e.options.style==`points`||e.options.drawPoints.enabled==1)&&U8.draw(s[o[t]],e,this.framework);break}}}return P8(this.svgElements),!1},Z8.prototype._stack=function(e,t){for(var n=0,r,i,a,o,s=0;s<e.length;s++){a=void 0,o=void 0;for(var c=n;c<t.length;c++)if(t[c].x===e[s].x){a=t[c],o=t[c],n=c;break}else if(t[c].x>e[s].x){o=t[c],a=c==0?o:t[c-1],n=c;break}o===void 0&&(a=t[t.length-1],o=t[t.length-1]),r=o.x-a.x,i=o.y-a.y,r==0?e[s].y=e[s].orginalY+o.y:e[s].y=e[s].orginalY+i/r*(e[s].x-a.x)+a.y}},Z8.prototype._getRelevantData=function(e,t,n,r){var i,a,o,s;if(e.length>0)for(a=0;a<e.length;a++){i=this.groups[e[a]];var c=i.getItems();if(Y1(i.options)==1){var l=function(e,t){return e.getTime()==t.getTime()?0:e<t?-1:1},u=Math.max(0,Y.binarySearchValue(c,n,`x`,`before`,l)),d=Math.min(c.length,Y.binarySearchValue(c,r,`x`,`after`,l)+1);d<=0&&(d=c.length);var f=Array(d-u);for(o=u;o<d;o++)s=i.itemsData[o],f[o-u]=s;t[e[a]]=f}else t[e[a]]=i.itemsData}},Z8.prototype._applySampling=function(e,t){var n;if(e.length>0){for(var r=0;r<e.length;r++)if(n=this.groups[e[r]],n.options.sampling==1){var i=t[e[r]];if(i.length>0){var a=1,o=i.length,s=o/(this.body.util.toGlobalScreen(i[i.length-1].x)-this.body.util.toGlobalScreen(i[0].x));a=Math.min(Math.ceil(.2*o),Math.max(1,Math.round(s)));for(var c=Array(o),l=0;l<o;l+=a){var u=Math.round(l/a);c[u]=i[l]}t[e[r]]=_G(c).call(c,0,Math.round(o/a))}}}},Z8.prototype._getYRanges=function(e,t,n){var r,i,a,o=[],s=[],c;if(e.length>0){for(a=0;a<e.length;a++)r=t[e[a]],c=this.groups[e[a]].options,r.length>0&&(i=this.groups[e[a]],c.stack===!0&&c.style===`bar`?c.yAxisOrientation===`left`?o=IK(o).call(o,r):s=IK(s).call(s,r):n[e[a]]=i.getYRange(r,e[a]));K8.getStackedYRange(o,n,e,`__barStackLeft`,`left`),K8.getStackedYRange(s,n,e,`__barStackRight`,`right`)}},Z8.prototype._updateYAxis=function(e,t){var n=!1,r=!1,i=!1,a=1e9,o=1e9,s=-1e9,c=-1e9,l,u;if(e.length>0){for(var d=0;d<e.length;d++){var f=this.groups[e[d]];f&&f.options.yAxisOrientation!=`right`?(r=!0,a=1e9,s=-1e9):f&&f.options.yAxisOrientation&&(i=!0,o=1e9,c=-1e9)}for(d=0;d<e.length;d++)!Object.prototype.hasOwnProperty.call(t,e[d])||t[e[d]].ignore===!0||(l=t[e[d]].min,u=t[e[d]].max,t[e[d]].yAxisOrientation==`right`?(i=!0,o=o>l?l:o,c=c<u?u:c):(r=!0,a=a>l?l:a,s=s<u?u:s));r==1&&this.yAxisLeft.setRange(a,s),i==1&&this.yAxisRight.setRange(o,c)}n=this._toggleAxisVisiblity(r,this.yAxisLeft)||n,n=this._toggleAxisVisiblity(i,this.yAxisRight)||n,i==1&&r==1?(this.yAxisLeft.drawIcons=!0,this.yAxisRight.drawIcons=!0):(this.yAxisLeft.drawIcons=!1,this.yAxisRight.drawIcons=!1),this.yAxisRight.master=!r,this.yAxisRight.masterAxis=this.yAxisLeft,this.yAxisRight.master==0?(i==1?this.yAxisLeft.lineOffset=this.yAxisRight.width:this.yAxisLeft.lineOffset=0,n=this.yAxisLeft.redraw()||n,n=this.yAxisRight.redraw()||n):n=this.yAxisRight.redraw()||n;var p=[`__barStackLeft`,`__barStackRight`,`__lineStackLeft`,`__lineStackRight`];for(d=0;d<p.length;d++)Iq(e).call(e,p[d])!=-1&&_G(e).call(e,Iq(e).call(e,p[d]),1);return n},Z8.prototype._toggleAxisVisiblity=function(e,t){var n=!1;return e==0?t.dom.frame.parentNode&&t.hidden==0&&(t.hide(),n=!0):!t.dom.frame.parentNode&&t.hidden==1&&(t.show(),n=!0),n},Z8.prototype._convertXcoordinates=function(e){for(var t=this.body.util.toScreen,n=0;n<e.length;n++)e[n].screen_x=t(e[n].x)+this.props.width,e[n].screen_y=e[n].y,e[n].end==null?e[n].screen_end=void 0:e[n].screen_end=t(e[n].end)+this.props.width},Z8.prototype._convertYcoordinates=function(e,t){var n=this.yAxisLeft,r=Number(this.svg.style.height.replace(`px`,``));t.options.yAxisOrientation==`right`&&(n=this.yAxisRight);for(var i=0;i<e.length;i++)e[i].screen_y=Math.round(n.convertValue(e[i].y));t.setZeroPosition(Math.min(r,n.convertValue(0)))};var Q=`string`,$=`boolean`,Q8=`number`,$8=`array`,e5=`date`,t5=`object`,n5=`dom`,r5=`moment`,i5=`any`,a5={configure:{enabled:{boolean:$},filter:{boolean:$,function:`function`},container:{dom:n5},__type__:{object:t5,boolean:$,function:`function`}},alignCurrentTime:{string:Q,undefined:`undefined`},yAxisOrientation:{string:[`left`,`right`]},defaultGroup:{string:Q},sort:{boolean:$},sampling:{boolean:$},stack:{boolean:$},graphHeight:{string:Q,number:Q8},shaded:{enabled:{boolean:$},orientation:{string:[`bottom`,`top`,`zero`,`group`]},groupId:{object:t5},__type__:{boolean:$,object:t5}},style:{string:[`line`,`bar`,`points`]},barChart:{width:{number:Q8},minWidth:{number:Q8},sideBySide:{boolean:$},align:{string:[`left`,`center`,`right`]},__type__:{object:t5}},interpolation:{enabled:{boolean:$},parametrization:{string:[`centripetal`,`chordal`,`uniform`]},alpha:{number:Q8},__type__:{object:t5,boolean:$}},drawPoints:{enabled:{boolean:$},onRender:{function:`function`},size:{number:Q8},style:{string:[`square`,`circle`]},__type__:{object:t5,boolean:$,function:`function`}},dataAxis:{showMinorLabels:{boolean:$},showMajorLabels:{boolean:$},showWeekScale:{boolean:$},icons:{boolean:$},width:{string:Q,number:Q8},visible:{boolean:$},alignZeros:{boolean:$},left:{range:{min:{number:Q8,undefined:`undefined`},max:{number:Q8,undefined:`undefined`},__type__:{object:t5}},format:{function:`function`},title:{text:{string:Q,number:Q8,undefined:`undefined`},style:{string:Q,undefined:`undefined`},__type__:{object:t5}},__type__:{object:t5}},right:{range:{min:{number:Q8,undefined:`undefined`},max:{number:Q8,undefined:`undefined`},__type__:{object:t5}},format:{function:`function`},title:{text:{string:Q,number:Q8,undefined:`undefined`},style:{string:Q,undefined:`undefined`},__type__:{object:t5}},__type__:{object:t5}},__type__:{object:t5}},legend:{enabled:{boolean:$},icons:{boolean:$},left:{visible:{boolean:$},position:{string:[`top-right`,`bottom-right`,`top-left`,`bottom-left`]},__type__:{object:t5}},right:{visible:{boolean:$},position:{string:[`top-right`,`bottom-right`,`top-left`,`bottom-left`]},__type__:{object:t5}},__type__:{object:t5,boolean:$}},groups:{visibility:{any:i5},__type__:{object:t5}},autoResize:{boolean:$},throttleRedraw:{number:Q8},clickToUse:{boolean:$},end:{number:Q8,date:e5,string:Q,moment:r5},format:{minorLabels:{millisecond:{string:Q,undefined:`undefined`},second:{string:Q,undefined:`undefined`},minute:{string:Q,undefined:`undefined`},hour:{string:Q,undefined:`undefined`},weekday:{string:Q,undefined:`undefined`},day:{string:Q,undefined:`undefined`},week:{string:Q,undefined:`undefined`},month:{string:Q,undefined:`undefined`},quarter:{string:Q,undefined:`undefined`},year:{string:Q,undefined:`undefined`},__type__:{object:t5}},majorLabels:{millisecond:{string:Q,undefined:`undefined`},second:{string:Q,undefined:`undefined`},minute:{string:Q,undefined:`undefined`},hour:{string:Q,undefined:`undefined`},weekday:{string:Q,undefined:`undefined`},day:{string:Q,undefined:`undefined`},week:{string:Q,undefined:`undefined`},month:{string:Q,undefined:`undefined`},quarter:{string:Q,undefined:`undefined`},year:{string:Q,undefined:`undefined`},__type__:{object:t5}},__type__:{object:t5}},moment:{function:`function`},height:{string:Q,number:Q8},hiddenDates:{start:{date:e5,number:Q8,string:Q,moment:r5},end:{date:e5,number:Q8,string:Q,moment:r5},repeat:{string:Q},__type__:{object:t5,array:$8}},locale:{string:Q},locales:{__any__:{any:i5},__type__:{object:t5}},max:{date:e5,number:Q8,string:Q,moment:r5},maxHeight:{number:Q8,string:Q},maxMinorChars:{number:Q8},min:{date:e5,number:Q8,string:Q,moment:r5},minHeight:{number:Q8,string:Q},moveable:{boolean:$},multiselect:{boolean:$},orientation:{string:Q},showCurrentTime:{boolean:$},showMajorLabels:{boolean:$},showMinorLabels:{boolean:$},showWeekScale:{boolean:$},snap:{function:`function`,null:`null`},start:{date:e5,number:Q8,string:Q,moment:r5},timeAxis:{scale:{string:Q,undefined:`undefined`},step:{number:Q8,undefined:`undefined`},__type__:{object:t5}},width:{string:Q,number:Q8},zoomable:{boolean:$},zoomKey:{string:[`ctrlKey`,`altKey`,`metaKey`,``]},zoomMax:{number:Q8},zoomMin:{number:Q8},zIndex:{number:Q8},__type__:{object:t5}},o5={global:{alignCurrentTime:[`none`,`year`,`month`,`quarter`,`week`,`isoWeek`,`day`,`date`,`hour`,`minute`,`second`],sort:!0,sampling:!0,stack:!1,shaded:{enabled:!1,orientation:[`zero`,`top`,`bottom`,`group`]},style:[`line`,`bar`,`points`],barChart:{width:[50,5,100,5],minWidth:[50,5,100,5],sideBySide:!1,align:[`left`,`center`,`right`]},interpolation:{enabled:!0,parametrization:[`centripetal`,`chordal`,`uniform`]},drawPoints:{enabled:!0,size:[6,2,30,1],style:[`square`,`circle`]},dataAxis:{showMinorLabels:!0,showMajorLabels:!0,showWeekScale:!1,icons:!1,width:[40,0,200,1],visible:!0,alignZeros:!0,left:{title:{text:``,style:``}},right:{title:{text:``,style:``}}},legend:{enabled:!1,icons:!0,left:{visible:!0,position:[`top-right`,`bottom-right`,`top-left`,`bottom-left`]},right:{visible:!0,position:[`top-right`,`bottom-right`,`top-left`,`bottom-left`]}},autoResize:!0,clickToUse:!1,end:``,format:{minorLabels:{millisecond:`SSS`,second:`s`,minute:`HH:mm`,hour:`HH:mm`,weekday:`ddd D`,day:`D`,week:`w`,month:`MMM`,quarter:`[Q]Q`,year:`YYYY`},majorLabels:{millisecond:`HH:mm:ss`,second:`D MMMM HH:mm`,minute:`ddd D MMMM`,hour:`ddd D MMMM`,weekday:`MMMM YYYY`,day:`MMMM YYYY`,week:`MMMM YYYY`,month:`YYYY`,quarter:`YYYY`,year:``}},height:``,locale:``,max:``,maxHeight:``,maxMinorChars:[7,0,20,1],min:``,minHeight:``,moveable:!0,orientation:[`both`,`bottom`,`top`],showCurrentTime:!1,showMajorLabels:!0,showMinorLabels:!0,showWeekScale:!1,start:``,width:`100%`,zoomable:!0,zoomKey:[`ctrlKey`,`altKey`,`metaKey`,``],zoomMax:[31536e10,10,31536e10,1],zoomMin:[10,10,31536e10,1],zIndex:0}};function s5(e,t,n,r){var i,a,o,s,c,l,u;if(!(G(n)||F$(n))&&n instanceof Object){var d=r;r=n,n=d}r&&r.throttleRedraw&&console.warn(`Graph2d option "throttleRedraw" is DEPRICATED and no longer supported. It will be removed in the next MAJOR release.`);var f=this;this.defaultOptions={start:null,end:null,autoResize:!0,orientation:{axis:`bottom`,item:`bottom`},moment:TF,width:null,height:null,maxHeight:null,minHeight:null},this.options=Y.deepExtend({},this.defaultOptions),this._create(e),this.components=[],this.body={dom:this.dom,domProps:this.props,emitter:{on:K(i=this.on).call(i,this),off:K(a=this.off).call(a,this),emit:K(o=this.emit).call(o,this)},hiddenDates:[],util:{getScale(){return f.timeAxis.step.scale},getStep(){return f.timeAxis.step.step},toScreen:K(s=f._toScreen).call(s,f),toGlobalScreen:K(c=f._toGlobalScreen).call(c,f),toTime:K(l=f._toTime).call(l,f),toGlobalTime:K(u=f._toGlobalTime).call(u,f)}},this.range=new l0(this.body),this.components.push(this.range),this.body.range=this.range,this.timeAxis=new H0(this.body),this.components.push(this.timeAxis),this.currentTime=new F2(this.body),this.components.push(this.currentTime),this.linegraph=new Z8(this.body),this.components.push(this.linegraph),this.itemsData=null,this.groupsData=null,this.on(`tap`,function(e){f.emit(`click`,f.getEventProperties(e))}),this.on(`doubletap`,function(e){f.emit(`doubleClick`,f.getEventProperties(e))}),this.dom.root.oncontextmenu=function(e){f.emit(`contextmenu`,f.getEventProperties(e))},this.initialFitDone=!1,this.on(`changed`,function(){if(f.itemsData!=null){if(!f.initialFitDone&&!f.options.rollingMode)if(f.initialFitDone=!0,f.options.start!=null||f.options.end!=null){if(f.options.start==null||f.options.end==null)var e=f.getItemRange();var t=f.options.start==null?e.min:f.options.start,n=f.options.end==null?e.max:f.options.end;f.setWindow(t,n,{animation:!1})}else f.fit({animation:!1});!f.initialDrawDone&&(f.initialRangeChangeDone||!f.options.start&&!f.options.end||f.options.rollingMode)&&(f.initialDrawDone=!0,f.dom.root.style.visibility=`visible`,f.dom.loadingScreen.parentNode.removeChild(f.dom.loadingScreen),f.options.onInitialDrawComplete&&wP(()=>f.options.onInitialDrawComplete(),0))}}),r&&this.setOptions(r),n&&this.setGroups(n),t&&this.setItems(t),this._redraw()}s5.prototype=new P2,s5.prototype.setOptions=function(e){g8.validate(e,a5)===!0&&console.log(`%cErrors have been found in the supplied options object.`,h8),P2.prototype.setOptions.call(this,e)},s5.prototype.setItems=function(e){var t=this.itemsData==null,n=e?F$(e)?z$(e):z$(new kC(e)):null;if(this.itemsData&&this.itemsData.dispose(),this.itemsData=n,this.linegraph&&this.linegraph.setItems(n==null?null:n.rawDS),t)if(this.options.start!=null||this.options.end!=null){var r=this.options.start==null?null:this.options.start,i=this.options.end==null?null:this.options.end;this.setWindow(r,i,{animation:!1})}else this.fit({animation:!1})},s5.prototype.setGroups=function(e){var t=e?F$(e)?e:new kC(e):null;this.groupsData=t,this.linegraph.setGroups(t)},s5.prototype.getLegend=function(e,t,n){return t===void 0&&(t=15),n===void 0&&(n=15),this.linegraph.groups[e]===void 0?`cannot find group:'`+e+`'`:this.linegraph.groups[e].getLegend(t,n)},s5.prototype.isGroupVisible=function(e){return this.linegraph.groups[e]===void 0?!1:this.linegraph.groups[e].visible&&(this.linegraph.options.groups.visibility[e]===void 0||this.linegraph.options.groups.visibility[e]==1)},s5.prototype.getDataRange=function(){var e=null,t=null;for(var n in this.linegraph.groups)if(!(!Object.prototype.hasOwnProperty.call(this.linegraph.groups,n)||this.linegraph.groups[n].visible!==!0))for(var r=0;r<this.linegraph.groups[n].itemsData.length;r++){var i=this.linegraph.groups[n].itemsData[r],a=Y.convert(i.x,`Date`).valueOf();e=e==null||e>a?a:e,t=t==null||t<a?a:t}return{min:e==null?null:new Date(e),max:t==null?null:new Date(t)}},s5.prototype.getEventProperties=function(e){var t=e.center?e.center.x:e.clientX,n=e.center?e.center.y:e.clientY,r=t-Y.getAbsoluteLeft(this.dom.centerContainer),i=n-Y.getAbsoluteTop(this.dom.centerContainer),a=this._toTime(r),o=N2.customTimeFromTarget(e),s=Y.getTarget(e),c=null;Y.hasParent(s,this.timeAxis.dom.foreground)||this.timeAxis2&&Y.hasParent(s,this.timeAxis2.dom.foreground)?c=`axis`:Y.hasParent(s,this.linegraph.yAxisLeft.dom.frame)||Y.hasParent(s,this.linegraph.yAxisRight.dom.frame)?c=`data-axis`:Y.hasParent(s,this.linegraph.legendLeft.dom.frame)||Y.hasParent(s,this.linegraph.legendRight.dom.frame)?c=`legend`:o==null?Y.hasParent(s,this.currentTime.bar)?c=`current-time`:Y.hasParent(s,this.dom.center)&&(c=`background`):c=`custom-time`;var l=[],u=this.linegraph.yAxisLeft,d=this.linegraph.yAxisRight;return!u.hidden&&this.itemsData.length>0&&l.push(u.screenToValue(i)),!d.hidden&&this.itemsData.length>0&&l.push(d.screenToValue(i)),{event:e,customTime:o?o.options.id:null,what:c,pageX:e.srcEvent?e.srcEvent.pageX:e.pageX,pageY:e.srcEvent?e.srcEvent.pageY:e.pageY,x:r,y:i,time:a,value:l}},s5.prototype._createConfigurator=function(){return new O8(this,this.dom.container,o5)};var c5=B8();M.locale(c5);export{kC as n,k8 as t};\ No newline at end of file