@highstate/designer 0.26.0 → 0.27.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.output/nitro.json +1 -1
- package/.output/public/_nuxt/{YpnHruhZ.js → -QAUKRUv.js} +1 -1
- package/.output/public/_nuxt/-WgkZJwX.js +1 -0
- package/.output/public/_nuxt/{DmMgvbsF.js → 0VxYR0Dz.js} +1 -1
- package/.output/public/_nuxt/{B2CVdECd.js → B4f2rRcR.js} +1 -1
- package/.output/public/_nuxt/{BSRetNRl.js → B8ylSe-r.js} +1 -1
- package/.output/public/_nuxt/{BlGDdimO.js → BI2f9uP-.js} +1 -1
- package/.output/public/_nuxt/{39D0VL7r.js → BLI48uDH.js} +1 -1
- package/.output/public/_nuxt/{CRb2z3Pg.js → BQAu9Fve.js} +1 -1
- package/.output/public/_nuxt/{DzQULtcW.js → BaXvK4sX.js} +1 -1
- package/.output/public/_nuxt/{BR4jrf3-.js → BdOV6aLJ.js} +1 -1
- package/.output/public/_nuxt/{CRZrAKrA.js → BgGQb96c.js} +2 -2
- package/.output/public/_nuxt/{BKaSp7fy.js → Bh96JwGT.js} +1 -1
- package/.output/public/_nuxt/{BPboW4rx.js → Bpl7n9_r.js} +1 -1
- package/.output/public/_nuxt/{D1yXAE_w.js → BqIbm1EF.js} +1 -1
- package/.output/public/_nuxt/{D46u9gXN.js → BrCpuEqM.js} +1 -1
- package/.output/public/_nuxt/{O3nsZ-Uz.js → BxGSDLX0.js} +1 -1
- package/.output/public/_nuxt/{Cwefpg1x.js → ByRPlNhf.js} +1 -1
- package/.output/public/_nuxt/{C1bzPMRu.js → Bz5q1XLL.js} +1 -1
- package/.output/public/_nuxt/BzbjXxJd.js +6 -0
- package/.output/public/_nuxt/{DMM9kDc1.js → C-0mRkgR.js} +1 -1
- package/.output/public/_nuxt/{DFwfZeyL.js → C-IrfHdq.js} +1 -1
- package/.output/public/_nuxt/{CCBTuGSI.js → C1JwrSe7.js} +1 -1
- package/.output/public/_nuxt/{Be4ezMZK.js → C4dMoSm9.js} +1 -1
- package/.output/public/_nuxt/{D1BdWMiq.js → C5QFcB9K.js} +1 -1
- package/.output/public/_nuxt/{I4u-TRO-.js → CBiX8Qk6.js} +1 -1
- package/.output/public/_nuxt/{C9OJ0gQB.js → CC635Llr.js} +1 -1
- package/.output/public/_nuxt/{4R6BJ3GI.js → CChinG0a.js} +1 -1
- package/.output/public/_nuxt/{-aI73seg.js → CGaUcol_.js} +1 -1
- package/.output/public/_nuxt/{B0E2rEnI.js → CKkVh4X6.js} +1 -1
- package/.output/public/_nuxt/{3T5CmBSF.js → CUu12Pr7.js} +1 -1
- package/.output/public/_nuxt/{D9ITfHnZ.js → CWvkRFU9.js} +54 -54
- package/.output/public/_nuxt/{B2_u9ZKl.js → CY7tXH5c.js} +1 -1
- package/.output/public/_nuxt/{B9BJCsIg.js → C_1RoKtr.js} +1 -1
- package/.output/public/_nuxt/{Qj4UhtaN.js → CbbOSnE0.js} +1 -1
- package/.output/public/_nuxt/{CscXh7Vy.js → Cds-RgoS.js} +1 -1
- package/.output/public/_nuxt/{Ba9NwIJp.js → ChBheQRP.js} +1 -1
- package/.output/public/_nuxt/{DYYyOkJe.js → CkDbYrMj.js} +1 -1
- package/.output/public/_nuxt/{DdhYQ3Tv.js → Cke7R5qg.js} +1 -1
- package/.output/public/_nuxt/{CwWsKBf5.js → CkzH91yw.js} +1 -1
- package/.output/public/_nuxt/{B1x03f8R.js → CuEjdyyj.js} +1 -1
- package/.output/public/_nuxt/Cv3A8XqH.js +1 -0
- package/.output/public/_nuxt/CzkxYs7G.js +1 -0
- package/.output/public/_nuxt/{BEOSfHJT.js → D-5fWV40.js} +1 -1
- package/.output/public/_nuxt/{By1Fxx6d.js → D1xR8pBE.js} +1 -1
- package/.output/public/_nuxt/{rpHuDh4d.js → DJ5xpYjG.js} +1 -1
- package/.output/public/_nuxt/{CLsyMJ1X.js → DQLKgX8r.js} +1 -1
- package/.output/public/_nuxt/DR05KuQJ.js +1 -0
- package/.output/public/_nuxt/{C29gnYT3.js → DR_djprF.js} +1 -1
- package/.output/public/_nuxt/{CoqwalnO.js → DRck-UV8.js} +1 -1
- package/.output/public/_nuxt/{DcV32yum.js → DV7MSCWu.js} +1 -1
- package/.output/public/_nuxt/{BBmoak6l.js → DWjqEyG2.js} +1 -1
- package/.output/public/_nuxt/{CNWyx-82.js → Dc6WL_Gw.js} +1 -1
- package/.output/public/_nuxt/{CI40hKzv.js → DdJEKw37.js} +2 -2
- package/.output/public/_nuxt/{DNVXBFXP.js → Dfijnsli.js} +1 -1
- package/.output/public/_nuxt/{D2lHwbtX.js → Dzc0ALmG.js} +1 -1
- package/.output/public/_nuxt/{C_yayEmb.js → FtIBRaSq.js} +1 -1
- package/.output/public/_nuxt/{BxD6MFcJ.js → MtN3owE1.js} +1 -1
- package/.output/public/_nuxt/{D4H6aUyZ.js → TXWXdcZY.js} +7 -7
- package/.output/public/_nuxt/{DzowYWbi.js → UXILZBAC.js} +1 -1
- package/.output/public/_nuxt/{fxmP1KZw.js → V4k_CDL-.js} +1 -1
- package/.output/public/_nuxt/{C9n5vGW7.js → VRyQKyno.js} +1 -1
- package/.output/public/_nuxt/{VF7GAmoY.js → XbaHEIpm.js} +1 -1
- package/.output/public/_nuxt/{BJV0IIsR.js → as6CcDUM.js} +1 -1
- package/.output/public/_nuxt/builds/latest.json +1 -1
- package/.output/public/_nuxt/builds/meta/8e5022d6-1d1c-4861-b0b7-dc52b699526a.json +1 -0
- package/.output/public/_nuxt/{entry.DsBbjDm-.css → entry.DRnr7AV7.css} +1 -1
- package/.output/public/_nuxt/{graph-resolver-DhjyrFRu.js → graph-resolver-BXlQLip4.js} +49 -49
- package/.output/public/_nuxt/{BOujskTX.js → mrNv5qht.js} +1 -1
- package/.output/public/_nuxt/{ByBXn3Vz.js → s8-NXH-d.js} +1 -1
- package/.output/public/_nuxt/{C794qwo0.js → sDoJGqlK.js} +1 -1
- package/.output/server/index.mjs +939 -939
- package/.output/server/package.json +1 -1
- package/package.json +6 -4
- package/.output/public/_nuxt/Bcyj9glE.js +0 -6
- package/.output/public/_nuxt/CiaugisX.js +0 -1
- package/.output/public/_nuxt/Cjs5trkS.js +0 -1
- package/.output/public/_nuxt/CyFj-Mv9.js +0 -1
- package/.output/public/_nuxt/DrQCNsTo.js +0 -1
- package/.output/public/_nuxt/builds/meta/53add2c3-4d7c-4a4f-a116-e73c3787cf98.json +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a3 as Ct,a0 as Bi,m as sn,a4 as Ft,a5 as Pi,a6 as On,a7 as Rt,_ as se,a8 as Tn,a9 as yt,Z as Kt,aa as Rn,ab as zn,ac as Hi,ad as Fi,ae as dt,af as Le,ag as ji,ah as Li,ai as Di,aj as Ui,O as Xi,ak as Bn,al as Yi,am as Be,k as qe,an as zt,ao as qi,ap as Wi,aq as Gi,I as Pn,ar as Ki,as as Hn,P as Ji,at as Zi,J as Fn,au as Qi,a1 as _i,Y as eo,S as jn}from"#entry";import{E as K,b4 as to,V as m,J as O,aa as X,ab as re,a1 as z,a6 as he,a2 as L,a0 as Z,j as S,Y as C,ai as Jt,D as f,_ as w,W as x,Z as ae,$ as G,a5 as Q,a7 as Ae,t as We,F as Ln,a8 as no,af as Dn,l as io,r as ie,i as oo,av as Ve,ag as Ee,a4 as ao,G as ro,w as Ge,b5 as so,aw as Ne,aZ as Un,aG as tt,ak as Xn,b6 as lo,b7 as uo,aN as Yn,b8 as co,aP as Me,d as qn,ah as Wn,as as ke,aj as Vt,aH as fo,a as Te,aQ as Gn,aJ as Et,aK as Ke,at as ee,n as pt,ap as ho,a$ as Kn,am as mo,ao as pe,al as vo,au as Jn,aU as Zt,H as go,p as ln,b3 as yo,aI as po,b0 as wo,b2 as bo,b9 as ko,b1 as xo,u as Zn,ba as Io,bb as So,aV as un,bc as Ie,bd as $o}from"./77UvFSdd.js";import{t as cn,a as Co,_ as Vo}from"./DPQHj1GW.js";import{C as At}from"./Bn5R9WlL.js";import{s as Eo,V as dn}from"./D1BdWMiq.js";import{I as Qn}from"./rpHuDh4d.js";import{_ as Ao}from"./fbfpKHgl.js";import{_ as _n}from"./YpnHruhZ.js";import{r as Mo,g as No}from"./BxAss8Tj.js";function Oo(e,t){let n=t.length-e.length;if(n===1){let[i,...o]=t;return cn(i,{lazy:e,lazyArgs:o})}if(n===0){let i={lazy:e,lazyArgs:t};return Object.assign(o=>cn(o,i),i)}throw Error("Wrong number of arguments")}function ot(...e){return Oo(To,e)}function To(){let e=new Set;return t=>e.has(t)?Co:(e.add(t),{done:!1,hasNext:!0,next:t})}function Ro(e,t,n){const i=Array.from({length:n},()=>[]),o=t,a=-(o*(n-1))/2,s=Array.from({length:n},(l,c)=>a+c*o),u=[];for(let l=0;l<e.length-1;l++){const c=e[l],v=e[l+1],h=v[0]-c[0],b=v[1]-c[1],V=Math.sqrt(h*h+b*b);let P=-b,A=h;V!==0&&(P/=V,A/=V),u.push({x:P,y:A})}function d(l,c,v,h){const b=l[0],V=l[1],P=c[0],A=c[1],M=v[0],$=v[1],E=h[0],j=h[1],B=(b-P)*($-j)-(V-A)*(M-E);if(B===0)return null;const U=((b-M)*($-j)-(V-$)*(M-E))/B;return[b+U*(P-b),V+U*(A-V)]}for(let l=0;l<n;l++)for(let c=0;c<e.length;c++){const v=e[c];let h=0,b=0;if(c===0)h=u[0].x*s[l],b=u[0].y*s[l];else if(c===e.length-1)h=u[u.length-1].x*s[l],b=u[u.length-1].y*s[l];else{const V=u[c-1],P=u[c],A=e[c-1],M=e[c+1],$=[A[0]+V.x*s[l],A[1]+V.y*s[l]],E=[v[0]+V.x*s[l],v[1]+V.y*s[l]],j=[v[0]+P.x*s[l],v[1]+P.y*s[l]],B=[M[0]+P.x*s[l],M[1]+P.y*s[l]],U=d($,E,j,B);U?(h=U[0]-v[0],b=U[1]-v[1]):(h=(V.x+P.x)/2*s[l],b=(V.y+P.y)/2*s[l])}i[l].push(`${v[0]+h},${v[1]+b}`)}return i}const zo=["points","stroke"],Bo=["points"],Po={key:0},Ho=["x","y","width"],Fo=["x","y"],at=3,jo=K({__name:"CustomEdge",props:{id:{},sourceNode:{},targetNode:{},source:{},target:{},type:{},label:{type:[String,Object,Function]},style:{},selected:{type:Boolean},sourcePosition:{},targetPosition:{},sourceHandleId:{},targetHandleId:{},animated:{type:Boolean},updatable:{type:Boolean},markerStart:{},markerEnd:{},curvature:{},interactionWidth:{},data:{},events:{},labelStyle:{},labelShowBg:{type:Boolean},labelBgStyle:{},labelBgPadding:{},labelBgBorderRadius:{},sourceX:{},sourceY:{},targetX:{},targetY:{},inputResolverOutputs:{},components:{},entities:{}},setup(e){to(y=>({v7fad7fb8:at}));const t=Ct(),{inputInstance:n,outputInstance:i,inputHub:o,outputHub:r,outputKey:a,inputKey:s,inputNodeType:u}=Bi(t,{source:e.source,target:e.target,sourceHandle:e.sourceHandleId,targetHandle:e.targetHandleId}),d=y=>{if(!y)return;const p=e.inputResolverOutputs.get(`instance:${y.id}`);return p?.kind==="instance"?p.component:e.components[y.type]},l=S(()=>{if(u==="outputs"){const y=d(n);if(!y)return{all:[]};const p=y.outputs[s];return{all:p?[p.type]:[]}}if(i&&n){const y=Ft(e.inputResolverOutputs,n.id),p=ot((y[s]??[]).map(Y=>Y.type)),N=d(n);if(!N)return{all:[],visible:p};const D=N.inputs[s];return p.length>0?{all:p,visible:p}:{all:D?[D.type]:[],visible:p}}if(r&&n&&s)return{all:(Ft(e.inputResolverOutputs,n.id)[s]??[]).map(p=>p.type)};if(r&&n)return{all:On(e.inputResolverOutputs,n.id).map(y=>y.type),visible:Pi(e.inputResolverOutputs,n.id).map(y=>y.type)};if(i&&o){const y=Rt(e.inputResolverOutputs,o.id).filter(D=>D.input.instanceId===i.id&&D.input.output===a).map(D=>D.type);if(y.length>0)return{all:ot(y)};const p=d(i);if(!p)return{all:[]};const N=p.outputs[a];return{all:N?[N.type]:[]}}if(r&&o)return{all:Rt(e.inputResolverOutputs,r.id).flat().map(y=>y.type)};throw sn.error({msg:"unexpected connection in CustomEdge",inputInstance:n,outputInstance:i,inputHub:o,outputHub:r,outputKey:a,inputKey:s}),new Error("Invalid connection")}),c=S(()=>ot(l.value.all).map(y=>e.entities[y])),v=S(()=>{if(!r)return[];const y=Rt(e.inputResolverOutputs,r.id).map(p=>p.type);return ot(y).sort()}),h=S(()=>!!r&&e.data.hubReservedGhostLane),b=S(()=>!!r&&e.data.isPendingHubTyped),V=S(()=>!!r&&!!n&&!!s),P=S(()=>{if(!V.value)return;const y=d(n);if(y)return y.inputs[s]?.type}),A=S(()=>{if(!r||!V.value)return!1;const y=P.value;return y?!v.value.includes(y):!1}),M=S(()=>b.value||A.value),$=S(()=>r?M.value?!0:h.value:!1);e.data.isOutputProjection&&sn.debug({source:e.source,target:e.target,sourceHandleId:e.sourceHandleId,targetHandleId:e.targetHandleId,isOutputProjection:e.data.isOutputProjection,isOutputProjectionUnresolved:e.data.isOutputProjectionUnresolved},"rendering projection edge in CustomEdge");const E=S(()=>$.value&&v.value.length>0),j=S(()=>l.value.visible?l.value.visible.length===0:r?l.value.all.length===0:!1),B=S(()=>!!r&&!!n&&!!s),U=S(()=>{if(!r)return j.value?1:c.value.length;if(B.value)return 1;const p=v.value.length+(E.value?1:0);return Math.max(1,p)}),W=y=>r?v.value.length===0?!0:E.value&&y===U.value-1:j.value,H=()=>B.value?e.components[n.type].inputs[s]?.type:void 0,F=S(()=>{if(!B.value)return!1;const y=H();return y?!v.value.includes(y):!1}),ce=y=>{if(e.data.isOutputProjection&&e.data.isOutputProjectionUnresolved)return"#9E9E9E";if(B.value){if(F.value)return"#9E9E9E";const p=H();return(p?e.entities[p]:void 0)?.meta.color??"#607D8B"}if(W(y))return"#9E9E9E";if(r){const p=v.value[y];return e.entities[p]?.meta.color??"#607D8B"}return c.value[y%c.value.length].meta.color??"#607D8B"},te=y=>r?B.value?y===0:j.value?W(y):l.value.visible?W(y)?!1:l.value.visible.includes(v.value[y]):!W(y):j.value?!0:l.value.visible?l.value.visible.includes(c.value[y].type):!0,oe=(y,p)=>y[0]===p[0]&&y[1]===p[1],g=S(()=>{if(!e.data.points)return[];const y=[e.sourceX,e.data.routedSourceY??e.sourceY],p=[e.targetX,e.data.routedTargetY??e.targetY],N=[...e.data.points];return(!N[0]||!oe(N[0],y))&&N.unshift(y),(!N[N.length-1]||!oe(N[N.length-1],p))&&N.push(p),Ro(N,at,U.value)}),T=y=>{const N=1/U.value;return`-${y*N}s`},k=S(()=>e.data.path),R=S(()=>{if(!e.data.points)return{x:(e.sourceX+e.targetX)/2,y:(e.sourceY+e.targetY)/2};const y=[[e.sourceX,e.data.routedSourceY??e.sourceY],...e.data.points,[e.targetX,e.data.routedTargetY??e.targetY]];let p=0;for(let Y=1;Y<y.length;Y++){const q=y[Y-1],J=y[Y];p+=Math.hypot(J[0]-q[0],J[1]-q[1])}if(p===0)return{x:(e.sourceX+e.targetX)/2,y:(e.sourceY+e.targetY)/2};let N=0;const D=p/2;for(let Y=1;Y<y.length;Y++){const q=y[Y-1],J=y[Y],_=Math.hypot(J[0]-q[0],J[1]-q[1]);if(N+_>=D){const ne=(D-N)/_;return{x:q[0]+(J[0]-q[0])*ne,y:q[1]+(J[1]-q[1])*ne}}N+=_}return{x:(e.sourceX+e.targetX)/2,y:(e.sourceY+e.targetY)/2}}),I=S(()=>Math.min((k.value?.length??0)*7+18,220));return(y,p)=>(m(),O(X,null,[(m(!0),O(X,null,re(g.value,(N,D)=>(m(),O(X,{key:`static-${D}`},[te(D)?(m(),O("polyline",{key:0,points:N.join(" "),stroke:ce(D),fill:"none","stroke-width":at,style:{opacity:"0.8"}},null,8,zo)):z("",!0)],64))),128)),(m(!0),O(X,null,re(g.value,(N,D)=>(m(),O(X,{key:`highlight-${D}`},[te(D)?(m(),O("polyline",{key:0,points:N.join(" "),stroke:"white",fill:"none","stroke-width":at,class:"highlight-polyline animated-highlight",style:he({animationDelay:T(D)})},null,12,Bo)):z("",!0)],64))),128)),k.value?(m(),O("g",Po,[L("rect",{x:R.value.x-I.value/2,y:R.value.y-12,width:I.value,height:"24",rx:"6",class:"expression-label-background"},null,8,Ho),L("text",{x:R.value.x,y:R.value.y+4,"text-anchor":"middle",class:"expression-label-text"},Z(k.value),9,Fo)])):z("",!0)],64))}}),Lo=se(jo,[["__scopeId","data-v-08910730"]]);function Do(e,t){const n={borderRadius:"4px",overflow:"visible"};switch(t){case"blueprint-valid":return{...n,opacity:"0.7",outline:"2px solid #4CAF50",backgroundColor:"rgba(76, 175, 80, 0.1)",boxShadow:"0 0 10px rgba(76, 175, 80, 0.3)"};case"blueprint-invalid":return{...n,opacity:"0.7",outline:"2px solid #F44336",backgroundColor:"rgba(244, 67, 54, 0.1)",boxShadow:"0 0 10px rgba(244, 67, 54, 0.3)"}}return e?{...n,outline:"2px solid #2196F3",boxShadow:"0 0 8px rgba(33, 150, 243, 0.4)"}:n}const Uo=K({__name:"HubCard",props:{selected:{type:Boolean},blueprintStatus:{}},setup(e){return(t,n)=>(m(),C(Jt,{variant:"flat",style:he(f(Do)(e.selected,e.blueprintStatus)),color:"#2d2d2d"},{default:w(()=>[x(ae,{class:"ma-2",size:74},{default:w(()=>[...n[0]||(n[0]=[G("mdi-router",-1)])]),_:1}),Q(t.$slots,"default")]),_:3},8,["style"]))}}),Xo=K({__name:"HubNodeHandle",props:{side:{},handleColor:{},isValidConnection:{type:Function}},setup(e){return(t,n)=>(m(),O(X,null,[x(f(Tn),{id:"",type:e.side==="left"?"target":"source",position:e.side==="left"?f(yt).Left:f(yt).Right,class:Ae(["handle",[e.side==="left"?"left-handle":"right-handle"]]),"is-valid-connection":e.isValidConnection},null,8,["type","position","class","is-valid-connection"]),L("div",{class:Ae(["handle-dot",[e.side==="left"?"handle-dot-left":"handle-dot-right"]]),style:he({backgroundColor:e.handleColor})},null,6)],64))}}),fn=se(Xo,[["__scopeId","data-v-1aff1180"]]),Yo={class:"handles"},qo=K({__name:"HubNode",props:{hub:{},isValidConnection:{type:Function}},emits:["contextmenu"],setup(e,{emit:t}){const n=t,{vueFlowStore:i,selection:o}=Kt(),r=Rn(),a=S(()=>zn(r.node,i));return(s,u)=>(m(),C(Uo,{class:"hub-card",selected:f(o).isNodeSelected(f(r).node),"blueprint-status":f(a),onContextmenu:u[0]||(u[0]=d=>n("contextmenu",d))},{default:w(()=>[Q(s.$slots,"default",{},void 0,!0),L("div",Yo,[x(fn,{"handle-color":"#3F51B5",side:"left","is-valid-connection":e.isValidConnection},null,8,["is-valid-connection"]),x(fn,{"handle-color":"#3F51B5",side:"right","is-valid-connection":e.isValidConnection},null,8,["is-valid-connection"])])]),_:3},8,["selected","blueprint-status"]))}}),ac=se(qo,[["__scopeId","data-v-79b30d7c"]]),Wo=K({__name:"SelectionRectangle",props:{selectionMode:{default:"add"},selectionArea:{}},setup(e){const t=S(()=>{if(!e.selectionArea)return;const n={left:e.selectionArea.x+"px",top:e.selectionArea.y+"px",width:e.selectionArea.width+"px",height:e.selectionArea.height+"px"};return e.selectionMode==="add"?{...n,border:"2px dashed #2196F3",background:"rgba(33, 150, 243, 0.1)"}:{...n,border:"2px dashed #F44336",background:"rgba(244, 67, 54, 0.1)"}});return(n,i)=>f(t)?(m(),O("div",{key:0,class:"selection-rectangle",style:he(f(t))},null,4)):z("",!0)}}),Go=se(Wo,[["__scopeId","data-v-6118cbbb"]]);var we=(e=>(e.Lines="lines",e.Dots="dots",e))(we||{});const ei=function({dimensions:e,size:t,color:n}){return Ln("path",{stroke:n,"stroke-width":t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`})},ti=function({radius:e,color:t}){return Ln("circle",{cx:e,cy:e,r:e,fill:t})};we.Lines+"",we.Dots+"";const Ko={[we.Dots]:"#81818a",[we.Lines]:"#eee"},Jo=["id","x","y","width","height","patternTransform"],Zo={key:2,height:"100",width:"100"},Qo=["fill"],_o=["x","y","fill"],ea={name:"Background",compatConfig:{MODE:3}},ta=K({...ea,props:{id:{},variant:{default:()=>we.Dots},gap:{default:20},size:{default:1},lineWidth:{default:1},patternColor:{},color:{},bgColor:{},height:{default:100},width:{default:100},x:{default:0},y:{default:0},offset:{default:0}},setup(e){const{id:t,viewport:n}=Ct(),i=S(()=>{const a=n.value.zoom,[s,u]=Array.isArray(e.gap)?e.gap:[e.gap,e.gap],d=[s*a||1,u*a||1],l=e.size*a,[c,v]=Array.isArray(e.offset)?e.offset:[e.offset,e.offset],h=[c*a||1+d[0]/2,v*a||1+d[1]/2];return{scaledGap:d,offset:h,size:l}}),o=We(()=>`pattern-${t}${e.id?`-${e.id}`:""}`),r=We(()=>e.color||e.patternColor||Ko[e.variant||we.Dots]);return(a,s)=>(m(),O("svg",{class:"vue-flow__background vue-flow__container",style:he({height:`${a.height>100?100:a.height}%`,width:`${a.width>100?100:a.width}%`})},[Q(a.$slots,"pattern-container",{id:o.value},()=>[L("pattern",{id:o.value,x:f(n).x%i.value.scaledGap[0],y:f(n).y%i.value.scaledGap[1],width:i.value.scaledGap[0],height:i.value.scaledGap[1],patternTransform:`translate(-${i.value.offset[0]},-${i.value.offset[1]})`,patternUnits:"userSpaceOnUse"},[Q(a.$slots,"pattern",{},()=>[a.variant===f(we).Lines?(m(),C(f(ei),{key:0,size:a.lineWidth,color:r.value,dimensions:i.value.scaledGap},null,8,["size","color","dimensions"])):a.variant===f(we).Dots?(m(),C(f(ti),{key:1,color:r.value,radius:i.value.size/2},null,8,["color","radius"])):z("",!0),a.bgColor?(m(),O("svg",Zo,[L("rect",{width:"100%",height:"100%",fill:a.bgColor},null,8,Qo)])):z("",!0)])],8,Jo)]),L("rect",{x:a.x,y:a.y,width:"100%",height:"100%",fill:`url(#${o.value})`},null,8,_o),Q(a.$slots,"default",{id:o.value})],4))}});var na={value:()=>{}};function Qt(){for(var e=0,t=arguments.length,n={},i;e<t;++e){if(!(i=arguments[e]+"")||i in n||/[\s.]/.test(i))throw new Error("illegal type: "+i);n[i]=[]}return new ft(n)}function ft(e){this._=e}function ia(e,t){return e.trim().split(/^|\s+/).map(function(n){var i="",o=n.indexOf(".");if(o>=0&&(i=n.slice(o+1),n=n.slice(0,o)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:i}})}ft.prototype=Qt.prototype={constructor:ft,on:function(e,t){var n=this._,i=ia(e+"",n),o,r=-1,a=i.length;if(arguments.length<2){for(;++r<a;)if((o=(e=i[r]).type)&&(o=oa(n[o],e.name)))return o;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++r<a;)if(o=(e=i[r]).type)n[o]=hn(n[o],e.name,t);else if(t==null)for(o in n)n[o]=hn(n[o],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new ft(e)},call:function(e,t){if((o=arguments.length-2)>0)for(var n=new Array(o),i=0,o,r;i<o;++i)n[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(r=this._[e],i=0,o=r.length;i<o;++i)r[i].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var i=this._[e],o=0,r=i.length;o<r;++o)i[o].value.apply(t,n)}};function oa(e,t){for(var n=0,i=e.length,o;n<i;++n)if((o=e[n]).name===t)return o.value}function hn(e,t,n){for(var i=0,o=e.length;i<o;++i)if(e[i].name===t){e[i]=na,e=e.slice(0,i).concat(e.slice(i+1));break}return n!=null&&e.push({name:t,value:n}),e}var jt="http://www.w3.org/1999/xhtml";const mn={svg:"http://www.w3.org/2000/svg",xhtml:jt,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Mt(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),mn.hasOwnProperty(t)?{space:mn[t],local:e}:e}function aa(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===jt&&t.documentElement.namespaceURI===jt?t.createElement(e):t.createElementNS(n,e)}}function ra(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function ni(e){var t=Mt(e);return(t.local?ra:aa)(t)}function sa(){}function _t(e){return e==null?sa:function(){return this.querySelector(e)}}function la(e){typeof e!="function"&&(e=_t(e));for(var t=this._groups,n=t.length,i=new Array(n),o=0;o<n;++o)for(var r=t[o],a=r.length,s=i[o]=new Array(a),u,d,l=0;l<a;++l)(u=r[l])&&(d=e.call(u,u.__data__,l,r))&&("__data__"in u&&(d.__data__=u.__data__),s[l]=d);return new ue(i,this._parents)}function ua(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function ca(){return[]}function ii(e){return e==null?ca:function(){return this.querySelectorAll(e)}}function da(e){return function(){return ua(e.apply(this,arguments))}}function fa(e){typeof e=="function"?e=da(e):e=ii(e);for(var t=this._groups,n=t.length,i=[],o=[],r=0;r<n;++r)for(var a=t[r],s=a.length,u,d=0;d<s;++d)(u=a[d])&&(i.push(e.call(u,u.__data__,d,a)),o.push(u));return new ue(i,o)}function oi(e){return function(){return this.matches(e)}}function ai(e){return function(t){return t.matches(e)}}var ha=Array.prototype.find;function ma(e){return function(){return ha.call(this.children,e)}}function va(){return this.firstElementChild}function ga(e){return this.select(e==null?va:ma(typeof e=="function"?e:ai(e)))}var ya=Array.prototype.filter;function pa(){return Array.from(this.children)}function wa(e){return function(){return ya.call(this.children,e)}}function ba(e){return this.selectAll(e==null?pa:wa(typeof e=="function"?e:ai(e)))}function ka(e){typeof e!="function"&&(e=oi(e));for(var t=this._groups,n=t.length,i=new Array(n),o=0;o<n;++o)for(var r=t[o],a=r.length,s=i[o]=[],u,d=0;d<a;++d)(u=r[d])&&e.call(u,u.__data__,d,r)&&s.push(u);return new ue(i,this._parents)}function ri(e){return new Array(e.length)}function xa(){return new ue(this._enter||this._groups.map(ri),this._parents)}function wt(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}wt.prototype={constructor:wt,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 Ia(e){return function(){return e}}function Sa(e,t,n,i,o,r){for(var a=0,s,u=t.length,d=r.length;a<d;++a)(s=t[a])?(s.__data__=r[a],i[a]=s):n[a]=new wt(e,r[a]);for(;a<u;++a)(s=t[a])&&(o[a]=s)}function $a(e,t,n,i,o,r,a){var s,u,d=new Map,l=t.length,c=r.length,v=new Array(l),h;for(s=0;s<l;++s)(u=t[s])&&(v[s]=h=a.call(u,u.__data__,s,t)+"",d.has(h)?o[s]=u:d.set(h,u));for(s=0;s<c;++s)h=a.call(e,r[s],s,r)+"",(u=d.get(h))?(i[s]=u,u.__data__=r[s],d.delete(h)):n[s]=new wt(e,r[s]);for(s=0;s<l;++s)(u=t[s])&&d.get(v[s])===u&&(o[s]=u)}function Ca(e){return e.__data__}function Va(e,t){if(!arguments.length)return Array.from(this,Ca);var n=t?$a:Sa,i=this._parents,o=this._groups;typeof e!="function"&&(e=Ia(e));for(var r=o.length,a=new Array(r),s=new Array(r),u=new Array(r),d=0;d<r;++d){var l=i[d],c=o[d],v=c.length,h=Ea(e.call(l,l&&l.__data__,d,i)),b=h.length,V=s[d]=new Array(b),P=a[d]=new Array(b),A=u[d]=new Array(v);n(l,c,V,P,A,h,t);for(var M=0,$=0,E,j;M<b;++M)if(E=V[M]){for(M>=$&&($=M+1);!(j=P[$])&&++$<b;);E._next=j||null}}return a=new ue(a,i),a._enter=s,a._exit=u,a}function Ea(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Aa(){return new ue(this._exit||this._groups.map(ri),this._parents)}function Ma(e,t,n){var i=this.enter(),o=this,r=this.exit();return typeof e=="function"?(i=e(i),i&&(i=i.selection())):i=i.append(e+""),t!=null&&(o=t(o),o&&(o=o.selection())),n==null?r.remove():n(r),i&&o?i.merge(o).order():o}function Na(e){for(var t=e.selection?e.selection():e,n=this._groups,i=t._groups,o=n.length,r=i.length,a=Math.min(o,r),s=new Array(o),u=0;u<a;++u)for(var d=n[u],l=i[u],c=d.length,v=s[u]=new Array(c),h,b=0;b<c;++b)(h=d[b]||l[b])&&(v[b]=h);for(;u<o;++u)s[u]=n[u];return new ue(s,this._parents)}function Oa(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var i=e[t],o=i.length-1,r=i[o],a;--o>=0;)(a=i[o])&&(r&&a.compareDocumentPosition(r)^4&&r.parentNode.insertBefore(a,r),r=a);return this}function Ta(e){e||(e=Ra);function t(c,v){return c&&v?e(c.__data__,v.__data__):!c-!v}for(var n=this._groups,i=n.length,o=new Array(i),r=0;r<i;++r){for(var a=n[r],s=a.length,u=o[r]=new Array(s),d,l=0;l<s;++l)(d=a[l])&&(u[l]=d);u.sort(t)}return new ue(o,this._parents).order()}function Ra(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function za(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Ba(){return Array.from(this)}function Pa(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var i=e[t],o=0,r=i.length;o<r;++o){var a=i[o];if(a)return a}return null}function Ha(){let e=0;for(const t of this)++e;return e}function Fa(){return!this.node()}function ja(e){for(var t=this._groups,n=0,i=t.length;n<i;++n)for(var o=t[n],r=0,a=o.length,s;r<a;++r)(s=o[r])&&e.call(s,s.__data__,r,o);return this}function La(e){return function(){this.removeAttribute(e)}}function Da(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Ua(e,t){return function(){this.setAttribute(e,t)}}function Xa(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Ya(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function qa(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 Wa(e,t){var n=Mt(e);if(arguments.length<2){var i=this.node();return n.local?i.getAttributeNS(n.space,n.local):i.getAttribute(n)}return this.each((t==null?n.local?Da:La:typeof t=="function"?n.local?qa:Ya:n.local?Xa:Ua)(n,t))}function si(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Ga(e){return function(){this.style.removeProperty(e)}}function Ka(e,t,n){return function(){this.style.setProperty(e,t,n)}}function Ja(e,t,n){return function(){var i=t.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,n)}}function Za(e,t,n){return arguments.length>1?this.each((t==null?Ga:typeof t=="function"?Ja:Ka)(e,t,n??"")):Fe(this.node(),e)}function Fe(e,t){return e.style.getPropertyValue(t)||si(e).getComputedStyle(e,null).getPropertyValue(t)}function Qa(e){return function(){delete this[e]}}function _a(e,t){return function(){this[e]=t}}function er(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function tr(e,t){return arguments.length>1?this.each((t==null?Qa:typeof t=="function"?er:_a)(e,t)):this.node()[e]}function li(e){return e.trim().split(/^|\s+/)}function en(e){return e.classList||new ui(e)}function ui(e){this._node=e,this._names=li(e.getAttribute("class")||"")}ui.prototype={add:function(e){var t=this._names.indexOf(e);t<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 ci(e,t){for(var n=en(e),i=-1,o=t.length;++i<o;)n.add(t[i])}function di(e,t){for(var n=en(e),i=-1,o=t.length;++i<o;)n.remove(t[i])}function nr(e){return function(){ci(this,e)}}function ir(e){return function(){di(this,e)}}function or(e,t){return function(){(t.apply(this,arguments)?ci:di)(this,e)}}function ar(e,t){var n=li(e+"");if(arguments.length<2){for(var i=en(this.node()),o=-1,r=n.length;++o<r;)if(!i.contains(n[o]))return!1;return!0}return this.each((typeof t=="function"?or:t?nr:ir)(n,t))}function rr(){this.textContent=""}function sr(e){return function(){this.textContent=e}}function lr(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function ur(e){return arguments.length?this.each(e==null?rr:(typeof e=="function"?lr:sr)(e)):this.node().textContent}function cr(){this.innerHTML=""}function dr(e){return function(){this.innerHTML=e}}function fr(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function hr(e){return arguments.length?this.each(e==null?cr:(typeof e=="function"?fr:dr)(e)):this.node().innerHTML}function mr(){this.nextSibling&&this.parentNode.appendChild(this)}function vr(){return this.each(mr)}function gr(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function yr(){return this.each(gr)}function pr(e){var t=typeof e=="function"?e:ni(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function wr(){return null}function br(e,t){var n=typeof e=="function"?e:ni(e),i=t==null?wr:typeof t=="function"?t:_t(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),i.apply(this,arguments)||null)})}function kr(){var e=this.parentNode;e&&e.removeChild(this)}function xr(){return this.each(kr)}function Ir(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Sr(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function $r(e){return this.select(e?Sr:Ir)}function Cr(e){return arguments.length?this.property("__data__",e):this.node().__data__}function Vr(e){return function(t){e.call(this,t,this.__data__)}}function Er(e){return e.trim().split(/^|\s+/).map(function(t){var n="",i=t.indexOf(".");return i>=0&&(n=t.slice(i+1),t=t.slice(0,i)),{type:t,name:n}})}function Ar(e){return function(){var t=this.__on;if(t){for(var n=0,i=-1,o=t.length,r;n<o;++n)r=t[n],(!e.type||r.type===e.type)&&r.name===e.name?this.removeEventListener(r.type,r.listener,r.options):t[++i]=r;++i?t.length=i:delete this.__on}}}function Mr(e,t,n){return function(){var i=this.__on,o,r=Vr(t);if(i){for(var a=0,s=i.length;a<s;++a)if((o=i[a]).type===e.type&&o.name===e.name){this.removeEventListener(o.type,o.listener,o.options),this.addEventListener(o.type,o.listener=r,o.options=n),o.value=t;return}}this.addEventListener(e.type,r,n),o={type:e.type,name:e.name,value:t,listener:r,options:n},i?i.push(o):this.__on=[o]}}function Nr(e,t,n){var i=Er(e+""),o,r=i.length,a;if(arguments.length<2){var s=this.node().__on;if(s){for(var u=0,d=s.length,l;u<d;++u)for(o=0,l=s[u];o<r;++o)if((a=i[o]).type===l.type&&a.name===l.name)return l.value}return}for(s=t?Mr:Ar,o=0;o<r;++o)this.each(s(i[o],t,n));return this}function fi(e,t,n){var i=si(e),o=i.CustomEvent;typeof o=="function"?o=new o(t,n):(o=i.document.createEvent("Event"),n?(o.initEvent(t,n.bubbles,n.cancelable),o.detail=n.detail):o.initEvent(t,!1,!1)),e.dispatchEvent(o)}function Or(e,t){return function(){return fi(this,e,t)}}function Tr(e,t){return function(){return fi(this,e,t.apply(this,arguments))}}function Rr(e,t){return this.each((typeof t=="function"?Tr:Or)(e,t))}function*zr(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var i=e[t],o=0,r=i.length,a;o<r;++o)(a=i[o])&&(yield a)}var hi=[null];function ue(e,t){this._groups=e,this._parents=t}function nt(){return new ue([[document.documentElement]],hi)}function Br(){return this}ue.prototype=nt.prototype={constructor:ue,select:la,selectAll:fa,selectChild:ga,selectChildren:ba,filter:ka,data:Va,enter:xa,exit:Aa,join:Ma,merge:Na,selection:Br,order:Oa,sort:Ta,call:za,nodes:Ba,node:Pa,size:Ha,empty:Fa,each:ja,attr:Wa,style:Za,property:tr,classed:ar,text:ur,html:hr,raise:vr,lower:yr,append:pr,insert:br,remove:xr,clone:$r,datum:Cr,on:Nr,dispatch:Rr,[Symbol.iterator]:zr};function Ce(e){return typeof e=="string"?new ue([[document.querySelector(e)]],[document.documentElement]):new ue([[e]],hi)}function Pr(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Se(e,t){if(e=Pr(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var i=n.createSVGPoint();return i.x=e.clientX,i.y=e.clientY,i=i.matrixTransform(t.getScreenCTM().inverse()),[i.x,i.y]}if(t.getBoundingClientRect){var o=t.getBoundingClientRect();return[e.clientX-o.left-t.clientLeft,e.clientY-o.top-t.clientTop]}}return[e.pageX,e.pageY]}const Lt={capture:!0,passive:!1};function Dt(e){e.preventDefault(),e.stopImmediatePropagation()}function Hr(e){var t=e.document.documentElement,n=Ce(e).on("dragstart.drag",Dt,Lt);"onselectstart"in t?n.on("selectstart.drag",Dt,Lt):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function Fr(e,t){var n=e.document.documentElement,i=Ce(e).on("dragstart.drag",null);t&&(i.on("click.drag",Dt,Lt),setTimeout(function(){i.on("click.drag",null)},0)),"onselectstart"in n?i.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}function tn(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function mi(e,t){var n=Object.create(e.prototype);for(var i in t)n[i]=t[i];return n}function it(){}var Je=.7,bt=1/Je,He="\\s*([+-]?\\d+)\\s*",Ze="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",ve="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",jr=/^#([0-9a-f]{3,8})$/,Lr=new RegExp(`^rgb\\(${He},${He},${He}\\)$`),Dr=new RegExp(`^rgb\\(${ve},${ve},${ve}\\)$`),Ur=new RegExp(`^rgba\\(${He},${He},${He},${Ze}\\)$`),Xr=new RegExp(`^rgba\\(${ve},${ve},${ve},${Ze}\\)$`),Yr=new RegExp(`^hsl\\(${Ze},${ve},${ve}\\)$`),qr=new RegExp(`^hsla\\(${Ze},${ve},${ve},${Ze}\\)$`),vn={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};tn(it,Qe,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:gn,formatHex:gn,formatHex8:Wr,formatHsl:Gr,formatRgb:yn,toString:yn});function gn(){return this.rgb().formatHex()}function Wr(){return this.rgb().formatHex8()}function Gr(){return vi(this).formatHsl()}function yn(){return this.rgb().formatRgb()}function Qe(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=jr.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?pn(t):n===3?new le(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?rt(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?rt(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=Lr.exec(e))?new le(t[1],t[2],t[3],1):(t=Dr.exec(e))?new le(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Ur.exec(e))?rt(t[1],t[2],t[3],t[4]):(t=Xr.exec(e))?rt(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Yr.exec(e))?kn(t[1],t[2]/100,t[3]/100,1):(t=qr.exec(e))?kn(t[1],t[2]/100,t[3]/100,t[4]):vn.hasOwnProperty(e)?pn(vn[e]):e==="transparent"?new le(NaN,NaN,NaN,0):null}function pn(e){return new le(e>>16&255,e>>8&255,e&255,1)}function rt(e,t,n,i){return i<=0&&(e=t=n=NaN),new le(e,t,n,i)}function Kr(e){return e instanceof it||(e=Qe(e)),e?(e=e.rgb(),new le(e.r,e.g,e.b,e.opacity)):new le}function Ut(e,t,n,i){return arguments.length===1?Kr(e):new le(e,t,n,i??1)}function le(e,t,n,i){this.r=+e,this.g=+t,this.b=+n,this.opacity=+i}tn(le,Ut,mi(it,{brighter(e){return e=e==null?bt:Math.pow(bt,e),new le(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Je:Math.pow(Je,e),new le(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new le(Re(this.r),Re(this.g),Re(this.b),kt(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:wn,formatHex:wn,formatHex8:Jr,formatRgb:bn,toString:bn}));function wn(){return`#${Oe(this.r)}${Oe(this.g)}${Oe(this.b)}`}function Jr(){return`#${Oe(this.r)}${Oe(this.g)}${Oe(this.b)}${Oe((isNaN(this.opacity)?1:this.opacity)*255)}`}function bn(){const e=kt(this.opacity);return`${e===1?"rgb(":"rgba("}${Re(this.r)}, ${Re(this.g)}, ${Re(this.b)}${e===1?")":`, ${e})`}`}function kt(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Re(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Oe(e){return e=Re(e),(e<16?"0":"")+e.toString(16)}function kn(e,t,n,i){return i<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new fe(e,t,n,i)}function vi(e){if(e instanceof fe)return new fe(e.h,e.s,e.l,e.opacity);if(e instanceof it||(e=Qe(e)),!e)return new fe;if(e instanceof fe)return e;e=e.rgb();var t=e.r/255,n=e.g/255,i=e.b/255,o=Math.min(t,n,i),r=Math.max(t,n,i),a=NaN,s=r-o,u=(r+o)/2;return s?(t===r?a=(n-i)/s+(n<i)*6:n===r?a=(i-t)/s+2:a=(t-n)/s+4,s/=u<.5?r+o:2-r-o,a*=60):s=u>0&&u<1?0:a,new fe(a,s,u,e.opacity)}function Zr(e,t,n,i){return arguments.length===1?vi(e):new fe(e,t,n,i??1)}function fe(e,t,n,i){this.h=+e,this.s=+t,this.l=+n,this.opacity=+i}tn(fe,Zr,mi(it,{brighter(e){return e=e==null?bt:Math.pow(bt,e),new fe(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Je:Math.pow(Je,e),new fe(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,i=n+(n<.5?n:1-n)*t,o=2*n-i;return new le(Bt(e>=240?e-240:e+120,o,i),Bt(e,o,i),Bt(e<120?e+240:e-120,o,i),this.opacity)},clamp(){return new fe(xn(this.h),st(this.s),st(this.l),kt(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(){const e=kt(this.opacity);return`${e===1?"hsl(":"hsla("}${xn(this.h)}, ${st(this.s)*100}%, ${st(this.l)*100}%${e===1?")":`, ${e})`}`}}));function xn(e){return e=(e||0)%360,e<0?e+360:e}function st(e){return Math.max(0,Math.min(1,e||0))}function Bt(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const gi=e=>()=>e;function Qr(e,t){return function(n){return e+n*t}}function _r(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(i){return Math.pow(e+i*t,n)}}function es(e){return(e=+e)==1?yi:function(t,n){return n-t?_r(t,n,e):gi(isNaN(t)?n:t)}}function yi(e,t){var n=t-e;return n?Qr(e,n):gi(isNaN(e)?t:e)}const In=(function e(t){var n=es(t);function i(o,r){var a=n((o=Ut(o)).r,(r=Ut(r)).r),s=n(o.g,r.g),u=n(o.b,r.b),d=yi(o.opacity,r.opacity);return function(l){return o.r=a(l),o.g=s(l),o.b=u(l),o.opacity=d(l),o+""}}return i.gamma=e,i})(1);function $e(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}var Xt=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Pt=new RegExp(Xt.source,"g");function ts(e){return function(){return e}}function ns(e){return function(t){return e(t)+""}}function is(e,t){var n=Xt.lastIndex=Pt.lastIndex=0,i,o,r,a=-1,s=[],u=[];for(e=e+"",t=t+"";(i=Xt.exec(e))&&(o=Pt.exec(t));)(r=o.index)>n&&(r=t.slice(n,r),s[a]?s[a]+=r:s[++a]=r),(i=i[0])===(o=o[0])?s[a]?s[a]+=o:s[++a]=o:(s[++a]=null,u.push({i:a,x:$e(i,o)})),n=Pt.lastIndex;return n<t.length&&(r=t.slice(n),s[a]?s[a]+=r:s[++a]=r),s.length<2?u[0]?ns(u[0].x):ts(t):(t=u.length,function(d){for(var l=0,c;l<t;++l)s[(c=u[l]).i]=c.x(d);return s.join("")})}var Sn=180/Math.PI,Yt={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function pi(e,t,n,i,o,r){var a,s,u;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(u=e*n+t*i)&&(n-=e*u,i-=t*u),(s=Math.sqrt(n*n+i*i))&&(n/=s,i/=s,u/=s),e*i<t*n&&(e=-e,t=-t,u=-u,a=-a),{translateX:o,translateY:r,rotate:Math.atan2(t,e)*Sn,skewX:Math.atan(u)*Sn,scaleX:a,scaleY:s}}var lt;function os(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Yt:pi(t.a,t.b,t.c,t.d,t.e,t.f)}function as(e){return e==null||(lt||(lt=document.createElementNS("http://www.w3.org/2000/svg","g")),lt.setAttribute("transform",e),!(e=lt.transform.baseVal.consolidate()))?Yt:(e=e.matrix,pi(e.a,e.b,e.c,e.d,e.e,e.f))}function wi(e,t,n,i){function o(d){return d.length?d.pop()+" ":""}function r(d,l,c,v,h,b){if(d!==c||l!==v){var V=h.push("translate(",null,t,null,n);b.push({i:V-4,x:$e(d,c)},{i:V-2,x:$e(l,v)})}else(c||v)&&h.push("translate("+c+t+v+n)}function a(d,l,c,v){d!==l?(d-l>180?l+=360:l-d>180&&(d+=360),v.push({i:c.push(o(c)+"rotate(",null,i)-2,x:$e(d,l)})):l&&c.push(o(c)+"rotate("+l+i)}function s(d,l,c,v){d!==l?v.push({i:c.push(o(c)+"skewX(",null,i)-2,x:$e(d,l)}):l&&c.push(o(c)+"skewX("+l+i)}function u(d,l,c,v,h,b){if(d!==c||l!==v){var V=h.push(o(h)+"scale(",null,",",null,")");b.push({i:V-4,x:$e(d,c)},{i:V-2,x:$e(l,v)})}else(c!==1||v!==1)&&h.push(o(h)+"scale("+c+","+v+")")}return function(d,l){var c=[],v=[];return d=e(d),l=e(l),r(d.translateX,d.translateY,l.translateX,l.translateY,c,v),a(d.rotate,l.rotate,c,v),s(d.skewX,l.skewX,c,v),u(d.scaleX,d.scaleY,l.scaleX,l.scaleY,c,v),d=l=null,function(h){for(var b=-1,V=v.length,P;++b<V;)c[(P=v[b]).i]=P.x(h);return c.join("")}}}var rs=wi(os,"px, ","px)","deg)"),ss=wi(as,", ",")",")"),ls=1e-12;function $n(e){return((e=Math.exp(e))+1/e)/2}function us(e){return((e=Math.exp(e))-1/e)/2}function cs(e){return((e=Math.exp(2*e))-1)/(e+1)}const ds=(function e(t,n,i){function o(r,a){var s=r[0],u=r[1],d=r[2],l=a[0],c=a[1],v=a[2],h=l-s,b=c-u,V=h*h+b*b,P,A;if(V<ls)A=Math.log(v/d)/t,P=function(U){return[s+U*h,u+U*b,d*Math.exp(t*U*A)]};else{var M=Math.sqrt(V),$=(v*v-d*d+i*V)/(2*d*n*M),E=(v*v-d*d-i*V)/(2*v*n*M),j=Math.log(Math.sqrt($*$+1)-$),B=Math.log(Math.sqrt(E*E+1)-E);A=(B-j)/t,P=function(U){var W=U*A,H=$n(j),F=d/(n*M)*(H*cs(t*W+j)-us(j));return[s+F*h,u+F*b,d*H/$n(t*W+j)]}}return P.duration=A*1e3*t/Math.SQRT2,P}return o.rho=function(r){var a=Math.max(.001,+r),s=a*a,u=s*s;return e(a,s,u)},o})(Math.SQRT2,2,4);var je=0,Xe=0,De=0,bi=1e3,xt,Ye,It=0,ze=0,Nt=0,_e=typeof performance=="object"&&performance.now?performance:Date,ki=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function nn(){return ze||(ki(fs),ze=_e.now()+Nt)}function fs(){ze=0}function St(){this._call=this._time=this._next=null}St.prototype=xi.prototype={constructor:St,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?nn():+n)+(t==null?0:+t),!this._next&&Ye!==this&&(Ye?Ye._next=this:xt=this,Ye=this),this._call=e,this._time=n,qt()},stop:function(){this._call&&(this._call=null,this._time=1/0,qt())}};function xi(e,t,n){var i=new St;return i.restart(e,t,n),i}function hs(){nn(),++je;for(var e=xt,t;e;)(t=ze-e._time)>=0&&e._call.call(void 0,t),e=e._next;--je}function Cn(){ze=(It=_e.now())+Nt,je=Xe=0;try{hs()}finally{je=0,vs(),ze=0}}function ms(){var e=_e.now(),t=e-It;t>bi&&(Nt-=t,It=e)}function vs(){for(var e,t=xt,n,i=1/0;t;)t._call?(i>t._time&&(i=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:xt=n);Ye=e,qt(i)}function qt(e){if(!je){Xe&&(Xe=clearTimeout(Xe));var t=e-ze;t>24?(e<1/0&&(Xe=setTimeout(Cn,e-_e.now()-Nt)),De&&(De=clearInterval(De))):(De||(It=_e.now(),De=setInterval(ms,bi)),je=1,ki(Cn))}}function Vn(e,t,n){var i=new St;return t=t==null?0:+t,i.restart(o=>{i.stop(),e(o+t)},t,n),i}var gs=Qt("start","end","cancel","interrupt"),ys=[],Ii=0,En=1,Wt=2,ht=3,An=4,Gt=5,mt=6;function Ot(e,t,n,i,o,r){var a=e.__transition;if(!a)e.__transition={};else if(n in a)return;ps(e,n,{name:t,index:i,group:o,on:gs,tween:ys,time:r.time,delay:r.delay,duration:r.duration,ease:r.ease,timer:null,state:Ii})}function on(e,t){var n=me(e,t);if(n.state>Ii)throw new Error("too late; already scheduled");return n}function ge(e,t){var n=me(e,t);if(n.state>ht)throw new Error("too late; already running");return n}function me(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function ps(e,t,n){var i=e.__transition,o;i[t]=n,n.timer=xi(r,0,n.time);function r(d){n.state=En,n.timer.restart(a,n.delay,n.time),n.delay<=d&&a(d-n.delay)}function a(d){var l,c,v,h;if(n.state!==En)return u();for(l in i)if(h=i[l],h.name===n.name){if(h.state===ht)return Vn(a);h.state===An?(h.state=mt,h.timer.stop(),h.on.call("interrupt",e,e.__data__,h.index,h.group),delete i[l]):+l<t&&(h.state=mt,h.timer.stop(),h.on.call("cancel",e,e.__data__,h.index,h.group),delete i[l])}if(Vn(function(){n.state===ht&&(n.state=An,n.timer.restart(s,n.delay,n.time),s(d))}),n.state=Wt,n.on.call("start",e,e.__data__,n.index,n.group),n.state===Wt){for(n.state=ht,o=new Array(v=n.tween.length),l=0,c=-1;l<v;++l)(h=n.tween[l].value.call(e,e.__data__,n.index,n.group))&&(o[++c]=h);o.length=c+1}}function s(d){for(var l=d<n.duration?n.ease.call(null,d/n.duration):(n.timer.restart(u),n.state=Gt,1),c=-1,v=o.length;++c<v;)o[c].call(e,l);n.state===Gt&&(n.on.call("end",e,e.__data__,n.index,n.group),u())}function u(){n.state=mt,n.timer.stop(),delete i[t];for(var d in i)return;delete e.__transition}}function vt(e,t){var n=e.__transition,i,o,r=!0,a;if(n){t=t==null?null:t+"";for(a in n){if((i=n[a]).name!==t){r=!1;continue}o=i.state>Wt&&i.state<Gt,i.state=mt,i.timer.stop(),i.on.call(o?"interrupt":"cancel",e,e.__data__,i.index,i.group),delete n[a]}r&&delete e.__transition}}function ws(e){return this.each(function(){vt(this,e)})}function bs(e,t){var n,i;return function(){var o=ge(this,e),r=o.tween;if(r!==n){i=n=r;for(var a=0,s=i.length;a<s;++a)if(i[a].name===t){i=i.slice(),i.splice(a,1);break}}o.tween=i}}function ks(e,t,n){var i,o;if(typeof n!="function")throw new Error;return function(){var r=ge(this,e),a=r.tween;if(a!==i){o=(i=a).slice();for(var s={name:t,value:n},u=0,d=o.length;u<d;++u)if(o[u].name===t){o[u]=s;break}u===d&&o.push(s)}r.tween=o}}function xs(e,t){var n=this._id;if(e+="",arguments.length<2){for(var i=me(this.node(),n).tween,o=0,r=i.length,a;o<r;++o)if((a=i[o]).name===e)return a.value;return null}return this.each((t==null?bs:ks)(n,e,t))}function an(e,t,n){var i=e._id;return e.each(function(){var o=ge(this,i);(o.value||(o.value={}))[t]=n.apply(this,arguments)}),function(o){return me(o,i).value[t]}}function Si(e,t){var n;return(typeof t=="number"?$e:t instanceof Qe?In:(n=Qe(t))?(t=n,In):is)(e,t)}function Is(e){return function(){this.removeAttribute(e)}}function Ss(e){return function(){this.removeAttributeNS(e.space,e.local)}}function $s(e,t,n){var i,o=n+"",r;return function(){var a=this.getAttribute(e);return a===o?null:a===i?r:r=t(i=a,n)}}function Cs(e,t,n){var i,o=n+"",r;return function(){var a=this.getAttributeNS(e.space,e.local);return a===o?null:a===i?r:r=t(i=a,n)}}function Vs(e,t,n){var i,o,r;return function(){var a,s=n(this),u;return s==null?void this.removeAttribute(e):(a=this.getAttribute(e),u=s+"",a===u?null:a===i&&u===o?r:(o=u,r=t(i=a,s)))}}function Es(e,t,n){var i,o,r;return function(){var a,s=n(this),u;return s==null?void this.removeAttributeNS(e.space,e.local):(a=this.getAttributeNS(e.space,e.local),u=s+"",a===u?null:a===i&&u===o?r:(o=u,r=t(i=a,s)))}}function As(e,t){var n=Mt(e),i=n==="transform"?ss:Si;return this.attrTween(e,typeof t=="function"?(n.local?Es:Vs)(n,i,an(this,"attr."+e,t)):t==null?(n.local?Ss:Is)(n):(n.local?Cs:$s)(n,i,t))}function Ms(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function Ns(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function Os(e,t){var n,i;function o(){var r=t.apply(this,arguments);return r!==i&&(n=(i=r)&&Ns(e,r)),n}return o._value=t,o}function Ts(e,t){var n,i;function o(){var r=t.apply(this,arguments);return r!==i&&(n=(i=r)&&Ms(e,r)),n}return o._value=t,o}function Rs(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 new Error;var i=Mt(e);return this.tween(n,(i.local?Os:Ts)(i,t))}function zs(e,t){return function(){on(this,e).delay=+t.apply(this,arguments)}}function Bs(e,t){return t=+t,function(){on(this,e).delay=t}}function Ps(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?zs:Bs)(t,e)):me(this.node(),t).delay}function Hs(e,t){return function(){ge(this,e).duration=+t.apply(this,arguments)}}function Fs(e,t){return t=+t,function(){ge(this,e).duration=t}}function js(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Hs:Fs)(t,e)):me(this.node(),t).duration}function Ls(e,t){if(typeof t!="function")throw new Error;return function(){ge(this,e).ease=t}}function Ds(e){var t=this._id;return arguments.length?this.each(Ls(t,e)):me(this.node(),t).ease}function Us(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;ge(this,e).ease=n}}function Xs(e){if(typeof e!="function")throw new Error;return this.each(Us(this._id,e))}function Ys(e){typeof e!="function"&&(e=oi(e));for(var t=this._groups,n=t.length,i=new Array(n),o=0;o<n;++o)for(var r=t[o],a=r.length,s=i[o]=[],u,d=0;d<a;++d)(u=r[d])&&e.call(u,u.__data__,d,r)&&s.push(u);return new xe(i,this._parents,this._name,this._id)}function qs(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,i=t.length,o=n.length,r=Math.min(i,o),a=new Array(i),s=0;s<r;++s)for(var u=t[s],d=n[s],l=u.length,c=a[s]=new Array(l),v,h=0;h<l;++h)(v=u[h]||d[h])&&(c[h]=v);for(;s<i;++s)a[s]=t[s];return new xe(a,this._parents,this._name,this._id)}function Ws(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function Gs(e,t,n){var i,o,r=Ws(t)?on:ge;return function(){var a=r(this,e),s=a.on;s!==i&&(o=(i=s).copy()).on(t,n),a.on=o}}function Ks(e,t){var n=this._id;return arguments.length<2?me(this.node(),n).on.on(e):this.each(Gs(n,e,t))}function Js(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function Zs(){return this.on("end.remove",Js(this._id))}function Qs(e){var t=this._name,n=this._id;typeof e!="function"&&(e=_t(e));for(var i=this._groups,o=i.length,r=new Array(o),a=0;a<o;++a)for(var s=i[a],u=s.length,d=r[a]=new Array(u),l,c,v=0;v<u;++v)(l=s[v])&&(c=e.call(l,l.__data__,v,s))&&("__data__"in l&&(c.__data__=l.__data__),d[v]=c,Ot(d[v],t,n,v,d,me(l,n)));return new xe(r,this._parents,t,n)}function _s(e){var t=this._name,n=this._id;typeof e!="function"&&(e=ii(e));for(var i=this._groups,o=i.length,r=[],a=[],s=0;s<o;++s)for(var u=i[s],d=u.length,l,c=0;c<d;++c)if(l=u[c]){for(var v=e.call(l,l.__data__,c,u),h,b=me(l,n),V=0,P=v.length;V<P;++V)(h=v[V])&&Ot(h,t,n,V,v,b);r.push(v),a.push(l)}return new xe(r,a,t,n)}var el=nt.prototype.constructor;function tl(){return new el(this._groups,this._parents)}function nl(e,t){var n,i,o;return function(){var r=Fe(this,e),a=(this.style.removeProperty(e),Fe(this,e));return r===a?null:r===n&&a===i?o:o=t(n=r,i=a)}}function $i(e){return function(){this.style.removeProperty(e)}}function il(e,t,n){var i,o=n+"",r;return function(){var a=Fe(this,e);return a===o?null:a===i?r:r=t(i=a,n)}}function ol(e,t,n){var i,o,r;return function(){var a=Fe(this,e),s=n(this),u=s+"";return s==null&&(u=s=(this.style.removeProperty(e),Fe(this,e))),a===u?null:a===i&&u===o?r:(o=u,r=t(i=a,s))}}function al(e,t){var n,i,o,r="style."+t,a="end."+r,s;return function(){var u=ge(this,e),d=u.on,l=u.value[r]==null?s||(s=$i(t)):void 0;(d!==n||o!==l)&&(i=(n=d).copy()).on(a,o=l),u.on=i}}function rl(e,t,n){var i=(e+="")=="transform"?rs:Si;return t==null?this.styleTween(e,nl(e,i)).on("end.style."+e,$i(e)):typeof t=="function"?this.styleTween(e,ol(e,i,an(this,"style."+e,t))).each(al(this._id,e)):this.styleTween(e,il(e,i,t),n).on("end.style."+e,null)}function sl(e,t,n){return function(i){this.style.setProperty(e,t.call(this,i),n)}}function ll(e,t,n){var i,o;function r(){var a=t.apply(this,arguments);return a!==o&&(i=(o=a)&&sl(e,a,n)),i}return r._value=t,r}function ul(e,t,n){var i="style."+(e+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(t==null)return this.tween(i,null);if(typeof t!="function")throw new Error;return this.tween(i,ll(e,t,n??""))}function cl(e){return function(){this.textContent=e}}function dl(e){return function(){var t=e(this);this.textContent=t??""}}function fl(e){return this.tween("text",typeof e=="function"?dl(an(this,"text",e)):cl(e==null?"":e+""))}function hl(e){return function(t){this.textContent=e.call(this,t)}}function ml(e){var t,n;function i(){var o=e.apply(this,arguments);return o!==n&&(t=(n=o)&&hl(o)),t}return i._value=e,i}function vl(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 new Error;return this.tween(t,ml(e))}function gl(){for(var e=this._name,t=this._id,n=Ci(),i=this._groups,o=i.length,r=0;r<o;++r)for(var a=i[r],s=a.length,u,d=0;d<s;++d)if(u=a[d]){var l=me(u,t);Ot(u,e,n,d,a,{time:l.time+l.delay+l.duration,delay:0,duration:l.duration,ease:l.ease})}return new xe(i,this._parents,e,n)}function yl(){var e,t,n=this,i=n._id,o=n.size();return new Promise(function(r,a){var s={value:a},u={value:function(){--o===0&&r()}};n.each(function(){var d=ge(this,i),l=d.on;l!==e&&(t=(e=l).copy(),t._.cancel.push(s),t._.interrupt.push(s),t._.end.push(u)),d.on=t}),o===0&&r()})}var pl=0;function xe(e,t,n,i){this._groups=e,this._parents=t,this._name=n,this._id=i}function Ci(){return++pl}var ye=nt.prototype;xe.prototype={constructor:xe,select:Qs,selectAll:_s,selectChild:ye.selectChild,selectChildren:ye.selectChildren,filter:Ys,merge:qs,selection:tl,transition:gl,call:ye.call,nodes:ye.nodes,node:ye.node,size:ye.size,empty:ye.empty,each:ye.each,on:Ks,attr:As,attrTween:Rs,style:rl,styleTween:ul,text:fl,textTween:vl,remove:Zs,tween:xs,delay:Ps,duration:js,ease:Ds,easeVarying:Xs,end:yl,[Symbol.iterator]:ye[Symbol.iterator]};function wl(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var bl={time:null,delay:0,duration:250,ease:wl};function kl(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function xl(e){var t,n;e instanceof xe?(t=e._id,e=e._name):(t=Ci(),(n=bl).time=nn(),e=e==null?null:e+"");for(var i=this._groups,o=i.length,r=0;r<o;++r)for(var a=i[r],s=a.length,u,d=0;d<s;++d)(u=a[d])&&Ot(u,e,t,d,a,n||kl(u,t));return new xe(i,this._parents,e,t)}nt.prototype.interrupt=ws;nt.prototype.transition=xl;const ut=e=>()=>e;function Il(e,{sourceEvent:t,target:n,transform:i,dispatch:o}){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:i,enumerable:!0,configurable:!0},_:{value:o}})}function be(e,t,n){this.k=e,this.x=t,this.y=n}be.prototype={constructor:be,scale:function(e){return e===1?this:new be(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new be(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 rn=new be(1,0,0);be.prototype;function Ht(e){e.stopImmediatePropagation()}function Ue(e){e.preventDefault(),e.stopImmediatePropagation()}function Sl(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function $l(){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 Mn(){return this.__zoom||rn}function Cl(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function Vl(){return navigator.maxTouchPoints||"ontouchstart"in this}function El(e,t,n){var i=e.invertX(t[0][0])-n[0][0],o=e.invertX(t[1][0])-n[1][0],r=e.invertY(t[0][1])-n[0][1],a=e.invertY(t[1][1])-n[1][1];return e.translate(o>i?(i+o)/2:Math.min(0,i)||Math.max(0,o),a>r?(r+a)/2:Math.min(0,r)||Math.max(0,a))}function Al(){var e=Sl,t=$l,n=El,i=Cl,o=Vl,r=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],s=250,u=ds,d=Qt("start","zoom","end"),l,c,v,h=500,b=150,V=0,P=10;function A(g){g.property("__zoom",Mn).on("wheel.zoom",W,{passive:!1}).on("mousedown.zoom",H).on("dblclick.zoom",F).filter(o).on("touchstart.zoom",ce).on("touchmove.zoom",te).on("touchend.zoom touchcancel.zoom",oe).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}A.transform=function(g,T,k,R){var I=g.selection?g.selection():g;I.property("__zoom",Mn),g!==I?j(g,T,k,R):I.interrupt().each(function(){B(this,arguments).event(R).start().zoom(null,typeof T=="function"?T.apply(this,arguments):T).end()})},A.scaleBy=function(g,T,k,R){A.scaleTo(g,function(){var I=this.__zoom.k,y=typeof T=="function"?T.apply(this,arguments):T;return I*y},k,R)},A.scaleTo=function(g,T,k,R){A.transform(g,function(){var I=t.apply(this,arguments),y=this.__zoom,p=k==null?E(I):typeof k=="function"?k.apply(this,arguments):k,N=y.invert(p),D=typeof T=="function"?T.apply(this,arguments):T;return n($(M(y,D),p,N),I,a)},k,R)},A.translateBy=function(g,T,k,R){A.transform(g,function(){return n(this.__zoom.translate(typeof T=="function"?T.apply(this,arguments):T,typeof k=="function"?k.apply(this,arguments):k),t.apply(this,arguments),a)},null,R)},A.translateTo=function(g,T,k,R,I){A.transform(g,function(){var y=t.apply(this,arguments),p=this.__zoom,N=R==null?E(y):typeof R=="function"?R.apply(this,arguments):R;return n(rn.translate(N[0],N[1]).scale(p.k).translate(typeof T=="function"?-T.apply(this,arguments):-T,typeof k=="function"?-k.apply(this,arguments):-k),y,a)},R,I)};function M(g,T){return T=Math.max(r[0],Math.min(r[1],T)),T===g.k?g:new be(T,g.x,g.y)}function $(g,T,k){var R=T[0]-k[0]*g.k,I=T[1]-k[1]*g.k;return R===g.x&&I===g.y?g:new be(g.k,R,I)}function E(g){return[(+g[0][0]+ +g[1][0])/2,(+g[0][1]+ +g[1][1])/2]}function j(g,T,k,R){g.on("start.zoom",function(){B(this,arguments).event(R).start()}).on("interrupt.zoom end.zoom",function(){B(this,arguments).event(R).end()}).tween("zoom",function(){var I=this,y=arguments,p=B(I,y).event(R),N=t.apply(I,y),D=k==null?E(N):typeof k=="function"?k.apply(I,y):k,Y=Math.max(N[1][0]-N[0][0],N[1][1]-N[0][1]),q=I.__zoom,J=typeof T=="function"?T.apply(I,y):T,_=u(q.invert(D).concat(Y/q.k),J.invert(D).concat(Y/J.k));return function(ne){if(ne===1)ne=J;else{var de=_(ne),Tt=Y/de[2];ne=new be(Tt,D[0]-de[0]*Tt,D[1]-de[1]*Tt)}p.zoom(null,ne)}})}function B(g,T,k){return!k&&g.__zooming||new U(g,T)}function U(g,T){this.that=g,this.args=T,this.active=0,this.sourceEvent=null,this.extent=t.apply(g,T),this.taps=0}U.prototype={event:function(g){return g&&(this.sourceEvent=g),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(g,T){return this.mouse&&g!=="mouse"&&(this.mouse[1]=T.invert(this.mouse[0])),this.touch0&&g!=="touch"&&(this.touch0[1]=T.invert(this.touch0[0])),this.touch1&&g!=="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(g){var T=Ce(this.that).datum();d.call(g,this.that,new Il(g,{sourceEvent:this.sourceEvent,target:A,transform:this.that.__zoom,dispatch:d}),T)}};function W(g,...T){if(!e.apply(this,arguments))return;var k=B(this,T).event(g),R=this.__zoom,I=Math.max(r[0],Math.min(r[1],R.k*Math.pow(2,i.apply(this,arguments)))),y=Se(g);if(k.wheel)(k.mouse[0][0]!==y[0]||k.mouse[0][1]!==y[1])&&(k.mouse[1]=R.invert(k.mouse[0]=y)),clearTimeout(k.wheel);else{if(R.k===I)return;k.mouse=[y,R.invert(y)],vt(this),k.start()}Ue(g),k.wheel=setTimeout(p,b),k.zoom("mouse",n($(M(R,I),k.mouse[0],k.mouse[1]),k.extent,a));function p(){k.wheel=null,k.end()}}function H(g,...T){if(v||!e.apply(this,arguments))return;var k=g.currentTarget,R=B(this,T,!0).event(g),I=Ce(g.view).on("mousemove.zoom",D,!0).on("mouseup.zoom",Y,!0),y=Se(g,k),p=g.clientX,N=g.clientY;Hr(g.view),Ht(g),R.mouse=[y,this.__zoom.invert(y)],vt(this),R.start();function D(q){if(Ue(q),!R.moved){var J=q.clientX-p,_=q.clientY-N;R.moved=J*J+_*_>V}R.event(q).zoom("mouse",n($(R.that.__zoom,R.mouse[0]=Se(q,k),R.mouse[1]),R.extent,a))}function Y(q){I.on("mousemove.zoom mouseup.zoom",null),Fr(q.view,R.moved),Ue(q),R.event(q).end()}}function F(g,...T){if(e.apply(this,arguments)){var k=this.__zoom,R=Se(g.changedTouches?g.changedTouches[0]:g,this),I=k.invert(R),y=k.k*(g.shiftKey?.5:2),p=n($(M(k,y),R,I),t.apply(this,T),a);Ue(g),s>0?Ce(this).transition().duration(s).call(j,p,R,g):Ce(this).call(A.transform,p,R,g)}}function ce(g,...T){if(e.apply(this,arguments)){var k=g.touches,R=k.length,I=B(this,T,g.changedTouches.length===R).event(g),y,p,N,D;for(Ht(g),p=0;p<R;++p)N=k[p],D=Se(N,this),D=[D,this.__zoom.invert(D),N.identifier],I.touch0?!I.touch1&&I.touch0[2]!==D[2]&&(I.touch1=D,I.taps=0):(I.touch0=D,y=!0,I.taps=1+!!l);l&&(l=clearTimeout(l)),y&&(I.taps<2&&(c=D[0],l=setTimeout(function(){l=null},h)),vt(this),I.start())}}function te(g,...T){if(this.__zooming){var k=B(this,T).event(g),R=g.changedTouches,I=R.length,y,p,N,D;for(Ue(g),y=0;y<I;++y)p=R[y],N=Se(p,this),k.touch0&&k.touch0[2]===p.identifier?k.touch0[0]=N:k.touch1&&k.touch1[2]===p.identifier&&(k.touch1[0]=N);if(p=k.that.__zoom,k.touch1){var Y=k.touch0[0],q=k.touch0[1],J=k.touch1[0],_=k.touch1[1],ne=(ne=J[0]-Y[0])*ne+(ne=J[1]-Y[1])*ne,de=(de=_[0]-q[0])*de+(de=_[1]-q[1])*de;p=M(p,Math.sqrt(ne/de)),N=[(Y[0]+J[0])/2,(Y[1]+J[1])/2],D=[(q[0]+_[0])/2,(q[1]+_[1])/2]}else if(k.touch0)N=k.touch0[0],D=k.touch0[1];else return;k.zoom("touch",n($(p,N,D),k.extent,a))}}function oe(g,...T){if(this.__zooming){var k=B(this,T).event(g),R=g.changedTouches,I=R.length,y,p;for(Ht(g),v&&clearTimeout(v),v=setTimeout(function(){v=null},h),y=0;y<I;++y)p=R[y],k.touch0&&k.touch0[2]===p.identifier?delete k.touch0:k.touch1&&k.touch1[2]===p.identifier&&delete k.touch1;if(k.touch1&&!k.touch0&&(k.touch0=k.touch1,delete k.touch1),k.touch0)k.touch0[1]=this.__zoom.invert(k.touch0[0]);else if(k.end(),k.taps===2&&(p=Se(p,this),Math.hypot(c[0]-p[0],c[1]-p[1])<P)){var N=Ce(this).on("dblclick.zoom");N&&N.apply(this,arguments)}}}return A.wheelDelta=function(g){return arguments.length?(i=typeof g=="function"?g:ut(+g),A):i},A.filter=function(g){return arguments.length?(e=typeof g=="function"?g:ut(!!g),A):e},A.touchable=function(g){return arguments.length?(o=typeof g=="function"?g:ut(!!g),A):o},A.extent=function(g){return arguments.length?(t=typeof g=="function"?g:ut([[+g[0][0],+g[0][1]],[+g[1][0],+g[1][1]]]),A):t},A.scaleExtent=function(g){return arguments.length?(r[0]=+g[0],r[1]=+g[1],A):[r[0],r[1]]},A.translateExtent=function(g){return arguments.length?(a[0][0]=+g[0][0],a[1][0]=+g[1][0],a[0][1]=+g[0][1],a[1][1]=+g[1][1],A):[[a[0][0],a[0][1]],[a[1][0],a[1][1]]]},A.constrain=function(g){return arguments.length?(n=g,A):n},A.duration=function(g){return arguments.length?(s=+g,A):s},A.interpolate=function(g){return arguments.length?(u=g,A):u},A.on=function(){var g=d.on.apply(d,arguments);return g===d?A:g},A.clickDistance=function(g){return arguments.length?(V=(g=+g)*g,A):Math.sqrt(V)},A.tapDistance=function(g){return arguments.length?(P=+g,A):P},A}const Vi=Symbol("MiniMapSlots"),Ml=["id","x","y","rx","ry","width","height","fill","stroke","stroke-width","shape-rendering"],Nl={name:"MiniMapNode",compatConfig:{MODE:3},inheritAttrs:!1},Ol=K({...Nl,props:{id:{},type:{},selected:{type:Boolean},dragging:{type:Boolean},position:{},dimensions:{},borderRadius:{},color:{},shapeRendering:{},strokeColor:{},strokeWidth:{},hidden:{type:Boolean}},emits:["click","dblclick","mouseenter","mousemove","mouseleave"],setup(e,{emit:t}){const n=e,i=oo(Vi),o=Dn(),r=We(()=>o.style??{});function a(c){t("click",c)}function s(c){t("dblclick",c)}function u(c){t("mouseenter",c)}function d(c){t("mousemove",c)}function l(c){t("mouseleave",c)}return(c,v)=>!c.hidden&&c.dimensions.width!==0&&c.dimensions.height!==0?(m(),O(X,{key:0},[f(i)[`node-${n.type}`]?(m(),C(ao(f(i)[`node-${n.type}`]),Ve(Ee({key:0},{...n,...c.$attrs})),null,16)):(m(),O("rect",Ee({key:1,id:c.id},c.$attrs,{class:["vue-flow__minimap-node",{selected:c.selected,dragging:c.dragging}],x:c.position.x,y:c.position.y,rx:c.borderRadius,ry:c.borderRadius,width:c.dimensions.width,height:c.dimensions.height,fill:c.color||r.value.background||r.value.backgroundColor,stroke:c.strokeColor,"stroke-width":c.strokeWidth,"shape-rendering":c.shapeRendering,onClick:a,onDblclick:s,onMouseenter:u,onMousemove:d,onMouseleave:l}),null,16,Ml))],64)):z("",!0)}}),Tl=["width","height","viewBox","aria-labelledby"],Rl=["id"],zl=["d","fill","stroke","stroke-width"],Bl={name:"MiniMap",compatConfig:{MODE:3}},Pl=K({...Bl,props:{nodeColor:{type:[String,Function],default:"#e2e2e2"},nodeStrokeColor:{type:[String,Function],default:"transparent"},nodeClassName:{type:[String,Function]},nodeBorderRadius:{default:5},nodeStrokeWidth:{default:2},maskColor:{default:"rgb(240, 240, 240, 0.6)"},maskStrokeColor:{default:"none"},maskStrokeWidth:{default:1},position:{default:"bottom-right"},pannable:{type:Boolean,default:!1},zoomable:{type:Boolean,default:!1},width:{},height:{},ariaLabel:{default:"Vue Flow mini map"},inversePan:{type:Boolean,default:!1},zoomStep:{default:1},offsetScale:{default:5},maskBorderRadius:{default:0}},emits:["click","nodeClick","nodeDblclick","nodeMouseenter","nodeMousemove","nodeMouseleave"],setup(e,{emit:t}){const n=no(),i=Dn(),o=200,r=150,{id:a,edges:s,viewport:u,translateExtent:d,dimensions:l,emits:c,d3Selection:v,d3Zoom:h,getNodesInitialized:b}=Ct(),V=ie();ro(Vi,n);const P=We(()=>{var I;return e.width??((I=i.style)==null?void 0:I.width)??o}),A=We(()=>{var I;return e.height??((I=i.style)==null?void 0:I.height)??r}),M=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision",$=S(()=>typeof e.nodeColor=="string"?()=>e.nodeColor:e.nodeColor),E=S(()=>typeof e.nodeStrokeColor=="string"?()=>e.nodeStrokeColor:e.nodeStrokeColor),j=S(()=>typeof e.nodeClassName=="string"?()=>e.nodeClassName:typeof e.nodeClassName=="function"?e.nodeClassName:()=>""),B=S(()=>Li(b.value.filter(I=>!I.hidden))),U=S(()=>({x:-u.value.x/u.value.zoom,y:-u.value.y/u.value.zoom,width:l.value.width/u.value.zoom,height:l.value.height/u.value.zoom})),W=S(()=>b.value&&b.value.length?ji(B.value,U.value):U.value),H=S(()=>{const I=W.value.width/P.value,y=W.value.height/A.value;return Math.max(I,y)}),F=S(()=>{const I=H.value*P.value,y=H.value*A.value,p=e.offsetScale*H.value;return{offset:p,x:W.value.x-(I-W.value.width)/2-p,y:W.value.y-(y-W.value.height)/2-p,width:I+p*2,height:y+p*2}}),ce=S(()=>!F.value.x||!F.value.y?"":`
|
|
1
|
+
import{a4 as Ct,a1 as Bi,m as sn,a5 as Ft,a6 as Pi,a7 as On,a8 as Rt,_ as se,a9 as Tn,aa as yt,$ as Kt,ab as Rn,ac as zn,ad as Hi,ae as Fi,af as dt,ag as Le,ah as ji,ai as Li,aj as Di,ak as Ui,P as Xi,al as Bn,am as Yi,an as Be,k as qe,ao as zt,ap as qi,aq as Wi,ar as Gi,I as Pn,as as Ki,at as Hn,Q as Ji,au as Zi,J as Fn,av as Qi,a2 as _i,Z as eo,S as jn}from"#entry";import{E as K,b4 as to,V as m,J as O,aa as X,ab as re,a1 as z,a6 as he,a2 as L,a0 as Z,j as S,Y as C,ai as Jt,D as f,_ as w,W as x,Z as ae,$ as G,a5 as Q,a7 as Ae,t as We,F as Ln,a8 as no,af as Dn,l as io,r as ie,i as oo,av as Ve,ag as Ee,a4 as ao,G as ro,w as Ge,b5 as so,aw as Ne,aZ as Un,aG as tt,ak as Xn,b6 as lo,b7 as uo,aN as Yn,b8 as co,aP as Me,d as qn,ah as Wn,as as ke,aj as Vt,aH as fo,a as Te,aQ as Gn,aJ as Et,aK as Ke,at as ee,n as pt,ap as ho,a$ as Kn,am as mo,ao as pe,al as vo,au as Jn,aU as Zt,H as go,p as ln,b3 as yo,aI as po,b0 as wo,b2 as bo,b9 as ko,b1 as xo,u as Zn,ba as Io,bb as So,aV as un,bc as Ie,bd as $o}from"./77UvFSdd.js";import{t as cn,a as Co,_ as Vo}from"./DPQHj1GW.js";import{C as At}from"./Bn5R9WlL.js";import{s as Eo,V as dn}from"./C5QFcB9K.js";import{I as Qn}from"./DJ5xpYjG.js";import{_ as Ao}from"./fbfpKHgl.js";import{_ as _n}from"./-QAUKRUv.js";import{r as Mo,g as No}from"./BxAss8Tj.js";function Oo(e,t){let n=t.length-e.length;if(n===1){let[i,...o]=t;return cn(i,{lazy:e,lazyArgs:o})}if(n===0){let i={lazy:e,lazyArgs:t};return Object.assign(o=>cn(o,i),i)}throw Error("Wrong number of arguments")}function ot(...e){return Oo(To,e)}function To(){let e=new Set;return t=>e.has(t)?Co:(e.add(t),{done:!1,hasNext:!0,next:t})}function Ro(e,t,n){const i=Array.from({length:n},()=>[]),o=t,a=-(o*(n-1))/2,s=Array.from({length:n},(l,c)=>a+c*o),u=[];for(let l=0;l<e.length-1;l++){const c=e[l],v=e[l+1],h=v[0]-c[0],b=v[1]-c[1],V=Math.sqrt(h*h+b*b);let P=-b,A=h;V!==0&&(P/=V,A/=V),u.push({x:P,y:A})}function d(l,c,v,h){const b=l[0],V=l[1],P=c[0],A=c[1],M=v[0],$=v[1],E=h[0],j=h[1],B=(b-P)*($-j)-(V-A)*(M-E);if(B===0)return null;const U=((b-M)*($-j)-(V-$)*(M-E))/B;return[b+U*(P-b),V+U*(A-V)]}for(let l=0;l<n;l++)for(let c=0;c<e.length;c++){const v=e[c];let h=0,b=0;if(c===0)h=u[0].x*s[l],b=u[0].y*s[l];else if(c===e.length-1)h=u[u.length-1].x*s[l],b=u[u.length-1].y*s[l];else{const V=u[c-1],P=u[c],A=e[c-1],M=e[c+1],$=[A[0]+V.x*s[l],A[1]+V.y*s[l]],E=[v[0]+V.x*s[l],v[1]+V.y*s[l]],j=[v[0]+P.x*s[l],v[1]+P.y*s[l]],B=[M[0]+P.x*s[l],M[1]+P.y*s[l]],U=d($,E,j,B);U?(h=U[0]-v[0],b=U[1]-v[1]):(h=(V.x+P.x)/2*s[l],b=(V.y+P.y)/2*s[l])}i[l].push(`${v[0]+h},${v[1]+b}`)}return i}const zo=["points","stroke"],Bo=["points"],Po={key:0},Ho=["x","y","width"],Fo=["x","y"],at=3,jo=K({__name:"CustomEdge",props:{id:{},sourceNode:{},targetNode:{},source:{},target:{},type:{},label:{type:[String,Object,Function]},style:{},selected:{type:Boolean},sourcePosition:{},targetPosition:{},sourceHandleId:{},targetHandleId:{},animated:{type:Boolean},updatable:{type:Boolean},markerStart:{},markerEnd:{},curvature:{},interactionWidth:{},data:{},events:{},labelStyle:{},labelShowBg:{type:Boolean},labelBgStyle:{},labelBgPadding:{},labelBgBorderRadius:{},sourceX:{},sourceY:{},targetX:{},targetY:{},inputResolverOutputs:{},components:{},entities:{}},setup(e){to(y=>({v7fad7fb8:at}));const t=Ct(),{inputInstance:n,outputInstance:i,inputHub:o,outputHub:r,outputKey:a,inputKey:s,inputNodeType:u}=Bi(t,{source:e.source,target:e.target,sourceHandle:e.sourceHandleId,targetHandle:e.targetHandleId}),d=y=>{if(!y)return;const p=e.inputResolverOutputs.get(`instance:${y.id}`);return p?.kind==="instance"?p.component:e.components[y.type]},l=S(()=>{if(u==="outputs"){const y=d(n);if(!y)return{all:[]};const p=y.outputs[s];return{all:p?[p.type]:[]}}if(i&&n){const y=Ft(e.inputResolverOutputs,n.id),p=ot((y[s]??[]).map(Y=>Y.type)),N=d(n);if(!N)return{all:[],visible:p};const D=N.inputs[s];return p.length>0?{all:p,visible:p}:{all:D?[D.type]:[],visible:p}}if(r&&n&&s)return{all:(Ft(e.inputResolverOutputs,n.id)[s]??[]).map(p=>p.type)};if(r&&n)return{all:On(e.inputResolverOutputs,n.id).map(y=>y.type),visible:Pi(e.inputResolverOutputs,n.id).map(y=>y.type)};if(i&&o){const y=Rt(e.inputResolverOutputs,o.id).filter(D=>D.input.instanceId===i.id&&D.input.output===a).map(D=>D.type);if(y.length>0)return{all:ot(y)};const p=d(i);if(!p)return{all:[]};const N=p.outputs[a];return{all:N?[N.type]:[]}}if(r&&o)return{all:Rt(e.inputResolverOutputs,r.id).flat().map(y=>y.type)};throw sn.error({msg:"unexpected connection in CustomEdge",inputInstance:n,outputInstance:i,inputHub:o,outputHub:r,outputKey:a,inputKey:s}),new Error("Invalid connection")}),c=S(()=>ot(l.value.all).map(y=>e.entities[y])),v=S(()=>{if(!r)return[];const y=Rt(e.inputResolverOutputs,r.id).map(p=>p.type);return ot(y).sort()}),h=S(()=>!!r&&e.data.hubReservedGhostLane),b=S(()=>!!r&&e.data.isPendingHubTyped),V=S(()=>!!r&&!!n&&!!s),P=S(()=>{if(!V.value)return;const y=d(n);if(y)return y.inputs[s]?.type}),A=S(()=>{if(!r||!V.value)return!1;const y=P.value;return y?!v.value.includes(y):!1}),M=S(()=>b.value||A.value),$=S(()=>r?M.value?!0:h.value:!1);e.data.isOutputProjection&&sn.debug({source:e.source,target:e.target,sourceHandleId:e.sourceHandleId,targetHandleId:e.targetHandleId,isOutputProjection:e.data.isOutputProjection,isOutputProjectionUnresolved:e.data.isOutputProjectionUnresolved},"rendering projection edge in CustomEdge");const E=S(()=>$.value&&v.value.length>0),j=S(()=>l.value.visible?l.value.visible.length===0:r?l.value.all.length===0:!1),B=S(()=>!!r&&!!n&&!!s),U=S(()=>{if(!r)return j.value?1:c.value.length;if(B.value)return 1;const p=v.value.length+(E.value?1:0);return Math.max(1,p)}),W=y=>r?v.value.length===0?!0:E.value&&y===U.value-1:j.value,H=()=>B.value?e.components[n.type].inputs[s]?.type:void 0,F=S(()=>{if(!B.value)return!1;const y=H();return y?!v.value.includes(y):!1}),ce=y=>{if(e.data.isOutputProjection&&e.data.isOutputProjectionUnresolved)return"#9E9E9E";if(B.value){if(F.value)return"#9E9E9E";const p=H();return(p?e.entities[p]:void 0)?.meta.color??"#607D8B"}if(W(y))return"#9E9E9E";if(r){const p=v.value[y];return e.entities[p]?.meta.color??"#607D8B"}return c.value[y%c.value.length].meta.color??"#607D8B"},te=y=>r?B.value?y===0:j.value?W(y):l.value.visible?W(y)?!1:l.value.visible.includes(v.value[y]):!W(y):j.value?!0:l.value.visible?l.value.visible.includes(c.value[y].type):!0,oe=(y,p)=>y[0]===p[0]&&y[1]===p[1],g=S(()=>{if(!e.data.points)return[];const y=[e.sourceX,e.data.routedSourceY??e.sourceY],p=[e.targetX,e.data.routedTargetY??e.targetY],N=[...e.data.points];return(!N[0]||!oe(N[0],y))&&N.unshift(y),(!N[N.length-1]||!oe(N[N.length-1],p))&&N.push(p),Ro(N,at,U.value)}),T=y=>{const N=1/U.value;return`-${y*N}s`},k=S(()=>e.data.path),R=S(()=>{if(!e.data.points)return{x:(e.sourceX+e.targetX)/2,y:(e.sourceY+e.targetY)/2};const y=[[e.sourceX,e.data.routedSourceY??e.sourceY],...e.data.points,[e.targetX,e.data.routedTargetY??e.targetY]];let p=0;for(let Y=1;Y<y.length;Y++){const q=y[Y-1],J=y[Y];p+=Math.hypot(J[0]-q[0],J[1]-q[1])}if(p===0)return{x:(e.sourceX+e.targetX)/2,y:(e.sourceY+e.targetY)/2};let N=0;const D=p/2;for(let Y=1;Y<y.length;Y++){const q=y[Y-1],J=y[Y],_=Math.hypot(J[0]-q[0],J[1]-q[1]);if(N+_>=D){const ne=(D-N)/_;return{x:q[0]+(J[0]-q[0])*ne,y:q[1]+(J[1]-q[1])*ne}}N+=_}return{x:(e.sourceX+e.targetX)/2,y:(e.sourceY+e.targetY)/2}}),I=S(()=>Math.min((k.value?.length??0)*7+18,220));return(y,p)=>(m(),O(X,null,[(m(!0),O(X,null,re(g.value,(N,D)=>(m(),O(X,{key:`static-${D}`},[te(D)?(m(),O("polyline",{key:0,points:N.join(" "),stroke:ce(D),fill:"none","stroke-width":at,style:{opacity:"0.8"}},null,8,zo)):z("",!0)],64))),128)),(m(!0),O(X,null,re(g.value,(N,D)=>(m(),O(X,{key:`highlight-${D}`},[te(D)?(m(),O("polyline",{key:0,points:N.join(" "),stroke:"white",fill:"none","stroke-width":at,class:"highlight-polyline animated-highlight",style:he({animationDelay:T(D)})},null,12,Bo)):z("",!0)],64))),128)),k.value?(m(),O("g",Po,[L("rect",{x:R.value.x-I.value/2,y:R.value.y-12,width:I.value,height:"24",rx:"6",class:"expression-label-background"},null,8,Ho),L("text",{x:R.value.x,y:R.value.y+4,"text-anchor":"middle",class:"expression-label-text"},Z(k.value),9,Fo)])):z("",!0)],64))}}),Lo=se(jo,[["__scopeId","data-v-08910730"]]);function Do(e,t){const n={borderRadius:"4px",overflow:"visible"};switch(t){case"blueprint-valid":return{...n,opacity:"0.7",outline:"2px solid #4CAF50",backgroundColor:"rgba(76, 175, 80, 0.1)",boxShadow:"0 0 10px rgba(76, 175, 80, 0.3)"};case"blueprint-invalid":return{...n,opacity:"0.7",outline:"2px solid #F44336",backgroundColor:"rgba(244, 67, 54, 0.1)",boxShadow:"0 0 10px rgba(244, 67, 54, 0.3)"}}return e?{...n,outline:"2px solid #2196F3",boxShadow:"0 0 8px rgba(33, 150, 243, 0.4)"}:n}const Uo=K({__name:"HubCard",props:{selected:{type:Boolean},blueprintStatus:{}},setup(e){return(t,n)=>(m(),C(Jt,{variant:"flat",style:he(f(Do)(e.selected,e.blueprintStatus)),color:"#2d2d2d"},{default:w(()=>[x(ae,{class:"ma-2",size:74},{default:w(()=>[...n[0]||(n[0]=[G("mdi-router",-1)])]),_:1}),Q(t.$slots,"default")]),_:3},8,["style"]))}}),Xo=K({__name:"HubNodeHandle",props:{side:{},handleColor:{},isValidConnection:{type:Function}},setup(e){return(t,n)=>(m(),O(X,null,[x(f(Tn),{id:"",type:e.side==="left"?"target":"source",position:e.side==="left"?f(yt).Left:f(yt).Right,class:Ae(["handle",[e.side==="left"?"left-handle":"right-handle"]]),"is-valid-connection":e.isValidConnection},null,8,["type","position","class","is-valid-connection"]),L("div",{class:Ae(["handle-dot",[e.side==="left"?"handle-dot-left":"handle-dot-right"]]),style:he({backgroundColor:e.handleColor})},null,6)],64))}}),fn=se(Xo,[["__scopeId","data-v-1aff1180"]]),Yo={class:"handles"},qo=K({__name:"HubNode",props:{hub:{},isValidConnection:{type:Function}},emits:["contextmenu"],setup(e,{emit:t}){const n=t,{vueFlowStore:i,selection:o}=Kt(),r=Rn(),a=S(()=>zn(r.node,i));return(s,u)=>(m(),C(Uo,{class:"hub-card",selected:f(o).isNodeSelected(f(r).node),"blueprint-status":f(a),onContextmenu:u[0]||(u[0]=d=>n("contextmenu",d))},{default:w(()=>[Q(s.$slots,"default",{},void 0,!0),L("div",Yo,[x(fn,{"handle-color":"#3F51B5",side:"left","is-valid-connection":e.isValidConnection},null,8,["is-valid-connection"]),x(fn,{"handle-color":"#3F51B5",side:"right","is-valid-connection":e.isValidConnection},null,8,["is-valid-connection"])])]),_:3},8,["selected","blueprint-status"]))}}),ac=se(qo,[["__scopeId","data-v-79b30d7c"]]),Wo=K({__name:"SelectionRectangle",props:{selectionMode:{default:"add"},selectionArea:{}},setup(e){const t=S(()=>{if(!e.selectionArea)return;const n={left:e.selectionArea.x+"px",top:e.selectionArea.y+"px",width:e.selectionArea.width+"px",height:e.selectionArea.height+"px"};return e.selectionMode==="add"?{...n,border:"2px dashed #2196F3",background:"rgba(33, 150, 243, 0.1)"}:{...n,border:"2px dashed #F44336",background:"rgba(244, 67, 54, 0.1)"}});return(n,i)=>f(t)?(m(),O("div",{key:0,class:"selection-rectangle",style:he(f(t))},null,4)):z("",!0)}}),Go=se(Wo,[["__scopeId","data-v-6118cbbb"]]);var we=(e=>(e.Lines="lines",e.Dots="dots",e))(we||{});const ei=function({dimensions:e,size:t,color:n}){return Ln("path",{stroke:n,"stroke-width":t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`})},ti=function({radius:e,color:t}){return Ln("circle",{cx:e,cy:e,r:e,fill:t})};we.Lines+"",we.Dots+"";const Ko={[we.Dots]:"#81818a",[we.Lines]:"#eee"},Jo=["id","x","y","width","height","patternTransform"],Zo={key:2,height:"100",width:"100"},Qo=["fill"],_o=["x","y","fill"],ea={name:"Background",compatConfig:{MODE:3}},ta=K({...ea,props:{id:{},variant:{default:()=>we.Dots},gap:{default:20},size:{default:1},lineWidth:{default:1},patternColor:{},color:{},bgColor:{},height:{default:100},width:{default:100},x:{default:0},y:{default:0},offset:{default:0}},setup(e){const{id:t,viewport:n}=Ct(),i=S(()=>{const a=n.value.zoom,[s,u]=Array.isArray(e.gap)?e.gap:[e.gap,e.gap],d=[s*a||1,u*a||1],l=e.size*a,[c,v]=Array.isArray(e.offset)?e.offset:[e.offset,e.offset],h=[c*a||1+d[0]/2,v*a||1+d[1]/2];return{scaledGap:d,offset:h,size:l}}),o=We(()=>`pattern-${t}${e.id?`-${e.id}`:""}`),r=We(()=>e.color||e.patternColor||Ko[e.variant||we.Dots]);return(a,s)=>(m(),O("svg",{class:"vue-flow__background vue-flow__container",style:he({height:`${a.height>100?100:a.height}%`,width:`${a.width>100?100:a.width}%`})},[Q(a.$slots,"pattern-container",{id:o.value},()=>[L("pattern",{id:o.value,x:f(n).x%i.value.scaledGap[0],y:f(n).y%i.value.scaledGap[1],width:i.value.scaledGap[0],height:i.value.scaledGap[1],patternTransform:`translate(-${i.value.offset[0]},-${i.value.offset[1]})`,patternUnits:"userSpaceOnUse"},[Q(a.$slots,"pattern",{},()=>[a.variant===f(we).Lines?(m(),C(f(ei),{key:0,size:a.lineWidth,color:r.value,dimensions:i.value.scaledGap},null,8,["size","color","dimensions"])):a.variant===f(we).Dots?(m(),C(f(ti),{key:1,color:r.value,radius:i.value.size/2},null,8,["color","radius"])):z("",!0),a.bgColor?(m(),O("svg",Zo,[L("rect",{width:"100%",height:"100%",fill:a.bgColor},null,8,Qo)])):z("",!0)])],8,Jo)]),L("rect",{x:a.x,y:a.y,width:"100%",height:"100%",fill:`url(#${o.value})`},null,8,_o),Q(a.$slots,"default",{id:o.value})],4))}});var na={value:()=>{}};function Qt(){for(var e=0,t=arguments.length,n={},i;e<t;++e){if(!(i=arguments[e]+"")||i in n||/[\s.]/.test(i))throw new Error("illegal type: "+i);n[i]=[]}return new ft(n)}function ft(e){this._=e}function ia(e,t){return e.trim().split(/^|\s+/).map(function(n){var i="",o=n.indexOf(".");if(o>=0&&(i=n.slice(o+1),n=n.slice(0,o)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:i}})}ft.prototype=Qt.prototype={constructor:ft,on:function(e,t){var n=this._,i=ia(e+"",n),o,r=-1,a=i.length;if(arguments.length<2){for(;++r<a;)if((o=(e=i[r]).type)&&(o=oa(n[o],e.name)))return o;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++r<a;)if(o=(e=i[r]).type)n[o]=hn(n[o],e.name,t);else if(t==null)for(o in n)n[o]=hn(n[o],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new ft(e)},call:function(e,t){if((o=arguments.length-2)>0)for(var n=new Array(o),i=0,o,r;i<o;++i)n[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(r=this._[e],i=0,o=r.length;i<o;++i)r[i].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var i=this._[e],o=0,r=i.length;o<r;++o)i[o].value.apply(t,n)}};function oa(e,t){for(var n=0,i=e.length,o;n<i;++n)if((o=e[n]).name===t)return o.value}function hn(e,t,n){for(var i=0,o=e.length;i<o;++i)if(e[i].name===t){e[i]=na,e=e.slice(0,i).concat(e.slice(i+1));break}return n!=null&&e.push({name:t,value:n}),e}var jt="http://www.w3.org/1999/xhtml";const mn={svg:"http://www.w3.org/2000/svg",xhtml:jt,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Mt(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),mn.hasOwnProperty(t)?{space:mn[t],local:e}:e}function aa(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===jt&&t.documentElement.namespaceURI===jt?t.createElement(e):t.createElementNS(n,e)}}function ra(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function ni(e){var t=Mt(e);return(t.local?ra:aa)(t)}function sa(){}function _t(e){return e==null?sa:function(){return this.querySelector(e)}}function la(e){typeof e!="function"&&(e=_t(e));for(var t=this._groups,n=t.length,i=new Array(n),o=0;o<n;++o)for(var r=t[o],a=r.length,s=i[o]=new Array(a),u,d,l=0;l<a;++l)(u=r[l])&&(d=e.call(u,u.__data__,l,r))&&("__data__"in u&&(d.__data__=u.__data__),s[l]=d);return new ue(i,this._parents)}function ua(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function ca(){return[]}function ii(e){return e==null?ca:function(){return this.querySelectorAll(e)}}function da(e){return function(){return ua(e.apply(this,arguments))}}function fa(e){typeof e=="function"?e=da(e):e=ii(e);for(var t=this._groups,n=t.length,i=[],o=[],r=0;r<n;++r)for(var a=t[r],s=a.length,u,d=0;d<s;++d)(u=a[d])&&(i.push(e.call(u,u.__data__,d,a)),o.push(u));return new ue(i,o)}function oi(e){return function(){return this.matches(e)}}function ai(e){return function(t){return t.matches(e)}}var ha=Array.prototype.find;function ma(e){return function(){return ha.call(this.children,e)}}function va(){return this.firstElementChild}function ga(e){return this.select(e==null?va:ma(typeof e=="function"?e:ai(e)))}var ya=Array.prototype.filter;function pa(){return Array.from(this.children)}function wa(e){return function(){return ya.call(this.children,e)}}function ba(e){return this.selectAll(e==null?pa:wa(typeof e=="function"?e:ai(e)))}function ka(e){typeof e!="function"&&(e=oi(e));for(var t=this._groups,n=t.length,i=new Array(n),o=0;o<n;++o)for(var r=t[o],a=r.length,s=i[o]=[],u,d=0;d<a;++d)(u=r[d])&&e.call(u,u.__data__,d,r)&&s.push(u);return new ue(i,this._parents)}function ri(e){return new Array(e.length)}function xa(){return new ue(this._enter||this._groups.map(ri),this._parents)}function wt(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}wt.prototype={constructor:wt,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 Ia(e){return function(){return e}}function Sa(e,t,n,i,o,r){for(var a=0,s,u=t.length,d=r.length;a<d;++a)(s=t[a])?(s.__data__=r[a],i[a]=s):n[a]=new wt(e,r[a]);for(;a<u;++a)(s=t[a])&&(o[a]=s)}function $a(e,t,n,i,o,r,a){var s,u,d=new Map,l=t.length,c=r.length,v=new Array(l),h;for(s=0;s<l;++s)(u=t[s])&&(v[s]=h=a.call(u,u.__data__,s,t)+"",d.has(h)?o[s]=u:d.set(h,u));for(s=0;s<c;++s)h=a.call(e,r[s],s,r)+"",(u=d.get(h))?(i[s]=u,u.__data__=r[s],d.delete(h)):n[s]=new wt(e,r[s]);for(s=0;s<l;++s)(u=t[s])&&d.get(v[s])===u&&(o[s]=u)}function Ca(e){return e.__data__}function Va(e,t){if(!arguments.length)return Array.from(this,Ca);var n=t?$a:Sa,i=this._parents,o=this._groups;typeof e!="function"&&(e=Ia(e));for(var r=o.length,a=new Array(r),s=new Array(r),u=new Array(r),d=0;d<r;++d){var l=i[d],c=o[d],v=c.length,h=Ea(e.call(l,l&&l.__data__,d,i)),b=h.length,V=s[d]=new Array(b),P=a[d]=new Array(b),A=u[d]=new Array(v);n(l,c,V,P,A,h,t);for(var M=0,$=0,E,j;M<b;++M)if(E=V[M]){for(M>=$&&($=M+1);!(j=P[$])&&++$<b;);E._next=j||null}}return a=new ue(a,i),a._enter=s,a._exit=u,a}function Ea(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Aa(){return new ue(this._exit||this._groups.map(ri),this._parents)}function Ma(e,t,n){var i=this.enter(),o=this,r=this.exit();return typeof e=="function"?(i=e(i),i&&(i=i.selection())):i=i.append(e+""),t!=null&&(o=t(o),o&&(o=o.selection())),n==null?r.remove():n(r),i&&o?i.merge(o).order():o}function Na(e){for(var t=e.selection?e.selection():e,n=this._groups,i=t._groups,o=n.length,r=i.length,a=Math.min(o,r),s=new Array(o),u=0;u<a;++u)for(var d=n[u],l=i[u],c=d.length,v=s[u]=new Array(c),h,b=0;b<c;++b)(h=d[b]||l[b])&&(v[b]=h);for(;u<o;++u)s[u]=n[u];return new ue(s,this._parents)}function Oa(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var i=e[t],o=i.length-1,r=i[o],a;--o>=0;)(a=i[o])&&(r&&a.compareDocumentPosition(r)^4&&r.parentNode.insertBefore(a,r),r=a);return this}function Ta(e){e||(e=Ra);function t(c,v){return c&&v?e(c.__data__,v.__data__):!c-!v}for(var n=this._groups,i=n.length,o=new Array(i),r=0;r<i;++r){for(var a=n[r],s=a.length,u=o[r]=new Array(s),d,l=0;l<s;++l)(d=a[l])&&(u[l]=d);u.sort(t)}return new ue(o,this._parents).order()}function Ra(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function za(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Ba(){return Array.from(this)}function Pa(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var i=e[t],o=0,r=i.length;o<r;++o){var a=i[o];if(a)return a}return null}function Ha(){let e=0;for(const t of this)++e;return e}function Fa(){return!this.node()}function ja(e){for(var t=this._groups,n=0,i=t.length;n<i;++n)for(var o=t[n],r=0,a=o.length,s;r<a;++r)(s=o[r])&&e.call(s,s.__data__,r,o);return this}function La(e){return function(){this.removeAttribute(e)}}function Da(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Ua(e,t){return function(){this.setAttribute(e,t)}}function Xa(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Ya(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function qa(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 Wa(e,t){var n=Mt(e);if(arguments.length<2){var i=this.node();return n.local?i.getAttributeNS(n.space,n.local):i.getAttribute(n)}return this.each((t==null?n.local?Da:La:typeof t=="function"?n.local?qa:Ya:n.local?Xa:Ua)(n,t))}function si(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Ga(e){return function(){this.style.removeProperty(e)}}function Ka(e,t,n){return function(){this.style.setProperty(e,t,n)}}function Ja(e,t,n){return function(){var i=t.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,n)}}function Za(e,t,n){return arguments.length>1?this.each((t==null?Ga:typeof t=="function"?Ja:Ka)(e,t,n??"")):Fe(this.node(),e)}function Fe(e,t){return e.style.getPropertyValue(t)||si(e).getComputedStyle(e,null).getPropertyValue(t)}function Qa(e){return function(){delete this[e]}}function _a(e,t){return function(){this[e]=t}}function er(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function tr(e,t){return arguments.length>1?this.each((t==null?Qa:typeof t=="function"?er:_a)(e,t)):this.node()[e]}function li(e){return e.trim().split(/^|\s+/)}function en(e){return e.classList||new ui(e)}function ui(e){this._node=e,this._names=li(e.getAttribute("class")||"")}ui.prototype={add:function(e){var t=this._names.indexOf(e);t<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 ci(e,t){for(var n=en(e),i=-1,o=t.length;++i<o;)n.add(t[i])}function di(e,t){for(var n=en(e),i=-1,o=t.length;++i<o;)n.remove(t[i])}function nr(e){return function(){ci(this,e)}}function ir(e){return function(){di(this,e)}}function or(e,t){return function(){(t.apply(this,arguments)?ci:di)(this,e)}}function ar(e,t){var n=li(e+"");if(arguments.length<2){for(var i=en(this.node()),o=-1,r=n.length;++o<r;)if(!i.contains(n[o]))return!1;return!0}return this.each((typeof t=="function"?or:t?nr:ir)(n,t))}function rr(){this.textContent=""}function sr(e){return function(){this.textContent=e}}function lr(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function ur(e){return arguments.length?this.each(e==null?rr:(typeof e=="function"?lr:sr)(e)):this.node().textContent}function cr(){this.innerHTML=""}function dr(e){return function(){this.innerHTML=e}}function fr(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function hr(e){return arguments.length?this.each(e==null?cr:(typeof e=="function"?fr:dr)(e)):this.node().innerHTML}function mr(){this.nextSibling&&this.parentNode.appendChild(this)}function vr(){return this.each(mr)}function gr(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function yr(){return this.each(gr)}function pr(e){var t=typeof e=="function"?e:ni(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function wr(){return null}function br(e,t){var n=typeof e=="function"?e:ni(e),i=t==null?wr:typeof t=="function"?t:_t(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),i.apply(this,arguments)||null)})}function kr(){var e=this.parentNode;e&&e.removeChild(this)}function xr(){return this.each(kr)}function Ir(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Sr(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function $r(e){return this.select(e?Sr:Ir)}function Cr(e){return arguments.length?this.property("__data__",e):this.node().__data__}function Vr(e){return function(t){e.call(this,t,this.__data__)}}function Er(e){return e.trim().split(/^|\s+/).map(function(t){var n="",i=t.indexOf(".");return i>=0&&(n=t.slice(i+1),t=t.slice(0,i)),{type:t,name:n}})}function Ar(e){return function(){var t=this.__on;if(t){for(var n=0,i=-1,o=t.length,r;n<o;++n)r=t[n],(!e.type||r.type===e.type)&&r.name===e.name?this.removeEventListener(r.type,r.listener,r.options):t[++i]=r;++i?t.length=i:delete this.__on}}}function Mr(e,t,n){return function(){var i=this.__on,o,r=Vr(t);if(i){for(var a=0,s=i.length;a<s;++a)if((o=i[a]).type===e.type&&o.name===e.name){this.removeEventListener(o.type,o.listener,o.options),this.addEventListener(o.type,o.listener=r,o.options=n),o.value=t;return}}this.addEventListener(e.type,r,n),o={type:e.type,name:e.name,value:t,listener:r,options:n},i?i.push(o):this.__on=[o]}}function Nr(e,t,n){var i=Er(e+""),o,r=i.length,a;if(arguments.length<2){var s=this.node().__on;if(s){for(var u=0,d=s.length,l;u<d;++u)for(o=0,l=s[u];o<r;++o)if((a=i[o]).type===l.type&&a.name===l.name)return l.value}return}for(s=t?Mr:Ar,o=0;o<r;++o)this.each(s(i[o],t,n));return this}function fi(e,t,n){var i=si(e),o=i.CustomEvent;typeof o=="function"?o=new o(t,n):(o=i.document.createEvent("Event"),n?(o.initEvent(t,n.bubbles,n.cancelable),o.detail=n.detail):o.initEvent(t,!1,!1)),e.dispatchEvent(o)}function Or(e,t){return function(){return fi(this,e,t)}}function Tr(e,t){return function(){return fi(this,e,t.apply(this,arguments))}}function Rr(e,t){return this.each((typeof t=="function"?Tr:Or)(e,t))}function*zr(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var i=e[t],o=0,r=i.length,a;o<r;++o)(a=i[o])&&(yield a)}var hi=[null];function ue(e,t){this._groups=e,this._parents=t}function nt(){return new ue([[document.documentElement]],hi)}function Br(){return this}ue.prototype=nt.prototype={constructor:ue,select:la,selectAll:fa,selectChild:ga,selectChildren:ba,filter:ka,data:Va,enter:xa,exit:Aa,join:Ma,merge:Na,selection:Br,order:Oa,sort:Ta,call:za,nodes:Ba,node:Pa,size:Ha,empty:Fa,each:ja,attr:Wa,style:Za,property:tr,classed:ar,text:ur,html:hr,raise:vr,lower:yr,append:pr,insert:br,remove:xr,clone:$r,datum:Cr,on:Nr,dispatch:Rr,[Symbol.iterator]:zr};function Ce(e){return typeof e=="string"?new ue([[document.querySelector(e)]],[document.documentElement]):new ue([[e]],hi)}function Pr(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Se(e,t){if(e=Pr(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var i=n.createSVGPoint();return i.x=e.clientX,i.y=e.clientY,i=i.matrixTransform(t.getScreenCTM().inverse()),[i.x,i.y]}if(t.getBoundingClientRect){var o=t.getBoundingClientRect();return[e.clientX-o.left-t.clientLeft,e.clientY-o.top-t.clientTop]}}return[e.pageX,e.pageY]}const Lt={capture:!0,passive:!1};function Dt(e){e.preventDefault(),e.stopImmediatePropagation()}function Hr(e){var t=e.document.documentElement,n=Ce(e).on("dragstart.drag",Dt,Lt);"onselectstart"in t?n.on("selectstart.drag",Dt,Lt):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function Fr(e,t){var n=e.document.documentElement,i=Ce(e).on("dragstart.drag",null);t&&(i.on("click.drag",Dt,Lt),setTimeout(function(){i.on("click.drag",null)},0)),"onselectstart"in n?i.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}function tn(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function mi(e,t){var n=Object.create(e.prototype);for(var i in t)n[i]=t[i];return n}function it(){}var Je=.7,bt=1/Je,He="\\s*([+-]?\\d+)\\s*",Ze="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",ve="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",jr=/^#([0-9a-f]{3,8})$/,Lr=new RegExp(`^rgb\\(${He},${He},${He}\\)$`),Dr=new RegExp(`^rgb\\(${ve},${ve},${ve}\\)$`),Ur=new RegExp(`^rgba\\(${He},${He},${He},${Ze}\\)$`),Xr=new RegExp(`^rgba\\(${ve},${ve},${ve},${Ze}\\)$`),Yr=new RegExp(`^hsl\\(${Ze},${ve},${ve}\\)$`),qr=new RegExp(`^hsla\\(${Ze},${ve},${ve},${Ze}\\)$`),vn={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};tn(it,Qe,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:gn,formatHex:gn,formatHex8:Wr,formatHsl:Gr,formatRgb:yn,toString:yn});function gn(){return this.rgb().formatHex()}function Wr(){return this.rgb().formatHex8()}function Gr(){return vi(this).formatHsl()}function yn(){return this.rgb().formatRgb()}function Qe(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=jr.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?pn(t):n===3?new le(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?rt(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?rt(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=Lr.exec(e))?new le(t[1],t[2],t[3],1):(t=Dr.exec(e))?new le(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Ur.exec(e))?rt(t[1],t[2],t[3],t[4]):(t=Xr.exec(e))?rt(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Yr.exec(e))?kn(t[1],t[2]/100,t[3]/100,1):(t=qr.exec(e))?kn(t[1],t[2]/100,t[3]/100,t[4]):vn.hasOwnProperty(e)?pn(vn[e]):e==="transparent"?new le(NaN,NaN,NaN,0):null}function pn(e){return new le(e>>16&255,e>>8&255,e&255,1)}function rt(e,t,n,i){return i<=0&&(e=t=n=NaN),new le(e,t,n,i)}function Kr(e){return e instanceof it||(e=Qe(e)),e?(e=e.rgb(),new le(e.r,e.g,e.b,e.opacity)):new le}function Ut(e,t,n,i){return arguments.length===1?Kr(e):new le(e,t,n,i??1)}function le(e,t,n,i){this.r=+e,this.g=+t,this.b=+n,this.opacity=+i}tn(le,Ut,mi(it,{brighter(e){return e=e==null?bt:Math.pow(bt,e),new le(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Je:Math.pow(Je,e),new le(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new le(Re(this.r),Re(this.g),Re(this.b),kt(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:wn,formatHex:wn,formatHex8:Jr,formatRgb:bn,toString:bn}));function wn(){return`#${Oe(this.r)}${Oe(this.g)}${Oe(this.b)}`}function Jr(){return`#${Oe(this.r)}${Oe(this.g)}${Oe(this.b)}${Oe((isNaN(this.opacity)?1:this.opacity)*255)}`}function bn(){const e=kt(this.opacity);return`${e===1?"rgb(":"rgba("}${Re(this.r)}, ${Re(this.g)}, ${Re(this.b)}${e===1?")":`, ${e})`}`}function kt(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Re(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Oe(e){return e=Re(e),(e<16?"0":"")+e.toString(16)}function kn(e,t,n,i){return i<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new fe(e,t,n,i)}function vi(e){if(e instanceof fe)return new fe(e.h,e.s,e.l,e.opacity);if(e instanceof it||(e=Qe(e)),!e)return new fe;if(e instanceof fe)return e;e=e.rgb();var t=e.r/255,n=e.g/255,i=e.b/255,o=Math.min(t,n,i),r=Math.max(t,n,i),a=NaN,s=r-o,u=(r+o)/2;return s?(t===r?a=(n-i)/s+(n<i)*6:n===r?a=(i-t)/s+2:a=(t-n)/s+4,s/=u<.5?r+o:2-r-o,a*=60):s=u>0&&u<1?0:a,new fe(a,s,u,e.opacity)}function Zr(e,t,n,i){return arguments.length===1?vi(e):new fe(e,t,n,i??1)}function fe(e,t,n,i){this.h=+e,this.s=+t,this.l=+n,this.opacity=+i}tn(fe,Zr,mi(it,{brighter(e){return e=e==null?bt:Math.pow(bt,e),new fe(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Je:Math.pow(Je,e),new fe(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,i=n+(n<.5?n:1-n)*t,o=2*n-i;return new le(Bt(e>=240?e-240:e+120,o,i),Bt(e,o,i),Bt(e<120?e+240:e-120,o,i),this.opacity)},clamp(){return new fe(xn(this.h),st(this.s),st(this.l),kt(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(){const e=kt(this.opacity);return`${e===1?"hsl(":"hsla("}${xn(this.h)}, ${st(this.s)*100}%, ${st(this.l)*100}%${e===1?")":`, ${e})`}`}}));function xn(e){return e=(e||0)%360,e<0?e+360:e}function st(e){return Math.max(0,Math.min(1,e||0))}function Bt(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const gi=e=>()=>e;function Qr(e,t){return function(n){return e+n*t}}function _r(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(i){return Math.pow(e+i*t,n)}}function es(e){return(e=+e)==1?yi:function(t,n){return n-t?_r(t,n,e):gi(isNaN(t)?n:t)}}function yi(e,t){var n=t-e;return n?Qr(e,n):gi(isNaN(e)?t:e)}const In=(function e(t){var n=es(t);function i(o,r){var a=n((o=Ut(o)).r,(r=Ut(r)).r),s=n(o.g,r.g),u=n(o.b,r.b),d=yi(o.opacity,r.opacity);return function(l){return o.r=a(l),o.g=s(l),o.b=u(l),o.opacity=d(l),o+""}}return i.gamma=e,i})(1);function $e(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}var Xt=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Pt=new RegExp(Xt.source,"g");function ts(e){return function(){return e}}function ns(e){return function(t){return e(t)+""}}function is(e,t){var n=Xt.lastIndex=Pt.lastIndex=0,i,o,r,a=-1,s=[],u=[];for(e=e+"",t=t+"";(i=Xt.exec(e))&&(o=Pt.exec(t));)(r=o.index)>n&&(r=t.slice(n,r),s[a]?s[a]+=r:s[++a]=r),(i=i[0])===(o=o[0])?s[a]?s[a]+=o:s[++a]=o:(s[++a]=null,u.push({i:a,x:$e(i,o)})),n=Pt.lastIndex;return n<t.length&&(r=t.slice(n),s[a]?s[a]+=r:s[++a]=r),s.length<2?u[0]?ns(u[0].x):ts(t):(t=u.length,function(d){for(var l=0,c;l<t;++l)s[(c=u[l]).i]=c.x(d);return s.join("")})}var Sn=180/Math.PI,Yt={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function pi(e,t,n,i,o,r){var a,s,u;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(u=e*n+t*i)&&(n-=e*u,i-=t*u),(s=Math.sqrt(n*n+i*i))&&(n/=s,i/=s,u/=s),e*i<t*n&&(e=-e,t=-t,u=-u,a=-a),{translateX:o,translateY:r,rotate:Math.atan2(t,e)*Sn,skewX:Math.atan(u)*Sn,scaleX:a,scaleY:s}}var lt;function os(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Yt:pi(t.a,t.b,t.c,t.d,t.e,t.f)}function as(e){return e==null||(lt||(lt=document.createElementNS("http://www.w3.org/2000/svg","g")),lt.setAttribute("transform",e),!(e=lt.transform.baseVal.consolidate()))?Yt:(e=e.matrix,pi(e.a,e.b,e.c,e.d,e.e,e.f))}function wi(e,t,n,i){function o(d){return d.length?d.pop()+" ":""}function r(d,l,c,v,h,b){if(d!==c||l!==v){var V=h.push("translate(",null,t,null,n);b.push({i:V-4,x:$e(d,c)},{i:V-2,x:$e(l,v)})}else(c||v)&&h.push("translate("+c+t+v+n)}function a(d,l,c,v){d!==l?(d-l>180?l+=360:l-d>180&&(d+=360),v.push({i:c.push(o(c)+"rotate(",null,i)-2,x:$e(d,l)})):l&&c.push(o(c)+"rotate("+l+i)}function s(d,l,c,v){d!==l?v.push({i:c.push(o(c)+"skewX(",null,i)-2,x:$e(d,l)}):l&&c.push(o(c)+"skewX("+l+i)}function u(d,l,c,v,h,b){if(d!==c||l!==v){var V=h.push(o(h)+"scale(",null,",",null,")");b.push({i:V-4,x:$e(d,c)},{i:V-2,x:$e(l,v)})}else(c!==1||v!==1)&&h.push(o(h)+"scale("+c+","+v+")")}return function(d,l){var c=[],v=[];return d=e(d),l=e(l),r(d.translateX,d.translateY,l.translateX,l.translateY,c,v),a(d.rotate,l.rotate,c,v),s(d.skewX,l.skewX,c,v),u(d.scaleX,d.scaleY,l.scaleX,l.scaleY,c,v),d=l=null,function(h){for(var b=-1,V=v.length,P;++b<V;)c[(P=v[b]).i]=P.x(h);return c.join("")}}}var rs=wi(os,"px, ","px)","deg)"),ss=wi(as,", ",")",")"),ls=1e-12;function $n(e){return((e=Math.exp(e))+1/e)/2}function us(e){return((e=Math.exp(e))-1/e)/2}function cs(e){return((e=Math.exp(2*e))-1)/(e+1)}const ds=(function e(t,n,i){function o(r,a){var s=r[0],u=r[1],d=r[2],l=a[0],c=a[1],v=a[2],h=l-s,b=c-u,V=h*h+b*b,P,A;if(V<ls)A=Math.log(v/d)/t,P=function(U){return[s+U*h,u+U*b,d*Math.exp(t*U*A)]};else{var M=Math.sqrt(V),$=(v*v-d*d+i*V)/(2*d*n*M),E=(v*v-d*d-i*V)/(2*v*n*M),j=Math.log(Math.sqrt($*$+1)-$),B=Math.log(Math.sqrt(E*E+1)-E);A=(B-j)/t,P=function(U){var W=U*A,H=$n(j),F=d/(n*M)*(H*cs(t*W+j)-us(j));return[s+F*h,u+F*b,d*H/$n(t*W+j)]}}return P.duration=A*1e3*t/Math.SQRT2,P}return o.rho=function(r){var a=Math.max(.001,+r),s=a*a,u=s*s;return e(a,s,u)},o})(Math.SQRT2,2,4);var je=0,Xe=0,De=0,bi=1e3,xt,Ye,It=0,ze=0,Nt=0,_e=typeof performance=="object"&&performance.now?performance:Date,ki=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function nn(){return ze||(ki(fs),ze=_e.now()+Nt)}function fs(){ze=0}function St(){this._call=this._time=this._next=null}St.prototype=xi.prototype={constructor:St,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?nn():+n)+(t==null?0:+t),!this._next&&Ye!==this&&(Ye?Ye._next=this:xt=this,Ye=this),this._call=e,this._time=n,qt()},stop:function(){this._call&&(this._call=null,this._time=1/0,qt())}};function xi(e,t,n){var i=new St;return i.restart(e,t,n),i}function hs(){nn(),++je;for(var e=xt,t;e;)(t=ze-e._time)>=0&&e._call.call(void 0,t),e=e._next;--je}function Cn(){ze=(It=_e.now())+Nt,je=Xe=0;try{hs()}finally{je=0,vs(),ze=0}}function ms(){var e=_e.now(),t=e-It;t>bi&&(Nt-=t,It=e)}function vs(){for(var e,t=xt,n,i=1/0;t;)t._call?(i>t._time&&(i=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:xt=n);Ye=e,qt(i)}function qt(e){if(!je){Xe&&(Xe=clearTimeout(Xe));var t=e-ze;t>24?(e<1/0&&(Xe=setTimeout(Cn,e-_e.now()-Nt)),De&&(De=clearInterval(De))):(De||(It=_e.now(),De=setInterval(ms,bi)),je=1,ki(Cn))}}function Vn(e,t,n){var i=new St;return t=t==null?0:+t,i.restart(o=>{i.stop(),e(o+t)},t,n),i}var gs=Qt("start","end","cancel","interrupt"),ys=[],Ii=0,En=1,Wt=2,ht=3,An=4,Gt=5,mt=6;function Ot(e,t,n,i,o,r){var a=e.__transition;if(!a)e.__transition={};else if(n in a)return;ps(e,n,{name:t,index:i,group:o,on:gs,tween:ys,time:r.time,delay:r.delay,duration:r.duration,ease:r.ease,timer:null,state:Ii})}function on(e,t){var n=me(e,t);if(n.state>Ii)throw new Error("too late; already scheduled");return n}function ge(e,t){var n=me(e,t);if(n.state>ht)throw new Error("too late; already running");return n}function me(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function ps(e,t,n){var i=e.__transition,o;i[t]=n,n.timer=xi(r,0,n.time);function r(d){n.state=En,n.timer.restart(a,n.delay,n.time),n.delay<=d&&a(d-n.delay)}function a(d){var l,c,v,h;if(n.state!==En)return u();for(l in i)if(h=i[l],h.name===n.name){if(h.state===ht)return Vn(a);h.state===An?(h.state=mt,h.timer.stop(),h.on.call("interrupt",e,e.__data__,h.index,h.group),delete i[l]):+l<t&&(h.state=mt,h.timer.stop(),h.on.call("cancel",e,e.__data__,h.index,h.group),delete i[l])}if(Vn(function(){n.state===ht&&(n.state=An,n.timer.restart(s,n.delay,n.time),s(d))}),n.state=Wt,n.on.call("start",e,e.__data__,n.index,n.group),n.state===Wt){for(n.state=ht,o=new Array(v=n.tween.length),l=0,c=-1;l<v;++l)(h=n.tween[l].value.call(e,e.__data__,n.index,n.group))&&(o[++c]=h);o.length=c+1}}function s(d){for(var l=d<n.duration?n.ease.call(null,d/n.duration):(n.timer.restart(u),n.state=Gt,1),c=-1,v=o.length;++c<v;)o[c].call(e,l);n.state===Gt&&(n.on.call("end",e,e.__data__,n.index,n.group),u())}function u(){n.state=mt,n.timer.stop(),delete i[t];for(var d in i)return;delete e.__transition}}function vt(e,t){var n=e.__transition,i,o,r=!0,a;if(n){t=t==null?null:t+"";for(a in n){if((i=n[a]).name!==t){r=!1;continue}o=i.state>Wt&&i.state<Gt,i.state=mt,i.timer.stop(),i.on.call(o?"interrupt":"cancel",e,e.__data__,i.index,i.group),delete n[a]}r&&delete e.__transition}}function ws(e){return this.each(function(){vt(this,e)})}function bs(e,t){var n,i;return function(){var o=ge(this,e),r=o.tween;if(r!==n){i=n=r;for(var a=0,s=i.length;a<s;++a)if(i[a].name===t){i=i.slice(),i.splice(a,1);break}}o.tween=i}}function ks(e,t,n){var i,o;if(typeof n!="function")throw new Error;return function(){var r=ge(this,e),a=r.tween;if(a!==i){o=(i=a).slice();for(var s={name:t,value:n},u=0,d=o.length;u<d;++u)if(o[u].name===t){o[u]=s;break}u===d&&o.push(s)}r.tween=o}}function xs(e,t){var n=this._id;if(e+="",arguments.length<2){for(var i=me(this.node(),n).tween,o=0,r=i.length,a;o<r;++o)if((a=i[o]).name===e)return a.value;return null}return this.each((t==null?bs:ks)(n,e,t))}function an(e,t,n){var i=e._id;return e.each(function(){var o=ge(this,i);(o.value||(o.value={}))[t]=n.apply(this,arguments)}),function(o){return me(o,i).value[t]}}function Si(e,t){var n;return(typeof t=="number"?$e:t instanceof Qe?In:(n=Qe(t))?(t=n,In):is)(e,t)}function Is(e){return function(){this.removeAttribute(e)}}function Ss(e){return function(){this.removeAttributeNS(e.space,e.local)}}function $s(e,t,n){var i,o=n+"",r;return function(){var a=this.getAttribute(e);return a===o?null:a===i?r:r=t(i=a,n)}}function Cs(e,t,n){var i,o=n+"",r;return function(){var a=this.getAttributeNS(e.space,e.local);return a===o?null:a===i?r:r=t(i=a,n)}}function Vs(e,t,n){var i,o,r;return function(){var a,s=n(this),u;return s==null?void this.removeAttribute(e):(a=this.getAttribute(e),u=s+"",a===u?null:a===i&&u===o?r:(o=u,r=t(i=a,s)))}}function Es(e,t,n){var i,o,r;return function(){var a,s=n(this),u;return s==null?void this.removeAttributeNS(e.space,e.local):(a=this.getAttributeNS(e.space,e.local),u=s+"",a===u?null:a===i&&u===o?r:(o=u,r=t(i=a,s)))}}function As(e,t){var n=Mt(e),i=n==="transform"?ss:Si;return this.attrTween(e,typeof t=="function"?(n.local?Es:Vs)(n,i,an(this,"attr."+e,t)):t==null?(n.local?Ss:Is)(n):(n.local?Cs:$s)(n,i,t))}function Ms(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function Ns(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function Os(e,t){var n,i;function o(){var r=t.apply(this,arguments);return r!==i&&(n=(i=r)&&Ns(e,r)),n}return o._value=t,o}function Ts(e,t){var n,i;function o(){var r=t.apply(this,arguments);return r!==i&&(n=(i=r)&&Ms(e,r)),n}return o._value=t,o}function Rs(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 new Error;var i=Mt(e);return this.tween(n,(i.local?Os:Ts)(i,t))}function zs(e,t){return function(){on(this,e).delay=+t.apply(this,arguments)}}function Bs(e,t){return t=+t,function(){on(this,e).delay=t}}function Ps(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?zs:Bs)(t,e)):me(this.node(),t).delay}function Hs(e,t){return function(){ge(this,e).duration=+t.apply(this,arguments)}}function Fs(e,t){return t=+t,function(){ge(this,e).duration=t}}function js(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Hs:Fs)(t,e)):me(this.node(),t).duration}function Ls(e,t){if(typeof t!="function")throw new Error;return function(){ge(this,e).ease=t}}function Ds(e){var t=this._id;return arguments.length?this.each(Ls(t,e)):me(this.node(),t).ease}function Us(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;ge(this,e).ease=n}}function Xs(e){if(typeof e!="function")throw new Error;return this.each(Us(this._id,e))}function Ys(e){typeof e!="function"&&(e=oi(e));for(var t=this._groups,n=t.length,i=new Array(n),o=0;o<n;++o)for(var r=t[o],a=r.length,s=i[o]=[],u,d=0;d<a;++d)(u=r[d])&&e.call(u,u.__data__,d,r)&&s.push(u);return new xe(i,this._parents,this._name,this._id)}function qs(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,i=t.length,o=n.length,r=Math.min(i,o),a=new Array(i),s=0;s<r;++s)for(var u=t[s],d=n[s],l=u.length,c=a[s]=new Array(l),v,h=0;h<l;++h)(v=u[h]||d[h])&&(c[h]=v);for(;s<i;++s)a[s]=t[s];return new xe(a,this._parents,this._name,this._id)}function Ws(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function Gs(e,t,n){var i,o,r=Ws(t)?on:ge;return function(){var a=r(this,e),s=a.on;s!==i&&(o=(i=s).copy()).on(t,n),a.on=o}}function Ks(e,t){var n=this._id;return arguments.length<2?me(this.node(),n).on.on(e):this.each(Gs(n,e,t))}function Js(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function Zs(){return this.on("end.remove",Js(this._id))}function Qs(e){var t=this._name,n=this._id;typeof e!="function"&&(e=_t(e));for(var i=this._groups,o=i.length,r=new Array(o),a=0;a<o;++a)for(var s=i[a],u=s.length,d=r[a]=new Array(u),l,c,v=0;v<u;++v)(l=s[v])&&(c=e.call(l,l.__data__,v,s))&&("__data__"in l&&(c.__data__=l.__data__),d[v]=c,Ot(d[v],t,n,v,d,me(l,n)));return new xe(r,this._parents,t,n)}function _s(e){var t=this._name,n=this._id;typeof e!="function"&&(e=ii(e));for(var i=this._groups,o=i.length,r=[],a=[],s=0;s<o;++s)for(var u=i[s],d=u.length,l,c=0;c<d;++c)if(l=u[c]){for(var v=e.call(l,l.__data__,c,u),h,b=me(l,n),V=0,P=v.length;V<P;++V)(h=v[V])&&Ot(h,t,n,V,v,b);r.push(v),a.push(l)}return new xe(r,a,t,n)}var el=nt.prototype.constructor;function tl(){return new el(this._groups,this._parents)}function nl(e,t){var n,i,o;return function(){var r=Fe(this,e),a=(this.style.removeProperty(e),Fe(this,e));return r===a?null:r===n&&a===i?o:o=t(n=r,i=a)}}function $i(e){return function(){this.style.removeProperty(e)}}function il(e,t,n){var i,o=n+"",r;return function(){var a=Fe(this,e);return a===o?null:a===i?r:r=t(i=a,n)}}function ol(e,t,n){var i,o,r;return function(){var a=Fe(this,e),s=n(this),u=s+"";return s==null&&(u=s=(this.style.removeProperty(e),Fe(this,e))),a===u?null:a===i&&u===o?r:(o=u,r=t(i=a,s))}}function al(e,t){var n,i,o,r="style."+t,a="end."+r,s;return function(){var u=ge(this,e),d=u.on,l=u.value[r]==null?s||(s=$i(t)):void 0;(d!==n||o!==l)&&(i=(n=d).copy()).on(a,o=l),u.on=i}}function rl(e,t,n){var i=(e+="")=="transform"?rs:Si;return t==null?this.styleTween(e,nl(e,i)).on("end.style."+e,$i(e)):typeof t=="function"?this.styleTween(e,ol(e,i,an(this,"style."+e,t))).each(al(this._id,e)):this.styleTween(e,il(e,i,t),n).on("end.style."+e,null)}function sl(e,t,n){return function(i){this.style.setProperty(e,t.call(this,i),n)}}function ll(e,t,n){var i,o;function r(){var a=t.apply(this,arguments);return a!==o&&(i=(o=a)&&sl(e,a,n)),i}return r._value=t,r}function ul(e,t,n){var i="style."+(e+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(t==null)return this.tween(i,null);if(typeof t!="function")throw new Error;return this.tween(i,ll(e,t,n??""))}function cl(e){return function(){this.textContent=e}}function dl(e){return function(){var t=e(this);this.textContent=t??""}}function fl(e){return this.tween("text",typeof e=="function"?dl(an(this,"text",e)):cl(e==null?"":e+""))}function hl(e){return function(t){this.textContent=e.call(this,t)}}function ml(e){var t,n;function i(){var o=e.apply(this,arguments);return o!==n&&(t=(n=o)&&hl(o)),t}return i._value=e,i}function vl(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 new Error;return this.tween(t,ml(e))}function gl(){for(var e=this._name,t=this._id,n=Ci(),i=this._groups,o=i.length,r=0;r<o;++r)for(var a=i[r],s=a.length,u,d=0;d<s;++d)if(u=a[d]){var l=me(u,t);Ot(u,e,n,d,a,{time:l.time+l.delay+l.duration,delay:0,duration:l.duration,ease:l.ease})}return new xe(i,this._parents,e,n)}function yl(){var e,t,n=this,i=n._id,o=n.size();return new Promise(function(r,a){var s={value:a},u={value:function(){--o===0&&r()}};n.each(function(){var d=ge(this,i),l=d.on;l!==e&&(t=(e=l).copy(),t._.cancel.push(s),t._.interrupt.push(s),t._.end.push(u)),d.on=t}),o===0&&r()})}var pl=0;function xe(e,t,n,i){this._groups=e,this._parents=t,this._name=n,this._id=i}function Ci(){return++pl}var ye=nt.prototype;xe.prototype={constructor:xe,select:Qs,selectAll:_s,selectChild:ye.selectChild,selectChildren:ye.selectChildren,filter:Ys,merge:qs,selection:tl,transition:gl,call:ye.call,nodes:ye.nodes,node:ye.node,size:ye.size,empty:ye.empty,each:ye.each,on:Ks,attr:As,attrTween:Rs,style:rl,styleTween:ul,text:fl,textTween:vl,remove:Zs,tween:xs,delay:Ps,duration:js,ease:Ds,easeVarying:Xs,end:yl,[Symbol.iterator]:ye[Symbol.iterator]};function wl(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var bl={time:null,delay:0,duration:250,ease:wl};function kl(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function xl(e){var t,n;e instanceof xe?(t=e._id,e=e._name):(t=Ci(),(n=bl).time=nn(),e=e==null?null:e+"");for(var i=this._groups,o=i.length,r=0;r<o;++r)for(var a=i[r],s=a.length,u,d=0;d<s;++d)(u=a[d])&&Ot(u,e,t,d,a,n||kl(u,t));return new xe(i,this._parents,e,t)}nt.prototype.interrupt=ws;nt.prototype.transition=xl;const ut=e=>()=>e;function Il(e,{sourceEvent:t,target:n,transform:i,dispatch:o}){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:i,enumerable:!0,configurable:!0},_:{value:o}})}function be(e,t,n){this.k=e,this.x=t,this.y=n}be.prototype={constructor:be,scale:function(e){return e===1?this:new be(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new be(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 rn=new be(1,0,0);be.prototype;function Ht(e){e.stopImmediatePropagation()}function Ue(e){e.preventDefault(),e.stopImmediatePropagation()}function Sl(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function $l(){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 Mn(){return this.__zoom||rn}function Cl(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function Vl(){return navigator.maxTouchPoints||"ontouchstart"in this}function El(e,t,n){var i=e.invertX(t[0][0])-n[0][0],o=e.invertX(t[1][0])-n[1][0],r=e.invertY(t[0][1])-n[0][1],a=e.invertY(t[1][1])-n[1][1];return e.translate(o>i?(i+o)/2:Math.min(0,i)||Math.max(0,o),a>r?(r+a)/2:Math.min(0,r)||Math.max(0,a))}function Al(){var e=Sl,t=$l,n=El,i=Cl,o=Vl,r=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],s=250,u=ds,d=Qt("start","zoom","end"),l,c,v,h=500,b=150,V=0,P=10;function A(g){g.property("__zoom",Mn).on("wheel.zoom",W,{passive:!1}).on("mousedown.zoom",H).on("dblclick.zoom",F).filter(o).on("touchstart.zoom",ce).on("touchmove.zoom",te).on("touchend.zoom touchcancel.zoom",oe).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}A.transform=function(g,T,k,R){var I=g.selection?g.selection():g;I.property("__zoom",Mn),g!==I?j(g,T,k,R):I.interrupt().each(function(){B(this,arguments).event(R).start().zoom(null,typeof T=="function"?T.apply(this,arguments):T).end()})},A.scaleBy=function(g,T,k,R){A.scaleTo(g,function(){var I=this.__zoom.k,y=typeof T=="function"?T.apply(this,arguments):T;return I*y},k,R)},A.scaleTo=function(g,T,k,R){A.transform(g,function(){var I=t.apply(this,arguments),y=this.__zoom,p=k==null?E(I):typeof k=="function"?k.apply(this,arguments):k,N=y.invert(p),D=typeof T=="function"?T.apply(this,arguments):T;return n($(M(y,D),p,N),I,a)},k,R)},A.translateBy=function(g,T,k,R){A.transform(g,function(){return n(this.__zoom.translate(typeof T=="function"?T.apply(this,arguments):T,typeof k=="function"?k.apply(this,arguments):k),t.apply(this,arguments),a)},null,R)},A.translateTo=function(g,T,k,R,I){A.transform(g,function(){var y=t.apply(this,arguments),p=this.__zoom,N=R==null?E(y):typeof R=="function"?R.apply(this,arguments):R;return n(rn.translate(N[0],N[1]).scale(p.k).translate(typeof T=="function"?-T.apply(this,arguments):-T,typeof k=="function"?-k.apply(this,arguments):-k),y,a)},R,I)};function M(g,T){return T=Math.max(r[0],Math.min(r[1],T)),T===g.k?g:new be(T,g.x,g.y)}function $(g,T,k){var R=T[0]-k[0]*g.k,I=T[1]-k[1]*g.k;return R===g.x&&I===g.y?g:new be(g.k,R,I)}function E(g){return[(+g[0][0]+ +g[1][0])/2,(+g[0][1]+ +g[1][1])/2]}function j(g,T,k,R){g.on("start.zoom",function(){B(this,arguments).event(R).start()}).on("interrupt.zoom end.zoom",function(){B(this,arguments).event(R).end()}).tween("zoom",function(){var I=this,y=arguments,p=B(I,y).event(R),N=t.apply(I,y),D=k==null?E(N):typeof k=="function"?k.apply(I,y):k,Y=Math.max(N[1][0]-N[0][0],N[1][1]-N[0][1]),q=I.__zoom,J=typeof T=="function"?T.apply(I,y):T,_=u(q.invert(D).concat(Y/q.k),J.invert(D).concat(Y/J.k));return function(ne){if(ne===1)ne=J;else{var de=_(ne),Tt=Y/de[2];ne=new be(Tt,D[0]-de[0]*Tt,D[1]-de[1]*Tt)}p.zoom(null,ne)}})}function B(g,T,k){return!k&&g.__zooming||new U(g,T)}function U(g,T){this.that=g,this.args=T,this.active=0,this.sourceEvent=null,this.extent=t.apply(g,T),this.taps=0}U.prototype={event:function(g){return g&&(this.sourceEvent=g),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(g,T){return this.mouse&&g!=="mouse"&&(this.mouse[1]=T.invert(this.mouse[0])),this.touch0&&g!=="touch"&&(this.touch0[1]=T.invert(this.touch0[0])),this.touch1&&g!=="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(g){var T=Ce(this.that).datum();d.call(g,this.that,new Il(g,{sourceEvent:this.sourceEvent,target:A,transform:this.that.__zoom,dispatch:d}),T)}};function W(g,...T){if(!e.apply(this,arguments))return;var k=B(this,T).event(g),R=this.__zoom,I=Math.max(r[0],Math.min(r[1],R.k*Math.pow(2,i.apply(this,arguments)))),y=Se(g);if(k.wheel)(k.mouse[0][0]!==y[0]||k.mouse[0][1]!==y[1])&&(k.mouse[1]=R.invert(k.mouse[0]=y)),clearTimeout(k.wheel);else{if(R.k===I)return;k.mouse=[y,R.invert(y)],vt(this),k.start()}Ue(g),k.wheel=setTimeout(p,b),k.zoom("mouse",n($(M(R,I),k.mouse[0],k.mouse[1]),k.extent,a));function p(){k.wheel=null,k.end()}}function H(g,...T){if(v||!e.apply(this,arguments))return;var k=g.currentTarget,R=B(this,T,!0).event(g),I=Ce(g.view).on("mousemove.zoom",D,!0).on("mouseup.zoom",Y,!0),y=Se(g,k),p=g.clientX,N=g.clientY;Hr(g.view),Ht(g),R.mouse=[y,this.__zoom.invert(y)],vt(this),R.start();function D(q){if(Ue(q),!R.moved){var J=q.clientX-p,_=q.clientY-N;R.moved=J*J+_*_>V}R.event(q).zoom("mouse",n($(R.that.__zoom,R.mouse[0]=Se(q,k),R.mouse[1]),R.extent,a))}function Y(q){I.on("mousemove.zoom mouseup.zoom",null),Fr(q.view,R.moved),Ue(q),R.event(q).end()}}function F(g,...T){if(e.apply(this,arguments)){var k=this.__zoom,R=Se(g.changedTouches?g.changedTouches[0]:g,this),I=k.invert(R),y=k.k*(g.shiftKey?.5:2),p=n($(M(k,y),R,I),t.apply(this,T),a);Ue(g),s>0?Ce(this).transition().duration(s).call(j,p,R,g):Ce(this).call(A.transform,p,R,g)}}function ce(g,...T){if(e.apply(this,arguments)){var k=g.touches,R=k.length,I=B(this,T,g.changedTouches.length===R).event(g),y,p,N,D;for(Ht(g),p=0;p<R;++p)N=k[p],D=Se(N,this),D=[D,this.__zoom.invert(D),N.identifier],I.touch0?!I.touch1&&I.touch0[2]!==D[2]&&(I.touch1=D,I.taps=0):(I.touch0=D,y=!0,I.taps=1+!!l);l&&(l=clearTimeout(l)),y&&(I.taps<2&&(c=D[0],l=setTimeout(function(){l=null},h)),vt(this),I.start())}}function te(g,...T){if(this.__zooming){var k=B(this,T).event(g),R=g.changedTouches,I=R.length,y,p,N,D;for(Ue(g),y=0;y<I;++y)p=R[y],N=Se(p,this),k.touch0&&k.touch0[2]===p.identifier?k.touch0[0]=N:k.touch1&&k.touch1[2]===p.identifier&&(k.touch1[0]=N);if(p=k.that.__zoom,k.touch1){var Y=k.touch0[0],q=k.touch0[1],J=k.touch1[0],_=k.touch1[1],ne=(ne=J[0]-Y[0])*ne+(ne=J[1]-Y[1])*ne,de=(de=_[0]-q[0])*de+(de=_[1]-q[1])*de;p=M(p,Math.sqrt(ne/de)),N=[(Y[0]+J[0])/2,(Y[1]+J[1])/2],D=[(q[0]+_[0])/2,(q[1]+_[1])/2]}else if(k.touch0)N=k.touch0[0],D=k.touch0[1];else return;k.zoom("touch",n($(p,N,D),k.extent,a))}}function oe(g,...T){if(this.__zooming){var k=B(this,T).event(g),R=g.changedTouches,I=R.length,y,p;for(Ht(g),v&&clearTimeout(v),v=setTimeout(function(){v=null},h),y=0;y<I;++y)p=R[y],k.touch0&&k.touch0[2]===p.identifier?delete k.touch0:k.touch1&&k.touch1[2]===p.identifier&&delete k.touch1;if(k.touch1&&!k.touch0&&(k.touch0=k.touch1,delete k.touch1),k.touch0)k.touch0[1]=this.__zoom.invert(k.touch0[0]);else if(k.end(),k.taps===2&&(p=Se(p,this),Math.hypot(c[0]-p[0],c[1]-p[1])<P)){var N=Ce(this).on("dblclick.zoom");N&&N.apply(this,arguments)}}}return A.wheelDelta=function(g){return arguments.length?(i=typeof g=="function"?g:ut(+g),A):i},A.filter=function(g){return arguments.length?(e=typeof g=="function"?g:ut(!!g),A):e},A.touchable=function(g){return arguments.length?(o=typeof g=="function"?g:ut(!!g),A):o},A.extent=function(g){return arguments.length?(t=typeof g=="function"?g:ut([[+g[0][0],+g[0][1]],[+g[1][0],+g[1][1]]]),A):t},A.scaleExtent=function(g){return arguments.length?(r[0]=+g[0],r[1]=+g[1],A):[r[0],r[1]]},A.translateExtent=function(g){return arguments.length?(a[0][0]=+g[0][0],a[1][0]=+g[1][0],a[0][1]=+g[0][1],a[1][1]=+g[1][1],A):[[a[0][0],a[0][1]],[a[1][0],a[1][1]]]},A.constrain=function(g){return arguments.length?(n=g,A):n},A.duration=function(g){return arguments.length?(s=+g,A):s},A.interpolate=function(g){return arguments.length?(u=g,A):u},A.on=function(){var g=d.on.apply(d,arguments);return g===d?A:g},A.clickDistance=function(g){return arguments.length?(V=(g=+g)*g,A):Math.sqrt(V)},A.tapDistance=function(g){return arguments.length?(P=+g,A):P},A}const Vi=Symbol("MiniMapSlots"),Ml=["id","x","y","rx","ry","width","height","fill","stroke","stroke-width","shape-rendering"],Nl={name:"MiniMapNode",compatConfig:{MODE:3},inheritAttrs:!1},Ol=K({...Nl,props:{id:{},type:{},selected:{type:Boolean},dragging:{type:Boolean},position:{},dimensions:{},borderRadius:{},color:{},shapeRendering:{},strokeColor:{},strokeWidth:{},hidden:{type:Boolean}},emits:["click","dblclick","mouseenter","mousemove","mouseleave"],setup(e,{emit:t}){const n=e,i=oo(Vi),o=Dn(),r=We(()=>o.style??{});function a(c){t("click",c)}function s(c){t("dblclick",c)}function u(c){t("mouseenter",c)}function d(c){t("mousemove",c)}function l(c){t("mouseleave",c)}return(c,v)=>!c.hidden&&c.dimensions.width!==0&&c.dimensions.height!==0?(m(),O(X,{key:0},[f(i)[`node-${n.type}`]?(m(),C(ao(f(i)[`node-${n.type}`]),Ve(Ee({key:0},{...n,...c.$attrs})),null,16)):(m(),O("rect",Ee({key:1,id:c.id},c.$attrs,{class:["vue-flow__minimap-node",{selected:c.selected,dragging:c.dragging}],x:c.position.x,y:c.position.y,rx:c.borderRadius,ry:c.borderRadius,width:c.dimensions.width,height:c.dimensions.height,fill:c.color||r.value.background||r.value.backgroundColor,stroke:c.strokeColor,"stroke-width":c.strokeWidth,"shape-rendering":c.shapeRendering,onClick:a,onDblclick:s,onMouseenter:u,onMousemove:d,onMouseleave:l}),null,16,Ml))],64)):z("",!0)}}),Tl=["width","height","viewBox","aria-labelledby"],Rl=["id"],zl=["d","fill","stroke","stroke-width"],Bl={name:"MiniMap",compatConfig:{MODE:3}},Pl=K({...Bl,props:{nodeColor:{type:[String,Function],default:"#e2e2e2"},nodeStrokeColor:{type:[String,Function],default:"transparent"},nodeClassName:{type:[String,Function]},nodeBorderRadius:{default:5},nodeStrokeWidth:{default:2},maskColor:{default:"rgb(240, 240, 240, 0.6)"},maskStrokeColor:{default:"none"},maskStrokeWidth:{default:1},position:{default:"bottom-right"},pannable:{type:Boolean,default:!1},zoomable:{type:Boolean,default:!1},width:{},height:{},ariaLabel:{default:"Vue Flow mini map"},inversePan:{type:Boolean,default:!1},zoomStep:{default:1},offsetScale:{default:5},maskBorderRadius:{default:0}},emits:["click","nodeClick","nodeDblclick","nodeMouseenter","nodeMousemove","nodeMouseleave"],setup(e,{emit:t}){const n=no(),i=Dn(),o=200,r=150,{id:a,edges:s,viewport:u,translateExtent:d,dimensions:l,emits:c,d3Selection:v,d3Zoom:h,getNodesInitialized:b}=Ct(),V=ie();ro(Vi,n);const P=We(()=>{var I;return e.width??((I=i.style)==null?void 0:I.width)??o}),A=We(()=>{var I;return e.height??((I=i.style)==null?void 0:I.height)??r}),M=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision",$=S(()=>typeof e.nodeColor=="string"?()=>e.nodeColor:e.nodeColor),E=S(()=>typeof e.nodeStrokeColor=="string"?()=>e.nodeStrokeColor:e.nodeStrokeColor),j=S(()=>typeof e.nodeClassName=="string"?()=>e.nodeClassName:typeof e.nodeClassName=="function"?e.nodeClassName:()=>""),B=S(()=>Li(b.value.filter(I=>!I.hidden))),U=S(()=>({x:-u.value.x/u.value.zoom,y:-u.value.y/u.value.zoom,width:l.value.width/u.value.zoom,height:l.value.height/u.value.zoom})),W=S(()=>b.value&&b.value.length?ji(B.value,U.value):U.value),H=S(()=>{const I=W.value.width/P.value,y=W.value.height/A.value;return Math.max(I,y)}),F=S(()=>{const I=H.value*P.value,y=H.value*A.value,p=e.offsetScale*H.value;return{offset:p,x:W.value.x-(I-W.value.width)/2-p,y:W.value.y-(y-W.value.height)/2-p,width:I+p*2,height:y+p*2}}),ce=S(()=>!F.value.x||!F.value.y?"":`
|
|
2
2
|
M${F.value.x-F.value.offset},${F.value.y-F.value.offset}
|
|
3
3
|
h${F.value.width+F.value.offset*2}
|
|
4
4
|
v${F.value.height+F.value.offset*2}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{G as J,H as at}from"#entry";import{E as fn,aG as se,aU as an,V as ln,Y as un,ak as hn,_ as ie,W as dn,Z as yn,$ as gn,a0 as pn}from"./77UvFSdd.js";const yt=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;function Ue(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function W(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function lt(e,...t){if(!Ue(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error("Uint8Array expected of length "+t+", got length="+e.length)}function St(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.createHasher");W(e.outputLen),W(e.blockLen)}function vt(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function wn(e,t){lt(e);const n=t.outputLen;if(e.length<n)throw new Error("digestInto() expects output buffer of length at least "+n)}function Kt(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function dt(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function It(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function Q(e,t){return e<<32-t|e>>>t}function T(e,t){return e<<t|e>>>32-t>>>0}const xn=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function bn(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}function mn(e){for(let t=0;t<e.length;t++)e[t]=bn(e[t]);return e}const ce=xn?e=>e:mn,Ie=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",En=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function ve(e){if(lt(e),Ie)return e.toHex();let t="";for(let n=0;n<e.length;n++)t+=En[e[n]];return t}const rt={_0:48,_9:57,A:65,F:70,a:97,f:102};function fe(e){if(e>=rt._0&&e<=rt._9)return e-rt._0;if(e>=rt.A&&e<=rt.F)return e-(rt.A-10);if(e>=rt.a&&e<=rt.f)return e-(rt.a-10)}function Xt(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);if(Ie)return Uint8Array.fromHex(e);const t=e.length,n=t/2;if(t%2)throw new Error("hex string expected, got unpadded hex of length "+t);const r=new Uint8Array(n);for(let s=0,o=0;s<n;s++,o+=2){const c=fe(e.charCodeAt(o)),i=fe(e.charCodeAt(o+1));if(c===void 0||i===void 0){const f=e[o]+e[o+1];throw new Error('hex string expected, got non-hex character "'+f+'" at index '+o)}r[s]=c*16+i}return r}function _e(e){if(typeof e!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(e))}function At(e){return typeof e=="string"&&(e=_e(e)),lt(e),e}function ae(e){return typeof e=="string"&&(e=_e(e)),lt(e),e}function Le(e,t){if(t!==void 0&&{}.toString.call(t)!=="[object Object]")throw new Error("options should be object or undefined");return Object.assign(e,t)}class Se{}function An(e){const t=r=>e().update(At(r)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}function st(e=32){if(yt&&typeof yt.getRandomValues=="function")return yt.getRandomValues(new Uint8Array(e));if(yt&&typeof yt.randomBytes=="function")return Uint8Array.from(yt.randomBytes(e));throw new Error("crypto.getRandomValues must be defined")}class Ce extends Se{constructor(t,n){super(),this.finished=!1,this.destroyed=!1,St(t);const r=At(n);if(this.iHash=t.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const s=this.blockLen,o=new Uint8Array(s);o.set(r.length>s?t.create().update(r).digest():r);for(let c=0;c<o.length;c++)o[c]^=54;this.iHash.update(o),this.oHash=t.create();for(let c=0;c<o.length;c++)o[c]^=106;this.oHash.update(o),dt(o)}update(t){return vt(this),this.iHash.update(t),this}digestInto(t){vt(this),lt(t,this.outputLen),this.finished=!0,this.iHash.digestInto(t),this.oHash.update(t),this.oHash.digestInto(t),this.destroy()}digest(){const t=new Uint8Array(this.oHash.outputLen);return this.digestInto(t),t}_cloneInto(t){t||(t=Object.create(Object.getPrototypeOf(this),{}));const{oHash:n,iHash:r,finished:s,destroyed:o,blockLen:c,outputLen:i}=this;return t=t,t.finished=s,t.destroyed=o,t.blockLen=c,t.outputLen=i,t.oHash=n._cloneInto(t.oHash),t.iHash=r._cloneInto(t.iHash),t}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const mt=(e,t,n)=>new Ce(e,t).update(n).digest();mt.create=(e,t)=>new Ce(e,t);function ke(e,t,n){return St(e),n===void 0&&(n=new Uint8Array(e.outputLen)),mt(e,At(n),At(t))}const Ht=Uint8Array.from([0]),le=Uint8Array.of();function Bn(e,t,n,r=32){St(e),W(r);const s=e.outputLen;if(r>255*s)throw new Error("Length should be <= 255*HashLen");const o=Math.ceil(r/s);n===void 0&&(n=le);const c=new Uint8Array(o*s),i=mt.create(e,t),f=i._cloneInto(),l=new Uint8Array(i.outputLen);for(let u=0;u<o;u++)Ht[0]=u+1,f.update(u===0?le:l).update(n).update(Ht).digestInto(l),c.set(l,s*u),i._cloneInto(f);return i.destroy(),f.destroy(),dt(l,Ht),c.slice(0,r)}const wt=(e,t,n,r,s)=>Bn(e,ke(e,t,n),r,s);function Un(e,t,n,r){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,n,r);const s=BigInt(32),o=BigInt(4294967295),c=Number(n>>s&o),i=Number(n&o),f=r?4:0,l=r?0:4;e.setUint32(t+f,c,r),e.setUint32(t+l,i,r)}function In(e,t,n){return e&t^~e&n}function vn(e,t,n){return e&t^e&n^t&n}class _n extends Se{constructor(t,n,r,s){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=t,this.outputLen=n,this.padOffset=r,this.isLE=s,this.buffer=new Uint8Array(t),this.view=It(this.buffer)}update(t){vt(this),t=At(t),lt(t);const{view:n,buffer:r,blockLen:s}=this,o=t.length;for(let c=0;c<o;){const i=Math.min(s-this.pos,o-c);if(i===s){const f=It(t);for(;s<=o-c;c+=s)this.process(f,c);continue}r.set(t.subarray(c,c+i),this.pos),this.pos+=i,c+=i,this.pos===s&&(this.process(n,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){vt(this),wn(t,this),this.finished=!0;const{buffer:n,view:r,blockLen:s,isLE:o}=this;let{pos:c}=this;n[c++]=128,dt(this.buffer.subarray(c)),this.padOffset>s-c&&(this.process(r,0),c=0);for(let h=c;h<s;h++)n[h]=0;Un(r,s-8,BigInt(this.length*8),o),this.process(r,0);const i=It(t),f=this.outputLen;if(f%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const l=f/4,u=this.get();if(l>u.length)throw new Error("_sha2: outputLen bigger than state");for(let h=0;h<l;h++)i.setUint32(4*h,u[h],o)}digest(){const{buffer:t,outputLen:n}=this;this.digestInto(t);const r=t.slice(0,n);return this.destroy(),r}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:n,buffer:r,length:s,finished:o,destroyed:c,pos:i}=this;return t.destroyed=c,t.finished=o,t.length=s,t.pos=i,s%n&&t.buffer.set(r),t}clone(){return this._cloneInto()}}const it=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Ln=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),ct=new Uint32Array(64);class Sn extends _n{constructor(t=32){super(64,t,8,!1),this.A=it[0]|0,this.B=it[1]|0,this.C=it[2]|0,this.D=it[3]|0,this.E=it[4]|0,this.F=it[5]|0,this.G=it[6]|0,this.H=it[7]|0}get(){const{A:t,B:n,C:r,D:s,E:o,F:c,G:i,H:f}=this;return[t,n,r,s,o,c,i,f]}set(t,n,r,s,o,c,i,f){this.A=t|0,this.B=n|0,this.C=r|0,this.D=s|0,this.E=o|0,this.F=c|0,this.G=i|0,this.H=f|0}process(t,n){for(let h=0;h<16;h++,n+=4)ct[h]=t.getUint32(n,!1);for(let h=16;h<64;h++){const a=ct[h-15],d=ct[h-2],w=Q(a,7)^Q(a,18)^a>>>3,g=Q(d,17)^Q(d,19)^d>>>10;ct[h]=g+ct[h-7]+w+ct[h-16]|0}let{A:r,B:s,C:o,D:c,E:i,F:f,G:l,H:u}=this;for(let h=0;h<64;h++){const a=Q(i,6)^Q(i,11)^Q(i,25),d=u+a+In(i,f,l)+Ln[h]+ct[h]|0,g=(Q(r,2)^Q(r,13)^Q(r,22))+vn(r,s,o)|0;u=l,l=f,f=i,i=c+d|0,c=o,o=s,s=r,r=d+g|0}r=r+this.A|0,s=s+this.B|0,o=o+this.C|0,c=c+this.D|0,i=i+this.E|0,f=f+this.F|0,l=l+this.G|0,u=u+this.H|0,this.set(r,s,o,c,i,f,l,u)}roundClean(){dt(ct)}destroy(){this.set(0,0,0,0,0,0,0,0),dt(this.buffer)}}const Dt=An(()=>new Sn),ot=Dt;function Cn(e,t,n,r){St(e);const s=Le({dkLen:32,asyncTick:10},r),{c:o,dkLen:c,asyncTick:i}=s;if(W(o),W(c),W(i),o<1)throw new Error("iterations (c) should be >= 1");const f=ae(t),l=ae(n),u=new Uint8Array(c),h=mt.create(e,f),a=h._cloneInto().update(l);return{c:o,dkLen:c,asyncTick:i,DK:u,PRF:h,PRFSalt:a}}function kn(e,t,n,r,s){return e.destroy(),t.destroy(),r&&r.destroy(),dt(s),n}function Te(e,t,n,r){const{c:s,dkLen:o,DK:c,PRF:i,PRFSalt:f}=Cn(e,t,n,r);let l;const u=new Uint8Array(4),h=It(u),a=new Uint8Array(i.outputLen);for(let d=1,w=0;w<o;d++,w+=i.outputLen){const g=c.subarray(w,w+i.outputLen);h.setInt32(0,d,!1),(l=f._cloneInto(l)).update(u).digestInto(a),g.set(a.subarray(0,g.length));for(let p=1;p<s;p++){i._cloneInto(l).update(a).digestInto(a);for(let E=0;E<g.length;E++)g[E]^=a[E]}}return kn(i,f,c,l,a)}function ue(e,t,n,r,s,o){let c=e[t++]^n[r++],i=e[t++]^n[r++],f=e[t++]^n[r++],l=e[t++]^n[r++],u=e[t++]^n[r++],h=e[t++]^n[r++],a=e[t++]^n[r++],d=e[t++]^n[r++],w=e[t++]^n[r++],g=e[t++]^n[r++],p=e[t++]^n[r++],E=e[t++]^n[r++],M=e[t++]^n[r++],$=e[t++]^n[r++],O=e[t++]^n[r++],z=e[t++]^n[r++],C=c,H=i,q=f,L=l,v=u,S=h,k=a,x=d,b=w,m=g,I=p,A=E,B=M,y=$,U=O,_=z;for(let N=0;N<8;N+=2)v^=T(C+B|0,7),b^=T(v+C|0,9),B^=T(b+v|0,13),C^=T(B+b|0,18),m^=T(S+H|0,7),y^=T(m+S|0,9),H^=T(y+m|0,13),S^=T(H+y|0,18),U^=T(I+k|0,7),q^=T(U+I|0,9),k^=T(q+U|0,13),I^=T(k+q|0,18),L^=T(_+A|0,7),x^=T(L+_|0,9),A^=T(x+L|0,13),_^=T(A+x|0,18),H^=T(C+L|0,7),q^=T(H+C|0,9),L^=T(q+H|0,13),C^=T(L+q|0,18),k^=T(S+v|0,7),x^=T(k+S|0,9),v^=T(x+k|0,13),S^=T(v+x|0,18),A^=T(I+m|0,7),b^=T(A+I|0,9),m^=T(b+A|0,13),I^=T(m+b|0,18),B^=T(_+U|0,7),y^=T(B+_|0,9),U^=T(y+B|0,13),_^=T(U+y|0,18);s[o++]=c+C|0,s[o++]=i+H|0,s[o++]=f+q|0,s[o++]=l+L|0,s[o++]=u+v|0,s[o++]=h+S|0,s[o++]=a+k|0,s[o++]=d+x|0,s[o++]=w+b|0,s[o++]=g+m|0,s[o++]=p+I|0,s[o++]=E+A|0,s[o++]=M+B|0,s[o++]=$+y|0,s[o++]=O+U|0,s[o++]=z+_|0}function Nt(e,t,n,r,s){let o=r+0,c=r+16*s;for(let i=0;i<16;i++)n[c+i]=e[t+(2*s-1)*16+i];for(let i=0;i<s;i++,o+=16,t+=16)ue(n,c,e,t,n,o),i>0&&(c+=16),ue(n,o,e,t+=16,n,c)}function Tn(e,t,n){const r=Le({dkLen:32,asyncTick:10,maxmem:1073742848},n),{N:s,r:o,p:c,dkLen:i,asyncTick:f,maxmem:l,onProgress:u}=r;if(W(s),W(o),W(c),W(i),W(f),W(l),u!==void 0&&typeof u!="function")throw new Error("progressCb should be function");const h=128*o,a=h/4,d=Math.pow(2,32);if(s<=1||(s&s-1)!==0||s>d)throw new Error("Scrypt: N must be larger than 1, a power of 2, and less than 2^32");if(c<0||c>(d-1)*32/h)throw new Error("Scrypt: p must be a positive integer less than or equal to ((2^32 - 1) * 32) / (128 * r)");if(i<0||i>(d-1)*32)throw new Error("Scrypt: dkLen should be positive integer less than or equal to (2^32 - 1) * 32");if(h*(s+c)>l)throw new Error("Scrypt: memused is bigger than maxMem. Expected 128 * r * (N + p) > maxmem of "+l);const g=Te(Dt,e,t,{c:1,dkLen:h*c}),p=Kt(g),E=Kt(new Uint8Array(h*s)),M=Kt(new Uint8Array(h));let $=()=>{};if(u){const O=2*s*c,z=Math.max(Math.floor(O/1e4),1);let C=0;$=()=>{C++,u&&(!(C%z)||C===O)&&u(C/O)}}return{N:s,r:o,p:c,dkLen:i,blockSize32:a,V:E,B32:p,B:g,tmp:M,blockMixCb:$,asyncTick:f}}function Kn(e,t,n,r,s){const o=Te(Dt,e,n,{c:1,dkLen:t});return dt(n,r,s),o}function Ke(e,t,n){const{N:r,r:s,p:o,dkLen:c,blockSize32:i,V:f,B32:l,B:u,tmp:h,blockMixCb:a}=Tn(e,t,n);ce(l);for(let d=0;d<o;d++){const w=i*d;for(let g=0;g<i;g++)f[g]=l[w+g];for(let g=0,p=0;g<r-1;g++)Nt(f,p,f,p+=i,s),a();Nt(f,(r-1)*i,l,w,s),a();for(let g=0;g<r;g++){const p=l[w+i-16]%r;for(let E=0;E<i;E++)h[E]=l[w+E]^f[p*i+E];Nt(h,0,l,w,s),a()}}return ce(l),Kn(e,c,u,f,h)}function He(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function Ot(e){if(typeof e!="boolean")throw new Error(`boolean expected, not ${e}`)}function qt(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function j(e,...t){if(!He(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error("Uint8Array expected of length "+t+", got length="+e.length)}function he(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function Hn(e,t){j(e);const n=t.outputLen;if(e.length<n)throw new Error("digestInto() expects output buffer of length at least "+n)}function ft(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function xt(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function Nn(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}const qn=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function Mn(e){if(typeof e!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(e))}function Rt(e){if(typeof e=="string")e=Mn(e);else if(He(e))e=$t(e);else throw new Error("Uint8Array expected, got "+typeof e);return e}function On(e,t){if(t==null||typeof t!="object")throw new Error("options must be defined");return Object.assign(e,t)}function Rn(e,t){if(e.length!==t.length)return!1;let n=0;for(let r=0;r<e.length;r++)n|=e[r]^t[r];return n===0}const $n=(e,t)=>{function n(r,...s){if(j(r),!qn)throw new Error("Non little-endian hardware is not yet supported");if(e.nonceLength!==void 0){const u=s[0];if(!u)throw new Error("nonce / iv required");e.varSizeNonce?j(u):j(u,e.nonceLength)}const o=e.tagLength;o&&s[1]!==void 0&&j(s[1]);const c=t(r,...s),i=(u,h)=>{if(h!==void 0){if(u!==2)throw new Error("cipher output not supported");j(h)}};let f=!1;return{encrypt(u,h){if(f)throw new Error("cannot encrypt() twice with same key + nonce");return f=!0,j(u),i(c.encrypt.length,h),c.encrypt(u,h)},decrypt(u,h){if(j(u),o&&u.length<o)throw new Error("invalid ciphertext length: smaller than tagLength="+o);return i(c.decrypt.length,h),c.decrypt(u,h)}}}return Object.assign(n,e),n};function de(e,t,n=!0){if(t===void 0)return new Uint8Array(e);if(t.length!==e)throw new Error("invalid output length, expected "+e+", got: "+t.length);if(n&&!jn(t))throw new Error("invalid output, must be aligned");return t}function ye(e,t,n,r){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,n,r);const s=BigInt(32),o=BigInt(4294967295),c=Number(n>>s&o),i=Number(n&o),f=4,l=0;e.setUint32(t+f,c,r),e.setUint32(t+l,i,r)}function zn(e,t,n){Ot(n);const r=new Uint8Array(16),s=Nn(r);return ye(s,0,BigInt(t),n),ye(s,8,BigInt(e),n),r}function jn(e){return e.byteOffset%4===0}function $t(e){return Uint8Array.from(e)}const Ne=e=>Uint8Array.from(e.split("").map(t=>t.charCodeAt(0))),Vn=Ne("expand 16-byte k"),Pn=Ne("expand 32-byte k"),Wn=ft(Vn),Gn=ft(Pn);function K(e,t){return e<<t|e>>>32-t}function zt(e){return e.byteOffset%4===0}const Bt=64,Xn=16,qe=2**32-1,ge=new Uint32Array;function Dn(e,t,n,r,s,o,c,i){const f=s.length,l=new Uint8Array(Bt),u=ft(l),h=zt(s)&&zt(o),a=h?ft(s):ge,d=h?ft(o):ge;for(let w=0;w<f;c++){if(e(t,n,r,u,c,i),c>=qe)throw new Error("arx: counter overflow");const g=Math.min(Bt,f-w);if(h&&g===Bt){const p=w/4;if(w%4!==0)throw new Error("arx: invalid block position");for(let E=0,M;E<Xn;E++)M=p+E,d[M]=a[M]^u[E];w+=Bt;continue}for(let p=0,E;p<g;p++)E=w+p,o[E]=s[E]^l[p];w+=g}}function Yn(e,t){const{allowShortKeys:n,extendNonceFn:r,counterLength:s,counterRight:o,rounds:c}=On({allowShortKeys:!1,counterLength:8,counterRight:!1,rounds:20},t);if(typeof e!="function")throw new Error("core must be a function");return qt(s),qt(c),Ot(o),Ot(n),(i,f,l,u,h=0)=>{j(i),j(f),j(l);const a=l.length;if(u===void 0&&(u=new Uint8Array(a)),j(u),qt(h),h<0||h>=qe)throw new Error("arx: counter overflow");if(u.length<a)throw new Error(`arx: output (${u.length}) is shorter than data (${a})`);const d=[];let w=i.length,g,p;if(w===32)d.push(g=$t(i)),p=Gn;else if(w===16&&n)g=new Uint8Array(32),g.set(i),g.set(i,16),p=Wn,d.push(g);else throw new Error(`arx: invalid 32-byte key, got length=${w}`);zt(f)||d.push(f=$t(f));const E=ft(g);if(r){if(f.length!==24)throw new Error("arx: extended nonce must be 24 bytes");r(p,E,ft(f.subarray(0,16)),E),f=f.subarray(16)}const M=16-s;if(M!==f.length)throw new Error(`arx: nonce must be ${M} or 16 bytes`);if(M!==12){const O=new Uint8Array(12);O.set(f,o?0:12-f.length),f=O,d.push(f)}const $=ft(f);return Dn(e,p,E,$,l,u,h,c),xt(...d),u}}const R=(e,t)=>e[t++]&255|(e[t++]&255)<<8;class Zn{constructor(t){this.blockLen=16,this.outputLen=16,this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.pos=0,this.finished=!1,t=Rt(t),j(t,32);const n=R(t,0),r=R(t,2),s=R(t,4),o=R(t,6),c=R(t,8),i=R(t,10),f=R(t,12),l=R(t,14);this.r[0]=n&8191,this.r[1]=(n>>>13|r<<3)&8191,this.r[2]=(r>>>10|s<<6)&7939,this.r[3]=(s>>>7|o<<9)&8191,this.r[4]=(o>>>4|c<<12)&255,this.r[5]=c>>>1&8190,this.r[6]=(c>>>14|i<<2)&8191,this.r[7]=(i>>>11|f<<5)&8065,this.r[8]=(f>>>8|l<<8)&8191,this.r[9]=l>>>5&127;for(let u=0;u<8;u++)this.pad[u]=R(t,16+2*u)}process(t,n,r=!1){const s=r?0:2048,{h:o,r:c}=this,i=c[0],f=c[1],l=c[2],u=c[3],h=c[4],a=c[5],d=c[6],w=c[7],g=c[8],p=c[9],E=R(t,n+0),M=R(t,n+2),$=R(t,n+4),O=R(t,n+6),z=R(t,n+8),C=R(t,n+10),H=R(t,n+12),q=R(t,n+14);let L=o[0]+(E&8191),v=o[1]+((E>>>13|M<<3)&8191),S=o[2]+((M>>>10|$<<6)&8191),k=o[3]+(($>>>7|O<<9)&8191),x=o[4]+((O>>>4|z<<12)&8191),b=o[5]+(z>>>1&8191),m=o[6]+((z>>>14|C<<2)&8191),I=o[7]+((C>>>11|H<<5)&8191),A=o[8]+((H>>>8|q<<8)&8191),B=o[9]+(q>>>5|s),y=0,U=y+L*i+v*(5*p)+S*(5*g)+k*(5*w)+x*(5*d);y=U>>>13,U&=8191,U+=b*(5*a)+m*(5*h)+I*(5*u)+A*(5*l)+B*(5*f),y+=U>>>13,U&=8191;let _=y+L*f+v*i+S*(5*p)+k*(5*g)+x*(5*w);y=_>>>13,_&=8191,_+=b*(5*d)+m*(5*a)+I*(5*h)+A*(5*u)+B*(5*l),y+=_>>>13,_&=8191;let N=y+L*l+v*f+S*i+k*(5*p)+x*(5*g);y=N>>>13,N&=8191,N+=b*(5*w)+m*(5*d)+I*(5*a)+A*(5*h)+B*(5*u),y+=N>>>13,N&=8191;let P=y+L*u+v*l+S*f+k*i+x*(5*p);y=P>>>13,P&=8191,P+=b*(5*g)+m*(5*w)+I*(5*d)+A*(5*a)+B*(5*h),y+=P>>>13,P&=8191;let tt=y+L*h+v*u+S*l+k*f+x*i;y=tt>>>13,tt&=8191,tt+=b*(5*p)+m*(5*g)+I*(5*w)+A*(5*d)+B*(5*a),y+=tt>>>13,tt&=8191;let Y=y+L*a+v*h+S*u+k*l+x*f;y=Y>>>13,Y&=8191,Y+=b*i+m*(5*p)+I*(5*g)+A*(5*w)+B*(5*d),y+=Y>>>13,Y&=8191;let Z=y+L*d+v*a+S*h+k*u+x*l;y=Z>>>13,Z&=8191,Z+=b*f+m*i+I*(5*p)+A*(5*g)+B*(5*w),y+=Z>>>13,Z&=8191;let F=y+L*w+v*d+S*a+k*h+x*u;y=F>>>13,F&=8191,F+=b*l+m*f+I*i+A*(5*p)+B*(5*g),y+=F>>>13,F&=8191;let et=y+L*g+v*w+S*d+k*a+x*h;y=et>>>13,et&=8191,et+=b*u+m*l+I*f+A*i+B*(5*p),y+=et>>>13,et&=8191;let nt=y+L*p+v*g+S*w+k*d+x*a;y=nt>>>13,nt&=8191,nt+=b*h+m*u+I*l+A*f+B*i,y+=nt>>>13,nt&=8191,y=(y<<2)+y|0,y=y+U|0,U=y&8191,y=y>>>13,_+=y,o[0]=U,o[1]=_,o[2]=N,o[3]=P,o[4]=tt,o[5]=Y,o[6]=Z,o[7]=F,o[8]=et,o[9]=nt}finalize(){const{h:t,pad:n}=this,r=new Uint16Array(10);let s=t[1]>>>13;t[1]&=8191;for(let i=2;i<10;i++)t[i]+=s,s=t[i]>>>13,t[i]&=8191;t[0]+=s*5,s=t[0]>>>13,t[0]&=8191,t[1]+=s,s=t[1]>>>13,t[1]&=8191,t[2]+=s,r[0]=t[0]+5,s=r[0]>>>13,r[0]&=8191;for(let i=1;i<10;i++)r[i]=t[i]+s,s=r[i]>>>13,r[i]&=8191;r[9]-=8192;let o=(s^1)-1;for(let i=0;i<10;i++)r[i]&=o;o=~o;for(let i=0;i<10;i++)t[i]=t[i]&o|r[i];t[0]=(t[0]|t[1]<<13)&65535,t[1]=(t[1]>>>3|t[2]<<10)&65535,t[2]=(t[2]>>>6|t[3]<<7)&65535,t[3]=(t[3]>>>9|t[4]<<4)&65535,t[4]=(t[4]>>>12|t[5]<<1|t[6]<<14)&65535,t[5]=(t[6]>>>2|t[7]<<11)&65535,t[6]=(t[7]>>>5|t[8]<<8)&65535,t[7]=(t[8]>>>8|t[9]<<5)&65535;let c=t[0]+n[0];t[0]=c&65535;for(let i=1;i<8;i++)c=(t[i]+n[i]|0)+(c>>>16)|0,t[i]=c&65535;xt(r)}update(t){he(this),t=Rt(t),j(t);const{buffer:n,blockLen:r}=this,s=t.length;for(let o=0;o<s;){const c=Math.min(r-this.pos,s-o);if(c===r){for(;r<=s-o;o+=r)this.process(t,o);continue}n.set(t.subarray(o,o+c),this.pos),this.pos+=c,o+=c,this.pos===r&&(this.process(n,0,!1),this.pos=0)}return this}destroy(){xt(this.h,this.r,this.buffer,this.pad)}digestInto(t){he(this),Hn(t,this),this.finished=!0;const{buffer:n,h:r}=this;let{pos:s}=this;if(s){for(n[s++]=1;s<16;s++)n[s]=0;this.process(n,0,!0)}this.finalize();let o=0;for(let c=0;c<8;c++)t[o++]=r[c]>>>0,t[o++]=r[c]>>>8;return t}digest(){const{buffer:t,outputLen:n}=this;this.digestInto(t);const r=t.slice(0,n);return this.destroy(),r}}function Fn(e){const t=(r,s)=>e(s).update(Rt(r)).digest(),n=e(new Uint8Array(32));return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=r=>e(r),t}const Qn=Fn(e=>new Zn(e));function Jn(e,t,n,r,s,o=20){let c=e[0],i=e[1],f=e[2],l=e[3],u=t[0],h=t[1],a=t[2],d=t[3],w=t[4],g=t[5],p=t[6],E=t[7],M=s,$=n[0],O=n[1],z=n[2],C=c,H=i,q=f,L=l,v=u,S=h,k=a,x=d,b=w,m=g,I=p,A=E,B=M,y=$,U=O,_=z;for(let P=0;P<o;P+=2)C=C+v|0,B=K(B^C,16),b=b+B|0,v=K(v^b,12),C=C+v|0,B=K(B^C,8),b=b+B|0,v=K(v^b,7),H=H+S|0,y=K(y^H,16),m=m+y|0,S=K(S^m,12),H=H+S|0,y=K(y^H,8),m=m+y|0,S=K(S^m,7),q=q+k|0,U=K(U^q,16),I=I+U|0,k=K(k^I,12),q=q+k|0,U=K(U^q,8),I=I+U|0,k=K(k^I,7),L=L+x|0,_=K(_^L,16),A=A+_|0,x=K(x^A,12),L=L+x|0,_=K(_^L,8),A=A+_|0,x=K(x^A,7),C=C+S|0,_=K(_^C,16),I=I+_|0,S=K(S^I,12),C=C+S|0,_=K(_^C,8),I=I+_|0,S=K(S^I,7),H=H+k|0,B=K(B^H,16),A=A+B|0,k=K(k^A,12),H=H+k|0,B=K(B^H,8),A=A+B|0,k=K(k^A,7),q=q+x|0,y=K(y^q,16),b=b+y|0,x=K(x^b,12),q=q+x|0,y=K(y^q,8),b=b+y|0,x=K(x^b,7),L=L+v|0,U=K(U^L,16),m=m+U|0,v=K(v^m,12),L=L+v|0,U=K(U^L,8),m=m+U|0,v=K(v^m,7);let N=0;r[N++]=c+C|0,r[N++]=i+H|0,r[N++]=f+q|0,r[N++]=l+L|0,r[N++]=u+v|0,r[N++]=h+S|0,r[N++]=a+k|0,r[N++]=d+x|0,r[N++]=w+b|0,r[N++]=g+m|0,r[N++]=p+I|0,r[N++]=E+A|0,r[N++]=M+B|0,r[N++]=$+y|0,r[N++]=O+U|0,r[N++]=z+_|0}const tr=Yn(Jn,{counterRight:!1,counterLength:4,allowShortKeys:!1}),er=new Uint8Array(16),pe=(e,t)=>{e.update(t);const n=t.length%16;n&&e.update(er.subarray(n))},nr=new Uint8Array(32);function we(e,t,n,r,s){const o=e(t,n,nr),c=Qn.create(o);s&&pe(c,s),pe(c,r);const i=zn(r.length,s?s.length:0,!0);c.update(i);const f=c.digest();return xt(o,i),f}const rr=e=>(t,n,r)=>({encrypt(o,c){const i=o.length;c=de(i+16,c,!1),c.set(o);const f=c.subarray(0,-16);e(t,n,f,f,1);const l=we(e,t,n,f,r);return c.set(l,i),xt(l),c},decrypt(o,c){c=de(o.length-16,c,!1);const i=o.subarray(0,-16),f=o.subarray(-16),l=we(e,t,n,i,r);if(!Rn(f,l))throw new Error("invalid tag");return c.set(o.subarray(0,-16)),e(t,n,c,c,1),xt(l),c}}),bt=$n({blockSize:64,nonceLength:12,tagLength:16},rr(tr));const Me=BigInt(0),xe=BigInt(1);function or(e){const t=e.toString(16);return t.length&1?"0"+t:t}function Oe(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);return e===""?Me:BigInt("0x"+e)}function sr(e){return Oe(ve(e))}function jt(e){return lt(e),Oe(ve(Uint8Array.from(e).reverse()))}function Re(e,t){return Xt(e.toString(16).padStart(t*2,"0"))}function $e(e,t){return Re(e,t).reverse()}function oo(e){return Xt(or(e))}function be(e,t,n){let r;if(typeof t=="string")try{r=Xt(t)}catch(o){throw new Error(e+" must be hex string or Uint8Array, cause: "+o)}else if(Ue(t))r=Uint8Array.from(t);else throw new Error(e+" must be hex string or Uint8Array");const s=r.length;if(typeof n=="number"&&s!==n)throw new Error(e+" of length "+n+" expected, got "+s);return r}const Mt=e=>typeof e=="bigint"&&Me<=e;function ir(e,t,n){return Mt(e)&&Mt(t)&&Mt(n)&&t<=e&&e<n}function me(e,t,n,r){if(!ir(t,n,r))throw new Error("expected valid "+e+": "+n+" <= n < "+r+", got "+t)}const cr=e=>(xe<<BigInt(e))-xe;function fr(e,t,n={}){if(!e||typeof e!="object")throw new Error("expected valid options object");function r(s,o,c){const i=e[s];if(c&&i===void 0)return;const f=typeof i;if(f!==o||i===null)throw new Error(`param "${s}" is invalid: expected ${o}, got ${f}`)}Object.entries(t).forEach(([s,o])=>r(s,o,!1)),Object.entries(n).forEach(([s,o])=>r(s,o,!0))}const V=BigInt(0),G=BigInt(1),ht=BigInt(2),ze=BigInt(3),je=BigInt(4),Ve=BigInt(5),ar=BigInt(7),Pe=BigInt(8),lr=BigInt(9),We=BigInt(16);function X(e,t){const n=e%t;return n>=V?n:t+n}function D(e,t,n){let r=e;for(;t-- >V;)r*=r,r%=n;return r}function Ee(e,t){if(e===V)throw new Error("invert: expected non-zero number");if(t<=V)throw new Error("invert: expected positive modulus, got "+t);let n=X(e,t),r=t,s=V,o=G;for(;n!==V;){const i=r/n,f=r%n,l=s-o*i;r=n,n=f,s=o,o=l}if(r!==G)throw new Error("invert: does not exist");return X(s,t)}function Yt(e,t,n){if(!e.eql(e.sqr(t),n))throw new Error("Cannot find square root")}function Ge(e,t){const n=(e.ORDER+G)/je,r=e.pow(t,n);return Yt(e,r,t),r}function ur(e,t){const n=(e.ORDER-Ve)/Pe,r=e.mul(t,ht),s=e.pow(r,n),o=e.mul(t,s),c=e.mul(e.mul(o,ht),s),i=e.mul(o,e.sub(c,e.ONE));return Yt(e,i,t),i}function hr(e){const t=Zt(e),n=Xe(e),r=n(t,t.neg(t.ONE)),s=n(t,r),o=n(t,t.neg(r)),c=(e+ar)/We;return(i,f)=>{let l=i.pow(f,c),u=i.mul(l,r);const h=i.mul(l,s),a=i.mul(l,o),d=i.eql(i.sqr(u),f),w=i.eql(i.sqr(h),f);l=i.cmov(l,u,d),u=i.cmov(a,h,w);const g=i.eql(i.sqr(u),f),p=i.cmov(l,u,g);return Yt(i,p,f),p}}function Xe(e){if(e<ze)throw new Error("sqrt is not defined for small field");let t=e-G,n=0;for(;t%ht===V;)t/=ht,n++;let r=ht;const s=Zt(e);for(;Ae(s,r)===1;)if(r++>1e3)throw new Error("Cannot find square root: probably non-prime P");if(n===1)return Ge;let o=s.pow(r,t);const c=(t+G)/ht;return function(f,l){if(f.is0(l))return l;if(Ae(f,l)!==1)throw new Error("Cannot find square root");let u=n,h=f.mul(f.ONE,o),a=f.pow(l,t),d=f.pow(l,c);for(;!f.eql(a,f.ONE);){if(f.is0(a))return f.ZERO;let w=1,g=f.sqr(a);for(;!f.eql(g,f.ONE);)if(w++,g=f.sqr(g),w===u)throw new Error("Cannot find square root");const p=G<<BigInt(u-w-1),E=f.pow(h,p);u=w,h=f.sqr(E),a=f.mul(a,h),d=f.mul(d,E)}return d}}function dr(e){return e%je===ze?Ge:e%Pe===Ve?ur:e%We===lr?hr(e):Xe(e)}function yr(e,t,n){if(n<V)throw new Error("invalid exponent, negatives unsupported");if(n===V)return e.ONE;if(n===G)return t;let r=e.ONE,s=t;for(;n>V;)n&G&&(r=e.mul(r,s)),s=e.sqr(s),n>>=G;return r}function gr(e,t,n=!1){const r=new Array(t.length).fill(n?e.ZERO:void 0),s=t.reduce((c,i,f)=>e.is0(i)?c:(r[f]=c,e.mul(c,i)),e.ONE),o=e.inv(s);return t.reduceRight((c,i,f)=>e.is0(i)?c:(r[f]=e.mul(c,r[f]),e.mul(c,i)),o),r}function Ae(e,t){const n=(e.ORDER-G)/ht,r=e.pow(t,n),s=e.eql(r,e.ONE),o=e.eql(r,e.ZERO),c=e.eql(r,e.neg(e.ONE));if(!s&&!o&&!c)throw new Error("invalid Legendre symbol result");return s?1:o?0:-1}function pr(e,t){t!==void 0&&W(t);const n=t!==void 0?t:e.toString(2).length,r=Math.ceil(n/8);return{nBitLength:n,nByteLength:r}}function Zt(e,t,n=!1,r={}){if(e<=V)throw new Error("invalid field: expected ORDER > 0, got "+e);let s,o,c=!1,i;if(typeof t=="object"&&t!=null){if(r.sqrt||n)throw new Error("cannot specify opts in two arguments");const a=t;a.BITS&&(s=a.BITS),a.sqrt&&(o=a.sqrt),typeof a.isLE=="boolean"&&(n=a.isLE),typeof a.modFromBytes=="boolean"&&(c=a.modFromBytes),i=a.allowedLengths}else typeof t=="number"&&(s=t),r.sqrt&&(o=r.sqrt);const{nBitLength:f,nByteLength:l}=pr(e,s);if(l>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");let u;const h=Object.freeze({ORDER:e,isLE:n,BITS:f,BYTES:l,MASK:cr(f),ZERO:V,ONE:G,allowedLengths:i,create:a=>X(a,e),isValid:a=>{if(typeof a!="bigint")throw new Error("invalid field element: expected bigint, got "+typeof a);return V<=a&&a<e},is0:a=>a===V,isValidNot0:a=>!h.is0(a)&&h.isValid(a),isOdd:a=>(a&G)===G,neg:a=>X(-a,e),eql:(a,d)=>a===d,sqr:a=>X(a*a,e),add:(a,d)=>X(a+d,e),sub:(a,d)=>X(a-d,e),mul:(a,d)=>X(a*d,e),pow:(a,d)=>yr(h,a,d),div:(a,d)=>X(a*Ee(d,e),e),sqrN:a=>a*a,addN:(a,d)=>a+d,subN:(a,d)=>a-d,mulN:(a,d)=>a*d,inv:a=>Ee(a,e),sqrt:o||(a=>(u||(u=dr(e)),u(h,a))),toBytes:a=>n?$e(a,l):Re(a,l),fromBytes:(a,d=!0)=>{if(i){if(!i.includes(a.length)||a.length>l)throw new Error("Field.fromBytes: expected "+i+" bytes, got "+a.length);const g=new Uint8Array(l);g.set(a,n?0:g.length-a.length),a=g}if(a.length!==l)throw new Error("Field.fromBytes: expected "+l+" bytes, got "+a.length);let w=n?jt(a):sr(a);if(c&&(w=X(w,e)),!d&&!h.isValid(w))throw new Error("invalid field element: outside of range 0..ORDER");return w},invertBatch:a=>gr(h,a),cmov:(a,d,w)=>w?d:a});return Object.freeze(h)}const Et=BigInt(0),gt=BigInt(1),Ut=BigInt(2);function wr(e){return fr(e,{adjustScalarBytes:"function",powPminus2:"function"}),Object.freeze({...e})}function xr(e){const t=wr(e),{P:n,type:r,adjustScalarBytes:s,powPminus2:o,randomBytes:c}=t,i=r==="x25519";if(!i&&r!=="x448")throw new Error("invalid type");const f=c||st,l=i?255:448,u=i?32:56,h=BigInt(i?9:5),a=BigInt(i?121665:39081),d=i?Ut**BigInt(254):Ut**BigInt(447),w=i?BigInt(8)*Ut**BigInt(251)-gt:BigInt(4)*Ut**BigInt(445)-gt,g=d+w+gt,p=x=>X(x,n),E=M(h);function M(x){return $e(p(x),u)}function $(x){const b=be("u coordinate",x,u);return i&&(b[31]&=127),p(jt(b))}function O(x){return jt(s(be("scalar",x,u)))}function z(x,b){const m=q($(b),O(x));if(m===Et)throw new Error("invalid private or public key received");return M(m)}function C(x){return z(x,E)}function H(x,b,m){const I=p(x*(b-m));return b=p(b-I),m=p(m+I),{x_2:b,x_3:m}}function q(x,b){me("u",x,Et,n),me("scalar",b,d,g);const m=b,I=x;let A=gt,B=Et,y=x,U=gt,_=Et;for(let P=BigInt(l-1);P>=Et;P--){const tt=m>>P>_^=tt,{x_2:A,x_3:y}=H(_,A,y),{x_2:B,x_3:U}=H(_,B,U),_=tt;const Y=A+B,Z=p(Y*Y),F=A-B,et=p(F*F),nt=Z-et,sn=y+U,cn=y-U,ee=p(cn*Y),ne=p(sn*F),re=ee+ne,oe=ee-ne;y=p(re*re),U=p(I*p(oe*oe)),A=p(Z*et),B=p(nt*(Z+p(a*nt)))}({x_2:A,x_3:y}=H(_,A,y)),{x_2:B,x_3:U}=H(_,B,U);const N=o(B);return p(A*N)}const L={secretKey:u,publicKey:u,seed:u},v=(x=f(u))=>(lt(x,L.seed),x);function S(x){const b=v(x);return{secretKey:b,publicKey:C(b)}}return{keygen:S,getSharedSecret:(x,b)=>z(x,b),getPublicKey:x=>C(x),scalarMult:z,scalarMultBase:C,utils:{randomSecretKey:v,randomPrivateKey:v},GuBytes:E.slice(),lengths:L}}const br=BigInt(1),Be=BigInt(2),mr=BigInt(3),Er=BigInt(5),Ar=BigInt(8),De=BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffed"),Br={p:De,n:BigInt("0x1000000000000000000000000000000014def9dea2f79cd65812631a5cf5d3ed"),h:Ar,a:BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec"),d:BigInt("0x52036cee2b6ffe738cc740797779e89800700a4d4141d8ab75eb4dca135978a3"),Gx:BigInt("0x216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a"),Gy:BigInt("0x6666666666666666666666666666666666666666666666666666666666666658")};function Ur(e){const t=BigInt(10),n=BigInt(20),r=BigInt(40),s=BigInt(80),o=De,i=e*e%o*e%o,f=D(i,Be,o)*i%o,l=D(f,br,o)*e%o,u=D(l,Er,o)*l%o,h=D(u,t,o)*u%o,a=D(h,n,o)*h%o,d=D(a,r,o)*a%o,w=D(d,s,o)*d%o,g=D(w,s,o)*d%o,p=D(g,t,o)*u%o;return{pow_p_5_8:D(p,Be,o)*e%o,b2:i}}function Ir(e){return e[0]&=248,e[31]&=127,e[31]|=64,e}const vr=Zt(Br.p,{isLE:!0}),Vt=(()=>{const e=vr.ORDER;return xr({P:e,type:"x25519",powPminus2:t=>{const{pow_p_5_8:n,b2:r}=Ur(t);return X(D(n,mr,e)*r,e)},adjustScalarBytes:Ir})})(),Ye=!1;async function Ze(e,t){try{return await e()}catch(n){if(n instanceof ReferenceError||n instanceof DOMException&&n.name==="NotSupportedError")return await t();throw n}}async function Ft(e,t){return await Ze(async()=>{const n=Pt(e)?e:await Lr(e),r=await crypto.subtle.importKey("raw",t,{name:"X25519"},Ye,[]);return new Uint8Array(await crypto.subtle.deriveBits({name:"X25519",public:r},n,256))},()=>{if(Pt(e))throw new Error("CryptoKey provided but X25519 WebCrypto is not supported");return Vt.scalarMult(e,t)})}async function _t(e){return await Ze(async()=>Ft(e,Vt.GuBytes),()=>{if(Pt(e))throw new Error("CryptoKey provided but X25519 WebCrypto is not supported");return Vt.scalarMultBase(e)})}const _r=new Uint8Array([48,46,2,1,0,48,5,6,3,43,101,110,4,34,4,32]);async function Lr(e){if(e.length!==32)throw new Error("X25519 private key must be 32 bytes");const t=new Uint8Array([..._r,...e]);return crypto.subtle.importKey("pkcs8",t,{name:"X25519"},Ye,["deriveBits"])}function Pt(e){return typeof CryptoKey<"u"&&e instanceof CryptoKey}class Sr{s;transcript=[];buf=new Uint8Array(0);constructor(t){this.s=t.getReader()}async readLine(){const t=[];for(;;){const n=this.buf.indexOf(10);if(n>=0)return t.push(this.buf.subarray(0,n)),this.transcript.push(this.buf.subarray(0,n+1)),this.buf=this.buf.subarray(n+1),Cr(pt(t));this.buf.length>0&&(t.push(this.buf),this.transcript.push(this.buf));const r=await this.s.read();if(r.done)return this.buf=pt(t),null;this.buf=r.value}}close(){return this.s.releaseLock(),{rest:this.buf,transcript:pt(this.transcript)}}}function Cr(e){return e.forEach(t=>{if(t<32||t>126)throw Error("invalid non-ASCII byte in header")}),new TextDecoder().decode(e)}function pt(e){const t=e.reduce(((s,o)=>s+o.length),0),n=new Uint8Array(t);let r=0;for(const s of e)n.set(s,r),r+=s.length;return n}function Lt(e,...t){return e.pipeThrough(new TransformStream({start(n){for(const r of t)n.enqueue(r)}}))}function Wt(e){return new ReadableStream({start(t){t.enqueue(e),t.close()}})}async function Fe(e){if(!(e instanceof ReadableStream))throw new Error("readAll expects a ReadableStream<Uint8Array>");return new Uint8Array(await new Response(e).arrayBuffer())}async function kr(e){if(!(e instanceof ReadableStream))throw new Error("readAllString expects a ReadableStream<Uint8Array>");return await new Response(e).text()}async function Tr(e,t){const n=e.getReader(),r=[];let s=0;for(;s<t;){const{done:f,value:l}=await n.read();if(f)throw Error("stream ended before reading "+t+" bytes");r.push(l),s+=l.length}n.releaseLock();const o=pt(r),c=o.subarray(0,t),i=Lt(e,o.subarray(t));return{data:c,rest:i}}class Ct{args;body;constructor(t,n){this.args=t,this.body=n}}async function Kr(e){const t=await e.readLine();if(t===null)throw Error("invalid stanza");const n=t.split(" ");if(n.length<2||n.shift()!=="->")return{next:t};for(const o of n)if(o.length===0)throw Error("invalid stanza");const r=[];for(;;){const o=await e.readLine();if(o===null)throw Error("invalid stanza");const c=J.decode(o);if(c.length>48)throw Error("invalid stanza");if(r.push(c),c.length<48)break}const s=pt(r);return{s:new Ct(n,s)}}async function Hr(e){const t=new Sr(e),n=await t.readLine();if(n!=="age-encryption.org/v1")throw Error("invalid version "+(n??"line"));const r=[];for(;;){const{s,next:o}=await Kr(t);if(s!==void 0){r.push(s);continue}if(!o.startsWith("--- "))throw Error("invalid header");const c=J.decode(o.slice(4)),{rest:i,transcript:f}=t.close(),l=f.slice(0,f.length-1-o.length+3);return{stanzas:r,headerNoMAC:l,MAC:c,headerSize:f.length,rest:Lt(e,i)}}}function Qe(e){const t=[];t.push(`age-encryption.org/v1
|
|
2
|
+
`);for(const n of e){t.push("-> "+n.args.join(" ")+`
|
|
3
|
+
`);for(let r=0;r<n.body.length;r+=48){let s=r+48;s>n.body.length&&(s=n.body.length),t.push(J.encode(n.body.subarray(r,s))+`
|
|
4
|
+
`)}n.body.length%48===0&&t.push(`
|
|
5
|
+
`)}return t.push("---"),new TextEncoder().encode(t.join(""))}function Nr(e,t){return pt([Qe(e),new TextEncoder().encode(" "+J.encode(t)+`
|
|
6
|
+
`)])}function so(){const e=st(32),t=at.encodeFromBytes("AGE-SECRET-KEY-",e).toUpperCase();return Promise.resolve(t)}async function io(e){let t;if(Je(e))t=e;else{const r=at.decodeToBytes(e);if(!e.startsWith("AGE-SECRET-KEY-1")||r.prefix.toUpperCase()!=="AGE-SECRET-KEY-"||r.bytes.length!==32)throw Error("invalid identity");t=r.bytes}const n=await _t(t);return at.encodeFromBytes("age",n)}class qr{recipient;constructor(t){const n=at.decodeToBytes(t);if(!t.startsWith("age1")||n.prefix.toLowerCase()!=="age"||n.bytes.length!==32)throw Error("invalid recipient");this.recipient=n.bytes}async wrapFileKey(t){const n=st(32),r=await _t(n),s=await Ft(n,this.recipient),o=new Uint8Array(r.length+this.recipient.length);o.set(r),o.set(this.recipient,r.length);const c=wt(ot,s,o,"age-encryption.org/v1/X25519",32);return[new Ct(["X25519",J.encode(r)],Qt(t,c))]}}class Mr{identity;recipient;constructor(t){if(Je(t)){this.identity=t,this.recipient=_t(t);return}const n=at.decodeToBytes(t);if(!t.startsWith("AGE-SECRET-KEY-1")||n.prefix.toUpperCase()!=="AGE-SECRET-KEY-"||n.bytes.length!==32)throw Error("invalid identity");this.identity=n.bytes,this.recipient=_t(n.bytes)}async unwrapFileKey(t){for(const n of t){if(n.args.length<1||n.args[0]!=="X25519")continue;if(n.args.length!==2)throw Error("invalid X25519 stanza");const r=J.decode(n.args[1]);if(r.length!==32)throw Error("invalid X25519 stanza");const s=await Ft(this.identity,r),o=await this.recipient,c=new Uint8Array(r.length+o.length);c.set(r),c.set(o,r.length);const i=wt(ot,s,c,"age-encryption.org/v1/X25519",32),f=Jt(n.body,i);if(f!==null)return f}return null}}class Or{passphrase;logN;constructor(t,n){this.passphrase=t,this.logN=n}wrapFileKey(t){const n=st(16),r="age-encryption.org/v1/scrypt",s=new Uint8Array(r.length+16);s.set(new TextEncoder().encode(r)),s.set(n,r.length);const o=Ke(this.passphrase,s,{N:2**this.logN,r:8,p:1,dkLen:32});return[new Ct(["scrypt",J.encode(n),this.logN.toString()],Qt(t,o))]}}class Rr{passphrase;constructor(t){this.passphrase=t}unwrapFileKey(t){for(const n of t){if(n.args.length<1||n.args[0]!=="scrypt")continue;if(t.length!==1)throw Error("scrypt recipient is not the only one in the header");if(n.args.length!==3||!/^[1-9][0-9]*$/.test(n.args[2]))throw Error("invalid scrypt stanza");const r=J.decode(n.args[1]);if(r.length!==16)throw Error("invalid scrypt stanza");const s=Number(n.args[2]);if(s>20)throw Error("scrypt work factor is too high");const o="age-encryption.org/v1/scrypt",c=new Uint8Array(o.length+16);c.set(new TextEncoder().encode(o)),c.set(r,o.length);const i=Ke(this.passphrase,c,{N:2**s,r:8,p:1,dkLen:32}),f=Jt(n.body,i);if(f!==null)return f}return null}}function Qt(e,t){const n=new Uint8Array(12);return bt(t,n).encrypt(e)}function Jt(e,t){if(e.length!==32)throw Error("invalid stanza");const n=new Uint8Array(12);try{return bt(t,n).decrypt(e)}catch{return null}}function Je(e){return typeof CryptoKey<"u"&&e instanceof CryptoKey}const ut=16,te=64*1024,Gt=te+ut;function $r(e){const t=new Uint8Array(12),n=()=>{for(let c=t.length-2;c>=0&&(t[c]++,t[c]===0);c--);};let r=!0;const s=new Uint8Array(Gt);let o=0;return new TransformStream({transform(c,i){for(;c.length>0;){if(o===s.length){const l=bt(e,t).decrypt(s);i.enqueue(l),n(),o=0,r=!1}const f=Math.min(s.length-o,c.length);s.set(c.subarray(0,f),o),o+=f,c=c.subarray(f)}},flush(c){t[11]=1;const i=bt(e,t).decrypt(s.subarray(0,o));if(!r&&i.length===0)throw new Error("final chunk is empty");c.enqueue(i)}})}function zr(e){if(e<ut)throw Error("ciphertext is too small");if(e===ut)return 0;const t=Math.floor(e/Gt),n=e%Gt;if(0<n&&n<=ut)throw Error("ciphertext size is invalid");let r=e;return r-=t*ut,r-=n>0?ut:0,r}function jr(e){const t=new Uint8Array(12),n=()=>{for(let o=t.length-2;o>=0&&(t[o]++,t[o]===0);o--);},r=new Uint8Array(te);let s=0;return new TransformStream({transform(o,c){for(;o.length>0;){if(s===r.length){const f=bt(e,t).encrypt(r);c.enqueue(f),n(),s=0}const i=Math.min(r.length-s,o.length);r.set(o.subarray(0,i),s),s+=i,o=o.subarray(i)}},flush(o){t[11]=1;const c=bt(e,t).encrypt(r.subarray(0,s));o.enqueue(c)}})}function Vr(e){const t=Math.max(1,Math.ceil(e/te));return e+ut*t}function kt(e){if(e.length===0)throw Error("cbor: unexpected EOF");const t=e[0]>>5,n=e[0]&31;if(n<=23)return[t,n,e.subarray(1)];if(n===24){if(e.length<2)throw Error("cbor: unexpected EOF");return[t,e[1],e.subarray(2)]}if(n===25){if(e.length<3)throw Error("cbor: unexpected EOF");return[t,e[1]<<8|e[2],e.subarray(3)]}throw Error("cbor: unsupported argument encoding")}function Pr(e){const[t,n,r]=kt(e);if(t!==0)throw Error("cbor: expected unsigned integer");return[n,r]}function Wr(e){const[t,n,r]=kt(e);if(t!==2)throw Error("cbor: expected byte string");if(n>r.length)throw Error("cbor: unexpected EOF");return[r.subarray(0,n),r.subarray(n)]}function tn(e){const[t,n,r]=kt(e);if(t!==3)throw Error("cbor: expected text string");if(n>r.length)throw Error("cbor: unexpected EOF");return[new TextDecoder("utf-8",{fatal:!0,ignoreBOM:!0}).decode(r.subarray(0,n)),r.subarray(n)]}function Gr(e){const[t,n,r]=kt(e);if(t!==4)throw Error("cbor: expected array");let s=r;const o=[];for(let c=0;c<n;c++){let i;[i,s]=tn(s),o.push(i)}return[o,s]}function Xr(e){return new Uint8Array([e])}function Dr(e){if(e.length<=23)return new Uint8Array([64|e.length,...e]);if(e.length<=255)return new Uint8Array([88,e.length,...e]);if(e.length<=65535)return new Uint8Array([89,e.length>>8,e.length&255,...e]);throw Error("cbor: byte string too long")}function en(e){const t=new TextEncoder().encode(e);if(t.length<=23)return new Uint8Array([96|t.length,...t]);if(t.length<=255)return new Uint8Array([120,t.length,...t]);if(t.length<=65535)return new Uint8Array([121,t.length>>8,t.length&255,...t]);throw Error("cbor: text string too long")}function Yr(e){const t=e.flatMap(n=>[...en(n)]);if(e.length<=23)return new Uint8Array([128|e.length,...t]);if(e.length<=255)return new Uint8Array([152,e.length,...t]);if(e.length<=65535)return new Uint8Array([153,e.length>>8,e.length&255,...t]);throw Error("cbor: array too long")}const Zr=[{type:"public-key",alg:-8},{type:"public-key",alg:-7},{type:"public-key",alg:-257}];async function co(e){const t=await navigator.credentials.create({publicKey:{rp:{name:"",id:e.rpId},user:{name:e.keyName,id:st(8),displayName:""},pubKeyCredParams:Zr,authenticatorSelection:{requireResidentKey:e.type!=="security-key",residentKey:e.type!=="security-key"?"required":"discouraged",userVerification:"required"},hints:e.type==="security-key"?["security-key"]:[],extensions:{prf:{}},challenge:new Uint8Array([0]).buffer}});if(!t.getClientExtensionResults().prf?.enabled)throw Error("PRF extension not available (need macOS 15+, Chrome 132+)");const n=e.rpId??new URL(window.origin).hostname;return Fr(t,n)}const nn="AGE-PLUGIN-FIDO2PRF-";function Fr(e,t){const n=e.response,r=Xr(1),s=Dr(new Uint8Array(e.rawId)),o=en(t),c=Yr(n.getTransports()),i=new Uint8Array([...r,...s,...o,...c]);return at.encode(nn,at.toWords(i),!1).toUpperCase()}function Qr(e){const t=at.decodeToBytes(e);if(!e.startsWith(nn+"1"))throw Error("invalid identity");const[n,r]=Pr(t.bytes);if(n!==1)throw Error("unsupported identity version");const[s,o]=Wr(r),[c,i]=tn(o),[f]=Gr(i);return[s,c,f]}const Tt="age-encryption.org/fido2prf";class rn{credId;transports;rpId;constructor(t){if(t?.identity){const[n,r,s]=Qr(t.identity);this.credId=n,this.transports=s,this.rpId=r}else this.rpId=t?.rpId}async getCredential(t){const r=(await navigator.credentials.get({publicKey:{allowCredentials:this.credId?[{id:this.credId,transports:this.transports,type:"public-key"}]:[],challenge:st(16),extensions:{prf:{eval:Jr(t)}},userVerification:"required",rpId:this.rpId}})).getClientExtensionResults().prf?.results;if(r===void 0)throw Error("PRF extension not available (need macOS 15+, Chrome 132+)");return r}}class fo extends rn{async wrapFileKey(t){const n=st(16),r=await this.getCredential(n),s=on(r);return[new Ct([Tt,J.encode(n)],Qt(t,s))]}}class ao extends rn{async unwrapFileKey(t){for(const n of t){if(n.args.length<1||n.args[0]!==Tt)continue;if(n.args.length!==2)throw Error("invalid prf stanza");const r=J.decode(n.args[1]);if(r.length!==16)throw Error("invalid prf stanza");const s=await this.getCredential(r),o=on(s),c=Jt(n.body,o);if(c!==null)return c}return null}}function Jr(e){const t=new TextEncoder().encode(Tt),n=new Uint8Array(t.length+e.length+1);n.set(t,0),n[t.length]=1,n.set(e,t.length+1);const r=new Uint8Array(t.length+e.length+1);return r.set(t,0),r[t.length]=2,r.set(e,t.length+1),{first:n,second:r}}function on(e){if(e.second===void 0)throw Error("Missing second PRF result");const t=new Uint8Array(e.first.byteLength+e.second.byteLength);return t.set(new Uint8Array(e.first),0),t.set(new Uint8Array(e.second),e.first.byteLength),ke(ot,t,Tt)}class lo{passphrase=null;scryptWorkFactor=18;recipients=[];setPassphrase(t){if(this.passphrase!==null)throw new Error("can encrypt to at most one passphrase");if(this.recipients.length!==0)throw new Error("can't encrypt to both recipients and passphrases");this.passphrase=t}setScryptWorkFactor(t){this.scryptWorkFactor=t}addRecipient(t){if(this.passphrase!==null)throw new Error("can't encrypt to both recipients and passphrases");typeof t=="string"?this.recipients.push(new qr(t)):this.recipients.push(t)}async encrypt(t){const n=st(16),r=[];let s=this.recipients;this.passphrase!==null&&(s=[new Or(this.passphrase,this.scryptWorkFactor)]);for(const h of s)r.push(...await h.wrapFileKey(n));const o=wt(ot,n,void 0,"header",32),c=mt(ot,o,Qe(r)),i=Nr(r,c),f=st(16),l=wt(ot,n,f,"payload",32),u=jr(l);return t instanceof ReadableStream?Object.assign(Lt(t.pipeThrough(u),i,f),{size:h=>Vr(h)+i.length+f.length}):(typeof t=="string"&&(t=new TextEncoder().encode(t)),await Fe(Lt(Wt(t).pipeThrough(u),i,f)))}}class uo{identities=[];addPassphrase(t){this.identities.push(new Rr(t))}addIdentity(t){typeof t=="string"||eo(t)?this.identities.push(new Mr(t)):this.identities.push(t)}async decrypt(t,n){const r=t instanceof ReadableStream?t:Wt(t),{fileKey:s,headerSize:o,rest:c}=await this.decryptHeaderInternal(r),{data:i,rest:f}=await Tr(c,16),l=wt(ot,s,i,"payload",32),u=$r(l),h=f.pipeThrough(u),a=Object.assign(h,{size:d=>zr(d-o-i.length)});return t instanceof ReadableStream?a:n==="text"?await kr(h):await Fe(h)}async decryptHeader(t){return(await this.decryptHeaderInternal(Wt(t))).fileKey}async decryptHeaderInternal(t){const n=await Hr(t),r=await this.unwrapFileKey(n.stanzas);if(r===null)throw Error("no identity matched any of the file's recipients");const s=wt(ot,r,void 0,"header",32),o=mt(ot,s,n.headerNoMAC);if(!to(n.MAC,o))throw Error("invalid header HMAC");return{fileKey:r,headerSize:n.headerSize,rest:n.rest}}async unwrapFileKey(t){for(const n of this.identities){const r=await n.unwrapFileKey(t);if(r!==null)return r}return null}}function to(e,t){if(e.length!==t.length)return!1;let n=0;for(let r=0;r<e.length;r++)n|=e[r]^t[r];return n===0}function eo(e){return typeof CryptoKey<"u"&&e instanceof CryptoKey}const ho=fn({__name:"PasswordField",props:{modelValue:{},modelModifiers:{},visible:{type:Boolean,default:!1},visibleModifiers:{}},emits:["update:modelValue","update:visible"],setup(e,{expose:t}){const n=se(e,"modelValue"),r=se(e,"visible"),s=an("textField");return t({textField:s}),(o,c)=>(ln(),un(hn,{ref_key:"textField",ref:s,modelValue:n.value,"onUpdate:modelValue":c[1]||(c[1]=i=>n.value=i),variant:"outlined",density:"compact",type:r.value?"text":"password"},{"append-inner":ie(()=>[dn(yn,{onClick:c[0]||(c[0]=i=>r.value=!r.value)},{default:ie(()=>[gn(pn(r.value?"mdi-eye-off":"mdi-eye"),1)]),_:1})]),_:1},8,["modelValue","type"]))}});export{uo as D,lo as E,fo as W,ho as _,ao as a,sr as b,co as c,so as g,io as i,oo as n,st as r};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as _,i as U,k as H,_ as R}from"#entry";import{_ as A,c as E}from"
|
|
1
|
+
import{g as _,i as U,k as H,_ as R}from"#entry";import{_ as A,c as E}from"./-WgkZJwX.js";import{E as F,aG as z,w as D,V,Y as T,_ as s,W as t,ai as $,aH as W,a as k,D as n,aj as L,ak as N,as as B,a2 as d,Z as w,$ as l,aI as Y,aJ as q,aK as J,at as S,ah as K,r as c,j as G,H as Z,M as O,J as P,aL as Q,aM as X,a0 as x,am as ee,ap as C,an as te,aa as I,ab as ae,x as se}from"./77UvFSdd.js";import"./B69Z0Xk1.js";import"./CxoCegAs.js";import"./BzbjXxJd.js";const oe={class:"mb-4"},le={class:"text-subtitle-1 font-weight-medium mb-2"},ne=F({__name:"NewProjectDialog",props:{visible:{type:Boolean},visibleModifiers:{}},emits:["update:visible"],setup(j){const p=z(j,"visible"),f=c(!1),y=c(!1),r=c(""),m=c(""),v=c(),g=c({type:"password",title:"",description:"",password:"",confirmPassword:""}),h=[o=>!!o||"Name is required",o=>o&&o.length<=64||"Name must be less than 64 characters",o=>/^[a-z0-9-\.]+$/.test(o)||"Name must be alphanumeric in lowercase with dashes (-) and dots (.)",o=>/^[a-z]/i.test(o)||"Name must start with a letter"],b=_(),a=U(),u=G(()=>f.value&&y.value),M=async()=>{if(!u.value)return;const o=await E(g.value),e=await b.createProject(r.value,{title:m.value},o);a.openProjectPanel(e.id),p.value=!1,r.value="",v.value?.resetForm()};return D(p,o=>{o||(r.value="",v.value?.resetForm())}),D(r,o=>{m.value=H(o)}),(o,e)=>(V(),T(K,{modelValue:p.value,"onUpdate:modelValue":e[6]||(e[6]=i=>p.value=i),"max-width":"600px"},{default:s(()=>[t($,{title:"New project",color:"#2d2d2d"},{default:s(()=>[t(W,{modelValue:n(f),"onUpdate:modelValue":e[5]||(e[5]=i=>k(f)?f.value=i:null)},{default:s(()=>[t(L,null,{default:s(()=>[t(N,{modelValue:n(r),"onUpdate:modelValue":e[0]||(e[0]=i=>k(r)?r.value=i:null),class:"mb-4",variant:"outlined",density:"compact",label:"Name",rules:h,placeholder:"my-awesome-project",hint:"Name must be unique across all repositories connected to the same storage","persistent-hint":""},null,8,["modelValue"]),t(N,{modelValue:n(m),"onUpdate:modelValue":e[1]||(e[1]=i=>k(m)?m.value=i:null),class:"mb-4",variant:"outlined",density:"compact",label:"Title",hint:"A human-readable title for your project","persistent-hint":""},null,8,["modelValue"]),t(B,{class:"my-6"}),d("div",oe,[d("h3",le,[t(w,{class:"mr-2"},{default:s(()=>[...e[7]||(e[7]=[l("mdi-lock-outline",-1)])]),_:1}),e[8]||(e[8]=l(" Unlock Method ",-1))]),e[9]||(e[9]=d("p",{class:"text-body-2 text-medium-emphasis mb-4"}," This method will be used to encrypt your project secrets and state data. You can add more unlock methods later. ",-1))]),t(n(A),{ref_key:"unlockMethodForm",ref:v,"show-type-selector":!0,"show-description":!1,"show-display-name":!1,"display-name-label":"Unlock Method Name","display-name-hint":"A friendly name for your unlock method","password-hint":"Password must be strong enough to resist offline attacks","default-display-name":"Default","default-description":"The initial unlock method configured when creating the project.","onUpdate:valid":e[2]||(e[2]=i=>y.value=i),"onUpdate:form":e[3]||(e[3]=i=>g.value=i)},null,512),t(Y,{type:"warning",density:"compact",class:"mt-4"},{default:s(()=>[...e[10]||(e[10]=[d("div",{class:"ml-2"},[d("strong",null,"Important:"),l(" Losing your unlock method will result in losing control over the created resources! ")],-1)])]),_:1})]),_:1}),t(q,null,{default:s(()=>[t(J),t(S,{onClick:e[4]||(e[4]=i=>p.value=!1)},{default:s(()=>[...e[11]||(e[11]=[l("Cancel",-1)])]),_:1}),t(S,{disabled:!n(u),loading:n(b).loadingCreateProject,onClick:M},{default:s(()=>[...e[12]||(e[12]=[l(" Create ",-1)])]),_:1},8,["disabled","loading"])]),_:1})]),_:1},8,["modelValue"])]),_:1})]),_:1},8,["modelValue"]))}}),re=""+new URL("hira-1.DuDDiA5P.png",import.meta.url).href,ie=globalThis.setInterval,de={class:"main-menu-container"},ue={class:"content-layout"},me={class:"project-list"},ce={class:"mascot-container"},pe={class:"catchphrase-text text-h6"},fe=F({__name:"index",props:{params:{}},setup(j){const p=_(),f=U(),y=se(),r=c(!1),m=["Let's orchestrate this beautifully!","State is everything!","No infrastructure left behind!","Visual first, code second!","Infrastructure should be as elegant as it is functional!","Time to sync the state!","Ready to deploy some magic?","Every good system starts with a solid foundation!","Building the future, one container at a time!","Kubernetes makes everything better... except debugging!","Your infrastructure deserves some love too!","Who needs sleep when you have perfectly orchestrated deployments?","Configuration drift is my arch-nemesis!","Monitoring dashboards are my happy place!","Clean architecture is the key to digital zen!","Infrastructure as art, code as poetry!","Scaling up? Scaling out? Let's scale with style!","Error 404: Downtime not found!","Highstate слабее ArgoCD и FluxCD, но в цирке не выступает!"],v=c(""),g=()=>{const b=Math.floor(Math.random()*m.length);return m[b]};v.value=g();let h;return Z(()=>{h=ie(()=>{v.value=g()},1e4)}),O(()=>{h&&clearInterval(h)}),(b,a)=>(V(),P(I,null,[d("div",de,[d("div",ue,[t($,{variant:"text",class:"project-card-inner"},{default:s(()=>[t(L,null,{default:s(()=>[t(Q,{class:"text-center text-uppercase text-bold"},{default:s(()=>[...a[3]||(a[3]=[l("Highstate Designer",-1)])]),_:1}),t(X,{class:"text-center"},{default:s(()=>[l(" v"+x(n(y).public.version)+" • Все зонды удалены ",1)]),_:1}),t(B,{class:"mt-4"}),t(ee,{variant:"flat",class:"main-menu-list"},{default:s(()=>[t(C,{class:"list-item list-button",onClick:a[0]||(a[0]=u=>n(f).openDataSettingsPanel())},{default:s(()=>[t(w,{class:"mr-2"},{default:s(()=>[...a[4]||(a[4]=[l("mdi-database-cog",-1)])]),_:1}),a[5]||(a[5]=l(" Data & Settings ",-1))]),_:1}),t(te,{class:"text-uppercase"},{default:s(()=>[...a[6]||(a[6]=[l("Projects",-1)])]),_:1}),d("div",me,[(V(!0),P(I,null,ae(n(p).projects,u=>(V(),T(C,{key:u.id,class:"list-item",onClick:M=>n(f).openProjectPanel(u.id)},{default:s(()=>[t(w,{class:"mr-2"},{default:s(()=>[...a[7]||(a[7]=[l("mdi-folder",-1)])]),_:1}),l(" "+x(u.meta.title),1)]),_:2},1032,["onClick"]))),128))]),t(C,{class:"list-item",onClick:a[1]||(a[1]=u=>r.value=!0)},{default:s(()=>[t(w,{class:"mr-2"},{default:s(()=>[...a[8]||(a[8]=[l("mdi-plus",-1)])]),_:1}),a[9]||(a[9]=l(" Create new project ",-1))]),_:1})]),_:1})]),_:1})]),_:1}),d("div",ce,[a[10]||(a[10]=d("img",{src:re,alt:"Hira Nakamura - Highstate Mascot",class:"mascot-image"},null,-1)),d("div",pe,'"'+x(n(v))+'"',1)])])]),t(n(ne),{visible:n(r),"onUpdate:visible":a[2]||(a[2]=u=>k(r)?r.value=u:null)},null,8,["visible"])],64))}}),ke=R(fe,[["__scopeId","data-v-49de3d73"]]);export{ke as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as D,t as N}from"#entry";import"./C5DRPdxC.js";import{S as H}from"./DVKmRHSk.js";import{S as E,b as w}from"./
|
|
1
|
+
import{s as D,t as N}from"#entry";import"./C5DRPdxC.js";import{S as H}from"./DVKmRHSk.js";import{S as E,b as w}from"./C1JwrSe7.js";import{u as J}from"./M3Z1JMP1.js";import{_ as R}from"./BgvYz3Nr.js";import{_ as W}from"./m4Sxwg8n.js";import{E as B,aG as M,w as G,V as b,Y as U,_ as l,W as o,ai as S,aj as F,D as t,aI as $,$ as v,a0 as T,a1 as I,aJ as A,aK as z,at as C,ah as L,aP as P,r as k,aL as K,Z as O,a2 as V,aO as x,J as Y,a as j,aa as Z}from"./77UvFSdd.js";import{_ as q,c as Q}from"./-WgkZJwX.js";import"./B69Z0Xk1.js";import"./CxoCegAs.js";import"./fbfpKHgl.js";import"./C_1RoKtr.js";import"./BzbjXxJd.js";const X=B({__name:"CreateUnlockMethodDialog",props:{visible:{type:Boolean},visibleModifiers:{}},emits:P(["created"],["update:visible"]),setup(r,{emit:g}){const n=M(r,"visible"),s=g,{settingsStore:c}=D(),p=k(!1),u=k(!1),m=k(null),h=k(),e=k({type:"password",title:"",description:"",password:"",confirmPassword:""}),i=()=>{n.value=!1,h.value?.resetForm(),m.value=null},y=async()=>{if(p.value){u.value=!0,m.value=null;try{const a=await Q(e.value);await c.addUnlockMethod(a),n.value=!1,h.value?.resetForm(),m.value=null,s("created")}catch(a){console.error("Failed to create unlock method:",a),m.value="Some error occurred"}finally{u.value=!1}}};return G(n,a=>{a||(h.value?.resetForm(),m.value=null)}),(a,d)=>(b(),U(L,{modelValue:n.value,"onUpdate:modelValue":d[2]||(d[2]=f=>n.value=f),"max-width":"600px"},{default:l(()=>[o(S,{title:"Create Unlock Method"},{default:l(()=>[o(F,null,{default:l(()=>[o(q,{ref_key:"unlockMethodForm",ref:h,"onUpdate:valid":d[0]||(d[0]=f=>p.value=f),"onUpdate:form":d[1]||(d[1]=f=>e.value=f)},null,512),t(m)?(b(),U($,{key:0,type:"error",density:"compact",class:"mb-4"},{default:l(()=>[v(T(t(m)),1)]),_:1})):I("",!0)]),_:1}),o(A,null,{default:l(()=>[o(z),o(C,{disabled:t(u),onClick:i},{default:l(()=>[...d[3]||(d[3]=[v("Cancel",-1)])]),_:1},8,["disabled"]),o(C,{color:"primary",disabled:!t(p),loading:t(u),onClick:y},{default:l(()=>[...d[4]||(d[4]=[v(" Create ",-1)])]),_:1},8,["disabled","loading"])]),_:1})]),_:1})]),_:1},8,["modelValue"]))}}),_={class:"mb-3"},ee=B({__name:"DeleteUnlockMethodDialog",props:P({unlockMethod:{}},{visible:{type:Boolean},visibleModifiers:{}}),emits:P(["confirm"],["update:visible"]),setup(r,{emit:g}){const n=M(r,"visible"),s=r,c=g,p=k(!1),u=()=>{s.unlockMethod&&c("confirm",s.unlockMethod)},m=()=>{n.value=!1};return(h,e)=>(b(),U(L,{modelValue:n.value,"onUpdate:modelValue":e[0]||(e[0]=i=>n.value=i),"max-width":"500px"},{default:l(()=>[r.unlockMethod?(b(),U(S,{key:0},{default:l(()=>[o(K,{class:"d-flex align-center"},{default:l(()=>[o(O,{class:"mr-2 text-error"},{default:l(()=>[...e[1]||(e[1]=[v("mdi-alert-circle-outline",-1)])]),_:1}),e[2]||(e[2]=v(" Delete Unlock Method ",-1))]),_:1}),o(F,null,{default:l(()=>[V("p",_,[e[3]||(e[3]=v(" Are you sure you want to delete the unlock method ",-1)),V("strong",null,'"'+T(r.unlockMethod.meta.title)+'"',1),e[4]||(e[4]=v(" ? ",-1))]),o($,{type:"warning",density:"compact"},{default:l(()=>[...e[5]||(e[5]=[V("strong",null,"Warning:",-1),v(" Deleting this unlock method will permanently remove your ability to unlock the project using this method. Make sure you have at least one other unlock method configured before proceeding. ",-1)])]),_:1})]),_:1}),o(A,null,{default:l(()=>[o(z),o(C,{disabled:t(p),onClick:m},{default:l(()=>[...e[6]||(e[6]=[v("Cancel",-1)])]),_:1},8,["disabled"]),o(C,{color:"error",loading:t(p),onClick:u},{default:l(()=>[...e[7]||(e[7]=[v("Delete",-1)])]),_:1},8,["loading"])]),_:1})]),_:1})):I("",!0)]),_:1},8,["modelValue"]))}}),te={class:"d-flex align-center gap-1"},ae=B({__name:"UnlockMethodsTable",props:P({projectId:{},data:{},loading:{type:Boolean},hideHeader:{type:Boolean},height:{}},{search:{},searchModifiers:{},sortBy:{},sortByModifiers:{},page:{},pageModifiers:{},itemsPerPage:{},itemsPerPageModifiers:{}}),emits:P(["delete"],["update:search","update:sortBy","update:page","update:itemsPerPage"]),setup(r,{emit:g}){const n=g,s=M(r,"search"),c=M(r,"sortBy"),p=M(r,"page"),u=M(r,"itemsPerPage"),m=[{key:"type",title:"Type"},w.name,w.id,w.createdAt,w.actions];return(h,e)=>(b(),U(t(E),{search:s.value,"onUpdate:search":e[0]||(e[0]=i=>s.value=i),"sort-by":c.value,"onUpdate:sortBy":e[1]||(e[1]=i=>c.value=i),page:p.value,"onUpdate:page":e[2]||(e[2]=i=>p.value=i),"items-per-page":u.value,"onUpdate:itemsPerPage":e[3]||(e[3]=i=>u.value=i),headers:m,data:r.data,loading:r.loading,"hide-header":r.hideHeader,height:r.height},{"item.type":l(({item:i})=>[o(t(R),{status:i.type,"status-map":t(J)},null,8,["status","status-map"])]),"item.actions":l(({item:i})=>[V("div",te,[o(t(W),{"page-name":"settings.unlock-method-details","page-params":{projectId:r.projectId,unlockMethodId:i.id}},null,8,["page-params"]),o(C,{variant:"text",icon:"mdi-delete",size:"small",color:"error",onClick:y=>n("delete",i)},null,8,["onClick"])])]),_:1},8,["search","sort-by","page","items-per-page","data","loading","hide-header","height"]))}}),ke=B({__name:"index",async setup(r){let g,n;const{settingsStore:s}=D(),{projectStore:c}=D();c.initializing?([g,n]=x(()=>N(()=>c.initialized).toBe(!0)),await g,n(),c.addLibraryRoot()):([g,n]=x(()=>c.initialize1()),await g,n(),[g,n]=x(()=>c.initialize2()),await g,n()),s.unlockMethods.load();const p=k(!1),u=k(!1),m=k(null),h=k(!1),e=y=>{m.value=y,u.value=!0},i=async y=>{h.value=!0;try{await s.removeUnlockMethod(y.id),u.value=!1,m.value=null}catch(a){console.error("Failed to delete unlock method:",a)}finally{h.value=!1}};return(y,a)=>(b(),Y(Z,null,[o(t(H),{title:"Unlock Methods",icon:"mdi-lock-open-outline",description:"Manage the methods used to unlock and access this project's encrypted data."},{actions:l(()=>[o(C,{color:"primary","prepend-icon":"mdi-plus",onClick:a[0]||(a[0]=d=>p.value=!0)},{default:l(()=>[...a[7]||(a[7]=[v(" Add Unlock Method ",-1)])]),_:1})]),default:l(({height:d})=>[o(t(ae),{search:t(s).unlockMethods.search,"onUpdate:search":a[1]||(a[1]=f=>t(s).unlockMethods.search=f),"sort-by":t(s).unlockMethods.sortBy,"onUpdate:sortBy":a[2]||(a[2]=f=>t(s).unlockMethods.sortBy=f),page:t(s).unlockMethods.page,"onUpdate:page":a[3]||(a[3]=f=>t(s).unlockMethods.page=f),"items-per-page":t(s).unlockMethods.itemsPerPage,"onUpdate:itemsPerPage":a[4]||(a[4]=f=>t(s).unlockMethods.itemsPerPage=f),"project-id":t(c).projectId,data:t(s).unlockMethods.data,loading:t(s).unlockMethods.isLoading,height:d,onDelete:e},null,8,["search","sort-by","page","items-per-page","project-id","data","loading","height"])]),_:1}),o(t(X),{visible:t(p),"onUpdate:visible":a[5]||(a[5]=d=>j(p)?p.value=d:null)},null,8,["visible"]),o(t(ee),{visible:t(u),"onUpdate:visible":a[6]||(a[6]=d=>j(u)?u.value=d:null),"unlock-method":t(m),onConfirm:i},null,8,["visible","unlock-method"])],64))}});export{ke as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{I as x,_ as b}from"#entry";import{_ as k,I as B}from"./
|
|
1
|
+
import{I as x,_ as b}from"#entry";import{_ as k,I as B}from"./C_1RoKtr.js";import{E as S,aG as r,a8 as V,V as d,J as c,a2 as i,W as m,_ as o,$ as I,Z as w,a0 as n,Y as u,ak as C,a1 as l,aW as D,ab as A,a5 as M,av as T,aw as N,D as U,aX as H,aP as $}from"./77UvFSdd.js";import"./C5DRPdxC.js";const O={name:{key:"meta.title",title:"Name & Description"},id:{key:"id",title:"ID"},createdAt:{key:"createdAt",title:"Created"},actions:{key:"actions",title:"Actions",align:"center"}},E={class:"settings-table-container"},W={key:0,class:"table-header"},z={class:"d-flex align-center"},F={class:"text-subtitle-1 font-weight-medium"},G={class:"table-wrapper"},J={class:"d-flex align-center"},L={class:"d-flex flex-column"},R={class:"text-body-1 font-weight-medium"},X={key:0,class:"text-caption text-medium-emphasis"},Y=S({__name:"SettingsDataTable",props:$({headers:{},data:{},loading:{type:Boolean},hideHeader:{type:Boolean},hideSearch:{type:Boolean},height:{}},{search:{},searchModifiers:{},sortBy:{},sortByModifiers:{},page:{},pageModifiers:{},itemsPerPage:{},itemsPerPageModifiers:{}}),emits:["update:search","update:sortBy","update:page","update:itemsPerPage"],setup(t){const h=r(t,"search"),g=r(t,"sortBy"),y=r(t,"page"),v=r(t,"itemsPerPage"),f=V();return(p,a)=>(d(),c("div",E,[t.hideHeader?l("",!0):(d(),c("div",W,[i("div",z,[m(w,{class:"mr-2"},{default:o(()=>[...a[4]||(a[4]=[I("mdi-format-list-bulleted",-1)])]),_:1}),i("span",F,n(t.data.total)+" item"+n(t.data.total===1?"":"s"),1)]),t.hideSearch?l("",!0):(d(),u(C,{key:0,modelValue:h.value,"onUpdate:modelValue":a[0]||(a[0]=e=>h.value=e),"prepend-inner-icon":"mdi-magnify",placeholder:"Search",variant:"outlined",density:"compact",clearable:"","hide-details":"",style:{"max-width":"300px"}},null,8,["modelValue"]))])),i("div",G,[m(H,{headers:t.headers,items:t.data.items,"items-length":t.data.total,loading:t.loading,page:y.value,"onUpdate:page":a[1]||(a[1]=e=>y.value=e),"items-per-page":v.value,"onUpdate:itemsPerPage":a[2]||(a[2]=e=>v.value=e),"sort-by":g.value,"onUpdate:sortBy":a[3]||(a[3]=e=>g.value=e),"item-value":"id",class:"data-table","fixed-header":"",height:t.height},D({"item.meta.title":o(({item:e})=>[i("div",J,[e.meta.icon||t.headers.find(s=>s.key==="meta.title")?.headerProps?.defaultPrimaryIcon?(d(),u(U(x),{key:0,icon:e.meta.icon||t.headers.find(s=>s.key==="meta.title")?.headerProps?.defaultPrimaryIcon,color:e.meta.iconColor??(e.meta.icon?void 0:t.headers.find(s=>s.key==="meta.title")?.headerProps?.defaultPrimaryIconColor),width:"24",class:"mr-4"},null,8,["icon","color"])):l("",!0),i("div",L,[i("div",R,n(e.meta.title||"Unnamed"),1),e.meta.description?(d(),c("div",X,n(e.meta.description.split(`
|
|
2
2
|
`)[0]),1)):l("",!0)])])]),"item.id":o(({item:e})=>[m(B,{value:e.id},null,8,["value"])]),"item.createdAt":o(({item:e})=>[e.createdAt?(d(),u(k,{key:0,value:e.createdAt},null,8,["value"])):l("",!0)]),"no-data":o(()=>[a[5]||(a[5]=i("div",{class:"text-center py-4"},[i("div",{class:"text-h6 text-medium-emphasis"},"No data available")],-1))]),_:2},[A(f,(e,s)=>({name:s,fn:o(P=>[M(p.$slots,s,T(N(P)),void 0,!0)])}))]),1032,["headers","items","items-length","loading","page","items-per-page","sort-by","height"])])]))}}),Q=b(Y,[["__scopeId","data-v-d8ca3f82"]]);export{Q as S,O as b};
|