diff --git a/spinifex/services/spinifexui/frontend/dist/assets/_clusterName.js b/spinifex/services/spinifexui/frontend/dist/assets/_clusterName.js index b7beea2fd..e7dcfacfe 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/_clusterName.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/_clusterName.js @@ -1 +1 @@ -import{n as e,o as t,r as n,t as r}from"./compiler-runtime.js";import{t as i}from"./error-banner.js";import{t as a}from"./useQuery.js";import{t as o}from"./useSuspenseQuery.js";import{vr as s}from"./awsClient.js";import{Bt as c}from"./auth.js";import{t as l}from"./back-link.js";import{t as u}from"./cli-command-panel.js";import{t as d}from"./trash-2.js";import{t as f}from"./button.js";import{S as p,_ as m,a as h,b as g,d as _,f as v,g as y,h as b,l as x,m as S,n as C,o as w,r as T,s as E,t as D,u as O,v as k,x as A,y as j}from"./eks.js";import{C as M,D as N,E as P,Ir as F,M as I,Nr as L,Nt as R,O as z,Rn as B,T as V,_ as H,j as ee,k as te,rt as ne,w as re}from"./index.js";import{i as U,t as ie}from"./zod.js";import{t as ae}from"./page-heading.js";import{a as W,r as G,t as K}from"./field.js";import{i as oe,l as q,n as se,o as ce,r as le,s as ue,t as J}from"./alert-dialog.js";import{t as de}from"./delete-confirmation-dialog.js";import{n as Y,t as X}from"./detail-row.js";import{t as fe}from"./textarea.js";import{i as pe,n as me,r as he,t as ge}from"./tabs.js";import{t as _e}from"./badge.js";var ve=L(`circle-arrow-up`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m16 12-4-4-4 4`,key:`177agl`}],[`path`,{d:`M12 16V8`,key:`1sbj14`}]]),ye=L(`sliders-horizontal`,[[`path`,{d:`M10 5H3`,key:`1qgfaw`}],[`path`,{d:`M12 19H3`,key:`yhmn1j`}],[`path`,{d:`M14 3v4`,key:`1sua03`}],[`path`,{d:`M16 17v4`,key:`1q0r14`}],[`path`,{d:`M21 12h-9`,key:`1o4lsq`}],[`path`,{d:`M21 19h-5`,key:`1rlt1p`}],[`path`,{d:`M21 5h-7`,key:`1oszz2`}],[`path`,{d:`M8 10v4`,key:`tgpxqk`}],[`path`,{d:`M8 12H3`,key:`a7s4jb`}]]),Z=r(),Q=t(n(),1),$=e();function be(e){return e?.split(`/`).pop()??e??``}function xe(e){let t=(0,Z.c)(55),{clusterName:n,principalArn:r,onDelete:i}=e,o;t[0]!==n||t[1]!==r?(o=re(n,r),t[0]=n,t[1]=r,t[2]=o):o=t[2];let{data:s}=a(o),c;t[3]!==n||t[4]!==r?(c=z(n,r),t[3]=n,t[4]=r,t[5]=c):c=t[5];let{data:l}=a(c),u=O(),p=j(),[m,h]=(0,Q.useState)(D[0].arn),g=s?.accessEntry,_;t[6]===l?.associatedAccessPolicies?_=t[7]:(_=l?.associatedAccessPolicies??[],t[6]=l?.associatedAccessPolicies,t[7]=_);let v=_,y;t[8]===r?y=t[9]:(y=(0,$.jsx)(`span`,{className:`truncate font-mono text-xs`,children:r}),t[8]=r,t[9]=y);let b;t[10]!==i||t[11]!==r?(b=()=>i(r),t[10]=i,t[11]=r,t[12]=b):b=t[12];let x;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,$.jsx)(d,{className:`size-4`}),t[13]=x):x=t[13];let S;t[14]===b?S=t[15]:(S=(0,$.jsx)(f,{onClick:b,size:`icon`,variant:`ghost`,children:x}),t[14]=b,t[15]=S);let C;t[16]!==y||t[17]!==S?(C=(0,$.jsx)(Y.Header,{children:(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[y,S]})}),t[16]=y,t[17]=S,t[18]=C):C=t[18];let w=g?.type,T;t[19]===w?T=t[20]:(T=(0,$.jsx)(X,{label:`Type`,value:w}),t[19]=w,t[20]=T);let E;t[21]===g?E=t[22]:(E=g?.kubernetesGroups?.length?g.kubernetesGroups.join(`, `):`—`,t[21]=g,t[22]=E);let k;t[23]===E?k=t[24]:(k=(0,$.jsx)(X,{label:`Kubernetes groups`,value:E}),t[23]=E,t[24]=k);let A;t[25]!==v||t[26]!==n||t[27]!==p||t[28]!==r?(A=v.length>0?(0,$.jsx)(`div`,{className:`space-y-1`,children:v.map(e=>(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,$.jsx)(`span`,{children:be(e.policyArn)}),(0,$.jsx)(f,{onClick:()=>p.mutate({clusterName:n,principalArn:r,policyArn:e.policyArn??``}),size:`sm`,variant:`ghost`,children:`Remove`})]},e.policyArn))}):`—`,t[25]=v,t[26]=n,t[27]=p,t[28]=r,t[29]=A):A=t[29];let M;t[30]===A?M=t[31]:(M=(0,$.jsx)(X,{label:`Access policies`,value:A}),t[30]=A,t[31]=M);let N;t[32]===Symbol.for(`react.memo_cache_sentinel`)?(N=e=>h(e.target.value),t[32]=N):N=t[32];let P;t[33]===Symbol.for(`react.memo_cache_sentinel`)?(P=D.map(Se),t[33]=P):P=t[33];let F;t[34]===m?F=t[35]:(F=(0,$.jsx)(`select`,{"aria-label":`Access policy`,className:`h-7 flex-1 rounded-md border border-input bg-input/20 px-2 text-sm`,onChange:N,value:m,children:P}),t[34]=m,t[35]=F);let I;t[36]!==u||t[37]!==n||t[38]!==m||t[39]!==r?(I=()=>u.mutate({clusterName:n,principalArn:r,policyArn:m,accessScopeType:`cluster`}),t[36]=u,t[37]=n,t[38]=m,t[39]=r,t[40]=I):I=t[40];let L;t[41]!==u.isPending||t[42]!==I?(L=(0,$.jsx)(f,{disabled:u.isPending,onClick:I,size:`sm`,children:`Associate`}),t[41]=u.isPending,t[42]=I,t[43]=L):L=t[43];let R;t[44]!==F||t[45]!==L?(R=(0,$.jsxs)(`div`,{className:`flex items-center gap-2 pt-2`,children:[F,L]}),t[44]=F,t[45]=L,t[46]=R):R=t[46];let B;t[47]!==T||t[48]!==k||t[49]!==M||t[50]!==R?(B=(0,$.jsxs)(Y.Content,{children:[T,k,M,R]}),t[47]=T,t[48]=k,t[49]=M,t[50]=R,t[51]=B):B=t[51];let V;return t[52]!==B||t[53]!==C?(V=(0,$.jsxs)(Y,{children:[C,B]}),t[52]=B,t[53]=C,t[54]=V):V=t[54],V}function Se(e){return(0,$.jsx)(`option`,{value:e.arn,children:e.name},e.arn)}function Ce(e){let t=(0,Z.c)(41),{clusterName:n,open:r,onOpenChange:i}=e,a=_(),o;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(o={resolver:ie(w),defaultValues:{principalArn:``,kubernetesGroups:``}},t[0]=o):o=t[0];let{formState:s,handleSubmit:c,register:l,reset:u}=U(o),{errors:d}=s,f;t[1]!==n||t[2]!==a||t[3]!==i||t[4]!==u?(f=async e=>{await a.mutateAsync({clusterName:n,principalArn:e.principalArn,kubernetesGroups:e.kubernetesGroups.split(`,`).map(we).filter(Boolean)}),u(),i(!1)},t[1]=n,t[2]=a,t[3]=i,t[4]=u,t[5]=f):f=t[5];let p=f,m;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,$.jsx)(ue,{children:(0,$.jsx)(q,{children:`Add access entry`})}),t[6]=m):m=t[6];let h;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,$.jsx)(W,{children:(0,$.jsx)(`label`,{htmlFor:`ae-principal`,children:`IAM principal ARN`})}),t[7]=h):h=t[7];let g=!!d.principalArn,v;t[8]===l?v=t[9]:(v=l(`principalArn`),t[8]=l,t[9]=v);let y;t[10]!==g||t[11]!==v?(y=(0,$.jsx)(B,{"aria-invalid":g,id:`ae-principal`,placeholder:`arn:aws:iam::000000000000:role/my-role`,...v}),t[10]=g,t[11]=v,t[12]=y):y=t[12];let b;t[13]===d.principalArn?b=t[14]:(b=(0,$.jsx)(G,{errors:[d.principalArn]}),t[13]=d.principalArn,t[14]=b);let x;t[15]!==y||t[16]!==b?(x=(0,$.jsxs)(K,{children:[h,y,b]}),t[15]=y,t[16]=b,t[17]=x):x=t[17];let S;t[18]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,$.jsx)(W,{children:(0,$.jsx)(`label`,{htmlFor:`ae-groups`,children:`Kubernetes groups`})}),t[18]=S):S=t[18];let C;t[19]===l?C=t[20]:(C=l(`kubernetesGroups`),t[19]=l,t[20]=C);let T;t[21]===C?T=t[22]:(T=(0,$.jsxs)(K,{children:[S,(0,$.jsx)(B,{id:`ae-groups`,placeholder:`system:masters`,...C})]}),t[21]=C,t[22]=T);let E;t[23]!==x||t[24]!==T?(E=(0,$.jsxs)(`form`,{className:`space-y-4`,id:`add-access-entry-form`,children:[x,T]}),t[23]=x,t[24]=T,t[25]=E):E=t[25];let D;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(D=(0,$.jsx)(le,{children:`Cancel`}),t[26]=D):D=t[26];let O;t[27]!==c||t[28]!==p?(O=e=>{e.preventDefault(),c(p)()},t[27]=c,t[28]=p,t[29]=O):O=t[29];let k=a.isPending?`Creating…`:`Create`,A;t[30]!==a.isPending||t[31]!==O||t[32]!==k?(A=(0,$.jsxs)(ce,{children:[D,(0,$.jsx)(se,{disabled:a.isPending,onClick:O,children:k})]}),t[30]=a.isPending,t[31]=O,t[32]=k,t[33]=A):A=t[33];let j;t[34]!==E||t[35]!==A?(j=(0,$.jsxs)(oe,{children:[m,E,A]}),t[34]=E,t[35]=A,t[36]=j):j=t[36];let M;return t[37]!==i||t[38]!==r||t[39]!==j?(M=(0,$.jsx)(J,{onOpenChange:i,open:r,children:j}),t[37]=i,t[38]=r,t[39]=j,t[40]=M):M=t[40],M}function we(e){return e.trim()}function Te(e){let t=(0,Z.c)(25),{clusterName:n}=e,r;t[0]===n?r=t[1]:(r=M(n),t[0]=n,t[1]=r);let{data:i}=o(r),a=b(),[s,c]=(0,Q.useState)(!1),[l,u]=(0,Q.useState)(),d;t[2]===i.accessEntries?d=t[3]:(d=i.accessEntries??[],t[2]=i.accessEntries,t[3]=d);let p=d,m;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,$.jsx)(`div`,{className:`mb-4 flex justify-end`,children:(0,$.jsx)(f,{onClick:()=>c(!0),size:`sm`,children:`Add access entry`})}),t[4]=m):m=t[4];let h;t[5]!==n||t[6]!==p?(h=p.length>0?(0,$.jsx)(`div`,{className:`space-y-4`,children:p.map(e=>(0,$.jsx)(xe,{clusterName:n,onDelete:u,principalArn:e},e))}):(0,$.jsx)(`p`,{className:`text-muted-foreground`,children:`No access entries.`}),t[5]=n,t[6]=p,t[7]=h):h=t[7];let g;t[8]!==n||t[9]!==s?(g=(0,$.jsx)(Ce,{clusterName:n,onOpenChange:c,open:s}),t[8]=n,t[9]=s,t[10]=g):g=t[10];let _=`Delete access entry for "${l??``}"?`,v;t[11]!==n||t[12]!==a||t[13]!==l?(v=()=>{l&&a.mutate({clusterName:n,principalArn:l},{onSuccess:()=>u(void 0)})},t[11]=n,t[12]=a,t[13]=l,t[14]=v):v=t[14];let y;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(y=e=>!e&&u(void 0),t[15]=y):y=t[15];let x=l!==void 0,S;t[16]!==a.isPending||t[17]!==_||t[18]!==v||t[19]!==x?(S=(0,$.jsx)(de,{description:_,isPending:a.isPending,onConfirm:v,onOpenChange:y,open:x,title:`Delete access entry`}),t[16]=a.isPending,t[17]=_,t[18]=v,t[19]=x,t[20]=S):S=t[20];let C;return t[21]!==S||t[22]!==h||t[23]!==g?(C=(0,$.jsxs)($.Fragment,{children:[m,h,g,S]}),t[21]=S,t[22]=h,t[23]=g,t[24]=C):C=t[24],C}var Ee=new Set([`CREATING`,`UPDATING`,`DELETING`]),De=5e3,Oe=`h-7 w-full rounded-md border border-input bg-input/20 px-2 text-sm`;function ke(e){if(e.trim()===``)return!0;try{return JSON.parse(e),!0}catch{return!1}}function Ae({clusterName:e,catalog:t,installed:n,open:r,onOpenChange:i}){let a=v(),o=t.filter(e=>!n.includes(e.addonName??``)),{formState:{errors:s},handleSubmit:c,register:l,reset:u,setValue:d,watch:f}=U({resolver:ie(E),defaultValues:{addonName:``,addonVersion:``,serviceAccountRoleArn:``,configurationValues:``}}),p=f(`addonName`),m=f(`addonVersion`),h=t.find(e=>e.addonName===p)?.addonVersions??[],g=h.find(e=>e.addonVersion===m)?.requiresIamPermissions??!1,_=e=>{let n=t.find(t=>t.addonName===e)?.addonVersions?.[0]?.addonVersion??``;d(`addonName`,e,{shouldValidate:!0}),d(`addonVersion`,n,{shouldValidate:!0})},y=async t=>{await a.mutateAsync({clusterName:e,addonName:t.addonName,addonVersion:t.addonVersion||void 0,serviceAccountRoleArn:t.serviceAccountRoleArn.trim()||void 0,configurationValues:t.configurationValues.trim()||void 0}),u(),i(!1)};return(0,$.jsx)(J,{onOpenChange:i,open:r,children:(0,$.jsxs)(oe,{className:`max-h-[85vh] overflow-y-auto`,children:[(0,$.jsx)(ue,{children:(0,$.jsx)(q,{children:`Add add-on`})}),(0,$.jsxs)(`form`,{className:`space-y-4`,id:`add-addon-form`,children:[(0,$.jsxs)(K,{children:[(0,$.jsx)(W,{children:(0,$.jsx)(`label`,{htmlFor:`addon-name`,children:`Add-on`})}),(0,$.jsxs)(`select`,{"aria-invalid":!!s.addonName,className:Oe,id:`addon-name`,onChange:e=>_(e.target.value),value:p,children:[(0,$.jsx)(`option`,{value:``,children:`Select add-on`}),o.map(e=>(0,$.jsx)(`option`,{value:e.addonName??``,children:e.addonName},e.addonName))]}),(0,$.jsx)(G,{errors:[s.addonName]})]}),(0,$.jsxs)(K,{children:[(0,$.jsx)(W,{children:(0,$.jsx)(`label`,{htmlFor:`addon-version`,children:`Version`})}),(0,$.jsx)(`select`,{"aria-invalid":!!s.addonVersion,className:Oe,disabled:h.length===0,id:`addon-version`,onChange:e=>d(`addonVersion`,e.target.value,{shouldValidate:!0}),value:m,children:h.map((e,t)=>(0,$.jsxs)(`option`,{value:e.addonVersion??``,children:[e.addonVersion,t===0?` (latest)`:``]},e.addonVersion))}),(0,$.jsx)(G,{errors:[s.addonVersion]})]}),(0,$.jsxs)(K,{children:[(0,$.jsx)(W,{children:(0,$.jsx)(`label`,{htmlFor:`addon-role`,children:`Service account IAM role ARN`})}),(0,$.jsx)(B,{id:`addon-role`,placeholder:`arn:aws:iam::…:role/…`,...l(`serviceAccountRoleArn`)}),g&&(0,$.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`This add-on needs IAM permissions — provide an IRSA role ARN.`})]}),(0,$.jsxs)(K,{children:[(0,$.jsx)(W,{children:(0,$.jsx)(`label`,{htmlFor:`addon-config`,children:`Configuration values (JSON)`})}),(0,$.jsx)(fe,{"aria-invalid":!!s.configurationValues,id:`addon-config`,placeholder:`{"replicaCount": 2}`,rows:4,...l(`configurationValues`)}),(0,$.jsx)(G,{errors:[s.configurationValues]})]})]}),(0,$.jsxs)(ce,{children:[(0,$.jsx)(le,{children:`Cancel`}),(0,$.jsx)(se,{disabled:a.isPending,onClick:e=>{e.preventDefault(),c(y)()},children:a.isPending?`Adding…`:`Add`})]})]})})}function je(e){let t=(0,Z.c)(54),{clusterName:n,addonName:r,current:i,versions:a,open:o,onOpenChange:s}=e,c=A(),[l,u]=(0,Q.useState)(i.addonVersion??``),[d,f]=(0,Q.useState)(i.serviceAccountRoleArn??``),[p,m]=(0,Q.useState)(i.configurationValues??``),[h,g]=(0,Q.useState)(),_,v;t[0]!==i.addonVersion||t[1]!==i.configurationValues||t[2]!==i.serviceAccountRoleArn||t[3]!==o?(_=()=>{o&&(u(i.addonVersion??``),f(i.serviceAccountRoleArn??``),m(i.configurationValues??``),g(void 0))},v=[o,i.addonVersion,i.serviceAccountRoleArn,i.configurationValues],t[0]=i.addonVersion,t[1]=i.configurationValues,t[2]=i.serviceAccountRoleArn,t[3]=o,t[4]=_,t[5]=v):(_=t[4],v=t[5]),(0,Q.useEffect)(_,v);let y;t[6]!==r||t[7]!==n||t[8]!==p||t[9]!==s||t[10]!==d||t[11]!==c||t[12]!==l?(y=()=>{if(!ke(p)){g(`Configuration must be valid JSON`);return}c.mutate({clusterName:n,addonName:r,addonVersion:l||void 0,serviceAccountRoleArn:d.trim()||void 0,configurationValues:p.trim()||void 0},{onSuccess:()=>s(!1)})},t[6]=r,t[7]=n,t[8]=p,t[9]=s,t[10]=d,t[11]=c,t[12]=l,t[13]=y):y=t[13];let b=y,x;t[14]===r?x=t[15]:(x=(0,$.jsx)(ue,{children:(0,$.jsxs)(q,{children:[`Update `,r]})}),t[14]=r,t[15]=x);let S;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,$.jsx)(W,{children:(0,$.jsx)(`label`,{htmlFor:`update-addon-version`,children:`Version`})}),t[16]=S):S=t[16];let C=a.length===0,w;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(w=e=>u(e.target.value),t[17]=w):w=t[17];let T;t[18]===a?T=t[19]:(T=a.map(Me),t[18]=a,t[19]=T);let E;t[20]!==C||t[21]!==T||t[22]!==l?(E=(0,$.jsxs)(K,{children:[S,(0,$.jsx)(`select`,{className:Oe,disabled:C,id:`update-addon-version`,onChange:w,value:l,children:T})]}),t[20]=C,t[21]=T,t[22]=l,t[23]=E):E=t[23];let D;t[24]===Symbol.for(`react.memo_cache_sentinel`)?(D=(0,$.jsx)(W,{children:(0,$.jsx)(`label`,{htmlFor:`update-addon-role`,children:`Service account IAM role ARN`})}),t[24]=D):D=t[24];let O;t[25]===Symbol.for(`react.memo_cache_sentinel`)?(O=e=>f(e.target.value),t[25]=O):O=t[25];let k;t[26]===d?k=t[27]:(k=(0,$.jsxs)(K,{children:[D,(0,$.jsx)(B,{id:`update-addon-role`,onChange:O,placeholder:`arn:aws:iam::…:role/…`,value:d})]}),t[26]=d,t[27]=k);let j;t[28]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,$.jsx)(W,{children:(0,$.jsx)(`label`,{htmlFor:`update-addon-config`,children:`Configuration values (JSON)`})}),t[28]=j):j=t[28];let M;t[29]===Symbol.for(`react.memo_cache_sentinel`)?(M=e=>m(e.target.value),t[29]=M):M=t[29];let N;t[30]===p?N=t[31]:(N=(0,$.jsxs)(K,{children:[j,(0,$.jsx)(fe,{id:`update-addon-config`,onChange:M,rows:4,value:p})]}),t[30]=p,t[31]=N);let P;t[32]!==k||t[33]!==N||t[34]!==E?(P=(0,$.jsxs)(`div`,{className:`space-y-4`,children:[E,k,N]}),t[32]=k,t[33]=N,t[34]=E,t[35]=P):P=t[35];let F;t[36]===h?F=t[37]:(F=h&&(0,$.jsx)(`p`,{className:`mt-2 text-xs text-destructive`,children:h}),t[36]=h,t[37]=F);let I;t[38]===Symbol.for(`react.memo_cache_sentinel`)?(I=(0,$.jsx)(le,{children:`Cancel`}),t[38]=I):I=t[38];let L;t[39]===b?L=t[40]:(L=e=>{e.preventDefault(),b()},t[39]=b,t[40]=L);let R=c.isPending?`Updating…`:`Update`,z;t[41]!==L||t[42]!==R||t[43]!==c.isPending?(z=(0,$.jsxs)(ce,{children:[I,(0,$.jsx)(se,{disabled:c.isPending,onClick:L,children:R})]}),t[41]=L,t[42]=R,t[43]=c.isPending,t[44]=z):z=t[44];let V;t[45]!==P||t[46]!==F||t[47]!==z||t[48]!==x?(V=(0,$.jsxs)(oe,{className:`max-h-[85vh] overflow-y-auto`,children:[x,P,F,z]}),t[45]=P,t[46]=F,t[47]=z,t[48]=x,t[49]=V):V=t[49];let H;return t[50]!==s||t[51]!==o||t[52]!==V?(H=(0,$.jsx)(J,{onOpenChange:s,open:o,children:V}),t[50]=s,t[51]=o,t[52]=V,t[53]=H):H=t[53],H}function Me(e){return(0,$.jsx)(`option`,{value:e,children:e},e)}function Ne(e){let t=(0,Z.c)(53),{clusterName:n,addonName:r,catalog:i,onDelete:o}=e,s;t[0]!==r||t[1]!==n?(s=V(n,r),t[0]=r,t[1]=n,t[2]=s):s=t[2];let c;t[3]===s?c=t[4]:(c={...s,refetchInterval:Fe},t[3]=s,t[4]=c);let{data:l}=a(c),[u,p]=(0,Q.useState)(!1),m=l?.addon,g=m?.health?.issues?.[0]?.message,_;t[5]!==r||t[6]!==i?(_=i.find(e=>e.addonName===r)?.addonVersions?.map(Pe).filter(Boolean)??[],t[5]=r,t[6]=i,t[7]=_):_=t[7];let v=_,y;t[8]===r?y=t[9]:(y=(0,$.jsx)(`span`,{children:r}),t[8]=r,t[9]=y);let b=m?.status,x;t[10]===b?x=t[11]:(x=h(b),t[10]=b,t[11]=x);let S=m?.status??`UNKNOWN`,C;t[12]!==x||t[13]!==S?(C=(0,$.jsx)(_e,{variant:x,children:S}),t[12]=x,t[13]=S,t[14]=C):C=t[14];let w;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(w=()=>p(!0),t[15]=w):w=t[15];let T;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(T=(0,$.jsx)(f,{"aria-label":`Update add-on`,onClick:w,size:`icon`,variant:`ghost`,children:(0,$.jsx)(ve,{className:`size-4`})}),t[16]=T):T=t[16];let E;t[17]!==r||t[18]!==o?(E=()=>o(r),t[17]=r,t[18]=o,t[19]=E):E=t[19];let D;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(D=(0,$.jsx)(d,{className:`size-4`}),t[20]=D):D=t[20];let O;t[21]===E?O=t[22]:(O=(0,$.jsx)(f,{"aria-label":`Remove add-on`,onClick:E,size:`icon`,variant:`ghost`,children:D}),t[21]=E,t[22]=O);let k;t[23]!==O||t[24]!==C?(k=(0,$.jsxs)(`div`,{className:`flex items-center gap-1`,children:[C,T,O]}),t[23]=O,t[24]=C,t[25]=k):k=t[25];let A;t[26]!==k||t[27]!==y?(A=(0,$.jsx)(Y.Header,{children:(0,$.jsxs)(`div`,{className:`flex items-center justify-between`,children:[y,k]})}),t[26]=k,t[27]=y,t[28]=A):A=t[28];let j=m?.addonVersion,M;t[29]===j?M=t[30]:(M=(0,$.jsx)(X,{label:`Version`,value:j}),t[29]=j,t[30]=M);let N=m?.serviceAccountRoleArn,P;t[31]===N?P=t[32]:(P=(0,$.jsx)(X,{label:`IRSA role`,value:N}),t[31]=N,t[32]=P);let F;t[33]===g?F=t[34]:(F=g&&(0,$.jsx)(X,{label:`Issue`,value:(0,$.jsx)(`span`,{className:`text-destructive`,children:g})}),t[33]=g,t[34]=F);let I;t[35]!==M||t[36]!==P||t[37]!==F?(I=(0,$.jsxs)(Y.Content,{children:[M,P,F]}),t[35]=M,t[36]=P,t[37]=F,t[38]=I):I=t[38];let L=m?.addonVersion,R=m?.serviceAccountRoleArn,z=m?.configurationValues,B;t[39]!==L||t[40]!==R||t[41]!==z?(B={addonVersion:L,serviceAccountRoleArn:R,configurationValues:z},t[39]=L,t[40]=R,t[41]=z,t[42]=B):B=t[42];let H;t[43]!==r||t[44]!==n||t[45]!==u||t[46]!==B||t[47]!==v?(H=(0,$.jsx)(je,{addonName:r,clusterName:n,current:B,onOpenChange:p,open:u,versions:v}),t[43]=r,t[44]=n,t[45]=u,t[46]=B,t[47]=v,t[48]=H):H=t[48];let ee;return t[49]!==A||t[50]!==I||t[51]!==H?(ee=(0,$.jsxs)(Y,{children:[A,I,H]}),t[49]=A,t[50]=I,t[51]=H,t[52]=ee):ee=t[52],ee}function Pe(e){return e.addonVersion??``}function Fe(e){return Ee.has(e.state.data?.addon?.status??``)?De:!1}function Ie(e){let t=(0,Z.c)(31),{clusterName:n}=e,r;t[0]===n?r=t[1]:(r=N(n),t[0]=n,t[1]=r);let{data:i}=o(r),{data:s}=a(P),c=y(),[l,u]=(0,Q.useState)(!1),[d,p]=(0,Q.useState)(),m;t[2]===i.addons?m=t[3]:(m=i.addons??[],t[2]=i.addons,t[3]=m);let h=m,g;t[4]===s?.addons?g=t[5]:(g=s?.addons??[],t[4]=s?.addons,t[5]=g);let _=g,v;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,$.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Add-on manifests are staged; activation completes when the cluster reports the workload ready.`}),t[6]=v):v=t[6];let b;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(b=(0,$.jsxs)(`div`,{className:`mb-4 flex items-center justify-between gap-4`,children:[v,(0,$.jsx)(f,{onClick:()=>u(!0),size:`sm`,children:`Add add-on`})]}),t[7]=b):b=t[7];let x;t[8]!==h||t[9]!==_||t[10]!==n?(x=h.length>0?(0,$.jsx)(`div`,{className:`space-y-4`,children:h.map(e=>(0,$.jsx)(Ne,{addonName:e,catalog:_,clusterName:n,onDelete:p},e))}):(0,$.jsx)(`p`,{className:`text-muted-foreground`,children:`No add-ons installed.`}),t[8]=h,t[9]=_,t[10]=n,t[11]=x):x=t[11];let S;t[12]!==h||t[13]!==_||t[14]!==n||t[15]!==l?(S=(0,$.jsx)(Ae,{catalog:_,clusterName:n,installed:h,onOpenChange:u,open:l}),t[12]=h,t[13]=_,t[14]=n,t[15]=l,t[16]=S):S=t[16];let C=`Remove add-on "${d??``}" from the cluster?`,w;t[17]!==n||t[18]!==c||t[19]!==d?(w=()=>{d&&c.mutate({clusterName:n,addonName:d},{onSuccess:()=>p(void 0)})},t[17]=n,t[18]=c,t[19]=d,t[20]=w):w=t[20];let T;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(T=e=>!e&&p(void 0),t[21]=T):T=t[21];let E=d!==void 0,D;t[22]!==c.isPending||t[23]!==E||t[24]!==C||t[25]!==w?(D=(0,$.jsx)(de,{confirmLabel:`Remove`,description:C,isPending:c.isPending,onConfirm:w,onOpenChange:T,open:E,pendingLabel:`Removing…`,title:`Remove add-on`}),t[22]=c.isPending,t[23]=E,t[24]=C,t[25]=w,t[26]=D):D=t[26];let O;return t[27]!==D||t[28]!==x||t[29]!==S?(O=(0,$.jsxs)($.Fragment,{children:[b,x,S,D]}),t[27]=D,t[28]=x,t[29]=S,t[30]=O):O=t[30],O}function Le(e){let t=(0,Z.c)(6),{to:n,id:r}=e,i;t[0]===r?i=t[1]:(i={id:r},t[0]=r,t[1]=i);let a;return t[2]!==r||t[3]!==i||t[4]!==n?(a=(0,$.jsx)(s,{className:`font-mono text-primary underline-offset-2 hover:underline`,params:i,to:n,children:r}),t[2]=r,t[3]=i,t[4]=n,t[5]=a):a=t[5],a}function Re(e){let t=(0,Z.c)(45),{cluster:n}=e,r=n?.resourcesVpcConfig,i;t[0]===r?.subnetIds?i=t[1]:(i=r?.subnetIds??[],t[0]=r?.subnetIds,t[1]=i);let a=i,o;t[2]===r?.securityGroupIds?o=t[3]:(o=r?.securityGroupIds??[],t[2]=r?.securityGroupIds,t[3]=o);let s=o,c;t[4]===r?.publicAccessCidrs?c=t[5]:(c=r?.publicAccessCidrs??[],t[4]=r?.publicAccessCidrs,t[5]=c);let l=c,u;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,$.jsx)(Y.Header,{children:`VPC`}),t[6]=u):u=t[6];let d;t[7]===r?d=t[8]:(d=r?.vpcId?(0,$.jsx)(Le,{id:r.vpcId,to:`/ec2/describe-vpcs/$id`}):void 0,t[7]=r,t[8]=d);let f;t[9]===d?f=t[10]:(f=(0,$.jsx)(X,{label:`VPC`,value:d}),t[9]=d,t[10]=f);let p=n?.endpoint,m;t[11]===p?m=t[12]:(m=(0,$.jsx)(X,{label:`API server endpoint`,value:p}),t[11]=p,t[12]=m);let h=r?.endpointPublicAccess?`Enabled`:`Disabled`,g;t[13]===h?g=t[14]:(g=(0,$.jsx)(X,{label:`Public access`,value:h}),t[13]=h,t[14]=g);let _=r?.endpointPrivateAccess?`Enabled`:`Disabled`,v;t[15]===_?v=t[16]:(v=(0,$.jsx)(X,{label:`Private access`,value:_}),t[15]=_,t[16]=v);let y;t[17]!==l||t[18]!==r?.endpointPublicAccess?(y=r?.endpointPublicAccess&&(0,$.jsx)(X,{label:`Public access CIDRs`,value:l.length>0?(0,$.jsx)(`div`,{className:`space-y-1 font-mono text-xs`,children:l.map(Ve)}):`Any (0.0.0.0/0)`}),t[17]=l,t[18]=r?.endpointPublicAccess,t[19]=y):y=t[19];let b;t[20]!==g||t[21]!==v||t[22]!==y||t[23]!==f||t[24]!==m?(b=(0,$.jsxs)(Y,{children:[u,(0,$.jsxs)(Y.Content,{children:[f,m,g,v,y]})]}),t[20]=g,t[21]=v,t[22]=y,t[23]=f,t[24]=m,t[25]=b):b=t[25];let x;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,$.jsx)(Y.Header,{children:`Subnets`}),t[26]=x):x=t[26];let S;t[27]===a?S=t[28]:(S=(0,$.jsxs)(Y,{children:[x,(0,$.jsx)(Y.Content,{children:a.length>0?(0,$.jsx)(`div`,{className:`space-y-1`,children:a.map(Be)}):(0,$.jsx)(`p`,{className:`text-muted-foreground`,children:`No subnets.`})})]}),t[27]=a,t[28]=S);let C;t[29]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,$.jsx)(Y.Header,{children:`Security groups`}),t[29]=C):C=t[29];let w;t[30]===r?w=t[31]:(w=r?.clusterSecurityGroupId?(0,$.jsx)(Le,{id:r.clusterSecurityGroupId,to:`/ec2/describe-security-groups/$id`}):void 0,t[30]=r,t[31]=w);let T;t[32]===w?T=t[33]:(T=(0,$.jsx)(X,{label:`Cluster security group`,value:w}),t[32]=w,t[33]=T);let E;t[34]===s?E=t[35]:(E=s.length>0?(0,$.jsx)(`div`,{className:`space-y-1`,children:s.map(ze)}):`—`,t[34]=s,t[35]=E);let D;t[36]===E?D=t[37]:(D=(0,$.jsx)(X,{label:`Additional security groups`,value:E}),t[36]=E,t[37]=D);let O;t[38]!==T||t[39]!==D?(O=(0,$.jsxs)(Y,{children:[C,(0,$.jsxs)(Y.Content,{children:[T,D]})]}),t[38]=T,t[39]=D,t[40]=O):O=t[40];let k;return t[41]!==b||t[42]!==S||t[43]!==O?(k=(0,$.jsxs)($.Fragment,{children:[b,S,O]}),t[41]=b,t[42]=S,t[43]=O,t[44]=k):k=t[44],k}function ze(e){return(0,$.jsx)(Le,{id:e,to:`/ec2/describe-security-groups/$id`},e)}function Be(e){return(0,$.jsx)(Le,{id:e,to:`/ec2/describe-subnets/$id`},e)}function Ve(e){return(0,$.jsx)(`div`,{children:e},e)}function He(e){let t=(0,Z.c)(50),{clusterName:n,nodegroupName:r,current:i,open:a,onOpenChange:o}=e,s=g(),[c,l]=(0,Q.useState)(i.minSize??0),[u,d]=(0,Q.useState)(i.desiredSize??0),[f,p]=(0,Q.useState)(i.maxSize??0),[m,h]=(0,Q.useState)(),_,v;t[0]!==i.desiredSize||t[1]!==i.maxSize||t[2]!==i.minSize||t[3]!==a?(_=()=>{a&&(l(i.minSize??0),d(i.desiredSize??0),p(i.maxSize??0),h(void 0))},v=[a,i.minSize,i.desiredSize,i.maxSize],t[0]=i.desiredSize,t[1]=i.maxSize,t[2]=i.minSize,t[3]=a,t[4]=_,t[5]=v):(_=t[4],v=t[5]),(0,Q.useEffect)(_,v);let y;t[6]!==n||t[7]!==u||t[8]!==f||t[9]!==c||t[10]!==r||t[11]!==o||t[12]!==s?(y=()=>{if(!(c<=u&&u<=f)){h(`Sizes must satisfy min ≤ desired ≤ max`);return}s.mutate({clusterName:n,nodegroupName:r,minSize:c,desiredSize:u,maxSize:f},{onSuccess:()=>o(!1)})},t[6]=n,t[7]=u,t[8]=f,t[9]=c,t[10]=r,t[11]=o,t[12]=s,t[13]=y):y=t[13];let b=y,x;t[14]===r?x=t[15]:(x=(0,$.jsx)(ue,{children:(0,$.jsxs)(q,{children:[`Scale `,r]})}),t[14]=r,t[15]=x);let S;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,$.jsx)(W,{children:(0,$.jsx)(`label`,{htmlFor:`scale-min`,children:`Min`})}),t[16]=S):S=t[16];let C;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(C=e=>l(Number(e.target.value)),t[17]=C):C=t[17];let w;t[18]===c?w=t[19]:(w=(0,$.jsxs)(K,{children:[S,(0,$.jsx)(B,{id:`scale-min`,onChange:C,type:`number`,value:c})]}),t[18]=c,t[19]=w);let T;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(T=(0,$.jsx)(W,{children:(0,$.jsx)(`label`,{htmlFor:`scale-desired`,children:`Desired`})}),t[20]=T):T=t[20];let E;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(E=e=>d(Number(e.target.value)),t[21]=E):E=t[21];let D;t[22]===u?D=t[23]:(D=(0,$.jsxs)(K,{children:[T,(0,$.jsx)(B,{id:`scale-desired`,onChange:E,type:`number`,value:u})]}),t[22]=u,t[23]=D);let O;t[24]===Symbol.for(`react.memo_cache_sentinel`)?(O=(0,$.jsx)(W,{children:(0,$.jsx)(`label`,{htmlFor:`scale-max`,children:`Max`})}),t[24]=O):O=t[24];let k;t[25]===Symbol.for(`react.memo_cache_sentinel`)?(k=e=>p(Number(e.target.value)),t[25]=k):k=t[25];let A;t[26]===f?A=t[27]:(A=(0,$.jsxs)(K,{children:[O,(0,$.jsx)(B,{id:`scale-max`,onChange:k,type:`number`,value:f})]}),t[26]=f,t[27]=A);let j;t[28]!==D||t[29]!==A||t[30]!==w?(j=(0,$.jsxs)(`div`,{className:`grid grid-cols-3 gap-3`,children:[w,D,A]}),t[28]=D,t[29]=A,t[30]=w,t[31]=j):j=t[31];let M;t[32]===m?M=t[33]:(M=m&&(0,$.jsx)(`p`,{className:`mt-2 text-xs text-destructive`,children:m}),t[32]=m,t[33]=M);let N;t[34]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,$.jsx)(le,{children:`Cancel`}),t[34]=N):N=t[34];let P;t[35]===b?P=t[36]:(P=e=>{e.preventDefault(),b()},t[35]=b,t[36]=P);let F=s.isPending?`Scaling…`:`Scale`,I;t[37]!==s.isPending||t[38]!==P||t[39]!==F?(I=(0,$.jsxs)(ce,{children:[N,(0,$.jsx)(se,{disabled:s.isPending,onClick:P,children:F})]}),t[37]=s.isPending,t[38]=P,t[39]=F,t[40]=I):I=t[40];let L;t[41]!==j||t[42]!==M||t[43]!==I||t[44]!==x?(L=(0,$.jsxs)(oe,{children:[x,j,M,I]}),t[41]=j,t[42]=M,t[43]=I,t[44]=x,t[45]=L):L=t[45];let R;return t[46]!==o||t[47]!==a||t[48]!==L?(R=(0,$.jsx)(J,{onOpenChange:o,open:a,children:L}),t[46]=o,t[47]=a,t[48]=L,t[49]=R):R=t[49],R}function Ue(e){let t=(0,Z.c)(64),{clusterName:n,clusterVersion:r,nodegroupName:i,onDelete:o}=e,s;t[0]!==n||t[1]!==i?(s=ee(n,i),t[0]=n,t[1]=i,t[2]=s):s=t[2];let{data:c}=a(s),l=p(),u=c?.nodegroup,m=u?.scalingConfig,[h,g]=(0,Q.useState)(!1),[_,v]=(0,Q.useState)(!1),y=!!r&&!!u?.version&&u.version!==r,b;t[3]===i?b=t[4]:(b=(0,$.jsx)(`span`,{children:i}),t[3]=i,t[4]=b);let x;t[5]===y?x=t[6]:(x=y&&(0,$.jsx)(f,{"aria-label":`Update node group version`,onClick:()=>v(!0),size:`icon`,variant:`ghost`,children:(0,$.jsx)(ve,{className:`size-4`})}),t[5]=y,t[6]=x);let S;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(S=()=>g(!0),t[7]=S):S=t[7];let C;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,$.jsx)(f,{"aria-label":`Scale node group`,onClick:S,size:`icon`,variant:`ghost`,children:(0,$.jsx)(ye,{className:`size-4`})}),t[8]=C):C=t[8];let w;t[9]!==i||t[10]!==o?(w=()=>o(i),t[9]=i,t[10]=o,t[11]=w):w=t[11];let T;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(T=(0,$.jsx)(d,{className:`size-4`}),t[12]=T):T=t[12];let E;t[13]===w?E=t[14]:(E=(0,$.jsx)(f,{"aria-label":`Delete node group`,onClick:w,size:`icon`,variant:`ghost`,children:T}),t[13]=w,t[14]=E);let D;t[15]!==x||t[16]!==E?(D=(0,$.jsxs)(`div`,{className:`flex items-center gap-1`,children:[x,C,E]}),t[15]=x,t[16]=E,t[17]=D):D=t[17];let O;t[18]!==b||t[19]!==D?(O=(0,$.jsx)(Y.Header,{children:(0,$.jsxs)(`div`,{className:`flex items-center justify-between`,children:[b,D]})}),t[18]=b,t[19]=D,t[20]=O):O=t[20];let k=u?.status,A;t[21]===k?A=t[22]:(A=(0,$.jsx)(X,{label:`Status`,value:k}),t[21]=k,t[22]=A);let j=y?`${u?.version} (cluster on ${r})`:u?.version,M;t[23]===j?M=t[24]:(M=(0,$.jsx)(X,{label:`Kubernetes version`,value:j}),t[23]=j,t[24]=M);let N;t[25]===u?.instanceTypes?N=t[26]:(N=u?.instanceTypes?.join(`, `),t[25]=u?.instanceTypes,t[26]=N);let P;t[27]===N?P=t[28]:(P=(0,$.jsx)(X,{label:`Instance types`,value:N}),t[27]=N,t[28]=P);let F=u?.amiType,I;t[29]===F?I=t[30]:(I=(0,$.jsx)(X,{label:`AMI type`,value:F}),t[29]=F,t[30]=I);let L=u?.capacityType,R;t[31]===L?R=t[32]:(R=(0,$.jsx)(X,{label:`Capacity type`,value:L}),t[31]=L,t[32]=R);let z=m?`${m.minSize} / ${m.desiredSize} / ${m.maxSize}`:void 0,B;t[33]===z?B=t[34]:(B=(0,$.jsx)(X,{label:`Scaling (min / desired / max)`,value:z}),t[33]=z,t[34]=B);let V;t[35]!==A||t[36]!==M||t[37]!==P||t[38]!==I||t[39]!==R||t[40]!==B?(V=(0,$.jsxs)(Y.Content,{children:[A,M,P,I,R,B]}),t[35]=A,t[36]=M,t[37]=P,t[38]=I,t[39]=R,t[40]=B,t[41]=V):V=t[41];let H;t[42]===m?H=t[43]:(H=m??{},t[42]=m,t[43]=H);let te;t[44]!==n||t[45]!==i||t[46]!==h||t[47]!==H?(te=(0,$.jsx)(He,{clusterName:n,current:H,nodegroupName:i,onOpenChange:g,open:h}),t[44]=n,t[45]=i,t[46]=h,t[47]=H,t[48]=te):te=t[48];let ne=`Update node group "${i}" from ${u?.version} to ${r}? Nodes are replaced in a rolling update.`,re;t[49]!==n||t[50]!==r||t[51]!==i||t[52]!==l?(re=()=>l.mutate({clusterName:n,nodegroupName:i,version:r},{onSuccess:()=>v(!1)}),t[49]=n,t[50]=r,t[51]=i,t[52]=l,t[53]=re):re=t[53];let U;t[54]!==_||t[55]!==ne||t[56]!==re||t[57]!==l.isPending?(U=(0,$.jsx)(de,{confirmLabel:`Update`,description:ne,isPending:l.isPending,onConfirm:re,onOpenChange:v,open:_,title:`Update node group version`}),t[54]=_,t[55]=ne,t[56]=re,t[57]=l.isPending,t[58]=U):U=t[58];let ie;return t[59]!==O||t[60]!==V||t[61]!==te||t[62]!==U?(ie=(0,$.jsxs)(Y,{children:[O,V,te,U]}),t[59]=O,t[60]=V,t[61]=te,t[62]=U,t[63]=ie):ie=t[63],ie}function We({clusterName:e,vpcId:t,open:n,onOpenChange:r}){let{data:i}=a(ne),{data:o}=a(R),s=S(),c=i?.Roles??[],l=(o?.Subnets??[]).filter(e=>e.VpcId===t),{formState:{errors:u},handleSubmit:d,register:f,reset:p,setValue:m,watch:h}=U({resolver:ie(x),defaultValues:{nodegroupName:``,nodeRole:``,subnetIds:[],instanceTypes:`t3.medium`,amiType:`AL2_x86_64`,capacityType:`ON_DEMAND`,diskSize:20,minSize:1,desiredSize:2,maxSize:3}}),g=h(`subnetIds`),_=e=>{m(`subnetIds`,g.includes(e)?g.filter(t=>t!==e):[...g,e],{shouldValidate:!0})},v=async t=>{await s.mutateAsync({clusterName:e,nodegroupName:t.nodegroupName,nodeRole:t.nodeRole,subnetIds:t.subnetIds,instanceTypes:t.instanceTypes.split(`,`).map(e=>e.trim()).filter(Boolean),amiType:t.amiType,capacityType:t.capacityType,diskSize:t.diskSize,minSize:t.minSize,desiredSize:t.desiredSize,maxSize:t.maxSize}),p(),r(!1)};return(0,$.jsx)(J,{onOpenChange:r,open:n,children:(0,$.jsxs)(oe,{className:`max-h-[85vh] overflow-y-auto`,children:[(0,$.jsx)(ue,{children:(0,$.jsx)(q,{children:`Add node group`})}),(0,$.jsxs)(`form`,{className:`space-y-4`,id:`add-nodegroup-form`,children:[(0,$.jsxs)(K,{children:[(0,$.jsx)(W,{children:(0,$.jsx)(`label`,{htmlFor:`ng-name`,children:`Name`})}),(0,$.jsx)(B,{"aria-invalid":!!u.nodegroupName,id:`ng-name`,placeholder:`my-nodegroup`,...f(`nodegroupName`)}),(0,$.jsx)(G,{errors:[u.nodegroupName]})]}),(0,$.jsxs)(K,{children:[(0,$.jsx)(W,{children:(0,$.jsx)(`label`,{htmlFor:`ng-role`,children:`Node IAM role`})}),(0,$.jsxs)(`select`,{"aria-invalid":!!u.nodeRole,className:`h-7 w-full rounded-md border border-input bg-input/20 px-2 text-sm`,id:`ng-role`,...f(`nodeRole`),children:[(0,$.jsx)(`option`,{value:``,children:`Select role`}),c.map(e=>(0,$.jsx)(`option`,{value:e.Arn??``,children:e.RoleName},e.Arn))]}),(0,$.jsx)(G,{errors:[u.nodeRole]})]}),(0,$.jsxs)(K,{children:[(0,$.jsx)(W,{children:`Subnets`}),l.length===0?(0,$.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No subnets in the cluster VPC.`}):(0,$.jsx)(`div`,{className:`space-y-1`,children:l.map(e=>(0,$.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,$.jsx)(`input`,{"aria-label":`Subnet ${e.SubnetId}`,checked:g.includes(e.SubnetId??``),onChange:()=>_(e.SubnetId??``),type:`checkbox`}),(0,$.jsxs)(`span`,{className:`font-mono`,children:[e.SubnetId,` · `,e.CidrBlock]})]},e.SubnetId))}),(0,$.jsx)(G,{errors:[u.subnetIds]})]}),(0,$.jsxs)(K,{children:[(0,$.jsx)(W,{children:(0,$.jsx)(`label`,{htmlFor:`ng-instance-types`,children:`Instance types`})}),(0,$.jsx)(B,{id:`ng-instance-types`,placeholder:`t3.medium, t3.large`,...f(`instanceTypes`)}),(0,$.jsx)(G,{errors:[u.instanceTypes]})]}),(0,$.jsxs)(`div`,{className:`grid grid-cols-2 gap-3`,children:[(0,$.jsxs)(K,{children:[(0,$.jsx)(W,{children:(0,$.jsx)(`label`,{htmlFor:`ng-ami`,children:`AMI type`})}),(0,$.jsx)(`select`,{className:`h-7 w-full rounded-md border border-input bg-input/20 px-2 text-sm`,id:`ng-ami`,...f(`amiType`),children:C.map(e=>(0,$.jsx)(`option`,{value:e,children:e},e))})]}),(0,$.jsxs)(K,{children:[(0,$.jsx)(W,{children:(0,$.jsx)(`label`,{htmlFor:`ng-capacity`,children:`Capacity type`})}),(0,$.jsx)(`select`,{className:`h-7 w-full rounded-md border border-input bg-input/20 px-2 text-sm`,id:`ng-capacity`,...f(`capacityType`),children:T.map(e=>(0,$.jsx)(`option`,{value:e,children:e},e))})]})]}),(0,$.jsxs)(`div`,{className:`grid grid-cols-4 gap-3`,children:[(0,$.jsxs)(K,{children:[(0,$.jsx)(W,{children:(0,$.jsx)(`label`,{htmlFor:`ng-disk`,children:`Disk (GB)`})}),(0,$.jsx)(B,{id:`ng-disk`,type:`number`,...f(`diskSize`,{valueAsNumber:!0})})]}),(0,$.jsxs)(K,{children:[(0,$.jsx)(W,{children:(0,$.jsx)(`label`,{htmlFor:`ng-min`,children:`Min`})}),(0,$.jsx)(B,{id:`ng-min`,type:`number`,...f(`minSize`,{valueAsNumber:!0})})]}),(0,$.jsxs)(K,{children:[(0,$.jsx)(W,{children:(0,$.jsx)(`label`,{htmlFor:`ng-desired`,children:`Desired`})}),(0,$.jsx)(B,{id:`ng-desired`,type:`number`,...f(`desiredSize`,{valueAsNumber:!0})})]}),(0,$.jsxs)(K,{children:[(0,$.jsx)(W,{children:(0,$.jsx)(`label`,{htmlFor:`ng-max`,children:`Max`})}),(0,$.jsx)(B,{id:`ng-max`,type:`number`,...f(`maxSize`,{valueAsNumber:!0})})]})]}),(0,$.jsx)(G,{errors:[u.desiredSize]})]}),(0,$.jsxs)(ce,{children:[(0,$.jsx)(le,{children:`Cancel`}),(0,$.jsx)(se,{disabled:s.isPending,onClick:e=>{e.preventDefault(),d(v)()},children:s.isPending?`Creating…`:`Create`})]})]})})}function Ge(e){let t=(0,Z.c)(27),{clusterName:n,clusterVersion:r,vpcId:i}=e,a;t[0]===n?a=t[1]:(a=I(n),t[0]=n,t[1]=a);let{data:s}=o(a),c=k(),[l,u]=(0,Q.useState)(!1),[d,p]=(0,Q.useState)(),m;t[2]===s.nodegroups?m=t[3]:(m=s.nodegroups??[],t[2]=s.nodegroups,t[3]=m);let h=m,g;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,$.jsx)(`div`,{className:`mb-4 flex justify-end`,children:(0,$.jsx)(f,{onClick:()=>u(!0),size:`sm`,children:`Add node group`})}),t[4]=g):g=t[4];let _;t[5]!==n||t[6]!==r||t[7]!==h?(_=h.length>0?(0,$.jsx)(`div`,{className:`space-y-4`,children:h.map(e=>(0,$.jsx)(Ue,{clusterName:n,clusterVersion:r,nodegroupName:e,onDelete:p},e))}):(0,$.jsx)(`p`,{className:`text-muted-foreground`,children:`No node groups.`}),t[5]=n,t[6]=r,t[7]=h,t[8]=_):_=t[8];let v;t[9]!==n||t[10]!==l||t[11]!==i?(v=(0,$.jsx)(We,{clusterName:n,onOpenChange:u,open:l,vpcId:i}),t[9]=n,t[10]=l,t[11]=i,t[12]=v):v=t[12];let y=`Delete node group "${d??``}"? This terminates its nodes.`,b;t[13]!==n||t[14]!==c||t[15]!==d?(b=()=>{d&&c.mutate({clusterName:n,nodegroupName:d},{onSuccess:()=>p(void 0)})},t[13]=n,t[14]=c,t[15]=d,t[16]=b):b=t[16];let x;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(x=e=>!e&&p(void 0),t[17]=x):x=t[17];let S=d!==void 0,C;t[18]!==c.isPending||t[19]!==y||t[20]!==b||t[21]!==S?(C=(0,$.jsx)(de,{description:y,isPending:c.isPending,onConfirm:b,onOpenChange:x,open:S,title:`Delete node group`}),t[18]=c.isPending,t[19]=y,t[20]=b,t[21]=S,t[22]=C):C=t[22];let w;return t[23]!==C||t[24]!==_||t[25]!==v?(w=(0,$.jsxs)($.Fragment,{children:[g,_,v,C]}),t[23]=C,t[24]=_,t[25]=v,t[26]=w):w=t[26],w}var Ke=`ap-southeast-2`;function qe(e){switch(e??``){case`ACTIVE`:return`default`;case`FAILED`:return`destructive`;default:return`secondary`}}function Je(e){let t=(0,Z.c)(89),{clusterName:n}=e,r=F(),[a,s]=(0,Q.useState)(!1),p;t[0]===n?p=t[1]:(p=te(n),t[0]=n,t[1]=p);let{data:h}=o(p),g=m(),_=h.cluster,v;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(v={type:`bin`,value:`aws eks update-kubeconfig`},t[2]=v):v=t[2];let y;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(y={type:`flag`,value:` --name `},t[3]=y):y=t[3];let b;t[4]===n?b=t[5]:(b={type:`value`,value:n},t[4]=n,t[5]=b);let x;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(x={type:`flag`,value:` --region `},t[6]=x):x=t[6];let S;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(S={type:`value`,value:Ke},t[7]=S):S=t[7];let C;t[8]===b?C=t[9]:(C={label:`Configure kubectl`,parts:[v,y,b,x,S]},t[8]=b,t[9]=C);let w;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(w={label:`Verify access`,parts:[{type:`bin`,value:`kubectl get nodes`}]},t[10]=w):w=t[10];let T;t[11]===C?T=t[12]:(T=[C,w],t[11]=C,t[12]=T);let E=T,D;t[13]!==n||t[14]!==g||t[15]!==r?(D=function(){g.mutate(n,{onSuccess:()=>{r({to:`/eks/list-clusters`})}})},t[13]=n,t[14]=g,t[15]=r,t[16]=D):D=t[16];let O=D,k;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(k=(0,$.jsx)(l,{to:`/eks/list-clusters`,children:`Clusters`}),t[17]=k):k=t[17];let A;t[18]===Symbol.for(`react.memo_cache_sentinel`)?(A=()=>s(!0),t[18]=A):A=t[18];let j;t[19]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,$.jsxs)(f,{onClick:A,size:`sm`,variant:`destructive`,children:[(0,$.jsx)(d,{className:`size-4`}),`Delete`]}),t[19]=j):j=t[19];let M=_?.status,N;t[20]===M?N=t[21]:(N=qe(M),t[20]=M,t[21]=N);let P=_?.status??`UNKNOWN`,I;t[22]!==N||t[23]!==P?(I=(0,$.jsxs)(`div`,{className:`flex items-center gap-2`,children:[j,(0,$.jsx)(_e,{variant:N,children:P})]}),t[22]=N,t[23]=P,t[24]=I):I=t[24];let L;t[25]!==n||t[26]!==I?(L=(0,$.jsx)(ae,{actions:I,subtitle:`Cluster Details`,title:n}),t[25]=n,t[26]=I,t[27]=L):L=t[27];let R;t[28]!==g.error||t[29]!==g.isError?(R=g.isError&&(0,$.jsx)(i,{error:g.error instanceof Error?g.error:void 0,msg:`Failed to delete cluster.`}),t[28]=g.error,t[29]=g.isError,t[30]=R):R=t[30];let z;t[31]===Symbol.for(`react.memo_cache_sentinel`)?(z=(0,$.jsxs)(me,{children:[(0,$.jsx)(pe,{value:`overview`,children:`Overview`}),(0,$.jsx)(pe,{value:`compute`,children:`Compute`}),(0,$.jsx)(pe,{value:`addons`,children:`Add-ons`}),(0,$.jsx)(pe,{value:`access`,children:`Access`}),(0,$.jsx)(pe,{value:`networking`,children:`Networking`}),(0,$.jsx)(pe,{value:`connect`,children:`Connect`})]}),t[31]=z):z=t[31];let B;t[32]===Symbol.for(`react.memo_cache_sentinel`)?(B=(0,$.jsx)(Y.Header,{children:`Cluster`}),t[32]=B):B=t[32];let V=_?.arn,H;t[33]===V?H=t[34]:(H=(0,$.jsx)(X,{label:`ARN`,value:V}),t[33]=V,t[34]=H);let ee=_?.status,ne;t[35]===ee?ne=t[36]:(ne=(0,$.jsx)(X,{label:`Status`,value:ee}),t[35]=ee,t[36]=ne);let re=_?.version,U;t[37]===re?U=t[38]:(U=(0,$.jsx)(X,{label:`Kubernetes version`,value:re}),t[37]=re,t[38]=U);let ie=_?.platformVersion,W;t[39]===ie?W=t[40]:(W=(0,$.jsx)(X,{label:`Platform version`,value:ie}),t[39]=ie,t[40]=W);let G=_?.endpoint,K;t[41]===G?K=t[42]:(K=(0,$.jsx)(X,{label:`Endpoint`,value:G}),t[41]=G,t[42]=K);let oe=_?.identity?.oidc?.issuer,q;t[43]===oe?q=t[44]:(q=(0,$.jsx)(X,{label:`OIDC issuer`,value:oe}),t[43]=oe,t[44]=q);let se=_?.resourcesVpcConfig?.vpcId,ce;t[45]===se?ce=t[46]:(ce=(0,$.jsx)(X,{label:`VPC`,value:se}),t[45]=se,t[46]=ce);let le=_?.createdAt,ue;t[47]===le?ue=t[48]:(ue=c(le),t[47]=le,t[48]=ue);let J;t[49]===ue?J=t[50]:(J=(0,$.jsx)(X,{label:`Created at`,value:ue}),t[49]=ue,t[50]=J);let fe;t[51]!==H||t[52]!==ne||t[53]!==U||t[54]!==W||t[55]!==K||t[56]!==q||t[57]!==ce||t[58]!==J?(fe=(0,$.jsx)(he,{value:`overview`,children:(0,$.jsxs)(Y,{children:[B,(0,$.jsxs)(Y.Content,{children:[H,ne,U,W,K,q,ce,J]})]})}),t[51]=H,t[52]=ne,t[53]=U,t[54]=W,t[55]=K,t[56]=q,t[57]=ce,t[58]=J,t[59]=fe):fe=t[59];let ve=_?.version,ye=_?.resourcesVpcConfig?.vpcId,be;t[60]!==n||t[61]!==ve||t[62]!==ye?(be=(0,$.jsx)(he,{value:`compute`,children:(0,$.jsx)(Ge,{clusterName:n,clusterVersion:ve,vpcId:ye})}),t[60]=n,t[61]=ve,t[62]=ye,t[63]=be):be=t[63];let xe;t[64]===n?xe=t[65]:(xe=(0,$.jsx)(he,{value:`addons`,children:(0,$.jsx)(Ie,{clusterName:n})}),t[64]=n,t[65]=xe);let Se;t[66]===n?Se=t[67]:(Se=(0,$.jsx)(he,{value:`access`,children:(0,$.jsx)(Te,{clusterName:n})}),t[66]=n,t[67]=Se);let Ce;t[68]===_?Ce=t[69]:(Ce=(0,$.jsx)(he,{value:`networking`,children:(0,$.jsx)(Re,{cluster:_})}),t[68]=_,t[69]=Ce);let we;t[70]===E?we=t[71]:(we=(0,$.jsx)(he,{value:`connect`,children:(0,$.jsx)(u,{commands:E})}),t[70]=E,t[71]=we);let Ee;t[72]!==fe||t[73]!==be||t[74]!==xe||t[75]!==Se||t[76]!==Ce||t[77]!==we?(Ee=(0,$.jsxs)(ge,{defaultValue:`overview`,children:[z,fe,be,xe,Se,Ce,we]}),t[72]=fe,t[73]=be,t[74]=xe,t[75]=Se,t[76]=Ce,t[77]=we,t[78]=Ee):Ee=t[78];let De=`This permanently deletes cluster "${n}" and its control plane. This cannot be undone.`,Oe;t[79]!==g.isPending||t[80]!==O||t[81]!==a||t[82]!==De?(Oe=(0,$.jsx)(de,{description:De,isPending:g.isPending,onConfirm:O,onOpenChange:s,open:a,title:`Delete cluster`}),t[79]=g.isPending,t[80]=O,t[81]=a,t[82]=De,t[83]=Oe):Oe=t[83];let ke;return t[84]!==L||t[85]!==R||t[86]!==Ee||t[87]!==Oe?(ke=(0,$.jsxs)($.Fragment,{children:[k,L,R,Ee,Oe]}),t[84]=L,t[85]=R,t[86]=Ee,t[87]=Oe,t[88]=ke):ke=t[88],ke}function Ye(){let e=(0,Z.c)(2),{clusterName:t}=H.useParams(),n;return e[0]===t?n=e[1]:(n=(0,$.jsx)(Je,{clusterName:t}),e[0]=t,e[1]=n),n}export{Ye as component}; \ No newline at end of file +import{n as e,o as t,r as n,t as r}from"./compiler-runtime.js";import{t as i}from"./error-banner.js";import{t as a}from"./useQuery.js";import{t as o}from"./useSuspenseQuery.js";import{vr as s}from"./awsClient.js";import{Bt as c}from"./auth.js";import{t as l}from"./back-link.js";import{t as u}from"./cli-command-panel.js";import{t as d}from"./trash-2.js";import{t as f}from"./button.js";import{C as p,S as m,_ as h,a as g,b as _,c as v,d as y,f as b,g as x,h as S,n as C,o as w,p as T,r as E,s as D,t as O,u as k,v as A,x as j,y as M}from"./eks.js";import{C as N,D as P,E as F,Ir as I,M as L,Nr as R,Nt as z,O as B,Rn as V,T as H,_ as U,j as ee,k as te,rt as ne,w as W}from"./index.js";import{i as re,t as ie}from"./zod.js";import{t as ae}from"./page-heading.js";import{a as G,r as K,t as q}from"./field.js";import{i as oe,l as se,n as ce,o as le,r as ue,s as J,t as de}from"./alert-dialog.js";import{t as fe}from"./delete-confirmation-dialog.js";import{n as Y,t as X}from"./detail-row.js";import{t as pe}from"./textarea.js";import{i as me,n as he,r as ge,t as _e}from"./tabs.js";import{t as ve}from"./badge.js";var ye=R(`circle-arrow-up`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m16 12-4-4-4 4`,key:`177agl`}],[`path`,{d:`M12 16V8`,key:`1sbj14`}]]),be=R(`sliders-horizontal`,[[`path`,{d:`M10 5H3`,key:`1qgfaw`}],[`path`,{d:`M12 19H3`,key:`yhmn1j`}],[`path`,{d:`M14 3v4`,key:`1sua03`}],[`path`,{d:`M16 17v4`,key:`1q0r14`}],[`path`,{d:`M21 12h-9`,key:`1o4lsq`}],[`path`,{d:`M21 19h-5`,key:`1rlt1p`}],[`path`,{d:`M21 5h-7`,key:`1oszz2`}],[`path`,{d:`M8 10v4`,key:`tgpxqk`}],[`path`,{d:`M8 12H3`,key:`a7s4jb`}]]),Z=r(),Q=t(n(),1),$=e();function xe(e){return e?.split(`/`).pop()??e??``}function Se(e){let t=(0,Z.c)(55),{clusterName:n,principalArn:r,onDelete:i}=e,o;t[0]!==n||t[1]!==r?(o=W(n,r),t[0]=n,t[1]=r,t[2]=o):o=t[2];let{data:s}=a(o),c;t[3]!==n||t[4]!==r?(c=B(n,r),t[3]=n,t[4]=r,t[5]=c):c=t[5];let{data:l}=a(c),u=y(),p=_(),[m,h]=(0,Q.useState)(O[0].arn),g=s?.accessEntry,v;t[6]===l?.associatedAccessPolicies?v=t[7]:(v=l?.associatedAccessPolicies??[],t[6]=l?.associatedAccessPolicies,t[7]=v);let b=v,x;t[8]===r?x=t[9]:(x=(0,$.jsx)(`span`,{className:`truncate font-mono text-xs`,children:r}),t[8]=r,t[9]=x);let S;t[10]!==i||t[11]!==r?(S=()=>i(r),t[10]=i,t[11]=r,t[12]=S):S=t[12];let C;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,$.jsx)(d,{className:`size-4`}),t[13]=C):C=t[13];let w;t[14]===S?w=t[15]:(w=(0,$.jsx)(f,{onClick:S,size:`icon`,variant:`ghost`,children:C}),t[14]=S,t[15]=w);let T;t[16]!==x||t[17]!==w?(T=(0,$.jsx)(Y.Header,{children:(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[x,w]})}),t[16]=x,t[17]=w,t[18]=T):T=t[18];let E=g?.type,D;t[19]===E?D=t[20]:(D=(0,$.jsx)(X,{label:`Type`,value:E}),t[19]=E,t[20]=D);let k;t[21]===g?k=t[22]:(k=g?.kubernetesGroups?.length?g.kubernetesGroups.join(`, `):`—`,t[21]=g,t[22]=k);let A;t[23]===k?A=t[24]:(A=(0,$.jsx)(X,{label:`Kubernetes groups`,value:k}),t[23]=k,t[24]=A);let j;t[25]!==b||t[26]!==n||t[27]!==p||t[28]!==r?(j=b.length>0?(0,$.jsx)(`div`,{className:`space-y-1`,children:b.map(e=>(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,$.jsx)(`span`,{children:xe(e.policyArn)}),(0,$.jsx)(f,{onClick:()=>p.mutate({clusterName:n,principalArn:r,policyArn:e.policyArn??``}),size:`sm`,variant:`ghost`,children:`Remove`})]},e.policyArn))}):`—`,t[25]=b,t[26]=n,t[27]=p,t[28]=r,t[29]=j):j=t[29];let M;t[30]===j?M=t[31]:(M=(0,$.jsx)(X,{label:`Access policies`,value:j}),t[30]=j,t[31]=M);let N;t[32]===Symbol.for(`react.memo_cache_sentinel`)?(N=e=>h(e.target.value),t[32]=N):N=t[32];let P;t[33]===Symbol.for(`react.memo_cache_sentinel`)?(P=O.map(Ce),t[33]=P):P=t[33];let F;t[34]===m?F=t[35]:(F=(0,$.jsx)(`select`,{"aria-label":`Access policy`,className:`h-7 flex-1 rounded-md border border-input bg-input/20 px-2 text-sm`,onChange:N,value:m,children:P}),t[34]=m,t[35]=F);let I;t[36]!==u||t[37]!==n||t[38]!==m||t[39]!==r?(I=()=>u.mutate({clusterName:n,principalArn:r,policyArn:m,accessScopeType:`cluster`}),t[36]=u,t[37]=n,t[38]=m,t[39]=r,t[40]=I):I=t[40];let L;t[41]!==u.isPending||t[42]!==I?(L=(0,$.jsx)(f,{disabled:u.isPending,onClick:I,size:`sm`,children:`Associate`}),t[41]=u.isPending,t[42]=I,t[43]=L):L=t[43];let R;t[44]!==F||t[45]!==L?(R=(0,$.jsxs)(`div`,{className:`flex items-center gap-2 pt-2`,children:[F,L]}),t[44]=F,t[45]=L,t[46]=R):R=t[46];let z;t[47]!==D||t[48]!==A||t[49]!==M||t[50]!==R?(z=(0,$.jsxs)(Y.Content,{children:[D,A,M,R]}),t[47]=D,t[48]=A,t[49]=M,t[50]=R,t[51]=z):z=t[51];let V;return t[52]!==z||t[53]!==T?(V=(0,$.jsxs)(Y,{children:[T,z]}),t[52]=z,t[53]=T,t[54]=V):V=t[54],V}function Ce(e){return(0,$.jsx)(`option`,{value:e.arn,children:e.name},e.arn)}function we(e){let t=(0,Z.c)(41),{clusterName:n,open:r,onOpenChange:i}=e,a=b(),o;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(o={resolver:ie(D),defaultValues:{principalArn:``,kubernetesGroups:``}},t[0]=o):o=t[0];let{formState:s,handleSubmit:c,register:l,reset:u}=re(o),{errors:d}=s,f;t[1]!==n||t[2]!==a||t[3]!==i||t[4]!==u?(f=async e=>{await a.mutateAsync({clusterName:n,principalArn:e.principalArn,kubernetesGroups:e.kubernetesGroups.split(`,`).map(Te).filter(Boolean)}),u(),i(!1)},t[1]=n,t[2]=a,t[3]=i,t[4]=u,t[5]=f):f=t[5];let p=f,m;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,$.jsx)(J,{children:(0,$.jsx)(se,{children:`Add access entry`})}),t[6]=m):m=t[6];let h;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,$.jsx)(G,{children:(0,$.jsx)(`label`,{htmlFor:`ae-principal`,children:`IAM principal ARN`})}),t[7]=h):h=t[7];let g=!!d.principalArn,_;t[8]===l?_=t[9]:(_=l(`principalArn`),t[8]=l,t[9]=_);let v;t[10]!==g||t[11]!==_?(v=(0,$.jsx)(V,{"aria-invalid":g,id:`ae-principal`,placeholder:`arn:aws:iam::000000000000:role/my-role`,..._}),t[10]=g,t[11]=_,t[12]=v):v=t[12];let y;t[13]===d.principalArn?y=t[14]:(y=(0,$.jsx)(K,{errors:[d.principalArn]}),t[13]=d.principalArn,t[14]=y);let x;t[15]!==v||t[16]!==y?(x=(0,$.jsxs)(q,{children:[h,v,y]}),t[15]=v,t[16]=y,t[17]=x):x=t[17];let S;t[18]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,$.jsx)(G,{children:(0,$.jsx)(`label`,{htmlFor:`ae-groups`,children:`Kubernetes groups`})}),t[18]=S):S=t[18];let C;t[19]===l?C=t[20]:(C=l(`kubernetesGroups`),t[19]=l,t[20]=C);let w;t[21]===C?w=t[22]:(w=(0,$.jsxs)(q,{children:[S,(0,$.jsx)(V,{id:`ae-groups`,placeholder:`system:masters`,...C})]}),t[21]=C,t[22]=w);let T;t[23]!==x||t[24]!==w?(T=(0,$.jsxs)(`form`,{className:`space-y-4`,id:`add-access-entry-form`,children:[x,w]}),t[23]=x,t[24]=w,t[25]=T):T=t[25];let E;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(E=(0,$.jsx)(ue,{children:`Cancel`}),t[26]=E):E=t[26];let O;t[27]!==c||t[28]!==p?(O=e=>{e.preventDefault(),c(p)()},t[27]=c,t[28]=p,t[29]=O):O=t[29];let k=a.isPending?`Creating…`:`Create`,A;t[30]!==a.isPending||t[31]!==O||t[32]!==k?(A=(0,$.jsxs)(le,{children:[E,(0,$.jsx)(ce,{disabled:a.isPending,onClick:O,children:k})]}),t[30]=a.isPending,t[31]=O,t[32]=k,t[33]=A):A=t[33];let j;t[34]!==T||t[35]!==A?(j=(0,$.jsxs)(oe,{children:[m,T,A]}),t[34]=T,t[35]=A,t[36]=j):j=t[36];let M;return t[37]!==i||t[38]!==r||t[39]!==j?(M=(0,$.jsx)(de,{onOpenChange:i,open:r,children:j}),t[37]=i,t[38]=r,t[39]=j,t[40]=M):M=t[40],M}function Te(e){return e.trim()}function Ee(e){let t=(0,Z.c)(25),{clusterName:n}=e,r;t[0]===n?r=t[1]:(r=N(n),t[0]=n,t[1]=r);let{data:i}=o(r),a=x(),[s,c]=(0,Q.useState)(!1),[l,u]=(0,Q.useState)(),d;t[2]===i.accessEntries?d=t[3]:(d=i.accessEntries??[],t[2]=i.accessEntries,t[3]=d);let p=d,m;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,$.jsx)(`div`,{className:`mb-4 flex justify-end`,children:(0,$.jsx)(f,{onClick:()=>c(!0),size:`sm`,children:`Add access entry`})}),t[4]=m):m=t[4];let h;t[5]!==n||t[6]!==p?(h=p.length>0?(0,$.jsx)(`div`,{className:`space-y-4`,children:p.map(e=>(0,$.jsx)(Se,{clusterName:n,onDelete:u,principalArn:e},e))}):(0,$.jsx)(`p`,{className:`text-muted-foreground`,children:`No access entries.`}),t[5]=n,t[6]=p,t[7]=h):h=t[7];let g;t[8]!==n||t[9]!==s?(g=(0,$.jsx)(we,{clusterName:n,onOpenChange:c,open:s}),t[8]=n,t[9]=s,t[10]=g):g=t[10];let _=`Delete access entry for "${l??``}"?`,v;t[11]!==n||t[12]!==a||t[13]!==l?(v=()=>{l&&a.mutate({clusterName:n,principalArn:l},{onSuccess:()=>u(void 0)})},t[11]=n,t[12]=a,t[13]=l,t[14]=v):v=t[14];let y;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(y=e=>!e&&u(void 0),t[15]=y):y=t[15];let b=l!==void 0,S;t[16]!==a.isPending||t[17]!==_||t[18]!==v||t[19]!==b?(S=(0,$.jsx)(fe,{description:_,isPending:a.isPending,onConfirm:v,onOpenChange:y,open:b,title:`Delete access entry`}),t[16]=a.isPending,t[17]=_,t[18]=v,t[19]=b,t[20]=S):S=t[20];let C;return t[21]!==S||t[22]!==h||t[23]!==g?(C=(0,$.jsxs)($.Fragment,{children:[m,h,g,S]}),t[21]=S,t[22]=h,t[23]=g,t[24]=C):C=t[24],C}var De=new Set([`CREATING`,`UPDATING`,`DELETING`]),Oe=5e3,ke=`h-7 w-full rounded-md border border-input bg-input/20 px-2 text-sm`;function Ae({clusterName:e,catalog:t,installed:n,open:r,onOpenChange:i}){let a=T(),o=t.filter(e=>!n.includes(e.addonName??``)),{formState:{errors:s},handleSubmit:c,register:l,reset:u,setValue:d,watch:f}=re({resolver:ie(v),defaultValues:{addonName:``,addonVersion:``,serviceAccountRoleArn:``,configurationValues:``}}),p=f(`addonName`),m=f(`addonVersion`),h=t.find(e=>e.addonName===p)?.addonVersions??[],g=h.find(e=>e.addonVersion===m)?.requiresIamPermissions??!1,_=e=>{let n=t.find(t=>t.addonName===e)?.addonVersions?.[0]?.addonVersion??``;d(`addonName`,e,{shouldValidate:!0}),d(`addonVersion`,n,{shouldValidate:!0})},y=async t=>{await a.mutateAsync({clusterName:e,addonName:t.addonName,addonVersion:t.addonVersion||void 0,serviceAccountRoleArn:t.serviceAccountRoleArn.trim()||void 0,configurationValues:t.configurationValues.trim()||void 0}),u(),i(!1)};return(0,$.jsx)(de,{onOpenChange:i,open:r,children:(0,$.jsxs)(oe,{className:`max-h-[85vh] overflow-y-auto`,children:[(0,$.jsx)(J,{children:(0,$.jsx)(se,{children:`Add add-on`})}),(0,$.jsxs)(`form`,{className:`space-y-4`,id:`add-addon-form`,children:[(0,$.jsxs)(q,{children:[(0,$.jsx)(G,{children:(0,$.jsx)(`label`,{htmlFor:`addon-name`,children:`Add-on`})}),(0,$.jsxs)(`select`,{"aria-invalid":!!s.addonName,className:ke,id:`addon-name`,onChange:e=>_(e.target.value),value:p,children:[(0,$.jsx)(`option`,{value:``,children:`Select add-on`}),o.map(e=>(0,$.jsx)(`option`,{value:e.addonName??``,children:e.addonName},e.addonName))]}),(0,$.jsx)(K,{errors:[s.addonName]})]}),(0,$.jsxs)(q,{children:[(0,$.jsx)(G,{children:(0,$.jsx)(`label`,{htmlFor:`addon-version`,children:`Version`})}),(0,$.jsx)(`select`,{"aria-invalid":!!s.addonVersion,className:ke,disabled:h.length===0,id:`addon-version`,onChange:e=>d(`addonVersion`,e.target.value,{shouldValidate:!0}),value:m,children:h.map((e,t)=>(0,$.jsxs)(`option`,{value:e.addonVersion??``,children:[e.addonVersion,t===0?` (latest)`:``]},e.addonVersion))}),(0,$.jsx)(K,{errors:[s.addonVersion]})]}),(0,$.jsxs)(q,{children:[(0,$.jsx)(G,{children:(0,$.jsx)(`label`,{htmlFor:`addon-role`,children:`Service account IAM role ARN`})}),(0,$.jsx)(V,{id:`addon-role`,placeholder:`arn:aws:iam::…:role/…`,...l(`serviceAccountRoleArn`)}),g&&(0,$.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`This add-on needs IAM permissions — provide an IRSA role ARN.`})]}),(0,$.jsxs)(q,{children:[(0,$.jsx)(G,{children:(0,$.jsx)(`label`,{htmlFor:`addon-config`,children:`Configuration values (JSON)`})}),(0,$.jsx)(pe,{"aria-invalid":!!s.configurationValues,id:`addon-config`,placeholder:`{"replicaCount": 2}`,rows:4,...l(`configurationValues`)}),(0,$.jsx)(K,{errors:[s.configurationValues]})]})]}),(0,$.jsxs)(le,{children:[(0,$.jsx)(ue,{children:`Cancel`}),(0,$.jsx)(ce,{disabled:a.isPending,onClick:e=>{e.preventDefault(),c(y)()},children:a.isPending?`Adding…`:`Add`})]})]})})}function je(e){let t=(0,Z.c)(54),{clusterName:n,addonName:r,current:i,versions:a,open:o,onOpenChange:s}=e,c=m(),[l,u]=(0,Q.useState)(i.addonVersion??``),[d,f]=(0,Q.useState)(i.serviceAccountRoleArn??``),[p,h]=(0,Q.useState)(i.configurationValues??``),[_,v]=(0,Q.useState)(),y,b;t[0]!==i.addonVersion||t[1]!==i.configurationValues||t[2]!==i.serviceAccountRoleArn||t[3]!==o?(y=()=>{o&&(u(i.addonVersion??``),f(i.serviceAccountRoleArn??``),h(i.configurationValues??``),v(void 0))},b=[o,i.addonVersion,i.serviceAccountRoleArn,i.configurationValues],t[0]=i.addonVersion,t[1]=i.configurationValues,t[2]=i.serviceAccountRoleArn,t[3]=o,t[4]=y,t[5]=b):(y=t[4],b=t[5]),(0,Q.useEffect)(y,b);let x;t[6]!==r||t[7]!==n||t[8]!==p||t[9]!==s||t[10]!==d||t[11]!==c||t[12]!==l?(x=()=>{let e=g.safeParse(p);if(!e.success){v(e.error.issues[0]?.message??`Configuration must be valid JSON`);return}v(void 0),c.mutate({clusterName:n,addonName:r,addonVersion:l||void 0,serviceAccountRoleArn:d.trim()||void 0,configurationValues:p.trim()||void 0},{onSuccess:()=>s(!1)})},t[6]=r,t[7]=n,t[8]=p,t[9]=s,t[10]=d,t[11]=c,t[12]=l,t[13]=x):x=t[13];let S=x,C;t[14]===r?C=t[15]:(C=(0,$.jsx)(J,{children:(0,$.jsxs)(se,{children:[`Update `,r]})}),t[14]=r,t[15]=C);let w;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(w=(0,$.jsx)(G,{children:(0,$.jsx)(`label`,{htmlFor:`update-addon-version`,children:`Version`})}),t[16]=w):w=t[16];let T=a.length===0,E;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(E=e=>u(e.target.value),t[17]=E):E=t[17];let D;t[18]===a?D=t[19]:(D=a.map(Me),t[18]=a,t[19]=D);let O;t[20]!==T||t[21]!==D||t[22]!==l?(O=(0,$.jsxs)(q,{children:[w,(0,$.jsx)(`select`,{className:ke,disabled:T,id:`update-addon-version`,onChange:E,value:l,children:D})]}),t[20]=T,t[21]=D,t[22]=l,t[23]=O):O=t[23];let k;t[24]===Symbol.for(`react.memo_cache_sentinel`)?(k=(0,$.jsx)(G,{children:(0,$.jsx)(`label`,{htmlFor:`update-addon-role`,children:`Service account IAM role ARN`})}),t[24]=k):k=t[24];let A;t[25]===Symbol.for(`react.memo_cache_sentinel`)?(A=e=>f(e.target.value),t[25]=A):A=t[25];let j;t[26]===d?j=t[27]:(j=(0,$.jsxs)(q,{children:[k,(0,$.jsx)(V,{id:`update-addon-role`,onChange:A,placeholder:`arn:aws:iam::…:role/…`,value:d})]}),t[26]=d,t[27]=j);let M;t[28]===Symbol.for(`react.memo_cache_sentinel`)?(M=(0,$.jsx)(G,{children:(0,$.jsx)(`label`,{htmlFor:`update-addon-config`,children:`Configuration values (JSON)`})}),t[28]=M):M=t[28];let N;t[29]===Symbol.for(`react.memo_cache_sentinel`)?(N=e=>h(e.target.value),t[29]=N):N=t[29];let P;t[30]===p?P=t[31]:(P=(0,$.jsxs)(q,{children:[M,(0,$.jsx)(pe,{id:`update-addon-config`,onChange:N,rows:4,value:p})]}),t[30]=p,t[31]=P);let F;t[32]!==j||t[33]!==P||t[34]!==O?(F=(0,$.jsxs)(`div`,{className:`space-y-4`,children:[O,j,P]}),t[32]=j,t[33]=P,t[34]=O,t[35]=F):F=t[35];let I;t[36]===_?I=t[37]:(I=_&&(0,$.jsx)(`p`,{className:`mt-2 text-xs text-destructive`,children:_}),t[36]=_,t[37]=I);let L;t[38]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,$.jsx)(ue,{children:`Cancel`}),t[38]=L):L=t[38];let R;t[39]===S?R=t[40]:(R=e=>{e.preventDefault(),S()},t[39]=S,t[40]=R);let z=c.isPending?`Updating…`:`Update`,B;t[41]!==R||t[42]!==z||t[43]!==c.isPending?(B=(0,$.jsxs)(le,{children:[L,(0,$.jsx)(ce,{disabled:c.isPending,onClick:R,children:z})]}),t[41]=R,t[42]=z,t[43]=c.isPending,t[44]=B):B=t[44];let H;t[45]!==F||t[46]!==I||t[47]!==B||t[48]!==C?(H=(0,$.jsxs)(oe,{className:`max-h-[85vh] overflow-y-auto`,children:[C,F,I,B]}),t[45]=F,t[46]=I,t[47]=B,t[48]=C,t[49]=H):H=t[49];let U;return t[50]!==s||t[51]!==o||t[52]!==H?(U=(0,$.jsx)(de,{onOpenChange:s,open:o,children:H}),t[50]=s,t[51]=o,t[52]=H,t[53]=U):U=t[53],U}function Me(e){return(0,$.jsx)(`option`,{value:e,children:e},e)}function Ne(e){let t=(0,Z.c)(53),{clusterName:n,addonName:r,catalog:i,onDelete:o}=e,s;t[0]!==r||t[1]!==n?(s=H(n,r),t[0]=r,t[1]=n,t[2]=s):s=t[2];let c;t[3]===s?c=t[4]:(c={...s,refetchInterval:Fe},t[3]=s,t[4]=c);let{data:l}=a(c),[u,p]=(0,Q.useState)(!1),m=l?.addon,h=m?.health?.issues?.[0]?.message,g;t[5]!==r||t[6]!==i?(g=i.find(e=>e.addonName===r)?.addonVersions?.map(Pe).filter(Boolean)??[],t[5]=r,t[6]=i,t[7]=g):g=t[7];let _=g,v;t[8]===r?v=t[9]:(v=(0,$.jsx)(`span`,{children:r}),t[8]=r,t[9]=v);let y=m?.status,b;t[10]===y?b=t[11]:(b=w(y),t[10]=y,t[11]=b);let x=m?.status??`UNKNOWN`,S;t[12]!==b||t[13]!==x?(S=(0,$.jsx)(ve,{variant:b,children:x}),t[12]=b,t[13]=x,t[14]=S):S=t[14];let C;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(C=()=>p(!0),t[15]=C):C=t[15];let T;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(T=(0,$.jsx)(f,{"aria-label":`Update add-on`,onClick:C,size:`icon`,variant:`ghost`,children:(0,$.jsx)(ye,{className:`size-4`})}),t[16]=T):T=t[16];let E;t[17]!==r||t[18]!==o?(E=()=>o(r),t[17]=r,t[18]=o,t[19]=E):E=t[19];let D;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(D=(0,$.jsx)(d,{className:`size-4`}),t[20]=D):D=t[20];let O;t[21]===E?O=t[22]:(O=(0,$.jsx)(f,{"aria-label":`Remove add-on`,onClick:E,size:`icon`,variant:`ghost`,children:D}),t[21]=E,t[22]=O);let k;t[23]!==O||t[24]!==S?(k=(0,$.jsxs)(`div`,{className:`flex items-center gap-1`,children:[S,T,O]}),t[23]=O,t[24]=S,t[25]=k):k=t[25];let A;t[26]!==k||t[27]!==v?(A=(0,$.jsx)(Y.Header,{children:(0,$.jsxs)(`div`,{className:`flex items-center justify-between`,children:[v,k]})}),t[26]=k,t[27]=v,t[28]=A):A=t[28];let j=m?.addonVersion,M;t[29]===j?M=t[30]:(M=(0,$.jsx)(X,{label:`Version`,value:j}),t[29]=j,t[30]=M);let N=m?.serviceAccountRoleArn,P;t[31]===N?P=t[32]:(P=(0,$.jsx)(X,{label:`IRSA role`,value:N}),t[31]=N,t[32]=P);let F;t[33]===h?F=t[34]:(F=h&&(0,$.jsx)(X,{label:`Issue`,value:(0,$.jsx)(`span`,{className:`text-destructive`,children:h})}),t[33]=h,t[34]=F);let I;t[35]!==M||t[36]!==P||t[37]!==F?(I=(0,$.jsxs)(Y.Content,{children:[M,P,F]}),t[35]=M,t[36]=P,t[37]=F,t[38]=I):I=t[38];let L=m?.addonVersion,R=m?.serviceAccountRoleArn,z=m?.configurationValues,B;t[39]!==L||t[40]!==R||t[41]!==z?(B={addonVersion:L,serviceAccountRoleArn:R,configurationValues:z},t[39]=L,t[40]=R,t[41]=z,t[42]=B):B=t[42];let V;t[43]!==r||t[44]!==n||t[45]!==u||t[46]!==B||t[47]!==_?(V=(0,$.jsx)(je,{addonName:r,clusterName:n,current:B,onOpenChange:p,open:u,versions:_}),t[43]=r,t[44]=n,t[45]=u,t[46]=B,t[47]=_,t[48]=V):V=t[48];let U;return t[49]!==A||t[50]!==I||t[51]!==V?(U=(0,$.jsxs)(Y,{children:[A,I,V]}),t[49]=A,t[50]=I,t[51]=V,t[52]=U):U=t[52],U}function Pe(e){return e.addonVersion??``}function Fe(e){return De.has(e.state.data?.addon?.status??``)?Oe:!1}function Ie(e){let t=(0,Z.c)(31),{clusterName:n}=e,r;t[0]===n?r=t[1]:(r=P(n),t[0]=n,t[1]=r);let{data:i}=o(r),{data:s}=a(F),c=h(),[l,u]=(0,Q.useState)(!1),[d,p]=(0,Q.useState)(),m;t[2]===i.addons?m=t[3]:(m=i.addons??[],t[2]=i.addons,t[3]=m);let g=m,_;t[4]===s?.addons?_=t[5]:(_=s?.addons??[],t[4]=s?.addons,t[5]=_);let v=_,y;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,$.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Add-on manifests are staged; activation completes when the cluster reports the workload ready.`}),t[6]=y):y=t[6];let b;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(b=(0,$.jsxs)(`div`,{className:`mb-4 flex items-center justify-between gap-4`,children:[y,(0,$.jsx)(f,{onClick:()=>u(!0),size:`sm`,children:`Add add-on`})]}),t[7]=b):b=t[7];let x;t[8]!==g||t[9]!==v||t[10]!==n?(x=g.length>0?(0,$.jsx)(`div`,{className:`space-y-4`,children:g.map(e=>(0,$.jsx)(Ne,{addonName:e,catalog:v,clusterName:n,onDelete:p},e))}):(0,$.jsx)(`p`,{className:`text-muted-foreground`,children:`No add-ons installed.`}),t[8]=g,t[9]=v,t[10]=n,t[11]=x):x=t[11];let S;t[12]!==g||t[13]!==v||t[14]!==n||t[15]!==l?(S=(0,$.jsx)(Ae,{catalog:v,clusterName:n,installed:g,onOpenChange:u,open:l}),t[12]=g,t[13]=v,t[14]=n,t[15]=l,t[16]=S):S=t[16];let C=`Remove add-on "${d??``}" from the cluster?`,w;t[17]!==n||t[18]!==c||t[19]!==d?(w=()=>{d&&c.mutate({clusterName:n,addonName:d},{onSuccess:()=>p(void 0)})},t[17]=n,t[18]=c,t[19]=d,t[20]=w):w=t[20];let T;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(T=e=>!e&&p(void 0),t[21]=T):T=t[21];let E=d!==void 0,D;t[22]!==c.isPending||t[23]!==E||t[24]!==C||t[25]!==w?(D=(0,$.jsx)(fe,{confirmLabel:`Remove`,description:C,isPending:c.isPending,onConfirm:w,onOpenChange:T,open:E,pendingLabel:`Removing…`,title:`Remove add-on`}),t[22]=c.isPending,t[23]=E,t[24]=C,t[25]=w,t[26]=D):D=t[26];let O;return t[27]!==D||t[28]!==x||t[29]!==S?(O=(0,$.jsxs)($.Fragment,{children:[b,x,S,D]}),t[27]=D,t[28]=x,t[29]=S,t[30]=O):O=t[30],O}function Le(e){let t=(0,Z.c)(6),{to:n,id:r}=e,i;t[0]===r?i=t[1]:(i={id:r},t[0]=r,t[1]=i);let a;return t[2]!==r||t[3]!==i||t[4]!==n?(a=(0,$.jsx)(s,{className:`font-mono text-primary underline-offset-2 hover:underline`,params:i,to:n,children:r}),t[2]=r,t[3]=i,t[4]=n,t[5]=a):a=t[5],a}function Re(e){let t=(0,Z.c)(45),{cluster:n}=e,r=n?.resourcesVpcConfig,i;t[0]===r?.subnetIds?i=t[1]:(i=r?.subnetIds??[],t[0]=r?.subnetIds,t[1]=i);let a=i,o;t[2]===r?.securityGroupIds?o=t[3]:(o=r?.securityGroupIds??[],t[2]=r?.securityGroupIds,t[3]=o);let s=o,c;t[4]===r?.publicAccessCidrs?c=t[5]:(c=r?.publicAccessCidrs??[],t[4]=r?.publicAccessCidrs,t[5]=c);let l=c,u;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,$.jsx)(Y.Header,{children:`VPC`}),t[6]=u):u=t[6];let d;t[7]===r?d=t[8]:(d=r?.vpcId?(0,$.jsx)(Le,{id:r.vpcId,to:`/ec2/describe-vpcs/$id`}):void 0,t[7]=r,t[8]=d);let f;t[9]===d?f=t[10]:(f=(0,$.jsx)(X,{label:`VPC`,value:d}),t[9]=d,t[10]=f);let p=n?.endpoint,m;t[11]===p?m=t[12]:(m=(0,$.jsx)(X,{label:`API server endpoint`,value:p}),t[11]=p,t[12]=m);let h=r?.endpointPublicAccess?`Enabled`:`Disabled`,g;t[13]===h?g=t[14]:(g=(0,$.jsx)(X,{label:`Public access`,value:h}),t[13]=h,t[14]=g);let _=r?.endpointPrivateAccess?`Enabled`:`Disabled`,v;t[15]===_?v=t[16]:(v=(0,$.jsx)(X,{label:`Private access`,value:_}),t[15]=_,t[16]=v);let y;t[17]!==l||t[18]!==r?.endpointPublicAccess?(y=r?.endpointPublicAccess&&(0,$.jsx)(X,{label:`Public access CIDRs`,value:l.length>0?(0,$.jsx)(`div`,{className:`space-y-1 font-mono text-xs`,children:l.map(Ve)}):`Any (0.0.0.0/0)`}),t[17]=l,t[18]=r?.endpointPublicAccess,t[19]=y):y=t[19];let b;t[20]!==g||t[21]!==v||t[22]!==y||t[23]!==f||t[24]!==m?(b=(0,$.jsxs)(Y,{children:[u,(0,$.jsxs)(Y.Content,{children:[f,m,g,v,y]})]}),t[20]=g,t[21]=v,t[22]=y,t[23]=f,t[24]=m,t[25]=b):b=t[25];let x;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,$.jsx)(Y.Header,{children:`Subnets`}),t[26]=x):x=t[26];let S;t[27]===a?S=t[28]:(S=(0,$.jsxs)(Y,{children:[x,(0,$.jsx)(Y.Content,{children:a.length>0?(0,$.jsx)(`div`,{className:`space-y-1`,children:a.map(Be)}):(0,$.jsx)(`p`,{className:`text-muted-foreground`,children:`No subnets.`})})]}),t[27]=a,t[28]=S);let C;t[29]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,$.jsx)(Y.Header,{children:`Security groups`}),t[29]=C):C=t[29];let w;t[30]===r?w=t[31]:(w=r?.clusterSecurityGroupId?(0,$.jsx)(Le,{id:r.clusterSecurityGroupId,to:`/ec2/describe-security-groups/$id`}):void 0,t[30]=r,t[31]=w);let T;t[32]===w?T=t[33]:(T=(0,$.jsx)(X,{label:`Cluster security group`,value:w}),t[32]=w,t[33]=T);let E;t[34]===s?E=t[35]:(E=s.length>0?(0,$.jsx)(`div`,{className:`space-y-1`,children:s.map(ze)}):`—`,t[34]=s,t[35]=E);let D;t[36]===E?D=t[37]:(D=(0,$.jsx)(X,{label:`Additional security groups`,value:E}),t[36]=E,t[37]=D);let O;t[38]!==T||t[39]!==D?(O=(0,$.jsxs)(Y,{children:[C,(0,$.jsxs)(Y.Content,{children:[T,D]})]}),t[38]=T,t[39]=D,t[40]=O):O=t[40];let k;return t[41]!==b||t[42]!==S||t[43]!==O?(k=(0,$.jsxs)($.Fragment,{children:[b,S,O]}),t[41]=b,t[42]=S,t[43]=O,t[44]=k):k=t[44],k}function ze(e){return(0,$.jsx)(Le,{id:e,to:`/ec2/describe-security-groups/$id`},e)}function Be(e){return(0,$.jsx)(Le,{id:e,to:`/ec2/describe-subnets/$id`},e)}function Ve(e){return(0,$.jsx)(`div`,{children:e},e)}function He(e){let t=(0,Z.c)(50),{clusterName:n,nodegroupName:r,current:i,open:a,onOpenChange:o}=e,s=j(),[c,l]=(0,Q.useState)(i.minSize??0),[u,d]=(0,Q.useState)(i.desiredSize??0),[f,p]=(0,Q.useState)(i.maxSize??0),[m,h]=(0,Q.useState)(),g,_;t[0]!==i.desiredSize||t[1]!==i.maxSize||t[2]!==i.minSize||t[3]!==a?(g=()=>{a&&(l(i.minSize??0),d(i.desiredSize??0),p(i.maxSize??0),h(void 0))},_=[a,i.minSize,i.desiredSize,i.maxSize],t[0]=i.desiredSize,t[1]=i.maxSize,t[2]=i.minSize,t[3]=a,t[4]=g,t[5]=_):(g=t[4],_=t[5]),(0,Q.useEffect)(g,_);let v;t[6]!==n||t[7]!==u||t[8]!==f||t[9]!==c||t[10]!==r||t[11]!==o||t[12]!==s?(v=()=>{if(!(c<=u&&u<=f)){h(`Sizes must satisfy min ≤ desired ≤ max`);return}s.mutate({clusterName:n,nodegroupName:r,minSize:c,desiredSize:u,maxSize:f},{onSuccess:()=>o(!1)})},t[6]=n,t[7]=u,t[8]=f,t[9]=c,t[10]=r,t[11]=o,t[12]=s,t[13]=v):v=t[13];let y=v,b;t[14]===r?b=t[15]:(b=(0,$.jsx)(J,{children:(0,$.jsxs)(se,{children:[`Scale `,r]})}),t[14]=r,t[15]=b);let x;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,$.jsx)(G,{children:(0,$.jsx)(`label`,{htmlFor:`scale-min`,children:`Min`})}),t[16]=x):x=t[16];let S;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(S=e=>l(Number(e.target.value)),t[17]=S):S=t[17];let C;t[18]===c?C=t[19]:(C=(0,$.jsxs)(q,{children:[x,(0,$.jsx)(V,{id:`scale-min`,onChange:S,type:`number`,value:c})]}),t[18]=c,t[19]=C);let w;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(w=(0,$.jsx)(G,{children:(0,$.jsx)(`label`,{htmlFor:`scale-desired`,children:`Desired`})}),t[20]=w):w=t[20];let T;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(T=e=>d(Number(e.target.value)),t[21]=T):T=t[21];let E;t[22]===u?E=t[23]:(E=(0,$.jsxs)(q,{children:[w,(0,$.jsx)(V,{id:`scale-desired`,onChange:T,type:`number`,value:u})]}),t[22]=u,t[23]=E);let D;t[24]===Symbol.for(`react.memo_cache_sentinel`)?(D=(0,$.jsx)(G,{children:(0,$.jsx)(`label`,{htmlFor:`scale-max`,children:`Max`})}),t[24]=D):D=t[24];let O;t[25]===Symbol.for(`react.memo_cache_sentinel`)?(O=e=>p(Number(e.target.value)),t[25]=O):O=t[25];let k;t[26]===f?k=t[27]:(k=(0,$.jsxs)(q,{children:[D,(0,$.jsx)(V,{id:`scale-max`,onChange:O,type:`number`,value:f})]}),t[26]=f,t[27]=k);let A;t[28]!==E||t[29]!==k||t[30]!==C?(A=(0,$.jsxs)(`div`,{className:`grid grid-cols-3 gap-3`,children:[C,E,k]}),t[28]=E,t[29]=k,t[30]=C,t[31]=A):A=t[31];let M;t[32]===m?M=t[33]:(M=m&&(0,$.jsx)(`p`,{className:`mt-2 text-xs text-destructive`,children:m}),t[32]=m,t[33]=M);let N;t[34]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,$.jsx)(ue,{children:`Cancel`}),t[34]=N):N=t[34];let P;t[35]===y?P=t[36]:(P=e=>{e.preventDefault(),y()},t[35]=y,t[36]=P);let F=s.isPending?`Scaling…`:`Scale`,I;t[37]!==s.isPending||t[38]!==P||t[39]!==F?(I=(0,$.jsxs)(le,{children:[N,(0,$.jsx)(ce,{disabled:s.isPending,onClick:P,children:F})]}),t[37]=s.isPending,t[38]=P,t[39]=F,t[40]=I):I=t[40];let L;t[41]!==A||t[42]!==M||t[43]!==I||t[44]!==b?(L=(0,$.jsxs)(oe,{children:[b,A,M,I]}),t[41]=A,t[42]=M,t[43]=I,t[44]=b,t[45]=L):L=t[45];let R;return t[46]!==o||t[47]!==a||t[48]!==L?(R=(0,$.jsx)(de,{onOpenChange:o,open:a,children:L}),t[46]=o,t[47]=a,t[48]=L,t[49]=R):R=t[49],R}function Ue(e){let t=(0,Z.c)(64),{clusterName:n,clusterVersion:r,nodegroupName:i,onDelete:o}=e,s;t[0]!==n||t[1]!==i?(s=ee(n,i),t[0]=n,t[1]=i,t[2]=s):s=t[2];let{data:c}=a(s),l=p(),u=c?.nodegroup,m=u?.scalingConfig,[h,g]=(0,Q.useState)(!1),[_,v]=(0,Q.useState)(!1),y=!!r&&!!u?.version&&u.version!==r,b;t[3]===i?b=t[4]:(b=(0,$.jsx)(`span`,{children:i}),t[3]=i,t[4]=b);let x;t[5]===y?x=t[6]:(x=y&&(0,$.jsx)(f,{"aria-label":`Update node group version`,onClick:()=>v(!0),size:`icon`,variant:`ghost`,children:(0,$.jsx)(ye,{className:`size-4`})}),t[5]=y,t[6]=x);let S;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(S=()=>g(!0),t[7]=S):S=t[7];let C;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,$.jsx)(f,{"aria-label":`Scale node group`,onClick:S,size:`icon`,variant:`ghost`,children:(0,$.jsx)(be,{className:`size-4`})}),t[8]=C):C=t[8];let w;t[9]!==i||t[10]!==o?(w=()=>o(i),t[9]=i,t[10]=o,t[11]=w):w=t[11];let T;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(T=(0,$.jsx)(d,{className:`size-4`}),t[12]=T):T=t[12];let E;t[13]===w?E=t[14]:(E=(0,$.jsx)(f,{"aria-label":`Delete node group`,onClick:w,size:`icon`,variant:`ghost`,children:T}),t[13]=w,t[14]=E);let D;t[15]!==x||t[16]!==E?(D=(0,$.jsxs)(`div`,{className:`flex items-center gap-1`,children:[x,C,E]}),t[15]=x,t[16]=E,t[17]=D):D=t[17];let O;t[18]!==b||t[19]!==D?(O=(0,$.jsx)(Y.Header,{children:(0,$.jsxs)(`div`,{className:`flex items-center justify-between`,children:[b,D]})}),t[18]=b,t[19]=D,t[20]=O):O=t[20];let k=u?.status,A;t[21]===k?A=t[22]:(A=(0,$.jsx)(X,{label:`Status`,value:k}),t[21]=k,t[22]=A);let j=y?`${u?.version} (cluster on ${r})`:u?.version,M;t[23]===j?M=t[24]:(M=(0,$.jsx)(X,{label:`Kubernetes version`,value:j}),t[23]=j,t[24]=M);let N;t[25]===u?.instanceTypes?N=t[26]:(N=u?.instanceTypes?.join(`, `),t[25]=u?.instanceTypes,t[26]=N);let P;t[27]===N?P=t[28]:(P=(0,$.jsx)(X,{label:`Instance types`,value:N}),t[27]=N,t[28]=P);let F=u?.amiType,I;t[29]===F?I=t[30]:(I=(0,$.jsx)(X,{label:`AMI type`,value:F}),t[29]=F,t[30]=I);let L=u?.capacityType,R;t[31]===L?R=t[32]:(R=(0,$.jsx)(X,{label:`Capacity type`,value:L}),t[31]=L,t[32]=R);let z=m?`${m.minSize} / ${m.desiredSize} / ${m.maxSize}`:void 0,B;t[33]===z?B=t[34]:(B=(0,$.jsx)(X,{label:`Scaling (min / desired / max)`,value:z}),t[33]=z,t[34]=B);let V;t[35]!==A||t[36]!==M||t[37]!==P||t[38]!==I||t[39]!==R||t[40]!==B?(V=(0,$.jsxs)(Y.Content,{children:[A,M,P,I,R,B]}),t[35]=A,t[36]=M,t[37]=P,t[38]=I,t[39]=R,t[40]=B,t[41]=V):V=t[41];let H;t[42]===m?H=t[43]:(H=m??{},t[42]=m,t[43]=H);let U;t[44]!==n||t[45]!==i||t[46]!==h||t[47]!==H?(U=(0,$.jsx)(He,{clusterName:n,current:H,nodegroupName:i,onOpenChange:g,open:h}),t[44]=n,t[45]=i,t[46]=h,t[47]=H,t[48]=U):U=t[48];let te=`Update node group "${i}" from ${u?.version} to ${r}? Nodes are replaced in a rolling update.`,ne;t[49]!==n||t[50]!==r||t[51]!==i||t[52]!==l?(ne=()=>l.mutate({clusterName:n,nodegroupName:i,version:r},{onSuccess:()=>v(!1)}),t[49]=n,t[50]=r,t[51]=i,t[52]=l,t[53]=ne):ne=t[53];let W;t[54]!==_||t[55]!==te||t[56]!==ne||t[57]!==l.isPending?(W=(0,$.jsx)(fe,{confirmLabel:`Update`,description:te,isPending:l.isPending,onConfirm:ne,onOpenChange:v,open:_,title:`Update node group version`}),t[54]=_,t[55]=te,t[56]=ne,t[57]=l.isPending,t[58]=W):W=t[58];let re;return t[59]!==O||t[60]!==V||t[61]!==U||t[62]!==W?(re=(0,$.jsxs)(Y,{children:[O,V,U,W]}),t[59]=O,t[60]=V,t[61]=U,t[62]=W,t[63]=re):re=t[63],re}function We({clusterName:e,vpcId:t,open:n,onOpenChange:r}){let{data:i}=a(ne),{data:o}=a(z),s=S(),c=i?.Roles??[],l=(o?.Subnets??[]).filter(e=>e.VpcId===t),{formState:{errors:u},handleSubmit:d,register:f,reset:p,setValue:m,watch:h}=re({resolver:ie(k),defaultValues:{nodegroupName:``,nodeRole:``,subnetIds:[],instanceTypes:`t3.medium`,amiType:`AL2_x86_64`,capacityType:`ON_DEMAND`,diskSize:20,minSize:1,desiredSize:2,maxSize:3}}),g=h(`subnetIds`),_=e=>{m(`subnetIds`,g.includes(e)?g.filter(t=>t!==e):[...g,e],{shouldValidate:!0})},v=async t=>{await s.mutateAsync({clusterName:e,nodegroupName:t.nodegroupName,nodeRole:t.nodeRole,subnetIds:t.subnetIds,instanceTypes:t.instanceTypes.split(`,`).map(e=>e.trim()).filter(Boolean),amiType:t.amiType,capacityType:t.capacityType,diskSize:t.diskSize,minSize:t.minSize,desiredSize:t.desiredSize,maxSize:t.maxSize}),p(),r(!1)};return(0,$.jsx)(de,{onOpenChange:r,open:n,children:(0,$.jsxs)(oe,{className:`max-h-[85vh] overflow-y-auto`,children:[(0,$.jsx)(J,{children:(0,$.jsx)(se,{children:`Add node group`})}),(0,$.jsxs)(`form`,{className:`space-y-4`,id:`add-nodegroup-form`,children:[(0,$.jsxs)(q,{children:[(0,$.jsx)(G,{children:(0,$.jsx)(`label`,{htmlFor:`ng-name`,children:`Name`})}),(0,$.jsx)(V,{"aria-invalid":!!u.nodegroupName,id:`ng-name`,placeholder:`my-nodegroup`,...f(`nodegroupName`)}),(0,$.jsx)(K,{errors:[u.nodegroupName]})]}),(0,$.jsxs)(q,{children:[(0,$.jsx)(G,{children:(0,$.jsx)(`label`,{htmlFor:`ng-role`,children:`Node IAM role`})}),(0,$.jsxs)(`select`,{"aria-invalid":!!u.nodeRole,className:`h-7 w-full rounded-md border border-input bg-input/20 px-2 text-sm`,id:`ng-role`,...f(`nodeRole`),children:[(0,$.jsx)(`option`,{value:``,children:`Select role`}),c.map(e=>(0,$.jsx)(`option`,{value:e.Arn??``,children:e.RoleName},e.Arn))]}),(0,$.jsx)(K,{errors:[u.nodeRole]})]}),(0,$.jsxs)(q,{children:[(0,$.jsx)(G,{children:`Subnets`}),l.length===0?(0,$.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No subnets in the cluster VPC.`}):(0,$.jsx)(`div`,{className:`space-y-1`,children:l.map(e=>(0,$.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,$.jsx)(`input`,{"aria-label":`Subnet ${e.SubnetId}`,checked:g.includes(e.SubnetId??``),onChange:()=>_(e.SubnetId??``),type:`checkbox`}),(0,$.jsxs)(`span`,{className:`font-mono`,children:[e.SubnetId,` · `,e.CidrBlock]})]},e.SubnetId))}),(0,$.jsx)(K,{errors:[u.subnetIds]})]}),(0,$.jsxs)(q,{children:[(0,$.jsx)(G,{children:(0,$.jsx)(`label`,{htmlFor:`ng-instance-types`,children:`Instance types`})}),(0,$.jsx)(V,{id:`ng-instance-types`,placeholder:`t3.medium, t3.large`,...f(`instanceTypes`)}),(0,$.jsx)(K,{errors:[u.instanceTypes]})]}),(0,$.jsxs)(`div`,{className:`grid grid-cols-2 gap-3`,children:[(0,$.jsxs)(q,{children:[(0,$.jsx)(G,{children:(0,$.jsx)(`label`,{htmlFor:`ng-ami`,children:`AMI type`})}),(0,$.jsx)(`select`,{className:`h-7 w-full rounded-md border border-input bg-input/20 px-2 text-sm`,id:`ng-ami`,...f(`amiType`),children:C.map(e=>(0,$.jsx)(`option`,{value:e,children:e},e))})]}),(0,$.jsxs)(q,{children:[(0,$.jsx)(G,{children:(0,$.jsx)(`label`,{htmlFor:`ng-capacity`,children:`Capacity type`})}),(0,$.jsx)(`select`,{className:`h-7 w-full rounded-md border border-input bg-input/20 px-2 text-sm`,id:`ng-capacity`,...f(`capacityType`),children:E.map(e=>(0,$.jsx)(`option`,{value:e,children:e},e))})]})]}),(0,$.jsxs)(`div`,{className:`grid grid-cols-4 gap-3`,children:[(0,$.jsxs)(q,{children:[(0,$.jsx)(G,{children:(0,$.jsx)(`label`,{htmlFor:`ng-disk`,children:`Disk (GB)`})}),(0,$.jsx)(V,{id:`ng-disk`,type:`number`,...f(`diskSize`,{valueAsNumber:!0})})]}),(0,$.jsxs)(q,{children:[(0,$.jsx)(G,{children:(0,$.jsx)(`label`,{htmlFor:`ng-min`,children:`Min`})}),(0,$.jsx)(V,{id:`ng-min`,type:`number`,...f(`minSize`,{valueAsNumber:!0})})]}),(0,$.jsxs)(q,{children:[(0,$.jsx)(G,{children:(0,$.jsx)(`label`,{htmlFor:`ng-desired`,children:`Desired`})}),(0,$.jsx)(V,{id:`ng-desired`,type:`number`,...f(`desiredSize`,{valueAsNumber:!0})})]}),(0,$.jsxs)(q,{children:[(0,$.jsx)(G,{children:(0,$.jsx)(`label`,{htmlFor:`ng-max`,children:`Max`})}),(0,$.jsx)(V,{id:`ng-max`,type:`number`,...f(`maxSize`,{valueAsNumber:!0})})]})]}),(0,$.jsx)(K,{errors:[u.desiredSize]})]}),(0,$.jsxs)(le,{children:[(0,$.jsx)(ue,{children:`Cancel`}),(0,$.jsx)(ce,{disabled:s.isPending,onClick:e=>{e.preventDefault(),d(v)()},children:s.isPending?`Creating…`:`Create`})]})]})})}function Ge(e){let t=(0,Z.c)(27),{clusterName:n,clusterVersion:r,vpcId:i}=e,a;t[0]===n?a=t[1]:(a=L(n),t[0]=n,t[1]=a);let{data:s}=o(a),c=M(),[l,u]=(0,Q.useState)(!1),[d,p]=(0,Q.useState)(),m;t[2]===s.nodegroups?m=t[3]:(m=s.nodegroups??[],t[2]=s.nodegroups,t[3]=m);let h=m,g;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,$.jsx)(`div`,{className:`mb-4 flex justify-end`,children:(0,$.jsx)(f,{onClick:()=>u(!0),size:`sm`,children:`Add node group`})}),t[4]=g):g=t[4];let _;t[5]!==n||t[6]!==r||t[7]!==h?(_=h.length>0?(0,$.jsx)(`div`,{className:`space-y-4`,children:h.map(e=>(0,$.jsx)(Ue,{clusterName:n,clusterVersion:r,nodegroupName:e,onDelete:p},e))}):(0,$.jsx)(`p`,{className:`text-muted-foreground`,children:`No node groups.`}),t[5]=n,t[6]=r,t[7]=h,t[8]=_):_=t[8];let v;t[9]!==n||t[10]!==l||t[11]!==i?(v=(0,$.jsx)(We,{clusterName:n,onOpenChange:u,open:l,vpcId:i}),t[9]=n,t[10]=l,t[11]=i,t[12]=v):v=t[12];let y=`Delete node group "${d??``}"? This terminates its nodes.`,b;t[13]!==n||t[14]!==c||t[15]!==d?(b=()=>{d&&c.mutate({clusterName:n,nodegroupName:d},{onSuccess:()=>p(void 0)})},t[13]=n,t[14]=c,t[15]=d,t[16]=b):b=t[16];let x;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(x=e=>!e&&p(void 0),t[17]=x):x=t[17];let S=d!==void 0,C;t[18]!==c.isPending||t[19]!==y||t[20]!==b||t[21]!==S?(C=(0,$.jsx)(fe,{description:y,isPending:c.isPending,onConfirm:b,onOpenChange:x,open:S,title:`Delete node group`}),t[18]=c.isPending,t[19]=y,t[20]=b,t[21]=S,t[22]=C):C=t[22];let w;return t[23]!==C||t[24]!==_||t[25]!==v?(w=(0,$.jsxs)($.Fragment,{children:[g,_,v,C]}),t[23]=C,t[24]=_,t[25]=v,t[26]=w):w=t[26],w}var Ke=`ap-southeast-2`;function qe(e){switch(e??``){case`ACTIVE`:return`default`;case`FAILED`:return`destructive`;default:return`secondary`}}function Je(e){let t=(0,Z.c)(89),{clusterName:n}=e,r=I(),[a,s]=(0,Q.useState)(!1),p;t[0]===n?p=t[1]:(p=te(n),t[0]=n,t[1]=p);let{data:m}=o(p),h=A(),g=m.cluster,_;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(_={type:`bin`,value:`aws eks update-kubeconfig`},t[2]=_):_=t[2];let v;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(v={type:`flag`,value:` --name `},t[3]=v):v=t[3];let y;t[4]===n?y=t[5]:(y={type:`value`,value:n},t[4]=n,t[5]=y);let b;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(b={type:`flag`,value:` --region `},t[6]=b):b=t[6];let x;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(x={type:`value`,value:Ke},t[7]=x):x=t[7];let S;t[8]===y?S=t[9]:(S={label:`Configure kubectl`,parts:[_,v,y,b,x]},t[8]=y,t[9]=S);let C;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(C={label:`Verify access`,parts:[{type:`bin`,value:`kubectl get nodes`}]},t[10]=C):C=t[10];let w;t[11]===S?w=t[12]:(w=[S,C],t[11]=S,t[12]=w);let T=w,E;t[13]!==n||t[14]!==h||t[15]!==r?(E=function(){h.mutate(n,{onSuccess:()=>{r({to:`/eks/list-clusters`})}})},t[13]=n,t[14]=h,t[15]=r,t[16]=E):E=t[16];let D=E,O;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(O=(0,$.jsx)(l,{to:`/eks/list-clusters`,children:`Clusters`}),t[17]=O):O=t[17];let k;t[18]===Symbol.for(`react.memo_cache_sentinel`)?(k=()=>s(!0),t[18]=k):k=t[18];let j;t[19]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,$.jsxs)(f,{onClick:k,size:`sm`,variant:`destructive`,children:[(0,$.jsx)(d,{className:`size-4`}),`Delete`]}),t[19]=j):j=t[19];let M=g?.status,N;t[20]===M?N=t[21]:(N=qe(M),t[20]=M,t[21]=N);let P=g?.status??`UNKNOWN`,F;t[22]!==N||t[23]!==P?(F=(0,$.jsxs)(`div`,{className:`flex items-center gap-2`,children:[j,(0,$.jsx)(ve,{variant:N,children:P})]}),t[22]=N,t[23]=P,t[24]=F):F=t[24];let L;t[25]!==n||t[26]!==F?(L=(0,$.jsx)(ae,{actions:F,subtitle:`Cluster Details`,title:n}),t[25]=n,t[26]=F,t[27]=L):L=t[27];let R;t[28]!==h.error||t[29]!==h.isError?(R=h.isError&&(0,$.jsx)(i,{error:h.error instanceof Error?h.error:void 0,msg:`Failed to delete cluster.`}),t[28]=h.error,t[29]=h.isError,t[30]=R):R=t[30];let z;t[31]===Symbol.for(`react.memo_cache_sentinel`)?(z=(0,$.jsxs)(he,{children:[(0,$.jsx)(me,{value:`overview`,children:`Overview`}),(0,$.jsx)(me,{value:`compute`,children:`Compute`}),(0,$.jsx)(me,{value:`addons`,children:`Add-ons`}),(0,$.jsx)(me,{value:`access`,children:`Access`}),(0,$.jsx)(me,{value:`networking`,children:`Networking`}),(0,$.jsx)(me,{value:`connect`,children:`Connect`})]}),t[31]=z):z=t[31];let B;t[32]===Symbol.for(`react.memo_cache_sentinel`)?(B=(0,$.jsx)(Y.Header,{children:`Cluster`}),t[32]=B):B=t[32];let V=g?.arn,H;t[33]===V?H=t[34]:(H=(0,$.jsx)(X,{label:`ARN`,value:V}),t[33]=V,t[34]=H);let U=g?.status,ee;t[35]===U?ee=t[36]:(ee=(0,$.jsx)(X,{label:`Status`,value:U}),t[35]=U,t[36]=ee);let ne=g?.version,W;t[37]===ne?W=t[38]:(W=(0,$.jsx)(X,{label:`Kubernetes version`,value:ne}),t[37]=ne,t[38]=W);let re=g?.platformVersion,ie;t[39]===re?ie=t[40]:(ie=(0,$.jsx)(X,{label:`Platform version`,value:re}),t[39]=re,t[40]=ie);let G=g?.endpoint,K;t[41]===G?K=t[42]:(K=(0,$.jsx)(X,{label:`Endpoint`,value:G}),t[41]=G,t[42]=K);let q=g?.identity?.oidc?.issuer,oe;t[43]===q?oe=t[44]:(oe=(0,$.jsx)(X,{label:`OIDC issuer`,value:q}),t[43]=q,t[44]=oe);let se=g?.resourcesVpcConfig?.vpcId,ce;t[45]===se?ce=t[46]:(ce=(0,$.jsx)(X,{label:`VPC`,value:se}),t[45]=se,t[46]=ce);let le=g?.createdAt,ue;t[47]===le?ue=t[48]:(ue=c(le),t[47]=le,t[48]=ue);let J;t[49]===ue?J=t[50]:(J=(0,$.jsx)(X,{label:`Created at`,value:ue}),t[49]=ue,t[50]=J);let de;t[51]!==H||t[52]!==ee||t[53]!==W||t[54]!==ie||t[55]!==K||t[56]!==oe||t[57]!==ce||t[58]!==J?(de=(0,$.jsx)(ge,{value:`overview`,children:(0,$.jsxs)(Y,{children:[B,(0,$.jsxs)(Y.Content,{children:[H,ee,W,ie,K,oe,ce,J]})]})}),t[51]=H,t[52]=ee,t[53]=W,t[54]=ie,t[55]=K,t[56]=oe,t[57]=ce,t[58]=J,t[59]=de):de=t[59];let pe=g?.version,ye=g?.resourcesVpcConfig?.vpcId,be;t[60]!==n||t[61]!==pe||t[62]!==ye?(be=(0,$.jsx)(ge,{value:`compute`,children:(0,$.jsx)(Ge,{clusterName:n,clusterVersion:pe,vpcId:ye})}),t[60]=n,t[61]=pe,t[62]=ye,t[63]=be):be=t[63];let xe;t[64]===n?xe=t[65]:(xe=(0,$.jsx)(ge,{value:`addons`,children:(0,$.jsx)(Ie,{clusterName:n})}),t[64]=n,t[65]=xe);let Se;t[66]===n?Se=t[67]:(Se=(0,$.jsx)(ge,{value:`access`,children:(0,$.jsx)(Ee,{clusterName:n})}),t[66]=n,t[67]=Se);let Ce;t[68]===g?Ce=t[69]:(Ce=(0,$.jsx)(ge,{value:`networking`,children:(0,$.jsx)(Re,{cluster:g})}),t[68]=g,t[69]=Ce);let we;t[70]===T?we=t[71]:(we=(0,$.jsx)(ge,{value:`connect`,children:(0,$.jsx)(u,{commands:T})}),t[70]=T,t[71]=we);let Te;t[72]!==de||t[73]!==be||t[74]!==xe||t[75]!==Se||t[76]!==Ce||t[77]!==we?(Te=(0,$.jsxs)(_e,{defaultValue:`overview`,children:[z,de,be,xe,Se,Ce,we]}),t[72]=de,t[73]=be,t[74]=xe,t[75]=Se,t[76]=Ce,t[77]=we,t[78]=Te):Te=t[78];let De=`This permanently deletes cluster "${n}" and its control plane. This cannot be undone.`,Oe;t[79]!==h.isPending||t[80]!==D||t[81]!==a||t[82]!==De?(Oe=(0,$.jsx)(fe,{description:De,isPending:h.isPending,onConfirm:D,onOpenChange:s,open:a,title:`Delete cluster`}),t[79]=h.isPending,t[80]=D,t[81]=a,t[82]=De,t[83]=Oe):Oe=t[83];let ke;return t[84]!==L||t[85]!==R||t[86]!==Te||t[87]!==Oe?(ke=(0,$.jsxs)($.Fragment,{children:[O,L,R,Te,Oe]}),t[84]=L,t[85]=R,t[86]=Te,t[87]=Oe,t[88]=ke):ke=t[88],ke}function Ye(){let e=(0,Z.c)(2),{clusterName:t}=U.useParams(),n;return e[0]===t?n=e[1]:(n=(0,$.jsx)(Je,{clusterName:t}),e[0]=t,e[1]=n),n}export{Ye as component}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/create-cluster.js b/spinifex/services/spinifexui/frontend/dist/assets/create-cluster.js index 1cf23ae5a..3a43d5628 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/create-cluster.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/create-cluster.js @@ -1 +1 @@ -import{n as e,o as t,r as n,t as r}from"./compiler-runtime.js";import{t as i}from"./error-banner.js";import{t as a}from"./useSuspenseQuery.js";import{Ut as o}from"./auth.js";import{t as s}from"./back-link.js";import{t as c}from"./check.js";import{c as l,i as u,n as d,s as f,t as p}from"./select.js";import{t as m}from"./copy.js";import{t as h}from"./rotate-cw.js";import{t as g}from"./triangle-alert.js";import{t as _}from"./button.js";import{c as v,i as y,p as b}from"./eks.js";import{Ir as x,Lr as S,Lt as C,Nt as w,Rn as T,pt as E,rt as D}from"./index.js";import{i as O,n as k,t as ee}from"./zod.js";import{t as A}from"./use-copy-to-clipboard.js";import{t as te}from"./form-actions.js";import{t as j}from"./page-heading.js";import{a as M,r as N,t as P}from"./field.js";import{t as F}from"./system-managed.js";var I=t(n(),1),L=r(),R=e(),z=`make import-eks-node-image`;function B(e){let t=(0,L.c)(21),{isRechecking:n,onRecheck:r}=e,{copied:i,copy:a}=A(),o;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,R.jsx)(g,{className:`mt-0.5 size-5 shrink-0 text-tactical-amber`}),t[0]=o):o=t[0];let s;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,R.jsxs)(`div`,{className:`space-y-1`,children:[(0,R.jsx)(`h2`,{className:`text-sm font-semibold text-foreground`,children:`EKS system image not found`}),(0,R.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`EKS clusters boot a Spinifex-managed node image (K3s) that is not shipped with the platform. Install it on the host before creating a cluster.`})]}),t[1]=s):s=t[1];let l,u;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,R.jsx)(`span`,{className:`text-muted-foreground select-none`,children:`$`}),u=(0,R.jsx)(`span`,{className:`flex-1 text-foreground`,children:z}),t[2]=l,t[3]=u):(l=t[2],u=t[3]);let d;t[4]===a?d=t[5]:(d=()=>void a(z),t[4]=a,t[5]=d);let f;t[6]===i?f=t[7]:(f=i?(0,R.jsx)(c,{className:`size-3.5 text-tactical-green`}):(0,R.jsx)(m,{className:`size-3.5`}),t[6]=i,t[7]=f);let p;t[8]!==d||t[9]!==f?(p=(0,R.jsxs)(`div`,{className:`flex items-center gap-2 rounded border border-border bg-background px-3 py-2 font-mono text-xs`,children:[l,u,(0,R.jsx)(`button`,{"aria-label":`Copy command`,className:`text-muted-foreground transition-colors hover:text-foreground`,onClick:d,type:`button`,children:f})]}),t[8]=d,t[9]=f,t[10]=p):p=t[10];let v;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,R.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Run from the Spinifex repo root. The command builds and registers the node image, then click Recheck.`}),t[11]=v):v=t[11];let y=n?`size-4 animate-spin`:`size-4`,b;t[12]===y?b=t[13]:(b=(0,R.jsx)(h,{className:y}),t[12]=y,t[13]=b);let x;t[14]!==n||t[15]!==r||t[16]!==b?(x=(0,R.jsxs)(_,{disabled:n,onClick:r,size:`sm`,variant:`outline`,children:[b,`Recheck`]}),t[14]=n,t[15]=r,t[16]=b,t[17]=x):x=t[17];let S;return t[18]!==x||t[19]!==p?(S=(0,R.jsx)(`div`,{className:`max-w-2xl rounded-md border border-tactical-amber/40 bg-tactical-amber/5 p-6`,children:(0,R.jsxs)(`div`,{className:`flex items-start gap-3`,children:[o,(0,R.jsxs)(`div`,{className:`space-y-4`,children:[s,p,v,x]})]})}),t[18]=x,t[19]=p,t[20]=S):S=t[20],S}function V(e){let t=o(e.Tags);return t?`${e.VpcId} (${t})`:`${e.VpcId} (${e.CidrBlock})`}function H(e){let t=o(e.Tags);return`${t?`${e.SubnetId} (${t})`:e.SubnetId} · ${e.CidrBlock}`}function U(){let e=x(),t=S(),[n,r]=(0,I.useState)(!1),{data:o}=a(C),{data:c}=a(w),{data:m}=a(D),{data:h}=a(E),g=b(),A=(h.Images??[]).some(F),L=async()=>{r(!0);try{await t.invalidateQueries({queryKey:E.queryKey})}finally{r(!1)}},z=o.Vpcs??[],U=c.Subnets??[],W=m.Roles??[],{control:G,formState:{errors:K,isSubmitting:q},handleSubmit:J,register:ne,setValue:Y,watch:X}=O({resolver:ee(v),defaultValues:{name:``,version:y[0],roleArn:``,vpcId:``,subnetIds:[],bootstrapClusterCreatorAdminPermissions:!0,endpointPublicAccess:!0,endpointPrivateAccess:!1,publicAccessCidrs:[`0.0.0.0/0`]}}),re=X(`vpcId`),Z=X(`subnetIds`),ie=X(`endpointPublicAccess`),Q=X(`publicAccessCidrs`),$=U.filter(e=>e.VpcId===re),ae=(e=``)=>{Y(`vpcId`,e??``,{shouldValidate:!0}),Y(`subnetIds`,[])},oe=e=>{Y(`subnetIds`,Z.includes(e)?Z.filter(t=>t!==e):[...Z,e],{shouldValidate:!0})},se=(e,t)=>{let n=[...Q];n[e]=t,Y(`publicAccessCidrs`,n,{shouldValidate:!0})},ce=()=>Y(`publicAccessCidrs`,[...Q,``],{shouldValidate:!0}),le=e=>Y(`publicAccessCidrs`,Q.filter((t,n)=>n!==e),{shouldValidate:!0});return A?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(s,{to:`/eks/list-clusters`,children:`Clusters`}),(0,R.jsx)(j,{subtitle:`EKS`,title:`Create Cluster`}),g.error&&(0,R.jsx)(i,{error:g.error,msg:`Failed to create cluster`}),(0,R.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:J(async t=>{await g.mutateAsync(t),await e({to:`/eks/list-clusters/$clusterName`,params:{clusterName:t.name}})}),children:[(0,R.jsxs)(P,{children:[(0,R.jsx)(M,{children:(0,R.jsx)(`label`,{htmlFor:`cluster-name`,children:`Name`})}),(0,R.jsx)(T,{"aria-invalid":!!K.name,id:`cluster-name`,placeholder:`my-cluster`,...ne(`name`)}),(0,R.jsx)(N,{errors:[K.name]})]}),(0,R.jsxs)(P,{children:[(0,R.jsx)(M,{children:(0,R.jsx)(`label`,{htmlFor:`cluster-version`,children:`Kubernetes version`})}),(0,R.jsx)(k,{control:G,name:`version`,render:({field:e})=>(0,R.jsxs)(p,{onValueChange:e.onChange,value:e.value,children:[(0,R.jsx)(f,{className:`w-full`,id:`cluster-version`,children:(0,R.jsx)(l,{placeholder:`Select version`})}),(0,R.jsx)(d,{children:y.map(e=>(0,R.jsx)(u,{value:e,children:e},e))})]})}),(0,R.jsx)(N,{errors:[K.version]})]}),(0,R.jsxs)(P,{children:[(0,R.jsx)(M,{children:(0,R.jsx)(`label`,{htmlFor:`cluster-role`,children:`Cluster IAM role`})}),(0,R.jsx)(k,{control:G,name:`roleArn`,render:({field:e})=>(0,R.jsxs)(p,{onValueChange:e.onChange,value:e.value,children:[(0,R.jsx)(f,{"aria-invalid":!!K.roleArn,className:`w-full`,id:`cluster-role`,children:(0,R.jsx)(l,{placeholder:`Select role`})}),(0,R.jsx)(d,{children:W.map(e=>(0,R.jsx)(u,{value:e.Arn??``,children:e.RoleName},e.Arn))})]})}),(0,R.jsx)(N,{errors:[K.roleArn]})]}),(0,R.jsxs)(P,{children:[(0,R.jsx)(M,{children:(0,R.jsx)(`label`,{htmlFor:`cluster-vpc`,children:`VPC`})}),(0,R.jsx)(k,{control:G,name:`vpcId`,render:({field:e})=>(0,R.jsxs)(p,{onValueChange:e=>ae(e),value:e.value,children:[(0,R.jsx)(f,{"aria-invalid":!!K.vpcId,className:`w-full`,id:`cluster-vpc`,children:(0,R.jsx)(l,{placeholder:`Select VPC`})}),(0,R.jsx)(d,{children:z.map(e=>(0,R.jsx)(u,{value:e.VpcId??``,children:V(e)},e.VpcId))})]})}),(0,R.jsx)(N,{errors:[K.vpcId]})]}),(0,R.jsxs)(P,{children:[(0,R.jsx)(M,{children:`Subnets (select at least 1)`}),$.length===0?(0,R.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No subnets in the selected VPC.`}):(0,R.jsx)(`div`,{className:`space-y-1`,children:$.map(e=>(0,R.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,R.jsx)(`input`,{"aria-label":`Subnet ${H(e)}`,checked:Z.includes(e.SubnetId??``),onChange:()=>oe(e.SubnetId??``),type:`checkbox`}),(0,R.jsx)(`span`,{className:`font-mono`,children:H(e)})]},e.SubnetId))}),(0,R.jsx)(N,{errors:[K.subnetIds]})]}),(0,R.jsxs)(P,{children:[(0,R.jsx)(M,{children:`Endpoint access`}),(0,R.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Public access exposes the API server on an internet-facing endpoint; private access keeps it reachable only from within the VPC. At least one must be enabled.`}),(0,R.jsx)(k,{control:G,name:`endpointPublicAccess`,render:({field:e})=>(0,R.jsxs)(`label`,{className:`mt-2 flex items-center gap-2 text-xs`,children:[(0,R.jsx)(`input`,{"aria-label":`Enable public access`,checked:e.value,onChange:t=>e.onChange(t.target.checked),type:`checkbox`}),`Public`]})}),(0,R.jsx)(k,{control:G,name:`endpointPrivateAccess`,render:({field:e})=>(0,R.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,R.jsx)(`input`,{"aria-label":`Enable private access`,checked:e.value,onChange:t=>e.onChange(t.target.checked),type:`checkbox`}),`Private`]})}),(0,R.jsx)(N,{errors:[K.endpointPublicAccess]}),ie&&(0,R.jsxs)(`div`,{className:`mt-2 space-y-2`,children:[(0,R.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`Public access source ranges (CIDR). Defaults to`,` `,(0,R.jsx)(`span`,{className:`font-mono`,children:`0.0.0.0/0`}),`.`]}),Q.map((e,t)=>(0,R.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,R.jsx)(T,{"aria-label":`Public access CIDR ${t+1}`,className:`font-mono`,onChange:e=>se(t,e.target.value),placeholder:`203.0.113.0/24`,value:e}),(0,R.jsx)(_,{onClick:()=>le(t),size:`sm`,type:`button`,variant:`ghost`,children:`Remove`})]},t)),(0,R.jsx)(_,{onClick:ce,size:`sm`,type:`button`,variant:`outline`,children:`Add CIDR`}),(0,R.jsx)(N,{errors:[K.publicAccessCidrs]})]})]}),(0,R.jsxs)(P,{children:[(0,R.jsx)(M,{children:`Access`}),(0,R.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`Authentication mode is `,(0,R.jsx)(`span`,{className:`font-mono`,children:`API`}),` (IAM access entries). The legacy aws-auth ConfigMap is not supported.`]}),(0,R.jsx)(k,{control:G,name:`bootstrapClusterCreatorAdminPermissions`,render:({field:e})=>(0,R.jsxs)(`label`,{className:`mt-2 flex items-center gap-2 text-xs`,children:[(0,R.jsx)(`input`,{"aria-label":`Grant the cluster creator admin permissions`,checked:e.value,onChange:t=>e.onChange(t.target.checked),type:`checkbox`}),`Grant the cluster creator admin permissions`]})})]}),(0,R.jsx)(te,{isPending:g.isPending,isSubmitting:q,onCancel:async()=>await e({to:`/eks/list-clusters`}),pendingLabel:`Creating…`,submitLabel:`Create Cluster`})]})]}):(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(s,{to:`/eks/list-clusters`,children:`Clusters`}),(0,R.jsx)(j,{subtitle:`EKS`,title:`Create Cluster`}),(0,R.jsx)(B,{isRechecking:n,onRecheck:L})]})}var W=U;export{W as component}; \ No newline at end of file +import{n as e,o as t,r as n,t as r}from"./compiler-runtime.js";import{t as i}from"./error-banner.js";import{t as a}from"./useSuspenseQuery.js";import{Ut as o}from"./auth.js";import{t as s}from"./back-link.js";import{t as c}from"./check.js";import{c as l,i as u,n as d,s as f,t as p}from"./select.js";import{t as m}from"./copy.js";import{t as h}from"./rotate-cw.js";import{t as g}from"./triangle-alert.js";import{t as _}from"./button.js";import{i as v,l as y,m as b}from"./eks.js";import{Ir as x,Lr as S,Lt as C,Nt as w,Rn as T,pt as E,rt as D}from"./index.js";import{i as O,n as k,t as ee}from"./zod.js";import{t as A}from"./use-copy-to-clipboard.js";import{t as te}from"./form-actions.js";import{t as j}from"./page-heading.js";import{a as M,r as N,t as P}from"./field.js";import{t as F}from"./system-managed.js";var I=t(n(),1),L=r(),R=e(),z=`make import-eks-node-image`;function B(e){let t=(0,L.c)(21),{isRechecking:n,onRecheck:r}=e,{copied:i,copy:a}=A(),o;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,R.jsx)(g,{className:`mt-0.5 size-5 shrink-0 text-tactical-amber`}),t[0]=o):o=t[0];let s;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,R.jsxs)(`div`,{className:`space-y-1`,children:[(0,R.jsx)(`h2`,{className:`text-sm font-semibold text-foreground`,children:`EKS system image not found`}),(0,R.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`EKS clusters boot a Spinifex-managed node image (K3s) that is not shipped with the platform. Install it on the host before creating a cluster.`})]}),t[1]=s):s=t[1];let l,u;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,R.jsx)(`span`,{className:`text-muted-foreground select-none`,children:`$`}),u=(0,R.jsx)(`span`,{className:`flex-1 text-foreground`,children:z}),t[2]=l,t[3]=u):(l=t[2],u=t[3]);let d;t[4]===a?d=t[5]:(d=()=>void a(z),t[4]=a,t[5]=d);let f;t[6]===i?f=t[7]:(f=i?(0,R.jsx)(c,{className:`size-3.5 text-tactical-green`}):(0,R.jsx)(m,{className:`size-3.5`}),t[6]=i,t[7]=f);let p;t[8]!==d||t[9]!==f?(p=(0,R.jsxs)(`div`,{className:`flex items-center gap-2 rounded border border-border bg-background px-3 py-2 font-mono text-xs`,children:[l,u,(0,R.jsx)(`button`,{"aria-label":`Copy command`,className:`text-muted-foreground transition-colors hover:text-foreground`,onClick:d,type:`button`,children:f})]}),t[8]=d,t[9]=f,t[10]=p):p=t[10];let v;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,R.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Run from the Spinifex repo root. The command builds and registers the node image, then click Recheck.`}),t[11]=v):v=t[11];let y=n?`size-4 animate-spin`:`size-4`,b;t[12]===y?b=t[13]:(b=(0,R.jsx)(h,{className:y}),t[12]=y,t[13]=b);let x;t[14]!==n||t[15]!==r||t[16]!==b?(x=(0,R.jsxs)(_,{disabled:n,onClick:r,size:`sm`,variant:`outline`,children:[b,`Recheck`]}),t[14]=n,t[15]=r,t[16]=b,t[17]=x):x=t[17];let S;return t[18]!==x||t[19]!==p?(S=(0,R.jsx)(`div`,{className:`max-w-2xl rounded-md border border-tactical-amber/40 bg-tactical-amber/5 p-6`,children:(0,R.jsxs)(`div`,{className:`flex items-start gap-3`,children:[o,(0,R.jsxs)(`div`,{className:`space-y-4`,children:[s,p,v,x]})]})}),t[18]=x,t[19]=p,t[20]=S):S=t[20],S}function V(e){let t=o(e.Tags);return t?`${e.VpcId} (${t})`:`${e.VpcId} (${e.CidrBlock})`}function H(e){let t=o(e.Tags);return`${t?`${e.SubnetId} (${t})`:e.SubnetId} · ${e.CidrBlock}`}function U(){let e=x(),t=S(),[n,r]=(0,I.useState)(!1),{data:o}=a(C),{data:c}=a(w),{data:m}=a(D),{data:h}=a(E),g=b(),A=(h.Images??[]).some(F),L=async()=>{r(!0);try{await t.invalidateQueries({queryKey:E.queryKey})}finally{r(!1)}},z=o.Vpcs??[],U=c.Subnets??[],W=m.Roles??[],{control:G,formState:{errors:K,isSubmitting:q},handleSubmit:J,register:ne,setValue:Y,watch:X}=O({resolver:ee(y),defaultValues:{name:``,version:v[0],roleArn:``,vpcId:``,subnetIds:[],bootstrapClusterCreatorAdminPermissions:!0,endpointPublicAccess:!0,endpointPrivateAccess:!1,publicAccessCidrs:[`0.0.0.0/0`]}}),re=X(`vpcId`),Z=X(`subnetIds`),ie=X(`endpointPublicAccess`),Q=X(`publicAccessCidrs`),$=U.filter(e=>e.VpcId===re),ae=(e=``)=>{Y(`vpcId`,e??``,{shouldValidate:!0}),Y(`subnetIds`,[])},oe=e=>{Y(`subnetIds`,Z.includes(e)?Z.filter(t=>t!==e):[...Z,e],{shouldValidate:!0})},se=(e,t)=>{let n=[...Q];n[e]=t,Y(`publicAccessCidrs`,n,{shouldValidate:!0})},ce=()=>Y(`publicAccessCidrs`,[...Q,``],{shouldValidate:!0}),le=e=>Y(`publicAccessCidrs`,Q.filter((t,n)=>n!==e),{shouldValidate:!0});return A?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(s,{to:`/eks/list-clusters`,children:`Clusters`}),(0,R.jsx)(j,{subtitle:`EKS`,title:`Create Cluster`}),g.error&&(0,R.jsx)(i,{error:g.error,msg:`Failed to create cluster`}),(0,R.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:J(async t=>{await g.mutateAsync(t),await e({to:`/eks/list-clusters/$clusterName`,params:{clusterName:t.name}})}),children:[(0,R.jsxs)(P,{children:[(0,R.jsx)(M,{children:(0,R.jsx)(`label`,{htmlFor:`cluster-name`,children:`Name`})}),(0,R.jsx)(T,{"aria-invalid":!!K.name,id:`cluster-name`,placeholder:`my-cluster`,...ne(`name`)}),(0,R.jsx)(N,{errors:[K.name]})]}),(0,R.jsxs)(P,{children:[(0,R.jsx)(M,{children:(0,R.jsx)(`label`,{htmlFor:`cluster-version`,children:`Kubernetes version`})}),(0,R.jsx)(k,{control:G,name:`version`,render:({field:e})=>(0,R.jsxs)(p,{onValueChange:e.onChange,value:e.value,children:[(0,R.jsx)(f,{className:`w-full`,id:`cluster-version`,children:(0,R.jsx)(l,{placeholder:`Select version`})}),(0,R.jsx)(d,{children:v.map(e=>(0,R.jsx)(u,{value:e,children:e},e))})]})}),(0,R.jsx)(N,{errors:[K.version]})]}),(0,R.jsxs)(P,{children:[(0,R.jsx)(M,{children:(0,R.jsx)(`label`,{htmlFor:`cluster-role`,children:`Cluster IAM role`})}),(0,R.jsx)(k,{control:G,name:`roleArn`,render:({field:e})=>(0,R.jsxs)(p,{onValueChange:e.onChange,value:e.value,children:[(0,R.jsx)(f,{"aria-invalid":!!K.roleArn,className:`w-full`,id:`cluster-role`,children:(0,R.jsx)(l,{placeholder:`Select role`})}),(0,R.jsx)(d,{children:W.map(e=>(0,R.jsx)(u,{value:e.Arn??``,children:e.RoleName},e.Arn))})]})}),(0,R.jsx)(N,{errors:[K.roleArn]})]}),(0,R.jsxs)(P,{children:[(0,R.jsx)(M,{children:(0,R.jsx)(`label`,{htmlFor:`cluster-vpc`,children:`VPC`})}),(0,R.jsx)(k,{control:G,name:`vpcId`,render:({field:e})=>(0,R.jsxs)(p,{onValueChange:e=>ae(e),value:e.value,children:[(0,R.jsx)(f,{"aria-invalid":!!K.vpcId,className:`w-full`,id:`cluster-vpc`,children:(0,R.jsx)(l,{placeholder:`Select VPC`})}),(0,R.jsx)(d,{children:z.map(e=>(0,R.jsx)(u,{value:e.VpcId??``,children:V(e)},e.VpcId))})]})}),(0,R.jsx)(N,{errors:[K.vpcId]})]}),(0,R.jsxs)(P,{children:[(0,R.jsx)(M,{children:`Subnets (select at least 1)`}),$.length===0?(0,R.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No subnets in the selected VPC.`}):(0,R.jsx)(`div`,{className:`space-y-1`,children:$.map(e=>(0,R.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,R.jsx)(`input`,{"aria-label":`Subnet ${H(e)}`,checked:Z.includes(e.SubnetId??``),onChange:()=>oe(e.SubnetId??``),type:`checkbox`}),(0,R.jsx)(`span`,{className:`font-mono`,children:H(e)})]},e.SubnetId))}),(0,R.jsx)(N,{errors:[K.subnetIds]})]}),(0,R.jsxs)(P,{children:[(0,R.jsx)(M,{children:`Endpoint access`}),(0,R.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Public access exposes the API server on an internet-facing endpoint; private access keeps it reachable only from within the VPC. At least one must be enabled.`}),(0,R.jsx)(k,{control:G,name:`endpointPublicAccess`,render:({field:e})=>(0,R.jsxs)(`label`,{className:`mt-2 flex items-center gap-2 text-xs`,children:[(0,R.jsx)(`input`,{"aria-label":`Enable public access`,checked:e.value,onChange:t=>e.onChange(t.target.checked),type:`checkbox`}),`Public`]})}),(0,R.jsx)(k,{control:G,name:`endpointPrivateAccess`,render:({field:e})=>(0,R.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,R.jsx)(`input`,{"aria-label":`Enable private access`,checked:e.value,onChange:t=>e.onChange(t.target.checked),type:`checkbox`}),`Private`]})}),(0,R.jsx)(N,{errors:[K.endpointPublicAccess]}),ie&&(0,R.jsxs)(`div`,{className:`mt-2 space-y-2`,children:[(0,R.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`Public access source ranges (CIDR). Defaults to`,` `,(0,R.jsx)(`span`,{className:`font-mono`,children:`0.0.0.0/0`}),`.`]}),Q.map((e,t)=>(0,R.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,R.jsx)(T,{"aria-label":`Public access CIDR ${t+1}`,className:`font-mono`,onChange:e=>se(t,e.target.value),placeholder:`203.0.113.0/24`,value:e}),(0,R.jsx)(_,{onClick:()=>le(t),size:`sm`,type:`button`,variant:`ghost`,children:`Remove`})]},t)),(0,R.jsx)(_,{onClick:ce,size:`sm`,type:`button`,variant:`outline`,children:`Add CIDR`}),(0,R.jsx)(N,{errors:[K.publicAccessCidrs]})]})]}),(0,R.jsxs)(P,{children:[(0,R.jsx)(M,{children:`Access`}),(0,R.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`Authentication mode is `,(0,R.jsx)(`span`,{className:`font-mono`,children:`API`}),` (IAM access entries). The legacy aws-auth ConfigMap is not supported.`]}),(0,R.jsx)(k,{control:G,name:`bootstrapClusterCreatorAdminPermissions`,render:({field:e})=>(0,R.jsxs)(`label`,{className:`mt-2 flex items-center gap-2 text-xs`,children:[(0,R.jsx)(`input`,{"aria-label":`Grant the cluster creator admin permissions`,checked:e.value,onChange:t=>e.onChange(t.target.checked),type:`checkbox`}),`Grant the cluster creator admin permissions`]})})]}),(0,R.jsx)(te,{isPending:g.isPending,isSubmitting:q,onCancel:async()=>await e({to:`/eks/list-clusters`}),pendingLabel:`Creating…`,submitLabel:`Create Cluster`})]})]}):(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(s,{to:`/eks/list-clusters`,children:`Clusters`}),(0,R.jsx)(j,{subtitle:`EKS`,title:`Create Cluster`}),(0,R.jsx)(B,{isRechecking:n,onRecheck:L})]})}var W=U;export{W as component}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/eks.js b/spinifex/services/spinifexui/frontend/dist/assets/eks.js index 578d78150..80733168f 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/eks.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/eks.js @@ -1 +1 @@ -import{t as e}from"./compiler-runtime.js";import{n as t}from"./error-banner.js";import{$t as n,At as r,Ft as i,It as a,Lt as ee,Mt as te,Nt as ne,Pt as o,Qt as s,Rt as c,Wt as l,Zt as u,en as d,i as f,jt as p}from"./awsClient.js";import{St as m,a as h,f as g,l as _,o as v,s as y,u as b,ut as x}from"./auth.js";import{Lr as S}from"./index.js";import{i as C}from"./subnet-calculator.js";var w=class extends m.classBuilder().ep(d).m(function(e,t,n,r){return[x(n,e.getEndpointParameterInstructions())]}).s(`AWSWesleyFrontend`,`AssociateAccessPolicy`,{}).n(`EKSClient`,`AssociateAccessPolicyCommand`).sc(r).build(){},T=class extends m.classBuilder().ep(d).m(function(e,t,n,r){return[x(n,e.getEndpointParameterInstructions())]}).s(`AWSWesleyFrontend`,`CreateAccessEntry`,{}).n(`EKSClient`,`CreateAccessEntryCommand`).sc(p).build(){},E=class extends m.classBuilder().ep(d).m(function(e,t,n,r){return[x(n,e.getEndpointParameterInstructions())]}).s(`AWSWesleyFrontend`,`CreateAddon`,{}).n(`EKSClient`,`CreateAddonCommand`).sc(te).build(){},D=class extends m.classBuilder().ep(d).m(function(e,t,n,r){return[x(n,e.getEndpointParameterInstructions())]}).s(`AWSWesleyFrontend`,`CreateCluster`,{}).n(`EKSClient`,`CreateClusterCommand`).sc(ne).build(){},O=class extends m.classBuilder().ep(d).m(function(e,t,n,r){return[x(n,e.getEndpointParameterInstructions())]}).s(`AWSWesleyFrontend`,`CreateNodegroup`,{}).n(`EKSClient`,`CreateNodegroupCommand`).sc(o).build(){},k=class extends m.classBuilder().ep(d).m(function(e,t,n,r){return[x(n,e.getEndpointParameterInstructions())]}).s(`AWSWesleyFrontend`,`DeleteAccessEntry`,{}).n(`EKSClient`,`DeleteAccessEntryCommand`).sc(i).build(){},A=class extends m.classBuilder().ep(d).m(function(e,t,n,r){return[x(n,e.getEndpointParameterInstructions())]}).s(`AWSWesleyFrontend`,`DeleteAddon`,{}).n(`EKSClient`,`DeleteAddonCommand`).sc(a).build(){},j=class extends m.classBuilder().ep(d).m(function(e,t,n,r){return[x(n,e.getEndpointParameterInstructions())]}).s(`AWSWesleyFrontend`,`DeleteCluster`,{}).n(`EKSClient`,`DeleteClusterCommand`).sc(ee).build(){},M=class extends m.classBuilder().ep(d).m(function(e,t,n,r){return[x(n,e.getEndpointParameterInstructions())]}).s(`AWSWesleyFrontend`,`DeleteNodegroup`,{}).n(`EKSClient`,`DeleteNodegroupCommand`).sc(c).build(){},N=class extends m.classBuilder().ep(d).m(function(e,t,n,r){return[x(n,e.getEndpointParameterInstructions())]}).s(`AWSWesleyFrontend`,`DisassociateAccessPolicy`,{}).n(`EKSClient`,`DisassociateAccessPolicyCommand`).sc(l).build(){},P=class extends m.classBuilder().ep(d).m(function(e,t,n,r){return[x(n,e.getEndpointParameterInstructions())]}).s(`AWSWesleyFrontend`,`UpdateAddon`,{}).n(`EKSClient`,`UpdateAddonCommand`).sc(u).build(){},F=class extends m.classBuilder().ep(d).m(function(e,t,n,r){return[x(n,e.getEndpointParameterInstructions())]}).s(`AWSWesleyFrontend`,`UpdateNodegroupConfig`,{}).n(`EKSClient`,`UpdateNodegroupConfigCommand`).sc(s).build(){},I=class extends m.classBuilder().ep(d).m(function(e,t,n,r){return[x(n,e.getEndpointParameterInstructions())]}).s(`AWSWesleyFrontend`,`UpdateNodegroupVersion`,{}).n(`EKSClient`,`UpdateNodegroupVersionCommand`).sc(n).build(){},L=e();function R(){let e=(0,L.c)(2),n=S(),r;return e[0]===n?r=e[1]:(r={mutationFn:z,onSuccess:()=>{n.invalidateQueries({queryKey:[`eks`,`clusters`]})}},e[0]=n,e[1]=r),t(r)}async function z(e){let t=new D({name:e.name,version:e.version,roleArn:e.roleArn,resourcesVpcConfig:{subnetIds:e.subnetIds,endpointPublicAccess:e.endpointPublicAccess,endpointPrivateAccess:e.endpointPrivateAccess,publicAccessCidrs:e.endpointPublicAccess?e.publicAccessCidrs:void 0},accessConfig:{authenticationMode:`API`,bootstrapClusterCreatorAdminPermissions:e.bootstrapClusterCreatorAdminPermissions}});return await f().send(t)}function B(){let e=(0,L.c)(2),n=S(),r;return e[0]===n?r=e[1]:(r={mutationFn:V,onSuccess:()=>{n.invalidateQueries({queryKey:[`eks`,`clusters`]})}},e[0]=n,e[1]=r),t(r)}async function V(e){let t=new j({name:e});return await f().send(t)}function H(){let e=(0,L.c)(2),n=S(),r;return e[0]===n?r=e[1]:(r={mutationFn:U,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`eks`,`clusters`,t.clusterName,`nodegroups`]})}},e[0]=n,e[1]=r),t(r)}async function U(e){let t=new O({clusterName:e.clusterName,nodegroupName:e.nodegroupName,nodeRole:e.nodeRole,subnets:e.subnetIds,instanceTypes:e.instanceTypes,amiType:e.amiType,capacityType:e.capacityType,diskSize:e.diskSize,scalingConfig:{minSize:e.minSize,maxSize:e.maxSize,desiredSize:e.desiredSize}});return await f().send(t)}function W(){let e=(0,L.c)(2),n=S(),r;return e[0]===n?r=e[1]:(r={mutationFn:re,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`eks`,`clusters`,t.clusterName,`nodegroups`]})}},e[0]=n,e[1]=r),t(r)}async function re(e){let t=new F({clusterName:e.clusterName,nodegroupName:e.nodegroupName,scalingConfig:{minSize:e.minSize,maxSize:e.maxSize,desiredSize:e.desiredSize}});return await f().send(t)}function G(){let e=(0,L.c)(2),n=S(),r;return e[0]===n?r=e[1]:(r={mutationFn:K,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`eks`,`clusters`,t.clusterName,`nodegroups`]})}},e[0]=n,e[1]=r),t(r)}async function K(e){let t=new I({clusterName:e.clusterName,nodegroupName:e.nodegroupName,version:e.version});return await f().send(t)}function q(){let e=(0,L.c)(2),n=S(),r;return e[0]===n?r=e[1]:(r={mutationFn:J,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`eks`,`clusters`,t.clusterName,`nodegroups`]})}},e[0]=n,e[1]=r),t(r)}async function J(e){let t=new M({clusterName:e.clusterName,nodegroupName:e.nodegroupName});return await f().send(t)}function Y(){let e=(0,L.c)(2),n=S(),r;return e[0]===n?r=e[1]:(r={mutationFn:X,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`eks`,`clusters`,t.clusterName,`addons`]})}},e[0]=n,e[1]=r),t(r)}async function X(e){let t=new E({clusterName:e.clusterName,addonName:e.addonName,addonVersion:e.addonVersion,serviceAccountRoleArn:e.serviceAccountRoleArn,configurationValues:e.configurationValues});return await f().send(t)}function ie(){let e=(0,L.c)(2),n=S(),r;return e[0]===n?r=e[1]:(r={mutationFn:ae,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`eks`,`clusters`,t.clusterName,`addons`]})}},e[0]=n,e[1]=r),t(r)}async function ae(e){let t=new P({clusterName:e.clusterName,addonName:e.addonName,addonVersion:e.addonVersion,serviceAccountRoleArn:e.serviceAccountRoleArn,configurationValues:e.configurationValues});return await f().send(t)}function oe(){let e=(0,L.c)(2),n=S(),r;return e[0]===n?r=e[1]:(r={mutationFn:se,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`eks`,`clusters`,t.clusterName,`addons`]})}},e[0]=n,e[1]=r),t(r)}async function se(e){let t=new A({clusterName:e.clusterName,addonName:e.addonName});return await f().send(t)}function ce(){let e=(0,L.c)(2),n=S(),r;return e[0]===n?r=e[1]:(r={mutationFn:le,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`eks`,`clusters`,t.clusterName,`access-entries`]})}},e[0]=n,e[1]=r),t(r)}async function le(e){let t=new T({clusterName:e.clusterName,principalArn:e.principalArn,kubernetesGroups:e.kubernetesGroups,type:e.type});return await f().send(t)}function ue(){let e=(0,L.c)(2),n=S(),r;return e[0]===n?r=e[1]:(r={mutationFn:de,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`eks`,`clusters`,t.clusterName,`access-entries`]})}},e[0]=n,e[1]=r),t(r)}async function de(e){let t=new k({clusterName:e.clusterName,principalArn:e.principalArn});return await f().send(t)}function fe(){let e=(0,L.c)(2),n=S(),r;return e[0]===n?r=e[1]:(r={mutationFn:pe,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`eks`,`clusters`,t.clusterName,`access-entries`,t.principalArn,`policies`]})}},e[0]=n,e[1]=r),t(r)}async function pe(e){let t=new w({clusterName:e.clusterName,principalArn:e.principalArn,policyArn:e.policyArn,accessScope:{type:e.accessScopeType,namespaces:e.namespaces}});return await f().send(t)}function me(){let e=(0,L.c)(2),n=S(),r;return e[0]===n?r=e[1]:(r={mutationFn:he,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`eks`,`clusters`,t.clusterName,`access-entries`,t.principalArn,`policies`]})}},e[0]=n,e[1]=r),t(r)}async function he(e){let t=new N({clusterName:e.clusterName,principalArn:e.principalArn,policyArn:e.policyArn});return await f().send(t)}var ge=[`1.32`,`1.31`,`1.30`],_e=[{arn:`arn:aws:eks::aws:cluster-access-policy/AmazonEKSClusterAdminPolicy`,name:`AmazonEKSClusterAdminPolicy`},{arn:`arn:aws:eks::aws:cluster-access-policy/AmazonEKSAdminPolicy`,name:`AmazonEKSAdminPolicy`},{arn:`arn:aws:eks::aws:cluster-access-policy/AmazonEKSEditPolicy`,name:`AmazonEKSEditPolicy`},{arn:`arn:aws:eks::aws:cluster-access-policy/AmazonEKSViewPolicy`,name:`AmazonEKSViewPolicy`}],Z=[`AL2_x86_64`,`AL2_ARM_64`],Q=[`ON_DEMAND`,`SPOT`],$=g().min(1,`Name is required`).max(100,`Name must be 100 characters or fewer`).regex(/^[0-9A-Za-z][A-Za-z0-9\-_]*$/,`Must start with a letter or digit and contain only letters, digits, hyphens, or underscores`),ve=b({name:$,version:g().min(1,`Version is required`),roleArn:g().min(1,`Cluster IAM role is required`),vpcId:g().min(1,`VPC is required`),subnetIds:v(g()).min(1,`At least 1 subnet is required`),bootstrapClusterCreatorAdminPermissions:y(),endpointPublicAccess:y(),endpointPrivateAccess:y(),publicAccessCidrs:v(g())}).refine(e=>e.endpointPublicAccess||e.endpointPrivateAccess,{message:`Enable public access, private access, or both`,path:[`endpointPublicAccess`]}).refine(e=>!e.endpointPublicAccess||e.publicAccessCidrs.every(e=>C(e,0,32)),{message:`Each public access CIDR must be valid (e.g. 203.0.113.0/24)`,path:[`publicAccessCidrs`]}),ye=b({nodegroupName:$,nodeRole:g().min(1,`Node IAM role is required`),subnetIds:v(g()).min(1,`At least 1 subnet is required`),instanceTypes:g().min(1,`At least 1 instance type is required`),amiType:h(Z),capacityType:h(Q),diskSize:_().int().min(1),minSize:_().int().min(0),desiredSize:_().int().min(0),maxSize:_().int().min(1)}).refine(e=>e.minSize<=e.desiredSize&&e.desiredSize<=e.maxSize,{message:`Sizes must satisfy min ≤ desired ≤ max`,path:[`desiredSize`]}),be=b({addonName:g().min(1,`Add-on is required`),addonVersion:g().min(1,`Version is required`),serviceAccountRoleArn:g(),configurationValues:g().refine(e=>{if(e.trim()===``)return!0;try{return JSON.parse(e),!0}catch{return!1}},{message:`Configuration must be valid JSON`})});function xe(e){switch(e??``){case`ACTIVE`:return`default`;case`CREATE_FAILED`:case`DELETE_FAILED`:case`UPDATE_FAILED`:case`DEGRADED`:return`destructive`;default:return`secondary`}}var Se=b({principalArn:g().min(1,`Principal ARN is required`),kubernetesGroups:g()});export{G as S,B as _,xe as a,W as b,ve as c,ce as d,Y as f,oe as g,ue as h,ge as i,ye as l,H as m,Z as n,Se as o,R as p,Q as r,be as s,_e as t,fe as u,q as v,ie as x,me as y}; \ No newline at end of file +import{t as e}from"./compiler-runtime.js";import{n as t}from"./error-banner.js";import{$t as n,At as r,Ft as i,It as a,Lt as ee,Mt as te,Nt as ne,Pt as re,Qt as o,Rt as s,Wt as c,Zt as l,en as u,i as d,jt as f}from"./awsClient.js";import{St as p,a as m,f as h,l as g,o as _,s as v,u as y,ut as b}from"./auth.js";import{Lr as x}from"./index.js";import{i as S}from"./subnet-calculator.js";import{t as C}from"./json.js";var w=class extends p.classBuilder().ep(u).m(function(e,t,n,r){return[b(n,e.getEndpointParameterInstructions())]}).s(`AWSWesleyFrontend`,`AssociateAccessPolicy`,{}).n(`EKSClient`,`AssociateAccessPolicyCommand`).sc(r).build(){},T=class extends p.classBuilder().ep(u).m(function(e,t,n,r){return[b(n,e.getEndpointParameterInstructions())]}).s(`AWSWesleyFrontend`,`CreateAccessEntry`,{}).n(`EKSClient`,`CreateAccessEntryCommand`).sc(f).build(){},E=class extends p.classBuilder().ep(u).m(function(e,t,n,r){return[b(n,e.getEndpointParameterInstructions())]}).s(`AWSWesleyFrontend`,`CreateAddon`,{}).n(`EKSClient`,`CreateAddonCommand`).sc(te).build(){},D=class extends p.classBuilder().ep(u).m(function(e,t,n,r){return[b(n,e.getEndpointParameterInstructions())]}).s(`AWSWesleyFrontend`,`CreateCluster`,{}).n(`EKSClient`,`CreateClusterCommand`).sc(ne).build(){},O=class extends p.classBuilder().ep(u).m(function(e,t,n,r){return[b(n,e.getEndpointParameterInstructions())]}).s(`AWSWesleyFrontend`,`CreateNodegroup`,{}).n(`EKSClient`,`CreateNodegroupCommand`).sc(re).build(){},k=class extends p.classBuilder().ep(u).m(function(e,t,n,r){return[b(n,e.getEndpointParameterInstructions())]}).s(`AWSWesleyFrontend`,`DeleteAccessEntry`,{}).n(`EKSClient`,`DeleteAccessEntryCommand`).sc(i).build(){},A=class extends p.classBuilder().ep(u).m(function(e,t,n,r){return[b(n,e.getEndpointParameterInstructions())]}).s(`AWSWesleyFrontend`,`DeleteAddon`,{}).n(`EKSClient`,`DeleteAddonCommand`).sc(a).build(){},j=class extends p.classBuilder().ep(u).m(function(e,t,n,r){return[b(n,e.getEndpointParameterInstructions())]}).s(`AWSWesleyFrontend`,`DeleteCluster`,{}).n(`EKSClient`,`DeleteClusterCommand`).sc(ee).build(){},M=class extends p.classBuilder().ep(u).m(function(e,t,n,r){return[b(n,e.getEndpointParameterInstructions())]}).s(`AWSWesleyFrontend`,`DeleteNodegroup`,{}).n(`EKSClient`,`DeleteNodegroupCommand`).sc(s).build(){},N=class extends p.classBuilder().ep(u).m(function(e,t,n,r){return[b(n,e.getEndpointParameterInstructions())]}).s(`AWSWesleyFrontend`,`DisassociateAccessPolicy`,{}).n(`EKSClient`,`DisassociateAccessPolicyCommand`).sc(c).build(){},P=class extends p.classBuilder().ep(u).m(function(e,t,n,r){return[b(n,e.getEndpointParameterInstructions())]}).s(`AWSWesleyFrontend`,`UpdateAddon`,{}).n(`EKSClient`,`UpdateAddonCommand`).sc(l).build(){},F=class extends p.classBuilder().ep(u).m(function(e,t,n,r){return[b(n,e.getEndpointParameterInstructions())]}).s(`AWSWesleyFrontend`,`UpdateNodegroupConfig`,{}).n(`EKSClient`,`UpdateNodegroupConfigCommand`).sc(o).build(){},I=class extends p.classBuilder().ep(u).m(function(e,t,n,r){return[b(n,e.getEndpointParameterInstructions())]}).s(`AWSWesleyFrontend`,`UpdateNodegroupVersion`,{}).n(`EKSClient`,`UpdateNodegroupVersionCommand`).sc(n).build(){},L=e();function R(){let e=(0,L.c)(2),n=x(),r;return e[0]===n?r=e[1]:(r={mutationFn:z,onSuccess:()=>{n.invalidateQueries({queryKey:[`eks`,`clusters`]})}},e[0]=n,e[1]=r),t(r)}async function z(e){let t=new D({name:e.name,version:e.version,roleArn:e.roleArn,resourcesVpcConfig:{subnetIds:e.subnetIds,endpointPublicAccess:e.endpointPublicAccess,endpointPrivateAccess:e.endpointPrivateAccess,publicAccessCidrs:e.endpointPublicAccess?e.publicAccessCidrs:void 0},accessConfig:{authenticationMode:`API`,bootstrapClusterCreatorAdminPermissions:e.bootstrapClusterCreatorAdminPermissions}});return await d().send(t)}function B(){let e=(0,L.c)(2),n=x(),r;return e[0]===n?r=e[1]:(r={mutationFn:V,onSuccess:()=>{n.invalidateQueries({queryKey:[`eks`,`clusters`]})}},e[0]=n,e[1]=r),t(r)}async function V(e){let t=new j({name:e});return await d().send(t)}function H(){let e=(0,L.c)(2),n=x(),r;return e[0]===n?r=e[1]:(r={mutationFn:U,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`eks`,`clusters`,t.clusterName,`nodegroups`]})}},e[0]=n,e[1]=r),t(r)}async function U(e){let t=new O({clusterName:e.clusterName,nodegroupName:e.nodegroupName,nodeRole:e.nodeRole,subnets:e.subnetIds,instanceTypes:e.instanceTypes,amiType:e.amiType,capacityType:e.capacityType,diskSize:e.diskSize,scalingConfig:{minSize:e.minSize,maxSize:e.maxSize,desiredSize:e.desiredSize}});return await d().send(t)}function W(){let e=(0,L.c)(2),n=x(),r;return e[0]===n?r=e[1]:(r={mutationFn:ie,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`eks`,`clusters`,t.clusterName,`nodegroups`]})}},e[0]=n,e[1]=r),t(r)}async function ie(e){let t=new F({clusterName:e.clusterName,nodegroupName:e.nodegroupName,scalingConfig:{minSize:e.minSize,maxSize:e.maxSize,desiredSize:e.desiredSize}});return await d().send(t)}function G(){let e=(0,L.c)(2),n=x(),r;return e[0]===n?r=e[1]:(r={mutationFn:K,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`eks`,`clusters`,t.clusterName,`nodegroups`]})}},e[0]=n,e[1]=r),t(r)}async function K(e){let t=new I({clusterName:e.clusterName,nodegroupName:e.nodegroupName,version:e.version});return await d().send(t)}function q(){let e=(0,L.c)(2),n=x(),r;return e[0]===n?r=e[1]:(r={mutationFn:J,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`eks`,`clusters`,t.clusterName,`nodegroups`]})}},e[0]=n,e[1]=r),t(r)}async function J(e){let t=new M({clusterName:e.clusterName,nodegroupName:e.nodegroupName});return await d().send(t)}function Y(){let e=(0,L.c)(2),n=x(),r;return e[0]===n?r=e[1]:(r={mutationFn:ae,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`eks`,`clusters`,t.clusterName,`addons`]})}},e[0]=n,e[1]=r),t(r)}async function ae(e){let t=new E({clusterName:e.clusterName,addonName:e.addonName,addonVersion:e.addonVersion,serviceAccountRoleArn:e.serviceAccountRoleArn,configurationValues:e.configurationValues});return await d().send(t)}function oe(){let e=(0,L.c)(2),n=x(),r;return e[0]===n?r=e[1]:(r={mutationFn:se,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`eks`,`clusters`,t.clusterName,`addons`]})}},e[0]=n,e[1]=r),t(r)}async function se(e){let t=new P({clusterName:e.clusterName,addonName:e.addonName,addonVersion:e.addonVersion,serviceAccountRoleArn:e.serviceAccountRoleArn,configurationValues:e.configurationValues});return await d().send(t)}function ce(){let e=(0,L.c)(2),n=x(),r;return e[0]===n?r=e[1]:(r={mutationFn:le,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`eks`,`clusters`,t.clusterName,`addons`]})}},e[0]=n,e[1]=r),t(r)}async function le(e){let t=new A({clusterName:e.clusterName,addonName:e.addonName});return await d().send(t)}function ue(){let e=(0,L.c)(2),n=x(),r;return e[0]===n?r=e[1]:(r={mutationFn:de,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`eks`,`clusters`,t.clusterName,`access-entries`]})}},e[0]=n,e[1]=r),t(r)}async function de(e){let t=new T({clusterName:e.clusterName,principalArn:e.principalArn,kubernetesGroups:e.kubernetesGroups,type:e.type});return await d().send(t)}function fe(){let e=(0,L.c)(2),n=x(),r;return e[0]===n?r=e[1]:(r={mutationFn:pe,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`eks`,`clusters`,t.clusterName,`access-entries`]})}},e[0]=n,e[1]=r),t(r)}async function pe(e){let t=new k({clusterName:e.clusterName,principalArn:e.principalArn});return await d().send(t)}function me(){let e=(0,L.c)(2),n=x(),r;return e[0]===n?r=e[1]:(r={mutationFn:he,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`eks`,`clusters`,t.clusterName,`access-entries`,t.principalArn,`policies`]})}},e[0]=n,e[1]=r),t(r)}async function he(e){let t=new w({clusterName:e.clusterName,principalArn:e.principalArn,policyArn:e.policyArn,accessScope:{type:e.accessScopeType,namespaces:e.namespaces}});return await d().send(t)}function ge(){let e=(0,L.c)(2),n=x(),r;return e[0]===n?r=e[1]:(r={mutationFn:_e,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`eks`,`clusters`,t.clusterName,`access-entries`,t.principalArn,`policies`]})}},e[0]=n,e[1]=r),t(r)}async function _e(e){let t=new N({clusterName:e.clusterName,principalArn:e.principalArn,policyArn:e.policyArn});return await d().send(t)}var ve=[`1.32`,`1.31`,`1.30`],ye=[{arn:`arn:aws:eks::aws:cluster-access-policy/AmazonEKSClusterAdminPolicy`,name:`AmazonEKSClusterAdminPolicy`},{arn:`arn:aws:eks::aws:cluster-access-policy/AmazonEKSAdminPolicy`,name:`AmazonEKSAdminPolicy`},{arn:`arn:aws:eks::aws:cluster-access-policy/AmazonEKSEditPolicy`,name:`AmazonEKSEditPolicy`},{arn:`arn:aws:eks::aws:cluster-access-policy/AmazonEKSViewPolicy`,name:`AmazonEKSViewPolicy`}],X=[`AL2_x86_64`,`AL2_ARM_64`],Z=[`ON_DEMAND`,`SPOT`],Q=h().min(1,`Name is required`).max(100,`Name must be 100 characters or fewer`).regex(/^[0-9A-Za-z][A-Za-z0-9\-_]*$/,`Must start with a letter or digit and contain only letters, digits, hyphens, or underscores`),be=y({name:Q,version:h().min(1,`Version is required`),roleArn:h().min(1,`Cluster IAM role is required`),vpcId:h().min(1,`VPC is required`),subnetIds:_(h()).min(1,`At least 1 subnet is required`),bootstrapClusterCreatorAdminPermissions:v(),endpointPublicAccess:v(),endpointPrivateAccess:v(),publicAccessCidrs:_(h())}).refine(e=>e.endpointPublicAccess||e.endpointPrivateAccess,{message:`Enable public access, private access, or both`,path:[`endpointPublicAccess`]}).refine(e=>!e.endpointPublicAccess||e.publicAccessCidrs.every(e=>S(e,0,32)),{message:`Each public access CIDR must be valid (e.g. 203.0.113.0/24)`,path:[`publicAccessCidrs`]}),xe=y({nodegroupName:Q,nodeRole:h().min(1,`Node IAM role is required`),subnetIds:_(h()).min(1,`At least 1 subnet is required`),instanceTypes:h().min(1,`At least 1 instance type is required`),amiType:m(X),capacityType:m(Z),diskSize:g().int().min(1),minSize:g().int().min(0),desiredSize:g().int().min(0),maxSize:g().int().min(1)}).refine(e=>e.minSize<=e.desiredSize&&e.desiredSize<=e.maxSize,{message:`Sizes must satisfy min ≤ desired ≤ max`,path:[`desiredSize`]}),$=C({label:`Configuration`,allowEmpty:!0}),Se=y({addonName:h().min(1,`Add-on is required`),addonVersion:h().min(1,`Version is required`),serviceAccountRoleArn:h(),configurationValues:$});function Ce(e){switch(e??``){case`ACTIVE`:return`default`;case`CREATE_FAILED`:case`DELETE_FAILED`:case`UPDATE_FAILED`:case`DEGRADED`:return`destructive`;default:return`secondary`}}var we=y({principalArn:h().min(1,`Principal ARN is required`),kubernetesGroups:h()});export{G as C,oe as S,ce as _,$ as a,ge as b,Se as c,me as d,ue as f,fe as g,H as h,ve as i,be as l,R as m,X as n,Ce as o,Y as p,Z as r,we as s,ye as t,xe as u,B as v,W as x,q as y}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/iam2.js b/spinifex/services/spinifexui/frontend/dist/assets/iam2.js index 1a25da85d..6e17cdd46 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/iam2.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/iam2.js @@ -1 +1 @@ -import{f as e,u as t}from"./auth.js";var n=t({userName:e().min(1,`User name is required`).max(64,`User name must be 64 characters or less`).regex(/^[\w+=,.@-]+$/,`User name contains invalid characters`),path:e().optional()}),r=t({policyName:e().min(1,`Policy name is required`).max(128,`Policy name must be 128 characters or less`).regex(/^[\w+=,.@-]+$/,`Policy name contains invalid characters`),description:e().optional(),policyDocument:e().min(1,`Policy document is required`).refine(e=>{try{return JSON.parse(e),!0}catch{return!1}},{message:`Policy document must be valid JSON`})}),i=JSON.stringify({Version:`2012-10-17`,Statement:[{Effect:`Allow`,Principal:{Service:`ec2.amazonaws.com`},Action:`sts:AssumeRole`}]},null,2),a=t({roleName:e().min(1,`Role name is required`).max(64,`Role name must be 64 characters or less`).regex(/^[\w+=,.@-]+$/,`Role name contains invalid characters`),path:e().optional(),description:e().optional(),assumeRolePolicyDocument:e().min(1,`Trust policy is required`).refine(e=>{try{return JSON.parse(e),!0}catch{return!1}},{message:`Trust policy must be valid JSON`})}),o=t({instanceProfileName:e().min(1,`Instance profile name is required`).max(128,`Instance profile name must be 128 characters or less`).regex(/^[\w+=,.@-]+$/,`Instance profile name contains invalid characters`),path:e().optional()});export{n as a,a as i,o as n,r,i as t}; \ No newline at end of file +import{f as e,u as t}from"./auth.js";import{t as n}from"./json.js";var r=t({userName:e().min(1,`User name is required`).max(64,`User name must be 64 characters or less`).regex(/^[\w+=,.@-]+$/,`User name contains invalid characters`),path:e().optional()}),i=t({policyName:e().min(1,`Policy name is required`).max(128,`Policy name must be 128 characters or less`).regex(/^[\w+=,.@-]+$/,`Policy name contains invalid characters`),description:e().optional(),policyDocument:n({label:`Policy document`})}),a=JSON.stringify({Version:`2012-10-17`,Statement:[{Effect:`Allow`,Principal:{Service:`ec2.amazonaws.com`},Action:`sts:AssumeRole`}]},null,2),o=t({roleName:e().min(1,`Role name is required`).max(64,`Role name must be 64 characters or less`).regex(/^[\w+=,.@-]+$/,`Role name contains invalid characters`),path:e().optional(),description:e().optional(),assumeRolePolicyDocument:n({label:`Trust policy`})}),s=t({instanceProfileName:e().min(1,`Instance profile name is required`).max(128,`Instance profile name must be 128 characters or less`).regex(/^[\w+=,.@-]+$/,`Instance profile name contains invalid characters`),path:e().optional()});export{r as a,o as i,s as n,i as r,a as t}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/index.js b/spinifex/services/spinifexui/frontend/dist/assets/index.js index 44ce4d05c..1ca9fa46b 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/index.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/index.js @@ -1,4 +1,4 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/login.js","assets/compiler-runtime.js","assets/auth.js","assets/tslib.es6.js","assets/awsClient.js","assets/index.browser.js","assets/useStore.js","assets/button.js","assets/dist.js","assets/collapsible.js","assets/createBaseUIEventDetails.js","assets/zod.js","assets/card.js","assets/field.js","assets/route.js","assets/_auth.js","assets/useQuery.js","assets/useBaseQuery.js","assets/chevron-down.js","assets/chevron-right.js","assets/page-heading.js","assets/state-badge.js","assets/badge.js","assets/admin.js","assets/queryOptions.js","assets/nodes.js","assets/redirect.js","assets/service-metrics.js","assets/ls.js","assets/useSuspenseQuery.js","assets/list-card.js","assets/create-bucket.js","assets/s3.js","assets/error-banner.js","assets/back-link.js","assets/cli-command-panel.js","assets/check.js","assets/copy.js","assets/use-copy-to-clipboard.js","assets/form-actions.js","assets/create-user.js","assets/iam.js","assets/iam2.js","assets/create-role.js","assets/textarea.js","assets/create-policy.js","assets/create-instance-profile.js","assets/create-cluster.js","assets/eks.js","assets/subnet-calculator.js","assets/select.js","assets/useCompositeListItem.js","assets/rotate-cw.js","assets/triangle-alert.js","assets/system-managed.js","assets/create-vpc.js","assets/ec2.js","assets/ec22.js","assets/create-volume.js","assets/create-target-group.js","assets/elbv2.js","assets/target-group-form.js","assets/plus.js","assets/trash-2.js","assets/elbv22.js","assets/create-subnet.js","assets/create-snapshot.js","assets/create-security-group.js","assets/create-route-table.js","assets/create-placement-group.js","assets/create-nat-gateway.js","assets/create-load-balancer.js","assets/certificate-import-dialog.js","assets/alert-dialog.js","assets/import-key-pair.js","assets/create-key-pair.js","assets/download.js","assets/create-internet-gateway.js","assets/run-instances.js","assets/allocate-address.js","assets/route2.js","assets/_bucket.js","assets/upload-button.js","assets/delete-confirmation-dialog.js","assets/list-users.js","assets/list-roles.js","assets/list-policies.js","assets/list-instance-profiles.js","assets/list-clusters.js","assets/describe-vpcs.js","assets/describe-volumes.js","assets/describe-target-groups.js","assets/describe-subnets.js","assets/describe-snapshots.js","assets/describe-security-groups.js","assets/describe-route-tables.js","assets/describe-placement-groups.js","assets/describe-nat-gateways.js","assets/describe-load-balancers.js","assets/describe-key-pairs.js","assets/describe-internet-gateways.js","assets/describe-instances.js","assets/describe-images.js","assets/describe-addresses.js","assets/_.js","assets/_userName.js","assets/detail-row.js","assets/_roleName.js","assets/policy-document-viewer.js","assets/_policyArn.js","assets/_instanceProfileName.js","assets/_clusterName.js","assets/tabs.js","assets/_id16.js","assets/_id15.js","assets/_id14.js","assets/_id13.js","assets/tags-editor.js","assets/_id12.js","assets/_id11.js","assets/_id10.js","assets/_id9.js","assets/_id8.js","assets/_id7.js","assets/_id6.js","assets/_id5.js","assets/_id4.js","assets/_id3.js","assets/ami-details.js","assets/_id2.js","assets/_id.js"])))=>i.map(i=>d[i]); +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/login.js","assets/compiler-runtime.js","assets/auth.js","assets/tslib.es6.js","assets/awsClient.js","assets/index.browser.js","assets/useStore.js","assets/button.js","assets/dist.js","assets/collapsible.js","assets/createBaseUIEventDetails.js","assets/zod.js","assets/card.js","assets/field.js","assets/route.js","assets/_auth.js","assets/useQuery.js","assets/useBaseQuery.js","assets/chevron-down.js","assets/chevron-right.js","assets/page-heading.js","assets/state-badge.js","assets/badge.js","assets/admin.js","assets/queryOptions.js","assets/nodes.js","assets/redirect.js","assets/service-metrics.js","assets/ls.js","assets/useSuspenseQuery.js","assets/list-card.js","assets/create-bucket.js","assets/s3.js","assets/error-banner.js","assets/back-link.js","assets/cli-command-panel.js","assets/check.js","assets/copy.js","assets/use-copy-to-clipboard.js","assets/form-actions.js","assets/create-user.js","assets/iam.js","assets/iam2.js","assets/json.js","assets/create-role.js","assets/textarea.js","assets/create-policy.js","assets/create-instance-profile.js","assets/create-cluster.js","assets/eks.js","assets/subnet-calculator.js","assets/select.js","assets/useCompositeListItem.js","assets/rotate-cw.js","assets/triangle-alert.js","assets/system-managed.js","assets/create-vpc.js","assets/ec2.js","assets/ec22.js","assets/create-volume.js","assets/create-target-group.js","assets/elbv2.js","assets/target-group-form.js","assets/plus.js","assets/trash-2.js","assets/elbv22.js","assets/create-subnet.js","assets/create-snapshot.js","assets/create-security-group.js","assets/create-route-table.js","assets/create-placement-group.js","assets/create-nat-gateway.js","assets/create-load-balancer.js","assets/certificate-import-dialog.js","assets/alert-dialog.js","assets/import-key-pair.js","assets/create-key-pair.js","assets/download.js","assets/create-internet-gateway.js","assets/run-instances.js","assets/allocate-address.js","assets/route2.js","assets/_bucket.js","assets/upload-button.js","assets/delete-confirmation-dialog.js","assets/list-users.js","assets/list-roles.js","assets/list-policies.js","assets/list-instance-profiles.js","assets/list-clusters.js","assets/describe-vpcs.js","assets/describe-volumes.js","assets/describe-target-groups.js","assets/describe-subnets.js","assets/describe-snapshots.js","assets/describe-security-groups.js","assets/describe-route-tables.js","assets/describe-placement-groups.js","assets/describe-nat-gateways.js","assets/describe-load-balancers.js","assets/describe-key-pairs.js","assets/describe-internet-gateways.js","assets/describe-instances.js","assets/describe-images.js","assets/describe-addresses.js","assets/_.js","assets/_userName.js","assets/detail-row.js","assets/_roleName.js","assets/policy-document-viewer.js","assets/_policyArn.js","assets/_instanceProfileName.js","assets/_clusterName.js","assets/tabs.js","assets/_id16.js","assets/_id15.js","assets/_id14.js","assets/_id13.js","assets/tags-editor.js","assets/_id12.js","assets/_id11.js","assets/_id10.js","assets/_id9.js","assets/_id8.js","assets/_id7.js","assets/_id6.js","assets/_id5.js","assets/_id4.js","assets/_id3.js","assets/ami-details.js","assets/_id2.js","assets/_id.js"])))=>i.map(i=>d[i]); import{i as e,n as t,o as n,r,t as i}from"./compiler-runtime.js";import{t as a}from"./queryOptions.js";import{A as o,B as s,C as c,D as l,E as u,F as d,G as f,I as p,L as m,M as h,N as g,O as _,P as v,R as y,S as b,T as x,V as S,W as C,_ as w,a as T,b as E,c as D,d as O,f as k,g as A,h as j,i as M,j as ee,k as N,l as P,m as te,n as ne,o as re,r as ie,s as ae,t as F,v as oe,w as se,x as I,y as ce,z as le}from"./useStore.js";import{i as ue,n as de,r as fe,t as pe}from"./matchContext.js";import{n as me,t as he}from"./redirect.js";import{B as ge,Bn as _e,Bt as ve,Fn as ye,G as be,Gn as xe,Gt as Se,H as Ce,Hn as we,Ht as Te,In as Ee,J as De,Jn as Oe,Jt as ke,K as Ae,Kn as je,Kt as Me,Ln as Ne,Nn as Pe,Pn as Fe,Q as Ie,Rn as Le,U as Re,Un as ze,Ut as Be,V as Ve,Vn as He,Vt as Ue,W as We,Wn as Ge,X as Ke,Xt as qe,Y as Je,Yn as Ye,Yt as Xe,Z as Ze,_r as Qe,_t as $e,a as et,b as tt,bt as nt,en as rt,ft as it,gr as at,gt as ot,h as st,ht as ct,i as lt,kt as ut,m as dt,mr as ft,mt as pt,n as mt,o as ht,pt as gt,q as _t,qn as vt,qt as yt,r as bt,s as xt,t as St,tt as Ct,vr as wt,vt as Tt,y as Et,yr as Dt,yt as Ot,zn as kt,zt as At}from"./awsClient.js";import{a as jt,c as Mt,f as Nt,l as Pt,n as Ft,o as It,s as Lt,t as Rt,u as zt}from"./dist.js";import{$ as Bt,A as Vt,B as Ht,C as Ut,Ct as Wt,D as Gt,E as Kt,Et as qt,F as Jt,Ft as Yt,G as Xt,H as Zt,I as Qt,It as $t,J as en,K as tn,L as nn,Lt as rn,M as an,Mt as on,N as sn,O as cn,Ot as ln,P as un,Pt as dn,Q as fn,R as pn,Rt as mn,S as hn,St as L,T as gn,U as _n,W as vn,X as yn,Y as bn,_t as xn,at as R,bt as Sn,dt as Cn,et as wn,ft as Tn,g as En,gt as Dn,ht as On,j as kn,jt as An,k as jn,kt as Mn,mt as Nn,n as Pn,pt as Fn,r as In,ut as z,vt as Ln,x as Rn,xt as zn,yt as Bn,z as Vn}from"./auth.js";import{C as Hn,D as Un,E as Wn,S as Gn,T as Kn,_ as qn,b as Jn,d as Yn,f as Xn,g as Zn,h as Qn,l as $n,m as er,n as tr,o as B,p as nr,r as rr,s as ir,t as ar,u as or,v as sr,w as cr,x as lr,y as V}from"./button.js";import{C as ur,S as dr,a as fr,b as pr,f as mr,g as hr,h as gr,i as _r,m as vr,o as yr,p as br,r as xr,s as Sr,t as Cr,v as wr,x as Tr,y as H}from"./createBaseUIEventDetails.js";import{F as Er,I as Dr,N as Or,P as kr,v as Ar}from"./tslib.es6.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var jr=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Mr=new class extends jr{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}},Nr={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Pr=new class{#e=Nr;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};function Fr(e){setTimeout(e,0)}var Ir=typeof window>`u`||`Deno`in globalThis;function Lr(){}function Rr(e,t){return typeof e==`function`?e(t):e}function zr(e){return typeof e==`number`&&e>=0&&e!==1/0}function Br(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Vr(e,t){return typeof e==`function`?e(t):e}function Hr(e,t){return typeof e==`function`?e(t):e}function Ur(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==Gr(o,t.options))return!1}else if(!qr(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function Wr(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(Kr(t.options.mutationKey)!==Kr(a))return!1}else if(!qr(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function Gr(e,t){return(t?.queryKeyHashFn||Kr)(e)}function Kr(e){return JSON.stringify(e,(e,t)=>Qr(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function qr(e,t){return e===t?!0:typeof e==typeof t&&e&&t&&typeof e==`object`&&typeof t==`object`?Object.keys(t).every(n=>qr(e[n],t[n])):!1}var Jr=Object.prototype.hasOwnProperty;function Yr(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=Zr(e)&&Zr(t);if(!r&&!(Qr(e)&&Qr(t)))return t;let i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?Array(o):{},c=0;for(let l=0;l{Pr.setTimeout(t,e)})}function ti(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:Yr(e,t)}function ni(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function ri(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var ii=Symbol();function ai(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===ii?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function oi(e,t){return typeof e==`function`?e(...t):!!e}function si(e,t,n){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??=t(),r?i:(r=!0,i.aborted?n():i.addEventListener(`abort`,n,{once:!0}),i))}),e}var ci=(()=>{let e=()=>Ir;return{isServer(){return e()},setIsServer(t){e=t}}})();function li(){let e,t,n=new Promise((n,r)=>{e=n,t=r});n.status=`pending`,n.catch(()=>{});function r(e){Object.assign(n,e),delete n.resolve,delete n.reject}return n.resolve=t=>{r({status:`fulfilled`,value:t}),e(t)},n.reject=e=>{r({status:`rejected`,reason:e}),t(e)},n}var ui=Fr;function di(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=ui,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var fi=di(),pi=new class extends jr{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener(`online`,t,!1),window.addEventListener(`offline`,n,!1),()=>{window.removeEventListener(`online`,t),window.removeEventListener(`offline`,n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};function mi(e){return Math.min(1e3*2**e,3e4)}function hi(e){return(e??`online`)===`online`?pi.isOnline():!0}var gi=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function _i(e){let t=!1,n=0,r,i=li(),a=()=>i.status!==`pending`,o=t=>{if(!a()){let n=new gi(t);f(n),e.onCancel?.(n)}},s=()=>{t=!0},c=()=>{t=!1},l=()=>Mr.isFocused()&&(e.networkMode===`always`||pi.isOnline())&&e.canRun(),u=()=>hi(e.networkMode)&&e.canRun(),d=e=>{a()||(r?.(),i.resolve(e))},f=e=>{a()||(r?.(),i.reject(e))},p=()=>new Promise(t=>{r=e=>{(a()||l())&&t(e)},e.onPause?.()}).then(()=>{r=void 0,a()||e.onContinue?.()}),m=()=>{if(a())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(d).catch(r=>{if(a())return;let i=e.retry??(ci.isServer()?0:3),o=e.retryDelay??mi,s=typeof o==`function`?o(n,r):o,c=i===!0||typeof i==`number`&&nl()?void 0:p()).then(()=>{t?f(r):m()})})};return{promise:i,status:()=>i.status,cancel:o,continue:()=>(r?.(),i),cancelRetry:s,continueRetry:c,canStart:u,start:()=>(u()?m():p().then(m),i)}}var vi=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),zr(this.gcTime)&&(this.#e=Pr.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(ci.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e!==void 0&&(Pr.clearTimeout(this.#e),this.#e=void 0)}};function yi(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,l=async()=>{let n=!1,l=e=>{si(e,()=>t.signal,()=>n=!0)},u=ai(t.options,t.fetchOptions),d=async(e,r,i)=>{if(n)return Promise.reject(t.signal.reason);if(r==null&&e.pages.length)return Promise.resolve(e);let a=await u((()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return l(e),e})()),{maxPages:o}=t.options,s=i?ri:ni;return{pages:s(e.pages,a,o),pageParams:s(e.pageParams,r,o)}};if(i&&a.length){let e=i===`backward`,t=e?xi:bi,n={pages:a,pageParams:o};s=await d(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]??r.initialPageParam:bi(r,s);if(c>0&&e==null)break;s=await d(s,e),c++}while(ct.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=l}}}function bi(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function xi(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var Si=class extends vi{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e){super(),this.#s=!1,this.#o=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#r=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=Ti(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#a?.promise}setOptions(e){if(this.options={...this.#o,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=Ti(this.options);e.data!==void 0&&(this.setState(wi(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#r.remove(this)}setData(e,t){let n=ti(this.state.data,e,this.options);return this.#l({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e){this.#l({type:`setState`,state:e})}cancel(e){let t=this.#a?.promise;return this.#a?.cancel(e),t?t.then(Lr).catch(Lr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>Hr(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===ii||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>Vr(e.options.staleTime,this)===`static`):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e===`static`?!1:this.state.isInvalidated?!0:!Br(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#a&&(this.#s||this.#c()?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#r.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}#c(){return this.state.fetchStatus===`paused`&&this.state.status===`pending`}invalidate(){this.state.isInvalidated||this.#l({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#a?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#a)return this.#a.continueRetry(),this.#a.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#s=!0,n.signal)})},i=()=>{let e=ai(this.options,t),n=(()=>{let e={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#s=!1,this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:i};return r(e),e})();(this.#e===`infinite`?yi(this.options.pages):this.options.behavior)?.onFetch(a,this),this.#n=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#l({type:`fetch`,meta:a.fetchOptions?.meta}),this.#a=_i({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof gi&&e.revert&&this.setState({...this.#n,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#l({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#l({type:`pause`})},onContinue:()=>{this.#l({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{let e=await this.#a.start();if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#r.config.onSuccess?.(e,this),this.#r.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof gi){if(e.silent)return this.#a.promise;if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#l({type:`error`,error:e}),this.#r.config.onError?.(e,this),this.#r.config.onSettled?.(this.state.data,e,this),e}finally{this.scheduleGc()}}#l(e){let t=t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,...Ci(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...wi(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?n:void 0,n;case`error`:let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:`idle`,status:`error`,isInvalidated:!0};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}};this.state=t(this.state),fi.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#r.notify({query:this,type:`updated`,action:e})})}};function Ci(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:hi(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function wi(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function Ti(e){let t=typeof e.initialData==`function`?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt==`function`?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?`success`:`pending`,fetchStatus:`idle`}}var Ei=class extends vi{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||Di(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(e){let t=()=>{this.#i({type:`continue`})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=_i({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});let r=this.state.status===`pending`,i=!this.#r.canStart();try{if(r)t();else{this.#i({type:`pending`,variables:e,isPaused:i}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:i})}let a=await this.#r.start();return await this.#n.config.onSuccess?.(a,e,this.state.context,this,n),await this.options.onSuccess?.(a,e,this.state.context,n),await this.#n.config.onSettled?.(a,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(a,null,e,this.state.context,n),this.#i({type:`success`,data:a}),a}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:t}),t}finally{this.#n.runNext(this)}}#i(e){let t=t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:`pending`,variables:e.variables,submittedAt:Date.now()};case`success`:return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}};this.state=t(this.state),fi.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function Di(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var Oi=class extends jr{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){let r=new Ei({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);let t=ki(e);if(typeof t==`string`){let n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:`added`,mutation:e})}remove(e){if(this.#e.delete(e)){let t=ki(e);if(typeof t==`string`){let n=this.#t.get(t);if(n)if(n.length>1){let t=n.indexOf(e);t!==-1&&n.splice(t,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:`removed`,mutation:e})}canRun(e){let t=ki(e);if(typeof t==`string`){let n=this.#t.get(t)?.find(e=>e.state.status===`pending`);return!n||n===e}else return!0}runNext(e){let t=ki(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){fi.batch(()=>{this.#e.forEach(e=>{this.notify({type:`removed`,mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>Wr(t,e))}findAll(e={}){return this.getAll().filter(t=>Wr(e,t))}notify(e){fi.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return fi.batch(()=>Promise.all(e.map(e=>e.continue().catch(Lr))))}};function ki(e){return e.options.scope?.id}var Ai=class extends jr{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){let r=t.queryKey,i=t.queryHash??Gr(r,t),a=this.get(i);return a||(a=new Si({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:`added`,query:e}))}remove(e){let t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){fi.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>Ur(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>Ur(e,t)):t}notify(e){fi.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){fi.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){fi.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},ji=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new Ai,this.#t=e.mutationCache||new Oi,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=Mr.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=pi.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:`fetching`}).length}isMutating(e){return this.#t.findAll({...e,status:`pending`}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Vr(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(r.queryHash)?.state.data,a=Rr(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return fi.batch(()=>this.#e.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){let t=this.#e;fi.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return fi.batch(()=>(n.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,...e},t)))}cancelQueries(e,t={}){let n={revert:!0,...t},r=fi.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(Lr).catch(Lr)}invalidateQueries(e,t={}){return fi.batch(()=>(this.#e.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType===`none`?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??`active`},t)))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0},r=fi.batch(()=>this.#e.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(Lr)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(r).then(Lr)}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t);return n.isStaleByTime(Vr(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Lr).catch(Lr)}fetchInfiniteQuery(e){return e._type=`infinite`,this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Lr).catch(Lr)}ensureInfiniteQueryData(e){return e._type=`infinite`,this.ensureQueryData(e)}resumePausedMutations(){return pi.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(Kr(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{qr(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(Kr(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{qr(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||=Gr(t.queryKey,t),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!==`always`),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode=`offlineFirst`),t.queryFn===ii&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},U=n(r(),1),W=t(),Mi=U.createContext(void 0),Ni=e=>{let t=U.useContext(Mi);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},Pi=({client:e,children:t})=>(U.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,W.jsx)(Mi.Provider,{value:e,children:t}));function Fi(e,t=String){let n=new URLSearchParams;for(let r in e){let i=e[r];i!==void 0&&n.set(r,t(i))}return n.toString()}function Ii(e){return e?e===`false`?!1:e===`true`?!0:e*0==0&&+e+``===e?+e:e:``}function Li(e){let t=new URLSearchParams(e),n=Object.create(null);for(let[e,r]of t.entries()){let t=n[e];t==null?n[e]=Ii(r):Array.isArray(t)?t.push(Ii(r)):n[e]=[t,Ii(r)]}return n}var Ri=Bi(JSON.parse),zi=Vi(JSON.stringify,JSON.parse);function Bi(e){return t=>{t[0]===`?`&&(t=t.substring(1));let n=Li(t);for(let t in n){let r=n[t];if(typeof r==`string`)try{n[t]=e(r)}catch{}}return n}}function Vi(e,t){let n=typeof t==`function`;function r(r){if(typeof r==`object`&&r)try{return e(r)}catch{}else if(n&&typeof r==`string`)try{return t(r),e(r)}catch{}return r}return e=>{let t=Fi(e,r);return t?`?${t}`:``}}var Hi=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},Ui=e=>e.stores.matchesId.get().some(t=>e.stores.matchStores.get(t)?.get()._forcePending),Wi=(e,t)=>!!(e.preload&&!e.router.stores.matchStores.has(t)),Gi=(e,t,n=!0)=>{let r={...e.router.options.context??{}},i=n?t:t-1;for(let t=0;t<=i;t++){let n=e.matches[t];if(!n)continue;let i=e.router.getMatch(n.id);i&&Object.assign(r,i.__routeContext,i.__beforeLoadContext)}return r},Ki=(e,t)=>{if(!e.matches.length)return;let n=t.routeId,r=e.matches.findIndex(t=>t.routeId===e.router.routeTree.id),i=r>=0?r:0,a=n?e.matches.findIndex(e=>e.routeId===n):e.firstBadMatchIndex??e.matches.length-1;a<0&&(a=i);for(let t=a;t>=0;t--){let n=e.matches[t];if(e.router.looseRoutesById[n.routeId].options.notFoundComponent)return t}return n?a:i},qi=(e,t,n)=>{if(!(!he(n)&&!ue(n)))throw he(n)&&n.redirectHandled&&!n.options.reloadDocument?n:(t&&(t._nonReactive.beforeLoadPromise?.resolve(),t._nonReactive.loaderPromise?.resolve(),t._nonReactive.beforeLoadPromise=void 0,t._nonReactive.loaderPromise=void 0,t._nonReactive.error=n,e.updateMatch(t.id,r=>({...r,status:he(n)?`redirected`:ue(n)?`notFound`:r.status===`pending`?`success`:r.status,context:Gi(e,t.index),isFetching:!1,error:n})),ue(n)&&!n.routeId&&(n.routeId=t.routeId),t._nonReactive.loadPromise?.resolve()),he(n)&&(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n)),n)},Ji=(e,t)=>{let n=e.router.getMatch(t);return!!(!n||n._nonReactive.dehydrated)},Yi=(e,t,n)=>{let r=Gi(e,n);e.updateMatch(t,e=>({...e,context:r}))},Xi=(e,t,n)=>{let{id:r,routeId:i}=e.matches[t],a=e.router.looseRoutesById[i];if(n instanceof Promise)throw n;e.firstBadMatchIndex??=t,qi(e,e.router.getMatch(r),n);try{a.options.onError?.(n)}catch(t){n=t,qi(e,e.router.getMatch(r),n)}e.updateMatch(r,e=>(e._nonReactive.beforeLoadPromise?.resolve(),e._nonReactive.beforeLoadPromise=void 0,e._nonReactive.loadPromise?.resolve(),{...e,error:n,status:`error`,isFetching:!1,updatedAt:Date.now(),abortController:new AbortController})),!e.preload&&!he(n)&&!ue(n)&&(e.serialError??=n)},Zi=(e,t,n,r)=>{if(r._nonReactive.pendingTimeout!==void 0)return;let i=n.options.pendingMs??e.router.options.defaultPendingMs;if(e.onReady&&!Wi(e,t)&&(n.options.loader||n.options.beforeLoad||ca(n))&&typeof i==`number`&&i!==1/0&&(n.options.pendingComponent??e.router.options?.defaultPendingComponent)){let t=setTimeout(()=>{Hi(e)},i);r._nonReactive.pendingTimeout=t}},Qi=(e,t,n)=>{let r=e.router.getMatch(t);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;Zi(e,t,n,r);let i=()=>{let n=e.router.getMatch(t);n.preload&&(n.status===`redirected`||n.status===`notFound`)&&qi(e,n,n.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(i):i()},$i=(e,t,n,r)=>{let i=e.router.getMatch(t),a=i._nonReactive.loadPromise;i._nonReactive.loadPromise=_(()=>{a?.resolve(),a=void 0});let{paramsError:o,searchError:s}=i;o&&Xi(e,n,o),s&&Xi(e,n,s),Zi(e,t,r,i);let c=new AbortController,l=!1,u=()=>{l||(l=!0,e.updateMatch(t,e=>({...e,isFetching:`beforeLoad`,fetchCount:e.fetchCount+1,abortController:c})))},d=()=>{i._nonReactive.beforeLoadPromise?.resolve(),i._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,e=>({...e,isFetching:!1}))};if(!r.options.beforeLoad){e.router.batch(()=>{u(),d()});return}i._nonReactive.beforeLoadPromise=_();let f={...Gi(e,n,!1),...i.__routeContext},{search:p,params:h,cause:g}=i,v=Wi(e,t),y={search:p,abortController:c,params:h,preload:v,context:f,location:e.location,navigate:t=>e.router.navigate({...t,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:v?`preload`:g,matches:e.matches,routeId:r.id,...e.router.options.additionalContext},b=r=>{if(r===void 0){e.router.batch(()=>{u(),d()});return}(he(r)||ue(r))&&(u(),Xi(e,n,r)),e.router.batch(()=>{u(),e.updateMatch(t,e=>({...e,__beforeLoadContext:r})),d()})},x;try{if(x=r.options.beforeLoad(y),m(x))return u(),x.catch(t=>{Xi(e,n,t)}).then(b)}catch(t){u(),Xi(e,n,t)}b(x)},ea=(e,t)=>{let{id:n,routeId:r}=e.matches[t],i=e.router.looseRoutesById[r],a=()=>s(),o=()=>$i(e,n,t,i),s=()=>{if(Ji(e,n))return;let t=Qi(e,n,i);return m(t)?t.then(o):o()};return a()},ta=(e,t,n)=>{let r=e.router.getMatch(t);if(!r||!n.options.head&&!n.options.scripts&&!n.options.headers)return;let i={ssr:e.router.options.ssr,matches:e.matches,match:r,params:r.params,loaderData:r.loaderData};return Promise.all([n.options.head?.(i),n.options.scripts?.(i),n.options.headers?.(i)]).then(([e,t,n])=>({meta:e?.meta,links:e?.links,headScripts:e?.scripts,headers:n,scripts:t,styles:e?.styles}))},na=(e,t,n,r,i)=>{let a=t[r-1],{params:o,loaderDeps:s,abortController:c,cause:l}=e.router.getMatch(n),u=Gi(e,r),d=Wi(e,n);return{params:o,deps:s,preload:!!d,parentMatchPromise:a,abortController:c,context:u,location:e.location,navigate:t=>e.router.navigate({...t,_fromLocation:e.location}),cause:d?`preload`:l,route:i,...e.router.options.additionalContext}},ra=async(e,t,n,r,i)=>{try{let a=e.router.getMatch(n);try{sa(i);let o=i.options.loader,s=typeof o==`function`?o:o?.handler,c=s?.(na(e,t,n,r,i)),l=!!s&&m(c);if((l||i._lazyPromise||i._componentsPromise||i.options.head||i.options.scripts||i.options.headers||a._nonReactive.minPendingPromise)&&e.updateMatch(n,e=>({...e,isFetching:`loader`})),s){let t=l?await c:c;qi(e,e.router.getMatch(n),t),t!==void 0&&e.updateMatch(n,e=>({...e,loaderData:t}))}i._lazyPromise&&await i._lazyPromise;let u=a._nonReactive.minPendingPromise;u&&await u,i._componentsPromise&&await i._componentsPromise,e.updateMatch(n,t=>({...t,error:void 0,context:Gi(e,r),status:`success`,isFetching:!1,updatedAt:Date.now()}))}catch(t){let o=t;if(o?.name===`AbortError`){if(a.abortController.signal.aborted){a._nonReactive.loaderPromise?.resolve(),a._nonReactive.loaderPromise=void 0;return}e.updateMatch(n,t=>({...t,status:t.status===`pending`?`success`:t.status,isFetching:!1,context:Gi(e,r)}));return}let s=a._nonReactive.minPendingPromise;s&&await s,ue(t)&&await i.options.notFoundComponent?.preload?.(),qi(e,e.router.getMatch(n),t);try{i.options.onError?.(t)}catch(t){o=t,qi(e,e.router.getMatch(n),t)}!he(o)&&!ue(o)&&await sa(i,[`errorComponent`]),e.updateMatch(n,t=>({...t,error:o,context:Gi(e,r),status:`error`,isFetching:!1}))}}catch(t){let r=e.router.getMatch(n);r&&(r._nonReactive.loaderPromise=void 0),qi(e,r,t)}},ia=async(e,t,n)=>{async function r(r,a,c,l,d){let f=Date.now()-a.updatedAt,p=r?d.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:d.options.staleTime??e.router.options.defaultStaleTime??0,m=d.options.shouldReload,h=typeof m==`function`?m(na(e,t,i,n,d)):m,{status:g,invalid:_}=l,v=f>=p&&(!!e.forceStaleReload||l.cause===`enter`||c!==void 0&&c!==l.id);o=g===`success`&&(_||(h??v)),r&&d.options.preload===!1||(o&&!e.sync&&u?(s=!0,(async()=>{try{await ra(e,t,i,n,d);let r=e.router.getMatch(i);r._nonReactive.loaderPromise?.resolve(),r._nonReactive.loadPromise?.resolve(),r._nonReactive.loaderPromise=void 0,r._nonReactive.loadPromise=void 0}catch(t){he(t)&&await e.router.navigate(t.options)}})()):g!==`success`||o?await ra(e,t,i,n,d):Yi(e,i,n))}let{id:i,routeId:a}=e.matches[n],o=!1,s=!1,c=e.router.looseRoutesById[a],l=c.options.loader,u=((typeof l==`function`?void 0:l?.staleReloadMode)??e.router.options.defaultStaleReloadMode)!==`blocking`;if(Ji(e,i)){if(!e.router.getMatch(i))return e.matches[n];Yi(e,i,n)}else{let t=e.router.getMatch(i),o=e.router.stores.matchesId.get()[n],s=(o&&e.router.stores.matchStores.get(o)||null)?.routeId===a?o:e.router.stores.matches.get().find(e=>e.routeId===a)?.id,l=Wi(e,i);if(t._nonReactive.loaderPromise){if(t.status===`success`&&!e.sync&&!t.preload&&u)return t;await t._nonReactive.loaderPromise;let n=e.router.getMatch(i),a=n._nonReactive.error||n.error;a&&qi(e,n,a),n.status===`pending`&&await r(l,t,s,n,c)}else{let n=l&&!e.router.stores.matchStores.has(i),a=e.router.getMatch(i);a._nonReactive.loaderPromise=_(),n!==a.preload&&e.updateMatch(i,e=>({...e,preload:n})),await r(l,t,s,a,c)}}let d=e.router.getMatch(i);s||(d._nonReactive.loaderPromise?.resolve(),d._nonReactive.loadPromise?.resolve(),d._nonReactive.loadPromise=void 0),clearTimeout(d._nonReactive.pendingTimeout),d._nonReactive.pendingTimeout=void 0,s||(d._nonReactive.loaderPromise=void 0),d._nonReactive.dehydrated=void 0;let f=s?d.isFetching:!1;return f!==d.isFetching||d.invalid!==!1?(e.updateMatch(i,e=>({...e,isFetching:f,invalid:!1})),e.router.getMatch(i)):d};async function aa(e){let t=e,n=[];Ui(t.router)&&Hi(t);let r;for(let e=0;e({...e,...a?{status:`success`,globalNotFound:!0,error:void 0}:{status:`notFound`,error:l},isFetching:!1})),u=e,await sa(r,[`notFoundComponent`])}else if(!t.preload){let e=t.matches[0];e.globalNotFound||t.router.getMatch(e.id)?.globalNotFound&&t.updateMatch(e.id,e=>({...e,globalNotFound:!1,error:void 0}))}if(t.serialError&&t.firstBadMatchIndex!==void 0){let e=t.router.looseRoutesById[t.matches[t.firstBadMatchIndex].routeId];await sa(e,[`errorComponent`])}for(let e=0;e<=u;e++){let{id:n,routeId:r}=t.matches[e],i=t.router.looseRoutesById[r];try{let e=ta(t,n,i);if(e){let r=await e;t.updateMatch(n,e=>({...e,...r}))}}catch(e){console.error(`Error executing head for route ${r}:`,e)}}let d=Hi(t);if(m(d)&&await d,l)throw l;if(t.serialError&&!t.preload&&!t.onReady)throw t.serialError;return t.matches}function oa(e,t){let n=t.map(t=>e.options[t]?.preload?.()).filter(Boolean);if(n.length!==0)return Promise.all(n)}function sa(e,t=la){!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(t=>{let{id:n,...r}=t.options;Object.assign(e.options,r),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0);let n=()=>e._componentsLoaded?void 0:t===la?(()=>{if(e._componentsPromise===void 0){let t=oa(e,la);t?e._componentsPromise=t.then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0}):e._componentsLoaded=!0}return e._componentsPromise})():oa(e,t);return e._lazyPromise?e._lazyPromise.then(n):n()}function ca(e){for(let t of la)if(e.options[t]?.preload)return!0;return!1}var la=[`component`,`errorComponent`,`pendingComponent`,`notFoundComponent`];function ua(e){return{input:({url:t})=>{for(let n of e)t=fa(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=pa(e[n],t);return t}}}function da(e){let t=j(e.basepath),n=`/${t}`,r=e.caseSensitive?n:n.toLowerCase(),i=`${r}/`;return{input:({url:t})=>{let a=e.caseSensitive?t.pathname:t.pathname.toLowerCase();return a===r?t.pathname=`/`:a.startsWith(i)&&(t.pathname=t.pathname.slice(n.length)),t},output:({url:e})=>(e.pathname=k([`/`,t,e.pathname]),e)}}function fa(e,t){let n=e?.input?.({url:t});if(n){if(typeof n==`string`)return new URL(n);if(n instanceof URL)return n}return t}function pa(e,t){let n=e?.output?.({url:t});if(n){if(typeof n==`string`)return new URL(n);if(n instanceof URL)return n}return t}function ma(e,t){let{createMutableStore:n,createReadonlyStore:r,batch:i,init:a}=t,o=new Map,s=new Map,c=new Map,l=n(e.status),u=n(e.loadedAt),d=n(e.isLoading),f=n(e.isTransitioning),p=n(e.location),m=n(e.resolvedLocation),h=n(e.statusCode),g=n(e.redirect),_=n([]),v=n([]),y=n([]),b=r(()=>ha(o,_.get())),x=r(()=>ha(s,v.get())),S=r(()=>ha(c,y.get())),C=r(()=>_.get()[0]),w=r(()=>_.get().some(e=>o.get(e)?.get().status===`pending`)),T=r(()=>({locationHref:p.get().href,resolvedLocationHref:m.get()?.href,status:l.get()})),E=r(()=>({status:l.get(),loadedAt:u.get(),isLoading:d.get(),isTransitioning:f.get(),matches:b.get(),location:p.get(),resolvedLocation:m.get(),statusCode:h.get(),redirect:g.get()})),D=se(64);function O(e){let t=D.get(e);return t||(t=r(()=>{let t=_.get();for(let n of t){let t=o.get(n);if(t&&t.routeId===e)return t.get()}}),D.set(e,t)),t}let k={status:l,loadedAt:u,isLoading:d,isTransitioning:f,location:p,resolvedLocation:m,statusCode:h,redirect:g,matchesId:_,pendingIds:v,cachedIds:y,matches:b,pendingMatches:x,cachedMatches:S,firstId:C,hasPending:w,matchRouteDeps:T,matchStores:o,pendingMatchStores:s,cachedMatchStores:c,__store:E,getRouteMatchStore:O,setMatches:A,setPending:j,setCached:M};A(e.matches),a?.(k);function A(e){ga(e,o,_,n,i)}function j(e){ga(e,s,v,n,i)}function M(e){ga(e,c,y,n,i)}return k}function ha(e,t){let n=[];for(let r of t){let t=e.get(r);t&&n.push(t.get())}return n}function ga(e,t,n,r,i){let a=e.map(e=>e.id),o=new Set(a);i(()=>{for(let e of t.keys())o.has(e)||t.delete(e);for(let n of e){let e=t.get(n.id);if(!e){let e=r(n);e.routeId=n.routeId,t.set(n.id,e);continue}e.routeId=n.routeId,e.get()!==n&&e.set(n)}l(n.get(),a)||n.set(a)})}var _a=`__TSR_index`,va=`popstate`,ya=`beforeunload`;function ba(e){let t=e.getLocation(),n=new Set,r=r=>{t=e.getLocation(),n.forEach(e=>e({location:t,action:r}))},i=n=>{e.notifyOnIndexChange??!0?r(n):t=e.getLocation()},a=async({task:n,navigateOpts:r,...i})=>{if(r?.ignoreBlocker??!1){n();return}let a=e.getBlockers?.()??[],o=i.type===`PUSH`||i.type===`REPLACE`;if(typeof document<`u`&&a.length&&o)for(let n of a){let r=wa(i.path,i.state);if(await n.blockerFn({currentLocation:t,nextLocation:r,action:i.type})){e.onBlocked?.();return}}n()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:e=>(n.add(e),()=>{n.delete(e)}),push:(n,i,o)=>{let s=t.state[_a];i=xa(s+1,i),a({task:()=>{e.pushState(n,i),r({type:`PUSH`})},navigateOpts:o,type:`PUSH`,path:n,state:i})},replace:(n,i,o)=>{let s=t.state[_a];i=xa(s,i),a({task:()=>{e.replaceState(n,i),r({type:`REPLACE`})},navigateOpts:o,type:`REPLACE`,path:n,state:i})},go:(t,n)=>{a({task:()=>{e.go(t),i({type:`GO`,index:t})},navigateOpts:n,type:`GO`})},back:t=>{a({task:()=>{e.back(t?.ignoreBlocker??!1),i({type:`BACK`})},navigateOpts:t,type:`BACK`})},forward:t=>{a({task:()=>{e.forward(t?.ignoreBlocker??!1),i({type:`FORWARD`})},navigateOpts:t,type:`FORWARD`})},canGoBack:()=>t.state[_a]!==0,createHref:t=>e.createHref(t),block:t=>{if(!e.setBlockers)return()=>{};let n=e.getBlockers?.()??[];return e.setBlockers([...n,t]),()=>{let n=e.getBlockers?.()??[];e.setBlockers?.(n.filter(e=>e!==t))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:r}}function xa(e,t){t||={};let n=Ta();return{...t,key:n,__TSR_key:n,[_a]:e}}function Sa(e){let t=e?.window??(typeof document<`u`?window:void 0),n=t.history.pushState,r=t.history.replaceState,i=[],a=()=>i,o=e=>i=e,s=e?.createHref??(e=>e),c=e?.parseLocation??(()=>wa(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){let e=Ta();t.history.replaceState({[_a]:0,key:e,__TSR_key:e},``)}let l=c(),u,d=!1,f=!1,p=!1,m=!1,h=()=>l,g,_,v=()=>{g&&(C._ignoreSubscribers=!0,(g.isPush?t.history.pushState:t.history.replaceState)(g.state,``,g.href),C._ignoreSubscribers=!1,g=void 0,_=void 0,u=void 0)},y=(e,t,n)=>{let r=s(t);_||(u=l),l=wa(t,n),g={href:r,state:n,isPush:g?.isPush||e===`push`},_||=Promise.resolve().then(()=>v())},b=e=>{l=c(),C.notify({type:e})},x=async()=>{if(f){f=!1;return}let e=c(),n=e.state[_a]-l.state[_a],r=n===1,i=n===-1,o=!r&&!i||d;d=!1;let s=o?`GO`:i?`BACK`:`FORWARD`,u=o?{type:`GO`,index:n}:{type:i?`BACK`:`FORWARD`};if(p)p=!1;else{let n=a();if(typeof document<`u`&&n.length){for(let r of n)if(await r.blockerFn({currentLocation:l,nextLocation:e,action:s})){f=!0,t.history.go(1),C.notify(u);return}}}l=c(),C.notify(u)},S=e=>{if(m){m=!1;return}let t=!1,n=a();if(typeof document<`u`&&n.length)for(let e of n){let n=e.enableBeforeUnload??!0;if(n===!0){t=!0;break}if(typeof n==`function`&&n()===!0){t=!0;break}}if(t)return e.preventDefault(),e.returnValue=``},C=ba({getLocation:h,getLength:()=>t.history.length,pushState:(e,t)=>y(`push`,e,t),replaceState:(e,t)=>y(`replace`,e,t),back:e=>(e&&(p=!0),m=!0,t.history.back()),forward:e=>{e&&(p=!0),m=!0,t.history.forward()},go:e=>{d=!0,t.history.go(e)},createHref:e=>s(e),flush:v,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(ya,S,{capture:!0}),t.removeEventListener(va,x)},onBlocked:()=>{u&&l!==u&&(l=u)},getBlockers:a,setBlockers:o,notifyOnIndexChange:!1});return t.addEventListener(ya,S,{capture:!0}),t.addEventListener(va,x),t.history.pushState=function(...e){let r=n.apply(t.history,e);return C._ignoreSubscribers||b(`PUSH`),r},t.history.replaceState=function(...e){let n=r.apply(t.history,e);return C._ignoreSubscribers||b(`REPLACE`),n},C}function Ca(e){let t=e.replace(/[\x00-\x1f\x7f]/g,``);return t.startsWith(`//`)&&(t=`/`+t.replace(/^\/+/,``)),t}function wa(e,t){let n=Ca(e),r=n.indexOf(`#`),i=n.indexOf(`?`),a=Ta();return{href:n,pathname:n.substring(0,r>0?i>0?Math.min(r,i):r:i>0?i:n.length),hash:r>-1?n.substring(r):``,search:i>-1?n.slice(i,r===-1?void 0:r):``,state:t||{[_a]:0,key:a,__TSR_key:a}}}function Ta(){return(Math.random()+1).toString(36).substring(7)}function Ea(e,t){let n=t,r=e;return{fromLocation:n,toLocation:r,pathChanged:n?.pathname!==r.pathname,hrefChanged:n?.href!==r.href,hashChanged:n?.hash!==r.hash}}var Da=new WeakMap,Oa=class{constructor(e,t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this._scroll={next:!0},this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.routeBranchCache=new WeakMap,this.startTransition=e=>e(),this.update=e=>{let t=this.options,n=this.basepath??t?.basepath??`/`,r=this.basepath===void 0,i=t?.rewrite;if(this.options={...t,...e},this.isServer=this.options.isServer??typeof document>`u`,this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=P(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=Sa()),this.origin=this.options.origin,this.origin||(window?.origin&&window.origin!==`null`?this.origin=window.origin:this.origin=`http://localhost`),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let e;this.resolvePathCache=se(1e3),e=this.buildRouteTree(),this.setRoutes(e)}if(!this.stores&&this.latestLocation){let e=this.getStoreConfig(this);this.batch=e.batch,this.stores=ma(ja(this.latestLocation),e),Za(this)}let a=!1,o=this.options.basepath??`/`,s=this.options.rewrite;if(r||n!==o||i!==s){this.basepath=o;let e=[],t=j(o);t&&t!==`/`&&e.push(da({basepath:o})),s&&e.push(s),this.rewrite=e.length===0?void 0:e.length===1?e[0]:ua(e),this.history&&this.updateLatestLocation(),a=!0}a&&this.stores&&this.stores.location.set(this.latestLocation),typeof window<`u`&&`CSS`in window&&typeof window.CSS?.supports==`function`&&(this.isViewTransitionTypesSupported=window.CSS.supports(`selector(:active-view-transition-type(a))`))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{let e=c(this.routeTree,this.options.caseSensitive,(e,t)=>{e.init({originalIndex:t})});return this.options.routeMasks&&b(this.options.routeMasks,e.processedTree),e},this.subscribe=(e,t)=>{let n={eventType:e,fn:t};return this.subscribers.add(n),()=>{this.subscribers.delete(n)}},this.emit=e=>{this.subscribers.forEach(t=>{t.eventType===e.type&&t.fn(e)})},this.parseLocation=(e,t)=>{let n=({pathname:e,search:n,hash:r,href:i,state:a})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(e)){let i=this.options.parseSearch(n),o=this.options.stringifySearch(i);return{href:e+o+r,publicHref:e+o+r,pathname:N(e).path,external:!1,searchStr:o,search:le(t?.search,i),hash:N(r.slice(1)).path,state:s(t?.state,a)}}let o=new URL(i,this.origin),c=fa(this.rewrite,o),l=this.options.parseSearch(c.search),u=this.options.stringifySearch(l);return c.search=u,{href:c.href.replace(c.origin,``),publicHref:i,pathname:N(c.pathname).path,external:!!this.rewrite&&c.origin!==this.origin,searchStr:u,search:le(t?.search,l),hash:N(c.hash.slice(1)).path,state:s(t?.state,a)}},r=n(e),{__tempLocation:i,__tempKey:a}=r.state;if(i&&(!a||a===this.tempLocationKey)){let e=n(i);return e.state.key=r.state.key,e.state.__TSR_key=r.state.__TSR_key,delete e.state.__tempLocation,{...e,maskedLocation:r}}return r},this.resolvePathWithBase=(e,t)=>te({base:e,to:t.includes(`//`)?D(t):t,trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(e,t,n)=>typeof e==`string`?this.matchRoutesInternal({pathname:e,search:t},n):this.matchRoutesInternal(e,t),this.getMatchedRoutes=e=>Na({pathname:e,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=e=>{let t=this.getMatch(e);t&&(t.abortController.abort(),clearTimeout(t._nonReactive.pendingTimeout),t._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{this.stores.pendingIds.get().forEach(e=>{this.cancelMatch(e)}),this.stores.matchesId.get().forEach(e=>{if(this.stores.pendingMatchStores.has(e))return;let t=this.stores.matchStores.get(e)?.get();t&&(t.status===`pending`||t.isFetching===`loader`)&&this.cancelMatch(e)})},this.buildLocation=e=>{let t=(t={})=>{let n=t._fromLocation||this.pendingBuiltLocation||this.latestLocation,r=this.matchRoutesLightweight(n);t.from;let i=t.unsafeRelative===`path`?n.pathname:t.from??r.fullPath,a=t.to?`${t.to}`:void 0,o=r.search,c=Object.assign(Object.create(null),r.params),l=a?.charCodeAt(0)===47?`/`:this.resolvePathWithBase(i,`.`),u=a?this.resolvePathWithBase(l,a):l,d=t.params===!1||t.params===null?Object.create(null):(t.params??!0)===!0?c:Object.assign(c,g(t.params,c)),f=this.routesByPath[w(u)],p;if(f)p=this.getRouteBranch(f);else if(u.includes(`$`))p=[];else{let e=this.getMatchedRoutes(u);p=e.matchedRoutes,this.options.notFoundRoute&&(!e.foundRoute||e.foundRoute.path!==`/`&&e.routeParams[`**`])&&(p=[...p,this.options.notFoundRoute])}if(p.length&&v(d))for(let e of p){let t=e.options.params?.stringify??e.options.stringifyParams;if(t)try{Object.assign(d,t(d))}catch{}}let m=e.leaveParams?u:N(O({path:u,params:d,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path,h=o;if(e._includeValidateSearch&&this.options.search?.strict){let e={};p.forEach(t=>{if(t.options.validateSearch)try{Object.assign(e,Ma(t.options.validateSearch,{...e,...h}))}catch{}}),h=e}h=Pa({search:h,dest:t,destRoutes:p,_includeValidateSearch:e._includeValidateSearch}),h=le(o,h);let _=this.options.stringifySearch(h),y=t.hash===!0?n.hash:t.hash?g(t.hash,n.hash):void 0,b=y?`#${y}`:``,x=t.state===!0?n.state:t.state?g(t.state,n.state):{};x=s(n.state,x);let S=`${m}${_}${b}`,C,T,E=!1;if(this.rewrite){let e=new URL(S,this.origin),t=pa(this.rewrite,e);C=e.href.replace(e.origin,``),t.origin===this.origin?T=t.pathname+t.search+t.hash:(T=t.href,E=!0)}else C=ee(S),T=C;return{publicHref:T,href:C,pathname:m,search:h,searchStr:_,state:x,hash:y??``,external:E,unmaskOnReload:t.unmaskOnReload}},n=(n={},r)=>{let i=t(n),a=r?t(r):void 0;if(!a){let n=Object.create(null);if(this.options.routeMasks){let o=ce(i.pathname,this.processedTree);if(o){Object.assign(n,o.rawParams);let{from:i,params:s,...c}=o.route,l=s===!1||s===null?Object.create(null):(s??!0)===!0?n:Object.assign(n,g(s,n));r={from:e.from,...c,params:l},a=t(r)}}}return a&&(i.maskedLocation=a),i};return e.mask?n(e,{from:e.from,...e.mask}):n(e)},this.commitLocation=async({viewTransition:e,ignoreBlocker:t,...n})=>{let r,i=()=>{let e=[`key`,`__TSR_key`,`__TSR_index`,`__hashScrollIntoViewOptions`];e.forEach(e=>{n.state[e]=this.latestLocation.state[e]});let t=o(n.state,this.latestLocation.state);return e.forEach(e=>{delete n.state[e]}),t},a=w(this.latestLocation.href)===w(n.href),s=this.commitLocationPromise;if(this.commitLocationPromise=_(()=>{s?.resolve(),s=void 0}),a&&i())this.load();else{let{maskedLocation:i,hashScrollIntoView:a,...o}=n;i&&(o={...i,state:{...i.state,__tempKey:void 0,__tempLocation:{...o,search:o.searchStr,state:{...o.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(o.unmaskOnReload??this.options.unmaskOnReload??!1)&&(o.state.__tempKey=this.tempLocationKey)),o.state.__hashScrollIntoViewOptions=a??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=e,r=n.replace?`REPLACE`:`PUSH`,this.history[r===`REPLACE`?`replace`:`push`](o.publicHref,o.state,{ignoreBlocker:t})}return this._scroll.next=n.resetScroll??!0,this.history.subscribers.size||this.load(r?{action:{type:r}}:void 0),this.commitLocationPromise},this.buildAndCommitLocation=({replace:e,resetScroll:t,hashScrollIntoView:n,viewTransition:r,ignoreBlocker:i,href:a,...o}={})=>{if(a){let t=this.history.location.state.__TSR_index,n=wa(a,{__TSR_index:e?t:t+1}),r=new URL(n.pathname,this.origin);o.to=fa(this.rewrite,r).pathname,o.search=this.options.parseSearch(n.search),o.hash=n.hash.slice(1)}let s=this.buildLocation({...o,_includeValidateSearch:!0});this.pendingBuiltLocation=s;let c=this.commitLocation({...s,viewTransition:r,replace:e,resetScroll:t,hashScrollIntoView:n,ignoreBlocker:i});return Promise.resolve().then(()=>{this.pendingBuiltLocation===s&&(this.pendingBuiltLocation=void 0)}),c},this.navigate=async({to:e,reloadDocument:t,href:n,publicHref:r,...i})=>{let a=!1;if(n)try{new URL(`${n}`),a=!0}catch{}if(a&&!t&&(t=!0),t){if(e!==void 0||!n){let t=this.buildLocation({to:e,...i});n??=t.publicHref,r??=t.publicHref}let t=!a&&r?r:n;if(d(t,this.protocolAllowlist))return Promise.resolve();if(!i.ignoreBlocker){let e=this.history.getBlockers?.()??[];for(let t of e)if(t?.blockerFn&&await t.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:`PUSH`}))return Promise.resolve()}return i.replace?window.location.replace(t):window.location.href=t,Promise.resolve()}return this.buildAndCommitLocation({...i,href:n,to:e,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();let e=this.matchRoutes(this.latestLocation),t=this.stores.cachedMatches.get().filter(t=>!e.some(e=>e.id===t.id));this.batch(()=>{this.stores.status.set(`pending`),this.stores.statusCode.set(200),this.stores.isLoading.set(!0),this.stores.location.set(this.latestLocation),this.stores.setPending(e),this.stores.setCached(t)})},this.load=async e=>{let t=e?.action?.type,n,r,i,a=this.stores.resolvedLocation.get()??this.stores.location.get();for(i=new Promise(o=>{this.startTransition(async()=>{try{this.beforeLoad(),t?Da.set(this.latestLocation,t):Da.delete(this.latestLocation);let n=this.latestLocation,r=Ea(n,this.stores.resolvedLocation.get());this.stores.redirect.get()||this.emit({type:`onBeforeNavigate`,...r}),this.emit({type:`onBeforeLoad`,...r}),await aa({router:this,sync:e?.sync,forceStaleReload:a.href===n.href,matches:this.stores.pendingMatches.get(),location:n,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let e=null,t=null,n=null,r=null;this.batch(()=>{let i=this.stores.pendingMatches.get(),a=i.length,o=this.stores.matches.get();e=a?o.filter(e=>!this.stores.pendingMatchStores.has(e.id)):null;let s=new Set;for(let e of this.stores.pendingMatchStores.values())e.routeId&&s.add(e.routeId);let c=new Set;for(let e of this.stores.matchStores.values())e.routeId&&c.add(e.routeId);t=a?o.filter(e=>!s.has(e.routeId)):null,n=a?i.filter(e=>!c.has(e.routeId)):null,r=a?i.filter(e=>c.has(e.routeId)):o,this.stores.isLoading.set(!1),this.stores.loadedAt.set(Date.now()),a&&(this.stores.setMatches(i),this.stores.setPending([]),this.stores.setCached([...this.stores.cachedMatches.get(),...e.filter(e=>e.status!==`error`&&e.status!==`notFound`&&e.status!==`redirected`)]),this.clearExpiredCache())});for(let[e,i]of[[t,`onLeave`],[n,`onEnter`],[r,`onStay`]])if(e)for(let t of e)this.looseRoutesById[t.routeId].options[i]?.(t)})})}})}catch(e){he(e)?(n=e,this.navigate({...n.options,replace:!0,ignoreBlocker:!0})):ue(e)&&(r=e);let t=n?n.status:r?404:this.stores.matches.get().some(e=>e.status===`error`)?500:200;this.batch(()=>{this.stores.statusCode.set(t),this.stores.redirect.set(n)})}this.latestLoadPromise===i&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),o()})}),this.latestLoadPromise=i,await i;this.latestLoadPromise&&i!==this.latestLoadPromise;)await this.latestLoadPromise;let o;this.hasNotFoundMatch()?o=404:this.stores.matches.get().some(e=>e.status===`error`)&&(o=500),o!==void 0&&this.stores.statusCode.set(o)},this.startViewTransition=e=>{let t=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,t&&typeof document<`u`&&`startViewTransition`in document&&typeof document.startViewTransition==`function`){let n;if(typeof t==`object`&&this.isViewTransitionTypesSupported){let r=this.latestLocation,i=this.stores.resolvedLocation.get(),a=typeof t.types==`function`?t.types(Ea(r,i)):t.types;if(a===!1){e();return}n={update:e,types:a}}else n=e;document.startViewTransition(n)}else e()},this.updateMatch=(e,t)=>{this.startTransition(()=>{let n=this.stores.pendingMatchStores.get(e);if(n){n.set(t);return}let r=this.stores.matchStores.get(e);if(r){r.set(t);return}let i=this.stores.cachedMatchStores.get(e);if(i){let n=t(i.get());n.status===`redirected`?this.stores.cachedMatchStores.delete(e)&&this.stores.cachedIds.set(t=>t.filter(t=>t!==e)):i.set(n)}})},this.getMatch=e=>this.stores.cachedMatchStores.get(e)?.get()??this.stores.pendingMatchStores.get(e)?.get()??this.stores.matchStores.get(e)?.get(),this.invalidate=e=>{let t=t=>e?.filter?.(t)??!0?{...t,invalid:!0,...e?.forcePending||t.status===`error`||t.status===`notFound`?{status:`pending`,error:void 0}:void 0}:t;return this.batch(()=>{this.stores.setMatches(this.stores.matches.get().map(t)),this.stores.setCached(this.stores.cachedMatches.get().map(t)),this.stores.setPending(this.stores.pendingMatches.get().map(t))}),this.shouldViewTransition=!1,this.load({sync:e?.sync})},this.getParsedLocationHref=e=>e.publicHref||`/`,this.resolveRedirect=e=>{let t=e.headers.get(`Location`);if(!e.options.href||e.options._builtLocation){let t=e.options._builtLocation??this.buildLocation(e.options),n=this.getParsedLocationHref(t);e.options.href=n,e.headers.set(`Location`,n)}else if(t)try{let n=new URL(t);if(this.origin&&n.origin===this.origin){let t=n.pathname+n.search+n.hash;e.options.href=t,e.headers.set(`Location`,t)}}catch{}if(e.options.href&&!e.options._builtLocation&&d(e.options.href,this.protocolAllowlist))throw Error(`Redirect blocked: unsafe protocol`);return e.headers.get(`Location`)||e.headers.set(`Location`,e.options.href),e},this.clearCache=e=>{let t=e?.filter;t===void 0?this.stores.setCached([]):this.stores.setCached(this.stores.cachedMatches.get().filter(e=>!t(e)))},this.clearExpiredCache=()=>{let e=Date.now();this.clearCache({filter:t=>{let n=this.looseRoutesById[t.routeId];if(!n.options.loader)return!0;let r=(t.preload?n.options.preloadGcTime??this.options.defaultPreloadGcTime:n.options.gcTime??this.options.defaultGcTime)??300*1e3;return t.status===`error`?!0:e-t.updatedAt>=r}})},this.loadRouteChunk=sa,this.preloadRoute=async e=>{let t=e._builtLocation??this.buildLocation(e),n=this.matchRoutes(t,{throwOnError:!0,preload:!0,dest:e}),r=new Set([...this.stores.matchesId.get(),...this.stores.pendingIds.get()]),i=new Set([...r,...this.stores.cachedIds.get()]),a=n.filter(e=>!i.has(e.id));if(a.length){let e=this.stores.cachedMatches.get();this.stores.setCached([...e,...a])}try{return n=await aa({router:this,matches:n,location:t,preload:!0,updateMatch:(e,t)=>{r.has(e)?n=n.map(n=>n.id===e?t(n):n):this.updateMatch(e,t)}}),n}catch(e){if(he(e))return e.options.reloadDocument?void 0:await this.preloadRoute({...e.options,_fromLocation:t});ue(e)||console.error(e);return}},this.matchRoute=(e,t)=>{let n={...e,to:e.to?this.resolvePathWithBase(e.from||``,e.to):void 0,params:e.params||{},leaveParams:!0},r=this.buildLocation(n);if(t?.pending&&this.stores.status.get()!==`pending`)return!1;let i=(t?.pending===void 0?!this.stores.isLoading.get():t.pending)?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),a=I(r.pathname,t?.caseSensitive??!1,t?.fuzzy??!1,i.pathname,this.processedTree);return!a||e.params&&!o(a.rawParams,e.params,{partial:!0})?!1:t?.includeSearch??!0?o(i.search,r.search,{partial:!0})?a.rawParams:!1:a.rawParams},this.hasNotFoundMatch=()=>this.stores.matches.get().some(e=>e.status===`notFound`||e.globalNotFound),this.getStoreConfig=t,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...e,caseSensitive:e.caseSensitive??!1,notFoundMode:e.notFoundMode??`fuzzy`,stringifySearch:e.stringifySearch??zi,parseSearch:e.parseSearch??Ri,protocolAllowlist:e.protocolAllowlist??u}),typeof document<`u`&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.stores.__store.get()}setRoutes({routesById:e,routesByPath:t,processedTree:n}){this.routesById=e,this.routesByPath=t,this.processedTree=n;let r=this.options.notFoundRoute;r&&(r.init({originalIndex:99999999999}),this.routesById[r.id]=r)}getRouteBranch(e){let t=this.routeBranchCache.get(e);return t||(t=oe(e),this.routeBranchCache.set(e,t)),t}get looseRoutesById(){return this.routesById}getParentContext(e){return e?.id?e.context??this.options.context??void 0:this.options.context??void 0}matchRoutesInternal(e,t){let n=this.getMatchedRoutes(e.pathname),{foundRoute:r,routeParams:i}=n,{matchedRoutes:a}=n,o=!1;(r?r.path!==`/`&&i[`**`]:w(e.pathname))&&(this.options.notFoundRoute?a=[...a,this.options.notFoundRoute]:o=!0);let c=o?Ia(this.options.notFoundMode,a):void 0,l=Array(a.length),u=new Map;for(let e of this.stores.matchStores.values())e.routeId&&u.set(e.routeId,e.get());for(let n=0;nthis.navigate({...t,_fromLocation:e}),buildLocation:this.buildLocation,cause:n.cause,abortController:n.abortController,preload:!!n.preload,matches:l,routeId:r.id};n.__routeContext=r.options.context(t)??void 0}n.context={...a,...n.__routeContext,...n.__beforeLoadContext}}}return l}matchRoutesLightweight(e){let{matchedRoutes:t,routeParams:n}=this.getMatchedRoutes(e.pathname),r=y(t),i={...e.search};for(let e of t)try{Object.assign(i,Ma(e.options.validateSearch,i))}catch{}let a=y(this.stores.matchesId.get()),o=a&&this.stores.matchStores.get(a)?.get(),s=o&&o.routeId===r.id&&o.pathname===e.pathname,c;if(s)c=o.params;else{let e=Object.assign(Object.create(null),n);for(let n of t)try{La(n,e)}catch{}c=e}return{matchedRoutes:t,fullPath:r.fullPath,search:i,params:c}}},ka=class extends Error{},Aa=class extends Error{};function ja(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:`idle`,resolvedLocation:void 0,location:e,matches:[],statusCode:200}}function Ma(e,t){if(e==null)return{};if(`~standard`in e){let n=e[`~standard`].validate(t);if(n instanceof Promise)throw new ka(`Async validation not supported`);if(n.issues)throw new ka(JSON.stringify(n.issues,void 0,2),{cause:n});return n.value}return`parse`in e?e.parse(t):typeof e==`function`?e(t):{}}function Na({pathname:e,routesById:t,processedTree:n}){let r=Object.create(null),i=w(e),a,o=E(i,n,!0);return o&&(a=o.route,Object.assign(r,o.rawParams)),{matchedRoutes:o?.branch||[t.__root__],routeParams:r,foundRoute:a}}function Pa({search:e,dest:t,destRoutes:n,_includeValidateSearch:r}){return Fa(n)(e,t,r??!1)}function Fa(e){let t,n,r=[];for(let t of e){let e=t.options;`search`in e?e.search?.middlewares&&r.push(...e.search.middlewares):(e.preSearchFilters||e.postSearchFilters)&&r.push(({search:t,next:n})=>{let r=n(e.preSearchFilters?e.preSearchFilters.reduce((e,t)=>t(e),t):t);return e.postSearchFilters?e.postSearchFilters.reduce((e,t)=>t(e),r):r});let i=e.validateSearch;i&&r.push(({search:e,next:t,meta:r})=>{let a=t(e);if(n)try{let e=Ma(i,a);if(r&&e)for(let t in e)t in a||(r.defaulted||=new Map).set(t,e[t]);return{...a,...e}}catch{}return a})}let i=(e,n,a)=>{if(e>=r.length){if(!t.search)return{};if(t.search===!0)return n;let e=g(t.search,n);return a&&(a.explicit=e),e}return r[e]({search:n,next:(t,n)=>{if(n){let n=a||{};return{search:i(e+1,t,n),meta:n}}return i(e+1,t,a)},meta:a})};return function(e,r,a){return t=r,n=a,i(0,e)}}function Ia(e,t){if(e!==`root`)for(let e=t.length-1;e>=0;e--){let n=t[e];if(n.children)return n.id}return fe}function La(e,t){let n=e.options.params?.parse??e.options.parseParams;if(n){let e=n(t);if(e===!1)throw Error(`Route params.parse returned false for a matched route`);Object.assign(t,e)}}function Ra(){try{return sessionStorage}catch{return}}var za=`tsr-scroll-restoration-v1_3`,Ba=Ra();function Va(){try{return JSON.parse(Ba?.getItem(`tsr-scroll-restoration-v1_3`)||`{}`)}catch{return{}}}function Ha(){try{Ba?.setItem(za,JSON.stringify(Ua))}catch{}}var Ua=Va(),Wa=`data-scroll-restoration-id`,Ga=e=>e.state.__TSR_key||e.href;function Ka(e){let t=e.getAttribute(Wa);if(t)return`[${Wa}="${t}"]`;let n=``,r=e,i;for(;i=r.parentNode;){let e=1,t=r;for(;t=t.previousElementSibling;)e++;let a=`${r.localName}:nth-child(${e})`;n=n?`${a} > ${n}`:a,r=i}return n}var qa=!1,Ja=`window`;function Ya(e){try{return typeof e==`function`?e():document.querySelector(e)}catch{}}function Xa(e){let t=[];for(let n of e){if(n===Ja)continue;let e=Ya(n);e&&t.push(e)}return t}function Za(e,t){let n=t??e.options.scrollRestoration,r=e._scroll;n&&(r.restoring=!0);let i=e.options.getScrollRestorationKey||Ga,a=new Map,o=(e,t,n)=>{let r=a.get(e)||{};r.scrollX=t,r.scrollY=n,a.set(e,r)},s=e=>{if(!(qa||!r.restoring))if(e.target===document)o(Ja,scrollX,scrollY);else{let t=e.target;o(t,t.scrollLeft,t.scrollTop)}},c=e=>{if(!r.restoring)return;let t=Ua[e]||={};for(let[e,n]of a)e===Ja?t[Ja]=n:e.isConnected&&(t[Ka(e)]=n)};n&&!r.restoration&&(r.restoration=!0,qa=!1,history.scrollRestoration=`manual`,document.addEventListener(`scroll`,s,!0),e.subscribe(`onBeforeLoad`,e=>{e.fromLocation&&c(i(e.fromLocation)),a.clear()}),addEventListener(`pagehide`,()=>{c(i(e.stores.resolvedLocation.get()??e.stores.location.get())),Ha()})),!r.reset&&(r.reset=!0,e.subscribe(`onRendered`,t=>{let n=e.options.scrollRestorationBehavior,o=e.options.scrollToTopSelectors,s=r.next,c;if(a.clear(),s||(r.next=!0),typeof e.options.scrollRestoration==`function`&&!e.options.scrollRestoration({location:e.latestLocation}))return;let l=i(t.toLocation),u=t.fromLocation&&i(t.fromLocation);if(r.restoring&&u&&u!==l){let e=Ua[u];if(e){let t=Ua[l];for(let n in e){if(n===Ja){if(s)continue}else{let e=Ya(n);if(!e||s&&o&&(c??=Xa(o),c.includes(e)))continue}t||=Ua[l]={},t[n]??=e[n]}}}qa=!0;try{let e=t.toLocation.hash,i=t.toLocation.state.__hashScrollIntoViewOptions??!0,a=!1;if(s){let s=Da.get(t.toLocation),u=e&&i&&(s===`PUSH`||s===`REPLACE`),d=r.restoring?Ua[l]:void 0;if(d)for(let e in d){let{scrollX:t,scrollY:r}=d[e];if(e===Ja){if(u)continue;scrollTo({top:r,left:t,behavior:n}),a=!0}else{let n=Ya(e);n&&(n.scrollLeft=t,n.scrollTop=r)}}if(!a&&!e){let e={top:0,left:0,behavior:n};if(scrollTo(e),o){c??=Xa(o);for(let t of c)t.scrollTo(e)}}}!a&&e&&i&&document.getElementById(e)?.scrollIntoView(i)}finally{qa=!1}}))}function Qa(e,t){if(e)return typeof e==`string`?e:e[t]}function $a(e){return e?.scriptFormat??`module`}function eo(e,t,n){let r=to(t),i=Qa(n,`script`)??r.crossOrigin;return{...$a(e)===`iife`?{rel:`preload`,as:`script`}:{rel:`modulepreload`},href:r.href,...i?{crossOrigin:i}:{}}}function to(e){return typeof e==`string`?{href:e,crossOrigin:void 0}:e}function no(e,t){if(t.length===0)return;if(t.length===1){e.push(t[0]);return}let n=new Set;for(let r of t){let t=JSON.stringify(r);n.has(t)||(n.add(t),e.push(r))}}function ro(e){return typeof e==`string`?{href:e,crossOrigin:void 0}:e}var io=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(e){if(this.init=e=>{this.originalIndex=e.originalIndex;let t=this.options,n=!t?.path&&!t?.id;this.parentRoute=this.options.getParentRoute?.(),n?this._path=fe:this.parentRoute||x();let r=n?fe:t?.path;r&&r!==`/`&&(r=A(r));let i=t?.id||r,a=n?fe:k([this.parentRoute.id===`__root__`?``:this.parentRoute.id,i]);r===`__root__`&&(r=`/`),a!==`__root__`&&(a=k([`/`,a]));let o=a===`__root__`?`/`:k([this.parentRoute.fullPath,r]);this._path=r,this._id=a,this._fullPath=o,this._to=w(o)},this.addChildren=e=>this._addFileChildren(e),this._addFileChildren=e=>(Array.isArray(e)&&(this.children=e),typeof e==`object`&&e&&(this.children=Object.values(e)),this),this._addFileTypes=()=>this,this.updateLoader=e=>(Object.assign(this.options,e),this),this.update=e=>(Object.assign(this.options,e),this),this.lazy=e=>(this.lazyFn=e,this),this.redirect=e=>me({from:this.fullPath,...e}),this.options=e||{},this.isRoot=!e?.getParentRoute,e?.id&&e?.path)throw Error(`Route cannot have both an 'id' and a 'path' option.`)}},ao=class extends io{constructor(e){super(e)}};function oo(e){let t=e.errorComponent??so;return(0,W.jsx)(G,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:r})=>n?U.createElement(t,{error:n,reset:r}):e.children})}var G=class extends U.Component{constructor(...e){super(...e),this.state={error:null}}static getDerivedStateFromProps(e,t){let n=e.getResetKey();return t.error&&t.resetKey!==n?{resetKey:n,error:null}:{resetKey:n}}static getDerivedStateFromError(e){return{error:e}}reset(){this.setState({error:null})}componentDidCatch(e,t){this.props.onCatch&&this.props.onCatch(e,t)}render(){return this.props.children({error:this.state.error,reset:()=>{this.reset()}})}};function so({error:e}){let[t,n]=U.useState(!1);return(0,W.jsxs)(`div`,{style:{padding:`.5rem`,maxWidth:`100%`},children:[(0,W.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`.5rem`},children:[(0,W.jsx)(`strong`,{style:{fontSize:`1rem`},children:`Something went wrong!`}),(0,W.jsx)(`button`,{style:{appearance:`none`,fontSize:`.6em`,border:`1px solid currentColor`,padding:`.1rem .2rem`,fontWeight:`bold`,borderRadius:`.25rem`},onClick:()=>n(e=>!e),children:t?`Hide Error`:`Show Error`})]}),(0,W.jsx)(`div`,{style:{height:`.25rem`}}),t?(0,W.jsx)(`div`,{children:(0,W.jsx)(`pre`,{style:{fontSize:`.7em`,border:`1px solid red`,borderRadius:`.25rem`,padding:`.3rem`,color:`red`,overflow:`auto`},children:e.message?(0,W.jsx)(`code`,{children:e.message}):null})}):null]})}var K=(e=>(e[e.None=0]=`None`,e[e.Mutable=1]=`Mutable`,e[e.Watching=2]=`Watching`,e[e.RecursedCheck=4]=`RecursedCheck`,e[e.Recursed=8]=`Recursed`,e[e.Dirty=16]=`Dirty`,e[e.Pending=32]=`Pending`,e))(K||{});function co({update:e,notify:t,unwatched:n}){return{link:r,unlink:i,propagate:a,checkDirty:o,shallowPropagate:s};function r(e,t,n){let r=t.depsTail;if(r!==void 0&&r.dep===e)return;let i=r===void 0?t.deps:r.nextDep;if(i!==void 0&&i.dep===e){i.version=n,t.depsTail=i;return}let a=e.subsTail;if(a!==void 0&&a.version===n&&a.sub===t)return;let o=t.depsTail=e.subsTail={version:n,dep:e,sub:t,prevDep:r,nextDep:i,prevSub:a,nextSub:void 0};i!==void 0&&(i.prevDep=o),r===void 0?t.deps=o:r.nextDep=o,a===void 0?e.subs=o:a.nextSub=o}function i(e,t=e.sub){let r=e.dep,i=e.prevDep,a=e.nextDep,o=e.nextSub,s=e.prevSub;return a===void 0?t.depsTail=i:a.prevDep=i,i===void 0?t.deps=a:i.nextDep=a,o===void 0?r.subsTail=s:o.prevSub=s,s===void 0?(r.subs=o)===void 0&&n(r):s.nextSub=o,a}function a(e){let n=e.nextSub,r;top:do{let i=e.sub,a=i.flags;if(a&60?a&12?a&4?!(a&48)&&c(e,i)?(i.flags=a|40,a&=1):a=0:i.flags=a&-9|32:a=0:i.flags=a|32,a&2&&t(i),a&1){let t=i.subs;if(t!==void 0){let i=(e=t).nextSub;i!==void 0&&(r={value:n,prev:r},n=i);continue}}if((e=n)!==void 0){n=e.nextSub;continue}for(;r!==void 0;)if(e=r.value,r=r.prev,e!==void 0){n=e.nextSub;continue top}break}while(!0)}function o(t,n){let r,i=0,a=!1;top:do{let o=t.dep,c=o.flags;if(n.flags&16)a=!0;else if((c&17)==17){if(e(o)){let e=o.subs;e.nextSub!==void 0&&s(e),a=!0}}else if((c&33)==33){(t.nextSub!==void 0||t.prevSub!==void 0)&&(r={value:t,prev:r}),t=o.deps,n=o,++i;continue}if(!a){let e=t.nextDep;if(e!==void 0){t=e;continue}}for(;i--;){let i=n.subs,o=i.nextSub!==void 0;if(o?(t=r.value,r=r.prev):t=i,a){if(e(n)){o&&s(i),n=t.sub;continue}a=!1}else n.flags&=-33;n=t.sub;let c=t.nextDep;if(c!==void 0){t=c;continue top}}return a}while(!0)}function s(e){do{let n=e.sub,r=n.flags;(r&48)==32&&(n.flags=r|16,(r&6)==2&&t(n))}while((e=e.nextSub)!==void 0)}function c(e,t){let n=t.depsTail;for(;n!==void 0;){if(n===e)return!0;n=n.prevDep}return!1}}function lo(e,t,n){let r=typeof e==`object`,i=r?e:void 0;return{next:(r?e.next:e)?.bind(i),error:(r?e.error:t)?.bind(i),complete:(r?e.complete:n)?.bind(i)}}var uo=[],fo=0,{link:po,unlink:mo,propagate:ho,checkDirty:go,shallowPropagate:_o}=co({update(e){return e._update()},notify(e){uo[yo++]=e,e.flags&=~K.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=K.Mutable|K.Dirty,Co(e))}}),vo=0,yo=0,bo,xo=0;function So(e){try{++xo,e()}finally{--xo||wo()}}function Co(e){let t=e.depsTail,n=t===void 0?e.deps:t.nextDep;for(;n!==void 0;)n=mo(n,e)}function wo(){if(!(xo>0)){for(;vo{i.get(),n.current?t.next?.(i._snapshot):n.current=!0});return{unsubscribe:()=>{r.stop()}}},_update(e){let a=bo,o=t?.compare??Object.is;if(n)bo=i,++fo,i.depsTail=void 0;else if(e===void 0)return!1;n&&(i.flags=K.Mutable|K.RecursedCheck);try{let t=i._snapshot,a=typeof e==`function`?e(t):e===void 0&&n?r(t):e;return t===void 0||!o(t,a)?(i._snapshot=a,!0):!1}finally{bo=a,n&&(i.flags&=~K.RecursedCheck),Co(i)}}};return n?(i.flags=K.Mutable|K.Dirty,i.get=function(){let e=i.flags;if(e&K.Dirty||e&K.Pending&&go(i.deps,i)){if(i._update()){let e=i.subs;e!==void 0&&_o(e)}}else e&K.Pending&&(i.flags=e&~K.Pending);return bo!==void 0&&po(i,bo,fo),i._snapshot}):i.set=function(e){if(i._update(e)){let e=i.subs;e!==void 0&&(ho(e),_o(e),wo())}},i}function Eo(e){let t=()=>{let t=bo;bo=n,++fo,n.depsTail=void 0,n.flags=K.Watching|K.RecursedCheck;try{return e()}finally{bo=t,n.flags&=~K.RecursedCheck,Co(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:K.Watching|K.RecursedCheck,notify(){let e=this.flags;e&K.Dirty||e&K.Pending&&go(this.deps,this)?t():this.flags=K.Watching},stop(){this.flags=K.None,this.depsTail=void 0,Co(this)}};return t(),n}var Do={get:()=>void 0,subscribe:()=>({unsubscribe:()=>{}})};function Oo(e){let t=M(),n=U.useContext(e.from?pe:de),r=e.from??n,i=r?e.from?t.stores.getRouteMatchStore(r):t.stores.matchStores.get(r):void 0,a=U.useRef(void 0);return F(i??Do,n=>{if((e.shouldThrow??!0)&&!n&&x(),n===void 0)return;let r=e.select?e.select(n):n;if(e.structuralSharing??t.options.defaultStructuralSharing){let e=s(a.current,r);return a.current=e,e}return r})}function ko(e){return Oo({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function Ao(e){let{select:t,...n}=e;return Oo({...n,select:e=>t?t(e.loaderDeps):e.loaderDeps})}function jo(e){return Oo({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{let n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function Mo(e){return Oo({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function No(e){let t=M();return U.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}function Po(e){return Oo({...e,select:t=>e.select?e.select(t.context):t.context})}var Fo=class extends io{constructor(e){super(e),this.useMatch=e=>Oo({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>Po({...e,from:this.id}),this.useSearch=e=>Mo({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>jo({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>Ao({...e,from:this.id}),this.useLoaderData=e=>ko({...e,from:this.id}),this.useNavigate=()=>No({from:this.fullPath}),this.Link=U.forwardRef((e,t)=>(0,W.jsx)(wt,{ref:t,from:this.fullPath,...e}))}};function Io(e){return new Fo(e)}function Lo(){return e=>zo(e)}var Ro=class extends ao{constructor(e){super(e),this.useMatch=e=>Oo({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>Po({...e,from:this.id}),this.useSearch=e=>Mo({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>jo({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>Ao({...e,from:this.id}),this.useLoaderData=e=>ko({...e,from:this.id}),this.useNavigate=()=>No({from:this.fullPath}),this.Link=U.forwardRef((e,t)=>(0,W.jsx)(wt,{ref:t,from:this.fullPath,...e}))}};function zo(e){return new Ro(e)}function q(e){return new Bo(e,{silent:!0}).createRoute}var Bo=class{constructor(e,t){this.path=e,this.createRoute=e=>{let t=Io(e);return t.isRoot=!1,t},this.silent=t?.silent}};function J(e,t){let n,r,i,a,o=()=>(n||=e().then(e=>{n=void 0,r=e[t??`default`]}).catch(e=>{if(i=e,p(i)&&i instanceof Error&&typeof window<`u`&&typeof sessionStorage<`u`){let e=`tanstack_router_reload:${i.message}`;sessionStorage.getItem(e)||(sessionStorage.setItem(e,`1`),a=!0)}}),n),s=function(e){if(a)throw window.location.reload(),new Promise(()=>{});if(i)throw i;if(!r)if(S)S(o());else throw o();return U.createElement(r,e)};return s.preload=o,s}function Vo(e){let t=M(),n=`not-found-${F(t.stores.location,e=>e.pathname)}-${F(t.stores.status,e=>e)}`;return(0,W.jsx)(oo,{getResetKey:()=>n,onCatch:(t,n)=>{if(ue(t))e.onCatch?.(t,n);else throw t},errorComponent:({error:t})=>{if(ue(t))return e.fallback?.(t);throw t},children:e.children})}function Ho(){return(0,W.jsx)(`p`,{children:`Not Found`})}function Uo(e){return(0,W.jsx)(W.Fragment,{children:e.children})}function Wo(e,t,n){return t.options.notFoundComponent?(0,W.jsx)(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?(0,W.jsx)(e.options.defaultNotFoundComponent,{...n}):(0,W.jsx)(Ho,{})}var Go=U.memo(function({matchId:e}){let t=M(),n=t.stores.matchStores.get(e);n||x();let r=F(t.stores.loadedAt,e=>e),i=F(n,e=>e);return(0,W.jsx)(Ko,{router:t,matchId:e,resetKey:r,matchState:U.useMemo(()=>{let e=i.routeId,n=t.routesById[e].parentRoute?.id;return{routeId:e,ssr:i.ssr,_displayPending:i._displayPending,parentRouteId:n}},[i._displayPending,i.routeId,i.ssr,t.routesById])})});function Ko({router:e,matchId:t,resetKey:n,matchState:r}){let i=e.routesById[r.routeId],a=i.options.pendingComponent??e.options.defaultPendingComponent,o=a?(0,W.jsx)(a,{}):null,s=i.options.errorComponent??e.options.defaultErrorComponent,c=i.options.onCatch??e.options.defaultOnCatch,l=i.isRoot?i.options.notFoundComponent??e.options.notFoundRoute?.options.component:i.options.notFoundComponent,u=r.ssr===!1||r.ssr===`data-only`,d=(!i.isRoot||i.options.wrapInSuspense||u)&&(i.options.wrapInSuspense??a??(i.options.errorComponent?.preload||u))?U.Suspense:Uo,f=s?oo:Uo,p=l?Vo:Uo;return(0,W.jsxs)(i.isRoot?i.options.shellComponent??Uo:Uo,{children:[(0,W.jsx)(de.Provider,{value:t,children:(0,W.jsx)(d,{fallback:o,children:(0,W.jsx)(f,{getResetKey:()=>n,errorComponent:s||so,onCatch:(e,t)=>{if(ue(e))throw e.routeId??=r.routeId,e;c?.(e,t)},children:(0,W.jsx)(p,{fallback:e=>{if(e.routeId??=r.routeId,!l||e.routeId&&e.routeId!==r.routeId||!e.routeId&&!i.isRoot)throw e;return U.createElement(l,e)},children:u||r._displayPending?(0,W.jsx)(re,{fallback:o,children:(0,W.jsx)(Jo,{matchId:t})}):(0,W.jsx)(Jo,{matchId:t})})})})}),r.parentRouteId===`__root__`?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(qo,{resetKey:n}),(e.options.scrollRestoration,null)]}):null]})}function qo({resetKey:e}){let t=M(),n=U.useRef(void 0);return C(()=>{let e=t.latestLocation.href;(n.current===void 0||n.current!==e)&&(t.emit({type:`onRendered`,...Ea(t.stores.location.get(),t.stores.resolvedLocation.get())}),n.current=e)},[t.latestLocation.state.__TSR_key,e,t]),null}var Jo=U.memo(function({matchId:e}){let t=M(),n=(e,n)=>t.getMatch(e.id)?._nonReactive[n]??e._nonReactive[n],r=t.stores.matchStores.get(e);r||x();let i=F(r,e=>e),a=i.routeId,o=t.routesById[a],s=U.useMemo(()=>{let e=(t.routesById[a].options.remountDeps??t.options.defaultRemountDeps)?.({routeId:a,loaderDeps:i.loaderDeps,params:i._strictParams,search:i._strictSearch});return e?JSON.stringify(e):void 0},[a,i.loaderDeps,i._strictParams,i._strictSearch,t.options.defaultRemountDeps,t.routesById]),c=U.useMemo(()=>{let e=o.options.component??t.options.defaultComponent;return e?(0,W.jsx)(e,{},s):(0,W.jsx)(Yo,{})},[s,o.options.component,t.options.defaultComponent]);if(i._displayPending)throw n(i,`displayPendingPromise`);if(i._forcePending)throw n(i,`minPendingPromise`);if(i.status===`pending`){let e=o.options.pendingMinMs??t.options.defaultPendingMinMs;if(e){let n=t.getMatch(i.id);if(n&&!n._nonReactive.minPendingPromise){let t=_();n._nonReactive.minPendingPromise=t,setTimeout(()=>{t.resolve(),n._nonReactive.minPendingPromise=void 0},e)}}throw n(i,`loadPromise`)}if(i.status===`notFound`)return ue(i.error)||x(),Wo(t,o,i.error);if(i.status===`redirected`)throw he(i.error)||x(),n(i,`loadPromise`);if(i.status===`error`)throw i.error;return c}),Yo=U.memo(function(){let e=M(),t=U.useContext(de),n,r=!1,i;{let a=t?e.stores.matchStores.get(t):void 0;[n,r]=F(a,e=>[e?.routeId,e?.globalNotFound??!1]),i=F(e.stores.matchesId,e=>e[e.findIndex(e=>e===t)+1])}let a=n?e.routesById[n]:void 0,o=e.options.defaultPendingComponent?(0,W.jsx)(e.options.defaultPendingComponent,{}):null;if(r)return a||x(),Wo(e,a,void 0);if(!i)return null;let s=(0,W.jsx)(Go,{matchId:i});return n===`__root__`?(0,W.jsx)(U.Suspense,{fallback:o,children:s}):s});function Xo(){let e=M(),t=U.useRef({router:e,mounted:!1}),[n,r]=U.useState(!1),i=F(e.stores.isLoading,e=>e),a=F(e.stores.hasPending,e=>e),o=f(i),s=i||n||a,c=f(s),l=i||a,u=f(l);return e.startTransition=e=>{r(!0),U.startTransition(()=>{e(),r(!1)})},U.useEffect(()=>{let t=e.history.subscribe(e.load),n=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return w(e.latestLocation.publicHref)!==w(n.publicHref)&&e.commitLocation({...n,replace:!0}),()=>{t()}},[e,e.history]),C(()=>{typeof window<`u`&&e.ssr||t.current.router===e&&t.current.mounted||(t.current={router:e,mounted:!0},(async()=>{try{await e.load()}catch(e){console.error(e)}})())},[e]),C(()=>{o&&!i&&e.emit({type:`onLoad`,...Ea(e.stores.location.get(),e.stores.resolvedLocation.get())})},[o,e,i]),C(()=>{u&&!l&&e.emit({type:`onBeforeRouteMount`,...Ea(e.stores.location.get(),e.stores.resolvedLocation.get())})},[l,u,e]),C(()=>{if(c&&!s){let t=Ea(e.stores.location.get(),e.stores.resolvedLocation.get());e.emit({type:`onResolved`,...t}),So(()=>{e.stores.status.set(`idle`),e.stores.resolvedLocation.set(e.stores.location.get())})}},[s,c,e]),null}function Zo(){let e=M(),t=e.routesById.__root__.options.pendingComponent??e.options.defaultPendingComponent,n=t?(0,W.jsx)(t,{}):null,r=(0,W.jsxs)(typeof document<`u`&&e.ssr?Uo:U.Suspense,{fallback:n,children:[(0,W.jsx)(Xo,{}),(0,W.jsx)(Qo,{})]});return e.options.InnerWrap?(0,W.jsx)(e.options.InnerWrap,{children:r}):r}function Qo(){let e=M(),t=F(e.stores.firstId,e=>e),n=F(e.stores.loadedAt,e=>e),r=t?(0,W.jsx)(Go,{matchId:t}):null;return(0,W.jsx)(de.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?r:(0,W.jsx)(oo,{getResetKey:()=>n,errorComponent:so,onCatch:void 0,children:r})})}var $o=e=>({createMutableStore:To,createReadonlyStore:To,batch:So}),es=e=>new ts(e),ts=class extends Oa{constructor(e){super(e,$o)}};function ns({router:e,children:t,...n}){v(n)&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});let r=(0,W.jsx)(T.Provider,{value:e,children:t});return e.options.Wrap?(0,W.jsx)(e.options.Wrap,{children:r}):r}function rs({router:e,...t}){return(0,W.jsx)(ns,{router:e,...t,children:(0,W.jsx)(Zo,{})})}function is(e){let t=M(),n=(0,U.useRef)(void 0);return F(t.stores.location,r=>{let i=e?.select?e.select(r):r;if(e?.structuralSharing??t.options.defaultStructuralSharing){let e=s(n.current,i);return n.current=e,e}return i})}function as(e,t){if(t)for(let[n,r]of Object.entries(t))n!==`suppressHydrationWarning`&&r!==void 0&&r!==!1&&e.setAttribute(n,typeof r==`boolean`?``:String(r))}function os(e){let{attrs:t,children:n,nonce:r,preventScriptHoist:i}=e;switch(e.tag){case`title`:return(0,W.jsx)(`title`,{...t,suppressHydrationWarning:!0,children:n});case`meta`:return(0,W.jsx)(`meta`,{...t,suppressHydrationWarning:!0});case`link`:return(0,W.jsx)(`link`,{...t,precedence:t?.precedence??(t?.rel===`stylesheet`?`default`:void 0),nonce:r,suppressHydrationWarning:!0});case`style`:return e.inlineCss,(0,W.jsx)(`style`,{...t,dangerouslySetInnerHTML:{__html:n},nonce:r});case`script`:return(0,W.jsx)(ss,{attrs:t,preventScriptHoist:i,children:n});default:return null}}function ss({attrs:e,children:t,preventScriptHoist:n}){M();let r=ae(),i=typeof e?.type==`string`&&e.type!==``&&e.type!==`text/javascript`&&e.type!==`module`;if(U.useEffect(()=>{if(!i){if(e?.src){let t=(()=>{try{let t=document.baseURI||window.location.href;return new URL(e.src,t).href}catch{return e.src}})();for(let e of document.querySelectorAll(`script[src]`))if(e.src===t)return;let n=document.createElement(`script`);return as(n,e),document.head.appendChild(n),()=>n.remove()}if(typeof t==`string`){let n=typeof e?.type==`string`?e.type:`text/javascript`,r=typeof e?.nonce==`string`?e.nonce:void 0;for(let e of document.querySelectorAll(`script:not([src])`)){if(!(e instanceof HTMLScriptElement))continue;let i=e.getAttribute(`type`)??`text/javascript`,a=e.getAttribute(`nonce`)??void 0;if(e.textContent===t&&i===n&&a===r)return}let i=document.createElement(`script`);return i.textContent=t,as(i,e),document.head.appendChild(i),()=>i.remove()}}},[e,t,i]),i&&typeof t==`string`)return(0,W.jsx)(`script`,{...e,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:t}});if(!r){if(e?.src)return(0,W.jsx)(`script`,{...e,suppressHydrationWarning:!0});if(typeof t==`string`)return(0,W.jsx)(`script`,{...e,dangerouslySetInnerHTML:{__html:t},suppressHydrationWarning:!0})}return null}var cs=e=>{let t=M(),n=t.options.ssr?.nonce,r=F(t.stores.matches,e=>e.map(e=>e.meta).filter(e=>e!==void 0),o),i=U.useMemo(()=>{let e=[],t={},i;for(let a=r.length-1;a>=0;a--){let o=r[a];for(let r=o.length-1;r>=0;r--){let a=o[r];if(a)if(a.title)i||={tag:`title`,children:a.title};else if(`script:ld+json`in a)try{let t=JSON.stringify(a[`script:ld+json`]);e.push({tag:`script`,attrs:{type:`application/ld+json`},children:h(t)})}catch{}else{let r=a.name??a.property;if(r){if(t[r])continue;t[r]=!0}e.push({tag:`meta`,attrs:{...a,nonce:n}})}}}return i&&e.push(i),n&&e.push({tag:`meta`,attrs:{property:`csp-nonce`,content:n}}),e.reverse(),e},[r,n]),a=F(t.stores.matches,e=>e.flatMap(e=>e.links??[]).filter(e=>e!==void 0).map(e=>({tag:`link`,attrs:{...e,nonce:n}})),o),s=F(t.stores.matches,r=>{let i=t.ssr?.manifest,a=[];return i?(r.forEach(t=>{i.routes[t.routeId]?.css?.forEach(t=>{let r=ro(t);a.push({tag:`link`,attrs:{rel:`stylesheet`,...r,crossOrigin:Qa(e,`stylesheet`)??r.crossOrigin,suppressHydrationWarning:!0,nonce:n}})})}),i.inlineStyle&&a.push({tag:`style`,attrs:{...i.inlineStyle.attrs,nonce:n},children:i.inlineStyle.children,inlineCss:!0}),a):a},o),c=F(t.stores.matches,r=>{let i=[],a=t.ssr?.manifest;return a&&r.forEach(t=>{a.routes[t.routeId]?.preloads?.forEach(t=>{i.push({tag:`link`,attrs:{...eo(a,t,e),nonce:n}})})}),i},o),l=F(t.stores.matches,e=>e.flatMap(e=>e.styles??[]).filter(e=>e!==void 0).map(({children:e,...t})=>({tag:`style`,attrs:{...t,nonce:n},children:e})),o),u=F(t.stores.matches,e=>e.flatMap(e=>e.headScripts??[]).filter(e=>e!==void 0).map(({children:e,...t})=>({tag:`script`,attrs:{...t,nonce:n},children:e})),o),d=[];return no(d,i),d.push(...c),no(d,a),d.push(...s),no(d,l),no(d,u),d};function ls(e){let t=cs(e.assetCrossOrigin),n=M().options.ssr?.nonce;return(0,W.jsx)(W.Fragment,{children:t.map(e=>(0,U.createElement)(os,{...e,key:`tsr-meta-${JSON.stringify(e)}`,nonce:n}))})}var us=e((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0>>1,a=e[r];if(0>>1;ri(c,n))li(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(li(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&j(x,t.startTime-e)}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-Tt&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&j(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,j(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),ds=e(((e,t)=>{t.exports=us()})),fs=e((e=>{var t=ds(),n=r(),i=Dt();function a(e){var t=`https://react.dev/errors/`+e;if(1re||(e.current=ne[re],ne[re]=null,re--)}function F(e,t){re++,ne[re]=e.current,e.current=t}var oe=ie(null),se=ie(null),I=ie(null),ce=ie(null);function le(e,t){switch(F(I,t),F(se,e),F(oe,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Ud(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Ud(t),e=Wd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}ae(oe),F(oe,e)}function ue(){ae(oe),ae(se),ae(I)}function de(e){e.memoizedState!==null&&F(ce,e);var t=oe.current,n=Wd(t,e.type);t!==n&&(F(se,e),F(oe,n))}function fe(e){se.current===e&&(ae(oe),ae(se)),ce.current===e&&(ae(ce),ep._currentValue=te)}var pe,me;function he(e){if(pe===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);pe=t&&t[1]||``,me=-1)`:-1`)&&(u=u.replace(``,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{ge=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?he(n):``}function ve(e,t){switch(e.tag){case 26:case 27:case 5:return he(e.type);case 16:return he(`Lazy`);case 13:return e.child!==t&&t!==null?he(`Suspense Fallback`):he(`Suspense`);case 19:return he(`SuspenseList`);case 0:case 15:return _e(e.type,!1);case 11:return _e(e.type.render,!1);case 1:return _e(e.type,!0);case 31:return he(`Activity`);default:return``}}function ye(e){try{var t=``,n=null;do t+=ve(e,n),n=e,e=e.return;while(e);return t}catch(e){return` Error generating stack: `+e.message+` `+e.stack}}var be=Object.prototype.hasOwnProperty,xe=t.unstable_scheduleCallback,Se=t.unstable_cancelCallback,Ce=t.unstable_shouldYield,we=t.unstable_requestPaint,Te=t.unstable_now,Ee=t.unstable_getCurrentPriorityLevel,De=t.unstable_ImmediatePriority,Oe=t.unstable_UserBlockingPriority,ke=t.unstable_NormalPriority,Ae=t.unstable_LowPriority,je=t.unstable_IdlePriority,Me=t.log,Ne=t.unstable_setDisableYieldValue,Pe=null,Fe=null;function Ie(e){if(typeof Me==`function`&&Ne(e),Fe&&typeof Fe.setStrictMode==`function`)try{Fe.setStrictMode(Pe,e)}catch{}}var Le=Math.clz32?Math.clz32:Be,Re=Math.log,ze=Math.LN2;function Be(e){return e>>>=0,e===0?32:31-(Re(e)/ze|0)|0}var Ve=256,He=262144,Ue=4194304;function We(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Ge(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=We(n))):i=We(o):i=We(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=We(n))):i=We(o)):i=We(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function Ke(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function qe(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Je(){var e=Ue;return Ue<<=1,!(Ue&62914560)&&(Ue=4194304),e}function Ye(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Xe(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Ze(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0`u`||window.document===void 0||window.document.createElement===void 0),dn=!1;if(un)try{var fn={};Object.defineProperty(fn,"passive",{get:function(){dn=!0}}),window.addEventListener(`test`,fn,fn),window.removeEventListener(`test`,fn,fn)}catch{dn=!1}var pn=null,mn=null,hn=null;function L(){if(hn)return hn;var e,t=mn,n=t.length,r,i=`value`in pn?pn.value:pn.textContent,a=i.length;for(e=0;e=Gn),Jn=` `,Yn=!1;function Xn(e,t){switch(e){case`keyup`:return Un.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function Zn(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var Qn=!1;function $n(e,t){switch(e){case`compositionend`:return Zn(t);case`keypress`:return t.which===32?(Yn=!0,Jn):null;case`textInput`:return e=t.data,e===Jn&&Yn?null:e;default:return null}}function er(e,t){if(Qn)return e===`compositionend`||!Wn&&Xn(e,t)?(e=L(),hn=mn=pn=null,Qn=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=br(n)}}function Sr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Sr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Cr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Lt(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Lt(e.document)}return t}function wr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var Tr=un&&`documentMode`in document&&11>=document.documentMode,H=null,Er=null,Dr=null,Or=!1;function kr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Or||H==null||H!==Lt(r)||(r=H,`selectionStart`in r&&wr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Dr&&yr(Dr,r)||(Dr=r,r=Dd(Er,`onSelect`),0>=o,i-=o,xi=1<<32-Le(t)+i|n<h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),Ai&&Ci(i,h),l;if(d===null){for(;hg?(_=h,h=null):_=h.sibling;var y=p(i,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(i,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(i,h),Ai&&Ci(i,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(i,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return Ai&&Ci(i,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,i,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(i,e)}),Ai&&Ci(i,g),u}function b(e,r,o,c){if(typeof o==`object`&&o&&o.type===_&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case h:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===_){if(r.tag===7){n(e,r.sibling),c=i(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===E&&Sa(l)===r.type){n(e,r.sibling),c=i(r,o.props),ka(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===_?(c=ci(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=si(o.type,o.key,o.props,null,e.mode,c),ka(c,o),c.return=e,e=c)}return s(e);case g:a:{for(l=o.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=i(r,o.children||[]),c.return=e,e=c;break a}else{n(e,r);break}else t(e,r);r=r.sibling}c=di(o,e.mode,c),c.return=e,e=c}return s(e);case E:return o=Sa(o),b(e,r,o,c)}if(ee(o))return v(e,r,o,c);if(A(o)){if(l=A(o),typeof l!=`function`)throw Error(a(150));return o=l.call(o),y(e,r,o,c)}if(typeof o.then==`function`)return b(e,r,Oa(o),c);if(o.$$typeof===x)return b(e,r,Xi(e,o),c);Aa(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=i(r,o),c.return=e,e=c):(n(e,r),c=li(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Da=0;var i=b(e,t,n,r);return Ea=null,i}catch(t){if(t===ga||t===va)throw t;var a=ri(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Ma=ja(!0),Na=ja(!1),Pa=!1;function Fa(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ia(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function La(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ra(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Il&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=ei(e),$r(e,null,n),t}return Xr(e,r,t,n),ei(e)}function za(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,$e(e,n)}}function Ba(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Va=!1;function Ha(){if(Va){var e=sa;if(e!==null)throw e}}function Ua(e,t,n,r){Va=!1;var i=e.updateQueue;Pa=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,m=f!==s.lane;if(m?(Y&f)===f:(r&f)===f){f!==0&&f===oa&&(Va=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;f=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,f);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,f=typeof h==`function`?h.call(_,d,f):h,f==null)break a;d=p({},d,f);break a;case 2:Pa=!0}}f=s.callback,f!==null&&(e.flags|=64,m&&(e.flags|=8192),m=i.callbacks,m===null?i.callbacks=[f]:m.push(f))}else m={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=m,c=d):u=u.next=m,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;m=s,s=m.next,m.next=null,i.lastBaseUpdate=m,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),Kl|=o,e.lanes=o,e.memoizedState=d}}function Wa(e,t){if(typeof e!=`function`)throw Error(a(191,e));e.call(t)}function Ga(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;ea?a:8;var o=N.T,s={};N.T=s,ks(e,!1,t,n);try{var c=i(),l=N.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Os(e,t,ua(c,r),mu(e)):Os(e,t,r,mu(e))}catch(n){Os(e,t,{then:function(){},status:`rejected`,reason:n},mu())}finally{P.p=a,o!==null&&s.types!==null&&(o.types=s.types),N.T=o}}function vs(){}function ys(e,t,n,r){if(e.tag!==5)throw Error(a(476));var i=bs(e).queue;_s(e,i,t,te,n===null?vs:function(){return xs(e),n(r)})}function bs(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:te,baseState:te,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:jo,lastRenderedState:te},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:jo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function xs(e){var t=bs(e);t.next===null&&(t=e.alternate.memoizedState),Os(e,t.next.queue,{},mu())}function Ss(){return Yi(ep)}function Cs(){return Eo().memoizedState}function ws(){return Eo().memoizedState}function Ts(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=mu();e=La(n);var r=Ra(t,e,n);r!==null&&(gu(r,t,n),za(r,t,n)),t={cache:na()},e.payload=t;return}t=t.return}}function Es(e,t,n){var r=mu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},As(e)?js(t,n):(n=Zr(e,t,n,r),n!==null&&(gu(n,e,r),Ms(n,t,r)))}function Ds(e,t,n){Os(e,t,n,mu())}function Os(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(As(e))js(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,vr(s,o))return Xr(e,t,i,0),Ll===null&&Yr(),!1}catch{}if(n=Zr(e,t,i,r),n!==null)return gu(n,e,r),Ms(n,t,r),!0}return!1}function ks(e,t,n,r){if(r={lane:2,revertLane:fd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},As(e)){if(t)throw Error(a(479))}else t=Zr(e,n,r,2),t!==null&&gu(t,e,2)}function As(e){var t=e.alternate;return e===G||t!==null&&t===G}function js(e,t){lo=co=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ms(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,$e(e,n)}}var Ns={readContext:Yi,use:ko,useCallback:go,useContext:go,useEffect:go,useImperativeHandle:go,useLayoutEffect:go,useInsertionEffect:go,useMemo:go,useReducer:go,useRef:go,useState:go,useDebugValue:go,useDeferredValue:go,useTransition:go,useSyncExternalStore:go,useId:go,useHostTransitionStatus:go,useFormState:go,useActionState:go,useOptimistic:go,useMemoCache:go,useCacheRefresh:go};Ns.useEffectEvent=go;var Ps={readContext:Yi,use:ko,useCallback:function(e,t){return To().memoizedState=[e,t===void 0?null:t],e},useContext:Yi,useEffect:rs,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),ts(4194308,4,ls.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ts(4194308,4,e,t)},useInsertionEffect:function(e,t){ts(4,2,e,t)},useMemo:function(e,t){var n=To();t=t===void 0?null:t;var r=e();if(uo){Ie(!0);try{e()}finally{Ie(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=To();if(n!==void 0){var i=n(t);if(uo){Ie(!0);try{n(t)}finally{Ie(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=Es.bind(null,G,e),[r.memoizedState,e]},useRef:function(e){var t=To();return e={current:e},t.memoizedState=e},useState:function(e){e=Bo(e);var t=e.queue,n=Ds.bind(null,G,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:fs,useDeferredValue:function(e,t){return hs(To(),e,t)},useTransition:function(){var e=Bo(!1);return e=_s.bind(null,G,e.queue,!0,!1),To().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=G,i=To();if(Ai){if(n===void 0)throw Error(a(407));n=n()}else{if(n=t(),Ll===null)throw Error(a(349));Y&127||Io(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,rs(Ro.bind(null,r,o,e),[e]),r.flags|=2048,$o(9,{destroy:void 0},Lo.bind(null,r,o,n,t),null),n},useId:function(){var e=To(),t=Ll.identifierPrefix;if(Ai){var n=Si,r=xi;n=(r&~(1<<32-Le(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=fo++,0<\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(i,{is:r.is}):s.createElement(i)}}o[ot]=t,o[st]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Id(o,i,r),i){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Oc(t)}}return Nc(t),kc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Oc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(a(166));if(e=I.current,Fi(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,i=Oi,i!==null)switch(i.tag){case 27:case 5:r=i.memoizedProps}e[ot]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Nd(e.nodeValue,n)),e||Mi(t,!0)}else e=Hd(e).createTextNode(r),e[ot]=t,t.stateNode=e}return Nc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Fi(t),n!==null){if(e===null){if(!r)throw Error(a(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(a(557));e[ot]=t}else Ii(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Nc(t),e=!1}else n=Li(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(ro(t),t):(ro(t),null);if(t.flags&128)throw Error(a(558))}return Nc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=Fi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(a(318));if(i=t.memoizedState,i=i===null?null:i.dehydrated,!i)throw Error(a(317));i[ot]=t}else Ii(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Nc(t),i=!1}else i=Li(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(ro(t),t):(ro(t),null)}return ro(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,i=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(i=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==i&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),jc(t,t.updateQueue),Nc(t),null);case 4:return ue(),e===null&&Cd(t.stateNode.containerInfo),Nc(t),null;case 10:return Ui(t.type),Nc(t),null;case 19:if(ae(io),r=t.memoizedState,r===null)return Nc(t),null;if(i=(t.flags&128)!=0,o=r.rendering,o===null)if(i)Mc(r,!1);else{if(Gl!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=ao(e),o!==null){for(t.flags|=128,Mc(r,!1),e=o.updateQueue,t.updateQueue=e,jc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)oi(n,e),n=n.sibling;return F(io,io.current&1|2),Ai&&Ci(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Te()>nu&&(t.flags|=128,i=!0,Mc(r,!1),t.lanes=4194304)}else{if(!i)if(e=ao(o),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,jc(t,e),Mc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!Ai)return Nc(t),null}else 2*Te()-r.renderingStartTime>nu&&n!==536870912&&(t.flags|=128,i=!0,Mc(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(Nc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Te(),e.sibling=null,n=io.current,F(io,i?n&1|2:n&1),Ai&&Ci(t,r.treeForkCount),e);case 22:case 23:return ro(t),Xa(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Nc(t),t.subtreeFlags&6&&(t.flags|=8192)):Nc(t),n=t.updateQueue,n!==null&&jc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&ae(fa),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Ui(ta),Nc(t),null;case 25:return null;case 30:return null}throw Error(a(156,t.tag))}function Fc(e,t){switch(Ei(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ui(ta),ue(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return fe(t),null;case 31:if(t.memoizedState!==null){if(ro(t),t.alternate===null)throw Error(a(340));Ii()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(ro(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(a(340));Ii()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ae(io),null;case 4:return ue(),null;case 10:return Ui(t.type),null;case 22:case 23:return ro(t),Xa(),e!==null&&ae(fa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Ui(ta),null;case 25:return null;default:return null}}function Ic(e,t){switch(Ei(t),t.tag){case 3:Ui(ta),ue();break;case 26:case 27:case 5:fe(t);break;case 4:ue();break;case 31:t.memoizedState!==null&&ro(t);break;case 13:ro(t);break;case 19:ae(io);break;case 10:Ui(t.type);break;case 22:case 23:ro(t),Xa(),e!==null&&ae(fa);break;case 24:Ui(ta)}}function Lc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Ku(t,t.return,e)}}function Rc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Ku(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Ku(t,t.return,e)}}function zc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Ga(t,n)}catch(t){Ku(e,e.return,t)}}}function Bc(e,t,n){n.props=Vs(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Ku(e,t,n)}}function Vc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Ku(e,t,n)}}function Hc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){Ku(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Ku(e,t,n)}else n.current=null}function Uc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){Ku(e,e.return,t)}}function Wc(e,t,n){try{var r=e.stateNode;Ld(r,e.type,n,t),r[st]=t}catch(t){Ku(e,e.return,t)}}function Gc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&$d(e.type)||e.tag===4}function Kc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Gc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&$d(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function qc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=en));else if(r!==4&&(r===27&&$d(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(qc(e,t,n),e=e.sibling;e!==null;)qc(e,t,n),e=e.sibling}function Jc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&$d(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Jc(e,t,n),e=e.sibling;e!==null;)Jc(e,t,n),e=e.sibling}function Yc(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Id(t,r,n),t[ot]=e,t[st]=n}catch(t){Ku(e,e.return,t)}}var Xc=!1,Zc=!1,Qc=!1,$c=typeof WeakSet==`function`?WeakSet:Set,el=null;function tl(e,t){if(e=e.containerInfo,Bd=cp,e=Cr(e),wr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||i!==0&&f.nodeType!==3||(c=s+i),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===i&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(Vd={focusedElem:e,selectionRange:n},cp=!1,el=t;el!==null;)if(t=el,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,el=e;else for(;el!==null;){switch(t=el,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n title`))),Id(o,r,n),o[ot]=e,yt(o),r=o;break a;case`link`:var s=Uf(`link`,`href`,i).get(r+(n.href||``));if(s){for(var c=0;cg&&(o=g,g=h,h=o);var _=xr(s,h),v=xr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;sn?32:n,N.T=null,n=uu,uu=null;var o=ou,s=cu;if(au=0,su=ou=null,cu=0,Il&6)throw Error(a(331));var c=Il;if(Il|=4,jl(o.current),Cl(o,o.current,s,n),Il=c,ad(0,!1),Fe&&typeof Fe.onPostCommitFiberRoot==`function`)try{Fe.onPostCommitFiberRoot(Pe,o)}catch{}return!0}finally{P.p=i,N.T=r,Hu(e,t)}}function Gu(e,t,n){t=pi(n,t),t=qs(e.stateNode,t,2),e=Ra(e,t,2),e!==null&&(Xe(e,2),id(e))}function Ku(e,t,n){if(e.tag===3)Gu(e,e,n);else for(;t!==null;){if(t.tag===3){Gu(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(iu===null||!iu.has(r))){e=pi(n,e),n=Js(2),r=Ra(t,n,2),r!==null&&(Ys(n,r,t,e),Xe(r,2),id(r));break}}t=t.return}}function qu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Fl;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Ul=!0,i.add(n),e=Ju.bind(null,e,t,n),t.then(e,e))}function Ju(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Ll===e&&(Y&n)===n&&(Gl===4||Gl===3&&(Y&62914560)===Y&&300>Te()-eu?!(Il&2)&&Cu(e,0):Jl|=n,Xl===Y&&(Xl=0)),id(e)}function Yu(e,t){t===0&&(t=Je()),e=Qr(e,t),e!==null&&(Xe(e,t),id(e))}function Xu(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Yu(e,n)}function Zu(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(a(314))}r!==null&&r.delete(t),Yu(e,n)}function Qu(e,t){return xe(e,t)}var $u=null,X=null,ed=!1,td=!1,nd=!1,rd=0;function id(e){e!==X&&e.next===null&&(X===null?$u=X=e:X=X.next=e),td=!0,ed||(ed=!0,dd())}function ad(e,t){if(!nd&&td){nd=!0;do for(var n=!1,r=$u;r!==null;){if(!t)if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Le(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,ud(r,a))}else a=Y,a=Ge(r,r===Ll?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||Ke(r,a)||(n=!0,ud(r,a));r=r.next}while(n);nd=!1}}function od(){sd()}function sd(){td=ed=!1;var e=0;rd!==0&&qd()&&(e=rd);for(var t=Te(),n=null,r=$u;r!==null;){var i=r.next,a=cd(r,t);a===0?(r.next=null,n===null?$u=i:n.next=i,i===null&&(X=n)):(n=r,(e!==0||a&3)&&(td=!0)),r=i}au!==0&&au!==5||ad(e,!1),rd!==0&&(rd=0)}function cd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0s)break;var u=c.transferSize,d=c.initiatorType;u&&Rd(d)&&(c=c.responseEnd,o+=u*(c`u`?null:document;function Cf(e,t,n){var r=Sf;if(r&&typeof t==`string`&&t){var i=zt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),_f.has(i)||(_f.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Id(t,`link`,e),yt(t),r.head.appendChild(t)))}}function wf(e){yf.D(e),Cf(`dns-prefetch`,e,null)}function Tf(e,t){yf.C(e,t),Cf(`preconnect`,e,t)}function Ef(e,t,n){yf.L(e,t,n);var r=Sf;if(r&&e&&t){var i=`link[rel="preload"][as="`+zt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+zt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+zt(n.imageSizes)+`"]`)):i+=`[href="`+zt(e)+`"]`;var a=i;switch(t){case`style`:a=Mf(e);break;case`script`:a=If(e)}gf.has(a)||(e=p({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),gf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Nf(a))||t===`script`&&r.querySelector(Lf(a))||(t=r.createElement(`link`),Id(t,`link`,e),yt(t),r.head.appendChild(t)))}}function Df(e,t){yf.m(e,t);var n=Sf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+zt(r)+`"][href="`+zt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=If(e)}if(!gf.has(a)&&(e=p({rel:`modulepreload`,href:e},t),gf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Lf(a)))return}r=n.createElement(`link`),Id(r,`link`,e),yt(r),n.head.appendChild(r)}}}function Of(e,t,n){yf.S(e,t,n);var r=Sf;if(r&&e){var i=vt(r).hoistableStyles,a=Mf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Nf(a)))s.loading=5;else{e=p({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=gf.get(a))&&Bf(e,n);var c=o=r.createElement(`link`);yt(c),Id(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,zf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function kf(e,t){yf.X(e,t);var n=Sf;if(n&&e){var r=vt(n).hoistableScripts,i=If(e),a=r.get(i);a||(a=n.querySelector(Lf(i)),a||(e=p({src:e,async:!0},t),(t=gf.get(i))&&Vf(e,t),a=n.createElement(`script`),yt(a),Id(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Af(e,t){yf.M(e,t);var n=Sf;if(n&&e){var r=vt(n).hoistableScripts,i=If(e),a=r.get(i);a||(a=n.querySelector(Lf(i)),a||(e=p({src:e,async:!0,type:`module`},t),(t=gf.get(i))&&Vf(e,t),a=n.createElement(`script`),yt(a),Id(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function jf(e,t,n,r){var i=(i=I.current)?vf(i):null;if(!i)throw Error(a(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Mf(n.href),n=vt(i).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Mf(n.href);var o=vt(i).hoistableStyles,s=o.get(e);if(s||(i=i.ownerDocument||i,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=i.querySelector(Nf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),gf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},gf.set(e,n),o||Ff(i,e,n,s.state))),t&&r===null)throw Error(a(528,``));return s}if(t&&r!==null)throw Error(a(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=If(n),n=vt(i).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(a(444,e))}}function Mf(e){return`href="`+zt(e)+`"`}function Nf(e){return`link[rel="stylesheet"][`+e+`]`}function Pf(e){return p({},e,{"data-precedence":e.precedence,precedence:null})}function Ff(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Id(t,`link`,n),yt(t),e.head.appendChild(t))}function If(e){return`[src="`+zt(e)+`"]`}function Lf(e){return`script[async]`+e}function Rf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+zt(n.href)+`"]`);if(r)return t.instance=r,yt(r),r;var i=p({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),yt(r),Id(r,`style`,i),zf(r,n.precedence,e),t.instance=r;case`stylesheet`:i=Mf(n.href);var o=e.querySelector(Nf(i));if(o)return t.state.loading|=4,t.instance=o,yt(o),o;r=Pf(n),(i=gf.get(i))&&Bf(r,i),o=(e.ownerDocument||e).createElement(`link`),yt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Id(o,`link`,r),t.state.loading|=4,zf(o,n.precedence,e),t.instance=o;case`script`:return o=If(n.src),(i=e.querySelector(Lf(o)))?(t.instance=i,yt(i),i):(r=n,(i=gf.get(o))&&(r=p({},n),Vf(r,i)),e=e.ownerDocument||e,i=e.createElement(`script`),yt(i),Id(i,`link`,r),e.head.appendChild(i),t.instance=i);case`void`:return null;default:throw Error(a(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,zf(r,n.precedence,e));return t.instance}function zf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o title`):null)}function Gf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Kf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function qf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Mf(r.href),a=t.querySelector(Nf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Xf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,yt(a);return}a=t.ownerDocument||t,r=Pf(r),(i=gf.get(i))&&Bf(r,i),a=a.createElement(`link`),yt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Id(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Xf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Jf=0;function Yf(e,t){return e.stylesheets&&e.count===0&&Qf(e,e.stylesheets),0Jf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Xf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Qf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Zf=null;function Qf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Zf=new Map,t.forEach($f,e),Zf=null,Xf.call(e))}function $f(e,t){if(!(t.state.loading&4)){var n=Zf.get(e);if(n)var r=n.get(null);else{n=new Map,Zf.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=fs()}))(),1),ms=i(),hs=(0,U.createContext)(void 0);function gs(e,t){try{let t=localStorage.getItem(e);if(t===`light`||t===`dark`||t===`system`)return t}catch{}return t}function _s(e){let t=(0,ms.c)(14),{children:n,defaultTheme:r,storageKey:i}=e,a=r===void 0?`dark`:r,o=i===void 0?`ui-theme`:i,s;t[0]!==a||t[1]!==o?(s=()=>gs(o,a),t[0]=a,t[1]=o,t[2]=s):s=t[2];let[c,l]=(0,U.useState)(s),u,d;t[3]===c?(u=t[4],d=t[5]):(u=()=>{let e=window.document.documentElement;if(e.classList.remove(`light`,`dark`),c===`system`){let t=window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`;e.classList.add(t);return}e.classList.add(c)},d=[c],t[3]=c,t[4]=u,t[5]=d),(0,U.useEffect)(u,d);let f;t[6]===o?f=t[7]:(f=e=>{try{localStorage.setItem(o,e)}catch{}l(e)},t[6]=o,t[7]=f);let p;t[8]!==f||t[9]!==c?(p={theme:c,setTheme:f},t[8]=f,t[9]=c,t[10]=p):p=t[10];let m=p,h;return t[11]!==n||t[12]!==m?(h=(0,W.jsx)(hs.Provider,{value:m,children:n}),t[11]=n,t[12]=m,t[13]=h):h=t[13],h}function vs(){let e=(0,U.useContext)(hs);if(e===void 0)throw Error(`useTheme must be used within a ThemeProvider`);return e}function ys(e){return Ft(e.defaultTagName??`div`,e,e)}var bs=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),xs=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),Ss=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),Cs=e=>{let t=Ss(e);return t.charAt(0).toUpperCase()+t.slice(1)},ws={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},Ts=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},Es=(0,U.createContext)({}),Ds=()=>(0,U.useContext)(Es),Os=(0,U.forwardRef)(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>{let{size:l=24,strokeWidth:u=2,absoluteStrokeWidth:d=!1,color:f=`currentColor`,className:p=``}=Ds()??{},m=r??d?Number(n??u)*24/Number(t??l):n??u;return(0,U.createElement)(`svg`,{ref:c,...ws,width:t??l??ws.width,height:t??l??ws.height,stroke:e??f,strokeWidth:m,className:bs(`lucide`,p,i),...!a&&!Ts(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>(0,U.createElement)(e,t)),...Array.isArray(a)?a:[a]])}),ks=(e,t)=>{let n=(0,U.forwardRef)(({className:n,...r},i)=>(0,U.createElement)(Os,{ref:i,iconNode:t,className:bs(`lucide-${xs(Cs(e))}`,`lucide-${e}`,n),...r}));return n.displayName=Cs(e),n},As=ks(`activity`,[[`path`,{d:`M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2`,key:`169zse`}]]),js=ks(`book-open`,[[`path`,{d:`M12 7v14`,key:`1akyts`}],[`path`,{d:`M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z`,key:`ruj8y`}]]),Ms=ks(`boxes`,[[`path`,{d:`M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z`,key:`lc1i9w`}],[`path`,{d:`m7 16.5-4.74-2.85`,key:`1o9zyk`}],[`path`,{d:`m7 16.5 5-3`,key:`va8pkn`}],[`path`,{d:`M7 16.5v5.17`,key:`jnp8gn`}],[`path`,{d:`M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z`,key:`8zsnat`}],[`path`,{d:`m17 16.5-5-3`,key:`8arw3v`}],[`path`,{d:`m17 16.5 4.74-2.85`,key:`8rfmw`}],[`path`,{d:`M17 16.5v5.17`,key:`k6z78m`}],[`path`,{d:`M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z`,key:`1xygjf`}],[`path`,{d:`M12 8 7.26 5.15`,key:`1vbdud`}],[`path`,{d:`m12 8 4.74-2.85`,key:`3rx089`}],[`path`,{d:`M12 13.5V8`,key:`1io7kd`}]]),Ns=ks(`camera`,[[`path`,{d:`M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z`,key:`18u6gg`}],[`circle`,{cx:`12`,cy:`13`,r:`3`,key:`1vg3eu`}]]),Ps=ks(`circle-alert`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]]),Fs=ks(`crosshair`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`22`,x2:`18`,y1:`12`,y2:`12`,key:`l9bcsi`}],[`line`,{x1:`6`,x2:`2`,y1:`12`,y2:`12`,key:`13hhkx`}],[`line`,{x1:`12`,x2:`12`,y1:`6`,y2:`2`,key:`10w3f3`}],[`line`,{x1:`12`,x2:`12`,y1:`22`,y2:`18`,key:`15g9kq`}]]),Is=ks(`globe`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`,key:`13o1zl`}],[`path`,{d:`M2 12h20`,key:`9i4pu4`}]]),Ls=ks(`hard-drive`,[[`path`,{d:`M10 16h.01`,key:`1bzywj`}],[`path`,{d:`M2.212 11.577a2 2 0 0 0-.212.896V18a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-5.527a2 2 0 0 0-.212-.896L18.55 5.11A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z`,key:`18tbho`}],[`path`,{d:`M21.946 12.013H2.054`,key:`zqlbp7`}],[`path`,{d:`M6 16h.01`,key:`1pmjb7`}]]),Rs=ks(`house`,[[`path`,{d:`M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8`,key:`5wwlr5`}],[`path`,{d:`M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z`,key:`r6nss1`}]]),zs=ks(`id-card`,[[`path`,{d:`M16 10h2`,key:`8sgtl7`}],[`path`,{d:`M16 14h2`,key:`epxaof`}],[`path`,{d:`M6.17 15a3 3 0 0 1 5.66 0`,key:`n6f512`}],[`circle`,{cx:`9`,cy:`11`,r:`2`,key:`yxgjnd`}],[`rect`,{x:`2`,y:`5`,width:`20`,height:`14`,rx:`2`,key:`qneu4z`}]]),Bs=ks(`image`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}],[`circle`,{cx:`9`,cy:`9`,r:`2`,key:`af1f0g`}],[`path`,{d:`m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21`,key:`1xmnt7`}]]),Vs=ks(`key`,[[`path`,{d:`m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4`,key:`g0fldk`}],[`path`,{d:`m21 2-9.6 9.6`,key:`1j0ho8`}],[`circle`,{cx:`7.5`,cy:`15.5`,r:`5.5`,key:`yqb3hr`}]]),Hs=ks(`layers`,[[`path`,{d:`M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z`,key:`zw3jo`}],[`path`,{d:`M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12`,key:`1wduqc`}],[`path`,{d:`M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17`,key:`kqbvx6`}]]),Us=ks(`layout-grid`,[[`rect`,{width:`7`,height:`7`,x:`3`,y:`3`,rx:`1`,key:`1g98yp`}],[`rect`,{width:`7`,height:`7`,x:`14`,y:`3`,rx:`1`,key:`6d4xhi`}],[`rect`,{width:`7`,height:`7`,x:`14`,y:`14`,rx:`1`,key:`nxv5o0`}],[`rect`,{width:`7`,height:`7`,x:`3`,y:`14`,rx:`1`,key:`1bb6yr`}]]),Ws=ks(`log-out`,[[`path`,{d:`m16 17 5-5-5-5`,key:`1bji2h`}],[`path`,{d:`M21 12H9`,key:`dn1m92`}],[`path`,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`,key:`1uf3rs`}]]),Gs=ks(`map-pin`,[[`path`,{d:`M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0`,key:`1r0f0z`}],[`circle`,{cx:`12`,cy:`10`,r:`3`,key:`ilqhr7`}]]),Ks=ks(`moon`,[[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`,key:`kfwtm`}]]),qs=ks(`network`,[[`rect`,{x:`16`,y:`16`,width:`6`,height:`6`,rx:`1`,key:`4q2zg0`}],[`rect`,{x:`2`,y:`16`,width:`6`,height:`6`,rx:`1`,key:`8cvhb9`}],[`rect`,{x:`9`,y:`2`,width:`6`,height:`6`,rx:`1`,key:`1egb70`}],[`path`,{d:`M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3`,key:`1jsf9p`}],[`path`,{d:`M12 12V8`,key:`2874zd`}]]),Js=ks(`panel-left`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}]]),Ys=ks(`router`,[[`rect`,{width:`20`,height:`8`,x:`2`,y:`14`,rx:`2`,key:`w68u3i`}],[`path`,{d:`M6.01 18H6`,key:`19vcac`}],[`path`,{d:`M10.01 18H10`,key:`uamcmx`}],[`path`,{d:`M15 10v4`,key:`qjz1xs`}],[`path`,{d:`M17.84 7.17a4 4 0 0 0-5.66 0`,key:`1rif40`}],[`path`,{d:`M20.66 4.34a8 8 0 0 0-11.31 0`,key:`6a5xfq`}]]),Xs=ks(`route`,[[`circle`,{cx:`6`,cy:`19`,r:`3`,key:`1kj8tv`}],[`path`,{d:`M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15`,key:`1d8sl`}],[`circle`,{cx:`18`,cy:`5`,r:`3`,key:`gq8acd`}]]),Zs=ks(`server`,[[`rect`,{width:`20`,height:`8`,x:`2`,y:`2`,rx:`2`,ry:`2`,key:`ngkwjq`}],[`rect`,{width:`20`,height:`8`,x:`2`,y:`14`,rx:`2`,ry:`2`,key:`iecqi9`}],[`line`,{x1:`6`,x2:`6.01`,y1:`6`,y2:`6`,key:`16zg32`}],[`line`,{x1:`6`,x2:`6.01`,y1:`18`,y2:`18`,key:`nzw8ys`}]]),Qs=ks(`shield-check`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),$s=ks(`shield`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}]]),ec=ks(`sun`,[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`m4.93 4.93 1.41 1.41`,key:`149t6j`}],[`path`,{d:`m17.66 17.66 1.41 1.41`,key:`ptbguv`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`m6.34 17.66-1.41 1.41`,key:`1m8zz5`}],[`path`,{d:`m19.07 4.93-1.41 1.41`,key:`1shlcs`}]]),tc=ks(`user-cog`,[[`path`,{d:`M10 15H6a4 4 0 0 0-4 4v2`,key:`1nfge6`}],[`path`,{d:`m14.305 16.53.923-.382`,key:`1itpsq`}],[`path`,{d:`m15.228 13.852-.923-.383`,key:`eplpkm`}],[`path`,{d:`m16.852 12.228-.383-.923`,key:`13v3q0`}],[`path`,{d:`m16.852 17.772-.383.924`,key:`1i8mnm`}],[`path`,{d:`m19.148 12.228.383-.923`,key:`1q8j1v`}],[`path`,{d:`m19.53 18.696-.382-.924`,key:`vk1qj3`}],[`path`,{d:`m20.772 13.852.924-.383`,key:`n880s0`}],[`path`,{d:`m20.772 16.148.924.383`,key:`1g6xey`}],[`circle`,{cx:`18`,cy:`15`,r:`3`,key:`gjjjvw`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}]]),nc=ks(`users`,[[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`path`,{d:`M16 3.128a4 4 0 0 1 0 7.744`,key:`16gr8j`}],[`path`,{d:`M22 21v-2a4 4 0 0 0-3-3.87`,key:`kshegd`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}]]),rc=ks(`waypoints`,[[`path`,{d:`m10.586 5.414-5.172 5.172`,key:`4mc350`}],[`path`,{d:`m18.586 13.414-5.172 5.172`,key:`8c96vv`}],[`path`,{d:`M6 12h12`,key:`8npq4p`}],[`circle`,{cx:`12`,cy:`20`,r:`2`,key:`144qzu`}],[`circle`,{cx:`12`,cy:`4`,r:`2`,key:`muu5ef`}],[`circle`,{cx:`20`,cy:`12`,r:`2`,key:`1xzzfp`}],[`circle`,{cx:`4`,cy:`12`,r:`2`,key:`1hvhnz`}]]),ic=ks(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),ac=function(e){return e.disabled=`data-disabled`,e.valid=`data-valid`,e.invalid=`data-invalid`,e.touched=`data-touched`,e.dirty=`data-dirty`,e.filled=`data-filled`,e.focused=`data-focused`,e}({}),oc={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},sc={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},cc={disabled:!1,...sc},lc={valid(e){return e===null?null:e?{[ac.valid]:``}:{[ac.invalid]:``}}},uc={invalid:void 0,name:void 0,validityData:{state:oc,errors:[],error:``,value:``,initialValue:null},setValidityData:It,disabled:void 0,touched:sc.touched,setTouched:It,dirty:sc.dirty,setDirty:It,filled:sc.filled,setFilled:It,focused:sc.focused,setFocused:It,validate:()=>null,validationMode:`onSubmit`,validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:cc,markedDirtyRef:{current:!1},registerFieldControl:It,validation:{getValidationProps:(e=jt)=>e,getInputValidationProps:(e=jt)=>e,inputRef:{current:null},commit:async()=>{}}},dc=U.createContext(uc);function fc(e=!0){let t=U.useContext(dc);if(t.setValidityData===It&&!e)throw Error(zt(28));return t}var pc=U.createContext({controlId:void 0,registerControlId:It,labelId:void 0,setLabelId:It,messageIds:[],setMessageIds:It,getDescriptionProps:e=>e});function mc(){return U.useContext(pc)}function hc(e={}){let{id:t,implicit:n=!1,controlRef:r}=e,{controlId:i,registerControlId:a}=mc(),o=dr(t),s=n?i:void 0,c=Pt(()=>Symbol(`labelable-control`)),l=U.useRef(!1),u=U.useRef(t!=null),d=ir(()=>{!l.current||a===It||(l.current=!1,a(c.current,void 0))});return B(()=>{if(a===It)return;let e;if(n){let n=r?.current;e=V(n)&&n.closest(`label`)!=null?t??null:s??o}else if(t!=null)u.current=!0,e=t;else if(u.current)e=o;else{d();return}if(e===void 0){d();return}l.current=!0,a(c.current,e)},[t,r,s,a,n,o,c,d]),U.useEffect(()=>d,[d]),i??o}var gc=typeof navigator<`u`,_c=Ec(),vc=Oc(),yc=Dc(),bc=typeof CSS>`u`||!CSS.supports?!1:CSS.supports(`-webkit-backdrop-filter:none`),xc=_c.platform===`MacIntel`&&_c.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(_c.platform);gc&&/firefox/i.test(yc);var Sc=gc&&/apple/i.test(navigator.vendor);gc&&/Edg/i.test(yc);var Cc=gc&&/android/i.test(vc)||/android/i.test(yc),wc=gc&&vc.toLowerCase().startsWith(`mac`)&&!navigator.maxTouchPoints,Tc=yc.includes(`jsdom/`);function Ec(){if(!gc)return{platform:``,maxTouchPoints:-1};let e=navigator.userAgentData;return e?.platform?{platform:e.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:navigator.platform??``,maxTouchPoints:navigator.maxTouchPoints??-1}}function Dc(){if(!gc)return``;let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:e,version:t})=>`${e}/${t}`).join(` `):navigator.userAgent}function Oc(){if(!gc)return``;let e=navigator.userAgentData;return e?.platform?e.platform:navigator.platform??``}var kc=`data-base-ui-focusable`,Ac=`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`,jc=`ArrowLeft`,Mc=`ArrowRight`,Nc=`ArrowUp`,Pc=`ArrowDown`;function Fc(e,t){if(!V(e))return!1;let n=e;if(t.hasElement(n))return!n.hasAttribute(`data-trigger-disabled`);for(let[,e]of t.entries())if(H(e,n))return!e.hasAttribute(`data-trigger-disabled`);return!1}function Ic(e,t){if(t==null)return!1;if(`composedPath`in e)return e.composedPath().includes(t);let n=e;return n.target!=null&&t.contains(n.target)}function Lc(e){return e.matches(`html,body`)}function Rc(e){return Jn(e)&&e.matches(`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`)}function zc(e){return e?.closest(`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${Ac}`)!=null}function Bc(e){return e?e.getAttribute(`role`)===`combobox`&&Rc(e):!1}function Vc(e){if(!e||Tc)return!0;try{return e.matches(`:focus-visible`)}catch{return!0}}function Hc(e){return e?e.hasAttribute(`data-base-ui-focusable`)?e:e.querySelector(`[data-base-ui-focusable]`)||e:null}function Uc(e,t,n=!0){return e.filter(e=>e.parentId===t).flatMap(t=>[...!n||t.context?.open?[t]:[],...Uc(e,t.id,n)])}function Wc(e,t){let n=[],r=e.find(e=>e.id===t)?.parentId;for(;r;){let t=e.find(e=>e.id===r);r=t?.parentId,t&&(n=n.concat(t))}return n}function Gc(e){e.preventDefault(),e.stopPropagation()}function Kc(e){return`nativeEvent`in e}function qc(e){return e.pointerType===``&&e.isTrusted?!0:Cc&&e.pointerType?e.type===`click`&&e.buttons===1:e.detail===0&&!e.pointerType}function Jc(e){return Tc?!1:!Cc&&e.width===0&&e.height===0||Cc&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType===`mouse`||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType===`touch`}function Yc(e,t){let n=[`mouse`,`pen`];return t||n.push(``,void 0),n.includes(e)}function Xc(e){let t=e.type;return t===`click`||t===`mousedown`||t===`keydown`||t===`keyup`}var Zc=[`top`,`right`,`bottom`,`left`],Qc=Math.min,$c=Math.max,el=Math.round,tl=Math.floor,nl=e=>({x:e,y:e}),rl={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function il(e,t,n){return $c(e,Qc(t,n))}function al(e,t){return typeof e==`function`?e(t):e}function ol(e){return e.split(`-`)[0]}function sl(e){return e.split(`-`)[1]}function cl(e){return e===`x`?`y`:`x`}function ll(e){return e===`y`?`height`:`width`}function ul(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function dl(e){return cl(ul(e))}function fl(e,t,n){n===void 0&&(n=!1);let r=sl(e),i=dl(e),a=ll(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=xl(o)),[o,xl(o)]}function pl(e){let t=xl(e);return[ml(e),t,ml(t)]}function ml(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var hl=[`left`,`right`],gl=[`right`,`left`],_l=[`top`,`bottom`],vl=[`bottom`,`top`];function yl(e,t,n){switch(e){case`top`:case`bottom`:return n?t?gl:hl:t?hl:gl;case`left`:case`right`:return t?_l:vl;default:return[]}}function bl(e,t,n,r){let i=sl(e),a=yl(ol(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(ml)))),a}function xl(e){let t=ol(e);return rl[t]+e.slice(t.length)}function Sl(e){return{top:0,right:0,bottom:0,left:0,...e}}function Cl(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:Sl(e)}function wl(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function Tl(e,t,n){return Math.floor(e/t)!==n}function El(e,t){return t<0||t>=e.length}function Dl(e,t){return kl(e.current,{disabledIndices:t})}function Ol(e,t){return kl(e.current,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function kl(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:r,amount:i=1}={}){let a=t;do a+=n?-i:i;while(a>=0&&a<=e.length-1&&Pl(e,a,r));return a}function Al(e,{event:t,orientation:n,loopFocus:r,onLoop:i,rtl:a,cols:o,disabledIndices:s,minIndex:c,maxIndex:l,prevIndex:u,stopEvent:d=!1}){let f=u,p;if(t.key===`ArrowUp`?p=`up`:t.key===`ArrowDown`&&(p=`down`),p){let n=[],a=[],m=!1,h=0;{let t=null,r=-1;e.forEach((e,i)=>{if(e==null)return;h+=1;let o=e.closest(`[role="row"]`);o&&(m=!0),(o!==t||r===-1)&&(t=o,r+=1,n[r]=[]),n[r].push(i),a[i]=r})}let g=!1,_=0;if(m)for(let e of n){let t=e.length;t>_&&(_=t),t!==o&&(g=!0)}let v=g&&h{if(!g||u===-1)return;let c=a[u];if(c==null)return;let l=n[c].indexOf(u),d=o===`up`?-1:1;for(let o=c+d,f=0;f=n.length){if(!r||v)return;if(o=o<0?n.length-1:0,i){let e=Math.min(l,n[o].length-1);o=a[i(t,u,n[o][e]??n[o][0])]??o}}let c=n[o];for(let t=Math.min(l,c.length-1);t>=0;--t){let n=c[t];if(!Pl(e,n,s))return n}}},x=t=>{if(!v||u===-1)return;let n=u%y,i=t===`up`?-y:y,a=l-l%y,o=tl(l/y)+1;for(let t=u-n+i,c=0;cl){if(!r)return;t=t<0?a:0}let i=Math.min(t+y-1,l);for(let r=Math.min(t+n,i);r>=t;--r)if(!Pl(e,r,s))return r}};d&&Gc(t);let S=b(p)??x(p);if(S!==void 0)f=S;else if(u===-1)f=p===`up`?l:c;else if(f=kl(e,{startingIndex:u,amount:y,decrement:p===`up`,disabledIndices:s}),r){if(p===`up`&&(u-ye?r:r-y,i&&(f=i(t,u,f))}p===`down`&&u+y>l&&(f=kl(e,{startingIndex:u%y-y,amount:y,disabledIndices:s}),i&&(f=i(t,u,f)))}El(e,f)&&(f=u)}if(n===`both`){let n=tl(u/o);t.key===(a?`ArrowLeft`:`ArrowRight`)&&(d&&Gc(t),u%o===o-1?r&&(f=kl(e,{startingIndex:u-u%o-1,disabledIndices:s}),i&&(f=i(t,u,f))):(f=kl(e,{startingIndex:u,disabledIndices:s}),r&&Tl(f,o,n)&&(f=kl(e,{startingIndex:u-u%o-1,disabledIndices:s}),i&&(f=i(t,u,f)))),Tl(f,o,n)&&(f=u)),t.key===(a?`ArrowRight`:`ArrowLeft`)&&(d&&Gc(t),u%o===0?r&&(f=kl(e,{startingIndex:u+(o-u%o),decrement:!0,disabledIndices:s}),i&&(f=i(t,u,f))):(f=kl(e,{startingIndex:u,decrement:!0,disabledIndices:s}),r&&Tl(f,o,n)&&(f=kl(e,{startingIndex:u+(o-u%o),decrement:!0,disabledIndices:s}),i&&(f=i(t,u,f)))),Tl(f,o,n)&&(f=u));let c=tl(l/o)===n;El(e,f)&&(r&&c?(f=t.key===(a?`ArrowRight`:`ArrowLeft`)?l:kl(e,{startingIndex:u-u%o-1,disabledIndices:s}),i&&(f=i(t,u,f))):f=u)}return f}function jl(e,t,n){let r=[],i=0;return e.forEach(({width:e,height:a},o)=>{let s=!1;for(n&&(i=0);!s;){let n=[];for(let r=0;rr[e]==null)?(n.forEach(e=>{r[e]=o}),s=!0):i+=1}}),[...r]}function Ml(e,t,n,r,i){if(e===-1)return-1;let a=n.indexOf(e),o=t[e];switch(i){case`tl`:return a;case`tr`:return o?a+o.width-1:a;case`bl`:return o?a+(o.height-1)*r:a;case`br`:return n.lastIndexOf(e);default:return-1}}function Nl(e,t){return t.flatMap((t,n)=>e.includes(t)?[n]:[])}function Pl(e,t,n){if(typeof n==`function`?n(t):n?.includes(t)??!1)return!0;let r=e[t];return r?Il(r)?!n&&(r.hasAttribute(`disabled`)||r.getAttribute(`aria-disabled`)===`true`):!0:!1}function Fl(e){return e.visibility===`hidden`||e.visibility===`collapse`}function Il(e,t=e?$n(e):null){return!e||!e.isConnected||!t||Fl(t)?!1:typeof e.checkVisibility==`function`?e.checkVisibility():t.display!==`none`&&t.display!==`contents`}var Ll=`a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]`;function Rl(e){let t=e.assignedSlot;if(t)return t;if(e.parentElement)return e.parentElement;let n=e.getRootNode();return cr(n)?n.host:null}function Y(e){for(let t of Array.from(e.children))if(nr(t)===`summary`)return t;return null}function zl(e,t){let n=Y(t);return!!n&&(e===n||H(n,e))}function Bl(e){let t=e?nr(e):``;return e!=null&&e.matches(Ll)&&(t!==`summary`||e.parentElement!=null&&nr(e.parentElement)===`details`&&Y(e.parentElement)===e)&&(t!==`details`||Y(e)==null)&&(t!==`input`||e.type!==`hidden`)}function Vl(e){if(!Bl(e)||!e.isConnected||e.matches(`:disabled`))return!1;for(let t=e;t;t=Rl(t)){let n=t!==e,r=nr(t)===`slot`;if(t.hasAttribute(`inert`)||n&&nr(t)===`details`&&!t.open&&!zl(e,t)||t.hasAttribute(`hidden`)||!r&&!Hl(t,n))return!1}return!0}function Hl(e,t){let n=$n(e);return t?n.display!==`none`:Il(e,n)}function Ul(e){let t=e.tabIndex;if(t<0){let t=nr(e);if(t===`details`||t===`audio`||t===`video`||Jn(e)&&e.isContentEditable)return 0}return t}function Wl(e){if(nr(e)!==`input`)return null;let t=e;return t.type===`radio`&&t.name!==``?t:null}function Gl(e,t){let n=Wl(e);if(!n)return!0;let r=t.find(e=>{let t=Wl(e);return t?.name===n.name&&t.form===n.form&&t.checked});return r?r===n:t.find(e=>{let t=Wl(e);return t?.name===n.name&&t.form===n.form})===n}function Kl(e){if(Jn(e)&&nr(e)===`slot`){let t=e.assignedElements({flatten:!0});if(t.length>0)return t}return Jn(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function ql(e,t){Kl(e).forEach(e=>{Bl(e)&&t.push(e),ql(e,t)})}function Jl(e,t,n){Kl(e).forEach(e=>{Jn(e)&&e.matches(t)&&n.push(e),Jl(e,t,n)})}function Yl(e){return Vl(e)&&Ul(e)>=0}function Xl(e){let t=[];return ql(e,t),t.filter(Vl)}function Zl(e){let t=Xl(e);return t.filter(e=>Ul(e)>=0&&Gl(e,t))}function Ql(e,t){let n=Zl(e),r=n.length;if(r===0)return;let i=wr(Tr(e)),a=n.indexOf(i);return n[a===-1?t===1?0:r-1:a+t]}function $l(e){return Ql(Tr(e).body,1)||e}function eu(e){return Ql(Tr(e).body,-1)||e}function tu(e,t){let n=t||e.currentTarget,r=e.relatedTarget;return!r||!H(n,r)}function nu(e){Zl(e).forEach(e=>{e.dataset.tabindex=e.getAttribute(`tabindex`)||``,e.setAttribute(`tabindex`,`-1`)})}function ru(e){let t=[];Jl(e,`[data-tabindex]`,t),t.forEach(e=>{let t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute(`tabindex`,t):e.removeAttribute(`tabindex`)})}var iu=[];function au(e){U.useEffect(e,iu)}var ou=0,su=class e{static create(){return new e}currentId=ou;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=ou,t()},e)}isStarted(){return this.currentId!==ou}clear=()=>{this.currentId!==ou&&(clearTimeout(this.currentId),this.currentId=ou)};disposeEffect=()=>this.clear};function cu(){let e=Pt(su.create).current;return au(e.disposeEffect),e}var lu=null;globalThis.requestAnimationFrame;var uu=new class{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=e=>{this.isScheduled=!1;let t=this.callbacks,n=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,n>0)for(let n=0;n=this.callbacks.length||(this.callbacks[t]=null,--this.callbacksCount)}},du=class e{static create(){return new e}static request(e){return uu.request(e)}static cancel(e){return uu.cancel(e)}currentId=lu;request(e){this.cancel(),this.currentId=uu.request(()=>{this.currentId=lu,e()})}cancel=()=>{this.currentId!==lu&&(uu.cancel(this.currentId),this.currentId=lu)};disposeEffect=()=>this.cancel};function fu(){let e=Pt(du.create).current;return au(e.disposeEffect),e}function pu(e){return e==null?e:`current`in e?e.current:e}var mu=function(e){return e.startingStyle=`data-starting-style`,e.endingStyle=`data-ending-style`,e}({}),hu={[mu.startingStyle]:``},gu={[mu.endingStyle]:``},_u={transitionStatus(e){return e===`starting`?hu:e===`ending`?gu:null}},vu=n(Dt());function yu(e,t=!1,n=!0){let r=fu();return ir((i,a=null)=>{r.cancel();let o=pu(e);if(o==null)return;let s=o,c=()=>{vu.flushSync(i)};if(typeof s.getAnimations!=`function`||globalThis.BASE_UI_ANIMATIONS_DISABLED){i();return}function l(){Promise.all(s.getAnimations().map(e=>e.finished)).then(()=>{a?.aborted||c()}).catch(()=>{if(n){a?.aborted||c();return}let e=s.getAnimations();!a?.aborted&&e.length>0&&e.some(e=>e.pending||e.playState!==`finished`)&&l()})}if(t){let e=mu.startingStyle;if(!s.hasAttribute(e)){r.request(l);return}let t=new MutationObserver(()=>{s.hasAttribute(e)||(t.disconnect(),l())});t.observe(s,{attributes:!0,attributeFilter:[e]}),a?.addEventListener(`abort`,()=>t.disconnect(),{once:!0});return}r.request(l)})}function bu(e){let{enabled:t=!0,open:n,ref:r,onComplete:i}=e,a=ir(i),o=yu(r,n,!1);U.useEffect(()=>{if(!t)return;let e=new AbortController;return o(a,e.signal),()=>{e.abort()}},[t,n,a,o])}function xu(e,t=!1,n=!1){let[r,i]=U.useState(e&&t?`idle`:void 0),[a,o]=U.useState(e);return e&&!a&&(o(!0),i(`starting`)),!e&&a&&r!==`ending`&&!n&&i(`ending`),!e&&!a&&r===`ending`&&i(void 0),B(()=>{if(!e&&a&&r!==`ending`&&n){let e=du.request(()=>{i(`ending`)});return()=>{du.cancel(e)}}},[e,a,r,n]),B(()=>{if(!e||t)return;let n=du.request(()=>{i(void 0)});return()=>{du.cancel(n)}},[t,e]),B(()=>{if(!e||!t)return;e&&a&&r!==`idle`&&i(`starting`);let n=du.request(()=>{i(`idle`)});return()=>{du.cancel(n)}},[t,e,a,r]),{mounted:a,setMounted:o,transitionStatus:r}}function Su({controlled:e,default:t,name:n,state:r=`value`}){let{current:i}=U.useRef(e!==void 0),[a,o]=U.useState(t);return[i?e:a,U.useCallback(e=>{i||o(e)},[])]}function Cu(e,t,n,r,i=!0){let{registerFieldControl:a}=fc(),o=U.useRef(null);o.current||=Symbol(),B(()=>{let s=o.current;if(!(!s||!i))return a(s,{controlRef:e,getValue:r,id:t,value:n}),()=>{a(s,void 0)}},[e,i,r,t,a,n])}var wu=U.forwardRef(function(e,t){let{render:n,className:r,id:i,name:a,value:o,disabled:s=!1,onValueChange:c,defaultValue:l,autoFocus:u=!1,style:d,...f}=e,{state:p,name:m,disabled:h,setTouched:g,setDirty:_,validityData:v,setFocused:y,setFilled:b,validationMode:x,validation:S}=fc(),C=h||s,w=m??a,T={...p,disabled:C},{labelId:E}=mc(),D=hc({id:i});B(()=>{let e=o!=null;S.inputRef.current?.value||e&&o!==``?b(!0):e&&o===``&&b(!1)},[S.inputRef,b,o]);let O=U.useRef(null);B(()=>{u&&O.current===wr(Tr(O.current))&&y(!0)},[u,y]);let[k]=Su({controlled:o,default:l,name:`FieldControl`,state:`value`}),A=o!==void 0,j=A?k:void 0,M=ir(()=>S.inputRef.current?.value);return Cu(S.inputRef,D,j,M),Ft(`input`,e,{ref:[t,O],state:T,props:[{id:D,disabled:C,name:w,ref:S.inputRef,"aria-labelledby":E,autoFocus:u,...A?{value:j}:{defaultValue:l},onChange(e){let t=e.currentTarget.value;c?.(t,Cr(mr,e.nativeEvent)),_(t!==v.initialValue),b(t!==``)},onFocus(){y(!0)},onBlur(e){g(!0),y(!1),x===`onBlur`&&S.commit(e.currentTarget.value)},onKeyDown(e){e.currentTarget.tagName===`INPUT`&&e.key===`Enter`&&(g(!0),S.commit(e.currentTarget.value))}},S.getInputValidationProps(),f],stateAttributesMapping:lc})}),Tu=U.forwardRef(function(e,t){return(0,W.jsx)(wu,{ref:t,...e})});function Eu(e){let t=(0,ms.c)(10),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,type:i,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a;t[4]===n?a=t[5]:(a=rn(`h-7 w-full min-w-0 rounded-md border border-input bg-input/20 px-2 py-0.5 text-sm transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-xs/relaxed file:font-medium file:text-foreground placeholder:text-muted-foreground autofill:[-webkit-text-fill-color:var(--color-foreground)] autofill:[transition:background-color_9999s_ease-in-out_0s] focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/30 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/20 md:text-xs/relaxed dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,n),t[4]=n,t[5]=a);let o;return t[6]!==r||t[7]!==a||t[8]!==i?(o=(0,W.jsx)(Tu,{className:a,"data-slot":`input`,type:i,...r}),t[6]=r,t[7]=a,t[8]=i,t[9]=o):o=t[9],o}var Du=U.forwardRef(function(e,t){let{className:n,render:r,orientation:i=`horizontal`,style:a,...o}=e;return Ft(`div`,e,{state:{orientation:i},ref:t,props:[{role:`separator`,"aria-orientation":i},o]})});function Ou(e){let t=(0,ms.c)(10),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,orientation:i,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a=i===void 0?`horizontal`:i,o;t[4]===n?o=t[5]:(o=rn(`shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:w-px data-[orientation=vertical]:self-stretch`,n),t[4]=n,t[5]=o);let s;return t[6]!==a||t[7]!==r||t[8]!==o?(s=(0,W.jsx)(Du,{className:o,"data-slot":`separator`,orientation:a,...r}),t[6]=a,t[7]=r,t[8]=o,t[9]=s):s=t[9],s}var ku=U.createContext(!1),Au=U.createContext(void 0);function ju(e){let t=U.useContext(Au);if(e===!1&&t===void 0)throw Error(zt(27));return t}var Mu=function(e){return e.open=`data-open`,e.closed=`data-closed`,e[e.startingStyle=mu.startingStyle]=`startingStyle`,e[e.endingStyle=mu.endingStyle]=`endingStyle`,e.anchorHidden=`data-anchor-hidden`,e.side=`data-side`,e.align=`data-align`,e}({}),Nu=function(e){return e.popupOpen=`data-popup-open`,e.pressed=`data-pressed`,e}({}),Pu={[Nu.popupOpen]:``},Fu={[Nu.popupOpen]:``,[Nu.pressed]:``},Iu={[Mu.open]:``},Lu={[Mu.closed]:``},Ru={[Mu.anchorHidden]:``},zu={open(e){return e?Pu:null}},Bu={open(e){return e?Fu:null}},Vu={open(e){return e?Iu:Lu},anchorHidden(e){return e?Ru:null}},Hu={...Vu,..._u},Uu=U.forwardRef(function(e,t){let{render:n,className:r,style:i,forceRender:a=!1,...o}=e,{store:s}=ju(),c=s.useState(`open`),l=s.useState(`nested`),u=s.useState(`mounted`);return Ft(`div`,e,{state:{open:c,transitionStatus:s.useState(`transitionStatus`)},ref:[s.context.backdropRef,t],stateAttributesMapping:Hu,props:[{role:`presentation`,hidden:!u,style:{userSelect:`none`,WebkitUserSelect:`none`}},o],enabled:a||!l})}),Wu=U.forwardRef(function(e,t){let{render:n,className:r,style:i,disabled:a=!1,nativeButton:o=!0,...s}=e,{store:c}=ju(),l=c.useState(`open`),{getButtonProps:u,buttonRef:d}=rr({disabled:a,native:o}),f={disabled:a};function p(e){l&&c.setOpen(!1,Cr(xr,e.nativeEvent))}return Ft(`button`,e,{state:f,ref:[t,d],props:[{onClick:p},s,u]})}),Gu=U.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,{store:s}=ju(),c=dr(a);return s.useSyncedValueWithCleanup(`descriptionElementId`,c),Ft(`p`,e,{ref:t,props:[{id:c},o]})});function Ku(e,t){return t!=null&&!Yc(t)?0:typeof e==`function`?e():e}function qu(e,t,n){let r=Ku(e,n);return typeof r==`number`?r:r?.[t]}function Ju(e){return typeof e==`function`?e():e}function Yu(e,t){return t||e===`click`||e===`mousedown`}function Xu(e){return e?.includes(`mouse`)&&e!==`mousedown`}var Zu=U.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new su,currentIdRef:{current:null},currentContextRef:{current:null}});function Qu(e){let{children:t,delay:n,timeoutMs:r=0}=e,i=U.useRef(n),a=U.useRef(n),o=U.useRef(null),s=U.useRef(null),c=cu();return(0,W.jsx)(Zu.Provider,{value:U.useMemo(()=>({hasProvider:!0,delayRef:i,initialDelayRef:a,currentIdRef:o,timeoutMs:r,currentContextRef:s,timeout:c}),[r,c]),children:t})}function $u(e,t={open:!1}){let{open:n}=t,r=`rootStore`in e?e.rootStore:e,i=r.useState(`floatingId`),{currentIdRef:a,delayRef:o,timeoutMs:s,initialDelayRef:c,currentContextRef:l,hasProvider:u,timeout:d}=U.useContext(Zu),[f,p]=U.useState(!1);return B(()=>{function e(){p(!1),l.current?.setIsInstantPhase(!1),a.current=null,l.current=null,o.current=c.current}if(a.current&&!n&&a.current===i){if(p(!1),s){let t=i;return d.start(s,()=>{r.select(`open`)||a.current&&a.current!==t||e()}),()=>{d.clear()}}e()}},[n,i,a,o,s,c,l,d,r]),B(()=>{if(!n)return;let e=l.current,t=a.current;d.clear(),l.current={onOpenChange:r.setOpen,setIsInstantPhase:p},a.current=i,o.current={open:0,close:qu(c.current,`close`)},t!==null&&t!==i?(p(!0),e?.setIsInstantPhase(!0),e?.onOpenChange(!1,Cr(mr))):(p(!1),e?.setIsInstantPhase(!1))},[n,i,r,a,o,c,l,d]),B(()=>()=>{l.current=null},[l]),U.useMemo(()=>({hasProvider:u,delayRef:o,isInstantPhase:f}),[u,o,f])}function X(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function ed(...e){return()=>{for(let t=0;t{t.current=t.next}};return t}var rd={clipPath:`inset(50%)`,overflow:`hidden`,whiteSpace:`nowrap`,border:0,padding:0,width:1,height:1,margin:-1},id={...rd,position:`fixed`,top:0,left:0},ad={...rd,position:`absolute`},od=U.forwardRef(function(e,t){let[n,r]=U.useState();B(()=>{Sc&&r(`button`)},[]);let i={tabIndex:0,role:n};return(0,W.jsx)(`span`,{...e,ref:t,style:id,"aria-hidden":n?void 0:!0,...i,"data-base-ui-focus-guard":``})});function sd(e){return`data-base-ui-${e}`}var cd=0;function ld(e,t={}){let{preventScroll:n=!1,sync:r=!1,shouldFocus:i}=t;cancelAnimationFrame(cd);function a(){i&&!i()||e?.focus({preventScroll:n})}if(r)return a(),It;let o=requestAnimationFrame(a);return cd=o,()=>{cd===o&&(cancelAnimationFrame(o),cd=0)}}var ud={inert:new WeakMap,"aria-hidden":new WeakMap},dd=`data-base-ui-inert`,fd={inert:new WeakSet,"aria-hidden":new WeakSet},pd=new WeakMap,md=0;function hd(e){return fd[e]}function gd(e){return e?cr(e)?e.host:gd(e.parentNode):null}var _d=(e,t)=>t.map(t=>{if(e.contains(t))return t;let n=gd(t);return e.contains(n)?n:null}).filter(e=>e!=null),vd=e=>{let t=new Set;return e.forEach(e=>{let n=e;for(;n&&!t.has(n);)t.add(n),n=n.parentNode}),t},yd=(e,t,n)=>{let r=[],i=e=>{!e||n.has(e)||Array.from(e.children).forEach(e=>{nr(e)!==`script`&&(t.has(e)?i(e):r.push(e))})};return i(e),r};function bd(e,t,n,r,{mark:i=!0,markerIgnoreElements:a=[]}){let o=r?`inert`:n?`aria-hidden`:null,s=null,c=null,l=_d(t,e),u=i?_d(t,a):[],d=new Set(u),f=i?yd(t,vd(l),new Set(l)).filter(e=>!d.has(e)):[],p=[],m=[];if(o){let e=ud[o],n=hd(o);c=n,s=e;let r=_d(t,Array.from(t.querySelectorAll(`[aria-live]`))),i=l.concat(r);yd(t,vd(i),new Set(i)).forEach(t=>{let r=t.getAttribute(o),i=r!==null&&r!==`false`,a=(e.get(t)||0)+1;e.set(t,a),p.push(t),a===1&&i&&n.add(t),i||t.setAttribute(o,o===`inert`?``:`true`)})}return i&&f.forEach(e=>{let t=(pd.get(e)||0)+1;pd.set(e,t),m.push(e),t===1&&e.setAttribute(dd,``)}),md+=1,()=>{s&&p.forEach(e=>{let t=(s.get(e)||0)-1;s.set(e,t),t||(!c?.has(e)&&o&&e.removeAttribute(o),c?.delete(e))}),i&&m.forEach(e=>{let t=(pd.get(e)||0)-1;pd.set(e,t),t||e.removeAttribute(dd)}),--md,md||(ud.inert=new WeakMap,ud[`aria-hidden`]=new WeakMap,fd.inert=new WeakSet,fd[`aria-hidden`]=new WeakSet,pd=new WeakMap)}}function Z(e,t={}){let{ariaHidden:n=!1,inert:r=!1,mark:i=!0,markerIgnoreElements:a=[]}=t,o=Tr(e[0]).body;return bd(e,o,n,r,{mark:i,markerIgnoreElements:a})}var xd={style:{transition:`none`}},Sd={fallbackAxisSide:`none`},Cd={fallbackAxisSide:`end`},wd={clipPath:`inset(50%)`,position:`fixed`,top:0,left:0},Td=U.createContext(null),Ed=()=>U.useContext(Td),Dd=sd(`portal`);function Od(e={}){let{ref:t,container:n,componentProps:r=jt,elementProps:i}=e,a=ur(),o=Ed()?.portalNode,[s,c]=U.useState(null),[l,u]=U.useState(null),d=ir(e=>{e!==null&&u(e)}),f=U.useRef(null);B(()=>{if(n===null){f.current&&(f.current=null,u(null),c(null));return}if(a==null)return;let e=(n&&(Gn(n)?n:n.current))??o??document.body;if(e==null){f.current&&(f.current=null,u(null),c(null));return}f.current!==e&&(f.current=e,u(null),c(e))},[n,o,a]);let p=Ft(`div`,r,{ref:[t,d],props:[{id:a,[Dd]:``},i]});return{portalNode:l,portalSubtree:s&&p?vu.createPortal(p,s):null}}var kd=U.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,container:o,renderGuards:s,...c}=e,{portalNode:l,portalSubtree:u}=Od({container:o,ref:t,componentProps:e,elementProps:c}),d=U.useRef(null),f=U.useRef(null),p=U.useRef(null),m=U.useRef(null),[h,g]=U.useState(null),_=U.useRef(!1),v=h?.modal,y=h?.open,b=typeof s==`boolean`?s:!!h&&!h.modal&&h.open&&!!l;U.useEffect(()=>{if(!l||v)return;function e(e){l&&e.relatedTarget&&tu(e)&&(e.type===`focusin`?_.current&&=(ru(l),!1):(nu(l),_.current=!0))}return ed(X(l,`focusin`,e,!0),X(l,`focusout`,e,!0))},[l,v]),U.useEffect(()=>{!l||y!==!1||(ru(l),_.current=!1)},[y,l]);let x=U.useMemo(()=>({beforeOutsideRef:d,afterOutsideRef:f,beforeInsideRef:p,afterInsideRef:m,portalNode:l,setFocusManagerState:g}),[l]);return(0,W.jsxs)(U.Fragment,{children:[u,(0,W.jsxs)(Td.Provider,{value:x,children:[b&&l&&(0,W.jsx)(od,{"data-type":`outside`,ref:d,onFocus:e=>{tu(e,l)?p.current?.focus():eu(h?h.domReference:null)?.focus()}}),b&&l&&(0,W.jsx)(`span`,{"aria-owns":l.id,style:wd}),l&&vu.createPortal(a,l),b&&l&&(0,W.jsx)(od,{"data-type":`outside`,ref:f,onFocus:e=>{tu(e,l)?m.current?.focus():($l(h?h.domReference:null)?.focus(),h?.closeOnFocusOut&&h?.onOpenChange(!1,Cr(`focus-out`,e.nativeEvent)))}})]})]})});function Ad(){let e=new Map;return{emit(t,n){e.get(t)?.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){e.get(t)?.delete(n)}}}var jd=U.createContext(null),Md=U.createContext(null),Nd=()=>U.useContext(jd)?.id||null,Pd=e=>{let t=U.useContext(Md);return e??t};function Fd(e,t){let n=qn(pr(e));return e instanceof n.KeyboardEvent?`keyboard`:e instanceof n.FocusEvent?t||`keyboard`:`pointerType`in e?e.pointerType||`keyboard`:`touches`in e?`touch`:e instanceof n.MouseEvent?t||(e.detail===0?`keyboard`:`mouse`):``}var Id=20,Ld=[];function Rd(){Ld=Ld.filter(e=>e.deref()?.isConnected)}function zd(e){Rd(),e&&nr(e)!==`body`&&(Ld.push(new WeakRef(e)),Ld.length>Id&&(Ld=Ld.slice(-20)))}function Bd(){return Rd(),Ld[Ld.length-1]?.deref()}function Vd(e){return e?Yl(e)?e:Zl(e)[0]||e:null}function Hd(e,t){if(e.hasAttribute(`tabindex`)&&!e.hasAttribute(`data-tabindex`)||!t.current.includes(`floating`)&&!e.getAttribute(`role`)?.includes(`dialog`))return;let n=Xl(e).filter(e=>{let t=e.getAttribute(`data-tabindex`)||``;return Yl(e)||e.hasAttribute(`data-tabindex`)&&!t.startsWith(`-`)}),r=e.getAttribute(`tabindex`);t.current.includes(`floating`)||n.length===0?r!==`0`&&e.setAttribute(`tabindex`,`0`):(r!==`-1`||e.hasAttribute(`data-tabindex`)&&e.getAttribute(`data-tabindex`)!==`-1`)&&(e.setAttribute(`tabindex`,`-1`),e.setAttribute(`data-tabindex`,`-1`))}function Ud(e){let{context:t,children:n,disabled:r=!1,initialFocus:i=!0,returnFocus:a=!0,restoreFocus:o=!1,modal:s=!0,closeOnFocusOut:c=!0,openInteractionType:l=``,nextFocusableElement:u,previousFocusableElement:d,beforeContentFocusGuardRef:f,externalTree:p,getInsideElements:m}=e,h=`rootStore`in t?t.rootStore:t,g=h.useState(`open`),_=h.useState(`domReferenceElement`),v=h.useState(`floatingElement`),{events:y,dataRef:b}=h.context,x=ir(()=>b.current.floatingContext?.nodeId),S=i===!1,C=Bc(_)&&S,w=U.useRef([`content`]),T=td(i),E=td(a),D=td(l),O=Pd(p),k=Ed(),A=U.useRef(!1),j=U.useRef(!1),M=U.useRef(!1),ee=U.useRef(null),N=U.useRef(``),P=U.useRef(``),te=U.useRef(null),ne=U.useRef(null),re=Mt(te,f,k?.beforeInsideRef),ie=Mt(ne,k?.afterInsideRef),ae=cu(),F=cu(),oe=fu(),se=k!=null,I=Hc(v),ce=ir((e=I)=>e?Zl(e):[]),le=ir(()=>m?.().filter(e=>e!=null)??[]);U.useEffect(()=>{if(r||!s)return;function e(e){e.key===`Tab`&&H(I,wr(Tr(I)))&&ce().length===0&&!C&&Gc(e)}return X(Tr(I),`keydown`,e)},[r,I,s,C,ce]),U.useEffect(()=>{if(r||!g)return;let e=Tr(I);function t(){M.current=!1}function n(e){let t=pr(e),n=le();M.current=!(H(v,t)||H(_,t)||H(k?.portalNode,t)||n.some(e=>e===t||H(e,t))),P.current=e.pointerType||`keyboard`,t?.closest(`[data-base-ui-click-trigger]`)&&(j.current=!0)}function i(){P.current=`keyboard`}return ed(X(e,`pointerdown`,n,!0),X(e,`pointerup`,t,!0),X(e,`pointercancel`,t,!0),X(e,`keydown`,i,!0))},[r,v,_,I,g,k,le]),U.useEffect(()=>{if(r||!c)return;let e=Tr(I);function t(){j.current=!0,F.start(0,()=>{j.current=!1})}function n(e){let t=pr(e);Yl(t)&&(ee.current=t)}function i(t){let n=t.relatedTarget,r=t.currentTarget,i=pr(t);queueMicrotask(()=>{let a=x(),c=h.context.triggerElements,l=le(),f=n?.hasAttribute(sd(`focus-guard`))&&[te.current,ne.current,k?.beforeInsideRef.current,k?.afterInsideRef.current,k?.beforeOutsideRef.current,k?.afterOutsideRef.current,pu(d),pu(u)].includes(n),p=!(H(_,n)||H(v,n)||H(n,v)||H(k?.portalNode,n)||l.some(e=>e===n||H(e,n))||n!=null&&c.hasElement(n)||c.hasMatchingElement(e=>H(e,n))||f||O&&(Uc(O.nodesRef.current,a).find(e=>H(e.context?.elements.floating,n)||H(e.context?.elements.domReference,n))||Wc(O.nodesRef.current,a).find(e=>[e.context?.elements.floating,Hc(e.context?.elements.floating)].includes(n)||e.context?.elements.domReference===n)));if(r===_&&I&&Hd(I,w),o&&r!==_&&!Il(i)&&wr(e)===e.body){if(Jn(I)&&(I.focus(),o===`popup`)){oe.request(()=>{I.focus()});return}let e=ce(),t=ee.current,n=(t&&e.includes(t)?t:null)||e[e.length-1]||I;Jn(n)&&n.focus()}if(b.current.insideReactTree){b.current.insideReactTree=!1;return}(C||!s)&&n&&p&&!j.current&&(C||n!==Bd())&&(A.current=!0,h.setOpen(!1,Cr(yr,t)))})}function a(){M.current||(b.current.insideReactTree=!0,ae.start(0,()=>{b.current.insideReactTree=!1}))}let l=Jn(_)?_:null;if(!(!v&&!l))return ed(l&&X(l,`focusout`,i),l&&X(l,`pointerdown`,t),v&&X(v,`focusin`,n),v&&X(v,`focusout`,i),v&&k&&X(v,`focusout`,a,!0))},[r,_,v,I,s,O,k,h,c,o,ce,C,x,w,b,ae,F,oe,u,d,le]),U.useEffect(()=>{if(r||!v||!g)return;let e=Array.from(k?.portalNode?.querySelectorAll(`[${sd(`portal`)}]`)||[]),t=(O?Wc(O.nodesRef.current,x()):[]).find(e=>Bc(e.context?.elements.domReference||null))?.context?.elements.domReference,n=Z([v,...e,te.current,ne.current,k?.beforeOutsideRef.current,k?.afterOutsideRef.current,...le(),t,pu(d),pu(u),C?_:null].filter(e=>e!=null),{ariaHidden:s||C,mark:!1}),i=Z([v,...e].filter(e=>e!=null));return()=>{i(),n()}},[g,r,_,v,s,k,C,O,x,u,d,le]),B(()=>{if(!g||r||!Jn(I))return;let e=Tr(I),t=wr(e);queueMicrotask(()=>{let n=T.current,r=typeof n==`function`?n(D.current||``):n;if(r===void 0||r===!1||H(I,t))return;let i=null,a=()=>(i??=ce(I),i[0]||I),o;o=r===!0||r===null?a():pu(r),o||=a();let s=H(I,wr(e));ld(o,{preventScroll:o===I,shouldFocus(){if(s)return!0;let t=wr(e);return!(t!==o&&H(I,t))}})})},[r,g,I,ce,T,D]),B(()=>{if(r||!I)return;let e=Tr(I);zd(wr(e));function t(e){if(e.open||(N.current=Fd(e.nativeEvent,P.current)),e.reason===`trigger-hover`&&e.nativeEvent.type===`mouseleave`&&(A.current=!0),e.reason===`outside-press`)if(e.nested)A.current=!1;else if(qc(e.nativeEvent)||Jc(e.nativeEvent))A.current=!1;else{let e=!1;Tr(I).createElement(`div`).focus({get preventScroll(){return e=!0,!1}}),e?A.current=!1:A.current=!0}}y.on(`openchange`,t);function n(){let e=E.current,t=typeof e==`function`?e(N.current):e;if(t===void 0||t===!1)return null;if(t===null&&(t=!0),typeof t==`boolean`)return _?.isConnected?_:Bd()||null;let n=_?.isConnected?_:Bd();return pu(t)||n||null}return()=>{y.off(`openchange`,t);let r=wr(e),i=le(),a=H(v,r)||i.some(e=>e===r||H(e,r))||O&&Uc(O.nodesRef.current,x(),!1).some(e=>H(e.context?.elements.floating,r)),o=E.current,s=n();queueMicrotask(()=>{let t=Vd(s),n=typeof o!=`boolean`;o&&!A.current&&Jn(t)&&(!(!n&&t!==r&&r!==e.body)||a)&&t.focus({preventScroll:!0}),A.current=!1})}},[r,v,I,E,y,O,_,x,le]),B(()=>{if(!bc||g||!v)return;let e=wr(Tr(v));!Jn(e)||!Rc(e)||H(v,e)&&e.blur()},[g,v]),B(()=>{if(!(r||!k))return k.setFocusManagerState({modal:s,closeOnFocusOut:c,open:g,onOpenChange:h.setOpen,domReference:_}),()=>{k.setFocusManagerState(null)}},[r,k,s,g,h,c,_]),B(()=>{if(!(r||!I))return Hd(I,w),()=>{queueMicrotask(Rd)}},[r,I,w]);let ue=!r&&(s?!C:!0)&&(se||s);return(0,W.jsxs)(U.Fragment,{children:[ue&&(0,W.jsx)(od,{"data-type":`inside`,ref:re,onFocus:e=>{if(s){let e=ce();ld(e[e.length-1])}else k?.portalNode&&(A.current=!1,tu(e,k.portalNode)?$l(_)?.focus():pu(d??k.beforeOutsideRef)?.focus())}}),n,ue&&(0,W.jsx)(od,{"data-type":`inside`,ref:ie,onFocus:e=>{s?ld(ce()[0]):k?.portalNode&&(c&&(A.current=!0),tu(e,k.portalNode)?eu(_)?.focus():pu(u??k.afterOutsideRef)?.focus())}})]})}function Wd(e,t){let n=null,r=null,i=!1;return{contextElement:e||void 0,getBoundingClientRect(){let a=e?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},o=t.axis===`x`||t.axis===`both`,s=t.axis===`y`||t.axis===`both`,c=[`mouseenter`,`mousemove`].includes(t.dataRef.current.openEvent?.type||``)&&t.pointerType!==`touch`,l=a.width,u=a.height,d=a.x,f=a.y;return n==null&&t.x&&o&&(n=a.x-t.x),r==null&&t.y&&s&&(r=a.y-t.y),d-=n||0,f-=r||0,l=0,u=0,!i||c?(l=t.axis===`y`?a.width:0,u=t.axis===`x`?a.height:0,d=o&&t.x!=null?t.x:d,f=s&&t.y!=null?t.y:f):i&&!c&&(u=t.axis===`x`?a.height:u,l=t.axis===`y`?a.width:l),i=!0,{width:l,height:u,x:d,y:f,top:f,right:d+l,bottom:f+u,left:d}}}}function Gd(e){return e!=null&&e.clientX!=null}function Kd(e,t={}){let{enabled:n=!0,axis:r=`both`}=t,i=`rootStore`in e?e.rootStore:e,a=i.useState(`open`),o=i.useState(`floatingElement`),s=i.useState(`domReferenceElement`),c=i.context.dataRef,l=U.useRef(!1),u=U.useRef(null),[d,f]=U.useState(),[p,m]=U.useState([]),h=ir(e=>{i.set(`positionReference`,e)}),g=ir((e,t,n)=>{l.current||c.current.openEvent&&!Gd(c.current.openEvent)||i.set(`positionReference`,Wd(n??s,{x:e,y:t,axis:r,dataRef:c,pointerType:d}))}),_=ir(e=>{a?u.current||(g(e.clientX,e.clientY,e.currentTarget),m([])):g(e.clientX,e.clientY,e.currentTarget)}),v=Yc(d)?o:a;U.useEffect(()=>{if(!n){h(s);return}if(!v)return;function e(){u.current?.(),u.current=null}let t=qn(o);function r(t){H(o,pr(t))?e():g(t.clientX,t.clientY)}return!c.current.openEvent||Gd(c.current.openEvent)?u.current=X(t,`mousemove`,r):h(s),e},[v,n,o,c,s,i,g,h,p]),U.useEffect(()=>()=>{i.set(`positionReference`,null)},[i]),U.useEffect(()=>{n&&!o&&(l.current=!1)},[n,o]),U.useEffect(()=>{!n&&a&&(l.current=!0)},[n,a]);let y=U.useMemo(()=>{function e(e){f(e.pointerType)}return{onPointerDown:e,onPointerEnter:e,onMouseMove:_,onMouseEnter:_}},[_]);return U.useMemo(()=>n?{reference:y,trigger:y}:{},[n,y])}var qd={intentional:`onClick`,sloppy:`onPointerDown`};function Jd(){return!1}function Yd(e){return{escapeKey:typeof e==`boolean`?e:e?.escapeKey??!1,outsidePress:typeof e==`boolean`?e:e?.outsidePress??!0}}function Xd(e,t={}){let{enabled:n=!0,escapeKey:r=!0,outsidePress:i=!0,outsidePressEvent:a=`sloppy`,referencePress:o=Jd,referencePressEvent:s=`sloppy`,bubbles:c,externalTree:l}=t,u=`rootStore`in e?e.rootStore:e,d=u.useState(`open`),f=u.useState(`floatingElement`),{dataRef:p}=u.context,m=Pd(l),h=ir(typeof i==`function`?i:()=>!1),g=typeof i==`function`?h:i,_=g!==!1,v=ir(()=>a),{escapeKey:y,outsidePress:b}=Yd(c),x=U.useRef(!1),S=U.useRef(!1),C=U.useRef(!1),w=U.useRef(!1),T=U.useRef(``),E=U.useRef(null),D=cu(),O=cu(),k=ir(()=>{O.clear(),p.current.insideReactTree=!1}),A=ir(e=>{let t=p.current.floatingContext?.nodeId;return(m?Uc(m.nodesRef.current,t):[]).some(t=>t.context?.open&&!t.context.dataRef.current[e])}),j=ir(e=>Ic(e,u.select(`floatingElement`))||Ic(e,u.select(`domReferenceElement`))),M=ir(e=>{o()&&u.setOpen(!1,Cr(hr,e.nativeEvent))}),ee=ir(e=>{if(!d||!n||!r||e.key!==`Escape`||w.current||!y&&A(`__escapeKeyBubbles`))return;let t=Cr(fr,Kc(e)?e.nativeEvent:e);u.setOpen(!1,t),t.isCanceled||e.preventDefault(),!y&&!t.isPropagationAllowed&&e.stopPropagation()}),N=ir(()=>{p.current.insideReactTree=!0,O.start(0,k)}),P=ir(e=>{if(!d||!n||e.button!==0)return;let t=pr(e.nativeEvent);H(u.select(`floatingElement`),t)&&(x.current||(x.current=!0,S.current=!1))}),te=ir(e=>{!d||!n||(e.defaultPrevented||e.nativeEvent.defaultPrevented)&&x.current&&(S.current=!0)});U.useEffect(()=>{if(!d||!n)return;p.current.__escapeKeyBubbles=y,p.current.__outsidePressBubbles=b;let e=new su,t=new su;function i(){e.clear(),w.current=!0}function a(){e.start(Un()?5:0,()=>{w.current=!1})}function o(){C.current=!0,t.start(0,()=>{C.current=!1})}function s(){x.current=!1,S.current=!1}function c(){let e=T.current,t=e===`pen`||!e?`mouse`:e,n=v(),r=typeof n==`function`?n():n;return typeof r==`string`?r:r[t]}function l(e){let t=c();return t===`intentional`&&e.type!==`click`||t===`sloppy`&&e.type===`click`}function h(e){let t=p.current.floatingContext?.nodeId,n=m&&Uc(m.nodesRef.current,t).some(t=>Ic(e,t.context?.elements.floating));return j(e)||n}function O(e){if(l(e)){e.type!==`click`&&!j(e)&&(t.clear(),C.current=!1),k();return}if(p.current.insideReactTree){k();return}let n=pr(e),r=`[${sd(`inert`)}]`,i=V(n)?n.getRootNode():null,a=Array.from((cr(i)?i:Tr(u.select(`floatingElement`))).querySelectorAll(r)),o=u.context.triggerElements;if(n&&(o.hasElement(n)||o.hasMatchingElement(e=>H(e,n))))return;let s=V(n)?n:null;for(;s&&!lr(s);){let e=Zn(s);if(lr(e)||!V(e))break;s=e}if(!(a.length&&V(n)&&!Lc(n)&&!H(n,u.select(`floatingElement`))&&a.every(e=>!H(s,e)))){if(Jn(n)&&!(`touches`in e)){let t=lr(n),r=$n(n),i=/auto|scroll/,a=t||i.test(r.overflowX),o=t||i.test(r.overflowY),s=a&&n.clientWidth>0&&n.scrollWidth>n.clientWidth,c=o&&n.clientHeight>0&&n.scrollHeight>n.clientHeight,l=r.direction===`rtl`,u=c&&(l?e.offsetX<=n.offsetWidth-n.clientWidth:e.offsetX>n.clientWidth),d=s&&e.offsetY>n.clientHeight;if(u||d)return}if(!h(e)){if(c()===`intentional`&&C.current){t.clear(),C.current=!1;return}typeof g==`function`&&!g(e)||A(`__outsidePressBubbles`)||(u.setOpen(!1,Cr(br,e)),k())}}}function M(e){c()!==`sloppy`||e.pointerType===`touch`||!u.select(`open`)||!n||j(e)||O(e)}function N(e){if(c()!==`sloppy`||!u.select(`open`)||!n||j(e))return;let t=e.touches[0];t&&(E.current={startTime:Date.now(),startX:t.clientX,startY:t.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},D.start(1e3,()=>{E.current&&(E.current.dismissOnTouchEnd=!1,E.current.dismissOnMouseDown=!1)}))}function P(e,t){let n=pr(e);if(!n)return;let r=X(n,e.type,()=>{t(e),r()})}function te(e){T.current=`touch`,P(e,N)}function ne(e){D.clear(),e.type===`pointerdown`&&(T.current=e.pointerType),!(e.type===`mousedown`&&E.current&&!E.current.dismissOnMouseDown)&&P(e,e=>{e.type===`pointerdown`?M(e):O(e)})}function re(e){if(!x.current)return;let n=S.current;if(s(),c()===`intentional`){if(e.type===`pointercancel`){n&&o();return}if(!h(e)){if(n){o();return}typeof g==`function`&&!g(e)||(t.clear(),C.current=!0,k())}}}function ie(e){if(c()!==`sloppy`||!E.current||j(e))return;let t=e.touches[0];if(!t)return;let n=Math.abs(t.clientX-E.current.startX),r=Math.abs(t.clientY-E.current.startY),i=Math.sqrt(n*n+r*r);i>5&&(E.current.dismissOnTouchEnd=!0),i>10&&(O(e),D.clear(),E.current=null)}function ae(e){P(e,ie)}function F(e){c()!==`sloppy`||!E.current||j(e)||(E.current.dismissOnTouchEnd&&O(e),D.clear(),E.current=null)}function oe(e){P(e,F)}let se=Tr(f),I=ed(r&&ed(X(se,`keydown`,ee),X(se,`compositionstart`,i),X(se,`compositionend`,a)),_&&ed(X(se,`click`,ne,!0),X(se,`pointerdown`,ne,!0),X(se,`pointerup`,re,!0),X(se,`pointercancel`,re,!0),X(se,`mousedown`,ne,!0),X(se,`mouseup`,re,!0),X(se,`touchstart`,te,!0),X(se,`touchmove`,ae,!0),X(se,`touchend`,oe,!0)));return()=>{I(),e.clear(),t.clear(),s(),C.current=!1}},[p,f,r,_,g,d,n,y,b,ee,k,v,A,j,m,u,D]),U.useEffect(k,[g,k]);let ne=U.useMemo(()=>({onKeyDown:ee,[qd[s]]:M,...s!==`intentional`&&{onClick:M}}),[ee,M,s]),re=U.useMemo(()=>({onKeyDown:ee,onPointerDown:te,onMouseDown:te,onClickCapture:N,onMouseDownCapture(e){N(),P(e)},onPointerDownCapture(e){N(),P(e)},onMouseUpCapture:N,onTouchEndCapture:N,onTouchMoveCapture:N}),[ee,N,P,te]);return U.useMemo(()=>n?{reference:ne,floating:re,trigger:ne}:{},[n,ne,re])}function Zd(e,t,n){let{reference:r,floating:i}=e,a=ul(t),o=dl(t),s=ll(o),c=ol(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(sl(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}async function Qd(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=al(t,e),p=Cl(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=wl(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=wl(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var $d=50,ef=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:Qd},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=Zd(l,r,c),f=r,p=0,m={};for(let n=0;ne<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==ul(t))||T.every(e=>ul(e.placement)===_?e.overflows[0]>0:!0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=ul(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function nf(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function rf(e){return Zc.some(t=>e[t]>=0)}var af=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=al(e,t);switch(i){case`referenceHidden`:{let e=nf(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:rf(e)}}}case`escaped`:{let e=nf(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:rf(e)}}}default:return{}}}}},of=new Set([`left`,`top`]);async function sf(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=ol(n),s=sl(n),c=ul(n)===`y`,l=of.has(o)?-1:1,u=a&&c?-1:1,d=al(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var cf=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await sf(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},lf=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=al(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=ul(ol(i)),p=cl(f),m=u[p],h=u[f];if(o){let e=p===`y`?`top`:`left`,t=p===`y`?`bottom`:`right`,n=m+d[e],r=m-d[t];m=il(n,m,r)}if(s){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=h+d[e],r=h-d[t];h=il(n,h,r)}let g=c.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[f]:s}}}}}},uf=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=al(e,t),u={x:n,y:r},d=ul(i),f=cl(d),p=u[f],m=u[d],h=al(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;pn&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=of.has(ol(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);mr&&(m=r)}return{[f]:p,[d]:m}}}},df=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=al(e,t),u=await o.detectOverflow(t,l),d=ol(i),f=sl(i),p=ul(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=Qc(h-u[g],v),x=Qc(m-u[_],y),S=!t.middlewareData.shift,C=b,w=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(w=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=$c(u.left,0),t=$c(u.right,0),n=$c(u.top,0),r=$c(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:$c(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:$c(u.top,u.bottom))}await c({...t,availableWidth:w,availableHeight:C});let T=await o.getDimensions(s.floating);return m!==T.width||h!==T.height?{reset:{rects:!0}}:{}}}};function ff(e){let t=$n(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=Jn(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=el(n)!==a||el(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function pf(e){return V(e)?e:e.contextElement}function mf(e){let t=pf(e);if(!Jn(t))return nl(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=ff(t),o=(a?el(n.width):n.width)/r,s=(a?el(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var hf=nl(0);function gf(e){let t=qn(e);return!Un()||!t.visualViewport?hf:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function _f(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==qn(e)?!1:t}function vf(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=pf(e),o=nl(1);t&&(r?V(r)&&(o=mf(r)):o=mf(e));let s=_f(a,n,r)?gf(a):nl(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=qn(a),t=r&&V(r)?qn(r):r,n=e,i=Xn(n);for(;i&&r&&t!==n;){let e=mf(i),t=i.getBoundingClientRect(),r=$n(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=qn(i),i=Xn(n)}}return wl({width:u,height:d,x:c,y:l})}function yf(e,t){let n=er(e).scrollLeft;return t?t.left+n:vf(Yn(e)).left+n}function bf(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-yf(e,n),y:n.top+t.scrollTop}}function xf(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=Yn(r),s=t?Wn(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=nl(1),u=nl(0),d=Jn(r);if((d||!d&&!a)&&((nr(r)!==`body`||Hn(o))&&(c=er(r)),d)){let e=vf(r);l=mf(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?bf(o,c):nl(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function Sf(e){return Array.from(e.getClientRects())}function Cf(e){let t=Yn(e),n=er(e),r=e.ownerDocument.body,i=$c(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=$c(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+yf(e),s=-n.scrollTop;return $n(r).direction===`rtl`&&(o+=$c(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var wf=25;function Tf(e,t){let n=qn(e),r=Yn(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=Un();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=yf(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=wf&&(a-=o)}else l<=wf&&(a+=l);return{width:a,height:o,x:s,y:c}}function Ef(e,t){let n=vf(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Jn(e)?mf(e):nl(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Df(e,t,n){let r;if(t===`viewport`)r=Tf(e,n);else if(t===`document`)r=Cf(Yn(e));else if(V(t))r=Ef(t,n);else{let n=gf(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return wl(r)}function Of(e,t){let n=Zn(e);return n===t||!V(n)||lr(n)?!1:$n(n).position===`fixed`||Of(n,t)}function kf(e,t){let n=t.get(e);if(n)return n;let r=Qn(e,[],!1).filter(e=>V(e)&&nr(e)!==`body`),i=null,a=$n(e).position===`fixed`,o=a?Zn(e):e;for(;V(o)&&!lr(o);){let t=$n(o),n=sr(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||Hn(o)&&!n&&Of(e,o))?r=r.filter(e=>e!==o):i=t,o=Zn(o)}return t.set(e,r),r}function Af(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?Wn(t)?[]:kf(t,this._c):[].concat(n),r],o=Df(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e{o(!1,1e-7)},1e3)}n===1&&!zf(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function Vf(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=pf(e),u=i||a?[...l?Qn(l):[],...t?Qn(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?Bf(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?vf(e):null;c&&g();function g(){let t=vf(e);h&&!zf(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var Hf=cf,Uf=lf,Wf=tf,Gf=df,Kf=af,qf=uf,Jf=(e,t,n)=>{let r=new Map,i={platform:Rf,...n},a={...i.platform,_c:r};return ef(e,t,{...i,platform:a})},Yf=typeof document<`u`?U.useLayoutEffect:function(){};function Xf(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Xf(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!Xf(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function Zf(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Qf(e,t){let n=Zf(e);return Math.round(t*n)/n}function $f(e){let t=U.useRef(e);return Yf(()=>{t.current=e}),t}function ep(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=U.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=U.useState(r);Xf(f,r)||p(r);let[m,h]=U.useState(null),[g,_]=U.useState(null),v=U.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=U.useCallback(e=>{e!==C.current&&(C.current=e,_(e))},[]),b=a||m,x=o||g,S=U.useRef(null),C=U.useRef(null),w=U.useRef(u),T=c!=null,E=$f(c),D=$f(i),O=$f(l),k=U.useCallback(()=>{if(!S.current||!C.current)return;let e={placement:t,strategy:n,middleware:f};D.current&&(e.platform=D.current),Jf(S.current,C.current,e).then(e=>{let t={...e,isPositioned:O.current!==!1};A.current&&!Xf(w.current,t)&&(w.current=t,vu.flushSync(()=>{d(t)}))})},[f,t,n,D,O]);Yf(()=>{l===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let A=U.useRef(!1);Yf(()=>(A.current=!0,()=>{A.current=!1}),[]),Yf(()=>{if(b&&(S.current=b),x&&(C.current=x),b&&x){if(E.current)return E.current(b,x,k);k()}},[b,x,k,E,T]);let j=U.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:y}),[v,y]),M=U.useMemo(()=>({reference:b,floating:x}),[b,x]),ee=U.useMemo(()=>{let e={position:n,left:0,top:0};if(!M.floating)return e;let t=Qf(M.floating,u.x),r=Qf(M.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...Zf(M.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,M.floating,u.x,u.y]);return U.useMemo(()=>({...u,update:k,refs:j,elements:M,floatingStyles:ee}),[u,k,j,M,ee])}var tp=(e,t)=>{let n=Hf(e);return{name:n.name,fn:n.fn,options:[e,t]}},np=(e,t)=>{let n=Uf(e);return{name:n.name,fn:n.fn,options:[e,t]}},rp=(e,t)=>({fn:qf(e).fn,options:[e,t]}),ip=(e,t)=>{let n=Wf(e);return{name:n.name,fn:n.fn,options:[e,t]}},ap=(e,t)=>{let n=Gf(e);return{name:n.name,fn:n.fn,options:[e,t]}},op=(e,t)=>{let n=Kf(e);return{name:n.name,fn:n.fn,options:[e,t]}},Q=(e,t,n,r,i,a,...o)=>{if(o.length>0)throw Error(zt(1));let s;if(e&&t&&n&&r&&i&&a)s=(o,s,c,l)=>a(e(o,s,c,l),t(o,s,c,l),n(o,s,c,l),r(o,s,c,l),i(o,s,c,l),s,c,l);else if(e&&t&&n&&r&&i)s=(a,o,s,c)=>i(e(a,o,s,c),t(a,o,s,c),n(a,o,s,c),r(a,o,s,c),o,s,c);else if(e&&t&&n&&r)s=(i,a,o,s)=>r(e(i,a,o,s),t(i,a,o,s),n(i,a,o,s),a,o,s);else if(e&&t&&n)s=(r,i,a,o)=>n(e(r,i,a,o),t(r,i,a,o),i,a,o);else if(e&&t)s=(n,r,i,a)=>t(e(n,r,i,a),r,i,a);else if(e)s=e;else throw Error(`Missing arguments`);return s},sp=[],cp=void 0;function lp(){return cp}function up(e){sp.push(e)}function dp(e){let t=(t,n)=>{let r=Pt(pp).current,i;try{cp=r;for(let e of sp)e.before(r);i=e(t,n);for(let e of sp)e.after(r);r.didInitialize=!0}finally{cp=void 0}return i};return t.displayName=e.displayName||e.name,t}function fp(e){return U.forwardRef(dp(e))}function pp(){return{didInitialize:!1}}var mp=ie(),hp=ne(),gp=Lt(19)?yp:bp;function _p(e,t,n,r,i){return gp(e,t,n,r,i)}function vp(e,t,n,r,i){let a=U.useCallback(()=>t(e.getSnapshot(),n,r,i),[e,t,n,r,i]);return(0,mp.useSyncExternalStore)(e.subscribe,a,a)}up({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let n=0;n0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{let n=new Set;for(let t of e.syncHooks)n.add(t.store);let r=[];for(let e of n)r.push(e.subscribe(t));return()=>{for(let e of r)e()}}),(0,mp.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot))}});function yp(e,t,n,r,i){let a=lp();if(!a)return vp(e,t,n,r,i);let o=a.syncIndex;a.syncIndex+=1;let s;return a.didInitialize?(s=a.syncHooks[o],(s.store!==e||s.selector!==t||!Object.is(s.a1,n)||!Object.is(s.a2,r)||!Object.is(s.a3,i))&&(s.store!==e&&(a.didChangeStore=!0),s.store=e,s.selector=t,s.a1=n,s.a2=r,s.a3=i,s.didChange=!0)):(s={store:e,selector:t,a1:n,a2:r,a3:i,value:t(e.getSnapshot(),n,r,i),didChange:!1},a.syncHooks.push(s)),s.value}function bp(e,t,n,r,i){return(0,hp.useSyncExternalStoreWithSelector)(e.subscribe,e.getSnapshot,e.getSnapshot,e=>t(e,n,r,i))}var xp=class{constructor(e){this.state=e,this.listeners=new Set,this.updateTick=0}subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.state;setState(e){if(this.state===e)return;this.state=e,this.updateTick+=1;let t=this.updateTick;for(let n of this.listeners){if(t!==this.updateTick)return;n(e)}}update(e){for(let t in e)if(!Object.is(this.state[t],e[t])){this.setState({...this.state,...e});return}}set(e,t){Object.is(this.state[e],t)||this.setState({...this.state,[e]:t})}notifyAll(){let e={...this.state};this.setState(e)}use(e,t,n,r){return _p(this,e,t,n,r)}},Sp=class extends xp{constructor(e,t={},n){super(e),this.context=t,this.selectors=n}useSyncedValue(e,t){U.useDebugValue(e);let n=this;B(()=>{n.state[e]!==t&&n.set(e,t)},[n,e,t])}useSyncedValueWithCleanup(e,t){let n=this;B(()=>(n.state[e]!==t&&n.set(e,t),()=>{n.set(e,void 0)}),[n,e,t])}useSyncedValues(e){let t=this;B(()=>{t.update(e)},[t,...Object.values(e)])}useControlledProp(e,t){U.useDebugValue(e);let n=this,r=t!==void 0;B(()=>{r&&!Object.is(n.state[e],t)&&n.setState({...n.state,[e]:t})},[n,e,t,r])}select(e,t,n,r){let i=this.selectors[e];return i(this.state,t,n,r)}useState(e,t,n,r){return U.useDebugValue(e),_p(this,this.selectors[e],t,n,r)}useContextCallback(e,t){U.useDebugValue(e);let n=ir(t??It);this.context[e]=n}useStateSetter(e){let t=U.useRef(void 0);return t.current===void 0&&(t.current=t=>{this.set(e,t)}),t.current}observe(e,t){let n;n=typeof e==`function`?e:this.selectors[e];let r=n(this.state);return t(r,r,this),this.subscribe(e=>{let i=n(e);if(!Object.is(r,i)){let e=r;r=i,t(i,e,this)}})}},Cp={open:Q(e=>e.open),transitionStatus:Q(e=>e.transitionStatus),domReferenceElement:Q(e=>e.domReferenceElement),referenceElement:Q(e=>e.positionReference??e.referenceElement),floatingElement:Q(e=>e.floatingElement),floatingId:Q(e=>e.floatingId)},wp=class extends Sp{constructor(e){let{syncOnly:t,nested:n,onOpenChange:r,triggerElements:i,...a}=e;super({...a,positionReference:a.referenceElement,domReferenceElement:a.referenceElement},{onOpenChange:r,dataRef:{current:{}},events:Ad(),nested:n,triggerElements:i},Cp),this.syncOnly=t}syncOpenEvent=(e,t)=>{(!e||!this.state.open||t!=null&&Xc(t))&&(this.context.dataRef.current.openEvent=e?t:void 0)};dispatchOpenChange=(e,t)=>{this.syncOpenEvent(e,t.event);let n={open:e,reason:t.reason,nativeEvent:t.event,nested:this.context.nested,triggerElement:t.trigger};this.context.events.emit(`openchange`,n)};setOpen=(e,t)=>{if(this.syncOnly){this.context.onOpenChange?.(e,t);return}this.dispatchOpenChange(e,t),this.context.onOpenChange?.(e,t)}};function Tp(e){let{popupStore:t,treatPopupAsFloatingElement:n=!1,floatingRootContext:r,floatingId:i,nested:a,onOpenChange:o}=e,s=t.useState(`open`),c=t.useState(`activeTriggerElement`),l=t.useState(n?`popupElement`:`positionerElement`),u=t.context.triggerElements,d=o,f=U.useRef(null);r===void 0&&f.current===null&&(f.current=new wp({open:s,transitionStatus:void 0,referenceElement:c,floatingElement:l,triggerElements:u,onOpenChange:d,floatingId:i,syncOnly:!0,nested:a}));let p=r??f.current;return t.useSyncedValue(`floatingId`,i),B(()=>{let e={open:s,floatingId:i,referenceElement:c,floatingElement:l};V(c)&&(e.domReferenceElement=c),p.state.positionReference===p.state.referenceElement&&(e.positionReference=c),p.update(e)},[s,i,c,l,p]),p.context.onOpenChange=d,p.context.nested=a,p}var Ep={tabIndex:-1,[kc]:``};function Dp(e,t,n=!1){let r=ur(),i=Nd()!=null,a=U.useRef(null);e===void 0&&a.current===null&&(a.current=t(r,i));let o=e??a.current;return Tp({popupStore:o,treatPopupAsFloatingElement:n,floatingRootContext:o.state.floatingRootContext,floatingId:r,nested:i,onOpenChange:o.setOpen}),{store:o,internalStore:a.current}}function Op(e,t){let n=U.useRef(null),r=U.useRef(null);return U.useCallback(i=>{if(e===void 0)return;let a=!1;if(n.current!==null){let e=n.current,i=r.current,o=t.context.triggerElements.getById(e);i&&o===i&&(t.context.triggerElements.delete(e),a=!0),n.current=null,r.current=null}if(i!==null&&(n.current=e,r.current=i,t.context.triggerElements.add(e,i),a=!0),a){let e=t.context.triggerElements.size;t.select(`open`)&&t.state.triggerCount!==e&&t.set(`triggerCount`,e)}},[t,e])}function kp(e,t,n){let r=n?.id??null;(r||t)&&(e.activeTriggerId=r,e.activeTriggerElement=n??null)}function Ap(e,t,n,r){let i=n.useState(`isMountedByTrigger`,e),a=Op(e,n),o=ir(t=>{if(a(t),!t)return;let i=n.select(`open`),o=n.select(`activeTriggerId`);if(o===e){n.update({activeTriggerElement:t,...i?r:null});return}o==null&&i&&n.update({activeTriggerId:e,activeTriggerElement:t,...r})});return B(()=>{i&&n.update({activeTriggerElement:t.current,...r})},[i,n,t,...Object.values(r)]),{registerTrigger:o,isMountedByThisTrigger:i}}function jp(e){let t=e.useState(`open`);B(()=>{if(!t){e.state.triggerCount!==0&&e.set(`triggerCount`,0);return}let n=e.context.triggerElements.size,r={};if(e.state.triggerCount!==n&&(r.triggerCount=n),!e.select(`activeTriggerId`)&&n===1){let t=e.context.triggerElements.entries().next();if(!t.done){let[e,n]=t.value;r.activeTriggerId=e,r.activeTriggerElement=n}}(r.triggerCount!==void 0||r.activeTriggerId!==void 0)&&e.update(r)},[t,e,e.useState(`triggerCount`)])}function Mp(e,t,n){let{mounted:r,setMounted:i,transitionStatus:a}=xu(e);t.useSyncedValues({mounted:r,transitionStatus:a});let o=ir(()=>{i(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),n?.(),t.context.onOpenChangeComplete?.(!1)}),s=t.useState(`preventUnmountingOnClose`);return bu({enabled:r&&!e&&!s,open:e,ref:t.context.popupRef,onComplete(){e||o()}}),{forceUnmount:o,transitionStatus:a}}function Np(e,t){e.useSyncedValues(t),B(()=>()=>{e.update({activeTriggerProps:jt,inactiveTriggerProps:jt,popupProps:jt})},[e])}function Pp(e,t){B(()=>{!t&&e.state.openMethod!==null&&e.set(`openMethod`,null)},[t,e]),B(()=>()=>{e.state.openMethod!==null&&e.set(`openMethod`,null)},[e])}var Fp=class{constructor(){this.elementsSet=new Set,this.idMap=new Map}add(e,t){let n=this.idMap.get(e);n!==t&&(n!==void 0&&this.elementsSet.delete(n),this.elementsSet.add(t),this.idMap.set(e,t))}delete(e){let t=this.idMap.get(e);t&&(this.elementsSet.delete(t),this.idMap.delete(e))}hasElement(e){return this.elementsSet.has(e)}hasMatchingElement(e){for(let t of this.elementsSet)if(e(t))return!0;return!1}getById(e){return this.idMap.get(e)}entries(){return this.idMap.entries()}elements(){return this.elementsSet.values()}get size(){return this.idMap.size}};function Ip(){return new wp({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:new Fp,floatingId:void 0,syncOnly:!1,nested:!1,onOpenChange:void 0})}function Lp(){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:Ip(),floatingId:void 0,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:jt,inactiveTriggerProps:jt,popupProps:jt}}function Rp(e,t,n=!1){return new wp({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:t,syncOnly:!0,nested:n,onOpenChange:void 0})}var zp=Q(e=>e.triggerIdProp??e.activeTriggerId),Bp=Q(e=>e.openProp??e.open),Vp=Q(e=>(e.popupElement?.id??e.floatingId)||void 0);function Hp(e,t){return t!==void 0&&Bp(e)&&zp(e)===t}function Up(e,t){return Hp(e,t)?!0:t!==void 0&&Bp(e)&&zp(e)==null&&e.triggerCount===1}var Wp={open:Bp,mounted:Q(e=>e.mounted),transitionStatus:Q(e=>e.transitionStatus),floatingRootContext:Q(e=>e.floatingRootContext),triggerCount:Q(e=>e.triggerCount),preventUnmountingOnClose:Q(e=>e.preventUnmountingOnClose),payload:Q(e=>e.payload),activeTriggerId:zp,activeTriggerElement:Q(e=>e.mounted?e.activeTriggerElement:null),popupId:Vp,isTriggerActive:Q((e,t)=>t!==void 0&&zp(e)===t),isOpenedByTrigger:Q((e,t)=>Hp(e,t)),isMountedByTrigger:Q((e,t)=>t!==void 0&&zp(e)===t&&e.mounted),triggerProps:Q((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps),triggerPopupId:Q((e,t)=>Up(e,t)?Vp(e):void 0),popupProps:Q(e=>e.popupProps),popupElement:Q(e=>e.popupElement),positionerElement:Q(e=>e.positionerElement)};function Gp(e){let{open:t=!1,onOpenChange:n,elements:r={}}=e,i=ur(),a=Nd()!=null,o=Pt(()=>new wp({open:t,transitionStatus:void 0,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new Fp,floatingId:i,syncOnly:!1,nested:a})).current;return B(()=>{let e={open:t,floatingId:i};r.reference!==void 0&&(e.referenceElement=r.reference,e.domReferenceElement=V(r.reference)?r.reference:null),r.floating!==void 0&&(e.floatingElement=r.floating),o.update(e)},[t,i,r.reference,r.floating,o]),o.context.onOpenChange=n,o.context.nested=a,o}function Kp(e={}){let{nodeId:t,externalTree:n}=e,r=Gp(e),i=e.rootContext||r,a=i.useState(`referenceElement`),o=i.useState(`floatingElement`),s=i.useState(`domReferenceElement`),c=i.useState(`open`),l=i.useState(`floatingId`),[u,d]=U.useState(null),[f,p]=U.useState(void 0),[m,h]=U.useState(void 0),g=U.useRef(null),_=Pd(n),v=U.useMemo(()=>({reference:a,floating:o,domReference:s}),[a,o,s]),y=ep({...e,elements:{...v,...u&&{reference:u}}}),b=V(f)?f:null,x=m===void 0?i.state.floatingElement:m;i.useSyncedValue(`referenceElement`,f??null),i.useSyncedValue(`domReferenceElement`,f===void 0?s:b),i.useSyncedValue(`floatingElement`,x);let S=U.useCallback(e=>{let t=V(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;d(t),y.refs.setReference(t)},[y.refs]),C=U.useCallback(e=>{(V(e)||e===null)&&(g.current=e,p(e)),(V(y.refs.reference.current)||y.refs.reference.current===null||e!==null&&!V(e))&&y.refs.setReference(e)},[y.refs,p]),w=U.useCallback(e=>{h(e),y.refs.setFloating(e)},[y.refs]),T=U.useMemo(()=>({...y.refs,setReference:C,setFloating:w,setPositionReference:S,domReference:g}),[y.refs,C,w,S]),E=U.useMemo(()=>({...y.elements,domReference:s}),[y.elements,s]),D=U.useMemo(()=>({...y,dataRef:i.context.dataRef,open:c,onOpenChange:i.setOpen,events:i.context.events,floatingId:l,refs:T,elements:E,nodeId:t,rootStore:i}),[y,T,E,t,i,c,l]);return B(()=>{s&&(g.current=s)},[s]),B(()=>{i.context.dataRef.current.floatingContext=D;let e=_?.nodesRef.current.find(e=>e.id===t);e&&(e.context=D)}),U.useMemo(()=>({...y,context:D,refs:T,elements:E,rootStore:i}),[y,T,E,D,i])}var qp=wc&⪼function Jp(e,t={}){let{enabled:n=!0,delay:r}=t,i=`rootStore`in e?e.rootStore:e,{events:a,dataRef:o}=i.context,s=U.useRef(!1),c=U.useRef(null),l=U.useRef(!0),u=cu();U.useEffect(()=>{let e=i.select(`domReferenceElement`);if(!n)return;let t=qn(e);function r(){let e=i.select(`domReferenceElement`);!i.select(`open`)&&Jn(e)&&e===wr(Tr(e))&&(s.current=!0)}function a(){l.current=!0}function o(){l.current=!1}return ed(X(t,`blur`,r),qp&&X(t,`keydown`,a,!0),qp&&X(t,`pointerdown`,o,!0))},[i,n]),U.useEffect(()=>{if(!n)return;function e(e){if(e.reason===`trigger-press`||e.reason===`escape-key`){let e=i.select(`domReferenceElement`);V(e)&&(c.current=e,s.current=!0)}}return a.on(`openchange`,e),()=>{a.off(`openchange`,e)}},[a,n,i]);let d=U.useMemo(()=>{function e(){s.current=!1,c.current=null}return{onMouseLeave(){e()},onFocus(t){let n=t.currentTarget;if(s.current){if(c.current===n)return;e()}let a=pr(t.nativeEvent);if(V(a)){if(qp&&!t.relatedTarget){if(!l.current&&!Rc(a))return}else if(!Vc(a))return}let o=Fc(t.relatedTarget,i.context.triggerElements),{nativeEvent:d,currentTarget:f}=t,p=typeof r==`function`?r():r;if(i.select(`open`)&&o||p===0||p===void 0){i.setOpen(!0,Cr(vr,d,f));return}u.start(p,()=>{s.current||i.setOpen(!0,Cr(vr,d,f))})},onBlur(t){e();let n=t.relatedTarget,r=t.nativeEvent,a=V(n)&&n.hasAttribute(sd(`focus-guard`))&&n.getAttribute(`data-type`)===`outside`;u.start(0,()=>{let e=i.select(`domReferenceElement`),t=wr(Tr(e));!n&&t===e||H(o.current.floatingContext?.refs.floating.current,t)||H(e,t)||a||Fc(n??t,i.context.triggerElements)||i.setOpen(!1,Cr(vr,r))})}}},[o,r,i,u]);return U.useMemo(()=>n?{reference:d,trigger:d}:{},[n,d])}var Yp=class e{constructor(){this.pointerType=void 0,this.interactedInside=!1,this.handler=void 0,this.blockMouseMove=!0,this.performedPointerEventsMutation=!1,this.pointerEventsScopeElement=null,this.pointerEventsReferenceElement=null,this.pointerEventsFloatingElement=null,this.restTimeoutPending=!1,this.openChangeTimeout=new su,this.restTimeout=new su,this.handleCloseOptions=void 0}static create(){return new e}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose},Xp=new WeakMap;function Zp(e){if(!e.performedPointerEventsMutation)return;let t=e.pointerEventsScopeElement;t&&Xp.get(t)===e&&(e.pointerEventsScopeElement?.style.removeProperty(`pointer-events`),e.pointerEventsReferenceElement?.style.removeProperty(`pointer-events`),e.pointerEventsFloatingElement?.style.removeProperty(`pointer-events`),Xp.delete(t)),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null}function Qp(e,t){let{scopeElement:n,referenceElement:r,floatingElement:i}=t,a=Xp.get(n);a&&a!==e&&Zp(a),Zp(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=n,e.pointerEventsReferenceElement=r,e.pointerEventsFloatingElement=i,Xp.set(n,e),n.style.pointerEvents=`none`,r.style.pointerEvents=`auto`,i.style.pointerEvents=`auto`}function $p(e){let t=e.context.dataRef.current,n=Pt(()=>t.hoverInteractionState??Yp.create()).current;return t.hoverInteractionState||=n,au(t.hoverInteractionState.disposeEffect),t.hoverInteractionState}function em(e,t={}){let{enabled:n=!0,closeDelay:r=0,nodeId:i}=t,a=`rootStore`in e?e.rootStore:e,o=a.useState(`open`),s=a.useState(`floatingElement`),c=a.useState(`domReferenceElement`),{dataRef:l}=a.context,u=Pd(),d=Nd(),f=$p(a),p=cu(),m=ir(()=>Yu(l.current.openEvent?.type,f.interactedInside)),h=ir(()=>Xu(l.current.openEvent?.type)),g=ir(()=>{Zp(f)});B(()=>{o||(f.pointerType=void 0,f.restTimeoutPending=!1,f.interactedInside=!1,g())},[o,f,g]),U.useEffect(()=>g,[g]),B(()=>{if(n&&o&&f.handleCloseOptions?.blockPointerEvents&&h()&&V(c)&&s){let e=c,t=s,n=Tr(s),r=u?.nodesRef.current.find(e=>e.id===d)?.context?.elements.floating;r&&(r.style.pointerEvents=``);let i=f.pointerEventsScopeElement===t?null:f.pointerEventsScopeElement,a=r===t?null:r;return Qp(f,{scopeElement:f.handleCloseOptions?.getScope?.()??i??a??e.closest(`[data-rootownerid]`)??n.body,referenceElement:e,floatingElement:t}),()=>{g()}}},[n,o,c,s,f,h,u,d,g]),U.useEffect(()=>{if(!n)return;function e(){return!!(u&&d&&Uc(u.nodesRef.current,d).length>0)}function t(e){let t=qu(r,`close`,f.pointerType),n=()=>{a.setOpen(!1,Cr(gr,e)),u?.events.emit(`floating.closed`,e)};t?f.openChangeTimeout.start(t,n):(f.openChangeTimeout.clear(),n())}function o(e){let t=pr(e);if(!zc(t)){f.interactedInside=!1;return}f.interactedInside=t?.closest(`[aria-haspopup]`)!=null}function c(){f.openChangeTimeout.clear(),p.clear(),u?.events.off(`floating.closed`,_),g()}function h(n){if(e()&&u){u.events.on(`floating.closed`,_);return}if(Fc(n.relatedTarget,a.context.triggerElements))return;let r=l.current.floatingContext?.nodeId??i,o=n.relatedTarget;if(!(u&&r&&V(o)&&Uc(u.nodesRef.current,r,!1).some(e=>H(e.context?.elements.floating,o)))){if(f.handler){f.handler(n);return}g(),m()||t(n)}}function _(t){!u||!d||e()||p.start(0,()=>{u.events.off(`floating.closed`,_),a.setOpen(!1,Cr(gr,t)),u.events.emit(`floating.closed`,t)})}let v=s;return ed(v&&X(v,`mouseenter`,c),v&&X(v,`mouseleave`,h),v&&X(v,`pointerdown`,o,!0),()=>{u?.events.off(`floating.closed`,_)})},[n,s,a,l,r,i,m,g,f,u,d,p])}var tm={current:null};function nm(e,t={}){let{enabled:n=!0,delay:r=0,handleClose:i=null,mouseOnly:a=!1,restMs:o=0,move:s=!0,triggerElementRef:c=tm,externalTree:l,isActiveTrigger:u=!0,getHandleCloseContext:d,isClosing:f,shouldOpen:p}=t,m=`rootStore`in e?e.rootStore:e,{dataRef:h,events:g}=m.context,_=Pd(l),v=$p(m),y=U.useRef(!1),b=td(i),x=td(r),S=td(o),C=td(n),w=td(p),T=td(f),E=ir(()=>Yu(h.current.openEvent?.type,v.interactedInside)),D=ir(()=>w.current?.()!==!1),O=ir((e,t,n)=>{let r=m.context.triggerElements;if(r.hasElement(t))return!e||!H(e,t);if(!V(n))return!1;let i=n;return r.hasMatchingElement(e=>H(e,i))&&(!e||!H(e,i))}),k=ir(()=>{v.handler&&=(Tr(m.select(`domReferenceElement`)).removeEventListener(`mousemove`,v.handler),void 0)}),A=ir(()=>{Zp(v)});return u&&(v.handleCloseOptions=b.current?.__options),U.useEffect(()=>k,[k]),U.useEffect(()=>{if(!n)return;function e(e){e.open?y.current=!1:(y.current=e.reason===gr,k(),v.openChangeTimeout.clear(),v.restTimeout.clear(),v.blockMouseMove=!0,v.restTimeoutPending=!1)}return g.on(`openchange`,e),()=>{g.off(`openchange`,e)}},[n,g,v,k]),U.useEffect(()=>{if(!n)return;function e(e,t=!0){let n=qu(x.current,`close`,v.pointerType);n?v.openChangeTimeout.start(n,()=>{m.setOpen(!1,Cr(gr,e)),_?.events.emit(`floating.closed`,e)}):t&&(v.openChangeTimeout.clear(),m.setOpen(!1,Cr(gr,e)),_?.events.emit(`floating.closed`,e))}let t=c.current??(u?m.select(`domReferenceElement`):null);if(!V(t))return;function r(e){if(v.openChangeTimeout.clear(),v.blockMouseMove=!1,a&&!Yc(v.pointerType))return;let t=Ju(S.current),n=qu(x.current,`open`,v.pointerType),r=pr(e),i=e.currentTarget??null,o=m.select(`domReferenceElement`),s=i;if(V(r)&&!m.context.triggerElements.hasElement(r)){for(let e of m.context.triggerElements.elements())if(H(e,r)){s=e;break}}V(i)&&V(o)&&!m.context.triggerElements.hasElement(i)&&H(i,o)&&(s=o);let c=s==null?!1:O(o,s,r),l=m.select(`open`),u=T.current?.()??m.select(`transitionStatus`)===`ending`,d=!l&&u&&y.current,f=!c&&V(s)&&V(o)&&H(o,s)&&d,p=t>0&&!n,h=c&&(l||d)||f,g=!l||c;if(h){D()&&m.setOpen(!0,Cr(gr,e,s));return}p||(n?v.openChangeTimeout.start(n,()=>{g&&D()&&m.setOpen(!0,Cr(gr,e,s))}):g&&D()&&m.setOpen(!0,Cr(gr,e,s)))}function i(t){if(E()){A();return}k();let n=Tr(m.select(`domReferenceElement`));v.restTimeout.clear(),v.restTimeoutPending=!1;let r=h.current.floatingContext??d?.();if(!Fc(t.relatedTarget,m.context.triggerElements)){if(b.current&&r){m.select(`open`)||v.openChangeTimeout.clear();let i=c.current;v.handler=b.current({...r,tree:_,x:t.clientX,y:t.clientY,onClose(){A(),k(),C.current&&!E()&&i===m.select(`domReferenceElement`)&&e(t,!0)}}),n.addEventListener(`mousemove`,v.handler),v.handler(t);return}(v.pointerType!==`touch`||!H(m.select(`floatingElement`),t.relatedTarget))&&e(t)}}return s?ed(X(t,`mousemove`,r,{once:!0}),X(t,`mouseenter`,r),X(t,`mouseleave`,i)):ed(X(t,`mouseenter`,r),X(t,`mouseleave`,i))},[k,A,h,x,m,n,b,v,u,O,E,a,s,S,c,_,C,d,T,D]),U.useMemo(()=>{if(!n)return;function e(e){v.pointerType=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){let{nativeEvent:t}=e,n=e.currentTarget,r=m.select(`domReferenceElement`),i=m.select(`open`),o=O(r,n,e.target);if(a&&!Yc(v.pointerType))return;if(i&&o&&v.handleCloseOptions?.blockPointerEvents){let e=m.select(`floatingElement`);e&&Qp(v,{scopeElement:v.handleCloseOptions?.getScope?.()??n.ownerDocument.body,referenceElement:n,floatingElement:e})}let s=Ju(S.current);if(i&&!o||s===0||!o&&v.restTimeoutPending&&e.movementX**2+e.movementY**2<2)return;v.restTimeout.clear();function c(){if(v.restTimeoutPending=!1,E())return;let e=m.select(`open`);!v.blockMouseMove&&(!e||o)&&D()&&m.setOpen(!0,Cr(gr,t,n))}v.pointerType===`touch`?vu.flushSync(()=>{c()}):o&&i?c():(v.restTimeoutPending=!0,v.restTimeout.start(s,c))}}},[n,v,E,O,a,m,S,D])}var rm=.1,im=rm*rm,am=.5;function om(e,t,n,r,i,a){return r>=t!=a>=t&&e<=(i-n)*(t-r)/(a-r)+n}function sm(e,t,n,r,i,a,o,s,c,l){let u=!1;return om(e,t,n,r,i,a)&&(u=!u),om(e,t,i,a,o,s)&&(u=!u),om(e,t,o,s,c,l)&&(u=!u),om(e,t,c,l,n,r)&&(u=!u),u}function cm(e,t,n){return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height}function lm(e,t,n,r,i,a){return e>=Math.min(n,i)&&e<=Math.max(n,i)&&t>=Math.min(r,a)&&t<=Math.max(r,a)}function um(e={}){let{blockPointerEvents:t=!1}=e,n=new su,r=({x:e,y:t,placement:r,elements:i,onClose:a,nodeId:o,tree:s})=>{let c=r?.split(`-`)[0],l=!1,u=null,d=null,f=typeof performance<`u`?performance.now():0;function p(e,t){let n=performance.now(),r=n-f;if(u===null||d===null||r===0)return u=e,d=t,f=n,!1;let i=e-u,a=t-d,o=i*i+a*a,s=r*r*im;return u=e,d=t,f=n,o0)}function b(){y()||m()}if(y())return;let x=a.getBoundingClientRect(),S=u.getBoundingClientRect(),C=e>S.right-S.width/2,w=t>S.bottom-S.height/2,T=S.width>x.width,E=S.height>x.height,D=(T?x:S).left,O=(T?x:S).right,k=(E?x:S).top,A=(E?x:S).bottom;if(c===`top`&&t>=x.bottom-1||c===`bottom`&&t<=x.top+1||c===`left`&&e>=x.right-1||c===`right`&&e<=x.left+1){b();return}let j=!1;switch(c){case`top`:j=lm(d,f,D,x.top+1,O,S.bottom-1);break;case`bottom`:j=lm(d,f,D,S.top+1,O,x.bottom-1);break;case`left`:j=lm(d,f,S.right-1,A,x.left+1,k);break;case`right`:j=lm(d,f,x.right-1,A,S.left+1,k);break;default:}if(j)return;if(l&&!cm(d,f,x)){b();return}if(!g&&p(d,f)){b();return}let M=!1;switch(c){case`top`:{let n=T?am/2:am*4,r=T||C?e+n:e-n,i=T?e-n:C?e+n:e-n,a=t+am+1,o=C||T?S.bottom-am:S.top,s=C?T?S.bottom-am:S.top:S.bottom-am;M=sm(d,f,r,a,i,a,S.left,o,S.right,s);break}case`bottom`:{let n=T?am/2:am*4,r=T||C?e+n:e-n,i=T?e-n:C?e+n:e-n,a=t-am,o=C||T?S.top+am:S.bottom,s=C?T?S.top+am:S.bottom:S.top+am;M=sm(d,f,r,a,i,a,S.left,o,S.right,s);break}case`left`:{let n=E?am/2:am*4,r=E||w?t+n:t-n,i=E?t-n:w?t+n:t-n,a=e+am+1,o=w||E?S.right-am:S.left,s=w?E?S.right-am:S.left:S.right-am;M=sm(d,f,o,S.top,s,S.bottom,a,r,a,i);break}case`right`:{let n=E?am/2:am*4,r=E||w?t+n:t-n,i=E?t-n:w?t+n:t-n,a=e-am,o=w||E?S.left+am:S.right,s=w?E?S.left+am:S.right:S.left+am;M=sm(d,f,a,r,a,i,o,S.top,s,S.bottom);break}default:}M?l||n.start(40,b):b()}};return r.__options={...e,blockPointerEvents:t},r}var dm=function(e){return e.nestedDialogs=`--nested-dialogs`,e}({}),fm=function(e){return e[e.open=Mu.open]=`open`,e[e.closed=Mu.closed]=`closed`,e[e.startingStyle=Mu.startingStyle]=`startingStyle`,e[e.endingStyle=Mu.endingStyle]=`endingStyle`,e.nested=`data-nested`,e.nestedDialogOpen=`data-nested-dialog-open`,e}({}),pm=U.createContext(void 0);function mm(){let e=U.useContext(pm);if(e===void 0)throw Error(zt(26));return e}var hm=`ArrowUp`,gm=`ArrowDown`,_m=`ArrowLeft`,vm=`ArrowRight`,ym=`Home`,bm=new Set([_m,vm]),xm=new Set([_m,vm,ym,`End`]),Sm=new Set([hm,gm]),Cm=new Set([hm,gm,ym,`End`]),wm=new Set([...bm,...Sm]),Tm=new Set([...wm,ym,`End`]),Em=new Set([`Shift`,`Control`,`Alt`,`Meta`]);function Dm(e){return Jn(e)&&e.tagName===`INPUT`}function Om(e){return!!(Dm(e)&&e.selectionStart!=null||Jn(e)&&e.tagName===`TEXTAREA`)}function km(e,t,n,r){if(!e||!t||!t.scrollTo)return;let i=e.scrollLeft,a=e.scrollTop,o=e.clientWidthe.scrollLeft+e.clientWidth-a.scrollPaddingRight?i=r+t.offsetWidth+o.scrollMarginRight-e.clientWidth+a.scrollPaddingRight:r-o.scrollMarginLefte.scrollLeft+e.clientWidth-a.scrollPaddingRight&&(i=r+t.offsetWidth+o.scrollMarginRight-e.clientWidth+a.scrollPaddingRight))}if(s&&r!==`horizontal`){let n=Am(e,t,`top`),r=jm(e),i=jm(t);n-i.scrollMarginTope.scrollTop+e.clientHeight-r.scrollPaddingBottom&&(a=n+t.offsetHeight+i.scrollMarginBottom-e.clientHeight+r.scrollPaddingBottom)}e.scrollTo({left:i,top:a,behavior:`auto`})}function Am(e,t,n){let r=n===`left`?`offsetLeft`:`offsetTop`,i=0;for(;t.offsetParent&&(i+=t[r],t.offsetParent!==e);)t=t.offsetParent;return i}function jm(e){let t=getComputedStyle(e);return{scrollMarginTop:parseFloat(t.scrollMarginTop)||0,scrollMarginRight:parseFloat(t.scrollMarginRight)||0,scrollMarginBottom:parseFloat(t.scrollMarginBottom)||0,scrollMarginLeft:parseFloat(t.scrollMarginLeft)||0,scrollPaddingTop:parseFloat(t.scrollPaddingTop)||0,scrollPaddingRight:parseFloat(t.scrollPaddingRight)||0,scrollPaddingBottom:parseFloat(t.scrollPaddingBottom)||0,scrollPaddingLeft:parseFloat(t.scrollPaddingLeft)||0}}var Mm={...Vu,..._u,nestedDialogOpen(e){return e?{[fm.nestedDialogOpen]:``}:null}},Nm=U.forwardRef(function(e,t){let{render:n,className:r,style:i,finalFocus:a,initialFocus:o,...s}=e,{store:c}=ju(),l=c.useState(`descriptionElementId`),u=c.useState(`disablePointerDismissal`),d=c.useState(`floatingRootContext`),f=c.useState(`popupProps`),p=c.useState(`modal`),m=c.useState(`mounted`),h=c.useState(`nested`),g=c.useState(`nestedOpenDialogCount`),_=c.useState(`open`),v=c.useState(`openMethod`),y=c.useState(`titleElementId`),b=c.useState(`transitionStatus`),x=c.useState(`role`),S=d.useState(`floatingId`),C=s.id??S;mm(),bu({open:_,ref:c.context.popupRef,onComplete(){_&&c.context.onOpenChangeComplete?.(!0)}});function w(e){return e===`touch`?c.context.popupRef.current:!0}let T=o===void 0?w:o,E=g>0,D=c.useStateSetter(`popupElement`),O=Ft(`div`,e,{state:{open:_,nested:h,transitionStatus:b,nestedDialogOpen:E},props:[f,{id:C,"aria-labelledby":y??void 0,"aria-describedby":l??void 0,role:x,...Ep,hidden:!m,onKeyDown(e){Tm.has(e.key)&&e.stopPropagation()},style:{[dm.nestedDialogs]:g}},s],ref:[t,c.context.popupRef,D],stateAttributesMapping:Mm});return(0,W.jsx)(Ud,{context:d,openInteractionType:v,disabled:!m,closeOnFocusOut:!u,initialFocus:T,returnFocus:a,modal:p!==!1,restoreFocus:`popup`,children:O})});function Pm(e){return Lt(19)?e:e?`true`:void 0}var Fm=U.forwardRef(function(e,t){let{cutout:n,...r}=e,i;if(n){let e=n.getBoundingClientRect();i=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${e.left}px ${e.top}px,${e.left}px ${e.bottom}px,${e.right}px ${e.bottom}px,${e.right}px ${e.top}px,${e.left}px ${e.top}px)`}return(0,W.jsx)(`div`,{ref:t,role:`presentation`,"data-base-ui-inert":``,...r,style:{position:`fixed`,inset:0,userSelect:`none`,WebkitUserSelect:`none`,clipPath:i}})}),Im=U.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,{store:i}=ju(),a=i.useState(`mounted`),o=i.useState(`modal`),s=i.useState(`open`);return a||n?(0,W.jsx)(pm.Provider,{value:n,children:(0,W.jsxs)(kd,{ref:t,...r,children:[a&&o===!0&&(0,W.jsx)(Fm,{ref:i.context.internalBackdropRef,inert:Pm(!s)}),e.children]})}):null});function Lm(e){let t=U.useRef(!0);t.current&&(t.current=!1,e())}var Rm={},zm={},Bm=``;function Vm(e){if(typeof document>`u`)return!1;let t=Tr(e);return qn(t).innerWidth-t.documentElement.clientWidth>0}function Hm(e){if(!(typeof CSS<`u`&&CSS.supports&&CSS.supports(`scrollbar-gutter`,`stable`))||typeof document>`u`)return!1;let t=Tr(e),n=t.documentElement,r=t.body,i=Hn(n)?n:r,a=i.style.overflowY,o=n.style.scrollbarGutter;n.style.scrollbarGutter=`stable`,i.style.overflowY=`scroll`;let s=i.offsetWidth;i.style.overflowY=`hidden`;let c=i.offsetWidth;return i.style.overflowY=a,n.style.scrollbarGutter=o,s===c}function Um(e){let t=Tr(e),n=t.documentElement,r=t.body,i=Hn(n)?n:r,a={overflowY:i.style.overflowY,overflowX:i.style.overflowX};return Object.assign(i.style,{overflowY:`hidden`,overflowX:`hidden`}),()=>{Object.assign(i.style,a)}}function Wm(e){let t=Tr(e),n=t.documentElement,r=t.body,i=qn(n),a=0,o=0,s=!1,c=du.create();if(bc&&(i.visualViewport?.scale??1)!==1)return()=>{};function l(){let t=i.getComputedStyle(n),c=i.getComputedStyle(r),l=(t.scrollbarGutter||``).includes(`both-edges`)?`stable both-edges`:`stable`;a=n.scrollTop,o=n.scrollLeft,Rm={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},Bm=n.style.scrollBehavior,zm={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};let u=n.scrollHeight>n.clientHeight,d=n.scrollWidth>n.clientWidth,f=t.overflowY===`scroll`||c.overflowY===`scroll`,p=t.overflowX===`scroll`||c.overflowX===`scroll`,m=Math.max(0,i.innerWidth-r.clientWidth),h=Math.max(0,i.innerHeight-r.clientHeight),g=parseFloat(c.marginTop)+parseFloat(c.marginBottom),_=parseFloat(c.marginLeft)+parseFloat(c.marginRight),v=Hn(n)?n:r;if(s=Hm(e),s){n.style.scrollbarGutter=l,v.style.overflowY=`hidden`,v.style.overflowX=`hidden`;return}Object.assign(n.style,{scrollbarGutter:l,overflowY:`hidden`,overflowX:`hidden`}),(u||f)&&(n.style.overflowY=`scroll`),(d||p)&&(n.style.overflowX=`scroll`),Object.assign(r.style,{position:`relative`,height:g||h?`calc(100dvh - ${g+h}px)`:`100dvh`,width:_||m?`calc(100vw - ${_+m}px)`:`100vw`,boxSizing:`border-box`,overflow:`hidden`,scrollBehavior:`unset`}),r.scrollTop=a,r.scrollLeft=o,n.setAttribute(`data-base-ui-scroll-locked`,``),n.style.scrollBehavior=`unset`}function u(){Object.assign(n.style,Rm),Object.assign(r.style,zm),s||(n.scrollTop=a,n.scrollLeft=o,n.removeAttribute(`data-base-ui-scroll-locked`),n.style.scrollBehavior=Bm)}function d(){u(),c.request(l)}l();let f=X(i,`resize`,d);return()=>{c.cancel(),u(),typeof i.removeEventListener==`function`&&f()}}var Gm=new class{lockCount=0;restore=null;timeoutLock=su.create();timeoutUnlock=su.create();acquire(e){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(e)),this.release}release=()=>{--this.lockCount,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(e){if(this.lockCount===0||this.restore!==null)return;let t=Tr(e).documentElement,n=qn(t).getComputedStyle(t).overflowY;if(n===`hidden`||n===`clip`){this.restore=It;return}let r=xc||!Vm(e);this.restore=r?Um(e):Wm(e)}};function Km(e=!0,t=null){B(()=>{if(e)return Gm.acquire(t)},[e,t])}function qm(e){let{store:t,parentContext:n,actionsRef:r,isDrawer:i}=e,a=t.useState(`open`);Pp(t,a),jp(t);let{forceUnmount:o}=Mp(a,t),s=U.useCallback(()=>{t.setOpen(!1,Cr(Sr))},[t]);return U.useImperativeHandle(r,()=>({unmount:o,close:s}),[o,s]),{parentContext:n,isDrawer:i}}function Jm({store:e,dialogRoot:t}){let{parentContext:n,isDrawer:r}=t,i=e.useState(`open`),a=e.useState(`disablePointerDismissal`),o=e.useState(`modal`),s=e.useState(`popupElement`),c=e.useState(`floatingRootContext`),[l,u]=U.useState(0),[d,f]=U.useState(0),p=l===0,m=Xd(c,{outsidePressEvent(){return e.context.internalBackdropRef.current||e.context.backdropRef.current?`intentional`:{mouse:o===`trap-focus`?`sloppy`:`intentional`,touch:`sloppy`}},outsidePress(t){if(!e.context.outsidePressEnabledRef.current||`button`in t&&t.button!==0||`touches`in t&&t.touches.length!==1)return!1;let n=pr(t);if(p&&!a){let t=n;return o&&(e.context.internalBackdropRef.current||e.context.backdropRef.current)?e.context.internalBackdropRef.current===t||e.context.backdropRef.current===t||H(t,s)&&!t?.hasAttribute(`data-base-ui-portal`):!0}return!1},escapeKey:p});return Km(i&&o===!0,s),e.useContextCallback(`onNestedDialogOpen`,(e,t)=>{u(e),f(t)}),e.useContextCallback(`onNestedDialogClose`,()=>{u(0),f(0)}),U.useEffect(()=>(n?.onNestedDialogOpen&&i&&n.onNestedDialogOpen(l+1,d+ +!!r),n?.onNestedDialogClose&&!i&&n.onNestedDialogClose(),()=>{n?.onNestedDialogClose&&i&&n.onNestedDialogClose()}),[r,i,l,d,n]),Np(e,{activeTriggerProps:m.reference??jt,inactiveTriggerProps:m.trigger??jt,popupProps:U.useMemo(()=>Nt(Ep,m.floating),[m.floating]),nestedOpenDialogCount:l,nestedOpenDrawerCount:d}),null}var Ym={...Wp,modal:Q(e=>e.modal),nested:Q(e=>e.nested),nestedOpenDialogCount:Q(e=>e.nestedOpenDialogCount),nestedOpenDrawerCount:Q(e=>e.nestedOpenDrawerCount),disablePointerDismissal:Q(e=>e.disablePointerDismissal),openMethod:Q(e=>e.openMethod),descriptionElementId:Q(e=>e.descriptionElementId),titleElementId:Q(e=>e.titleElementId),viewportElement:Q(e=>e.viewportElement),role:Q(e=>e.role)},Xm=class e extends Sp{constructor(e,t,n=!1){let r=new Fp,i=Zm(e);i.floatingRootContext=Rp(r,t,n),super(i,{popupRef:U.createRef(),backdropRef:U.createRef(),internalBackdropRef:U.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:r,onOpenChange:void 0,onOpenChangeComplete:void 0},Ym)}setOpen=(e,t)=>{if(t.preventUnmountOnClose=()=>{this.set(`preventUnmountingOnClose`,!0)},!e&&t.trigger==null&&this.state.activeTriggerId!=null&&(t.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(e,t),t.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(e,t);let n={open:e};kp(n,e,t.trigger),this.update(n)};static useStore(t,n){return Dp(t,(t,r)=>new e(n,t,r),!0).store}};function Zm(e={}){return{...Lp(),modal:!0,disablePointerDismissal:!1,popupElement:null,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,nestedOpenDrawerCount:0,role:`dialog`,...e}}function Qm(e,t=`dialog`){let{children:n,open:r,defaultOpen:i=!1,onOpenChange:a,onOpenChangeComplete:o,disablePointerDismissal:s=!1,modal:c=!0,actionsRef:l,handle:u,triggerId:d,defaultTriggerId:f=null}=e,p=t===`drawer`,m=t===`alert-dialog`,h=m?!0:c,g=m||s,_=m?`alertdialog`:`dialog`,v=ju(!0),y={modal:h,disablePointerDismissal:g,nested:!!v,role:_},b=Xm.useStore(u?.store,{open:i,openProp:r,activeTriggerId:f,triggerIdProp:d,...y});Lm(()=>{let e=r===void 0&&b.state.open===!1&&i===!0?{open:!0,activeTriggerId:f}:null;m?b.update(e?{...y,...e}:y):e&&b.update(e)}),b.useControlledProp(`openProp`,r),b.useControlledProp(`triggerIdProp`,d),b.useSyncedValues(y),b.useContextCallback(`onOpenChange`,a),b.useContextCallback(`onOpenChangeComplete`,o);let x=b.useState(`open`),S=b.useState(`mounted`),C=b.useState(`payload`),w=qm({store:b,actionsRef:l,parentContext:v?.store.context,isDrawer:p}),T=x||S,E=U.useMemo(()=>({store:b}),[b]);return(0,W.jsx)(ku.Provider,{value:!1,children:(0,W.jsxs)(Au.Provider,{value:E,children:[T&&(0,W.jsx)(Jm,{store:b,dialogRoot:w}),typeof n==`function`?n({payload:C}):n]})})}function $m(e){return Qm(e,U.useContext(ku)?`drawer`:`dialog`)}var eh=U.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,{store:s}=ju(),c=dr(a);return s.useSyncedValueWithCleanup(`titleElementId`,c),Ft(`h2`,e,{ref:t,props:[{id:c},o]})});function th(e){let t=(0,ms.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,W.jsx)($m,{"data-slot":`sheet`,...n}),t[2]=n,t[3]=r),r}function nh(e){let t=(0,ms.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,W.jsx)(Im,{"data-slot":`sheet-portal`,...n}),t[2]=n,t[3]=r),r}function rh(e){let t=(0,ms.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=rn(`data-closed:fade-out-0 data-open:fade-in-0 data-closed:animate-out data-open:animate-in fixed inset-0 z-50 bg-black/80 duration-100 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,W.jsx)(Uu,{className:i,"data-slot":`sheet-overlay`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function ih(e){let t=(0,ms.c)(17),n,r,i,a,o;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5]):({className:r,children:n,side:a,showCloseButton:o,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o);let s=a===void 0?`right`:a,c=o===void 0?!0:o,l;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,W.jsx)(rh,{}),t[6]=l):l=t[6];let u;t[7]===r?u=t[8]:(u=rn(`data-[side=right]:data-closed:slide-out-to-right-10 data-[side=right]:data-open:slide-in-from-right-10 data-[side=left]:data-closed:slide-out-to-left-10 data-[side=left]:data-open:slide-in-from-left-10 data-[side=top]:data-closed:slide-out-to-top-10 data-[side=top]:data-open:slide-in-from-top-10 data-closed:fade-out-0 data-open:fade-in-0 data-[side=bottom]:data-closed:slide-out-to-bottom-10 data-[side=bottom]:data-open:slide-in-from-bottom-10 data-closed:animate-out data-open:animate-in fixed z-50 flex flex-col bg-background bg-clip-padding text-xs/relaxed shadow-lg transition duration-200 ease-in-out data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm`,r),t[7]=r,t[8]=u);let d;t[9]===c?d=t[10]:(d=c&&(0,W.jsxs)(Wu,{"data-slot":`sheet-close`,render:(0,W.jsx)(ar,{className:`absolute top-4 right-4`,size:`icon-sm`,variant:`ghost`}),children:[(0,W.jsx)(ic,{}),(0,W.jsx)(`span`,{className:`sr-only`,children:`Close`})]}),t[9]=c,t[10]=d);let f;return t[11]!==n||t[12]!==i||t[13]!==s||t[14]!==u||t[15]!==d?(f=(0,W.jsxs)(nh,{children:[l,(0,W.jsxs)(Nm,{className:u,"data-side":s,"data-slot":`sheet-content`,...i,children:[n,d]})]}),t[11]=n,t[12]=i,t[13]=s,t[14]=u,t[15]=d,t[16]=f):f=t[16],f}function ah(e){let t=(0,ms.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=rn(`flex flex-col gap-1.5 p-6`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,W.jsx)(`div`,{className:i,"data-slot":`sheet-header`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function oh(e){let t=(0,ms.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=rn(`text-sm font-medium text-foreground`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,W.jsx)(eh,{className:i,"data-slot":`sheet-title`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function sh(e){let t=(0,ms.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=rn(`text-xs/relaxed text-muted-foreground`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,W.jsx)(Gu,{className:i,"data-slot":`sheet-description`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}var ch=U.createContext(void 0);function lh(e){let t=U.useContext(ch);if(t===void 0&&!e)throw Error(zt(72));return t}var uh={...Wp,disabled:Q(e=>e.disabled),instantType:Q(e=>e.instantType),isInstantPhase:Q(e=>e.isInstantPhase),trackCursorAxis:Q(e=>e.trackCursorAxis),disableHoverablePopup:Q(e=>e.disableHoverablePopup),lastOpenChangeReason:Q(e=>e.openChangeReason),closeOnClick:Q(e=>e.closeOnClick),closeDelay:Q(e=>e.closeDelay),hasViewport:Q(e=>e.hasViewport)},dh=class e extends Sp{constructor(e,t,n=!1){let r=new Fp,i={...fh(),...e};i.floatingRootContext=Rp(r,t,n),super(i,{popupRef:U.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:r},uh)}setOpen=(e,t)=>{let n=t.reason,r=n===gr,i=e&&n===`trigger-focus`,a=!e&&(n===`trigger-press`||n===`escape-key`);if(t.preventUnmountOnClose=()=>{this.set(`preventUnmountingOnClose`,!0)},this.context.onOpenChange?.(e,t),t.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(e,t);let o=()=>{let r={open:e,openChangeReason:n};i?r.instantType=`focus`:a?r.instantType=`dismiss`:n===`trigger-hover`&&(r.instantType=void 0),kp(r,e,t.trigger),this.update(r)};r?vu.flushSync(o):o()};cancelPendingOpen(e){this.state.floatingRootContext.dispatchOpenChange(!1,Cr(hr,e))}static useStore(t,n){return Dp(t,(t,r)=>new e(n,t,r)).store}};function fh(){return{...Lp(),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:`none`,disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,hasViewport:!1}}var ph=dp(function(e){let{disabled:t=!1,defaultOpen:n=!1,open:r,disableHoverablePopup:i=!1,trackCursorAxis:a=`none`,actionsRef:o,onOpenChange:s,onOpenChangeComplete:c,handle:l,triggerId:u,defaultTriggerId:d=null,children:f}=e,p=dh.useStore(l?.store,{open:n,openProp:r,activeTriggerId:d,triggerIdProp:u});Lm(()=>{r===void 0&&p.state.open===!1&&n===!0&&p.update({open:!0,activeTriggerId:d})}),p.useControlledProp(`openProp`,r),p.useControlledProp(`triggerIdProp`,u),p.useContextCallback(`onOpenChange`,s),p.useContextCallback(`onOpenChangeComplete`,c);let m=p.useState(`open`),h=!t&&m,g=p.useState(`activeTriggerId`),_=p.useState(`mounted`),v=p.useState(`payload`);p.useSyncedValues({trackCursorAxis:a,disableHoverablePopup:i}),p.useSyncedValue(`disabled`,t),jp(p);let{forceUnmount:y,transitionStatus:b}=Mp(h,p),x=p.useState(`isInstantPhase`),S=p.useState(`instantType`),C=p.useState(`lastOpenChangeReason`),w=U.useRef(null);B(()=>{m&&t&&p.setOpen(!1,Cr(_r))},[m,t,p]),B(()=>{b===`ending`&&C===`none`||b!==`ending`&&x?(S!==`delay`&&(w.current=S),p.set(`instantType`,`delay`)):w.current!==null&&(p.set(`instantType`,w.current),w.current=null)},[b,x,C,S,p]),B(()=>{h&&(g??p.set(`payload`,void 0))},[p,g,h]);let T=U.useCallback(()=>{p.setOpen(!1,Cr(Sr))},[p]);U.useImperativeHandle(o,()=>({unmount:y,close:T}),[y,T]);let E=h||_||!t&&a!==`none`;return(0,W.jsxs)(ch.Provider,{value:p,children:[E&&(0,W.jsx)(mh,{store:p,disabled:t,trackCursorAxis:a}),typeof f==`function`?f({payload:v}):f]})});function mh({store:e,disabled:t,trackCursorAxis:n}){let r=e.useState(`floatingRootContext`),i=Xd(r,{enabled:!t,referencePress:()=>e.select(`closeOnClick`)}),a=Kd(r,{enabled:!t&&n!==`none`,axis:n===`none`?void 0:n});return Np(e,{activeTriggerProps:U.useMemo(()=>Nt(a.reference,i.reference),[a.reference,i.reference]),inactiveTriggerProps:U.useMemo(()=>Nt(a.trigger,i.trigger),[a.trigger,i.trigger]),popupProps:U.useMemo(()=>Nt(Ep,a.floating,i.floating),[a.floating,i.floating])}),null}var hh=U.createContext(void 0);function gh(){return U.useContext(hh)}var _h=function(e){return e[e.popupOpen=Nu.popupOpen]=`popupOpen`,e.triggerDisabled=`data-trigger-disabled`,e}({}),vh=`data-base-ui-tooltip-trigger`;function yh(e){if(`composedPath`in e){let t=e.composedPath();for(let e=0;em.select(`transitionStatus`)===`ending`,shouldOpen(){return!N.current}}),F=Jp(v,{enabled:!A}).reference,oe=e=>{let t=N.current,n=yh(e),r=ie(n),i=y.current,a=i&&n&&H(i,n);if(r&&m.select(`open`)&&m.select(`lastOpenChangeReason`)===`trigger-hover`){m.setOpen(!1,Cr(gr,e));return}if(t&&!r&&a&&!j.current&&!m.select(`open`)&&i&&Yc(te.current)){let t=()=>{!N.current&&!j.current&&!m.select(`open`)&&m.setOpen(!0,Cr(gr,e,i))},n=ne();n===0?(P.clear(),t()):P.start(n,t)}},se=m.useState(`triggerProps`,C);return Ft(`button`,e,{state:{open:_},ref:[t,S,y],props:[ae,F,C||M!==`none`?se:void 0,{onMouseOver(e){oe(e.nativeEvent)},onFocus(e){re(yh(e.nativeEvent))&&e.preventBaseUIHandler()},onMouseLeave(){N.current=!1,P.clear(),te.current=void 0},onPointerEnter(e){te.current=e.pointerType},onPointerDown(e){te.current=e.pointerType,m.set(`closeOnClick`,l),l&&!m.select(`open`)&&m.cancelPendingOpen(e.nativeEvent)},onClick(e){l&&!m.select(`open`)&&m.cancelPendingOpen(e.nativeEvent)},id:h,[_h.triggerDisabled]:A?``:void 0,[vh]:A?void 0:``},f],stateAttributesMapping:zu})}),Sh=U.createContext(void 0);function Ch(){let e=U.useContext(Sh);if(e===void 0)throw Error(zt(70));return e}var wh=U.forwardRef(function(e,t){let{children:n,container:r,className:i,render:a,style:o,...s}=e,{portalNode:c,portalSubtree:l}=Od({container:r,ref:t,componentProps:e,elementProps:s});return!l&&!c?null:(0,W.jsxs)(U.Fragment,{children:[l,c&&vu.createPortal(n,c)]})}),Th=U.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e;return lh().useState(`mounted`)||n?(0,W.jsx)(Sh.Provider,{value:n,children:(0,W.jsx)(wh,{ref:t,...r})}):null}),Eh=U.createContext(void 0);function Dh(){let e=U.useContext(Eh);if(e===void 0)throw Error(zt(71));return e}var Oh=U.createContext(void 0);function kh(){return U.useContext(Oh)?.direction??`ltr`}var Ah=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0,offsetParent:d=`real`}=al(e,t)||{};if(l==null)return{};let f=Cl(u),p={x:n,y:r},m=dl(i),h=ll(m),g=await o.getDimensions(l),_=m===`y`,v=_?`top`:`left`,y=_?`bottom`:`right`,b=_?`clientHeight`:`clientWidth`,x=a.reference[h]+a.reference[m]-p[m]-a.floating[h],S=p[m]-a.reference[m],C=d===`real`?await o.getOffsetParent?.(l):s.floating,w=s.floating[b]||a.floating[h];(!w||!await o.isElement?.(C))&&(w=s.floating[b]||a.floating[h]);let T=x/2-S/2,E=w/2-g[h]/2-1,D=Math.min(f[v],E),O=Math.min(f[y],E),k=D,A=w-g[h]-O,j=w/2-g[h]/2+T,M=il(k,j,A),ee=!c.arrow&&sl(i)!=null&&j!==M&&a.reference[h]/2-(j({...Ah(e),options:[e,t]}),Mh={name:`hide`,async fn(e){let{width:t,height:n,x:r,y:i}=e.rects.reference,a=t===0&&n===0&&r===0&&i===0;return{data:{referenceHidden:(await op().fn(e)).data?.referenceHidden||a}}}},Nh={sideX:`left`,sideY:`top`},Ph={name:`adaptiveOrigin`,async fn(e){let{x:t,y:n,rects:{floating:r},elements:{floating:i},platform:a,strategy:o,placement:s}=e,c=qn(i),l=c.getComputedStyle(i);if(!(l.transitionDuration!==`0s`&&l.transitionDuration!==``))return{x:t,y:n,data:Nh};let u=await a.getOffsetParent?.(i),d={width:0,height:0};if(o===`fixed`&&c?.visualViewport)d={width:c.visualViewport.width,height:c.visualViewport.height};else if(u===c){let e=Tr(i);d={width:e.documentElement.clientWidth,height:e.documentElement.clientHeight}}else await a.isElement?.(u)&&(d=await a.getDimensions(u));let f=ol(s),p=t,m=n;f===`left`&&(p=d.width-(t+r.width)),f===`top`&&(m=d.height-(n+r.height));let h=f===`left`?`right`:Nh.sideX,g=f===`top`?`bottom`:Nh.sideY;return{x:p,y:m,data:{sideX:h,sideY:g}}}};function Fh(e,t,n){let r=e===`inline-start`||e===`inline-end`;return{top:`top`,right:r?n?`inline-start`:`inline-end`:`right`,bottom:`bottom`,left:r?n?`inline-end`:`inline-start`:`left`}[t]}function Ih(e,t,n){let{rects:r,placement:i}=e;return{side:Fh(t,ol(i),n),align:sl(i)||`center`,anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function Lh(e){let{anchor:t,positionMethod:n=`absolute`,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,collisionBoundary:s,collisionPadding:c=5,sticky:l=!1,arrowPadding:u=5,disableAnchorTracking:d=!1,inline:f,keepMounted:p=!1,floatingRootContext:m,mounted:h,collisionAvoidance:g,shiftCrossAxis:_=!1,nodeId:v,adaptiveOrigin:y,lazyFlip:b=!1,externalTree:x}=e,[S,C]=U.useState(null);!h&&S!==null&&C(null);let w=g.side||`flip`,T=g.align||`flip`,E=g.fallbackAxisSide||`end`,D=typeof t==`function`?t:void 0,O=ir(D),k=D?O:t,A=td(t),j=td(h),M=kh()===`rtl`,ee=S||{top:`top`,right:`right`,bottom:`bottom`,left:`left`,"inline-end":M?`left`:`right`,"inline-start":M?`right`:`left`}[r],N=a===`center`?ee:`${ee}-${a}`,P=c,te=+(r===`bottom`),ne=+(r===`top`),re=+(r===`right`),ie=+(r===`left`);typeof P==`number`?P={top:P+te,right:P+ie,bottom:P+ne,left:P+re}:P&&={top:(P.top||0)+te,right:(P.right||0)+ie,bottom:(P.bottom||0)+ne,left:(P.left||0)+re};let ae={boundary:s===`clipping-ancestors`?`clippingAncestors`:s,padding:P},F=U.useRef(null),oe=td(i),se=td(o),I=typeof i==`function`?0:i,ce=typeof o==`function`?0:o,le=[];f&&le.push(f),le.push(tp(e=>{let t=Ih(e,r,M),n=typeof oe.current==`function`?oe.current(t):oe.current,i=typeof se.current==`function`?se.current(t):se.current;return{mainAxis:n,crossAxis:i,alignmentAxis:i}},[I,ce,M,r]));let ue=T===`none`&&w!==`shift`,de=!ue&&(l||_||w===`shift`),fe=w===`none`?null:ip({...ae,padding:{top:P.top+1,right:P.right+1,bottom:P.bottom+1,left:P.left+1},mainAxis:!_&&w===`flip`,crossAxis:T===`flip`?`alignment`:!1,fallbackAxisSideDirection:E}),pe=ue?null:np(e=>{let t=Tr(e.elements.floating).documentElement;return{...ae,rootBoundary:_?{x:0,y:0,width:t.clientWidth,height:t.clientHeight}:void 0,mainAxis:T!==`none`,crossAxis:de,limiter:l||_?void 0:rp(e=>{if(!F.current)return{};let{width:t,height:n}=F.current.getBoundingClientRect(),r=ul(ol(e.placement)),i=r===`y`?t:n,a=r===`y`?P.left+P.right:P.top+P.bottom;return{offset:i/2+a/2}})}},[ae,l,_,P,T]);w===`shift`||T===`shift`||a===`center`?le.push(pe,fe):le.push(fe,pe),le.push(ap({...ae,apply({elements:{floating:e},availableWidth:t,availableHeight:n,rects:r}){if(!j.current)return;let i=e.style;i.setProperty(`--available-width`,`${t}px`),i.setProperty(`--available-height`,`${n}px`);let a=qn(e).devicePixelRatio||1,{x:o,y:s,width:c,height:l}=r.reference,u=(Math.round((o+c)*a)-Math.round(o*a))/a,d=(Math.round((s+l)*a)-Math.round(s*a))/a;i.setProperty(`--anchor-width`,`${u}px`),i.setProperty(`--anchor-height`,`${d}px`)}}),jh(e=>({element:F.current||Tr(e.elements.floating).createElement(`div`),padding:u,offsetParent:`floating`}),[u]),{name:`transformOrigin`,fn(e){let{elements:t,middlewareData:n,placement:a,rects:o,y:s}=e,c=ol(a),l=ul(c),u=F.current,d=n.arrow?.x||0,f=n.arrow?.y||0,p=u?.clientWidth||0,m=u?.clientHeight||0,h=d+p/2,g=f+m/2,_=Math.abs(n.shift?.y||0),v=o.reference.height/2,y=typeof i==`function`?i(Ih(e,r,M)):i,b=_>y,x={top:`${h}px calc(100% + ${y}px)`,bottom:`${h}px ${-y}px`,left:`calc(100% + ${y}px) ${g}px`,right:`${-y}px ${g}px`}[c],S=`${h}px ${o.reference.y+v-s}px`;return t.floating.style.setProperty(`--transform-origin`,de&&l===`y`&&b?S:x),{}}},Mh,y),B(()=>{!h&&m&&m.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[h,m]);let me=U.useMemo(()=>({elementResize:!d&&typeof ResizeObserver<`u`,layoutShift:!d&&typeof IntersectionObserver<`u`}),[d]),{refs:he,elements:ge,x:_e,y:ve,middlewareData:ye,update:be,placement:xe,context:Se,isPositioned:Ce,floatingStyles:we}=Kp({rootContext:m,open:p?h:void 0,placement:N,middleware:le,strategy:n,whileElementsMounted:p?void 0:(...e)=>Vf(...e,me),nodeId:v,externalTree:x}),{sideX:Te,sideY:Ee}=ye.adaptiveOrigin||Nh,De=Ce?n:`fixed`,Oe=U.useMemo(()=>{let e=y?{position:De,[Te]:_e,[Ee]:ve}:{position:De,...we};return Ce||(e.opacity=0),e},[y,De,Te,_e,Ee,ve,we,Ce]),ke=U.useRef(null);B(()=>{if(!h)return;let e=A.current,t=typeof e==`function`?e():e,n=(Rh(t)?t.current:t)||null;n!==ke.current&&(he.setPositionReference(n),ke.current=n)},[h,he,k,A]),U.useEffect(()=>{if(!h)return;let e=A.current;typeof e!=`function`&&Rh(e)&&e.current!==ke.current&&(he.setPositionReference(e.current),ke.current=e.current)},[h,he,k,A]),U.useEffect(()=>{if(p&&h&&ge.domReference&&ge.floating)return Vf(ge.domReference,ge.floating,be,me)},[p,h,ge,be,me]);let Ae=ol(xe),je=Fh(r,Ae,M),Me=sl(xe)||`center`,Ne=!!ye.hide?.referenceHidden;B(()=>{b&&h&&Ce&&C(Ae)},[b,h,Ce,Ae]);let Pe=U.useMemo(()=>({position:`absolute`,top:ye.arrow?.y,left:ye.arrow?.x}),[ye.arrow]),Fe=ye.arrow?.centerOffset!==0;return U.useMemo(()=>({positionerStyles:Oe,arrowStyles:Pe,arrowRef:F,arrowUncentered:Fe,side:je,align:Me,physicalSide:Ae,anchorHidden:Ne,refs:he,context:Se,isPositioned:Ce,update:be}),[Oe,Pe,F,Fe,je,Me,Ae,Ne,he,Se,Ce,be])}function Rh(e){return e!=null&&`current`in e}function zh(e){return e===`starting`?xd:jt}function Bh(e,t,{styles:n,transitionStatus:r,props:i,refs:a,hidden:o,inert:s=!1}){let c={...n};return s&&(c.pointerEvents=`none`),Ft(`div`,e,{state:t,ref:a,props:[{role:`presentation`,hidden:o,style:c},zh(r),i],stateAttributesMapping:Vu})}var Vh=U.forwardRef(function(e,t){let{render:n,className:r,anchor:i,positionMethod:a=`absolute`,side:o=`top`,align:s=`center`,sideOffset:c=0,alignOffset:l=0,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d=5,arrowPadding:f=5,sticky:p=!1,disableAnchorTracking:m=!1,collisionAvoidance:h=Cd,style:g,..._}=e,v=lh(),y=Ch(),b=v.useState(`open`),x=v.useState(`mounted`),S=v.useState(`trackCursorAxis`),C=v.useState(`disableHoverablePopup`),w=v.useState(`floatingRootContext`),T=v.useState(`instantType`),E=v.useState(`transitionStatus`),D=Lh({anchor:i,positionMethod:a,floatingRootContext:w,mounted:x,side:o,sideOffset:c,align:s,alignOffset:l,collisionBoundary:u,collisionPadding:d,sticky:p,arrowPadding:f,disableAnchorTracking:m,keepMounted:y,collisionAvoidance:h,adaptiveOrigin:v.useState(`hasViewport`)?Ph:void 0}),O=Bh(e,U.useMemo(()=>({open:b,side:D.side,align:D.align,anchorHidden:D.anchorHidden,instant:S===`none`?T:`tracking-cursor`}),[b,D.side,D.align,D.anchorHidden,S,T]),{styles:D.positionerStyles,transitionStatus:E,props:_,refs:[t,v.useStateSetter(`positionerElement`)],hidden:!x,inert:!b||S===`both`||C});return(0,W.jsx)(Eh.Provider,{value:D,children:O})}),Hh={...Vu,..._u},Uh=U.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,o=lh(),{side:s,align:c}=Dh(),l=o.useState(`open`),u=o.useState(`instantType`),d=o.useState(`transitionStatus`),f=o.useState(`popupProps`),p=o.useState(`floatingRootContext`),m=o.useState(`disabled`),h=o.useState(`closeDelay`);bu({open:l,ref:o.context.popupRef,onComplete(){l&&o.context.onOpenChangeComplete?.(!0)}}),em(p,{enabled:!m,closeDelay:h});let g=o.useStateSetter(`popupElement`);return Ft(`div`,e,{state:{open:l,side:s,align:c,instant:u,transitionStatus:d},ref:[t,o.context.popupRef,g],props:[f,zh(d),a],stateAttributesMapping:Hh})}),Wh=U.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,o=lh(),{arrowRef:s,side:c,align:l,arrowUncentered:u,arrowStyles:d}=Dh();return Ft(`div`,e,{state:{open:o.useState(`open`),side:c,align:l,uncentered:u,instant:o.useState(`instantType`)},ref:[t,s],props:[{style:d,"aria-hidden":!0},a],stateAttributesMapping:Vu})}),Gh=function(e){let{delay:t,closeDelay:n,timeout:r=400}=e,i=U.useMemo(()=>({delay:t,closeDelay:n}),[t,n]),a=U.useMemo(()=>({open:t,close:n}),[t,n]);return(0,W.jsx)(hh.Provider,{value:i,children:(0,W.jsx)(Qu,{delay:a,timeoutMs:r,children:e.children})})};function Kh(e){let t=(0,ms.c)(6),n,r;t[0]===e?(n=t[1],r=t[2]):({delay:r,...n}=e,t[0]=e,t[1]=n,t[2]=r);let i=r===void 0?0:r,a;return t[3]!==i||t[4]!==n?(a=(0,W.jsx)(Gh,{"data-slot":`tooltip-provider`,delay:i,...n}),t[3]=i,t[4]=n,t[5]=a):a=t[5],a}function qh(e){let t=(0,ms.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,W.jsx)(Kh,{children:(0,W.jsx)(ph,{"data-slot":`tooltip`,...n})}),t[2]=n,t[3]=r),r}function Jh(e){let t=(0,ms.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,W.jsx)(xh,{"data-slot":`tooltip-trigger`,...n}),t[2]=n,t[3]=r),r}function Yh(e){let t=(0,ms.c)(21),n,r,i,a,o,s,c;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],c=t[7]):({className:r,side:a,sideOffset:o,align:s,alignOffset:c,children:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=c);let l=a===void 0?`top`:a,u=o===void 0?4:o,d=s===void 0?`center`:s,f=c===void 0?0:c,p;t[8]===r?p=t[9]:(p=rn(`data-open:fade-in-0 data-open:zoom-in-95 data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-closed:fade-out-0 data-closed:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=delayed-open]:animate-in data-closed:animate-out data-open:animate-in z-50 w-fit max-w-xs origin-(--transform-origin) rounded-md bg-foreground px-3 py-1.5 text-xs text-background **:data-[slot=kbd]:rounded-md`,r),t[8]=r,t[9]=p);let m;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,W.jsx)(Wh,{className:`z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground data-[side=bottom]:top-1 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5`}),t[10]=m):m=t[10];let h;t[11]!==n||t[12]!==i||t[13]!==p?(h=(0,W.jsxs)(Uh,{className:p,"data-slot":`tooltip-content`,...i,children:[n,m]}),t[11]=n,t[12]=i,t[13]=p,t[14]=h):h=t[14];let g;return t[15]!==d||t[16]!==f||t[17]!==l||t[18]!==u||t[19]!==h?(g=(0,W.jsx)(Th,{children:(0,W.jsx)(Vh,{align:d,alignOffset:f,className:`isolate z-50`,side:l,sideOffset:u,children:h})}),t[15]=d,t[16]=f,t[17]=l,t[18]=u,t[19]=h,t[20]=g):g=t[20],g}var Xh=window.matchMedia(`(max-width: 767px)`);function Zh(e){return Xh.addEventListener(`change`,e),()=>Xh.removeEventListener(`change`,e)}function Qh(){return Xh.matches}function $h(){return(0,U.useSyncExternalStore)(Zh,Qh)}var eg=`sidebar_state`,tg=3600*24*7,ng=`12rem`,rg=`16rem`,ig=`3rem`,ag=`b`,og=U.createContext(null);function sg(){let e=U.useContext(og);if(!e)throw Error(`useSidebar must be used within a SidebarProvider.`);return e}function cg(e){let t=(0,ms.c)(36),n,r,i,a,o,s,c;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],c=t[7]):({defaultOpen:c,open:i,onOpenChange:o,className:r,style:s,children:n,...a}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=c);let l=c===void 0?!0:c,u=$h(),[d,f]=U.useState(!1),[p,m]=U.useState(l),h=i??p,g;t[8]!==h||t[9]!==o?(g=e=>{let t=typeof e==`function`?e(h):e;o?o(t):m(t),document.cookie=`${eg}=${t}; path=/; max-age=${tg}`},t[8]=h,t[9]=o,t[10]=g):g=t[10];let _=g,v;t[11]!==u||t[12]!==_?(v=()=>u?f(ug):_(lg),t[11]=u,t[12]=_,t[13]=v):v=t[13];let y=v,b,x;t[14]===y?(b=t[15],x=t[16]):(b=()=>{let e=e=>{e.key===ag&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),y())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},x=[y],t[14]=y,t[15]=b,t[16]=x),U.useEffect(b,x);let S=h?`expanded`:`collapsed`,C;t[17]!==u||t[18]!==h||t[19]!==d||t[20]!==_||t[21]!==S||t[22]!==y?(C={state:S,open:h,setOpen:_,isMobile:u,openMobile:d,setOpenMobile:f,toggleSidebar:y},t[17]=u,t[18]=h,t[19]=d,t[20]=_,t[21]=S,t[22]=y,t[23]=C):C=t[23];let w=C,T;t[24]===r?T=t[25]:(T=rn(`group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar`,r),t[24]=r,t[25]=T);let E;t[26]===s?E=t[27]:(E={"--sidebar-width":ng,"--sidebar-width-icon":ig,...s},t[26]=s,t[27]=E);let D=E,O;t[28]!==n||t[29]!==a||t[30]!==T||t[31]!==D?(O=(0,W.jsx)(`div`,{className:T,"data-slot":`sidebar-wrapper`,style:D,...a,children:n}),t[28]=n,t[29]=a,t[30]=T,t[31]=D,t[32]=O):O=t[32];let k;return t[33]!==w||t[34]!==O?(k=(0,W.jsx)(og.Provider,{value:w,children:O}),t[33]=w,t[34]=O,t[35]=k):k=t[35],k}function lg(e){return!e}function ug(e){return!e}function dg(e){let t=(0,ms.c)(46),n,r,i,a,o,s;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6]):({side:a,variant:o,collapsible:s,className:r,children:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s);let c=a===void 0?`left`:a,l=o===void 0?`sidebar`:o,u=s===void 0?`offExamples`:s,{isMobile:d,state:f,openMobile:p,setOpenMobile:m}=sg();if(u===`none`){let e;t[7]===r?e=t[8]:(e=rn(`flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground`,r),t[7]=r,t[8]=e);let a;return t[9]!==n||t[10]!==i||t[11]!==e?(a=(0,W.jsx)(`div`,{className:e,"data-slot":`sidebar`,...i,children:n}),t[9]=n,t[10]=i,t[11]=e,t[12]=a):a=t[12],a}if(d){let e;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(e={"--sidebar-width":rg},t[13]=e):e=t[13];let r=e,a;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,W.jsxs)(ah,{className:`sr-only`,children:[(0,W.jsx)(oh,{children:`Sidebar`}),(0,W.jsx)(sh,{children:`Displays the mobile sidebar.`})]}),t[14]=a):a=t[14];let o;t[15]===n?o=t[16]:(o=(0,W.jsx)(`div`,{className:`flex h-full w-full flex-col`,children:n}),t[15]=n,t[16]=o);let s;t[17]!==c||t[18]!==o?(s=(0,W.jsxs)(ih,{className:`w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden`,"data-mobile":`true`,"data-sidebar":`sidebar`,"data-slot":`sidebar`,side:c,style:r,children:[a,o]}),t[17]=c,t[18]=o,t[19]=s):s=t[19];let l;return t[20]!==p||t[21]!==i||t[22]!==m||t[23]!==s?(l=(0,W.jsx)(th,{onOpenChange:m,open:p,...i,children:s}),t[20]=p,t[21]=i,t[22]=m,t[23]=s,t[24]=l):l=t[24],l}let h=f===`collapsed`?u:``,g=l===`floating`||l===`inset`?`group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon)`,_;t[25]===g?_=t[26]:(_=rn(`relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear`,`group-data-[collapsible=offExamples]:w-0`,`group-data-[side=right]:rotate-180`,g),t[25]=g,t[26]=_);let v;t[27]===_?v=t[28]:(v=(0,W.jsx)(`div`,{className:_,"data-slot":`sidebar-gap`}),t[27]=_,t[28]=v);let y=c===`left`?`left-0 group-data-[collapsible=offExamples]:left-[calc(var(--sidebar-width)*-1)]`:`right-0 group-data-[collapsible=offExamples]:right-[calc(var(--sidebar-width)*-1)]`,b=l===`floating`||l===`inset`?`p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l`,x;t[29]!==r||t[30]!==y||t[31]!==b?(x=rn(`fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex`,y,b,r),t[29]=r,t[30]=y,t[31]=b,t[32]=x):x=t[32];let S;t[33]===n?S=t[34]:(S=(0,W.jsx)(`div`,{className:`flex size-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:shadow-sm group-data-[variant=floating]:ring-1 group-data-[variant=floating]:ring-sidebar-border`,"data-sidebar":`sidebar`,"data-slot":`sidebar-inner`,children:n}),t[33]=n,t[34]=S);let C;t[35]!==i||t[36]!==x||t[37]!==S?(C=(0,W.jsx)(`div`,{className:x,"data-slot":`sidebar-container`,...i,children:S}),t[35]=i,t[36]=x,t[37]=S,t[38]=C):C=t[38];let w;return t[39]!==c||t[40]!==f||t[41]!==C||t[42]!==h||t[43]!==v||t[44]!==l?(w=(0,W.jsxs)(`div`,{className:`group peer hidden text-sidebar-foreground md:block`,"data-collapsible":h,"data-side":c,"data-slot":`sidebar`,"data-state":f,"data-variant":l,children:[v,C]}),t[39]=c,t[40]=f,t[41]=C,t[42]=h,t[43]=v,t[44]=l,t[45]=w):w=t[45],w}function fg(e){let t=(0,ms.c)(15),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,onClick:r,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let{toggleSidebar:a}=sg(),o;t[4]===n?o=t[5]:(o=rn(n),t[4]=n,t[5]=o);let s;t[6]!==r||t[7]!==a?(s=e=>{r?.(e),a()},t[6]=r,t[7]=a,t[8]=s):s=t[8];let c,l;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,W.jsx)(Js,{}),l=(0,W.jsx)(`span`,{className:`sr-only`,children:`Toggle Sidebar`}),t[9]=c,t[10]=l):(c=t[9],l=t[10]);let u;return t[11]!==i||t[12]!==o||t[13]!==s?(u=(0,W.jsxs)(ar,{className:o,"data-sidebar":`trigger`,"data-slot":`sidebar-trigger`,onClick:s,size:`icon-lg`,variant:`ghost`,...i,children:[c,l]}),t[11]=i,t[12]=o,t[13]=s,t[14]=u):u=t[14],u}function pg(e){let t=(0,ms.c)(9),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let{toggleSidebar:i}=sg(),a;t[3]===n?a=t[4]:(a=rn(`absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border sm:flex`,`in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize`,`[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize`,`group-data-[collapsible=offExamples]:translate-x-0 group-data-[collapsible=offExamples]:after:left-full hover:group-data-[collapsible=offExamples]:bg-sidebar`,`[[data-side=left][data-collapsible=offExamples]_&]:-right-2`,`[[data-side=right][data-collapsible=offExamples]_&]:-left-2`,n),t[3]=n,t[4]=a);let o;return t[5]!==r||t[6]!==a||t[7]!==i?(o=(0,W.jsx)(`button`,{"aria-label":`Toggle Sidebar`,className:a,"data-sidebar":`rail`,"data-slot":`sidebar-rail`,onClick:i,tabIndex:-1,title:`Toggle Sidebar`,...r}),t[5]=r,t[6]=a,t[7]=i,t[8]=o):o=t[8],o}function mg(e){let t=(0,ms.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=rn(`flex flex-col gap-2 p-2`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,W.jsx)(`div`,{className:i,"data-sidebar":`header`,"data-slot":`sidebar-header`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function hg(e){let t=(0,ms.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=rn(`flex flex-col gap-2 p-2`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,W.jsx)(`div`,{className:i,"data-sidebar":`footer`,"data-slot":`sidebar-footer`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function gg(e){let t=(0,ms.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=rn(`mx-2 w-auto bg-sidebar-border`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,W.jsx)(Ou,{className:i,"data-sidebar":`separator`,"data-slot":`sidebar-separator`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function _g(e){let t=(0,ms.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=rn(`no-scrollbar flex min-h-0 flex-1 flex-col gap-0 overflow-auto group-data-[collapsible=icon]:overflow-hidden`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,W.jsx)(`div`,{className:i,"data-sidebar":`content`,"data-slot":`sidebar-content`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function vg(e){let t=(0,ms.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=rn(`relative flex w-full min-w-0 flex-col px-2 py-1`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,W.jsx)(`div`,{className:i,"data-sidebar":`group`,"data-slot":`sidebar-group`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function yg(e){let t=(0,ms.c)(10),n,r,i,a;if(t[0]!==e){let{className:o,render:s,...c}=e;n=s,a=ys,r=`div`,i=Nt({className:rn(`flex h-8 shrink-0 items-center rounded-md px-2 text-xs text-sidebar-foreground/70 ring-sidebar-ring outline-hidden transition-[margin,opacity] duration-200 ease-linear group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0 focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0`,o)},c),t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a}else n=t[1],r=t[2],i=t[3],a=t[4];let o;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(o={slot:`sidebar-group-label`,sidebar:`group-label`},t[5]=o):o=t[5];let s;return t[6]!==n||t[7]!==r||t[8]!==i?(s={defaultTagName:r,props:i,render:n,state:o},t[6]=n,t[7]=r,t[8]=i,t[9]=s):s=t[9],a(s)}function bg(e){let t=(0,ms.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=rn(`flex w-full min-w-0 flex-col gap-px`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,W.jsx)(`ul`,{className:i,"data-sidebar":`menu`,"data-slot":`sidebar-menu`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function xg(e){let t=(0,ms.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=rn(`group/menu-item relative`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,W.jsx)(`li`,{className:i,"data-sidebar":`menu-item`,"data-slot":`sidebar-menu-item`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}var Sg=Rt(`peer/menu-button group/menu-button flex w-full items-center gap-2 overflow-hidden rounded-[calc(var(--radius-sm)+2px)] p-2 text-left text-xs ring-sidebar-ring outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-active:bg-sidebar-accent data-active:font-medium data-active:text-sidebar-accent-foreground data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate`,{variants:{variant:{default:`hover:bg-sidebar-accent hover:text-sidebar-accent-foreground`,outline:`bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]`},size:{default:`h-8 text-xs`,sm:`h-7 text-xs`,lg:`h-12 text-xs group-data-[collapsible=icon]:p-0!`}},defaultVariants:{variant:`default`,size:`default`}});function Cg(e){let t=(0,ms.c)(15),{render:n,isActive:r,variant:i,size:a,tooltip:o,className:s,...c}=e,l=r===void 0?!1:r,u=i===void 0?`default`:i,d=a===void 0?`default`:a,{isMobile:f,state:p}=sg(),m=Nt({className:rn(Sg({variant:u,size:d}),s)},c),h=o?Jh:n,g;t[0]!==l||t[1]!==d?(g={slot:`sidebar-menu-button`,sidebar:`menu-button`,size:d,active:l},t[0]=l,t[1]=d,t[2]=g):g=t[2];let _;t[3]!==m||t[4]!==h||t[5]!==g?(_={defaultTagName:`button`,props:m,render:h,state:g},t[3]=m,t[4]=h,t[5]=g,t[6]=_):_=t[6];let v=ys(_);if(!o)return v;let y;t[7]===o?y=t[8]:(y=typeof o==`string`?{children:o}:o,t[7]=o,t[8]=y);let b=y,x=p!==`collapsed`||f,S;t[9]!==x||t[10]!==b?(S=(0,W.jsx)(Yh,{align:`center`,hidden:x,side:`right`,...b}),t[9]=x,t[10]=b,t[11]=S):S=t[11];let C;return t[12]!==v||t[13]!==S?(C=(0,W.jsxs)(qh,{children:[v,S]}),t[12]=v,t[13]=S,t[14]=C):C=t[14],C}var wg=class{async sign(e,t,n){return e}},Tg=`ref`,Eg=-1,Dg=!0,Og=`isSet`,kg=`PartitionResult`,Ag=`booleanEquals`,jg=`stringEquals`,Mg=`getAttr`,Ng=`us-east-1`,Pg=`sigv4`,Fg=`sts`,Ig=`https://sts.{Region}.{PartitionResult#dnsSuffix}`,Lg={[Tg]:`Endpoint`},Rg={[Tg]:`Region`},zg={[Tg]:kg},Bg={},Vg=[Rg],Hg={conditions:[[Og,[Lg]],[Og,Vg],[`aws.partition`,Vg,kg],[Ag,[{[Tg]:`UseFIPS`},Dg]],[Ag,[{[Tg]:`UseDualStack`},Dg]],[jg,[Rg,`aws-global`]],[Ag,[{[Tg]:`UseGlobalEndpoint`},Dg]],[jg,[Rg,`eu-central-1`]],[Ag,[{fn:Mg,argv:[zg,`supportsDualStack`]},Dg]],[Ag,[{fn:Mg,argv:[zg,`supportsFIPS`]},Dg]],[jg,[Rg,`ap-south-1`]],[jg,[Rg,`eu-north-1`]],[jg,[Rg,`eu-west-1`]],[jg,[Rg,`eu-west-2`]],[jg,[Rg,`eu-west-3`]],[jg,[Rg,`sa-east-1`]],[jg,[Rg,Ng]],[jg,[Rg,`us-east-2`]],[jg,[Rg,`us-west-2`]],[jg,[Rg,`us-west-1`]],[jg,[Rg,`ca-central-1`]],[jg,[Rg,`ap-southeast-1`]],[jg,[Rg,`ap-northeast-1`]],[jg,[Rg,`ap-southeast-2`]],[jg,[{fn:Mg,argv:[zg,`name`]},`aws-us-gov`]]],results:[[Eg],[`https://sts.amazonaws.com`,{authSchemes:[{name:Pg,signingName:Fg,signingRegion:Ng}]}],[Ig,{authSchemes:[{name:Pg,signingName:Fg,signingRegion:`{Region}`}]}],[Eg,`Invalid Configuration: FIPS and custom endpoint are not supported`],[Eg,`Invalid Configuration: Dualstack and custom endpoint are not supported`],[Lg,Bg],[`https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}`,Bg],[Eg,`FIPS and DualStack are enabled, but this partition does not support one or both`],[`https://sts.{Region}.amazonaws.com`,Bg],[`https://sts-fips.{Region}.{PartitionResult#dnsSuffix}`,Bg],[Eg,`FIPS is enabled but this partition does not support FIPS`],[`https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}`,Bg],[Eg,`DualStack is enabled but this partition does not support DualStack`],[Ig,Bg],[Eg,`Invalid Configuration: Missing Region`]]},Ug=2,Wg=new Int32Array([-1,1,-1,0,30,3,1,4,100000014,2,5,100000014,3,25,6,4,24,7,5,100000001,8,6,9,100000013,7,100000001,10,10,100000001,11,11,100000001,12,12,100000001,13,13,100000001,14,14,100000001,15,15,100000001,16,16,100000001,17,17,100000001,18,18,100000001,19,19,100000001,20,20,100000001,21,21,100000001,22,22,100000001,23,23,100000001,100000002,8,100000011,100000012,4,28,26,9,27,100000010,24,100000008,100000009,8,29,100000007,9,100000006,100000007,3,100000003,31,4,100000004,100000005]),Gg=On.from(Wg,Ug,Hg.conditions,Hg.results),Kg=new Nn({size:50,params:[`Endpoint`,`Region`,`UseDualStack`,`UseFIPS`,`UseGlobalEndpoint`]}),qg=(e,t={})=>Kg.get(e,()=>Tn(Gg,{endpointParams:e,logger:t.logger}));Fn.aws=Jt;var Jg=(e=>async(t,n,r)=>{if(!r)throw Error("Could not find `input` for `defaultEndpointRuleSetHttpAuthSchemeParametersProvider`");let i=await e(t,n,r),a=Yt(n)?.commandInstance?.constructor?.getEndpointParameterInstructions;if(!a)throw Error(`getEndpointParameterInstructions() is not defined on '${n.commandName}'`);let o=await Dn(r,{getEndpointParameterInstructions:a},t);return Object.assign(i,o)})(async(e,t,n)=>({operation:Yt(t).operation,region:await on(e.region)()||(()=>{throw Error("expected `region` to be configured for `aws.auth#sigv4`")})()}));function Yg(e){return{schemeId:`aws.auth#sigv4`,signingProperties:{name:`sts`,region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}function Xg(e){return{schemeId:`aws.auth#sigv4a`,signingProperties:{name:`sts`,region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}function Zg(e){return{schemeId:`smithy.api#noAuth`}}var Qg=((e,t,n)=>r=>{let i=e(r).properties?.authSchemes;if(!i)return t(r);let a=[];for(let e of i){let{name:t,properties:o={},...s}=e,c=t.toLowerCase();t!==c&&console.warn(`HttpAuthScheme has been normalized with lowercasing: '${t}' to '${c}'`);let l;if(c===`sigv4a`){l=`aws.auth#sigv4a`;let e=i.find(e=>{let t=e.name.toLowerCase();return t!==`sigv4a`&&t.startsWith(`sigv4`)});if(gn.sigv4aDependency()===`none`&&e)continue}else if(c.startsWith(`sigv4`))l=`aws.auth#sigv4`;else throw Error(`Unknown HttpAuthScheme found in '@smithy.rules#endpointRuleSet': '${c}'`);let u=n[l];if(!u)throw Error(`Could not find HttpAuthOption create function for '${l}'`);let d=u(r);d.schemeId=l,d.signingProperties={...d.signingProperties||{},...s,...o},a.push(d)}return a})(qg,e=>{let t=[];switch(e.operation){case`AssumeRoleWithSAML`:t.push(Zg(e)),t.push(Xg(e));break;case`AssumeRoleWithWebIdentity`:t.push(Zg(e)),t.push(Xg(e));break;default:t.push(Yg(e)),t.push(Xg(e))}return t},{"aws.auth#sigv4":Yg,"aws.auth#sigv4a":Xg,"smithy.api#noAuth":Zg}),$g=e=>{let t=cn(Kt(e));return Object.assign(t,{authSchemePreference:on(e.authSchemePreference??[])})},e_=e=>Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,useGlobalEndpoint:e.useGlobalEndpoint??!1,defaultSigningName:`sts`}),t_={UseGlobalEndpoint:{type:`builtInParams`,name:`useGlobalEndpoint`},UseFIPS:{type:`builtInParams`,name:`useFipsEndpoint`},Endpoint:{type:`builtInParams`,name:`endpoint`},Region:{type:`builtInParams`,name:`region`},UseDualStack:{type:`builtInParams`,name:`useDualstackEndpoint`}},n_={name:`@aws-sdk/client-sts`,description:`AWS SDK for JavaScript Sts Client for Node.js, Browser and React Native`,version:`3.1067.0`,scripts:{build:`concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs`,"build:cjs":`node ../../scripts/compilation/inline`,"build:es":`tsc -p tsconfig.es.json`,"build:include:deps":`yarn g:turbo run build -F="$npm_package_name"`,"build:types":`premove ./dist-types tsconfig.types.tsbuildinfo && tsc -p tsconfig.types.json`,"build:types:downlevel":`downlevel-dts dist-types dist-types/ts3.4`,clean:`premove dist-cjs dist-es dist-types tsconfig.cjs.tsbuildinfo tsconfig.es.tsbuildinfo tsconfig.types.tsbuildinfo`,"extract:docs":`api-extractor run --local`,"generate:client":`node ../../scripts/generate-clients/single-service --solo sts`,test:`yarn g:vitest run`,"test:e2e":`yarn g:vitest run -c vitest.config.e2e.mts --mode development`,"test:e2e:watch":`yarn g:vitest watch -c vitest.config.e2e.mts`,"test:index":`tsc --noEmit ./test/index-types.ts && node ./test/index-objects.spec.mjs`,"test:integration":`yarn g:vitest run --passWithNoTests -c vitest.config.integ.mts`,"test:integration:watch":`yarn g:vitest run --passWithNoTests -c vitest.config.integ.mts`,"test:watch":`yarn g:vitest watch`},main:`./dist-cjs/index.js`,types:`./dist-types/index.d.ts`,module:`./dist-es/index.js`,sideEffects:!1,dependencies:{"@aws-crypto/sha256-browser":`5.2.0`,"@aws-crypto/sha256-js":`5.2.0`,"@aws-sdk/core":`^3.974.20`,"@aws-sdk/credential-provider-node":`^3.972.55`,"@aws-sdk/signature-v4-multi-region":`^3.996.34`,"@aws-sdk/types":`^3.973.12`,"@smithy/core":`^3.24.6`,"@smithy/fetch-http-handler":`^5.4.6`,"@smithy/node-http-handler":`^4.7.6`,"@smithy/types":`^4.14.3`,tslib:`^2.6.2`},devDependencies:{"@smithy/snapshot-testing":`^2.1.7`,"@tsconfig/node20":`20.1.8`,"@types/node":`^20.14.8`,concurrently:`7.0.0`,"downlevel-dts":`0.10.1`,premove:`4.0.0`,typescript:`~5.8.3`,vitest:`^4.0.17`},engines:{node:`>=20.0.0`},typesVersions:{"<4.5":{"dist-types/*":[`dist-types/ts3.4/*`]}},files:[`dist-*/**`],author:{name:`AWS SDK for JavaScript Team`,url:`https://aws.amazon.com/sdk-for-javascript/`},license:`Apache-2.0`,browser:{"./dist-es/runtimeConfig":`./dist-es/runtimeConfig.browser`},"react-native":{"./dist-es/runtimeConfig":`./dist-es/runtimeConfig.native`},homepage:`https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sts`,repository:{type:`git`,url:`https://github.com/aws/aws-sdk-js-v3.git`,directory:`clients/client-sts`}},r_=class e extends zn{constructor(t){super(t),Object.setPrototypeOf(this,e.prototype)}},i_=class e extends r_{name=`ExpiredTokenException`;$fault=`client`;constructor(t){super({name:`ExpiredTokenException`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype)}},a_=class e extends r_{name=`MalformedPolicyDocumentException`;$fault=`client`;constructor(t){super({name:`MalformedPolicyDocumentException`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype)}},o_=class e extends r_{name=`PackedPolicyTooLargeException`;$fault=`client`;constructor(t){super({name:`PackedPolicyTooLargeException`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype)}},s_=class e extends r_{name=`RegionDisabledException`;$fault=`client`;constructor(t){super({name:`RegionDisabledException`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype)}},c_=class e extends r_{name=`IDPRejectedClaimException`;$fault=`client`;constructor(t){super({name:`IDPRejectedClaimException`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype)}},l_=class e extends r_{name=`InvalidIdentityTokenException`;$fault=`client`;constructor(t){super({name:`InvalidIdentityTokenException`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype)}},u_=class e extends r_{name=`IDPCommunicationErrorException`;$fault=`client`;$retryable={};constructor(t){super({name:`IDPCommunicationErrorException`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype)}},d_=class e extends r_{name=`InvalidAuthorizationMessageException`;$fault=`client`;constructor(t){super({name:`InvalidAuthorizationMessageException`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype)}},f_=class e extends r_{name=`ExpiredTradeInTokenException`;$fault=`client`;constructor(t){super({name:`ExpiredTradeInTokenException`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype)}},p_=class e extends r_{name=`JWTPayloadSizeExceededException`;$fault=`client`;constructor(t){super({name:`JWTPayloadSizeExceededException`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype)}},m_=class e extends r_{name=`OutboundWebIdentityFederationDisabledException`;$fault=`client`;constructor(t){super({name:`OutboundWebIdentityFederationDisabledException`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype)}},h_=class e extends r_{name=`SessionDurationEscalationException`;$fault=`client`;constructor(t){super({name:`SessionDurationEscalationException`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype)}},g_=`Arn`,__=`AccessKeyId`,v_=`Account`,y_=`Credentials`,b_=`DurationSeconds`,x_=`Expiration`,S_=`ExpiredTokenException`,C_=`ExpiredTradeInTokenException`,w_=`GetCallerIdentity`,T_=`GetCallerIdentityRequest`,E_=`GetCallerIdentityResponse`,D_=`GetSessionToken`,O_=`GetSessionTokenRequest`,k_=`GetSessionTokenResponse`,A_=`InvalidAuthorizationMessageException`,j_=`IDPCommunicationErrorException`,M_=`IDPRejectedClaimException`,N_=`InvalidIdentityTokenException`,P_=`JWTPayloadSizeExceededException`,F_=`MalformedPolicyDocumentException`,I_=`OutboundWebIdentityFederationDisabledException`,L_=`PackedPolicyTooLargeException`,R_=`RegionDisabledException`,z_=`SecretAccessKey`,B_=`SessionDurationEscalationException`,V_=`SerialNumber`,H_=`SessionToken`,U_=`TokenCode`,W_=`UserId`,G_=`accessKeySecretType`,K_=`awsQueryError`,q_=`client`,J_=`error`,Y_=`httpError`,X_=`message`,Z_=`smithy.ts.sdk.synthetic.com.amazonaws.sts`,Q_=`com.amazonaws.sts`,$_=Wt.for(Z_),ev=[-3,Z_,`STSServiceException`,0,[],[]];$_.registerError(ev,r_);var tv=Wt.for(Q_),nv=[-3,Q_,S_,{[K_]:[`ExpiredTokenException`,400],[J_]:q_,[Y_]:400},[X_],[0]];tv.registerError(nv,i_);var rv=[-3,Q_,C_,{[K_]:[`ExpiredTradeInTokenException`,400],[J_]:q_,[Y_]:400},[X_],[0]];tv.registerError(rv,f_);var iv=[-3,Q_,j_,{[K_]:[`IDPCommunicationError`,400],[J_]:q_,[Y_]:400},[X_],[0]];tv.registerError(iv,u_);var av=[-3,Q_,M_,{[K_]:[`IDPRejectedClaim`,403],[J_]:q_,[Y_]:403},[X_],[0]];tv.registerError(av,c_);var ov=[-3,Q_,A_,{[K_]:[`InvalidAuthorizationMessageException`,400],[J_]:q_,[Y_]:400},[X_],[0]];tv.registerError(ov,d_);var sv=[-3,Q_,N_,{[K_]:[`InvalidIdentityToken`,400],[J_]:q_,[Y_]:400},[X_],[0]];tv.registerError(sv,l_);var cv=[-3,Q_,P_,{[K_]:[`JWTPayloadSizeExceededException`,400],[J_]:q_,[Y_]:400},[X_],[0]];tv.registerError(cv,p_);var lv=[-3,Q_,F_,{[K_]:[`MalformedPolicyDocument`,400],[J_]:q_,[Y_]:400},[X_],[0]];tv.registerError(lv,a_);var uv=[-3,Q_,I_,{[K_]:[`OutboundWebIdentityFederationDisabledException`,403],[J_]:q_,[Y_]:403},[X_],[0]];tv.registerError(uv,m_);var dv=[-3,Q_,L_,{[K_]:[`PackedPolicyTooLarge`,400],[J_]:q_,[Y_]:400},[X_],[0]];tv.registerError(dv,o_);var fv=[-3,Q_,R_,{[K_]:[`RegionDisabledException`,403],[J_]:q_,[Y_]:403},[X_],[0]];tv.registerError(fv,s_);var pv=[-3,Q_,B_,{[K_]:[`SessionDurationEscalationException`,403],[J_]:q_,[Y_]:403},[X_],[0]];tv.registerError(pv,h_);var mv=[$_,tv],hv=[0,Q_,G_,8,0],gv=[3,Q_,y_,0,[__,z_,H_,x_],[0,[()=>hv,0],0,4],4],_v=[3,Q_,T_,0,[],[]],vv=[3,Q_,E_,0,[W_,v_,g_],[0,0,0]],yv=[3,Q_,O_,0,[b_,V_,U_],[1,0,0]],bv=[3,Q_,k_,0,[y_],[[()=>gv,0]]],xv=[9,Q_,w_,0,()=>_v,()=>vv],Sv=[9,Q_,D_,0,()=>yv,()=>bv],Cv=e=>({apiVersion:`2011-06-15`,base64Decoder:e?.base64Decoder??Dr,base64Encoder:e?.base64Encoder??kr,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??qg,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??Qg,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:`aws.auth#sigv4`,identityProvider:e=>e.getIdentityProvider(`aws.auth#sigv4`),signer:new Vt},{schemeId:`aws.auth#sigv4a`,identityProvider:e=>e.getIdentityProvider(`aws.auth#sigv4a`),signer:new jn},{schemeId:`smithy.api#noAuth`,identityProvider:e=>e.getIdentityProvider(`smithy.api#noAuth`)||(async()=>({})),signer:new wg}],logger:e?.logger??new xn,protocol:e?.protocol??En,protocolSettings:e?.protocolSettings??{defaultNamespace:`com.amazonaws.sts`,errorTypeRegistries:mv,xmlNamespace:`https://sts.amazonaws.com/doc/2011-06-15/`,version:`2011-06-15`,serviceTarget:`AWSSecurityTokenServiceV20110615`},serviceId:e?.serviceId??`STS`,signerConstructor:e?.signerConstructor??gn,urlParser:e?.urlParser??An,utf8Decoder:e?.utf8Decoder??Er,utf8Encoder:e?.utf8Encoder??Or}),wv=e=>{let t=sn(e),n=()=>t().then(Sn),r=Cv(e);return{...r,...e,runtime:`browser`,defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??Ar,credentialDefaultProvider:e?.credentialDefaultProvider??(e=>()=>Promise.reject(Error(`Credential is missing`))),defaultUserAgentProvider:e?.defaultUserAgentProvider??Qt({serviceId:r.serviceId,clientVersion:n_.version}),maxAttempts:e?.maxAttempts??3,region:e?.region??Mn(`Region is missing`),requestHandler:hn.create(e?.requestHandler??n),retryMode:e?.retryMode??(async()=>(await n()).retryMode||yn),sha256:e?.sha256??Ut,streamCollector:e?.streamCollector??Rn,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(!1)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(!1))}},Tv=e=>{let t=e.httpAuthSchemes,n=e.httpAuthSchemeProvider,r=e.credentials;return{setHttpAuthScheme(e){let n=t.findIndex(t=>t.schemeId===e.schemeId);n===-1?t.push(e):t.splice(n,1,e)},httpAuthSchemes(){return t},setHttpAuthSchemeProvider(e){n=e},httpAuthSchemeProvider(){return n},setCredentials(e){r=e},credentials(){return r}}},Ev=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}),Dv=(e,t)=>{let n=Object.assign(kn(e),Ln(e),Bt(e),Tv(e));return t.forEach(e=>e.configure(n)),Object.assign(e,an(n),Bn(n),wn(n),Ev(n))},Ov=class extends ln{config;constructor(...[e]){let t=wv(e||{});super(t),this.initConfig=t;let n=Dv($g(Cn(tn(un(bn(pn(e_(t))))))),e?.extensions||[]);this.config=n,this.middlewareStack.use(qt(this.config)),this.middlewareStack.use(nn(this.config)),this.middlewareStack.use(en(this.config)),this.middlewareStack.use(fn(this.config)),this.middlewareStack.use(Xt(this.config)),this.middlewareStack.use(vn(this.config)),this.middlewareStack.use(_n(this.config)),this.middlewareStack.use(Zt(this.config,{httpAuthSchemeParametersProvider:Jg,identityProviderConfigProvider:async e=>new Vn({"aws.auth#sigv4":e.credentials,"aws.auth#sigv4a":e.credentials})})),this.middlewareStack.use(Ht(this.config))}destroy(){super.destroy()}},kv=class extends L.classBuilder().ep(t_).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions())]}).s(`AWSSecurityTokenServiceV20110615`,`GetCallerIdentity`,{}).n(`STSClient`,`GetCallerIdentityCommand`).sc(xv).build(){},Av=class extends L.classBuilder().ep(t_).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions())]}).s(`AWSSecurityTokenServiceV20110615`,`GetSessionToken`,{}).n(`STSClient`,`GetSessionTokenCommand`).sc(Sv).build(){},jv=`ap-southeast-2`,Mv=9999,Nv=class extends Error{status;constructor(e,t,n){super(e),this.name=t,this.status=n}};function Pv(e,t){let n=`<${t}>`,r=``,i=e.indexOf(n);if(i===-1)return null;let a=e.indexOf(r,i+n.length);return a===-1?null:e.slice(i+n.length,a)}async function Fv({action:e,credentials:t,service:n=`spinifex`}){let r=window.location.protocol.replace(`:`,``),i=`Action=${e}`,a=new dn({method:`POST`,protocol:r,hostname:`localhost`,port:Mv,path:`/`,headers:{host:`localhost:${Mv}`,"content-type":`application/x-www-form-urlencoded`},body:i}),o=await new Gt({credentials:{accessKeyId:t.accessKeyId,secretAccessKey:t.secretAccessKey,sessionToken:t.sessionToken},region:jv,service:n,sha256:Ut}).sign(a),s={};for(let[e,t]of Object.entries(o.headers))typeof t==`string`&&(s[e]=t);let c=`${window.location.protocol}//${window.location.host}/proxy/awsgw/`,l=await fetch(c,{method:`POST`,headers:s,body:i});if(!l.ok){let t=await l.text().catch(()=>``),n=Pv(t,`Code`),r=Pv(t,`Message`)??t;throw new Nv(`${e} failed: ${l.status}${r?` - ${r}`:``}`,n??`SignedFetchError`,l.status)}return await l.json()}var Iv=`ap-southeast-2`,Lv=`${window.location.protocol}//localhost:9999`,Rv=43200;function zv(e){e.middlewareStack.add(e=>async t=>(dn.isInstance(t.request)&&(t.request.hostname=window.location.hostname,t.request.port=Number(window.location.port)||443,t.request.path=`/proxy/awsgw${t.request.path}`),await e(t)),{step:`finalizeRequest`,name:`proxyRewrite`,override:!0})}function Bv(e){let t=new Ov({endpoint:Lv,region:Iv,credentials:e});return zv(t),t}function Vv(){let e=In();if(!e)throw Error(`AWS credentials not configured`);return Bv({accessKeyId:e.accessKeyId,secretAccessKey:e.secretAccessKey,sessionToken:e.sessionToken})}async function Hv(e){let t=(await Bv(e).send(new Av({DurationSeconds:Rv}))).Credentials;if(!t?.AccessKeyId||!t.SecretAccessKey||!t.SessionToken||!t.Expiration)throw Error(`GetSessionToken returned incomplete credentials`);return{accessKeyId:t.AccessKeyId,secretAccessKey:t.SecretAccessKey,sessionToken:t.SessionToken,expiration:t.Expiration.toISOString()}}var Uv=`000000000001`;function Wv(e){let t=e?.indexOf(`:user/`)??-1;return t===-1||e===void 0?null:e.slice(t+6)||null}var Gv=(0,U.createContext)(void 0);function Kv({children:e}){let[t,n]=(0,U.useState)({isAdmin:!1,accountId:null,userName:null,version:null,license:null,loading:!0});return(0,U.useEffect)(()=>{async function e(){let e=In();if(!e){n(e=>({...e,loading:!1}));return}try{let t=await Vv().send(new kv({})),r=t.Account??null,i=r===Uv,a=null;if(i)try{a=await Fv({action:`GetVersion`,credentials:e})}catch{}n({isAdmin:i,accountId:r,userName:Wv(t.Arn),version:a,license:a?.license??null,loading:!1})}catch{n(e=>({...e,loading:!1}))}}e()},[]),(0,W.jsx)(Gv,{value:t,children:e})}function qv(){let e=(0,U.useContext)(Gv);if(e===void 0)throw Error(`useAdmin must be used within an AdminProvider`);return e}var Jv=new Set([`InvalidClientTokenId`,`SignatureDoesNotMatch`,`AuthFailure`,`MissingAuthenticationToken`,`IncompleteSignature`,`UnrecognizedClientException`,`ExpiredToken`,`ExpiredTokenException`,`InvalidAccessKeyId`]);function Yv(e){if(typeof e!=`object`||!e||!(`name`in e))return!1;let{name:t}=e;return typeof t==`string`&&Jv.has(t)}var Xv=class extends L.classBuilder().ep(Qe).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions())]}).s(`CertificateManager`,`ListCertificates`,{}).n(`ACMClient`,`ListCertificatesCommand`).sc(at).build(){},Zv=class extends L.classBuilder().ep(ft).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DescribeAddresses`,{}).n(`EC2Client`,`DescribeAddressesCommand`).sc(Pe).build(){},Qv=class extends L.classBuilder().ep(ft).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DescribeAvailabilityZones`,{}).n(`EC2Client`,`DescribeAvailabilityZonesCommand`).sc(Fe).build(){},$v=class extends L.classBuilder().ep(ft).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DescribeIamInstanceProfileAssociations`,{}).n(`EC2Client`,`DescribeIamInstanceProfileAssociationsCommand`).sc(ye).build(){},ey=class extends L.classBuilder().ep(ft).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DescribeImages`,{}).n(`EC2Client`,`DescribeImagesCommand`).sc(Ee).build(){},ty=class extends L.classBuilder().ep(ft).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DescribeInstances`,{}).n(`EC2Client`,`DescribeInstancesCommand`).sc(Le).build(){},ny=class extends L.classBuilder().ep(ft).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DescribeInstanceTypes`,{}).n(`EC2Client`,`DescribeInstanceTypesCommand`).sc(Ne).build(){},ry=class extends L.classBuilder().ep(ft).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DescribeInternetGateways`,{}).n(`EC2Client`,`DescribeInternetGatewaysCommand`).sc(kt).build(){},iy=class extends L.classBuilder().ep(ft).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DescribeKeyPairs`,{}).n(`EC2Client`,`DescribeKeyPairsCommand`).sc(_e).build(){},ay=class extends L.classBuilder().ep(ft).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DescribeNatGateways`,{}).n(`EC2Client`,`DescribeNatGatewaysCommand`).sc(He).build(){},oy=class extends L.classBuilder().ep(ft).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DescribePlacementGroups`,{}).n(`EC2Client`,`DescribePlacementGroupsCommand`).sc(we).build(){},sy=class extends L.classBuilder().ep(ft).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DescribeRegions`,{}).n(`EC2Client`,`DescribeRegionsCommand`).sc(ze).build(){},cy=class extends L.classBuilder().ep(ft).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DescribeRouteTables`,{}).n(`EC2Client`,`DescribeRouteTablesCommand`).sc(Ge).build(){},ly=class extends L.classBuilder().ep(ft).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DescribeSecurityGroups`,{}).n(`EC2Client`,`DescribeSecurityGroupsCommand`).sc(xe).build(){},uy=class extends L.classBuilder().ep(ft).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DescribeSnapshots`,{}).n(`EC2Client`,`DescribeSnapshotsCommand`).sc(je).build(){},dy=class extends L.classBuilder().ep(ft).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DescribeSubnets`,{}).n(`EC2Client`,`DescribeSubnetsCommand`).sc(vt).build(){},fy=class extends L.classBuilder().ep(ft).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DescribeVolumes`,{}).n(`EC2Client`,`DescribeVolumesCommand`).sc(Oe).build(){},py=class extends L.classBuilder().ep(ft).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DescribeVpcs`,{}).n(`EC2Client`,`DescribeVpcsCommand`).sc(Ye).build(){},my=class extends L.classBuilder().ep(rt).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions())]}).s(`AWSWesleyFrontend`,`DescribeAccessEntry`,{}).n(`EKSClient`,`DescribeAccessEntryCommand`).sc(At).build(){},hy=class extends L.classBuilder().ep(rt).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions())]}).s(`AWSWesleyFrontend`,`DescribeAddon`,{}).n(`EKSClient`,`DescribeAddonCommand`).sc(ve).build(){},gy=class extends L.classBuilder().ep(rt).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions())]}).s(`AWSWesleyFrontend`,`DescribeAddonVersions`,{}).n(`EKSClient`,`DescribeAddonVersionsCommand`).sc(Ue).build(){},_y=class extends L.classBuilder().ep(rt).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions())]}).s(`AWSWesleyFrontend`,`DescribeCluster`,{}).n(`EKSClient`,`DescribeClusterCommand`).sc(Te).build(){},vy=class extends L.classBuilder().ep(rt).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions())]}).s(`AWSWesleyFrontend`,`DescribeNodegroup`,{}).n(`EKSClient`,`DescribeNodegroupCommand`).sc(Be).build(){},yy=class extends L.classBuilder().ep(rt).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions())]}).s(`AWSWesleyFrontend`,`ListAccessEntries`,{}).n(`EKSClient`,`ListAccessEntriesCommand`).sc(Se).build(){},by=class extends L.classBuilder().ep(rt).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions())]}).s(`AWSWesleyFrontend`,`ListAccessPolicies`,{}).n(`EKSClient`,`ListAccessPoliciesCommand`).sc(Me).build(){},xy=class extends L.classBuilder().ep(rt).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions())]}).s(`AWSWesleyFrontend`,`ListAddons`,{}).n(`EKSClient`,`ListAddonsCommand`).sc(yt).build(){},Sy=class extends L.classBuilder().ep(rt).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions())]}).s(`AWSWesleyFrontend`,`ListAssociatedAccessPolicies`,{}).n(`EKSClient`,`ListAssociatedAccessPoliciesCommand`).sc(ke).build(){},Cy=class extends L.classBuilder().ep(rt).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions())]}).s(`AWSWesleyFrontend`,`ListClusters`,{}).n(`EKSClient`,`ListClustersCommand`).sc(Xe).build(){},wy=class extends L.classBuilder().ep(rt).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions())]}).s(`AWSWesleyFrontend`,`ListNodegroups`,{}).n(`EKSClient`,`ListNodegroupsCommand`).sc(qe).build(){},Ty=class extends L.classBuilder().ep(ut).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions())]}).s(`ElasticLoadBalancing_v10`,`DescribeListeners`,{}).n(`ElasticLoadBalancingV2Client`,`DescribeListenersCommand`).sc(it).build(){},Ey=class extends L.classBuilder().ep(ut).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions())]}).s(`ElasticLoadBalancing_v10`,`DescribeLoadBalancerAttributes`,{}).n(`ElasticLoadBalancingV2Client`,`DescribeLoadBalancerAttributesCommand`).sc(gt).build(){},Dy=class extends L.classBuilder().ep(ut).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions())]}).s(`ElasticLoadBalancing_v10`,`DescribeLoadBalancers`,{}).n(`ElasticLoadBalancingV2Client`,`DescribeLoadBalancersCommand`).sc(pt).build(){},Oy=class extends L.classBuilder().ep(ut).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions())]}).s(`ElasticLoadBalancing_v10`,`DescribeRules`,{}).n(`ElasticLoadBalancingV2Client`,`DescribeRulesCommand`).sc(ct).build(){},ky=class extends L.classBuilder().ep(ut).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions())]}).s(`ElasticLoadBalancing_v10`,`DescribeSSLPolicies`,{}).n(`ElasticLoadBalancingV2Client`,`DescribeSSLPoliciesCommand`).sc(ot).build(){},Ay=class extends L.classBuilder().ep(ut).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions())]}).s(`ElasticLoadBalancing_v10`,`DescribeTags`,{}).n(`ElasticLoadBalancingV2Client`,`DescribeTagsCommand`).sc($e).build(){},jy=class extends L.classBuilder().ep(ut).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions())]}).s(`ElasticLoadBalancing_v10`,`DescribeTargetGroupAttributes`,{}).n(`ElasticLoadBalancingV2Client`,`DescribeTargetGroupAttributesCommand`).sc(Tt).build(){},My=class extends L.classBuilder().ep(ut).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions())]}).s(`ElasticLoadBalancing_v10`,`DescribeTargetGroups`,{}).n(`ElasticLoadBalancingV2Client`,`DescribeTargetGroupsCommand`).sc(Ot).build(){},Ny=class extends L.classBuilder().ep(ut).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions())]}).s(`ElasticLoadBalancing_v10`,`DescribeTargetHealth`,{}).n(`ElasticLoadBalancingV2Client`,`DescribeTargetHealthCommand`).sc(nt).build(){},Py=class extends L.classBuilder().ep(Ct).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`GetInstanceProfile`,{}).n(`IAMClient`,`GetInstanceProfileCommand`).sc(ge).build(){},Fy=class extends L.classBuilder().ep(Ct).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`GetPolicy`,{}).n(`IAMClient`,`GetPolicyCommand`).sc(Ve).build(){},Iy=class extends L.classBuilder().ep(Ct).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`GetPolicyVersion`,{}).n(`IAMClient`,`GetPolicyVersionCommand`).sc(Ce).build(){},Ly=class extends L.classBuilder().ep(Ct).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`GetRole`,{}).n(`IAMClient`,`GetRoleCommand`).sc(Re).build(){},Ry=class extends L.classBuilder().ep(Ct).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`GetUser`,{}).n(`IAMClient`,`GetUserCommand`).sc(We).build(){},zy=class extends L.classBuilder().ep(Ct).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`ListAccessKeys`,{}).n(`IAMClient`,`ListAccessKeysCommand`).sc(be).build(){},By=class extends L.classBuilder().ep(Ct).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`ListAttachedRolePolicies`,{}).n(`IAMClient`,`ListAttachedRolePoliciesCommand`).sc(Ae).build(){},Vy=class extends L.classBuilder().ep(Ct).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`ListAttachedUserPolicies`,{}).n(`IAMClient`,`ListAttachedUserPoliciesCommand`).sc(_t).build(){},Hy=class extends L.classBuilder().ep(Ct).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`ListInstanceProfiles`,{}).n(`IAMClient`,`ListInstanceProfilesCommand`).sc(De).build(){},Uy=class extends L.classBuilder().ep(Ct).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`ListInstanceProfilesForRole`,{}).n(`IAMClient`,`ListInstanceProfilesForRoleCommand`).sc(Je).build(){},Wy=class extends L.classBuilder().ep(Ct).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`ListPolicies`,{}).n(`IAMClient`,`ListPoliciesCommand`).sc(Ke).build(){},Gy=class extends L.classBuilder().ep(Ct).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`ListRoles`,{}).n(`IAMClient`,`ListRolesCommand`).sc(Ze).build(){},Ky=class extends L.classBuilder().ep(Ct).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`ListUsers`,{}).n(`IAMClient`,`ListUsersCommand`).sc(Ie).build(){},qy=class extends L.classBuilder().ep(Et).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions()),tt(n)]}).s(`AmazonS3`,`ListBuckets`,{}).n(`S3Client`,`ListBucketsCommand`).sc(dt).build(){},Jy=class extends L.classBuilder().ep({...Et,Bucket:{type:`contextParams`,name:`Bucket`},Prefix:{type:`contextParams`,name:`Prefix`}}).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions()),tt(n)]}).s(`AmazonS3`,`ListObjectsV2`,{}).n(`S3Client`,`ListObjectsV2Command`).sc(st).build(){},Yy=!1;function Xy(e,t){Yy||!Yv(e)||(Yy=!0,Pn(),St(),t.clear(),window.location.pathname!==`/login`&&(window.location.href=`/login?reason=expired`))}function Zy(){let e=new ji({queryCache:new Ai({onError:t=>Xy(t,e)}),mutationCache:new Oi({onError:t=>Xy(t,e)}),defaultOptions:{queries:{staleTime:5e3,refetchIntervalInBackground:!1}}});return e}function Qy(){let e=(0,ms.c)(8),{theme:t,setTheme:n}=vs(),r;e[0]!==n||e[1]!==t?(r=()=>{n(t===`light`?`dark`:t===`dark`?`light`:`dark`)},e[0]=n,e[1]=t,e[2]=r):r=e[2];let i=r,a,o,s;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,W.jsx)(ec,{className:`size-[1.2rem] scale-100 rotate-0 transition-all dark:scale-0 dark:-rotate-90`}),o=(0,W.jsx)(Ks,{className:`absolute size-[1.2rem] scale-0 rotate-90 transition-all dark:scale-100 dark:rotate-0`}),s=(0,W.jsx)(`span`,{className:`sr-only`,children:`Toggle theme`}),e[3]=a,e[4]=o,e[5]=s):(a=e[3],o=e[4],s=e[5]);let c;return e[6]===i?c=e[7]:(c=(0,W.jsxs)(ar,{className:`rounded-full`,onClick:i,size:`icon-sm`,variant:`ghost`,children:[a,o,s]}),e[6]=i,e[7]=c),c}function $y(){let e=(0,ms.c)(7),{isAdmin:t,license:n}=qv(),r=t&&n===`open-source`,i,a;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=rn(`z-50 flex h-10 shrink-0 items-center gap-2 border-b border-sidebar-border bg-sidebar px-4 text-sidebar-foreground`,`sticky top-0`),a=(0,W.jsx)(fg,{className:`-ml-1`}),e[0]=i,e[1]=a):(i=e[0],a=e[1]);let o;e[2]===r?o=e[3]:(o=r&&(0,W.jsx)(`a`,{href:`https://mulgadc.com/purchase`,target:`_blank`,rel:`noopener noreferrer`,className:rn(tr({variant:`outline`,size:`sm`})),children:`Upgrade`}),e[2]=r,e[3]=o);let s;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,W.jsx)(Qy,{}),e[4]=s):s=e[4];let c;return e[5]===o?c=e[6]:(c=(0,W.jsxs)(`header`,{className:i,children:[a,(0,W.jsxs)(`div`,{className:`flex w-full items-center justify-end gap-2`,children:[o,s]})]}),e[5]=o,e[6]=c),c}function eb(){let e=(0,ms.c)(3),t,n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,W.jsx)(`h1`,{className:`text-4xl font-bold`,children:`404`}),n=(0,W.jsx)(`p`,{className:`text-muted-foreground`,children:`Page not found`}),e[0]=t,e[1]=n):(t=e[0],n=e[1]);let r;return e[2]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,W.jsxs)(`div`,{className:`flex flex-1 flex-col items-center justify-center gap-4`,children:[t,n,(0,W.jsx)(wt,{to:`/`,children:(0,W.jsx)(ar,{variant:`outline`,children:`Go back home`})})]}),e[2]=r):r=e[2],r}function tb(){let e=(0,ms.c)(194),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={select:nb},e[0]=t):t=e[0];let n=is(t),r=No(),i=Ni(),{isAdmin:a}=qv(),o;e[1]!==r||e[2]!==i?(o=function(){Pn(),St(),i.clear(),r({to:`/login`})},e[1]=r,e[2]=i,e[3]=o):o=e[3];let s=o,c;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,W.jsxs)(mg,{className:`flex flex-row items-center gap-2 px-4 py-3`,children:[(0,W.jsx)(`img`,{src:`/mulga-logo.svg`,alt:`Mulga`,className:`size-6 shrink-0 dark:invert`}),(0,W.jsx)(`span`,{className:`truncate text-sm font-semibold group-data-[collapsible=icon]:hidden`,children:`Spinifex`})]}),e[4]=c):c=e[4];let l;e[5]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,W.jsx)(yg,{children:`General`}),e[5]=l):l=e[5];let u=n===`/`,d,f;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,W.jsx)(Rs,{className:`size-4`}),f=(0,W.jsx)(`span`,{children:`Dashboard`}),e[6]=d,e[7]=f):(d=e[6],f=e[7]);let p;e[8]===u?p=e[9]:(p=(0,W.jsx)(xg,{children:(0,W.jsx)(wt,{to:`/`,children:(0,W.jsxs)(Cg,{isActive:u,tooltip:`Dashboard`,children:[d,f]})})}),e[8]=u,e[9]=p);let m;e[10]!==a||e[11]!==n?(m=a&&(0,W.jsx)(xg,{children:(0,W.jsx)(wt,{to:`/nodes`,children:(0,W.jsxs)(Cg,{isActive:n.startsWith(`/nodes`),tooltip:`Nodes`,children:[(0,W.jsx)(Zs,{className:`size-4`}),(0,W.jsx)(`span`,{children:`Nodes`})]})})}),e[10]=a,e[11]=n,e[12]=m):m=e[12];let h;e[13]!==p||e[14]!==m?(h=(0,W.jsxs)(vg,{children:[l,(0,W.jsxs)(bg,{children:[p,m]})]}),e[13]=p,e[14]=m,e[15]=h):h=e[15];let g;e[16]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,W.jsx)(yg,{children:`EC2`}),e[16]=g):g=e[16];let _;e[17]===n?_=e[18]:(_=n.startsWith(`/ec2/describe-instances`)||n.startsWith(`/ec2/run-instances`),e[17]=n,e[18]=_);let v,y;e[19]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,W.jsx)(Zs,{className:`size-4`}),y=(0,W.jsx)(`span`,{children:`Instances`}),e[19]=v,e[20]=y):(v=e[19],y=e[20]);let b;e[21]===_?b=e[22]:(b=(0,W.jsx)(xg,{children:(0,W.jsx)(wt,{to:`/ec2/describe-instances`,children:(0,W.jsxs)(Cg,{isActive:_,tooltip:`Instances`,children:[v,y]})})}),e[21]=_,e[22]=b);let x;e[23]===n?x=e[24]:(x=n.startsWith(`/ec2/describe-images`),e[23]=n,e[24]=x);let S,C;e[25]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,W.jsx)(Bs,{className:`size-4`}),C=(0,W.jsx)(`span`,{children:`Images`}),e[25]=S,e[26]=C):(S=e[25],C=e[26]);let w;e[27]===x?w=e[28]:(w=(0,W.jsx)(xg,{children:(0,W.jsx)(wt,{to:`/ec2/describe-images`,children:(0,W.jsxs)(Cg,{isActive:x,tooltip:`Images`,children:[S,C]})})}),e[27]=x,e[28]=w);let T;e[29]===n?T=e[30]:(T=n.startsWith(`/ec2/describe-key-pairs`),e[29]=n,e[30]=T);let E,D;e[31]===Symbol.for(`react.memo_cache_sentinel`)?(E=(0,W.jsx)(Vs,{className:`size-4`}),D=(0,W.jsx)(`span`,{children:`Key Pairs`}),e[31]=E,e[32]=D):(E=e[31],D=e[32]);let O;e[33]===T?O=e[34]:(O=(0,W.jsx)(xg,{children:(0,W.jsx)(wt,{to:`/ec2/describe-key-pairs`,children:(0,W.jsxs)(Cg,{isActive:T,tooltip:`Key Pairs`,children:[E,D]})})}),e[33]=T,e[34]=O);let k;e[35]===n?k=e[36]:(k=n.startsWith(`/ec2/describe-addresses`)||n.startsWith(`/ec2/allocate-address`),e[35]=n,e[36]=k);let A,j;e[37]===Symbol.for(`react.memo_cache_sentinel`)?(A=(0,W.jsx)(Gs,{className:`size-4`}),j=(0,W.jsx)(`span`,{children:`Elastic IPs`}),e[37]=A,e[38]=j):(A=e[37],j=e[38]);let M;e[39]===k?M=e[40]:(M=(0,W.jsx)(xg,{children:(0,W.jsx)(wt,{to:`/ec2/describe-addresses`,children:(0,W.jsxs)(Cg,{isActive:k,tooltip:`Elastic IPs`,children:[A,j]})})}),e[39]=k,e[40]=M);let ee;e[41]===n?ee=e[42]:(ee=n.startsWith(`/ec2/describe-volumes`)||n.startsWith(`/ec2/create-volume`)||n.startsWith(`/ec2/modify-volume`),e[41]=n,e[42]=ee);let N,P;e[43]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,W.jsx)(Ls,{className:`size-4`}),P=(0,W.jsx)(`span`,{children:`Volumes`}),e[43]=N,e[44]=P):(N=e[43],P=e[44]);let te;e[45]===ee?te=e[46]:(te=(0,W.jsx)(xg,{children:(0,W.jsx)(wt,{to:`/ec2/describe-volumes`,children:(0,W.jsxs)(Cg,{isActive:ee,tooltip:`Volumes`,children:[N,P]})})}),e[45]=ee,e[46]=te);let ne;e[47]===n?ne=e[48]:(ne=n.startsWith(`/ec2/describe-snapshots`)||n.startsWith(`/ec2/create-snapshot`),e[47]=n,e[48]=ne);let re,ie;e[49]===Symbol.for(`react.memo_cache_sentinel`)?(re=(0,W.jsx)(Ns,{className:`size-4`}),ie=(0,W.jsx)(`span`,{children:`Snapshots`}),e[49]=re,e[50]=ie):(re=e[49],ie=e[50]);let ae;e[51]===ne?ae=e[52]:(ae=(0,W.jsx)(xg,{children:(0,W.jsx)(wt,{to:`/ec2/describe-snapshots`,children:(0,W.jsxs)(Cg,{isActive:ne,tooltip:`Snapshots`,children:[re,ie]})})}),e[51]=ne,e[52]=ae);let F;e[53]===n?F=e[54]:(F=n.startsWith(`/ec2/describe-placement-groups`)||n.startsWith(`/ec2/create-placement-group`),e[53]=n,e[54]=F);let oe,se;e[55]===Symbol.for(`react.memo_cache_sentinel`)?(oe=(0,W.jsx)(Hs,{className:`size-4`}),se=(0,W.jsx)(`span`,{children:`Placement Groups`}),e[55]=oe,e[56]=se):(oe=e[55],se=e[56]);let I;e[57]===F?I=e[58]:(I=(0,W.jsx)(xg,{children:(0,W.jsx)(wt,{to:`/ec2/describe-placement-groups`,children:(0,W.jsxs)(Cg,{isActive:F,tooltip:`Placement Groups`,children:[oe,se]})})}),e[57]=F,e[58]=I);let ce;e[59]===n?ce=e[60]:(ce=n.startsWith(`/ec2/describe-load-balancers`)||n.startsWith(`/ec2/create-load-balancer`),e[59]=n,e[60]=ce);let le,ue;e[61]===Symbol.for(`react.memo_cache_sentinel`)?(le=(0,W.jsx)(rc,{className:`size-4`}),ue=(0,W.jsx)(`span`,{children:`Load Balancers`}),e[61]=le,e[62]=ue):(le=e[61],ue=e[62]);let de;e[63]===ce?de=e[64]:(de=(0,W.jsx)(xg,{children:(0,W.jsx)(wt,{to:`/ec2/describe-load-balancers`,children:(0,W.jsxs)(Cg,{isActive:ce,tooltip:`Load Balancers`,children:[le,ue]})})}),e[63]=ce,e[64]=de);let fe;e[65]===n?fe=e[66]:(fe=n.startsWith(`/ec2/describe-target-groups`)||n.startsWith(`/ec2/create-target-group`),e[65]=n,e[66]=fe);let pe,me;e[67]===Symbol.for(`react.memo_cache_sentinel`)?(pe=(0,W.jsx)(Fs,{className:`size-4`}),me=(0,W.jsx)(`span`,{children:`Target Groups`}),e[67]=pe,e[68]=me):(pe=e[67],me=e[68]);let he;e[69]===fe?he=e[70]:(he=(0,W.jsx)(xg,{children:(0,W.jsx)(wt,{to:`/ec2/describe-target-groups`,children:(0,W.jsxs)(Cg,{isActive:fe,tooltip:`Target Groups`,children:[pe,me]})})}),e[69]=fe,e[70]=he);let ge;e[71]!==b||e[72]!==w||e[73]!==O||e[74]!==M||e[75]!==te||e[76]!==ae||e[77]!==I||e[78]!==de||e[79]!==he?(ge=(0,W.jsxs)(vg,{children:[g,(0,W.jsxs)(bg,{children:[b,w,O,M,te,ae,I,de,he]})]}),e[71]=b,e[72]=w,e[73]=O,e[74]=M,e[75]=te,e[76]=ae,e[77]=I,e[78]=de,e[79]=he,e[80]=ge):ge=e[80];let _e;e[81]===Symbol.for(`react.memo_cache_sentinel`)?(_e=(0,W.jsx)(yg,{children:`Networking`}),e[81]=_e):_e=e[81];let ve;e[82]===n?ve=e[83]:(ve=n.startsWith(`/ec2/describe-vpcs`)||n.startsWith(`/ec2/create-vpc`),e[82]=n,e[83]=ve);let ye,be;e[84]===Symbol.for(`react.memo_cache_sentinel`)?(ye=(0,W.jsx)(qs,{className:`size-4`}),be=(0,W.jsx)(`span`,{children:`VPCs`}),e[84]=ye,e[85]=be):(ye=e[84],be=e[85]);let xe;e[86]===ve?xe=e[87]:(xe=(0,W.jsx)(xg,{children:(0,W.jsx)(wt,{to:`/ec2/describe-vpcs`,children:(0,W.jsxs)(Cg,{isActive:ve,tooltip:`VPCs`,children:[ye,be]})})}),e[86]=ve,e[87]=xe);let Se;e[88]===n?Se=e[89]:(Se=n.startsWith(`/ec2/describe-subnets`)||n.startsWith(`/ec2/create-subnet`),e[88]=n,e[89]=Se);let Ce,we;e[90]===Symbol.for(`react.memo_cache_sentinel`)?(Ce=(0,W.jsx)(Us,{className:`size-4`}),we=(0,W.jsx)(`span`,{children:`Subnets`}),e[90]=Ce,e[91]=we):(Ce=e[90],we=e[91]);let Te;e[92]===Se?Te=e[93]:(Te=(0,W.jsx)(xg,{children:(0,W.jsx)(wt,{to:`/ec2/describe-subnets`,children:(0,W.jsxs)(Cg,{isActive:Se,tooltip:`Subnets`,children:[Ce,we]})})}),e[92]=Se,e[93]=Te);let Ee;e[94]===n?Ee=e[95]:(Ee=n.startsWith(`/ec2/describe-security-groups`)||n.startsWith(`/ec2/create-security-group`),e[94]=n,e[95]=Ee);let De,Oe;e[96]===Symbol.for(`react.memo_cache_sentinel`)?(De=(0,W.jsx)(Qs,{className:`size-4`}),Oe=(0,W.jsx)(`span`,{children:`Security Groups`}),e[96]=De,e[97]=Oe):(De=e[96],Oe=e[97]);let ke;e[98]===Ee?ke=e[99]:(ke=(0,W.jsx)(xg,{children:(0,W.jsx)(wt,{to:`/ec2/describe-security-groups`,children:(0,W.jsxs)(Cg,{isActive:Ee,tooltip:`Security Groups`,children:[De,Oe]})})}),e[98]=Ee,e[99]=ke);let Ae;e[100]===n?Ae=e[101]:(Ae=n.startsWith(`/ec2/describe-route-tables`)||n.startsWith(`/ec2/create-route-table`),e[100]=n,e[101]=Ae);let je,Me;e[102]===Symbol.for(`react.memo_cache_sentinel`)?(je=(0,W.jsx)(Xs,{className:`size-4`}),Me=(0,W.jsx)(`span`,{children:`Route Tables`}),e[102]=je,e[103]=Me):(je=e[102],Me=e[103]);let Ne;e[104]===Ae?Ne=e[105]:(Ne=(0,W.jsx)(xg,{children:(0,W.jsx)(wt,{to:`/ec2/describe-route-tables`,children:(0,W.jsxs)(Cg,{isActive:Ae,tooltip:`Route Tables`,children:[je,Me]})})}),e[104]=Ae,e[105]=Ne);let Pe;e[106]===n?Pe=e[107]:(Pe=n.startsWith(`/ec2/describe-internet-gateways`),e[106]=n,e[107]=Pe);let Fe,Ie;e[108]===Symbol.for(`react.memo_cache_sentinel`)?(Fe=(0,W.jsx)(Is,{className:`size-4`}),Ie=(0,W.jsx)(`span`,{children:`Internet Gateways`}),e[108]=Fe,e[109]=Ie):(Fe=e[108],Ie=e[109]);let Le;e[110]===Pe?Le=e[111]:(Le=(0,W.jsx)(xg,{children:(0,W.jsx)(wt,{to:`/ec2/describe-internet-gateways`,children:(0,W.jsxs)(Cg,{isActive:Pe,tooltip:`Internet Gateways`,children:[Fe,Ie]})})}),e[110]=Pe,e[111]=Le);let Re;e[112]===n?Re=e[113]:(Re=n.startsWith(`/ec2/describe-nat-gateways`)||n.startsWith(`/ec2/create-nat-gateway`),e[112]=n,e[113]=Re);let ze,Be;e[114]===Symbol.for(`react.memo_cache_sentinel`)?(ze=(0,W.jsx)(Ys,{className:`size-4`}),Be=(0,W.jsx)(`span`,{children:`NAT Gateways`}),e[114]=ze,e[115]=Be):(ze=e[114],Be=e[115]);let Ve;e[116]===Re?Ve=e[117]:(Ve=(0,W.jsx)(xg,{children:(0,W.jsx)(wt,{to:`/ec2/describe-nat-gateways`,children:(0,W.jsxs)(Cg,{isActive:Re,tooltip:`NAT Gateways`,children:[ze,Be]})})}),e[116]=Re,e[117]=Ve);let He;e[118]!==xe||e[119]!==Te||e[120]!==ke||e[121]!==Ne||e[122]!==Le||e[123]!==Ve?(He=(0,W.jsxs)(vg,{children:[_e,(0,W.jsxs)(bg,{children:[xe,Te,ke,Ne,Le,Ve]})]}),e[118]=xe,e[119]=Te,e[120]=ke,e[121]=Ne,e[122]=Le,e[123]=Ve,e[124]=He):He=e[124];let Ue;e[125]===Symbol.for(`react.memo_cache_sentinel`)?(Ue=(0,W.jsx)(yg,{children:`EKS`}),e[125]=Ue):Ue=e[125];let We;e[126]===n?We=e[127]:(We=n.startsWith(`/eks/list-clusters`)||n.startsWith(`/eks/create-cluster`),e[126]=n,e[127]=We);let Ge,Ke;e[128]===Symbol.for(`react.memo_cache_sentinel`)?(Ge=(0,W.jsx)(Ms,{className:`size-4`}),Ke=(0,W.jsx)(`span`,{children:`Clusters`}),e[128]=Ge,e[129]=Ke):(Ge=e[128],Ke=e[129]);let qe;e[130]===We?qe=e[131]:(qe=(0,W.jsxs)(vg,{children:[Ue,(0,W.jsx)(bg,{children:(0,W.jsx)(xg,{children:(0,W.jsx)(wt,{to:`/eks/list-clusters`,children:(0,W.jsxs)(Cg,{isActive:We,tooltip:`Clusters`,children:[Ge,Ke]})})})})]}),e[130]=We,e[131]=qe);let Je;e[132]===Symbol.for(`react.memo_cache_sentinel`)?(Je=(0,W.jsx)(yg,{children:`IAM`}),e[132]=Je):Je=e[132];let Ye;e[133]===n?Ye=e[134]:(Ye=n.startsWith(`/iam/list-users`)||n.startsWith(`/iam/create-user`),e[133]=n,e[134]=Ye);let Xe,Ze;e[135]===Symbol.for(`react.memo_cache_sentinel`)?(Xe=(0,W.jsx)(nc,{className:`size-4`}),Ze=(0,W.jsx)(`span`,{children:`Users`}),e[135]=Xe,e[136]=Ze):(Xe=e[135],Ze=e[136]);let Qe;e[137]===Ye?Qe=e[138]:(Qe=(0,W.jsx)(xg,{children:(0,W.jsx)(wt,{to:`/iam/list-users`,children:(0,W.jsxs)(Cg,{isActive:Ye,tooltip:`Users`,children:[Xe,Ze]})})}),e[137]=Ye,e[138]=Qe);let $e;e[139]===n?$e=e[140]:($e=n.startsWith(`/iam/list-policies`)||n.startsWith(`/iam/create-policy`),e[139]=n,e[140]=$e);let et,tt;e[141]===Symbol.for(`react.memo_cache_sentinel`)?(et=(0,W.jsx)($s,{className:`size-4`}),tt=(0,W.jsx)(`span`,{children:`Policies`}),e[141]=et,e[142]=tt):(et=e[141],tt=e[142]);let nt;e[143]===$e?nt=e[144]:(nt=(0,W.jsx)(xg,{children:(0,W.jsx)(wt,{to:`/iam/list-policies`,children:(0,W.jsxs)(Cg,{isActive:$e,tooltip:`Policies`,children:[et,tt]})})}),e[143]=$e,e[144]=nt);let rt;e[145]===n?rt=e[146]:(rt=n.startsWith(`/iam/list-roles`)||n.startsWith(`/iam/create-role`),e[145]=n,e[146]=rt);let it,at;e[147]===Symbol.for(`react.memo_cache_sentinel`)?(it=(0,W.jsx)(tc,{className:`size-4`}),at=(0,W.jsx)(`span`,{children:`Roles`}),e[147]=it,e[148]=at):(it=e[147],at=e[148]);let ot;e[149]===rt?ot=e[150]:(ot=(0,W.jsx)(xg,{children:(0,W.jsx)(wt,{to:`/iam/list-roles`,children:(0,W.jsxs)(Cg,{isActive:rt,tooltip:`Roles`,children:[it,at]})})}),e[149]=rt,e[150]=ot);let st;e[151]===n?st=e[152]:(st=n.startsWith(`/iam/list-instance-profiles`)||n.startsWith(`/iam/create-instance-profile`),e[151]=n,e[152]=st);let ct,lt;e[153]===Symbol.for(`react.memo_cache_sentinel`)?(ct=(0,W.jsx)(zs,{className:`size-4`}),lt=(0,W.jsx)(`span`,{children:`Instance Profiles`}),e[153]=ct,e[154]=lt):(ct=e[153],lt=e[154]);let ut;e[155]===st?ut=e[156]:(ut=(0,W.jsx)(xg,{children:(0,W.jsx)(wt,{to:`/iam/list-instance-profiles`,children:(0,W.jsxs)(Cg,{isActive:st,tooltip:`Instance Profiles`,children:[ct,lt]})})}),e[155]=st,e[156]=ut);let dt;e[157]!==Qe||e[158]!==nt||e[159]!==ot||e[160]!==ut?(dt=(0,W.jsxs)(vg,{children:[Je,(0,W.jsxs)(bg,{children:[Qe,nt,ot,ut]})]}),e[157]=Qe,e[158]=nt,e[159]=ot,e[160]=ut,e[161]=dt):dt=e[161];let ft;e[162]===Symbol.for(`react.memo_cache_sentinel`)?(ft=(0,W.jsx)(yg,{children:`S3`}),e[162]=ft):ft=e[162];let pt;e[163]===n?pt=e[164]:(pt=n.startsWith(`/s3/ls`),e[163]=n,e[164]=pt);let mt,ht;e[165]===Symbol.for(`react.memo_cache_sentinel`)?(ht=(0,W.jsx)(Zs,{className:`size-4`}),mt=(0,W.jsx)(`span`,{children:`Buckets`}),e[165]=mt,e[166]=ht):(mt=e[165],ht=e[166]);let gt;e[167]===pt?gt=e[168]:(gt=(0,W.jsx)(xg,{children:(0,W.jsx)(wt,{to:`/s3/ls`,children:(0,W.jsxs)(Cg,{isActive:pt,tooltip:`Buckets`,children:[ht,mt]})})}),e[167]=pt,e[168]=gt);let _t;e[169]!==a||e[170]!==n?(_t=a&&(0,W.jsx)(xg,{children:(0,W.jsx)(wt,{to:`/s3/service-metrics`,children:(0,W.jsxs)(Cg,{isActive:n.startsWith(`/s3/service-metrics`),tooltip:`Service Metrics`,children:[(0,W.jsx)(As,{className:`size-4`}),(0,W.jsx)(`span`,{children:`Service Metrics`})]})})}),e[169]=a,e[170]=n,e[171]=_t):_t=e[171];let vt;e[172]!==gt||e[173]!==_t?(vt=(0,W.jsxs)(vg,{children:[ft,(0,W.jsxs)(bg,{children:[gt,_t]})]}),e[172]=gt,e[173]=_t,e[174]=vt):vt=e[174];let yt;e[175]===a?yt=e[176]:(yt=a&&(0,W.jsxs)(vg,{children:[(0,W.jsx)(yg,{children:`Documentation`}),(0,W.jsx)(bg,{children:(0,W.jsx)(xg,{children:(0,W.jsx)(`a`,{href:`https://docs.mulgadc.com`,target:`_blank`,rel:`noopener noreferrer`,children:(0,W.jsxs)(Cg,{tooltip:`Documentation`,children:[(0,W.jsx)(js,{className:`size-4`}),(0,W.jsx)(`span`,{children:`Docs`})]})})})})]}),e[175]=a,e[176]=yt);let bt;e[177]!==vt||e[178]!==yt||e[179]!==ge||e[180]!==He||e[181]!==qe||e[182]!==h||e[183]!==dt?(bt=(0,W.jsxs)(_g,{children:[h,ge,He,qe,dt,vt,yt]}),e[177]=vt,e[178]=yt,e[179]=ge,e[180]=He,e[181]=qe,e[182]=h,e[183]=dt,e[184]=bt):bt=e[184];let xt;e[185]===Symbol.for(`react.memo_cache_sentinel`)?(xt=(0,W.jsx)(gg,{className:`mx-0 w-full`}),e[185]=xt):xt=e[185];let Ct,Tt;e[186]===Symbol.for(`react.memo_cache_sentinel`)?(Ct=(0,W.jsx)(Ws,{className:`size-4`}),Tt=(0,W.jsx)(`span`,{children:`Sign out`}),e[186]=Ct,e[187]=Tt):(Ct=e[186],Tt=e[187]);let Et;e[188]===s?Et=e[189]:(Et=(0,W.jsxs)(hg,{children:[xt,(0,W.jsx)(bg,{children:(0,W.jsx)(xg,{children:(0,W.jsxs)(Cg,{onClick:s,tooltip:`Sign out`,children:[Ct,Tt]})})})]}),e[188]=s,e[189]=Et);let Dt;e[190]===Symbol.for(`react.memo_cache_sentinel`)?(Dt=(0,W.jsx)(pg,{}),e[190]=Dt):Dt=e[190];let Ot;return e[191]!==bt||e[192]!==Et?(Ot=(0,W.jsxs)(dg,{collapsible:`icon`,children:[c,bt,Et,Dt]}),e[191]=bt,e[192]=Et,e[193]=Ot):Ot=e[193],Ot}function nb(e){return e.pathname}function rb(e){let t=(0,ms.c)(18),{error:n,reset:r}=e,i=M(),a=Ni(),o;t[0]!==a||t[1]!==r||t[2]!==i?(o=function(){a.invalidateQueries(),r(),i.invalidate()},t[0]=a,t[1]=r,t[2]=i,t[3]=o):o=t[3];let s=o,c;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,W.jsx)(tb,{}),t[4]=c):c=t[4];let l;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,W.jsx)($y,{}),t[5]=l):l=t[5];let u,d;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,W.jsx)(`div`,{className:`flex justify-center`,children:(0,W.jsx)(Ps,{className:`size-12 text-destructive`})}),d=(0,W.jsx)(`h1`,{className:`text-2xl font-semibold`,children:`Something went wrong`}),t[6]=u,t[7]=d):(u=t[6],d=t[7]);let f=n.message||`An unexpected error occurred`,p;t[8]===f?p=t[9]:(p=(0,W.jsx)(`p`,{className:`text-muted-foreground`,children:f}),t[8]=f,t[9]=p);let m;t[10]===s?m=t[11]:(m=(0,W.jsx)(ar,{onClick:s,variant:`default`,children:`Try Again`}),t[10]=s,t[11]=m);let h;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,W.jsx)(wt,{to:`/`,children:(0,W.jsx)(ar,{variant:`outline`,children:`Go Home`})}),t[12]=h):h=t[12];let g;t[13]===m?g=t[14]:(g=(0,W.jsxs)(`div`,{className:`flex justify-center gap-2`,children:[m,h]}),t[13]=m,t[14]=g);let _;return t[15]!==g||t[16]!==p?(_=(0,W.jsxs)(W.Fragment,{children:[c,(0,W.jsxs)(`main`,{className:`flex flex-1 flex-col`,children:[l,(0,W.jsx)(`div`,{className:`flex flex-1 items-center justify-center p-6 pt-0`,children:(0,W.jsxs)(`div`,{className:`max-w-md space-y-4 text-center`,children:[u,d,p,g]})})]})]}),t[15]=g,t[16]=p,t[17]=_):_=t[17],_}var ib=Lo()({head:()=>({meta:[{title:`Mulga`}]}),component:()=>(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(ls,{}),(0,W.jsx)(tb,{}),(0,W.jsxs)(`main`,{className:`flex flex-1 flex-col`,children:[(0,W.jsx)($y,{}),(0,W.jsx)(`div`,{className:`flex flex-1 flex-col p-8`,children:(0,W.jsx)(Yo,{})})]})]}),errorComponent:rb,notFoundComponent:eb}),ab=q(`/login`)({validateSearch:e=>({reason:e.reason===`expired`?`expired`:void 0}),beforeLoad:()=>{if(In())throw me({to:`/`})},component:J(()=>R(()=>import(`./login.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13])),`component`)}),ob=q(`/_auth`)({beforeLoad:()=>{if(!In())throw me({to:`/login`})},component:J(()=>R(()=>import(`./route.js`),__vite__mapDeps([14,1])),`component`)}),sb=a({queryKey:[`ec2`,`availabilityZones`],queryFn:async()=>{let e=new Qv({});return await bt().send(e)},staleTime:3e5}),cb=a({queryKey:[`ec2`,`instances`],queryFn:async()=>{let e=new ty({});return await bt().send(e)},refetchInterval:5e3}),lb=e=>a({queryKey:[`ec2`,`instances`,e],queryFn:async()=>{let t=new ty({InstanceIds:[e]});return await bt().send(t)},refetchInterval:5e3}),ub=e=>a({queryKey:[`ec2`,`iam-instance-profile-associations`,e],queryFn:async()=>{let t=new $v({Filters:[{Name:`instance-id`,Values:[e]}]});return await bt().send(t)},refetchInterval:5e3}),db=a({queryKey:[`ec2`,`instances`,`types`],queryFn:async()=>{let e=new ny({Filters:[{Name:`capacity`,Values:[`true`]}]});return await bt().send(e)},refetchInterval:5e3}),fb=a({queryKey:[`ec2`,`images`],queryFn:async()=>{let e=new ey({});return await bt().send(e)}}),pb=e=>a({queryKey:[`ec2`,`images`,e??`none`],queryFn:async()=>{if(!e)return{Images:[],$metadata:{}};let t=new ey({ImageIds:[e]});return await bt().send(t)}}),mb=a({queryKey:[`ec2`,`keypairs`],queryFn:async()=>{let e=new iy({});return await bt().send(e)}}),hb=e=>a({queryKey:[`ec2`,`keypairs`,e],queryFn:async()=>{let t=new iy({KeyPairIds:[e]});return await bt().send(t)}}),gb=a({queryKey:[`ec2`,`regions`],queryFn:async()=>{let e=new sy({});return await bt().send(e)},staleTime:3e5}),_b=a({queryKey:[`ec2`,`subnets`],queryFn:async()=>{let e=new dy({});return await bt().send(e)}}),vb=e=>a({queryKey:[`ec2`,`subnets`,e],queryFn:async()=>{let t=new dy({SubnetIds:[e]});return await bt().send(t)}}),yb=a({queryKey:[`ec2`,`snapshots`],queryFn:async()=>{let e=new uy({});return await bt().send(e)},refetchInterval:5e3}),bb=e=>a({queryKey:[`ec2`,`snapshots`,e],queryFn:async()=>{let t=new uy({SnapshotIds:[e]});return await bt().send(t)},refetchInterval:5e3}),xb=a({queryKey:[`ec2`,`internetGateways`],queryFn:async()=>{let e=new ry({});return await bt().send(e)},refetchInterval:5e3}),Sb=e=>a({queryKey:[`ec2`,`internetGateways`,e],queryFn:async()=>{let t=new ry({InternetGatewayIds:[e]});return await bt().send(t)},refetchInterval:5e3}),Cb=a({queryKey:[`ec2`,`routeTables`],queryFn:async()=>{let e=new cy({});return await bt().send(e)},refetchInterval:5e3}),wb=e=>a({queryKey:[`ec2`,`routeTables`,e],queryFn:async()=>{let t=new cy({RouteTableIds:[e]});return await bt().send(t)},refetchInterval:5e3}),Tb=a({queryKey:[`ec2`,`vpcs`],queryFn:async()=>{let e=new py({});return await bt().send(e)}}),Eb=e=>a({queryKey:[`ec2`,`vpcs`,e],queryFn:async()=>{let t=new py({VpcIds:[e]});return await bt().send(t)}}),Db=a({queryKey:[`ec2`,`placementGroups`],queryFn:async()=>{let e=new oy({});return await bt().send(e)}}),Ob=e=>a({queryKey:[`ec2`,`placementGroups`,e],queryFn:async()=>{let t=new oy({GroupIds:[e]});return await bt().send(t)}}),kb=a({queryKey:[`ec2`,`securityGroups`],queryFn:async()=>{let e=new ly({});return await bt().send(e)}}),Ab=e=>a({queryKey:[`ec2`,`securityGroups`,e],queryFn:async()=>{let t=new ly({GroupIds:[e]});return await bt().send(t)}}),jb=a({queryKey:[`ec2`,`addresses`],queryFn:async()=>{let e=new Zv({});return await bt().send(e)},refetchInterval:5e3}),Mb=e=>a({queryKey:[`ec2`,`addresses`,e],queryFn:async()=>{let t=new Zv({AllocationIds:[e]});return await bt().send(t)},refetchInterval:5e3}),Nb=a({queryKey:[`ec2`,`natGateways`],queryFn:async()=>{let e=new ay({});return await bt().send(e)},refetchInterval:5e3}),Pb=e=>a({queryKey:[`ec2`,`natGateways`,e],queryFn:async()=>{let t=new ay({NatGatewayIds:[e]});return await bt().send(t)},refetchInterval:5e3}),Fb=a({queryKey:[`ec2`,`volumes`],queryFn:async()=>{let e=new fy({});return await bt().send(e)},refetchInterval:5e3}),Ib=e=>a({queryKey:[`ec2`,`volumes`,e],queryFn:async()=>{let t=new fy({VolumeIds:[e]});return await bt().send(t)},refetchInterval:5e3}),Lb=a({queryKey:[`s3`,`buckets`],queryFn:async()=>{let e=new qy({});return await xt().send(e)}}),Rb=(e,t)=>a({queryKey:[`s3`,`buckets`,e,`objects`,t??``],queryFn:async()=>{let n=new Jy({Bucket:e,Prefix:t,Delimiter:`/`});return await xt().send(n)}}),zb=q(`/_auth/`)({loader:async({context:e})=>{await Promise.all([e.queryClient.ensureQueryData(cb),e.queryClient.ensureQueryData(Fb),e.queryClient.ensureQueryData(Tb),e.queryClient.ensureQueryData(mb),e.queryClient.ensureQueryData(Lb),e.queryClient.ensureQueryData(kb),e.queryClient.ensureQueryData(Nb),e.queryClient.ensureQueryData(jb),e.queryClient.ensureQueryData(xb)])},head:()=>({meta:[{title:`Dashboard | Mulga`}]}),component:J(()=>R(()=>import(`./_auth.js`),__vite__mapDeps([15,1,2,3,4,5,6,16,17,18,19,20,21,22,8,12,23,24])),`component`)}),Bb=q(`/_auth/nodes`)({head:()=>({meta:[{title:`Nodes | Mulga`}]}),component:J(()=>R(()=>import(`./nodes.js`),__vite__mapDeps([25,1,2,3,16,17,26,20,22,8,12,23,24])),`component`)}),Vb=q(`/_auth/s3/service-metrics`)({head:()=>({meta:[{title:`Service Metrics | S3 | Mulga`}]}),component:J(()=>R(()=>import(`./service-metrics.js`),__vite__mapDeps([27,1,16,17,26,20,22,2,3,8,12,23,24])),`component`)}),Hb=q(`/_auth/s3/ls/`)({loader:async({context:e})=>{await e.queryClient.ensureQueryData(Lb)},head:()=>({meta:[{title:`Buckets | S3 | Mulga`}]}),component:J(()=>R(()=>import(`./ls.js`),__vite__mapDeps([28,1,2,3,4,5,6,7,8,29,17,30,20])),`component`)}),Ub=q(`/_auth/s3/(buckets)/create-bucket`)({head:()=>({meta:[{title:`Create Bucket | S3 | Mulga`}]}),component:J(()=>R(()=>import(`./create-bucket.js`),__vite__mapDeps([31,1,2,3,32,5,4,6,33,11,34,35,7,8,36,18,37,38,39,20,13])),`component`)}),Wb=q(`/_auth/iam/(users)/create-user`)({head:()=>({meta:[{title:`Create User | IAM | Mulga`}]}),component:J(()=>R(()=>import(`./create-user.js`),__vite__mapDeps([40,1,41,2,3,4,5,6,33,11,34,35,7,8,36,18,37,38,39,20,13,42])),`component`)}),Gb=q(`/_auth/iam/(roles)/create-role`)({head:()=>({meta:[{title:`Create Role | IAM | Mulga`}]}),component:J(()=>R(()=>import(`./create-role.js`),__vite__mapDeps([43,1,41,2,3,4,5,6,33,11,34,35,7,8,36,18,37,38,39,20,13,44,42])),`component`)}),Kb=q(`/_auth/iam/(policies)/create-policy`)({head:()=>({meta:[{title:`Create Policy | IAM | Mulga`}]}),component:J(()=>R(()=>import(`./create-policy.js`),__vite__mapDeps([45,1,41,2,3,4,5,6,33,11,34,35,7,8,36,18,37,38,39,20,13,44,42])),`component`)}),qb=q(`/_auth/iam/(instance-profiles)/create-instance-profile`)({head:()=>({meta:[{title:`Create Instance Profile | IAM | Mulga`}]}),component:J(()=>R(()=>import(`./create-instance-profile.js`),__vite__mapDeps([46,1,41,2,3,4,5,6,33,11,34,35,7,8,36,18,37,38,39,20,13,42])),`component`)}),Jb=a({queryKey:[`iam`,`users`],queryFn:async()=>{let e=new Ky({});return await ht().send(e)},staleTime:3e5}),Yb=e=>a({queryKey:[`iam`,`users`,e],queryFn:async()=>{let t=new Ry({UserName:e});return await ht().send(t)},staleTime:3e5}),Xb=e=>a({queryKey:[`iam`,`access-keys`,e],queryFn:async()=>{let t=new zy({UserName:e});return await ht().send(t)},staleTime:3e5}),Zb=a({queryKey:[`iam`,`policies`],queryFn:async()=>{let e=new Wy({Scope:`Local`});return await ht().send(e)},staleTime:3e5}),Qb=e=>a({queryKey:[`iam`,`policies`,e],queryFn:async()=>{let t=new Fy({PolicyArn:e});return await ht().send(t)},staleTime:3e5}),$b=(e,t)=>a({queryKey:[`iam`,`policy-versions`,e,t],queryFn:async()=>{let n=new Iy({PolicyArn:e,VersionId:t});return await ht().send(n)},staleTime:3e5}),ex=e=>a({queryKey:[`iam`,`attached-user-policies`,e],queryFn:async()=>{let t=new Vy({UserName:e});return await ht().send(t)},staleTime:3e5}),tx=a({queryKey:[`iam`,`roles`],queryFn:async()=>{let e=new Gy({});return await ht().send(e)},staleTime:3e5}),nx=e=>a({queryKey:[`iam`,`roles`,e],queryFn:async()=>{let t=new Ly({RoleName:e});return await ht().send(t)},staleTime:3e5}),rx=e=>a({queryKey:[`iam`,`attached-role-policies`,e],queryFn:async()=>{let t=new By({RoleName:e});return await ht().send(t)},staleTime:3e5}),ix=a({queryKey:[`iam`,`instance-profiles`],queryFn:async()=>{let e=new Hy({});return await ht().send(e)},staleTime:3e5}),ax=e=>a({queryKey:[`iam`,`instance-profiles`,e],queryFn:async()=>{let t=new Py({InstanceProfileName:e});return await ht().send(t)},staleTime:3e5}),ox=e=>a({queryKey:[`iam`,`instance-profiles-for-role`,e],queryFn:async()=>{let t=new Uy({RoleName:e});return await ht().send(t)},staleTime:3e5}),sx=q(`/_auth/eks/(clusters)/create-cluster`)({loader:async({context:e})=>{await Promise.all([e.queryClient.ensureQueryData(Tb),e.queryClient.ensureQueryData(_b),e.queryClient.ensureQueryData(tx),e.queryClient.ensureQueryData(fb)])},head:()=>({meta:[{title:`Create Cluster | EKS | Mulga`}]}),component:J(()=>R(()=>import(`./create-cluster.js`),__vite__mapDeps([47,1,2,3,48,4,5,6,33,49,7,8,50,51,10,36,18,11,29,17,34,37,52,53,39,20,13,38,54])),`component`)}),cx=q(`/_auth/ec2/(vpc)/create-vpc`)({head:()=>({meta:[{title:`Create VPC | EC2 | Mulga`}]}),component:J(()=>R(()=>import(`./create-vpc.js`),__vite__mapDeps([55,1,56,2,3,4,5,6,33,49,7,8,50,51,10,36,18,11,34,19,35,37,38,39,20,13,57])),`component`)}),lx=q(`/_auth/ec2/(volumes)/create-volume`)({loader:async({context:e})=>{await e.queryClient.ensureQueryData(sb)},head:()=>({meta:[{title:`Create Volume | EC2 | Mulga`}]}),component:J(()=>R(()=>import(`./create-volume.js`),__vite__mapDeps([58,1,56,2,3,4,5,6,33,49,50,7,8,51,10,36,18,11,29,17,34,35,37,38,39,20,13,57])),`component`)}),ux=q(`/_auth/ec2/(target-groups)/create-target-group`)({loader:async({context:e})=>{await e.queryClient.ensureQueryData(Tb)},head:()=>({meta:[{title:`Create Target Group | EC2 | Mulga`}]}),component:J(()=>R(()=>import(`./create-target-group.js`),__vite__mapDeps([59,1,60,2,3,4,5,6,33,11,29,17,34,35,7,8,36,18,37,38,61,9,10,50,51,62,63,13,39,20,64])),`component`)}),dx=q(`/_auth/ec2/(subnet)/create-subnet`)({loader:async({context:e})=>{await Promise.all([e.queryClient.ensureQueryData(Tb),e.queryClient.ensureQueryData(sb)])},head:()=>({meta:[{title:`Create Subnet | EC2 | Mulga`}]}),component:J(()=>R(()=>import(`./create-subnet.js`),__vite__mapDeps([65,1,2,3,56,4,5,6,33,49,50,7,8,51,10,36,18,11,29,17,34,35,37,38,39,20,13,57])),`component`)}),fx=q(`/_auth/ec2/(snapshots)/create-snapshot`)({validateSearch:e=>({volumeId:typeof e.volumeId==`string`?e.volumeId:void 0}),loader:async({context:e})=>{await e.queryClient.ensureQueryData(Fb)},head:()=>({meta:[{title:`Create Snapshot | EC2 | Mulga`}]}),component:J(()=>R(()=>import(`./create-snapshot.js`),__vite__mapDeps([66,1,56,2,3,4,5,6,33,49,50,7,8,51,10,36,18,11,29,17,34,35,37,38,39,20,13,44,57])),`component`)}),px=q(`/_auth/ec2/(security-groups)/create-security-group`)({loader:async({context:e})=>{await e.queryClient.ensureQueryData(Tb)},head:()=>({meta:[{title:`Create Security Group | EC2 | Mulga`}]}),component:J(()=>R(()=>import(`./create-security-group.js`),__vite__mapDeps([67,1,2,3,56,4,5,6,33,49,50,7,8,51,10,36,18,11,29,17,34,35,37,38,39,20,13,57])),`component`)}),mx=q(`/_auth/ec2/(route-tables)/create-route-table`)({loader:async({context:e})=>{await e.queryClient.ensureQueryData(Tb)},head:()=>({meta:[{title:`Create Route Table | EC2 | Mulga`}]}),component:J(()=>R(()=>import(`./create-route-table.js`),__vite__mapDeps([68,1,2,3,56,4,5,6,33,49,50,7,8,51,10,36,18,11,29,17,34,39,20,13,57])),`component`)}),hx=q(`/_auth/ec2/(placement-groups)/create-placement-group`)({head:()=>({meta:[{title:`Create Placement Group | EC2 | Mulga`}]}),component:J(()=>R(()=>import(`./create-placement-group.js`),__vite__mapDeps([69,1,56,2,3,4,5,6,33,49,50,7,8,51,10,36,18,11,34,35,37,38,39,20,13,57])),`component`)}),gx=q(`/_auth/ec2/(nat-gateways)/create-nat-gateway`)({loader:async({context:e})=>{await Promise.all([e.queryClient.ensureQueryData(_b),e.queryClient.ensureQueryData(jb)])},head:()=>({meta:[{title:`Create NAT Gateway | EC2 | Mulga`}]}),component:J(()=>R(()=>import(`./create-nat-gateway.js`),__vite__mapDeps([70,1,2,3,4,5,6,56,33,49,50,7,8,51,10,36,18,11,29,17,34,35,37,38,39,20,13,57])),`component`)}),_x=a({queryKey:[`acm`,`certificates`],queryFn:async()=>{let e=new Xv({});return await mt().send(e)}}),vx=5e3,yx=a({queryKey:[`elbv2`,`loadBalancers`],queryFn:async()=>{let e=new Dy({});return await et().send(e)},refetchInterval:e=>(e.state.data?.LoadBalancers??[]).some(e=>e.State?.Code===`provisioning`)?vx:!1}),bx=e=>a({queryKey:[`elbv2`,`loadBalancers`,e],queryFn:async()=>{let t=new Dy({LoadBalancerArns:[e]});return await et().send(t)},refetchInterval:e=>(e.state.data?.LoadBalancers?.[0])?.State?.Code===`provisioning`?vx:!1}),xx=e=>a({queryKey:[`elbv2`,`loadBalancers`,e,`attributes`],queryFn:async()=>{let t=new Ey({LoadBalancerArn:e});return await et().send(t)}}),Sx=a({queryKey:[`elbv2`,`targetGroups`],queryFn:async()=>{let e=new My({});return await et().send(e)}}),Cx=e=>a({queryKey:[`elbv2`,`targetGroups`,e],queryFn:async()=>{let t=new My({TargetGroupArns:[e]});return await et().send(t)}}),wx=e=>a({queryKey:[`elbv2`,`targetGroups`,e,`attributes`],queryFn:async()=>{let t=new jy({TargetGroupArn:e});return await et().send(t)}}),Tx=e=>a({queryKey:[`elbv2`,`listeners`,e],queryFn:async()=>{let t=new Ty({LoadBalancerArn:e});return await et().send(t)}}),Ex=e=>a({queryKey:[`elbv2`,`listeners`,e,`rules`],queryFn:async()=>{let t=new Oy({ListenerArn:e});return await et().send(t)}}),Dx=e=>a({queryKey:[`elbv2`,`targetGroups`,e,`health`],queryFn:async()=>{let t=new Ny({TargetGroupArn:e});return await et().send(t)}}),Ox=a({queryKey:[`elbv2`,`sslPolicies`],queryFn:async()=>{let e=new ky({});return await et().send(e)},staleTime:1/0}),kx=e=>a({queryKey:[`elbv2`,`tags`,...e],queryFn:async()=>{let t=new Ay({ResourceArns:e});return await et().send(t)},enabled:e.length>0}),Ax=q(`/_auth/ec2/(load-balancers)/create-load-balancer`)({loader:async({context:e})=>{await Promise.all([e.queryClient.ensureQueryData(Tb),e.queryClient.ensureQueryData(_b),e.queryClient.ensureQueryData(kb),e.queryClient.ensureQueryData(Sx),e.queryClient.ensureQueryData(_x),e.queryClient.ensureQueryData(Ox)])},head:()=>({meta:[{title:`Create Load Balancer | EC2 | Mulga`}]}),component:J(()=>R(()=>import(`./create-load-balancer.js`),__vite__mapDeps([71,1,2,3,72,4,5,6,73,7,8,33,13,44,60,50,51,10,36,18,11,29,17,34,62,35,37,38,63,61,9,39,20,64])),`component`)}),jx=q(`/_auth/ec2/(key)/import-key-pair`)({head:()=>({meta:[{title:`Import Key Pair | EC2 | Mulga`}]}),component:J(()=>R(()=>import(`./import-key-pair.js`),__vite__mapDeps([74,1,56,2,3,4,5,6,33,49,11,34,35,7,8,36,18,37,38,39,20,13,44,57])),`component`)}),Mx=q(`/_auth/ec2/(key)/create-key-pair`)({head:()=>({meta:[{title:`Create Key Pair | EC2 | Mulga`}]}),component:J(()=>R(()=>import(`./create-key-pair.js`),__vite__mapDeps([75,1,56,2,3,4,5,6,33,49,73,7,8,11,34,36,76,35,18,37,38,53,39,20,13,57])),`component`)}),Nx=q(`/_auth/ec2/(internet-gateways)/create-internet-gateway`)({head:()=>({meta:[{title:`Create Internet Gateway | EC2 | Mulga`}]}),component:J(()=>R(()=>import(`./create-internet-gateway.js`),__vite__mapDeps([77,1,56,2,3,4,5,6,33,49,11,34,35,7,8,36,18,37,38,39,20,13,57])),`component`)}),Px=q(`/_auth/ec2/(instances)/run-instances`)({loader:async({context:e})=>{await Promise.all([e.queryClient.ensureQueryData(fb),e.queryClient.ensureQueryData(mb),e.queryClient.ensureQueryData(db),e.queryClient.ensureQueryData(_b),e.queryClient.ensureQueryData(Db),e.queryClient.ensureQueryData(Tb),e.queryClient.ensureQueryData(kb)])},head:()=>({meta:[{title:`Run Instances | EC2 | Mulga`}]}),component:J(()=>R(()=>import(`./run-instances.js`),__vite__mapDeps([78,1,2,3,56,4,5,6,33,49,7,8,9,10,50,51,36,18,11,29,17,34,35,37,38,20,13,57])),`component`)}),Fx=q(`/_auth/ec2/(elastic-ips)/allocate-address`)({head:()=>({meta:[{title:`Allocate Elastic IP | EC2 | Mulga`}]}),component:J(()=>R(()=>import(`./allocate-address.js`),__vite__mapDeps([79,1,56,2,3,4,5,6,33,49,11,34,35,7,8,36,18,37,38,39,20,13,57])),`component`)}),Ix=q(`/_auth/s3/ls/$bucket`)({component:J(()=>R(()=>import(`./route2.js`),__vite__mapDeps([80,1])),`component`)}),Lx=q(`/_auth/s3/ls/$bucket/`)({loader:async({context:e,params:t})=>{await e.queryClient.ensureQueryData(Rb(t.bucket))},head:({params:e})=>({meta:[{title:`${e.bucket} | S3 | Mulga`}]}),component:J(()=>R(()=>import(`./_bucket.js`),__vite__mapDeps([81,1,2,3,32,5,4,6,33,82,7,8,76,63,83,73,29,17,34,20])),`component`)}),Rx=q(`/_auth/iam/(users)/list-users/`)({loader:async({context:e})=>{await e.queryClient.ensureQueryData(Jb)},head:()=>({meta:[{title:`Users | IAM | Mulga`}]}),component:J(()=>R(()=>import(`./list-users.js`),__vite__mapDeps([84,1,4,2,3,5,6,7,8,29,17,30,20])),`component`)}),zx=q(`/_auth/iam/(roles)/list-roles/`)({loader:async({context:e})=>{await e.queryClient.ensureQueryData(tx)},head:()=>({meta:[{title:`Roles | IAM | Mulga`}]}),component:J(()=>R(()=>import(`./list-roles.js`),__vite__mapDeps([85,1,4,2,3,5,6,7,8,29,17,30,20])),`component`)}),Bx=q(`/_auth/iam/(policies)/list-policies/`)({loader:async({context:e})=>{await e.queryClient.ensureQueryData(Zb)},head:()=>({meta:[{title:`Policies | IAM | Mulga`}]}),component:J(()=>R(()=>import(`./list-policies.js`),__vite__mapDeps([86,1,4,2,3,5,6,7,8,29,17,30,20])),`component`)}),Vx=q(`/_auth/iam/(instance-profiles)/list-instance-profiles/`)({loader:async({context:e})=>{await e.queryClient.ensureQueryData(ix)},head:()=>({meta:[{title:`Instance Profiles | IAM | Mulga`}]}),component:J(()=>R(()=>import(`./list-instance-profiles.js`),__vite__mapDeps([87,1,4,2,3,5,6,7,8,29,17,30,20])),`component`)}),Hx=3e4,Ux=3e5,Wx=a({queryKey:[`eks`,`clusters`],queryFn:async()=>{let e=new Cy({});return await lt().send(e)},staleTime:Hx}),Gx=e=>a({queryKey:[`eks`,`clusters`,e],queryFn:async()=>{let t=new _y({name:e});return await lt().send(t)},staleTime:Hx}),Kx=e=>a({queryKey:[`eks`,`clusters`,e,`nodegroups`],queryFn:async()=>{let t=new wy({clusterName:e});return await lt().send(t)},staleTime:Hx}),qx=(e,t)=>a({queryKey:[`eks`,`clusters`,e,`nodegroups`,t],queryFn:async()=>{let n=new vy({clusterName:e,nodegroupName:t});return await lt().send(n)},staleTime:Hx}),Jx=e=>a({queryKey:[`eks`,`clusters`,e,`access-entries`],queryFn:async()=>{let t=new yy({clusterName:e});return await lt().send(t)},staleTime:Hx}),Yx=(e,t)=>a({queryKey:[`eks`,`clusters`,e,`access-entries`,t],queryFn:async()=>{let n=new my({clusterName:e,principalArn:t});return await lt().send(n)},staleTime:Hx}),Xx=(e,t)=>a({queryKey:[`eks`,`clusters`,e,`access-entries`,t,`policies`],queryFn:async()=>{let n=new Sy({clusterName:e,principalArn:t});return await lt().send(n)},staleTime:Hx});a({queryKey:[`eks`,`access-policies`],queryFn:async()=>{let e=new by({});return await lt().send(e)},staleTime:Ux});var Zx=a({queryKey:[`eks`,`addon-versions`],queryFn:async()=>{let e=new gy({});return await lt().send(e)},staleTime:Ux}),Qx=e=>a({queryKey:[`eks`,`clusters`,e,`addons`],queryFn:async()=>{let t=new xy({clusterName:e});return await lt().send(t)},staleTime:Hx}),$x=(e,t)=>a({queryKey:[`eks`,`clusters`,e,`addons`,t],queryFn:async()=>{let n=new hy({clusterName:e,addonName:t});return await lt().send(n)},staleTime:Hx}),eS=q(`/_auth/eks/(clusters)/list-clusters/`)({loader:async({context:e})=>{await e.queryClient.ensureQueryData(Wx)},head:()=>({meta:[{title:`Clusters | EKS | Mulga`}]}),component:J(()=>R(()=>import(`./list-clusters.js`),__vite__mapDeps([88,1,4,2,3,5,6,7,8,29,17,30,20])),`component`)}),tS=q(`/_auth/ec2/(vpc)/describe-vpcs/`)({loader:async({context:e})=>{await e.queryClient.ensureQueryData(Tb)},head:()=>({meta:[{title:`VPCs | EC2 | Mulga`}]}),component:J(()=>R(()=>import(`./describe-vpcs.js`),__vite__mapDeps([89,1,2,3,4,5,6,7,8,29,17,30,20,21])),`component`)}),nS=q(`/_auth/ec2/(volumes)/describe-volumes/`)({loader:async({context:e})=>{await e.queryClient.ensureQueryData(Fb)},head:()=>({meta:[{title:`Volumes | EC2 | Mulga`}]}),component:J(()=>R(()=>import(`./describe-volumes.js`),__vite__mapDeps([90,1,4,2,3,5,6,7,8,29,17,30,20,21])),`component`)}),rS=q(`/_auth/ec2/(target-groups)/describe-target-groups/`)({loader:async({context:e})=>{await e.queryClient.ensureQueryData(Sx)},head:()=>({meta:[{title:`Target Groups | EC2 | Mulga`}]}),component:J(()=>R(()=>import(`./describe-target-groups.js`),__vite__mapDeps([91,1,4,2,3,5,6,7,8,16,17,29,20])),`component`)}),iS=q(`/_auth/ec2/(subnet)/describe-subnets/`)({loader:async({context:e})=>{await e.queryClient.ensureQueryData(_b)},head:()=>({meta:[{title:`Subnets | EC2 | Mulga`}]}),component:J(()=>R(()=>import(`./describe-subnets.js`),__vite__mapDeps([92,1,2,3,4,5,6,7,8,29,17,30,20,21])),`component`)}),aS=q(`/_auth/ec2/(snapshots)/describe-snapshots/`)({loader:async({context:e})=>{await e.queryClient.ensureQueryData(yb)},head:()=>({meta:[{title:`Snapshots | EC2 | Mulga`}]}),component:J(()=>R(()=>import(`./describe-snapshots.js`),__vite__mapDeps([93,1,4,2,3,5,6,7,8,29,17,30,20,21])),`component`)}),oS=q(`/_auth/ec2/(security-groups)/describe-security-groups/`)({loader:async({context:e})=>{await e.queryClient.ensureQueryData(kb)},head:()=>({meta:[{title:`Security Groups | EC2 | Mulga`}]}),component:J(()=>R(()=>import(`./describe-security-groups.js`),__vite__mapDeps([94,1,4,2,3,5,6,7,8,29,17,30,20])),`component`)}),sS=q(`/_auth/ec2/(route-tables)/describe-route-tables/`)({loader:async({context:e})=>{await e.queryClient.ensureQueryData(Cb)},head:()=>({meta:[{title:`Route Tables | EC2 | Mulga`}]}),component:J(()=>R(()=>import(`./describe-route-tables.js`),__vite__mapDeps([95,1,2,3,4,5,6,7,8,29,17,30,20,22])),`component`)}),cS=q(`/_auth/ec2/(placement-groups)/describe-placement-groups/`)({loader:async({context:e})=>{await e.queryClient.ensureQueryData(Db)},head:()=>({meta:[{title:`Placement Groups | EC2 | Mulga`}]}),component:J(()=>R(()=>import(`./describe-placement-groups.js`),__vite__mapDeps([96,1,4,2,3,5,6,7,8,29,17,30,20,21])),`component`)}),lS=q(`/_auth/ec2/(nat-gateways)/describe-nat-gateways/`)({loader:async({context:e})=>{await e.queryClient.ensureQueryData(Nb)},head:()=>({meta:[{title:`NAT Gateways | EC2 | Mulga`}]}),component:J(()=>R(()=>import(`./describe-nat-gateways.js`),__vite__mapDeps([97,1,2,3,4,5,6,7,8,29,17,30,20,21])),`component`)}),uS=q(`/_auth/ec2/(load-balancers)/describe-load-balancers/`)({loader:async({context:e})=>{await e.queryClient.ensureQueryData(yx)},head:()=>({meta:[{title:`Load Balancers | EC2 | Mulga`}]}),component:J(()=>R(()=>import(`./describe-load-balancers.js`),__vite__mapDeps([98,1,2,3,4,5,6,7,8,29,17,20,21])),`component`)}),dS=q(`/_auth/ec2/(key)/describe-key-pairs/`)({loader:async({context:e})=>{await e.queryClient.ensureQueryData(mb)},head:()=>({meta:[{title:`Key Pairs | EC2 | Mulga`}]}),component:J(()=>R(()=>import(`./describe-key-pairs.js`),__vite__mapDeps([99,1,4,2,3,5,6,7,8,29,17,30,20])),`component`)}),fS=q(`/_auth/ec2/(internet-gateways)/describe-internet-gateways/`)({loader:async({context:e})=>{await e.queryClient.ensureQueryData(xb)},head:()=>({meta:[{title:`Internet Gateways | EC2 | Mulga`}]}),component:J(()=>R(()=>import(`./describe-internet-gateways.js`),__vite__mapDeps([100,1,2,3,4,5,6,7,8,29,17,30,20])),`component`)}),pS=q(`/_auth/ec2/(instances)/describe-instances/`)({loader:async({context:e})=>{await e.queryClient.ensureQueryData(cb)},head:()=>({meta:[{title:`Instances | EC2 | Mulga`}]}),component:J(()=>R(()=>import(`./describe-instances.js`),__vite__mapDeps([101,1,4,2,3,5,6,7,8,29,17,30,20,21])),`component`)}),mS=q(`/_auth/ec2/(images)/describe-images/`)({loader:async({context:e})=>{await e.queryClient.ensureQueryData(fb)},head:()=>({meta:[{title:`Images | EC2 | Mulga`}]}),component:J(()=>R(()=>import(`./describe-images.js`),__vite__mapDeps([102,1,29,17,30,4,2,3,5,6,20,21,54])),`component`)}),hS=q(`/_auth/ec2/(elastic-ips)/describe-addresses/`)({loader:async({context:e})=>{await e.queryClient.ensureQueryData(jb)},head:()=>({meta:[{title:`Elastic IPs | EC2 | Mulga`}]}),component:J(()=>R(()=>import(`./describe-addresses.js`),__vite__mapDeps([103,1,2,3,4,5,6,7,8,29,17,30,20])),`component`)}),gS=q(`/_auth/s3/ls/$bucket/$`)({loader:async({context:e,params:t})=>{let n=mn(t._splat??``);await e.queryClient.ensureQueryData(Rb(t.bucket,n))},head:({params:e})=>({meta:[{title:`${$t(e._splat??``,`${e.bucket}/`)} | S3 | Mulga`}]}),component:J(()=>R(()=>import(`./_.js`),__vite__mapDeps([104,1,2,3,32,5,4,6,33,82,7,8,76,63,83,73,29,17,34])),`component`)}),_S=q(`/_auth/iam/(users)/list-users/$userName`)({loader:async({context:e,params:t})=>{await Promise.all([e.queryClient.ensureQueryData(Yb(t.userName)),e.queryClient.ensureQueryData(Xb(t.userName)),e.queryClient.ensureQueryData(ex(t.userName)),e.queryClient.ensureQueryData(Zb)])},head:({params:e})=>({meta:[{title:`${e.userName} | IAM | Mulga`}]}),component:J(()=>R(()=>import(`./_userName.js`),__vite__mapDeps([105,1,2,3,41,4,5,6,33,73,7,8,29,17,34,36,63,53,83,106,20,21,38])),`component`)}),vS=q(`/_auth/iam/(roles)/list-roles/$roleName`)({loader:async({context:e,params:t})=>{await Promise.all([e.queryClient.ensureQueryData(nx(t.roleName)),e.queryClient.ensureQueryData(rx(t.roleName)),e.queryClient.ensureQueryData(ox(t.roleName)),e.queryClient.ensureQueryData(Zb)])},head:({params:e})=>({meta:[{title:`${e.roleName} | IAM | Mulga`}]}),component:J(()=>R(()=>import(`./_roleName.js`),__vite__mapDeps([107,1,2,3,4,5,6,41,33,7,8,29,17,34,63,83,73,106,20,108])),`component`)}),yS=q(`/_auth/iam/(policies)/list-policies/$policyArn`)({loader:async({context:e,params:t})=>{let n=decodeURIComponent(t.policyArn),r=await e.queryClient.ensureQueryData(Qb(n)),i=r.Policy?.DefaultVersionId;return i&&await e.queryClient.ensureQueryData($b(n,i)),r},head:({loaderData:e})=>({meta:[{title:`${e?.Policy?.PolicyName??`Policy`} | IAM | Mulga`}]}),component:J(()=>R(()=>import(`./_policyArn.js`),__vite__mapDeps([109,1,2,3,41,4,5,6,33,7,8,29,17,34,63,83,73,106,20,108])),`component`)}),bS=q(`/_auth/iam/(instance-profiles)/list-instance-profiles/$instanceProfileName`)({loader:async({context:e,params:t})=>{await Promise.all([e.queryClient.ensureQueryData(ax(t.instanceProfileName)),e.queryClient.ensureQueryData(tx)])},head:({params:e})=>({meta:[{title:`${e.instanceProfileName} | IAM | Mulga`}]}),component:J(()=>R(()=>import(`./_instanceProfileName.js`),__vite__mapDeps([110,1,2,3,4,5,6,41,33,7,8,29,17,34,63,83,73,106,20])),`component`)}),xS=q(`/_auth/eks/(clusters)/list-clusters/$clusterName`)({loader:async({context:e,params:t})=>{await Promise.all([e.queryClient.ensureQueryData(Gx(t.clusterName)),e.queryClient.ensureQueryData(Kx(t.clusterName)),e.queryClient.ensureQueryData(Jx(t.clusterName))])},head:({params:e})=>({meta:[{title:`${e.clusterName} | EKS | Mulga`}]}),component:J(()=>R(()=>import(`./_clusterName.js`),__vite__mapDeps([111,1,2,3,4,5,6,48,33,49,73,7,8,112,51,10,11,16,17,29,34,35,36,18,37,38,63,83,106,20,22,13,44])),`component`)}),SS=q(`/_auth/ec2/(vpc)/describe-vpcs/$id`)({loader:async({context:e,params:t})=>{await Promise.all([e.queryClient.ensureQueryData(Eb(t.id)),e.queryClient.ensureQueryData(_b)])},head:({params:e})=>({meta:[{title:`${e.id} | VPC | Mulga`}]}),component:J(()=>R(()=>import(`./_id16.js`),__vite__mapDeps([113,1,2,3,4,5,6,56,33,49,7,8,29,17,34,63,83,73,106,20,21])),`component`)}),CS=q(`/_auth/ec2/(volumes)/modify-volume/$id`)({loader:async({context:e,params:t})=>{await e.queryClient.ensureQueryData(Ib(t.id))},head:({params:e})=>({meta:[{title:`Resize ${e.id} | EC2 | Mulga`}]}),component:J(()=>R(()=>import(`./_id15.js`),__vite__mapDeps([114,1,56,2,3,4,5,6,33,49,11,29,17,34,39,7,8,20,13,57])),`component`)}),wS=q(`/_auth/ec2/(volumes)/describe-volumes/$id`)({loader:async({context:e,params:t})=>{await Promise.all([e.queryClient.ensureQueryData(Ib(t.id)),e.queryClient.ensureQueryData(cb)])},head:({params:e})=>({meta:[{title:`${e.id} | EC2 | Mulga`}]}),component:J(()=>R(()=>import(`./_id14.js`),__vite__mapDeps([115,1,2,3,4,5,6,56,33,49,73,7,8,50,51,10,36,18,29,17,34,63,83,106,20,21,13])),`component`)}),TS=q(`/_auth/ec2/(target-groups)/describe-target-groups/$id`)({loader:async({context:e,params:t})=>{let n=decodeURIComponent(t.id);await Promise.all([e.queryClient.ensureQueryData(Cx(n)),e.queryClient.ensureQueryData(wx(n)),e.queryClient.ensureQueryData(kx([n])),e.queryClient.ensureQueryData(cb)])},head:({params:e})=>({meta:[{title:`${decodeURIComponent(e.id)} | Target Group | Mulga`}]}),component:J(()=>R(()=>import(`./_id13.js`),__vite__mapDeps([116,1,2,3,60,4,5,6,33,73,7,8,112,51,10,16,17,29,34,63,83,106,117,50,36,18,62,13,20])),`component`)}),ES=q(`/_auth/ec2/(subnet)/describe-subnets/$id`)({loader:async({context:e,params:t})=>{await e.queryClient.ensureQueryData(vb(t.id))},head:({params:e})=>({meta:[{title:`${e.id} | Subnet | Mulga`}]}),component:J(()=>R(()=>import(`./_id12.js`),__vite__mapDeps([118,1,2,3,4,5,6,56,33,49,7,8,29,17,34,63,83,73,106,20,21])),`component`)}),DS=q(`/_auth/ec2/(snapshots)/describe-snapshots/$id`)({loader:async({context:e,params:t})=>{await Promise.all([e.queryClient.ensureQueryData(bb(t.id)),e.queryClient.ensureQueryData(gb)])},head:({params:e})=>({meta:[{title:`${e.id} | EC2 | Mulga`}]}),component:J(()=>R(()=>import(`./_id11.js`),__vite__mapDeps([119,1,2,3,4,5,6,56,33,49,73,7,8,29,17,34,37,63,83,106,20,21,13])),`component`)}),OS=q(`/_auth/ec2/(security-groups)/describe-security-groups/$id`)({loader:async({context:e,params:t})=>{await e.queryClient.ensureQueryData(Ab(t.id))},head:({params:e})=>({meta:[{title:`${e.id} | Security Group | Mulga`}]}),component:J(()=>R(()=>import(`./_id10.js`),__vite__mapDeps([120,1,4,2,3,5,6,56,33,49,73,7,8,50,51,10,36,18,11,29,17,34,62,63,83,106,20,13,57])),`component`)}),kS=q(`/_auth/ec2/(route-tables)/describe-route-tables/$id`)({loader:async({context:e,params:t})=>{await Promise.all([e.queryClient.ensureQueryData(wb(t.id)),e.queryClient.ensureQueryData(xb),e.queryClient.ensureQueryData(Nb),e.queryClient.ensureQueryData(_b)])},head:({params:e})=>({meta:[{title:`${e.id} | Route Table | Mulga`}]}),component:J(()=>R(()=>import(`./_id9.js`),__vite__mapDeps([121,1,2,3,4,5,6,56,33,49,7,8,50,51,10,36,18,11,29,17,34,63,83,73,106,20,22,13,57])),`component`)}),AS=q(`/_auth/ec2/(placement-groups)/describe-placement-groups/$id`)({loader:async({context:e,params:t})=>{await Promise.all([e.queryClient.ensureQueryData(Ob(t.id)),e.queryClient.ensureQueryData(cb)])},head:({params:e})=>({meta:[{title:`${e.id} | EC2 | Mulga`}]}),component:J(()=>R(()=>import(`./_id8.js`),__vite__mapDeps([122,1,4,2,3,5,6,56,33,49,7,8,29,17,34,63,83,73,106,20,21])),`component`)}),jS=q(`/_auth/ec2/(nat-gateways)/describe-nat-gateways/$id`)({loader:async({context:e,params:t})=>{await e.queryClient.ensureQueryData(Pb(t.id))},head:({params:e})=>({meta:[{title:`${e.id} | NAT Gateway | Mulga`}]}),component:J(()=>R(()=>import(`./_id7.js`),__vite__mapDeps([123,1,2,3,4,5,6,56,33,49,7,8,29,17,34,63,83,73,106,20,21])),`component`)}),MS=q(`/_auth/ec2/(load-balancers)/describe-load-balancers/$id`)({loader:async({context:e,params:t})=>{let n=decodeURIComponent(t.id);await Promise.all([e.queryClient.ensureQueryData(bx(n)),e.queryClient.ensureQueryData(Tx(n)),e.queryClient.ensureQueryData(xx(n)),e.queryClient.ensureQueryData(kx([n])),e.queryClient.ensureQueryData(Sx),e.queryClient.ensureQueryData(_b)])},head:({params:e})=>({meta:[{title:`${decodeURIComponent(e.id)} | Load Balancer | Mulga`}]}),component:J(()=>R(()=>import(`./_id6.js`),__vite__mapDeps([124,1,2,3,72,4,5,6,73,7,8,33,13,44,60,50,51,10,36,18,112,11,29,17,34,63,83,106,117,62,20,21,64])),`component`)}),NS=q(`/_auth/ec2/(key)/describe-key-pairs/$id`)({loader:async({context:e,params:t})=>await e.queryClient.ensureQueryData(hb(t.id)),head:({loaderData:e})=>({meta:[{title:`${e?.KeyPairs?.[0]?.KeyName??`Key Pair`} | EC2 | Mulga`}]}),component:J(()=>R(()=>import(`./_id5.js`),__vite__mapDeps([125,1,2,3,56,4,5,6,33,49,7,8,29,17,34,63,83,73,106,20])),`component`)}),PS=q(`/_auth/ec2/(internet-gateways)/describe-internet-gateways/$id`)({loader:async({context:e,params:t})=>{await Promise.all([e.queryClient.ensureQueryData(Sb(t.id)),e.queryClient.ensureQueryData(Tb)])},head:({params:e})=>({meta:[{title:`${e.id} | Internet Gateway | Mulga`}]}),component:J(()=>R(()=>import(`./_id4.js`),__vite__mapDeps([126,1,2,3,4,5,6,56,33,49,7,8,50,51,10,36,18,29,17,34,63,83,73,106,20])),`component`)}),FS=q(`/_auth/ec2/(instances)/describe-instances/$id`)({loader:async({context:e,params:t})=>{let[n]=await Promise.all([e.queryClient.ensureQueryData(lb(t.id)),e.queryClient.ensureQueryData(db)]),r=n.Reservations?.[0]?.Instances?.[0]?.ImageId;return await e.queryClient.ensureQueryData(pb(r)),n},head:({loaderData:e})=>({meta:[{title:`${e?.Reservations?.[0]?.Instances?.[0]?.InstanceId??`Instance`} | EC2 | Mulga`}]}),component:J(()=>R(()=>import(`./_id3.js`),__vite__mapDeps([127,1,2,3,4,5,6,56,33,49,73,7,8,50,51,10,36,18,16,17,29,34,52,63,83,106,20,21,13,44,23,24,128])),`component`)}),IS=q(`/_auth/ec2/(images)/describe-images/$id`)({loader:async({context:e,params:t})=>await e.queryClient.ensureQueryData(pb(t.id)),head:({loaderData:e})=>({meta:[{title:`${e?.Images?.[0]?.Name??`Image`} | EC2 | Mulga`}]}),component:J(()=>R(()=>import(`./_id2.js`),__vite__mapDeps([129,1,29,17,34,4,2,3,5,6,20,21,54,128,106])),`component`)}),LS=q(`/_auth/ec2/(elastic-ips)/describe-addresses/$id`)({loader:async({context:e,params:t})=>{await Promise.all([e.queryClient.ensureQueryData(Mb(t.id)),e.queryClient.ensureQueryData(cb)])},head:({params:e})=>({meta:[{title:`${e.id} | Elastic IP | Mulga`}]}),component:J(()=>R(()=>import(`./_id.js`),__vite__mapDeps([130,1,2,3,56,4,5,6,33,49,7,8,50,51,10,36,18,29,17,34,63,83,73,106,20])),`component`)}),RS=ab.update({id:`/login`,path:`/login`,getParentRoute:()=>ib}),$=ob.update({id:`/_auth`,getParentRoute:()=>ib}),zS=zb.update({id:`/`,path:`/`,getParentRoute:()=>$}),BS=Bb.update({id:`/nodes`,path:`/nodes`,getParentRoute:()=>$}),VS=Vb.update({id:`/s3/service-metrics`,path:`/s3/service-metrics`,getParentRoute:()=>$}),HS=Hb.update({id:`/s3/ls/`,path:`/s3/ls/`,getParentRoute:()=>$}),US=Ub.update({id:`/s3/(buckets)/create-bucket`,path:`/s3/create-bucket`,getParentRoute:()=>$}),WS=Wb.update({id:`/iam/(users)/create-user`,path:`/iam/create-user`,getParentRoute:()=>$}),GS=Gb.update({id:`/iam/(roles)/create-role`,path:`/iam/create-role`,getParentRoute:()=>$}),KS=Kb.update({id:`/iam/(policies)/create-policy`,path:`/iam/create-policy`,getParentRoute:()=>$}),qS=qb.update({id:`/iam/(instance-profiles)/create-instance-profile`,path:`/iam/create-instance-profile`,getParentRoute:()=>$}),JS=sx.update({id:`/eks/(clusters)/create-cluster`,path:`/eks/create-cluster`,getParentRoute:()=>$}),YS=cx.update({id:`/ec2/(vpc)/create-vpc`,path:`/ec2/create-vpc`,getParentRoute:()=>$}),XS=lx.update({id:`/ec2/(volumes)/create-volume`,path:`/ec2/create-volume`,getParentRoute:()=>$}),ZS=ux.update({id:`/ec2/(target-groups)/create-target-group`,path:`/ec2/create-target-group`,getParentRoute:()=>$}),QS=dx.update({id:`/ec2/(subnet)/create-subnet`,path:`/ec2/create-subnet`,getParentRoute:()=>$}),$S=fx.update({id:`/ec2/(snapshots)/create-snapshot`,path:`/ec2/create-snapshot`,getParentRoute:()=>$}),eC=px.update({id:`/ec2/(security-groups)/create-security-group`,path:`/ec2/create-security-group`,getParentRoute:()=>$}),tC=mx.update({id:`/ec2/(route-tables)/create-route-table`,path:`/ec2/create-route-table`,getParentRoute:()=>$}),nC=hx.update({id:`/ec2/(placement-groups)/create-placement-group`,path:`/ec2/create-placement-group`,getParentRoute:()=>$}),rC=gx.update({id:`/ec2/(nat-gateways)/create-nat-gateway`,path:`/ec2/create-nat-gateway`,getParentRoute:()=>$}),iC=Ax.update({id:`/ec2/(load-balancers)/create-load-balancer`,path:`/ec2/create-load-balancer`,getParentRoute:()=>$}),aC=jx.update({id:`/ec2/(key)/import-key-pair`,path:`/ec2/import-key-pair`,getParentRoute:()=>$}),oC=Mx.update({id:`/ec2/(key)/create-key-pair`,path:`/ec2/create-key-pair`,getParentRoute:()=>$}),sC=Nx.update({id:`/ec2/(internet-gateways)/create-internet-gateway`,path:`/ec2/create-internet-gateway`,getParentRoute:()=>$}),cC=Px.update({id:`/ec2/(instances)/run-instances`,path:`/ec2/run-instances`,getParentRoute:()=>$}),lC=Fx.update({id:`/ec2/(elastic-ips)/allocate-address`,path:`/ec2/allocate-address`,getParentRoute:()=>$}),uC=Ix.update({id:`/s3/ls/$bucket`,path:`/s3/ls/$bucket`,getParentRoute:()=>$}),dC=Lx.update({id:`/`,path:`/`,getParentRoute:()=>uC}),fC=Rx.update({id:`/iam/(users)/list-users/`,path:`/iam/list-users/`,getParentRoute:()=>$}),pC=zx.update({id:`/iam/(roles)/list-roles/`,path:`/iam/list-roles/`,getParentRoute:()=>$}),mC=Bx.update({id:`/iam/(policies)/list-policies/`,path:`/iam/list-policies/`,getParentRoute:()=>$}),hC=Vx.update({id:`/iam/(instance-profiles)/list-instance-profiles/`,path:`/iam/list-instance-profiles/`,getParentRoute:()=>$}),gC=eS.update({id:`/eks/(clusters)/list-clusters/`,path:`/eks/list-clusters/`,getParentRoute:()=>$}),_C=tS.update({id:`/ec2/(vpc)/describe-vpcs/`,path:`/ec2/describe-vpcs/`,getParentRoute:()=>$}),vC=nS.update({id:`/ec2/(volumes)/describe-volumes/`,path:`/ec2/describe-volumes/`,getParentRoute:()=>$}),yC=rS.update({id:`/ec2/(target-groups)/describe-target-groups/`,path:`/ec2/describe-target-groups/`,getParentRoute:()=>$}),bC=iS.update({id:`/ec2/(subnet)/describe-subnets/`,path:`/ec2/describe-subnets/`,getParentRoute:()=>$}),xC=aS.update({id:`/ec2/(snapshots)/describe-snapshots/`,path:`/ec2/describe-snapshots/`,getParentRoute:()=>$}),SC=oS.update({id:`/ec2/(security-groups)/describe-security-groups/`,path:`/ec2/describe-security-groups/`,getParentRoute:()=>$}),CC=sS.update({id:`/ec2/(route-tables)/describe-route-tables/`,path:`/ec2/describe-route-tables/`,getParentRoute:()=>$}),wC=cS.update({id:`/ec2/(placement-groups)/describe-placement-groups/`,path:`/ec2/describe-placement-groups/`,getParentRoute:()=>$}),TC=lS.update({id:`/ec2/(nat-gateways)/describe-nat-gateways/`,path:`/ec2/describe-nat-gateways/`,getParentRoute:()=>$}),EC=uS.update({id:`/ec2/(load-balancers)/describe-load-balancers/`,path:`/ec2/describe-load-balancers/`,getParentRoute:()=>$}),DC=dS.update({id:`/ec2/(key)/describe-key-pairs/`,path:`/ec2/describe-key-pairs/`,getParentRoute:()=>$}),OC=fS.update({id:`/ec2/(internet-gateways)/describe-internet-gateways/`,path:`/ec2/describe-internet-gateways/`,getParentRoute:()=>$}),kC=pS.update({id:`/ec2/(instances)/describe-instances/`,path:`/ec2/describe-instances/`,getParentRoute:()=>$}),AC=mS.update({id:`/ec2/(images)/describe-images/`,path:`/ec2/describe-images/`,getParentRoute:()=>$}),jC=hS.update({id:`/ec2/(elastic-ips)/describe-addresses/`,path:`/ec2/describe-addresses/`,getParentRoute:()=>$}),MC=gS.update({id:`/$`,path:`/$`,getParentRoute:()=>uC}),NC=_S.update({id:`/iam/(users)/list-users/$userName`,path:`/iam/list-users/$userName`,getParentRoute:()=>$}),PC=vS.update({id:`/iam/(roles)/list-roles/$roleName`,path:`/iam/list-roles/$roleName`,getParentRoute:()=>$}),FC=yS.update({id:`/iam/(policies)/list-policies/$policyArn`,path:`/iam/list-policies/$policyArn`,getParentRoute:()=>$}),IC=bS.update({id:`/iam/(instance-profiles)/list-instance-profiles/$instanceProfileName`,path:`/iam/list-instance-profiles/$instanceProfileName`,getParentRoute:()=>$}),LC=xS.update({id:`/eks/(clusters)/list-clusters/$clusterName`,path:`/eks/list-clusters/$clusterName`,getParentRoute:()=>$}),RC=SS.update({id:`/ec2/(vpc)/describe-vpcs/$id`,path:`/ec2/describe-vpcs/$id`,getParentRoute:()=>$}),zC=CS.update({id:`/ec2/(volumes)/modify-volume/$id`,path:`/ec2/modify-volume/$id`,getParentRoute:()=>$}),BC=wS.update({id:`/ec2/(volumes)/describe-volumes/$id`,path:`/ec2/describe-volumes/$id`,getParentRoute:()=>$}),VC=TS.update({id:`/ec2/(target-groups)/describe-target-groups/$id`,path:`/ec2/describe-target-groups/$id`,getParentRoute:()=>$}),HC=ES.update({id:`/ec2/(subnet)/describe-subnets/$id`,path:`/ec2/describe-subnets/$id`,getParentRoute:()=>$}),UC=DS.update({id:`/ec2/(snapshots)/describe-snapshots/$id`,path:`/ec2/describe-snapshots/$id`,getParentRoute:()=>$}),WC=OS.update({id:`/ec2/(security-groups)/describe-security-groups/$id`,path:`/ec2/describe-security-groups/$id`,getParentRoute:()=>$}),GC=kS.update({id:`/ec2/(route-tables)/describe-route-tables/$id`,path:`/ec2/describe-route-tables/$id`,getParentRoute:()=>$}),KC=AS.update({id:`/ec2/(placement-groups)/describe-placement-groups/$id`,path:`/ec2/describe-placement-groups/$id`,getParentRoute:()=>$}),qC=jS.update({id:`/ec2/(nat-gateways)/describe-nat-gateways/$id`,path:`/ec2/describe-nat-gateways/$id`,getParentRoute:()=>$}),JC=MS.update({id:`/ec2/(load-balancers)/describe-load-balancers/$id`,path:`/ec2/describe-load-balancers/$id`,getParentRoute:()=>$}),YC=NS.update({id:`/ec2/(key)/describe-key-pairs/$id`,path:`/ec2/describe-key-pairs/$id`,getParentRoute:()=>$}),XC=PS.update({id:`/ec2/(internet-gateways)/describe-internet-gateways/$id`,path:`/ec2/describe-internet-gateways/$id`,getParentRoute:()=>$}),ZC=FS.update({id:`/ec2/(instances)/describe-instances/$id`,path:`/ec2/describe-instances/$id`,getParentRoute:()=>$}),QC=IS.update({id:`/ec2/(images)/describe-images/$id`,path:`/ec2/describe-images/$id`,getParentRoute:()=>$}),$C=LS.update({id:`/ec2/(elastic-ips)/describe-addresses/$id`,path:`/ec2/describe-addresses/$id`,getParentRoute:()=>$}),ew={AuthS3LsBucketSplatRoute:MC,AuthS3LsBucketIndexRoute:dC},tw={AuthNodesRoute:BS,AuthIndexRoute:zS,AuthS3ServiceMetricsRoute:VS,AuthS3LsBucketRouteRoute:uC._addFileChildren(ew),AuthEc2elasticIpsAllocateAddressRoute:lC,AuthEc2instancesRunInstancesRoute:cC,AuthEc2internetGatewaysCreateInternetGatewayRoute:sC,AuthEc2keyCreateKeyPairRoute:oC,AuthEc2keyImportKeyPairRoute:aC,AuthEc2loadBalancersCreateLoadBalancerRoute:iC,AuthEc2natGatewaysCreateNatGatewayRoute:rC,AuthEc2placementGroupsCreatePlacementGroupRoute:nC,AuthEc2routeTablesCreateRouteTableRoute:tC,AuthEc2securityGroupsCreateSecurityGroupRoute:eC,AuthEc2snapshotsCreateSnapshotRoute:$S,AuthEc2subnetCreateSubnetRoute:QS,AuthEc2targetGroupsCreateTargetGroupRoute:ZS,AuthEc2volumesCreateVolumeRoute:XS,AuthEc2vpcCreateVpcRoute:YS,AuthEksclustersCreateClusterRoute:JS,AuthIaminstanceProfilesCreateInstanceProfileRoute:qS,AuthIampoliciesCreatePolicyRoute:KS,AuthIamrolesCreateRoleRoute:GS,AuthIamusersCreateUserRoute:WS,AuthS3bucketsCreateBucketRoute:US,AuthS3LsIndexRoute:HS,AuthEc2elasticIpsDescribeAddressesIdRoute:$C,AuthEc2imagesDescribeImagesIdRoute:QC,AuthEc2instancesDescribeInstancesIdRoute:ZC,AuthEc2internetGatewaysDescribeInternetGatewaysIdRoute:XC,AuthEc2keyDescribeKeyPairsIdRoute:YC,AuthEc2loadBalancersDescribeLoadBalancersIdRoute:JC,AuthEc2natGatewaysDescribeNatGatewaysIdRoute:qC,AuthEc2placementGroupsDescribePlacementGroupsIdRoute:KC,AuthEc2routeTablesDescribeRouteTablesIdRoute:GC,AuthEc2securityGroupsDescribeSecurityGroupsIdRoute:WC,AuthEc2snapshotsDescribeSnapshotsIdRoute:UC,AuthEc2subnetDescribeSubnetsIdRoute:HC,AuthEc2targetGroupsDescribeTargetGroupsIdRoute:VC,AuthEc2volumesDescribeVolumesIdRoute:BC,AuthEc2volumesModifyVolumeIdRoute:zC,AuthEc2vpcDescribeVpcsIdRoute:RC,AuthEksclustersListClustersClusterNameRoute:LC,AuthIaminstanceProfilesListInstanceProfilesInstanceProfileNameRoute:IC,AuthIampoliciesListPoliciesPolicyArnRoute:FC,AuthIamrolesListRolesRoleNameRoute:PC,AuthIamusersListUsersUserNameRoute:NC,AuthEc2elasticIpsDescribeAddressesIndexRoute:jC,AuthEc2imagesDescribeImagesIndexRoute:AC,AuthEc2instancesDescribeInstancesIndexRoute:kC,AuthEc2internetGatewaysDescribeInternetGatewaysIndexRoute:OC,AuthEc2keyDescribeKeyPairsIndexRoute:DC,AuthEc2loadBalancersDescribeLoadBalancersIndexRoute:EC,AuthEc2natGatewaysDescribeNatGatewaysIndexRoute:TC,AuthEc2placementGroupsDescribePlacementGroupsIndexRoute:wC,AuthEc2routeTablesDescribeRouteTablesIndexRoute:CC,AuthEc2securityGroupsDescribeSecurityGroupsIndexRoute:SC,AuthEc2snapshotsDescribeSnapshotsIndexRoute:xC,AuthEc2subnetDescribeSubnetsIndexRoute:bC,AuthEc2targetGroupsDescribeTargetGroupsIndexRoute:yC,AuthEc2volumesDescribeVolumesIndexRoute:vC,AuthEc2vpcDescribeVpcsIndexRoute:_C,AuthEksclustersListClustersIndexRoute:gC,AuthIaminstanceProfilesListInstanceProfilesIndexRoute:hC,AuthIampoliciesListPoliciesIndexRoute:mC,AuthIamrolesListRolesIndexRoute:pC,AuthIamusersListUsersIndexRoute:fC},nw={AuthRouteRoute:$._addFileChildren(tw),LoginRoute:RS},rw=ib._addFileChildren(nw)._addFileTypes(),iw=Zy(),aw=es({routeTree:rw,context:{queryClient:iw},defaultPreload:`intent`,scrollRestoration:!0,defaultStructuralSharing:!0,defaultPreloadStaleTime:0}),ow=document.querySelector(`#app`);ow&&!ow.innerHTML&&ps.createRoot(ow).render((0,W.jsx)(U.StrictMode,{children:(0,W.jsx)(_s,{defaultTheme:`dark`,storageKey:`spinifex-ui-theme`,children:(0,W.jsx)(Pi,{client:iw,children:(0,W.jsx)(Kv,{children:(0,W.jsx)(cg,{children:(0,W.jsx)(rs,{router:aw})})})})})}));export{Zb as $,Al as $n,Mr as $r,Nm as $t,Wx as A,X as An,Ls as Ar,bb as At,kx as B,Su as Bn,fi as Br,Hv as Bt,Jx as C,Pd as Cn,ic as Cr,Ob as Ct,Qx as D,id as Dn,Ys as Dr,Cb as Dt,Zx as E,ld as En,Zs as Er,wb as Et,Tx as F,Bu as Fn,Yo as Fr,Fb as Ft,_x as G,_u as Gn,Lr as Gr,kh as Gt,Cx as H,bu as Hn,ci as Hr,Bh as Ht,xx as I,zu as In,No as Ir,Eb as It,rx as J,cu as Jn,Vr as Jr,Km as Jt,fx as K,du as Kn,ti as Kr,eh as Kt,bx as L,Du as Ln,Ni as Lr,Tb as Lt,Kx as M,Wu as Mn,Ns as Mr,vb as Mt,Lx as N,Uu as Nn,ks as Nr,_b as Nt,Xx as O,ad as On,qs as Or,Ab as Ot,Ex as P,Vu as Pn,ys as Pr,Ib as Pt,ix as Q,Nl as Qn,Pr as Qr,Pm as Qt,yx as R,Eu as Rn,Di as Rr,ab as Rt,gS as S,Nd as Sn,lc as Sr,Nb as St,$x as T,Sd as Tn,$s as Tr,gb as Tt,Sx as U,yu as Un,Kr as Ur,zh as Ut,wx as V,xu as Vn,li as Vr,Fv as Vt,Dx as W,mu as Wn,zr as Wr,Lh as Wt,ax as X,kl as Xn,oi as Xr,Im as Xt,ex as Y,jl as Yn,Xr as Yr,Lm as Yt,ox as Z,Ml as Zn,Br as Zr,Fm as Zt,xS as _,_p as _n,xc as _r,Sb as _t,NS as a,Tm as an,wl as ar,Jb as at,vS as b,Xd as bn,mc as br,mb as bt,AS as c,xm as cn,Jc as cr,Mb as ct,DS as d,Cm as dn,Bc as dr,ub as dt,jr as ei,gm as en,Ol as er,Qb as et,ES as f,Om as fn,Rc as fr,pb as ft,SS as g,xp as gn,Nc as gr,cb as gt,CS as h,Ep as hn,Mc as hr,db as ht,PS as i,hm as in,Pl as ir,Yb as it,qx as j,Gu as jn,Is as jr,yb as jt,Gx as k,td as kn,Vs as kr,kb as kt,kS as l,Em as ln,Gc as lr,jb as lt,wS as m,Gp as mn,jc as mr,lb as mt,IS as n,_m as nn,Il as nr,nx as nt,MS as o,ym as on,Yc as or,Rb as ot,TS as p,km as pn,Pc as pr,fb as pt,Xb as q,fu as qn,Hr as qr,Qm as qt,FS as r,vm as rn,El as rr,tx as rt,jS as s,bm as sn,qc as sr,Lb as st,LS as t,wm as tn,Dl as tr,$b as tt,OS as u,Sm as un,Hc as ur,sb as ut,bS as v,Q as vn,bc as vr,xb as vt,Yx as w,kd as wn,rc as wr,Db as wt,_S as x,Ud as xn,fc as xr,Pb as xt,yS as y,Rf as yn,hc as yr,hb as yt,Ox as z,Cu as zn,Ci as zr,qv as zt}; \ No newline at end of file +`).replace(jd,``)}function Nd(e,t){return t=Md(t),Md(e)===t}function Pd(e,t,n,r,i,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Kt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Kt(e,``+r);break;case`className`:At(e,`class`,r);break;case`tabIndex`:At(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:At(e,n,r);break;case`style`:Yt(e,r,o);break;case`data`:if(t!==`object`){At(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=$t(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}else typeof o==`function`&&(n===`formAction`?(t!==`input`&&Pd(e,t,`name`,i.name,i,null),Pd(e,t,`formEncType`,i.formEncType,i,null),Pd(e,t,`formMethod`,i.formMethod,i,null),Pd(e,t,`formTarget`,i.formTarget,i,null)):(Pd(e,t,`encType`,i.encType,i,null),Pd(e,t,`method`,i.method,i,null),Pd(e,t,`target`,i.target,i,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=$t(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=en);break;case`onScroll`:r!=null&&Z(`scroll`,e);break;case`onScrollEnd`:r!=null&&Z(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(a(61));if(n=r.__html,n!=null){if(i.children!=null)throw Error(a(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=$t(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:Z(`beforetoggle`,e),Z(`toggle`,e),kt(e,`popover`,r);break;case`xlinkActuate`:jt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:jt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:jt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:jt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:jt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:jt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:jt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:jt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:jt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:kt(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2s)break;var u=c.transferSize,d=c.initiatorType;u&&Rd(d)&&(c=c.responseEnd,o+=u*(c`u`?null:document;function Cf(e,t,n){var r=Sf;if(r&&typeof t==`string`&&t){var i=zt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),_f.has(i)||(_f.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Id(t,`link`,e),yt(t),r.head.appendChild(t)))}}function wf(e){yf.D(e),Cf(`dns-prefetch`,e,null)}function Tf(e,t){yf.C(e,t),Cf(`preconnect`,e,t)}function Ef(e,t,n){yf.L(e,t,n);var r=Sf;if(r&&e&&t){var i=`link[rel="preload"][as="`+zt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+zt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+zt(n.imageSizes)+`"]`)):i+=`[href="`+zt(e)+`"]`;var a=i;switch(t){case`style`:a=Mf(e);break;case`script`:a=If(e)}gf.has(a)||(e=p({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),gf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Nf(a))||t===`script`&&r.querySelector(Lf(a))||(t=r.createElement(`link`),Id(t,`link`,e),yt(t),r.head.appendChild(t)))}}function Df(e,t){yf.m(e,t);var n=Sf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+zt(r)+`"][href="`+zt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=If(e)}if(!gf.has(a)&&(e=p({rel:`modulepreload`,href:e},t),gf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Lf(a)))return}r=n.createElement(`link`),Id(r,`link`,e),yt(r),n.head.appendChild(r)}}}function Of(e,t,n){yf.S(e,t,n);var r=Sf;if(r&&e){var i=vt(r).hoistableStyles,a=Mf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Nf(a)))s.loading=5;else{e=p({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=gf.get(a))&&Bf(e,n);var c=o=r.createElement(`link`);yt(c),Id(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,zf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function kf(e,t){yf.X(e,t);var n=Sf;if(n&&e){var r=vt(n).hoistableScripts,i=If(e),a=r.get(i);a||(a=n.querySelector(Lf(i)),a||(e=p({src:e,async:!0},t),(t=gf.get(i))&&Vf(e,t),a=n.createElement(`script`),yt(a),Id(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Af(e,t){yf.M(e,t);var n=Sf;if(n&&e){var r=vt(n).hoistableScripts,i=If(e),a=r.get(i);a||(a=n.querySelector(Lf(i)),a||(e=p({src:e,async:!0,type:`module`},t),(t=gf.get(i))&&Vf(e,t),a=n.createElement(`script`),yt(a),Id(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function jf(e,t,n,r){var i=(i=I.current)?vf(i):null;if(!i)throw Error(a(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Mf(n.href),n=vt(i).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Mf(n.href);var o=vt(i).hoistableStyles,s=o.get(e);if(s||(i=i.ownerDocument||i,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=i.querySelector(Nf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),gf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},gf.set(e,n),o||Ff(i,e,n,s.state))),t&&r===null)throw Error(a(528,``));return s}if(t&&r!==null)throw Error(a(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=If(n),n=vt(i).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(a(444,e))}}function Mf(e){return`href="`+zt(e)+`"`}function Nf(e){return`link[rel="stylesheet"][`+e+`]`}function Pf(e){return p({},e,{"data-precedence":e.precedence,precedence:null})}function Ff(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Id(t,`link`,n),yt(t),e.head.appendChild(t))}function If(e){return`[src="`+zt(e)+`"]`}function Lf(e){return`script[async]`+e}function Rf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+zt(n.href)+`"]`);if(r)return t.instance=r,yt(r),r;var i=p({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),yt(r),Id(r,`style`,i),zf(r,n.precedence,e),t.instance=r;case`stylesheet`:i=Mf(n.href);var o=e.querySelector(Nf(i));if(o)return t.state.loading|=4,t.instance=o,yt(o),o;r=Pf(n),(i=gf.get(i))&&Bf(r,i),o=(e.ownerDocument||e).createElement(`link`),yt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Id(o,`link`,r),t.state.loading|=4,zf(o,n.precedence,e),t.instance=o;case`script`:return o=If(n.src),(i=e.querySelector(Lf(o)))?(t.instance=i,yt(i),i):(r=n,(i=gf.get(o))&&(r=p({},n),Vf(r,i)),e=e.ownerDocument||e,i=e.createElement(`script`),yt(i),Id(i,`link`,r),e.head.appendChild(i),t.instance=i);case`void`:return null;default:throw Error(a(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,zf(r,n.precedence,e));return t.instance}function zf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o title`):null)}function Gf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Kf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function qf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Mf(r.href),a=t.querySelector(Nf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Xf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,yt(a);return}a=t.ownerDocument||t,r=Pf(r),(i=gf.get(i))&&Bf(r,i),a=a.createElement(`link`),yt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Id(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Xf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Jf=0;function Yf(e,t){return e.stylesheets&&e.count===0&&Qf(e,e.stylesheets),0Jf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Xf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Qf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Zf=null;function Qf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Zf=new Map,t.forEach($f,e),Zf=null,Xf.call(e))}function $f(e,t){if(!(t.state.loading&4)){var n=Zf.get(e);if(n)var r=n.get(null);else{n=new Map,Zf.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=fs()}))(),1),ms=i(),hs=(0,U.createContext)(void 0);function gs(e,t){try{let t=localStorage.getItem(e);if(t===`light`||t===`dark`||t===`system`)return t}catch{}return t}function _s(e){let t=(0,ms.c)(14),{children:n,defaultTheme:r,storageKey:i}=e,a=r===void 0?`dark`:r,o=i===void 0?`ui-theme`:i,s;t[0]!==a||t[1]!==o?(s=()=>gs(o,a),t[0]=a,t[1]=o,t[2]=s):s=t[2];let[c,l]=(0,U.useState)(s),u,d;t[3]===c?(u=t[4],d=t[5]):(u=()=>{let e=window.document.documentElement;if(e.classList.remove(`light`,`dark`),c===`system`){let t=window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`;e.classList.add(t);return}e.classList.add(c)},d=[c],t[3]=c,t[4]=u,t[5]=d),(0,U.useEffect)(u,d);let f;t[6]===o?f=t[7]:(f=e=>{try{localStorage.setItem(o,e)}catch{}l(e)},t[6]=o,t[7]=f);let p;t[8]!==f||t[9]!==c?(p={theme:c,setTheme:f},t[8]=f,t[9]=c,t[10]=p):p=t[10];let m=p,h;return t[11]!==n||t[12]!==m?(h=(0,W.jsx)(hs.Provider,{value:m,children:n}),t[11]=n,t[12]=m,t[13]=h):h=t[13],h}function vs(){let e=(0,U.useContext)(hs);if(e===void 0)throw Error(`useTheme must be used within a ThemeProvider`);return e}function ys(e){return Ft(e.defaultTagName??`div`,e,e)}var bs=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),xs=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),Ss=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),Cs=e=>{let t=Ss(e);return t.charAt(0).toUpperCase()+t.slice(1)},ws={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},Ts=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},Es=(0,U.createContext)({}),Ds=()=>(0,U.useContext)(Es),Os=(0,U.forwardRef)(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>{let{size:l=24,strokeWidth:u=2,absoluteStrokeWidth:d=!1,color:f=`currentColor`,className:p=``}=Ds()??{},m=r??d?Number(n??u)*24/Number(t??l):n??u;return(0,U.createElement)(`svg`,{ref:c,...ws,width:t??l??ws.width,height:t??l??ws.height,stroke:e??f,strokeWidth:m,className:bs(`lucide`,p,i),...!a&&!Ts(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>(0,U.createElement)(e,t)),...Array.isArray(a)?a:[a]])}),ks=(e,t)=>{let n=(0,U.forwardRef)(({className:n,...r},i)=>(0,U.createElement)(Os,{ref:i,iconNode:t,className:bs(`lucide-${xs(Cs(e))}`,`lucide-${e}`,n),...r}));return n.displayName=Cs(e),n},As=ks(`activity`,[[`path`,{d:`M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2`,key:`169zse`}]]),js=ks(`book-open`,[[`path`,{d:`M12 7v14`,key:`1akyts`}],[`path`,{d:`M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z`,key:`ruj8y`}]]),Ms=ks(`boxes`,[[`path`,{d:`M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z`,key:`lc1i9w`}],[`path`,{d:`m7 16.5-4.74-2.85`,key:`1o9zyk`}],[`path`,{d:`m7 16.5 5-3`,key:`va8pkn`}],[`path`,{d:`M7 16.5v5.17`,key:`jnp8gn`}],[`path`,{d:`M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z`,key:`8zsnat`}],[`path`,{d:`m17 16.5-5-3`,key:`8arw3v`}],[`path`,{d:`m17 16.5 4.74-2.85`,key:`8rfmw`}],[`path`,{d:`M17 16.5v5.17`,key:`k6z78m`}],[`path`,{d:`M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z`,key:`1xygjf`}],[`path`,{d:`M12 8 7.26 5.15`,key:`1vbdud`}],[`path`,{d:`m12 8 4.74-2.85`,key:`3rx089`}],[`path`,{d:`M12 13.5V8`,key:`1io7kd`}]]),Ns=ks(`camera`,[[`path`,{d:`M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z`,key:`18u6gg`}],[`circle`,{cx:`12`,cy:`13`,r:`3`,key:`1vg3eu`}]]),Ps=ks(`circle-alert`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]]),Fs=ks(`crosshair`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`22`,x2:`18`,y1:`12`,y2:`12`,key:`l9bcsi`}],[`line`,{x1:`6`,x2:`2`,y1:`12`,y2:`12`,key:`13hhkx`}],[`line`,{x1:`12`,x2:`12`,y1:`6`,y2:`2`,key:`10w3f3`}],[`line`,{x1:`12`,x2:`12`,y1:`22`,y2:`18`,key:`15g9kq`}]]),Is=ks(`globe`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`,key:`13o1zl`}],[`path`,{d:`M2 12h20`,key:`9i4pu4`}]]),Ls=ks(`hard-drive`,[[`path`,{d:`M10 16h.01`,key:`1bzywj`}],[`path`,{d:`M2.212 11.577a2 2 0 0 0-.212.896V18a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-5.527a2 2 0 0 0-.212-.896L18.55 5.11A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z`,key:`18tbho`}],[`path`,{d:`M21.946 12.013H2.054`,key:`zqlbp7`}],[`path`,{d:`M6 16h.01`,key:`1pmjb7`}]]),Rs=ks(`house`,[[`path`,{d:`M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8`,key:`5wwlr5`}],[`path`,{d:`M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z`,key:`r6nss1`}]]),zs=ks(`id-card`,[[`path`,{d:`M16 10h2`,key:`8sgtl7`}],[`path`,{d:`M16 14h2`,key:`epxaof`}],[`path`,{d:`M6.17 15a3 3 0 0 1 5.66 0`,key:`n6f512`}],[`circle`,{cx:`9`,cy:`11`,r:`2`,key:`yxgjnd`}],[`rect`,{x:`2`,y:`5`,width:`20`,height:`14`,rx:`2`,key:`qneu4z`}]]),Bs=ks(`image`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}],[`circle`,{cx:`9`,cy:`9`,r:`2`,key:`af1f0g`}],[`path`,{d:`m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21`,key:`1xmnt7`}]]),Vs=ks(`key`,[[`path`,{d:`m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4`,key:`g0fldk`}],[`path`,{d:`m21 2-9.6 9.6`,key:`1j0ho8`}],[`circle`,{cx:`7.5`,cy:`15.5`,r:`5.5`,key:`yqb3hr`}]]),Hs=ks(`layers`,[[`path`,{d:`M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z`,key:`zw3jo`}],[`path`,{d:`M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12`,key:`1wduqc`}],[`path`,{d:`M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17`,key:`kqbvx6`}]]),Us=ks(`layout-grid`,[[`rect`,{width:`7`,height:`7`,x:`3`,y:`3`,rx:`1`,key:`1g98yp`}],[`rect`,{width:`7`,height:`7`,x:`14`,y:`3`,rx:`1`,key:`6d4xhi`}],[`rect`,{width:`7`,height:`7`,x:`14`,y:`14`,rx:`1`,key:`nxv5o0`}],[`rect`,{width:`7`,height:`7`,x:`3`,y:`14`,rx:`1`,key:`1bb6yr`}]]),Ws=ks(`log-out`,[[`path`,{d:`m16 17 5-5-5-5`,key:`1bji2h`}],[`path`,{d:`M21 12H9`,key:`dn1m92`}],[`path`,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`,key:`1uf3rs`}]]),Gs=ks(`map-pin`,[[`path`,{d:`M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0`,key:`1r0f0z`}],[`circle`,{cx:`12`,cy:`10`,r:`3`,key:`ilqhr7`}]]),Ks=ks(`moon`,[[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`,key:`kfwtm`}]]),qs=ks(`network`,[[`rect`,{x:`16`,y:`16`,width:`6`,height:`6`,rx:`1`,key:`4q2zg0`}],[`rect`,{x:`2`,y:`16`,width:`6`,height:`6`,rx:`1`,key:`8cvhb9`}],[`rect`,{x:`9`,y:`2`,width:`6`,height:`6`,rx:`1`,key:`1egb70`}],[`path`,{d:`M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3`,key:`1jsf9p`}],[`path`,{d:`M12 12V8`,key:`2874zd`}]]),Js=ks(`panel-left`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}]]),Ys=ks(`router`,[[`rect`,{width:`20`,height:`8`,x:`2`,y:`14`,rx:`2`,key:`w68u3i`}],[`path`,{d:`M6.01 18H6`,key:`19vcac`}],[`path`,{d:`M10.01 18H10`,key:`uamcmx`}],[`path`,{d:`M15 10v4`,key:`qjz1xs`}],[`path`,{d:`M17.84 7.17a4 4 0 0 0-5.66 0`,key:`1rif40`}],[`path`,{d:`M20.66 4.34a8 8 0 0 0-11.31 0`,key:`6a5xfq`}]]),Xs=ks(`route`,[[`circle`,{cx:`6`,cy:`19`,r:`3`,key:`1kj8tv`}],[`path`,{d:`M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15`,key:`1d8sl`}],[`circle`,{cx:`18`,cy:`5`,r:`3`,key:`gq8acd`}]]),Zs=ks(`server`,[[`rect`,{width:`20`,height:`8`,x:`2`,y:`2`,rx:`2`,ry:`2`,key:`ngkwjq`}],[`rect`,{width:`20`,height:`8`,x:`2`,y:`14`,rx:`2`,ry:`2`,key:`iecqi9`}],[`line`,{x1:`6`,x2:`6.01`,y1:`6`,y2:`6`,key:`16zg32`}],[`line`,{x1:`6`,x2:`6.01`,y1:`18`,y2:`18`,key:`nzw8ys`}]]),Qs=ks(`shield-check`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),$s=ks(`shield`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}]]),ec=ks(`sun`,[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`m4.93 4.93 1.41 1.41`,key:`149t6j`}],[`path`,{d:`m17.66 17.66 1.41 1.41`,key:`ptbguv`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`m6.34 17.66-1.41 1.41`,key:`1m8zz5`}],[`path`,{d:`m19.07 4.93-1.41 1.41`,key:`1shlcs`}]]),tc=ks(`user-cog`,[[`path`,{d:`M10 15H6a4 4 0 0 0-4 4v2`,key:`1nfge6`}],[`path`,{d:`m14.305 16.53.923-.382`,key:`1itpsq`}],[`path`,{d:`m15.228 13.852-.923-.383`,key:`eplpkm`}],[`path`,{d:`m16.852 12.228-.383-.923`,key:`13v3q0`}],[`path`,{d:`m16.852 17.772-.383.924`,key:`1i8mnm`}],[`path`,{d:`m19.148 12.228.383-.923`,key:`1q8j1v`}],[`path`,{d:`m19.53 18.696-.382-.924`,key:`vk1qj3`}],[`path`,{d:`m20.772 13.852.924-.383`,key:`n880s0`}],[`path`,{d:`m20.772 16.148.924.383`,key:`1g6xey`}],[`circle`,{cx:`18`,cy:`15`,r:`3`,key:`gjjjvw`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}]]),nc=ks(`users`,[[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`path`,{d:`M16 3.128a4 4 0 0 1 0 7.744`,key:`16gr8j`}],[`path`,{d:`M22 21v-2a4 4 0 0 0-3-3.87`,key:`kshegd`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}]]),rc=ks(`waypoints`,[[`path`,{d:`m10.586 5.414-5.172 5.172`,key:`4mc350`}],[`path`,{d:`m18.586 13.414-5.172 5.172`,key:`8c96vv`}],[`path`,{d:`M6 12h12`,key:`8npq4p`}],[`circle`,{cx:`12`,cy:`20`,r:`2`,key:`144qzu`}],[`circle`,{cx:`12`,cy:`4`,r:`2`,key:`muu5ef`}],[`circle`,{cx:`20`,cy:`12`,r:`2`,key:`1xzzfp`}],[`circle`,{cx:`4`,cy:`12`,r:`2`,key:`1hvhnz`}]]),ic=ks(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),ac=function(e){return e.disabled=`data-disabled`,e.valid=`data-valid`,e.invalid=`data-invalid`,e.touched=`data-touched`,e.dirty=`data-dirty`,e.filled=`data-filled`,e.focused=`data-focused`,e}({}),oc={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},sc={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},cc={disabled:!1,...sc},lc={valid(e){return e===null?null:e?{[ac.valid]:``}:{[ac.invalid]:``}}},uc={invalid:void 0,name:void 0,validityData:{state:oc,errors:[],error:``,value:``,initialValue:null},setValidityData:It,disabled:void 0,touched:sc.touched,setTouched:It,dirty:sc.dirty,setDirty:It,filled:sc.filled,setFilled:It,focused:sc.focused,setFocused:It,validate:()=>null,validationMode:`onSubmit`,validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:cc,markedDirtyRef:{current:!1},registerFieldControl:It,validation:{getValidationProps:(e=jt)=>e,getInputValidationProps:(e=jt)=>e,inputRef:{current:null},commit:async()=>{}}},dc=U.createContext(uc);function fc(e=!0){let t=U.useContext(dc);if(t.setValidityData===It&&!e)throw Error(zt(28));return t}var pc=U.createContext({controlId:void 0,registerControlId:It,labelId:void 0,setLabelId:It,messageIds:[],setMessageIds:It,getDescriptionProps:e=>e});function mc(){return U.useContext(pc)}function hc(e={}){let{id:t,implicit:n=!1,controlRef:r}=e,{controlId:i,registerControlId:a}=mc(),o=dr(t),s=n?i:void 0,c=Pt(()=>Symbol(`labelable-control`)),l=U.useRef(!1),u=U.useRef(t!=null),d=ir(()=>{!l.current||a===It||(l.current=!1,a(c.current,void 0))});return B(()=>{if(a===It)return;let e;if(n){let n=r?.current;e=V(n)&&n.closest(`label`)!=null?t??null:s??o}else if(t!=null)u.current=!0,e=t;else if(u.current)e=o;else{d();return}if(e===void 0){d();return}l.current=!0,a(c.current,e)},[t,r,s,a,n,o,c,d]),U.useEffect(()=>d,[d]),i??o}var gc=typeof navigator<`u`,_c=Ec(),vc=Oc(),yc=Dc(),bc=typeof CSS>`u`||!CSS.supports?!1:CSS.supports(`-webkit-backdrop-filter:none`),xc=_c.platform===`MacIntel`&&_c.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(_c.platform);gc&&/firefox/i.test(yc);var Sc=gc&&/apple/i.test(navigator.vendor);gc&&/Edg/i.test(yc);var Cc=gc&&/android/i.test(vc)||/android/i.test(yc),wc=gc&&vc.toLowerCase().startsWith(`mac`)&&!navigator.maxTouchPoints,Tc=yc.includes(`jsdom/`);function Ec(){if(!gc)return{platform:``,maxTouchPoints:-1};let e=navigator.userAgentData;return e?.platform?{platform:e.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:navigator.platform??``,maxTouchPoints:navigator.maxTouchPoints??-1}}function Dc(){if(!gc)return``;let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:e,version:t})=>`${e}/${t}`).join(` `):navigator.userAgent}function Oc(){if(!gc)return``;let e=navigator.userAgentData;return e?.platform?e.platform:navigator.platform??``}var kc=`data-base-ui-focusable`,Ac=`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`,jc=`ArrowLeft`,Mc=`ArrowRight`,Nc=`ArrowUp`,Pc=`ArrowDown`;function Fc(e,t){if(!V(e))return!1;let n=e;if(t.hasElement(n))return!n.hasAttribute(`data-trigger-disabled`);for(let[,e]of t.entries())if(H(e,n))return!e.hasAttribute(`data-trigger-disabled`);return!1}function Ic(e,t){if(t==null)return!1;if(`composedPath`in e)return e.composedPath().includes(t);let n=e;return n.target!=null&&t.contains(n.target)}function Lc(e){return e.matches(`html,body`)}function Rc(e){return Jn(e)&&e.matches(`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`)}function zc(e){return e?.closest(`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${Ac}`)!=null}function Bc(e){return e?e.getAttribute(`role`)===`combobox`&&Rc(e):!1}function Vc(e){if(!e||Tc)return!0;try{return e.matches(`:focus-visible`)}catch{return!0}}function Hc(e){return e?e.hasAttribute(`data-base-ui-focusable`)?e:e.querySelector(`[data-base-ui-focusable]`)||e:null}function Uc(e,t,n=!0){return e.filter(e=>e.parentId===t).flatMap(t=>[...!n||t.context?.open?[t]:[],...Uc(e,t.id,n)])}function Wc(e,t){let n=[],r=e.find(e=>e.id===t)?.parentId;for(;r;){let t=e.find(e=>e.id===r);r=t?.parentId,t&&(n=n.concat(t))}return n}function Gc(e){e.preventDefault(),e.stopPropagation()}function Kc(e){return`nativeEvent`in e}function qc(e){return e.pointerType===``&&e.isTrusted?!0:Cc&&e.pointerType?e.type===`click`&&e.buttons===1:e.detail===0&&!e.pointerType}function Jc(e){return Tc?!1:!Cc&&e.width===0&&e.height===0||Cc&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType===`mouse`||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType===`touch`}function Yc(e,t){let n=[`mouse`,`pen`];return t||n.push(``,void 0),n.includes(e)}function Xc(e){let t=e.type;return t===`click`||t===`mousedown`||t===`keydown`||t===`keyup`}var Zc=[`top`,`right`,`bottom`,`left`],Qc=Math.min,$c=Math.max,el=Math.round,tl=Math.floor,nl=e=>({x:e,y:e}),rl={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function il(e,t,n){return $c(e,Qc(t,n))}function al(e,t){return typeof e==`function`?e(t):e}function ol(e){return e.split(`-`)[0]}function sl(e){return e.split(`-`)[1]}function cl(e){return e===`x`?`y`:`x`}function ll(e){return e===`y`?`height`:`width`}function ul(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function dl(e){return cl(ul(e))}function fl(e,t,n){n===void 0&&(n=!1);let r=sl(e),i=dl(e),a=ll(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=xl(o)),[o,xl(o)]}function pl(e){let t=xl(e);return[ml(e),t,ml(t)]}function ml(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var hl=[`left`,`right`],gl=[`right`,`left`],_l=[`top`,`bottom`],vl=[`bottom`,`top`];function yl(e,t,n){switch(e){case`top`:case`bottom`:return n?t?gl:hl:t?hl:gl;case`left`:case`right`:return t?_l:vl;default:return[]}}function bl(e,t,n,r){let i=sl(e),a=yl(ol(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(ml)))),a}function xl(e){let t=ol(e);return rl[t]+e.slice(t.length)}function Sl(e){return{top:0,right:0,bottom:0,left:0,...e}}function Cl(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:Sl(e)}function wl(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function Tl(e,t,n){return Math.floor(e/t)!==n}function El(e,t){return t<0||t>=e.length}function Dl(e,t){return kl(e.current,{disabledIndices:t})}function Ol(e,t){return kl(e.current,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function kl(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:r,amount:i=1}={}){let a=t;do a+=n?-i:i;while(a>=0&&a<=e.length-1&&Pl(e,a,r));return a}function Al(e,{event:t,orientation:n,loopFocus:r,onLoop:i,rtl:a,cols:o,disabledIndices:s,minIndex:c,maxIndex:l,prevIndex:u,stopEvent:d=!1}){let f=u,p;if(t.key===`ArrowUp`?p=`up`:t.key===`ArrowDown`&&(p=`down`),p){let n=[],a=[],m=!1,h=0;{let t=null,r=-1;e.forEach((e,i)=>{if(e==null)return;h+=1;let o=e.closest(`[role="row"]`);o&&(m=!0),(o!==t||r===-1)&&(t=o,r+=1,n[r]=[]),n[r].push(i),a[i]=r})}let g=!1,_=0;if(m)for(let e of n){let t=e.length;t>_&&(_=t),t!==o&&(g=!0)}let v=g&&h{if(!g||u===-1)return;let c=a[u];if(c==null)return;let l=n[c].indexOf(u),d=o===`up`?-1:1;for(let o=c+d,f=0;f=n.length){if(!r||v)return;if(o=o<0?n.length-1:0,i){let e=Math.min(l,n[o].length-1);o=a[i(t,u,n[o][e]??n[o][0])]??o}}let c=n[o];for(let t=Math.min(l,c.length-1);t>=0;--t){let n=c[t];if(!Pl(e,n,s))return n}}},x=t=>{if(!v||u===-1)return;let n=u%y,i=t===`up`?-y:y,a=l-l%y,o=tl(l/y)+1;for(let t=u-n+i,c=0;cl){if(!r)return;t=t<0?a:0}let i=Math.min(t+y-1,l);for(let r=Math.min(t+n,i);r>=t;--r)if(!Pl(e,r,s))return r}};d&&Gc(t);let S=b(p)??x(p);if(S!==void 0)f=S;else if(u===-1)f=p===`up`?l:c;else if(f=kl(e,{startingIndex:u,amount:y,decrement:p===`up`,disabledIndices:s}),r){if(p===`up`&&(u-ye?r:r-y,i&&(f=i(t,u,f))}p===`down`&&u+y>l&&(f=kl(e,{startingIndex:u%y-y,amount:y,disabledIndices:s}),i&&(f=i(t,u,f)))}El(e,f)&&(f=u)}if(n===`both`){let n=tl(u/o);t.key===(a?`ArrowLeft`:`ArrowRight`)&&(d&&Gc(t),u%o===o-1?r&&(f=kl(e,{startingIndex:u-u%o-1,disabledIndices:s}),i&&(f=i(t,u,f))):(f=kl(e,{startingIndex:u,disabledIndices:s}),r&&Tl(f,o,n)&&(f=kl(e,{startingIndex:u-u%o-1,disabledIndices:s}),i&&(f=i(t,u,f)))),Tl(f,o,n)&&(f=u)),t.key===(a?`ArrowRight`:`ArrowLeft`)&&(d&&Gc(t),u%o===0?r&&(f=kl(e,{startingIndex:u+(o-u%o),decrement:!0,disabledIndices:s}),i&&(f=i(t,u,f))):(f=kl(e,{startingIndex:u,decrement:!0,disabledIndices:s}),r&&Tl(f,o,n)&&(f=kl(e,{startingIndex:u+(o-u%o),decrement:!0,disabledIndices:s}),i&&(f=i(t,u,f)))),Tl(f,o,n)&&(f=u));let c=tl(l/o)===n;El(e,f)&&(r&&c?(f=t.key===(a?`ArrowRight`:`ArrowLeft`)?l:kl(e,{startingIndex:u-u%o-1,disabledIndices:s}),i&&(f=i(t,u,f))):f=u)}return f}function jl(e,t,n){let r=[],i=0;return e.forEach(({width:e,height:a},o)=>{let s=!1;for(n&&(i=0);!s;){let n=[];for(let r=0;rr[e]==null)?(n.forEach(e=>{r[e]=o}),s=!0):i+=1}}),[...r]}function Ml(e,t,n,r,i){if(e===-1)return-1;let a=n.indexOf(e),o=t[e];switch(i){case`tl`:return a;case`tr`:return o?a+o.width-1:a;case`bl`:return o?a+(o.height-1)*r:a;case`br`:return n.lastIndexOf(e);default:return-1}}function Nl(e,t){return t.flatMap((t,n)=>e.includes(t)?[n]:[])}function Pl(e,t,n){if(typeof n==`function`?n(t):n?.includes(t)??!1)return!0;let r=e[t];return r?Il(r)?!n&&(r.hasAttribute(`disabled`)||r.getAttribute(`aria-disabled`)===`true`):!0:!1}function Fl(e){return e.visibility===`hidden`||e.visibility===`collapse`}function Il(e,t=e?$n(e):null){return!e||!e.isConnected||!t||Fl(t)?!1:typeof e.checkVisibility==`function`?e.checkVisibility():t.display!==`none`&&t.display!==`contents`}var Ll=`a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]`;function Rl(e){let t=e.assignedSlot;if(t)return t;if(e.parentElement)return e.parentElement;let n=e.getRootNode();return cr(n)?n.host:null}function Y(e){for(let t of Array.from(e.children))if(nr(t)===`summary`)return t;return null}function zl(e,t){let n=Y(t);return!!n&&(e===n||H(n,e))}function Bl(e){let t=e?nr(e):``;return e!=null&&e.matches(Ll)&&(t!==`summary`||e.parentElement!=null&&nr(e.parentElement)===`details`&&Y(e.parentElement)===e)&&(t!==`details`||Y(e)==null)&&(t!==`input`||e.type!==`hidden`)}function Vl(e){if(!Bl(e)||!e.isConnected||e.matches(`:disabled`))return!1;for(let t=e;t;t=Rl(t)){let n=t!==e,r=nr(t)===`slot`;if(t.hasAttribute(`inert`)||n&&nr(t)===`details`&&!t.open&&!zl(e,t)||t.hasAttribute(`hidden`)||!r&&!Hl(t,n))return!1}return!0}function Hl(e,t){let n=$n(e);return t?n.display!==`none`:Il(e,n)}function Ul(e){let t=e.tabIndex;if(t<0){let t=nr(e);if(t===`details`||t===`audio`||t===`video`||Jn(e)&&e.isContentEditable)return 0}return t}function Wl(e){if(nr(e)!==`input`)return null;let t=e;return t.type===`radio`&&t.name!==``?t:null}function Gl(e,t){let n=Wl(e);if(!n)return!0;let r=t.find(e=>{let t=Wl(e);return t?.name===n.name&&t.form===n.form&&t.checked});return r?r===n:t.find(e=>{let t=Wl(e);return t?.name===n.name&&t.form===n.form})===n}function Kl(e){if(Jn(e)&&nr(e)===`slot`){let t=e.assignedElements({flatten:!0});if(t.length>0)return t}return Jn(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function ql(e,t){Kl(e).forEach(e=>{Bl(e)&&t.push(e),ql(e,t)})}function Jl(e,t,n){Kl(e).forEach(e=>{Jn(e)&&e.matches(t)&&n.push(e),Jl(e,t,n)})}function Yl(e){return Vl(e)&&Ul(e)>=0}function Xl(e){let t=[];return ql(e,t),t.filter(Vl)}function Zl(e){let t=Xl(e);return t.filter(e=>Ul(e)>=0&&Gl(e,t))}function Ql(e,t){let n=Zl(e),r=n.length;if(r===0)return;let i=wr(Tr(e)),a=n.indexOf(i);return n[a===-1?t===1?0:r-1:a+t]}function $l(e){return Ql(Tr(e).body,1)||e}function eu(e){return Ql(Tr(e).body,-1)||e}function tu(e,t){let n=t||e.currentTarget,r=e.relatedTarget;return!r||!H(n,r)}function nu(e){Zl(e).forEach(e=>{e.dataset.tabindex=e.getAttribute(`tabindex`)||``,e.setAttribute(`tabindex`,`-1`)})}function ru(e){let t=[];Jl(e,`[data-tabindex]`,t),t.forEach(e=>{let t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute(`tabindex`,t):e.removeAttribute(`tabindex`)})}var iu=[];function au(e){U.useEffect(e,iu)}var ou=0,su=class e{static create(){return new e}currentId=ou;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=ou,t()},e)}isStarted(){return this.currentId!==ou}clear=()=>{this.currentId!==ou&&(clearTimeout(this.currentId),this.currentId=ou)};disposeEffect=()=>this.clear};function cu(){let e=Pt(su.create).current;return au(e.disposeEffect),e}var lu=null;globalThis.requestAnimationFrame;var uu=new class{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=e=>{this.isScheduled=!1;let t=this.callbacks,n=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,n>0)for(let n=0;n=this.callbacks.length||(this.callbacks[t]=null,--this.callbacksCount)}},du=class e{static create(){return new e}static request(e){return uu.request(e)}static cancel(e){return uu.cancel(e)}currentId=lu;request(e){this.cancel(),this.currentId=uu.request(()=>{this.currentId=lu,e()})}cancel=()=>{this.currentId!==lu&&(uu.cancel(this.currentId),this.currentId=lu)};disposeEffect=()=>this.cancel};function fu(){let e=Pt(du.create).current;return au(e.disposeEffect),e}function pu(e){return e==null?e:`current`in e?e.current:e}var mu=function(e){return e.startingStyle=`data-starting-style`,e.endingStyle=`data-ending-style`,e}({}),hu={[mu.startingStyle]:``},gu={[mu.endingStyle]:``},_u={transitionStatus(e){return e===`starting`?hu:e===`ending`?gu:null}},vu=n(Dt());function yu(e,t=!1,n=!0){let r=fu();return ir((i,a=null)=>{r.cancel();let o=pu(e);if(o==null)return;let s=o,c=()=>{vu.flushSync(i)};if(typeof s.getAnimations!=`function`||globalThis.BASE_UI_ANIMATIONS_DISABLED){i();return}function l(){Promise.all(s.getAnimations().map(e=>e.finished)).then(()=>{a?.aborted||c()}).catch(()=>{if(n){a?.aborted||c();return}let e=s.getAnimations();!a?.aborted&&e.length>0&&e.some(e=>e.pending||e.playState!==`finished`)&&l()})}if(t){let e=mu.startingStyle;if(!s.hasAttribute(e)){r.request(l);return}let t=new MutationObserver(()=>{s.hasAttribute(e)||(t.disconnect(),l())});t.observe(s,{attributes:!0,attributeFilter:[e]}),a?.addEventListener(`abort`,()=>t.disconnect(),{once:!0});return}r.request(l)})}function bu(e){let{enabled:t=!0,open:n,ref:r,onComplete:i}=e,a=ir(i),o=yu(r,n,!1);U.useEffect(()=>{if(!t)return;let e=new AbortController;return o(a,e.signal),()=>{e.abort()}},[t,n,a,o])}function xu(e,t=!1,n=!1){let[r,i]=U.useState(e&&t?`idle`:void 0),[a,o]=U.useState(e);return e&&!a&&(o(!0),i(`starting`)),!e&&a&&r!==`ending`&&!n&&i(`ending`),!e&&!a&&r===`ending`&&i(void 0),B(()=>{if(!e&&a&&r!==`ending`&&n){let e=du.request(()=>{i(`ending`)});return()=>{du.cancel(e)}}},[e,a,r,n]),B(()=>{if(!e||t)return;let n=du.request(()=>{i(void 0)});return()=>{du.cancel(n)}},[t,e]),B(()=>{if(!e||!t)return;e&&a&&r!==`idle`&&i(`starting`);let n=du.request(()=>{i(`idle`)});return()=>{du.cancel(n)}},[t,e,a,r]),{mounted:a,setMounted:o,transitionStatus:r}}function Su({controlled:e,default:t,name:n,state:r=`value`}){let{current:i}=U.useRef(e!==void 0),[a,o]=U.useState(t);return[i?e:a,U.useCallback(e=>{i||o(e)},[])]}function Cu(e,t,n,r,i=!0){let{registerFieldControl:a}=fc(),o=U.useRef(null);o.current||=Symbol(),B(()=>{let s=o.current;if(!(!s||!i))return a(s,{controlRef:e,getValue:r,id:t,value:n}),()=>{a(s,void 0)}},[e,i,r,t,a,n])}var wu=U.forwardRef(function(e,t){let{render:n,className:r,id:i,name:a,value:o,disabled:s=!1,onValueChange:c,defaultValue:l,autoFocus:u=!1,style:d,...f}=e,{state:p,name:m,disabled:h,setTouched:g,setDirty:_,validityData:v,setFocused:y,setFilled:b,validationMode:x,validation:S}=fc(),C=h||s,w=m??a,T={...p,disabled:C},{labelId:E}=mc(),D=hc({id:i});B(()=>{let e=o!=null;S.inputRef.current?.value||e&&o!==``?b(!0):e&&o===``&&b(!1)},[S.inputRef,b,o]);let O=U.useRef(null);B(()=>{u&&O.current===wr(Tr(O.current))&&y(!0)},[u,y]);let[k]=Su({controlled:o,default:l,name:`FieldControl`,state:`value`}),A=o!==void 0,j=A?k:void 0,M=ir(()=>S.inputRef.current?.value);return Cu(S.inputRef,D,j,M),Ft(`input`,e,{ref:[t,O],state:T,props:[{id:D,disabled:C,name:w,ref:S.inputRef,"aria-labelledby":E,autoFocus:u,...A?{value:j}:{defaultValue:l},onChange(e){let t=e.currentTarget.value;c?.(t,Cr(mr,e.nativeEvent)),_(t!==v.initialValue),b(t!==``)},onFocus(){y(!0)},onBlur(e){g(!0),y(!1),x===`onBlur`&&S.commit(e.currentTarget.value)},onKeyDown(e){e.currentTarget.tagName===`INPUT`&&e.key===`Enter`&&(g(!0),S.commit(e.currentTarget.value))}},S.getInputValidationProps(),f],stateAttributesMapping:lc})}),Tu=U.forwardRef(function(e,t){return(0,W.jsx)(wu,{ref:t,...e})});function Eu(e){let t=(0,ms.c)(10),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,type:i,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a;t[4]===n?a=t[5]:(a=rn(`h-7 w-full min-w-0 rounded-md border border-input bg-input/20 px-2 py-0.5 text-sm transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-xs/relaxed file:font-medium file:text-foreground placeholder:text-muted-foreground autofill:[-webkit-text-fill-color:var(--color-foreground)] autofill:[transition:background-color_9999s_ease-in-out_0s] focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/30 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/20 md:text-xs/relaxed dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,n),t[4]=n,t[5]=a);let o;return t[6]!==r||t[7]!==a||t[8]!==i?(o=(0,W.jsx)(Tu,{className:a,"data-slot":`input`,type:i,...r}),t[6]=r,t[7]=a,t[8]=i,t[9]=o):o=t[9],o}var Du=U.forwardRef(function(e,t){let{className:n,render:r,orientation:i=`horizontal`,style:a,...o}=e;return Ft(`div`,e,{state:{orientation:i},ref:t,props:[{role:`separator`,"aria-orientation":i},o]})});function Ou(e){let t=(0,ms.c)(10),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,orientation:i,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a=i===void 0?`horizontal`:i,o;t[4]===n?o=t[5]:(o=rn(`shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:w-px data-[orientation=vertical]:self-stretch`,n),t[4]=n,t[5]=o);let s;return t[6]!==a||t[7]!==r||t[8]!==o?(s=(0,W.jsx)(Du,{className:o,"data-slot":`separator`,orientation:a,...r}),t[6]=a,t[7]=r,t[8]=o,t[9]=s):s=t[9],s}var ku=U.createContext(!1),Au=U.createContext(void 0);function ju(e){let t=U.useContext(Au);if(e===!1&&t===void 0)throw Error(zt(27));return t}var Mu=function(e){return e.open=`data-open`,e.closed=`data-closed`,e[e.startingStyle=mu.startingStyle]=`startingStyle`,e[e.endingStyle=mu.endingStyle]=`endingStyle`,e.anchorHidden=`data-anchor-hidden`,e.side=`data-side`,e.align=`data-align`,e}({}),Nu=function(e){return e.popupOpen=`data-popup-open`,e.pressed=`data-pressed`,e}({}),Pu={[Nu.popupOpen]:``},Fu={[Nu.popupOpen]:``,[Nu.pressed]:``},Iu={[Mu.open]:``},Lu={[Mu.closed]:``},Ru={[Mu.anchorHidden]:``},zu={open(e){return e?Pu:null}},Bu={open(e){return e?Fu:null}},Vu={open(e){return e?Iu:Lu},anchorHidden(e){return e?Ru:null}},Hu={...Vu,..._u},Uu=U.forwardRef(function(e,t){let{render:n,className:r,style:i,forceRender:a=!1,...o}=e,{store:s}=ju(),c=s.useState(`open`),l=s.useState(`nested`),u=s.useState(`mounted`);return Ft(`div`,e,{state:{open:c,transitionStatus:s.useState(`transitionStatus`)},ref:[s.context.backdropRef,t],stateAttributesMapping:Hu,props:[{role:`presentation`,hidden:!u,style:{userSelect:`none`,WebkitUserSelect:`none`}},o],enabled:a||!l})}),Wu=U.forwardRef(function(e,t){let{render:n,className:r,style:i,disabled:a=!1,nativeButton:o=!0,...s}=e,{store:c}=ju(),l=c.useState(`open`),{getButtonProps:u,buttonRef:d}=rr({disabled:a,native:o}),f={disabled:a};function p(e){l&&c.setOpen(!1,Cr(xr,e.nativeEvent))}return Ft(`button`,e,{state:f,ref:[t,d],props:[{onClick:p},s,u]})}),Gu=U.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,{store:s}=ju(),c=dr(a);return s.useSyncedValueWithCleanup(`descriptionElementId`,c),Ft(`p`,e,{ref:t,props:[{id:c},o]})});function Ku(e,t){return t!=null&&!Yc(t)?0:typeof e==`function`?e():e}function qu(e,t,n){let r=Ku(e,n);return typeof r==`number`?r:r?.[t]}function Ju(e){return typeof e==`function`?e():e}function Yu(e,t){return t||e===`click`||e===`mousedown`}function Xu(e){return e?.includes(`mouse`)&&e!==`mousedown`}var Zu=U.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new su,currentIdRef:{current:null},currentContextRef:{current:null}});function Qu(e){let{children:t,delay:n,timeoutMs:r=0}=e,i=U.useRef(n),a=U.useRef(n),o=U.useRef(null),s=U.useRef(null),c=cu();return(0,W.jsx)(Zu.Provider,{value:U.useMemo(()=>({hasProvider:!0,delayRef:i,initialDelayRef:a,currentIdRef:o,timeoutMs:r,currentContextRef:s,timeout:c}),[r,c]),children:t})}function $u(e,t={open:!1}){let{open:n}=t,r=`rootStore`in e?e.rootStore:e,i=r.useState(`floatingId`),{currentIdRef:a,delayRef:o,timeoutMs:s,initialDelayRef:c,currentContextRef:l,hasProvider:u,timeout:d}=U.useContext(Zu),[f,p]=U.useState(!1);return B(()=>{function e(){p(!1),l.current?.setIsInstantPhase(!1),a.current=null,l.current=null,o.current=c.current}if(a.current&&!n&&a.current===i){if(p(!1),s){let t=i;return d.start(s,()=>{r.select(`open`)||a.current&&a.current!==t||e()}),()=>{d.clear()}}e()}},[n,i,a,o,s,c,l,d,r]),B(()=>{if(!n)return;let e=l.current,t=a.current;d.clear(),l.current={onOpenChange:r.setOpen,setIsInstantPhase:p},a.current=i,o.current={open:0,close:qu(c.current,`close`)},t!==null&&t!==i?(p(!0),e?.setIsInstantPhase(!0),e?.onOpenChange(!1,Cr(mr))):(p(!1),e?.setIsInstantPhase(!1))},[n,i,r,a,o,c,l,d]),B(()=>()=>{l.current=null},[l]),U.useMemo(()=>({hasProvider:u,delayRef:o,isInstantPhase:f}),[u,o,f])}function X(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function ed(...e){return()=>{for(let t=0;t{t.current=t.next}};return t}var rd={clipPath:`inset(50%)`,overflow:`hidden`,whiteSpace:`nowrap`,border:0,padding:0,width:1,height:1,margin:-1},id={...rd,position:`fixed`,top:0,left:0},ad={...rd,position:`absolute`},od=U.forwardRef(function(e,t){let[n,r]=U.useState();B(()=>{Sc&&r(`button`)},[]);let i={tabIndex:0,role:n};return(0,W.jsx)(`span`,{...e,ref:t,style:id,"aria-hidden":n?void 0:!0,...i,"data-base-ui-focus-guard":``})});function sd(e){return`data-base-ui-${e}`}var cd=0;function ld(e,t={}){let{preventScroll:n=!1,sync:r=!1,shouldFocus:i}=t;cancelAnimationFrame(cd);function a(){i&&!i()||e?.focus({preventScroll:n})}if(r)return a(),It;let o=requestAnimationFrame(a);return cd=o,()=>{cd===o&&(cancelAnimationFrame(o),cd=0)}}var ud={inert:new WeakMap,"aria-hidden":new WeakMap},dd=`data-base-ui-inert`,fd={inert:new WeakSet,"aria-hidden":new WeakSet},pd=new WeakMap,md=0;function hd(e){return fd[e]}function gd(e){return e?cr(e)?e.host:gd(e.parentNode):null}var _d=(e,t)=>t.map(t=>{if(e.contains(t))return t;let n=gd(t);return e.contains(n)?n:null}).filter(e=>e!=null),vd=e=>{let t=new Set;return e.forEach(e=>{let n=e;for(;n&&!t.has(n);)t.add(n),n=n.parentNode}),t},yd=(e,t,n)=>{let r=[],i=e=>{!e||n.has(e)||Array.from(e.children).forEach(e=>{nr(e)!==`script`&&(t.has(e)?i(e):r.push(e))})};return i(e),r};function bd(e,t,n,r,{mark:i=!0,markerIgnoreElements:a=[]}){let o=r?`inert`:n?`aria-hidden`:null,s=null,c=null,l=_d(t,e),u=i?_d(t,a):[],d=new Set(u),f=i?yd(t,vd(l),new Set(l)).filter(e=>!d.has(e)):[],p=[],m=[];if(o){let e=ud[o],n=hd(o);c=n,s=e;let r=_d(t,Array.from(t.querySelectorAll(`[aria-live]`))),i=l.concat(r);yd(t,vd(i),new Set(i)).forEach(t=>{let r=t.getAttribute(o),i=r!==null&&r!==`false`,a=(e.get(t)||0)+1;e.set(t,a),p.push(t),a===1&&i&&n.add(t),i||t.setAttribute(o,o===`inert`?``:`true`)})}return i&&f.forEach(e=>{let t=(pd.get(e)||0)+1;pd.set(e,t),m.push(e),t===1&&e.setAttribute(dd,``)}),md+=1,()=>{s&&p.forEach(e=>{let t=(s.get(e)||0)-1;s.set(e,t),t||(!c?.has(e)&&o&&e.removeAttribute(o),c?.delete(e))}),i&&m.forEach(e=>{let t=(pd.get(e)||0)-1;pd.set(e,t),t||e.removeAttribute(dd)}),--md,md||(ud.inert=new WeakMap,ud[`aria-hidden`]=new WeakMap,fd.inert=new WeakSet,fd[`aria-hidden`]=new WeakSet,pd=new WeakMap)}}function Z(e,t={}){let{ariaHidden:n=!1,inert:r=!1,mark:i=!0,markerIgnoreElements:a=[]}=t,o=Tr(e[0]).body;return bd(e,o,n,r,{mark:i,markerIgnoreElements:a})}var xd={style:{transition:`none`}},Sd={fallbackAxisSide:`none`},Cd={fallbackAxisSide:`end`},wd={clipPath:`inset(50%)`,position:`fixed`,top:0,left:0},Td=U.createContext(null),Ed=()=>U.useContext(Td),Dd=sd(`portal`);function Od(e={}){let{ref:t,container:n,componentProps:r=jt,elementProps:i}=e,a=ur(),o=Ed()?.portalNode,[s,c]=U.useState(null),[l,u]=U.useState(null),d=ir(e=>{e!==null&&u(e)}),f=U.useRef(null);B(()=>{if(n===null){f.current&&(f.current=null,u(null),c(null));return}if(a==null)return;let e=(n&&(Gn(n)?n:n.current))??o??document.body;if(e==null){f.current&&(f.current=null,u(null),c(null));return}f.current!==e&&(f.current=e,u(null),c(e))},[n,o,a]);let p=Ft(`div`,r,{ref:[t,d],props:[{id:a,[Dd]:``},i]});return{portalNode:l,portalSubtree:s&&p?vu.createPortal(p,s):null}}var kd=U.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,container:o,renderGuards:s,...c}=e,{portalNode:l,portalSubtree:u}=Od({container:o,ref:t,componentProps:e,elementProps:c}),d=U.useRef(null),f=U.useRef(null),p=U.useRef(null),m=U.useRef(null),[h,g]=U.useState(null),_=U.useRef(!1),v=h?.modal,y=h?.open,b=typeof s==`boolean`?s:!!h&&!h.modal&&h.open&&!!l;U.useEffect(()=>{if(!l||v)return;function e(e){l&&e.relatedTarget&&tu(e)&&(e.type===`focusin`?_.current&&=(ru(l),!1):(nu(l),_.current=!0))}return ed(X(l,`focusin`,e,!0),X(l,`focusout`,e,!0))},[l,v]),U.useEffect(()=>{!l||y!==!1||(ru(l),_.current=!1)},[y,l]);let x=U.useMemo(()=>({beforeOutsideRef:d,afterOutsideRef:f,beforeInsideRef:p,afterInsideRef:m,portalNode:l,setFocusManagerState:g}),[l]);return(0,W.jsxs)(U.Fragment,{children:[u,(0,W.jsxs)(Td.Provider,{value:x,children:[b&&l&&(0,W.jsx)(od,{"data-type":`outside`,ref:d,onFocus:e=>{tu(e,l)?p.current?.focus():eu(h?h.domReference:null)?.focus()}}),b&&l&&(0,W.jsx)(`span`,{"aria-owns":l.id,style:wd}),l&&vu.createPortal(a,l),b&&l&&(0,W.jsx)(od,{"data-type":`outside`,ref:f,onFocus:e=>{tu(e,l)?m.current?.focus():($l(h?h.domReference:null)?.focus(),h?.closeOnFocusOut&&h?.onOpenChange(!1,Cr(`focus-out`,e.nativeEvent)))}})]})]})});function Ad(){let e=new Map;return{emit(t,n){e.get(t)?.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){e.get(t)?.delete(n)}}}var jd=U.createContext(null),Md=U.createContext(null),Nd=()=>U.useContext(jd)?.id||null,Pd=e=>{let t=U.useContext(Md);return e??t};function Fd(e,t){let n=qn(pr(e));return e instanceof n.KeyboardEvent?`keyboard`:e instanceof n.FocusEvent?t||`keyboard`:`pointerType`in e?e.pointerType||`keyboard`:`touches`in e?`touch`:e instanceof n.MouseEvent?t||(e.detail===0?`keyboard`:`mouse`):``}var Id=20,Ld=[];function Rd(){Ld=Ld.filter(e=>e.deref()?.isConnected)}function zd(e){Rd(),e&&nr(e)!==`body`&&(Ld.push(new WeakRef(e)),Ld.length>Id&&(Ld=Ld.slice(-20)))}function Bd(){return Rd(),Ld[Ld.length-1]?.deref()}function Vd(e){return e?Yl(e)?e:Zl(e)[0]||e:null}function Hd(e,t){if(e.hasAttribute(`tabindex`)&&!e.hasAttribute(`data-tabindex`)||!t.current.includes(`floating`)&&!e.getAttribute(`role`)?.includes(`dialog`))return;let n=Xl(e).filter(e=>{let t=e.getAttribute(`data-tabindex`)||``;return Yl(e)||e.hasAttribute(`data-tabindex`)&&!t.startsWith(`-`)}),r=e.getAttribute(`tabindex`);t.current.includes(`floating`)||n.length===0?r!==`0`&&e.setAttribute(`tabindex`,`0`):(r!==`-1`||e.hasAttribute(`data-tabindex`)&&e.getAttribute(`data-tabindex`)!==`-1`)&&(e.setAttribute(`tabindex`,`-1`),e.setAttribute(`data-tabindex`,`-1`))}function Ud(e){let{context:t,children:n,disabled:r=!1,initialFocus:i=!0,returnFocus:a=!0,restoreFocus:o=!1,modal:s=!0,closeOnFocusOut:c=!0,openInteractionType:l=``,nextFocusableElement:u,previousFocusableElement:d,beforeContentFocusGuardRef:f,externalTree:p,getInsideElements:m}=e,h=`rootStore`in t?t.rootStore:t,g=h.useState(`open`),_=h.useState(`domReferenceElement`),v=h.useState(`floatingElement`),{events:y,dataRef:b}=h.context,x=ir(()=>b.current.floatingContext?.nodeId),S=i===!1,C=Bc(_)&&S,w=U.useRef([`content`]),T=td(i),E=td(a),D=td(l),O=Pd(p),k=Ed(),A=U.useRef(!1),j=U.useRef(!1),M=U.useRef(!1),ee=U.useRef(null),N=U.useRef(``),P=U.useRef(``),te=U.useRef(null),ne=U.useRef(null),re=Mt(te,f,k?.beforeInsideRef),ie=Mt(ne,k?.afterInsideRef),ae=cu(),F=cu(),oe=fu(),se=k!=null,I=Hc(v),ce=ir((e=I)=>e?Zl(e):[]),le=ir(()=>m?.().filter(e=>e!=null)??[]);U.useEffect(()=>{if(r||!s)return;function e(e){e.key===`Tab`&&H(I,wr(Tr(I)))&&ce().length===0&&!C&&Gc(e)}return X(Tr(I),`keydown`,e)},[r,I,s,C,ce]),U.useEffect(()=>{if(r||!g)return;let e=Tr(I);function t(){M.current=!1}function n(e){let t=pr(e),n=le();M.current=!(H(v,t)||H(_,t)||H(k?.portalNode,t)||n.some(e=>e===t||H(e,t))),P.current=e.pointerType||`keyboard`,t?.closest(`[data-base-ui-click-trigger]`)&&(j.current=!0)}function i(){P.current=`keyboard`}return ed(X(e,`pointerdown`,n,!0),X(e,`pointerup`,t,!0),X(e,`pointercancel`,t,!0),X(e,`keydown`,i,!0))},[r,v,_,I,g,k,le]),U.useEffect(()=>{if(r||!c)return;let e=Tr(I);function t(){j.current=!0,F.start(0,()=>{j.current=!1})}function n(e){let t=pr(e);Yl(t)&&(ee.current=t)}function i(t){let n=t.relatedTarget,r=t.currentTarget,i=pr(t);queueMicrotask(()=>{let a=x(),c=h.context.triggerElements,l=le(),f=n?.hasAttribute(sd(`focus-guard`))&&[te.current,ne.current,k?.beforeInsideRef.current,k?.afterInsideRef.current,k?.beforeOutsideRef.current,k?.afterOutsideRef.current,pu(d),pu(u)].includes(n),p=!(H(_,n)||H(v,n)||H(n,v)||H(k?.portalNode,n)||l.some(e=>e===n||H(e,n))||n!=null&&c.hasElement(n)||c.hasMatchingElement(e=>H(e,n))||f||O&&(Uc(O.nodesRef.current,a).find(e=>H(e.context?.elements.floating,n)||H(e.context?.elements.domReference,n))||Wc(O.nodesRef.current,a).find(e=>[e.context?.elements.floating,Hc(e.context?.elements.floating)].includes(n)||e.context?.elements.domReference===n)));if(r===_&&I&&Hd(I,w),o&&r!==_&&!Il(i)&&wr(e)===e.body){if(Jn(I)&&(I.focus(),o===`popup`)){oe.request(()=>{I.focus()});return}let e=ce(),t=ee.current,n=(t&&e.includes(t)?t:null)||e[e.length-1]||I;Jn(n)&&n.focus()}if(b.current.insideReactTree){b.current.insideReactTree=!1;return}(C||!s)&&n&&p&&!j.current&&(C||n!==Bd())&&(A.current=!0,h.setOpen(!1,Cr(yr,t)))})}function a(){M.current||(b.current.insideReactTree=!0,ae.start(0,()=>{b.current.insideReactTree=!1}))}let l=Jn(_)?_:null;if(!(!v&&!l))return ed(l&&X(l,`focusout`,i),l&&X(l,`pointerdown`,t),v&&X(v,`focusin`,n),v&&X(v,`focusout`,i),v&&k&&X(v,`focusout`,a,!0))},[r,_,v,I,s,O,k,h,c,o,ce,C,x,w,b,ae,F,oe,u,d,le]),U.useEffect(()=>{if(r||!v||!g)return;let e=Array.from(k?.portalNode?.querySelectorAll(`[${sd(`portal`)}]`)||[]),t=(O?Wc(O.nodesRef.current,x()):[]).find(e=>Bc(e.context?.elements.domReference||null))?.context?.elements.domReference,n=Z([v,...e,te.current,ne.current,k?.beforeOutsideRef.current,k?.afterOutsideRef.current,...le(),t,pu(d),pu(u),C?_:null].filter(e=>e!=null),{ariaHidden:s||C,mark:!1}),i=Z([v,...e].filter(e=>e!=null));return()=>{i(),n()}},[g,r,_,v,s,k,C,O,x,u,d,le]),B(()=>{if(!g||r||!Jn(I))return;let e=Tr(I),t=wr(e);queueMicrotask(()=>{let n=T.current,r=typeof n==`function`?n(D.current||``):n;if(r===void 0||r===!1||H(I,t))return;let i=null,a=()=>(i??=ce(I),i[0]||I),o;o=r===!0||r===null?a():pu(r),o||=a();let s=H(I,wr(e));ld(o,{preventScroll:o===I,shouldFocus(){if(s)return!0;let t=wr(e);return!(t!==o&&H(I,t))}})})},[r,g,I,ce,T,D]),B(()=>{if(r||!I)return;let e=Tr(I);zd(wr(e));function t(e){if(e.open||(N.current=Fd(e.nativeEvent,P.current)),e.reason===`trigger-hover`&&e.nativeEvent.type===`mouseleave`&&(A.current=!0),e.reason===`outside-press`)if(e.nested)A.current=!1;else if(qc(e.nativeEvent)||Jc(e.nativeEvent))A.current=!1;else{let e=!1;Tr(I).createElement(`div`).focus({get preventScroll(){return e=!0,!1}}),e?A.current=!1:A.current=!0}}y.on(`openchange`,t);function n(){let e=E.current,t=typeof e==`function`?e(N.current):e;if(t===void 0||t===!1)return null;if(t===null&&(t=!0),typeof t==`boolean`)return _?.isConnected?_:Bd()||null;let n=_?.isConnected?_:Bd();return pu(t)||n||null}return()=>{y.off(`openchange`,t);let r=wr(e),i=le(),a=H(v,r)||i.some(e=>e===r||H(e,r))||O&&Uc(O.nodesRef.current,x(),!1).some(e=>H(e.context?.elements.floating,r)),o=E.current,s=n();queueMicrotask(()=>{let t=Vd(s),n=typeof o!=`boolean`;o&&!A.current&&Jn(t)&&(!(!n&&t!==r&&r!==e.body)||a)&&t.focus({preventScroll:!0}),A.current=!1})}},[r,v,I,E,y,O,_,x,le]),B(()=>{if(!bc||g||!v)return;let e=wr(Tr(v));!Jn(e)||!Rc(e)||H(v,e)&&e.blur()},[g,v]),B(()=>{if(!(r||!k))return k.setFocusManagerState({modal:s,closeOnFocusOut:c,open:g,onOpenChange:h.setOpen,domReference:_}),()=>{k.setFocusManagerState(null)}},[r,k,s,g,h,c,_]),B(()=>{if(!(r||!I))return Hd(I,w),()=>{queueMicrotask(Rd)}},[r,I,w]);let ue=!r&&(s?!C:!0)&&(se||s);return(0,W.jsxs)(U.Fragment,{children:[ue&&(0,W.jsx)(od,{"data-type":`inside`,ref:re,onFocus:e=>{if(s){let e=ce();ld(e[e.length-1])}else k?.portalNode&&(A.current=!1,tu(e,k.portalNode)?$l(_)?.focus():pu(d??k.beforeOutsideRef)?.focus())}}),n,ue&&(0,W.jsx)(od,{"data-type":`inside`,ref:ie,onFocus:e=>{s?ld(ce()[0]):k?.portalNode&&(c&&(A.current=!0),tu(e,k.portalNode)?eu(_)?.focus():pu(u??k.afterOutsideRef)?.focus())}})]})}function Wd(e,t){let n=null,r=null,i=!1;return{contextElement:e||void 0,getBoundingClientRect(){let a=e?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},o=t.axis===`x`||t.axis===`both`,s=t.axis===`y`||t.axis===`both`,c=[`mouseenter`,`mousemove`].includes(t.dataRef.current.openEvent?.type||``)&&t.pointerType!==`touch`,l=a.width,u=a.height,d=a.x,f=a.y;return n==null&&t.x&&o&&(n=a.x-t.x),r==null&&t.y&&s&&(r=a.y-t.y),d-=n||0,f-=r||0,l=0,u=0,!i||c?(l=t.axis===`y`?a.width:0,u=t.axis===`x`?a.height:0,d=o&&t.x!=null?t.x:d,f=s&&t.y!=null?t.y:f):i&&!c&&(u=t.axis===`x`?a.height:u,l=t.axis===`y`?a.width:l),i=!0,{width:l,height:u,x:d,y:f,top:f,right:d+l,bottom:f+u,left:d}}}}function Gd(e){return e!=null&&e.clientX!=null}function Kd(e,t={}){let{enabled:n=!0,axis:r=`both`}=t,i=`rootStore`in e?e.rootStore:e,a=i.useState(`open`),o=i.useState(`floatingElement`),s=i.useState(`domReferenceElement`),c=i.context.dataRef,l=U.useRef(!1),u=U.useRef(null),[d,f]=U.useState(),[p,m]=U.useState([]),h=ir(e=>{i.set(`positionReference`,e)}),g=ir((e,t,n)=>{l.current||c.current.openEvent&&!Gd(c.current.openEvent)||i.set(`positionReference`,Wd(n??s,{x:e,y:t,axis:r,dataRef:c,pointerType:d}))}),_=ir(e=>{a?u.current||(g(e.clientX,e.clientY,e.currentTarget),m([])):g(e.clientX,e.clientY,e.currentTarget)}),v=Yc(d)?o:a;U.useEffect(()=>{if(!n){h(s);return}if(!v)return;function e(){u.current?.(),u.current=null}let t=qn(o);function r(t){H(o,pr(t))?e():g(t.clientX,t.clientY)}return!c.current.openEvent||Gd(c.current.openEvent)?u.current=X(t,`mousemove`,r):h(s),e},[v,n,o,c,s,i,g,h,p]),U.useEffect(()=>()=>{i.set(`positionReference`,null)},[i]),U.useEffect(()=>{n&&!o&&(l.current=!1)},[n,o]),U.useEffect(()=>{!n&&a&&(l.current=!0)},[n,a]);let y=U.useMemo(()=>{function e(e){f(e.pointerType)}return{onPointerDown:e,onPointerEnter:e,onMouseMove:_,onMouseEnter:_}},[_]);return U.useMemo(()=>n?{reference:y,trigger:y}:{},[n,y])}var qd={intentional:`onClick`,sloppy:`onPointerDown`};function Jd(){return!1}function Yd(e){return{escapeKey:typeof e==`boolean`?e:e?.escapeKey??!1,outsidePress:typeof e==`boolean`?e:e?.outsidePress??!0}}function Xd(e,t={}){let{enabled:n=!0,escapeKey:r=!0,outsidePress:i=!0,outsidePressEvent:a=`sloppy`,referencePress:o=Jd,referencePressEvent:s=`sloppy`,bubbles:c,externalTree:l}=t,u=`rootStore`in e?e.rootStore:e,d=u.useState(`open`),f=u.useState(`floatingElement`),{dataRef:p}=u.context,m=Pd(l),h=ir(typeof i==`function`?i:()=>!1),g=typeof i==`function`?h:i,_=g!==!1,v=ir(()=>a),{escapeKey:y,outsidePress:b}=Yd(c),x=U.useRef(!1),S=U.useRef(!1),C=U.useRef(!1),w=U.useRef(!1),T=U.useRef(``),E=U.useRef(null),D=cu(),O=cu(),k=ir(()=>{O.clear(),p.current.insideReactTree=!1}),A=ir(e=>{let t=p.current.floatingContext?.nodeId;return(m?Uc(m.nodesRef.current,t):[]).some(t=>t.context?.open&&!t.context.dataRef.current[e])}),j=ir(e=>Ic(e,u.select(`floatingElement`))||Ic(e,u.select(`domReferenceElement`))),M=ir(e=>{o()&&u.setOpen(!1,Cr(hr,e.nativeEvent))}),ee=ir(e=>{if(!d||!n||!r||e.key!==`Escape`||w.current||!y&&A(`__escapeKeyBubbles`))return;let t=Cr(fr,Kc(e)?e.nativeEvent:e);u.setOpen(!1,t),t.isCanceled||e.preventDefault(),!y&&!t.isPropagationAllowed&&e.stopPropagation()}),N=ir(()=>{p.current.insideReactTree=!0,O.start(0,k)}),P=ir(e=>{if(!d||!n||e.button!==0)return;let t=pr(e.nativeEvent);H(u.select(`floatingElement`),t)&&(x.current||(x.current=!0,S.current=!1))}),te=ir(e=>{!d||!n||(e.defaultPrevented||e.nativeEvent.defaultPrevented)&&x.current&&(S.current=!0)});U.useEffect(()=>{if(!d||!n)return;p.current.__escapeKeyBubbles=y,p.current.__outsidePressBubbles=b;let e=new su,t=new su;function i(){e.clear(),w.current=!0}function a(){e.start(Un()?5:0,()=>{w.current=!1})}function o(){C.current=!0,t.start(0,()=>{C.current=!1})}function s(){x.current=!1,S.current=!1}function c(){let e=T.current,t=e===`pen`||!e?`mouse`:e,n=v(),r=typeof n==`function`?n():n;return typeof r==`string`?r:r[t]}function l(e){let t=c();return t===`intentional`&&e.type!==`click`||t===`sloppy`&&e.type===`click`}function h(e){let t=p.current.floatingContext?.nodeId,n=m&&Uc(m.nodesRef.current,t).some(t=>Ic(e,t.context?.elements.floating));return j(e)||n}function O(e){if(l(e)){e.type!==`click`&&!j(e)&&(t.clear(),C.current=!1),k();return}if(p.current.insideReactTree){k();return}let n=pr(e),r=`[${sd(`inert`)}]`,i=V(n)?n.getRootNode():null,a=Array.from((cr(i)?i:Tr(u.select(`floatingElement`))).querySelectorAll(r)),o=u.context.triggerElements;if(n&&(o.hasElement(n)||o.hasMatchingElement(e=>H(e,n))))return;let s=V(n)?n:null;for(;s&&!lr(s);){let e=Zn(s);if(lr(e)||!V(e))break;s=e}if(!(a.length&&V(n)&&!Lc(n)&&!H(n,u.select(`floatingElement`))&&a.every(e=>!H(s,e)))){if(Jn(n)&&!(`touches`in e)){let t=lr(n),r=$n(n),i=/auto|scroll/,a=t||i.test(r.overflowX),o=t||i.test(r.overflowY),s=a&&n.clientWidth>0&&n.scrollWidth>n.clientWidth,c=o&&n.clientHeight>0&&n.scrollHeight>n.clientHeight,l=r.direction===`rtl`,u=c&&(l?e.offsetX<=n.offsetWidth-n.clientWidth:e.offsetX>n.clientWidth),d=s&&e.offsetY>n.clientHeight;if(u||d)return}if(!h(e)){if(c()===`intentional`&&C.current){t.clear(),C.current=!1;return}typeof g==`function`&&!g(e)||A(`__outsidePressBubbles`)||(u.setOpen(!1,Cr(br,e)),k())}}}function M(e){c()!==`sloppy`||e.pointerType===`touch`||!u.select(`open`)||!n||j(e)||O(e)}function N(e){if(c()!==`sloppy`||!u.select(`open`)||!n||j(e))return;let t=e.touches[0];t&&(E.current={startTime:Date.now(),startX:t.clientX,startY:t.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},D.start(1e3,()=>{E.current&&(E.current.dismissOnTouchEnd=!1,E.current.dismissOnMouseDown=!1)}))}function P(e,t){let n=pr(e);if(!n)return;let r=X(n,e.type,()=>{t(e),r()})}function te(e){T.current=`touch`,P(e,N)}function ne(e){D.clear(),e.type===`pointerdown`&&(T.current=e.pointerType),!(e.type===`mousedown`&&E.current&&!E.current.dismissOnMouseDown)&&P(e,e=>{e.type===`pointerdown`?M(e):O(e)})}function re(e){if(!x.current)return;let n=S.current;if(s(),c()===`intentional`){if(e.type===`pointercancel`){n&&o();return}if(!h(e)){if(n){o();return}typeof g==`function`&&!g(e)||(t.clear(),C.current=!0,k())}}}function ie(e){if(c()!==`sloppy`||!E.current||j(e))return;let t=e.touches[0];if(!t)return;let n=Math.abs(t.clientX-E.current.startX),r=Math.abs(t.clientY-E.current.startY),i=Math.sqrt(n*n+r*r);i>5&&(E.current.dismissOnTouchEnd=!0),i>10&&(O(e),D.clear(),E.current=null)}function ae(e){P(e,ie)}function F(e){c()!==`sloppy`||!E.current||j(e)||(E.current.dismissOnTouchEnd&&O(e),D.clear(),E.current=null)}function oe(e){P(e,F)}let se=Tr(f),I=ed(r&&ed(X(se,`keydown`,ee),X(se,`compositionstart`,i),X(se,`compositionend`,a)),_&&ed(X(se,`click`,ne,!0),X(se,`pointerdown`,ne,!0),X(se,`pointerup`,re,!0),X(se,`pointercancel`,re,!0),X(se,`mousedown`,ne,!0),X(se,`mouseup`,re,!0),X(se,`touchstart`,te,!0),X(se,`touchmove`,ae,!0),X(se,`touchend`,oe,!0)));return()=>{I(),e.clear(),t.clear(),s(),C.current=!1}},[p,f,r,_,g,d,n,y,b,ee,k,v,A,j,m,u,D]),U.useEffect(k,[g,k]);let ne=U.useMemo(()=>({onKeyDown:ee,[qd[s]]:M,...s!==`intentional`&&{onClick:M}}),[ee,M,s]),re=U.useMemo(()=>({onKeyDown:ee,onPointerDown:te,onMouseDown:te,onClickCapture:N,onMouseDownCapture(e){N(),P(e)},onPointerDownCapture(e){N(),P(e)},onMouseUpCapture:N,onTouchEndCapture:N,onTouchMoveCapture:N}),[ee,N,P,te]);return U.useMemo(()=>n?{reference:ne,floating:re,trigger:ne}:{},[n,ne,re])}function Zd(e,t,n){let{reference:r,floating:i}=e,a=ul(t),o=dl(t),s=ll(o),c=ol(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(sl(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}async function Qd(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=al(t,e),p=Cl(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=wl(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=wl(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var $d=50,ef=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:Qd},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=Zd(l,r,c),f=r,p=0,m={};for(let n=0;ne<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==ul(t))||T.every(e=>ul(e.placement)===_?e.overflows[0]>0:!0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=ul(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function nf(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function rf(e){return Zc.some(t=>e[t]>=0)}var af=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=al(e,t);switch(i){case`referenceHidden`:{let e=nf(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:rf(e)}}}case`escaped`:{let e=nf(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:rf(e)}}}default:return{}}}}},of=new Set([`left`,`top`]);async function sf(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=ol(n),s=sl(n),c=ul(n)===`y`,l=of.has(o)?-1:1,u=a&&c?-1:1,d=al(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var cf=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await sf(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},lf=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=al(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=ul(ol(i)),p=cl(f),m=u[p],h=u[f];if(o){let e=p===`y`?`top`:`left`,t=p===`y`?`bottom`:`right`,n=m+d[e],r=m-d[t];m=il(n,m,r)}if(s){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=h+d[e],r=h-d[t];h=il(n,h,r)}let g=c.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[f]:s}}}}}},uf=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=al(e,t),u={x:n,y:r},d=ul(i),f=cl(d),p=u[f],m=u[d],h=al(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;pn&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=of.has(ol(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);mr&&(m=r)}return{[f]:p,[d]:m}}}},df=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=al(e,t),u=await o.detectOverflow(t,l),d=ol(i),f=sl(i),p=ul(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=Qc(h-u[g],v),x=Qc(m-u[_],y),S=!t.middlewareData.shift,C=b,w=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(w=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=$c(u.left,0),t=$c(u.right,0),n=$c(u.top,0),r=$c(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:$c(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:$c(u.top,u.bottom))}await c({...t,availableWidth:w,availableHeight:C});let T=await o.getDimensions(s.floating);return m!==T.width||h!==T.height?{reset:{rects:!0}}:{}}}};function ff(e){let t=$n(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=Jn(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=el(n)!==a||el(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function pf(e){return V(e)?e:e.contextElement}function mf(e){let t=pf(e);if(!Jn(t))return nl(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=ff(t),o=(a?el(n.width):n.width)/r,s=(a?el(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var hf=nl(0);function gf(e){let t=qn(e);return!Un()||!t.visualViewport?hf:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function _f(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==qn(e)?!1:t}function vf(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=pf(e),o=nl(1);t&&(r?V(r)&&(o=mf(r)):o=mf(e));let s=_f(a,n,r)?gf(a):nl(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=qn(a),t=r&&V(r)?qn(r):r,n=e,i=Xn(n);for(;i&&r&&t!==n;){let e=mf(i),t=i.getBoundingClientRect(),r=$n(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=qn(i),i=Xn(n)}}return wl({width:u,height:d,x:c,y:l})}function yf(e,t){let n=er(e).scrollLeft;return t?t.left+n:vf(Yn(e)).left+n}function bf(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-yf(e,n),y:n.top+t.scrollTop}}function xf(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=Yn(r),s=t?Wn(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=nl(1),u=nl(0),d=Jn(r);if((d||!d&&!a)&&((nr(r)!==`body`||Hn(o))&&(c=er(r)),d)){let e=vf(r);l=mf(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?bf(o,c):nl(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function Sf(e){return Array.from(e.getClientRects())}function Cf(e){let t=Yn(e),n=er(e),r=e.ownerDocument.body,i=$c(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=$c(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+yf(e),s=-n.scrollTop;return $n(r).direction===`rtl`&&(o+=$c(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var wf=25;function Tf(e,t){let n=qn(e),r=Yn(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=Un();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=yf(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=wf&&(a-=o)}else l<=wf&&(a+=l);return{width:a,height:o,x:s,y:c}}function Ef(e,t){let n=vf(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Jn(e)?mf(e):nl(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Df(e,t,n){let r;if(t===`viewport`)r=Tf(e,n);else if(t===`document`)r=Cf(Yn(e));else if(V(t))r=Ef(t,n);else{let n=gf(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return wl(r)}function Of(e,t){let n=Zn(e);return n===t||!V(n)||lr(n)?!1:$n(n).position===`fixed`||Of(n,t)}function kf(e,t){let n=t.get(e);if(n)return n;let r=Qn(e,[],!1).filter(e=>V(e)&&nr(e)!==`body`),i=null,a=$n(e).position===`fixed`,o=a?Zn(e):e;for(;V(o)&&!lr(o);){let t=$n(o),n=sr(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||Hn(o)&&!n&&Of(e,o))?r=r.filter(e=>e!==o):i=t,o=Zn(o)}return t.set(e,r),r}function Af(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?Wn(t)?[]:kf(t,this._c):[].concat(n),r],o=Df(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e{o(!1,1e-7)},1e3)}n===1&&!zf(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function Vf(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=pf(e),u=i||a?[...l?Qn(l):[],...t?Qn(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?Bf(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?vf(e):null;c&&g();function g(){let t=vf(e);h&&!zf(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var Hf=cf,Uf=lf,Wf=tf,Gf=df,Kf=af,qf=uf,Jf=(e,t,n)=>{let r=new Map,i={platform:Rf,...n},a={...i.platform,_c:r};return ef(e,t,{...i,platform:a})},Yf=typeof document<`u`?U.useLayoutEffect:function(){};function Xf(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Xf(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!Xf(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function Zf(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Qf(e,t){let n=Zf(e);return Math.round(t*n)/n}function $f(e){let t=U.useRef(e);return Yf(()=>{t.current=e}),t}function ep(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=U.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=U.useState(r);Xf(f,r)||p(r);let[m,h]=U.useState(null),[g,_]=U.useState(null),v=U.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=U.useCallback(e=>{e!==C.current&&(C.current=e,_(e))},[]),b=a||m,x=o||g,S=U.useRef(null),C=U.useRef(null),w=U.useRef(u),T=c!=null,E=$f(c),D=$f(i),O=$f(l),k=U.useCallback(()=>{if(!S.current||!C.current)return;let e={placement:t,strategy:n,middleware:f};D.current&&(e.platform=D.current),Jf(S.current,C.current,e).then(e=>{let t={...e,isPositioned:O.current!==!1};A.current&&!Xf(w.current,t)&&(w.current=t,vu.flushSync(()=>{d(t)}))})},[f,t,n,D,O]);Yf(()=>{l===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let A=U.useRef(!1);Yf(()=>(A.current=!0,()=>{A.current=!1}),[]),Yf(()=>{if(b&&(S.current=b),x&&(C.current=x),b&&x){if(E.current)return E.current(b,x,k);k()}},[b,x,k,E,T]);let j=U.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:y}),[v,y]),M=U.useMemo(()=>({reference:b,floating:x}),[b,x]),ee=U.useMemo(()=>{let e={position:n,left:0,top:0};if(!M.floating)return e;let t=Qf(M.floating,u.x),r=Qf(M.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...Zf(M.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,M.floating,u.x,u.y]);return U.useMemo(()=>({...u,update:k,refs:j,elements:M,floatingStyles:ee}),[u,k,j,M,ee])}var tp=(e,t)=>{let n=Hf(e);return{name:n.name,fn:n.fn,options:[e,t]}},np=(e,t)=>{let n=Uf(e);return{name:n.name,fn:n.fn,options:[e,t]}},rp=(e,t)=>({fn:qf(e).fn,options:[e,t]}),ip=(e,t)=>{let n=Wf(e);return{name:n.name,fn:n.fn,options:[e,t]}},ap=(e,t)=>{let n=Gf(e);return{name:n.name,fn:n.fn,options:[e,t]}},op=(e,t)=>{let n=Kf(e);return{name:n.name,fn:n.fn,options:[e,t]}},Q=(e,t,n,r,i,a,...o)=>{if(o.length>0)throw Error(zt(1));let s;if(e&&t&&n&&r&&i&&a)s=(o,s,c,l)=>a(e(o,s,c,l),t(o,s,c,l),n(o,s,c,l),r(o,s,c,l),i(o,s,c,l),s,c,l);else if(e&&t&&n&&r&&i)s=(a,o,s,c)=>i(e(a,o,s,c),t(a,o,s,c),n(a,o,s,c),r(a,o,s,c),o,s,c);else if(e&&t&&n&&r)s=(i,a,o,s)=>r(e(i,a,o,s),t(i,a,o,s),n(i,a,o,s),a,o,s);else if(e&&t&&n)s=(r,i,a,o)=>n(e(r,i,a,o),t(r,i,a,o),i,a,o);else if(e&&t)s=(n,r,i,a)=>t(e(n,r,i,a),r,i,a);else if(e)s=e;else throw Error(`Missing arguments`);return s},sp=[],cp=void 0;function lp(){return cp}function up(e){sp.push(e)}function dp(e){let t=(t,n)=>{let r=Pt(pp).current,i;try{cp=r;for(let e of sp)e.before(r);i=e(t,n);for(let e of sp)e.after(r);r.didInitialize=!0}finally{cp=void 0}return i};return t.displayName=e.displayName||e.name,t}function fp(e){return U.forwardRef(dp(e))}function pp(){return{didInitialize:!1}}var mp=ie(),hp=ne(),gp=Lt(19)?yp:bp;function _p(e,t,n,r,i){return gp(e,t,n,r,i)}function vp(e,t,n,r,i){let a=U.useCallback(()=>t(e.getSnapshot(),n,r,i),[e,t,n,r,i]);return(0,mp.useSyncExternalStore)(e.subscribe,a,a)}up({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let n=0;n0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{let n=new Set;for(let t of e.syncHooks)n.add(t.store);let r=[];for(let e of n)r.push(e.subscribe(t));return()=>{for(let e of r)e()}}),(0,mp.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot))}});function yp(e,t,n,r,i){let a=lp();if(!a)return vp(e,t,n,r,i);let o=a.syncIndex;a.syncIndex+=1;let s;return a.didInitialize?(s=a.syncHooks[o],(s.store!==e||s.selector!==t||!Object.is(s.a1,n)||!Object.is(s.a2,r)||!Object.is(s.a3,i))&&(s.store!==e&&(a.didChangeStore=!0),s.store=e,s.selector=t,s.a1=n,s.a2=r,s.a3=i,s.didChange=!0)):(s={store:e,selector:t,a1:n,a2:r,a3:i,value:t(e.getSnapshot(),n,r,i),didChange:!1},a.syncHooks.push(s)),s.value}function bp(e,t,n,r,i){return(0,hp.useSyncExternalStoreWithSelector)(e.subscribe,e.getSnapshot,e.getSnapshot,e=>t(e,n,r,i))}var xp=class{constructor(e){this.state=e,this.listeners=new Set,this.updateTick=0}subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.state;setState(e){if(this.state===e)return;this.state=e,this.updateTick+=1;let t=this.updateTick;for(let n of this.listeners){if(t!==this.updateTick)return;n(e)}}update(e){for(let t in e)if(!Object.is(this.state[t],e[t])){this.setState({...this.state,...e});return}}set(e,t){Object.is(this.state[e],t)||this.setState({...this.state,[e]:t})}notifyAll(){let e={...this.state};this.setState(e)}use(e,t,n,r){return _p(this,e,t,n,r)}},Sp=class extends xp{constructor(e,t={},n){super(e),this.context=t,this.selectors=n}useSyncedValue(e,t){U.useDebugValue(e);let n=this;B(()=>{n.state[e]!==t&&n.set(e,t)},[n,e,t])}useSyncedValueWithCleanup(e,t){let n=this;B(()=>(n.state[e]!==t&&n.set(e,t),()=>{n.set(e,void 0)}),[n,e,t])}useSyncedValues(e){let t=this;B(()=>{t.update(e)},[t,...Object.values(e)])}useControlledProp(e,t){U.useDebugValue(e);let n=this,r=t!==void 0;B(()=>{r&&!Object.is(n.state[e],t)&&n.setState({...n.state,[e]:t})},[n,e,t,r])}select(e,t,n,r){let i=this.selectors[e];return i(this.state,t,n,r)}useState(e,t,n,r){return U.useDebugValue(e),_p(this,this.selectors[e],t,n,r)}useContextCallback(e,t){U.useDebugValue(e);let n=ir(t??It);this.context[e]=n}useStateSetter(e){let t=U.useRef(void 0);return t.current===void 0&&(t.current=t=>{this.set(e,t)}),t.current}observe(e,t){let n;n=typeof e==`function`?e:this.selectors[e];let r=n(this.state);return t(r,r,this),this.subscribe(e=>{let i=n(e);if(!Object.is(r,i)){let e=r;r=i,t(i,e,this)}})}},Cp={open:Q(e=>e.open),transitionStatus:Q(e=>e.transitionStatus),domReferenceElement:Q(e=>e.domReferenceElement),referenceElement:Q(e=>e.positionReference??e.referenceElement),floatingElement:Q(e=>e.floatingElement),floatingId:Q(e=>e.floatingId)},wp=class extends Sp{constructor(e){let{syncOnly:t,nested:n,onOpenChange:r,triggerElements:i,...a}=e;super({...a,positionReference:a.referenceElement,domReferenceElement:a.referenceElement},{onOpenChange:r,dataRef:{current:{}},events:Ad(),nested:n,triggerElements:i},Cp),this.syncOnly=t}syncOpenEvent=(e,t)=>{(!e||!this.state.open||t!=null&&Xc(t))&&(this.context.dataRef.current.openEvent=e?t:void 0)};dispatchOpenChange=(e,t)=>{this.syncOpenEvent(e,t.event);let n={open:e,reason:t.reason,nativeEvent:t.event,nested:this.context.nested,triggerElement:t.trigger};this.context.events.emit(`openchange`,n)};setOpen=(e,t)=>{if(this.syncOnly){this.context.onOpenChange?.(e,t);return}this.dispatchOpenChange(e,t),this.context.onOpenChange?.(e,t)}};function Tp(e){let{popupStore:t,treatPopupAsFloatingElement:n=!1,floatingRootContext:r,floatingId:i,nested:a,onOpenChange:o}=e,s=t.useState(`open`),c=t.useState(`activeTriggerElement`),l=t.useState(n?`popupElement`:`positionerElement`),u=t.context.triggerElements,d=o,f=U.useRef(null);r===void 0&&f.current===null&&(f.current=new wp({open:s,transitionStatus:void 0,referenceElement:c,floatingElement:l,triggerElements:u,onOpenChange:d,floatingId:i,syncOnly:!0,nested:a}));let p=r??f.current;return t.useSyncedValue(`floatingId`,i),B(()=>{let e={open:s,floatingId:i,referenceElement:c,floatingElement:l};V(c)&&(e.domReferenceElement=c),p.state.positionReference===p.state.referenceElement&&(e.positionReference=c),p.update(e)},[s,i,c,l,p]),p.context.onOpenChange=d,p.context.nested=a,p}var Ep={tabIndex:-1,[kc]:``};function Dp(e,t,n=!1){let r=ur(),i=Nd()!=null,a=U.useRef(null);e===void 0&&a.current===null&&(a.current=t(r,i));let o=e??a.current;return Tp({popupStore:o,treatPopupAsFloatingElement:n,floatingRootContext:o.state.floatingRootContext,floatingId:r,nested:i,onOpenChange:o.setOpen}),{store:o,internalStore:a.current}}function Op(e,t){let n=U.useRef(null),r=U.useRef(null);return U.useCallback(i=>{if(e===void 0)return;let a=!1;if(n.current!==null){let e=n.current,i=r.current,o=t.context.triggerElements.getById(e);i&&o===i&&(t.context.triggerElements.delete(e),a=!0),n.current=null,r.current=null}if(i!==null&&(n.current=e,r.current=i,t.context.triggerElements.add(e,i),a=!0),a){let e=t.context.triggerElements.size;t.select(`open`)&&t.state.triggerCount!==e&&t.set(`triggerCount`,e)}},[t,e])}function kp(e,t,n){let r=n?.id??null;(r||t)&&(e.activeTriggerId=r,e.activeTriggerElement=n??null)}function Ap(e,t,n,r){let i=n.useState(`isMountedByTrigger`,e),a=Op(e,n),o=ir(t=>{if(a(t),!t)return;let i=n.select(`open`),o=n.select(`activeTriggerId`);if(o===e){n.update({activeTriggerElement:t,...i?r:null});return}o==null&&i&&n.update({activeTriggerId:e,activeTriggerElement:t,...r})});return B(()=>{i&&n.update({activeTriggerElement:t.current,...r})},[i,n,t,...Object.values(r)]),{registerTrigger:o,isMountedByThisTrigger:i}}function jp(e){let t=e.useState(`open`);B(()=>{if(!t){e.state.triggerCount!==0&&e.set(`triggerCount`,0);return}let n=e.context.triggerElements.size,r={};if(e.state.triggerCount!==n&&(r.triggerCount=n),!e.select(`activeTriggerId`)&&n===1){let t=e.context.triggerElements.entries().next();if(!t.done){let[e,n]=t.value;r.activeTriggerId=e,r.activeTriggerElement=n}}(r.triggerCount!==void 0||r.activeTriggerId!==void 0)&&e.update(r)},[t,e,e.useState(`triggerCount`)])}function Mp(e,t,n){let{mounted:r,setMounted:i,transitionStatus:a}=xu(e);t.useSyncedValues({mounted:r,transitionStatus:a});let o=ir(()=>{i(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),n?.(),t.context.onOpenChangeComplete?.(!1)}),s=t.useState(`preventUnmountingOnClose`);return bu({enabled:r&&!e&&!s,open:e,ref:t.context.popupRef,onComplete(){e||o()}}),{forceUnmount:o,transitionStatus:a}}function Np(e,t){e.useSyncedValues(t),B(()=>()=>{e.update({activeTriggerProps:jt,inactiveTriggerProps:jt,popupProps:jt})},[e])}function Pp(e,t){B(()=>{!t&&e.state.openMethod!==null&&e.set(`openMethod`,null)},[t,e]),B(()=>()=>{e.state.openMethod!==null&&e.set(`openMethod`,null)},[e])}var Fp=class{constructor(){this.elementsSet=new Set,this.idMap=new Map}add(e,t){let n=this.idMap.get(e);n!==t&&(n!==void 0&&this.elementsSet.delete(n),this.elementsSet.add(t),this.idMap.set(e,t))}delete(e){let t=this.idMap.get(e);t&&(this.elementsSet.delete(t),this.idMap.delete(e))}hasElement(e){return this.elementsSet.has(e)}hasMatchingElement(e){for(let t of this.elementsSet)if(e(t))return!0;return!1}getById(e){return this.idMap.get(e)}entries(){return this.idMap.entries()}elements(){return this.elementsSet.values()}get size(){return this.idMap.size}};function Ip(){return new wp({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:new Fp,floatingId:void 0,syncOnly:!1,nested:!1,onOpenChange:void 0})}function Lp(){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:Ip(),floatingId:void 0,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:jt,inactiveTriggerProps:jt,popupProps:jt}}function Rp(e,t,n=!1){return new wp({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:t,syncOnly:!0,nested:n,onOpenChange:void 0})}var zp=Q(e=>e.triggerIdProp??e.activeTriggerId),Bp=Q(e=>e.openProp??e.open),Vp=Q(e=>(e.popupElement?.id??e.floatingId)||void 0);function Hp(e,t){return t!==void 0&&Bp(e)&&zp(e)===t}function Up(e,t){return Hp(e,t)?!0:t!==void 0&&Bp(e)&&zp(e)==null&&e.triggerCount===1}var Wp={open:Bp,mounted:Q(e=>e.mounted),transitionStatus:Q(e=>e.transitionStatus),floatingRootContext:Q(e=>e.floatingRootContext),triggerCount:Q(e=>e.triggerCount),preventUnmountingOnClose:Q(e=>e.preventUnmountingOnClose),payload:Q(e=>e.payload),activeTriggerId:zp,activeTriggerElement:Q(e=>e.mounted?e.activeTriggerElement:null),popupId:Vp,isTriggerActive:Q((e,t)=>t!==void 0&&zp(e)===t),isOpenedByTrigger:Q((e,t)=>Hp(e,t)),isMountedByTrigger:Q((e,t)=>t!==void 0&&zp(e)===t&&e.mounted),triggerProps:Q((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps),triggerPopupId:Q((e,t)=>Up(e,t)?Vp(e):void 0),popupProps:Q(e=>e.popupProps),popupElement:Q(e=>e.popupElement),positionerElement:Q(e=>e.positionerElement)};function Gp(e){let{open:t=!1,onOpenChange:n,elements:r={}}=e,i=ur(),a=Nd()!=null,o=Pt(()=>new wp({open:t,transitionStatus:void 0,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new Fp,floatingId:i,syncOnly:!1,nested:a})).current;return B(()=>{let e={open:t,floatingId:i};r.reference!==void 0&&(e.referenceElement=r.reference,e.domReferenceElement=V(r.reference)?r.reference:null),r.floating!==void 0&&(e.floatingElement=r.floating),o.update(e)},[t,i,r.reference,r.floating,o]),o.context.onOpenChange=n,o.context.nested=a,o}function Kp(e={}){let{nodeId:t,externalTree:n}=e,r=Gp(e),i=e.rootContext||r,a=i.useState(`referenceElement`),o=i.useState(`floatingElement`),s=i.useState(`domReferenceElement`),c=i.useState(`open`),l=i.useState(`floatingId`),[u,d]=U.useState(null),[f,p]=U.useState(void 0),[m,h]=U.useState(void 0),g=U.useRef(null),_=Pd(n),v=U.useMemo(()=>({reference:a,floating:o,domReference:s}),[a,o,s]),y=ep({...e,elements:{...v,...u&&{reference:u}}}),b=V(f)?f:null,x=m===void 0?i.state.floatingElement:m;i.useSyncedValue(`referenceElement`,f??null),i.useSyncedValue(`domReferenceElement`,f===void 0?s:b),i.useSyncedValue(`floatingElement`,x);let S=U.useCallback(e=>{let t=V(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;d(t),y.refs.setReference(t)},[y.refs]),C=U.useCallback(e=>{(V(e)||e===null)&&(g.current=e,p(e)),(V(y.refs.reference.current)||y.refs.reference.current===null||e!==null&&!V(e))&&y.refs.setReference(e)},[y.refs,p]),w=U.useCallback(e=>{h(e),y.refs.setFloating(e)},[y.refs]),T=U.useMemo(()=>({...y.refs,setReference:C,setFloating:w,setPositionReference:S,domReference:g}),[y.refs,C,w,S]),E=U.useMemo(()=>({...y.elements,domReference:s}),[y.elements,s]),D=U.useMemo(()=>({...y,dataRef:i.context.dataRef,open:c,onOpenChange:i.setOpen,events:i.context.events,floatingId:l,refs:T,elements:E,nodeId:t,rootStore:i}),[y,T,E,t,i,c,l]);return B(()=>{s&&(g.current=s)},[s]),B(()=>{i.context.dataRef.current.floatingContext=D;let e=_?.nodesRef.current.find(e=>e.id===t);e&&(e.context=D)}),U.useMemo(()=>({...y,context:D,refs:T,elements:E,rootStore:i}),[y,T,E,D,i])}var qp=wc&⪼function Jp(e,t={}){let{enabled:n=!0,delay:r}=t,i=`rootStore`in e?e.rootStore:e,{events:a,dataRef:o}=i.context,s=U.useRef(!1),c=U.useRef(null),l=U.useRef(!0),u=cu();U.useEffect(()=>{let e=i.select(`domReferenceElement`);if(!n)return;let t=qn(e);function r(){let e=i.select(`domReferenceElement`);!i.select(`open`)&&Jn(e)&&e===wr(Tr(e))&&(s.current=!0)}function a(){l.current=!0}function o(){l.current=!1}return ed(X(t,`blur`,r),qp&&X(t,`keydown`,a,!0),qp&&X(t,`pointerdown`,o,!0))},[i,n]),U.useEffect(()=>{if(!n)return;function e(e){if(e.reason===`trigger-press`||e.reason===`escape-key`){let e=i.select(`domReferenceElement`);V(e)&&(c.current=e,s.current=!0)}}return a.on(`openchange`,e),()=>{a.off(`openchange`,e)}},[a,n,i]);let d=U.useMemo(()=>{function e(){s.current=!1,c.current=null}return{onMouseLeave(){e()},onFocus(t){let n=t.currentTarget;if(s.current){if(c.current===n)return;e()}let a=pr(t.nativeEvent);if(V(a)){if(qp&&!t.relatedTarget){if(!l.current&&!Rc(a))return}else if(!Vc(a))return}let o=Fc(t.relatedTarget,i.context.triggerElements),{nativeEvent:d,currentTarget:f}=t,p=typeof r==`function`?r():r;if(i.select(`open`)&&o||p===0||p===void 0){i.setOpen(!0,Cr(vr,d,f));return}u.start(p,()=>{s.current||i.setOpen(!0,Cr(vr,d,f))})},onBlur(t){e();let n=t.relatedTarget,r=t.nativeEvent,a=V(n)&&n.hasAttribute(sd(`focus-guard`))&&n.getAttribute(`data-type`)===`outside`;u.start(0,()=>{let e=i.select(`domReferenceElement`),t=wr(Tr(e));!n&&t===e||H(o.current.floatingContext?.refs.floating.current,t)||H(e,t)||a||Fc(n??t,i.context.triggerElements)||i.setOpen(!1,Cr(vr,r))})}}},[o,r,i,u]);return U.useMemo(()=>n?{reference:d,trigger:d}:{},[n,d])}var Yp=class e{constructor(){this.pointerType=void 0,this.interactedInside=!1,this.handler=void 0,this.blockMouseMove=!0,this.performedPointerEventsMutation=!1,this.pointerEventsScopeElement=null,this.pointerEventsReferenceElement=null,this.pointerEventsFloatingElement=null,this.restTimeoutPending=!1,this.openChangeTimeout=new su,this.restTimeout=new su,this.handleCloseOptions=void 0}static create(){return new e}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose},Xp=new WeakMap;function Zp(e){if(!e.performedPointerEventsMutation)return;let t=e.pointerEventsScopeElement;t&&Xp.get(t)===e&&(e.pointerEventsScopeElement?.style.removeProperty(`pointer-events`),e.pointerEventsReferenceElement?.style.removeProperty(`pointer-events`),e.pointerEventsFloatingElement?.style.removeProperty(`pointer-events`),Xp.delete(t)),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null}function Qp(e,t){let{scopeElement:n,referenceElement:r,floatingElement:i}=t,a=Xp.get(n);a&&a!==e&&Zp(a),Zp(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=n,e.pointerEventsReferenceElement=r,e.pointerEventsFloatingElement=i,Xp.set(n,e),n.style.pointerEvents=`none`,r.style.pointerEvents=`auto`,i.style.pointerEvents=`auto`}function $p(e){let t=e.context.dataRef.current,n=Pt(()=>t.hoverInteractionState??Yp.create()).current;return t.hoverInteractionState||=n,au(t.hoverInteractionState.disposeEffect),t.hoverInteractionState}function em(e,t={}){let{enabled:n=!0,closeDelay:r=0,nodeId:i}=t,a=`rootStore`in e?e.rootStore:e,o=a.useState(`open`),s=a.useState(`floatingElement`),c=a.useState(`domReferenceElement`),{dataRef:l}=a.context,u=Pd(),d=Nd(),f=$p(a),p=cu(),m=ir(()=>Yu(l.current.openEvent?.type,f.interactedInside)),h=ir(()=>Xu(l.current.openEvent?.type)),g=ir(()=>{Zp(f)});B(()=>{o||(f.pointerType=void 0,f.restTimeoutPending=!1,f.interactedInside=!1,g())},[o,f,g]),U.useEffect(()=>g,[g]),B(()=>{if(n&&o&&f.handleCloseOptions?.blockPointerEvents&&h()&&V(c)&&s){let e=c,t=s,n=Tr(s),r=u?.nodesRef.current.find(e=>e.id===d)?.context?.elements.floating;r&&(r.style.pointerEvents=``);let i=f.pointerEventsScopeElement===t?null:f.pointerEventsScopeElement,a=r===t?null:r;return Qp(f,{scopeElement:f.handleCloseOptions?.getScope?.()??i??a??e.closest(`[data-rootownerid]`)??n.body,referenceElement:e,floatingElement:t}),()=>{g()}}},[n,o,c,s,f,h,u,d,g]),U.useEffect(()=>{if(!n)return;function e(){return!!(u&&d&&Uc(u.nodesRef.current,d).length>0)}function t(e){let t=qu(r,`close`,f.pointerType),n=()=>{a.setOpen(!1,Cr(gr,e)),u?.events.emit(`floating.closed`,e)};t?f.openChangeTimeout.start(t,n):(f.openChangeTimeout.clear(),n())}function o(e){let t=pr(e);if(!zc(t)){f.interactedInside=!1;return}f.interactedInside=t?.closest(`[aria-haspopup]`)!=null}function c(){f.openChangeTimeout.clear(),p.clear(),u?.events.off(`floating.closed`,_),g()}function h(n){if(e()&&u){u.events.on(`floating.closed`,_);return}if(Fc(n.relatedTarget,a.context.triggerElements))return;let r=l.current.floatingContext?.nodeId??i,o=n.relatedTarget;if(!(u&&r&&V(o)&&Uc(u.nodesRef.current,r,!1).some(e=>H(e.context?.elements.floating,o)))){if(f.handler){f.handler(n);return}g(),m()||t(n)}}function _(t){!u||!d||e()||p.start(0,()=>{u.events.off(`floating.closed`,_),a.setOpen(!1,Cr(gr,t)),u.events.emit(`floating.closed`,t)})}let v=s;return ed(v&&X(v,`mouseenter`,c),v&&X(v,`mouseleave`,h),v&&X(v,`pointerdown`,o,!0),()=>{u?.events.off(`floating.closed`,_)})},[n,s,a,l,r,i,m,g,f,u,d,p])}var tm={current:null};function nm(e,t={}){let{enabled:n=!0,delay:r=0,handleClose:i=null,mouseOnly:a=!1,restMs:o=0,move:s=!0,triggerElementRef:c=tm,externalTree:l,isActiveTrigger:u=!0,getHandleCloseContext:d,isClosing:f,shouldOpen:p}=t,m=`rootStore`in e?e.rootStore:e,{dataRef:h,events:g}=m.context,_=Pd(l),v=$p(m),y=U.useRef(!1),b=td(i),x=td(r),S=td(o),C=td(n),w=td(p),T=td(f),E=ir(()=>Yu(h.current.openEvent?.type,v.interactedInside)),D=ir(()=>w.current?.()!==!1),O=ir((e,t,n)=>{let r=m.context.triggerElements;if(r.hasElement(t))return!e||!H(e,t);if(!V(n))return!1;let i=n;return r.hasMatchingElement(e=>H(e,i))&&(!e||!H(e,i))}),k=ir(()=>{v.handler&&=(Tr(m.select(`domReferenceElement`)).removeEventListener(`mousemove`,v.handler),void 0)}),A=ir(()=>{Zp(v)});return u&&(v.handleCloseOptions=b.current?.__options),U.useEffect(()=>k,[k]),U.useEffect(()=>{if(!n)return;function e(e){e.open?y.current=!1:(y.current=e.reason===gr,k(),v.openChangeTimeout.clear(),v.restTimeout.clear(),v.blockMouseMove=!0,v.restTimeoutPending=!1)}return g.on(`openchange`,e),()=>{g.off(`openchange`,e)}},[n,g,v,k]),U.useEffect(()=>{if(!n)return;function e(e,t=!0){let n=qu(x.current,`close`,v.pointerType);n?v.openChangeTimeout.start(n,()=>{m.setOpen(!1,Cr(gr,e)),_?.events.emit(`floating.closed`,e)}):t&&(v.openChangeTimeout.clear(),m.setOpen(!1,Cr(gr,e)),_?.events.emit(`floating.closed`,e))}let t=c.current??(u?m.select(`domReferenceElement`):null);if(!V(t))return;function r(e){if(v.openChangeTimeout.clear(),v.blockMouseMove=!1,a&&!Yc(v.pointerType))return;let t=Ju(S.current),n=qu(x.current,`open`,v.pointerType),r=pr(e),i=e.currentTarget??null,o=m.select(`domReferenceElement`),s=i;if(V(r)&&!m.context.triggerElements.hasElement(r)){for(let e of m.context.triggerElements.elements())if(H(e,r)){s=e;break}}V(i)&&V(o)&&!m.context.triggerElements.hasElement(i)&&H(i,o)&&(s=o);let c=s==null?!1:O(o,s,r),l=m.select(`open`),u=T.current?.()??m.select(`transitionStatus`)===`ending`,d=!l&&u&&y.current,f=!c&&V(s)&&V(o)&&H(o,s)&&d,p=t>0&&!n,h=c&&(l||d)||f,g=!l||c;if(h){D()&&m.setOpen(!0,Cr(gr,e,s));return}p||(n?v.openChangeTimeout.start(n,()=>{g&&D()&&m.setOpen(!0,Cr(gr,e,s))}):g&&D()&&m.setOpen(!0,Cr(gr,e,s)))}function i(t){if(E()){A();return}k();let n=Tr(m.select(`domReferenceElement`));v.restTimeout.clear(),v.restTimeoutPending=!1;let r=h.current.floatingContext??d?.();if(!Fc(t.relatedTarget,m.context.triggerElements)){if(b.current&&r){m.select(`open`)||v.openChangeTimeout.clear();let i=c.current;v.handler=b.current({...r,tree:_,x:t.clientX,y:t.clientY,onClose(){A(),k(),C.current&&!E()&&i===m.select(`domReferenceElement`)&&e(t,!0)}}),n.addEventListener(`mousemove`,v.handler),v.handler(t);return}(v.pointerType!==`touch`||!H(m.select(`floatingElement`),t.relatedTarget))&&e(t)}}return s?ed(X(t,`mousemove`,r,{once:!0}),X(t,`mouseenter`,r),X(t,`mouseleave`,i)):ed(X(t,`mouseenter`,r),X(t,`mouseleave`,i))},[k,A,h,x,m,n,b,v,u,O,E,a,s,S,c,_,C,d,T,D]),U.useMemo(()=>{if(!n)return;function e(e){v.pointerType=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){let{nativeEvent:t}=e,n=e.currentTarget,r=m.select(`domReferenceElement`),i=m.select(`open`),o=O(r,n,e.target);if(a&&!Yc(v.pointerType))return;if(i&&o&&v.handleCloseOptions?.blockPointerEvents){let e=m.select(`floatingElement`);e&&Qp(v,{scopeElement:v.handleCloseOptions?.getScope?.()??n.ownerDocument.body,referenceElement:n,floatingElement:e})}let s=Ju(S.current);if(i&&!o||s===0||!o&&v.restTimeoutPending&&e.movementX**2+e.movementY**2<2)return;v.restTimeout.clear();function c(){if(v.restTimeoutPending=!1,E())return;let e=m.select(`open`);!v.blockMouseMove&&(!e||o)&&D()&&m.setOpen(!0,Cr(gr,t,n))}v.pointerType===`touch`?vu.flushSync(()=>{c()}):o&&i?c():(v.restTimeoutPending=!0,v.restTimeout.start(s,c))}}},[n,v,E,O,a,m,S,D])}var rm=.1,im=rm*rm,am=.5;function om(e,t,n,r,i,a){return r>=t!=a>=t&&e<=(i-n)*(t-r)/(a-r)+n}function sm(e,t,n,r,i,a,o,s,c,l){let u=!1;return om(e,t,n,r,i,a)&&(u=!u),om(e,t,i,a,o,s)&&(u=!u),om(e,t,o,s,c,l)&&(u=!u),om(e,t,c,l,n,r)&&(u=!u),u}function cm(e,t,n){return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height}function lm(e,t,n,r,i,a){return e>=Math.min(n,i)&&e<=Math.max(n,i)&&t>=Math.min(r,a)&&t<=Math.max(r,a)}function um(e={}){let{blockPointerEvents:t=!1}=e,n=new su,r=({x:e,y:t,placement:r,elements:i,onClose:a,nodeId:o,tree:s})=>{let c=r?.split(`-`)[0],l=!1,u=null,d=null,f=typeof performance<`u`?performance.now():0;function p(e,t){let n=performance.now(),r=n-f;if(u===null||d===null||r===0)return u=e,d=t,f=n,!1;let i=e-u,a=t-d,o=i*i+a*a,s=r*r*im;return u=e,d=t,f=n,o0)}function b(){y()||m()}if(y())return;let x=a.getBoundingClientRect(),S=u.getBoundingClientRect(),C=e>S.right-S.width/2,w=t>S.bottom-S.height/2,T=S.width>x.width,E=S.height>x.height,D=(T?x:S).left,O=(T?x:S).right,k=(E?x:S).top,A=(E?x:S).bottom;if(c===`top`&&t>=x.bottom-1||c===`bottom`&&t<=x.top+1||c===`left`&&e>=x.right-1||c===`right`&&e<=x.left+1){b();return}let j=!1;switch(c){case`top`:j=lm(d,f,D,x.top+1,O,S.bottom-1);break;case`bottom`:j=lm(d,f,D,S.top+1,O,x.bottom-1);break;case`left`:j=lm(d,f,S.right-1,A,x.left+1,k);break;case`right`:j=lm(d,f,x.right-1,A,S.left+1,k);break;default:}if(j)return;if(l&&!cm(d,f,x)){b();return}if(!g&&p(d,f)){b();return}let M=!1;switch(c){case`top`:{let n=T?am/2:am*4,r=T||C?e+n:e-n,i=T?e-n:C?e+n:e-n,a=t+am+1,o=C||T?S.bottom-am:S.top,s=C?T?S.bottom-am:S.top:S.bottom-am;M=sm(d,f,r,a,i,a,S.left,o,S.right,s);break}case`bottom`:{let n=T?am/2:am*4,r=T||C?e+n:e-n,i=T?e-n:C?e+n:e-n,a=t-am,o=C||T?S.top+am:S.bottom,s=C?T?S.top+am:S.bottom:S.top+am;M=sm(d,f,r,a,i,a,S.left,o,S.right,s);break}case`left`:{let n=E?am/2:am*4,r=E||w?t+n:t-n,i=E?t-n:w?t+n:t-n,a=e+am+1,o=w||E?S.right-am:S.left,s=w?E?S.right-am:S.left:S.right-am;M=sm(d,f,o,S.top,s,S.bottom,a,r,a,i);break}case`right`:{let n=E?am/2:am*4,r=E||w?t+n:t-n,i=E?t-n:w?t+n:t-n,a=e-am,o=w||E?S.left+am:S.right,s=w?E?S.left+am:S.right:S.left+am;M=sm(d,f,a,r,a,i,o,S.top,s,S.bottom);break}default:}M?l||n.start(40,b):b()}};return r.__options={...e,blockPointerEvents:t},r}var dm=function(e){return e.nestedDialogs=`--nested-dialogs`,e}({}),fm=function(e){return e[e.open=Mu.open]=`open`,e[e.closed=Mu.closed]=`closed`,e[e.startingStyle=Mu.startingStyle]=`startingStyle`,e[e.endingStyle=Mu.endingStyle]=`endingStyle`,e.nested=`data-nested`,e.nestedDialogOpen=`data-nested-dialog-open`,e}({}),pm=U.createContext(void 0);function mm(){let e=U.useContext(pm);if(e===void 0)throw Error(zt(26));return e}var hm=`ArrowUp`,gm=`ArrowDown`,_m=`ArrowLeft`,vm=`ArrowRight`,ym=`Home`,bm=new Set([_m,vm]),xm=new Set([_m,vm,ym,`End`]),Sm=new Set([hm,gm]),Cm=new Set([hm,gm,ym,`End`]),wm=new Set([...bm,...Sm]),Tm=new Set([...wm,ym,`End`]),Em=new Set([`Shift`,`Control`,`Alt`,`Meta`]);function Dm(e){return Jn(e)&&e.tagName===`INPUT`}function Om(e){return!!(Dm(e)&&e.selectionStart!=null||Jn(e)&&e.tagName===`TEXTAREA`)}function km(e,t,n,r){if(!e||!t||!t.scrollTo)return;let i=e.scrollLeft,a=e.scrollTop,o=e.clientWidthe.scrollLeft+e.clientWidth-a.scrollPaddingRight?i=r+t.offsetWidth+o.scrollMarginRight-e.clientWidth+a.scrollPaddingRight:r-o.scrollMarginLefte.scrollLeft+e.clientWidth-a.scrollPaddingRight&&(i=r+t.offsetWidth+o.scrollMarginRight-e.clientWidth+a.scrollPaddingRight))}if(s&&r!==`horizontal`){let n=Am(e,t,`top`),r=jm(e),i=jm(t);n-i.scrollMarginTope.scrollTop+e.clientHeight-r.scrollPaddingBottom&&(a=n+t.offsetHeight+i.scrollMarginBottom-e.clientHeight+r.scrollPaddingBottom)}e.scrollTo({left:i,top:a,behavior:`auto`})}function Am(e,t,n){let r=n===`left`?`offsetLeft`:`offsetTop`,i=0;for(;t.offsetParent&&(i+=t[r],t.offsetParent!==e);)t=t.offsetParent;return i}function jm(e){let t=getComputedStyle(e);return{scrollMarginTop:parseFloat(t.scrollMarginTop)||0,scrollMarginRight:parseFloat(t.scrollMarginRight)||0,scrollMarginBottom:parseFloat(t.scrollMarginBottom)||0,scrollMarginLeft:parseFloat(t.scrollMarginLeft)||0,scrollPaddingTop:parseFloat(t.scrollPaddingTop)||0,scrollPaddingRight:parseFloat(t.scrollPaddingRight)||0,scrollPaddingBottom:parseFloat(t.scrollPaddingBottom)||0,scrollPaddingLeft:parseFloat(t.scrollPaddingLeft)||0}}var Mm={...Vu,..._u,nestedDialogOpen(e){return e?{[fm.nestedDialogOpen]:``}:null}},Nm=U.forwardRef(function(e,t){let{render:n,className:r,style:i,finalFocus:a,initialFocus:o,...s}=e,{store:c}=ju(),l=c.useState(`descriptionElementId`),u=c.useState(`disablePointerDismissal`),d=c.useState(`floatingRootContext`),f=c.useState(`popupProps`),p=c.useState(`modal`),m=c.useState(`mounted`),h=c.useState(`nested`),g=c.useState(`nestedOpenDialogCount`),_=c.useState(`open`),v=c.useState(`openMethod`),y=c.useState(`titleElementId`),b=c.useState(`transitionStatus`),x=c.useState(`role`),S=d.useState(`floatingId`),C=s.id??S;mm(),bu({open:_,ref:c.context.popupRef,onComplete(){_&&c.context.onOpenChangeComplete?.(!0)}});function w(e){return e===`touch`?c.context.popupRef.current:!0}let T=o===void 0?w:o,E=g>0,D=c.useStateSetter(`popupElement`),O=Ft(`div`,e,{state:{open:_,nested:h,transitionStatus:b,nestedDialogOpen:E},props:[f,{id:C,"aria-labelledby":y??void 0,"aria-describedby":l??void 0,role:x,...Ep,hidden:!m,onKeyDown(e){Tm.has(e.key)&&e.stopPropagation()},style:{[dm.nestedDialogs]:g}},s],ref:[t,c.context.popupRef,D],stateAttributesMapping:Mm});return(0,W.jsx)(Ud,{context:d,openInteractionType:v,disabled:!m,closeOnFocusOut:!u,initialFocus:T,returnFocus:a,modal:p!==!1,restoreFocus:`popup`,children:O})});function Pm(e){return Lt(19)?e:e?`true`:void 0}var Fm=U.forwardRef(function(e,t){let{cutout:n,...r}=e,i;if(n){let e=n.getBoundingClientRect();i=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${e.left}px ${e.top}px,${e.left}px ${e.bottom}px,${e.right}px ${e.bottom}px,${e.right}px ${e.top}px,${e.left}px ${e.top}px)`}return(0,W.jsx)(`div`,{ref:t,role:`presentation`,"data-base-ui-inert":``,...r,style:{position:`fixed`,inset:0,userSelect:`none`,WebkitUserSelect:`none`,clipPath:i}})}),Im=U.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,{store:i}=ju(),a=i.useState(`mounted`),o=i.useState(`modal`),s=i.useState(`open`);return a||n?(0,W.jsx)(pm.Provider,{value:n,children:(0,W.jsxs)(kd,{ref:t,...r,children:[a&&o===!0&&(0,W.jsx)(Fm,{ref:i.context.internalBackdropRef,inert:Pm(!s)}),e.children]})}):null});function Lm(e){let t=U.useRef(!0);t.current&&(t.current=!1,e())}var Rm={},zm={},Bm=``;function Vm(e){if(typeof document>`u`)return!1;let t=Tr(e);return qn(t).innerWidth-t.documentElement.clientWidth>0}function Hm(e){if(!(typeof CSS<`u`&&CSS.supports&&CSS.supports(`scrollbar-gutter`,`stable`))||typeof document>`u`)return!1;let t=Tr(e),n=t.documentElement,r=t.body,i=Hn(n)?n:r,a=i.style.overflowY,o=n.style.scrollbarGutter;n.style.scrollbarGutter=`stable`,i.style.overflowY=`scroll`;let s=i.offsetWidth;i.style.overflowY=`hidden`;let c=i.offsetWidth;return i.style.overflowY=a,n.style.scrollbarGutter=o,s===c}function Um(e){let t=Tr(e),n=t.documentElement,r=t.body,i=Hn(n)?n:r,a={overflowY:i.style.overflowY,overflowX:i.style.overflowX};return Object.assign(i.style,{overflowY:`hidden`,overflowX:`hidden`}),()=>{Object.assign(i.style,a)}}function Wm(e){let t=Tr(e),n=t.documentElement,r=t.body,i=qn(n),a=0,o=0,s=!1,c=du.create();if(bc&&(i.visualViewport?.scale??1)!==1)return()=>{};function l(){let t=i.getComputedStyle(n),c=i.getComputedStyle(r),l=(t.scrollbarGutter||``).includes(`both-edges`)?`stable both-edges`:`stable`;a=n.scrollTop,o=n.scrollLeft,Rm={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},Bm=n.style.scrollBehavior,zm={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};let u=n.scrollHeight>n.clientHeight,d=n.scrollWidth>n.clientWidth,f=t.overflowY===`scroll`||c.overflowY===`scroll`,p=t.overflowX===`scroll`||c.overflowX===`scroll`,m=Math.max(0,i.innerWidth-r.clientWidth),h=Math.max(0,i.innerHeight-r.clientHeight),g=parseFloat(c.marginTop)+parseFloat(c.marginBottom),_=parseFloat(c.marginLeft)+parseFloat(c.marginRight),v=Hn(n)?n:r;if(s=Hm(e),s){n.style.scrollbarGutter=l,v.style.overflowY=`hidden`,v.style.overflowX=`hidden`;return}Object.assign(n.style,{scrollbarGutter:l,overflowY:`hidden`,overflowX:`hidden`}),(u||f)&&(n.style.overflowY=`scroll`),(d||p)&&(n.style.overflowX=`scroll`),Object.assign(r.style,{position:`relative`,height:g||h?`calc(100dvh - ${g+h}px)`:`100dvh`,width:_||m?`calc(100vw - ${_+m}px)`:`100vw`,boxSizing:`border-box`,overflow:`hidden`,scrollBehavior:`unset`}),r.scrollTop=a,r.scrollLeft=o,n.setAttribute(`data-base-ui-scroll-locked`,``),n.style.scrollBehavior=`unset`}function u(){Object.assign(n.style,Rm),Object.assign(r.style,zm),s||(n.scrollTop=a,n.scrollLeft=o,n.removeAttribute(`data-base-ui-scroll-locked`),n.style.scrollBehavior=Bm)}function d(){u(),c.request(l)}l();let f=X(i,`resize`,d);return()=>{c.cancel(),u(),typeof i.removeEventListener==`function`&&f()}}var Gm=new class{lockCount=0;restore=null;timeoutLock=su.create();timeoutUnlock=su.create();acquire(e){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(e)),this.release}release=()=>{--this.lockCount,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(e){if(this.lockCount===0||this.restore!==null)return;let t=Tr(e).documentElement,n=qn(t).getComputedStyle(t).overflowY;if(n===`hidden`||n===`clip`){this.restore=It;return}let r=xc||!Vm(e);this.restore=r?Um(e):Wm(e)}};function Km(e=!0,t=null){B(()=>{if(e)return Gm.acquire(t)},[e,t])}function qm(e){let{store:t,parentContext:n,actionsRef:r,isDrawer:i}=e,a=t.useState(`open`);Pp(t,a),jp(t);let{forceUnmount:o}=Mp(a,t),s=U.useCallback(()=>{t.setOpen(!1,Cr(Sr))},[t]);return U.useImperativeHandle(r,()=>({unmount:o,close:s}),[o,s]),{parentContext:n,isDrawer:i}}function Jm({store:e,dialogRoot:t}){let{parentContext:n,isDrawer:r}=t,i=e.useState(`open`),a=e.useState(`disablePointerDismissal`),o=e.useState(`modal`),s=e.useState(`popupElement`),c=e.useState(`floatingRootContext`),[l,u]=U.useState(0),[d,f]=U.useState(0),p=l===0,m=Xd(c,{outsidePressEvent(){return e.context.internalBackdropRef.current||e.context.backdropRef.current?`intentional`:{mouse:o===`trap-focus`?`sloppy`:`intentional`,touch:`sloppy`}},outsidePress(t){if(!e.context.outsidePressEnabledRef.current||`button`in t&&t.button!==0||`touches`in t&&t.touches.length!==1)return!1;let n=pr(t);if(p&&!a){let t=n;return o&&(e.context.internalBackdropRef.current||e.context.backdropRef.current)?e.context.internalBackdropRef.current===t||e.context.backdropRef.current===t||H(t,s)&&!t?.hasAttribute(`data-base-ui-portal`):!0}return!1},escapeKey:p});return Km(i&&o===!0,s),e.useContextCallback(`onNestedDialogOpen`,(e,t)=>{u(e),f(t)}),e.useContextCallback(`onNestedDialogClose`,()=>{u(0),f(0)}),U.useEffect(()=>(n?.onNestedDialogOpen&&i&&n.onNestedDialogOpen(l+1,d+ +!!r),n?.onNestedDialogClose&&!i&&n.onNestedDialogClose(),()=>{n?.onNestedDialogClose&&i&&n.onNestedDialogClose()}),[r,i,l,d,n]),Np(e,{activeTriggerProps:m.reference??jt,inactiveTriggerProps:m.trigger??jt,popupProps:U.useMemo(()=>Nt(Ep,m.floating),[m.floating]),nestedOpenDialogCount:l,nestedOpenDrawerCount:d}),null}var Ym={...Wp,modal:Q(e=>e.modal),nested:Q(e=>e.nested),nestedOpenDialogCount:Q(e=>e.nestedOpenDialogCount),nestedOpenDrawerCount:Q(e=>e.nestedOpenDrawerCount),disablePointerDismissal:Q(e=>e.disablePointerDismissal),openMethod:Q(e=>e.openMethod),descriptionElementId:Q(e=>e.descriptionElementId),titleElementId:Q(e=>e.titleElementId),viewportElement:Q(e=>e.viewportElement),role:Q(e=>e.role)},Xm=class e extends Sp{constructor(e,t,n=!1){let r=new Fp,i=Zm(e);i.floatingRootContext=Rp(r,t,n),super(i,{popupRef:U.createRef(),backdropRef:U.createRef(),internalBackdropRef:U.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:r,onOpenChange:void 0,onOpenChangeComplete:void 0},Ym)}setOpen=(e,t)=>{if(t.preventUnmountOnClose=()=>{this.set(`preventUnmountingOnClose`,!0)},!e&&t.trigger==null&&this.state.activeTriggerId!=null&&(t.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(e,t),t.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(e,t);let n={open:e};kp(n,e,t.trigger),this.update(n)};static useStore(t,n){return Dp(t,(t,r)=>new e(n,t,r),!0).store}};function Zm(e={}){return{...Lp(),modal:!0,disablePointerDismissal:!1,popupElement:null,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,nestedOpenDrawerCount:0,role:`dialog`,...e}}function Qm(e,t=`dialog`){let{children:n,open:r,defaultOpen:i=!1,onOpenChange:a,onOpenChangeComplete:o,disablePointerDismissal:s=!1,modal:c=!0,actionsRef:l,handle:u,triggerId:d,defaultTriggerId:f=null}=e,p=t===`drawer`,m=t===`alert-dialog`,h=m?!0:c,g=m||s,_=m?`alertdialog`:`dialog`,v=ju(!0),y={modal:h,disablePointerDismissal:g,nested:!!v,role:_},b=Xm.useStore(u?.store,{open:i,openProp:r,activeTriggerId:f,triggerIdProp:d,...y});Lm(()=>{let e=r===void 0&&b.state.open===!1&&i===!0?{open:!0,activeTriggerId:f}:null;m?b.update(e?{...y,...e}:y):e&&b.update(e)}),b.useControlledProp(`openProp`,r),b.useControlledProp(`triggerIdProp`,d),b.useSyncedValues(y),b.useContextCallback(`onOpenChange`,a),b.useContextCallback(`onOpenChangeComplete`,o);let x=b.useState(`open`),S=b.useState(`mounted`),C=b.useState(`payload`),w=qm({store:b,actionsRef:l,parentContext:v?.store.context,isDrawer:p}),T=x||S,E=U.useMemo(()=>({store:b}),[b]);return(0,W.jsx)(ku.Provider,{value:!1,children:(0,W.jsxs)(Au.Provider,{value:E,children:[T&&(0,W.jsx)(Jm,{store:b,dialogRoot:w}),typeof n==`function`?n({payload:C}):n]})})}function $m(e){return Qm(e,U.useContext(ku)?`drawer`:`dialog`)}var eh=U.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,{store:s}=ju(),c=dr(a);return s.useSyncedValueWithCleanup(`titleElementId`,c),Ft(`h2`,e,{ref:t,props:[{id:c},o]})});function th(e){let t=(0,ms.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,W.jsx)($m,{"data-slot":`sheet`,...n}),t[2]=n,t[3]=r),r}function nh(e){let t=(0,ms.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,W.jsx)(Im,{"data-slot":`sheet-portal`,...n}),t[2]=n,t[3]=r),r}function rh(e){let t=(0,ms.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=rn(`data-closed:fade-out-0 data-open:fade-in-0 data-closed:animate-out data-open:animate-in fixed inset-0 z-50 bg-black/80 duration-100 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,W.jsx)(Uu,{className:i,"data-slot":`sheet-overlay`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function ih(e){let t=(0,ms.c)(17),n,r,i,a,o;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5]):({className:r,children:n,side:a,showCloseButton:o,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o);let s=a===void 0?`right`:a,c=o===void 0?!0:o,l;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,W.jsx)(rh,{}),t[6]=l):l=t[6];let u;t[7]===r?u=t[8]:(u=rn(`data-[side=right]:data-closed:slide-out-to-right-10 data-[side=right]:data-open:slide-in-from-right-10 data-[side=left]:data-closed:slide-out-to-left-10 data-[side=left]:data-open:slide-in-from-left-10 data-[side=top]:data-closed:slide-out-to-top-10 data-[side=top]:data-open:slide-in-from-top-10 data-closed:fade-out-0 data-open:fade-in-0 data-[side=bottom]:data-closed:slide-out-to-bottom-10 data-[side=bottom]:data-open:slide-in-from-bottom-10 data-closed:animate-out data-open:animate-in fixed z-50 flex flex-col bg-background bg-clip-padding text-xs/relaxed shadow-lg transition duration-200 ease-in-out data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm`,r),t[7]=r,t[8]=u);let d;t[9]===c?d=t[10]:(d=c&&(0,W.jsxs)(Wu,{"data-slot":`sheet-close`,render:(0,W.jsx)(ar,{className:`absolute top-4 right-4`,size:`icon-sm`,variant:`ghost`}),children:[(0,W.jsx)(ic,{}),(0,W.jsx)(`span`,{className:`sr-only`,children:`Close`})]}),t[9]=c,t[10]=d);let f;return t[11]!==n||t[12]!==i||t[13]!==s||t[14]!==u||t[15]!==d?(f=(0,W.jsxs)(nh,{children:[l,(0,W.jsxs)(Nm,{className:u,"data-side":s,"data-slot":`sheet-content`,...i,children:[n,d]})]}),t[11]=n,t[12]=i,t[13]=s,t[14]=u,t[15]=d,t[16]=f):f=t[16],f}function ah(e){let t=(0,ms.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=rn(`flex flex-col gap-1.5 p-6`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,W.jsx)(`div`,{className:i,"data-slot":`sheet-header`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function oh(e){let t=(0,ms.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=rn(`text-sm font-medium text-foreground`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,W.jsx)(eh,{className:i,"data-slot":`sheet-title`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function sh(e){let t=(0,ms.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=rn(`text-xs/relaxed text-muted-foreground`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,W.jsx)(Gu,{className:i,"data-slot":`sheet-description`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}var ch=U.createContext(void 0);function lh(e){let t=U.useContext(ch);if(t===void 0&&!e)throw Error(zt(72));return t}var uh={...Wp,disabled:Q(e=>e.disabled),instantType:Q(e=>e.instantType),isInstantPhase:Q(e=>e.isInstantPhase),trackCursorAxis:Q(e=>e.trackCursorAxis),disableHoverablePopup:Q(e=>e.disableHoverablePopup),lastOpenChangeReason:Q(e=>e.openChangeReason),closeOnClick:Q(e=>e.closeOnClick),closeDelay:Q(e=>e.closeDelay),hasViewport:Q(e=>e.hasViewport)},dh=class e extends Sp{constructor(e,t,n=!1){let r=new Fp,i={...fh(),...e};i.floatingRootContext=Rp(r,t,n),super(i,{popupRef:U.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:r},uh)}setOpen=(e,t)=>{let n=t.reason,r=n===gr,i=e&&n===`trigger-focus`,a=!e&&(n===`trigger-press`||n===`escape-key`);if(t.preventUnmountOnClose=()=>{this.set(`preventUnmountingOnClose`,!0)},this.context.onOpenChange?.(e,t),t.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(e,t);let o=()=>{let r={open:e,openChangeReason:n};i?r.instantType=`focus`:a?r.instantType=`dismiss`:n===`trigger-hover`&&(r.instantType=void 0),kp(r,e,t.trigger),this.update(r)};r?vu.flushSync(o):o()};cancelPendingOpen(e){this.state.floatingRootContext.dispatchOpenChange(!1,Cr(hr,e))}static useStore(t,n){return Dp(t,(t,r)=>new e(n,t,r)).store}};function fh(){return{...Lp(),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:`none`,disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,hasViewport:!1}}var ph=dp(function(e){let{disabled:t=!1,defaultOpen:n=!1,open:r,disableHoverablePopup:i=!1,trackCursorAxis:a=`none`,actionsRef:o,onOpenChange:s,onOpenChangeComplete:c,handle:l,triggerId:u,defaultTriggerId:d=null,children:f}=e,p=dh.useStore(l?.store,{open:n,openProp:r,activeTriggerId:d,triggerIdProp:u});Lm(()=>{r===void 0&&p.state.open===!1&&n===!0&&p.update({open:!0,activeTriggerId:d})}),p.useControlledProp(`openProp`,r),p.useControlledProp(`triggerIdProp`,u),p.useContextCallback(`onOpenChange`,s),p.useContextCallback(`onOpenChangeComplete`,c);let m=p.useState(`open`),h=!t&&m,g=p.useState(`activeTriggerId`),_=p.useState(`mounted`),v=p.useState(`payload`);p.useSyncedValues({trackCursorAxis:a,disableHoverablePopup:i}),p.useSyncedValue(`disabled`,t),jp(p);let{forceUnmount:y,transitionStatus:b}=Mp(h,p),x=p.useState(`isInstantPhase`),S=p.useState(`instantType`),C=p.useState(`lastOpenChangeReason`),w=U.useRef(null);B(()=>{m&&t&&p.setOpen(!1,Cr(_r))},[m,t,p]),B(()=>{b===`ending`&&C===`none`||b!==`ending`&&x?(S!==`delay`&&(w.current=S),p.set(`instantType`,`delay`)):w.current!==null&&(p.set(`instantType`,w.current),w.current=null)},[b,x,C,S,p]),B(()=>{h&&(g??p.set(`payload`,void 0))},[p,g,h]);let T=U.useCallback(()=>{p.setOpen(!1,Cr(Sr))},[p]);U.useImperativeHandle(o,()=>({unmount:y,close:T}),[y,T]);let E=h||_||!t&&a!==`none`;return(0,W.jsxs)(ch.Provider,{value:p,children:[E&&(0,W.jsx)(mh,{store:p,disabled:t,trackCursorAxis:a}),typeof f==`function`?f({payload:v}):f]})});function mh({store:e,disabled:t,trackCursorAxis:n}){let r=e.useState(`floatingRootContext`),i=Xd(r,{enabled:!t,referencePress:()=>e.select(`closeOnClick`)}),a=Kd(r,{enabled:!t&&n!==`none`,axis:n===`none`?void 0:n});return Np(e,{activeTriggerProps:U.useMemo(()=>Nt(a.reference,i.reference),[a.reference,i.reference]),inactiveTriggerProps:U.useMemo(()=>Nt(a.trigger,i.trigger),[a.trigger,i.trigger]),popupProps:U.useMemo(()=>Nt(Ep,a.floating,i.floating),[a.floating,i.floating])}),null}var hh=U.createContext(void 0);function gh(){return U.useContext(hh)}var _h=function(e){return e[e.popupOpen=Nu.popupOpen]=`popupOpen`,e.triggerDisabled=`data-trigger-disabled`,e}({}),vh=`data-base-ui-tooltip-trigger`;function yh(e){if(`composedPath`in e){let t=e.composedPath();for(let e=0;em.select(`transitionStatus`)===`ending`,shouldOpen(){return!N.current}}),F=Jp(v,{enabled:!A}).reference,oe=e=>{let t=N.current,n=yh(e),r=ie(n),i=y.current,a=i&&n&&H(i,n);if(r&&m.select(`open`)&&m.select(`lastOpenChangeReason`)===`trigger-hover`){m.setOpen(!1,Cr(gr,e));return}if(t&&!r&&a&&!j.current&&!m.select(`open`)&&i&&Yc(te.current)){let t=()=>{!N.current&&!j.current&&!m.select(`open`)&&m.setOpen(!0,Cr(gr,e,i))},n=ne();n===0?(P.clear(),t()):P.start(n,t)}},se=m.useState(`triggerProps`,C);return Ft(`button`,e,{state:{open:_},ref:[t,S,y],props:[ae,F,C||M!==`none`?se:void 0,{onMouseOver(e){oe(e.nativeEvent)},onFocus(e){re(yh(e.nativeEvent))&&e.preventBaseUIHandler()},onMouseLeave(){N.current=!1,P.clear(),te.current=void 0},onPointerEnter(e){te.current=e.pointerType},onPointerDown(e){te.current=e.pointerType,m.set(`closeOnClick`,l),l&&!m.select(`open`)&&m.cancelPendingOpen(e.nativeEvent)},onClick(e){l&&!m.select(`open`)&&m.cancelPendingOpen(e.nativeEvent)},id:h,[_h.triggerDisabled]:A?``:void 0,[vh]:A?void 0:``},f],stateAttributesMapping:zu})}),Sh=U.createContext(void 0);function Ch(){let e=U.useContext(Sh);if(e===void 0)throw Error(zt(70));return e}var wh=U.forwardRef(function(e,t){let{children:n,container:r,className:i,render:a,style:o,...s}=e,{portalNode:c,portalSubtree:l}=Od({container:r,ref:t,componentProps:e,elementProps:s});return!l&&!c?null:(0,W.jsxs)(U.Fragment,{children:[l,c&&vu.createPortal(n,c)]})}),Th=U.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e;return lh().useState(`mounted`)||n?(0,W.jsx)(Sh.Provider,{value:n,children:(0,W.jsx)(wh,{ref:t,...r})}):null}),Eh=U.createContext(void 0);function Dh(){let e=U.useContext(Eh);if(e===void 0)throw Error(zt(71));return e}var Oh=U.createContext(void 0);function kh(){return U.useContext(Oh)?.direction??`ltr`}var Ah=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0,offsetParent:d=`real`}=al(e,t)||{};if(l==null)return{};let f=Cl(u),p={x:n,y:r},m=dl(i),h=ll(m),g=await o.getDimensions(l),_=m===`y`,v=_?`top`:`left`,y=_?`bottom`:`right`,b=_?`clientHeight`:`clientWidth`,x=a.reference[h]+a.reference[m]-p[m]-a.floating[h],S=p[m]-a.reference[m],C=d===`real`?await o.getOffsetParent?.(l):s.floating,w=s.floating[b]||a.floating[h];(!w||!await o.isElement?.(C))&&(w=s.floating[b]||a.floating[h]);let T=x/2-S/2,E=w/2-g[h]/2-1,D=Math.min(f[v],E),O=Math.min(f[y],E),k=D,A=w-g[h]-O,j=w/2-g[h]/2+T,M=il(k,j,A),ee=!c.arrow&&sl(i)!=null&&j!==M&&a.reference[h]/2-(j({...Ah(e),options:[e,t]}),Mh={name:`hide`,async fn(e){let{width:t,height:n,x:r,y:i}=e.rects.reference,a=t===0&&n===0&&r===0&&i===0;return{data:{referenceHidden:(await op().fn(e)).data?.referenceHidden||a}}}},Nh={sideX:`left`,sideY:`top`},Ph={name:`adaptiveOrigin`,async fn(e){let{x:t,y:n,rects:{floating:r},elements:{floating:i},platform:a,strategy:o,placement:s}=e,c=qn(i),l=c.getComputedStyle(i);if(!(l.transitionDuration!==`0s`&&l.transitionDuration!==``))return{x:t,y:n,data:Nh};let u=await a.getOffsetParent?.(i),d={width:0,height:0};if(o===`fixed`&&c?.visualViewport)d={width:c.visualViewport.width,height:c.visualViewport.height};else if(u===c){let e=Tr(i);d={width:e.documentElement.clientWidth,height:e.documentElement.clientHeight}}else await a.isElement?.(u)&&(d=await a.getDimensions(u));let f=ol(s),p=t,m=n;f===`left`&&(p=d.width-(t+r.width)),f===`top`&&(m=d.height-(n+r.height));let h=f===`left`?`right`:Nh.sideX,g=f===`top`?`bottom`:Nh.sideY;return{x:p,y:m,data:{sideX:h,sideY:g}}}};function Fh(e,t,n){let r=e===`inline-start`||e===`inline-end`;return{top:`top`,right:r?n?`inline-start`:`inline-end`:`right`,bottom:`bottom`,left:r?n?`inline-end`:`inline-start`:`left`}[t]}function Ih(e,t,n){let{rects:r,placement:i}=e;return{side:Fh(t,ol(i),n),align:sl(i)||`center`,anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function Lh(e){let{anchor:t,positionMethod:n=`absolute`,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,collisionBoundary:s,collisionPadding:c=5,sticky:l=!1,arrowPadding:u=5,disableAnchorTracking:d=!1,inline:f,keepMounted:p=!1,floatingRootContext:m,mounted:h,collisionAvoidance:g,shiftCrossAxis:_=!1,nodeId:v,adaptiveOrigin:y,lazyFlip:b=!1,externalTree:x}=e,[S,C]=U.useState(null);!h&&S!==null&&C(null);let w=g.side||`flip`,T=g.align||`flip`,E=g.fallbackAxisSide||`end`,D=typeof t==`function`?t:void 0,O=ir(D),k=D?O:t,A=td(t),j=td(h),M=kh()===`rtl`,ee=S||{top:`top`,right:`right`,bottom:`bottom`,left:`left`,"inline-end":M?`left`:`right`,"inline-start":M?`right`:`left`}[r],N=a===`center`?ee:`${ee}-${a}`,P=c,te=+(r===`bottom`),ne=+(r===`top`),re=+(r===`right`),ie=+(r===`left`);typeof P==`number`?P={top:P+te,right:P+ie,bottom:P+ne,left:P+re}:P&&={top:(P.top||0)+te,right:(P.right||0)+ie,bottom:(P.bottom||0)+ne,left:(P.left||0)+re};let ae={boundary:s===`clipping-ancestors`?`clippingAncestors`:s,padding:P},F=U.useRef(null),oe=td(i),se=td(o),I=typeof i==`function`?0:i,ce=typeof o==`function`?0:o,le=[];f&&le.push(f),le.push(tp(e=>{let t=Ih(e,r,M),n=typeof oe.current==`function`?oe.current(t):oe.current,i=typeof se.current==`function`?se.current(t):se.current;return{mainAxis:n,crossAxis:i,alignmentAxis:i}},[I,ce,M,r]));let ue=T===`none`&&w!==`shift`,de=!ue&&(l||_||w===`shift`),fe=w===`none`?null:ip({...ae,padding:{top:P.top+1,right:P.right+1,bottom:P.bottom+1,left:P.left+1},mainAxis:!_&&w===`flip`,crossAxis:T===`flip`?`alignment`:!1,fallbackAxisSideDirection:E}),pe=ue?null:np(e=>{let t=Tr(e.elements.floating).documentElement;return{...ae,rootBoundary:_?{x:0,y:0,width:t.clientWidth,height:t.clientHeight}:void 0,mainAxis:T!==`none`,crossAxis:de,limiter:l||_?void 0:rp(e=>{if(!F.current)return{};let{width:t,height:n}=F.current.getBoundingClientRect(),r=ul(ol(e.placement)),i=r===`y`?t:n,a=r===`y`?P.left+P.right:P.top+P.bottom;return{offset:i/2+a/2}})}},[ae,l,_,P,T]);w===`shift`||T===`shift`||a===`center`?le.push(pe,fe):le.push(fe,pe),le.push(ap({...ae,apply({elements:{floating:e},availableWidth:t,availableHeight:n,rects:r}){if(!j.current)return;let i=e.style;i.setProperty(`--available-width`,`${t}px`),i.setProperty(`--available-height`,`${n}px`);let a=qn(e).devicePixelRatio||1,{x:o,y:s,width:c,height:l}=r.reference,u=(Math.round((o+c)*a)-Math.round(o*a))/a,d=(Math.round((s+l)*a)-Math.round(s*a))/a;i.setProperty(`--anchor-width`,`${u}px`),i.setProperty(`--anchor-height`,`${d}px`)}}),jh(e=>({element:F.current||Tr(e.elements.floating).createElement(`div`),padding:u,offsetParent:`floating`}),[u]),{name:`transformOrigin`,fn(e){let{elements:t,middlewareData:n,placement:a,rects:o,y:s}=e,c=ol(a),l=ul(c),u=F.current,d=n.arrow?.x||0,f=n.arrow?.y||0,p=u?.clientWidth||0,m=u?.clientHeight||0,h=d+p/2,g=f+m/2,_=Math.abs(n.shift?.y||0),v=o.reference.height/2,y=typeof i==`function`?i(Ih(e,r,M)):i,b=_>y,x={top:`${h}px calc(100% + ${y}px)`,bottom:`${h}px ${-y}px`,left:`calc(100% + ${y}px) ${g}px`,right:`${-y}px ${g}px`}[c],S=`${h}px ${o.reference.y+v-s}px`;return t.floating.style.setProperty(`--transform-origin`,de&&l===`y`&&b?S:x),{}}},Mh,y),B(()=>{!h&&m&&m.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[h,m]);let me=U.useMemo(()=>({elementResize:!d&&typeof ResizeObserver<`u`,layoutShift:!d&&typeof IntersectionObserver<`u`}),[d]),{refs:he,elements:ge,x:_e,y:ve,middlewareData:ye,update:be,placement:xe,context:Se,isPositioned:Ce,floatingStyles:we}=Kp({rootContext:m,open:p?h:void 0,placement:N,middleware:le,strategy:n,whileElementsMounted:p?void 0:(...e)=>Vf(...e,me),nodeId:v,externalTree:x}),{sideX:Te,sideY:Ee}=ye.adaptiveOrigin||Nh,De=Ce?n:`fixed`,Oe=U.useMemo(()=>{let e=y?{position:De,[Te]:_e,[Ee]:ve}:{position:De,...we};return Ce||(e.opacity=0),e},[y,De,Te,_e,Ee,ve,we,Ce]),ke=U.useRef(null);B(()=>{if(!h)return;let e=A.current,t=typeof e==`function`?e():e,n=(Rh(t)?t.current:t)||null;n!==ke.current&&(he.setPositionReference(n),ke.current=n)},[h,he,k,A]),U.useEffect(()=>{if(!h)return;let e=A.current;typeof e!=`function`&&Rh(e)&&e.current!==ke.current&&(he.setPositionReference(e.current),ke.current=e.current)},[h,he,k,A]),U.useEffect(()=>{if(p&&h&&ge.domReference&&ge.floating)return Vf(ge.domReference,ge.floating,be,me)},[p,h,ge,be,me]);let Ae=ol(xe),je=Fh(r,Ae,M),Me=sl(xe)||`center`,Ne=!!ye.hide?.referenceHidden;B(()=>{b&&h&&Ce&&C(Ae)},[b,h,Ce,Ae]);let Pe=U.useMemo(()=>({position:`absolute`,top:ye.arrow?.y,left:ye.arrow?.x}),[ye.arrow]),Fe=ye.arrow?.centerOffset!==0;return U.useMemo(()=>({positionerStyles:Oe,arrowStyles:Pe,arrowRef:F,arrowUncentered:Fe,side:je,align:Me,physicalSide:Ae,anchorHidden:Ne,refs:he,context:Se,isPositioned:Ce,update:be}),[Oe,Pe,F,Fe,je,Me,Ae,Ne,he,Se,Ce,be])}function Rh(e){return e!=null&&`current`in e}function zh(e){return e===`starting`?xd:jt}function Bh(e,t,{styles:n,transitionStatus:r,props:i,refs:a,hidden:o,inert:s=!1}){let c={...n};return s&&(c.pointerEvents=`none`),Ft(`div`,e,{state:t,ref:a,props:[{role:`presentation`,hidden:o,style:c},zh(r),i],stateAttributesMapping:Vu})}var Vh=U.forwardRef(function(e,t){let{render:n,className:r,anchor:i,positionMethod:a=`absolute`,side:o=`top`,align:s=`center`,sideOffset:c=0,alignOffset:l=0,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d=5,arrowPadding:f=5,sticky:p=!1,disableAnchorTracking:m=!1,collisionAvoidance:h=Cd,style:g,..._}=e,v=lh(),y=Ch(),b=v.useState(`open`),x=v.useState(`mounted`),S=v.useState(`trackCursorAxis`),C=v.useState(`disableHoverablePopup`),w=v.useState(`floatingRootContext`),T=v.useState(`instantType`),E=v.useState(`transitionStatus`),D=Lh({anchor:i,positionMethod:a,floatingRootContext:w,mounted:x,side:o,sideOffset:c,align:s,alignOffset:l,collisionBoundary:u,collisionPadding:d,sticky:p,arrowPadding:f,disableAnchorTracking:m,keepMounted:y,collisionAvoidance:h,adaptiveOrigin:v.useState(`hasViewport`)?Ph:void 0}),O=Bh(e,U.useMemo(()=>({open:b,side:D.side,align:D.align,anchorHidden:D.anchorHidden,instant:S===`none`?T:`tracking-cursor`}),[b,D.side,D.align,D.anchorHidden,S,T]),{styles:D.positionerStyles,transitionStatus:E,props:_,refs:[t,v.useStateSetter(`positionerElement`)],hidden:!x,inert:!b||S===`both`||C});return(0,W.jsx)(Eh.Provider,{value:D,children:O})}),Hh={...Vu,..._u},Uh=U.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,o=lh(),{side:s,align:c}=Dh(),l=o.useState(`open`),u=o.useState(`instantType`),d=o.useState(`transitionStatus`),f=o.useState(`popupProps`),p=o.useState(`floatingRootContext`),m=o.useState(`disabled`),h=o.useState(`closeDelay`);bu({open:l,ref:o.context.popupRef,onComplete(){l&&o.context.onOpenChangeComplete?.(!0)}}),em(p,{enabled:!m,closeDelay:h});let g=o.useStateSetter(`popupElement`);return Ft(`div`,e,{state:{open:l,side:s,align:c,instant:u,transitionStatus:d},ref:[t,o.context.popupRef,g],props:[f,zh(d),a],stateAttributesMapping:Hh})}),Wh=U.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,o=lh(),{arrowRef:s,side:c,align:l,arrowUncentered:u,arrowStyles:d}=Dh();return Ft(`div`,e,{state:{open:o.useState(`open`),side:c,align:l,uncentered:u,instant:o.useState(`instantType`)},ref:[t,s],props:[{style:d,"aria-hidden":!0},a],stateAttributesMapping:Vu})}),Gh=function(e){let{delay:t,closeDelay:n,timeout:r=400}=e,i=U.useMemo(()=>({delay:t,closeDelay:n}),[t,n]),a=U.useMemo(()=>({open:t,close:n}),[t,n]);return(0,W.jsx)(hh.Provider,{value:i,children:(0,W.jsx)(Qu,{delay:a,timeoutMs:r,children:e.children})})};function Kh(e){let t=(0,ms.c)(6),n,r;t[0]===e?(n=t[1],r=t[2]):({delay:r,...n}=e,t[0]=e,t[1]=n,t[2]=r);let i=r===void 0?0:r,a;return t[3]!==i||t[4]!==n?(a=(0,W.jsx)(Gh,{"data-slot":`tooltip-provider`,delay:i,...n}),t[3]=i,t[4]=n,t[5]=a):a=t[5],a}function qh(e){let t=(0,ms.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,W.jsx)(Kh,{children:(0,W.jsx)(ph,{"data-slot":`tooltip`,...n})}),t[2]=n,t[3]=r),r}function Jh(e){let t=(0,ms.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,W.jsx)(xh,{"data-slot":`tooltip-trigger`,...n}),t[2]=n,t[3]=r),r}function Yh(e){let t=(0,ms.c)(21),n,r,i,a,o,s,c;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],c=t[7]):({className:r,side:a,sideOffset:o,align:s,alignOffset:c,children:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=c);let l=a===void 0?`top`:a,u=o===void 0?4:o,d=s===void 0?`center`:s,f=c===void 0?0:c,p;t[8]===r?p=t[9]:(p=rn(`data-open:fade-in-0 data-open:zoom-in-95 data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-closed:fade-out-0 data-closed:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=delayed-open]:animate-in data-closed:animate-out data-open:animate-in z-50 w-fit max-w-xs origin-(--transform-origin) rounded-md bg-foreground px-3 py-1.5 text-xs text-background **:data-[slot=kbd]:rounded-md`,r),t[8]=r,t[9]=p);let m;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,W.jsx)(Wh,{className:`z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground data-[side=bottom]:top-1 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5`}),t[10]=m):m=t[10];let h;t[11]!==n||t[12]!==i||t[13]!==p?(h=(0,W.jsxs)(Uh,{className:p,"data-slot":`tooltip-content`,...i,children:[n,m]}),t[11]=n,t[12]=i,t[13]=p,t[14]=h):h=t[14];let g;return t[15]!==d||t[16]!==f||t[17]!==l||t[18]!==u||t[19]!==h?(g=(0,W.jsx)(Th,{children:(0,W.jsx)(Vh,{align:d,alignOffset:f,className:`isolate z-50`,side:l,sideOffset:u,children:h})}),t[15]=d,t[16]=f,t[17]=l,t[18]=u,t[19]=h,t[20]=g):g=t[20],g}var Xh=window.matchMedia(`(max-width: 767px)`);function Zh(e){return Xh.addEventListener(`change`,e),()=>Xh.removeEventListener(`change`,e)}function Qh(){return Xh.matches}function $h(){return(0,U.useSyncExternalStore)(Zh,Qh)}var eg=`sidebar_state`,tg=3600*24*7,ng=`12rem`,rg=`16rem`,ig=`3rem`,ag=`b`,og=U.createContext(null);function sg(){let e=U.useContext(og);if(!e)throw Error(`useSidebar must be used within a SidebarProvider.`);return e}function cg(e){let t=(0,ms.c)(36),n,r,i,a,o,s,c;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],c=t[7]):({defaultOpen:c,open:i,onOpenChange:o,className:r,style:s,children:n,...a}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=c);let l=c===void 0?!0:c,u=$h(),[d,f]=U.useState(!1),[p,m]=U.useState(l),h=i??p,g;t[8]!==h||t[9]!==o?(g=e=>{let t=typeof e==`function`?e(h):e;o?o(t):m(t),document.cookie=`${eg}=${t}; path=/; max-age=${tg}`},t[8]=h,t[9]=o,t[10]=g):g=t[10];let _=g,v;t[11]!==u||t[12]!==_?(v=()=>u?f(ug):_(lg),t[11]=u,t[12]=_,t[13]=v):v=t[13];let y=v,b,x;t[14]===y?(b=t[15],x=t[16]):(b=()=>{let e=e=>{e.key===ag&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),y())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},x=[y],t[14]=y,t[15]=b,t[16]=x),U.useEffect(b,x);let S=h?`expanded`:`collapsed`,C;t[17]!==u||t[18]!==h||t[19]!==d||t[20]!==_||t[21]!==S||t[22]!==y?(C={state:S,open:h,setOpen:_,isMobile:u,openMobile:d,setOpenMobile:f,toggleSidebar:y},t[17]=u,t[18]=h,t[19]=d,t[20]=_,t[21]=S,t[22]=y,t[23]=C):C=t[23];let w=C,T;t[24]===r?T=t[25]:(T=rn(`group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar`,r),t[24]=r,t[25]=T);let E;t[26]===s?E=t[27]:(E={"--sidebar-width":ng,"--sidebar-width-icon":ig,...s},t[26]=s,t[27]=E);let D=E,O;t[28]!==n||t[29]!==a||t[30]!==T||t[31]!==D?(O=(0,W.jsx)(`div`,{className:T,"data-slot":`sidebar-wrapper`,style:D,...a,children:n}),t[28]=n,t[29]=a,t[30]=T,t[31]=D,t[32]=O):O=t[32];let k;return t[33]!==w||t[34]!==O?(k=(0,W.jsx)(og.Provider,{value:w,children:O}),t[33]=w,t[34]=O,t[35]=k):k=t[35],k}function lg(e){return!e}function ug(e){return!e}function dg(e){let t=(0,ms.c)(46),n,r,i,a,o,s;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6]):({side:a,variant:o,collapsible:s,className:r,children:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s);let c=a===void 0?`left`:a,l=o===void 0?`sidebar`:o,u=s===void 0?`offExamples`:s,{isMobile:d,state:f,openMobile:p,setOpenMobile:m}=sg();if(u===`none`){let e;t[7]===r?e=t[8]:(e=rn(`flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground`,r),t[7]=r,t[8]=e);let a;return t[9]!==n||t[10]!==i||t[11]!==e?(a=(0,W.jsx)(`div`,{className:e,"data-slot":`sidebar`,...i,children:n}),t[9]=n,t[10]=i,t[11]=e,t[12]=a):a=t[12],a}if(d){let e;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(e={"--sidebar-width":rg},t[13]=e):e=t[13];let r=e,a;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,W.jsxs)(ah,{className:`sr-only`,children:[(0,W.jsx)(oh,{children:`Sidebar`}),(0,W.jsx)(sh,{children:`Displays the mobile sidebar.`})]}),t[14]=a):a=t[14];let o;t[15]===n?o=t[16]:(o=(0,W.jsx)(`div`,{className:`flex h-full w-full flex-col`,children:n}),t[15]=n,t[16]=o);let s;t[17]!==c||t[18]!==o?(s=(0,W.jsxs)(ih,{className:`w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden`,"data-mobile":`true`,"data-sidebar":`sidebar`,"data-slot":`sidebar`,side:c,style:r,children:[a,o]}),t[17]=c,t[18]=o,t[19]=s):s=t[19];let l;return t[20]!==p||t[21]!==i||t[22]!==m||t[23]!==s?(l=(0,W.jsx)(th,{onOpenChange:m,open:p,...i,children:s}),t[20]=p,t[21]=i,t[22]=m,t[23]=s,t[24]=l):l=t[24],l}let h=f===`collapsed`?u:``,g=l===`floating`||l===`inset`?`group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon)`,_;t[25]===g?_=t[26]:(_=rn(`relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear`,`group-data-[collapsible=offExamples]:w-0`,`group-data-[side=right]:rotate-180`,g),t[25]=g,t[26]=_);let v;t[27]===_?v=t[28]:(v=(0,W.jsx)(`div`,{className:_,"data-slot":`sidebar-gap`}),t[27]=_,t[28]=v);let y=c===`left`?`left-0 group-data-[collapsible=offExamples]:left-[calc(var(--sidebar-width)*-1)]`:`right-0 group-data-[collapsible=offExamples]:right-[calc(var(--sidebar-width)*-1)]`,b=l===`floating`||l===`inset`?`p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l`,x;t[29]!==r||t[30]!==y||t[31]!==b?(x=rn(`fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex`,y,b,r),t[29]=r,t[30]=y,t[31]=b,t[32]=x):x=t[32];let S;t[33]===n?S=t[34]:(S=(0,W.jsx)(`div`,{className:`flex size-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:shadow-sm group-data-[variant=floating]:ring-1 group-data-[variant=floating]:ring-sidebar-border`,"data-sidebar":`sidebar`,"data-slot":`sidebar-inner`,children:n}),t[33]=n,t[34]=S);let C;t[35]!==i||t[36]!==x||t[37]!==S?(C=(0,W.jsx)(`div`,{className:x,"data-slot":`sidebar-container`,...i,children:S}),t[35]=i,t[36]=x,t[37]=S,t[38]=C):C=t[38];let w;return t[39]!==c||t[40]!==f||t[41]!==C||t[42]!==h||t[43]!==v||t[44]!==l?(w=(0,W.jsxs)(`div`,{className:`group peer hidden text-sidebar-foreground md:block`,"data-collapsible":h,"data-side":c,"data-slot":`sidebar`,"data-state":f,"data-variant":l,children:[v,C]}),t[39]=c,t[40]=f,t[41]=C,t[42]=h,t[43]=v,t[44]=l,t[45]=w):w=t[45],w}function fg(e){let t=(0,ms.c)(15),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,onClick:r,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let{toggleSidebar:a}=sg(),o;t[4]===n?o=t[5]:(o=rn(n),t[4]=n,t[5]=o);let s;t[6]!==r||t[7]!==a?(s=e=>{r?.(e),a()},t[6]=r,t[7]=a,t[8]=s):s=t[8];let c,l;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,W.jsx)(Js,{}),l=(0,W.jsx)(`span`,{className:`sr-only`,children:`Toggle Sidebar`}),t[9]=c,t[10]=l):(c=t[9],l=t[10]);let u;return t[11]!==i||t[12]!==o||t[13]!==s?(u=(0,W.jsxs)(ar,{className:o,"data-sidebar":`trigger`,"data-slot":`sidebar-trigger`,onClick:s,size:`icon-lg`,variant:`ghost`,...i,children:[c,l]}),t[11]=i,t[12]=o,t[13]=s,t[14]=u):u=t[14],u}function pg(e){let t=(0,ms.c)(9),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let{toggleSidebar:i}=sg(),a;t[3]===n?a=t[4]:(a=rn(`absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border sm:flex`,`in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize`,`[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize`,`group-data-[collapsible=offExamples]:translate-x-0 group-data-[collapsible=offExamples]:after:left-full hover:group-data-[collapsible=offExamples]:bg-sidebar`,`[[data-side=left][data-collapsible=offExamples]_&]:-right-2`,`[[data-side=right][data-collapsible=offExamples]_&]:-left-2`,n),t[3]=n,t[4]=a);let o;return t[5]!==r||t[6]!==a||t[7]!==i?(o=(0,W.jsx)(`button`,{"aria-label":`Toggle Sidebar`,className:a,"data-sidebar":`rail`,"data-slot":`sidebar-rail`,onClick:i,tabIndex:-1,title:`Toggle Sidebar`,...r}),t[5]=r,t[6]=a,t[7]=i,t[8]=o):o=t[8],o}function mg(e){let t=(0,ms.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=rn(`flex flex-col gap-2 p-2`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,W.jsx)(`div`,{className:i,"data-sidebar":`header`,"data-slot":`sidebar-header`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function hg(e){let t=(0,ms.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=rn(`flex flex-col gap-2 p-2`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,W.jsx)(`div`,{className:i,"data-sidebar":`footer`,"data-slot":`sidebar-footer`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function gg(e){let t=(0,ms.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=rn(`mx-2 w-auto bg-sidebar-border`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,W.jsx)(Ou,{className:i,"data-sidebar":`separator`,"data-slot":`sidebar-separator`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function _g(e){let t=(0,ms.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=rn(`no-scrollbar flex min-h-0 flex-1 flex-col gap-0 overflow-auto group-data-[collapsible=icon]:overflow-hidden`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,W.jsx)(`div`,{className:i,"data-sidebar":`content`,"data-slot":`sidebar-content`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function vg(e){let t=(0,ms.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=rn(`relative flex w-full min-w-0 flex-col px-2 py-1`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,W.jsx)(`div`,{className:i,"data-sidebar":`group`,"data-slot":`sidebar-group`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function yg(e){let t=(0,ms.c)(10),n,r,i,a;if(t[0]!==e){let{className:o,render:s,...c}=e;n=s,a=ys,r=`div`,i=Nt({className:rn(`flex h-8 shrink-0 items-center rounded-md px-2 text-xs text-sidebar-foreground/70 ring-sidebar-ring outline-hidden transition-[margin,opacity] duration-200 ease-linear group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0 focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0`,o)},c),t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a}else n=t[1],r=t[2],i=t[3],a=t[4];let o;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(o={slot:`sidebar-group-label`,sidebar:`group-label`},t[5]=o):o=t[5];let s;return t[6]!==n||t[7]!==r||t[8]!==i?(s={defaultTagName:r,props:i,render:n,state:o},t[6]=n,t[7]=r,t[8]=i,t[9]=s):s=t[9],a(s)}function bg(e){let t=(0,ms.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=rn(`flex w-full min-w-0 flex-col gap-px`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,W.jsx)(`ul`,{className:i,"data-sidebar":`menu`,"data-slot":`sidebar-menu`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function xg(e){let t=(0,ms.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=rn(`group/menu-item relative`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,W.jsx)(`li`,{className:i,"data-sidebar":`menu-item`,"data-slot":`sidebar-menu-item`,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}var Sg=Rt(`peer/menu-button group/menu-button flex w-full items-center gap-2 overflow-hidden rounded-[calc(var(--radius-sm)+2px)] p-2 text-left text-xs ring-sidebar-ring outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-active:bg-sidebar-accent data-active:font-medium data-active:text-sidebar-accent-foreground data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate`,{variants:{variant:{default:`hover:bg-sidebar-accent hover:text-sidebar-accent-foreground`,outline:`bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]`},size:{default:`h-8 text-xs`,sm:`h-7 text-xs`,lg:`h-12 text-xs group-data-[collapsible=icon]:p-0!`}},defaultVariants:{variant:`default`,size:`default`}});function Cg(e){let t=(0,ms.c)(15),{render:n,isActive:r,variant:i,size:a,tooltip:o,className:s,...c}=e,l=r===void 0?!1:r,u=i===void 0?`default`:i,d=a===void 0?`default`:a,{isMobile:f,state:p}=sg(),m=Nt({className:rn(Sg({variant:u,size:d}),s)},c),h=o?Jh:n,g;t[0]!==l||t[1]!==d?(g={slot:`sidebar-menu-button`,sidebar:`menu-button`,size:d,active:l},t[0]=l,t[1]=d,t[2]=g):g=t[2];let _;t[3]!==m||t[4]!==h||t[5]!==g?(_={defaultTagName:`button`,props:m,render:h,state:g},t[3]=m,t[4]=h,t[5]=g,t[6]=_):_=t[6];let v=ys(_);if(!o)return v;let y;t[7]===o?y=t[8]:(y=typeof o==`string`?{children:o}:o,t[7]=o,t[8]=y);let b=y,x=p!==`collapsed`||f,S;t[9]!==x||t[10]!==b?(S=(0,W.jsx)(Yh,{align:`center`,hidden:x,side:`right`,...b}),t[9]=x,t[10]=b,t[11]=S):S=t[11];let C;return t[12]!==v||t[13]!==S?(C=(0,W.jsxs)(qh,{children:[v,S]}),t[12]=v,t[13]=S,t[14]=C):C=t[14],C}var wg=class{async sign(e,t,n){return e}},Tg=`ref`,Eg=-1,Dg=!0,Og=`isSet`,kg=`PartitionResult`,Ag=`booleanEquals`,jg=`stringEquals`,Mg=`getAttr`,Ng=`us-east-1`,Pg=`sigv4`,Fg=`sts`,Ig=`https://sts.{Region}.{PartitionResult#dnsSuffix}`,Lg={[Tg]:`Endpoint`},Rg={[Tg]:`Region`},zg={[Tg]:kg},Bg={},Vg=[Rg],Hg={conditions:[[Og,[Lg]],[Og,Vg],[`aws.partition`,Vg,kg],[Ag,[{[Tg]:`UseFIPS`},Dg]],[Ag,[{[Tg]:`UseDualStack`},Dg]],[jg,[Rg,`aws-global`]],[Ag,[{[Tg]:`UseGlobalEndpoint`},Dg]],[jg,[Rg,`eu-central-1`]],[Ag,[{fn:Mg,argv:[zg,`supportsDualStack`]},Dg]],[Ag,[{fn:Mg,argv:[zg,`supportsFIPS`]},Dg]],[jg,[Rg,`ap-south-1`]],[jg,[Rg,`eu-north-1`]],[jg,[Rg,`eu-west-1`]],[jg,[Rg,`eu-west-2`]],[jg,[Rg,`eu-west-3`]],[jg,[Rg,`sa-east-1`]],[jg,[Rg,Ng]],[jg,[Rg,`us-east-2`]],[jg,[Rg,`us-west-2`]],[jg,[Rg,`us-west-1`]],[jg,[Rg,`ca-central-1`]],[jg,[Rg,`ap-southeast-1`]],[jg,[Rg,`ap-northeast-1`]],[jg,[Rg,`ap-southeast-2`]],[jg,[{fn:Mg,argv:[zg,`name`]},`aws-us-gov`]]],results:[[Eg],[`https://sts.amazonaws.com`,{authSchemes:[{name:Pg,signingName:Fg,signingRegion:Ng}]}],[Ig,{authSchemes:[{name:Pg,signingName:Fg,signingRegion:`{Region}`}]}],[Eg,`Invalid Configuration: FIPS and custom endpoint are not supported`],[Eg,`Invalid Configuration: Dualstack and custom endpoint are not supported`],[Lg,Bg],[`https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}`,Bg],[Eg,`FIPS and DualStack are enabled, but this partition does not support one or both`],[`https://sts.{Region}.amazonaws.com`,Bg],[`https://sts-fips.{Region}.{PartitionResult#dnsSuffix}`,Bg],[Eg,`FIPS is enabled but this partition does not support FIPS`],[`https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}`,Bg],[Eg,`DualStack is enabled but this partition does not support DualStack`],[Ig,Bg],[Eg,`Invalid Configuration: Missing Region`]]},Ug=2,Wg=new Int32Array([-1,1,-1,0,30,3,1,4,100000014,2,5,100000014,3,25,6,4,24,7,5,100000001,8,6,9,100000013,7,100000001,10,10,100000001,11,11,100000001,12,12,100000001,13,13,100000001,14,14,100000001,15,15,100000001,16,16,100000001,17,17,100000001,18,18,100000001,19,19,100000001,20,20,100000001,21,21,100000001,22,22,100000001,23,23,100000001,100000002,8,100000011,100000012,4,28,26,9,27,100000010,24,100000008,100000009,8,29,100000007,9,100000006,100000007,3,100000003,31,4,100000004,100000005]),Gg=On.from(Wg,Ug,Hg.conditions,Hg.results),Kg=new Nn({size:50,params:[`Endpoint`,`Region`,`UseDualStack`,`UseFIPS`,`UseGlobalEndpoint`]}),qg=(e,t={})=>Kg.get(e,()=>Tn(Gg,{endpointParams:e,logger:t.logger}));Fn.aws=Jt;var Jg=(e=>async(t,n,r)=>{if(!r)throw Error("Could not find `input` for `defaultEndpointRuleSetHttpAuthSchemeParametersProvider`");let i=await e(t,n,r),a=Yt(n)?.commandInstance?.constructor?.getEndpointParameterInstructions;if(!a)throw Error(`getEndpointParameterInstructions() is not defined on '${n.commandName}'`);let o=await Dn(r,{getEndpointParameterInstructions:a},t);return Object.assign(i,o)})(async(e,t,n)=>({operation:Yt(t).operation,region:await on(e.region)()||(()=>{throw Error("expected `region` to be configured for `aws.auth#sigv4`")})()}));function Yg(e){return{schemeId:`aws.auth#sigv4`,signingProperties:{name:`sts`,region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}function Xg(e){return{schemeId:`aws.auth#sigv4a`,signingProperties:{name:`sts`,region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}function Zg(e){return{schemeId:`smithy.api#noAuth`}}var Qg=((e,t,n)=>r=>{let i=e(r).properties?.authSchemes;if(!i)return t(r);let a=[];for(let e of i){let{name:t,properties:o={},...s}=e,c=t.toLowerCase();t!==c&&console.warn(`HttpAuthScheme has been normalized with lowercasing: '${t}' to '${c}'`);let l;if(c===`sigv4a`){l=`aws.auth#sigv4a`;let e=i.find(e=>{let t=e.name.toLowerCase();return t!==`sigv4a`&&t.startsWith(`sigv4`)});if(gn.sigv4aDependency()===`none`&&e)continue}else if(c.startsWith(`sigv4`))l=`aws.auth#sigv4`;else throw Error(`Unknown HttpAuthScheme found in '@smithy.rules#endpointRuleSet': '${c}'`);let u=n[l];if(!u)throw Error(`Could not find HttpAuthOption create function for '${l}'`);let d=u(r);d.schemeId=l,d.signingProperties={...d.signingProperties||{},...s,...o},a.push(d)}return a})(qg,e=>{let t=[];switch(e.operation){case`AssumeRoleWithSAML`:t.push(Zg(e)),t.push(Xg(e));break;case`AssumeRoleWithWebIdentity`:t.push(Zg(e)),t.push(Xg(e));break;default:t.push(Yg(e)),t.push(Xg(e))}return t},{"aws.auth#sigv4":Yg,"aws.auth#sigv4a":Xg,"smithy.api#noAuth":Zg}),$g=e=>{let t=cn(Kt(e));return Object.assign(t,{authSchemePreference:on(e.authSchemePreference??[])})},e_=e=>Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,useGlobalEndpoint:e.useGlobalEndpoint??!1,defaultSigningName:`sts`}),t_={UseGlobalEndpoint:{type:`builtInParams`,name:`useGlobalEndpoint`},UseFIPS:{type:`builtInParams`,name:`useFipsEndpoint`},Endpoint:{type:`builtInParams`,name:`endpoint`},Region:{type:`builtInParams`,name:`region`},UseDualStack:{type:`builtInParams`,name:`useDualstackEndpoint`}},n_={name:`@aws-sdk/client-sts`,description:`AWS SDK for JavaScript Sts Client for Node.js, Browser and React Native`,version:`3.1067.0`,scripts:{build:`concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs`,"build:cjs":`node ../../scripts/compilation/inline`,"build:es":`tsc -p tsconfig.es.json`,"build:include:deps":`yarn g:turbo run build -F="$npm_package_name"`,"build:types":`premove ./dist-types tsconfig.types.tsbuildinfo && tsc -p tsconfig.types.json`,"build:types:downlevel":`downlevel-dts dist-types dist-types/ts3.4`,clean:`premove dist-cjs dist-es dist-types tsconfig.cjs.tsbuildinfo tsconfig.es.tsbuildinfo tsconfig.types.tsbuildinfo`,"extract:docs":`api-extractor run --local`,"generate:client":`node ../../scripts/generate-clients/single-service --solo sts`,test:`yarn g:vitest run`,"test:e2e":`yarn g:vitest run -c vitest.config.e2e.mts --mode development`,"test:e2e:watch":`yarn g:vitest watch -c vitest.config.e2e.mts`,"test:index":`tsc --noEmit ./test/index-types.ts && node ./test/index-objects.spec.mjs`,"test:integration":`yarn g:vitest run --passWithNoTests -c vitest.config.integ.mts`,"test:integration:watch":`yarn g:vitest run --passWithNoTests -c vitest.config.integ.mts`,"test:watch":`yarn g:vitest watch`},main:`./dist-cjs/index.js`,types:`./dist-types/index.d.ts`,module:`./dist-es/index.js`,sideEffects:!1,dependencies:{"@aws-crypto/sha256-browser":`5.2.0`,"@aws-crypto/sha256-js":`5.2.0`,"@aws-sdk/core":`^3.974.20`,"@aws-sdk/credential-provider-node":`^3.972.55`,"@aws-sdk/signature-v4-multi-region":`^3.996.34`,"@aws-sdk/types":`^3.973.12`,"@smithy/core":`^3.24.6`,"@smithy/fetch-http-handler":`^5.4.6`,"@smithy/node-http-handler":`^4.7.6`,"@smithy/types":`^4.14.3`,tslib:`^2.6.2`},devDependencies:{"@smithy/snapshot-testing":`^2.1.7`,"@tsconfig/node20":`20.1.8`,"@types/node":`^20.14.8`,concurrently:`7.0.0`,"downlevel-dts":`0.10.1`,premove:`4.0.0`,typescript:`~5.8.3`,vitest:`^4.0.17`},engines:{node:`>=20.0.0`},typesVersions:{"<4.5":{"dist-types/*":[`dist-types/ts3.4/*`]}},files:[`dist-*/**`],author:{name:`AWS SDK for JavaScript Team`,url:`https://aws.amazon.com/sdk-for-javascript/`},license:`Apache-2.0`,browser:{"./dist-es/runtimeConfig":`./dist-es/runtimeConfig.browser`},"react-native":{"./dist-es/runtimeConfig":`./dist-es/runtimeConfig.native`},homepage:`https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sts`,repository:{type:`git`,url:`https://github.com/aws/aws-sdk-js-v3.git`,directory:`clients/client-sts`}},r_=class e extends zn{constructor(t){super(t),Object.setPrototypeOf(this,e.prototype)}},i_=class e extends r_{name=`ExpiredTokenException`;$fault=`client`;constructor(t){super({name:`ExpiredTokenException`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype)}},a_=class e extends r_{name=`MalformedPolicyDocumentException`;$fault=`client`;constructor(t){super({name:`MalformedPolicyDocumentException`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype)}},o_=class e extends r_{name=`PackedPolicyTooLargeException`;$fault=`client`;constructor(t){super({name:`PackedPolicyTooLargeException`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype)}},s_=class e extends r_{name=`RegionDisabledException`;$fault=`client`;constructor(t){super({name:`RegionDisabledException`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype)}},c_=class e extends r_{name=`IDPRejectedClaimException`;$fault=`client`;constructor(t){super({name:`IDPRejectedClaimException`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype)}},l_=class e extends r_{name=`InvalidIdentityTokenException`;$fault=`client`;constructor(t){super({name:`InvalidIdentityTokenException`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype)}},u_=class e extends r_{name=`IDPCommunicationErrorException`;$fault=`client`;$retryable={};constructor(t){super({name:`IDPCommunicationErrorException`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype)}},d_=class e extends r_{name=`InvalidAuthorizationMessageException`;$fault=`client`;constructor(t){super({name:`InvalidAuthorizationMessageException`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype)}},f_=class e extends r_{name=`ExpiredTradeInTokenException`;$fault=`client`;constructor(t){super({name:`ExpiredTradeInTokenException`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype)}},p_=class e extends r_{name=`JWTPayloadSizeExceededException`;$fault=`client`;constructor(t){super({name:`JWTPayloadSizeExceededException`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype)}},m_=class e extends r_{name=`OutboundWebIdentityFederationDisabledException`;$fault=`client`;constructor(t){super({name:`OutboundWebIdentityFederationDisabledException`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype)}},h_=class e extends r_{name=`SessionDurationEscalationException`;$fault=`client`;constructor(t){super({name:`SessionDurationEscalationException`,$fault:`client`,...t}),Object.setPrototypeOf(this,e.prototype)}},g_=`Arn`,__=`AccessKeyId`,v_=`Account`,y_=`Credentials`,b_=`DurationSeconds`,x_=`Expiration`,S_=`ExpiredTokenException`,C_=`ExpiredTradeInTokenException`,w_=`GetCallerIdentity`,T_=`GetCallerIdentityRequest`,E_=`GetCallerIdentityResponse`,D_=`GetSessionToken`,O_=`GetSessionTokenRequest`,k_=`GetSessionTokenResponse`,A_=`InvalidAuthorizationMessageException`,j_=`IDPCommunicationErrorException`,M_=`IDPRejectedClaimException`,N_=`InvalidIdentityTokenException`,P_=`JWTPayloadSizeExceededException`,F_=`MalformedPolicyDocumentException`,I_=`OutboundWebIdentityFederationDisabledException`,L_=`PackedPolicyTooLargeException`,R_=`RegionDisabledException`,z_=`SecretAccessKey`,B_=`SessionDurationEscalationException`,V_=`SerialNumber`,H_=`SessionToken`,U_=`TokenCode`,W_=`UserId`,G_=`accessKeySecretType`,K_=`awsQueryError`,q_=`client`,J_=`error`,Y_=`httpError`,X_=`message`,Z_=`smithy.ts.sdk.synthetic.com.amazonaws.sts`,Q_=`com.amazonaws.sts`,$_=Wt.for(Z_),ev=[-3,Z_,`STSServiceException`,0,[],[]];$_.registerError(ev,r_);var tv=Wt.for(Q_),nv=[-3,Q_,S_,{[K_]:[`ExpiredTokenException`,400],[J_]:q_,[Y_]:400},[X_],[0]];tv.registerError(nv,i_);var rv=[-3,Q_,C_,{[K_]:[`ExpiredTradeInTokenException`,400],[J_]:q_,[Y_]:400},[X_],[0]];tv.registerError(rv,f_);var iv=[-3,Q_,j_,{[K_]:[`IDPCommunicationError`,400],[J_]:q_,[Y_]:400},[X_],[0]];tv.registerError(iv,u_);var av=[-3,Q_,M_,{[K_]:[`IDPRejectedClaim`,403],[J_]:q_,[Y_]:403},[X_],[0]];tv.registerError(av,c_);var ov=[-3,Q_,A_,{[K_]:[`InvalidAuthorizationMessageException`,400],[J_]:q_,[Y_]:400},[X_],[0]];tv.registerError(ov,d_);var sv=[-3,Q_,N_,{[K_]:[`InvalidIdentityToken`,400],[J_]:q_,[Y_]:400},[X_],[0]];tv.registerError(sv,l_);var cv=[-3,Q_,P_,{[K_]:[`JWTPayloadSizeExceededException`,400],[J_]:q_,[Y_]:400},[X_],[0]];tv.registerError(cv,p_);var lv=[-3,Q_,F_,{[K_]:[`MalformedPolicyDocument`,400],[J_]:q_,[Y_]:400},[X_],[0]];tv.registerError(lv,a_);var uv=[-3,Q_,I_,{[K_]:[`OutboundWebIdentityFederationDisabledException`,403],[J_]:q_,[Y_]:403},[X_],[0]];tv.registerError(uv,m_);var dv=[-3,Q_,L_,{[K_]:[`PackedPolicyTooLarge`,400],[J_]:q_,[Y_]:400},[X_],[0]];tv.registerError(dv,o_);var fv=[-3,Q_,R_,{[K_]:[`RegionDisabledException`,403],[J_]:q_,[Y_]:403},[X_],[0]];tv.registerError(fv,s_);var pv=[-3,Q_,B_,{[K_]:[`SessionDurationEscalationException`,403],[J_]:q_,[Y_]:403},[X_],[0]];tv.registerError(pv,h_);var mv=[$_,tv],hv=[0,Q_,G_,8,0],gv=[3,Q_,y_,0,[__,z_,H_,x_],[0,[()=>hv,0],0,4],4],_v=[3,Q_,T_,0,[],[]],vv=[3,Q_,E_,0,[W_,v_,g_],[0,0,0]],yv=[3,Q_,O_,0,[b_,V_,U_],[1,0,0]],bv=[3,Q_,k_,0,[y_],[[()=>gv,0]]],xv=[9,Q_,w_,0,()=>_v,()=>vv],Sv=[9,Q_,D_,0,()=>yv,()=>bv],Cv=e=>({apiVersion:`2011-06-15`,base64Decoder:e?.base64Decoder??Dr,base64Encoder:e?.base64Encoder??kr,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??qg,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??Qg,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:`aws.auth#sigv4`,identityProvider:e=>e.getIdentityProvider(`aws.auth#sigv4`),signer:new Vt},{schemeId:`aws.auth#sigv4a`,identityProvider:e=>e.getIdentityProvider(`aws.auth#sigv4a`),signer:new jn},{schemeId:`smithy.api#noAuth`,identityProvider:e=>e.getIdentityProvider(`smithy.api#noAuth`)||(async()=>({})),signer:new wg}],logger:e?.logger??new xn,protocol:e?.protocol??En,protocolSettings:e?.protocolSettings??{defaultNamespace:`com.amazonaws.sts`,errorTypeRegistries:mv,xmlNamespace:`https://sts.amazonaws.com/doc/2011-06-15/`,version:`2011-06-15`,serviceTarget:`AWSSecurityTokenServiceV20110615`},serviceId:e?.serviceId??`STS`,signerConstructor:e?.signerConstructor??gn,urlParser:e?.urlParser??An,utf8Decoder:e?.utf8Decoder??Er,utf8Encoder:e?.utf8Encoder??Or}),wv=e=>{let t=sn(e),n=()=>t().then(Sn),r=Cv(e);return{...r,...e,runtime:`browser`,defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??Ar,credentialDefaultProvider:e?.credentialDefaultProvider??(e=>()=>Promise.reject(Error(`Credential is missing`))),defaultUserAgentProvider:e?.defaultUserAgentProvider??Qt({serviceId:r.serviceId,clientVersion:n_.version}),maxAttempts:e?.maxAttempts??3,region:e?.region??Mn(`Region is missing`),requestHandler:hn.create(e?.requestHandler??n),retryMode:e?.retryMode??(async()=>(await n()).retryMode||yn),sha256:e?.sha256??Ut,streamCollector:e?.streamCollector??Rn,useDualstackEndpoint:e?.useDualstackEndpoint??(()=>Promise.resolve(!1)),useFipsEndpoint:e?.useFipsEndpoint??(()=>Promise.resolve(!1))}},Tv=e=>{let t=e.httpAuthSchemes,n=e.httpAuthSchemeProvider,r=e.credentials;return{setHttpAuthScheme(e){let n=t.findIndex(t=>t.schemeId===e.schemeId);n===-1?t.push(e):t.splice(n,1,e)},httpAuthSchemes(){return t},setHttpAuthSchemeProvider(e){n=e},httpAuthSchemeProvider(){return n},setCredentials(e){r=e},credentials(){return r}}},Ev=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}),Dv=(e,t)=>{let n=Object.assign(kn(e),Ln(e),Bt(e),Tv(e));return t.forEach(e=>e.configure(n)),Object.assign(e,an(n),Bn(n),wn(n),Ev(n))},Ov=class extends ln{config;constructor(...[e]){let t=wv(e||{});super(t),this.initConfig=t;let n=Dv($g(Cn(tn(un(bn(pn(e_(t))))))),e?.extensions||[]);this.config=n,this.middlewareStack.use(qt(this.config)),this.middlewareStack.use(nn(this.config)),this.middlewareStack.use(en(this.config)),this.middlewareStack.use(fn(this.config)),this.middlewareStack.use(Xt(this.config)),this.middlewareStack.use(vn(this.config)),this.middlewareStack.use(_n(this.config)),this.middlewareStack.use(Zt(this.config,{httpAuthSchemeParametersProvider:Jg,identityProviderConfigProvider:async e=>new Vn({"aws.auth#sigv4":e.credentials,"aws.auth#sigv4a":e.credentials})})),this.middlewareStack.use(Ht(this.config))}destroy(){super.destroy()}},kv=class extends L.classBuilder().ep(t_).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions())]}).s(`AWSSecurityTokenServiceV20110615`,`GetCallerIdentity`,{}).n(`STSClient`,`GetCallerIdentityCommand`).sc(xv).build(){},Av=class extends L.classBuilder().ep(t_).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions())]}).s(`AWSSecurityTokenServiceV20110615`,`GetSessionToken`,{}).n(`STSClient`,`GetSessionTokenCommand`).sc(Sv).build(){},jv=`ap-southeast-2`,Mv=9999,Nv=class extends Error{status;constructor(e,t,n){super(e),this.name=t,this.status=n}};function Pv(e,t){let n=`<${t}>`,r=``,i=e.indexOf(n);if(i===-1)return null;let a=e.indexOf(r,i+n.length);return a===-1?null:e.slice(i+n.length,a)}async function Fv({action:e,credentials:t,service:n=`spinifex`}){let r=window.location.protocol.replace(`:`,``),i=`Action=${e}`,a=new dn({method:`POST`,protocol:r,hostname:`localhost`,port:Mv,path:`/`,headers:{host:`localhost:${Mv}`,"content-type":`application/x-www-form-urlencoded`},body:i}),o=await new Gt({credentials:{accessKeyId:t.accessKeyId,secretAccessKey:t.secretAccessKey,sessionToken:t.sessionToken},region:jv,service:n,sha256:Ut}).sign(a),s={};for(let[e,t]of Object.entries(o.headers))typeof t==`string`&&(s[e]=t);let c=`${window.location.protocol}//${window.location.host}/proxy/awsgw/`,l=await fetch(c,{method:`POST`,headers:s,body:i});if(!l.ok){let t=await l.text().catch(()=>``),n=Pv(t,`Code`),r=Pv(t,`Message`)??t;throw new Nv(`${e} failed: ${l.status}${r?` - ${r}`:``}`,n??`SignedFetchError`,l.status)}return await l.json()}var Iv=`ap-southeast-2`,Lv=`${window.location.protocol}//localhost:9999`,Rv=43200;function zv(e){e.middlewareStack.add(e=>async t=>(dn.isInstance(t.request)&&(t.request.hostname=window.location.hostname,t.request.port=Number(window.location.port)||443,t.request.path=`/proxy/awsgw${t.request.path}`),await e(t)),{step:`finalizeRequest`,name:`proxyRewrite`,override:!0})}function Bv(e){let t=new Ov({endpoint:Lv,region:Iv,credentials:e});return zv(t),t}function Vv(){let e=In();if(!e)throw Error(`AWS credentials not configured`);return Bv({accessKeyId:e.accessKeyId,secretAccessKey:e.secretAccessKey,sessionToken:e.sessionToken})}async function Hv(e){let t=(await Bv(e).send(new Av({DurationSeconds:Rv}))).Credentials;if(!t?.AccessKeyId||!t.SecretAccessKey||!t.SessionToken||!t.Expiration)throw Error(`GetSessionToken returned incomplete credentials`);return{accessKeyId:t.AccessKeyId,secretAccessKey:t.SecretAccessKey,sessionToken:t.SessionToken,expiration:t.Expiration.toISOString()}}var Uv=`000000000001`;function Wv(e){let t=e?.indexOf(`:user/`)??-1;return t===-1||e===void 0?null:e.slice(t+6)||null}var Gv=(0,U.createContext)(void 0);function Kv({children:e}){let[t,n]=(0,U.useState)({isAdmin:!1,accountId:null,userName:null,version:null,license:null,loading:!0});return(0,U.useEffect)(()=>{async function e(){let e=In();if(!e){n(e=>({...e,loading:!1}));return}try{let t=await Vv().send(new kv({})),r=t.Account??null,i=r===Uv,a=null;if(i)try{a=await Fv({action:`GetVersion`,credentials:e})}catch{}n({isAdmin:i,accountId:r,userName:Wv(t.Arn),version:a,license:a?.license??null,loading:!1})}catch{n(e=>({...e,loading:!1}))}}e()},[]),(0,W.jsx)(Gv,{value:t,children:e})}function qv(){let e=(0,U.useContext)(Gv);if(e===void 0)throw Error(`useAdmin must be used within an AdminProvider`);return e}var Jv=new Set([`InvalidClientTokenId`,`SignatureDoesNotMatch`,`AuthFailure`,`MissingAuthenticationToken`,`IncompleteSignature`,`UnrecognizedClientException`,`ExpiredToken`,`ExpiredTokenException`,`InvalidAccessKeyId`]);function Yv(e){if(typeof e!=`object`||!e||!(`name`in e))return!1;let{name:t}=e;return typeof t==`string`&&Jv.has(t)}var Xv=class extends L.classBuilder().ep(Qe).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions())]}).s(`CertificateManager`,`ListCertificates`,{}).n(`ACMClient`,`ListCertificatesCommand`).sc(at).build(){},Zv=class extends L.classBuilder().ep(ft).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DescribeAddresses`,{}).n(`EC2Client`,`DescribeAddressesCommand`).sc(Pe).build(){},Qv=class extends L.classBuilder().ep(ft).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DescribeAvailabilityZones`,{}).n(`EC2Client`,`DescribeAvailabilityZonesCommand`).sc(Fe).build(){},$v=class extends L.classBuilder().ep(ft).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DescribeIamInstanceProfileAssociations`,{}).n(`EC2Client`,`DescribeIamInstanceProfileAssociationsCommand`).sc(ye).build(){},ey=class extends L.classBuilder().ep(ft).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DescribeImages`,{}).n(`EC2Client`,`DescribeImagesCommand`).sc(Ee).build(){},ty=class extends L.classBuilder().ep(ft).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DescribeInstances`,{}).n(`EC2Client`,`DescribeInstancesCommand`).sc(Le).build(){},ny=class extends L.classBuilder().ep(ft).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DescribeInstanceTypes`,{}).n(`EC2Client`,`DescribeInstanceTypesCommand`).sc(Ne).build(){},ry=class extends L.classBuilder().ep(ft).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DescribeInternetGateways`,{}).n(`EC2Client`,`DescribeInternetGatewaysCommand`).sc(kt).build(){},iy=class extends L.classBuilder().ep(ft).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DescribeKeyPairs`,{}).n(`EC2Client`,`DescribeKeyPairsCommand`).sc(_e).build(){},ay=class extends L.classBuilder().ep(ft).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DescribeNatGateways`,{}).n(`EC2Client`,`DescribeNatGatewaysCommand`).sc(He).build(){},oy=class extends L.classBuilder().ep(ft).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DescribePlacementGroups`,{}).n(`EC2Client`,`DescribePlacementGroupsCommand`).sc(we).build(){},sy=class extends L.classBuilder().ep(ft).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DescribeRegions`,{}).n(`EC2Client`,`DescribeRegionsCommand`).sc(ze).build(){},cy=class extends L.classBuilder().ep(ft).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DescribeRouteTables`,{}).n(`EC2Client`,`DescribeRouteTablesCommand`).sc(Ge).build(){},ly=class extends L.classBuilder().ep(ft).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DescribeSecurityGroups`,{}).n(`EC2Client`,`DescribeSecurityGroupsCommand`).sc(xe).build(){},uy=class extends L.classBuilder().ep(ft).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DescribeSnapshots`,{}).n(`EC2Client`,`DescribeSnapshotsCommand`).sc(je).build(){},dy=class extends L.classBuilder().ep(ft).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DescribeSubnets`,{}).n(`EC2Client`,`DescribeSubnetsCommand`).sc(vt).build(){},fy=class extends L.classBuilder().ep(ft).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DescribeVolumes`,{}).n(`EC2Client`,`DescribeVolumesCommand`).sc(Oe).build(){},py=class extends L.classBuilder().ep(ft).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DescribeVpcs`,{}).n(`EC2Client`,`DescribeVpcsCommand`).sc(Ye).build(){},my=class extends L.classBuilder().ep(rt).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions())]}).s(`AWSWesleyFrontend`,`DescribeAccessEntry`,{}).n(`EKSClient`,`DescribeAccessEntryCommand`).sc(At).build(){},hy=class extends L.classBuilder().ep(rt).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions())]}).s(`AWSWesleyFrontend`,`DescribeAddon`,{}).n(`EKSClient`,`DescribeAddonCommand`).sc(ve).build(){},gy=class extends L.classBuilder().ep(rt).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions())]}).s(`AWSWesleyFrontend`,`DescribeAddonVersions`,{}).n(`EKSClient`,`DescribeAddonVersionsCommand`).sc(Ue).build(){},_y=class extends L.classBuilder().ep(rt).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions())]}).s(`AWSWesleyFrontend`,`DescribeCluster`,{}).n(`EKSClient`,`DescribeClusterCommand`).sc(Te).build(){},vy=class extends L.classBuilder().ep(rt).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions())]}).s(`AWSWesleyFrontend`,`DescribeNodegroup`,{}).n(`EKSClient`,`DescribeNodegroupCommand`).sc(Be).build(){},yy=class extends L.classBuilder().ep(rt).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions())]}).s(`AWSWesleyFrontend`,`ListAccessEntries`,{}).n(`EKSClient`,`ListAccessEntriesCommand`).sc(Se).build(){},by=class extends L.classBuilder().ep(rt).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions())]}).s(`AWSWesleyFrontend`,`ListAccessPolicies`,{}).n(`EKSClient`,`ListAccessPoliciesCommand`).sc(Me).build(){},xy=class extends L.classBuilder().ep(rt).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions())]}).s(`AWSWesleyFrontend`,`ListAddons`,{}).n(`EKSClient`,`ListAddonsCommand`).sc(yt).build(){},Sy=class extends L.classBuilder().ep(rt).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions())]}).s(`AWSWesleyFrontend`,`ListAssociatedAccessPolicies`,{}).n(`EKSClient`,`ListAssociatedAccessPoliciesCommand`).sc(ke).build(){},Cy=class extends L.classBuilder().ep(rt).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions())]}).s(`AWSWesleyFrontend`,`ListClusters`,{}).n(`EKSClient`,`ListClustersCommand`).sc(Xe).build(){},wy=class extends L.classBuilder().ep(rt).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions())]}).s(`AWSWesleyFrontend`,`ListNodegroups`,{}).n(`EKSClient`,`ListNodegroupsCommand`).sc(qe).build(){},Ty=class extends L.classBuilder().ep(ut).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions())]}).s(`ElasticLoadBalancing_v10`,`DescribeListeners`,{}).n(`ElasticLoadBalancingV2Client`,`DescribeListenersCommand`).sc(it).build(){},Ey=class extends L.classBuilder().ep(ut).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions())]}).s(`ElasticLoadBalancing_v10`,`DescribeLoadBalancerAttributes`,{}).n(`ElasticLoadBalancingV2Client`,`DescribeLoadBalancerAttributesCommand`).sc(gt).build(){},Dy=class extends L.classBuilder().ep(ut).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions())]}).s(`ElasticLoadBalancing_v10`,`DescribeLoadBalancers`,{}).n(`ElasticLoadBalancingV2Client`,`DescribeLoadBalancersCommand`).sc(pt).build(){},Oy=class extends L.classBuilder().ep(ut).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions())]}).s(`ElasticLoadBalancing_v10`,`DescribeRules`,{}).n(`ElasticLoadBalancingV2Client`,`DescribeRulesCommand`).sc(ct).build(){},ky=class extends L.classBuilder().ep(ut).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions())]}).s(`ElasticLoadBalancing_v10`,`DescribeSSLPolicies`,{}).n(`ElasticLoadBalancingV2Client`,`DescribeSSLPoliciesCommand`).sc(ot).build(){},Ay=class extends L.classBuilder().ep(ut).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions())]}).s(`ElasticLoadBalancing_v10`,`DescribeTags`,{}).n(`ElasticLoadBalancingV2Client`,`DescribeTagsCommand`).sc($e).build(){},jy=class extends L.classBuilder().ep(ut).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions())]}).s(`ElasticLoadBalancing_v10`,`DescribeTargetGroupAttributes`,{}).n(`ElasticLoadBalancingV2Client`,`DescribeTargetGroupAttributesCommand`).sc(Tt).build(){},My=class extends L.classBuilder().ep(ut).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions())]}).s(`ElasticLoadBalancing_v10`,`DescribeTargetGroups`,{}).n(`ElasticLoadBalancingV2Client`,`DescribeTargetGroupsCommand`).sc(Ot).build(){},Ny=class extends L.classBuilder().ep(ut).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions())]}).s(`ElasticLoadBalancing_v10`,`DescribeTargetHealth`,{}).n(`ElasticLoadBalancingV2Client`,`DescribeTargetHealthCommand`).sc(nt).build(){},Py=class extends L.classBuilder().ep(Ct).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`GetInstanceProfile`,{}).n(`IAMClient`,`GetInstanceProfileCommand`).sc(ge).build(){},Fy=class extends L.classBuilder().ep(Ct).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`GetPolicy`,{}).n(`IAMClient`,`GetPolicyCommand`).sc(Ve).build(){},Iy=class extends L.classBuilder().ep(Ct).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`GetPolicyVersion`,{}).n(`IAMClient`,`GetPolicyVersionCommand`).sc(Ce).build(){},Ly=class extends L.classBuilder().ep(Ct).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`GetRole`,{}).n(`IAMClient`,`GetRoleCommand`).sc(Re).build(){},Ry=class extends L.classBuilder().ep(Ct).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`GetUser`,{}).n(`IAMClient`,`GetUserCommand`).sc(We).build(){},zy=class extends L.classBuilder().ep(Ct).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`ListAccessKeys`,{}).n(`IAMClient`,`ListAccessKeysCommand`).sc(be).build(){},By=class extends L.classBuilder().ep(Ct).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`ListAttachedRolePolicies`,{}).n(`IAMClient`,`ListAttachedRolePoliciesCommand`).sc(Ae).build(){},Vy=class extends L.classBuilder().ep(Ct).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`ListAttachedUserPolicies`,{}).n(`IAMClient`,`ListAttachedUserPoliciesCommand`).sc(_t).build(){},Hy=class extends L.classBuilder().ep(Ct).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`ListInstanceProfiles`,{}).n(`IAMClient`,`ListInstanceProfilesCommand`).sc(De).build(){},Uy=class extends L.classBuilder().ep(Ct).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`ListInstanceProfilesForRole`,{}).n(`IAMClient`,`ListInstanceProfilesForRoleCommand`).sc(Je).build(){},Wy=class extends L.classBuilder().ep(Ct).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`ListPolicies`,{}).n(`IAMClient`,`ListPoliciesCommand`).sc(Ke).build(){},Gy=class extends L.classBuilder().ep(Ct).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`ListRoles`,{}).n(`IAMClient`,`ListRolesCommand`).sc(Ze).build(){},Ky=class extends L.classBuilder().ep(Ct).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`ListUsers`,{}).n(`IAMClient`,`ListUsersCommand`).sc(Ie).build(){},qy=class extends L.classBuilder().ep(Et).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions()),tt(n)]}).s(`AmazonS3`,`ListBuckets`,{}).n(`S3Client`,`ListBucketsCommand`).sc(dt).build(){},Jy=class extends L.classBuilder().ep({...Et,Bucket:{type:`contextParams`,name:`Bucket`},Prefix:{type:`contextParams`,name:`Prefix`}}).m(function(e,t,n,r){return[z(n,e.getEndpointParameterInstructions()),tt(n)]}).s(`AmazonS3`,`ListObjectsV2`,{}).n(`S3Client`,`ListObjectsV2Command`).sc(st).build(){},Yy=!1;function Xy(e,t){Yy||!Yv(e)||(Yy=!0,Pn(),St(),t.clear(),window.location.pathname!==`/login`&&(window.location.href=`/login?reason=expired`))}function Zy(){let e=new ji({queryCache:new Ai({onError:t=>Xy(t,e)}),mutationCache:new Oi({onError:t=>Xy(t,e)}),defaultOptions:{queries:{staleTime:5e3,refetchIntervalInBackground:!1}}});return e}function Qy(){let e=(0,ms.c)(8),{theme:t,setTheme:n}=vs(),r;e[0]!==n||e[1]!==t?(r=()=>{n(t===`light`?`dark`:t===`dark`?`light`:`dark`)},e[0]=n,e[1]=t,e[2]=r):r=e[2];let i=r,a,o,s;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,W.jsx)(ec,{className:`size-[1.2rem] scale-100 rotate-0 transition-all dark:scale-0 dark:-rotate-90`}),o=(0,W.jsx)(Ks,{className:`absolute size-[1.2rem] scale-0 rotate-90 transition-all dark:scale-100 dark:rotate-0`}),s=(0,W.jsx)(`span`,{className:`sr-only`,children:`Toggle theme`}),e[3]=a,e[4]=o,e[5]=s):(a=e[3],o=e[4],s=e[5]);let c;return e[6]===i?c=e[7]:(c=(0,W.jsxs)(ar,{className:`rounded-full`,onClick:i,size:`icon-sm`,variant:`ghost`,children:[a,o,s]}),e[6]=i,e[7]=c),c}function $y(){let e=(0,ms.c)(7),{isAdmin:t,license:n}=qv(),r=t&&n===`open-source`,i,a;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=rn(`z-50 flex h-10 shrink-0 items-center gap-2 border-b border-sidebar-border bg-sidebar px-4 text-sidebar-foreground`,`sticky top-0`),a=(0,W.jsx)(fg,{className:`-ml-1`}),e[0]=i,e[1]=a):(i=e[0],a=e[1]);let o;e[2]===r?o=e[3]:(o=r&&(0,W.jsx)(`a`,{href:`https://mulgadc.com/purchase`,target:`_blank`,rel:`noopener noreferrer`,className:rn(tr({variant:`outline`,size:`sm`})),children:`Upgrade`}),e[2]=r,e[3]=o);let s;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,W.jsx)(Qy,{}),e[4]=s):s=e[4];let c;return e[5]===o?c=e[6]:(c=(0,W.jsxs)(`header`,{className:i,children:[a,(0,W.jsxs)(`div`,{className:`flex w-full items-center justify-end gap-2`,children:[o,s]})]}),e[5]=o,e[6]=c),c}function eb(){let e=(0,ms.c)(3),t,n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,W.jsx)(`h1`,{className:`text-4xl font-bold`,children:`404`}),n=(0,W.jsx)(`p`,{className:`text-muted-foreground`,children:`Page not found`}),e[0]=t,e[1]=n):(t=e[0],n=e[1]);let r;return e[2]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,W.jsxs)(`div`,{className:`flex flex-1 flex-col items-center justify-center gap-4`,children:[t,n,(0,W.jsx)(wt,{to:`/`,children:(0,W.jsx)(ar,{variant:`outline`,children:`Go back home`})})]}),e[2]=r):r=e[2],r}function tb(){let e=(0,ms.c)(194),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={select:nb},e[0]=t):t=e[0];let n=is(t),r=No(),i=Ni(),{isAdmin:a}=qv(),o;e[1]!==r||e[2]!==i?(o=function(){Pn(),St(),i.clear(),r({to:`/login`})},e[1]=r,e[2]=i,e[3]=o):o=e[3];let s=o,c;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,W.jsxs)(mg,{className:`flex flex-row items-center gap-2 px-4 py-3`,children:[(0,W.jsx)(`img`,{src:`/mulga-logo.svg`,alt:`Mulga`,className:`size-6 shrink-0 dark:invert`}),(0,W.jsx)(`span`,{className:`truncate text-sm font-semibold group-data-[collapsible=icon]:hidden`,children:`Spinifex`})]}),e[4]=c):c=e[4];let l;e[5]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,W.jsx)(yg,{children:`General`}),e[5]=l):l=e[5];let u=n===`/`,d,f;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,W.jsx)(Rs,{className:`size-4`}),f=(0,W.jsx)(`span`,{children:`Dashboard`}),e[6]=d,e[7]=f):(d=e[6],f=e[7]);let p;e[8]===u?p=e[9]:(p=(0,W.jsx)(xg,{children:(0,W.jsx)(wt,{to:`/`,children:(0,W.jsxs)(Cg,{isActive:u,tooltip:`Dashboard`,children:[d,f]})})}),e[8]=u,e[9]=p);let m;e[10]!==a||e[11]!==n?(m=a&&(0,W.jsx)(xg,{children:(0,W.jsx)(wt,{to:`/nodes`,children:(0,W.jsxs)(Cg,{isActive:n.startsWith(`/nodes`),tooltip:`Nodes`,children:[(0,W.jsx)(Zs,{className:`size-4`}),(0,W.jsx)(`span`,{children:`Nodes`})]})})}),e[10]=a,e[11]=n,e[12]=m):m=e[12];let h;e[13]!==p||e[14]!==m?(h=(0,W.jsxs)(vg,{children:[l,(0,W.jsxs)(bg,{children:[p,m]})]}),e[13]=p,e[14]=m,e[15]=h):h=e[15];let g;e[16]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,W.jsx)(yg,{children:`EC2`}),e[16]=g):g=e[16];let _;e[17]===n?_=e[18]:(_=n.startsWith(`/ec2/describe-instances`)||n.startsWith(`/ec2/run-instances`),e[17]=n,e[18]=_);let v,y;e[19]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,W.jsx)(Zs,{className:`size-4`}),y=(0,W.jsx)(`span`,{children:`Instances`}),e[19]=v,e[20]=y):(v=e[19],y=e[20]);let b;e[21]===_?b=e[22]:(b=(0,W.jsx)(xg,{children:(0,W.jsx)(wt,{to:`/ec2/describe-instances`,children:(0,W.jsxs)(Cg,{isActive:_,tooltip:`Instances`,children:[v,y]})})}),e[21]=_,e[22]=b);let x;e[23]===n?x=e[24]:(x=n.startsWith(`/ec2/describe-images`),e[23]=n,e[24]=x);let S,C;e[25]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,W.jsx)(Bs,{className:`size-4`}),C=(0,W.jsx)(`span`,{children:`Images`}),e[25]=S,e[26]=C):(S=e[25],C=e[26]);let w;e[27]===x?w=e[28]:(w=(0,W.jsx)(xg,{children:(0,W.jsx)(wt,{to:`/ec2/describe-images`,children:(0,W.jsxs)(Cg,{isActive:x,tooltip:`Images`,children:[S,C]})})}),e[27]=x,e[28]=w);let T;e[29]===n?T=e[30]:(T=n.startsWith(`/ec2/describe-key-pairs`),e[29]=n,e[30]=T);let E,D;e[31]===Symbol.for(`react.memo_cache_sentinel`)?(E=(0,W.jsx)(Vs,{className:`size-4`}),D=(0,W.jsx)(`span`,{children:`Key Pairs`}),e[31]=E,e[32]=D):(E=e[31],D=e[32]);let O;e[33]===T?O=e[34]:(O=(0,W.jsx)(xg,{children:(0,W.jsx)(wt,{to:`/ec2/describe-key-pairs`,children:(0,W.jsxs)(Cg,{isActive:T,tooltip:`Key Pairs`,children:[E,D]})})}),e[33]=T,e[34]=O);let k;e[35]===n?k=e[36]:(k=n.startsWith(`/ec2/describe-addresses`)||n.startsWith(`/ec2/allocate-address`),e[35]=n,e[36]=k);let A,j;e[37]===Symbol.for(`react.memo_cache_sentinel`)?(A=(0,W.jsx)(Gs,{className:`size-4`}),j=(0,W.jsx)(`span`,{children:`Elastic IPs`}),e[37]=A,e[38]=j):(A=e[37],j=e[38]);let M;e[39]===k?M=e[40]:(M=(0,W.jsx)(xg,{children:(0,W.jsx)(wt,{to:`/ec2/describe-addresses`,children:(0,W.jsxs)(Cg,{isActive:k,tooltip:`Elastic IPs`,children:[A,j]})})}),e[39]=k,e[40]=M);let ee;e[41]===n?ee=e[42]:(ee=n.startsWith(`/ec2/describe-volumes`)||n.startsWith(`/ec2/create-volume`)||n.startsWith(`/ec2/modify-volume`),e[41]=n,e[42]=ee);let N,P;e[43]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,W.jsx)(Ls,{className:`size-4`}),P=(0,W.jsx)(`span`,{children:`Volumes`}),e[43]=N,e[44]=P):(N=e[43],P=e[44]);let te;e[45]===ee?te=e[46]:(te=(0,W.jsx)(xg,{children:(0,W.jsx)(wt,{to:`/ec2/describe-volumes`,children:(0,W.jsxs)(Cg,{isActive:ee,tooltip:`Volumes`,children:[N,P]})})}),e[45]=ee,e[46]=te);let ne;e[47]===n?ne=e[48]:(ne=n.startsWith(`/ec2/describe-snapshots`)||n.startsWith(`/ec2/create-snapshot`),e[47]=n,e[48]=ne);let re,ie;e[49]===Symbol.for(`react.memo_cache_sentinel`)?(re=(0,W.jsx)(Ns,{className:`size-4`}),ie=(0,W.jsx)(`span`,{children:`Snapshots`}),e[49]=re,e[50]=ie):(re=e[49],ie=e[50]);let ae;e[51]===ne?ae=e[52]:(ae=(0,W.jsx)(xg,{children:(0,W.jsx)(wt,{to:`/ec2/describe-snapshots`,children:(0,W.jsxs)(Cg,{isActive:ne,tooltip:`Snapshots`,children:[re,ie]})})}),e[51]=ne,e[52]=ae);let F;e[53]===n?F=e[54]:(F=n.startsWith(`/ec2/describe-placement-groups`)||n.startsWith(`/ec2/create-placement-group`),e[53]=n,e[54]=F);let oe,se;e[55]===Symbol.for(`react.memo_cache_sentinel`)?(oe=(0,W.jsx)(Hs,{className:`size-4`}),se=(0,W.jsx)(`span`,{children:`Placement Groups`}),e[55]=oe,e[56]=se):(oe=e[55],se=e[56]);let I;e[57]===F?I=e[58]:(I=(0,W.jsx)(xg,{children:(0,W.jsx)(wt,{to:`/ec2/describe-placement-groups`,children:(0,W.jsxs)(Cg,{isActive:F,tooltip:`Placement Groups`,children:[oe,se]})})}),e[57]=F,e[58]=I);let ce;e[59]===n?ce=e[60]:(ce=n.startsWith(`/ec2/describe-load-balancers`)||n.startsWith(`/ec2/create-load-balancer`),e[59]=n,e[60]=ce);let le,ue;e[61]===Symbol.for(`react.memo_cache_sentinel`)?(le=(0,W.jsx)(rc,{className:`size-4`}),ue=(0,W.jsx)(`span`,{children:`Load Balancers`}),e[61]=le,e[62]=ue):(le=e[61],ue=e[62]);let de;e[63]===ce?de=e[64]:(de=(0,W.jsx)(xg,{children:(0,W.jsx)(wt,{to:`/ec2/describe-load-balancers`,children:(0,W.jsxs)(Cg,{isActive:ce,tooltip:`Load Balancers`,children:[le,ue]})})}),e[63]=ce,e[64]=de);let fe;e[65]===n?fe=e[66]:(fe=n.startsWith(`/ec2/describe-target-groups`)||n.startsWith(`/ec2/create-target-group`),e[65]=n,e[66]=fe);let pe,me;e[67]===Symbol.for(`react.memo_cache_sentinel`)?(pe=(0,W.jsx)(Fs,{className:`size-4`}),me=(0,W.jsx)(`span`,{children:`Target Groups`}),e[67]=pe,e[68]=me):(pe=e[67],me=e[68]);let he;e[69]===fe?he=e[70]:(he=(0,W.jsx)(xg,{children:(0,W.jsx)(wt,{to:`/ec2/describe-target-groups`,children:(0,W.jsxs)(Cg,{isActive:fe,tooltip:`Target Groups`,children:[pe,me]})})}),e[69]=fe,e[70]=he);let ge;e[71]!==b||e[72]!==w||e[73]!==O||e[74]!==M||e[75]!==te||e[76]!==ae||e[77]!==I||e[78]!==de||e[79]!==he?(ge=(0,W.jsxs)(vg,{children:[g,(0,W.jsxs)(bg,{children:[b,w,O,M,te,ae,I,de,he]})]}),e[71]=b,e[72]=w,e[73]=O,e[74]=M,e[75]=te,e[76]=ae,e[77]=I,e[78]=de,e[79]=he,e[80]=ge):ge=e[80];let _e;e[81]===Symbol.for(`react.memo_cache_sentinel`)?(_e=(0,W.jsx)(yg,{children:`Networking`}),e[81]=_e):_e=e[81];let ve;e[82]===n?ve=e[83]:(ve=n.startsWith(`/ec2/describe-vpcs`)||n.startsWith(`/ec2/create-vpc`),e[82]=n,e[83]=ve);let ye,be;e[84]===Symbol.for(`react.memo_cache_sentinel`)?(ye=(0,W.jsx)(qs,{className:`size-4`}),be=(0,W.jsx)(`span`,{children:`VPCs`}),e[84]=ye,e[85]=be):(ye=e[84],be=e[85]);let xe;e[86]===ve?xe=e[87]:(xe=(0,W.jsx)(xg,{children:(0,W.jsx)(wt,{to:`/ec2/describe-vpcs`,children:(0,W.jsxs)(Cg,{isActive:ve,tooltip:`VPCs`,children:[ye,be]})})}),e[86]=ve,e[87]=xe);let Se;e[88]===n?Se=e[89]:(Se=n.startsWith(`/ec2/describe-subnets`)||n.startsWith(`/ec2/create-subnet`),e[88]=n,e[89]=Se);let Ce,we;e[90]===Symbol.for(`react.memo_cache_sentinel`)?(Ce=(0,W.jsx)(Us,{className:`size-4`}),we=(0,W.jsx)(`span`,{children:`Subnets`}),e[90]=Ce,e[91]=we):(Ce=e[90],we=e[91]);let Te;e[92]===Se?Te=e[93]:(Te=(0,W.jsx)(xg,{children:(0,W.jsx)(wt,{to:`/ec2/describe-subnets`,children:(0,W.jsxs)(Cg,{isActive:Se,tooltip:`Subnets`,children:[Ce,we]})})}),e[92]=Se,e[93]=Te);let Ee;e[94]===n?Ee=e[95]:(Ee=n.startsWith(`/ec2/describe-security-groups`)||n.startsWith(`/ec2/create-security-group`),e[94]=n,e[95]=Ee);let De,Oe;e[96]===Symbol.for(`react.memo_cache_sentinel`)?(De=(0,W.jsx)(Qs,{className:`size-4`}),Oe=(0,W.jsx)(`span`,{children:`Security Groups`}),e[96]=De,e[97]=Oe):(De=e[96],Oe=e[97]);let ke;e[98]===Ee?ke=e[99]:(ke=(0,W.jsx)(xg,{children:(0,W.jsx)(wt,{to:`/ec2/describe-security-groups`,children:(0,W.jsxs)(Cg,{isActive:Ee,tooltip:`Security Groups`,children:[De,Oe]})})}),e[98]=Ee,e[99]=ke);let Ae;e[100]===n?Ae=e[101]:(Ae=n.startsWith(`/ec2/describe-route-tables`)||n.startsWith(`/ec2/create-route-table`),e[100]=n,e[101]=Ae);let je,Me;e[102]===Symbol.for(`react.memo_cache_sentinel`)?(je=(0,W.jsx)(Xs,{className:`size-4`}),Me=(0,W.jsx)(`span`,{children:`Route Tables`}),e[102]=je,e[103]=Me):(je=e[102],Me=e[103]);let Ne;e[104]===Ae?Ne=e[105]:(Ne=(0,W.jsx)(xg,{children:(0,W.jsx)(wt,{to:`/ec2/describe-route-tables`,children:(0,W.jsxs)(Cg,{isActive:Ae,tooltip:`Route Tables`,children:[je,Me]})})}),e[104]=Ae,e[105]=Ne);let Pe;e[106]===n?Pe=e[107]:(Pe=n.startsWith(`/ec2/describe-internet-gateways`),e[106]=n,e[107]=Pe);let Fe,Ie;e[108]===Symbol.for(`react.memo_cache_sentinel`)?(Fe=(0,W.jsx)(Is,{className:`size-4`}),Ie=(0,W.jsx)(`span`,{children:`Internet Gateways`}),e[108]=Fe,e[109]=Ie):(Fe=e[108],Ie=e[109]);let Le;e[110]===Pe?Le=e[111]:(Le=(0,W.jsx)(xg,{children:(0,W.jsx)(wt,{to:`/ec2/describe-internet-gateways`,children:(0,W.jsxs)(Cg,{isActive:Pe,tooltip:`Internet Gateways`,children:[Fe,Ie]})})}),e[110]=Pe,e[111]=Le);let Re;e[112]===n?Re=e[113]:(Re=n.startsWith(`/ec2/describe-nat-gateways`)||n.startsWith(`/ec2/create-nat-gateway`),e[112]=n,e[113]=Re);let ze,Be;e[114]===Symbol.for(`react.memo_cache_sentinel`)?(ze=(0,W.jsx)(Ys,{className:`size-4`}),Be=(0,W.jsx)(`span`,{children:`NAT Gateways`}),e[114]=ze,e[115]=Be):(ze=e[114],Be=e[115]);let Ve;e[116]===Re?Ve=e[117]:(Ve=(0,W.jsx)(xg,{children:(0,W.jsx)(wt,{to:`/ec2/describe-nat-gateways`,children:(0,W.jsxs)(Cg,{isActive:Re,tooltip:`NAT Gateways`,children:[ze,Be]})})}),e[116]=Re,e[117]=Ve);let He;e[118]!==xe||e[119]!==Te||e[120]!==ke||e[121]!==Ne||e[122]!==Le||e[123]!==Ve?(He=(0,W.jsxs)(vg,{children:[_e,(0,W.jsxs)(bg,{children:[xe,Te,ke,Ne,Le,Ve]})]}),e[118]=xe,e[119]=Te,e[120]=ke,e[121]=Ne,e[122]=Le,e[123]=Ve,e[124]=He):He=e[124];let Ue;e[125]===Symbol.for(`react.memo_cache_sentinel`)?(Ue=(0,W.jsx)(yg,{children:`EKS`}),e[125]=Ue):Ue=e[125];let We;e[126]===n?We=e[127]:(We=n.startsWith(`/eks/list-clusters`)||n.startsWith(`/eks/create-cluster`),e[126]=n,e[127]=We);let Ge,Ke;e[128]===Symbol.for(`react.memo_cache_sentinel`)?(Ge=(0,W.jsx)(Ms,{className:`size-4`}),Ke=(0,W.jsx)(`span`,{children:`Clusters`}),e[128]=Ge,e[129]=Ke):(Ge=e[128],Ke=e[129]);let qe;e[130]===We?qe=e[131]:(qe=(0,W.jsxs)(vg,{children:[Ue,(0,W.jsx)(bg,{children:(0,W.jsx)(xg,{children:(0,W.jsx)(wt,{to:`/eks/list-clusters`,children:(0,W.jsxs)(Cg,{isActive:We,tooltip:`Clusters`,children:[Ge,Ke]})})})})]}),e[130]=We,e[131]=qe);let Je;e[132]===Symbol.for(`react.memo_cache_sentinel`)?(Je=(0,W.jsx)(yg,{children:`IAM`}),e[132]=Je):Je=e[132];let Ye;e[133]===n?Ye=e[134]:(Ye=n.startsWith(`/iam/list-users`)||n.startsWith(`/iam/create-user`),e[133]=n,e[134]=Ye);let Xe,Ze;e[135]===Symbol.for(`react.memo_cache_sentinel`)?(Xe=(0,W.jsx)(nc,{className:`size-4`}),Ze=(0,W.jsx)(`span`,{children:`Users`}),e[135]=Xe,e[136]=Ze):(Xe=e[135],Ze=e[136]);let Qe;e[137]===Ye?Qe=e[138]:(Qe=(0,W.jsx)(xg,{children:(0,W.jsx)(wt,{to:`/iam/list-users`,children:(0,W.jsxs)(Cg,{isActive:Ye,tooltip:`Users`,children:[Xe,Ze]})})}),e[137]=Ye,e[138]=Qe);let $e;e[139]===n?$e=e[140]:($e=n.startsWith(`/iam/list-policies`)||n.startsWith(`/iam/create-policy`),e[139]=n,e[140]=$e);let et,tt;e[141]===Symbol.for(`react.memo_cache_sentinel`)?(et=(0,W.jsx)($s,{className:`size-4`}),tt=(0,W.jsx)(`span`,{children:`Policies`}),e[141]=et,e[142]=tt):(et=e[141],tt=e[142]);let nt;e[143]===$e?nt=e[144]:(nt=(0,W.jsx)(xg,{children:(0,W.jsx)(wt,{to:`/iam/list-policies`,children:(0,W.jsxs)(Cg,{isActive:$e,tooltip:`Policies`,children:[et,tt]})})}),e[143]=$e,e[144]=nt);let rt;e[145]===n?rt=e[146]:(rt=n.startsWith(`/iam/list-roles`)||n.startsWith(`/iam/create-role`),e[145]=n,e[146]=rt);let it,at;e[147]===Symbol.for(`react.memo_cache_sentinel`)?(it=(0,W.jsx)(tc,{className:`size-4`}),at=(0,W.jsx)(`span`,{children:`Roles`}),e[147]=it,e[148]=at):(it=e[147],at=e[148]);let ot;e[149]===rt?ot=e[150]:(ot=(0,W.jsx)(xg,{children:(0,W.jsx)(wt,{to:`/iam/list-roles`,children:(0,W.jsxs)(Cg,{isActive:rt,tooltip:`Roles`,children:[it,at]})})}),e[149]=rt,e[150]=ot);let st;e[151]===n?st=e[152]:(st=n.startsWith(`/iam/list-instance-profiles`)||n.startsWith(`/iam/create-instance-profile`),e[151]=n,e[152]=st);let ct,lt;e[153]===Symbol.for(`react.memo_cache_sentinel`)?(ct=(0,W.jsx)(zs,{className:`size-4`}),lt=(0,W.jsx)(`span`,{children:`Instance Profiles`}),e[153]=ct,e[154]=lt):(ct=e[153],lt=e[154]);let ut;e[155]===st?ut=e[156]:(ut=(0,W.jsx)(xg,{children:(0,W.jsx)(wt,{to:`/iam/list-instance-profiles`,children:(0,W.jsxs)(Cg,{isActive:st,tooltip:`Instance Profiles`,children:[ct,lt]})})}),e[155]=st,e[156]=ut);let dt;e[157]!==Qe||e[158]!==nt||e[159]!==ot||e[160]!==ut?(dt=(0,W.jsxs)(vg,{children:[Je,(0,W.jsxs)(bg,{children:[Qe,nt,ot,ut]})]}),e[157]=Qe,e[158]=nt,e[159]=ot,e[160]=ut,e[161]=dt):dt=e[161];let ft;e[162]===Symbol.for(`react.memo_cache_sentinel`)?(ft=(0,W.jsx)(yg,{children:`S3`}),e[162]=ft):ft=e[162];let pt;e[163]===n?pt=e[164]:(pt=n.startsWith(`/s3/ls`),e[163]=n,e[164]=pt);let mt,ht;e[165]===Symbol.for(`react.memo_cache_sentinel`)?(ht=(0,W.jsx)(Zs,{className:`size-4`}),mt=(0,W.jsx)(`span`,{children:`Buckets`}),e[165]=mt,e[166]=ht):(mt=e[165],ht=e[166]);let gt;e[167]===pt?gt=e[168]:(gt=(0,W.jsx)(xg,{children:(0,W.jsx)(wt,{to:`/s3/ls`,children:(0,W.jsxs)(Cg,{isActive:pt,tooltip:`Buckets`,children:[ht,mt]})})}),e[167]=pt,e[168]=gt);let _t;e[169]!==a||e[170]!==n?(_t=a&&(0,W.jsx)(xg,{children:(0,W.jsx)(wt,{to:`/s3/service-metrics`,children:(0,W.jsxs)(Cg,{isActive:n.startsWith(`/s3/service-metrics`),tooltip:`Service Metrics`,children:[(0,W.jsx)(As,{className:`size-4`}),(0,W.jsx)(`span`,{children:`Service Metrics`})]})})}),e[169]=a,e[170]=n,e[171]=_t):_t=e[171];let vt;e[172]!==gt||e[173]!==_t?(vt=(0,W.jsxs)(vg,{children:[ft,(0,W.jsxs)(bg,{children:[gt,_t]})]}),e[172]=gt,e[173]=_t,e[174]=vt):vt=e[174];let yt;e[175]===a?yt=e[176]:(yt=a&&(0,W.jsxs)(vg,{children:[(0,W.jsx)(yg,{children:`Documentation`}),(0,W.jsx)(bg,{children:(0,W.jsx)(xg,{children:(0,W.jsx)(`a`,{href:`https://docs.mulgadc.com`,target:`_blank`,rel:`noopener noreferrer`,children:(0,W.jsxs)(Cg,{tooltip:`Documentation`,children:[(0,W.jsx)(js,{className:`size-4`}),(0,W.jsx)(`span`,{children:`Docs`})]})})})})]}),e[175]=a,e[176]=yt);let bt;e[177]!==vt||e[178]!==yt||e[179]!==ge||e[180]!==He||e[181]!==qe||e[182]!==h||e[183]!==dt?(bt=(0,W.jsxs)(_g,{children:[h,ge,He,qe,dt,vt,yt]}),e[177]=vt,e[178]=yt,e[179]=ge,e[180]=He,e[181]=qe,e[182]=h,e[183]=dt,e[184]=bt):bt=e[184];let xt;e[185]===Symbol.for(`react.memo_cache_sentinel`)?(xt=(0,W.jsx)(gg,{className:`mx-0 w-full`}),e[185]=xt):xt=e[185];let Ct,Tt;e[186]===Symbol.for(`react.memo_cache_sentinel`)?(Ct=(0,W.jsx)(Ws,{className:`size-4`}),Tt=(0,W.jsx)(`span`,{children:`Sign out`}),e[186]=Ct,e[187]=Tt):(Ct=e[186],Tt=e[187]);let Et;e[188]===s?Et=e[189]:(Et=(0,W.jsxs)(hg,{children:[xt,(0,W.jsx)(bg,{children:(0,W.jsx)(xg,{children:(0,W.jsxs)(Cg,{onClick:s,tooltip:`Sign out`,children:[Ct,Tt]})})})]}),e[188]=s,e[189]=Et);let Dt;e[190]===Symbol.for(`react.memo_cache_sentinel`)?(Dt=(0,W.jsx)(pg,{}),e[190]=Dt):Dt=e[190];let Ot;return e[191]!==bt||e[192]!==Et?(Ot=(0,W.jsxs)(dg,{collapsible:`icon`,children:[c,bt,Et,Dt]}),e[191]=bt,e[192]=Et,e[193]=Ot):Ot=e[193],Ot}function nb(e){return e.pathname}function rb(e){let t=(0,ms.c)(18),{error:n,reset:r}=e,i=M(),a=Ni(),o;t[0]!==a||t[1]!==r||t[2]!==i?(o=function(){a.invalidateQueries(),r(),i.invalidate()},t[0]=a,t[1]=r,t[2]=i,t[3]=o):o=t[3];let s=o,c;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,W.jsx)(tb,{}),t[4]=c):c=t[4];let l;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,W.jsx)($y,{}),t[5]=l):l=t[5];let u,d;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,W.jsx)(`div`,{className:`flex justify-center`,children:(0,W.jsx)(Ps,{className:`size-12 text-destructive`})}),d=(0,W.jsx)(`h1`,{className:`text-2xl font-semibold`,children:`Something went wrong`}),t[6]=u,t[7]=d):(u=t[6],d=t[7]);let f=n.message||`An unexpected error occurred`,p;t[8]===f?p=t[9]:(p=(0,W.jsx)(`p`,{className:`text-muted-foreground`,children:f}),t[8]=f,t[9]=p);let m;t[10]===s?m=t[11]:(m=(0,W.jsx)(ar,{onClick:s,variant:`default`,children:`Try Again`}),t[10]=s,t[11]=m);let h;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,W.jsx)(wt,{to:`/`,children:(0,W.jsx)(ar,{variant:`outline`,children:`Go Home`})}),t[12]=h):h=t[12];let g;t[13]===m?g=t[14]:(g=(0,W.jsxs)(`div`,{className:`flex justify-center gap-2`,children:[m,h]}),t[13]=m,t[14]=g);let _;return t[15]!==g||t[16]!==p?(_=(0,W.jsxs)(W.Fragment,{children:[c,(0,W.jsxs)(`main`,{className:`flex flex-1 flex-col`,children:[l,(0,W.jsx)(`div`,{className:`flex flex-1 items-center justify-center p-6 pt-0`,children:(0,W.jsxs)(`div`,{className:`max-w-md space-y-4 text-center`,children:[u,d,p,g]})})]})]}),t[15]=g,t[16]=p,t[17]=_):_=t[17],_}var ib=Lo()({head:()=>({meta:[{title:`Mulga`}]}),component:()=>(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(ls,{}),(0,W.jsx)(tb,{}),(0,W.jsxs)(`main`,{className:`flex flex-1 flex-col`,children:[(0,W.jsx)($y,{}),(0,W.jsx)(`div`,{className:`flex flex-1 flex-col p-8`,children:(0,W.jsx)(Yo,{})})]})]}),errorComponent:rb,notFoundComponent:eb}),ab=q(`/login`)({validateSearch:e=>({reason:e.reason===`expired`?`expired`:void 0}),beforeLoad:()=>{if(In())throw me({to:`/`})},component:J(()=>R(()=>import(`./login.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13])),`component`)}),ob=q(`/_auth`)({beforeLoad:()=>{if(!In())throw me({to:`/login`})},component:J(()=>R(()=>import(`./route.js`),__vite__mapDeps([14,1])),`component`)}),sb=a({queryKey:[`ec2`,`availabilityZones`],queryFn:async()=>{let e=new Qv({});return await bt().send(e)},staleTime:3e5}),cb=a({queryKey:[`ec2`,`instances`],queryFn:async()=>{let e=new ty({});return await bt().send(e)},refetchInterval:5e3}),lb=e=>a({queryKey:[`ec2`,`instances`,e],queryFn:async()=>{let t=new ty({InstanceIds:[e]});return await bt().send(t)},refetchInterval:5e3}),ub=e=>a({queryKey:[`ec2`,`iam-instance-profile-associations`,e],queryFn:async()=>{let t=new $v({Filters:[{Name:`instance-id`,Values:[e]}]});return await bt().send(t)},refetchInterval:5e3}),db=a({queryKey:[`ec2`,`instances`,`types`],queryFn:async()=>{let e=new ny({Filters:[{Name:`capacity`,Values:[`true`]}]});return await bt().send(e)},refetchInterval:5e3}),fb=a({queryKey:[`ec2`,`images`],queryFn:async()=>{let e=new ey({});return await bt().send(e)}}),pb=e=>a({queryKey:[`ec2`,`images`,e??`none`],queryFn:async()=>{if(!e)return{Images:[],$metadata:{}};let t=new ey({ImageIds:[e]});return await bt().send(t)}}),mb=a({queryKey:[`ec2`,`keypairs`],queryFn:async()=>{let e=new iy({});return await bt().send(e)}}),hb=e=>a({queryKey:[`ec2`,`keypairs`,e],queryFn:async()=>{let t=new iy({KeyPairIds:[e]});return await bt().send(t)}}),gb=a({queryKey:[`ec2`,`regions`],queryFn:async()=>{let e=new sy({});return await bt().send(e)},staleTime:3e5}),_b=a({queryKey:[`ec2`,`subnets`],queryFn:async()=>{let e=new dy({});return await bt().send(e)}}),vb=e=>a({queryKey:[`ec2`,`subnets`,e],queryFn:async()=>{let t=new dy({SubnetIds:[e]});return await bt().send(t)}}),yb=a({queryKey:[`ec2`,`snapshots`],queryFn:async()=>{let e=new uy({});return await bt().send(e)},refetchInterval:5e3}),bb=e=>a({queryKey:[`ec2`,`snapshots`,e],queryFn:async()=>{let t=new uy({SnapshotIds:[e]});return await bt().send(t)},refetchInterval:5e3}),xb=a({queryKey:[`ec2`,`internetGateways`],queryFn:async()=>{let e=new ry({});return await bt().send(e)},refetchInterval:5e3}),Sb=e=>a({queryKey:[`ec2`,`internetGateways`,e],queryFn:async()=>{let t=new ry({InternetGatewayIds:[e]});return await bt().send(t)},refetchInterval:5e3}),Cb=a({queryKey:[`ec2`,`routeTables`],queryFn:async()=>{let e=new cy({});return await bt().send(e)},refetchInterval:5e3}),wb=e=>a({queryKey:[`ec2`,`routeTables`,e],queryFn:async()=>{let t=new cy({RouteTableIds:[e]});return await bt().send(t)},refetchInterval:5e3}),Tb=a({queryKey:[`ec2`,`vpcs`],queryFn:async()=>{let e=new py({});return await bt().send(e)}}),Eb=e=>a({queryKey:[`ec2`,`vpcs`,e],queryFn:async()=>{let t=new py({VpcIds:[e]});return await bt().send(t)}}),Db=a({queryKey:[`ec2`,`placementGroups`],queryFn:async()=>{let e=new oy({});return await bt().send(e)}}),Ob=e=>a({queryKey:[`ec2`,`placementGroups`,e],queryFn:async()=>{let t=new oy({GroupIds:[e]});return await bt().send(t)}}),kb=a({queryKey:[`ec2`,`securityGroups`],queryFn:async()=>{let e=new ly({});return await bt().send(e)}}),Ab=e=>a({queryKey:[`ec2`,`securityGroups`,e],queryFn:async()=>{let t=new ly({GroupIds:[e]});return await bt().send(t)}}),jb=a({queryKey:[`ec2`,`addresses`],queryFn:async()=>{let e=new Zv({});return await bt().send(e)},refetchInterval:5e3}),Mb=e=>a({queryKey:[`ec2`,`addresses`,e],queryFn:async()=>{let t=new Zv({AllocationIds:[e]});return await bt().send(t)},refetchInterval:5e3}),Nb=a({queryKey:[`ec2`,`natGateways`],queryFn:async()=>{let e=new ay({});return await bt().send(e)},refetchInterval:5e3}),Pb=e=>a({queryKey:[`ec2`,`natGateways`,e],queryFn:async()=>{let t=new ay({NatGatewayIds:[e]});return await bt().send(t)},refetchInterval:5e3}),Fb=a({queryKey:[`ec2`,`volumes`],queryFn:async()=>{let e=new fy({});return await bt().send(e)},refetchInterval:5e3}),Ib=e=>a({queryKey:[`ec2`,`volumes`,e],queryFn:async()=>{let t=new fy({VolumeIds:[e]});return await bt().send(t)},refetchInterval:5e3}),Lb=a({queryKey:[`s3`,`buckets`],queryFn:async()=>{let e=new qy({});return await xt().send(e)}}),Rb=(e,t)=>a({queryKey:[`s3`,`buckets`,e,`objects`,t??``],queryFn:async()=>{let n=new Jy({Bucket:e,Prefix:t,Delimiter:`/`});return await xt().send(n)}}),zb=q(`/_auth/`)({loader:async({context:e})=>{await Promise.all([e.queryClient.ensureQueryData(cb),e.queryClient.ensureQueryData(Fb),e.queryClient.ensureQueryData(Tb),e.queryClient.ensureQueryData(mb),e.queryClient.ensureQueryData(Lb),e.queryClient.ensureQueryData(kb),e.queryClient.ensureQueryData(Nb),e.queryClient.ensureQueryData(jb),e.queryClient.ensureQueryData(xb)])},head:()=>({meta:[{title:`Dashboard | Mulga`}]}),component:J(()=>R(()=>import(`./_auth.js`),__vite__mapDeps([15,1,2,3,4,5,6,16,17,18,19,20,21,22,8,12,23,24])),`component`)}),Bb=q(`/_auth/nodes`)({head:()=>({meta:[{title:`Nodes | Mulga`}]}),component:J(()=>R(()=>import(`./nodes.js`),__vite__mapDeps([25,1,2,3,16,17,26,20,22,8,12,23,24])),`component`)}),Vb=q(`/_auth/s3/service-metrics`)({head:()=>({meta:[{title:`Service Metrics | S3 | Mulga`}]}),component:J(()=>R(()=>import(`./service-metrics.js`),__vite__mapDeps([27,1,16,17,26,20,22,2,3,8,12,23,24])),`component`)}),Hb=q(`/_auth/s3/ls/`)({loader:async({context:e})=>{await e.queryClient.ensureQueryData(Lb)},head:()=>({meta:[{title:`Buckets | S3 | Mulga`}]}),component:J(()=>R(()=>import(`./ls.js`),__vite__mapDeps([28,1,2,3,4,5,6,7,8,29,17,30,20])),`component`)}),Ub=q(`/_auth/s3/(buckets)/create-bucket`)({head:()=>({meta:[{title:`Create Bucket | S3 | Mulga`}]}),component:J(()=>R(()=>import(`./create-bucket.js`),__vite__mapDeps([31,1,2,3,32,5,4,6,33,11,34,35,7,8,36,18,37,38,39,20,13])),`component`)}),Wb=q(`/_auth/iam/(users)/create-user`)({head:()=>({meta:[{title:`Create User | IAM | Mulga`}]}),component:J(()=>R(()=>import(`./create-user.js`),__vite__mapDeps([40,1,41,2,3,4,5,6,33,11,34,35,7,8,36,18,37,38,39,20,13,42,43])),`component`)}),Gb=q(`/_auth/iam/(roles)/create-role`)({head:()=>({meta:[{title:`Create Role | IAM | Mulga`}]}),component:J(()=>R(()=>import(`./create-role.js`),__vite__mapDeps([44,1,41,2,3,4,5,6,33,11,34,35,7,8,36,18,37,38,39,20,13,45,42,43])),`component`)}),Kb=q(`/_auth/iam/(policies)/create-policy`)({head:()=>({meta:[{title:`Create Policy | IAM | Mulga`}]}),component:J(()=>R(()=>import(`./create-policy.js`),__vite__mapDeps([46,1,41,2,3,4,5,6,33,11,34,35,7,8,36,18,37,38,39,20,13,45,42,43])),`component`)}),qb=q(`/_auth/iam/(instance-profiles)/create-instance-profile`)({head:()=>({meta:[{title:`Create Instance Profile | IAM | Mulga`}]}),component:J(()=>R(()=>import(`./create-instance-profile.js`),__vite__mapDeps([47,1,41,2,3,4,5,6,33,11,34,35,7,8,36,18,37,38,39,20,13,42,43])),`component`)}),Jb=a({queryKey:[`iam`,`users`],queryFn:async()=>{let e=new Ky({});return await ht().send(e)},staleTime:3e5}),Yb=e=>a({queryKey:[`iam`,`users`,e],queryFn:async()=>{let t=new Ry({UserName:e});return await ht().send(t)},staleTime:3e5}),Xb=e=>a({queryKey:[`iam`,`access-keys`,e],queryFn:async()=>{let t=new zy({UserName:e});return await ht().send(t)},staleTime:3e5}),Zb=a({queryKey:[`iam`,`policies`],queryFn:async()=>{let e=new Wy({Scope:`Local`});return await ht().send(e)},staleTime:3e5}),Qb=e=>a({queryKey:[`iam`,`policies`,e],queryFn:async()=>{let t=new Fy({PolicyArn:e});return await ht().send(t)},staleTime:3e5}),$b=(e,t)=>a({queryKey:[`iam`,`policy-versions`,e,t],queryFn:async()=>{let n=new Iy({PolicyArn:e,VersionId:t});return await ht().send(n)},staleTime:3e5}),ex=e=>a({queryKey:[`iam`,`attached-user-policies`,e],queryFn:async()=>{let t=new Vy({UserName:e});return await ht().send(t)},staleTime:3e5}),tx=a({queryKey:[`iam`,`roles`],queryFn:async()=>{let e=new Gy({});return await ht().send(e)},staleTime:3e5}),nx=e=>a({queryKey:[`iam`,`roles`,e],queryFn:async()=>{let t=new Ly({RoleName:e});return await ht().send(t)},staleTime:3e5}),rx=e=>a({queryKey:[`iam`,`attached-role-policies`,e],queryFn:async()=>{let t=new By({RoleName:e});return await ht().send(t)},staleTime:3e5}),ix=a({queryKey:[`iam`,`instance-profiles`],queryFn:async()=>{let e=new Hy({});return await ht().send(e)},staleTime:3e5}),ax=e=>a({queryKey:[`iam`,`instance-profiles`,e],queryFn:async()=>{let t=new Py({InstanceProfileName:e});return await ht().send(t)},staleTime:3e5}),ox=e=>a({queryKey:[`iam`,`instance-profiles-for-role`,e],queryFn:async()=>{let t=new Uy({RoleName:e});return await ht().send(t)},staleTime:3e5}),sx=q(`/_auth/eks/(clusters)/create-cluster`)({loader:async({context:e})=>{await Promise.all([e.queryClient.ensureQueryData(Tb),e.queryClient.ensureQueryData(_b),e.queryClient.ensureQueryData(tx),e.queryClient.ensureQueryData(fb)])},head:()=>({meta:[{title:`Create Cluster | EKS | Mulga`}]}),component:J(()=>R(()=>import(`./create-cluster.js`),__vite__mapDeps([48,1,2,3,49,4,5,6,33,43,50,7,8,51,52,10,36,18,11,29,17,34,37,53,54,39,20,13,38,55])),`component`)}),cx=q(`/_auth/ec2/(vpc)/create-vpc`)({head:()=>({meta:[{title:`Create VPC | EC2 | Mulga`}]}),component:J(()=>R(()=>import(`./create-vpc.js`),__vite__mapDeps([56,1,57,2,3,4,5,6,33,50,7,8,51,52,10,36,18,11,34,19,35,37,38,39,20,13,58])),`component`)}),lx=q(`/_auth/ec2/(volumes)/create-volume`)({loader:async({context:e})=>{await e.queryClient.ensureQueryData(sb)},head:()=>({meta:[{title:`Create Volume | EC2 | Mulga`}]}),component:J(()=>R(()=>import(`./create-volume.js`),__vite__mapDeps([59,1,57,2,3,4,5,6,33,50,51,7,8,52,10,36,18,11,29,17,34,35,37,38,39,20,13,58])),`component`)}),ux=q(`/_auth/ec2/(target-groups)/create-target-group`)({loader:async({context:e})=>{await e.queryClient.ensureQueryData(Tb)},head:()=>({meta:[{title:`Create Target Group | EC2 | Mulga`}]}),component:J(()=>R(()=>import(`./create-target-group.js`),__vite__mapDeps([60,1,61,2,3,4,5,6,33,11,29,17,34,35,7,8,36,18,37,38,62,9,10,51,52,63,64,13,39,20,65])),`component`)}),dx=q(`/_auth/ec2/(subnet)/create-subnet`)({loader:async({context:e})=>{await Promise.all([e.queryClient.ensureQueryData(Tb),e.queryClient.ensureQueryData(sb)])},head:()=>({meta:[{title:`Create Subnet | EC2 | Mulga`}]}),component:J(()=>R(()=>import(`./create-subnet.js`),__vite__mapDeps([66,1,2,3,57,4,5,6,33,50,51,7,8,52,10,36,18,11,29,17,34,35,37,38,39,20,13,58])),`component`)}),fx=q(`/_auth/ec2/(snapshots)/create-snapshot`)({validateSearch:e=>({volumeId:typeof e.volumeId==`string`?e.volumeId:void 0}),loader:async({context:e})=>{await e.queryClient.ensureQueryData(Fb)},head:()=>({meta:[{title:`Create Snapshot | EC2 | Mulga`}]}),component:J(()=>R(()=>import(`./create-snapshot.js`),__vite__mapDeps([67,1,57,2,3,4,5,6,33,50,51,7,8,52,10,36,18,11,29,17,34,35,37,38,39,20,13,45,58])),`component`)}),px=q(`/_auth/ec2/(security-groups)/create-security-group`)({loader:async({context:e})=>{await e.queryClient.ensureQueryData(Tb)},head:()=>({meta:[{title:`Create Security Group | EC2 | Mulga`}]}),component:J(()=>R(()=>import(`./create-security-group.js`),__vite__mapDeps([68,1,2,3,57,4,5,6,33,50,51,7,8,52,10,36,18,11,29,17,34,35,37,38,39,20,13,58])),`component`)}),mx=q(`/_auth/ec2/(route-tables)/create-route-table`)({loader:async({context:e})=>{await e.queryClient.ensureQueryData(Tb)},head:()=>({meta:[{title:`Create Route Table | EC2 | Mulga`}]}),component:J(()=>R(()=>import(`./create-route-table.js`),__vite__mapDeps([69,1,2,3,57,4,5,6,33,50,51,7,8,52,10,36,18,11,29,17,34,39,20,13,58])),`component`)}),hx=q(`/_auth/ec2/(placement-groups)/create-placement-group`)({head:()=>({meta:[{title:`Create Placement Group | EC2 | Mulga`}]}),component:J(()=>R(()=>import(`./create-placement-group.js`),__vite__mapDeps([70,1,57,2,3,4,5,6,33,50,51,7,8,52,10,36,18,11,34,35,37,38,39,20,13,58])),`component`)}),gx=q(`/_auth/ec2/(nat-gateways)/create-nat-gateway`)({loader:async({context:e})=>{await Promise.all([e.queryClient.ensureQueryData(_b),e.queryClient.ensureQueryData(jb)])},head:()=>({meta:[{title:`Create NAT Gateway | EC2 | Mulga`}]}),component:J(()=>R(()=>import(`./create-nat-gateway.js`),__vite__mapDeps([71,1,2,3,4,5,6,57,33,50,51,7,8,52,10,36,18,11,29,17,34,35,37,38,39,20,13,58])),`component`)}),_x=a({queryKey:[`acm`,`certificates`],queryFn:async()=>{let e=new Xv({});return await mt().send(e)}}),vx=5e3,yx=a({queryKey:[`elbv2`,`loadBalancers`],queryFn:async()=>{let e=new Dy({});return await et().send(e)},refetchInterval:e=>(e.state.data?.LoadBalancers??[]).some(e=>e.State?.Code===`provisioning`)?vx:!1}),bx=e=>a({queryKey:[`elbv2`,`loadBalancers`,e],queryFn:async()=>{let t=new Dy({LoadBalancerArns:[e]});return await et().send(t)},refetchInterval:e=>(e.state.data?.LoadBalancers?.[0])?.State?.Code===`provisioning`?vx:!1}),xx=e=>a({queryKey:[`elbv2`,`loadBalancers`,e,`attributes`],queryFn:async()=>{let t=new Ey({LoadBalancerArn:e});return await et().send(t)}}),Sx=a({queryKey:[`elbv2`,`targetGroups`],queryFn:async()=>{let e=new My({});return await et().send(e)}}),Cx=e=>a({queryKey:[`elbv2`,`targetGroups`,e],queryFn:async()=>{let t=new My({TargetGroupArns:[e]});return await et().send(t)}}),wx=e=>a({queryKey:[`elbv2`,`targetGroups`,e,`attributes`],queryFn:async()=>{let t=new jy({TargetGroupArn:e});return await et().send(t)}}),Tx=e=>a({queryKey:[`elbv2`,`listeners`,e],queryFn:async()=>{let t=new Ty({LoadBalancerArn:e});return await et().send(t)}}),Ex=e=>a({queryKey:[`elbv2`,`listeners`,e,`rules`],queryFn:async()=>{let t=new Oy({ListenerArn:e});return await et().send(t)}}),Dx=e=>a({queryKey:[`elbv2`,`targetGroups`,e,`health`],queryFn:async()=>{let t=new Ny({TargetGroupArn:e});return await et().send(t)}}),Ox=a({queryKey:[`elbv2`,`sslPolicies`],queryFn:async()=>{let e=new ky({});return await et().send(e)},staleTime:1/0}),kx=e=>a({queryKey:[`elbv2`,`tags`,...e],queryFn:async()=>{let t=new Ay({ResourceArns:e});return await et().send(t)},enabled:e.length>0}),Ax=q(`/_auth/ec2/(load-balancers)/create-load-balancer`)({loader:async({context:e})=>{await Promise.all([e.queryClient.ensureQueryData(Tb),e.queryClient.ensureQueryData(_b),e.queryClient.ensureQueryData(kb),e.queryClient.ensureQueryData(Sx),e.queryClient.ensureQueryData(_x),e.queryClient.ensureQueryData(Ox)])},head:()=>({meta:[{title:`Create Load Balancer | EC2 | Mulga`}]}),component:J(()=>R(()=>import(`./create-load-balancer.js`),__vite__mapDeps([72,1,2,3,73,4,5,6,74,7,8,33,13,45,61,51,52,10,36,18,11,29,17,34,63,35,37,38,64,62,9,39,20,65])),`component`)}),jx=q(`/_auth/ec2/(key)/import-key-pair`)({head:()=>({meta:[{title:`Import Key Pair | EC2 | Mulga`}]}),component:J(()=>R(()=>import(`./import-key-pair.js`),__vite__mapDeps([75,1,57,2,3,4,5,6,33,50,11,34,35,7,8,36,18,37,38,39,20,13,45,58])),`component`)}),Mx=q(`/_auth/ec2/(key)/create-key-pair`)({head:()=>({meta:[{title:`Create Key Pair | EC2 | Mulga`}]}),component:J(()=>R(()=>import(`./create-key-pair.js`),__vite__mapDeps([76,1,57,2,3,4,5,6,33,50,74,7,8,11,34,36,77,35,18,37,38,54,39,20,13,58])),`component`)}),Nx=q(`/_auth/ec2/(internet-gateways)/create-internet-gateway`)({head:()=>({meta:[{title:`Create Internet Gateway | EC2 | Mulga`}]}),component:J(()=>R(()=>import(`./create-internet-gateway.js`),__vite__mapDeps([78,1,57,2,3,4,5,6,33,50,11,34,35,7,8,36,18,37,38,39,20,13,58])),`component`)}),Px=q(`/_auth/ec2/(instances)/run-instances`)({loader:async({context:e})=>{await Promise.all([e.queryClient.ensureQueryData(fb),e.queryClient.ensureQueryData(mb),e.queryClient.ensureQueryData(db),e.queryClient.ensureQueryData(_b),e.queryClient.ensureQueryData(Db),e.queryClient.ensureQueryData(Tb),e.queryClient.ensureQueryData(kb)])},head:()=>({meta:[{title:`Run Instances | EC2 | Mulga`}]}),component:J(()=>R(()=>import(`./run-instances.js`),__vite__mapDeps([79,1,2,3,57,4,5,6,33,50,7,8,9,10,51,52,36,18,11,29,17,34,35,37,38,20,13,58])),`component`)}),Fx=q(`/_auth/ec2/(elastic-ips)/allocate-address`)({head:()=>({meta:[{title:`Allocate Elastic IP | EC2 | Mulga`}]}),component:J(()=>R(()=>import(`./allocate-address.js`),__vite__mapDeps([80,1,57,2,3,4,5,6,33,50,11,34,35,7,8,36,18,37,38,39,20,13,58])),`component`)}),Ix=q(`/_auth/s3/ls/$bucket`)({component:J(()=>R(()=>import(`./route2.js`),__vite__mapDeps([81,1])),`component`)}),Lx=q(`/_auth/s3/ls/$bucket/`)({loader:async({context:e,params:t})=>{await e.queryClient.ensureQueryData(Rb(t.bucket))},head:({params:e})=>({meta:[{title:`${e.bucket} | S3 | Mulga`}]}),component:J(()=>R(()=>import(`./_bucket.js`),__vite__mapDeps([82,1,2,3,32,5,4,6,33,83,7,8,77,64,84,74,29,17,34,20])),`component`)}),Rx=q(`/_auth/iam/(users)/list-users/`)({loader:async({context:e})=>{await e.queryClient.ensureQueryData(Jb)},head:()=>({meta:[{title:`Users | IAM | Mulga`}]}),component:J(()=>R(()=>import(`./list-users.js`),__vite__mapDeps([85,1,4,2,3,5,6,7,8,29,17,30,20])),`component`)}),zx=q(`/_auth/iam/(roles)/list-roles/`)({loader:async({context:e})=>{await e.queryClient.ensureQueryData(tx)},head:()=>({meta:[{title:`Roles | IAM | Mulga`}]}),component:J(()=>R(()=>import(`./list-roles.js`),__vite__mapDeps([86,1,4,2,3,5,6,7,8,29,17,30,20])),`component`)}),Bx=q(`/_auth/iam/(policies)/list-policies/`)({loader:async({context:e})=>{await e.queryClient.ensureQueryData(Zb)},head:()=>({meta:[{title:`Policies | IAM | Mulga`}]}),component:J(()=>R(()=>import(`./list-policies.js`),__vite__mapDeps([87,1,4,2,3,5,6,7,8,29,17,30,20])),`component`)}),Vx=q(`/_auth/iam/(instance-profiles)/list-instance-profiles/`)({loader:async({context:e})=>{await e.queryClient.ensureQueryData(ix)},head:()=>({meta:[{title:`Instance Profiles | IAM | Mulga`}]}),component:J(()=>R(()=>import(`./list-instance-profiles.js`),__vite__mapDeps([88,1,4,2,3,5,6,7,8,29,17,30,20])),`component`)}),Hx=3e4,Ux=3e5,Wx=a({queryKey:[`eks`,`clusters`],queryFn:async()=>{let e=new Cy({});return await lt().send(e)},staleTime:Hx}),Gx=e=>a({queryKey:[`eks`,`clusters`,e],queryFn:async()=>{let t=new _y({name:e});return await lt().send(t)},staleTime:Hx}),Kx=e=>a({queryKey:[`eks`,`clusters`,e,`nodegroups`],queryFn:async()=>{let t=new wy({clusterName:e});return await lt().send(t)},staleTime:Hx}),qx=(e,t)=>a({queryKey:[`eks`,`clusters`,e,`nodegroups`,t],queryFn:async()=>{let n=new vy({clusterName:e,nodegroupName:t});return await lt().send(n)},staleTime:Hx}),Jx=e=>a({queryKey:[`eks`,`clusters`,e,`access-entries`],queryFn:async()=>{let t=new yy({clusterName:e});return await lt().send(t)},staleTime:Hx}),Yx=(e,t)=>a({queryKey:[`eks`,`clusters`,e,`access-entries`,t],queryFn:async()=>{let n=new my({clusterName:e,principalArn:t});return await lt().send(n)},staleTime:Hx}),Xx=(e,t)=>a({queryKey:[`eks`,`clusters`,e,`access-entries`,t,`policies`],queryFn:async()=>{let n=new Sy({clusterName:e,principalArn:t});return await lt().send(n)},staleTime:Hx});a({queryKey:[`eks`,`access-policies`],queryFn:async()=>{let e=new by({});return await lt().send(e)},staleTime:Ux});var Zx=a({queryKey:[`eks`,`addon-versions`],queryFn:async()=>{let e=new gy({});return await lt().send(e)},staleTime:Ux}),Qx=e=>a({queryKey:[`eks`,`clusters`,e,`addons`],queryFn:async()=>{let t=new xy({clusterName:e});return await lt().send(t)},staleTime:Hx}),$x=(e,t)=>a({queryKey:[`eks`,`clusters`,e,`addons`,t],queryFn:async()=>{let n=new hy({clusterName:e,addonName:t});return await lt().send(n)},staleTime:Hx}),eS=q(`/_auth/eks/(clusters)/list-clusters/`)({loader:async({context:e})=>{await e.queryClient.ensureQueryData(Wx)},head:()=>({meta:[{title:`Clusters | EKS | Mulga`}]}),component:J(()=>R(()=>import(`./list-clusters.js`),__vite__mapDeps([89,1,4,2,3,5,6,7,8,29,17,30,20])),`component`)}),tS=q(`/_auth/ec2/(vpc)/describe-vpcs/`)({loader:async({context:e})=>{await e.queryClient.ensureQueryData(Tb)},head:()=>({meta:[{title:`VPCs | EC2 | Mulga`}]}),component:J(()=>R(()=>import(`./describe-vpcs.js`),__vite__mapDeps([90,1,2,3,4,5,6,7,8,29,17,30,20,21])),`component`)}),nS=q(`/_auth/ec2/(volumes)/describe-volumes/`)({loader:async({context:e})=>{await e.queryClient.ensureQueryData(Fb)},head:()=>({meta:[{title:`Volumes | EC2 | Mulga`}]}),component:J(()=>R(()=>import(`./describe-volumes.js`),__vite__mapDeps([91,1,4,2,3,5,6,7,8,29,17,30,20,21])),`component`)}),rS=q(`/_auth/ec2/(target-groups)/describe-target-groups/`)({loader:async({context:e})=>{await e.queryClient.ensureQueryData(Sx)},head:()=>({meta:[{title:`Target Groups | EC2 | Mulga`}]}),component:J(()=>R(()=>import(`./describe-target-groups.js`),__vite__mapDeps([92,1,4,2,3,5,6,7,8,16,17,29,20])),`component`)}),iS=q(`/_auth/ec2/(subnet)/describe-subnets/`)({loader:async({context:e})=>{await e.queryClient.ensureQueryData(_b)},head:()=>({meta:[{title:`Subnets | EC2 | Mulga`}]}),component:J(()=>R(()=>import(`./describe-subnets.js`),__vite__mapDeps([93,1,2,3,4,5,6,7,8,29,17,30,20,21])),`component`)}),aS=q(`/_auth/ec2/(snapshots)/describe-snapshots/`)({loader:async({context:e})=>{await e.queryClient.ensureQueryData(yb)},head:()=>({meta:[{title:`Snapshots | EC2 | Mulga`}]}),component:J(()=>R(()=>import(`./describe-snapshots.js`),__vite__mapDeps([94,1,4,2,3,5,6,7,8,29,17,30,20,21])),`component`)}),oS=q(`/_auth/ec2/(security-groups)/describe-security-groups/`)({loader:async({context:e})=>{await e.queryClient.ensureQueryData(kb)},head:()=>({meta:[{title:`Security Groups | EC2 | Mulga`}]}),component:J(()=>R(()=>import(`./describe-security-groups.js`),__vite__mapDeps([95,1,4,2,3,5,6,7,8,29,17,30,20])),`component`)}),sS=q(`/_auth/ec2/(route-tables)/describe-route-tables/`)({loader:async({context:e})=>{await e.queryClient.ensureQueryData(Cb)},head:()=>({meta:[{title:`Route Tables | EC2 | Mulga`}]}),component:J(()=>R(()=>import(`./describe-route-tables.js`),__vite__mapDeps([96,1,2,3,4,5,6,7,8,29,17,30,20,22])),`component`)}),cS=q(`/_auth/ec2/(placement-groups)/describe-placement-groups/`)({loader:async({context:e})=>{await e.queryClient.ensureQueryData(Db)},head:()=>({meta:[{title:`Placement Groups | EC2 | Mulga`}]}),component:J(()=>R(()=>import(`./describe-placement-groups.js`),__vite__mapDeps([97,1,4,2,3,5,6,7,8,29,17,30,20,21])),`component`)}),lS=q(`/_auth/ec2/(nat-gateways)/describe-nat-gateways/`)({loader:async({context:e})=>{await e.queryClient.ensureQueryData(Nb)},head:()=>({meta:[{title:`NAT Gateways | EC2 | Mulga`}]}),component:J(()=>R(()=>import(`./describe-nat-gateways.js`),__vite__mapDeps([98,1,2,3,4,5,6,7,8,29,17,30,20,21])),`component`)}),uS=q(`/_auth/ec2/(load-balancers)/describe-load-balancers/`)({loader:async({context:e})=>{await e.queryClient.ensureQueryData(yx)},head:()=>({meta:[{title:`Load Balancers | EC2 | Mulga`}]}),component:J(()=>R(()=>import(`./describe-load-balancers.js`),__vite__mapDeps([99,1,2,3,4,5,6,7,8,29,17,20,21])),`component`)}),dS=q(`/_auth/ec2/(key)/describe-key-pairs/`)({loader:async({context:e})=>{await e.queryClient.ensureQueryData(mb)},head:()=>({meta:[{title:`Key Pairs | EC2 | Mulga`}]}),component:J(()=>R(()=>import(`./describe-key-pairs.js`),__vite__mapDeps([100,1,4,2,3,5,6,7,8,29,17,30,20])),`component`)}),fS=q(`/_auth/ec2/(internet-gateways)/describe-internet-gateways/`)({loader:async({context:e})=>{await e.queryClient.ensureQueryData(xb)},head:()=>({meta:[{title:`Internet Gateways | EC2 | Mulga`}]}),component:J(()=>R(()=>import(`./describe-internet-gateways.js`),__vite__mapDeps([101,1,2,3,4,5,6,7,8,29,17,30,20])),`component`)}),pS=q(`/_auth/ec2/(instances)/describe-instances/`)({loader:async({context:e})=>{await e.queryClient.ensureQueryData(cb)},head:()=>({meta:[{title:`Instances | EC2 | Mulga`}]}),component:J(()=>R(()=>import(`./describe-instances.js`),__vite__mapDeps([102,1,4,2,3,5,6,7,8,29,17,30,20,21])),`component`)}),mS=q(`/_auth/ec2/(images)/describe-images/`)({loader:async({context:e})=>{await e.queryClient.ensureQueryData(fb)},head:()=>({meta:[{title:`Images | EC2 | Mulga`}]}),component:J(()=>R(()=>import(`./describe-images.js`),__vite__mapDeps([103,1,29,17,30,4,2,3,5,6,20,21,55])),`component`)}),hS=q(`/_auth/ec2/(elastic-ips)/describe-addresses/`)({loader:async({context:e})=>{await e.queryClient.ensureQueryData(jb)},head:()=>({meta:[{title:`Elastic IPs | EC2 | Mulga`}]}),component:J(()=>R(()=>import(`./describe-addresses.js`),__vite__mapDeps([104,1,2,3,4,5,6,7,8,29,17,30,20])),`component`)}),gS=q(`/_auth/s3/ls/$bucket/$`)({loader:async({context:e,params:t})=>{let n=mn(t._splat??``);await e.queryClient.ensureQueryData(Rb(t.bucket,n))},head:({params:e})=>({meta:[{title:`${$t(e._splat??``,`${e.bucket}/`)} | S3 | Mulga`}]}),component:J(()=>R(()=>import(`./_.js`),__vite__mapDeps([105,1,2,3,32,5,4,6,33,83,7,8,77,64,84,74,29,17,34])),`component`)}),_S=q(`/_auth/iam/(users)/list-users/$userName`)({loader:async({context:e,params:t})=>{await Promise.all([e.queryClient.ensureQueryData(Yb(t.userName)),e.queryClient.ensureQueryData(Xb(t.userName)),e.queryClient.ensureQueryData(ex(t.userName)),e.queryClient.ensureQueryData(Zb)])},head:({params:e})=>({meta:[{title:`${e.userName} | IAM | Mulga`}]}),component:J(()=>R(()=>import(`./_userName.js`),__vite__mapDeps([106,1,2,3,41,4,5,6,33,74,7,8,29,17,34,36,64,54,84,107,20,21,38])),`component`)}),vS=q(`/_auth/iam/(roles)/list-roles/$roleName`)({loader:async({context:e,params:t})=>{await Promise.all([e.queryClient.ensureQueryData(nx(t.roleName)),e.queryClient.ensureQueryData(rx(t.roleName)),e.queryClient.ensureQueryData(ox(t.roleName)),e.queryClient.ensureQueryData(Zb)])},head:({params:e})=>({meta:[{title:`${e.roleName} | IAM | Mulga`}]}),component:J(()=>R(()=>import(`./_roleName.js`),__vite__mapDeps([108,1,2,3,4,5,6,41,33,7,8,29,17,34,64,84,74,107,20,109])),`component`)}),yS=q(`/_auth/iam/(policies)/list-policies/$policyArn`)({loader:async({context:e,params:t})=>{let n=decodeURIComponent(t.policyArn),r=await e.queryClient.ensureQueryData(Qb(n)),i=r.Policy?.DefaultVersionId;return i&&await e.queryClient.ensureQueryData($b(n,i)),r},head:({loaderData:e})=>({meta:[{title:`${e?.Policy?.PolicyName??`Policy`} | IAM | Mulga`}]}),component:J(()=>R(()=>import(`./_policyArn.js`),__vite__mapDeps([110,1,2,3,41,4,5,6,33,7,8,29,17,34,64,84,74,107,20,109])),`component`)}),bS=q(`/_auth/iam/(instance-profiles)/list-instance-profiles/$instanceProfileName`)({loader:async({context:e,params:t})=>{await Promise.all([e.queryClient.ensureQueryData(ax(t.instanceProfileName)),e.queryClient.ensureQueryData(tx)])},head:({params:e})=>({meta:[{title:`${e.instanceProfileName} | IAM | Mulga`}]}),component:J(()=>R(()=>import(`./_instanceProfileName.js`),__vite__mapDeps([111,1,2,3,4,5,6,41,33,7,8,29,17,34,64,84,74,107,20])),`component`)}),xS=q(`/_auth/eks/(clusters)/list-clusters/$clusterName`)({loader:async({context:e,params:t})=>{await Promise.all([e.queryClient.ensureQueryData(Gx(t.clusterName)),e.queryClient.ensureQueryData(Kx(t.clusterName)),e.queryClient.ensureQueryData(Jx(t.clusterName))])},head:({params:e})=>({meta:[{title:`${e.clusterName} | EKS | Mulga`}]}),component:J(()=>R(()=>import(`./_clusterName.js`),__vite__mapDeps([112,1,2,3,4,5,6,49,33,43,50,74,7,8,113,52,10,11,16,17,29,34,35,36,18,37,38,64,84,107,20,22,13,45])),`component`)}),SS=q(`/_auth/ec2/(vpc)/describe-vpcs/$id`)({loader:async({context:e,params:t})=>{await Promise.all([e.queryClient.ensureQueryData(Eb(t.id)),e.queryClient.ensureQueryData(_b)])},head:({params:e})=>({meta:[{title:`${e.id} | VPC | Mulga`}]}),component:J(()=>R(()=>import(`./_id16.js`),__vite__mapDeps([114,1,2,3,4,5,6,57,33,50,7,8,29,17,34,64,84,74,107,20,21])),`component`)}),CS=q(`/_auth/ec2/(volumes)/modify-volume/$id`)({loader:async({context:e,params:t})=>{await e.queryClient.ensureQueryData(Ib(t.id))},head:({params:e})=>({meta:[{title:`Resize ${e.id} | EC2 | Mulga`}]}),component:J(()=>R(()=>import(`./_id15.js`),__vite__mapDeps([115,1,57,2,3,4,5,6,33,50,11,29,17,34,39,7,8,20,13,58])),`component`)}),wS=q(`/_auth/ec2/(volumes)/describe-volumes/$id`)({loader:async({context:e,params:t})=>{await Promise.all([e.queryClient.ensureQueryData(Ib(t.id)),e.queryClient.ensureQueryData(cb)])},head:({params:e})=>({meta:[{title:`${e.id} | EC2 | Mulga`}]}),component:J(()=>R(()=>import(`./_id14.js`),__vite__mapDeps([116,1,2,3,4,5,6,57,33,50,74,7,8,51,52,10,36,18,29,17,34,64,84,107,20,21,13])),`component`)}),TS=q(`/_auth/ec2/(target-groups)/describe-target-groups/$id`)({loader:async({context:e,params:t})=>{let n=decodeURIComponent(t.id);await Promise.all([e.queryClient.ensureQueryData(Cx(n)),e.queryClient.ensureQueryData(wx(n)),e.queryClient.ensureQueryData(kx([n])),e.queryClient.ensureQueryData(cb)])},head:({params:e})=>({meta:[{title:`${decodeURIComponent(e.id)} | Target Group | Mulga`}]}),component:J(()=>R(()=>import(`./_id13.js`),__vite__mapDeps([117,1,2,3,61,4,5,6,33,74,7,8,113,52,10,16,17,29,34,64,84,107,118,51,36,18,63,13,20])),`component`)}),ES=q(`/_auth/ec2/(subnet)/describe-subnets/$id`)({loader:async({context:e,params:t})=>{await e.queryClient.ensureQueryData(vb(t.id))},head:({params:e})=>({meta:[{title:`${e.id} | Subnet | Mulga`}]}),component:J(()=>R(()=>import(`./_id12.js`),__vite__mapDeps([119,1,2,3,4,5,6,57,33,50,7,8,29,17,34,64,84,74,107,20,21])),`component`)}),DS=q(`/_auth/ec2/(snapshots)/describe-snapshots/$id`)({loader:async({context:e,params:t})=>{await Promise.all([e.queryClient.ensureQueryData(bb(t.id)),e.queryClient.ensureQueryData(gb)])},head:({params:e})=>({meta:[{title:`${e.id} | EC2 | Mulga`}]}),component:J(()=>R(()=>import(`./_id11.js`),__vite__mapDeps([120,1,2,3,4,5,6,57,33,50,74,7,8,29,17,34,37,64,84,107,20,21,13])),`component`)}),OS=q(`/_auth/ec2/(security-groups)/describe-security-groups/$id`)({loader:async({context:e,params:t})=>{await e.queryClient.ensureQueryData(Ab(t.id))},head:({params:e})=>({meta:[{title:`${e.id} | Security Group | Mulga`}]}),component:J(()=>R(()=>import(`./_id10.js`),__vite__mapDeps([121,1,4,2,3,5,6,57,33,50,74,7,8,51,52,10,36,18,11,29,17,34,63,64,84,107,20,13,58])),`component`)}),kS=q(`/_auth/ec2/(route-tables)/describe-route-tables/$id`)({loader:async({context:e,params:t})=>{await Promise.all([e.queryClient.ensureQueryData(wb(t.id)),e.queryClient.ensureQueryData(xb),e.queryClient.ensureQueryData(Nb),e.queryClient.ensureQueryData(_b)])},head:({params:e})=>({meta:[{title:`${e.id} | Route Table | Mulga`}]}),component:J(()=>R(()=>import(`./_id9.js`),__vite__mapDeps([122,1,2,3,4,5,6,57,33,50,7,8,51,52,10,36,18,11,29,17,34,64,84,74,107,20,22,13,58])),`component`)}),AS=q(`/_auth/ec2/(placement-groups)/describe-placement-groups/$id`)({loader:async({context:e,params:t})=>{await Promise.all([e.queryClient.ensureQueryData(Ob(t.id)),e.queryClient.ensureQueryData(cb)])},head:({params:e})=>({meta:[{title:`${e.id} | EC2 | Mulga`}]}),component:J(()=>R(()=>import(`./_id8.js`),__vite__mapDeps([123,1,4,2,3,5,6,57,33,50,7,8,29,17,34,64,84,74,107,20,21])),`component`)}),jS=q(`/_auth/ec2/(nat-gateways)/describe-nat-gateways/$id`)({loader:async({context:e,params:t})=>{await e.queryClient.ensureQueryData(Pb(t.id))},head:({params:e})=>({meta:[{title:`${e.id} | NAT Gateway | Mulga`}]}),component:J(()=>R(()=>import(`./_id7.js`),__vite__mapDeps([124,1,2,3,4,5,6,57,33,50,7,8,29,17,34,64,84,74,107,20,21])),`component`)}),MS=q(`/_auth/ec2/(load-balancers)/describe-load-balancers/$id`)({loader:async({context:e,params:t})=>{let n=decodeURIComponent(t.id);await Promise.all([e.queryClient.ensureQueryData(bx(n)),e.queryClient.ensureQueryData(Tx(n)),e.queryClient.ensureQueryData(xx(n)),e.queryClient.ensureQueryData(kx([n])),e.queryClient.ensureQueryData(Sx),e.queryClient.ensureQueryData(_b)])},head:({params:e})=>({meta:[{title:`${decodeURIComponent(e.id)} | Load Balancer | Mulga`}]}),component:J(()=>R(()=>import(`./_id6.js`),__vite__mapDeps([125,1,2,3,73,4,5,6,74,7,8,33,13,45,61,51,52,10,36,18,113,11,29,17,34,64,84,107,118,63,20,21,65])),`component`)}),NS=q(`/_auth/ec2/(key)/describe-key-pairs/$id`)({loader:async({context:e,params:t})=>await e.queryClient.ensureQueryData(hb(t.id)),head:({loaderData:e})=>({meta:[{title:`${e?.KeyPairs?.[0]?.KeyName??`Key Pair`} | EC2 | Mulga`}]}),component:J(()=>R(()=>import(`./_id5.js`),__vite__mapDeps([126,1,2,3,57,4,5,6,33,50,7,8,29,17,34,64,84,74,107,20])),`component`)}),PS=q(`/_auth/ec2/(internet-gateways)/describe-internet-gateways/$id`)({loader:async({context:e,params:t})=>{await Promise.all([e.queryClient.ensureQueryData(Sb(t.id)),e.queryClient.ensureQueryData(Tb)])},head:({params:e})=>({meta:[{title:`${e.id} | Internet Gateway | Mulga`}]}),component:J(()=>R(()=>import(`./_id4.js`),__vite__mapDeps([127,1,2,3,4,5,6,57,33,50,7,8,51,52,10,36,18,29,17,34,64,84,74,107,20])),`component`)}),FS=q(`/_auth/ec2/(instances)/describe-instances/$id`)({loader:async({context:e,params:t})=>{let[n]=await Promise.all([e.queryClient.ensureQueryData(lb(t.id)),e.queryClient.ensureQueryData(db)]),r=n.Reservations?.[0]?.Instances?.[0]?.ImageId;return await e.queryClient.ensureQueryData(pb(r)),n},head:({loaderData:e})=>({meta:[{title:`${e?.Reservations?.[0]?.Instances?.[0]?.InstanceId??`Instance`} | EC2 | Mulga`}]}),component:J(()=>R(()=>import(`./_id3.js`),__vite__mapDeps([128,1,2,3,4,5,6,57,33,50,74,7,8,51,52,10,36,18,16,17,29,34,53,64,84,107,20,21,13,45,23,24,129])),`component`)}),IS=q(`/_auth/ec2/(images)/describe-images/$id`)({loader:async({context:e,params:t})=>await e.queryClient.ensureQueryData(pb(t.id)),head:({loaderData:e})=>({meta:[{title:`${e?.Images?.[0]?.Name??`Image`} | EC2 | Mulga`}]}),component:J(()=>R(()=>import(`./_id2.js`),__vite__mapDeps([130,1,29,17,34,4,2,3,5,6,20,21,55,129,107])),`component`)}),LS=q(`/_auth/ec2/(elastic-ips)/describe-addresses/$id`)({loader:async({context:e,params:t})=>{await Promise.all([e.queryClient.ensureQueryData(Mb(t.id)),e.queryClient.ensureQueryData(cb)])},head:({params:e})=>({meta:[{title:`${e.id} | Elastic IP | Mulga`}]}),component:J(()=>R(()=>import(`./_id.js`),__vite__mapDeps([131,1,2,3,57,4,5,6,33,50,7,8,51,52,10,36,18,29,17,34,64,84,74,107,20])),`component`)}),RS=ab.update({id:`/login`,path:`/login`,getParentRoute:()=>ib}),$=ob.update({id:`/_auth`,getParentRoute:()=>ib}),zS=zb.update({id:`/`,path:`/`,getParentRoute:()=>$}),BS=Bb.update({id:`/nodes`,path:`/nodes`,getParentRoute:()=>$}),VS=Vb.update({id:`/s3/service-metrics`,path:`/s3/service-metrics`,getParentRoute:()=>$}),HS=Hb.update({id:`/s3/ls/`,path:`/s3/ls/`,getParentRoute:()=>$}),US=Ub.update({id:`/s3/(buckets)/create-bucket`,path:`/s3/create-bucket`,getParentRoute:()=>$}),WS=Wb.update({id:`/iam/(users)/create-user`,path:`/iam/create-user`,getParentRoute:()=>$}),GS=Gb.update({id:`/iam/(roles)/create-role`,path:`/iam/create-role`,getParentRoute:()=>$}),KS=Kb.update({id:`/iam/(policies)/create-policy`,path:`/iam/create-policy`,getParentRoute:()=>$}),qS=qb.update({id:`/iam/(instance-profiles)/create-instance-profile`,path:`/iam/create-instance-profile`,getParentRoute:()=>$}),JS=sx.update({id:`/eks/(clusters)/create-cluster`,path:`/eks/create-cluster`,getParentRoute:()=>$}),YS=cx.update({id:`/ec2/(vpc)/create-vpc`,path:`/ec2/create-vpc`,getParentRoute:()=>$}),XS=lx.update({id:`/ec2/(volumes)/create-volume`,path:`/ec2/create-volume`,getParentRoute:()=>$}),ZS=ux.update({id:`/ec2/(target-groups)/create-target-group`,path:`/ec2/create-target-group`,getParentRoute:()=>$}),QS=dx.update({id:`/ec2/(subnet)/create-subnet`,path:`/ec2/create-subnet`,getParentRoute:()=>$}),$S=fx.update({id:`/ec2/(snapshots)/create-snapshot`,path:`/ec2/create-snapshot`,getParentRoute:()=>$}),eC=px.update({id:`/ec2/(security-groups)/create-security-group`,path:`/ec2/create-security-group`,getParentRoute:()=>$}),tC=mx.update({id:`/ec2/(route-tables)/create-route-table`,path:`/ec2/create-route-table`,getParentRoute:()=>$}),nC=hx.update({id:`/ec2/(placement-groups)/create-placement-group`,path:`/ec2/create-placement-group`,getParentRoute:()=>$}),rC=gx.update({id:`/ec2/(nat-gateways)/create-nat-gateway`,path:`/ec2/create-nat-gateway`,getParentRoute:()=>$}),iC=Ax.update({id:`/ec2/(load-balancers)/create-load-balancer`,path:`/ec2/create-load-balancer`,getParentRoute:()=>$}),aC=jx.update({id:`/ec2/(key)/import-key-pair`,path:`/ec2/import-key-pair`,getParentRoute:()=>$}),oC=Mx.update({id:`/ec2/(key)/create-key-pair`,path:`/ec2/create-key-pair`,getParentRoute:()=>$}),sC=Nx.update({id:`/ec2/(internet-gateways)/create-internet-gateway`,path:`/ec2/create-internet-gateway`,getParentRoute:()=>$}),cC=Px.update({id:`/ec2/(instances)/run-instances`,path:`/ec2/run-instances`,getParentRoute:()=>$}),lC=Fx.update({id:`/ec2/(elastic-ips)/allocate-address`,path:`/ec2/allocate-address`,getParentRoute:()=>$}),uC=Ix.update({id:`/s3/ls/$bucket`,path:`/s3/ls/$bucket`,getParentRoute:()=>$}),dC=Lx.update({id:`/`,path:`/`,getParentRoute:()=>uC}),fC=Rx.update({id:`/iam/(users)/list-users/`,path:`/iam/list-users/`,getParentRoute:()=>$}),pC=zx.update({id:`/iam/(roles)/list-roles/`,path:`/iam/list-roles/`,getParentRoute:()=>$}),mC=Bx.update({id:`/iam/(policies)/list-policies/`,path:`/iam/list-policies/`,getParentRoute:()=>$}),hC=Vx.update({id:`/iam/(instance-profiles)/list-instance-profiles/`,path:`/iam/list-instance-profiles/`,getParentRoute:()=>$}),gC=eS.update({id:`/eks/(clusters)/list-clusters/`,path:`/eks/list-clusters/`,getParentRoute:()=>$}),_C=tS.update({id:`/ec2/(vpc)/describe-vpcs/`,path:`/ec2/describe-vpcs/`,getParentRoute:()=>$}),vC=nS.update({id:`/ec2/(volumes)/describe-volumes/`,path:`/ec2/describe-volumes/`,getParentRoute:()=>$}),yC=rS.update({id:`/ec2/(target-groups)/describe-target-groups/`,path:`/ec2/describe-target-groups/`,getParentRoute:()=>$}),bC=iS.update({id:`/ec2/(subnet)/describe-subnets/`,path:`/ec2/describe-subnets/`,getParentRoute:()=>$}),xC=aS.update({id:`/ec2/(snapshots)/describe-snapshots/`,path:`/ec2/describe-snapshots/`,getParentRoute:()=>$}),SC=oS.update({id:`/ec2/(security-groups)/describe-security-groups/`,path:`/ec2/describe-security-groups/`,getParentRoute:()=>$}),CC=sS.update({id:`/ec2/(route-tables)/describe-route-tables/`,path:`/ec2/describe-route-tables/`,getParentRoute:()=>$}),wC=cS.update({id:`/ec2/(placement-groups)/describe-placement-groups/`,path:`/ec2/describe-placement-groups/`,getParentRoute:()=>$}),TC=lS.update({id:`/ec2/(nat-gateways)/describe-nat-gateways/`,path:`/ec2/describe-nat-gateways/`,getParentRoute:()=>$}),EC=uS.update({id:`/ec2/(load-balancers)/describe-load-balancers/`,path:`/ec2/describe-load-balancers/`,getParentRoute:()=>$}),DC=dS.update({id:`/ec2/(key)/describe-key-pairs/`,path:`/ec2/describe-key-pairs/`,getParentRoute:()=>$}),OC=fS.update({id:`/ec2/(internet-gateways)/describe-internet-gateways/`,path:`/ec2/describe-internet-gateways/`,getParentRoute:()=>$}),kC=pS.update({id:`/ec2/(instances)/describe-instances/`,path:`/ec2/describe-instances/`,getParentRoute:()=>$}),AC=mS.update({id:`/ec2/(images)/describe-images/`,path:`/ec2/describe-images/`,getParentRoute:()=>$}),jC=hS.update({id:`/ec2/(elastic-ips)/describe-addresses/`,path:`/ec2/describe-addresses/`,getParentRoute:()=>$}),MC=gS.update({id:`/$`,path:`/$`,getParentRoute:()=>uC}),NC=_S.update({id:`/iam/(users)/list-users/$userName`,path:`/iam/list-users/$userName`,getParentRoute:()=>$}),PC=vS.update({id:`/iam/(roles)/list-roles/$roleName`,path:`/iam/list-roles/$roleName`,getParentRoute:()=>$}),FC=yS.update({id:`/iam/(policies)/list-policies/$policyArn`,path:`/iam/list-policies/$policyArn`,getParentRoute:()=>$}),IC=bS.update({id:`/iam/(instance-profiles)/list-instance-profiles/$instanceProfileName`,path:`/iam/list-instance-profiles/$instanceProfileName`,getParentRoute:()=>$}),LC=xS.update({id:`/eks/(clusters)/list-clusters/$clusterName`,path:`/eks/list-clusters/$clusterName`,getParentRoute:()=>$}),RC=SS.update({id:`/ec2/(vpc)/describe-vpcs/$id`,path:`/ec2/describe-vpcs/$id`,getParentRoute:()=>$}),zC=CS.update({id:`/ec2/(volumes)/modify-volume/$id`,path:`/ec2/modify-volume/$id`,getParentRoute:()=>$}),BC=wS.update({id:`/ec2/(volumes)/describe-volumes/$id`,path:`/ec2/describe-volumes/$id`,getParentRoute:()=>$}),VC=TS.update({id:`/ec2/(target-groups)/describe-target-groups/$id`,path:`/ec2/describe-target-groups/$id`,getParentRoute:()=>$}),HC=ES.update({id:`/ec2/(subnet)/describe-subnets/$id`,path:`/ec2/describe-subnets/$id`,getParentRoute:()=>$}),UC=DS.update({id:`/ec2/(snapshots)/describe-snapshots/$id`,path:`/ec2/describe-snapshots/$id`,getParentRoute:()=>$}),WC=OS.update({id:`/ec2/(security-groups)/describe-security-groups/$id`,path:`/ec2/describe-security-groups/$id`,getParentRoute:()=>$}),GC=kS.update({id:`/ec2/(route-tables)/describe-route-tables/$id`,path:`/ec2/describe-route-tables/$id`,getParentRoute:()=>$}),KC=AS.update({id:`/ec2/(placement-groups)/describe-placement-groups/$id`,path:`/ec2/describe-placement-groups/$id`,getParentRoute:()=>$}),qC=jS.update({id:`/ec2/(nat-gateways)/describe-nat-gateways/$id`,path:`/ec2/describe-nat-gateways/$id`,getParentRoute:()=>$}),JC=MS.update({id:`/ec2/(load-balancers)/describe-load-balancers/$id`,path:`/ec2/describe-load-balancers/$id`,getParentRoute:()=>$}),YC=NS.update({id:`/ec2/(key)/describe-key-pairs/$id`,path:`/ec2/describe-key-pairs/$id`,getParentRoute:()=>$}),XC=PS.update({id:`/ec2/(internet-gateways)/describe-internet-gateways/$id`,path:`/ec2/describe-internet-gateways/$id`,getParentRoute:()=>$}),ZC=FS.update({id:`/ec2/(instances)/describe-instances/$id`,path:`/ec2/describe-instances/$id`,getParentRoute:()=>$}),QC=IS.update({id:`/ec2/(images)/describe-images/$id`,path:`/ec2/describe-images/$id`,getParentRoute:()=>$}),$C=LS.update({id:`/ec2/(elastic-ips)/describe-addresses/$id`,path:`/ec2/describe-addresses/$id`,getParentRoute:()=>$}),ew={AuthS3LsBucketSplatRoute:MC,AuthS3LsBucketIndexRoute:dC},tw={AuthNodesRoute:BS,AuthIndexRoute:zS,AuthS3ServiceMetricsRoute:VS,AuthS3LsBucketRouteRoute:uC._addFileChildren(ew),AuthEc2elasticIpsAllocateAddressRoute:lC,AuthEc2instancesRunInstancesRoute:cC,AuthEc2internetGatewaysCreateInternetGatewayRoute:sC,AuthEc2keyCreateKeyPairRoute:oC,AuthEc2keyImportKeyPairRoute:aC,AuthEc2loadBalancersCreateLoadBalancerRoute:iC,AuthEc2natGatewaysCreateNatGatewayRoute:rC,AuthEc2placementGroupsCreatePlacementGroupRoute:nC,AuthEc2routeTablesCreateRouteTableRoute:tC,AuthEc2securityGroupsCreateSecurityGroupRoute:eC,AuthEc2snapshotsCreateSnapshotRoute:$S,AuthEc2subnetCreateSubnetRoute:QS,AuthEc2targetGroupsCreateTargetGroupRoute:ZS,AuthEc2volumesCreateVolumeRoute:XS,AuthEc2vpcCreateVpcRoute:YS,AuthEksclustersCreateClusterRoute:JS,AuthIaminstanceProfilesCreateInstanceProfileRoute:qS,AuthIampoliciesCreatePolicyRoute:KS,AuthIamrolesCreateRoleRoute:GS,AuthIamusersCreateUserRoute:WS,AuthS3bucketsCreateBucketRoute:US,AuthS3LsIndexRoute:HS,AuthEc2elasticIpsDescribeAddressesIdRoute:$C,AuthEc2imagesDescribeImagesIdRoute:QC,AuthEc2instancesDescribeInstancesIdRoute:ZC,AuthEc2internetGatewaysDescribeInternetGatewaysIdRoute:XC,AuthEc2keyDescribeKeyPairsIdRoute:YC,AuthEc2loadBalancersDescribeLoadBalancersIdRoute:JC,AuthEc2natGatewaysDescribeNatGatewaysIdRoute:qC,AuthEc2placementGroupsDescribePlacementGroupsIdRoute:KC,AuthEc2routeTablesDescribeRouteTablesIdRoute:GC,AuthEc2securityGroupsDescribeSecurityGroupsIdRoute:WC,AuthEc2snapshotsDescribeSnapshotsIdRoute:UC,AuthEc2subnetDescribeSubnetsIdRoute:HC,AuthEc2targetGroupsDescribeTargetGroupsIdRoute:VC,AuthEc2volumesDescribeVolumesIdRoute:BC,AuthEc2volumesModifyVolumeIdRoute:zC,AuthEc2vpcDescribeVpcsIdRoute:RC,AuthEksclustersListClustersClusterNameRoute:LC,AuthIaminstanceProfilesListInstanceProfilesInstanceProfileNameRoute:IC,AuthIampoliciesListPoliciesPolicyArnRoute:FC,AuthIamrolesListRolesRoleNameRoute:PC,AuthIamusersListUsersUserNameRoute:NC,AuthEc2elasticIpsDescribeAddressesIndexRoute:jC,AuthEc2imagesDescribeImagesIndexRoute:AC,AuthEc2instancesDescribeInstancesIndexRoute:kC,AuthEc2internetGatewaysDescribeInternetGatewaysIndexRoute:OC,AuthEc2keyDescribeKeyPairsIndexRoute:DC,AuthEc2loadBalancersDescribeLoadBalancersIndexRoute:EC,AuthEc2natGatewaysDescribeNatGatewaysIndexRoute:TC,AuthEc2placementGroupsDescribePlacementGroupsIndexRoute:wC,AuthEc2routeTablesDescribeRouteTablesIndexRoute:CC,AuthEc2securityGroupsDescribeSecurityGroupsIndexRoute:SC,AuthEc2snapshotsDescribeSnapshotsIndexRoute:xC,AuthEc2subnetDescribeSubnetsIndexRoute:bC,AuthEc2targetGroupsDescribeTargetGroupsIndexRoute:yC,AuthEc2volumesDescribeVolumesIndexRoute:vC,AuthEc2vpcDescribeVpcsIndexRoute:_C,AuthEksclustersListClustersIndexRoute:gC,AuthIaminstanceProfilesListInstanceProfilesIndexRoute:hC,AuthIampoliciesListPoliciesIndexRoute:mC,AuthIamrolesListRolesIndexRoute:pC,AuthIamusersListUsersIndexRoute:fC},nw={AuthRouteRoute:$._addFileChildren(tw),LoginRoute:RS},rw=ib._addFileChildren(nw)._addFileTypes(),iw=Zy(),aw=es({routeTree:rw,context:{queryClient:iw},defaultPreload:`intent`,scrollRestoration:!0,defaultStructuralSharing:!0,defaultPreloadStaleTime:0}),ow=document.querySelector(`#app`);ow&&!ow.innerHTML&&ps.createRoot(ow).render((0,W.jsx)(U.StrictMode,{children:(0,W.jsx)(_s,{defaultTheme:`dark`,storageKey:`spinifex-ui-theme`,children:(0,W.jsx)(Pi,{client:iw,children:(0,W.jsx)(Kv,{children:(0,W.jsx)(cg,{children:(0,W.jsx)(rs,{router:aw})})})})})}));export{Zb as $,Al as $n,Mr as $r,Nm as $t,Wx as A,X as An,Ls as Ar,bb as At,kx as B,Su as Bn,fi as Br,Hv as Bt,Jx as C,Pd as Cn,ic as Cr,Ob as Ct,Qx as D,id as Dn,Ys as Dr,Cb as Dt,Zx as E,ld as En,Zs as Er,wb as Et,Tx as F,Bu as Fn,Yo as Fr,Fb as Ft,_x as G,_u as Gn,Lr as Gr,kh as Gt,Cx as H,bu as Hn,ci as Hr,Bh as Ht,xx as I,zu as In,No as Ir,Eb as It,rx as J,cu as Jn,Vr as Jr,Km as Jt,fx as K,du as Kn,ti as Kr,eh as Kt,bx as L,Du as Ln,Ni as Lr,Tb as Lt,Kx as M,Wu as Mn,Ns as Mr,vb as Mt,Lx as N,Uu as Nn,ks as Nr,_b as Nt,Xx as O,ad as On,qs as Or,Ab as Ot,Ex as P,Vu as Pn,ys as Pr,Ib as Pt,ix as Q,Nl as Qn,Pr as Qr,Pm as Qt,yx as R,Eu as Rn,Di as Rr,ab as Rt,gS as S,Nd as Sn,lc as Sr,Nb as St,$x as T,Sd as Tn,$s as Tr,gb as Tt,Sx as U,yu as Un,Kr as Ur,zh as Ut,wx as V,xu as Vn,li as Vr,Fv as Vt,Dx as W,mu as Wn,zr as Wr,Lh as Wt,ax as X,kl as Xn,oi as Xr,Im as Xt,ex as Y,jl as Yn,Xr as Yr,Lm as Yt,ox as Z,Ml as Zn,Br as Zr,Fm as Zt,xS as _,_p as _n,xc as _r,Sb as _t,NS as a,Tm as an,wl as ar,Jb as at,vS as b,Xd as bn,mc as br,mb as bt,AS as c,xm as cn,Jc as cr,Mb as ct,DS as d,Cm as dn,Bc as dr,ub as dt,jr as ei,gm as en,Ol as er,Qb as et,ES as f,Om as fn,Rc as fr,pb as ft,SS as g,xp as gn,Nc as gr,cb as gt,CS as h,Ep as hn,Mc as hr,db as ht,PS as i,hm as in,Pl as ir,Yb as it,qx as j,Gu as jn,Is as jr,yb as jt,Gx as k,td as kn,Vs as kr,kb as kt,kS as l,Em as ln,Gc as lr,jb as lt,wS as m,Gp as mn,jc as mr,lb as mt,IS as n,_m as nn,Il as nr,nx as nt,MS as o,ym as on,Yc as or,Rb as ot,TS as p,km as pn,Pc as pr,fb as pt,Xb as q,fu as qn,Hr as qr,Qm as qt,FS as r,vm as rn,El as rr,tx as rt,jS as s,bm as sn,qc as sr,Lb as st,LS as t,wm as tn,Dl as tr,$b as tt,OS as u,Sm as un,Hc as ur,sb as ut,bS as v,Q as vn,bc as vr,xb as vt,Yx as w,kd as wn,rc as wr,Db as wt,_S as x,Ud as xn,fc as xr,Pb as xt,yS as y,Rf as yn,hc as yr,hb as yt,Ox as z,Cu as zn,Ci as zr,qv as zt}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/json.js b/spinifex/services/spinifexui/frontend/dist/assets/json.js new file mode 100644 index 000000000..2165d8729 --- /dev/null +++ b/spinifex/services/spinifexui/frontend/dist/assets/json.js @@ -0,0 +1 @@ +import{f as e}from"./auth.js";function t(e){try{return JSON.parse(e),!0}catch{return!1}}function n(n){let{label:r,allowEmpty:i=!1}=n;return(i?e():e().min(1,`${r} is required`)).refine(e=>i&&e.trim()===``?!0:t(e),{message:`${r} must be valid JSON`})}export{n as t}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/src/contexts/admin-context.test.tsx b/spinifex/services/spinifexui/frontend/src/contexts/admin-context.test.tsx index 32c6f73c9..b527584dc 100644 --- a/spinifex/services/spinifexui/frontend/src/contexts/admin-context.test.tsx +++ b/spinifex/services/spinifexui/frontend/src/contexts/admin-context.test.tsx @@ -17,7 +17,7 @@ vi.mock("@/lib/sts", () => ({ })) vi.mock("@/lib/signed-fetch", () => ({ - signedFetch: async (opts: unknown) => mockSignedFetch(opts), + signedFetch: async (opts: unknown) => await mockSignedFetch(opts), })) vi.mock("@aws-sdk/client-sts", () => ({ diff --git a/spinifex/services/spinifexui/frontend/src/lib/json.test.ts b/spinifex/services/spinifexui/frontend/src/lib/json.test.ts new file mode 100644 index 000000000..e423ee989 --- /dev/null +++ b/spinifex/services/spinifexui/frontend/src/lib/json.test.ts @@ -0,0 +1,55 @@ +import { describe, expect, it } from "vitest" + +import { isValidJson, jsonStringSchema } from "./json" + +type JsonSchema = ReturnType + +function issueMessages(schema: JsonSchema, value: string): string[] { + const result = schema.safeParse(value) + return result.success ? [] : result.error.issues.map((issue) => issue.message) +} + +describe("isValidJson", () => { + it("accepts valid JSON", () => { + expect(isValidJson('{"a":1}')).toBeTruthy() + expect(isValidJson("[]")).toBeTruthy() + expect(isValidJson('"str"')).toBeTruthy() + }) + + it("rejects malformed JSON and empty strings", () => { + expect(isValidJson("{")).toBeFalsy() + expect(isValidJson("{a:1}")).toBeFalsy() + expect(isValidJson("")).toBeFalsy() + }) +}) + +describe("jsonStringSchema", () => { + const required = jsonStringSchema({ label: "Policy document" }) + const optional = jsonStringSchema({ + label: "Configuration", + allowEmpty: true, + }) + + it("accepts valid JSON", () => { + expect(required.safeParse('{"Version":"2012-10-17"}').success).toBeTruthy() + }) + + it("rejects malformed JSON with a derived message", () => { + expect(issueMessages(required, "{ not json")).toContain( + "Policy document must be valid JSON", + ) + }) + + it("rejects empty input when required", () => { + expect(issueMessages(required, "")).toContain("Policy document is required") + }) + + it("allows empty input when allowEmpty is set", () => { + expect(optional.safeParse("").success).toBeTruthy() + expect(optional.safeParse(" ").success).toBeTruthy() + }) + + it("still rejects malformed input when allowEmpty is set", () => { + expect(optional.safeParse("{bad").success).toBeFalsy() + }) +}) diff --git a/spinifex/services/spinifexui/frontend/src/lib/json.ts b/spinifex/services/spinifexui/frontend/src/lib/json.ts new file mode 100644 index 000000000..256506300 --- /dev/null +++ b/spinifex/services/spinifexui/frontend/src/lib/json.ts @@ -0,0 +1,27 @@ +import { z } from "zod" + +export function isValidJson(value: string): boolean { + try { + JSON.parse(value) + return true + } catch { + return false + } +} + +// Zod field for a JSON document entered as a string. Messages derive from +// `label` so they read naturally per field. When `allowEmpty` is true an +// empty/whitespace value passes (optional field); otherwise it is required. +export function jsonStringSchema(opts: { + label: string + allowEmpty?: boolean +}) { + const { label, allowEmpty = false } = opts + const base = allowEmpty + ? z.string() + : z.string().min(1, `${label} is required`) + return base.refine( + (value) => (allowEmpty && value.trim() === "" ? true : isValidJson(value)), + { message: `${label} must be valid JSON` }, + ) +} diff --git a/spinifex/services/spinifexui/frontend/src/routes/_auth/eks/(clusters)/-components/addons-tab.tsx b/spinifex/services/spinifexui/frontend/src/routes/_auth/eks/(clusters)/-components/addons-tab.tsx index 4c2f552f7..c534563af 100644 --- a/spinifex/services/spinifexui/frontend/src/routes/_auth/eks/(clusters)/-components/addons-tab.tsx +++ b/spinifex/services/spinifexui/frontend/src/routes/_auth/eks/(clusters)/-components/addons-tab.tsx @@ -29,6 +29,7 @@ import { eksAddonVersionsQueryOptions, } from "@/queries/eks" import { + addonConfigurationSchema, addonStatusVariant, type CreateAddonFormValues, createAddonSchema, @@ -40,18 +41,6 @@ const STATUS_POLL_MS = 5000 const selectClassName = "h-7 w-full rounded-md border border-input bg-input/20 px-2 text-sm" -function isValidJson(value: string): boolean { - if (value.trim() === "") { - return true - } - try { - JSON.parse(value) - return true - } catch { - return false - } -} - function AddAddonDialog({ clusterName, catalog, @@ -257,10 +246,14 @@ function UpdateAddonDialog({ ]) const handleConfirm = () => { - if (!isValidJson(config)) { - setError("Configuration must be valid JSON") + const result = addonConfigurationSchema.safeParse(config) + if (!result.success) { + setError( + result.error.issues[0]?.message ?? "Configuration must be valid JSON", + ) return } + setError(undefined) updateAddon.mutate( { clusterName, diff --git a/spinifex/services/spinifexui/frontend/src/types/eks.ts b/spinifex/services/spinifexui/frontend/src/types/eks.ts index 7fee1ed4e..07ebeaa51 100644 --- a/spinifex/services/spinifexui/frontend/src/types/eks.ts +++ b/spinifex/services/spinifexui/frontend/src/types/eks.ts @@ -1,6 +1,7 @@ import type { AMITypes, CapacityTypes } from "@aws-sdk/client-eks" import { z } from "zod" +import { jsonStringSchema } from "@/lib/json" import { isValidCidr } from "@/lib/subnet-calculator" // K3s control plane is pinned per Mulga release; expose the supported @@ -89,24 +90,16 @@ export const createNodegroupSchema = z export type CreateNodegroupFormValues = z.infer +export const addonConfigurationSchema = jsonStringSchema({ + label: "Configuration", + allowEmpty: true, +}) + export const createAddonSchema = z.object({ addonName: z.string().min(1, "Add-on is required"), addonVersion: z.string().min(1, "Version is required"), serviceAccountRoleArn: z.string(), - configurationValues: z.string().refine( - (v) => { - if (v.trim() === "") { - return true - } - try { - JSON.parse(v) - return true - } catch { - return false - } - }, - { message: "Configuration must be valid JSON" }, - ), + configurationValues: addonConfigurationSchema, }) export type CreateAddonFormValues = z.infer diff --git a/spinifex/services/spinifexui/frontend/src/types/iam.ts b/spinifex/services/spinifexui/frontend/src/types/iam.ts index 4ab9c11b0..8ec0db436 100644 --- a/spinifex/services/spinifexui/frontend/src/types/iam.ts +++ b/spinifex/services/spinifexui/frontend/src/types/iam.ts @@ -1,5 +1,7 @@ import { z } from "zod" +import { jsonStringSchema } from "@/lib/json" + export const createUserSchema = z.object({ userName: z .string() @@ -18,20 +20,7 @@ export const createPolicySchema = z.object({ .max(128, "Policy name must be 128 characters or less") .regex(/^[\w+=,.@-]+$/, "Policy name contains invalid characters"), description: z.string().optional(), - policyDocument: z - .string() - .min(1, "Policy document is required") - .refine( - (val) => { - try { - JSON.parse(val) - return true - } catch { - return false - } - }, - { message: "Policy document must be valid JSON" }, - ), + policyDocument: jsonStringSchema({ label: "Policy document" }), }) export type CreatePolicyFormData = z.infer @@ -59,20 +48,7 @@ export const createRoleSchema = z.object({ .regex(/^[\w+=,.@-]+$/, "Role name contains invalid characters"), path: z.string().optional(), description: z.string().optional(), - assumeRolePolicyDocument: z - .string() - .min(1, "Trust policy is required") - .refine( - (val) => { - try { - JSON.parse(val) - return true - } catch { - return false - } - }, - { message: "Trust policy must be valid JSON" }, - ), + assumeRolePolicyDocument: jsonStringSchema({ label: "Trust policy" }), }) export type CreateRoleFormData = z.infer